浏览代码

安全检查临时登记 缺陷 检查主体 与 检查人员限制关系

zhulu 1 年之前
父节点
当前提交
9c1a101179
共有 2 个文件被更改,包括 15 次插入7 次删除
  1. 1 0
      src/components/orgSelect/zl.orgSelect.vue
  2. 14 7
      src/views/safetycheck/task/components/checkRegister.vue

+ 1 - 0
src/components/orgSelect/zl.orgSelect.vue

@@ -434,6 +434,7 @@ export default {
         });
         this.boundOrgIds = this.boundOrgsClone.map((d) => d.deviceId);
         this.currentTempList= JSON.parse(JSON.stringify(initHistorySelectOrgs));
+        this.leftSearch();
         // this.currentTempList
         // this.left.data = this.searchOrgs.filter((row) => this.boundOrgIds.indexOf(row.id) < 0)
       }

+ 14 - 7
src/views/safetycheck/task/components/checkRegister.vue

@@ -36,7 +36,7 @@
               <el-option
                 v-for="role in roleOptions"
                 :key="role.id"
-                :label="role.name"
+                :label="role.roleName"
                 :value="role.id"
               ></el-option>
             </el-select> </el-form-item
@@ -244,6 +244,7 @@ import { getLabel } from "@/views/commonOption.js";
 import { getNamesByOrgId } from "@/api/system/role.js";
 import orgDropDown from "@/components/orgTree/orgDropDown.vue";
 import { arabicToChinese } from "@/utils/util.js";
+import {getRoles} from "@/api/system/public";
 export default {
   name: "safetyCheckRegister",
   data() {
@@ -286,6 +287,7 @@ export default {
     this.taskInfo.checkOrgId = this.orgId;
     this.taskInfo.checkRoleId = this.roleList[0].roleId;
     this.taskInfo.signImg = this.$route.params.signImg;
+    this.getAllRoles();
   },
   methods: {
     dayjs,
@@ -302,12 +304,17 @@ export default {
         return;
       }
       this.$refs["point_baseInfo"].clearValidate(["checkOrgId"]);
-      getNamesByOrgId(node.id).then((r) => {
-        this.roleOptions = r.data;
-        this.prevCheckOrgType = node.type;
-        if (!this.roleOptions.find((op) => op.id == this.taskInfo.checkRoleId)) {
-          this.taskInfo.checkRoleId = null;
-        }
+      // getNamesByOrgId(node.id).then((r) => {
+      //   this.roleOptions = r.data;
+      //   this.prevCheckOrgType = node.type;
+      //   if (!this.roleOptions.find((op) => op.id == this.taskInfo.checkRoleId)) {
+      //     this.taskInfo.checkRoleId = null;
+      //   }
+      // });
+    },
+    getAllRoles() {
+      getRoles().then((response) => {
+        this.roleOptions = response;
       });
     },
     onBecheckOrgSelect(node) {