ZhangXianQiang
2024-04-10 ec91fe6cafe0934e75fe4c164de770c2981cf012
src/views/system/template/index.vue
@@ -1,7 +1,7 @@
<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-form-item label="状态" prop="status">
      <!-- <el-form-item label="状态" prop="status">
        <el-input
          v-model="queryParams.status"
          placeholder="请输入状态"
@@ -27,6 +27,16 @@
          start-placeholder="开始日期"
          end-placeholder="结束日期"
        ></el-date-picker>
      </el-form-item> -->
      <el-form-item label="考核类型" prop="examineCategory">
          <el-select v-model="queryParams.status" placeholder="考核类型" clearable @keyup.enter.native="handleQuery">
            <el-option
              v-for="dict in dict.type.platform_examine_category"
              :key="dict.value"
              :label="dict.label"
              :value="parseInt(dict.value)"
            />
          </el-select>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
@@ -44,7 +54,7 @@
          @click="handleAdd"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
      <!-- <el-col :span="1.5">
        <el-button
          type="success"
          plain
@@ -63,7 +73,7 @@
          :disabled="multiple"
          @click="handleDelete"
        >删除</el-button>
      </el-col>
      </el-col> -->
      <el-col :span="1.5">
        <el-button
          type="warning"
@@ -76,34 +86,19 @@
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
    </el-row>
    <el-table v-loading="loading" :data="checkTemplateList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="55" align="center" />
      <el-table-column label="模板名称" align="center" prop="templateName" width="220px"/>
      <el-table-column label="考核类型" align="center" prop="examineCategory" >
        <template slot-scope="scope">
          <dict-tag :options="dict.type.platform_examine_category" :value="scope.row.examineCategory"/>
        </template>
      </el-table-column>
      <el-table-column label="考核对象" align="center" prop="deptId" width="400px" />
      <el-table-column label="调整系数" align="center" prop="adjustCoefficient" />
      <el-table-column label="调整系数计算方式" align="center" prop="adjustWay"/>
      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
          >删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    <el-card class="box-card" v-for="item in checkTemplateList" :key="item">
      <div class="text item">模板名称:{{ item.templateName }}</div>
      <div class="text item">考核类型:{{ item.examineCategory == 0 ? '省厅考核' : '区域考核' }}</div>
      <div class="text item">考核对象:{{ item.deptId }}</div>
      <div class="text item">发布状态:{{ item.status == 0 ? '启用' : '停用'  }}</div>
      <div class="bottom clearfix">
        <el-button type="text" class="button" @click="">审核</el-button>
        <el-button type="text" class="button" @click="">发布</el-button>
        <el-button type="text" class="button" @click="">复制</el-button>
        <el-button type="text" class="button" @click="handleUpdate(item)">修改</el-button>
        <el-button type="text" class="button" @click="handleDelete(item)">删除</el-button>
      </div>
    </el-card>
    <pagination
      v-show="total>0"
@@ -435,4 +430,18 @@
  display: flex;
  flex-direction: row;
}
.text {
    font-size: 14px;
  }
  .item {
    margin-bottom: 18px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .box-card {
    width: 20%;
  }
</style>