Browse Source

修改全选bug

develop
王兴琳 4 months ago
parent
commit
587e00311b
  1. 27
      ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/components/ScopeTable.vue
  2. 6
      ruoyi-ui/src/views/JiHeExpressway/pages/service/board/index.vue

27
ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DeviceControl/components/ScopeTable.vue

@ -151,18 +151,21 @@
</div>
</el-col>
<el-col :span="5" >
<span style="font-size: 15px" >音量(1-9)</span>
</el-col>
<el-col :span="6" >
<el-input-number placeholder="" v-model="tableInfo.executeConfig.outVol" :min="1":max="9"></el-input-number>
</el-col>
<el-col :span="6" style="margin-left: 5px;" >
<span style="font-size: 15px">循环次数(1-16)</span>
</el-col>
<el-col :span="6" >
<el-input-number placeholder="" v-model="tableInfo.executeConfig.repeatTimes" :min="1":max="16"></el-input-number>
</el-col>
<el-col :span="5" v-if="tableInfo.deviceType == 5 ">
<span style="font-size: 15px" >音量(1-9)</span>
</el-col>
<el-col :span="6" v-if="tableInfo.deviceType == 5 ">
<el-input-number placeholder="" v-model="tableInfo.executeConfig.outVol" :min="1":max="9"></el-input-number>
</el-col>
<el-col :span="6" style="margin-left: 5px;" v-if="tableInfo.deviceType == 5 " >
<span style="font-size: 15px">循环次数(1-16)</span>
</el-col>
<el-col :span="6" v-if="tableInfo.deviceType == 5 ">
<el-input-number placeholder="" v-model="tableInfo.executeConfig.repeatTimes" :min="1":max="16"></el-input-number>
</el-col>
</el-row>
<el-row v-if="tableInfo.deviceType !== 5">
<el-col :span="3">

6
ruoyi-ui/src/views/JiHeExpressway/pages/service/board/index.vue

@ -409,14 +409,16 @@ export default {
},
methods: {
handleCheckAllChange(val) {
this.checkedDeviceIds = val ? this.getAllDeviceIds() : [];
this.checkedDeviceIds = this.boardSizeDic[this.selectedSize].list.filter(itm => itm.iotDeviceId && !itm.iotDeviceId.includes('null') && !(itm.deviceState === "0" || itm.deviceState === null)).map(itm => itm.iotDeviceId);
console.log(this.checkedDeviceIds)
console.log(this.checkedDeviceIds.length)
this.isIndeterminate = false;
},
getAllDeviceIds() {
// 使 Object.values
return Object.values(this.boardSizeDic).reduce((acc, item) => {
acc.push(...item.list.filter(itm => itm.iotDeviceId && !itm.iotDeviceId.includes('null') && !(itm.deviceState === 0 || itm.deviceState === null)).map(itm => itm.iotDeviceId));
acc.push(...item.list.filter(itm => itm.iotDeviceId && !itm.iotDeviceId.includes('null') && !(itm.deviceState === "0" || itm.deviceState === null)).map(itm => itm.iotDeviceId));
return acc;
}, []);
},

Loading…
Cancel
Save