Browse Source

应用分组

gzb
guozhongbo 10 months ago
parent
commit
50f80bf1fb

+ 18
- 16
src/api/appgroup.js View File

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

+ 104
- 72
src/views/regionSection/applicationManage/applicationGroup.vue View File

3
     <div class="search_header">
3
     <div class="search_header">
4
       <div class="search_left">
4
       <div class="search_left">
5
         <Input
5
         <Input
6
-          v-model="searchForm.name"
6
+          v-model="searchForm.appgroupName"
7
           placeholder="请输入名称"
7
           placeholder="请输入名称"
8
           search
8
           search
9
           @on-search="searchList()"
9
           @on-search="searchList()"
14
     </div>
14
     </div>
15
     <div class="table_wrap">
15
     <div class="table_wrap">
16
       <Table :columns="columns" :data="searchForm.list">
16
       <Table :columns="columns" :data="searchForm.list">
17
-        <template slot-scope="{ row }" slot="createtimeSlot">
18
-          <div>{{ date_format(row.createtime) }}</div>
19
-        </template>
20
-        <template slot-scope="{ row }" slot="updatetimeSlot">
21
-          <div>{{ date_format(row.updatetime) }}</div>
17
+        <template slot-scope="{ row }" slot="iconPath">
18
+          <div class="iconPath" v-if="row.iconPath">
19
+            <img :src="$api.showImageUrl + row.iconPath" />
20
+          </div>
22
         </template>
21
         </template>
23
         <template slot-scope="{ row }" slot="actionSlot">
22
         <template slot-scope="{ row }" slot="actionSlot">
24
           <div class="action_list">
23
           <div class="action_list">
25
             <div @click="toView(row)">查看</div>
24
             <div @click="toView(row)">查看</div>
26
             <div @click="toEdit(row)">编辑</div>
25
             <div @click="toEdit(row)">编辑</div>
27
             <div class="action_del" @click="toDel(row)">删除</div>
26
             <div class="action_del" @click="toDel(row)">删除</div>
28
-
29
           </div>
27
           </div>
30
         </template>
28
         </template>
31
       </Table>
29
       </Table>
48
       class="modal1 application"
46
       class="modal1 application"
49
       :mask-closable="false"
47
       :mask-closable="false"
50
       v-model="wallpaperInfo.show"
48
       v-model="wallpaperInfo.show"
51
-      :title="wallpaperInfo.id ? '编辑' : '新建'"
49
+      :title="wallpaperInfo.appgroupid ? '编辑' : '新建'"
52
     >
50
     >
53
       <Form
51
       <Form
54
         ref="addForm"
52
         ref="addForm"
87
             />
85
             />
88
           </div>
86
           </div>
89
         </FormItem>
87
         </FormItem>
88
+        <FormItem label="排序" prop="appgroupOrder">
89
+          <InputNumber
90
+            placeholder="请输入排序"
91
+            v-model="wallpaperInfo.appgroupOrder"
92
+            :min="1"
93
+          />
94
+        </FormItem>
90
         <FormItem label="描述信息" style="width: 100%">
95
         <FormItem label="描述信息" style="width: 100%">
91
           <Input
96
           <Input
92
             v-model="wallpaperInfo.comm"
97
             v-model="wallpaperInfo.comm"
115
         style="border: 1px solid #e8eaec; border-bottom: none"
120
         style="border: 1px solid #e8eaec; border-bottom: none"
116
         :columns="viewInfo.columns"
121
         :columns="viewInfo.columns"
117
         :data="viewInfo.list"
122
         :data="viewInfo.list"
118
-      ></Table>
123
+      >
124
+      </Table>
119
       <div slot="footer" style="text-align: center">
125
       <div slot="footer" style="text-align: center">
120
         <Button @click="viewInfo.show = false">关闭</Button>
126
         <Button @click="viewInfo.show = false">关闭</Button>
121
       </div>
127
       </div>
130
 <script>
136
 <script>
