Browse Source

Merge remote-tracking branch 'origin/gzb' into wzl

gzb
wangzhonglu 9 months ago
parent
commit
db616987d9

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

989
       let obj = this.viewInfo.apphistorys.filter(
989
       let obj = this.viewInfo.apphistorys.filter(
990
         (v) => v.versionName === this.viewInfo.versionName
990
         (v) => v.versionName === this.viewInfo.versionName
991
       )[0];
991
       )[0];
992
-      console.log(obj);
993
       this.viewInfo.apkPath = obj.apkPath;
992
       this.viewInfo.apkPath = obj.apkPath;
994
       this.viewInfo.appAbbr = obj.appAbbr;
993
       this.viewInfo.appAbbr = obj.appAbbr;
995
       this.viewInfo.appDeveloper = obj.appDeveloper;
994
       this.viewInfo.appDeveloper = obj.appDeveloper;
1037
             devices: res.obj.devices,
1036
             devices: res.obj.devices,
1038
             schools: res.obj.schools
1037
             schools: res.obj.schools
1039
           };
1038
           };
1040
-          console.log(this.viewInfo);
1041
         } else {
1039
         } else {
1042
           this.$Message.error(res.msg);
1040
           this.$Message.error(res.msg);
1043
         }
1041
         }
1058
             appName: res.obj.appName,
1056
             appName: res.obj.appName,
1059
             devices: res.obj.devices
1057
             devices: res.obj.devices
1060
           };
1058
           };
1061
-          console.log(this.deviceInfo);
1062
         } else {
1059
         } else {
1063
           this.$Message.error(res.msg);
1060
           this.$Message.error(res.msg);
1064
         }
1061
         }
1084
     },
1081
     },
1085
     installChange() {
1082
     installChange() {
1086
       //安装统计切换版本
1083
       //安装统计切换版本
1087
-      console.log(this.installInfo.versionName);
1088
       let obj = this.installInfo.apphistorys.filter(
1084
       let obj = this.installInfo.apphistorys.filter(
1089
         (v) => v.versionName === this.installInfo.versionName
1085
         (v) => v.versionName === this.installInfo.versionName
1090
       )[0];
1086
       )[0];
1097
       }).then((res) => {
1093
       }).then((res) => {
1098
         this.showLoading = false;
1094
         this.showLoading = false;
1099
         if (res.code === 0) {
1095
         if (res.code === 0) {
1100
-          console.log(res.obj);
1101
           this.installInfo.list = res.obj;
1096
           this.installInfo.list = res.obj;
1102
         } else {
1097
         } else {
1103
           this.$Message.error(res.msg);
1098
           this.$Message.error(res.msg);
1125
           });
1120
           });
1126
           qrcode._el.title = "";
1121
           qrcode._el.title = "";
1127
         });
1122
         });
1128
-        console.log(this.downloadInfo);
1129
       } else if (type === 2) {
1123
       } else if (type === 2) {
1130
         //获取历史版本
1124
         //获取历史版本
1131
         this.showLoading = true;
1125
         this.showLoading = true;
1143
         });
1137
         });
1144
         this.showLoading = false;
1138
         this.showLoading = false;
1145
         if (res1.code === 0) {
1139
         if (res1.code === 0) {
1146
-          console.log(res1.obj);
1147
           this.installInfo = {
1140
           this.installInfo = {
1148
             show: true,
1141
             show: true,
1149
             appName: row.appName,
1142
             appName: row.appName,
1203
     //选中区域学校
1196
     //选中区域学校
1204
     getSelectedNodes(data) {
1197
     getSelectedNodes(data) {
1205
       this.select_schools = data.filter((v) => v.schoolid);
1198
       this.select_schools = data.filter((v) => v.schoolid);
1206
-      console.log(this.select_schools);
1207
     },
1199
     },
1208
     getUploadProgress(file) {
1200
     getUploadProgress(file) {
1209
       let progress = file.progress();
1201
       let progress = file.progress();
1299
     },
1291
     },
1300
     CheckboxDevice(dgroupid, val) {
1292
     CheckboxDevice(dgroupid, val) {
1301
       this.deviceids[dgroupid] = val;
1293
       this.deviceids[dgroupid] = val;
1302
-      console.log(this.deviceids);
1303
     },
1294
     },
1304
     init() {
1295
     init() {
1305
       //获取分组列表
1296
       //获取分组列表
1312
       }).then((res) => {
1303
       }).then((res) => {
1313
         if (res.code === 0) {
1304
         if (res.code === 0) {
1314
           this.group_list = res.obj.data;
1305
           this.group_list = res.obj.data;
1315
-          console.log(this.group_list);
1316
         } else {
1306
         } else {
1317
           this.$Message.error(res.msg);
1307
           this.$Message.error(res.msg);
1318
         }
1308
         }
1363
         if (res.code === 0) {
1353
         if (res.code === 0) {
1364
           this.getHandleData(res.obj[0]);
1354
           this.getHandleData(res.obj[0]);
1365
           this.school_list = res.obj;
1355
           this.school_list = res.obj;
1366
-          console.log(this.school_list);
1367
         } else {
1356
         } else {
1368
           this.$Message.error(res.msg);
1357
           this.$Message.error(res.msg);
1369
         }
1358
         }
1451
           if (document.querySelector(".section_main")) {
1440
           if (document.querySelector(".section_main")) {
1452
             document.querySelector(".section_main").scrollTop = 0;
1441
             document.querySelector(".section_main").scrollTop = 0;
1453
           }
1442
           }
1454
-          console.log(this.searchForm.list);
1455
         } else {
1443
         } else {
1456
           this.$Message.error(res.msg);
1444
           this.$Message.error(res.msg);
1457
         }
1445
         }
1568
             form.appid = this.wallpaperInfo.appid;
1556
             form.appid = this.wallpaperInfo.appid;
1569
             form.rversion = this.wallpaperInfo.rversion;
1557
             form.rversion = this.wallpaperInfo.rversion;
1570
           }
1558
           }
1571
-          console.log(form);
1572
           let api = this.wallpaperInfo.appid ? app_edit : app_add;
1559
           let api = this.wallpaperInfo.appid ? app_edit : app_add;
1573
           this.showLoading = true;
1560
           this.showLoading = true;
1574
           api(form).then((res) => {
1561
           api(form).then((res) => {
1575
             this.showLoading = false;
1562
             this.showLoading = false;
1576
             if (res.code === 0) {
1563
             if (res.code === 0) {
1577
               this.wallpaperInfo.show = false;
1564
               this.wallpaperInfo.show = false;
1578
-              console.log(res.obj);
1579
               this.$Message.success(res.msg);
1565
               this.$Message.success(res.msg);
1580
               this.searchList();
1566
               this.searchList();
1581
             } else {
1567
             } else {
1679
               });
1665
               });
1680
             }
1666
             }
1681
           });
