Commit cfd68fc2 by liimin

登录框修改 部分依赖通过cdn引入 不打包

1 parent 1ccf618b
......@@ -7,7 +7,7 @@ VUE_APP_TITLE=tFIMS
VUE_APP_API=http://192.168.3.171:7300/mock/5d638b3b6fbe9a0ac59d872e/tFIMS
# 仓库地址
VUE_APP_REPO=
VUE_APP_REPO=http://192.168.3.171:7300/mock/5d638b3b6fbe9a0ac59d872e/tFIMS
# 国际化配置
VUE_APP_I18N_LOCALE=zh-chs
......
......@@ -12,9 +12,6 @@
"test:unit": "vue-cli-service test:unit"
},
"dependencies": {
"@d2-projects/d2-crud": "^2.1.1",
"@d2-projects/vue-table-export": "^1.0.1",
"@d2-projects/vue-table-import": "^1.0.0",
"axios": "^0.18.0",
"better-scroll": "^1.15.2",
"core-js": "^2.6.5",
......@@ -28,7 +25,6 @@
"js-md5": "^0.7.3",
"lodash": "^4.17.11",
"lowdb": "^1.0.0",
"mockjs": "^1.0.1-beta3",
"nprogress": "^0.2.0",
"qs": "^6.7.0",
"screenfull": "^4.2.0",
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>icon.ico">
<title><%= VUE_APP_TITLE %></title>
<style>
html, body, #app { height: 100%; margin: 0px; padding: 0px; width: 100%; }
.d2-home { background-color:#000; height: 100%; display: flex; flex-direction: column; }
.d2-home__main { user-select: none; width: 100%; flex-grow: 1; display: flex; justify-content: center; align-items: center; flex-direction: column; }
.d2-home__footer { width: 100%; flex-grow: 0; text-align: center; padding: 1em 0; }
.d2-home__footer > a { font-size: 12px; color: #fff; text-decoration: none; }
.d2-home__loading { height: 32px; width: 32px; margin-bottom: 20px; }
.d2-home__title { color: #FFF; font-size: 20px; margin-bottom: 10px; }
.d2-home__sub-title { color: #fff; font-size: 14px; }
</style>
<!-- <script>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>icon.ico">
<!-- 使用CDN的CSS文件 -->
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.css) { %>
<link href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" rel="preload" as="style" />
<link href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" rel="stylesheet" />
<% } %>
<!-- 使用CDN的JS文件 预加载 -->
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
<link href="<%= htmlWebpackPlugin.options.cdn.js[i] %>" rel="preload" as="script" />
<% } %>
<title><%= VUE_APP_TITLE %></title>
<style>
html,
body,
#app {
height: 100%;
margin: 0px;
padding: 0px;
width: 100%;
}
.d2-home {
background-color: #000;
height: 100%;
display: flex;
flex-direction: column;
}
.d2-home__main {
user-select: none;
width: 100%;
flex-grow: 1;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.d2-home__footer {
width: 100%;
flex-grow: 0;
text-align: center;
padding: 1em 0;
}
.d2-home__footer>a {
font-size: 12px;
color: #fff;
text-decoration: none;
}
.d2-home__loading {
height: 32px;
width: 32px;
margin-bottom: 20px;
}
.d2-home__title {
color: #FFF;
font-size: 20px;
margin-bottom: 10px;
}
.d2-home__sub-title {
color: #fff;
font-size: 14px;
}
</style>
<!-- <script>
var _hmt = _hmt || [];
var hmid = "1dfa88d0c8571eef2d383070cb3e5ca1";
(function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?" + hmid; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s);})();
</script> -->
</head>
<body>
<noscript>
<strong>
很抱歉,如果没有 JavaScript 支持,D2Admin 将不能正常工作。请启用浏览器的 JavaScript 然后继续。
</strong>
</noscript>
<div id="app">
<div class="d2-home">
<div class="d2-home__main">
<img
class="d2-home__loading"
src="./image/loading/loading-spin.svg"
alt="loading">
<div class="d2-home__title">
正在加载资源
</div>
<div class="d2-home__sub-title">
初次加载资源可能需要较多时间 请耐心等待
</div>
</head>
<body>
<noscript>
<strong>
很抱歉,如果没有 JavaScript 支持,D2Admin 将不能正常工作。请启用浏览器的 JavaScript 然后继续。
</strong>
</noscript>
<div id="app">
<div class="d2-home">
<div class="d2-home__main">
<img class="d2-home__loading" src="./image/loading/loading-spin.svg" alt="loading">
<div class="d2-home__title">
正在加载资源
</div>
<div class="d2-home__footer">
<a
href="https://github.com/d2-projects/d2-admin"
target="_blank">
https://github.com/d2-projects/d2-admin
</a>
<div class="d2-home__sub-title">
初次加载资源可能需要较多时间 请耐心等待
</div>
</div>
<div class="d2-home__footer">
<a href="https://github.com/d2-projects/d2-admin" target="_blank">
https://github.com/d2-projects/d2-admin
</a>
</div>
</div>
</body>
</html>
</div>
<!-- built files will be auto injected -->
<% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
<script src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
<% } %>
</body>
</html>
\ No newline at end of file
......@@ -2,7 +2,7 @@
* @Author: limin
* @Date: 2019-08-26 18:02:41
* @Last Modified by: limin
* @Last Modified time: 2019-08-28 15:04:32
* @Last Modified time: 2019-08-29 03:55:24
*/
import axios from '@/plugin/axios'
......@@ -13,8 +13,9 @@ const request = (params, method) => {
params.timestamp = new Date().getTime()
params.v = '1.0.0'
params.format = 'json'
const url = process.env.NODE_ENV === 'production' ? 'router' : params.method
// const url = process.env.NODE_ENV === 'production' ? 'router' : params.method
// return axios.post(url, { 'params': sign(params) })
const url = params.method
return axios({
url,
method: method || 'get',
......
......@@ -2,7 +2,7 @@
html, body {
margin: 0px;
height: 100%;
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
font-family: "微软雅黑","Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
#app {
@extend %full;
a {
......
......@@ -9,7 +9,7 @@
</template>
<script>
import {mapGetters} from 'vuex'
import { mapGetters } from 'vuex'
export default {
name: 'AuthButton',
props: {
......@@ -43,20 +43,18 @@ export default {
},
data () {
return {
isInRole:false
isInRole: false
}
},
created () {
// this.$vrm.setRoles(this.btnIdAll)
const {action,operation} = this.curBtns
this.isInRole = [...action,...operation].find(obj=>obj.id===this.id||obj.label===this.label)
const { action, operation } = this.curBtns
this.isInRole = [...action, ...operation].find(obj => obj.id === this.id || obj.label === this.label)
},
methods: {
handleClick: function () {
this.$emit('e-auth-click', {})
}
},
mounted () {
}
}
</script>
......
......@@ -122,11 +122,6 @@ export default {
// }
// }
},
watch: {
},
mounted () {
},
methods: {
// getPersonalType() {
// const params = {}
......
......@@ -122,8 +122,6 @@ export default {
// }
// }
},
mounted () {
},
methods: {
// getPersonalType() {
// const params = {}
......
......@@ -120,8 +120,6 @@ export default {
openUserMsgDialog: function () {
console.log('aaaa')
}
},
mounted () {
}
}
</script>
......
......@@ -29,7 +29,7 @@
<!-- 如果你只想在开发环境显示这个按钮请添加 v-if="$env === 'development'" -->
<d2-header-search @click="handleSearchClick"/>
<d2-header-log />
<!-- <d2-header-size /> -->
<d2-header-size />
<d2-header-fullscreen/>
<d2-header-locales />
<d2-header-theme/>
......
......@@ -82,28 +82,28 @@ util.deepFind = function (menus, id) {
* @param {*} alpha 透明度
*/
util.colorToRgb = (sColor, alpha) => {
var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/
sColor = sColor.toLowerCase()
if (sColor && reg.test(sColor)) {
if (sColor.length === 4) {
var sColorNew = '#'
for (var i = 1; i < 4; i += 1) {
sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1))
}
sColor = sColorNew
}
// 处理六位的颜色值
var sColorChange = []
for (let i = 1; i < 7; i += 2) {
sColorChange.push(parseInt('0x' + sColor.slice(i, i + 2)))
}
if (alpha || alpha === 0 || alpha === '0') {
return `rgba(${sColorChange.join(',')} ,${alpha})`
}
return `rgb(${sColorChange.join(',')})`
} else {
return sColor
}
var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/
sColor = sColor.toLowerCase()
if (sColor && reg.test(sColor)) {
if (sColor.length === 4) {
var sColorNew = '#'
for (var i = 1; i < 4; i += 1) {
sColorNew += sColor.slice(i, i + 1).concat(sColor.slice(i, i + 1))
}
sColor = sColorNew
}
// 处理六位的颜色值
var sColorChange = []
for (let i = 1; i < 7; i += 2) {
sColorChange.push(parseInt('0x' + sColor.slice(i, i + 2)))
}
if (alpha || alpha === 0 || alpha === '0') {
return `rgba(${sColorChange.join(',')} ,${alpha})`
}
return `rgb(${sColorChange.join(',')})`
} else {
return sColor
}
}
export default util
......@@ -14,23 +14,23 @@ permision.packRoutesBtns = function (resources, idsInPermision) {
if (!resources || !idsInPermision || !idsInPermision.length) {
throw new Error('参数错误')
}
let __aRouteInPermision = [],
__oBtnInPermision = {},
// __aBtnIdAll=[],
__objResource = null
let __aRouteInPermision = []
let __oBtnInPermision = {}
// __aBtnIdAll=[],
let __objResource = null
idsInPermision.forEach(obj => {
__objResource = resources[obj.id]
if(__objResource){//直接能取到的为路由 (也可以在routes 中定标识变量)
__aRouteInPermision.push(resources[obj.id])//push 进 路由数组
}else{ //如果取不到 判断是否有父节点 并且父节点是否有auth属性 有 则视为按钮 (同样可以定义标识变量)
__objResource = resources[obj.id]
if (__objResource) { // 直接能取到的为路由 (也可以在routes 中定标识变量)
__aRouteInPermision.push(resources[obj.id])// push 进 路由数组
} else { // 如果取不到 判断是否有父节点 并且父节点是否有auth属性 有 则视为按钮 (同样可以定义标识变量)
__objResource = resources[obj.pid]
if(__objResource && __objResource.auth && !__oBtnInPermision[obj.pid]){
__oBtnInPermision[obj.pid]=__objResource.auth
if (__objResource && __objResource.auth && !__oBtnInPermision[obj.pid]) {
__oBtnInPermision[obj.pid] = __objResource.auth
// __aBtnIdAll = __aBtnIdAll.concat([...__objResource.auth.action.map(o=>o.id),...__objResource.auth.operation.map(o=>o.id)])
}
}
})
return {'route':__aRouteInPermision,'btn':__oBtnInPermision}
return { 'route': __aRouteInPermision, 'btn': __oBtnInPermision }
}
/**
......@@ -49,12 +49,12 @@ permision.packAsideMenus = function (resources, idsInPermision) {
*/
idsInPermision.forEach(obj => {
const __oMenu = permision.format2Menu(resources[obj.id])
if(!__oMenu){ //不存在 可能是 按钮 直接继续循环
return true
if (!__oMenu) { // 不存在 可能是 按钮 直接继续循环
return true
}
if (obj.pid === '0') {//取出1级菜单
if (obj.pid === '0') { // 取出1级菜单
__aMenusInPermision.push(__oMenu)
} else {//取出子菜单
} else { // 取出子菜单
__aSub.push(__oMenu)
}
})
......@@ -77,7 +77,7 @@ permision.packAsideMenus = function (resources, idsInPermision) {
* 格式化菜单 封装成系统所需格式
*/
permision.format2Menu = function (oMenu) {
if(!oMenu) return null
if (!oMenu) return null
const { icon, path, meta } = oMenu
const { title, id, pid } = meta
return { title, icon, path, id, pid }
......
......@@ -7,7 +7,7 @@ import d2Admin from '@/plugin/d2admin'
// store
import store from '@/store/index'
import D2Crud from '@d2-projects/d2-crud'
// import D2Crud from '@d2-projects/d2-crud'
// 菜单和路由设置
import router from './router'
// import menuHeader from '@/menu/header'
......@@ -15,31 +15,31 @@ import router from './router'
// import { frameInRoutes } from '@/router/routes'
import echarts from 'echarts'
import VRM from 'vue-role-manager'
Vue.use(VRM, {
router,
redirect: '403',
enabled: false
})
// import VRM from 'vue-role-manager'
// Vue.use(VRM, {
// router,
// redirect: '403',
// enabled: false
// })
// 核心插件
Vue.use(d2Admin)
Vue.use(D2Crud)
// Vue.use(D2Crud)
Vue.prototype.$echarts = echarts
new Vue({
router,
store,
i18n,
render: h => h(App),
created () {
// 处理路由 得到每一级的路由设置
// this.$store.commit('d2admin/page/init', frameInRoutes)
// 设置顶栏菜单 (暂时不需要)
// this.$store.commit('d2admin/menu/headerSet', menuHeader)
// 设置侧边栏菜单 (TODO 进行过滤)
// this.$store.commit('d2admin/menu/asideSet', menuAside)
// 初始化菜单搜索功能
// this.$store.commit('d2admin/search/init', menuHeader)
},
// created () {
// 处理路由 得到每一级的路由设置
// this.$store.commit('d2admin/page/init', frameInRoutes)
// 设置顶栏菜单 (暂时不需要)
// this.$store.commit('d2admin/menu/headerSet', menuHeader)
// 设置侧边栏菜单 (TODO 进行过滤)
// this.$store.commit('d2admin/menu/asideSet', menuAside)
// 初始化菜单搜索功能
// this.$store.commit('d2admin/search/init', menuHeader)
// },
mounted () {
// 展示系统信息
this.$store.commit('d2admin/releases/versionShow')
......
......@@ -14,7 +14,7 @@ import routes from './routes'
const originalPush = VueRouter.prototype.push // 解决连续点击路由异常问题 limin
VueRouter.prototype.push = function push (location) {
return originalPush.call(this, location).catch(err => err)
return originalPush.call(this, location) && originalPush.call(this, location).catch(err => err)
}
Vue.use(VueRouter)
......@@ -39,6 +39,7 @@ router.beforeEach(async (to, from, next) => {
store.commit('d2admin/search/set', false)
if (from.name === null && to.path !== '/login' && !source) { // 页面刷新 动态路由会失效 初始化路由与左侧菜单栏
await store.dispatch('d2admin/auth/init')
await store.dispatch('d2admin/account/load')
next(to.path)
} else if (to.matched.some(r => r.meta.auth)) { // 验证当前路由所有的匹配中是否需要有登录验证的
// 这里暂时将cookie里是否存有token作为验证是否登录的条件
......@@ -55,7 +56,6 @@ router.beforeEach(async (to, from, next) => {
redirect: to.fullPath
}
})
// https://github.com/d2-projects/d2-admin/issues/138
NProgress.done()
}
} else {
......
......@@ -28,7 +28,7 @@ export const home = {
},
component: _import('systemMonitor')
}
export const sys =[
export const sys = [
// 系统 前端日志
{
path: 'log',
......@@ -94,11 +94,11 @@ export const resources = {
auth: {
'operation': [{ // 列表操作
id: '1020201',
pid:'10202',
pid: '10202',
label: '查看'
}, { //
id: '1020202',
pid:'10202',
pid: '10202',
label: '编辑'
}],
'action': [] // 按钮操作
......@@ -116,11 +116,11 @@ export const resources = {
auth: {
'operation': [{ // 列表操作
id: '1020301',
pid:'10203',
pid: '10203',
label: '查看'
}, { //
id: '1020302',
pid:'10203',
pid: '10203',
label: '编辑'
}],
'action': [] // 按钮操作
......
......@@ -32,12 +32,6 @@ export default {
util.cookies.set('uuid', res.uuid)
util.cookies.set('token', res.token)
const { user, resources } = res
// const __aRoutesInPermisions= util.permision.packRoutes(sources,resources)
// frameInRoutes[0].children=[dashboard,...__aRoutesInPermisions];
// router.addRoutes(frameInRoutes)
// const __aMenusInPermisions = util.permision.packAsideMenus(sources,resources)
// await commit('d2admin/page/init', frameInRoutes, { root: true })
// await commit('d2admin/menu/asideSet', [dashboard,...__aMenusInPermisions], { root: true })
await dispatch('d2admin/auth/set', resources, { root: true })
// 设置 vuex 用户信息
await dispatch('d2admin/user/set', {
......
......@@ -6,14 +6,14 @@
*/
import util from '@/libs/util.js'
import router from '@/router'
import { resources as sources, home, frameInRoutes,sys } from '@/router/routes'
import { resources as sources, home, frameInRoutes, sys } from '@/router/routes'
export default {
namespaced: true,
state: {
source:null,
meta:{},
btns:{},
btnIdAll:[]
source: null,
meta: {},
btns: {},
btnIdAll: []
},
getters: {
/**
......@@ -39,16 +39,16 @@ export default {
},
/**
* 返回当前页面的btn
* @param {*} state
* @param {*} state
*/
curBtns(state){
curBtns (state) {
return state.btns[state.meta.id]
},
/**
* 返回当前页面的btn
* @param {*} state
* @param {*} state
*/
btnIdAll(state){
btnIdAll (state) {
return state.btnIdAll
}
},
......@@ -118,8 +118,8 @@ export default {
// 获取权限资源点
const __source = await dispatch('load')
// 过滤资源点 并动态添加到路由
const { route,btn } = util.permision.packRoutesBtns(sources, __source)
frameInRoutes[0].children = [home, ...route,...sys]
const { route, btn } = util.permision.packRoutesBtns(sources, __source)
frameInRoutes[0].children = [home, ...route, ...sys]
router.addRoutes(frameInRoutes)
state.btns = btn
await commit('d2admin/page/init', frameInRoutes, { root: true })
......
......@@ -46,7 +46,7 @@
</template>
</el-table-column>
</el-table>
</d2-container>
</template>
......@@ -57,10 +57,6 @@ export default {
alert(JSON.stringify(row))
}
},
components: {
},
mounted () {
},
data () {
return {
btn: {
......
......@@ -115,9 +115,6 @@ export default {
this.$refs.editRuleForm.resetFields()
}
},
mounted: {},
methods: {
handleClose () {
this.$emit('closeDialog')
......
......@@ -25,9 +25,9 @@ export const getBingImages = options => {
// request({ url: 'http://localhost:3000/api/wallpaper' }).then(res => {
// console.log(JSON.parse(res.data).base64)
// if (res.status === 'success') {
resolve(res)
resolve(res)
// } else {
// reject('ERROR.')
// reject('ERROR.')
// }
})
})
......
......@@ -11,7 +11,7 @@ export default {
refresh: Boolean,
withAnimation: Boolean
},
data() {
data () {
return {
oBgStyle: {
backgroundImage: '',
......@@ -19,7 +19,7 @@ export default {
}
}
},
beforeMount() {
beforeMount () {
// const oBg = this.$get_session('oBg')
// if (oBg && !this.refresh) {
// this.oBgStyle.backgroundImage = oBg.bgi
......@@ -32,8 +32,8 @@ export default {
const oBg = { bgi: this.oBgStyle.backgroundImage, copyright, copyrightlink }
// this.$set_session('oBg', JSON.stringify(oBg))
this.$emit('update:oBg', oBg)
}).catch(err=>{
console.log(err);
}).catch(err => {
console.log(err)
})
}
}
......@@ -57,4 +57,3 @@ export default {
animation: img-action 18s
}
</style>
......@@ -17,93 +17,74 @@
flex="dir:top main:justify cross:stretch box:justify">
<div class="page-login--content-header">
<p class="page-login--content-header-motto">
时间是一切财富中最宝贵的财富
</p>
</div>
<div
class="page-login--content-main"
flex="dir:top main:center cross:center">
<!-- logo -->
<img class="page-login--logo" src="./image/logo@2x.png">
<!-- form -->
<div class="page-login--form">
<el-card shadow="never">
<div class="form-left">
<el-form
ref="loginForm"
label-position="top"
:rules="rules"
:model="formLogin"
size="default">
<el-form-item prop="username">
<el-input
type="text"
v-model="formLogin.username"
placeholder="用户名">
<i slot="prepend" class="fa fa-user-circle-o"></i>
</el-input>
</el-form-item>
<el-form-item prop="password">
<el-input
type="password"
v-model="formLogin.password"
placeholder="密码">
<i slot="prepend" class="fa fa-keyboard-o"></i>
</el-input>
</el-form-item>
<el-form-item prop="code">
<el-input
type="text"
v-model="formLogin.code"
placeholder="验证码">
<template slot="append">
<img class="login-code" src="./image/login-code.png">
</template>
</el-input>
</el-form-item>
<el-button
size="default"
@click="submit"
type="primary"
class="button-login">
登录
</el-button>
<div class="title-wrap">
<span class="form-title">tFIMS管理系统</span>
<span class="form-sub">让服务更智慧、更直接</span>
</div>
<div class="input-wrap">
<el-form-item prop="username">
<el-input
type="text"
v-model="formLogin.username"
placeholder="请输入用户名">
<i slot="prepend" class="fa fa-user-circle-o"></i>
</el-input>
</el-form-item>
<el-form-item prop="password">
<el-input
type="password"
v-model="formLogin.password"
placeholder="请输入密码">
<i slot="prepend" class="fa fa-keyboard-o"></i>
</el-input>
</el-form-item>
<el-form-item class="form-action">
<el-button
size="default"
@click="submit"
type="primary"
class="button-login">
登录
</el-button>
<el-button
size="default"
@click="submit"
type="primary"
class="button-reg">
注册
</el-button>
</el-form-item>
</div>
</el-form>
</el-card>
<p
class="page-login--options"
flex="main:justify cross:center">
<span><d2-icon name="question-circle"/> 忘记密码</span>
<span>注册用户</span>
</p>
<!-- quick login -->
<!-- <el-button class="page-login--quick" size="default" type="info" @click="dialogVisible = true">
快速选择用户(测试功能)
</el-button> -->
</div>
<div class="form-right">
<div class="img-top">
</div>
<div class="img-bg"></div>
</div>
</div>
</div>
<div class="page-login--content-footer">
<!-- <p class="page-login--content-footer-locales">
<a
v-for="language in $languages"
:key="language.value"
:command="language.value"
@click="$i18n.locale = language.value">
{{ language.label }}
</a>
</!-->
<p class="page-login--content-footer-copyright">
Copyright
版权所有
<d2-icon name="copyright"/>
2018 D2 Projects 开源组织出品
<a href="https://github.com/FairyEver">
@FairyEver
</a>
-2019 GLSX粤ICP备12020087号
</p>
<!-- <p class="page-login--content-footer-options">
<a href="#">帮助</a>
<a href="#">隐私</a>
<a href="#">条款</a>
</p> -->
</div>
</div>
</div>
......@@ -246,7 +227,7 @@ export default {
<style lang="scss">
.page-login {
@extend %unable-select;
$backgroundColor: #F0F2F5;
$backgroundColor: #2A343D;
// ---
background-color: $backgroundColor;
height: 100%;
......@@ -282,69 +263,91 @@ export default {
font-size: 12px;
}
}
// main
.page-login--logo {
width: 240px;
margin-bottom: 2em;
margin-top: -2em;
}
// 登录表单
.page-login--form {
width: 280px;
// 卡片
.el-card {
margin-bottom: 15px;
}
// 登录按钮
.button-login {
width: 100%;
}
// 输入框左边的图表区域缩窄
.el-input-group__prepend {
padding: 0px 14px;
}
.login-code {
height: 40px - 2px;
display: block;
margin: 0px -20px;
border-top-right-radius: 2px;
border-bottom-right-radius: 2px;
}
// 登陆选项
.page-login--options {
margin: 0px;
padding: 0px;
font-size: 14px;
color: $color-primary;
margin-bottom: 15px;
font-weight: bold;
}
.page-login--quick {
width: 100%;
}
}
// 快速选择用户面板
.page-login--quick-user {
@extend %flex-center-col;
padding: 10px 0px;
border-radius: 4px;
&:hover {
background-color: $color-bg;
i {
color: $color-text-normal;
width: 720px;
height:400px;
background: #FFFFFF;
box-shadow: 0 8px 20px 0 rgba(0,0,0,0.06);
border-radius: 16px;
padding:40px 0 0 37px;
box-sizing: border-box;
display: flex;
justify-content: space-between;
.form-left{
width: 300px;
.title-wrap{
width: 180px;
height: 45px;
margin-bottom: 62px;
.form-title{
font-size: 20px;
color: #333333;
line-height: 28px;
}
.form-sub{
font-size: 12px;
color: #999;
line-height: 17px;
float: left;
}
}
span {
color: $color-text-normal;
.input-warp{
.el-input{
width: 300px;
height: 35px;
margin-bottom: 24px;
background: #FFFFFF;
border: 1px solid #DDDDDD;
border-radius: 2px;
}
}
.form-action{
.el-button{
width: 145px;
height: 35px;
border-radius: 2px;
letter-spacing: 2px;
font-size: 14px;
line-height: 35px;
display: flex;
justify-content: center;
box-sizing: border-box;
span{
transform: translateY(-12px);
}
}
.button-login{
background-color: #3D6FE4;
color: #FFF;
letter-spacing: 2px;
float: left;
}
.button-reg{
border: 1px solid #DDD;
background-color: #fff;
opacity: 0.9;
color: #333;
float: right;
}
}
}
i {
font-size: 36px;
color: $color-text-sub;
}
span {
font-size: 12px;
margin-top: 10px;
color: $color-text-sub;
.form-right{
width: 354px;
.img-top{
width: 364px;
height: 24px;
background: url('./image/bz.png');
margin-bottom: 53px;
transform: translateX(-20px);
}
.img-bg{
// box-sizing: border-box;
background: url('./image/bg.png');
width: 322px;
height: 276px;
// border:6px solid #F4F9FF;
}
}
}
// footer
......@@ -370,7 +373,7 @@ export default {
padding: 0px;
margin: 0px;
margin-bottom: 10px;
font-size: 12px;
font-size: 16px;
line-height: 12px;
text-align: center;
color: $color-text-normal;
......
......@@ -173,8 +173,6 @@ export default {
this.getNowFormatDate()
}, 1000 / 60)
},
mounted() {
},
beforeDestroy() {
clearInterval(this.timer)
this.timer = null
......
......@@ -85,9 +85,6 @@ export default {
this.$refs.editRuleForm.resetFields()
}
},
mounted: {},
methods: {
handleClose () {
this.$emit('closeDialog')
......
......@@ -11,7 +11,23 @@ process.env.VUE_APP_BUILD_TIME = require('dayjs')().format('YYYY-M-D HH:mm:ss')
// 基础路径 注意发布之前要先修改这里
let publicPath = '/'
const CDN_DOMAIN = 'https://cdn.bootcss.com'
const cdn = {
css: [
`${CDN_DOMAIN}/element-ui/2.11.1/theme-chalk/index.css`,
`${CDN_DOMAIN}/nprogress/0.2.0/nprogress.min.css`
],
js: [
`${CDN_DOMAIN}/vue/2.6.10/vue.min.js`,
`${CDN_DOMAIN}/vue-router/3.0.6/vue-router.min.js`,
`${CDN_DOMAIN}/element-ui/2.11.1/index.js`,
`${CDN_DOMAIN}/vuex/3.1.1/vuex.min.js`,
`${CDN_DOMAIN}/axios/0.19.0/axios.min.js`,
`${CDN_DOMAIN}/js-cookie/2.2.0/js.cookie.min.js`,
`${CDN_DOMAIN}/nprogress/0.2.0/nprogress.min.js`
// `${CDN_DOMAIN}/lodash.js/4.17.15/lodash.min.js`
]
}
module.exports = {
publicPath, // 根据你的实际情况更改这里
lintOnSave: true,
......@@ -27,6 +43,16 @@ module.exports = {
}
},
configureWebpack: config => {
config.externals = {
'vue': 'Vue',
'element-ui': 'ELEMENT',
'vue-router': 'VueRouter',
'vuex': 'Vuex',
'axios': 'axios',
'js-cookie': 'Cookies',
'nprogress': 'NProgress'
// 'lodash':'lodash'
}
// 非开发环境
if (process.env.NODE_ENV !== 'development') {
config.optimization.minimizer[0].options.terserOptions.compress.warnings = false
......@@ -34,6 +60,14 @@ module.exports = {
config.optimization.minimizer[0].options.terserOptions.compress.drop_debugger = true
config.optimization.minimizer[0].options.terserOptions.compress.pure_funcs = ['console.log']
}
// const Plugins = [
// new MiniCssExtractPlugin({
// // Options similar to the same options in webpackOptions.output
// // both options are optional
// filename: devMode ? 'css/[name].css' : 'css/[name].[hash].css',
// chunkFilename: devMode ? 'css/[id].css' : 'css/[id].[hash].css',
// })]
// config.plugins = [...config.plugins, ...Plugins]
},
// 默认设置: https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-service/lib/config/base.js
......@@ -96,6 +130,12 @@ module.exports = {
config.resolve.alias
.set('@', resolve('src'))
.set('@api', resolve('src/api'))
config.plugin('html')
.tap(args => {
// args[0].minify.removeComments = false;
args[0].cdn = cdn
return args
})
// 判断环境加入模拟数据
// const entry = config.entry('app')
// if (process.env.VUE_APP_BUILD_MODE !== 'nomock') {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!