Преглед изворни кода

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

gzb
wangzhonglu пре 9 месеци
родитељ
комит
db616987d9

+ 0
- 15
src/views/regionSection/applicationManage/applicationManage.vue Прегледај датотеку

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

+ 224
- 33
src/views/schoolSection/applicationManage/applicationList.vue Прегледај датотеку

@@ -287,7 +287,7 @@
287 287
               </uploader>
288 288
             </div>
289 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 291
                 <div class="file_name" :title="wallpaperInfo.appPackage">
292 292
                   <div class="show_name">
293 293
                     {{ wallpaperInfo.appPackage }}
@@ -488,7 +488,7 @@
488 488
               :src="$api.showImageUrl + viewInfo.appIcon"
489 489
             />
490 490
           </div>
491
-          <div class="appIcon" @click="download(viewInfo.appIcon)">
491
+          <div class="appIcon" @click="download(viewInfo.apkPath)">
492 492
             <Icon type="md-download" />下载
493 493
           </div>
494 494
         </div>
@@ -499,7 +499,20 @@
499 499
               }}<span v-if="viewInfo.enabled === 1" class="qy">启用</span>
500 500
             </div>
501 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 516
             </div>
504 517
           </div>
505 518
           <div class="view_comm">
@@ -594,6 +607,44 @@
594 607
         <Button @click="viewInfo.show = false">关闭</Button>
595 608
       </div>
596 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 648
     <Spin fix v-if="showLoading" style="background-color: transparent">
598 649
       <Icon type="ios-loading" size="18" class="demo-spin-icon-load"></Icon>
599 650
       <div>加载中</div>
@@ -609,9 +660,11 @@ import {
609 660
   app_add,
610 661
   app_delete,
611 662
   app_detail,
663
+  app_detail_history,
612 664
   app_edit,
613 665
   app_edit_enable,
614 666
   app_edit_unenable,
667
+  app_install_statistic,
615 668
   app_list,
616 669
   appgroup_list,
617 670
   device_list
@@ -764,6 +817,46 @@ export default {
764 817
       select_schools: [],
765 818
       deviceids: {}, //设备类型
766 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 860
       deviceInfo: {
768 861
         show: false,
769 862
         appName: "",
@@ -856,6 +949,21 @@ export default {
856 949
     download(url) {
857 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 968
     toView(row) {
861 969
       app_detail({
@@ -866,6 +974,7 @@ export default {
866 974
         if (res.code === 0) {
867 975
           this.viewInfo = {
868 976
             show: true,
977
+            apphistorys: res.obj.apphistorys,
869 978
             appName: res.obj.appName,
870 979
             appgroupName: row.appgroupName,
871 980
             enabled: res.obj.enabled,
@@ -931,41 +1040,107 @@ export default {
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 1064
       console.log(row);
936 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 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,7 +1579,7 @@ export default {
1404 1579
     display: flex;
1405 1580
     margin: 16px 0;
1406 1581
     .app_logo {
1407
-      flex-wrap: none;
1582
+      flex: none;
1408 1583
       width: 56px;
1409 1584
       height: 56px;
1410 1585
       border-radius: 20px;
@@ -1465,7 +1640,6 @@ export default {
1465 1640
 }
1466 1641
 .view_devices {
1467 1642
   .view_list {
1468
-    margin-bottom: 20px;
1469 1643
     line-height: 32px;
1470 1644
   }
1471 1645
   .dgname {
@@ -1692,4 +1866,21 @@ export default {
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 1886
 </style>

+ 9
- 13
src/views/schoolSection/strategy/personalStrategy.vue Прегледај датотеку

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

+ 12
- 12
src/views/schoolSection/strategy/publicStrategy.vue Прегледај датотеку

@@ -36,7 +36,11 @@
36 36
             <div class="day" v-for="item in weeks" :key="item.id">
37 37
               <div class="day_title">{{ item.title }}</div>
38 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 44
                   {{ getTime(sitem.starttime) }}-{{ getTime(sitem.stoptime) }}
41 45
                 </div>
42 46
               </div>
@@ -164,7 +168,7 @@
164 168
       </div>
165 169
       <div class="nodata" v-else>未设置Wifi白名单</div>
166 170
     </div>
167
-    <div class="strategy_list">
171
+    <div class="strategy_list" style="padding-bottom: 16px">
168 172
       <div class="strategy_title">
169 173
         <div>
170 174
           <span class="ivu-icon iconfont icon-weiguiguanli"></span>违规处理
@@ -233,12 +237,7 @@
233 237
       v-model="stPadInfo.show"
234 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 241
         <template slot-scope="{ row }" slot="active">
243 242
           <Radio @on-change="stPadChange(row)" v-model="row.checked"></Radio>
244 243
         </template>
@@ -535,7 +534,6 @@ export default {
535 534
           }
536 535
           this.curState = 2; //编辑状态
537 536
           this.stPadInfo.show = false;
538
-          console.log(this.stPadInfo);
539 537
         } else {
540 538
           this.$Message.error(res.msg);
541 539
         }
@@ -694,7 +692,6 @@ export default {
694 692
         form.rversion = this.strategyInfo.rversion;
695 693
       }
696 694
       let api = hasSave ? stPad_edit : stPad_add;
697
-      console.log(hasSave, form);
698 695
       api(form).then((res) => {
699 696
         if (res.code === 0) {
700 697
           this.$Message.success(res.msg);
@@ -741,6 +738,7 @@ export default {
741 738
       this.strategyInfo.padWifis = Array.from(
742 739
         new Set(this.strategyInfo.padWifis)
743 740
       );
741
+      this.ssidName = "";
744 742
     },
745 743
     async detail() {
746 744
       this.showLoading = true;
@@ -796,6 +794,8 @@ export default {
796 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 799
         } else {
800 800
           this.strategyInfo.hastime = false;
801 801
           this.strategyInfo.hasapp = false;
@@ -804,7 +804,6 @@ export default {
804 804
           this.strategyInfo.hasviolate = false;
805 805
         }
806 806
         this.curState = 1; //查看状态
807
-        console.log(this.strategyInfo);
808 807
       } else {
809 808
         this.$Message.error(res.msg);
810 809
       }
@@ -975,7 +974,8 @@ export default {
975 974
     .nodata {
976 975
       color: #798cb5;
977 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 Прегледај датотеку

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

+ 11
- 5
src/views/schoolSection/strategy/strategyTemplate.vue Прегледај датотеку

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

+ 29
- 13
src/views/schoolSection/userManage/userManage.vue Прегледај датотеку

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

Loading…
Откажи
Сачувај