14 Commits c5e75834bd ... 5291a9fb12

Author SHA1 Message Date
  chenghanbin 5291a9fb12 Merge branch 'dev' of http://101.36.160.140:21044/portal-site-vue-qinghai/portal-site-web into dev-chb 4 months ago
  chenghanbin a8ff05f716 优化政务公开菜单样式显示 4 months ago
  chenghanbin 1a88686d44 Merge branch 'dev' of http://101.36.160.140:21044/portal-site-vue-qinghai/portal-site-web into dev 4 months ago
  chenghanbin 053e8134f1 Merge branch 'dev-chb' of http://101.36.160.140:21044/portal-site-vue-qinghai/portal-site-web into dev 4 months ago
  meidi 0c4611b654 Merge branch 'dev-3.0.0' of portal-site-vue-qinghai/portal-site-web into dev 4 months ago
  meidi d1b75cecf7 修改首页样式 4 months ago
  chenghanbin c54ccc1e0c Merge branch 'dev' of http://101.36.160.140:21044/portal-site-vue-qinghai/portal-site-web into dev 4 months ago
  wzq 718c26842d Merge branch 'dev-3.0.0' into dev 4 months ago
  wzq 319b5959f3 Merge branch 'dev-3.0.0' of http://101.36.160.140:21044/portal-site-vue-qinghai/portal-site-web into dev-3.0.0 4 months ago
  wzq a411d51acd flx:更改++334 4 months ago
  meidi 2cf907b61e Merge branch 'dev-3.0.0' of portal-site-vue-qinghai/portal-site-web into dev 4 months ago
  meidi 5894ff3d76 首页替换切图 4 months ago
  meidi 9fbbf4ff9d Merge branch 'dev-3.0.0' of portal-site-vue-qinghai/portal-site-web into dev 4 months ago
  meidi 5254c188ad 首页图片列表跳转 4 months ago

BIN
src/assets/homeImg/gwyxx-h.png


BIN
src/assets/homeImg/gwyxx.png


BIN
src/assets/homeImg/hdjl.png


BIN
src/assets/homeImg/hyxx-h.png


BIN
src/assets/homeImg/hyxx.png


BIN
src/assets/homeImg/qhyw-h.png


BIN
src/assets/homeImg/qhyw.png


BIN
src/assets/homeImg/zwgk.png


BIN
src/assets/homeImg/依申请公开.png


BIN
src/assets/homeImg/政府网站工作年报.png


BIN
src/assets/homeImg/政策文件.png


BIN
src/assets/homeImg/政策解读.png


BIN
src/assets/homeImg/行政规范性文件.png


+ 2 - 2
src/router/modules/News.route.js

@@ -73,13 +73,13 @@ const testRouter = [
73
       {
73
       {
74
         path: "picture",
74
         path: "picture",
75
         name: "picture",
75
         name: "picture",
76
-        meta: { title: "图片列表", tagRoute: "GIP" },
76
+        meta: { title: "图片新闻", tagRoute: "GIP" },
77
         component: () => import("@/views/News/picture/index.vue"),
77
         component: () => import("@/views/News/picture/index.vue"),
78
       },
78
       },
79
       {
79
       {
80
         path: "pictureDetails",
80
         path: "pictureDetails",
81
         name: "pictureDetails",
81
         name: "pictureDetails",
82
-        meta: { title: "图片列表详情", tagRoute: "GIP" },
82
+        meta: { title: "图片新闻", tagRoute: "GIP" },
83
         component: () => import("@/views/News/pictureDetails/index.vue"),
83
         component: () => import("@/views/News/pictureDetails/index.vue"),
84
       },
84
       },
85
     ],
85
     ],

+ 3 - 3
src/style/home/index.less

@@ -75,7 +75,6 @@
75
         text-align: center;
75
         text-align: center;
76
         line-height: 40px;
76
         line-height: 40px;
77
         border: 1px #cbd9e3 solid;