131
 import { date_format } from "@/utils";
137
 import { date_format } from "@/utils";
132
 import axios from "axios";
138
 import axios from "axios";
133
-import {appgroup_add} from "@/api/appgroup";
139
+import {
140
+  appgroup_add,
141
+  appgroup_delete,
142
+  appgroup_edit,
143
+  appgroup_list
144
+} from "@/api/appgroup";
134
 export default {
145
 export default {
135
   data() {
146
   data() {
136
     return {
147
     return {
137
       date_format,
148
       date_format,
138
       showLoading: false,
149
       showLoading: false,
139
       searchForm: {
150
       searchForm: {
140
-        showDrop: false,
141
-        dropList: [],
142
-        areaname: "",
143
-        areaid: null,
144
-        state: 0,
151
+        appgroupName: "",
145
         page: 1,
152
         page: 1,
146
         size: 10,
153
         size: 10,
147
         list: [],
154
         list: [],
150
       // 新建/编辑
157
       // 新建/编辑
151
       wallpaperInfo: {
158
       wallpaperInfo: {
152
         show: false,
159
         show: false,
153
-        id: null,
160
+        appgroupid: null,
154
         appgroupName: "",
161
         appgroupName: "",
162
+        appgroupOrder: 1,
155
         iconPath: "",
163
         iconPath: "",
156
         comm: ""
164
         comm: ""
157
       },
165
       },
185
         ]
193
         ]
186
       },
194
       },
187
       rules: {
195
       rules: {
188
-        areaname: [
196
+        appgroupName: [
189
           {
197
           {
190
             required: true,
198
             required: true,
191
             message: "请输入名称",
199
             message: "请输入名称",
200
           width: 70,
208
           width: 70,
201
           render: (h, params) => {
209
           render: (h, params) => {
202
             return h(
210
             return h(
203
-                "span",
204
-                params.index +
211
+              "span",
212
+              params.index +
205
                 (this.searchForm.page - 1) * this.searchForm.size +
213
                 (this.searchForm.page - 1) * this.searchForm.size +
206
                 1
214
                 1
207
             );
215
             );
209
         },
217
         },
210
         {
218
         {
211
           title: "名称",
219
           title: "名称",
212
-          key: "createname",
220
+          key: "appgroupName",
213
           align: "center"
221
           align: "center"
214
         },
222
         },
215
         {
223
         {
216
           title: "图标",
224
           title: "图标",
217
-          slot: "createtimeSlot",
225
+          slot: "iconPath",
218
           width: 190,
226
           width: 190,
219
           align: "center"
227
           align: "center"
220
         },
228
         },
221
         {
229
         {
222
           title: "创建人",
230
           title: "创建人",
223
-          key: "updatename",
231
+          key: "createname",
224
           width: 140,
232
           width: 140,
225
           align: "center"
233
           align: "center"
226
         },
234
         },
227
         {
235
         {
228
           title: "创建时间",
236
           title: "创建时间",
229
-          slot: "updatetimeSlot",
237
+          key: "createtime",
230
           width: 190,
238
           width: 190,
231
           align: "center"
239
           align: "center"
232
         },
240
         },
238
         },
246
         },
239
         {
247
         {
240
           title: "操作时间",
248
           title: "操作时间",
241
-          slot: "updatetimeSlot",
249
+          key: "updatetime",
242
           width: 190,
250
           width: 190,
243
           align: "center"
251
           align: "center"
244
         },
252
         },
251
       ]
259
       ]
252
     };
260
     };
253
   },
261
   },
254
-  created() {
262
+  mounted() {
255
     this.searchList();
263
     this.searchList();
256
   },
264
   },
257
   methods: {
265
   methods: {
258
     upLoadUserpic(file) {
266
     upLoadUserpic(file) {
259
-      let size = file.size / 1024 / 1024;
260
       let str = file.name.split(".");
267
       let str = file.name.split(".");
261
       let suffix = str[str.length - 1];
268
       let suffix = str[str.length - 1];
262
       suffix = suffix.toLowerCase();
269
       suffix = suffix.toLowerCase();
283
             this.$Message.error(res.data.msg);
290
             this.$Message.error(res.data.msg);
284
           }
291
           }
285
         })
292
         })
