Browse Source

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

gzb
wangzhonglu 9 months ago
parent
commit
f5566c89b3

+ 1
- 1
public/config.js View File

4
       // 测试环境
4
       // 测试环境
5
       baseUrl: "http://49.4.26.249:8331/",
5
       baseUrl: "http://49.4.26.249:8331/",
6
       baseImageUrl: "http://49.4.26.249:8331/",
6
       baseImageUrl: "http://49.4.26.249:8331/",
7
-      showImageUrl: "http://49.4.26.249:8331/",
7
+      showImageUrl: "https://mctest.xhkjedu.com/",
8
       axiosApiTimeout: 60, // 接口超时时间 单位秒
8
       axiosApiTimeout: 60, // 接口超时时间 单位秒
9
       axiosFileTimeout: 120, // 上传文件超时时间 单位秒
9
       axiosFileTimeout: 120, // 上传文件超时时间 单位秒
10
       // 开发者
10
       // 开发者

+ 72
- 2
src/api/appgroup.js View File

1
 import { appgroup_url } from "@/utils/httpRequest";
1
 import { appgroup_url } from "@/utils/httpRequest";
2
 
2
 
3
 /**
3
 /**
4
- * 1.0.1管理员--账号登录
4
+ * 5.1.1 应用分组-列表
5
  */
5
  */
6
-export const admin_login = (data) => appgroup_url("admin/login", data);
6
+export const appgroup_list = (data) => appgroup_url("appgroup/list", data);
7
+
8
+/**
9
+ * 5.1.2 应用分组-添加
10
+ */
11
+export const appgroup_add = (data) => appgroup_url("appgroup/add", data);
12
+
13
+/**
14
+ * 5.1.3 应用分组-更新
15
+ */
16
+export const appgroup_edit = (data) => appgroup_url("appgroup/edit", data);
17
+
18
+/**
19
+ * 5.1.4 应用分组-删除
20
+ */
21
+export const appgroup_delete = (data) => appgroup_url("appgroup/delete", data);
22
+
23
+/**
24
+ * 5.1.5 应用分组-列表-应用商店
25
+ */
26
+export const appgroup_list_app = (data) => appgroup_url("appgroup/list_app", data);
27
+
28
+/**
29
+ * 5.2.1 应用-列表
30
+ */
31
+export const app_list = (data) => appgroup_url("app/list", data);
32
+
33
+/**
34
+ * 5.2.2 应用-添加
35
+ */
36
+export const app_add = (data) => appgroup_url("app/add", data);
37
+
38
+/**
39
+ * 5.2.3 应用-更新
40
+ */
41
+export const app_edit = (data) => appgroup_url("app/edit", data);
42
+
43
+/**
44
+ * 5.2.4 应用-删除
45
+ */
46
+export const app_delete = (data) => appgroup_url("app/delete", data);
47
+
48
+/**
49
+ * 5.2.5 应用-详情
50
+ */
51
+export const app_detail = (data) => appgroup_url("app/detail", data);
52
+
53
+/**
54
+ * 5.2.6 应用-获取应用授权设备型号
55
+ */
56
+export const app_detail_device = (data) => appgroup_url("app/detail_device", data);
57
+
58
+/**
59
+ * 5.2.7 应用-更新应用授权设备型号
60
+ */
61
+export const app_edit_device = (data) => appgroup_url("app/edit_device", data);
62
+
63
+/**
64
+ * 5.2.8 应用-列表-应用商店
65
+ */
66
+export const app_list_app = (data) => appgroup_url("app/list_app", data);
67
+
68
+/**
69
+ * 5.2.9 应用-详情-应用商店
70
+ */
71
+export const app_detail_app = (data) => appgroup_url("app/detail_app", data);
72
+
73
+/**
74
+ * 5.3 设备-列表(分组下设备)
75
+ */
76
+export const device_list = (data) => appgroup_url("device/list", data);

+ 8
- 1
src/api/school.js View File

1
 import { setRequest } from "@/utils/httpRequest";
1
 import { setRequest } from "@/utils/httpRequest";
2
-
2
+/**
3
+ * 省市区--选择列表
4
+ */
5
+export const area_list = (data) => setRequest("area/list", data);
6
+/**
7
+ * 省市区--选择列表
8
+ */
9
+export const area_list_sel = (data) => setRequest("area/list_sel", data);
3
 /**
10
 /**
4
  * 3.1.1学校--列表
11
  * 3.1.1学校--列表
5
  */
12
  */

+ 30
- 0
src/api/up.js View File

