LAPTOP-16IUEB3P\Lenovo %!s(int64=3) %!d(string=hai) anos
pai
achega
29c55c2499
Modificáronse 1 ficheiros con 11 adicións e 10 borrados
  1. 11 10
      src/components/addPatrolConfigDialog/index.vue

+ 11 - 10
src/components/addPatrolConfigDialog/index.vue

@@ -89,6 +89,7 @@
                 v-model="addForm.categoryLevelId"
                 @changeNode="chooseClassify"
                 @setRootId="getRootId"
+				:disabled="isBindPlan"
               />
             </el-form-item>
           </el-col>
@@ -135,6 +136,7 @@
               <deptSelect
                 v-model="addForm.groupId"
                 @changeGroup="searchDeptNodeClick"
+				:disabled="isBindPlan"
               />
             </el-form-item>
           </el-col>
@@ -163,6 +165,7 @@
                 dictName="紧急程度"
                 clearable
                 v-model="addForm.urgent"
+				:disabled="isBindPlan"
               >
               </DictSelection>
             </el-form-item>
@@ -368,12 +371,6 @@
           return '新增巡点检计划配置';
         }
       },
-      isBindPlan: {
-        type: Boolean,
-        default: function () {
-          return false;
-        }
-      }
     },
     data() {
       return {
@@ -452,7 +449,8 @@
         ruleNameList: [],
         addDialogLoading: false,
         equipmentList: [],
-        rootId: null
+        rootId: null,
+		isBindPlan:false
       };
     },
     computed: {},
@@ -481,6 +479,7 @@
         } else {
           //  获取计划配置单号
           this.getOrderCode(tips);
+		  this.isBindPlan = false
           this.planRuleEquiList = [];
           this.matterRulesList = [];
         }
@@ -489,6 +488,7 @@
       async getInfo(id) {
         const res = await getInfoById(id);
         this.addForm = res;
+		this.isBindPlan = res.isBindPlan
         this.categoryEquipment(res.categoryLevelId);
         const params = { groupId: res.groupId };
         this.getUserList(params);
@@ -497,7 +497,7 @@
         this.$set(this.addForm, 'urgent', JSON.stringify(res.urgent));
         this.$set(this.addForm, 'executeIdList', res.executeId.split(','));
         this.$set(this.addForm, 'imageUrl', {});
-        this._getEquipmentList(res.categoryId);
+        this._getEquipmentList(res.categoryId,this.isBindPlan);
         let keys = [];
         res.deviceInfo.map((item) => {
           keys.push(item.substanceId);
@@ -538,10 +538,10 @@
       async handleEquipmentClassChange(item) {
         this.clickedTreeNode = true;
         this.equipmentInfo = {};
-        this._getEquipmentList(item.id);
+        this._getEquipmentList(item.id,this.isBindPlan);
       },
       // 封装 - 获取设备分类列表
-      async _getEquipmentList(val) {
+      async _getEquipmentList(val,bind) {
         const params = {
           pageNum: 1,
           size: -1,
@@ -553,6 +553,7 @@
 		  if(!res.list.length) return
           this.planRuleEquiList.map((item) => {
             item.showName = item.name + '(' + item.code + ')'
+			item.disabled = bind
           })
           this.currentEquItemIndex = 0
           const item = this.planRuleEquiList[0]