1667
           });
1682
-          console.log(this.wallpaperInfo);
1683
         } else {
1668
         } else {
1684
           this.$Message.error(res.msg);
1669
           this.$Message.error(res.msg);
1685
         }
1670
         }

+ 224
- 33
src/views/schoolSection/applicationManage/applicationList.vue View File

287
               </uploader>
287
               </uploader>
288
             </div>
288
             </div>
289
             <div class="upProgress" v-if="file_list.length > 0">
289
             <div class="upProgress" v-if="file_list.length > 0">
290
-              <div v-for="file in file_list" key="file1">
290
+              <div v-for="(file, index) in file_list" :key="index">
291
                 <div class="file_name" :title="wallpaperInfo.appPackage">
291
                 <div class="file_name" :title="wallpaperInfo.appPackage">
292
                   <div class="show_name">
292
                   <div class="show_name">
293
                     {{ wallpaperInfo.appPackage }}
293
                     {{ wallpaperInfo.appPackage }}
488
               :src="$api.showImageUrl + viewInfo.appIcon"
488
               :src="$api.showImageUrl + viewInfo.appIcon"
489
             />
489
             />
490
           </div>
490
           </div>
491
-          <div class="appIcon" @click="download(viewInfo.appIcon)">
491
+          <div class="appIcon" @click="download(viewInfo.apkPath)">
492
             <Icon type="md-download" />下载
492
             <Icon type="md-download" />下载
493
           </div>
493
           </div>
494
         </div>
494
         </div>
499
               }}<span v-if="viewInfo.enabled === 1" class="qy">启用</span>
499
               }}<span v-if="viewInfo.enabled === 1" class="qy">启用</span>
500
             </div>
500
             </div>
501
             <div class="view_item">
501
             <div class="view_item">
502
-              <span>版本号码</span>{{ viewInfo.versionNum }}
502
+              <span>版本号码</span>
503
+              <Select
504
+                :transfer="true"
505
+                v-model="viewInfo.versionName"
506
+                @on-change="viewInfoChange()"
507
+                style="width: 120px"
508
+              >
509
+                <Option
510
+                  v-for="item in viewInfo.apphistorys"
511
+                  :value="item.versionName"
512
+                  :key="item.versionName"
513
+                  >{{ item.versionName }}</Option
514
+                >
515
+              </Select>
503
             </div>
516
             </div>
504
           </div>
517
           </div>
505
           <div class="view_comm">
518
           <div class="view_comm">
594
         <Button @click="viewInfo.show = false">关闭</Button>
607
         <Button @click="viewInfo.show = false">关闭</Button>
595
       </div>
608
       </div>
596
     </Modal>
609
     </Modal>
610
+    <!-- 安装统计 -->
611
+    <Modal
612
+      class="modal1"
613
+      :mask-closable="false"
614
+      v-model="installInfo.show"
615
+      title="安装统计"
616
+    >
617
+      <div v-if="installInfo.show">
618
+        <div class="install_title">
619
+          {{ installInfo.appName }}
620
+          <div class="history">
621
+            <div>版本号码</div>
622
+            <Select
623
+              :transfer="true"
624
+              v-model="installInfo.versionName"
625
+              @on-change="installChange()"
626
+              style="width: 120px; margin-left: 10px"
627
+            >
628
+              <Option
629
+                v-for="item in installInfo.apphistorys"
630
+                :value="item.versionName"
631
+                :key="item.versionName"
632
+                >{{ item.versionName }}</Option
633
+              >
634
+            </Select>
635
+          </div>
636
+        </div>
637
+        <Table
638
+          style="border: 1px solid #e8eaec; border-bottom: none"
639
+          :columns="installInfo.columns"
640
+          :data="installInfo.list"
641
+        ></Table>
642
+      </div>
643
+
644
+      <div slot="footer" style="text-align: center">
645
+        <Button @click="installInfo.show = false">关闭</Button>
646
+      </div>
647
+    </Modal>
597
     <Spin fix v-if="showLoading" style="background-color: transparent">