1
+import { setRequest } from "@/utils/httpRequest";
2
+/**
3
+ * 10.1 单文件上传
4
+ */
5
+export const up_upfile = (data) => setRequest("up/upfile", data);
6
+
7
+/**
8
+ * 10.2 多文件上传
9
+ */
10
+export const up_upmore = (data) => setRequest("up/upmore", data);
11
+
12
+/**
13
+ * 10.3.1 分片上传-上传分片
14
+ */
15
+export const chunk_up = (data) => setRequest("chunk/up", data);
16
+
17
+/**
18
+ * 10.3.2 分片上传-合并
19
+ */
20
+export const chunk_merge = (data) => setRequest("chunk/merge", data);
21
+
22
+/**
23
+ * 10.3.3 分片上传-合并app
24
+ */
25
+export const chunk_merge_app = (data) => setRequest("chunk/merge_app", data);
26
+
27
+/**
28
+ * 10.4 文件下载
29
+ */
30
+export const dn_down_webfile = (data) => setRequest("dn/down_webfile", data);

+ 3
- 8
src/views/regionSection/applicationManage/applicationGroup.vue View File

255
   },
255
   },
256
   methods: {
256
   methods: {
257
     upLoadUserpic(file) {
257
     upLoadUserpic(file) {
258
-      console.log(file);
259
       let size = file.size / 1024 / 1024;
258
       let size = file.size / 1024 / 1024;
260
       let str = file.name.split(".");
259
       let str = file.name.split(".");
261
       let suffix = str[str.length - 1];
260
       let suffix = str[str.length - 1];
264
         this.$Message.warning("请上传png、jpeg、jpg类型的文件");
263
         this.$Message.warning("请上传png、jpeg、jpg类型的文件");
265
         return false;
264
         return false;
266
       }
265
       }
267
-      if (size > 10) {
268
-        this.$Message.error("图片太大,不能超过5M!");
269
-        return false;
270
-      }
271
       let formData = new FormData();
266
       let formData = new FormData();
272
       formData.append("file", file);
267
       formData.append("file", file);
273
       formData.append("savefolder", "headpic");
268
       formData.append("savefolder", "headpic");
281
         .then((res) => {
276
         .then((res) => {
282
           this.showLoading = false;
277
           this.showLoading = false;
283
           if (res.data.code === 0) {
278
           if (res.data.code === 0) {
284
-            console.log(res.obj);
285
-            this.wallpaperInfo.iconPath = res.obj;
279
+            console.log(res.data.obj);
280
+            this.wallpaperInfo.iconPath = res.data.obj;
286
           } else {
281
           } else {
287
             this.$Message.error(res.data.msg);
282
             this.$Message.error(res.data.msg);
288
           }
283
           }
359
             this.$Message.error("请上传图标!");
354
             this.$Message.error("请上传图标!");
360
             return;
355
             return;
361
           }
356
           }
362
-
363
           this.wallpaperInfo.show = false;
357
           this.wallpaperInfo.show = false;
358
+
364
         }
359
         }
365
       });
360
       });
366
     },
361
     },

+ 84
- 11
src/views/regionSection/regionManage/schoolManage.vue View File

99
             placeholder="请输入学校简称"
99
             placeholder="请输入学校简称"
100
           ></Input>
100
           ></Input>
101
         </FormItem>
101
         </FormItem>
102
-        <FormItem label="省市区" style="width: 100%"> </FormItem>
102
+        <FormItem label="省市区" class="require" style="width: 100%">
103
+          <Select
104
+              :transfer="true"
105
+              v-model="adminInfo.provinceid"
106
+              style="width: 120px"
107
+              placeholder="请选择省份"
108
+              @on-change="provinceChange"
109
+          >
110
+            <Option
111
+                v-for="item in areaList"
112
+                :value="item.areaCode"
113
+                :key="item.areaCode"
114
+            >{{ item.areaName }}</Option
115
+            >
116
+          </Select>
117
+          <Select
118
+              :transfer="true"
119
+              v-model="adminInfo.marketid"
120
+              @on-change="marketChange"
121
+              style="width: 120px;margin: 0 10px"
122
+              placeholder="请选择市"
123
+          >
124
+            <Option
125
+                v-for="item in marketList"
126
+                :value="item.areaCode"
127
+                :key="item.areaCode"
128
+            >{{ item.areaName }}</Option
129
+            >
130
+          </Select>
131
+          <Select
132
+              :transfer="true"
133
+              v-model="adminInfo.areaCode"
134
+              @on-change="regionChange"
135
+              style="width: 120px"
136
+              placeholder="请选择区"
137
+          >
138
+            <Option
139
+                v-for="item in regionList"
140
+                :value="item.areaCode"
141
+                :key="item.areaCode"
142
+            >{{ item.areaName }}</Option
143
+            >
144
+          </Select>
145
+        </FormItem>
103
         <FormItem label="地址" style="width: 100%">
146
         <FormItem label="地址" style="width: 100%">
104
           <Input v-model="adminInfo.address" placeholder="请输入地址"></Input>
147
           <Input v-model="adminInfo.address" placeholder="请输入地址"></Input>
105
         </FormItem>
148
         </FormItem>