286
-        .catch((err) => {
293
+        .catch(() => {
287
           this.showLoading = false;
294
           this.showLoading = false;
288
           this.$Message.error("图片上传失败");
295
           this.$Message.error("图片上传失败");
289
         });
296
         });
308
     },
315
     },
309
     // 获取列表
316
     // 获取列表
310
     getList() {
317
     getList() {
311
-      this.searchForm.list = [
312
-        {
313
-          id: 1,
314
-          areaname: "区域一",
315
-          createname: "区域一",
316
-          createtime: 1710838418,
317
-          updatename: "区域一",
318
-          updatetime: 1710838430
319
-        },
320
-        {
321
-          id: 2,
322
-          areaname: "区域二",
323
-          createname: "区域一",
324
-          createtime: 1710838418,
325
-          updatename: "区域一",
326
-          updatetime: 1710838430
327
-        },
328
-        {
329
-          id: 3,
330
-          areaname: "区域三",
331
-          createname: "区域一",
332
-          createtime: 1710838418,
333
-          updatename: "区域一",
334
-          updatetime: 1710838430
318
+      appgroup_list({
319
+        page: this.searchForm.page,
320
+        size: this.searchForm.size,
321
+        appgroupName: this.searchForm.appgroupName
322
+      }).then((res) => {
323
+        if (res.code === 0) {
324
+          this.searchForm.list = res.obj.data;
325
+          this.searchForm.total = res.obj.total;
326
+        } else {
327
+          this.$Message.error(res.msg);
335
         }
328
         }
336
-      ];
337
-      this.searchForm.total = 3;
329
+      });
338
     },
330
     },
339
     // 新建
331
     // 新建
340
     toAdd() {
332
     toAdd() {
341
       this.wallpaperInfo = {
333
       this.wallpaperInfo = {
342
         show: true,
334
         show: true,
343
-        id: null,
335
+        appgroupid: null,
344
         appgroupName: "",
336
         appgroupName: "",
345
         iconPath: "",
337
         iconPath: "",
338
+        appgroupOrder: Number(this.searchForm.total) + 1,
346
         comm: ""
339
         comm: ""
347
       };
340
       };
348
       this.$refs.addForm.resetFields();
341
       this.$refs.addForm.resetFields();
356
             return;
349
             return;
357
           }
350
           }
358
           this.wallpaperInfo.show = false;
351
           this.wallpaperInfo.show = false;
359
-          console.log(this.wallpaperInfo)
360
-          appgroup_add({appgroupName:this.wallpaperInfo.appgroupName,
361
-            iconPath:this.wallpaperInfo.iconPath,
362
-            comm:this.wallpaperInfo.comm,}).then(res=>{
363
-              if(res.code === 0){
364
-                  console.log(res.obj)
365
-              }else {
366
-                this.$Message.error(res.msg)
367
-              }
368
-          })
352
+          let api = this.wallpaperInfo.appgroupid
353
+            ? appgroup_edit
354
+            : appgroup_add;
355
+          let form = {
356
+            appgroupName: this.wallpaperInfo.appgroupName,
357
+            iconPath: this.wallpaperInfo.iconPath,
358
+            comm: this.wallpaperInfo.comm,
359
+            appgroupOrder: this.wallpaperInfo.appgroupOrder
360
+          };
361
+          //编辑
362
+          if (this.wallpaperInfo.appgroupid) {
363
+            form.appgroupid = this.wallpaperInfo.appgroupid;
364
+            form.rversion = this.wallpaperInfo.rversion;
365
+          }
366
+          api(form).then((res) => {
367
+            if (res.code === 0) {
368
+              this.$Message.success(res.msg);
369
+              this.searchList();
370
+            } else {
371
+              this.$Message.error(res.msg);
372
+            }
373
+          });
369
         }