77
         border: 1px #cbd9e3 solid;
78
-        border-radius: 8px;
79
         margin-right: 14px;
78
         margin-right: 14px;
80
         cursor: pointer;
79
         cursor: pointer;
81
       }
80
       }
@@ -211,12 +210,13 @@
211
 }
210
 }
212
 
211
 
213
 .col-box-title {
212
 .col-box-title {
214
-  width: 102px;
213
+  width: 132px;
215
   line-height: 40px;
214
   line-height: 40px;
216
   margin-bottom: 12px;
215
   margin-bottom: 12px;
217
   text-indent: 1ch;
216
   text-indent: 1ch;
218
-  color: #0176c9;
217
+  color: #fff;
219
   font-weight: bold;
218
   font-weight: bold;
219
+  background-color: #0176c9;
220
   border-bottom: 1px #0176c9 solid;
220
   border-bottom: 1px #0176c9 solid;
221
 }
221
 }
222
 
222
 

+ 0 - 128
src/style/zwgk/menuModule.less

@@ -1,128 +0,0 @@
1
-.page {
2
-  background: #fff !important;
3
-
4
-  .featureBox {
5
-    width: 240px;
6
-    float: left;
7
-    border-radius: 5px 5px 0 0;
8
-
9
-    .el-menu {
10
-      border: none;
11
-
12
-      .el-menu-item-group {
13
-        height: 70px;
14
-        text-align: center;
15
-        margin-bottom: 15px;
16
-        background: #2c66a4;
17
-
18
-        .title {
19
-          color: #fff;
20
-          font-size: 26px;
21
-          line-height: 35px;
22
-          font-weight: bold;
23
-        }
24
-      }
25
-
26
-      .el-menu-item {
27
-        height: 80px;
28
-        font-size: 23px;
29
-        border-radius: 6px;
30
-        margin-bottom: 15px;
31
-        background: #f2f2f2;
32
-        border: 1px solid #ddd;
33
-
34
-        &:hover {
35
-          background: #1b68c0;
36
-
37
-          .muneName {
38
-            color: #fff;
39
-          }
40
-        }
41
-
42
-        img {
43
-          width: 40px;
44
-          float: left;
45
-          margin-top: 6px;
46
-          margin-left: 20px;
47
-          padding-right: 20px;
48
-        }
49
-
50
-        .muneName {
51
-          width: 110px;
52
-          display: block;
53
-          font-size: 23px;
54
-          color: #1c68c0;
55
-          line-height: 28px;
56
-          white-space: normal;
57
-          word-wrap: break-word;
58
-        }
59
-      }
60
-
61
-      .is-active {
62
-        background: #1b68c0;
63
-
64
-        .muneName {
65
-          color: #fff;
66
-        }
67
-      }
68
-
69
-      .menuBox {
70
-        font-size: 23px;
71
-
72
-        margin-bottom: 15px;
73
-
74
-        .el-sub-menu__title {
75
-          color: #fff;
76
-          height: 80px !important;
77
-          border-radius: 6px;
78
-          background: #f2f2f2;
79
-          border: 1px solid #ddd;
80
-        }
81
-
82
-        .el-menu-item {
83
-          width: 100%;
84
-          margin: 10px 0;
85
-          background: #FAFAFA;
86
-
87
-          .muneName {
88
-            width: 100%;
89
-          }
90
-
91
-          &:hover {
92
-            color: #fff;
93
-            background: #1b68c0;
94
-          }
95
-        }
96
-
97
-        .el-sub-menu__title {
98
-          height: 70px;
99
-          color: #1c68c0;
100
-          &:hover {
101
-            color: #fff;
102
-            background: #1b68c0;
103
-          }
104
-          .el-icon {
105
-            font-size: 22px;
106
-          }
107
-        }
108
-
109
-        img {
110
-          width: 40px;
111
-          float: left;
112
-          margin-top: 6px;
113
-          margin-left: 20px;
114
-          padding-right: 20px;
115
-        }
116
-
117
-        span {
118
-          width: 110px;
119
-          display: block;
120
-          font-size: 23px;
121
-          line-height: 28px;
122
-          white-space: normal;
123
-          word-wrap: break-word;
124
-        }
125
-      }
126
-    }
127
-  }
128
-}

