Quellcode durchsuchen

平板策略违规处理调整

gzb
guozhongbo vor 7 Monaten
Ursprung
Commit
8143aafcb4

+ 25
- 16
src/views/schoolSection/strategy/personalStrategy.vue Datei anzeigen

@@ -268,7 +268,7 @@
268 268
             </template>
269 269
             <template slot-scope="{ row }" slot="noticed">
270 270
               <Checkbox
271
-                :disabled="strategyInfo.model === 'see'"
271
+                :disabled="strategyInfo.model === 'see' || !row.checked"
272 272
                 class="checked"
273 273
                 v-model="row.noticed"
274 274
                 @on-change="headleStrategy(row, 'noticed')"
@@ -276,20 +276,20 @@
276 276
               >
277 277
             </template>
278 278
             <template slot-scope="{ row }" slot="violationHandling">
279
-              <RadioGroup
279
+              <CheckboxGroup
280 280
                 v-model="row.handleMethod"
281 281
                 @on-change="headleStrategy(row, 'handleMethod')"
282 282
               >
283
-                <Radio
283
+                <Checkbox
284 284
                   style="margin-right: 20px"
285
-                  :disabled="strategyInfo.model === 'see'"
285
+                  :disabled="strategyInfo.model === 'see' || !row.checked"
286 286
                   label="锁定"
287
-                ></Radio>
288
-                <Radio
289
-                  :disabled="strategyInfo.model === 'see'"
287
+                ></Checkbox>
288
+                <Checkbox
289
+                  :disabled="strategyInfo.model === 'see' || !row.checked"
290 290
                   label="恢复出厂设置"
291
-                ></Radio>
292
-              </RadioGroup>
291
+                ></Checkbox>
292
+              </CheckboxGroup>
293 293
             </template>
294 294
           </Table>
295 295
           <div class="nodata" v-if="!strategyInfo.hasviolate">
@@ -496,9 +496,18 @@ export default {
496 496
       this.padViolates.forEach((item) => {
497 497
         if (item.violateType === row.violateType) {
498 498
           item[key] = row[key];
499
+          if (key === "checked") {
500
+            //默认锁定
501
+            item.handleMethod = ["锁定"];
502
+          } else if (key === "handleMethod") {
503
+            //只能二选一 去掉第一个
504
+            if (row.handleMethod.length === 2) {
505
+              item[key] = row[key].slice(1);
506
+            }
507
+          }
499 508
           if (!item.checked) {
500 509
             item.noticed = false;
501
-            item.handleMethod = "";
510
+            item.handleMethod = [];
502 511
             this.$forceUpdate();
503 512
           }
504 513
         }
@@ -522,7 +531,7 @@ export default {
522 531
           this.padViolates.forEach((item) => {
523 532
             item.checked = false;
524 533
             item.noticed = false;
525
-            item.handleMethod = "";
534
+            item.handleMethod = [];
526 535
           });
527 536
         }
528 537
       }
@@ -546,7 +555,7 @@ export default {
546 555
       this.padViolates.forEach((item) => {
547 556
         item.checked = false;
548 557
         item.noticed = false;
549
-        item.handleMethod = "";
558
+        item.handleMethod = [];
550 559
       });
551 560
       this.padApps.forEach((item) => {
552 561
         item.checked = false;
@@ -603,7 +612,7 @@ export default {
603 612
               });
604 613
               item.checked = arr.length > 0 ? true : false;
605 614
               item.noticed = arr.length > 0 && arr[0].noticed ? true : false;
606
-              item.handleMethod = arr.length > 0 ? arr[0].handleMethod : "";
615
+              item.handleMethod = arr.length > 0 ? [arr[0].handleMethod] : [];
607 616
             });
608 617
           }
609 618
           this.strategyInfo.padWifis = res.obj.padWifis || [];
@@ -707,7 +716,7 @@ export default {
707 716
         if (item.checked) {
708 717
           padViolates.push({
709 718
             violateType: item.violateType,
710
-            handleMethod: item.handleMethod || "",
719
+            handleMethod: item.handleMethod[0] || "",
711 720
             noticed: item.noticed ? 1 : 0
712 721
           });
713 722
         }
@@ -859,7 +868,7 @@ export default {
859 868
               });
860 869
               item.checked = arr.length > 0 ? true : false;
861 870
               item.noticed = arr.length > 0 && arr[0].noticed ? true : false;
862
-              item.handleMethod = arr.length > 0 ? arr[0].handleMethod : "";
871
+              item.handleMethod = arr.length > 0 ? [arr[0].handleMethod] : [];
863 872
             });
864 873
           }
865 874
           this.strategyInfo.padWifis = res.obj.padWifis || [];
