<template>
  <div class="app-container">
    <el-form
      :model="queryParams"
      ref="queryForm"
      size="small"
      :inline="true"
      v-show="showSearch"
      label-width="110px"
    >
      <el-row>
        <el-col :span="6">
          <el-form-item label="项目编号" prop="key1">
            <el-input
              v-model="queryParams.key1"
              clearable
              style="width: 240px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="项目名称" prop="key2">
            <el-input
              v-model="queryParams.key2"
              clearable
              style="width: 240px"
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="项目投资单位" prop="key3">
            <el-select v-model="queryParams.key3" placeholder="请选择">
              <el-option label="投资单位1" value="01"></el-option>
              <el-option label="投资单位2" value="02"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="项目责任单位" prop="key4">
            <el-select v-model="queryParams.key4" placeholder="请选择">
              <el-option label="责任单位1" value="01"></el-option>
              <el-option label="责任单位2" value="02"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item label="项目责任单位" prop="key5">
            <el-select v-model="queryParams.key5" placeholder="请选择">
              <el-option label="全部" value=""></el-option>
              <el-option label="待审核" value="01"></el-option>
              <el-option label="已审核" value="02"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="6">
          <el-form-item>
            <el-button type="primary" icon="el-icon-search" size="mini">
              搜索
            </el-button>
            <el-button icon="el-icon-refresh" size="mini">重置</el-button>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>

    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button type="primary" plain icon="el-icon-download" size="mini" @click="btnClick">
          导出Excel
        </el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch"></right-toolbar>
    </el-row>

    <el-table :data="listData" border>
      <el-table-column label="序号" type="index" align="center">
        <template slot-scope="scope">
          <span>{{ scope.$index + 1 }}</span>
        </template>
      </el-table-column>
      <el-table-column label="项目编号" align="center" prop="key1" />
      <el-table-column label="项目名称" align="center" prop="key2" />
      <el-table-column label="项目类型" align="center" prop="key3" />
      <el-table-column label="项目投资单位" align="center" prop="key4" />
      <el-table-column label="项目责任单位" align="center" prop="key5" />
      <el-table-column label="工程概况" align="center" prop="key6" />
      <el-table-column label="审批状态" align="center" prop="key7" />
      <el-table-column label="合同查看" align="center" prop="key8">
        <template><el-button type="text" @click="btnClick">查看</el-button></template>
      </el-table-column>
    </el-table>

    <pagination
      v-show="total > 0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
  </div>
</template>

<script>
export default {
  name: "ProjectProgress",
  data() {
    return {
      // 遮罩层
      loading: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 表单参数
      form: {},
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
      },
      listData: [
        {
          key1: "2622323",
          key2: "钢铁升降式改装",
          key3: "研发类",
          key4: "研发部",
          key5: "科德集团",
          key6: "目前工程有序进行中",
          key7: "进行中",
        },
      ],
    };
  },
  methods: {
    handleQuery() {},
    getList() {},
    btnClick() {
      this.$message.warning("功能建设中...");
    },
    handleAddClick() {
      this.visible = true;
    },
    submitForm() {
      this.$message.warning("功能建设中...");
    },
    cancel() {
      this.visible = false;
    }
  },
};
</script>
