Эх сурвалжийг харах

Merge branch 'master' of http://106.55.241.82:3000/lzf/zhbsq-vue-web

Sanmu8 1 жил өмнө
parent
commit
e3ca481aee

+ 0 - 2
src/assets/styles/extend.scss

@@ -61,10 +61,8 @@
   margin-top: 6vh !important;
 }
 .v-modal {
-  z-index: 1500 !important;
 }
 .el-dialog__wrapper {
-  z-index: 1501 !important;
 }
 .el-dialog__wrapper.scrollbar .el-dialog .el-dialog__body {
   overflow: auto;

+ 24 - 91
src/views/COUNSELINGMESSAGE/task/index.vue

@@ -1,116 +1,50 @@
 <template>
   <div>
     <el-tabs v-model="activeName">
-
       <el-tab-pane label="详细信息" name="详细信息">
         <el-descriptions border>
-          <el-descriptions-item label="活动名称">{{
-              taskList.acname
-            }}</el-descriptions-item>
+          <el-descriptions-item label="活动名称">{{ taskList.acname }}</el-descriptions-item>
           <el-descriptions-item label="任务启动时间">
-            {{
-              taskList.beginTime ? taskList.beginTime.substr(0, 10) : "无"
-            }}</el-descriptions-item
-          >
-          <el-descriptions-item label="业务备注">{{
-              taskList.fromKeyword
-            }}</el-descriptions-item>
-          <el-descriptions-item label="流程名称">{{
-              taskList.proname
-            }}</el-descriptions-item>
+            {{ taskList.beginTime ? taskList.beginTime.substr(0, 10) : '无' }}
+          </el-descriptions-item>
+          <el-descriptions-item label="业务备注">{{ taskList.fromKeyword }}</el-descriptions-item>
+          <el-descriptions-item label="流程名称">{{ taskList.proname }}</el-descriptions-item>
           <el-descriptions-item label="审核状态">
             <el-tag v-if="taskList.status == 1" type="success">同意</el-tag>
             <el-tag v-else-if="taskList.status == 2" type="danger">驳回</el-tag>
             <el-tag v-else-if="taskList.status == 3" type="info">退回</el-tag>
             <el-tag v-else-if="taskList.status == 0">待审核</el-tag>
           </el-descriptions-item>
-          <el-descriptions-item label="审核意见">{{
-              taskList.comments ? taskList.comments : "无"
-            }}</el-descriptions-item>
+          <el-descriptions-item label="审核意见">{{ taskList.comments ? taskList.comments : '无' }}</el-descriptions-item>
         </el-descriptions>
 
-        <el-form
-          ref="form"
-          :model="taskList"
-          label-width="80px"
-          style="margin-top: 20px"
-        >
-          <el-form-item label="标题" prop="title">
-            <el-input
-              v-model="taskList.formobj.title"
-              placeholder="请输入标题"
-              disabled
-            ></el-input>
-          </el-form-item>
-
+        <el-form ref="form" :model="taskList" label-width="80px" style="margin-top: 20px">
+          <el-form-item label="标题" prop="title">{{ taskList.formobj.title }}</el-form-item>
           <el-form-item label="附件上传" prop="fileUrl">
-            <el-upload
-              class="upload-demo"
-              drag
-              action="#"
-              :limit="1"
-              :auto-upload="true"
-              :disabled="true"
-            >
+            <el-upload class="upload-demo" drag action="#" :limit="1" :auto-upload="true" :disabled="true">
               <i class="el-icon-upload"></i>
-              <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
-<!--              <div class="el-upload__tip" slot="tip">只能上传不超过200MB的文件</div>-->
+              <div class="el-upload__text">
+                将文件拖到此处,或
+                <em>点击上传</em>
+              </div>
             </el-upload>
           </el-form-item>
-
-<!--          <el-form-item label="封面图" prop="picture" disabled>-->
-<!--            <el-upload-->
-<!--              action="#"-->
-<!--              list-type="picture-card"-->
-<!--              :limit="1"-->
-<!--              :auto-upload="true"-->
-<!--              :file-list="fileList"-->
-<!--              :disabled="true"-->
-<!--            >-->
-<!--              <i slot="default" class="el-icon-plus"></i>-->
-<!--              <div slot="file" slot-scope="{ file }">-->
-<!--                <img class="el-upload-list__item-thumbnail" :src="file.url" />-->
-
-<!--                &lt;!&ndash; 放大预览 &ndash;&gt;-->
-<!--                <span class="el-upload-list__item-actions">-->
-<!--                  <span-->
-<!--                    class="el-upload-list__item-preview"-->
-<!--                    @click="handlePictureCardPreview(file)"-->
-<!--                  >-->
-<!--                    <i class="el-icon-zoom-in"></i>-->
-<!--                  </span>-->
-<!--                </span>-->
-<!--              </div>-->
-<!--            </el-upload>-->
-<!--          </el-form-item>-->
-
           <el-form-item label="新闻内容" prop="content">
-            <editor
-              v-model="taskList.formobj.content"
-              :min-height="192"
-              :readOnly="true"
-            />
+            <editor v-model="taskList.formobj.content" :min-height="192" :readOnly="true" />
           </el-form-item>
         </el-form>
 
-        <el-dialog
-          :visible="BigImgVisible"
-          fullscreen
-          append-to-body
-          @close="BigImgVisible = false"
-        >
+        <el-dialog :visible="BigImgVisible" fullscreen append-to-body @close="BigImgVisible = false">
           <img width="100%" :src="taskList.formobj.fileUrl" alt="" />
         </el-dialog>
       </el-tab-pane>
       <el-tab-pane label="审批记录" name="审批记录">
         <el-timeline>
-
-          <el-timeline-item v-for="(item,index) in taskList.taskHisAction" :timestamp="item.createTime" placement="top" :key="index+'taskHisAction'">
+          <el-timeline-item v-for="(item, index) in taskList.taskHisAction" :timestamp="item.createTime" placement="top" :key="index + 'taskHisAction'">
             <el-card>
-              <p>{{item.execId}} {{item.acname}} 于 {{ item.createTime}}</p>
+              <p>{{ item.execId }} {{ item.acname }} 于 {{ item.createTime }}</p>
             </el-card>
           </el-timeline-item>
-
         </el-timeline>
       </el-tab-pane>
     </el-tabs>
@@ -121,25 +55,24 @@
 export default {
   data() {
     return {
-      activeName: "详细信息",
+      activeName: '详细信息',
       fileList: [],
-      BigImgVisible: false,
+      BigImgVisible: false
     };
   },
-  props: ["taskList"],
+  props: ['taskList'],
   created() {
     if (this.taskList.formobj.fileUrl) {
-      this.fileList.push({ name: "xxx", url: this.taskList.formobj.fileUrl });
+      this.fileList.push({ name: 'xxx', url: this.taskList.formobj.fileUrl });
     }
   },
   methods: {
     handlePictureCardPreview(file) {
       this.taskList.formobj.fileUrl = file.url;
       this.BigImgVisible = true;
-    },
-  },
+    }
+  }
 };
 </script>
 
-<style>
-</style>
+<style></style>

+ 88 - 133
src/views/norm/dataSubmission.vue

@@ -1,56 +1,39 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
       <el-form-item label="是否启用" prop="status">
         <el-select v-model="queryParams.status" placeholder="请选择是否启用" clearable filterable>