648
     <Spin fix v-if="showLoading" style="background-color: transparent">
598
       <Icon type="ios-loading" size="18" class="demo-spin-icon-load"></Icon>
649
       <Icon type="ios-loading" size="18" class="demo-spin-icon-load"></Icon>
599
       <div>加载中</div>
650
       <div>加载中</div>
609
   app_add,
660
   app_add,
610
   app_delete,
661
   app_delete,
611
   app_detail,
662
   app_detail,
663
+  app_detail_history,
612
   app_edit,
664
   app_edit,
613
   app_edit_enable,
665
   app_edit_enable,
614
   app_edit_unenable,
666
   app_edit_unenable,
667
+  app_install_statistic,
615
   app_list,
668
   app_list,
616
   appgroup_list,
669
   appgroup_list,
617
   device_list
670
   device_list
764
       select_schools: [],
817
       select_schools: [],
765
       deviceids: {}, //设备类型
818
       deviceids: {}, //设备类型
766
       userInfo: {},
819
       userInfo: {},
820
+      installInfo: {
821
+        show: false,
822
+        appName: "",
823
+        versionName: null,
824
+        apphistorys: [],
825
+        list: [],
826
+        columns: [
827
+          {
828
+            title: "序号",
829
+            type: "index",
830
+            width: 70,
831
+            align: "center"
832
+          },
833
+          {
834
+            title: "区域名称",
835
+            key: "regionName",
836
+            align: "center"
837
+          },
838
+          {
839
+            title: "设备总数",
840
+            key: "total",
841
+            align: "center"
842
+          },
843
+          {
844
+            title: "已安装设备数",
845
+            key: "installNum",
846
+            align: "center"
847
+          },
848
+          {
849
+            title: "未安装设备总数",
850
+            key: "unInstallNum",
851
+            align: "center"
852
+          },
853
+          {
854
+            title: "安装比例",
855
+            key: "installRate",
856
+            align: "center"
857
+          }
858
+        ]
859
+      },
767
       deviceInfo: {
860
       deviceInfo: {
768
         show: false,
861
         show: false,
769
         appName: "",
862
         appName: "",
856
     download(url) {
949
     download(url) {
857
       window.location.href = this.$api.showImageUrl + url;
950
       window.location.href = this.$api.showImageUrl + url;
858
     },
951
     },
952
+    viewInfoChange() {
953
+      //查看切换版本
954
+      let obj = this.viewInfo.apphistorys.filter(
955
+        (v) => v.versionName === this.viewInfo.versionName
956
+      )[0];
957
+      this.viewInfo.apkPath = obj.apkPath;
958
+      this.viewInfo.appAbbr = obj.appAbbr;
959
+      this.viewInfo.appDeveloper = obj.appDeveloper;
960
+      this.viewInfo.appIcon = obj.appIcon;
961
+      this.viewInfo.appImg = obj.appImg.split(";");
962
+      this.viewInfo.appPackage = obj.appPackage;
963
+      this.viewInfo.appRenew = obj.appRenew;
964
+      this.viewInfo.appSize = obj.appSize;
965
+      this.viewInfo.versionNum = obj.versionNum;
966
+    },
859
     // 查看
967
     // 查看
860
     toView(row) {
968
     toView(row) {
861
       app_detail({
969
       app_detail({
866
         if (res.code === 0) {
974
         if (res.code === 0) {
867
           this.viewInfo = {
975
           this.viewInfo = {
868
             show: true,
976
             show: true,
977
+            apphistorys: res.obj.apphistorys,
869
             appName: res.obj.appName,
978
             appName: res.obj.appName,
870
             appgroupName: row.appgroupName,
979
             appgroupName: row.appgroupName,
871
             enabled: res.obj.enabled,
980
             enabled: res.obj.enabled,
931
         }
1040
         }
932
       });
1041
       });
933
     },
1042
     },
934
-    countSlot(row, type) {
1043
+    installChange() {
1044
+      //安装统计切换版本
1045
+      let obj = this.installInfo.apphistorys.filter(
1046
+        (v) => v.versionName === this.installInfo.versionName
1047
+      )[0];
1048
+      this.showLoading = true;
1049
+      app_install_statistic({
1050
+        appPackage: obj.appPackage,
1051
+        versionName: obj.versionName,
1052
+        rtype: this.powerParams.rtype,
1053
+        objectid: this.powerParams.objectid
1054
+      }).then((res) => {
1055
+        this.showLoading = false;
1056
+        if (res.code === 0) {
1057
+          this.installInfo.list = res.obj;
1058
+        } else {
1059
+          this.$Message.error(res.msg);
1060
+        }
1061
+      });
1062
+    },
1063
+    async countSlot(row, type) {
935
       console.log(row);
1064
       console.log(row);
936
       if (type === 1) {
1065
       if (type === 1) {
937
         //下载
1066
         //下载
938
-        app_detail({
939
-          rtype: this.powerParams.rtype,
940
-          objectid: this.powerParams.objectid,
941
-          appid: row.appid
942
-        }).then((res) => {
943
-          if (res.code === 0) {
944
-            this.downloadInfo = {
945
-              show: true,
946
-              appName: res.obj.appName,
947
-              apkPath: this.$api.showImageUrl + res.obj.apkPath
948
-            };
949
-            this.$nextTick(() => {
950
-              let qrcodeEl = this.$refs.ScanShare;
951
-              if (!qrcodeEl) {
952
-                return;
953
-              }
954
-              qrcodeEl.innerHTML = "";
955
-              let qrcode = new QRCode(qrcodeEl, {
956
-                width: 140,
957
-                height: 140,
958
-                text: this.$api.showImageUrl + this.downloadInfo.apkPath
959
-              });
960
-              qrcode._el.title = "";
961
-            });
962
-            console.log(this.downloadInfo);
963
-          } else {
964
-            this.$Message.error(res.msg);
1067
+        this.downloadInfo = {
1068
+          show: true,
1069
+          appName: row.appName,
1070
+          apkPath: row.apkPath
1071
+        };
1072
+        this.$nextTick(() => {
1073
+          let qrcodeEl = this.$refs.ScanShare;
1074
+          if (!qrcodeEl) {
1075
+            return;
965
           }
1076
           }
1077
+          qrcodeEl.innerHTML = "";
1078
+          let qrcode = new QRCode(qrcodeEl, {
1079
+            width: 140,
1080
+            height: 140,
1081
+            text: this.$api.showImageUrl + this.downloadInfo.apkPath
1082
+          });
1083
+          qrcode._el.title = "";
966
         });
1084
         });
967
       } else if (type === 2) {
1085
       } else if (type === 2) {
1086
+        //获取历史版本
1087
+        this.showLoading = true;
1088
+        let res = await app_detail_history({ appid: row.appid });
1089
+        if (res.code != 0) {
1090
+          this.$Message.error(res.msg);
1091
+        }
968
         //安装统计
1092
         //安装统计
1093
+        let res1 = await app_install_statistic({
1094
+          appPackage: row.appPackage,
1095
+          versionName: row.versionName,
1096
+          rtype: this.powerParams.rtype,
1097
+          objectid: this.powerParams.objectid
1098
+        });
1099
+        this.showLoading = false;
1100
+        if (res1.code === 0) {
1101
+          this.installInfo = {
1102
+            show: true,
1103
+            appName: row.appName,
1104
+            apphistorys: res.obj,
1105
+            versionName: row.versionName,
1106
+            list: res1.obj,
1107
+            columns: [
1108
+              {
1109
+                title: "序号",
1110
+                type: "index",
1111
+                width: 70,
1112
+                align: "center"
1113
+              },
1114
+              {
1115
+                title: "区域名称",
1116
+                key: "regionName",
1117
+                align: "center"
1118
+              },
1119
+              {
1120
+                title: "设备总数",
1121
+                key: "total",
1122
+                align: "center"
1123
+              },
1124
+              {
1125
+                title: "已安装设备数",
1126
+                key: "installNum",
1127
+                align: "center"
1128
+              },
1129
+              {
1130
+                title: "未安装设备总数",
1131
+                key: "unInstallNum",
1132
+                align: "center"
1133
+              },
1134
+              {
1135
+                title: "安装比例",
1136
+                key: "installRate",
1137
+                align: "center"
1138
+              }
1139
+            ]
1140
+          };
1141
+        } else {
1142
+          this.$Message.error(res1.msg);
1143
+        }
969
       }
1144
       }
970
     },
1145
     },
971
     //删除截图
1146
     //删除截图
1404
     display: flex;
1579
     display: flex;
1405
     margin: 16px 0;
1580
     margin: 16px 0;
1406
     .app_logo {
1581
     .app_logo {
1407
-      flex-wrap: none;
1582
+      flex: none;
1408
       width: 56px;
1583
       width: 56px;
1409
       height: 56px;
1584
       height: 56px;
1410
       border-radius: 20px;
1585
       border-radius: 20px;
1465
 }
1640
 }
1466
 .view_devices {
1641
 .view_devices {
1467
   .view_list {
1642
   .view_list {
1468
-    margin-bottom: 20px;
1469
     line-height: 32px;
1643
     line-height: 32px;
1470
   }
1644
   }
1471
   .dgname {
1645
   .dgname {
1692
     }
1866
     }
1693
   }
1867
   }
1694
 }
1868
 }
1869
+.install_title {
1870
+  margin-bottom: 16px;
1871
+  font-size: 18px;
1872
+  font-weight: bold;
1873
+  text-align: center;
1874
+  position: relative;
1875
+}
1876
+.history {
1877
+  position: absolute;
1878
+  top: 0;
1879
+  right: 0;
1880
+  display: flex;
1881
+  font-size: 16px;
1882
+  font-weight: 400;
1883
+  font-family: "SourceHanSansCN";
1884
+  align-items: center;
1885
+}
1695
 </style>
1886
 </style>

+ 9
- 13
src/views/schoolSection/strategy/personalStrategy.vue View File

84
                 <div class="day" v-for="item in weeks" :key="item.id">
84
                 <div class="day" v-for="item in weeks" :key="item.id">
85
                   <div class="day_title">{{ item.title }}</div>
85
                   <div class="day_title">{{ item.title }}</div>
86
                   <div class="day_content">
86
                   <div class="day_content">
87
-                    <div class="time" v-for="sitem in getDay(item.id)">
87
+                    <div
88
+                      class="time"
89
+                      v-for="(sitem, index) in getDay(item.id)"
90
+                      :key="index"
91
+                    >
88
                       {{ getTime(sitem.starttime) }}-{{
92
                       {{ getTime(sitem.starttime) }}-{{
89
                         getTime(sitem.stoptime)
93
                         getTime(sitem.stoptime)
90
                       }}
94
                       }}
222
           </div>
226
           </div>
223
           <div class="nodata" v-else>未设置Wifi白名单</div>
227
           <div class="nodata" v-else>未设置Wifi白名单</div>
224
         </div>
228
         </div>
225
-        <div class="strategy_list">
229
+        <div class="strategy_list" style="padding-bottom: 16px">
226
           <div class="strategy_title">
230
           <div class="strategy_title">
227
             <div>
231
             <div>
228
               <span class="ivu-icon iconfont icon-weiguiguanli"></span>违规处理
232
               <span class="ivu-icon iconfont icon-weiguiguanli"></span>违规处理
330
   stPad_add,
334
   stPad_add,
331
   stPad_add_quote,
335
   stPad_add_quote,
332
   stPad_delete,
336
   stPad_delete,
333
-  stPad_detail,
334
   stPad_detail_web,
337
   stPad_detail_web,
335
   stPad_edit,
338
   stPad_edit,
336
   stPad_list,
339
   stPad_list,
586
   },
589
   },
