<template>
  <el-card class="box-card">
    <div slot="header" class="clearfix">
      <span>我的通知(未签收)</span>
      <el-button style="float: right; padding: 3px 0;color: #202020;" type="text" @click="more">更多</el-button>
    </div>
    <el-table v-loading="loading" :data="infoList" size="small" :show-header="showHeader">
      <el-table-column label="标题"style="color:#1890ff"  prop="tatle" align="left"  :show-header="showHeader">
        <template slot-scope="scope">
          <el-button type="text"  style="color: black">{{scope.row.title}}</el-button>
        </template>
      </el-table-column>
      <el-table-column label="发布日期" align="right"prop="updateTime" :show-header="showHeader" >
        <template slot-scope="scope">
          <el-button type="text"  style="color: black">{{parseTime(scope.row.sendtime,'{y}-{m}-{d}')}}</el-button>
        </template>
      </el-table-column>
    </el-table>
  </el-card>
</template>
<script>
  import { listInfo, } from "@/api/system/notify_info/mylist";
  export default {
    name: "Info",
    data() {
      return {
        showHeader:true,
// 遮罩层
        loading: true,
// 选中数组
        ids: [],
// 非单个禁用
        single: true,
// 非多个禁用
        multiple: true,
// 总条数
        total: 0,
// 【请填写功能名称】表格数据
        infoList: [],
// 弹出层标题
        title: "",
// 是否显示弹出层
        open: false,
// 查询参数
        pieParams: {
          pageNum: 1,
          pageSize: 5,
          recvstatus:0,
          orderByColumn:"sendtime",//排序字段
          isAsc:"desc",//排序方式
        },
// 表单参数
        form: {},
// 表单校验
        rules: {
          guid: [
            {required: true, message: "收件人不能为空", trigger: "blur"}
          ],
        },
        tztitle: "通知详情",
        tzshow: false,
        xxloading: true,
      };
    },
    created() {
      this.getList();
    },
    methods: {
      /** 查询【请填写功能名称】列表 */
      getList() {
        this.loading = true;
        listInfo(this.pieParams).then(response => {
          console.log(response.rows)
          this.infoList = response.rows;
          this.loading = false;
        });
      },

      //指定跳转地址
      more(){
        this.$router.replace('/mylist')
      },

    }
  }
</script>
<style lang="less" scoped>
  .box-card {
    margin-left: 16px;
    height: 400px;
  }

  .clearfix {
    color: #1890ff;
  }

  .text {
    font-size: 14px;
  }

  .item {
    height: 44px;
    line-height: 44px;
  }

  .clearfix:before,
  .clearfix:after {
    display: table;
    content: "";
  }

  .clearfix:after {
    clear: both
  }

  .el-card__header {
    background: #f5f5f5;
    color: #1890ff;
  }
</style>
