Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
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 15f7b168
authored
Sep 09, 2019
by
liimin
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
合并
1 parent
83a1e2fb
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
32 additions
and
33 deletions
src/api/reportLogs.js
src/components/d2-container/components/d2-header-switch.vue
src/layout/header-aside/components/header-user/index.vue
src/libs/util.permision.js
src/plugin/axios/index.js
src/router/index.js
src/router/routes.js
src/store/modules/d2admin/modules/account.js
src/store/modules/d2admin/modules/base.js
src/views/deviceManagement/editDialog.vue
src/views/materiaOrderManagement/index.vue
src/views/subSysManagement/editDialog.vue
src/views/system/login/dialogReg.vue
src/views/systemMonitor/index.vue
src/views/trafficManagement/editDialog.vue
src/views/userManage/role/editDialog.vue
src/views/userManage/user/dialogReg.vue
src/api/reportLogs.js
View file @
15f7b16
...
@@ -9,4 +9,4 @@ export function searchReportLog (data) {
...
@@ -9,4 +9,4 @@ export function searchReportLog (data) {
export
function
searchDepot
(
data
)
{
export
function
searchDepot
(
data
)
{
data
.
method
=
`fims.configuration.from.conftype`
data
.
method
=
`fims.configuration.from.conftype`
return
request
(
data
)
return
request
(
data
)
}
\ No newline at end of file
\ No newline at end of file
}
src/components/d2-container/components/d2-header-switch.vue
View file @
15f7b16
...
@@ -9,7 +9,6 @@
...
@@ -9,7 +9,6 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
{
last
,
get
}
from
'lodash'
import
{
mapMutations
}
from
'vuex'
import
{
mapMutations
}
from
'vuex'
export
default
{
export
default
{
data
()
{
data
()
{
...
...
src/layout/header-aside/components/header-user/index.vue
View file @
15f7b16
...
@@ -27,7 +27,7 @@ export default {
...
@@ -27,7 +27,7 @@ export default {
PersonalPanel
PersonalPanel
}
,
}
,
mounted
()
{
mounted
()
{
this
.
$event
.
$on
(
'e-password-dialog'
,
res
=>
this
.
passVisible
=
res
)
this
.
$event
.
$on
(
'e-password-dialog'
,
res
=>
(
this
.
passVisible
=
res
)
)
}
,
}
,
computed
:
{
computed
:
{
...
mapState
(
'd2admin/user'
,
[
'info'
])
...
mapState
(
'd2admin/user'
,
[
'info'
])
...
...
src/libs/util.permision.js
View file @
15f7b16
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
* @Author: limin
* @Author: limin
* @Date: 2019-08-27 19:16:26
* @Date: 2019-08-27 19:16:26
* @Last Modified by: limin
* @Last Modified by: limin
* @Last Modified time: 2019-09-0
8 20:54:05
* @Last Modified time: 2019-09-0
9 17:45:36
*/
*/
import
{
cloneDeep
}
from
'lodash'
import
{
cloneDeep
}
from
'lodash'
const
permision
=
{}
const
permision
=
{}
...
@@ -26,7 +26,7 @@ permision.packRoutesBtns = function (resources, idsInPermision) {
...
@@ -26,7 +26,7 @@ permision.packRoutesBtns = function (resources, idsInPermision) {
}
else
{
// 如果取不到 判断是否有父节点 并且父节点是否有auth属性 有 则视为按钮 (同样可以定义标识变量)
}
else
{
// 如果取不到 判断是否有父节点 并且父节点是否有auth属性 有 则视为按钮 (同样可以定义标识变量)
__objResource
=
resources
[
obj
.
parentId
]
__objResource
=
resources
[
obj
.
parentId
]
if
(
__objResource
&&
__objResource
.
auth
)
{
if
(
__objResource
&&
__objResource
.
auth
)
{
__obj
=
__objResource
.
auth
.
find
(
o
=>
o
.
authId
==
obj
.
authId
)
__obj
=
__objResource
.
auth
.
find
(
o
=>
+
o
.
authId
===
+
obj
.
authId
)
if
(
__oBtnInPermision
[
obj
.
parentId
]
&&
__oBtnInPermision
[
obj
.
parentId
].
length
)
{
if
(
__oBtnInPermision
[
obj
.
parentId
]
&&
__oBtnInPermision
[
obj
.
parentId
].
length
)
{
__oBtnInPermision
[
obj
.
parentId
].
push
(
__obj
)
__oBtnInPermision
[
obj
.
parentId
].
push
(
__obj
)
}
else
{
}
else
{
...
@@ -62,7 +62,7 @@ permision.packAsideMenus = function (resources, idsInPermision) {
...
@@ -62,7 +62,7 @@ permision.packAsideMenus = function (resources, idsInPermision) {
if
(
!
__oMenu
)
{
// 不存在 可能是 按钮 直接继续循环
if
(
!
__oMenu
)
{
// 不存在 可能是 按钮 直接继续循环
return
true
return
true
}
}
if
(
obj
.
parentId
==
'0'
)
{
// 取出1级菜单
if
(
(
obj
.
parentId
+
''
)
=
==
'0'
)
{
// 取出1级菜单
__aMenusInPermision
.
push
(
__oMenu
)
__aMenusInPermision
.
push
(
__oMenu
)
}
else
{
// 取出子菜单
}
else
{
// 取出子菜单
__aSub
.
push
(
__oMenu
)
__aSub
.
push
(
__oMenu
)
...
@@ -73,7 +73,7 @@ permision.packAsideMenus = function (resources, idsInPermision) {
...
@@ -73,7 +73,7 @@ permision.packAsideMenus = function (resources, idsInPermision) {
*/
*/
let
__parent
=
null
let
__parent
=
null
__aSub
.
forEach
(
obj
=>
{
__aSub
.
forEach
(
obj
=>
{
__parent
=
__aMenusInPermision
.
find
(
menu
=>
menu
.
authId
==
obj
.
parentId
)
__parent
=
__aMenusInPermision
.
find
(
menu
=>
+
menu
.
authId
===
+
obj
.
parentId
)
if
(
__parent
.
children
)
{
if
(
__parent
.
children
)
{
__parent
.
children
.
push
(
obj
)
__parent
.
children
.
push
(
obj
)
}
else
{
}
else
{
...
...
src/plugin/axios/index.js
View file @
15f7b16
...
@@ -93,7 +93,7 @@ service.interceptors.response.use(
...
@@ -93,7 +93,7 @@ service.interceptors.response.use(
return
data
return
data
default
:
default
:
// 不是正确的 code
// 不是正确的 code
errorCreate
(
`code:
${
code
}
${
dataAxios
.
message
}
---
${
dataAxios
.
solution
}
`
)
errorCreate
(
`code:
${
code
}
${
dataAxios
.
message
}
`
)
break
break
}
}
},
},
...
@@ -142,5 +142,4 @@ service.interceptors.response.use(
...
@@ -142,5 +142,4 @@ service.interceptors.response.use(
return
Promise
.
reject
(
error
)
return
Promise
.
reject
(
error
)
}
}
)
)
export
default
service
export
default
service
src/router/index.js
View file @
15f7b16
...
@@ -45,7 +45,7 @@ router.beforeEach(async (to, from, next) => {
...
@@ -45,7 +45,7 @@ router.beforeEach(async (to, from, next) => {
if
(
store
.
state
.
d2admin
.
user
.
info
)
{
if
(
store
.
state
.
d2admin
.
user
.
info
)
{
next
()
next
()
}
else
{
}
else
{
if
(
to
.
path
==
'/login'
)
{
// 如果是登录页面路径,就直接next()
if
(
to
.
path
==
=
'/login'
)
{
// 如果是登录页面路径,就直接next()
next
()
next
()
}
else
{
// 不然就跳转到登录;
}
else
{
// 不然就跳转到登录;
await
store
.
dispatch
(
'd2admin/account/logout'
)
await
store
.
dispatch
(
'd2admin/account/logout'
)
...
...
src/router/routes.js
View file @
15f7b16
...
@@ -171,7 +171,6 @@ export const resources = {
...
@@ -171,7 +171,6 @@ export const resources = {
},
},
'105'
:
{
'105'
:
{
path
:
'materialList'
,
path
:
'materialList'
,
icon
:
'folder-o'
,
icon
:
'tickets'
,
icon
:
'tickets'
,
name
:
'物料列表'
,
name
:
'物料列表'
,
meta
:
{
meta
:
{
...
@@ -361,7 +360,7 @@ export const resources = {
...
@@ -361,7 +360,7 @@ export const resources = {
authId
:
'108'
,
authId
:
'108'
,
parentId
:
'0'
parentId
:
'0'
},
},
component
:
_import
(
'reportingLogs'
)
,
component
:
_import
(
'reportingLogs'
)
// auth: [{
// auth: [{
// authId: '10801',
// authId: '10801',
// parentId: '108',
// parentId: '108',
...
...
src/store/modules/d2admin/modules/account.js
View file @
15f7b16
...
@@ -24,7 +24,7 @@ export default {
...
@@ -24,7 +24,7 @@ export default {
// token 代表用户当前登录状态 建议在网络请求中携带 token
// token 代表用户当前登录状态 建议在网络请求中携带 token
// 如有必要 token 需要定时更新,默认保存一天
// 如有必要 token 需要定时更新,默认保存一天
util
.
cookies
.
set
(
'uuid'
,
data
.
loginName
)
util
.
cookies
.
set
(
'uuid'
,
data
.
loginName
)
const
authes
=
(
data
.
roleType
==
SUPPER_ADMIN
)
const
authes
=
(
+
data
.
roleType
===
+
SUPPER_ADMIN
)
?
util
.
permision
.
flatten
(
Object
.
values
(
localRoutes
))
?
util
.
permision
.
flatten
(
Object
.
values
(
localRoutes
))
.
map
(
obj
=>
({
authId
:
obj
.
authId
,
parentId
:
obj
.
parentId
}))
.
map
(
obj
=>
({
authId
:
obj
.
authId
,
parentId
:
obj
.
parentId
}))
:
cloneDeep
(
data
.
authes
)
:
cloneDeep
(
data
.
authes
)
...
...
src/store/modules/d2admin/modules/base.js
View file @
15f7b16
...
@@ -2,10 +2,10 @@
...
@@ -2,10 +2,10 @@
* @Author: limin
* @Author: limin
* @Date: 2019-09-01 17:56:57
* @Date: 2019-09-01 17:56:57
* @Last Modified by: limin
* @Last Modified by: limin
* @Last Modified time: 2019-09-0
6 18:23:17
* @Last Modified time: 2019-09-0
9 17:36:51
*/
*/
import
{
FetchRoleList
,
CompanyList
,
DepartList
,
StationList
,
PostList
,
BaseDataApi
}
from
'@/api/sys.base'
import
{
FetchRoleList
,
BaseDataApi
}
from
'@/api/sys.base'
import
{
BaseData
,
TYPE_NAME
,
ConfigType
}
from
'@/common/constants'
import
{
BaseData
,
TYPE_NAME
,
ConfigType
}
from
'@/common/constants'
const
map
=
{
const
map
=
{
[
BaseData
.
ROLE
.
KEY
]:
FetchRoleList
,
[
BaseData
.
ROLE
.
KEY
]:
FetchRoleList
,
...
...
src/views/deviceManagement/editDialog.vue
View file @
15f7b16
...
@@ -154,7 +154,7 @@ export default {
...
@@ -154,7 +154,7 @@ export default {
methods
:
{
methods
:
{
async
isCodeExist
(
rule
,
value
,
callback
)
{
async
isCodeExist
(
rule
,
value
,
callback
)
{
if
(
this
.
deviceNum
===
value
&&
this
.
deviceName
===
this
.
editForm
.
deviceName
)
{
if
(
this
.
deviceNum
===
value
&&
this
.
deviceName
===
this
.
editForm
.
deviceName
)
{
const
res
=
await
isExistApi
({
deviceNum
:
value
,
deviceName
:
this
.
editForm
.
deviceName
,
stationCode
:
this
.
editForm
.
stationCode
})
const
res
=
await
isExistApi
({
deviceNum
:
value
,
deviceName
:
this
.
editForm
.
deviceName
,
stationCode
:
this
.
editForm
.
stationCode
})
// console.log(res)
// console.log(res)
res
?
callback
(
new
Error
(
rule
.
message
))
:
callback
()
res
?
callback
(
new
Error
(
rule
.
message
))
:
callback
()
...
...
src/views/materiaOrderManagement/index.vue
View file @
15f7b16
...
@@ -295,7 +295,7 @@ export default {
...
@@ -295,7 +295,7 @@ export default {
orderCode
:
row
.
orderCode
orderCode
:
row
.
orderCode
}).
then
(
res
=>
{
}).
then
(
res
=>
{
// console.log(res)
// console.log(res)
this
.
dialogTitle
=
row
.
orderType
==
1
?
'物料申请'
:
'物料报废'
this
.
dialogTitle
=
row
.
orderType
==
1
?
'物料申请'
:
'物料报废'
this
.
pdfUrl
=
res
.
url
this
.
pdfUrl
=
res
.
url
this
.
detailVisible
=
!
this
.
detailVisible
this
.
detailVisible
=
!
this
.
detailVisible
}).
catch
(()
=>
{
}).
catch
(()
=>
{
...
...
src/views/subSysManagement/editDialog.vue
View file @
15f7b16
...
@@ -123,14 +123,14 @@ export default {
...
@@ -123,14 +123,14 @@ export default {
},
},
methods
:
{
methods
:
{
async
isCodeExist
(
rule
,
value
,
callback
)
{
async
isCodeExist
(
rule
,
value
,
callback
)
{
if
(
this
.
editForm
.
trafficCode
)
{
if
(
this
.
editForm
.
trafficCode
)
{
const
res
=
await
isExistApi
({
subsystemCode
:
value
,
trafficCode
:
this
.
editForm
.
trafficCode
})
const
res
=
await
isExistApi
({
subsystemCode
:
value
,
trafficCode
:
this
.
editForm
.
trafficCode
})
res
?
callback
(
new
Error
(
rule
.
message
))
:
callback
()
res
?
callback
(
new
Error
(
rule
.
message
))
:
callback
()
}
}
},
},
validateCode
(
value
)
{
validateCode
(
value
)
{
this
.
$refs
.
editRuleForm
.
validateField
(
'subsystemCode'
)
this
.
$refs
.
editRuleForm
.
validateField
(
'subsystemCode'
)
},
},
...
...
src/views/system/login/dialogReg.vue
View file @
15f7b16
...
@@ -145,8 +145,8 @@ export default {
...
@@ -145,8 +145,8 @@ export default {
{
required
:
true
,
message
:
'姓名不能为空'
,
trigger
:
[
'blur'
]
}
{
required
:
true
,
message
:
'姓名不能为空'
,
trigger
:
[
'blur'
]
}
],
],
mobile
:
[
mobile
:
[
{
required
:
true
,
{
required
:
true
,
validator
:
(
rule
,
value
,
callback
)
=>
{
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
''
)
{
if
(
value
===
''
)
{
callback
(
new
Error
(
'联系方式不能为空'
))
callback
(
new
Error
(
'联系方式不能为空'
))
}
else
{
}
else
{
...
@@ -156,7 +156,8 @@ export default {
...
@@ -156,7 +156,8 @@ export default {
return
callback
(
new
Error
(
'联系方式错误'
))
return
callback
(
new
Error
(
'联系方式错误'
))
}
}
}
}
},
trigger
:
[
'blur'
]
},
},
trigger
:
[
'blur'
]
}
],
],
companyName
:
[
companyName
:
[
{
required
:
true
,
message
:
'所属公司不能为空'
,
trigger
:
[
'blur'
]
}
{
required
:
true
,
message
:
'所属公司不能为空'
,
trigger
:
[
'blur'
]
}
...
...
src/views/systemMonitor/index.vue
View file @
15f7b16
...
@@ -174,7 +174,7 @@ export default {
...
@@ -174,7 +174,7 @@ export default {
value
:
0
,
value
:
0
,
itemStyle
:
{
itemStyle
:
{
color
:
'#999999'
color
:
'#999999'
}
,
}
// selected: true
// selected: true
}]
}]
},
{
},
{
...
@@ -199,7 +199,7 @@ export default {
...
@@ -199,7 +199,7 @@ export default {
value
:
0
,
value
:
0
,
itemStyle
:
{
itemStyle
:
{
color
:
'#e45b4e'
color
:
'#e45b4e'
}
,
}
// selected: true
// selected: true
}]
}]
}]
}]
...
...
src/views/trafficManagement/editDialog.vue
View file @
15f7b16
...
@@ -97,15 +97,15 @@ export default {
...
@@ -97,15 +97,15 @@ export default {
mounted
()
{},
mounted
()
{},
methods
:
{
methods
:
{
async
isCodeExist
(
rule
,
value
,
callback
)
{
async
isCodeExist
(
rule
,
value
,
callback
)
{
const
res
=
await
isExistApi
({
trafficCode
:
value
})
const
res
=
await
isExistApi
({
trafficCode
:
value
})
res
?
callback
(
new
Error
(
rule
.
message
))
:
callback
()
res
?
callback
(
new
Error
(
rule
.
message
))
:
callback
()
},
},
handleClose
()
{
handleClose
()
{
this
.
$emit
(
'closeDialog'
)
this
.
$emit
(
'closeDialog'
)
},
},
handleConfirm
()
{
handleConfirm
()
{
this
.
$refs
.
editRuleForm
.
validate
((
vaild
)
=>
{
this
.
$refs
.
editRuleForm
.
validate
((
vaild
)
=>
{
if
(
vaild
)
{
if
(
vaild
)
{
...
...
src/views/userManage/role/editDialog.vue
View file @
15f7b16
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
:rows=
"2"
:rows=
"2"
placeholder=
"角色描述"
placeholder=
"角色描述"
clearable
clearable
maxlength=
"50"
maxlength=
"50"
:show-word-limit=
"true"
:show-word-limit=
"true"
v-model=
"roleForm.description"
>
v-model=
"roleForm.description"
>
</el-input>
</el-input>
...
...
src/views/userManage/user/dialogReg.vue
View file @
15f7b16
...
@@ -153,18 +153,19 @@ export default {
...
@@ -153,18 +153,19 @@ export default {
{
required
:
true
,
message
:
'姓名不能为空'
,
trigger
:
[
'blur'
]
}
{
required
:
true
,
message
:
'姓名不能为空'
,
trigger
:
[
'blur'
]
}
],
],
mobile
:
[
mobile
:
[
{
required
:
true
,
{
required
:
true
,
validator
:
(
rule
,
value
,
callback
)
=>
{
validator
:
(
rule
,
value
,
callback
)
=>
{
if
(
value
===
''
)
{
if
(
value
===
''
)
{
callback
(
new
Error
(
'联系方式不能为空'
))
callback
(
new
Error
(
'联系方式不能为空'
))
}
else
{
}
else
{
if
(
/^1
\d{10}
$/
.
test
(
value
))
{
if
(
/^1
\d{10}
$/
.
test
(
value
))
{
callback
()
callback
()
}
else
{
}
else
{
return
callback
(
new
Error
(
'联系方式错误'
))
return
callback
(
new
Error
(
'联系方式错误'
))
}
}
}
}
},
trigger
:
[
'blur'
]
},
},
trigger
:
[
'blur'
]
}
],
],
companyName
:
[
companyName
:
[
{
required
:
true
,
message
:
'所属公司不能为空'
,
trigger
:
[
'blur'
]
}
{
required
:
true
,
message
:
'所属公司不能为空'
,
trigger
:
[
'blur'
]
}
...
...
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