<template>
  <div>
    <card-container>
      <vxe-toolbar>
        <template #buttons>
          <el-input placeholder="请输入关键词" clearable size="small" style="width: 200px;margin-right: 6px;"></el-input>
          <el-button icon="el-icon-search" type="primary" plain size="small" @click="getList">搜索</el-button>
        </template>
      </vxe-toolbar>
      <vxe-table
        ref="table"
        stripe
        style="margin-top: 10px;"
        :loading="loading"
        keep-source
        show-overflow
        :column-config="{ resizable: true }"
        :data="tableData"
      >
        <vxe-column type="seq" width="58" align="center" />
        <vxe-column field="title" width="170" title="通知提醒" />
        <vxe-column field="admin.name" width="140" title="发布人" align="center" />
        <vxe-column field="" width="120" title="已读状态" />
        <vxe-column field="" width="120" title="回复状态" />
        <vxe-column field="created_at" width="180" title="发出时间" align="center" />
        <vxe-column field="deadline" width="180" title="截止时间" align="center" />
        <vxe-column field="operate" title="操作" min-width="220">
          <template #default="{ row }">
            <el-button size="small" plain type="success" @click="">编辑</el-button>
          </template>
        </vxe-column>
      </vxe-table>
    </card-container>
  </div>
</template>

<script>
import { index } from "@/api/noticeUser";

export default {
  data() {
    return {
      loading: false,
      tableData: [],
      total: 0,
    }
  },
  created() {
    this.getList()
  },
  methods: {
    async getList() {
      this.loading = true
      try {
        const res = await index(this.select)
        this.tableData = res.data
        this.total = res.total
        this.loading = false
      } catch (err) {
        console.error(err)
        this.loading = false
      }
    },
  },
  computed: {},
}
</script>

<style scoped lang="scss">
</style>
