<template>
  <div class="global">
    <div class="mainContainer">
      <div class="title">政策制度</div>
      <div class="main">
        <el-form :inline="true" :model="query" class="demo-form-inline">
          <el-form-item label="发布时间:">
            <el-date-picker
              v-model="query.releaseTime"
              type="daterange"
              range-separator="至"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
            >
            </el-date-picker>
          </el-form-item>
          <el-form-item label="标题:">
            <el-input v-model="query.title"></el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="primary">清空</el-button>
          </el-form-item>
          <el-form-item>
            <el-button type="primary">查询</el-button>
          </el-form-item>
        </el-form>

        <el-table
          border
          stripe
          :data="policySystemData"
          highlight-current-row
          @current-change="handleCurrentChange"
        >
          <el-table-column
            type="index"
            align="center"
            label="序号"
            width="50px"
          >
          </el-table-column>
          <el-table-column prop="title" label="标题" align="center">
          </el-table-column>
          <el-table-column prop="releaseTime" label="发布时间" align="center">
          </el-table-column>
          <el-table-column prop="publisher" label="发布人" align="center">
          </el-table-column>
          <el-table-column
            prop="publisherCompany"
            label="发布人所属单位"
            align="center"
          >
          </el-table-column>
          <el-table-column prop="receiver" label="接收人" align="center">
          </el-table-column>

          <el-table-column
            prop="operation"
            label="操作"
            align="center"
            width="300px"
          >
            <template slot-scope="scope">
              <el-button
                size="mini"
                @click="handleCheck(scope.$index, scope.row)"
                >查看</el-button
              >
              <el-button
                size="mini"
                @click="handleEdit(scope.$index, scope.row)"
                >修改</el-button
              >

              <el-button
                size="mini"
                @click="handleDelete(scope.$index, scope.row)"
                >删除</el-button
              >
            </template>
          </el-table-column>
        </el-table>

        <pagination
          v-show="total > 0"
          :total="total"
          :page.sync="listQuery.page"
          :limit.sync="listQuery.limit"
          @pagination="getList"
        />
      </div>
    </div>
  </div>
</template>
<script>
import Pagination from "@/components/Pagination"
export default {
  components: { Pagination },
  data() {
    return {
      //分页
      total: 30,
      listLoading: true,
      listQuery: {
        page: 1,
        limit: 10,
        importance: undefined,
        title: undefined,
        type: undefined,
        sort: "+id",
      },
      value: "",
      query: {
        releaseTime: "",
        title: "",
      },
      //表格列表
      policySystemData: [
        {
          title: "gggggg",
          releaseTime: "2020-2-2",
          publisher: "ggg",
          publisherCompany: "fghtdhth",
          receiver: "ggggg",
        },
        {
          title: "gggggg",
          releaseTime: "2020-2-2",
          publisher: "ggg",
          publisherCompany: "fghtdhth",
          receiver: "ggggg",
        },
        {
          title: "gggggg",
          releaseTime: "2020-2-2",
          publisher: "ggg",
          publisherCompany: "fghtdhth",
          receiver: "ggggg",
        },
      ],
    }
  },
  methods: {
    // 当表格的当前行发生变化的时候会触发该事件
    handleCurrentChange() {},
    getList() {},
  },
}
</script>
<style lang="scss" scoped>
.title {
  height: 30px;
  line-height: 30px;
  border-bottom: 1px solid #ccc;
  margin-bottom: 20px;
}


</style>