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,8 +2,8 @@ window.isTest = true; //测试环境true 正式环境false
2 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 7
       showImageUrl: "https://mcapitest.xhkjedu.com/",
8 8
       axiosApiTimeout: 60, // 接口超时时间 单位秒
9 9
       axiosFileTimeout: 120, // 上传文件超时时间 单位秒
@@ -16,9 +16,9 @@ window._config = window.isTest
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 22
       axiosApiTimeout: 20, // 接口超时时间 单位秒
23 23
       axiosFileTimeout: 30, // 上传文件超时时间 单位秒
24 24
       // 开发者

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

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

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

@@ -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
     // 编辑

Loading…
Cancel
Save