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

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

@ -409,14 +409,16 @@ export default {
}, },
methods: { methods: {
handleCheckAllChange(val) { 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; this.isIndeterminate = false;
}, },
getAllDeviceIds() { getAllDeviceIds() {
// 使 Object.values // 使 Object.values
return Object.values(this.boardSizeDic).reduce((acc, item) => { 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; return acc;
}, []); }, []);
}, },

Loading…
Cancel
Save