Browse Source

学校壁纸

gzb
wangzhonglu 9 months ago
parent
commit
a0b4b2a4e2
3 changed files with 23 additions and 26 deletions
  1. 5
    5
      public/config.js
  2. 1
    0
      src/assets/less/common.less
  3. 17
    21
      src/views/schoolSection/setting/wallpaper.vue

+ 5
- 5
public/config.js View File

2
 window._config = window.isTest
2
 window._config = window.isTest
3
   ? {
3
   ? {
4
       // 测试环境
4
       // 测试环境
5
-      baseUrl: "http://mcapitest.xhkjedu.com/",
6
-      baseImageUrl: "http://mcapitest.xhkjedu.com/",
5
+      baseUrl: "https://mcapitest.xhkjedu.com/",
6
+      baseImageUrl: "https://mcapitest.xhkjedu.com/",
7
       showImageUrl: "https://mcapitest.xhkjedu.com/",
7
       showImageUrl: "https://mcapitest.xhkjedu.com/",
8
       axiosApiTimeout: 60, // 接口超时时间 单位秒
8
       axiosApiTimeout: 60, // 接口超时时间 单位秒
9
       axiosFileTimeout: 120, // 上传文件超时时间 单位秒
9
       axiosFileTimeout: 120, // 上传文件超时时间 单位秒
16
     }
16
     }
17
   : {
17
   : {
18
       // 正式环境
18
       // 正式环境
19
-      baseUrl: "http://49.4.26.249:8331/",
20
-      baseImageUrl: "http://49.4.26.249:8331/",
21
-      showImageUrl: "http://49.4.26.249:8331/",
19
+      baseUrl: "https://mcapi.xhkjedu.com/",
20
+      baseImageUrl: "https://mcapi.xhkjedu.com/",
21
+      showImageUrl: "https://mcapi.xhkjedu.com/",
22
       axiosApiTimeout: 20, // 接口超时时间 单位秒
22
       axiosApiTimeout: 20, // 接口超时时间 单位秒
23
       axiosFileTimeout: 30, // 上传文件超时时间 单位秒
23
       axiosFileTimeout: 30, // 上传文件超时时间 单位秒
24
       // 开发者
24
       // 开发者

+ 1
- 0
src/assets/less/common.less View File

326
   }
326
   }
327
 }
327
 }
328
 // 多选框禁用时选中颜色修改
328
 // 多选框禁用时选中颜色修改
329
+.ivu-checkbox-indeterminate.ivu-checkbox-disabled,
329
 .ivu-checkbox-disabled {
330
 .ivu-checkbox-disabled {
330
   &.ivu-checkbox-checked .ivu-checkbox-inner,
331
   &.ivu-checkbox-checked .ivu-checkbox-inner,
331
   .ivu-checkbox-inner {
332
   .ivu-checkbox-inner {

+ 17
- 21
src/views/schoolSection/setting/wallpaper.vue View File

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

Loading…
Cancel
Save