+ 113 - 0
src/style/zwgk/menuStyle.less

@@ -0,0 +1,113 @@
1
+.page {
2
+  background: #fff !important;
3
+
4
+  .featureBox {
5
+    width: 240px;
6
+    float: left;
7
+    border-radius: 5px 5px 0 0;
8
+
9
+    ::v-deep(.el-menu) {
10
+      border: none;
11
+      background: transparent;
12
+
13
+      .el-menu-item {
14
+        height: 80px;
15
+        font-size: 23px;
16
+        border-radius: 6px;
17
+        margin-bottom: 15px;
18
+        background: #f2f2f2;
19
+        border: 1px solid #ddd;
20
+
21
+        img {
22
+          width: 40px;
23
+          float: left;
24
+          margin-top: 6px;
25
+          margin-left: 20px;
26
+          padding-right: 20px;
27
+        }
28
+
29
+        .muneName {
30
+          width: 110px;
31
+          display: block;
32
+          font-size: 23px;
33
+          color: #1c68c0;
34
+          line-height: 28px;
35
+          white-space: normal;
36
+          word-wrap: break-word;
37
+        }
38
+
39
+        &.is-active {
40
+          background: #1b68c0;
41
+
42
+          .muneName {
43
+            color: #fff;
44
+          }
45
+        }
46
+      }
47
+
48
+      //  二级菜单样式
49
+      .el-sub-menu {
50
+        margin-bottom: 14px;
51
+
52
+        .el-sub-menu__title {
53
+          height: 80px;
54
+          font-size: 23px;
55
+          border-radius: 6px;
56
+          background: #f2f2f2;
57
+          border: 1px solid #ddd;
58
+
59
+          img {
60
+            width: 40px;
61
+            float: left;
62
+            margin-top: 6px;
63
+            margin-left: 20px;
64
+            padding-right: 20px;
65
+          }
66
+
67
+          .muneName {
68
+            width: 110px;
69
+            display: block;
70
+            font-size: 23px;
71
+            color: #1c68c0;
72
+            line-height: 28px;
73
+            white-space: normal;
74
+            word-wrap: break-word;
75
+          }
76
+        }
77
+
78
+        .el-menu {
79
+          .el-menu-item-group {
80
+            .el-menu-item-group__title {
81
+              padding: 3px 0 3px 0;
82
+            }
83
+
84
+            .el-menu-item {
85
+              margin: 0;
86
+              color: #1c68c0;
87
+              font-size: 20px;
88
+              white-space: normal;
89
+              word-wrap: break-word;
90
+
91
+              &.is-active {
92
+                color: #fff;
93
+                background: #1b68c0;
94
+              }
95
+            }
96
+          }
97
+        }
98
+
99
+        &.is-active {
100
+          background: transparent;
101
+
102
+          .el-sub-menu__title {
103
+            background: #1b68c0;
104
+
105
+            .muneName {
106
+              color: #fff;
107
+            }
108
+          }
109
+        }
110
+      }
111
+    }
112
+  }
113
+}

+ 1 - 1
src/views/Home/components/broadcast.vue

