diff --git a/epmet-oper-web/src/assets/img/index/bg.png b/epmet-oper-web/src/assets/img/index/bg.png new file mode 100644 index 0000000..69d59f2 Binary files /dev/null and b/epmet-oper-web/src/assets/img/index/bg.png differ diff --git a/epmet-oper-web/src/assets/img/index/logo-1.png b/epmet-oper-web/src/assets/img/index/logo-1.png new file mode 100644 index 0000000..202e0a6 Binary files /dev/null and b/epmet-oper-web/src/assets/img/index/logo-1.png differ diff --git a/epmet-oper-web/src/assets/img/index/logo-2.png b/epmet-oper-web/src/assets/img/index/logo-2.png new file mode 100644 index 0000000..53976d3 Binary files /dev/null and b/epmet-oper-web/src/assets/img/index/logo-2.png differ diff --git a/epmet-oper-web/src/assets/img/index/zhuangshi.png b/epmet-oper-web/src/assets/img/index/zhuangshi.png new file mode 100644 index 0000000..3bacbcf Binary files /dev/null and b/epmet-oper-web/src/assets/img/index/zhuangshi.png differ diff --git a/epmet-oper-web/src/assets/img/login/bg.png b/epmet-oper-web/src/assets/img/login/bg.png new file mode 100644 index 0000000..45d2144 Binary files /dev/null and b/epmet-oper-web/src/assets/img/login/bg.png differ diff --git a/epmet-oper-web/src/assets/img/login/mima.png b/epmet-oper-web/src/assets/img/login/mima.png new file mode 100644 index 0000000..dcf54a4 Binary files /dev/null and b/epmet-oper-web/src/assets/img/login/mima.png differ diff --git a/epmet-oper-web/src/assets/img/login/zhanghao.png b/epmet-oper-web/src/assets/img/login/zhanghao.png new file mode 100644 index 0000000..0bb46bb Binary files /dev/null and b/epmet-oper-web/src/assets/img/login/zhanghao.png differ diff --git a/epmet-oper-web/src/assets/scss/pages/indexWork.scss b/epmet-oper-web/src/assets/scss/pages/indexWork.scss new file mode 100644 index 0000000..e3ff39b --- /dev/null +++ b/epmet-oper-web/src/assets/scss/pages/indexWork.scss @@ -0,0 +1,115 @@ +@import "~@/assets/scss/c/config.scss"; +@import "~@/assets/scss/c/function.scss"; + +.g-bd { + &::before, + &::after { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: -1; + content: ""; + } + &::before { + background-image: url(~@/assets/img/index/bg.png); + background-size: cover; + } + &::after { + // background-color: rgba(38, 50, 56, 0.1); + } +} +.m-list { + position: fixed; + top: 50%; + left: 0; + right: 0; + margin: auto; + transform: translateY(-50%); + + .list { + display: flex; + justify-content: space-around; + width: 100%; + + .item { + width: 612px; + max-width: 612px; + text-align: center; + cursor: pointer; + + &.z-on { + .name { + color: #ffffff; + background-color: transparent; + border-color: #ffffff; + &::before { + background-color: #ffffff; + } + } + } + .logo { + width: 100%; + } + .name { + position: relative; + width: auto; + display: inline-block; + text-align: center; + margin: 8px auto; + padding-left: 48px; + padding-right: 20px; + height: 42px; + line-height: 40px; + background: #ffffff; + border: 1px solid #b9b9b9; + border-radius: 21px; + font-size: 22px; + font-family: PingFang SC; + font-weight: 500; + color: #002fec; + + &::before { + content: ""; + position: absolute; + display: block; + top: 0; + bottom: 0; + left: 20px; + margin: auto; + width: 14px; + height: 14px; + background: #0065f6; + border-radius: 50%; + } + } + + .tip { + display: block; + margin: 0 auto; + } + } + } +} + +.m-footer { + position: absolute; + bottom: 0; + left: 0; + right: 0; + padding: 20px; + color: rgba(255, 255, 255, 0.6); + text-align: center; + p { + margin: 10px 0; + } + a { + padding: 0 5px; + color: rgba(255, 255, 255, 0.6); + &:focus, + &:hover { + color: #fff; + } + } +} diff --git a/epmet-oper-web/src/assets/scss/pages/login.scss b/epmet-oper-web/src/assets/scss/pages/login.scss index c99bef7..e2636f9 100644 --- a/epmet-oper-web/src/assets/scss/pages/login.scss +++ b/epmet-oper-web/src/assets/scss/pages/login.scss @@ -7,7 +7,7 @@ bottom: 0; left: 0; z-index: -1; - content: ''; + content: ""; } &::before { background-image: url(~@/assets/img/login_bg.jpg); @@ -90,7 +90,7 @@ right: 0; left: 0; z-index: 1; - content: ''; + content: ""; height: 1px; margin-top: -0.5px; background-color: $--border-color-base; diff --git a/epmet-oper-web/src/assets/scss/pages/loginWork.scss b/epmet-oper-web/src/assets/scss/pages/loginWork.scss new file mode 100644 index 0000000..6c0f695 --- /dev/null +++ b/epmet-oper-web/src/assets/scss/pages/loginWork.scss @@ -0,0 +1,167 @@ +@import "~@/assets/scss/c/config.scss"; +@import "~@/assets/scss/c/function.scss"; + +.g-bd { + &::before, + &::after { + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: -1; + content: ""; + } + &::before { + background-image: url(~@/assets/img/login/bg.png); + background-size: cover; + } + &::after { + // background-color: rgba(38, 50, 56, 0.1); + } +} + +.m-fm { + position: absolute; + top: 0; + bottom: 0; + right: 13%; + margin: auto; + width: 484px; + height: 429px; + background: #ffffff; + box-shadow: 0px 5px 10px 0px rgba(213, 225, 238, 0.5); + border-radius: 12px 12px 12px 12px; + + .wrap { + padding-top: 5px; + + .title { + margin: 0 auto; + width: 400px; + line-height: 80px; + border-bottom: 1px solid #d4d4d4; + font-size: 34px; + font-family: PingFang SC; + font-weight: bold; + color: #000000; + text-align: center; + } + .fm { + padding: 15px 30px; + + .fm-item { + box-sizing: border-box; + margin: 0 auto; + margin-top: 16px; + width: 400px; + height: 46px; + line-height: 46px; + border: 1px solid #c6c6c6; + border-radius: 4px; + display: flex; + align-items: center; + + .input { + width: 85%; + + input { + display: block; + padding-left: 15px; + line-height: 44px; + height: 44px; + width: 100%; + border: none; + } + } + + .ico { + position: relative; + width: 35px; + height: 46px; + + img { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + margin: auto; + } + } + } + + .fm-captcha { + box-sizing: border-box; + margin: 0 auto; + margin-top: 16px; + width: 400px; + display: flex; + align-items: center; + + .fm-item { + margin: 0; + width: 200px; + } + + .captcha { + position: relative; + margin-left: auto; + width: 180px; + height: 46px; + + img { + display: block; + width: 100%; + height: 100%; + background-color: #eee; + border: none; + } + } + } + + .fm-btn { + box-sizing: border-box; + margin: 0 auto; + margin-top: 40px; + width: 400px; + height: 56px; + line-height: 56px; + background: linear-gradient(90deg, #1a5afd, #26c4ff); + border-radius: 4px; + font-size: 23px; + font-family: PingFang SC; + font-weight: 500; + color: #ffffff; + text-align: center; + cursor: pointer; + } + } + .hint { + display: none; + padding-left: 40px; + color: rgb(255, 80, 80); + } + } +} + +.m-footer { + position: absolute; + bottom: 0; + left: 0; + right: 0; + padding: 20px; + color: rgba(255, 255, 255, 0.6); + text-align: center; + p { + margin: 10px 0; + } + a { + padding: 0 5px; + color: rgba(255, 255, 255, 0.6); + &:focus, + &:hover { + color: #fff; + } + } +} diff --git a/epmet-oper-web/src/router/index.js b/epmet-oper-web/src/router/index.js index 9b8246c..9666b6e 100644 --- a/epmet-oper-web/src/router/index.js +++ b/epmet-oper-web/src/router/index.js @@ -1,18 +1,21 @@ import Vue from 'vue' import Router from 'vue-router' import http from '@/utils/request' -import { isURL } from '@/utils/validate' +import { + isURL +} from '@/utils/validate' import store from '@/js/store' Vue.use(Router) // 页面路由(独立页面) -export const pageRoutes = [ - { +export const pageRoutes = [{ path: '/404', component: () => import('@/views/pages/404'), name: '404', - meta: { title: '404未找到' }, + meta: { + title: '404未找到' + }, beforeEnter(to, from, next) { // 拦截处理特殊业务场景 // 如果, 重定向路由包含__双下划线, 为临时添加路由 @@ -26,13 +29,25 @@ export const pageRoutes = [ path: '/login', component: () => import('@/views/pages/login'), name: 'login', - meta: { title: '登录' } + meta: { + title: '登录' + } }, { path: '/loginWork', component: () => import('@/views/pages/loginWork'), name: 'loginWork', - meta: { title: '工作端登录' } + meta: { + title: '工作端登录' + } + }, + { + path: '/indexWork', + component: () => import('@/views/pages/indexWork'), + name: 'indexWork', + meta: { + title: '工作端首页' + } } ] @@ -41,14 +56,20 @@ export const moduleRoutes = { path: '/', component: () => import('@/views/main'), name: 'main', - redirect: { name: 'home' }, - meta: { title: '主入口布局' }, - children: [ - { + redirect: { + name: 'home' + }, + meta: { + title: '主入口布局' + }, + children: [{ path: '/home', component: () => import('@/views/modules/home'), name: 'home', - meta: { title: '首页', isTab: true } + meta: { + title: '首页', + isTab: true + } } // { // path: '/homeWork', @@ -66,7 +87,10 @@ export function addDynamicRoute(routeParams, router) { (item) => item.name === routeName )[0] if (dynamicRoute) { - return router.push({ name: routeName, params: routeParams.params }) + return router.push({ + name: routeName, + params: routeParams.params + }) } // 否则: 添加并全局变量保存, 再跳转 dynamicRoute = { @@ -79,20 +103,23 @@ export function addDynamicRoute(routeParams, router) { title: `${routeParams.title}` } } - router.addRoutes([ - { - ...moduleRoutes, - name: `main-dynamic__${dynamicRoute.name}`, - children: [dynamicRoute] - } - ]) + router.addRoutes([{ + ...moduleRoutes, + name: `main-dynamic__${dynamicRoute.name}`, + children: [dynamicRoute] + }]) window.SITE_CONFIG['dynamicRoutes'].push(dynamicRoute) - router.push({ name: dynamicRoute.name, params: routeParams.params }) + router.push({ + name: dynamicRoute.name, + params: routeParams.params + }) } const router = new Router({ mode: 'hash', - scrollBehavior: () => ({ y: 0 }), + scrollBehavior: () => ({ + y: 0 + }), routes: pageRoutes.concat(moduleRoutes) }) @@ -119,11 +146,11 @@ router.beforeEach((to, from, next) => { // 获取菜单列表, 添加并全局变量保存 const userType = localStorage.getItem('userType') - + if (userType === 'work') { - const customerId=localStorage.getItem('customerId') - console.log('customerId:' ,customerId) + const customerId = localStorage.getItem('customerId') + console.log('customerId:', customerId) // if(customerId==='1e68188b8f7e9ab15658c164bd5b3676'){ // // if(customerId==='45687aa479955f9d06204d415238f7cc'){ // const menuList=[ @@ -174,42 +201,60 @@ router.beforeEach((to, from, next) => { // // next({ ...to, replace: true }) // next({ ...to, replace: true }) // }else{ - http + http .get('/gov/access/menu/nav') - .then(({ data: res }) => { + .then(({ + data: res + }) => { if (res.code !== 0) { // Vue.prototype.$message.error(res.msg) - return next({ name: 'loginWork' }) + return next({ + name: 'loginWork' + }) } window.SITE_CONFIG['menuList'] = res.data fnAddDynamicMenuRoutes(window.SITE_CONFIG['menuList']) // next({ ...to, replace: true }) - next({ ...to, replace: true }) + next({ + ...to, + replace: true + }) }) .catch(() => { - next({ name: 'loginWork' }) + next({ + name: 'loginWork' + }) }) // } // localStorage.getItem('customerId') // 1e68188b8f7e9ab15658c164bd5b3676 - - + + } else { http .get('/oper/access/menu/nav') - .then(({ data: res }) => { + .then(({ + data: res + }) => { if (res.code !== 0) { // Vue.prototype.$message.error(res.msg) - return next({ name: 'login' }) + return next({ + name: 'login' + }) } window.SITE_CONFIG['menuList'] = res.data fnAddDynamicMenuRoutes(window.SITE_CONFIG['menuList']) // next({ ...to, replace: true }) - next({ ...to, replace: true }) + next({ + ...to, + replace: true + }) }) .catch(() => { - next({ name: 'login' }) + next({ + name: 'login' + }) }) } }) @@ -273,16 +318,20 @@ function fnAddDynamicMenuRoutes(menuList = [], routes = []) { return fnAddDynamicMenuRoutes(temp, routes) } // 添加路由 - router.addRoutes([ - { + router.addRoutes([{ ...moduleRoutes, name: 'main-dynamic-menu', children: routes }, - { path: '*', redirect: { name: '404' } } + { + path: '*', + redirect: { + name: '404' + } + } ]) window.SITE_CONFIG['dynamicMenuRoutes'] = routes window.SITE_CONFIG['dynamicMenuRoutesHasAdded'] = true } -export default router +export default router \ No newline at end of file diff --git a/epmet-oper-web/src/views/pages/indexWork.vue b/epmet-oper-web/src/views/pages/indexWork.vue new file mode 100644 index 0000000..760ff1a --- /dev/null +++ b/epmet-oper-web/src/views/pages/indexWork.vue @@ -0,0 +1,86 @@ + + + + diff --git a/epmet-oper-web/src/views/pages/loginWork.vue b/epmet-oper-web/src/views/pages/loginWork.vue index 3a0bffb..2297c81 100644 --- a/epmet-oper-web/src/views/pages/loginWork.vue +++ b/epmet-oper-web/src/views/pages/loginWork.vue @@ -1,141 +1,93 @@ - - +