样式调整
Showing
20 changed files
with
653 additions
and
298 deletions
src/image/bdclogo.png
0 → 100644

20.9 KB
src/image/loginBoxsb.png
0 → 100644

296 KB
src/image/passlogo.png
0 → 100644

655 Bytes
src/image/userlogo.png
0 → 100644

612 Bytes
src/image/yzlogo.png
0 → 100644

621 Bytes
... | @@ -46,7 +46,7 @@ export default { | ... | @@ -46,7 +46,7 @@ export default { |
46 | sessionStorage.removeItem("token"); | 46 | sessionStorage.removeItem("token"); |
47 | this.$store.dispatch("user/resetState"); | 47 | this.$store.dispatch("user/resetState"); |
48 | this.$router.replace({ | 48 | this.$router.replace({ |
49 | path: "/login", | 49 | path: "/login/jg", |
50 | query: { | 50 | query: { |
51 | redirect: this.$route.fullPath, | 51 | redirect: this.$route.fullPath, |
52 | }, | 52 | }, | ... | ... |
1 | <template> | 1 | <template> |
2 | <el-menu router :default-active="activeMenu" mode="horizontal"> | 2 | <el-menu router :default-active="activeMenu" mode="horizontal"> |
3 | <!-- 权限菜单 --> | 3 | <!-- 权限菜单 --> |
4 | <sidebar-item v-for="route in permission_routes.slice(2, 5)" :key="route.path" :item="route" | 4 | <sidebar-item v-for="route in permission_routes.slice(3, 6)" :key="route.path" :item="route" |
5 | :base-path="route.path" /> | 5 | :base-path="route.path" /> |
6 | <!-- 菜单全部展示 --> | 6 | <!-- 菜单全部展示 --> |
7 | <!-- <sidebar-item v-for="route in asyncRoutes" :key="route.path" :item="route" :base-path="route.path" /> --> | 7 | <!-- <sidebar-item v-for="route in asyncRoutes" :key="route.path" :item="route" :base-path="route.path" /> --> |
... | @@ -9,35 +9,40 @@ | ... | @@ -9,35 +9,40 @@ |
9 | </template> | 9 | </template> |
10 | 10 | ||
11 | <script> | 11 | <script> |
12 | import { mapGetters } from 'vuex' | 12 | import { mapGetters } from 'vuex' |
13 | import Logo from './Logo' | 13 | import Logo from './Logo' |
14 | import SidebarItem from './SidebarItem' | 14 | import SidebarItem from './SidebarItem' |
15 | import variables from '@/styles/variables.scss' | 15 | import variables from '@/styles/variables.scss' |
16 | import { asyncRoutes } from '@/router' | 16 | import { asyncRoutes } from '@/router' |
17 | export default { | 17 | export default { |
18 | components: { SidebarItem, Logo }, | 18 | components: { SidebarItem, Logo }, |
19 | computed: { | 19 | computed: { |
20 | ...mapGetters(['permission_routes', 'sidebar']), | 20 | ...mapGetters(['permission_routes', 'sidebar']), |
21 | activeMenu () { | 21 | |
22 | const route = this.$route | 22 | activeMenu () { |
23 | const { meta, path } = route | 23 | |
24 | if (meta.activeMenu) { | 24 | const route = this.$route |
25 | return meta.activeMenu | 25 | const { meta, path } = route |
26 | if (meta.activeMenu) { | ||
27 | return meta.activeMenu | ||
28 | } | ||
29 | return path | ||
30 | }, | ||
31 | variables () { | ||
32 | return variables | ||
33 | }, | ||
34 | asyncRoutes () { | ||
35 | return asyncRoutes.slice(0, 3) | ||
26 | } | 36 | } |
27 | return path | ||
28 | }, | 37 | }, |
29 | variables () { | 38 | mounted () { |
30 | return variables | 39 | console.log("permission_routes", this.permission_routes); |
31 | }, | ||
32 | asyncRoutes () { | ||
33 | return asyncRoutes.slice(0, 3) | ||
34 | } | 40 | } |
35 | } | 41 | } |
36 | } | ||
37 | </script> | 42 | </script> |
38 | <style scoped lang="scss"> | 43 | <style scoped lang="scss"> |
39 | .el-menu--horizontal { | ||
40 | display: flex; | ||
41 | background: none !important; | ||
42 | } | ||
43 | </style> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
44 | .el-menu--horizontal { | ||
45 | display: flex; | ||
46 | background: none !important; | ||
47 | } | ||
48 | </style> | ... | ... |
1 | <!-- | ||
2 | * @Author: xiaomiao 1158771342@qq.com | ||
3 | * @Date: 2023-01-10 09:03:06 | ||
4 | * @LastEditors: xiaomiao 1158771342@qq.com | ||
5 | * @LastEditTime: 2023-03-08 10:45:43 | ||
6 | * @FilePath: \监管系统\js-web-jianguan\src\layout\components\Sidebar\sidebarRight.vue | ||
7 | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||
8 | --> | ||
1 | <template> | 9 | <template> |
2 | <el-menu router :default-active="activeMenu" mode="horizontal"> | 10 | <el-menu router :default-active="activeMenu" mode="horizontal"> |
3 | <!-- 权限菜单 --> | 11 | <!-- 权限菜单 --> |
4 | <sidebar-item v-for="route in permission_routes.slice(5, 8)" :key="route.path" :item="route" | 12 | <sidebar-item v-for="route in permission_routes.slice(6, 9)" :key="route.path" :item="route" |
5 | :base-path="route.path" /> | 13 | :base-path="route.path" /> |
6 | <!-- 菜单全部展示 --> | 14 | <!-- 菜单全部展示 --> |
7 | <!-- <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" /> --> |
... | @@ -9,59 +17,59 @@ | ... | @@ -9,59 +17,59 @@ |
9 | </template> | 17 | </template> |
10 | 18 | ||
11 | <script> | 19 | <script> |
12 | import { mapGetters } from 'vuex' | 20 | import { mapGetters } from 'vuex' |
13 | import Logo from './Logo' | 21 | import Logo from './Logo' |
14 | import SidebarItem from './SidebarItem' | 22 | import SidebarItem from './SidebarItem' |
15 | import variables from '@/styles/variables.scss' | 23 | import variables from '@/styles/variables.scss' |
16 | import { asyncRoutes } from '@/router' | 24 | import { asyncRoutes } from '@/router' |
17 | export default { | 25 | export default { |
18 | components: { SidebarItem, Logo }, | 26 | components: { SidebarItem, Logo }, |
19 | computed: { | 27 | computed: { |
20 | ...mapGetters(['permission_routes', 'sidebar']), | 28 | ...mapGetters(['permission_routes', 'sidebar']), |
21 | activeMenu () { | 29 | activeMenu () { |
22 | const route = this.$route | 30 | const route = this.$route |
23 | const { meta, path } = route | 31 | const { meta, path } = route |
24 | if (meta.activeMenu) { | 32 | if (meta.activeMenu) { |
25 | return meta.activeMenu | 33 | return meta.activeMenu |
34 | } | ||
35 | return path | ||
36 | }, | ||
37 | variables () { | ||
38 | return variables | ||
39 | }, | ||
40 | asyncRoutes () { | ||
41 | return asyncRoutes.slice(3, 6) | ||
26 | } | 42 | } |
27 | return path | ||
28 | }, | ||
29 | variables () { | ||
30 | return variables | ||
31 | }, | ||
32 | asyncRoutes () { | ||
33 | return asyncRoutes.slice(3, 6) | ||
34 | } | 43 | } |
35 | } | 44 | } |
36 | } | ||
37 | </script> | 45 | </script> |
38 | <style scoped lang="scss"> | 46 | <style scoped lang="scss"> |
39 | .el-menu--horizontal { | 47 | .el-menu--horizontal { |
40 | display: flex; | 48 | display: flex; |
41 | background: none !important; | 49 | background: none !important; |
42 | } | 50 | } |
43 | 51 | ||
44 | /deep/.el-menu-item:hover { | 52 | /deep/.el-menu-item:hover { |
45 | background: none; | 53 | background: none; |
46 | font-weight: 700; | 54 | font-weight: 700; |
47 | color: #fff !important; | 55 | color: #fff !important; |
48 | } | 56 | } |
49 | 57 | ||
50 | /deep/.el-submenu__title { | 58 | /deep/.el-submenu__title { |
51 | color: #fff; | 59 | color: #fff; |
52 | font-size: 18px; | 60 | font-size: 18px; |
53 | } | 61 | } |
54 | 62 | ||
55 | /deep/.el-submenu__title:hover { | 63 | /deep/.el-submenu__title:hover { |
56 | background: none; | 64 | background: none; |
57 | font-weight: 700; | 65 | font-weight: 700; |
58 | font-size: 20px; | 66 | font-size: 20px; |
59 | } | 67 | } |
60 | 68 | ||
61 | /deep/.el-menu--horizontal .el-menu-item:not(.is-disabled):focus { | ||
62 | background: none; | ||
63 | color: #fff; | ||
64 | font-size: 20px; | ||
65 | font-weight: 700 !important; | ||
66 | } | ||
67 | </style> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
69 | /deep/.el-menu--horizontal .el-menu-item:not(.is-disabled):focus { | ||
70 | background: none; | ||
71 | color: #fff; | ||
72 | font-size: 20px; | ||
73 | font-weight: 700 !important; | ||
74 | } | ||
75 | </style> | ... | ... |
... | @@ -13,10 +13,50 @@ router.beforeEach(async (to, from, next) => { | ... | @@ -13,10 +13,50 @@ router.beforeEach(async (to, from, next) => { |
13 | let hasAddDict = store.state.dict.addDict; | 13 | let hasAddDict = store.state.dict.addDict; |
14 | let hasUser = store.state.user.hasUser; | 14 | let hasUser = store.state.user.hasUser; |
15 | let hasAddRoute = store.state.permission.addRoutes; | 15 | let hasAddRoute = store.state.permission.addRoutes; |
16 | if (to.path == "/login") { | 16 | |
17 | if (to.path == "/login/sb") { | ||
18 | sessionStorage.removeItem("token"); | ||
19 | next(); | ||
20 | } else if (to.path !== "/login/jg") { | ||
21 | //判断token是否存在 | ||
22 | const hasToken = sessionStorage.getItem("token"); | ||
23 | if (hasToken) { | ||
24 | //请求用户信息 | ||
25 | if (!hasUser) { | ||
26 | store.dispatch("user/getUserInfo"); | ||
27 | } | ||
28 | if (hasAddRoute) { | ||
29 | next(); | ||
30 | } else { | ||
31 | //请求菜单 | ||
32 | const { result: getMenuData } = (await getMenuInfo()) || []; | ||
33 | const accessRoutes = await store.dispatch( | ||
34 | "permission/generateRoutes", | ||
35 | getMenuData | ||
36 | ); | ||
37 | router.addRoutes([ | ||
38 | ...accessRoutes, | ||
39 | { path: "*", redirect: "/404", hidden: true }, | ||
40 | ]); | ||
41 | const routeTo = Cookies.get("routerTo"); | ||
42 | if (!hasAddDict) { | ||
43 | await store.dispatch("dict/generateDic"); | ||
44 | } | ||
45 | if (routeTo && routeTo !== "/") { | ||
46 | next({ ...to, replace: true }); | ||
47 | } else { | ||
48 | alert("上报") | ||
49 | next("/home"); | ||
50 | } | ||
51 | } | ||
52 | } else { | ||
53 | next("/login/sb"); | ||
54 | } | ||
55 | } | ||
56 | if (to.path == "/login/jg") { | ||
17 | sessionStorage.removeItem("token"); | 57 | sessionStorage.removeItem("token"); |
18 | next(); | 58 | next(); |
19 | } else { | 59 | } else if (to.path !== "/login/sb") { |
20 | //判断token是否存在 | 60 | //判断token是否存在 |
21 | const hasToken = sessionStorage.getItem("token"); | 61 | const hasToken = sessionStorage.getItem("token"); |
22 | if (hasToken) { | 62 | if (hasToken) { |
... | @@ -44,11 +84,12 @@ router.beforeEach(async (to, from, next) => { | ... | @@ -44,11 +84,12 @@ router.beforeEach(async (to, from, next) => { |
44 | if (routeTo && routeTo !== "/") { | 84 | if (routeTo && routeTo !== "/") { |
45 | next({ ...to, replace: true }); | 85 | next({ ...to, replace: true }); |
46 | } else { | 86 | } else { |
87 | alert("监管") | ||
47 | next("/home"); | 88 | next("/home"); |
48 | } | 89 | } |
49 | } | 90 | } |
50 | } else { | 91 | } else { |
51 | next("/login"); | 92 | next("/login/jg"); |
52 | } | 93 | } |
53 | } | 94 | } |
54 | NProgress.done(); | 95 | NProgress.done(); | ... | ... |
... | @@ -3,6 +3,8 @@ import Router from 'vue-router' | ... | @@ -3,6 +3,8 @@ import Router from 'vue-router' |
3 | Vue.use(Router) | 3 | Vue.use(Router) |
4 | /* Layout */ | 4 | /* Layout */ |
5 | import Layout from '@/layout' | 5 | import Layout from '@/layout' |
6 | // const p = 'layout1' | ||
7 | // const Layout = require('@/layout') | ||
6 | /* Router Modules */ | 8 | /* Router Modules */ |
7 | // import componentsRouter from './modules/components' | 9 | // import componentsRouter from './modules/components' |
8 | export const constantRoutes = [ | 10 | export const constantRoutes = [ |
... | @@ -22,9 +24,14 @@ export const constantRoutes = [ | ... | @@ -22,9 +24,14 @@ export const constantRoutes = [ |
22 | }, | 24 | }, |
23 | //登录 | 25 | //登录 |
24 | { | 26 | { |
25 | path: "/login", | 27 | path: "/login/jg", |
26 | name: "login", | 28 | name: "loginjg", |
27 | component: () => import("@/views/login/index.vue"), | 29 | component: () => import("@/views/loginjg/index.vue"), |
30 | }, | ||
31 | { | ||
32 | path: "/login/sb", | ||
33 | name: "loginsb", | ||
34 | component: () => import("@/views/loginsb/index.vue"), | ||
28 | }, | 35 | }, |
29 | // 监管首页 | 36 | // 监管首页 |
30 | { | 37 | { | ... | ... |
... | @@ -62,7 +62,7 @@ function handleErrorData(status) { | ... | @@ -62,7 +62,7 @@ function handleErrorData(status) { |
62 | case 401: | 62 | case 401: |
63 | Message.error("由于长时间未操作,请重新登录!"); | 63 | Message.error("由于长时间未操作,请重新登录!"); |
64 | router.replace({ | 64 | router.replace({ |
65 | path: "/login", | 65 | path: "/login/jg", |
66 | query: { | 66 | query: { |
67 | redirect: router.history.current.fullPath, | 67 | redirect: router.history.current.fullPath, |
68 | }, | 68 | }, | ... | ... |
... | @@ -22,227 +22,229 @@ | ... | @@ -22,227 +22,229 @@ |
22 | </template> | 22 | </template> |
23 | 23 | ||
24 | <script> | 24 | <script> |
25 | import { loginIn } from "@/api/login.js"; | 25 | import { loginIn } from "@/api/login.js"; |
26 | import { api, getAction } from "@/api/manageApi"; | 26 | import { api, getAction } from "@/api/manageApi"; |
27 | export default { | 27 | export default { |
28 | name: "Login", | 28 | name: "Login", |
29 | data () { | 29 | data () { |
30 | return { | 30 | return { |
31 | user: { | 31 | user: { |
32 | account: "", | 32 | account: "", |
33 | password: "", | 33 | password: "", |
34 | checkStatus: false, | 34 | checkStatus: false, |
35 | }, | 35 | }, |
36 | productName: "", | 36 | productName: "", |
37 | rules: { | 37 | rules: { |
38 | account: [{ required: true, message: "请填写帐号", trigger: "blur" }], | 38 | account: [{ required: true, message: "请填写帐号", trigger: "blur" }], |
39 | password: [{ required: true, message: "请填写密码", trigger: "blur" }], | 39 | password: [{ required: true, message: "请填写密码", trigger: "blur" }], |
40 | }, | 40 | }, |
41 | }; | 41 | }; |
42 | }, | 42 | }, |
43 | created () { | 43 | created () { |
44 | const params = {}; | 44 | const params = {}; |
45 | const queryOptions = { | 45 | const queryOptions = { |
46 | conditionGroup: { | 46 | conditionGroup: { |
47 | conditions: [ | 47 | conditions: [ |
48 | { | 48 | { |
49 | property: "code", | 49 | property: "code", |
50 | value: "BDCJGPT", | 50 | value: "BDCJGPT", |
51 | operator: "EQ", | 51 | operator: "EQ", |
52 | }, | 52 | }, |
53 | ], | 53 | ], |
54 | queryRelation: "AND", | 54 | queryRelation: "AND", |
55 | }, | 55 | }, |
56 | }; | 56 | }; |
57 | params.queryOptions = JSON.stringify(queryOptions); | 57 | params.queryOptions = JSON.stringify(queryOptions); |
58 | //根据子系统code获取子系统详细信息 | 58 | //根据子系统code获取子系统详细信息 |
59 | getAction(api.subsystem, params).then((res) => { | 59 | getAction(api.subsystem, params).then((res) => { |
60 | if (res.status === 1) { | 60 | if (res.status === 1) { |
61 | this.productName = res.content[0].name; | 61 | this.productName = res.content[0].name; |
62 | this.$store.dispatch("products/setData", res.content[0]); | 62 | this.$store.dispatch("products/setData", res.content[0]); |
63 | } else { | ||
64 | this.$message.error({ message: res.message, showClose: true }); | ||
65 | } | ||
66 | }); | ||
67 | }, | ||
68 | mounted () { | ||
69 | // this.checkUserName(); | ||
70 | }, | ||
71 | methods: { | ||
72 | //记住用户名 | ||
73 | checkUserName: function (flag) { | ||
74 | this.user.checkStatus = flag; | ||
75 | if (this.user.checkStatus) { | ||
76 | localStorage.setItem("accountId", this.user.account); | ||
77 | let name = localStorage.getItem("accountId"); | ||
78 | if (name === "") { | ||
79 | return; | ||
80 | } else { | 63 | } else { |
81 | this.user.account = name; | 64 | this.$message.error({ message: res.message, showClose: true }); |
82 | } | 65 | } |
83 | } else { | 66 | }); |
84 | this.user.account = localStorage.getItem("accountId"); | 67 | }, |
85 | } | 68 | mounted () { |
69 | // this.checkUserName(); | ||
86 | }, | 70 | }, |
87 | login (user) { | 71 | methods: { |
88 | var self = this; | 72 | //记住用户名 |
89 | this.$refs[user].validate((valid) => { | 73 | checkUserName: function (flag) { |
90 | if (valid) { | 74 | this.user.checkStatus = flag; |
91 | loginIn(self.user.account, self.user.password) | 75 | if (this.user.checkStatus) { |
92 | .then((res) => { | 76 | localStorage.setItem("accountId", this.user.account); |
93 | if (res.status === 1) { | 77 | let name = localStorage.getItem("accountId"); |
94 | //存储token | 78 | if (name === "") { |
95 | sessionStorage.setItem("token", `Bearer ${res.content}`); | 79 | return; |
96 | //登录成功后需判断有无重定向,没有重定向则跳转首页 | 80 | } else { |
97 | this.$router.replace(this.$route.query.redirect || "/"); | 81 | this.user.account = name; |
98 | } else { | 82 | } |
99 | //错误处理 | 83 | } else { |
100 | } | 84 | this.user.account = localStorage.getItem("accountId"); |
101 | }) | ||
102 | .catch((error) => { | ||
103 | // console.dir(error); | ||
104 | }); | ||
105 | } | 85 | } |
106 | }); | 86 | }, |
87 | login (user) { | ||
88 | var self = this; | ||
89 | this.$refs[user].validate((valid) => { | ||
90 | if (valid) { | ||
91 | loginIn(self.user.account, self.user.password) | ||
92 | .then((res) => { | ||
93 | if (res.status === 1) { | ||
94 | //存储token | ||
95 | sessionStorage.setItem("token", `Bearer ${res.content}`); | ||
96 | //登录成功后需判断有无重定向,没有重定向则跳转首页 | ||
97 | this.$router.replace(this.$route.query.redirect || "/"); | ||
98 | } else { | ||
99 | //错误处理 | ||
100 | } | ||
101 | }) | ||
102 | .catch((error) => { | ||
103 | // console.dir(error); | ||
104 | }); | ||
105 | } | ||
106 | }); | ||
107 | }, | ||
107 | }, | 108 | }, |
108 | }, | 109 | components: {}, |
109 | components: {}, | 110 | }; |
110 | }; | ||
111 | </script> | 111 | </script> |
112 | <style scoped lang="scss"> | 112 | <style scoped lang="scss"> |
113 | .username, | 113 | .username, |
114 | .password { | 114 | .password { |
115 | position: relative; | 115 | position: relative; |
116 | 116 | ||
117 | &:before { | 117 | &:before { |
118 | content: ""; | 118 | content: ""; |
119 | display: block; | 119 | display: block; |
120 | width: 16px; | 120 | width: 16px; |
121 | height: 16px; | 121 | height: 16px; |
122 | position: absolute; | 122 | position: absolute; |
123 | left: 10px; | 123 | left: 10px; |
124 | top: 7px; | 124 | top: 7px; |
125 | background-size: 100% 100%; | 125 | background-size: 100% 100%; |
126 | } | ||
127 | |||
128 | /deep/ .el-input__inner { | ||
129 | text-indent: 24px; | ||
130 | border: 1px solid rgba(11, 161, 248, 0.4); | ||
131 | background-color: rgba(6, 135, 205, 0.3) !important; | ||
132 | } | ||
133 | } | ||
134 | |||
135 | .username::before { | ||
136 | background-image: url(../../image/username.png); | ||
126 | } | 137 | } |
127 | 138 | ||
128 | /deep/ .el-input__inner { | 139 | .password::before { |
129 | text-indent: 24px; | 140 | background-image: url(../../image/password.png); |
130 | border: 1px solid rgba(11, 161, 248, 0.4); | ||
131 | background-color: rgba(6, 135, 205, 0.3) !important; | ||
132 | } | 141 | } |
133 | } | 142 | |
134 | 143 | .bg { | |
135 | .username::before { | ||
136 | background-image: url(../../image/username.png); | ||
137 | } | ||
138 | |||
139 | .password::before { | ||
140 | background-image: url(../../image/password.png); | ||
141 | } | ||
142 | |||
143 | .bg { | ||
144 | width: 100%; | ||
145 | height: 100%; | ||
146 | min-width: 1440px; | ||
147 | min-height: 560px; | ||
148 | background: url(../../image/loginBoxBg.png) no-repeat; | ||
149 | background-size: 100% 100%; | ||
150 | overflow: hidden; | ||
151 | position: relative; | ||
152 | } | ||
153 | |||
154 | .login-inner-bg { | ||
155 | background: url(../../image/loginBg.png) no-repeat; | ||
156 | width: 21.6%; | ||
157 | height: 43%; | ||
158 | min-width: 360px; | ||
159 | min-height: 380px; | ||
160 | top: 30%; | ||
161 | right: 20%; | ||
162 | position: absolute; | ||
163 | background-size: 100% 100%; | ||
164 | box-sizing: border-box; | ||
165 | padding: 56px; | ||
166 | |||
167 | h2 { | ||
168 | width: 100%; | 144 | width: 100%; |
169 | font-size: 36px; | 145 | height: 100%; |
170 | font-weight: 700; | 146 | min-width: 1440px; |
171 | color: #fff; | 147 | min-height: 560px; |
172 | text-align: center; | 148 | background: url(../../image/loginBoxBg.png) no-repeat; |
173 | white-space: nowrap; | 149 | background-size: 100% 100%; |
150 | overflow: hidden; | ||
151 | position: relative; | ||
152 | } | ||
153 | |||
154 | .login-inner-bg { | ||
155 | background: url(../../image/loginBg.png) no-repeat; | ||
156 | width: 21.6%; | ||
157 | height: 43%; | ||
158 | min-width: 360px; | ||
159 | min-height: 380px; | ||
160 | top: 30%; | ||
161 | right: 20%; | ||
174 | position: absolute; | 162 | position: absolute; |
175 | right: 0; | 163 | background-size: 100% 100%; |
176 | top: -70px; | 164 | box-sizing: border-box; |
177 | background-image: linear-gradient(180deg, | 165 | padding: 56px; |
166 | |||
167 | h2 { | ||
168 | width: 100%; | ||
169 | font-size: 36px; | ||
170 | font-weight: 700; | ||
171 | color: #fff; | ||
172 | text-align: center; | ||
173 | white-space: nowrap; | ||
174 | position: absolute; | ||
175 | right: 0; | ||
176 | top: -70px; | ||
177 | background-image: linear-gradient( | ||
178 | 180deg, | ||
178 | rgba(99, 163, 255, 1) 0, | 179 | rgba(99, 163, 255, 1) 0, |
179 | rgba(99, 163, 255, 1) 0, | 180 | rgba(99, 163, 255, 1) 0, |
180 | rgba(182, 220, 255, 1) 49.731445%, | 181 | rgba(182, 220, 255, 1) 49.731445%, |
181 | rgba(114, 190, 255, 1) 100%, | 182 | rgba(114, 190, 255, 1) 100%, |
182 | rgba(114, 190, 255, 1) 100%); | 183 | rgba(114, 190, 255, 1) 100% |
183 | overflow-wrap: break-word; | 184 | ); |
184 | color: rgba(255, 255, 255, 1); | 185 | overflow-wrap: break-word; |
185 | font-size: 36px; | 186 | color: rgba(255, 255, 255, 1); |
186 | font-family: AlimamaShuHeiTi-Bold; | 187 | font-size: 36px; |
187 | -webkit-background-clip: text; | 188 | font-family: AlimamaShuHeiTi-Bold; |
188 | -webkit-text-fill-color: transparent; | 189 | -webkit-background-clip: text; |
190 | -webkit-text-fill-color: transparent; | ||
191 | } | ||
189 | } | 192 | } |
190 | } | ||
191 | 193 | ||
192 | .login { | 194 | .login { |
193 | .user_style { | 195 | .user_style { |
194 | h3 { | 196 | h3 { |
195 | color: #fff; | 197 | color: #fff; |
196 | font-size: 22px; | 198 | font-size: 22px; |
197 | font-weight: normal; | 199 | font-weight: normal; |
198 | text-align: center; | 200 | text-align: center; |
199 | margin: 16px auto 34px; | 201 | margin: 16px auto 34px; |
200 | font-weight: 400; | 202 | font-weight: 400; |
203 | } | ||
201 | } | 204 | } |
202 | } | ||
203 | 205 | ||
204 | .btn { | 206 | .btn { |
205 | width: 100%; | 207 | width: 100%; |
206 | height: 6vh; | 208 | height: 6vh; |
207 | background-color: #00c2de; | 209 | background-color: #00c2de; |
208 | border-radius: 5px; | 210 | border-radius: 5px; |
209 | font-size: 1.4vw; | 211 | font-size: 1.4vw; |
210 | color: #ffffff; | 212 | color: #ffffff; |
211 | } | 213 | } |
212 | 214 | ||
213 | .btn:hover { | 215 | .btn:hover { |
214 | cursor: pointer; | 216 | cursor: pointer; |
215 | background-color: #2d8cf0; | 217 | background-color: #2d8cf0; |
218 | } | ||
216 | } | 219 | } |
217 | } | ||
218 | 220 | ||
219 | .login #loginform { | 221 | .login #loginform { |
220 | .el-form-item { | 222 | .el-form-item { |
221 | margin-bottom: 24px !important; | 223 | margin-bottom: 24px !important; |
222 | } | 224 | } |
223 | 225 | ||
224 | .login-btn { | 226 | .login-btn { |
225 | margin-top: 40px !important; | 227 | margin-top: 40px !important; |
226 | } | 228 | } |
227 | 229 | ||
228 | .el-button { | 230 | .el-button { |
229 | font-size: 18px; | 231 | font-size: 18px; |
230 | background: #0d8cc0 !important; | 232 | background: #0d8cc0 !important; |
231 | color: #ffffff !important; | 233 | color: #ffffff !important; |
232 | cursor: pointer !important; | 234 | cursor: pointer !important; |
233 | } | 235 | } |
234 | 236 | ||
235 | .el-input__inner { | 237 | .el-input__inner { |
236 | width: 100% !important; | 238 | width: 100% !important; |
237 | } | 239 | } |
238 | 240 | ||
239 | .el-checkbox__label { | 241 | .el-checkbox__label { |
240 | color: #fff; | 242 | color: #fff; |
243 | } | ||
241 | } | 244 | } |
242 | } | ||
243 | 245 | ||
244 | .inputUser .ivu-input { | 246 | .inputUser .ivu-input { |
245 | padding: 6px 24px !important; | 247 | padding: 6px 24px !important; |
246 | border: 1px solid #9f9f9f !important; | 248 | border: 1px solid #9f9f9f !important; |
247 | } | 249 | } |
248 | </style> | 250 | </style> | ... | ... |
src/views/loginsb/index.vue
0 → 100644
1 | <template> | ||
2 | <div class="bg"> | ||
3 | <div class="title"> | ||
4 | <img src="../../image/bdclogo.png" alt=""> | ||
5 | <h2>{{ productName }}</h2> | ||
6 | </div> | ||
7 | <div class="login-inner-bg login"> | ||
8 | <div class="user_style"> | ||
9 | <h3>用户登录</h3> | ||
10 | <el-form :model="user" :rules="rules" ref="user" id="loginform" class="demo-ruleForm"> | ||
11 | <el-form-item prop="account"> | ||
12 | <el-input class="username" v-model="user.account" placeholder="请输入用户名"></el-input> | ||
13 | </el-form-item> | ||
14 | <el-form-item prop="password"> | ||
15 | <el-input type="password" class="password" @keyup.native="login('user')" v-model="user.password" | ||
16 | placeholder="请输入密码" show-password></el-input> | ||
17 | </el-form-item> | ||
18 | <el-form-item prop="yz"> | ||
19 | <el-input class="yz" @keyup.native="login('user')" v-model="user.yz" | ||
20 | placeholder="请输入验证码"></el-input> | ||
21 | </el-form-item> | ||
22 | <el-form-item class="login-btn"> | ||
23 | <el-button type="primary" style="width: 100%" @click="login('user')">登录</el-button> | ||
24 | </el-form-item> | ||
25 | </el-form> | ||
26 | </div> | ||
27 | </div> | ||
28 | </div> | ||
29 | </template> | ||
30 | |||
31 | <script> | ||
32 | import { loginIn } from "@/api/login.js"; | ||
33 | import { api, getAction } from "@/api/manageApi"; | ||
34 | export default { | ||
35 | name: "Login", | ||
36 | data () { | ||
37 | return { | ||
38 | user: { | ||
39 | account: "", | ||
40 | password: "", | ||
41 | yz: "", | ||
42 | checkStatus: false, | ||
43 | }, | ||
44 | productName: "", | ||
45 | rules: { | ||
46 | account: [{ required: true, message: "请填写帐号", trigger: "blur" }], | ||
47 | password: [{ required: true, message: "请填写密码", trigger: "blur" }], | ||
48 | }, | ||
49 | }; | ||
50 | }, | ||
51 | created () { | ||
52 | const params = {}; | ||
53 | const queryOptions = { | ||
54 | conditionGroup: { | ||
55 | conditions: [ | ||
56 | { | ||
57 | property: "code", | ||
58 | value: "BDCJGPT", | ||
59 | operator: "EQ", | ||
60 | }, | ||
61 | ], | ||
62 | queryRelation: "AND", | ||
63 | }, | ||
64 | }; | ||
65 | params.queryOptions = JSON.stringify(queryOptions); | ||
66 | //根据子系统code获取子系统详细信息 | ||
67 | getAction(api.subsystem, params).then((res) => { | ||
68 | if (res.status === 1) { | ||
69 | this.productName = res.content[0].name; | ||
70 | this.$store.dispatch("products/setData", res.content[0]); | ||
71 | } else { | ||
72 | this.$message.error({ message: res.message, showClose: true }); | ||
73 | } | ||
74 | }); | ||
75 | }, | ||
76 | mounted () { | ||
77 | // this.checkUserName(); | ||
78 | }, | ||
79 | methods: { | ||
80 | //记住用户名 | ||
81 | checkUserName: function (flag) { | ||
82 | this.user.checkStatus = flag; | ||
83 | if (this.user.checkStatus) { | ||
84 | localStorage.setItem("accountId", this.user.account); | ||
85 | let name = localStorage.getItem("accountId"); | ||
86 | if (name === "") { | ||
87 | return; | ||
88 | } else { | ||
89 | this.user.account = name; | ||
90 | } | ||
91 | } else { | ||
92 | this.user.account = localStorage.getItem("accountId"); | ||
93 | } | ||
94 | }, | ||
95 | login (user) { | ||
96 | var self = this; | ||
97 | this.$refs[user].validate((valid) => { | ||
98 | if (valid) { | ||
99 | loginIn(self.user.account, self.user.password) | ||
100 | .then((res) => { | ||
101 | if (res.status === 1) { | ||
102 | this.$store.dispatch('business/setInitRules', "layout1") | ||
103 | //存储token | ||
104 | sessionStorage.setItem("token", `Bearer ${res.content}`); | ||
105 | //登录成功后需判断有无重定向,没有重定向则跳转首页 | ||
106 | this.$router.replace(this.$route.query.redirect || "/"); | ||
107 | } else { | ||
108 | console.log(res); | ||
109 | this.$message.error({ message: res.message }) | ||
110 | } | ||
111 | }) | ||
112 | .catch((error) => { | ||
113 | // console.dir(error); | ||
114 | }); | ||
115 | } | ||
116 | }); | ||
117 | }, | ||
118 | }, | ||
119 | components: {}, | ||
120 | }; | ||
121 | </script> | ||
122 | <style scoped lang="scss"> | ||
123 | .username, | ||
124 | .password, | ||
125 | .yz { | ||
126 | position: relative; | ||
127 | |||
128 | &:before { | ||
129 | content: ""; | ||
130 | display: block; | ||
131 | width: 16px; | ||
132 | height: 16px; | ||
133 | position: absolute; | ||
134 | left: 10px; | ||
135 | top: 7px; | ||
136 | background-size: 100% 100%; | ||
137 | } | ||
138 | |||
139 | /deep/ .el-input__inner { | ||
140 | color: #000 !important; | ||
141 | text-indent: 24px; | ||
142 | // border: 1px solid rgba(11, 161, 248, 0.4); | ||
143 | // background-color: rgba(6, 135, 205, 0.3) !important; | ||
144 | } | ||
145 | } | ||
146 | |||
147 | .username::before { | ||
148 | background-image: url(../../image/userlogo.png); | ||
149 | } | ||
150 | |||
151 | .password::before { | ||
152 | background-image: url(../../image/passlogo.png); | ||
153 | } | ||
154 | .yz::before { | ||
155 | background-image: url(../../image/yzlogo.png); | ||
156 | } | ||
157 | |||
158 | .bg { | ||
159 | width: 100%; | ||
160 | height: 100%; | ||
161 | min-width: 1440px; | ||
162 | min-height: 560px; | ||
163 | background: url(../../image/loginBoxsb.png) no-repeat; | ||
164 | background-size: 100% 100%; | ||
165 | overflow: hidden; | ||
166 | position: relative; | ||
167 | } | ||
168 | .title { | ||
169 | width: 24%; | ||
170 | height: 6%; | ||
171 | top: 20%; | ||
172 | right: 38%; | ||
173 | position: absolute; | ||
174 | img { | ||
175 | width: 60px; | ||
176 | height: 60px; | ||
177 | top: 0%; | ||
178 | left: 2%; | ||
179 | position: absolute; | ||
180 | } | ||
181 | h2 { | ||
182 | top: 25%; | ||
183 | left: 22%; | ||
184 | position: absolute; | ||
185 | width: 383px; | ||
186 | height: 42px; | ||
187 | font-size: 28px; | ||
188 | font-weight: 600; | ||
189 | color: #ffffff; | ||
190 | text-shadow: 0px 4px 4px #002c95; | ||
191 | } | ||
192 | } | ||
193 | .login-inner-bg { | ||
194 | background: white; | ||
195 | width: 24.6%; | ||
196 | height: 47%; | ||
197 | min-width: 360px; | ||
198 | min-height: 380px; | ||
199 | top: 30%; | ||
200 | right: 38%; | ||
201 | position: absolute; | ||
202 | background-size: 100% 100%; | ||
203 | box-sizing: border-box; | ||
204 | padding: 56px; | ||
205 | } | ||
206 | |||
207 | .login { | ||
208 | .user_style { | ||
209 | h3 { | ||
210 | font-weight: normal; | ||
211 | text-align: center; | ||
212 | margin: -10px auto 28px; | ||
213 | font-weight: 400; | ||
214 | width: 125px; | ||
215 | height: 29px; | ||
216 | font-size: 20px; | ||
217 | font-family: Source Han Sans CN; | ||
218 | font-weight: 400; | ||
219 | color: #333333; | ||
220 | } | ||
221 | } | ||
222 | |||
223 | .btn { | ||
224 | width: 100%; | ||
225 | height: 6vh; | ||
226 | background-color: #00c2de; | ||
227 | border-radius: 5px; | ||
228 | font-size: 1.4vw; | ||
229 | color: #000; | ||
230 | } | ||
231 | |||
232 | .btn:hover { | ||
233 | cursor: pointer; | ||
234 | background-color: #2d8cf0; | ||
235 | } | ||
236 | } | ||
237 | |||
238 | .login #loginform { | ||
239 | .el-form-item { | ||
240 | margin-bottom: 24px !important; | ||
241 | } | ||
242 | |||
243 | .login-btn { | ||
244 | margin-top: 30px !important; | ||
245 | } | ||
246 | |||
247 | .el-button { | ||
248 | font-size: 18px; | ||
249 | border-radius: 0; | ||
250 | background: #4162d8 !important; | ||
251 | color: #ffffff !important; | ||
252 | cursor: pointer !important; | ||
253 | } | ||
254 | |||
255 | .el-input__inner { | ||
256 | width: 100% !important; | ||
257 | } | ||
258 | |||
259 | .el-checkbox__label { | ||
260 | color: #fff; | ||
261 | } | ||
262 | } | ||
263 | |||
264 | .inputUser .ivu-input { | ||
265 | padding: 6px 24px !important; | ||
266 | border: 1px solid #9f9f9f !important; | ||
267 | } | ||
268 | </style> |
... | @@ -84,7 +84,7 @@ | ... | @@ -84,7 +84,7 @@ |
84 | }, | 84 | }, |
85 | mounted () { | 85 | mounted () { |
86 | if (this.userInfo) { | 86 | if (this.userInfo) { |
87 | this.getUserInfo(this.userInfo.id) | 87 | this.getUserInfo(this.userInfo) |
88 | } | 88 | } |
89 | this.sexList = [ | 89 | this.sexList = [ |
90 | { | 90 | { |
... | @@ -105,8 +105,8 @@ | ... | @@ -105,8 +105,8 @@ |
105 | ] | 105 | ] |
106 | }, | 106 | }, |
107 | methods: { | 107 | methods: { |
108 | getUserInfo (id) { | 108 | getUserInfo (p) { |
109 | getAction(`${api.users}/${id}`).then((res) => { | 109 | getAction(`${api.users}/${p.id}`).then((res) => { |
110 | if (res.status === 1) { | 110 | if (res.status === 1) { |
111 | this.form = res.content | 111 | this.form = res.content |
112 | } else { | 112 | } else { |
... | @@ -136,12 +136,10 @@ | ... | @@ -136,12 +136,10 @@ |
136 | .user-info { | 136 | .user-info { |
137 | margin: 0.1875rem 1.0417rem; | 137 | margin: 0.1875rem 1.0417rem; |
138 | background: #ffffff; | 138 | background: #ffffff; |
139 | max-height: 90%; | ||
140 | overflow-y: auto; | 139 | overflow-y: auto; |
141 | .form-wrapper { | 140 | .form-wrapper { |
142 | padding: 24px 120px 0px; | 141 | padding: 0px 120px 0px; |
143 | .el-form-item { | 142 | .el-form-item { |
144 | margin-bottom: 24px; | ||
145 | /deep/.el-form-item__label { | 143 | /deep/.el-form-item__label { |
146 | color: #ffffff; | 144 | color: #ffffff; |
147 | } | 145 | } |
... | @@ -152,9 +150,12 @@ | ... | @@ -152,9 +150,12 @@ |
152 | border: 1px solid #6bc1fc; | 150 | border: 1px solid #6bc1fc; |
153 | } | 151 | } |
154 | } | 152 | } |
153 | .el-form-item--small.el-form-item { | ||
154 | margin-bottom: 16px; | ||
155 | } | ||
155 | } | 156 | } |
156 | .bottom-wrapper { | 157 | .bottom-wrapper { |
157 | padding: 32px 120px 24px; | 158 | padding: 0px 120px 0px; |
158 | text-align: right; | 159 | text-align: right; |
159 | } | 160 | } |
160 | } | 161 | } | ... | ... |
1 | <!-- | ||
2 | * @Author: xiaomiao 1158771342@qq.com | ||
3 | * @Date: 2023-03-08 15:30:43 | ||
4 | * @LastEditors: xiaomiao 1158771342@qq.com | ||
5 | * @LastEditTime: 2023-03-08 16:33:50 | ||
6 | * @FilePath: \监管系统\js-web-jianguan\src\views\system\information copy\index.vue | ||
7 | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||
8 | --> | ||
1 | <template> | 9 | <template> |
2 | <div class="information from-clues"> | 10 | <div class="information from-clues"> |
3 | <div class="from-clues-header"> | 11 | <div class="from-clues-header"> |
... | @@ -13,7 +21,7 @@ | ... | @@ -13,7 +21,7 @@ |
13 | </el-row> | 21 | </el-row> |
14 | </el-form> | 22 | </el-form> |
15 | </div> | 23 | </div> |
16 | <div class="from-clues-content"> | 24 | <div class="from-clues-content boxin"> |
17 | <div class="contentbox"> | 25 | <div class="contentbox"> |
18 | <base-set v-if="isshow" :userInfo="userData" /> | 26 | <base-set v-if="isshow" :userInfo="userData" /> |
19 | <password-edit v-if="!isshow" :userInfo="userData" /> | 27 | <password-edit v-if="!isshow" :userInfo="userData" /> |
... | @@ -61,9 +69,6 @@ | ... | @@ -61,9 +69,6 @@ |
61 | @import "~@/styles/mixin.scss"; | 69 | @import "~@/styles/mixin.scss"; |
62 | @import "~@/styles/public.scss"; | 70 | @import "~@/styles/public.scss"; |
63 | .information { | 71 | .information { |
64 | .btnColRight { | ||
65 | margin-top: 20px; | ||
66 | } | ||
67 | /deep/.content { | 72 | /deep/.content { |
68 | .el-input__inner { | 73 | .el-input__inner { |
69 | background: none; | 74 | background: none; |
... | @@ -78,8 +83,11 @@ | ... | @@ -78,8 +83,11 @@ |
78 | width: 100%; | 83 | width: 100%; |
79 | } | 84 | } |
80 | } | 85 | } |
86 | .boxin { | ||
87 | height: 79%; | ||
88 | } | ||
81 | .contentbox { | 89 | .contentbox { |
82 | height: 3.0854rem; | 90 | // overflow-y: auto; |
83 | } | 91 | } |
84 | } | 92 | } |
85 | </style> | 93 | </style> | ... | ... |
... | @@ -69,13 +69,21 @@ | ... | @@ -69,13 +69,21 @@ |
69 | userInfo: { | 69 | userInfo: { |
70 | handler: function (val) { | 70 | handler: function (val) { |
71 | if (val) { | 71 | if (val) { |
72 | this.userId = val.id | 72 | this.getid(val) |
73 | } | 73 | } |
74 | } | 74 | } |
75 | } | 75 | } |
76 | |||
77 | }, | ||
78 | mounted () { | ||
79 | if (this.userInfo) { | ||
80 | this.getid(this.userInfo) | ||
81 | } | ||
76 | }, | 82 | }, |
77 | mounted () { }, | ||
78 | methods: { | 83 | methods: { |
84 | getid (val) { | ||
85 | this.userId = val.id | ||
86 | }, | ||
79 | validatorConfirmPassword (rule, value, callback) { | 87 | validatorConfirmPassword (rule, value, callback) { |
80 | const { newPassword } = this.form | 88 | const { newPassword } = this.form |
81 | if (value !== newPassword) { | 89 | if (value !== newPassword) { |
... | @@ -106,7 +114,6 @@ | ... | @@ -106,7 +114,6 @@ |
106 | .user-info { | 114 | .user-info { |
107 | margin: 36px 200px; | 115 | margin: 36px 200px; |
108 | background: #ffffff; | 116 | background: #ffffff; |
109 | max-height: 90%; | ||
110 | overflow-y: auto; | 117 | overflow-y: auto; |
111 | .form-wrapper { | 118 | .form-wrapper { |
112 | padding: 24px 120px 0px; | 119 | padding: 24px 120px 0px; | ... | ... |
... | @@ -8,12 +8,12 @@ class data extends filter { | ... | @@ -8,12 +8,12 @@ class data extends filter { |
8 | { | 8 | { |
9 | prop: "name", | 9 | prop: "name", |
10 | label: "角色名称", | 10 | label: "角色名称", |
11 | width: 330 | 11 | width: 130 |
12 | }, | 12 | }, |
13 | { | 13 | { |
14 | prop: "type", | 14 | prop: "type", |
15 | label: "类别", | 15 | label: "类别", |
16 | width: 400 | 16 | width: 200 |
17 | }, | 17 | }, |
18 | { | 18 | { |
19 | prop: "description", | 19 | prop: "description", | ... | ... |
... | @@ -111,7 +111,7 @@ | ... | @@ -111,7 +111,7 @@ |
111 | .concat([ | 111 | .concat([ |
112 | { | 112 | { |
113 | label: "排序", | 113 | label: "排序", |
114 | width: 380, | 114 | width: 100, |
115 | render: (h, scope) => { | 115 | render: (h, scope) => { |
116 | return ( | 116 | return ( |
117 | <div> | 117 | <div> |
... | @@ -141,7 +141,7 @@ | ... | @@ -141,7 +141,7 @@ |
141 | .concat([ | 141 | .concat([ |
142 | { | 142 | { |
143 | label: "操作", | 143 | label: "操作", |
144 | width: 380, | 144 | width: 280, |
145 | render: (h, scope) => { | 145 | render: (h, scope) => { |
146 | return ( | 146 | return ( |
147 | <div> | 147 | <div> | ... | ... |
1 | /* | ||
2 | * @Author: xiaomiao 1158771342@qq.com | ||
3 | * @Date: 2023-01-30 17:59:51 | ||
4 | * @LastEditors: xiaomiao 1158771342@qq.com | ||
5 | * @LastEditTime: 2023-03-08 15:09:15 | ||
6 | * @FilePath: \监管系统\js-web-jianguan\src\views\system\users\data\index.js | ||
7 | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | ||
8 | */ | ||
1 | import filter from '@/utils/filter.js' | 9 | import filter from '@/utils/filter.js' |
2 | class data extends filter { | 10 | class data extends filter { |
3 | constructor() { | 11 | constructor() { |
... | @@ -13,7 +21,7 @@ class data extends filter { | ... | @@ -13,7 +21,7 @@ class data extends filter { |
13 | { | 21 | { |
14 | prop: "name", | 22 | prop: "name", |
15 | label: "姓名", | 23 | label: "姓名", |
16 | width: 300 | 24 | width: 100 |
17 | }, | 25 | }, |
18 | { | 26 | { |
19 | prop: "loginName", | 27 | prop: "loginName", | ... | ... |
-
Please register or sign in to post a comment