240
 </template>
283
 </template>
241
 
284
 
242
 <script>
285
 <script>
243
-import {
244
-  admin_list_pt,
245
-  admin_add,
246
-  admin_edit,
247
-  admin_delete,
248
-  admin_enable,
249
-  admin_disabled,
250
-  admin_list_qy
251
-} from "@/api/admin";
252
 import { region_list_sel_pt } from "@/api/region";
286
 import { region_list_sel_pt } from "@/api/region";
253
 import { login_msg_code } from "@/api/login";
287
 import { login_msg_code } from "@/api/login";
254
 import { generateRandomString } from "@/utils";
288
 import { generateRandomString } from "@/utils";
255
 import {
289
 import {
290
+  area_list_sel,
256
   school_add,
291
   school_add,
257
   school_delete,
292
   school_delete,
258
   school_detail,
293
   school_detail,
425
           align: "center"
460
           align: "center"
426
         }
461
         }
427
       ],
462
       ],
463
+      areaList: [],
464
+      marketList: [],
465
+      regionList: [],
428
       userInfo: {}
466
       userInfo: {}
429
     };
467
     };
430
   },
468
   },
433
       localStorage.getItem("xh_control_userInfo")
471
       localStorage.getItem("xh_control_userInfo")
434
     ).content;
472
     ).content;
435
     this.getSearchRegionList();
473
     this.getSearchRegionList();
474
+    this.getAreaList()
436
     this.searchList();
475
     this.searchList();
437
   },
476
   },
438
   mounted() {},
477
   mounted() {},
439
   methods: {
478
   methods: {
479
+    //选择省份
480
+    provinceChange(){
481
+      let arr = this.areaList.filter(v=>v.areaCode === this.adminInfo.provinceid);
482
+      this.marketList = arr[0].childList;
483
+      this.adminInfo.marketid = "";
484
+      this.regionList = [];
485
+      this.adminInfo.areaCode = "";
486
+    },
487
+    //选择市
488
+    marketChange(){
489
+      let arr = this.marketList.filter(v=>v.areaCode === this.adminInfo.marketid);
490
+      this.regionList = arr[0].childList;
491
+      this.adminInfo.areaCode = "";
492
+    },
493
+    //选中区
494
+    regionChange(){
495
+      let arr = this.regionList.filter(v=>v.areaCode === this.adminInfo.areaCode)[0];
496
+      console.log(arr)
497
+      this.adminInfo.areaName = arr.areaName;
498
+    },
499
+    getAreaList(){
500
+      area_list_sel({}).then(res=>{
501
+        if(res.code === 0){
502
+          console.log(res.obj)
503
+          this.areaList = res.obj;
504
+        }else {
505
+          this.$Message.error(res.msg)
506
+        }
507
+      })
508
+    },
440
     // 获取搜索区域列表
509
     // 获取搜索区域列表
441
     getSearchRegionList() {
510
     getSearchRegionList() {
442
       region_list_sel_pt({}).then((data) => {
511
       region_list_sel_pt({}).then((data) => {
488
         second: 60,
557
         second: 60,
489
         schoolid: null,
558
         schoolid: null,
490
         schoolName: "",
559
         schoolName: "",
560
+        provinceid: "",
561
+        marketid: "",
491
         areaCode: "",
562
         areaCode: "",
492
         areaName: "",
563
         areaName: "",
493
         address: "",
564
         address: "",
586
             form.schoolid = this.adminInfo.schoolid;
657
             form.schoolid = this.adminInfo.schoolid;
587
             form.rversion = this.adminInfo.rversion;
658
             form.rversion = this.adminInfo.rversion;
588
           }
659
           }
589
-          console.log(this.adminInfo);
590
           //添加管理员
660
           //添加管理员
591
           if (this.adminInfo.createAdmin) {
661
           if (this.adminInfo.createAdmin) {
592
             form.admin = {
662
             form.admin = {
597
               msgcode: this.adminInfo.admin.msgcode
667
               msgcode: this.adminInfo.admin.msgcode
598
             };
668
             };
599
           }
669
           }
670
+          console.log(form);
600
           api(form).then((data) => {
671
           api(form).then((data) => {
601
             if (data.code === 0) {
672
             if (data.code === 0) {
602
               this.searchList();
673
               this.searchList();
620
             second: 0,
691
             second: 0,
621
             schoolid: res.obj.schoolid,
692
             schoolid: res.obj.schoolid,
622
             schoolName: res.obj.schoolName,
693
             schoolName: res.obj.schoolName,
694
+            provinceid: "",
695
+            marketid: "",
623
             areaCode: res.obj.areaCode,
696
             areaCode: res.obj.areaCode,
624
             areaName: res.obj.areaName,
697
             areaName: res.obj.areaName,
625
             address: res.obj.address,
698
             address: res.obj.address,

Loading…
Cancel
Save