587
   created() {
590
   created() {
588
     this.init();
591
     this.init();
589
-    console.log(this.curClass);
590
   },
592
   },
591
   methods: {
593
   methods: {
592
     stPadChange(row) {
594
     stPadChange(row) {
670
           this.strategyInfo.padWifis = res.obj.padWifis || [];
672
           this.strategyInfo.padWifis = res.obj.padWifis || [];
671
           this.strategyInfo.padTimes = res.obj.padTimes || [];
673
           this.strategyInfo.padTimes = res.obj.padTimes || [];
672
           this.stPadInfo.show = false;
674
           this.stPadInfo.show = false;
673
-          console.log(this.strategyInfo);
674
         } else {
675
         } else {
675
           this.$Message.error(res.msg);
676
           this.$Message.error(res.msg);
676
         }
677
         }
823
         form.rversion = this.strategyInfo.rversion;
824
         form.rversion = this.strategyInfo.rversion;
824
       }
825
       }
825
       let api = this.strategyInfo.model === "edit" ? stPad_edit : stPad_add;
826
       let api = this.strategyInfo.model === "edit" ? stPad_edit : stPad_add;
826
-      console.log(form);
827
       api(form).then((res) => {
827
       api(form).then((res) => {
828
         if (res.code === 0) {
828
         if (res.code === 0) {
829
           this.$Message.success(res.msg);
829
           this.$Message.success(res.msg);
830
           this.searchList();
830
           this.searchList();
831
           this.strategyInfo.show = false;
831
           this.strategyInfo.show = false;
832
-          console.log(res.obj);
833
         } else {
832
         } else {
834
           this.$Message.error(res.msg);
833
           this.$Message.error(res.msg);
835
         }
834
         }
870
       this.strategyInfo.padWifis = Array.from(
869
       this.strategyInfo.padWifis = Array.from(
871
         new Set(this.strategyInfo.padWifis)
870
         new Set(this.strategyInfo.padWifis)
872
       );
871
       );
872
+      this.ssidName = "";
873
     },
873
     },
874
     async init() {
874
     async init() {
875
       //获取应用列表
875
       //获取应用列表
940
           this.strategyInfo.padWifis = res.obj.padWifis || [];
940
           this.strategyInfo.padWifis = res.obj.padWifis || [];
941
           this.strategyInfo.padTimes = res.obj.padTimes || [];
941
           this.strategyInfo.padTimes = res.obj.padTimes || [];
942
           this.strategyInfo.show = true;
942
           this.strategyInfo.show = true;
943
-          console.log(this.strategyInfo);
944
         } else {
943
         } else {
945
           this.$Message.error(res.msg);
944
           this.$Message.error(res.msg);
946
         }
945
         }
948
     },
947
     },
