Browse Source

设备导出

gzb
guozhongbo 9 months ago
parent
commit
4f9f2778ea

+ 4
- 0
src/views/regionSection/applicationManage/applicationGroup.vue View File

307
     },
307
     },
308
     // 获取列表
308
     // 获取列表
309
     getList() {
309
     getList() {
310
+      this.showLoading = true;
310
       appgroup_list({
311
       appgroup_list({
311
         rtype: this.powerParams.rtype,
312
         rtype: this.powerParams.rtype,
312
         objectid: this.powerParams.objectid,
313
         objectid: this.powerParams.objectid,
314
         size: this.searchForm.size,
315
         size: this.searchForm.size,
315
         appgroupName: this.searchForm.appgroupName
316
         appgroupName: this.searchForm.appgroupName
316
       }).then((res) => {
317
       }).then((res) => {
318
+        this.showLoading = false;
317
         if (res.code === 0) {
319
         if (res.code === 0) {
318
           this.searchForm.list = res.obj.data;
320
           this.searchForm.list = res.obj.data;
319
           this.searchForm.total = res.obj.total;
321
           this.searchForm.total = res.obj.total;
359
             form.appgroupid = this.wallpaperInfo.appgroupid;
361
             form.appgroupid = this.wallpaperInfo.appgroupid;
360
             form.rversion = this.wallpaperInfo.rversion;
362
             form.rversion = this.wallpaperInfo.rversion;
361
           }
363
           }
364
+          this.showLoading = true;
362
           api(form).then((res) => {
365
           api(form).then((res) => {
366
+            this.showLoading = false;
363
             if (res.code === 0) {
367
             if (res.code === 0) {
364
               this.$Message.success(res.msg);
368
               this.$Message.success(res.msg);
365
               this.searchList();
369
               this.searchList();

+ 1
- 2
src/views/regionSection/applicationManage/applicationManage.vue View File

1124
         //获取历史版本
1124
         //获取历史版本
1125
         this.showLoading = true;
1125
         this.showLoading = true;
1126
         let res = await app_detail_history({ appid: row.appid });
1126
         let res = await app_detail_history({ appid: row.appid });
1127
-        if (res.code === 0) {
1128
-        } else {
1127
+        if (res.code != 0) {
1129
           this.$Message.error(res.msg);
1128
           this.$Message.error(res.msg);
1130
         }
1129
         }
1131
         //安装统计
1130
         //安装统计

+ 5
- 0
src/views/regionSection/networkManage/whitelist.vue View File

189
         <Button @click="viewInfo.show = false">关闭</Button>
189
         <Button @click="viewInfo.show = false">关闭</Button>
190
       </div>
190
       </div>
191
     </Modal>
191
     </Modal>
192
+    <Spin fix v-if="showLoading" style="background-color: transparent">
193
+      <Icon type="ios-loading" size="18" class="demo-spin-icon-load"></Icon>
194
+      <div>加载中</div>
195
+    </Spin>
192
   </div>
196
   </div>
193
 </template>
197
 </template>
194
 
198
 
204
 export default {
208
 export default {
205
   data() {
209
   data() {
206
     return {
210
     return {
211
+      showLoading: false,
207
       searchForm: {
212
       searchForm: {
208
         whiteName: "",
213
         whiteName: "",
209
         regionid: "",
214
         regionid: "",

+ 16
- 4
src/views/regionSection/regionManage/adminManage.vue View File

231
         <Button @click="viewInfo.show = false">关闭</Button>
231
         <Button @click="viewInfo.show = false">关闭</Button>
232
       </div>
232
       </div>
233
     </Modal>
233
     </Modal>
234
+    <Spin fix v-if="showLoading" style="background-color: transparent">
235
+      <Icon type="ios-loading" size="18" class="demo-spin-icon-load"></Icon>
236
+      <div>加载中</div>
237
+    </Spin>
234
   </div>
238
   </div>
235
 </template>
239
 </template>
236
 
240
 
237
 <script>
241
 <script>
238
 import {
242
 import {
239
-  admin_list_pt,
240
   admin_add,
243
   admin_add,
241
   admin_edit,
244
   admin_edit,
242
   admin_delete,
245
   admin_delete,
245
   admin_list_qy,
248
   admin_list_qy,
246
   admin_detail
249
   admin_detail
247
 } from "@/api/admin";
250
 } from "@/api/admin";
248
-import { region_list_sel_pt, region_list_sel_qy } from "@/api/region";
251
+import { region_list_sel_qy } from "@/api/region";
249
 import { login_msg_code } from "@/api/login";
252
 import { login_msg_code } from "@/api/login";
250
 import { generateRandomString } from "@/utils";
253
 import { generateRandomString } from "@/utils";
251
 export default {
254
 export default {
424
           align: "center"
427
           align: "center"
425
         }
428
         }
426
       ],
429
       ],
430
+      showLoading: false,
427
       userInfo: {}
431
       userInfo: {}
428
     };
432
     };
429
   },
433
   },
442
   methods: {
446
   methods: {
443
     // 获取搜索区域列表
447
     // 获取搜索区域列表
444
     getSearchRegionList() {
448
     getSearchRegionList() {
449
+      this.showLoading = true;
445
       region_list_sel_qy({
450
       region_list_sel_qy({
446
         rtype: this.powerParams.rtype,
451
         rtype: this.powerParams.rtype,
447
         objectid: this.powerParams.objectid,
452
         objectid: this.powerParams.objectid,
448
         regionid: this.powerParams.objectid
453
         regionid: this.powerParams.objectid
449
       }).then((data) => {
454
       }).then((data) => {
455
+        this.showLoading = false;
450
         if (data.code === 0) {
456
         if (data.code === 0) {
451
           this.searchForm.dropList = data.obj;
457
           this.searchForm.dropList = data.obj;
452
         } else {
458
         } else {
472
     },
478
     },
473
     // 获取列表
479
     // 获取列表
474
     getList() {
480
     getList() {
481
+      this.showLoading = true;
475
       admin_list_qy({
482
       admin_list_qy({
476
         rtype: this.powerParams.rtype,
483
         rtype: this.powerParams.rtype,
477
         objectid: this.powerParams.objectid,
484
         objectid: this.powerParams.objectid,
481
         aname: this.searchForm.aname,
488
         aname: this.searchForm.aname,
482
         regionid: this.searchForm.regionid
489
         regionid: this.searchForm.regionid
483
       }).then((data) => {
490
       }).then((data) => {
491
+        this.showLoading = false;
484
         if (data.code === 0) {
492
         if (data.code === 0) {
485
           this.searchForm.list = data.obj.data;
493
           this.searchForm.list = data.obj.data;
486
           this.searchForm.total = data.obj.total;
494
           this.searchForm.total = data.obj.total;
487
-          console.log(this.searchForm.list);
488
         } else {
495
         } else {
489
           this.$Message.error(data.msg);
496
           this.$Message.error(data.msg);
490
         }
497
         }
523
         return;
530
         return;
524
       }
531
       }
525
       this.setRegionSecond();
532
       this.setRegionSecond();
533
+      this.showLoading = true;
526
       login_msg_code({
534
       login_msg_code({
527
         phone: this.adminInfo.phone
535
         phone: this.adminInfo.phone
528
       }).then((data) => {
536
       }).then((data) => {
537
+        this.showLoading = false;
529
         if (data.code === 0) {
538
         if (data.code === 0) {
530
           this.$Message.success(data.msg);
539
           this.$Message.success(data.msg);
531
         } else {
540
         } else {
593
             form.adminid = this.adminInfo.adminid;
602
             form.adminid = this.adminInfo.adminid;
594
             form.rversion = this.adminInfo.rversion;
603
             form.rversion = this.adminInfo.rversion;
595
           }
604
           }
605
+          this.showLoading = true;
596
           api(form).then((data) => {
606
           api(form).then((data) => {
607
+            this.showLoading = false;
597
             if (data.code === 0) {
608
             if (data.code === 0) {
598
               this.searchList();
609
               this.searchList();
599
               this.$Message.success(data.msg);
610
               this.$Message.success(data.msg);
617
     },
628
     },
618
     // 编辑
629
     // 编辑
619
     toEdit(row) {
630
     toEdit(row) {
631
+      this.showLoading = true;
620
       admin_detail({
632
       admin_detail({
621
         rtype: this.powerParams.rtype,
633
         rtype: this.powerParams.rtype,
622
         objectid: this.powerParams.objectid,
634
         objectid: this.powerParams.objectid,
623
         adminid: row.adminid
635
         adminid: row.adminid
624
       }).then((res) => {
636
       }).then((res) => {
637
+        this.showLoading = false;
625
         if (res.code === 0) {
638
         if (res.code === 0) {
626
           this.adminInfo = {
639
           this.adminInfo = {
627
             show: true,
640
             show: true,
638
             regionid: res.obj.regionid,
651
             regionid: res.obj.regionid,
639
             rversion: row.rversion
652
             rversion: row.rversion
640
           };
653
           };
641
-          console.log(this.adminInfo);
642
         } else {
654
         } else {
643
           this.$Message.error(res.msg);
655
           this.$Message.error(res.msg);
644
         }
656
         }

+ 0
- 2
src/views/regionSection/regionManage/regionManage.vue View File

693
         if (data.code === 0) {
693
         if (data.code === 0) {
694
           this.searchForm.list = data.obj.data;
694
           this.searchForm.list = data.obj.data;
695
           this.searchForm.total = data.obj.total;
695
           this.searchForm.total = data.obj.total;
696
-          console.log(this.searchForm.list);
697
         } else {
696
         } else {
698
           this.$Message.error(data.msg);
697
           this.$Message.error(data.msg);
699
         }
698
         }
740
             form.authKey = this.authInfo.authKey;
739
             form.authKey = this.authInfo.authKey;
741
             form.authType = this.authInfo.authType;
740
             form.authType = this.authInfo.authType;
742
           }
741
           }
743
-          console.log(form);
744
           this.showLoading = true;
742
           this.showLoading = true;
745
           region_set(form).then((data) => {
743
           region_set(form).then((data) => {
746
             this.showLoading = false;
744
             this.showLoading = false;

+ 15
- 0
src/views/regionSection/regionManage/schoolManage.vue View File

311
         <Button @click="viewInfo.show = false">关闭</Button>
311
         <Button @click="viewInfo.show = false">关闭</Button>
312
       </div>
312
       </div>
313
     </Modal>
313
     </Modal>
314
+    <Spin fix v-if="showLoading" style="background-color: transparent">
315
+      <Icon type="ios-loading" size="18" class="demo-spin-icon-load"></Icon>
316
+      <div>加载中</div>
317
+    </Spin>
314
   </div>
318
   </div>
315
 </template>
319
 </template>
316
 
320
 
498
       areaList: [],
502
       areaList: [],
499
       marketList: [],
503
       marketList: [],
500
       regionList: [],
504
       regionList: [],
505
+      showLoading: false,
501
       userInfo: {}
506
       userInfo: {}
502
     };
507
     };
503
   },
508
   },
560
       this.searchList();
565
       this.searchList();
561
     },
566
     },
562
     getAreaList() {
567
     getAreaList() {
568
+      this.showLoading = true;
563
       area_list_sel({}).then((res) => {
569
       area_list_sel({}).then((res) => {
570
+        this.showLoading = false;
564
         if (res.code === 0) {
571
         if (res.code === 0) {
565
           this.areaList = res.obj;
572
           this.areaList = res.obj;
566
         } else {
573
         } else {
570
     },
577
     },
571
     // 获取搜索区域列表
578
     // 获取搜索区域列表
572
     getSearchRegionList() {
579
     getSearchRegionList() {
580
+      this.showLoading = true;
573
       region_list_sel_qy({
581
       region_list_sel_qy({
574
         rtype: this.powerParams.rtype,
582
         rtype: this.powerParams.rtype,
575
         objectid: this.powerParams.objectid,
583
         objectid: this.powerParams.objectid,
576
         regionid: this.powerParams.objectid
584
         regionid: this.powerParams.objectid
577
       }).then((data) => {
585
       }).then((data) => {
586
+        this.showLoading = false;
578
         if (data.code === 0) {
587
         if (data.code === 0) {
579
           this.searchForm.dropList = data.obj;
588
           this.searchForm.dropList = data.obj;
580
         } else {
589
         } else {
600
     },
609
     },
601
     // 获取列表
610
     // 获取列表
602
     getList() {
611
     getList() {
612
+      this.showLoading = true;
603
       school_list({
613
       school_list({
604
         rtype: this.powerParams.rtype,
614
         rtype: this.powerParams.rtype,
605
         objectid: this.powerParams.objectid,
615
         objectid: this.powerParams.objectid,
609
         areaCode: this.searchForm.areaCodes,
619
         areaCode: this.searchForm.areaCodes,
610
         schoolName: this.searchForm.schoolName
620
         schoolName: this.searchForm.schoolName
611
       }).then((data) => {
621
       }).then((data) => {
622
+        this.showLoading = false;
612
         if (data.code === 0) {
623
         if (data.code === 0) {
613
           this.searchForm.list = data.obj.data;
624
           this.searchForm.list = data.obj.data;
614
           this.searchForm.total = data.obj.total;
625
           this.searchForm.total = data.obj.total;
741
               msgcode: this.adminInfo.admin.msgcode
752
               msgcode: this.adminInfo.admin.msgcode
742
             };
753
             };
743
           }
754
           }
755
+          this.showLoading = true;
744
           api(form).then((data) => {
756
           api(form).then((data) => {
757
+            this.showLoading = false;
745
             if (data.code === 0) {
758
             if (data.code === 0) {
746
               this.searchList();
759
               this.searchList();
747
               this.$Message.success(data.msg);
760
               this.$Message.success(data.msg);
767
     toEdit(row) {
780
     toEdit(row) {
768
       this.marketList = [];
781
       this.marketList = [];
769
       this.regionList = [];
782
       this.regionList = [];
783
+      this.showLoading = true;
770
       school_detail({
784
       school_detail({
771
         rtype: this.powerParams.rtype,
785
         rtype: this.powerParams.rtype,
772
         objectid: this.powerParams.objectid,
786
         objectid: this.powerParams.objectid,
773
         schoolid: row.schoolid
787
         schoolid: row.schoolid
774
       }).then((res) => {
788
       }).then((res) => {
789
+        this.showLoading = false;
775
         if (res.code === 0) {
790
         if (res.code === 0) {
776
           let str = res.obj.areaCode;
791
           let str = res.obj.areaCode;
777
           let obj1 = { areaCode: "" },
792
           let obj1 = { areaCode: "" },

+ 0
- 2
src/views/regionSection/setting/device.vue View File

99
         trend: this.adminInfo.trend,
99
         trend: this.adminInfo.trend,
100
         password: this.adminInfo.password || null
100
         password: this.adminInfo.password || null
101
       };
101
       };
102
-      console.log(form);
103
       this.showLoading = true;
102
       this.showLoading = true;
104
       password_edit(form).then((res) => {
103
       password_edit(form).then((res) => {
105
         this.showLoading = false;
104
         this.showLoading = false;
106
         if (res.code === 0) {
105
         if (res.code === 0) {
107
-          console.log(res.obj);
108
           this.$Message.success(res.msg);
106
           this.$Message.success(res.msg);
109
         } else {
107
         } else {
110
           this.$Message.error(res.msg);
108
           this.$Message.error(res.msg);

+ 0
- 3
src/views/regionSection/setting/powerUp.vue View File

78
         this.showLoading = false;
78
         this.showLoading = false;
79
         if (res.code === 0) {
79
         if (res.code === 0) {
80
           if (res.obj) {
80
           if (res.obj) {
81
-            console.log(res.obj);
82
             this.adminInfo = {
81
             this.adminInfo = {
83
               appPackage: res.obj.appPackage,
82
               appPackage: res.obj.appPackage,
84
               authUrl: res.obj.authUrl,
83
               authUrl: res.obj.authUrl,
103
         authUrl: this.adminInfo.authUrl,
102
         authUrl: this.adminInfo.authUrl,
104
         singleType: this.adminInfo.singleType
103
         singleType: this.adminInfo.singleType
105
       };
104
       };
106
-      console.log(form);
107
       this.showLoading = true;
105
       this.showLoading = true;
108
       autoapp_edit(form).then((res) => {
106
       autoapp_edit(form).then((res) => {
109
         this.showLoading = false;
107
         this.showLoading = false;
110
         if (res.code === 0) {
108
         if (res.code === 0) {
111
-          console.log(res.obj);
112
           this.$Message.success(res.msg);
109
           this.$Message.success(res.msg);
113
         } else {
110
         } else {
114
           this.$Message.error(res.msg);
111
           this.$Message.error(res.msg);

+ 12
- 11
src/views/schoolSection/applicationManage/applicationList.vue View File

966
     },
966
     },
967
     // 查看
967
     // 查看
968
     toView(row) {
968
     toView(row) {
969
+      this.showLoading = true;
969
       app_detail({
970
       app_detail({
970
         rtype: this.powerParams.rtype,
971
         rtype: this.powerParams.rtype,
971
         objectid: this.powerParams.objectid,
972
         objectid: this.powerParams.objectid,
972
         appid: row.appid
973
         appid: row.appid
973
       }).then((res) => {
974
       }).then((res) => {
975
+        this.showLoading = true;
974
         if (res.code === 0) {
976
         if (res.code === 0) {
975
           this.viewInfo = {
977
           this.viewInfo = {
976
             show: true,
978
             show: true,
999
             devices: res.obj.devices,
1001
             devices: res.obj.devices,
1000
             schools: res.obj.schools
1002
             schools: res.obj.schools
1001
           };
1003
           };
1002
-          console.log(this.viewInfo);
1003
         } else {
1004
         } else {
1004
           this.$Message.error(res.msg);
1005
           this.$Message.error(res.msg);
1005
         }
1006
         }
1018
             appName: res.obj.appName,
1019
             appName: res.obj.appName,
1019
             devices: res.obj.devices
1020
             devices: res.obj.devices
1020
           };
1021
           };
1021
-          console.log(this.deviceInfo);
1022
         } else {
1022
         } else {
1023
           this.$Message.error(res.msg);
1023
           this.$Message.error(res.msg);
1024
         }
1024
         }
1026
     },
1026
     },
1027
     enabledChange(row) {
1027
     enabledChange(row) {
1028
       let api = row.enabled === 1 ? app_edit_enable : app_edit_unenable;
1028
       let api = row.enabled === 1 ? app_edit_enable : app_edit_unenable;
1029
+      this.showLoading = true;
1029
       api({
1030
       api({
1030
         rtype: this.powerParams.rtype,
1031
         rtype: this.powerParams.rtype,
1031
         objectid: this.powerParams.objectid,
1032
         objectid: this.powerParams.objectid,
1032
         appid: row.appid,
1033
         appid: row.appid,
1033
         rversion: row.rversion
1034
         rversion: row.rversion
1034
       }).then((data) => {
1035
       }).then((data) => {
1036
+        this.showLoading = true;
1035
         this.searchList();
1037
         this.searchList();
1036
         if (data.code === 0) {
1038
         if (data.code === 0) {
1037
           this.$Message.success(data.msg);
1039
           this.$Message.success(data.msg);
1061
       });
1063
       });
1062
     },
1064
     },
1063
     async countSlot(row, type) {
1065
     async countSlot(row, type) {
1064
-      console.log(row);
1065
       if (type === 1) {
1066
       if (type === 1) {
1066
         //下载
1067
         //下载
1067
         this.downloadInfo = {
1068
         this.downloadInfo = {
1185
     },
1186
     },
1186
     onFileProgress(rootFile, file) {
1187
     onFileProgress(rootFile, file) {
1187
       file.progress();
1188
       file.progress();
1188
-      this.showLiading = true;
1189
     },
1189
     },
1190
     onFileSuccess(rootFile, file, response) {
1190
     onFileSuccess(rootFile, file, response) {
1191
       let that = this;
1191
       let that = this;
1198
         formData.append("identifier", file.uniqueIdentifier);
1198
         formData.append("identifier", file.uniqueIdentifier);
1199
         formData.append("filename", `${file.resourcename}.${file.suffix}`);
1199
         formData.append("filename", `${file.resourcename}.${file.suffix}`);
1200
         formData.append("savefolder", "app");
1200
         formData.append("savefolder", "app");
1201
+        that.showLoading = true;
1201
         // 进行post 请求
1202
         // 进行post 请求
1202
         axios({
1203
         axios({
1203
           method: "post",
1204
           method: "post",
1209
           }
1210
           }
1210
         })
1211
         })
1211
           .then((response) => {
1212
           .then((response) => {
1213
+            that.showLoading = false;
1212
             let res = response.data;
1214
             let res = response.data;
1213
             if (res.code === 0) {
1215
             if (res.code === 0) {
1214
               that.wallpaperInfo.apkPath = res.obj.apkPath;
1216
               that.wallpaperInfo.apkPath = res.obj.apkPath;
1239
     },
1241
     },
1240
     CheckboxDevice(dgroupid, val) {
1242
     CheckboxDevice(dgroupid, val) {
1241
       this.deviceids[dgroupid] = val;
1243
       this.deviceids[dgroupid] = val;
1242
-      console.log(this.deviceids);
1243
     },
1244
     },
1244
     init() {
1245
     init() {
1245
       //获取分组列表
1246
       //获取分组列表
1346
           if (document.querySelector(".section_main")) {
1347
           if (document.querySelector(".section_main")) {
1347
             document.querySelector(".section_main").scrollTop = 0;
1348
             document.querySelector(".section_main").scrollTop = 0;
1348
           }
1349
           }
1349
-          console.log(this.searchForm.list);
1350
         } else {
1350
         } else {
1351
           this.$Message.error(res.msg);
1351
           this.$Message.error(res.msg);
1352
         }
1352
         }
1446
             form.appid = this.wallpaperInfo.appid;
1446
             form.appid = this.wallpaperInfo.appid;
1447
             form.rversion = this.wallpaperInfo.rversion;
1447
             form.rversion = this.wallpaperInfo.rversion;
1448
           }
1448
           }
1449
-          console.log(form);
1449
+          this.showLoading = true;
1450
           let api = this.wallpaperInfo.appid ? app_edit : app_add;
1450
           let api = this.wallpaperInfo.appid ? app_edit : app_add;
1451
           api(form).then((res) => {
1451
           api(form).then((res) => {
1452
+            this.showLoading = false;
1452
             if (res.code === 0) {
1453
             if (res.code === 0) {
1453
               this.wallpaperInfo.show = false;
1454
               this.wallpaperInfo.show = false;
1454
-              console.log(res.obj);
1455
               this.$Message.success(res.msg);
1455
               this.$Message.success(res.msg);
1456
               this.searchList();
1456
               this.searchList();
1457
             } else {
1457
             } else {
1463
     },
1463
     },
1464
     // 编辑
1464
     // 编辑
1465
     toEdit(row) {
1465
     toEdit(row) {
1466
+      this.showLoading = true;
1466
       app_detail({
1467
       app_detail({
1467
         rtype: this.powerParams.rtype,
1468
         rtype: this.powerParams.rtype,
1468
         objectid: this.powerParams.objectid,
1469
         objectid: this.powerParams.objectid,
1469
         appid: row.appid
1470
         appid: row.appid
1470
       }).then((res) => {
1471
       }).then((res) => {
1472
+        this.showLoading = false;
1471
         if (res.code === 0) {
1473
         if (res.code === 0) {
1472
           this.school_list = JSON.parse(JSON.stringify(this.curRegion));
1474
           this.school_list = JSON.parse(JSON.stringify(this.curRegion));
1473
           this.wallpaperInfo = {
1475
           this.wallpaperInfo = {
1523
               }
1525
               }
1524
             }
1526
             }
1525
           });
1527
           });
1526
-
1527
-          console.log(res.obj);
1528
-          console.log(this.wallpaperInfo);
1529
         } else {
1528
         } else {
1530
           this.$Message.error(res.msg);
1529
           this.$Message.error(res.msg);
1531
         }
1530
         }
1537
         title: "提示",
1536
         title: "提示",
1538
         content: "您确定删除选中数据吗?",
1537
         content: "您确定删除选中数据吗?",
1539
         onOk: () => {
1538
         onOk: () => {
1539
+          this.showLoading = true;
1540
           app_delete({
1540
           app_delete({
1541
             rtype: this.powerParams.rtype,
1541
             rtype: this.powerParams.rtype,
1542
             objectid: this.powerParams.objectid,
1542
             objectid: this.powerParams.objectid,
1543
             appid: row.appid,
1543
             appid: row.appid,
1544
             rversion: row.rversion
1544
             rversion: row.rversion
1545
           }).then((res) => {
1545
           }).then((res) => {
1546
+            this.showLoading = false;
1546
             if (res.code === 0) {
1547
             if (res.code === 0) {
1547
               this.$Message.success(res.msg);
1548
               this.$Message.success(res.msg);
1548
               this.searchList();
1549
               this.searchList();

+ 9
- 0
src/views/schoolSection/applicationManage/greenBrowser.vue View File

78
         <Button @click="saveAddInfo()" type="primary">保存</Button>
78
         <Button @click="saveAddInfo()" type="primary">保存</Button>
79
       </div>
79
       </div>
80
     </Modal>
80
     </Modal>
81
+    <Spin fix v-if="showLoading" style="background-color: transparent">
82
+      <Icon type="ios-loading" size="18" class="demo-spin-icon-load"></Icon>
83
+      <div>加载中</div>
84
+    </Spin>
81
   </div>
85
   </div>
82
 </template>
86
 </template>
83
 
87
 
91
 export default {
95
 export default {
92
   data() {
96
   data() {
93
     return {
97
     return {
98
+      showLoading: false,
94
       searchForm: {
99
       searchForm: {
95
         visitName: "",
100
         visitName: "",
96
         page: 1,
101
         page: 1,
193
     },
198
     },
194
     // 获取列表
199
     // 获取列表
195
     getList() {
200
     getList() {
201
+      this.showLoading = true;
196
       browser_list({
202
       browser_list({
197
         rtype: this.powerParams.rtype,
203
         rtype: this.powerParams.rtype,
198
         objectid: this.powerParams.objectid,
204
         objectid: this.powerParams.objectid,
201
         size: this.searchForm.size,
207
         size: this.searchForm.size,
202
         visitName: this.searchForm.visitName
208
         visitName: this.searchForm.visitName
203
       }).then((data) => {
209
       }).then((data) => {
210
+        this.showLoading = false;
204
         if (data.code === 0) {
211
         if (data.code === 0) {
205
           this.searchForm.list = data.obj.data;
212
           this.searchForm.list = data.obj.data;
206
           this.searchForm.total = data.obj.total;
213
           this.searchForm.total = data.obj.total;
235
             form.browserid = this.browserInfo.browserid;
242
             form.browserid = this.browserInfo.browserid;
236
             form.rversion = this.browserInfo.rversion;
243
             form.rversion = this.browserInfo.rversion;
237
           }
244
           }
245
+          this.showLoading = true;
238
           api(form).then((data) => {
246
           api(form).then((data) => {
247
+            this.showLoading = false;
239
             if (data.code === 0) {
248
             if (data.code === 0) {
240
               this.searchList();
249
               this.searchList();
241
               this.$Message.success(data.msg);
250
               this.$Message.success(data.msg);

+ 2
- 3
src/views/schoolSection/log/deviceExport.vue View File

1
 <template>
1
 <template>
2
   <div class="main_root">
2
   <div class="main_root">
3
     <div class="search_header">
3
     <div class="search_header">
4
-      <div class="search_left">
5
-      </div>
4
+      <div class="search_left"></div>
6
       <Button type="primary" class="primary_btn" @click="toExport()"
5
       <Button type="primary" class="primary_btn" @click="toExport()"
7
         >导出</Button
6
         >导出</Button
8
       >
7
       >
9
     </div>
8
     </div>
10
     <div class="table_wrap">
9
     <div class="table_wrap">
11
       <Table :columns="columns" :data="searchForm.list">
10
       <Table :columns="columns" :data="searchForm.list">
12
-        <template slot-scope="{ row }" slot="violatedSlot">
11
+        <template slot-scope="{ row }" slot="violated">
13
           <div class="action_list">
12
           <div class="action_list">
14
             <!-- 0不违规1违规 -->
13
             <!-- 0不违规1违规 -->
15
             <div v-if="row.violated === 1" class="action_success">是</div>
14
             <div v-if="row.violated === 1" class="action_success">是</div>

+ 25
- 15
src/views/schoolSection/userManage/userManage.vue View File

560
         this.$Message.error("请选择上传文件");
560
         this.$Message.error("请选择上传文件");
561
         return;
561
         return;
562
       }
562
       }
563
-      this.wait_flag = true;
563
+      this.wait_flag = true; //showLoading
564
       let that = this;
564
       let that = this;
565
       user_import(this.form_data)
565
       user_import(this.form_data)
566
         .then((res) => {
566
         .then((res) => {
617
     },
617
     },
618
     //导出
618
     //导出
619
     userExport() {
619
     userExport() {
620
+      this.showLoading = true;
620
       user_export({
621
       user_export({
621
         rtype: this.powerParams.rtype,
622
         rtype: this.powerParams.rtype,
622
         objectid: this.powerParams.objectid,
623
         objectid: this.powerParams.objectid,
623
         schoolid: this.powerParams.objectid
624
         schoolid: this.powerParams.objectid
624
       }).then((res) => {
625
       }).then((res) => {
626
+        this.showLoading = false;
625
         if (res.code === 0) {
627
         if (res.code === 0) {
626
           exportToExcel(
628
           exportToExcel(
627
             [
629
             [
694
             cardid: this.addInfo.cardid
696
             cardid: this.addInfo.cardid
695
           };
697
           };
696
           let api = this.addInfo.userid ? user_edit : user_add;
698
           let api = this.addInfo.userid ? user_edit : user_add;
699
+          this.showLoading = true;
697
           api(form).then((res) => {
700
           api(form).then((res) => {
701
+            this.showLoading = false;
698
             if (res.code === 0) {
702
             if (res.code === 0) {
699
               this.addInfo.show = false;
703
               this.addInfo.show = false;
700
               this.$Message.success(res.msg);
704
               this.$Message.success(res.msg);
723
       });
727
       });
724
     },
728
     },
725
     toDel(row) {
729
     toDel(row) {
726
-      user_delete({
727
-        rtype: this.powerParams.rtype,
728
-        objectid: this.powerParams.objectid,
729
-        userid: row.userid,
730
-        rversion: row.rversion
731
-      }).then((res) => {
732
-        if (res.code === 0) {
733
-          this.searchList();
734
-          this.$Message.success(res.msg);
735
-        } else {
736
-          this.$Message.error(res.msg);
737
-        }
730
+      this.$Modal.confirm({
731
+        title: "提示",
732
+        content: "您确定删除【" + row.username + "】吗?",
733
+        onOk: () => {
734
+          user_delete({
735
+            rtype: this.powerParams.rtype,
736
+            objectid: this.powerParams.objectid,
737
+            userid: row.userid,
738
+            rversion: row.rversion
739
+          }).then((res) => {
740
+            if (res.code === 0) {
741
+              this.searchList();
742
+              this.$Message.success(res.msg);
743
+            } else {
744
+              this.$Message.error(res.msg);
745
+            }
746
+          });
747
+        },
748
+        onCancel: () => {}
738
       });
749
       });
739
     },
750
     },
740
     enabledChange(row) {
751
     enabledChange(row) {
790
     // 获取列表
801
     // 获取列表
791
     getList() {
802
     getList() {
792
       this.showLoading = true;
803
       this.showLoading = true;
793
-      console.log(this.powerParams);
794
       user_list({
804
       user_list({
795
         rtype: this.powerParams.rtype,
805
         rtype: this.powerParams.rtype,
796
         objectid: this.powerParams.objectid,
806
         objectid: this.powerParams.objectid,
880
     display: flex;
890
     display: flex;
881
     margin: 16px 0;
891
     margin: 16px 0;
882
     .app_logo {
892
     .app_logo {
883
-      flex-wrap: none;
893
+      flex: none;
884
       width: 56px;
894
       width: 56px;
885
       height: 56px;
895
       height: 56px;
886
       border-radius: 20px;
896
       border-radius: 20px;

Loading…
Cancel
Save