@@ -940,7 +949,7 @@ export default {
940 949
               });
941 950
               item.checked = arr.length > 0 ? true : false;
942 951
               item.noticed = arr.length > 0 && arr[0].noticed ? true : false;
943
-              item.handleMethod = arr.length > 0 ? arr[0].handleMethod : "";
952
+              item.handleMethod = arr.length > 0 ? [arr[0].handleMethod] : [];
944 953
             });
945 954
           }
946 955
           this.strategyInfo.show = true;

+ 30
- 13
src/views/schoolSection/strategy/publicStrategy.vue Datei anzeigen

@@ -219,7 +219,7 @@
219 219
         </template>
220 220
         <template slot-scope="{ row }" slot="noticed">
221 221
           <Checkbox
222
-            :disabled="curState === 1"
222
+            :disabled="curState === 1 || !row.checked"
223 223
             class="checked"
224 224
             v-model="row.noticed"
225 225
             @on-change="headleStrategy(row, 'noticed')"
@@ -227,17 +227,20 @@
227 227
           >
228 228
         </template>
229 229
         <template slot-scope="{ row }" slot="violationHandling">
230
-          <RadioGroup
230
+          <CheckboxGroup
231 231
             v-model="row.handleMethod"
232 232
             @on-change="headleStrategy(row, 'handleMethod')"
233 233
           >
234
-            <Radio
234
+            <Checkbox
235 235
               style="margin-right: 20px"
236
-              :disabled="curState === 1"
236
+              :disabled="curState === 1 || !row.checked"
237 237
               label="锁定"
238
-            ></Radio>
239
-            <Radio :disabled="curState === 1" label="恢复出厂设置"></Radio>
240
-          </RadioGroup>
238
+            ></Checkbox>
239
+            <Checkbox
240
+              :disabled="curState === 1 || !row.checked"
241
+              label="恢复出厂设置"
242
+            ></Checkbox>
243
+          </CheckboxGroup>
241 244
         </template>
242 245
       </Table>
243 246
       <div class="nodata" v-if="!strategyInfo.hasviolate">未设置违规处理</div>
@@ -382,6 +385,20 @@ export default {
382 385
       this.padViolates.forEach((item) => {
383 386
         if (item.violateType === row.violateType) {
384 387
           item[key] = row[key];
388
+          if (key === "checked") {
389
+            //默认锁定
390
+            item.handleMethod = ["锁定"];
391
+          } else if (key === "handleMethod") {
392
+            //只能二选一 去掉第一个
393
+            if (row.handleMethod.length === 2) {
394
+              item[key] = row[key].slice(1);
395
+            }
396
+          }
397
+          if (!item.checked) {
398
+            item.noticed = false;
399
+            item.handleMethod = [];
400
+            this.$forceUpdate();
401
+          }
385 402
         }
386 403
       });
387 404
     },
@@ -403,7 +420,7 @@ export default {
403 420
           this.padViolates.forEach((item) => {
404 421
             item.checked = false;
405 422
             item.noticed = false;
406
-            item.handleMethod = "";
423
+            item.handleMethod = [];
407 424
           });
408 425
         }
409 426
       }
@@ -469,7 +486,7 @@ export default {
469 486
               });
470 487
               item.checked = arr.length > 0 ? true : false;
471 488
               item.noticed = arr.length > 0 && arr[0].noticed ? true : false;
472
-              item.handleMethod = arr.length > 0 ? arr[0].handleMethod : "";
489
+              item.handleMethod = arr.length > 0 ? [arr[0].handleMethod] : [];
473 490
             });
474 491
           }
475 492
           //刷新左侧树
@@ -572,7 +589,7 @@ export default {
572 589
         if (item.checked) {
573 590
           padViolates.push({
574 591
             violateType: item.violateType,
575
-            handleMethod: item.handleMethod || "",
592
+            handleMethod: item.handleMethod[0] || "",
576 593
             noticed: item.noticed ? 1 : 0
577 594
           });
578 595
         }
@@ -717,7 +734,7 @@ export default {
717 734
               });
718 735
               item.checked = arr.length > 0 ? true : false;
719 736
               item.noticed = arr.length > 0 && arr[0].noticed ? true : false;
720
-              item.handleMethod = arr.length > 0 ? arr[0].handleMethod : "";
737
+              item.handleMethod = arr.length > 0 ? [arr[0].handleMethod] : [];
721 738
             });
722 739
           }
723 740
           this.strategyInfo.padWifis = res.obj.padWifis || [];