-          <el-option v-for="(item, index) in 2" :key="index" :label="item == 1 ? '启用' : '不启用'"
-            :value="item == 1 ? 1 : 0" />
+          <el-option v-for="(item, index) in 2" :key="index" :label="item == 1 ? '启用' : '不启用'" :value="item == 1 ? 1 : 0" />
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
 
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
-        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
-          v-hasPermi="['business:GIVE:add']">新增</el-button>
+        <el-button type="primary" icon="el-icon-plus" @click="handleAdd" v-hasPermi="['business:GIVE:add']">新增</el-button>
       </el-col>
       <el-col :span="1.5">
-        <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
-          v-hasPermi="['business:GIVE:edit']">修改</el-button>
+        <el-button type="success" icon="el-icon-edit" :disabled="single" @click="handleUpdate" v-hasPermi="['business:GIVE:edit']">修改</el-button>
       </el-col>
       <el-col :span="1.5">
-        <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
-          v-hasPermi="['business:GIVE:remove']">删除</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
-          v-hasPermi="['business:GIVE:export']">导出</el-button>
+        <el-button type="danger" icon="el-icon-delete" :disabled="multiple" @click="handleDelete" v-hasPermi="['business:GIVE:remove']">删除</el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
     <el-table v-loading="loading" :data="GIVEList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="报送参数名称" align="center" prop="fname">
-      </el-table-column>
-      <el-table-column label="计量单位" align="center" prop="funit">
-
-      </el-table-column>
-      <el-table-column label="分类占比" align="center" prop="normRatio">
-
-      </el-table-column>
-      <el-table-column label="权数" align="center" prop="fnumber">
-
-      </el-table-column>
+      <el-table-column label="报送参数名称" align="center" prop="fname"></el-table-column>
+      <el-table-column label="计量单位" align="center" prop="funit"></el-table-column>
+      <el-table-column label="分类占比" align="center" prop="normRatio"></el-table-column>
+      <el-table-column label="权数" align="center" prop="fnumber"></el-table-column>
       <el-table-column label="是否启用" align="center" prop="status">
         <template slot-scope="scope">
-          <el-switch v-model="scope.row.status" @change="changeSwitchHandler(scope.row)" active-color="#13ce66"
-            inactive-color="#ff4949">
-          </el-switch>
+          <el-switch v-model="scope.row.status" @change="changeSwitchHandler(scope.row)" active-color="#13ce66" inactive-color="#ff4949"></el-switch>
         </template>
       </el-table-column>
       <!-- <el-table-column label="启用时间" width="150px" align="center" prop="startTime">
@@ -72,19 +55,16 @@
       <!-- <el-table-column label="明细类型(1=绩效,2=采集)" align="center" prop="type"></el-table-column> -->
       <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)"
-            v-hasPermi="['business:GIVE:edit']">修改</el-button>
-          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
-            v-hasPermi="['business:GIVE:remove']">删除</el-button>
+          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['business:GIVE:edit']">修改</el-button>
+          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['business:GIVE:remove']">删除</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" />
+    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
 
     <!-- 添加或修改报送数据项配置对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
+    <el-dialog :title="title" :visible.sync="open" width="600px" :close-on-click-modal="false" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="180px">
         <el-form-item label="权数" prop="fnumber">
           <el-input v-model="form.fnumber" aria-placeholder="请输入数值"></el-input>
@@ -94,26 +74,29 @@
           <el-input v-model="form.normRatio"></el-input>
         </el-form-item>
 
-        <el-form-item label="计量单位" prop='funit'>
-
-          <el-select v-model="form.funit" @change="(val) => {
-            form.funit = val;
-          }" placeholder="请选择">
-            <el-option v-for="dict in unitSel" :key="dict.dictCode" :label="dict.dictLabel"
-              :value="dict.dictValue"></el-option>
+        <el-form-item label="计量单位" prop="funit">
+          <el-select
+            v-model="form.funit"
+            @change="
+              val => {
+                form.funit = val;
+              }
+            "
+            placeholder="请选择"
+          >
+            <el-option v-for="dict in unitSel" :key="dict.dictCode" :label="dict.dictLabel" :value="dict.dictValue"></el-option>
           </el-select>
-
         </el-form-item>
 
-        <el-form-item label="报送参数名称" prop='fname'>
+        <el-form-item label="报送参数名称" prop="fname">
           <el-input v-model="form.fname"></el-input>
         </el-form-item>
 
-        <el-form-item label="采集公差上下公差占比" prop='dfRetio'>
+        <el-form-item label="采集公差上下公差占比" prop="dfRetio">
           <el-input v-model="form.dfRetio"></el-input>
         </el-form-item>
 
-        <el-form-item label="绩效公差上下公差占比" prop='dfRetio'>
+        <el-form-item label="绩效公差上下公差占比" prop="dfRetio">
           <el-input v-model="form.msRetio"></el-input>
         </el-form-item>
 
@@ -124,11 +107,11 @@
           </template>
         </el-form-item> -->
 
-        <el-form-item label='采集参考值' prop='collValue'>
+        <el-form-item label="采集参考值" prop="collValue">
           <el-input v-model="form.collValue"></el-input>
         </el-form-item>
 
-        <el-form-item label='绩效参考值' prop='meritsValue'>
+        <el-form-item label="绩效参考值" prop="meritsValue">
           <el-input v-model="form.meritsValue"></el-input>
         </el-form-item>
 
@@ -145,11 +128,11 @@
 </template>
 
 <script>
-import { listGIVE, getGIVE, delGIVE, addGIVE, updateGIVE } from "@/api/norm/GIVE";
+import { listGIVE, getGIVE, delGIVE, addGIVE, updateGIVE } from '@/api/norm/GIVE';
 import { listData } from '@/api/system/dict/data';
-import { formatDate } from "@/utils/index";
+import { formatDate } from '@/utils/index';
 export default {
-  name: "GIVE",
+  name: 'GIVE',
   data() {
     return {
       // 根路径
@@ -169,7 +152,7 @@ export default {
       // 报送数据项配置表格数据
       GIVEList: [],
       // 弹出层标题
-      title: "",
+      title: '',
       // 是否显示弹出层
       open: false,
       // 查询参数
@@ -200,56 +183,24 @@ export default {
       form: {},
       // 表单校验
       rules: {
-        id: [
-          { required: true, message: "$comment不能为空", trigger: "blur" }
-        ],
-        delFlag: [
-          { required: true, message: "删除标识不能为空", trigger: "blur" }
-        ],
-        deptId: [
-          { required: true, message: "部门id不能为空", trigger: "blur" }
-        ],
-        fvalue: [
-          { required: true, message: "指标参数不能为空", trigger: "blur" }
-        ],
-        fname: [
-          { required: true, message: "报送参数名称不能为空", trigger: "blur" }
-        ],
-        funit: [
-          { required: true, message: "计量单位不能为空", trigger: "blur" }
-        ],
-        normRatio: [
-          { required: true, message: "分类占比不能为空", trigger: "blur" }
-        ],
-        fnumber: [
-          { required: true, message: "权数不能为空", trigger: "blur" }
-        ],
-        status: [
-          { required: true, message: "是否启用(1=启用,0不启用)不能为空", trigger: "blur" }
-        ],
-        startTime: [
-          { required: true, message: "启用时间不能为空", trigger: "blur" }
-        ],
-        stopTime: [
-          { required: true, message: "停用时间不能为空", trigger: "blur" }
-        ],
-        remark: [
-          { required: true, message: "备注不能为空", trigger: "blur" }
-        ],
-        collValue: [
-          { required: true, message: "采集参考值不能为空", trigger: "blur" }
-        ],
-        meritsValue: [
-          { required: true, message: "绩效参考值不能为空", trigger: "blur" }
-        ],
-        dfRetio: [
-          { required: true, message: "上下公差占比不能为空", trigger: "blur" }
-        ],
-        type: [
-          { required: true, message: "明细类型(1=绩效,2=采集)不能为空", trigger: "change" }
-        ]
+        id: [{ required: true, message: '$comment不能为空', trigger: 'blur' }],
+        delFlag: [{ required: true, message: '删除标识不能为空', trigger: 'blur' }],
+        deptId: [{ required: true, message: '部门id不能为空', trigger: 'blur' }],
+        fvalue: [{ required: true, message: '指标参数不能为空', trigger: 'blur' }],
+        fname: [{ required: true, message: '报送参数名称不能为空', trigger: 'blur' }],
+        funit: [{ required: true, message: '计量单位不能为空', trigger: 'blur' }],
+        normRatio: [{ required: true, message: '分类占比不能为空', trigger: 'blur' }],
+        fnumber: [{ required: true, message: '权数不能为空', trigger: 'blur' }],
+        status: [{ required: true, message: '是否启用(1=启用,0不启用)不能为空', trigger: 'blur' }],
+        startTime: [{ required: true, message: '启用时间不能为空', trigger: 'blur' }],
+        stopTime: [{ required: true, message: '停用时间不能为空', trigger: 'blur' }],
+        remark: [{ required: true, message: '备注不能为空', trigger: 'blur' }],
+        collValue: [{ required: true, message: '采集参考值不能为空', trigger: 'blur' }],
+        meritsValue: [{ required: true, message: '绩效参考值不能为空', trigger: 'blur' }],
+        dfRetio: [{ required: true, message: '上下公差占比不能为空', trigger: 'blur' }],
+        type: [{ required: true, message: '明细类型(1=绩效,2=采集)不能为空', trigger: 'change' }]
       },
-      unitSel: null,
+      unitSel: null
     };
   },
   created() {
@@ -261,7 +212,7 @@ export default {
       dictType: 'norm_uint'
     }).then(res => {
       this.unitSel = res.rows;
-    })
+    });
     this.getList();
   },
 