374
         }
370
       });
375
       });
371
     },
376
     },
372
-    //进入
373
-    toGo(row) {},
374
     // 查看
377
     // 查看
375
     toView() {
378
     toView() {
376
       this.viewInfo.show = true;
379
       this.viewInfo.show = true;
393
       this.$refs.addForm.resetFields();
396
       this.$refs.addForm.resetFields();
394
       this.wallpaperInfo = {
397
       this.wallpaperInfo = {
395
         show: true,
398
         show: true,
396
-        id: row.id,
397
         appgroupName: row.appgroupName,
399
         appgroupName: row.appgroupName,
398
         iconPath: row.iconPath,
400
         iconPath: row.iconPath,
399
-        comm: row.comm
401
+        comm: row.comm,
402
+        appgroupid: row.appgroupid,
403
+        rversion: row.rversion,
404
+        appgroupOrder: row.appgroupOrder
400
       };
405
       };
401
     },
406
     },
402
     // 删除
407
     // 删除
403
-    toDel() {
408
+    toDel(row) {
404
       this.$Modal.confirm({
409
       this.$Modal.confirm({
405
         title: "提示",
410
         title: "提示",
406
         content: "您确定删除选中数据吗?",
411
         content: "您确定删除选中数据吗?",
407
-        onOk: () => {},
412
+        onOk: () => {
413
+          appgroup_delete({
414
+            appgroupid: row.appgroupid,
415
+            rversion: row.rversion
416
+          }).then((res) => {
417
+            if (res.code === 0) {
418
+              this.$Message.success(res.msg);
419
+              this.searchList();
420
+            } else {
421
+              this.$Message.error(res.msg);
422
+            }
423
+          });
424
+        },
408
         onCancel: () => {}
425
         onCancel: () => {}
409
       });
426
       });
410
-    },
411
-
427
+    }
412
   }
428
   }
413
 };
429
 };
414
 </script>
430
 </script>
479
     }
495
     }
480
   }
496
   }
481
 }
497
 }
498
+.table_wrap {
499
+  .iconPath {
500
+    width: 60px;
501
+    height: 60px;
502
+    border-radius: 20px;
503
+    border: 1px solid #e5e5e5;
504
+    margin: 10px auto;
505
+    text-align: center;
506
+    padding: 10px;
507
+    img {
508
+      width: 40px;
509
+      height: 40px;
510
+      object-fit: cover;
511
+    }
512
+  }
513
+}
482
 </style>
514
 </style>

+ 43
- 7
src/views/regionSection/applicationManage/applicationManage.vue View File

48
       class="modal1 application"
48
       class="modal1 application"
49
       :mask-closable="false"
49
       :mask-closable="false"
50
       v-model="wallpaperInfo.show"
50
       v-model="wallpaperInfo.show"
51
-      :title="wallpaperInfo.id ? '编辑' : '新建'"
51
+      :title="wallpaperInfo.appid ? '编辑' : '新建'"
52
     >
52
     >
53
       <Form
53
       <Form
54
         ref="addForm"
54
         ref="addForm"
55
         :model="wallpaperInfo"
55
         :model="wallpaperInfo"
56
         :rules="rules"
56
         :rules="rules"
57
-        :label-width="120"
57
+        :label-width="130"
58
         inline
58
         inline
59
       >
59
       >
60
         <FormItem label="名称" prop="areaname" style="width: 100%">
60
         <FormItem label="名称" prop="areaname" style="width: 100%">
333
 <script>
333
 <script>
334
 import { date_format } from "@/utils";
334
 import { date_format } from "@/utils";
335
 import axios from "axios";
335
 import axios from "axios";
