Bläddra i källkod

区域管理搜索增加所有省份

gzb
guozhongbo 9 månader sedan
förälder
incheckning
cefe34ce30

Binär
src/assets/img/Ellipse.png Visa fil


Binär
src/assets/img/dope.png Visa fil


+ 10
- 0
src/router/region.js Visa fil

@@ -11,6 +11,16 @@ export default {
11 11
     path: "/region/home"
12 12
   },
13 13
   children: [
14
+    {
15
+      path: "personal",
16
+      component: () => import("@/views/regionSection/personal.vue"),
17
+      name: "personal",
18
+      meta: {
19
+        keepAlive: true,
20
+        isAuth: true,
21
+        title: "区域管控-个人中心"
22
+      }
23
+    },
14 24
     {
15 25
       path: "home",
16 26
       component: () => import("@/views/regionSection/home/index.vue"),

+ 29
- 0
src/views/layout.vue Visa fil

@@ -15,6 +15,11 @@
15 15
         <div style="margin-right: 10px" v-else-if="powerParams.rtype === 3">
16 16
           所属学校【{{ belongName }}】
17 17
         </div>
18
+        <div class="dope" v-if="powerParams.rtype != 1">
19
+          <img class="img1" src="../assets/img/dope.png" />
20
+          <img class="img2" src="../assets/img/Ellipse.png" />
21
+          <span class="dopenum">99</span>
22
+        </div>
18 23
         <Dropdown
19 24
           :transfer="true"
20 25
           @on-visible-change="userDropdownVisibleChange"
@@ -78,6 +83,7 @@ export default {
78 83
     userDropdownSelectChange(name) {
79 84
       if (name === "1") {
80 85
         // 个人中心
86
+        this.$router.push("personal");
81 87
       } else if (name === "2") {
82 88
         // 修改密码
83 89
       } else if (name === "3") {
@@ -155,6 +161,29 @@ export default {
155 161
         }
156 162
       }
157 163
     }
164
+    .dope {
165
+      margin: 0 10px;
166
+      cursor: pointer;
167
+      position: relative;
168
+      .img1 {
169
+        width: 26px;
170
+        height: 24px;
171
+      }
172
+      .img2 {
173
+        width: 18px;
174
+        height: 18px;
175
+        position: absolute;
176
+        right: -1px;
177
+        top: -4px;
178
+      }
179
+      .dopenum {
180
+        color: white;
181
+        font-size: 12px;
182
+        position: absolute;
183
+        right: 1px;
184
+        top: -1px;
185
+      }
186
+    }
158 187
   }
159 188
   .layout_main {
160 189
     position: relative;

+ 58
- 0
src/views/regionSection/personal.vue Visa fil

@@ -0,0 +1,58 @@
1
+<template>
2
+  <div class="main_root">
3
+    <div class="personal_list">
4
+      <div class="personal_item" v-for="item in personal_list" :key="item.id">
5
+        <div>{{ item.title }}</div>
6
+      </div>
7
+    </div>
8
+    <div class="content"></div>
9
+  </div>
10
+</template>
11
+
12
+<script>
13
+export default {
14
+  data() {
15
+    return {
16
+      personal_list: [
17
+        {
18
+          id: 1,
19
+          title: "个人信息"
20
+        },
21
+        {
22
+          id: 2,
23
+          title: "最近事件"
24
+        },
25
+        {
26
+          id: 3,
27
+          title: "历史登录"
28
+        }
29
+      ]
30
+    };
31
+  },
32
+  methods: {}
33
+};
34
+</script>
35
+
36
+<style lang="less" scoped>
37
+.main_root {
38
+  background-color: transparent;
39
+  border: navajowhite;
40
+  height: calc(100% - 10px);
41
+  display: flex;
42
+  .personal_list {
43
+    width: 200px;
44
+    height: 100%;
45
+    border-radius: 15px;
46
+    border: 1px solid #e9f0f9;
47
+    background: #ffffff;
48
+    margin-right: 10px;
49
+  }
50
+  .content {
51
+    width: calc(100% - 210px);
52
+    height: 100%;
53
+    border-radius: 15px;
54
+    border: 1px solid #e9f0f9;
55
+    background: #ffffff;
56
+  }
57
+}
58
+</style>

+ 14
- 11
src/views/regionSection/regionManage/schoolManage.vue Visa fil

@@ -23,6 +23,7 @@
23 23
           placeholder="请选择省份"
24 24
           @on-change="provinceChange(searchForm.provinceid, 1)"
25 25
         >
26
+          <Option :value="0">所有省份</Option>
26 27
           <Option
27 28
             v-for="item in areaList"
28 29
             :value="item.areaCode"
@@ -46,8 +47,8 @@
46 47
         </Select>
47 48
         <Select
48 49
           :transfer="true"
49
-          v-model="searchForm.areaCode"
50
-          @on-change="regionChange(1)"
50
+          v-model="searchForm.areaCodes"
51
+          @on-change="regionChange()"
51 52
           style="width: 120px; margin: 0 10px"
52 53
           placeholder="请选择区"
53 54
         >
@@ -355,7 +356,7 @@ export default {
355 356
         dropList: [],
356 357
         marketList: [],
357 358
         regionList: [],
358
-        provinceid: "",
359
+        provinceid: 0,
359 360
         marketid: "",
360 361
         areaCode: "",
361 362
         areaCodes: "",
@@ -518,11 +519,16 @@ export default {
518 519
     provinceChange(id, type) {
519 520
       let arr = this.areaList.filter((v) => v.areaCode === id);
520 521
       if (type) {
521
-        this.searchForm.marketList = arr[0].childList;
522
+        if (this.searchForm.provinceid) {
523
+          this.searchForm.marketList = arr[0].childList;
524
+          this.searchForm.areaCodes = arr[0].areaCode;
525
+        } else {
526
+          this.searchForm.marketList = [];
527
+          this.searchForm.areaCodes = "";
528
+        }
522 529
         this.searchForm.marketid = "";
523 530
         this.searchForm.regionList = [];
524 531
         this.searchForm.areaCode = "";
525
-        this.searchForm.areaCodes = arr[0].areaCode;
526 532
         this.searchList();
527 533
       } else {
528 534
         this.marketList = arr[0].childList;
@@ -550,10 +556,7 @@ export default {
550 556
     },
551 557
     //选中区
552 558
     regionChange() {
553
-      if (!this.searchForm.areaCode) {
554
-        return;
555
-      }
556
-      this.searchForm.areaCodes = this.adminInfo.areaCode;
559
+      this.searchForm.areaCode = this.searchForm.areaCodes;
557 560
       this.searchList();
558 561
     },
559 562
     getAreaList() {
@@ -580,9 +583,9 @@ export default {
580 583
       });
581 584
     },
582 585
     // 搜索
583
-    searchList(obj) {
586
+    searchList() {
584 587
       this.searchForm.page = 1;
585
-      this.getList(obj);
588
+      this.getList();
586 589
     },
587 590
     // 页码改变
588 591
     pageChange(page) {

Laddar…
Avbryt
Spara