<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="8">
          <el-form-item label="项目编号" prop="key1">
            <el-input
              v-model="queryParams.key1"
              clearable
              @keyup.enter.native="handleQuery"
              style="width: 100%;"
            />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="项目名称" prop="key2">
            <el-input
              v-model="queryParams.key2"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="技术领域" prop="key4">
            <el-select v-model="queryParams.key4" placeholder="请选择">
              <el-option label="全部" value=""></el-option>
              <el-option label="新产品" value="01"></el-option>
              <el-option label="新工艺" value="02"></el-option>
              <el-option label="新技术" value="03"></el-option>
              <el-option label="资源利用类" value="04"></el-option>
              <el-option label="安全环保类" value="05"></el-option>
              <el-option label="智能制作类" value="06"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="技术领域" prop="key3">
            <el-select v-model="queryParams.key3" placeholder="请选择">
              <el-option label="全部" value=""></el-option>
              <el-option label="新产品" value="01"></el-option>
              <el-option label="新工艺" value="02"></el-option>
              <el-option label="新技术" value="03"></el-option>
              <el-option label="资源利用类" value="04"></el-option>
              <el-option label="安全环保类" value="05"></el-option>
              <el-option label="智能制作类" value="06"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <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="8">
          <el-form-item label="项目来源" prop="key9">
            <el-select v-model="queryParams.key9" placeholder="请选择">
              <el-option label="全部" value=""></el-option>
              <el-option label="本企业自选项目" value="01"></el-option>
              <el-option label="政府部门科技项目" value="02"></el-option>
              <el-option label="其他企业(单位)委托" value="03"></el-option>
              <el-option label="其他项目" value="04"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="成果类型" prop="key10">
            <el-select v-model="queryParams.key10" placeholder="请选择">
              <el-option label="全部" value=""></el-option>
              <el-option label="专利类" value="01"></el-option>
              <el-option label="软件著作类" value="02"></el-option>
              <el-option label="论文类" value="03"></el-option>
              <el-option label="标准类" value="04"></el-option>
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="8">
          <el-form-item label="项目时间" prop="key8">
            <el-date-picker type="daterange" v-model="queryParams.key8"></el-date-picker>
          </el-form-item>
        </el-col>
        
        <el-col :span="8">
          <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" icon="el-icon-plus" size="mini" @click="btnClick">
          新增
        </el-button>
        <el-button type="danger" plain icon="el-icon-delete" size="mini" @click="btnClick">
          删除
        </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="key2" />
      <el-table-column label="项目名称" align="center" prop="key3" show-overflow-tooltip="" />
      <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" />
      <el-table-column label="项目负责人" align="center" prop="key9" />
      <el-table-column label="项目进度" align="center" prop="key10" />
      <el-table-column label="研发预算情况合计" align="center" prop="key11" />
      <el-table-column label="国拨专项/自筹/预算合计" align="center" prop="key12" />
      <el-table-column label="实际研发经费投入情况" align="center" prop="key13" />
      <el-table-column label="实际国拨专项/自筹/预算合计" align="center" prop="key14" />
      <el-table-column label="项目管理类型" align="center" prop="key15" />
      <el-table-column label="项目进度" align="center" prop="key16" />
    </el-table>

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

    <el-dialog :title="dialogTitle" :visible.sync="visible" width="800px" append-to-body>
      <el-form ref="form" :model="form" label-width="120px">
       
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">确 定</el-button>
        <el-button @click="cancel">取 消</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: "ReserveProjectApply",
  data() {
    return {
      // 遮罩层
      loading: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 表单参数
      form: {},
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
      },
      listData: [
        {
          key1: "KIGI52254",
          key2: "钢铁升降式改装",
          key3: "新产品",
          key4: "调研阶段",
          key5: "本企业自选",
          key6: "2023-10-20至2025-12-31",
          key7: "用户单位",
          key8: "张三",
          key9: "进行中",
          key14: "自主研发"
        },
      ],
      visible: false,
      formData: {},
      dialogTitle: "新增"
    };
  },
  methods: {
    handleQuery() {},
    getList() {},
    btnClick() {
      this.$message.warning("功能建设中...");
    },
    handleAddClick() {
      this.visible = true;
    },
    submitForm() {
      this.$message.warning("功能建设中...");
    },
    cancel() {
      this.visible = false;
    }
  },
};
</script>
