style:数据上报
Showing
3 changed files
with
47 additions
and
59 deletions
1 | <!-- | 1 | <!-- |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-03-27 14:09:57 | 4 | * @LastEditTime: 2023-05-11 16:38:29 |
5 | --> | 5 | --> |
6 | <template> | 6 | <template> |
7 | <div> | 7 | <div> |
... | @@ -9,7 +9,7 @@ | ... | @@ -9,7 +9,7 @@ |
9 | <el-menu router :default-active="activeMenu" :background-color="variables.menuBg" :text-color="variables.menuText" | 9 | <el-menu router :default-active="activeMenu" :background-color="variables.menuBg" :text-color="variables.menuText" |
10 | :unique-opened="true" :active-text-color="variables.menuActiveText" :collapse-transition="false" mode="vertical"> | 10 | :unique-opened="true" :active-text-color="variables.menuActiveText" :collapse-transition="false" mode="vertical"> |
11 | <!-- 权限菜单 --> | 11 | <!-- 权限菜单 --> |
12 | <sidebar-item v-for="route in permission_routes.slice(5)" :key="route.path" :item="route" | 12 | <sidebar-item v-for="route in permission_routes.slice(4)" :key="route.path" :item="route" |
13 | :base-path="route.path" /> | 13 | :base-path="route.path" /> |
14 | <!-- 菜单全部展示 --> | 14 | <!-- 菜单全部展示 --> |
15 | <!-- <sidebar-item v-for="route in asyncRoutes" :key="route.path" :item="route" :base-path="route.path" /> --> | 15 | <!-- <sidebar-item v-for="route in asyncRoutes" :key="route.path" :item="route" :base-path="route.path" /> --> | ... | ... |
1 | /* | 1 | /* |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-05-11 16:25:43 | 4 | * @LastEditTime: 2023-05-11 16:33:18 |
5 | */ | 5 | */ |
6 | import Vue from 'vue' | 6 | export default function getTheme () { |
7 | export default function getTheme (theme = Vue.prototype.BASE_API.THEME) { | 7 | import("@/styles/sbPublic.scss"); |
8 | const resultMap = { | ||
9 | 'sb': function () { | ||
10 | return import("@/styles/sbPublic.scss"); | ||
11 | }, | ||
12 | 'default': function () { | ||
13 | throw new Error(`Unsupported theme: ${theme}`); | ||
14 | }, | ||
15 | }; | ||
16 | const result = resultMap[theme](); | ||
17 | if (result instanceof Promise) { | ||
18 | return result; | ||
19 | } else { | ||
20 | return resultMap.default(); | ||
21 | } | ||
22 | } | 8 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -37,9 +37,9 @@ | ... | @@ -37,9 +37,9 @@ |
37 | </template> | 37 | </template> |
38 | 38 | ||
39 | <script> | 39 | <script> |
40 | import { getMenuInfo } from "@/api/user"; | 40 | import { getMenuInfo } from "@/api/user"; |
41 | import { loginIn } from "@/api/login.js"; | 41 | import { loginIn } from "@/api/login.js"; |
42 | export default { | 42 | export default { |
43 | name: "sbLogin", | 43 | name: "sbLogin", |
44 | data () { | 44 | data () { |
45 | return { | 45 | return { |
... | @@ -112,6 +112,8 @@ export default { | ... | @@ -112,6 +112,8 @@ export default { |
112 | localStorage.setItem("token", `Bearer ${res.content}`); | 112 | localStorage.setItem("token", `Bearer ${res.content}`); |
113 | const { result: getMenuData } = (await getMenuInfo(code)) || []; | 113 | const { result: getMenuData } = (await getMenuInfo(code)) || []; |
114 | let path1 = JSON.parse(getMenuData[0].metadata)?.path + '/' + JSON.parse(getMenuData[0].children[0].metadata)?.path | 114 | let path1 = JSON.parse(getMenuData[0].metadata)?.path + '/' + JSON.parse(getMenuData[0].children[0].metadata)?.path |
115 | |||
116 | console.log(getMenuData, path1, 'path1path1path1path1path1'); | ||
115 | //登录成功后需判断有无重定向,没有重定向则跳转首页 | 117 | //登录成功后需判断有无重定向,没有重定向则跳转首页 |
116 | const accessRoutes = await this.$store.dispatch( | 118 | const accessRoutes = await this.$store.dispatch( |
117 | "permission/generateRoutes", | 119 | "permission/generateRoutes", |
... | @@ -129,12 +131,12 @@ export default { | ... | @@ -129,12 +131,12 @@ export default { |
129 | }) | 131 | }) |
130 | } | 132 | } |
131 | } | 133 | } |
132 | } | 134 | } |
133 | </script> | 135 | </script> |
134 | <style scoped lang="scss"> | 136 | <style scoped lang="scss"> |
135 | .username, | 137 | .username, |
136 | .password, | 138 | .password, |
137 | .yz { | 139 | .yz { |
138 | position: relative; | 140 | position: relative; |
139 | 141 | ||
140 | &:before { | 142 | &:before { |
... | @@ -152,59 +154,59 @@ export default { | ... | @@ -152,59 +154,59 @@ export default { |
152 | color: #000 !important; | 154 | color: #000 !important; |
153 | text-indent: 24px; | 155 | text-indent: 24px; |
154 | } | 156 | } |
155 | } | 157 | } |
156 | 158 | ||
157 | .flex-container { | 159 | .flex-container { |
158 | position: relative; | 160 | position: relative; |
159 | display: -webkit-flex; | 161 | display: -webkit-flex; |
160 | display: flex; | 162 | display: flex; |
161 | } | 163 | } |
162 | 164 | ||
163 | .flex-input { | 165 | .flex-input { |
164 | width: 100%; | 166 | width: 100%; |
165 | } | 167 | } |
166 | 168 | ||
167 | .flex-line { | 169 | .flex-line { |
168 | position: absolute; | 170 | position: absolute; |
169 | width: 1px; | 171 | width: 1px; |
170 | height: 64%; | 172 | height: 64%; |
171 | margin: 5px; | 173 | margin: 5px; |
172 | right: 36%; | 174 | right: 36%; |
173 | background-color: #CCCCCC; | 175 | background-color: #cccccc; |
174 | } | 176 | } |
175 | 177 | ||
176 | .flex-img { | 178 | .flex-img { |
177 | position: absolute; | 179 | position: absolute; |
178 | margin: 2px; | 180 | margin: 2px; |
179 | right: 16%; | 181 | right: 16%; |
180 | } | 182 | } |
181 | 183 | ||
182 | .flex-renovate { | 184 | .flex-renovate { |
183 | position: absolute; | 185 | position: absolute; |
184 | margin: 1px; | 186 | margin: 1px; |
185 | right: 3%; | 187 | right: 3%; |
186 | } | 188 | } |
187 | 189 | ||
188 | #renovate { | 190 | #renovate { |
189 | color: #3F8FEA; | 191 | color: #3f8fea; |
190 | font-size: 16px; | 192 | font-size: 16px; |
191 | font-weight: 700; | 193 | font-weight: 700; |
192 | cursor: pointer; | 194 | cursor: pointer; |
193 | } | 195 | } |
194 | 196 | ||
195 | .username::before { | 197 | .username::before { |
196 | background-image: url(../../image/userlogo.png); | 198 | background-image: url(../../image/userlogo.png); |
197 | } | 199 | } |
198 | 200 | ||
199 | .password::before { | 201 | .password::before { |
200 | background-image: url(../../image/passlogo.png); | 202 | background-image: url(../../image/passlogo.png); |
201 | } | 203 | } |
202 | 204 | ||
203 | .yz::before { | 205 | .yz::before { |
204 | background-image: url(../../image/yzlogo.png); | 206 | background-image: url(../../image/yzlogo.png); |
205 | } | 207 | } |
206 | 208 | ||
207 | .bg { | 209 | .bg { |
208 | width: 100%; | 210 | width: 100%; |
209 | height: 100%; | 211 | height: 100%; |
210 | min-width: 1440px; | 212 | min-width: 1440px; |
... | @@ -213,9 +215,9 @@ export default { | ... | @@ -213,9 +215,9 @@ export default { |
213 | background-size: 100% 100%; | 215 | background-size: 100% 100%; |
214 | overflow: hidden; | 216 | overflow: hidden; |
215 | position: relative; | 217 | position: relative; |
216 | } | 218 | } |
217 | 219 | ||
218 | .title { | 220 | .title { |
219 | width: 24%; | 221 | width: 24%; |
220 | height: 6%; | 222 | height: 6%; |
221 | top: 20%; | 223 | top: 20%; |
... | @@ -241,9 +243,9 @@ export default { | ... | @@ -241,9 +243,9 @@ export default { |
241 | color: #ffffff; | 243 | color: #ffffff; |
242 | text-shadow: 0px 4px 4px #002c95; | 244 | text-shadow: 0px 4px 4px #002c95; |
243 | } | 245 | } |
244 | } | 246 | } |
245 | 247 | ||
246 | .login-inner-bg { | 248 | .login-inner-bg { |
247 | background: white; | 249 | background: white; |
248 | width: 24.6%; | 250 | width: 24.6%; |
249 | min-width: 360px; | 251 | min-width: 360px; |
... | @@ -253,9 +255,9 @@ export default { | ... | @@ -253,9 +255,9 @@ export default { |
253 | background-size: 100% 100%; | 255 | background-size: 100% 100%; |
254 | box-sizing: border-box; | 256 | box-sizing: border-box; |
255 | padding: 56px; | 257 | padding: 56px; |
256 | } | 258 | } |
257 | 259 | ||
258 | .login { | 260 | .login { |
259 | .user_style { | 261 | .user_style { |
260 | h3 { | 262 | h3 { |
261 | font-weight: normal; | 263 | font-weight: normal; |
... | @@ -284,9 +286,9 @@ export default { | ... | @@ -284,9 +286,9 @@ export default { |
284 | cursor: pointer; | 286 | cursor: pointer; |
285 | background-color: #2d8cf0; | 287 | background-color: #2d8cf0; |
286 | } | 288 | } |
287 | } | 289 | } |
288 | 290 | ||
289 | .login #loginform { | 291 | .login #loginform { |
290 | .el-form-item { | 292 | .el-form-item { |
291 | margin-bottom: 24px !important; | 293 | margin-bottom: 24px !important; |
292 | } | 294 | } |
... | @@ -310,10 +312,10 @@ export default { | ... | @@ -310,10 +312,10 @@ export default { |
310 | .el-checkbox__label { | 312 | .el-checkbox__label { |
311 | color: #fff; | 313 | color: #fff; |
312 | } | 314 | } |
313 | } | 315 | } |
314 | 316 | ||
315 | .inputUser .ivu-input { | 317 | .inputUser .ivu-input { |
316 | padding: 6px 24px !important; | 318 | padding: 6px 24px !important; |
317 | border: 1px solid #9f9f9f !important; | 319 | border: 1px solid #9f9f9f !important; |
318 | } | 320 | } |
319 | </style> | 321 | </style> | ... | ... |
-
Please register or sign in to post a comment