336
+import {appgroup_list} from "@/api/appgroup";
336
 export default {
337
 export default {
337
   data() {
338
   data() {
338
     return {
339
     return {
352
       // 新建/编辑
353
       // 新建/编辑
353
       wallpaperInfo: {
354
       wallpaperInfo: {
354
         show: true,
355
         show: true,
355
-        id: null,
356
+        appid: null,
356
         appName: "",
357
         appName: "",
357
         appgroupid: "",
358
         appgroupid: "",
358
         appState: 1,
359
         appState: 1,
486
     };
487
     };
487
   },
488
   },
488
   created() {
489
   created() {
490
+    this.init();
489
     this.searchList();
491
     this.searchList();
490
   },
492
   },
491
   methods: {
493
   methods: {
494
+    init(){
495
+      //获取分组列表
496
+      appgroup_list({
497
+        page: 1,
498
+        size: 100,
499
+        appgroupName: ""
500
+      }).then((res) => {
501
+        if (res.code === 0) {
502
+          this.group_list = res.obj;
503
+        } else {
504
+          this.$Message.error(res.msg);
505
+        }
506
+      });
507
+    },
492
     getSchool() {},
508
     getSchool() {},
493
     //gengx
509
     //gengx
494
     toRenew(row) {
510
     toRenew(row) {
585
     toAdd() {
601
     toAdd() {
586
       this.wallpaperInfo = {
602
       this.wallpaperInfo = {
587
         show: true,
603
         show: true,
588
-        id: null,
589
-        appgroupName: "",
590
-        iconPath: "",
591
-        comm: ""
604
+        appid: null,
605
+        appName: "",
606
+        appgroupid: "",
607
+        appState: 1,
608
+        appType: 1,
609
+        forced: 1,
610
+        whited: 1,
611
+        trusted: 1,
612
+        showico: 1,
613
+        cached: 1,
614
+        strategy: 1,
615
+        apkPath: "",
616
+        appIcon: "",
617
+        appImg: "",
618
+        versionName: "",
619
+        versionNum: "",
620
+        appSize: "",
621
+        appDeveloper: "",
622
+        uniqueCode: "",
623
+        appAbbr: "",
624
+        appRenew: "",
625
+        targetSchool: 1,
626
+        deviceids: [],
627
+        schoolids: []
592
       };
628
       };
593
       this.$refs.addForm.resetFields();
629
       this.$refs.addForm.resetFields();
594
     },
630
     },

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

193
     </Modal>
193
     </Modal>
194
     <!-- 查看 -->
194
     <!-- 查看 -->
195
     <Modal
195
     <Modal
196
-      class="modal1"
196
+      class="modal1 see"
197
       :mask-closable="false"
197
       :mask-closable="false"
198
       v-model="viewInfo.show"
198
       v-model="viewInfo.show"
199
       title="查看"
199
       title="查看"
232
   admin_edit,
232
   admin_edit,
233
   admin_delete,
233
   admin_delete,
234
   admin_enable,
234
   admin_enable,
235
-  admin_disabled, admin_list_qy, admin_detail
235
+  admin_disabled,
236
+  admin_list_qy,
237
+  admin_detail
236
 } from "@/api/admin";
238
 } from "@/api/admin";
237
 import { region_list_sel_pt } from "@/api/region";
239
 import { region_list_sel_pt } from "@/api/region";
238
 import { login_msg_code } from "@/api/login";
240
 import { login_msg_code } from "@/api/login";
243
     // 密码验证
245
     // 密码验证
244
     const pwdCheck = (rule, value, callback) => {
246
     const pwdCheck = (rule, value, callback) => {
245
       if (!reg.test(this.adminInfo.loginpwd)) {
247
       if (!reg.test(this.adminInfo.loginpwd)) {
246
-        return callback(
247
-            new Error("密码格式不正确!")
248
-        );
248
+        return callback(new Error("密码格式不正确!"));
249
       } else {
249
       } else {
250
         callback();
250
         callback();
251
       }
251
       }
253
     // 重复密码验证
253
     // 重复密码验证
254
     const pwdAgainCheck = async (rule, value, callback) => {
254
     const pwdAgainCheck = async (rule, value, callback) => {
255
       if (!reg.test(this.adminInfo.loginpwd1)) {
255
       if (!reg.test(this.adminInfo.loginpwd1)) {
256
-        return callback(
257
-            new Error("密码格式不正确!")
258
-        );
256
+        return callback(new Error("密码格式不正确!"));
259
       } else if (this.adminInfo.loginpwd != this.adminInfo.loginpwd1) {
257
       } else if (this.adminInfo.loginpwd != this.adminInfo.loginpwd1) {
260
         return callback(new Error("两次输入密码不一致!"));
258
         return callback(new Error("两次输入密码不一致!"));
261
       } else {
259
       } else {
417
   },
415
   },
418
   created() {
416
   created() {
419
     this.userInfo = JSON.parse(
417
     this.userInfo = JSON.parse(
420
-        localStorage.getItem("xh_control_userInfo")
418
+      localStorage.getItem("xh_control_userInfo")
421
     ).content;
419
     ).content;
422
     this.getSearchRegionList();
420
     this.getSearchRegionList();
423
     this.searchList();
421
     this.searchList();
461
         if (data.code === 0) {
459
         if (data.code === 0) {
462
           this.searchForm.list = data.obj.data;
460
           this.searchForm.list = data.obj.data;
463
           this.searchForm.total = data.obj.total;
461
           this.searchForm.total = data.obj.total;
464
-          console.log(this.searchForm.list)
462
+          console.log(this.searchForm.list);
465
         } else {
463
         } else {
466
           this.$Message.error(data.msg);
464
           this.$Message.error(data.msg);
467
         }
465
         }
531
           ) {
529
           ) {
532
             const reg = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,32}$/;
530
             const reg = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,32}$/;
533
             if (!reg.test(this.adminInfo.loginpwd)) {
531
             if (!reg.test(this.adminInfo.loginpwd)) {
534
-              this.$Message.error(
535
-                "密码格式不正确!"
536
-              );
532
+              this.$Message.error("密码格式不正确!");
537
               return;
533
               return;
538
             }
534
             }
539
             if (this.adminInfo.loginpwd != this.adminInfo.loginpwd1) {
535
             if (this.adminInfo.loginpwd != this.adminInfo.loginpwd1) {
594
     },
590
     },
595
     // 编辑
591
     // 编辑
596
     toEdit(row) {
592
     toEdit(row) {
597
-      admin_detail({adminid:row.adminid}).then(res=>{
598
-        if(res.code === 0){
593
+      admin_detail({ adminid: row.adminid }).then((res) => {
594
+        if (res.code === 0) {
599
           this.adminInfo = {
595
           this.adminInfo = {
600
             show: true,
596
             show: true,
601
             timer: null,
597
             timer: null,
611
             regionid: res.obj.regionid,
607
             regionid: res.obj.regionid,
612
             rversion: row.rversion
608
             rversion: row.rversion
613
           };
609
           };
614
-          console.log( this.adminInfo)
615
-        }else {
616
-          this.$Message.error(res.msg)
610
+          console.log(this.adminInfo);
611
+        } else {
612
+          this.$Message.error(res.msg);
617
         }
613
         }
618
-      })
619
-
614
+      });
620
     },
615
     },
621
     // 删除
616
     // 删除
622
     toDel(row) {
617
     toDel(row) {
717
     background-color: #fee8ec;
712
     background-color: #fee8ec;
718
   }
713
   }
719
 }
714
 }
715
+.see {
716
+  /deep/ .ivu-form-item-content {
717
+    line-height: 36px;
718
+  }
719
+}
720
 </style>
720
 </style>

+ 6
- 12
src/views/regionSection/regionManage/schoolManage.vue View File

517
         this.searchForm.marketid = "";
517
         this.searchForm.marketid = "";
518
         this.searchForm.regionList = [];
518
         this.searchForm.regionList = [];
519
         this.searchForm.areaCode = "";
519
         this.searchForm.areaCode = "";
520
+        this.searchList(arr[0]);
520
       } else {
521
       } else {
521
         this.marketList = arr[0].childList;
522
         this.marketList = arr[0].childList;
522
         this.adminInfo.marketid = "";
523
         this.adminInfo.marketid = "";
533
         let arr = this.searchForm.marketList.filter((v) => v.areaCode === id);
534
         let arr = this.searchForm.marketList.filter((v) => v.areaCode === id);
534
         this.searchForm.regionList = arr[0].childList;
535
         this.searchForm.regionList = arr[0].childList;
535
         this.searchForm.areaCode = "";
536
         this.searchForm.areaCode = "";
537
+        this.searchList(arr[0]);
536
       } else {
538
       } else {
537
         let arr = this.marketList.filter((v) => v.areaCode === id);
539
         let arr = this.marketList.filter((v) => v.areaCode === id);
538
         this.regionList = arr[0].childList;
540
         this.regionList = arr[0].childList;
544
       if (!this.searchForm.areaCode) {
546
       if (!this.searchForm.areaCode) {
545
         return;
547
         return;
546
       }
548
       }
547
-      let obj = this.searchForm.regionList.filter(
548
-        (v) => v.areaCode === this.searchForm.areaCode
549
-      )[0];
550
-      console.log(obj);
551
-      this.searchForm.areaName = obj.areaAll;
552
       this.searchList();
549
       this.searchList();
553
     },
550
     },
554
     getAreaList() {
551
     getAreaList() {
555
       area_list_sel({}).then((res) => {
552
       area_list_sel({}).then((res) => {
556
         if (res.code === 0) {
553
         if (res.code === 0) {
557
-          console.log(res.obj);
558
           this.areaList = res.obj;
554
           this.areaList = res.obj;
559
         } else {
555
         } else {
560
           this.$Message.error(res.msg);
556
           this.$Message.error(res.msg);
572
       });
568
       });
573
     },
569
     },
574
     // 搜索
570
     // 搜索
575
-    searchList() {
571
+    searchList(obj) {
576
       this.searchForm.page = 1;
572
       this.searchForm.page = 1;
577
-      this.getList();
573
+      this.getList(obj);
578
     },
574
     },
579
     // 页码改变
575
     // 页码改变
580
     pageChange(page) {
576
     pageChange(page) {
588
       this.getList();
584
       this.getList();
589
     },
585
     },
590
     // 获取列表
586
     // 获取列表
591
-    getList() {
587
+    getList(obj) {
592
       school_list({
588
       school_list({
593
         page: this.searchForm.page,
589
         page: this.searchForm.page,
594
         size: this.searchForm.size,
590
         size: this.searchForm.size,
595
-        areaCode: this.searchForm.areaCode,
591
+        areaCode: obj && obj.areaCode?obj.areaCode:this.searchForm.areaCode,
596
         schoolName: this.searchForm.schoolName,
592
         schoolName: this.searchForm.schoolName,
597
         regionid: this.searchForm.regionid
593
         regionid: this.searchForm.regionid
598
       }).then((data) => {
594
       }).then((data) => {
726
               msgcode: this.adminInfo.admin.msgcode
722
               msgcode: this.adminInfo.admin.msgcode
727
             };
723
             };
728
           }
724
           }
729
-          console.log(form);
730
           api(form).then((data) => {
725
           api(form).then((data) => {
731
             if (data.code === 0) {
726
             if (data.code === 0) {
732
               this.searchList();
727
               this.searchList();
771
             createAdmin: false,
766
             createAdmin: false,
772
             admin: {}
767
             admin: {}
773
           };
768
           };
774
-          console.log(this.adminInfo);
775
         } else {
769
         } else {
776
           this.$Message.error(res.msg);
770
           this.$Message.error(res.msg);
777
         }
771
         }

Loading…
Cancel
Save