|
|
@ -60,7 +60,16 @@ |
|
|
|
<div style="flex:1; height: 0; padding:0 10px 10px"> |
|
|
|
<vuescroll :ops="scrollOptions"> |
|
|
|
<template v-if="deviceList.length> 0"> |
|
|
|
|
|
|
|
<el-checkbox-group class="deviceList" v-model="checkedDeviceIds" @change="____onSelectDevices"> |
|
|
|
<!-- 全选按钮 --> |
|
|
|
<el-checkbox |
|
|
|
:indeterminate="isIndeterminate" |
|
|
|
v-model="checkAll" |
|
|
|
@change="handleCheckAllChange" |
|
|
|
> |
|
|
|
全选 |
|
|
|
</el-checkbox> |
|
|
|
<el-checkbox v-for="(itm, index) in deviceList" :label="itm.iotDeviceId" :key="index" |
|
|
|
:disabled="!itm.iotDeviceId || itm.iotDeviceId.includes('null') || itm.deviceState == 0 || itm.deviceState == null"> |
|
|
|
<el-tooltip content="设备未接入" placement="top" |
|
|
@ -261,6 +270,18 @@ export default { |
|
|
|
this.editDialog.tpl = null; |
|
|
|
} |
|
|
|
}, |
|
|
|
checkedDeviceIds: { |
|
|
|
handler(val) { |
|
|
|
const allDeviceIds = this.deviceList |
|
|
|
.filter(itm => !(!itm.iotDeviceId || itm.iotDeviceId.includes('null') || itm.deviceState == 0 || itm.deviceState == null)) |
|
|
|
.map(itm => itm.iotDeviceId); |
|
|
|
|
|
|
|
const checkedCount = val.length; |
|
|
|
this.checkAll = checkedCount === allDeviceIds.length; |
|
|
|
this.isIndeterminate = checkedCount > 0 && checkedCount < allDeviceIds.length; |
|
|
|
}, |
|
|
|
deep: true |
|
|
|
}, |
|
|
|
// boardSizeDic: function (newVal, oldVal) { |
|
|
|
// console.log(newVal, 'selectedSize') |
|
|
|
// if (newVal.length == 0) { |
|
|
@ -290,6 +311,14 @@ export default { |
|
|
|
...mapState(["menu"]), |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
handleCheckAllChange(val) { |
|
|
|
const allDeviceIds = this.deviceList |
|
|
|
.filter(itm => !(!itm.iotDeviceId || itm.iotDeviceId.includes('null') || itm.deviceState == 0 || itm.deviceState == null)) |
|
|
|
.map(itm => itm.iotDeviceId); |
|
|
|
|
|
|
|
this.checkedDeviceIds = val ? allDeviceIds : []; |
|
|
|
this.isIndeterminate = false; |
|
|
|
}, |
|
|
|
____boardTxtStyle() { |
|
|
|
return { |
|
|
|
color: "#F00", |
|
|
@ -372,7 +401,7 @@ export default { |
|
|
|
// } |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
____forkDeviceInfo(deviceFrom) { |
|
|
|
//从目标设备取得信息 |
|
|
@ -530,7 +559,7 @@ export default { |
|
|
|
type: "warning", |
|
|
|
}) |
|
|
|
.then(() => { |
|
|
|
|
|
|
|
|
|
|
|
const param = { |
|
|
|
"devices": deviceList, |
|
|
|
"functions": [ |
|
|
@ -614,7 +643,7 @@ export default { |
|
|
|
// message: "发布失败,"+cbMsg[res.retCode], |
|
|
|
// }); |
|
|
|
// } |
|
|
|
|
|
|
|
|
|
|
|
// // !isMultiControl && this.____getDeviceInfo(); |
|
|
|
// }) |
|
|
|
// .catch((err) => {}) |
|
|
@ -635,6 +664,7 @@ export default { |
|
|
|
|
|
|
|
// 多选 |
|
|
|
____onSelectDevices(arr) { |
|
|
|
this.updateCheckAllStatus(); |
|
|
|
|
|
|
|
this.selectedDevices = []; |
|
|
|
if (this.checkedDeviceIds.length == 0) { |
|
|
@ -905,26 +935,26 @@ export default { |
|
|
|
transition: all linear 0.3s; |
|
|
|
opacity: 1; |
|
|
|
transform: translateX(0); |
|
|
|
|
|
|
|
|
|
|
|
&.hide { |
|
|
|
transform: translateX(20px); |
|
|
|
opacity: 0; |
|
|
|
transition: all linear 0.3s; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.tplItem { |
|
|
|
margin-right: 14px; |
|
|
|
display: flex; |
|
|
|
align-items: stretch; |
|
|
|
padding-bottom: 10px; |
|
|
|
|
|
|
|
|
|
|
|
.boardPreview { |
|
|
|
border: 2px solid #004c64; |
|
|
|
// width: 560px; |
|
|
|
// height:80px; |
|
|
|
flex: 1; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.infoBtnBox { |
|
|
|
width: 160px; |
|
|
|
height: 50px; |
|
|
@ -936,26 +966,26 @@ export default { |
|
|
|
display: flex; |
|
|
|
justify-content: space-around; |
|
|
|
align-items: center; |
|
|
|
|
|
|
|
|
|
|
|
.btn { |
|
|
|
background-repeat: no-repeat; |
|
|
|
background-size: 100% 100%; |
|
|
|
width: 40px; |
|
|
|
height: 40px; |
|
|
|
|
|
|
|
|
|
|
|
&.btnApply { |
|
|
|
background-image: url(~@/assets/jihe/images/button/toLeft.svg); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&.btnEdit { |
|
|
|
background-image: url(~@/assets/jihe/images/button/edit.svg); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
&.btnDelete { |
|
|
|
background-image: url(~@/assets/jihe/images/button/delete.svg); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
i { |
|
|
|
font-size: 24px; |
|
|
|
color: #666; |
|
|
@ -964,11 +994,11 @@ export default { |
|
|
|
caret-color: rgba(0, 0, 0, 0); |
|
|
|
user-select: none; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
i:hover { |
|
|
|
color: #05afe3; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.disabledClass { |
|
|
|
pointer-events: none; |
|
|
|
cursor: auto !important; |
|
|
@ -976,31 +1006,31 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.tplItem.ghost_class { |
|
|
|
|
|
|
|
|
|
|
|
.boardPreview, |
|
|
|
.infoBtnBox { |
|
|
|
border-color: #F00; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.tplItem.chosen_class { |
|
|
|
|
|
|
|
|
|
|
|
.boardPreview, |
|
|
|
.infoBtnBox { |
|
|
|
border-color: #0A0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.tplItem.drag_class { |
|
|
|
|
|
|
|
|
|
|
|
.boardPreview, |
|
|
|
.infoBtnBox { |
|
|
|
border-color: #FF0; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.el-collapse { |
|
|
|
max-height: 100% !important; |
|
|
|
overflow: auto; |
|
|
@ -1015,10 +1045,10 @@ export default { |
|
|
|
.tpl_box { |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
|
|
|
|
|
|
|
|
.tpl_title { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.tpl_list { |
|
|
|
flex: 1; |
|
|
|
height: 0; |
|
|
|