Browse Source

辅助指标权限分配

1 year ago
parent
commit
aff351269d

+ 5 - 5
src/views/AuxiliaryIndex/index.vue

@@ -45,7 +45,7 @@
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
-          v-hasPermi="['business:NORMROLE:add']"
+          v-hasPermi="['norm:NORMROLE:add']"
           >新增</el-button
         >
       </el-col>
@@ -57,7 +57,7 @@
           size="mini"
           :disabled="single"
           @click="handleUpdate"
-          v-hasPermi="['business:NORMROLE:edit']"
+          v-hasPermi="['norm:NORMROLE:edit']"
           >修改</el-button
         >
       </el-col>
@@ -69,7 +69,7 @@
           size="mini"
           :disabled="multiple"
           @click="handleDelete"
-          v-hasPermi="['business:NORMROLE:remove']"
+          v-hasPermi="['norm:NORMROLE:remove']"
           >删除</el-button
         >
       </el-col>
@@ -130,7 +130,7 @@
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
-            v-hasPermi="['business:NORMROLE:edit']"
+            v-hasPermi="['norm:NORMROLE:edit']"
             >修改</el-button
           >
           <el-button
@@ -138,7 +138,7 @@
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
-            v-hasPermi="['business:NORMROLE:remove']"
+            v-hasPermi="['norm:NORMROLE:remove']"
             >删除</el-button
           >
         </template>

+ 5 - 5
src/views/RightDistribution/index.vue

@@ -45,7 +45,7 @@
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
-          v-hasPermi="['business:NORMROLE:add']"
+          v-hasPermi="['norm:NORMROLE:add']"
           >新增</el-button
         >
       </el-col>
@@ -57,7 +57,7 @@
           size="mini"
           :disabled="single"
           @click="handleUpdate"
-          v-hasPermi="['business:NORMROLE:edit']"
+          v-hasPermi="['norm:NORMROLE:edit']"
           >修改</el-button
         >
       </el-col>
@@ -69,7 +69,7 @@
           size="mini"
           :disabled="multiple"
           @click="handleDelete"
-          v-hasPermi="['business:NORMROLE:remove']"
+          v-hasPermi="['norm:NORMROLE:remove']"
           >删除</el-button
         >
       </el-col>
@@ -126,7 +126,7 @@
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
-            v-hasPermi="['business:NORMROLE:edit']"
+            v-hasPermi="['norm:NORMROLE:edit']"
             >修改</el-button
           >
           <el-button
@@ -134,7 +134,7 @@
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
-            v-hasPermi="['business:NORMROLE:remove']"
+            v-hasPermi="['norm:NORMROLE:remove']"
             >删除</el-button
           >
         </template>

+ 21 - 7
src/views/norm/index.vue

@@ -25,7 +25,7 @@
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
-    <el-table  :data="NORMList" @selection-change="handleSelectionChange">
+    <el-table ref="multipleTable"  :data="NORMList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="指标分类名称" align="center">
         <template slot-scope="scope">
@@ -101,6 +101,8 @@ export default {
       loading: true,
       // 选中数组
       ids: [],
+      // 要删除的数据项
+      delList:[],
       // 非单个禁用
       single: true,
       // 非多个禁用
@@ -219,6 +221,8 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
+      this.delList=selection;
+      console.log(selection);
       this.ids = selection.map(item => item.id);
       this.single = selection.length !== 1;
       this.multiple = !selection.length;
@@ -261,17 +265,27 @@ export default {
     },
     /** 删除按钮操作 */
     handleDelete(row) {
+      let that = this;
       const ids = row.id || this.ids;
       this.$modal
         .confirm('是否确认删除?')
         .then(function () {
-          return delNORM(ids);
-        })
-        .then(() => {
-          this.getList();
-          this.$modal.msgSuccess('删除成功');
+          let is = false;
+          that.delList.forEach(item=>{
+            if(item.status == true){
+              is = true
+            }
+          })
+          if(!is){
+             delNORM(ids);
+             that.$modal.msgSuccess('删除成功');
+             that.getList();
+          }
+          that.$refs.multipleTable.clearSelection();
+          that.$message.error('指标正在启用,无法删除!');
         })
-        .catch(() => {});
+        .catch(() => {
+        });
     },
     /** 导出按钮操作 */
     handleExport() {

+ 1 - 1
src/views/task/index.vue

@@ -83,7 +83,7 @@
       </el-dialog>
 
       <span slot="footer" class="dialog-footer" v-if="taskList.status == 0">
-        <el-button v-if="checkPermi(['task:instaction:approve'])" type="primary" @click="submitBtn('审核通过')">审核通过</el-button>
+        <el-button v-if="checkPermi(['task:instaction:approve'])" type="primary" @click="submitBtn('同意')">审核通过</el-button>
         <el-button  v-if="checkPermi(['task:instaction:reject'])"  type="warning" @click="submitBtn('驳回')">驳回</el-button>
         <!-- <el-button  v-if="checkPermi(['task:instaction:goback'])"  type="danger" @click="submitBtn('退回')">退回</el-button> -->
       </span>