@@ -741,7 +758,7 @@ export default {
741 758
           this.padViolates.forEach((item) => {
742 759
             item.checked = false;
743 760
             item.noticed = false;
744
-            item.handleMethod = "";
761
+            item.handleMethod = [];
745 762
           });
746 763
           this.strategyInfo.padWifis = [];
747 764
           this.strategyInfo.padTimes = [];
@@ -764,7 +781,7 @@ export default {
764 781
       this.padViolates.forEach((item) => {
765 782
         item.checked = false;
766 783
         item.noticed = false;
767
-        item.handleMethod = "";
784
+        item.handleMethod = [];
768 785
       });
769 786
       //获取应用列表
770 787
       this.showLoading = true;

+ 23
- 16
src/views/schoolSection/strategy/strategyTemplate.vue Datei anzeigen

@@ -302,7 +302,7 @@
302 302
             </template>
303 303
             <template slot-scope="{ row }" slot="noticed">
304 304
               <Checkbox
305
-                :disabled="strategyInfo.model === '查看'"
305
+                :disabled="strategyInfo.model === '查看' || !row.checked"
306 306
                 class="checked"
307 307
                 v-model="row.noticed"
308 308
                 @on-change="headleStrategy(row, 'noticed')"
@@ -310,22 +310,20 @@
310 310
               >
311 311
             </template>
312 312
             <template slot-scope="{ row }" slot="violationHandling">
313
-              <RadioGroup
313
+              <CheckboxGroup
314 314
                 v-model="row.handleMethod"
315 315
                 @on-change="headleStrategy(row, 'handleMethod')"
316 316
               >
317
-                <Radio
317
+                <Checkbox
318 318
                   style="margin-right: 20px"
319
-                  :disabled="strategyInfo.model === '查看'"
319
+                  :disabled="strategyInfo.model === '查看' || !row.checked"
320 320
                   label="锁定"
321
-                  >锁定</Radio
322
-                >
323
-                <Radio
324
-                  :disabled="strategyInfo.model === '查看'"
321
+                ></Checkbox>
322
+                <Checkbox
323
+                  :disabled="strategyInfo.model === '查看' || !row.checked"
325 324
                   label="恢复出厂设置"
326
-                  >恢复出厂设置</Radio
327
-                >
328
-              </RadioGroup>
325
+                ></Checkbox>
326
+              </CheckboxGroup>
329 327
             </template>
330 328
           </Table>
331 329
           <div class="nodata" v-if="!strategyInfo.hasviolate">
@@ -496,9 +494,18 @@ export default {
496 494
       this.padViolates.forEach((item) => {
497 495
         if (item.violateType === row.violateType) {
498 496
           item[key] = row[key];
497
+          if (key === "checked") {
498
+            //默认锁定
499
+            item.handleMethod = ["锁定"];
500
+          } else if (key === "handleMethod") {
501
+            //只能二选一 去掉第一个
502
+            if (row.handleMethod.length === 2) {
503
+              item[key] = row[key].slice(1);
504
+            }
505
+          }
499 506
           if (!item.checked) {
500 507
             item.noticed = false;
501
-            item.handleMethod = "";
508
+            item.handleMethod = [];
502 509
             this.$forceUpdate();
503 510
           }
504 511
         }
@@ -522,7 +529,7 @@ export default {
522 529
           this.padViolates.forEach((item) => {
523 530
             item.checked = false;
524 531
             item.noticed = false;
525
-            item.handleMethod = "";
532
+            item.handleMethod = [];
526 533
           });
527 534
         }
528 535
       }
@@ -582,7 +589,7 @@ export default {
582 589
         if (item.checked) {
583 590
           padViolates.push({
584 591
             violateType: item.violateType,
585
-            handleMethod: item.handleMethod || "",
592
+            handleMethod: item.handleMethod[0] || "",
586 593
             noticed: item.noticed ? 1 : 0
587 594
           });
588 595
         }
@@ -726,7 +733,7 @@ export default {
726 733
       this.padViolates.forEach((item) => {
727 734
         item.checked = false;
728 735
         item.noticed = false;
729
-        item.handleMethod = "";
736
+        item.handleMethod = [];
730 737
       });
731 738
       this.padApps.forEach((item) => {
732 739
         item.checked = false;
@@ -842,7 +849,7 @@ export default {
842 849
               });
843 850
               item.checked = arr.length > 0 ? true : false;
844 851
               item.noticed = arr.length > 0 && arr[0].noticed ? true : false;
845
-              item.handleMethod = arr.length > 0 ? arr[0].handleMethod : "";
852
+              item.handleMethod = arr.length > 0 ? [arr[0].handleMethod] : [];
846 853
             });
847 854
           }
848 855
           this.strategyInfo.show = true;

Laden…
Abbrechen
Speichern