Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
SHR
/
tFIMS
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 2c9fa1df
authored
Sep 17, 2019
by
liimin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed bug
1 parent
1e375067
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
138 additions
and
124 deletions
src/assets/style/theme/blue/setting.scss
src/assets/style/theme/classic/setting.scss
src/assets/style/theme/dark/setting.scss
src/assets/style/theme/plane/setting.scss
src/assets/style/theme/theme-base.scss
src/assets/style/theme/theme.scss
src/layout/header-aside/components/personal-panel/index.vue
src/libs/util.permision.js
src/router/index.js
src/store/modules/d2admin/modules/account.js
src/store/modules/d2admin/modules/auth.js
src/store/modules/d2admin/modules/menu.js
src/store/modules/d2admin/modules/page.js
src/views/deviceManagement/editDialog.vue
src/views/maintainManagement/index.vue
src/views/subSysManagement/editDialog.vue
src/views/system/error/404/index.vue
src/views/system/login/index.vue
src/views/systemMonitor/index.vue
src/assets/style/theme/blue/setting.scss
View file @
2c9fa1d
...
...
@@ -6,6 +6,7 @@ $private-left-side-color:#652DED;
$private-menu-active-background-color
:
#521ADA
;
$private-item-hover
:
rgba
(
#000
,.
05
);
$private-menu-text-color
:
#C4D0DF
;
$active-i-color
:
rgb
(
9
,
234
,
9
);
// 主题背景颜色
...
...
@@ -62,13 +63,13 @@ $theme-aside-item-color: $private-menu-text-color;
$theme-aside-item-background-color
:
transparent
;
// 侧边栏上的项目在 hover 时
$theme-aside-item-color-hover
:
#FFF
;
$theme-aside-item-background-color-hover
:
$private-item-hover
;
$theme-aside-item-background-color-hover
:
rgba
(
$private-menu-active-background-color
,
.15
)
;
// 侧边栏上的项目在 focus 时
$theme-aside-item-color-focus
:
#FFF
;
$theme-aside-item-background-color-focus
:
rgba
(
$private-menu-active-background-color
,
1
);
$theme-aside-item-background-color-focus
:
rgba
(
$private-menu-active-background-color
,
.15
);
// 侧边栏上的项目在 active 时
$theme-aside-item-color-active
:
#FFF
;
$theme-aside-item-background-color-active
:
rgba
(
$private-menu-active-background-color
,
1
);
$theme-aside-item-background-color-active
:
rgba
(
$private-menu-active-background-color
,
.15
);
// 侧边栏菜单为空的时候显示的元素
$theme-aside-menu-empty-icon-color
:
#1F3147
;
...
...
src/assets/style/theme/classic/setting.scss
View file @
2c9fa1d
...
...
@@ -4,6 +4,7 @@ $private-left-side-color:#2A58AD;
$private-menu-active-background-color
:
#154190
;
$private-item-hover
:
rgba
(
#000
,.
05
);
$private-menu-text-color
:
#C4D0DF
;
$active-i-color
:
rgb
(
9
,
234
,
9
);
// 主题背景颜色
$theme-bg-color
:
$private-left-side-color
;
...
...
@@ -62,13 +63,13 @@ $theme-aside-item-color: $private-menu-text-color;
$theme-aside-item-background-color
:
transparent
;
// 侧边栏上的项目在 hover 时
$theme-aside-item-color-hover
:
#FFF
;
$theme-aside-item-background-color-hover
:
$private-item-hover
;
$theme-aside-item-background-color-hover
:
rgba
(
$private-menu-active-background-color
,
.15
)
;
// 侧边栏上的项目在 focus 时
$theme-aside-item-color-focus
:
#FFF
;
$theme-aside-item-background-color-focus
:
rgba
(
$private-menu-active-background-color
,
1
);
$theme-aside-item-background-color-focus
:
rgba
(
$private-menu-active-background-color
,
.15
);
// 侧边栏上的项目在 active 时
$theme-aside-item-color-active
:
#FFF
;
$theme-aside-item-background-color-active
:
rgba
(
$private-menu-active-background-color
,
1
);
$theme-aside-item-background-color-active
:
rgba
(
$private-menu-active-background-color
,
.15
);
// 侧边栏菜单为空的时候显示的元素
$theme-aside-menu-empty-icon-color
:
#1F3147
;
...
...
src/assets/style/theme/dark/setting.scss
View file @
2c9fa1d
...
...
@@ -4,6 +4,7 @@ $private-left-side-color:#314256;
$private-menu-active-background-color
:
#1F3147
;
$private-item-hover
:
rgba
(
#000
,.
05
);
$private-menu-text-color
:
#C4D0DF
;
$active-i-color
:
rgb
(
9
,
234
,
9
);
// 主题背景颜色
$theme-bg-color
:
$private-left-side-color
;
...
...
@@ -58,13 +59,13 @@ $theme-aside-item-color: $private-menu-text-color;
$theme-aside-item-background-color
:
transparent
;
// 侧边栏上的项目在 hover 时
$theme-aside-item-color-hover
:
#FFF
;
$theme-aside-item-background-color-hover
:
$private-item-hover
;
$theme-aside-item-background-color-hover
:
rgba
(
$private-menu-active-background-color
,
.15
)
;
// 侧边栏上的项目在 focus 时
$theme-aside-item-color-focus
:
#FFF
;
$theme-aside-item-background-color-focus
:
rgba
(
$private-menu-active-background-color
,
1
);
$theme-aside-item-background-color-focus
:
rgba
(
$private-menu-active-background-color
,
.15
);
// 侧边栏上的项目在 active 时
$theme-aside-item-color-active
:
#FFF
;
$theme-aside-item-background-color-active
:
rgba
(
$private-menu-active-background-color
,
1
);
$theme-aside-item-background-color-active
:
rgba
(
$private-menu-active-background-color
,
.15
);
// 侧边栏菜单为空的时候显示的元素
$theme-aside-menu-empty-icon-color
:
#1F3147
;
...
...
src/assets/style/theme/plane/setting.scss
View file @
2c9fa1d
...
...
@@ -6,7 +6,7 @@ $private-left-side-color:transparent;
$private-menu-active-background-color
:
#002253
;
$private-item-hover
:
rgba
(
#000
,.
05
);
$private-menu-text-color
:
#C4D0DF
;
$active-i-color
:
rgb
(
9
,
234
,
9
);
// 主题背景颜色
$theme-bg-color
:
$private-left-side-color
;
...
...
@@ -61,13 +61,13 @@ $theme-aside-item-color: $private-menu-text-color;
$theme-aside-item-background-color
:
transparent
;
// 侧边栏上的项目在 hover 时
$theme-aside-item-color-hover
:
#FFF
;
$theme-aside-item-background-color-hover
:
$private-item-hover
;
$theme-aside-item-background-color-hover
:
rgba
(
$private-menu-active-background-color
,
.15
)
;
// 侧边栏上的项目在 focus 时
$theme-aside-item-color-focus
:
#FFF
;
$theme-aside-item-background-color-focus
:
rgba
(
$private-menu-active-background-color
,
1
);
$theme-aside-item-background-color-focus
:
rgba
(
$private-menu-active-background-color
,
.15
);
// 侧边栏上的项目在 active 时
$theme-aside-item-color-active
:
#FFF
;
$theme-aside-item-background-color-active
:
rgba
(
$private-menu-active-background-color
,
1
);
$theme-aside-item-background-color-active
:
rgba
(
$private-menu-active-background-color
,
.15
);
// 侧边栏菜单为空的时候显示的元素
$theme-aside-menu-empty-icon-color
:
#1F3147
;
...
...
src/assets/style/theme/theme-base.scss
View file @
2c9fa1d
...
...
@@ -206,9 +206,9 @@
}
}
ul
.el-menu--inline
{
background
:
rgba
(
#000
,
.0
8
);
border-top
:
1px
solid
rgba
(
#FFF
,
.0
8
);
border-bottom
:
1px
solid
rgba
(
#FFF
,
.0
8
);
background
:
rgba
(
#000
,
.0
3
);
border-top
:
1px
solid
rgba
(
#FFF
,
.0
3
);
border-bottom
:
1px
solid
rgba
(
#FFF
,
.0
3
);
}
}
// 菜单为空的时候显示的信息
...
...
src/assets/style/theme/theme.scss
View file @
2c9fa1d
...
...
@@ -199,7 +199,7 @@
fill
:
$theme-aside-item-color-hover
;
background
:
$theme-aside-item-background-color-hover
;
i
{
color
:
$
theme-aside-item-color-hove
r
;
color
:
$
active-i-colo
r
;
}
}
&
:focus
{
...
...
@@ -215,16 +215,16 @@
fill
:
$theme-aside-item-color-active
;
background
:
$theme-aside-item-background-color-active
;
i
{
color
:
$theme-aside-item-color-active
;
}
}
&
:nth-child
(
1
)
.is-active
{
color
:
$theme-aside-item-color-active
;
background
:
$theme-aside-item-background-color
;
i
{
color
:
$theme-aside-item-color-active
;
color
:
$active-i-color
;
}
}
// &:nth-child(1).is-active {
// color: $theme-aside-item-color-active;
// background: $theme-aside-item-background-color;
// i {
// color: $active-i-color;
// }
// }
}
}
.el-submenu
{
...
...
@@ -241,7 +241,7 @@
color
:
$theme-aside-item-color-hover
;
background
:
$theme-aside-item-background-color-hover
;
i
{
color
:
$
theme-aside-item-color-hove
r
;
color
:
$
active-i-colo
r
;
}
.el-submenu__icon-arrow
{
color
:
$theme-aside-item-color-hover
;
...
...
@@ -278,11 +278,20 @@
display
:
none
;
}
}
}
.el-tabs__item.is-active
{
color
:
$theme-multiple-page-control-color-active
;
background-color
:
$theme-multiple-page-control-background-color-active
;
border-bottom-color
:
$theme-multiple-page-control-border-color-active
;
&
.is-active
{
color
:
$theme-multiple-page-control-color-active
;
background-color
:
$theme-multiple-page-control-background-color-active
;
border-bottom-color
:
$theme-multiple-page-control-border-color-active
;
i
{
color
:
$active-i-color
}
}
&
:hover
{
color
:
$theme-multiple-page-control-color-active
;
i
{
color
:
$active-i-color
}
}
}
}
%el-tabs__nav
{
...
...
src/layout/header-aside/components/personal-panel/index.vue
View file @
2c9fa1d
...
...
@@ -110,25 +110,8 @@ export default {
* @description 登出
*/
async
logOut
()
{
// this.$store.commit('d2admin/gray/set', true)
// MessageBox.confirm('确定要退出当前帐号吗', '退出', {
// confirmButtonText: '确定',
// cancelButtonText: '取消',
// type: 'warning'
// })
// .then(async() => {
// await this.$store.commit('d2admin/gray/set', false)
// await this.$store.dispatch('d2admin/user/set', {})
await
this
.
logout
()
await
this
.
$store
.
commit
(
'd2admin/page/setCurrent'
,
''
)
this
.
$router
.
push
(
'/login'
)
// })
// .catch(() => {
// this.$store.commit('d2admin/gray/set', false)
// // Message({
// // message: '取消注销操作'
// // })
// })
this
.
$router
.
replace
(
'/login'
)
},
clear
()
{
this
.
$store
.
commit
(
'd2admin/gray/set'
,
true
)
...
...
@@ -142,10 +125,22 @@ export default {
}
)
.
then
(
async
()
=>
{
await
this
.
$store
.
commit
(
'd2admin/gray/set'
,
false
)
// await this.$store.commit('d2admin/page/setCurrent', '')
localStorage
.
clear
()
window
.
location
.
reload
()
const
reload
=
()
=>
{
localStorage
.
clear
()
this
.
$store
.
commit
(
'd2admin/gray/set'
,
false
)
window
.
location
.
reload
()
}
if
(
this
.
$router
.
currentRoute
.
name
===
'index'
)
{
reload
()
}
else
{
this
.
$router
.
push
({
name
:
'index'
})
var
_t
=
setInterval
(()
=>
{
if
(
this
.
$router
.
currentRoute
.
name
===
'index'
)
{
clearInterval
(
_t
)
reload
()
}
},
0
)
}
})
.
catch
(()
=>
{
this
.
$store
.
commit
(
'd2admin/gray/set'
,
false
)
...
...
src/libs/util.permision.js
View file @
2c9fa1d
...
...
@@ -2,7 +2,7 @@
* @Author: limin
* @Date: 2019-08-27 19:16:26
* @Last Modified by: limin
* @Last Modified time: 2019-09-1
6 14:13:22
* @Last Modified time: 2019-09-1
7 17:20:53
*/
const
permision
=
{}
/**
...
...
@@ -51,35 +51,7 @@ permision.packAsideMenus = function(resources, idsInPermision) {
if
(
!
resources
||
!
idsInPermision
||
!
idsInPermision
.
length
)
{
throw
new
Error
(
'参数错误'
)
}
const
__aMenusInPermision
=
[]
const
__aSub
=
[]
/**
* 第一次循环 分出一级菜单与所有子菜单
*/
idsInPermision
.
forEach
(
obj
=>
{
const
__oMenu
=
permision
.
format2Menu
(
resources
[
obj
.
authId
])
if
(
!
__oMenu
)
{
// 不存在 可能是 按钮 直接继续循环
return
true
}
if
((
obj
.
parentId
+
''
)
===
'0'
)
{
// 取出1级菜单
__aMenusInPermision
.
push
(
__oMenu
)
}
else
{
// 取出子菜单
__aSub
.
push
(
__oMenu
)
}
})
/**
* 第二次循环所有子菜单 ,然后挂载到对应的一级菜单
*/
let
__parent
=
null
__aSub
.
forEach
(
obj
=>
{
__parent
=
__aMenusInPermision
.
find
(
menu
=>
+
menu
.
authId
===
+
obj
.
parentId
)
if
(
__parent
.
children
)
{
__parent
.
children
.
push
(
obj
)
}
else
{
__parent
.
children
=
[
obj
]
}
})
return
__aMenusInPermision
return
_loop
(
idsInPermision
,
obj
=>
permision
.
format2Menu
(
resources
[
obj
.
authId
]))
}
/**
...
...
@@ -91,36 +63,42 @@ permision.packMenusBtns = function(resources) {
if
(
!
resources
)
{
throw
new
Error
(
'参数错误'
)
}
const
menus
=
_loop
(
resources
,
obj
=>
permision
.
format2ResourceMenu
(
obj
))
return
{
menus
,
all
:
[]
}
}
const
_loop
=
function
(
res
,
fnGetMenu
)
{
const
__aParent
=
[]
const
__aSub
=
[]
const
__aAll
=
[]
/**
* 第一次循环 分出一级菜单与所有子菜单
*/
res
ources
.
forEach
(
obj
=>
{
const
__oMenu
=
permision
.
format2Resource
Menu
(
obj
)
res
.
forEach
(
obj
=>
{
const
__oMenu
=
fnGet
Menu
(
obj
)
if
(
!
__oMenu
)
{
// 不存在 可能是 按钮 直接继续循环
return
true
}
if
(
__oMenu
.
parentId
===
'0'
)
{
// 取出1级菜单
if
(
+
(
__oMenu
.
parentId
)
===
0
)
{
// 取出1级菜单
__aParent
.
push
(
__oMenu
)
}
else
{
// 取出子菜单
__aSub
.
push
(
__oMenu
)
}
})
/**
* 第二次循环所有子菜单 ,然后挂载到对应的一级菜单
*/
* 第二次循环所有子菜单 ,然后挂载到对应的一级菜单
*/
let
__parent
=
null
__aSub
.
forEach
(
obj
=>
{
__parent
=
__aParent
.
find
(
menu
=>
menu
.
authId
===
obj
.
parentId
)
if
(
__parent
.
children
)
{
__parent
.
children
.
push
(
obj
)
}
else
{
__parent
.
children
=
[
obj
]
__parent
=
__aParent
.
find
(
menu
=>
+
(
menu
.
authId
)
===
+
(
obj
.
parentId
))
if
(
__parent
)
{
if
(
__parent
.
children
)
{
__parent
.
children
.
push
(
obj
)
}
else
{
__parent
.
children
=
[
obj
]
}
}
})
return
{
menus
:
__aParent
,
all
:
__aAll
}
return
__aParent
}
/**
...
...
src/router/index.js
View file @
2c9fa1d
...
...
@@ -42,6 +42,7 @@ router.beforeEach(async(to, from, next) => {
await
store
.
dispatch
(
'd2admin/size/isLoaded'
)
// 设置当前页 下次登录 默认打开此页面
await
setCurrent
(
to
.
fullPath
)
// console.log(await store.dispatch('d2admin/menu/has', to.fullPath))
// 进度条
NProgress
.
start
()
// 关闭搜索面板
...
...
@@ -75,4 +76,8 @@ router.afterEach(to => {
store
.
dispatch
(
'd2admin/auth/setCurrentPageMeta'
,
to
.
meta
)
})
export
const
ResetRouter
=
()
=>
new
VueRouter
({
routes
})
export
default
router
src/store/modules/d2admin/modules/account.js
View file @
2c9fa1d
...
...
@@ -33,6 +33,8 @@ export default {
await
dispatch
(
'd2admin/user/set'
,
data
,
{
root
:
true
})
// // 强制初始化基础数据
dispatch
(
'd2admin/base/init'
,
null
,
{
root
:
true
})
// 初始化权限
await
dispatch
(
'd2admin/auth/init'
,
null
,
{
root
:
true
})
// // 用户登录后从持久化数据加载一系列的设置
await
dispatch
(
'load'
)
// 结束
...
...
@@ -58,9 +60,8 @@ export default {
util
.
cookies
.
remove
(
'token'
)
util
.
cookies
.
remove
(
'uuid'
)
await
dispatch
(
'd2admin/user/clear'
,
null
,
{
root
:
true
})
// 清空 vuex 用户信息
// await dispatch('d2admin/user/clear', null, { root: true })
// 跳转路由
await
commit
(
'd2admin/page/setCurrent'
,
null
,
{
root
:
true
})
await
commit
(
'd2admin/auth/set'
,
null
,
{
root
:
true
})
resolve
()
})
},
...
...
src/store/modules/d2admin/modules/auth.js
View file @
2c9fa1d
...
...
@@ -2,11 +2,12 @@
* @Author: limin
* @Date: 2019-08-27 17:25:12
* @Last Modified by: limin
* @Last Modified time: 2019-09-1
4 17:28:39
* @Last Modified time: 2019-09-1
7 20:19:57
*/
import
util
from
'@/libs/util.js'
import
router
from
'@/router'
import
router
,
{
ResetRouter
}
from
'@/router'
import
{
localRoutes
,
frameInRoutes
,
sys
}
from
'@/router/routes'
export
default
{
namespaced
:
true
,
state
:
{
...
...
@@ -127,6 +128,7 @@ export default {
return
new
Promise
(
async
resolve
=>
{
try
{
const
{
route
,
btn
}
=
util
.
permision
.
packRoutesBtns
(
localRoutes
,
source
)
router
.
matcher
=
ResetRouter
().
matcher
// 重置基础路由 解决切换用户 保留上一个用户路由问题
frameInRoutes
[
0
].
children
=
[...
route
,
...
sys
]
router
.
addRoutes
(
frameInRoutes
)
state
.
btns
=
btn
...
...
src/store/modules/d2admin/modules/menu.js
View file @
2c9fa1d
...
...
@@ -82,6 +82,17 @@ export default {
// end
resolve
()
})
},
has
({
state
,
dispatch
},
path
)
{
return
new
Promise
(
async
resolve
=>
{
const
_in
=
state
.
aside
.
some
(
obj
=>
{
if
(
obj
.
children
)
{
return
obj
.
path
===
path
||
obj
.
children
.
some
(
child
=>
child
.
path
===
path
)
}
return
obj
.
path
===
path
})
resolve
(
_in
)
})
}
},
mutations
:
{
...
...
src/store/modules/d2admin/modules/page.js
View file @
2c9fa1d
...
...
@@ -81,7 +81,7 @@ export default {
// 尝试在所有的支持多标签页的页面里找到 name 匹配的页面
const
find
=
state
.
pool
.
find
(
item
=>
{
return
(
item
.
name
===
opened
.
name
&&
item
.
path
===
opened
.
path
&&
__oSource
.
some
(
obj
=>
+
obj
.
authId
===
+
item
.
meta
.
authId
)
)
})
...
...
@@ -129,15 +129,15 @@ export default {
*/
openedUpdate
(
{
state
,
commit
,
dispatch
},
{
index
,
params
,
query
,
fullPath
}
{
page
,
params
,
query
,
fullPath
}
)
{
return
new
Promise
(
async
resolve
=>
{
// 更新页面列表某一项
const
page
=
state
.
opened
[
index
]
//
const page = state.opened[index]
page
.
params
=
params
||
page
.
params
page
.
query
=
query
||
page
.
query
page
.
fullPath
=
fullPath
||
page
.
fullPath
state
.
opened
.
splice
(
index
,
1
,
page
)
//
state.opened.splice(index, 1, page)
// 持久化
await
dispatch
(
'opend2db'
)
// end
...
...
@@ -181,16 +181,16 @@ export default {
// 已经打开的页面
const
opened
=
state
.
opened
// 判断此页面是否已经打开 并且记录位置
let
pageOpendIndex
=
0
const
page
Opend
=
opened
.
find
((
page
,
index
)
=>
{
//
let pageOpendIndex = 0
const
page
=
opened
.
find
((
page
,
index
)
=>
{
const
same
=
page
.
fullPath
===
fullPath
pageOpendIndex
=
same
?
index
:
pageOpendIndex
//
pageOpendIndex = same ? index : pageOpendIndex
return
same
})
if
(
page
Opend
)
{
if
(
page
)
{
// 页面以前打开过
await
dispatch
(
'openedUpdate'
,
{
index
:
pageOpendIndex
,
page
,
params
,
query
,
fullPath
...
...
@@ -437,7 +437,10 @@ export default {
},
{
root
:
true
}
)
resolve
(
_current
)
const
_in
=
await
dispatch
(
'd2admin/menu/has'
,
_current
,
{
root
:
true
})
resolve
(
_in
?
_current
:
INDEX_PATH
)
})
},
/**
...
...
src/views/deviceManagement/editDialog.vue
View file @
2c9fa1d
...
...
@@ -20,6 +20,7 @@
<el-input
v-model=
"editForm.deviceNum"
maxlength=
"16"
:show-word-limit=
"true"
placeholder=
"请输入物料代码"
clearable
@
change=
"editForm.deviceNum=editForm.deviceNum.toUpperCase()"
></el-input>
</el-form-item>
<el-form-item
...
...
src/views/maintainManagement/index.vue
View file @
2c9fa1d
...
...
@@ -219,15 +219,15 @@ export default {
prop
:
'subsystemCode'
},
{
label
:
'子系统类型'
,
prop
:
'subsystemType'
,
formatter
:
(
cellValue
)
=>
{
if
(
cellValue
.
subsystemType
)
{
return
{
1
:
'座椅'
,
2
:
'电池'
}[
cellValue
.
subsystemType
]
}
}
prop
:
'subsystemType'
//
formatter: (cellValue) => {
//
if (cellValue.subsystemType) {
//
return {
//
1: '座椅',
//
2: '电池'
//
}[cellValue.subsystemType]
//
}
//
}
},
{
label
:
'故障类型'
,
prop
:
'downType'
,
...
...
src/views/subSysManagement/editDialog.vue
View file @
2c9fa1d
...
...
@@ -24,6 +24,7 @@
:show-word-limit=
"true"
placeholder=
"请输入子系统编号"
clearable
@
change=
"editForm.subsystemCode=editForm.subsystemCode.toUpperCase()"
></el-input>
</el-form-item>
<el-form-item
...
...
@@ -95,7 +96,7 @@ export default {
rules
:
{
subsystemCode
:
[
{
required
:
true
,
message
:
'请输入子系统编号'
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
'子系统编号需输入14位数字或大写字母'
,
trigger
:
'
change
'
,
validator
:
this
.
isNumOrString
},
{
required
:
true
,
message
:
'子系统编号需输入14位数字或大写字母'
,
trigger
:
'
blur
'
,
validator
:
this
.
isNumOrString
},
{
required
:
true
,
message
:
'子系统编号已存在'
,
trigger
:
'blur'
,
validator
:
this
.
isCodeExist
}
],
trafficCode
:
[
...
...
@@ -151,7 +152,6 @@ export default {
},
async
isTrafficCodeExist
(
rule
,
value
,
callback
)
{
console
.
log
(
value
)
if
(
!
this
.
editForm
.
id
)
{
const
res
=
await
isTrafficExistApi
({
trafficCode
:
value
})
res
.
trafficCode
?
callback
()
:
callback
(
new
Error
(
rule
.
message
))
...
...
src/views/system/error/404/index.vue
View file @
2c9fa1d
...
...
@@ -6,7 +6,13 @@
</el-button>
</div>
</
template
>
<
script
>
export
default
{
mounted
()
{
this
.
$store
.
commit
(
'd2admin/page/setCurrent'
,
''
)
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.page
{
background
:
#303133
;
...
...
src/views/system/login/index.vue
View file @
2c9fa1d
...
...
@@ -148,7 +148,7 @@ export default {
// 注意 这里的演示没有传验证码
// 具体需要传递的数据请自行修改代码
this
.
login
(
_p
)
.
then
(()
=>
this
.
$store
.
dispatch
(
'd2admin/auth/init'
))
//
.then(() => this.$store.dispatch('d2admin/auth/init'))
.
then
(
async
_
=>
{
const
_current
=
await
this
.
current
()
this
.
$router
.
replace
(
this
.
$route
.
query
.
redirect
||
_current
)
...
...
src/views/systemMonitor/index.vue
View file @
2c9fa1d
...
...
@@ -51,7 +51,7 @@
<el-button
type=
"primary"
icon=
"el-icon-search"
@
click=
"handleSearch"
>
查询
</el-button>
</el-form-item>
</el-form>
<d2-table-header
title=
"
车辆
状态列表"
><auth-button
category=
"Button"
></auth-button></d2-table-header>
<d2-table-header
title=
"
子系统
状态列表"
><auth-button
category=
"Button"
></auth-button></d2-table-header>
<el-table
:data=
"tableData"
v-loading=
"$store.state.d2admin.loading.value"
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment