ソースを参照

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

gzb
wangzhonglu 9ヶ月前
コミット
f5566c89b3

+ 1
- 1
public/config.js ファイルの表示

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

+ 72
- 2
src/api/appgroup.js ファイルの表示

@@ -1,6 +1,76 @@
1 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 ファイルの表示

@@ -1,5 +1,12 @@
1 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 11
  * 3.1.1学校--列表
5 12
  */

+ 30
- 0
src/api/up.js ファイルの表示

@@ -0,0 +1,30 @@
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 ファイルの表示

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

+ 84
- 11
src/views/regionSection/regionManage/schoolManage.vue ファイルの表示

@@ -99,7 +99,50 @@
99 99
             placeholder="请输入学校简称"
100 100
           ></Input>
101 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 146
         <FormItem label="地址" style="width: 100%">
104 147
           <Input v-model="adminInfo.address" placeholder="请输入地址"></Input>
105 148
         </FormItem>
@@ -240,19 +283,11 @@
240 283
 </template>
241 284
 
242 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 286
 import { region_list_sel_pt } from "@/api/region";
253 287
 import { login_msg_code } from "@/api/login";
254 288
 import { generateRandomString } from "@/utils";
255 289
 import {
290
+  area_list_sel,
256 291
   school_add,
257 292
   school_delete,
258 293
   school_detail,
@@ -425,6 +460,9 @@ export default {
425 460
           align: "center"
426 461
         }
427 462
       ],
463
+      areaList: [],
464
+      marketList: [],
465
+      regionList: [],
428 466
       userInfo: {}
429 467
     };
430 468
   },
@@ -433,10 +471,41 @@ export default {
433 471
       localStorage.getItem("xh_control_userInfo")
434 472
     ).content;
435 473
     this.getSearchRegionList();
474
+    this.getAreaList()
436 475
     this.searchList();
437 476
   },
438 477
   mounted() {},
439 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 510
     getSearchRegionList() {
442 511
       region_list_sel_pt({}).then((data) => {
@@ -488,6 +557,8 @@ export default {
488 557
         second: 60,
489 558
         schoolid: null,
490 559
         schoolName: "",
560
+        provinceid: "",
561
+        marketid: "",
491 562
         areaCode: "",
492 563
         areaName: "",
493 564
         address: "",
@@ -586,7 +657,6 @@ export default {
586 657
             form.schoolid = this.adminInfo.schoolid;
587 658
             form.rversion = this.adminInfo.rversion;
588 659
           }
589
-          console.log(this.adminInfo);
590 660
           //添加管理员
591 661
           if (this.adminInfo.createAdmin) {
592 662
             form.admin = {
@@ -597,6 +667,7 @@ export default {
597 667
               msgcode: this.adminInfo.admin.msgcode
598 668
             };
599 669
           }
670
+          console.log(form);
600 671
           api(form).then((data) => {
601 672
             if (data.code === 0) {
602 673
               this.searchList();
@@ -620,6 +691,8 @@ export default {
620 691
             second: 0,
621 692
             schoolid: res.obj.schoolid,
622 693
             schoolName: res.obj.schoolName,
694
+            provinceid: "",
695
+            marketid: "",
623 696
             areaCode: res.obj.areaCode,
624 697
             areaName: res.obj.areaName,
625 698
             address: res.obj.address,

読み込み中…
キャンセル
保存