949
     toEdit(row) {
948
     toEdit(row) {
950
       this.initData();
949
       this.initData();
951
-      console.log(row);
952
       if (!row.padid) {
950
       if (!row.padid) {
953
         this.strategyInfo = {
951
         this.strategyInfo = {
954
           model: "add", //添加
952
           model: "add", //添加
974
       stPad_detail_web({ objectid: row.userid }).then((res) => {
972
       stPad_detail_web({ objectid: row.userid }).then((res) => {
975
         this.showLoading = false;
973
         this.showLoading = false;
976
         if (res.code === 0) {
974
         if (res.code === 0) {
977
-          console.log(res.obj);
978
           //数据回显
975
           //数据回显
979
           this.strategyInfo.model = "edit";
976
           this.strategyInfo.model = "edit";
980
           this.strategyInfo.username = row.username;
977
           this.strategyInfo.username = row.username;
1022
             });
1019
             });
1023
           }
1020
           }
1024
           this.strategyInfo.show = true;
1021
           this.strategyInfo.show = true;
1025
-          console.log(this.strategyInfo);
1026
         } else {
1022
         } else {
1027
           this.$Message.error(res.msg);
1023
           this.$Message.error(res.msg);
1028
         }
1024
         }
1082
           if (document.querySelector(".section_main")) {
1078
           if (document.querySelector(".section_main")) {
1083
             document.querySelector(".section_main").scrollTop = 0;
1079
             document.querySelector(".section_main").scrollTop = 0;
1084
           }
1080
           }
1085
-          console.log(this.searchForm.list);
1086
         } else {
1081
         } else {
1087
           this.$Message.error(res.msg);
1082
           this.$Message.error(res.msg);
1088
         }
1083
         }
1227
     .nodata {
1222
     .nodata {
1228
       color: #798cb5;
1223
       color: #798cb5;
1229
       font-size: 16px;
1224
       font-size: 16px;
1230
-      line-height: 30px;
1225
+      line-height: 40px;
1226
+      padding-left: 20px;
1231
     }
1227
     }
1232
   }
1228
   }