@@ -90,7 +90,7 @@ export default {
90
       // console.log(1221);
90
       // console.log(1221);
91
       //定义一个路径
91
       //定义一个路径
92
       let href = router.resolve({
92
       let href = router.resolve({
93
-        path: "/News/picture",
93
+        path: "/News/imgesDel",
94
         // query: { type: "ttxmbt" },
94
         // query: { type: "ttxmbt" },
95
       }).href;
95
       }).href;
96
       //打开新的页面 到 href 这个页面
96
       //打开新的页面 到 href 这个页面

+ 36 - 2
src/views/Home/index.vue

@@ -24,14 +24,20 @@
24
 				<div class="title">
24
 				<div class="title">
25
 					<p class="errorClass" :class="{ actives: isHovered == 1 ? true : false }" @mouseenter="mouseenterIactives(1)"
25
 					<p class="errorClass" :class="{ actives: isHovered == 1 ? true : false }" @mouseenter="mouseenterIactives(1)"
26
 						@click="tabsData('1')">
26
 						@click="tabsData('1')">
27
+						<img class="img_trxt" v-if="isHovered == 1" src="../../assets/homeImg/gwyxx.png" alt="" />
28
+						<img class="img_trxt" v-else src="../../assets/homeImg/gwyxx-h.png" alt="" />
27
 						国务院信息
29
 						国务院信息
28
 					</p>
30
 					</p>
29
 					<p class="errorClass" :class="{ actives: isHovered == 2 ? true : false }" @mouseenter="mouseenterIactives(2)"
31
 					<p class="errorClass" :class="{ actives: isHovered == 2 ? true : false }" @mouseenter="mouseenterIactives(2)"
30
 						@click="tabsData('2')">
32
 						@click="tabsData('2')">
33
+						<img class="img_trxt" v-if="isHovered == 2" src="../../assets/homeImg/qhyw.png" alt="" />
34
+						<img class="img_trxt" v-else src="../../assets/homeImg/qhyw-h.png" alt="" />
31
 						青海要闻
35
 						青海要闻
32
 					</p>
36
 					</p>
33
 					<p class="errorClass" :class="{ actives: isHovered == 3 ? true : false }" @mouseenter="mouseenterIactives(3)"
37
 					<p class="errorClass" :class="{ actives: isHovered == 3 ? true : false }" @mouseenter="mouseenterIactives(3)"
34
 						@click="tabsData('3')">
38
 						@click="tabsData('3')">
39
+						<img class="img_trxt" v-if="isHovered == 3" src="../../assets/homeImg/hyxx.png" alt="" />
40
+						<img class="img_trxt" v-else src="../../assets/homeImg/hyxx-h.png" alt="" />
35
 						行业信息
41
 						行业信息
36
 					</p>
42
 					</p>
37
 				</div>
43
 				</div>
@@ -93,7 +99,10 @@
93
 		<div class="col-box">
99
 		<div class="col-box">
94
 			<div class="col-box-left">
100
 			<div class="col-box-left">
95
 				<div class="col-box-text">
101
 				<div class="col-box-text">
96
-					<p class="col-box-title">政务公开</p>
102
+					<p class="col-box-title">
103
+						<img class="img_trxt1" src="../../assets/homeImg/zwgk.png" alt="" />
104
+						政务公开
105
+					</p>
97
 				</div>
106
 				</div>
98
 				<div class="col-box-content">
107
 				<div class="col-box-content">
99
 					<div class="col-content-top">
108
 					<div class="col-content-top">
@@ -151,7 +160,10 @@
151
       </div> -->
160
       </div> -->
152
 			<div class="col-box-left">
161
 			<div class="col-box-left">
153
 				<div class="col-box-text">
162
 				<div class="col-box-text">
154
-					<p class="col-box-title">互动交流</p>
163
+					<p class="col-box-title">
164
+						<img class="img_trxt1" src="../../assets/homeImg/hdjl.png" alt="" />
165
+						互动交流
166
+					</p>
155
 				</div>
167
 				</div>
156
 				<div class="col-box-content">
168
 				<div class="col-box-content">
157
 					<div class="col-content-top1">
169
 					<div class="col-content-top1">
@@ -567,6 +579,13 @@ function getDIcList() {
567
 	width: 98%;
579
 	width: 98%;
568
 }
580
 }
569
 
581
 
