|
@@ -302,15 +302,18 @@
|
|
|
safeIdList:[],
|
|
|
//过滤柜锁
|
|
|
filterCabinetLock:[],
|
|
|
+ //存储编辑的时候返回的智能锁
|
|
|
+ editLockList:[],
|
|
|
}
|
|
|
},
|
|
|
created(){
|
|
|
- this.initialize();
|
|
|
+
|
|
|
},
|
|
|
mounted(){
|
|
|
let self=this;
|
|
|
+ this.initialize();
|
|
|
this.getDeptDropList();
|
|
|
- this.chemicalCabinetGetLockList();
|
|
|
+
|
|
|
|
|
|
},
|
|
|
methods:{
|
|
@@ -318,6 +321,7 @@
|
|
|
initialize(){
|
|
|
let self=this;
|
|
|
if(this.propsData.cabinetId){
|
|
|
+
|
|
|
let obj = JSON.parse(JSON.stringify(this.propsData))
|
|
|
let newData = {
|
|
|
cabinetId:obj.cabinetId,
|
|
@@ -344,6 +348,7 @@
|
|
|
if(item.cabinetLockVoList){
|
|
|
item.cabinetLockVoList.forEach((bigItem)=>{
|
|
|
minObj.cabinetLockList.push(bigItem.lockId)
|
|
|
+ this.editLockList.push(bigItem.lockId)
|
|
|
})
|
|
|
}
|
|
|
if(item.cabinetAdminVoList){
|
|
@@ -363,7 +368,11 @@
|
|
|
})
|
|
|
this.subOptions=[{subId:obj.subId,subName:obj.subName,}]
|
|
|
this.$set(this,'newData',newData);
|
|
|
- this.iotDeviceFindByType(this.newData.subId);
|
|
|
+ this.chemicalCabinetGetLockList(this.newData.cabinetId);
|
|
|
+
|
|
|
+
|
|
|
+ }else{
|
|
|
+ this.chemicalCabinetGetLockList('');
|
|
|
}
|
|
|
},
|
|
|
// 返回按钮
|
|
@@ -454,9 +463,12 @@
|
|
|
})
|
|
|
},
|
|
|
//化学品柜-过滤柜锁
|
|
|
- chemicalCabinetGetLockList(){
|
|
|
- chemicalCabinetGetLockList({}).then(response => {
|
|
|
+ chemicalCabinetGetLockList(cabinetId){
|
|
|
+ chemicalCabinetGetLockList({cabinetId:cabinetId}).then(response => {
|
|
|
this.$set(this, 'filterCabinetLock', response.data)
|
|
|
+ if (this.newData.cabinetId){
|
|
|
+ this.iotDeviceFindByType(this.newData.subId);
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
//查询学院列表
|
|
@@ -590,6 +602,18 @@
|
|
|
list.push({lockName:item.deviceName,lockId:item.id,lockNum:item.deviceNo})
|
|
|
})
|
|
|
this.$set(this, 'lockOptions', list)
|
|
|
+
|
|
|
+ if (this.newData.cabinetId){
|
|
|
+ let editLockListArr = Array.from(new Set(this.editLockList));
|
|
|
+ this.lockOptions.forEach(v => {
|
|
|
+ v.disabled = false
|
|
|
+ editLockListArr.forEach(item=>{
|
|
|
+ if (item ==v.lockId){
|
|
|
+ v.disabled = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
//智能锁选中触发
|