1233
   .showtime {
1229
   .showtime {

+ 12
- 12
src/views/schoolSection/strategy/publicStrategy.vue View File

36
             <div class="day" v-for="item in weeks" :key="item.id">
36
             <div class="day" v-for="item in weeks" :key="item.id">
37
               <div class="day_title">{{ item.title }}</div>
37
               <div class="day_title">{{ item.title }}</div>
38
               <div class="day_content">
38
               <div class="day_content">
39
-                <div class="time" v-for="sitem in getDay(item.id)">
39
+                <div
40
+                  class="time"
41
+                  v-for="(sitem, index) in getDay(item.id)"
42
+                  :key="index"
43
+                >
40
                   {{ getTime(sitem.starttime) }}-{{ getTime(sitem.stoptime) }}
44
                   {{ getTime(sitem.starttime) }}-{{ getTime(sitem.stoptime) }}
41
                 </div>
45
                 </div>
42
               </div>
46
               </div>
164
       </div>
168
       </div>
165
       <div class="nodata" v-else>未设置Wifi白名单</div>
169
       <div class="nodata" v-else>未设置Wifi白名单</div>
166
     </div>
170
     </div>
167
-    <div class="strategy_list">
171
+    <div class="strategy_list" style="padding-bottom: 16px">
168
       <div class="strategy_title">
172
       <div class="strategy_title">
169
         <div>
173
         <div>
170
           <span class="ivu-icon iconfont icon-weiguiguanli"></span>违规处理
174
           <span class="ivu-icon iconfont icon-weiguiguanli"></span>违规处理
233
       v-model="stPadInfo.show"
237
       v-model="stPadInfo.show"
234
       title="引用"
238
       title="引用"
235
     >
239
     >
236
-      <Table
237
-        v-if="stPadInfo.show"
238
-        class="table"
239
-        :columns="columns1"
240
-        :data="stPadInfo.list"
241
-      >
240
+      <Table v-if="stPadInfo.show" :columns="columns1" :data="stPadInfo.list">
242
         <template slot-scope="{ row }" slot="active">
241
         <template slot-scope="{ row }" slot="active">
243
           <Radio @on-change="stPadChange(row)" v-model="row.checked"></Radio>
242
           <Radio @on-change="stPadChange(row)" v-model="row.checked"></Radio>
244
         </template>
243
         </template>
535
           }
534
           }
536
           this.curState = 2; //编辑状态
535
           this.curState = 2; //编辑状态
537
           this.stPadInfo.show = false;
536
           this.stPadInfo.show = false;
538
-          console.log(this.stPadInfo);
539
         } else {
537
         } else {
540
           this.$Message.error(res.msg);
538
           this.$Message.error(res.msg);
541
         }
539
         }
694
         form.rversion = this.strategyInfo.rversion;
692
         form.rversion = this.strategyInfo.rversion;
695
       }
693
       }
696
       let api = hasSave ? stPad_edit : stPad_add;
694
       let api = hasSave ? stPad_edit : stPad_add;
697
-      console.log(hasSave, form);
698
       api(form).then((res) => {
695
       api(form).then((res) => {
699
         if (res.code === 0) {
696
         if (res.code === 0) {
700
           this.$Message.success(res.msg);
697
           this.$Message.success(res.msg);
741
       this.strategyInfo.padWifis = Array.from(
738
       this.strategyInfo.padWifis = Array.from(
742
         new Set(this.strategyInfo.padWifis)
739
         new Set(this.strategyInfo.padWifis)
743
       );
740
       );
741
+      this.ssidName = "";
744
     },
742
     },
745
     async detail() {
743
     async detail() {
746
       this.showLoading = true;
744
       this.showLoading = true;
796
                 arr.length > 0 ? arr[0].handleMethod.split(";") : [];
794
                 arr.length > 0 ? arr[0].handleMethod.split(";") : [];
797
             });
795
             });
798
           }
796
           }