@@ -271,8 +222,8 @@ export default {
       this.loading = true;
       listGIVE(this.queryParams).then(response => {
         response.rows.forEach((item, index) => {
-          response.rows[index].status = item.status == 0 ? false : true
-        })
+          response.rows[index].status = item.status == 0 ? false : true;
+        });
         this.GIVEList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -293,7 +244,7 @@ export default {
         funit: null,
         normRatio: null,
         fnumber: null,
-        status: "0",
+        status: '0',
         startTime: null,
         stopTime: null,
         remark: null,
@@ -302,7 +253,7 @@ export default {
         dfRetio: null,
         type: null
       };
-      this.resetForm("form");
+      this.resetForm('form');
     },
     /** 搜索按钮操作 */
     handleQuery() {
@@ -311,36 +262,34 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm("queryForm");
+      this.resetForm('queryForm');
       this.handleQuery();
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length !== 1
-      this.multiple = !selection.length
+      this.ids = selection.map(item => item.id);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
     },
     /** 新增按钮操作 */
     handleAdd() {
       this.reset();
       this.open = true;
-      this.title = "添加报送数据项配置";
+      this.title = '添加报送数据项配置';
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
-      const id = row.id || this.ids
+      const id = row.id || this.ids;
       getGIVE(id).then(response => {
         this.form = response.data;
         this.open = true;
-        this.title = "修改报送数据项配置";
+        this.title = '修改报送数据项配置';
       });
     },
     /** 提交按钮 */
     submitForm() {
-
-
-      this.$refs["form"].validate(valid => {
+      this.$refs['form'].validate(valid => {
         if (valid) {
           if (!(parseInt(this.form.fnumber) == this.form.fnumber || parseFloat(this.form.fnumber) == this.form.fnumber)) {
             this.$message.error('权数必须为整数或小数');
@@ -374,13 +323,13 @@ export default {
 
           if (this.form.id != null) {
             updateGIVE(this.form).then(response => {
-              this.$modal.msgSuccess("修改成功");
+              this.$modal.msgSuccess('修改成功');
               this.open = false;
               this.getList();
             });
           } else {
             addGIVE(this.form).then(response => {
-              this.$modal.msgSuccess("新增成功");
+              this.$modal.msgSuccess('新增成功');
               this.open = false;
               this.getList();
             });
@@ -391,24 +340,30 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;
-      this.$modal.confirm('是否确认删除报送数据项配置编号为"' + ids + '"的数据项?').then(function () {
-        return delGIVE(ids);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => { });
+      this.$modal
+        .confirm('是否确认删除报送数据项配置编号为"' + ids + '"的数据项?')
+        .then(function () {
+          return delGIVE(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess('删除成功');
+        })
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('/norm/GIVE/export', {
-        ...this.queryParams
-      }, `GIVE_${new Date().getTime()}.xlsx`)
+      this.download(
+        '/norm/GIVE/export',
+        {
+          ...this.queryParams
+        },
+        `GIVE_${new Date().getTime()}.xlsx`
+      );
     },
 
     // 新增按钮弹窗--->计量单位选择处理
-    selUnitHandler(val) {
-
-    },
+    selUnitHandler(val) {},
     // 是否启用开关事件处理
     changeSwitchHandler(data) {
       let id = data.id;
@@ -417,13 +372,13 @@ export default {
           id,
           startTime: formatDate(new Date()),
           status: 1
-        })
+        });
       } else {
         updateGIVE({
           id,
           stopTime: formatDate(new Date()),
           status: 0
-        })
+        });
       }
 
       this.getList();

+ 85 - 113
src/views/norm/feeindex.vue

@@ -1,35 +1,26 @@
 <template>
-  <el-dialog title="指标权重明细" :visible.sync="isShowNormDialog" width="80vw" :before-close="closeHandler">
-    <div class="app-container">
-      <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+  <el-dialog title="指标权重明细" :visible.sync="isShowNormDialog" :width="'80%'" :close-on-click-modal="false" :before-close="closeHandler">
+    <div class="app-container" style="margin: 0px">
+      <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
         <el-form-item label="是否启用" prop="status">
           <el-select v-model="queryParams.status" placeholder="请选择是否启用" clearable filterable>
-            <el-option v-for="(item, index) in 2" :key="index" :label="item == 1 ? '启用' : '不启用'"
-              :value="item == 1 ? 1 : 0" />
+            <el-option v-for="(item, index) in 2" :key="index" :label="item == 1 ? '启用' : '不启用'" :value="item == 1 ? 1 : 0" />
           </el-select>
         </el-form-item>
         <el-form-item>
-          <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-          <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+          <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
+          <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
         </el-form-item>
       </el-form>
-
       <el-row :gutter="10" class="mb8">
         <el-col :span="1.5">
-          <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
-            v-hasPermi="['business:NORMFEE:add']">新增</el-button>
-        </el-col>
-        <el-col :span="1.5">
-          <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
-            v-hasPermi="['business:NORMFEE:edit']">修改</el-button>
+          <el-button type="primary" icon="el-icon-plus" @click="handleAdd" v-hasPermi="['business:NORMFEE:add']">新增</el-button>
         </el-col>
         <el-col :span="1.5">
-          <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
-            v-hasPermi="['business:NORMFEE:remove']">删除</el-button>
+          <el-button type="success" icon="el-icon-edit" :disabled="single" @click="handleUpdate" v-hasPermi="['business:NORMFEE:edit']">修改</el-button>
         </el-col>
         <el-col :span="1.5">
-          <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
-            v-hasPermi="['business:NORMFEE:export']">导出</el-button>
+          <el-button type="danger" icon="el-icon-delete" :disabled="multiple" @click="handleDelete" v-hasPermi="['business:NORMFEE:remove']">删除</el-button>
         </el-col>
         <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
       </el-row>
@@ -37,39 +28,34 @@
       <el-table v-loading="loading" :data="normData" @selection-change="handleSelectionChange">
         <el-table-column type="selection" width="55" align="center" />
         <el-table-column label="分类占比" align="center" prop="normRatio" />
-        <el-table-column label="指标参数名称" align="center" prop="fname" />
-        <el-table-column label="计量单位" align="center" prop="funit_dictText" />
-        <el-table-column label="权数" align="center" prop="fnumber" />
-        <el-table-column label="绩效公差上下公差占比" align="center" prop="msRetio" />
-        <el-table-column label="采集公差上下公差占比" align="center" prop="dfRetio" />
-        <el-table-column label="采集参考值" align="center" prop="collValue" />
-        <el-table-column label="绩效参考值" align="center" prop="meritsValue" />
+        <el-table-column label="指标参数名称" align="center" prop="fname" width="150" />
+        <el-table-column label="计量单位" align="center" prop="funit_dictText" width="100" />
+        <el-table-column label="权数" align="center" prop="fnumber" width="90" />
+        <el-table-column label="绩效公差上下公差占比" align="center" prop="msRetio" width="130" />
+        <el-table-column label="采集公差上下公差占比" align="center" prop="dfRetio" width="130" />
+        <el-table-column label="采集参考值" align="center" prop="collValue" width="130" />
+        <el-table-column label="绩效参考值" align="center" prop="meritsValue" width="130" />
 
-        <el-table-column label="是否启用" align="center" prop="status">
+        <el-table-column label="是否启用" align="center" prop="status" width="100">
           <template slot-scope="scope">
-            <el-switch v-model="scope.row.status" @change="changeSwitchHandler(scope.row)" active-color="#13ce66"
-              inactive-color="#ff4949">
-            </el-switch>
+            <el-switch v-model="scope.row.status" @change="changeSwitchHandler(scope.row)" active-color="#13ce66" inactive-color="#ff4949"></el-switch>
           </template>
         </el-table-column>
         <!-- <el-table-column label="启用时间" align="center" prop="startTime" />
         <el-table-column label="停用时间" align="center" prop="stopTime" /> -->
-        <el-table-column label="备注" align="center" prop="remark" />
-        <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <el-table-column label="备注" align="center" prop="remark" width="150" />
+        <el-table-column label="操作" align="center" fixed="right" width="150">
           <template slot-scope="scope">
-            <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
-              v-hasPermi="['business:NORMFEE:edit']">修改</el-button>
-            <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
-              v-hasPermi="['business:NORMFEE:remove']">删除</el-button>
+            <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['business:NORMFEE:edit']">修改</el-button>
+            <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['business:NORMFEE:remove']">删除</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" />
+      <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
 
       <!-- 添加或修改指标权重明细对话框 -->
-      <el-dialog :title="title" :visible.sync="open" width="60%" append-to-body>
+      <el-dialog :title="title" :visible.sync="open" width="600px" :close-on-click-modal="false" append-to-body>
         <el-form ref="form" :model="form" :rules="rules" label-width="170px">
           <el-form-item label="权数" prop="fnumber">
             <el-input v-model="form.fnumber" aria-placeholder="请输入数值"></el-input>
@@ -79,35 +65,32 @@
             <el-input v-model="form.normRatio"></el-input>
           </el-form-item>
 
-          <el-form-item label="计量单位" prop='funit'>
-            <el-select v-model="form.funit" @change="selUnitHandler" placeholder="请选择">
-              <el-option v-for="dict in unitSel" :key="dict.dictCode" :label="dict.dictLabel"
-                :value="dict.dictValue"></el-option>
+          <el-form-item label="计量单位" prop="funit">
+            <el-select v-model="form.funit" @change="selUnitHandler" placeholder="请选择" style="width: 100%">
+              <el-option v-for="dict in unitSel" :key="dict.dictCode" :label="dict.dictLabel" :value="dict.dictValue"></el-option>
             </el-select>
           </el-form-item>
 
-          <el-form-item label="指标参数名称" prop='fname'>
+          <el-form-item label="指标参数名称" prop="fname">
             <el-input v-model="form.fname"></el-input>
           </el-form-item>
 
-
-          <el-form-item label="采集公差上下公差占比" prop='dfRetio'>
+          <el-form-item label="采集公差上下公差占比" prop="dfRetio">
             <el-input v-model="form.dfRetio"></el-input>
           </el-form-item>
 
-          <el-form-item label="绩效公差上下公差占比" prop='dfRetio'>
+          <el-form-item label="绩效公差上下公差占比" prop="dfRetio">
             <el-input v-model="form.msRetio"></el-input>
           </el-form-item>
 
-          <el-form-item label='采集参考值' prop='collValue'>
+          <el-form-item label="采集参考值" prop="collValue">
             <el-input v-model="form.collValue"></el-input>
           </el-form-item>
 
-          <el-form-item label='绩效参考值' prop='meritsValue'>
+          <el-form-item label="绩效参考值" prop="meritsValue">
             <el-input v-model="form.meritsValue"></el-input>
           </el-form-item>
 
-
           <el-form-item label="备注">
             <el-input type="textarea" v-model="form.remark"></el-input>
           </el-form-item>
@@ -122,31 +105,31 @@
 </template>
 
 <script>
-import { listNORMFEE, getNORMFEE, delNORMFEE, addNORMFEE, updateNORMFEE } from "@/api/norm/NORMFEE";
+import { listNORMFEE, getNORMFEE, delNORMFEE, addNORMFEE, updateNORMFEE } from '@/api/norm/NORMFEE';
 
 import { listData } from '@/api/system/dict/data';
 
-import { formatDate } from "@/utils/index";
+import { formatDate } from '@/utils/index';
 
 export default {
-  name: "NORMFEE",
+  name: 'NORMFEE',
   props: {
     isShowNormDialog: {
       type: Boolean,
       default: () => {
-        return false
+        return false;
       }
     },
     normId: {
       type: String,
       default: () => {
-        return null
+        return null;
       }
     },
     normData: {
       type: Array,
       defaultL: () => {
-        return []
+        return [];
       }
     }
   },
@@ -154,7 +137,7 @@ export default {
     return {
       dict: {
         type: {
-          dictType: ""
+          dictType: ''
         }
       },
       // 根路径
@@ -173,14 +156,14 @@ export default {
       total: 0,
 
       // 弹出层标题
-      title: "",
+      title: '',
       // 是否显示弹出层
       open: false,
       // 查询参数
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        id: null,
+        id: null
         // createTime: null,
         // createBy: null,
         // updateTime: null,
@@ -202,35 +185,17 @@ export default {
       form: {},
       // 表单校验
       rules: {
-        fnumber: [
-          { required: true, message: "权数为数值", trigger: "blur" },
-        ],
-        normRatio: [
-          { required: true, message: "分类占比不能为空", trigger: "blur" }
-        ],
-        fname: [
-          { required: true, message: "指标参数名称不能为空", trigger: "blur" }
-        ],
-        funit: [
-          { required: true, message: "计量单位不能为空", trigger: "blur" }
-        ],
-        dfRetio: [
-          { required: true, message: "公差占比不能为空", trigger: "blur" }
-        ],
-        type: [
-          { required: true, message: "明细类型不能为空", trigger: "blur" }
-        ],
-        msRetio: [
-          { required: true, message: "绩效公差上下公差占比不能为空", trigger: "blur" }
-        ],
-        collValue: [
-          { required: true, message: "采集参考值不能为空", trigger: "blur" }
-        ],
-        meritsValue: [
-          { required: true, message: "绩效参考值不能为空", trigger: "blur" }
-        ],
+        fnumber: [{ required: true, message: '权数为数值', trigger: 'blur' }],
+        normRatio: [{ required: true, message: '分类占比不能为空', trigger: 'blur' }],
+        fname: [{ required: true, message: '指标参数名称不能为空', trigger: 'blur' }],
+        funit: [{ required: true, message: '计量单位不能为空', trigger: 'blur' }],
+        dfRetio: [{ required: true, message: '公差占比不能为空', trigger: 'blur' }],
+        type: [{ required: true, message: '明细类型不能为空', trigger: 'blur' }],
+        msRetio: [{ required: true, message: '绩效公差上下公差占比不能为空', trigger: 'blur' }],
+        collValue: [{ required: true, message: '采集参考值不能为空', trigger: 'blur' }],
+        meritsValue: [{ required: true, message: '绩效参考值不能为空', trigger: 'blur' }]
       },
-      unitSel: null,
+      unitSel: null
     };
   },
 
@@ -241,7 +206,7 @@ export default {
       dictType: 'norm_uint'
     }).then(res => {
       this.unitSel = res.rows;
-    })
+    });
     this.getList();
   },
   methods: {
@@ -256,7 +221,7 @@ export default {
         this.NORMFEEList = response.rows;
         this.total = response.total;
         this.loading = false;
-        this.$emit("dataHandler", response.rows);
+        this.$emit('dataHandler', response.rows);
       });
     },
     // 取消按钮
@@ -276,12 +241,12 @@ export default {
         funit: null,
         fnumber: null,
         fvalue: null,
-        status: "0",
+        status: '0',
         startTime: null,
         stopTime: null,
         remark: null
       };
-      this.resetForm("form");
+      this.resetForm('form');
     },
     /** 搜索按钮操作 */
     handleQuery() {
@@ -290,35 +255,35 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm("queryForm");
+      this.resetForm('queryForm');
       this.handleQuery();
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length !== 1
-      this.multiple = !selection.length
+      this.ids = selection.map(item => item.id);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
     },
     /** 新增按钮操作 */
     handleAdd() {
       this.open = true;
       this.reset();
-      this.title = "添加指标权重明细";
+      this.title = '添加指标权重明细';
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
-      const id = row.id || this.ids
+      const id = row.id || this.ids;
       getNORMFEE(id).then(response => {
         this.form = response.data;
         this.open = true;
         this.form = row;
-        this.title = "修改指标权重明细";
+        this.title = '修改指标权重明细';
       });
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs["form"].validate(valid => {
+      this.$refs['form'].validate(valid => {
         this.form.status = 1;
         if (valid) {
           if (!(parseInt(this.form.fnumber) == this.form.fnumber || parseFloat(this.form.fnumber) == this.form.fnumber)) {
@@ -356,7 +321,7 @@ export default {
           //   });
           // } else {
           addNORMFEE(this.form).then(response => {
-            this.$modal.msgSuccess("新增成功");
+            this.$modal.msgSuccess('新增成功');
             this.open = false;
             this.getList();
           });
@@ -367,26 +332,33 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;
-      this.$modal.confirm('是否确认删除指标权重明细编号为"' + ids + '"的数据项?').then(function () {
-        return delNORMFEE(ids);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => { });
+      this.$modal
+        .confirm('是否确认删除指标权重明细编号为"' + ids + '"的数据项?')
+        .then(function () {
+          return delNORMFEE(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess('删除成功');
+        })
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('/normFee/export', {
-        ...this.queryParams
-      }, `NORMFEE_${new Date().getTime()}.xlsx`)
+      this.download(
+        '/normFee/export',
+        {
+          ...this.queryParams
+        },
+        `NORMFEE_${new Date().getTime()}.xlsx`
+      );
     },
 
     // 关闭Dialog窗口
     closeHandler() {
-      this.$emit("closeHandler");
+      this.$emit('closeHandler');
     },
 
-
     // 选择单位处理
     selUnitHandler(val) {
       this.form.funit = val;
@@ -399,15 +371,15 @@ export default {
           id,
           startTime: formatDate(new Date()),
           status: 1
-        })
+        });
       } else {
         updateNORMFEE({
           id,
           stopTime: formatDate(new Date()),
           status: 0
-        })
+        });
       }
     }
-  },
+  }
 };
 </script>

+ 62 - 107
src/views/norm/index.vue

@@ -1,46 +1,32 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
       <el-form-item label="状态" prop="status">
         <el-select v-model="queryParams.status" placeholder="请选择状态(1启用,0不启用)" clearable filterable>
           <el-option v-for="dict in statusArr" :key="dict.value" :label="dict.label" :value="dict.value" />
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
 
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
-        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
-          v-hasPermi="['business:NORM:add']">新增</el-button>
+        <el-button type="primary" icon="el-icon-plus" @click="handleAdd" v-hasPermi="['business:NORM:add']">新增</el-button>
       </el-col>
       <el-col :span="1.5">
-        <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
-          v-hasPermi="['business:NORM:edit']">修改</el-button>
+        <el-button type="success" icon="el-icon-edit" :disabled="single" @click="handleUpdate" v-hasPermi="['business:NORM:edit']">修改</el-button>
       </el-col>
       <el-col :span="1.5">
-        <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
-          v-hasPermi="['business:NORM:remove']">删除</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
-          v-hasPermi="['business:NORM:export']">导出</el-button>
+        <el-button type="danger" icon="el-icon-delete" :disabled="multiple" @click="handleDelete" v-hasPermi="['business:NORM:remove']">删除</el-button>
       </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading"  :data="NORMList" @selection-change="handleSelectionChange">
+    <el-table v-loading="loading" :data="NORMList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <!-- <el-table-column label="id" align="center" prop="id" /> -->
-      <!-- <el-table-column label="创建时间" align="center" prop="createTime" /> -->
-      <!-- <el-table-column label="创建人" align="center" prop="createBy" />
-      <el-table-column label="修改时间" align="center" prop="updateTime" />
-      <el-table-column label="修改人" align="center" prop="updateBy" /> -->
-      <!-- <el-table-column label="删除标识" align="center" prop="delFlag" /> -->
-      <!-- <el-table-column label="部门id" align="center" prop="deptId" /> -->
       <el-table-column label="指标分类名称" align="center">
         <template slot-scope="scope">
           <el-link @click="tableBdClick(scope.row)" class="text-color" type="primaty">{{ scope.row.name }}</el-link>
@@ -49,27 +35,22 @@
       <el-table-column label="指标分类编号" align="center" prop="code" />
       <el-table-column label="状态" align="center" prop="status">
         <template slot-scope="scope">
-          <el-switch v-model="scope.row.status" @change="changeSwitchHandler(scope.row)" active-color="#13ce66"
-            inactive-color="#ff4949">
-          </el-switch>
+          <el-switch v-model="scope.row.status" @change="changeSwitchHandler(scope.row)" active-color="#13ce66" inactive-color="#ff4949"></el-switch>
         </template>
       </el-table-column>
       <el-table-column label="备注" align="center" prop="remark" />
       <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)"
-            v-hasPermi="['business:NORM:edit']">修改</el-button>
-          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
-            v-hasPermi="['business:NORM:remove']">删除</el-button>
+          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['business:NORM:edit']">修改</el-button>
+          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['business:NORM:remove']">删除</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" />
+    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
 
     <!-- 添加或修改指标分类对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+    <el-dialog :title="title" :visible.sync="open" width="500px" :close-on-click-modal="false"  append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label-width="100px" label="指标分类编号">
           <el-input v-model="form.code"></el-input>
@@ -78,7 +59,7 @@
           <el-input v-model="form.name"></el-input>
         </el-form-item>
         <el-form-item label-width="100px" label="备注">
-          <el-input type="textarea" v-model="form.remark"></el-input>
+          <el-input type="textarea" v-model="form.remark" rows="5"></el-input>
         </el-form-item>
         <el-form-item label-width="100px" prop="status" label="状态">
           <el-radio-group v-model="form.status">
@@ -94,28 +75,15 @@
     </el-dialog>
 
     <feeindex @closeHandler="closeHandler" @dataHandler="dataHandler" :normData="normData" reset :normId="normId" :isShowNormDialog="isShowNormDialog" />
-
-
   </div>
 </template>
 
 <script>
-import {
-  listNORM,
-  getNORM,
-  delNORM,
-  addNORM,
-  updateNORM,
-  exportNORM,
-} from "@/api/norm/NORM";
-
-import { listNORMFEE, getNORMFEE, delNORMFEE, addNORMFEE, updateNORMFEE } from "@/api/norm/NORMFEE";
-
-
-import feeindex from "./feeindex.vue";
-
+import { listNORM, getNORM, delNORM, addNORM, updateNORM, exportNORM } from '@/api/norm/NORM';
+import { listNORMFEE, getNORMFEE, delNORMFEE, addNORMFEE, updateNORMFEE } from '@/api/norm/NORMFEE';
+import feeindex from './feeindex.vue';
 export default {
-  name: "NORM",
+  name: 'NORM',
   components: {
     feeindex
   },
@@ -138,7 +106,7 @@ export default {
       // 指标分类表格数据
       NORMList: [],
       // 弹出层标题
-      title: "",
+      title: '',
       // 是否显示弹出层
       open: false,
       // 查询参数
@@ -155,50 +123,43 @@ export default {
         name: null,
         code: null,
         status: null,
-        remark: null,
+        remark: null
       },
 
-      normData:[],
+      normData: [],
 
       pageParams: {
         page: 1,
-        pageSize: 10,
+        pageSize: 10
       },
 
- 
-
       // 指标列表每项Id
       normId: null,
       // 表单参数
       form: {},
       // 表单校验
       rules: {
-        id: [{ required: true, message: "id不能为空", trigger: "blur" }],
-        delFlag: [
-          { required: true, message: "删除标识不能为空", trigger: "blur" },
-        ],
-        deptId: [
-          { required: true, message: "部门id不能为空", trigger: "blur" },
-        ],
-        name: [
-          { required: true, message: "指标分类名称不能为空", trigger: "blur" },
-        ],
-        code: [
-          { required: true, message: "指标分类编号不能为空", trigger: "blur" },
-        ],
+        id: [{ required: true, message: 'id不能为空', trigger: 'blur' }],
+        delFlag: [{ required: true, message: '删除标识不能为空', trigger: 'blur' }],
+        deptId: [{ required: true, message: '部门id不能为空', trigger: 'blur' }],
+        name: [{ required: true, message: '指标分类名称不能为空', trigger: 'blur' }],
+        code: [{ required: true, message: '指标分类编号不能为空', trigger: 'blur' }],
         status: [
           {
             required: true,
-            message: "状态(1启用,0不启用)不能为空",
-            trigger: "blur",
-          },
+            message: '状态(1启用,0不启用)不能为空',
+            trigger: 'blur'
+          }
         ],
-        remark: [{ required: true, message: "备注不能为空", trigger: "blur" }],
+        remark: [{ required: true, message: '备注不能为空', trigger: 'blur' }]
       },
-      statusArr: [{ value: 0, label: "不启用" }, { value: 1, label: "启用" }],
+      statusArr: [
+        { value: 0, label: '不启用' },
+        { value: 1, label: '启用' }
+      ],
 
       // 点击列表展示模态框
-      isShowNormDialog: false,
+      isShowNormDialog: false
     };
   },
   created() {
@@ -208,16 +169,13 @@ export default {
     /** 查询指标分类列表 */
     getList() {
       this.loading = true;
-      listNORM(this.queryParams).then((response) => {
+      listNORM(this.queryParams).then(response => {
         response.rows.forEach((item, index) => {
           response.rows[index].status = item.status == 0 ? false : true;
         });
         this.NORMList = response.rows;
         this.total = response.total;
         this.loading = false;
-
-
-
       });
     },
     // 取消按钮
@@ -231,10 +189,10 @@ export default {
       this.form = {
         name: null,
         code: null,
-        status: "0",
-        remark: null,
+        status: '0',
+        remark: null
       };
-      this.resetForm("form");
+      this.resetForm('form');
     },
     /** 搜索按钮操作 */
     handleQuery() {
@@ -243,12 +201,12 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm("queryForm");
+      this.resetForm('queryForm');
       this.handleQuery();
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map((item) => item.id);
+      this.ids = selection.map(item => item.id);
       this.single = selection.length !== 1;
       this.multiple = !selection.length;
     },
@@ -256,32 +214,31 @@ export default {
     handleAdd() {
       this.reset();
       this.open = true;
-      this.title = "添加指标分类";
+      this.title = '添加指标分类';
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
       const id = row.id || this.ids;
-      getNORM(id).then((response) => {
+      getNORM(id).then(response => {
         this.form = response.data;
         this.open = true;
-        this.title = "修改指标分类";
+        this.title = '修改指标分类';
       });
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs["form"].validate((valid) => {
+      this.$refs['form'].validate(valid => {
         if (valid) {
           if (this.form.id != null) {
-            updateNORM(this.form).then((response) => {
-              this.$modal.msgSuccess("修改成功");
+            updateNORM(this.form).then(response => {
+              this.$modal.msgSuccess('修改成功');
               this.open = false;
               this.getList();
             });
-
           } else {
-            addNORM(this.form).then((response) => {
-              this.$modal.msgSuccess("新增成功");
+            addNORM(this.form).then(response => {
+              this.$modal.msgSuccess('新增成功');
               this.open = false;
               this.getList();
             });
@@ -299,17 +256,17 @@ export default {
         })
         .then(() => {
           this.getList();
-          this.$modal.msgSuccess("删除成功");
+          this.$modal.msgSuccess('删除成功');
         })
-        .catch(() => { });
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
-      exportNORM().then((res) => {
+      exportNORM().then(res => {
         this.download(
-          "/norm/export",
+          '/norm/export',
           {
-            ...this.queryParams,
+            ...this.queryParams
           },
           `NORM_${new Date().getTime()}.xlsx`
         );
@@ -331,12 +288,12 @@ export default {
     // 表格行点击事件处理
     tableBdClick(row) {
       this.normId = row.id;
-      listNORMFEE({ normId:this.normId, ...this.pageParams }).then((res) => {
+      listNORMFEE({ normId: this.normId, ...this.pageParams }).then(res => {
         res.rows.forEach((item, index) => {
           res.rows[index].status = item.status == 0 ? false : true;
         });
         this.normData = res.rows;
-      })
+      });
       this.isShowNormDialog = !this.isShowNormDialog;
     },
 
@@ -344,20 +301,18 @@ export default {
     changeSwitchHandler(data) {
       let status = data.status === true ? 1 : 0;
 
-      updateNORM({ id: data.id, status }).then((res) => {
-
-      });
+      updateNORM({ id: data.id, status }).then(res => {});
     },
 
-    dataHandler(data){
+    dataHandler(data) {
       this.normData = data;
     }
-  },
+  }
 };
 </script>
 
 <style lang="scss">
-  .text-color{
-    color: #409eff;
-  }
+.text-color {
+  color: #409eff;
+}
 </style>

+ 82 - 185
src/views/task/index.vue

@@ -1,53 +1,21 @@
 <template>
   <div class="app-container">
-    <el-form
-      :model="queryParams"
-      ref="queryForm"
-      size="small"
-      :inline="true"
-      v-show="showSearch"
-      label-width="68px"
-    >
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
       <el-form-item label="活动名称" prop="acname">
-        <el-input
-          v-model="queryParams.acname"
-          placeholder="请输入活动名称"
-        ></el-input>
+        <el-input v-model="queryParams.acname" placeholder="请输入活动名称"></el-input>
       </el-form-item>
       <el-form-item label="审核状态" prop="status">
-        <el-select
-          v-model="queryParams.status"
-          placeholder="请选择审核状态"
-          clearable
-          filterable
-        >
-          <el-option
-            v-for="dict in statusList"
-            :key="dict.value + 'statusList'"
-            :label="dict.label"
-            :value="dict.value"
-          />
+        <el-select v-model="queryParams.status" placeholder="请选择审核状态" clearable filterable>
+          <el-option v-for="dict in statusList" :key="dict.value + 'statusList'" :label="dict.label" :value="dict.value" />
         </el-select>
       </el-form-item>
       <el-form-item>
-        <el-button
-          type="primary"
-          icon="el-icon-search"
-          size="mini"
-          @click="handleQuery"
-          >搜索</el-button
-        >
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
-          >重置</el-button
-        >
+        <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
       </el-form-item>
     </el-form>
 
-    <el-table
-      v-loading="loading"
-      :data="INSTACTIONTASKList"
-      @selection-change="handleSelectionChange"
-    >
+    <el-table v-loading="loading" :data="INSTACTIONTASKList" @selection-change="handleSelectionChange">
       <!-- <el-table-column type="selection" width="55" align="center" /> -->
       <el-table-column label="活动名称" align="center" prop="acname">
         <template slot-scope="scope">
@@ -66,15 +34,13 @@
       </el-table-column>
       <el-table-column label="任务启动时间" align="center" prop="beginTime">
         <template slot-scope="scope">
-          {{ scope.row.beginTime ? scope.row.beginTime.substr(0, 10) : "无" }}
+          {{ scope.row.beginTime ? scope.row.beginTime.substr(0, 10) : '无' }}
         </template>
       </el-table-column>
       <el-table-column label="审核状态" align="center" prop="status">
         <template slot-scope="scope">
           <el-tag v-if="scope.row.status == '1'" type="success">同意</el-tag>
-          <el-tag v-else-if="scope.row.status == '2'" type="danger"
-            >驳回</el-tag
-          >
+          <el-tag v-else-if="scope.row.status == '2'" type="danger">驳回</el-tag>
           <el-tag v-else-if="scope.row.status == '3'" type="info">退回</el-tag>
           <el-tag v-else-if="scope.row.status == '0'">待审核</el-tag>
         </template>
@@ -84,65 +50,20 @@
           {{ scope.row.comments }}
         </template>
       </el-table-column>
-      <el-table-column
-        label="操作"
-        align="center"
-        class-name="small-padding fixed-width"
-      >
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
-          <el-button
-            v-if="scope.row.status == '0'"
-            size="mini"
-            type="text"
-            @click="handleExamine(scope.row)"
-            v-hasPermi="['business:INSTACTIONTASK:task']"
-            >审核</el-button
-          >
-
-          <el-button
-            size="mini"
-            type="text"
-            @click="handleDetail(scope.row)"
-            v-hasPermi="['business:INSTACTIONTASK:detail']"
-            v-if="scope.row.status != '0'"
-            >详情</el-button
-          >
+          <el-button v-if="scope.row.status == '0'" size="mini" type="text" @click="handleExamine(scope.row)" v-hasPermi="['business:INSTACTIONTASK:task']">审核</el-button>
+          <el-button size="mini" type="text" @click="handleDetail(scope.row)" v-hasPermi="['business:INSTACTIONTASK:detail']" v-if="scope.row.status != '0'">详情</el-button>
         </template>
       </el-table-column>
     </el-table>
 
-    <el-dialog
-      :visible.sync="dialogVisible"
-      width="80%"
-      center
-      @close="closeDia"
-    >
-      <component
-        :is="componentUrl"
-        :taskList="taskList"
-        ref="componentSH"
-      ></component>
-
-      <el-dialog
-        width="60%"
-        :title="subTitle + '审核'"
-        :visible.sync="innerVisible"
-        append-to-body
-        center
-        @close="qx()"
-      >
-        <el-form
-          :model="subForm"
-          :rules="subFormRules"
-          label-width="100px"
-          ref="extaskform"
-        >
+    <el-dialog title="审核" :visible.sync="dialogVisible" width="80%" :close-on-click-modal="false" @close="closeDia">
+      <component :is="componentUrl" :taskList="taskList" ref="componentSH"></component>
+      <el-dialog width="60%" :title="subTitle + '审核'" :visible.sync="innerVisible" append-to-body center @close="qx()">
+        <el-form :model="subForm" :rules="subFormRules" label-width="100px" ref="extaskform">
           <el-form-item label="审核意见" prop="comments">
-            <el-input
-              type="textarea"
-              v-model="subForm.comments"
-              placeholder="请输入审核意见"
-            ></el-input>
+            <el-input type="textarea" v-model="subForm.comments" placeholder="请输入审核意见"></el-input>
           </el-form-item>
         </el-form>
         <div slot="footer" class="dialog-footer">
@@ -161,20 +82,14 @@
       </span>
     </el-dialog>
 
-    <pagination
-      v-show="total > 0"
-      :total="total"
-      :page.sync="queryParams.pageNum"
-      :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
+    <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
   </div>
 </template>
 
 <script>
 //导入审核页面的组件
-import newsTask from "@/views/news/task/index.vue";
-import couTask from "@/views/COUNSELINGMESSAGE/task/index.vue";
+import newsTask from '@/views/news/task/index.vue';
+import couTask from '@/views/COUNSELINGMESSAGE/task/index.vue';
 
 import {
   listINSTACTIONTASK,
@@ -185,14 +100,14 @@ import {
   approve, //通过
   reject, //驳回
   goback, //退回
-  downloadpic,
-} from "@/api/portal/task/task";
+  downloadpic
+} from '@/api/portal/task/task';
 
 export default {
-  name: "INSTACTIONTASK",
+  name: 'INSTACTIONTASK',
   components: {
     newsTask,
-    couTask,
+    couTask
   },
   data() {
     return {
@@ -201,15 +116,15 @@ export default {
       //控制显示审核意见对话框
       innerVisible: false,
       //点击审核那三个按钮会触发submitBtn函数然后设置这个title
-      subTitle: "",
+      subTitle: '',
       //审核页面的
       taskList: {
-        formobj:{
-          picture:''
+        formobj: {
+          picture: ''
         }
       },
       //动态组件
-      componentUrl: "",
+      componentUrl: '',
       //审核的dialog
       dialogVisible: false,
       // 根路径
@@ -229,7 +144,7 @@ export default {
       // 审批任务实例表格数据
       INSTACTIONTASKList: [],
       // 弹出层标题
-      title: "",
+      title: '',
       // 是否显示弹出层
       open: false,
       // 查询参数
@@ -248,62 +163,46 @@ export default {
         execId: null,
         beginTime: null,
         endTime: null,
-        status: "0",
-        comments: null,
+        status: '0',
+        comments: null
       },
       // 表单参数
       form: {},
       subFormRules: {
-        comments: [
-          { required: true, message: "意见不能为空", trigger: "blur" },
-        ],
+        comments: [{ required: true, message: '意见不能为空', trigger: 'blur' }]
       },
       // 表单校验
       rules: {
-        id: [{ required: true, message: "$comment不能为空", trigger: "blur" }],
-        delFlag: [
-          { required: true, message: "删除标识不能为空", trigger: "blur" },
-        ],
+        id: [{ required: true, message: '$comment不能为空', trigger: 'blur' }],
+        delFlag: [{ required: true, message: '删除标识不能为空', trigger: 'blur' }],
         instAcId: [
           {
             required: true,
-            message: "活动实例任务ID不能为空",
-            trigger: "blur",
-          },
-        ],
-        instProId: [
-          { required: true, message: "活动实例id不能为空", trigger: "blur" },
-        ],
-        acname: [
-          { required: true, message: "活动名称不能为空", trigger: "blur" },
-        ],
-        execId: [
-          { required: true, message: "审核人不能为空", trigger: "blur" },
-        ],
-        beginTime: [
-          { required: true, message: "任务启动时间不能为空", trigger: "blur" },
-        ],
-        endTime: [
-          { required: true, message: "任务结束时间不能为空", trigger: "blur" },
+            message: '活动实例任务ID不能为空',
+            trigger: 'blur'
+          }
         ],
+        instProId: [{ required: true, message: '活动实例id不能为空', trigger: 'blur' }],
+        acname: [{ required: true, message: '活动名称不能为空', trigger: 'blur' }],
+        execId: [{ required: true, message: '审核人不能为空', trigger: 'blur' }],
+        beginTime: [{ required: true, message: '任务启动时间不能为空', trigger: 'blur' }],
+        endTime: [{ required: true, message: '任务结束时间不能为空', trigger: 'blur' }],
         status: [
           {
             required: true,
-            message: "审核状态(1=同意,2=驳回)不能为空",
-            trigger: "blur",
-          },
-        ],
-        comments: [
-          { required: true, message: "审核意见不能为空", trigger: "blur" },
+            message: '审核状态(1=同意,2=驳回)不能为空',
+            trigger: 'blur'
+          }
         ],
+        comments: [{ required: true, message: '审核意见不能为空', trigger: 'blur' }]
       },
       statusList: [
-        { value: null, label: "全部" },
-        { value: "0", label: "待审核" },
-        { value: "1", label: "同意" },
-        { value: "2", label: "驳回" },
-        { value: "3", label: "退回" },
-      ],
+        { value: null, label: '全部' },
+        { value: '0', label: '待审核' },
+        { value: '1', label: '同意' },
+        { value: '2', label: '驳回' },
+        { value: '3', label: '退回' }
+      ]
     };
   },
   created() {
@@ -314,26 +213,26 @@ export default {
       // console.log('关闭');
     },
     extask() {
-      this.$refs["extaskform"].validate((valid) => {
+      this.$refs['extaskform'].validate(valid => {
         if (valid) {
           let data = {
             comments: this.subForm.comments,
-            taskId: this.taskList.id,
+            taskId: this.taskList.id
           };
-          if (this.subTitle == "同意") {
-            approve(data).then((res) => {
+          if (this.subTitle == '同意') {
+            approve(data).then(res => {
               this.dialogVisible = false;
               this.qx();
               this.getList();
             });
-          } else if (this.subTitle == "驳回") {
-            reject(data).then((res) => {
+          } else if (this.subTitle == '驳回') {
+            reject(data).then(res => {
               this.dialogVisible = false;
               this.qx();
               this.getList();
             });
-          } else if (this.subTitle == "退回") {
-            goback(data).then((res) => {
+          } else if (this.subTitle == '退回') {
+            goback(data).then(res => {
               this.dialogVisible = false;
               this.qx();
               this.getList();
@@ -372,20 +271,18 @@ export default {
     //点击审核
     handleExamine(row) {
       // this.taskList = []
-      getINSTACTIONTASK(row.id).then((res) => {
+      getINSTACTIONTASK(row.id).then(res => {
         this.taskList = res.data;
         this.componentUrl = res.data.infoUrl;
         this.dialogVisible = true;
-
-
       });
     },
     //点击查看详细
     handleDetail(row) {
-      getINSTACTIONTASK(row.id).then((res) => {
+      getINSTACTIONTASK(row.id).then(res => {
         this.taskList = res.data;
         this.componentUrl = res.data.infoUrl;
-        downloadpic(this.taskList.formobj.picture).then((res) => {
+        downloadpic(this.taskList.formobj.picture).then(res => {
           this.taskList.formobj.picture = window.URL.createObjectURL(res);
           this.dialogVisible = true;
         });
@@ -394,7 +291,7 @@ export default {
     /** 查询审批任务实例列表 */
     getList() {
       this.loading = true;
-      listINSTACTIONTASK(this.queryParams).then((response) => {
+      listINSTACTIONTASK(this.queryParams).then(response => {
         this.INSTACTIONTASKList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -416,10 +313,10 @@ export default {
         execId: null,
         beginTime: null,
         endTime: null,
-        status: "0",
-        comments: null,
+        status: '0',
+        comments: null
       };
-      this.resetForm("form");
+      this.resetForm('form');
     },
     /** 搜索按钮操作 */
     handleQuery() {
@@ -428,12 +325,12 @@ export default {
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm("queryForm");
+      this.resetForm('queryForm');
       this.handleQuery();
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map((item) => item.id);
+      this.ids = selection.map(item => item.id);
       this.single = selection.length !== 1;
       this.multiple = !selection.length;
     },
@@ -441,31 +338,31 @@ export default {
     handleAdd() {
       this.reset();
       this.open = true;
-      this.title = "添加审批任务实例";
+      this.title = '添加审批任务实例';
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
       const id = row.id || this.ids;
-      getINSTACTIONTASK(id).then((response) => {
+      getINSTACTIONTASK(id).then(response => {
         this.form = response.data;
         this.open = true;
-        this.title = "修改审批任务实例";
+        this.title = '修改审批任务实例';
       });
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs["form"].validate((valid) => {
+      this.$refs['form'].validate(valid => {
         if (valid) {
           if (this.form.id != null) {
-            updateINSTACTIONTASK(this.form).then((response) => {
-              this.$modal.msgSuccess("修改成功");
+            updateINSTACTIONTASK(this.form).then(response => {
+              this.$modal.msgSuccess('修改成功');
               this.open = false;
               this.getList();
             });
           } else {
-            addINSTACTIONTASK(this.form).then((response) => {
-              this.$modal.msgSuccess("新增成功");
+            addINSTACTIONTASK(this.form).then(response => {
+              this.$modal.msgSuccess('新增成功');
               this.open = false;
               this.getList();
             });
@@ -483,20 +380,20 @@ export default {
         })
         .then(() => {
           this.getList();
-          this.$modal.msgSuccess("删除成功");
+          this.$modal.msgSuccess('删除成功');
         })
         .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
       this.download(
-        "business/INSTACTIONTASK/export",
+        'business/INSTACTIONTASK/export',
         {
-          ...this.queryParams,
+          ...this.queryParams
         },
         `INSTACTIONTASK_${new Date().getTime()}.xlsx`
       );
-    },
-  },
+    }
+  }
 };
 </script>