582
+.errorClass {
583
+	background-color: #fafafa;
584
+	color: #3274c3;
585
+	font-weight: bold;
586
+}
587
+
588
+
570
 .actives {
589
 .actives {
571
 	background-color: #3274c3;
590
 	background-color: #3274c3;
572
 	color: #ffffff;
591
 	color: #ffffff;
@@ -584,6 +603,21 @@ function getDIcList() {
584
 	color: #333;
603
 	color: #333;
585
 }
604
 }
586
 
605
 
606
+.img_trxt {
607
+	width: 18px;
608
+	height: 18px;
609
+	vertical-align: middle;
610
+	margin-bottom: 0px;
611
+}
612
+
613
+.img_trxt1 {
614
+	width: 22px;
615
+	height: 22px;
616
+	margin-right: 6px;
617
+	vertical-align: middle;
618
+	margin-bottom: 0px;
619
+}
620
+
587
 .bag-time {
621
 .bag-time {
588
 	width: 18%;
622
 	width: 18%;
589
 }
623
 }

+ 5 - 1
src/views/News/pictureDetails/index.vue

@@ -4,7 +4,7 @@
4
     <div class="content-lzyj">
4
     <div class="content-lzyj">
5
       <article-module :article="pageData.article">
5
       <article-module :article="pageData.article">
6
         <div class="articleInfo">
6
         <div class="articleInfo">
7
-          <span class="title">[发布时间] <span>{{ pageData.publishTime }}</span></span>
7
+          <span class="title">发布时间: <span>{{ pageData.publishTime }}</span></span>
8
         </div>
8
         </div>
9
       </article-module>
9
       </article-module>
10
     </div>
10
     </div>
@@ -43,4 +43,8 @@ function getPageData() {
43
 
43
 
44
   .articleInfo {}
44
   .articleInfo {}
45
 }
45
 }
46
+
47
+.title {
48
+  color: #969696;
49
+}
46
 </style>
50
 </style>

+ 1 - 0
src/views/footer/index.vue

@@ -37,6 +37,7 @@ import {} from "vue";
37
   background-color: #7898c0;
37
   background-color: #7898c0;
38
   border-top: 2px solid #37e;
38
   border-top: 2px solid #37e;
39
   background: url("../../assets/bgImage/footer.png") 100% 100% no-repeat;
39
   background: url("../../assets/bgImage/footer.png") 100% 100% no-repeat;