797
+          this.strategyInfo.padWifis = res.obj.padWifis || [];
798
+          this.strategyInfo.padTimes = res.obj.padTimes || [];
799
         } else {
799
         } else {
800
           this.strategyInfo.hastime = false;
800
           this.strategyInfo.hastime = false;
801
           this.strategyInfo.hasapp = false;
801
           this.strategyInfo.hasapp = false;
804
           this.strategyInfo.hasviolate = false;
804
           this.strategyInfo.hasviolate = false;
805
         }
805
         }
806
         this.curState = 1; //查看状态
806
         this.curState = 1; //查看状态
807
-        console.log(this.strategyInfo);
808
       } else {
807
       } else {
809
         this.$Message.error(res.msg);
808
         this.$Message.error(res.msg);
810
       }
809
       }
975
     .nodata {
974
     .nodata {
976
       color: #798cb5;
975
       color: #798cb5;
977
       font-size: 16px;
976
       font-size: 16px;
978
-      line-height: 30px;
977
+      line-height: 40px;
978
+      padding-left: 20px;
979
     }
979
     }
980
   }
980
   }
981
 }
981
 }

+ 2
- 0
src/views/schoolSection/strategy/strategyManage.vue View File

141
   display: flex;
141
   display: flex;
142
   .schoolInfo {
142
   .schoolInfo {
143
     width: 200px;
143
     width: 200px;
144
+    flex: none;
145
+    overflow-y: auto;
144
     border-radius: 15px;
146
     border-radius: 15px;
145
     margin-right: 16px;
147
     margin-right: 16px;
146
     height: 100%;
148
     height: 100%;

+ 11
- 5
src/views/schoolSection/strategy/strategyTemplate.vue View File

120
                 <div class="day" v-for="item in weeks" :key="item.id">
120
                 <div class="day" v-for="item in weeks" :key="item.id">
121
                   <div class="day_title">{{ item.title }}</div>
121
                   <div class="day_title">{{ item.title }}</div>
122
                   <div class="day_content">
122
                   <div class="day_content">
123
-                    <div class="time" v-for="sitem in getDay(item.id)">
123
+                    <div
124
+                      class="time"
125
+                      v-for="(sitem, index) in getDay(item.id)"
126
+                      :key="index"
127
+                    >
124
                       {{ getTime(sitem.starttime) }}-{{
128
                       {{ getTime(sitem.starttime) }}-{{
125
                         getTime(sitem.stoptime)
129
                         getTime(sitem.stoptime)
126
                       }}
130
                       }}
748
       this.strategyInfo.padWifis = Array.from(
752
       this.strategyInfo.padWifis = Array.from(
749
         new Set(this.strategyInfo.padWifis)
753
         new Set(this.strategyInfo.padWifis)
750
       );
754
       );
755
+      this.ssidName = "";
751
     },
756
     },
752
     saveEmpowerInfo() {
757
     saveEmpowerInfo() {
753
       //保存授权
758
       //保存授权
815
       stPad_list({
820
       stPad_list({
816
         size: this.searchForm.size,
821
         size: this.searchForm.size,
817
         page: this.searchForm.page,
822
         page: this.searchForm.page,
823
+        name: this.searchForm.name,
818
         schoolid: this.powerParams.objectid
824
         schoolid: this.powerParams.objectid
819
       }).then((res) => {
825
       }).then((res) => {
820
         this.showLoading = false;
826
         this.showLoading = false;
821
         if (res.code === 0) {
827
         if (res.code === 0) {
822
           this.searchForm.list = res.obj.data;
828
           this.searchForm.list = res.obj.data;
823
-          this.searchForm.total = res.total;
829
+          this.searchForm.total = res.obj.total;
824
         } else {
830
         } else {
825
           this.$Message.error(res.msg);
831
           this.$Message.error(res.msg);
826
         }
832
         }
887
           this.strategyInfo.haswifi = res.obj.haswifi ? true : false;
893
           this.strategyInfo.haswifi = res.obj.haswifi ? true : false;
888
           this.strategyInfo.hasviolate = res.obj.hasviolate ? true : false;
894
           this.strategyInfo.hasviolate = res.obj.hasviolate ? true : false;
889
           if (this.strategyInfo.hastime) {
895
           if (this.strategyInfo.hastime) {
890
-            this.strategyInfo.padTimes = res.obj.padTimes;
896
+            this.strategyInfo.padTimes = res.obj.padTimes || [];
891
           }
897
           }
892
           if (this.strategyInfo.hasapp) {
898
           if (this.strategyInfo.hasapp) {
893
             //回显应用策略
899
             //回显应用策略
907
               item.enabled = obj.enabled;
913
               item.enabled = obj.enabled;
908
             });
914
             });
909
           }
915
           }
910
-          if (this.strategyInfo.hastime) {
911
-            this.strategyInfo.padWifis = res.obj.padWifis;
916
+          if (this.strategyInfo.padWifis) {
917
+            this.strategyInfo.padWifis = res.obj.padWifis || [];
912
           }
918
           }
913
           if (this.strategyInfo.hasviolate) {
919
           if (this.strategyInfo.hasviolate) {
914
             //回显违规处理
920
             //回显违规处理

+ 29
- 13
src/views/schoolSection/userManage/userManage.vue View File

1
 <template>
1
 <template>
2
   <div class="main_root">
2
   <div class="main_root">
3
     <div class="schoolInfo">
3
     <div class="schoolInfo">
4
-      <div class="schoolname">{{ schoolInfo.name }}</div>
4
+      <div
5
+        class="schoolname"
6
+        :class="[
7
+          curClass.id === schoolInfo.id && curClass.type === schoolInfo.type
8
+            ? 'active'
9
+            : ''
10
+        ]"
11
+        @click="selectClass(schoolInfo)"
12
+      >
13
+        {{ schoolInfo.name }}
14
+      </div>
5
       <div class="class_list">
15
       <div class="class_list">
6
         <div v-for="item in schoolInfo.children" :key="item.id">
16
         <div v-for="item in schoolInfo.children" :key="item.id">
7
           <div
17
           <div
8
-            :class="[curClass.id === item.id ? 'active' : '']"
18
+            :class="[
19
+              curClass.id === item.id && curClass.type === item.type
20
+                ? 'active'
21
+                : ''
22
+            ]"
9
             :title="item.name"
23
             :title="item.name"
10
             @click="selectClass(item)"
24
             @click="selectClass(item)"
11
           >
25
           >
54
             >
68
             >
55
           </Select>
69
           </Select>
56
           <Input
70
           <Input
57
-            v-model="searchForm.appName"
58
-            placeholder="请输入名"
71
+            v-model="searchForm.username"
72
+            placeholder="请输入名"
59
             search
73
             search
60
             @on-search="searchList()"
74
             @on-search="searchList()"
61
             style="width: 150px"
75
             style="width: 150px"
394
       ],
408
       ],
