|
@@ -47,11 +47,11 @@
|
47
|
47
|
<template slot-scope="{ row }" slot="actionSlot">
|
48
|
48
|
<div class="action_list">
|
49
|
49
|
<div @click="toView(row)">查看</div>
|
50
|
|
- <div v-if="userInfo.adminid === row.createid" @click="toEdit(row)">
|
|
50
|
+ <div v-if="userInfo.adminid === row.updateid" @click="toEdit(row)">
|
51
|
51
|
编辑
|
52
|
52
|
</div>
|
53
|
53
|
<div
|
54
|
|
- v-if="userInfo.adminid === row.createid"
|
|
54
|
+ v-if="userInfo.adminid === row.updateid"
|
55
|
55
|
class="action_del"
|
56
|
56
|
@click="toDel(row)"
|
57
|
57
|
>
|
|
@@ -182,12 +182,14 @@
|
182
|
182
|
</div>
|
183
|
183
|
<Checkbox
|
184
|
184
|
:disabled="brandItem.devices.length === 0"
|
185
|
|
- :indeterminate="getIndeterminate(brandItem)"
|
186
|
|
- :value="getCheckedAllValue(brandItem)"
|
|
185
|
+ :indeterminate="
|
|
186
|
+ getIndeterminate(brandItem, wallpaperInfo.deviceids)
|
|
187
|
+ "
|
|
188
|
+ :value="getCheckedAllValue(brandItem, wallpaperInfo.deviceids)"
|
187
|
189
|
@click.prevent.native="
|
188
|
190
|
deviceBrandCheckedAll(
|
189
|
191
|
brandItem,
|
190
|
|
- getCheckedAllValue(brandItem)
|
|
192
|
+ getCheckedAllValue(brandItem, wallpaperInfo.deviceids)
|
191
|
193
|
)
|
192
|
194
|
"
|
193
|
195
|
>{{ brandItem.dgname }}</Checkbox
|
|
@@ -249,24 +251,18 @@
|
249
|
251
|
/>
|
250
|
252
|
</div>
|
251
|
253
|
<Checkbox
|
252
|
|
- :disabled="brandItem.devices.length === 0"
|
253
|
|
- :indeterminate="getIndeterminate(brandItem)"
|
254
|
|
- :value="getCheckedAllValue(brandItem)"
|
255
|
|
- @click.prevent.native="
|
256
|
|
- deviceBrandCheckedAll(
|
257
|
|
- brandItem,
|
258
|
|
- getCheckedAllValue(brandItem)
|
259
|
|
- )
|
260
|
|
- "
|
|
254
|
+ :disabled="true"
|
|
255
|
+ :indeterminate="getIndeterminate(brandItem, viewInfo.deviceids)"
|
|
256
|
+ :value="getCheckedAllValue(brandItem, viewInfo.deviceids)"
|
261
|
257
|
>{{ brandItem.dgname }}</Checkbox
|
262
|
258
|
>
|
263
|
259
|
</div>
|
264
|
260
|
<div class="device_brand_main" v-if="!brandItem.close">
|
265
|
261
|
<Checkbox
|
|
262
|
+ :disabled="true"
|
266
|
263
|
v-for="deviceItem in brandItem.devices"
|
267
|
264
|
:key="deviceItem.deviceid"
|
268
|
265
|
:value="viewInfo.deviceids.includes(deviceItem.deviceid)"
|
269
|
|
- @on-change="deviceModelCheck(deviceItem)"
|
270
|
266
|
>{{ deviceItem.deviceModel }}</Checkbox
|
271
|
267
|
>
|
272
|
268
|
</div>
|
|
@@ -547,10 +543,10 @@ export default {
|
547
|
543
|
this.$set(brandItem, "close", !brandItem.close);
|
548
|
544
|
},
|
549
|
545
|
// 获取样式控制状态
|
550
|
|
- getIndeterminate(brandItem) {
|
|
546
|
+ getIndeterminate(brandItem, deviceids) {
|
551
|
547
|
let selectList = [];
|
552
|
548
|
brandItem.devices.forEach((deviceItem) => {
|
553
|
|
- if (this.wallpaperInfo.deviceids.includes(deviceItem.deviceid)) {
|
|
549
|
+ if (deviceids.includes(deviceItem.deviceid)) {
|
554
|
550
|
selectList.push(deviceItem.deviceid);
|
555
|
551
|
}
|
556
|
552
|
});
|
|
@@ -559,10 +555,10 @@ export default {
|
559
|
555
|
);
|
560
|
556
|
},
|
561
|
557
|
// 获取品牌全选状态
|
562
|
|
- getCheckedAllValue(brandItem) {
|
|
558
|
+ getCheckedAllValue(brandItem, deviceids) {
|
563
|
559
|
let selectAll = true;
|
564
|
560
|
for (const deviceItem of brandItem.devices) {
|
565
|
|
- if (!this.wallpaperInfo.deviceids.includes(deviceItem.deviceid)) {
|
|
561
|
+ if (!deviceids.includes(deviceItem.deviceid)) {
|
566
|
562
|
return false;
|
567
|
563
|
}
|
568
|
564
|
}
|
|
@@ -646,11 +642,11 @@ export default {
|
646
|
642
|
_deviceids.push(deviceItem.deviceid);
|
647
|
643
|
});
|
648
|
644
|
});
|
649
|
|
- this.wallpaperInfo.deviceids = _deviceids;
|
|
645
|
+ this.viewInfo.deviceids = _deviceids;
|
650
|
646
|
}
|
651
|
647
|
});
|
652
|
648
|
this.getDeviceList().then((list) => {
|
653
|
|
- this.wallpaperInfo.deviceList = list;
|
|
649
|
+ this.viewInfo.deviceList = list;
|
654
|
650
|
});
|
655
|
651
|
},
|
656
|
652
|
// 编辑
|