Parcourir la source

装置审计记录 - “审计结果”为“绿区”时,禁用修改功能和删除功能,以及该项审计数据在“问卷详情”和“进度跟踪”页面中的相关编辑功能

wangggziwen il y a 5 mois
Parent
commit
e71bad59d7

+ 17 - 9
ruoyi-ui/src/views/rc/audit/index.vue

@@ -139,6 +139,7 @@
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
+            v-if="scope.row.auditResult != '绿区'"
             v-hasPermi="['rc:audit:edit']"
           >修改</el-button>
           <el-button
@@ -146,6 +147,7 @@
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
+            v-if="scope.row.auditResult != '绿区'"
             v-hasPermi="['rc:audit:remove']"
           >删除</el-button>
           <el-button
@@ -428,7 +430,8 @@ export default {
       this.$router.push({
         path: "/rc/auditinfo",
         query: {
-          auditId: row.id
+          auditId: row.id,
+          auditResult: row.auditResult,
         }
       });
     },
@@ -437,7 +440,8 @@ export default {
       this.$router.push({
         path: "/rc/progress",
         query: {
-          auditId: row.id
+          auditId: row.id,
+          auditResult: row.auditResult,
         }
       });
     },
@@ -511,15 +515,19 @@ export default {
       this.reset();
       const id = row.id || this.ids
       getAudit(id).then(response => {
-        // 字符串转数组
-        if (response.data.deptId != null && response.data.deptId != "") {
-          response.data.deptId = response.data.deptId.split(",").map(Number);
+        if (response.data.auditResult == '绿区') {
+          this.$modal.msgWarning("该项数据不允许修改!");
         } else {
-          response.data.deptId = [];
+          // 字符串转数组
+          if (response.data.deptId != null && response.data.deptId != "") {
+            response.data.deptId = response.data.deptId.split(",").map(Number);
+          } else {
+            response.data.deptId = [];
+          }
+          this.form = response.data;
+          this.open = true;
+          this.title = "修改审计记录";
         }
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改审计记录";
       });
     },
     /** 提交按钮 */

+ 6 - 1
ruoyi-ui/src/views/rc/file/uploadFile.vue

@@ -22,6 +22,7 @@
           icon="el-icon-folder-add"
           size="mini"
           @click="handleAdd"
+          v-if="auditResult != '绿区'"
         >新建文件夹
         </el-button>
       </el-col>
@@ -31,6 +32,7 @@
           icon="el-icon-upload2"
           size="mini"
           @click="handleAddFile"
+          v-if="auditResult != '绿区'"
         >上传文件
         </el-button>
       </el-col>
@@ -109,6 +111,7 @@
             icon="el-icon-edit"
             v-hasPermi="['file:file:edit']"
             @click="handleUpdate(scope.row)"
+            v-if="auditResult != '绿区'"
           >修改
           </el-button>
           <el-button
@@ -116,6 +119,7 @@
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
+            v-if="auditResult != '绿区'"
           >删除
           </el-button>
         </template>
@@ -250,15 +254,16 @@ export default {
         url: process.env.VUE_APP_BASE_API + "/file/file/uploadFile",
         commonfileList: null,
       },
+      auditResult: null,
     };
   },
   created() {
-    console.log(this.$route.query)
     if (this.$route.query) {
       this.queryParams.linkId = this.$route.query.linkId
       this.queryParams.linkName = this.$route.query.linkName
     }
     this.getList();
+    this.auditResult = this.$route.query.auditResult;
   },
   methods: {
     rowClick(row, column, event) {

+ 13 - 2
ruoyi-ui/src/views/rc/progress/index.vue

@@ -108,6 +108,7 @@
           size="mini"
           :disabled="single"
           @click="handleUpdate"
+          v-if="auditResult != '绿区'"
         >修改</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -118,6 +119,7 @@
           size="mini"
           :disabled="multiple"
           @click="handleDelete"
+          v-if="auditResult != '绿区'"
         >删除</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -192,7 +194,7 @@
           <el-button icon="el-icon-folder" style="color:#6e96fa;" circle @click="handleDoc(scope.row , 'audit')"></el-button>
         </template>
       </el-table-column>
-      <el-table-column label="操作" align="center" width="180" fixed="right" class-name="small-padding fixed-width">
+      <el-table-column label="操作" align="center" width="180" fixed="right" class-name="small-padding fixed-width" v-if="auditResult != '绿区'">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -376,11 +378,13 @@ export default {
       },
       // 用户列表
       userOptions: [],
+      auditResult: null,
     };
   },
   created() {
     this.getList();
     this.getUserList();
+    this.auditResult = this.$route.query.auditResult;
   },
   methods: {
     /** 提交申请按钮操作 */
@@ -400,7 +404,14 @@ export default {
       })
     },
     handleDoc(row , type) {
-      this.$router.push({path: '/rc/file', query: {linkId: row.questionnaireId, linkName: 'questionnaire'}})
+      this.$router.push({
+        path: '/rc/file',
+        query: {
+          linkId: row.questionnaireId,
+          linkName: 'questionnaire',
+          auditResult: this.auditResult,
+        }
+      })
     },
     /** 查询用户列表 */
     getUserList() {

+ 17 - 3
ruoyi-ui/src/views/rc/questionnaire/index.vue

@@ -53,6 +53,7 @@
           plain
           size="mini"
           @click="handleEditChapter"
+          v-if="auditResult != '绿区'"
         >编辑左侧章节</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -62,6 +63,7 @@
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
+          v-if="auditResult != '绿区'"
         >新增</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -72,6 +74,7 @@
           size="mini"
           :disabled="single"
           @click="handleUpdate"
+          v-if="auditResult != '绿区'"
         >修改</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -82,6 +85,7 @@
           size="mini"
           :disabled="multiple"
           @click="handleDelete"
+          v-if="auditResult != '绿区'"
         >删除</el-button>
       </el-col>
       <el-col :span="1.5">
@@ -160,7 +164,8 @@
           <el-button icon="el-icon-folder" style="color:#6e96fa;" circle @click="handleDoc(scope.row , 'audit')"></el-button>
         </template>
       </el-table-column>
-      <el-table-column label="操作" align="center" width="120" fixed="right" class-name="small-padding fixed-width">
+      <el-table-column label="操作" align="center" width="120" fixed="right" class-name="small-padding fixed-width"
+                       v-if="auditResult != '绿区'">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -539,7 +544,8 @@ export default {
         },
         pType: '',
         pId: null,
-        form: {}
+        form: {},
+        auditResult: null,
       },
     };
   },
@@ -550,6 +556,7 @@ export default {
     })
     // this.getList();
     this.getUserList();
+    this.auditResult = this.$route.query.auditResult;
   },
   methods: {
     /** 开项按钮操作 */
@@ -613,7 +620,14 @@ export default {
         this.doc.pId = row.id
         this.getFileList();
       } else if (type === 'audit') {
-        this.$router.push({path: '/rc/file', query: {linkId: row.id, linkName: 'questionnaire'}})
+        this.$router.push({
+          path: '/rc/file',
+          query: {
+            linkId: row.id,
+            linkName: 'questionnaire',
+            auditResult: this.auditResult,
+          }
+        })
       }
     },
     getFileList(){