395
       curClass: {
409
       curClass: {
396
         id: 0,
410
         id: 0,
411
+        type: 1,
397
         name: ""
412
         name: ""
398
       },
413
       },
399
       addInfo: {
414
       addInfo: {
750
         this.showLoading = false;
765
         this.showLoading = false;
751
         if (res.code === 0) {
766
         if (res.code === 0) {
752
           this.schoolInfo = res.obj;
767
           this.schoolInfo = res.obj;
753
-          if (this.schoolInfo.children.length > 0) {
754
-            this.curClass = this.schoolInfo.children[0];
755
-          }
768
+          this.curClass = res.obj;
756
         } else {
769
         } else {
757
           this.$Message.error(res.msg);
770
           this.$Message.error(res.msg);
758
         }
771
         }
777
     // 获取列表
790
     // 获取列表
778
     getList() {
791
     getList() {
779
       this.showLoading = true;
792
       this.showLoading = true;
780
-      console.log(this.powerParams)
793
+      console.log(this.powerParams);
781
       user_list({
794
       user_list({
782
         rtype: this.powerParams.rtype,
795
         rtype: this.powerParams.rtype,
783
         objectid: this.powerParams.objectid,
796
         objectid: this.powerParams.objectid,
784
         schoolid: this.powerParams.objectid,
797
         schoolid: this.powerParams.objectid,
785
         page: this.searchForm.page,
798
         page: this.searchForm.page,
786
         size: this.searchForm.size,
799
         size: this.searchForm.size,
787
-        classid: this.curClass.id,
800
+        classid: this.curClass.type === 2 ? this.curClass.id : null,
788
         care: this.searchForm.care,
801
         care: this.searchForm.care,
789
         enabled: this.searchForm.enabled,
802
         enabled: this.searchForm.enabled,
790
         control: this.searchForm.control,
803
         control: this.searchForm.control,
812
   display: flex;
825
   display: flex;
813
   .schoolInfo {
826
   .schoolInfo {
814
     width: 200px;
827
     width: 200px;
828
+    flex: none;
815
     border-radius: 15px;
829
     border-radius: 15px;
816
     margin-right: 16px;
830
     margin-right: 16px;
817
     height: 100%;
831
     height: 100%;
832
+    overflow-y: auto;
818
     padding: 10px;
833
     padding: 10px;
819
     background-color: white;
834
     background-color: white;
820
     .schoolname {
835
     .schoolname {
822
       line-height: 40px;
837
       line-height: 40px;
823
       font-weight: bold;
838
       font-weight: bold;
824
       text-align: center;
839
       text-align: center;
840
+      cursor: pointer;
825
     }
841
     }
826
     .class_list {
842
     .class_list {
827
       div {
843
       div {
830
         text-align: center;
846
         text-align: center;
831
         cursor: pointer;
847
         cursor: pointer;
832
       }
848
       }
833
-      .active {
834
-        border-radius: 6px;
835
-        background: #dbeeff;
836
-      }
849
+    }
850
+    .active {
851
+      border-radius: 6px;
852
+      background: #dbeeff;
837
     }
853
     }
838
   }
854
   }
839
   .user_list {
855
   .user_list {

Loading…
Cancel
Save