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/img/shequ/function/daichulishixiang.png b/epmet-oper-web/src/assets/img/shequ/function/daichulishixiang.png new file mode 100644 index 0000000..a169c35 Binary files /dev/null and b/epmet-oper-web/src/assets/img/shequ/function/daichulishixiang.png differ diff --git a/epmet-oper-web/src/assets/img/shequ/function/daichulixiangmu.png b/epmet-oper-web/src/assets/img/shequ/function/daichulixiangmu.png new file mode 100644 index 0000000..b5e2bf3 Binary files /dev/null and b/epmet-oper-web/src/assets/img/shequ/function/daichulixiangmu.png differ diff --git a/epmet-oper-web/src/assets/img/shequ/function/daichuliyiti.png b/epmet-oper-web/src/assets/img/shequ/function/daichuliyiti.png new file mode 100644 index 0000000..fbc653c Binary files /dev/null and b/epmet-oper-web/src/assets/img/shequ/function/daichuliyiti.png differ diff --git a/epmet-oper-web/src/assets/img/shequ/function/fuwuguanli.png b/epmet-oper-web/src/assets/img/shequ/function/fuwuguanli.png new file mode 100644 index 0000000..2860e32 Binary files /dev/null and b/epmet-oper-web/src/assets/img/shequ/function/fuwuguanli.png differ diff --git a/epmet-oper-web/src/assets/img/shequ/function/laorenguanhuai.png b/epmet-oper-web/src/assets/img/shequ/function/laorenguanhuai.png new file mode 100644 index 0000000..f58d8f8 Binary files /dev/null and b/epmet-oper-web/src/assets/img/shequ/function/laorenguanhuai.png differ diff --git a/epmet-oper-web/src/assets/img/shequ/function/qunzuguanli.png b/epmet-oper-web/src/assets/img/shequ/function/qunzuguanli.png new file mode 100644 index 0000000..4b7f4f2 Binary files /dev/null and b/epmet-oper-web/src/assets/img/shequ/function/qunzuguanli.png differ diff --git a/epmet-oper-web/src/assets/img/shequ/function/tianjiayingyong.png b/epmet-oper-web/src/assets/img/shequ/function/tianjiayingyong.png new file mode 100644 index 0000000..2a2db3b Binary files /dev/null and b/epmet-oper-web/src/assets/img/shequ/function/tianjiayingyong.png differ diff --git a/epmet-oper-web/src/assets/img/shequ/function/tongxingjilu.png b/epmet-oper-web/src/assets/img/shequ/function/tongxingjilu.png new file mode 100644 index 0000000..4749bd5 Binary files /dev/null and b/epmet-oper-web/src/assets/img/shequ/function/tongxingjilu.png differ diff --git a/epmet-oper-web/src/assets/img/shequ/function/weixiugongdan.png b/epmet-oper-web/src/assets/img/shequ/function/weixiugongdan.png new file mode 100644 index 0000000..a35e173 Binary files /dev/null and b/epmet-oper-web/src/assets/img/shequ/function/weixiugongdan.png differ diff --git a/epmet-oper-web/src/assets/img/shequ/function/wuyefuwu.png b/epmet-oper-web/src/assets/img/shequ/function/wuyefuwu.png new file mode 100644 index 0000000..4779bbf Binary files /dev/null and b/epmet-oper-web/src/assets/img/shequ/function/wuyefuwu.png differ diff --git a/epmet-oper-web/src/assets/img/shequ/logo.png b/epmet-oper-web/src/assets/img/shequ/logo.png new file mode 100644 index 0000000..5e32b0c Binary files /dev/null and b/epmet-oper-web/src/assets/img/shequ/logo.png differ diff --git a/epmet-oper-web/src/assets/img/shequ/search.png b/epmet-oper-web/src/assets/img/shequ/search.png new file mode 100644 index 0000000..e59cb15 Binary files /dev/null and b/epmet-oper-web/src/assets/img/shequ/search.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/js/store/index.js b/epmet-oper-web/src/js/store/index.js index aece0c4..c11512f 100644 --- a/epmet-oper-web/src/js/store/index.js +++ b/epmet-oper-web/src/js/store/index.js @@ -19,6 +19,7 @@ export default new Vuex.Store({ // 侧边栏, 菜单 sidebarMenuList: [], sidebarMenuActiveName: '', + LevelOneMenuActiveName: '', // 内容, 是否需要刷新 contentIsNeedRefresh: false, // 内容, 标签页(默认添加首页) diff --git a/epmet-oper-web/src/router/index.js b/epmet-oper-web/src/router/index.js index d7a0a6c..9666b6e 100644 --- a/epmet-oper-web/src/router/index.js +++ b/epmet-oper-web/src/router/index.js @@ -1,19 +1,22 @@ 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未找到' }, - beforeEnter (to, from, next) { + meta: { + title: '404未找到' + }, + beforeEnter(to, from, next) { // 拦截处理特殊业务场景 // 如果, 重定向路由包含__双下划线, 为临时添加路由 if (/__.*/.test(to.redirectedFrom)) { @@ -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', @@ -59,14 +80,17 @@ export const moduleRoutes = { ] } -export function addDynamicRoute (routeParams, router) { +export function addDynamicRoute(routeParams, router) { // 组装路由名称, 并判断是否已添加, 如是: 则直接跳转 var routeName = routeParams.routeName var dynamicRoute = window.SITE_CONFIG['dynamicRoutes'].filter( (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) }) @@ -120,6 +147,7 @@ router.beforeEach((to, from, next) => { const userType = localStorage.getItem('userType') + if (userType === 'work') { const customerId = localStorage.getItem('customerId') console.log('customerId:', customerId) @@ -175,39 +203,58 @@ router.beforeEach((to, from, next) => { // }else{ 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 - console.log('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' + }) }) } }) @@ -217,7 +264,7 @@ router.beforeEach((to, from, next) => { * @param {*} route 当前路由 * @param {*} pageRoutes 页面路由 */ -function fnCurrentRouteIsPageRoute (route, pageRoutes = []) { +function fnCurrentRouteIsPageRoute(route, pageRoutes = []) { var temp = [] for (var i = 0; i < pageRoutes.length; i++) { if (route.path === pageRoutes[i].path) { @@ -235,7 +282,7 @@ function fnCurrentRouteIsPageRoute (route, pageRoutes = []) { * @param {*} menuList 菜单列表 * @param {*} routes 递归创建的动态(菜单)路由 */ -function fnAddDynamicMenuRoutes (menuList = [], routes = []) { +function fnAddDynamicMenuRoutes(menuList = [], routes = []) { var temp = [] for (var i = 0; i < menuList.length; i++) { if (menuList[i].children && menuList[i].children.length >= 1) { @@ -271,15 +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/main-navbar.vue b/epmet-oper-web/src/views/main-navbar.vue index 1f6024e..3c75160 100644 --- a/epmet-oper-web/src/views/main-navbar.vue +++ b/epmet-oper-web/src/views/main-navbar.vue @@ -1,31 +1,56 @@ - + - - {{ userType==='work'?customerName :$t('brand.lg') }} - {{ $t('brand.mini') }} + + {{ + userType === 'work' ? customerName : $t('brand.lg') + }} + {{ + $t('brand.mini') + }} - - - + + + + + + + {{ menu.name }} + - + + - - + + - - - + + - - + + {{ $store.state.user.realName }} - {{ $t('logout') }} + {{ + $t('logout') + }} - + - + - diff --git a/epmet-oper-web/src/views/main-theme-tools.vue b/epmet-oper-web/src/views/main-theme-tools.vue index 867e987..b4c662e 100644 --- a/epmet-oper-web/src/views/main-theme-tools.vue +++ b/epmet-oper-web/src/views/main-theme-tools.vue @@ -1,21 +1,34 @@ - + + + Navbar - colorful 鲜艳 + colorful 鲜艳 Sidebar - dark 黑色 + dark 黑色 Theme - {{ `${item.name} ${item.desc}` }} + {{ `${item.name} ${item.desc}` }} @@ -24,23 +37,34 @@ 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 @@ - - - - - - {{ $t('brand.work') }} - - - {{ $t('login.title') }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {{ $t('login.title') }} - - - - - - {{ '请使用小程序端的账号密码登录'}} - + + + + + {{ $t('brand.work') }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ $t('login.title') }} + + 请使用小程序端的账号密码登录 + + + + - + + - - {{item.customerName}} + + {{ + item.customerName + }} - - - - - +
- {{ '请使用小程序端的账号密码登录'}} -