40
+  margin-top: 30px;
40
   .link {
41
   .link {
41
     ul {
42
     ul {
42
       width: 380px;
43
       width: 380px;

+ 64 - 81
src/views/zwgk/modules/menuModule.vue

@@ -1,91 +1,63 @@
1
 <template>
1
 <template>
2
   <div class="featureBox">
2
   <div class="featureBox">
3
-    <el-menu
4
-      :collapse="isCollapse"
5
-      :default-active="activeMenu"
6
-      class="el-menu-vertical-demo dark-mode"
7
-    >
8
-      <template v-for="item in menuList" :key="item.key">
9
-        <el-sub-menu
10
-          class="menuBox"
11
-          :index="item.path"
12
-          v-if="item.children"
13
-          @mouseenter="
14
-            (el) => {
15
-              moveToMenu(el, item.icon);
16
-            }
17
-          "
18
-          @mouseleave="
19
-            (el) => {
20
-              leaveToMenu(el, item.icon);
21
-            }
22
-          "
3
+    <el-menu :default-active="activeMenu">
4
+      <template v-for="menu in menuList">
5
+        <!-- 只有一级菜单 -->
6
+        <el-menu-item
7
+          v-if="!menu.children"
8
+          :index="menu.path"
9
+          @click="jumpRoute(menu)"
23
         >
10
         >
11
+          <img :src="getImgUrl(menu)" :alt="menu.name" />
12
+          <span class="muneName">{{ menu.name }}</span>
13
+        </el-menu-item>
14
+        <!-- 有二级菜单 -->
15
+        <el-sub-menu v-else :index="menu.path">
24
           <template #title>
16
           <template #title>
25
-            <img :src="getUrl(item.icon)" alt="" />
26
-            <span>{{ item.name }}</span>
17
+            <img :src="getImgUrl(menu)" :alt="menu.name" />
18
+            <span class="muneName">{{ menu.name }}</span>
27
           </template>
19
           </template>
28
-          <el-menu-item
29
-            :index="son.path"
30
-            v-for="son in item.children"
31
-            @click="jumpModule(son.path)"
20
+          <el-menu-item-group
21
+            v-for="menuSub in menu.children"
22
+            :key="menuSub.path"
32
           >
23
           >
33
-            <template #title>
34
-              <span class="muneName">{{ son.name }}</span>
35
-            </template>
36
-          </el-menu-item>
24
+            <el-menu-item :index="menuSub.path" @click="jumpRoute(menuSub)">{{
25
+              menuSub.name
26
+            }}</el-menu-item>
27
+          </el-menu-item-group>
37
         </el-sub-menu>
28
         </el-sub-menu>
38
-
39
-        <el-menu-item
40
-          v-else
41
-          :index="item.path"
42
-          @mouseenter="
43
-            (el) => {
44
-              moveToMenu(el, item.icon);
45
-            }
46
-          "
47
-          @mouseleave="
48
-            (el) => {
49
-              leaveToMenu(el, item.icon);
50
-            }
51
-          "
52
-          @click="jumpModule(item.path)"
53
-        >
54
-          <img :src="getUrl(item.icon)" alt="" />
55
-          <template #title>
56
-            <span class="muneName">{{ item.name }}</span>
57
-          </template>
58
-        </el-menu-item>
59
       </template>
29
       </template>
60
-      <slot />
61
     </el-menu>
30
     </el-menu>
62
   </div>
31
   </div>
63
 </template>
32
 </template>
64
 <script setup>
33
 <script setup>
65
 import { ref, watch, reactive } from "vue";
34
 import { ref, watch, reactive } from "vue";
66
 import { useRouter } from "vue-router";
35
 import { useRouter } from "vue-router";
67
-import "@/style/zwgk/menuModule.less";
68
 
36
 
69
 const router = useRouter();
37
 const router = useRouter();
70
 const activeMenu = ref("zfxxgkzn");
38
 const activeMenu = ref("zfxxgkzn");
71
 
39
 
72
 const menuList = reactive([
40
 const menuList = reactive([
73
   {
41
   {
42
+    active: true,
74
     path: "zfxxgkzn",
43
     path: "zfxxgkzn",
75
     icon: "zfxxgkzn",
44
     icon: "zfxxgkzn",
76
     name: "政府信息公开指南",
45
     name: "政府信息公开指南",
77
   },
46
   },
78
   {
47
   {
48
+    active: false,
79
     path: "zfxxgkzd",
49
     path: "zfxxgkzd",
80
     icon: "zfxxgkzd",
50
     icon: "zfxxgkzd",
81
     name: "政府信息公开制度",
51
     name: "政府信息公开制度",
82
   },
52
   },
83
   {
53
   {
54
+    active: false,
84
     path: "zfxxgknb",
55
     path: "zfxxgknb",
85
     icon: "zfxxgknb",
56
     icon: "zfxxgknb",
86
     name: "政府信息公开年报",
57
     name: "政府信息公开年报",
87
   },
58
   },
88
   {
59
   {
60
+    active: false,
89
     path: "fdgknr",
61
     path: "fdgknr",
90
     icon: "fdgknr",
62
     icon: "fdgknr",
91
     name: "法定公开内容",
63
     name: "法定公开内容",
@@ -125,65 +97,76 @@ const menuList = reactive([
125
     ],
97
     ],
126
   },
98
   },
127
   {
99
   {
100
+    active: false,
128
     path: "zcwj",
101
     path: "zcwj",
129
     icon: "zcwj",
102
     icon: "zcwj",
130
     name: "政策文件",
103
     name: "政策文件",
131
   },
104
   },
132
   {
105
   {
106
+    active: false,
133
     path: "zcjd",
107
     path: "zcjd",
134
     icon: "zcjd",
108
     icon: "zcjd",
135
     name: "政策解读",
109
     name: "政策解读",
136
   },
110
   },
137
   {
111
   {
112
+    active: false,
138
     path: "xzgfxwj",
113
     path: "xzgfxwj",
139
     icon: "xzgfxwj",
114
     icon: "xzgfxwj",
140
     name: "行政规范性文件",
115
     name: "行政规范性文件",
141
   },
116
   },
142
   {
117
   {
118
+    active: false,
143
     path: "ysqgk",
119
     path: "ysqgk",
144
     icon: "ysqgk",
120
     icon: "ysqgk",
145
     name: "依申请公开",
121
     name: "依申请公开",
146
   },
122
   },
147
   {
123
   {
124
+    active: false,
148
     path: "zfwzgznb",
125
     path: "zfwzgznb",
149
     icon: "zfwzgznb",
126
     icon: "zfwzgznb",
150
     name: "政府网站工作年报",
127
     name: "政府网站工作年报",
151
   },
128
   },
152
 ]);
129
 ]);
153
-function jumpModule(path) {
154
-  activeMenu.value = path;
155
-  router.push("/zwgk/" + path);
156
-}
157
-function getUrl(name) {
158
-  if (name == activeMenu.value) {
159
-    name = name + "s";
160
-  }
161
-  return new URL(`../../../assets/hdjl/${name}.png`, import.meta.url).href;
162
-}
163
-// 鼠标移入菜单
164
-function moveToMenu(el, url) {
165
-  let urls = url + "s";
166
-  // 找到当前菜单项中的 img 元素
167
-  let imgElement = el.target.querySelector("img");
168
-  if (imgElement) {
169
-    imgElement.src = imgElement.src.replace(url, urls);
170
-  }
130
+// 路由跳转
131
+function jumpRoute(data) {
132
+  activeMenu.value = data.path;
133
+  router.push("/zwgk/" + data.path);
171
 }
134
 }
172
-// 鼠标移出菜单
173
-function leaveToMenu(el, url) {
174
-  let urls = url + "s";
175
-  // 找到当前菜单项中的 img 元素
176
-  let imgElement = el.target.querySelector("img");
177
-  if (imgElement) {
178
-    imgElement.src = imgElement.src.replace(urls, url);
135
+// 获取图片地址
136
+function getImgUrl(data) {
137
+  let url = "";
138
+  if (data.active) {
139
+    url = data.icon + "s";
140
+  } else {
141
+    url = data.icon;
179
   }
142
   }
143
+  return new URL(`../../../assets/hdjl/${url}.png`, import.meta.url).href;
180
 }
144
 }
181
-
145
+// 监听 选中的菜单对应的图标高亮
146
+watch(
147
+  () => activeMenu.value,
148
+  (newValue) => {
149
+    let hasSlash = newValue.includes("/");
150
+    let menuPath = hasSlash ? "fdgknr" : newValue;
151
+    menuList.forEach((item) => {
152
+      if (menuPath == item.path) {
153
+        item.active = true;
154
+      } else {
155
+        item.active = false;
156
+      }
157
+    });
158
+  },
159
+  { immediate: true }
160
+);
161
+// 监听路由
182
 watch(
162
 watch(
183
-  () => router.currentRoute.value.name,
163
+  () => router.currentRoute.value.path,
184
   (newValue) => {
164
   (newValue) => {
185
-    activeMenu.value = newValue == "zwgk" ? "zfxxgkzn" : newValue;
165
+    activeMenu.value = newValue.replace("/zwgk/", "");
186
   },
166
   },
187
   { immediate: true }
167
   { immediate: true }
188
 );
168
 );
189
 </script>
169
 </script>
170
+<style lang="less" scoped>
171
+@import url(@/style/zwgk/menuStyle.less);
172
+</style>