Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mingPayPc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fengzhaoyu
mingPayPc
Commits
81b2cd99
Commit
81b2cd99
authored
Dec 06, 2019
by
liang ce
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
权限菜单修改
parent
72a6adfa
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
77 additions
and
49 deletions
+77
-49
config.js
src/api/config.js
+1
-1
Home.vue
src/components/common/Home.vue
+28
-3
CanteenManagementHome.vue
...ponents/pages/CanteenManagement/CanteenManagementHome.vue
+4
-4
ConsumptionOrder.vue
src/components/pages/CanteenManagement/ConsumptionOrder.vue
+3
-3
AllowanceDetails.vue
src/components/pages/PaymentManagement/AllowanceDetails.vue
+2
-3
AllowancePayment.vue
src/components/pages/PaymentManagement/AllowancePayment.vue
+2
-7
PaymentManagementHome.vue
...ponents/pages/PaymentManagement/PaymentManagementHome.vue
+7
-7
rightsManagement.vue
src/components/pages/rightsManagement/rightsManagement.vue
+4
-2
rightsManagementHome.vue
...omponents/pages/rightsManagement/rightsManagementHome.vue
+1
-1
main.js
src/main.js
+15
-15
store.js
src/store.js
+10
-3
No files found.
src/api/config.js
View file @
81b2cd99
...
@@ -28,7 +28,7 @@ const config = {
...
@@ -28,7 +28,7 @@ const config = {
'biz.contact.complexPicker'
'biz.contact.complexPicker'
]
// 必填,需要使用的jsapi列表,注意:不要带dd。
]
// 必填,需要使用的jsapi列表,注意:不要带dd。
})
})
sessionStorage
.
setItem
(
'isFirstAction'
,
true
)
//
sessionStorage.setItem('isFirstAction', true)
dd
.
error
(
function
(
error
)
{
dd
.
error
(
function
(
error
)
{
console
.
log
(
'dd error: '
+
JSON
.
stringify
(
error
))
console
.
log
(
'dd error: '
+
JSON
.
stringify
(
error
))
return
'no'
return
'no'
...
...
src/components/common/Home.vue
View file @
81b2cd99
...
@@ -11,10 +11,10 @@
...
@@ -11,10 +11,10 @@
:style=
"
{ lineHeight: '64px' }"
:style=
"
{ lineHeight: '64px' }"
@click="routerPush"
@click="routerPush"
>
>
<a-menu-item
key=
"accountManagement"
>
支付管理
</a-menu-item>
<a-menu-item
key=
"accountManagement"
v-if=
"this.$store.state.menuList.indexOf('3000') > -1"
>
支付管理
</a-menu-item>
<a-menu-item
key=
"classificationOfDishes"
>
食堂管理
</a-menu-item>
<a-menu-item
key=
"classificationOfDishes"
v-if=
"this.$store.state.menuList.indexOf('4000' > -1)"
>
食堂管理
</a-menu-item>
<!--
<a-menu-item
key=
"historicalVisitors"
>
访客管理
</a-menu-item>
-->
<!--
<a-menu-item
key=
"historicalVisitors"
>
访客管理
</a-menu-item>
-->
<a-menu-item
key=
"rightsManagement"
>
权限管理
</a-menu-item>
<a-menu-item
key=
"rightsManagement"
v-if=
"this.$store.state.menuList.indexOf('9000') > -1"
>
权限管理
</a-menu-item>
</a-menu>
</a-menu>
</a-layout-header>
</a-layout-header>
<a-layout-content
style=
"padding: 16px 50px 0px 50px"
>
<a-layout-content
style=
"padding: 16px 50px 0px 50px"
>
...
@@ -31,18 +31,32 @@
...
@@ -31,18 +31,32 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
store
from
'./../../store'
import
{
$http
}
from
'../../api/axios'
import
{
config
}
from
'../../api/config'
export
default
{
export
default
{
name
:
'home'
,
name
:
'home'
,
components
:
{},
components
:
{},
data
()
{
data
()
{
return
{
return
{
title
:
[],
title
:
[],
selectList
:
[],
defaultSelectedKeys
:
'accountManagement'
defaultSelectedKeys
:
'accountManagement'
}
}
},
},
created
()
{
created
()
{
let
that
=
this
this
.
title
=
this
.
$route
.
meta
.
title
?
this
.
$route
.
meta
.
title
.
split
(
'/'
)
:
''
this
.
title
=
this
.
$route
.
meta
.
title
?
this
.
$route
.
meta
.
title
.
split
(
'/'
)
:
''
this
.
defaultSelectedKeys
=
this
.
$route
.
matched
[
2
].
name
?
this
.
$route
.
matched
[
2
].
name
:
''
this
.
defaultSelectedKeys
=
this
.
$route
.
matched
[
2
].
name
?
this
.
$route
.
matched
[
2
].
name
:
''
let
data
=
{
item
:
'e-card'
}
$http
.
post
(
'/admin/menu/user'
,
data
).
then
(
res
=>
{
const
result
=
that
.
getSelectList
(
res
.
data
.
data
)
store
.
dispatch
(
'setMenuList'
,
that
.
selectList
)
console
.
log
(
this
.
$store
.
state
)
})
config
.
ddconfig
()
},
},
watch
:
{
watch
:
{
$route
(
to
,
from
)
{
$route
(
to
,
from
)
{
...
@@ -54,6 +68,17 @@ export default {
...
@@ -54,6 +68,17 @@ export default {
methods
:
{
methods
:
{
routerPush
(
obj
)
{
routerPush
(
obj
)
{
this
.
$router
.
push
({
name
:
obj
.
key
})
this
.
$router
.
push
({
name
:
obj
.
key
})
},
getSelectList
(
data
)
{
let
that
=
this
const
addKey
=
data
=>
data
.
map
(
item
=>
{
if
(
item
.
children
.
length
>
0
)
{
addKey
(
item
.
children
)
}
that
.
selectList
.
push
(
item
.
id
)
})
const
result
=
addKey
(
data
)
return
result
}
}
},
},
mounted
()
{}
mounted
()
{}
...
...
src/components/pages/CanteenManagement/CanteenManagementHome.vue
View file @
81b2cd99
...
@@ -9,16 +9,16 @@
...
@@ -9,16 +9,16 @@
style=
"height: 100%"
style=
"height: 100%"
@
click=
"routerPush"
@
click=
"routerPush"
>
>
<a-menu-item
class=
"itemFlex"
key=
"classificationOfDishes"
>
<a-menu-item
v-if=
"this.$store.state.menuList.indexOf('4100') > -1"
class=
"itemFlex"
key=
"classificationOfDishes"
>
<div
:class=
"[chooseMenuList === 'classificationOfDishes' ? 'menuIcon menuIcon1_2' : 'menuIcon menuIcon1_1']"
></div><div>
菜品分类
</div>
<div
:class=
"[chooseMenuList === 'classificationOfDishes' ? 'menuIcon menuIcon1_2' : 'menuIcon menuIcon1_1']"
></div><div>
菜品分类
</div>
</a-menu-item>
</a-menu-item>
<a-menu-item
class=
"itemFlex"
key=
"menuManagement"
>
<a-menu-item
v-if=
"this.$store.state.menuList.indexOf('4200') > -1"
class=
"itemFlex"
key=
"menuManagement"
>
<div
:class=
"[chooseMenuList === 'menuManagement' ? 'menuIcon menuIcon2_2' : 'menuIcon menuIcon2_1']"
></div>
菜品管理
<div
:class=
"[chooseMenuList === 'menuManagement' ? 'menuIcon menuIcon2_2' : 'menuIcon menuIcon2_1']"
></div>
菜品管理
</a-menu-item>
</a-menu-item>
<a-menu-item
class=
"itemFlex"
key=
"consumptionOrder"
>
<a-menu-item
v-if=
"this.$store.state.menuList.indexOf('4300') > -1"
class=
"itemFlex"
key=
"consumptionOrder"
>
<div
:class=
"[chooseMenuList === 'consumptionOrder' ? 'menuIcon menuIcon3_2' : 'menuIcon menuIcon3_1']"
></div>
消费订单
<div
:class=
"[chooseMenuList === 'consumptionOrder' ? 'menuIcon menuIcon3_2' : 'menuIcon menuIcon3_1']"
></div>
消费订单
</a-menu-item>
</a-menu-item>
<a-menu-item
class=
"itemFlex"
key=
"consumptionStatistics"
>
<a-menu-item
v-if=
"this.$store.state.menuList.indexOf('4400') > -1"
class=
"itemFlex"
key=
"consumptionStatistics"
>
<div
:class=
"[chooseMenuList === 'consumptionStatistics' ? 'menuIcon menuIcon4_2' : 'menuIcon menuIcon4_1']"
></div>
消费统计
<div
:class=
"[chooseMenuList === 'consumptionStatistics' ? 'menuIcon menuIcon4_2' : 'menuIcon menuIcon4_1']"
></div>
消费统计
</a-menu-item>
</a-menu-item>
</a-menu>
</a-menu>
...
...
src/components/pages/CanteenManagement/ConsumptionOrder.vue
View file @
81b2cd99
...
@@ -78,7 +78,7 @@ export default {
...
@@ -78,7 +78,7 @@ export default {
emplId
:
''
,
emplId
:
''
,
name
:
''
name
:
''
},
},
pay
Status
:
''
,
order
Status
:
''
,
agentName
:
''
agentName
:
''
},
},
agentList
:
[],
agentList
:
[],
...
@@ -182,7 +182,7 @@ export default {
...
@@ -182,7 +182,7 @@ export default {
return
(
window
.
devicePixelRatio
||
1
)
/
backingStore
return
(
window
.
devicePixelRatio
||
1
)
/
backingStore
},
},
selectHandlestatus
(
value
)
{
selectHandlestatus
(
value
)
{
this
.
searchSource
.
pay
Status
=
value
this
.
searchSource
.
order
Status
=
value
},
},
selectAgent
(
value
)
{
selectAgent
(
value
)
{
this
.
searchSource
.
agentName
=
value
this
.
searchSource
.
agentName
=
value
...
@@ -196,7 +196,7 @@ export default {
...
@@ -196,7 +196,7 @@ export default {
pageNumber
:
10
,
pageNumber
:
10
,
currentPage
:
this
.
pagination
.
current
,
currentPage
:
this
.
pagination
.
current
,
agentName
:
this
.
searchSource
.
agentName
,
agentName
:
this
.
searchSource
.
agentName
,
payStatus
:
this
.
searchSource
.
pay
Status
,
orderStatus
:
this
.
searchSource
.
order
Status
,
buyerId
:
this
.
searchSource
.
UserMessage
.
emplId
buyerId
:
this
.
searchSource
.
UserMessage
.
emplId
}
}
$http
.
post
(
`/mingpay/v1/isv/order/list_order_page`
,
RechargeData
).
then
((
res
)
=>
{
$http
.
post
(
`/mingpay/v1/isv/order/list_order_page`
,
RechargeData
).
then
((
res
)
=>
{
...
...
src/components/pages/PaymentManagement/AllowanceDetails.vue
View file @
81b2cd99
<
template
>
<
template
>
<a-spin
:spinning=
"
spinning
"
:delay=
"delayTime"
>
<a-spin
:spinning=
"
this.$store.state
"
:delay=
"delayTime"
>
<div
class=
"allowanceDetails"
>
<div
class=
"allowanceDetails"
>
<a-button
type=
"primary"
@
click=
"back()"
><img
style=
"margin-top:-4px;margin-right: 6px;width: 14px"
src=
"../../../assets/back.png"
/>
返回
</a-button>
<a-button
type=
"primary"
@
click=
"back()"
><img
style=
"margin-top:-4px;margin-right: 6px;width: 14px"
src=
"../../../assets/back.png"
/>
返回
</a-button>
<div
class=
"title"
>
津贴详情
</div>
<div
class=
"title"
>
津贴详情
</div>
...
@@ -83,7 +83,6 @@ export default {
...
@@ -83,7 +83,6 @@ export default {
searchData
:
''
,
searchData
:
''
,
isshow
:
false
,
isshow
:
false
,
visible
:
false
,
visible
:
false
,
spinning
:
false
,
delayTime
:
100
,
delayTime
:
100
,
form
:
this
.
$form
.
createForm
(
this
),
form
:
this
.
$form
.
createForm
(
this
),
isshowChange
:
false
,
isshowChange
:
false
,
...
@@ -141,7 +140,7 @@ export default {
...
@@ -141,7 +140,7 @@ export default {
return
return
}
}
this
.
visible
=
false
this
.
visible
=
false
this
.
spinning
=
true
store
.
dispatch
(
'setSpinning'
,
true
)
// Should format date value before submit.
// Should format date value before submit.
const
values
=
{
const
values
=
{
...
fieldsValue
,
...
fieldsValue
,
...
...
src/components/pages/PaymentManagement/AllowancePayment.vue
View file @
81b2cd99
<
template
>
<
template
>
<a-spin
:spinning=
"
spinning
"
:delay=
"delayTime"
>
<a-spin
:spinning=
"
this.$store.state
"
:delay=
"delayTime"
>
<div
class=
"AllowancePayment"
>
<div
class=
"AllowancePayment"
>
<div
class=
"searchBox"
>
<div
class=
"searchBox"
>
<div
style=
"width: 75px"
>
截止时间:
</div>
<div
style=
"width: 75px"
>
截止时间:
</div>
...
@@ -104,7 +104,6 @@ export default {
...
@@ -104,7 +104,6 @@ export default {
data
()
{
data
()
{
return
{
return
{
MINGPAY_SUBSIDY_STATUS
:
MINGPAY_SUBSIDY_STATUS
,
MINGPAY_SUBSIDY_STATUS
:
MINGPAY_SUBSIDY_STATUS
,
spinning
:
false
,
delayTime
:
100
,
delayTime
:
100
,
formItemLayout
:
{
formItemLayout
:
{
labelCol
:
{
labelCol
:
{
...
@@ -325,7 +324,7 @@ export default {
...
@@ -325,7 +324,7 @@ export default {
return
return
}
}
this
.
visible
=
false
this
.
visible
=
false
this
.
spinning
=
true
store
.
dispatch
(
'setSpinning'
,
true
)
// Should format date value before submit.
// Should format date value before submit.
const
values
=
{
const
values
=
{
...
fieldsValue
,
...
fieldsValue
,
...
@@ -352,12 +351,8 @@ export default {
...
@@ -352,12 +351,8 @@ export default {
this
.
form
.
resetFields
()
this
.
form
.
resetFields
()
this
.
userIdListObj
=
[]
this
.
userIdListObj
=
[]
this
.
departmentIdListObj
=
[]
this
.
departmentIdListObj
=
[]
this
.
spinning
=
false
this
.
$message
.
success
(
res
.
data
.
data
)
this
.
$message
.
success
(
res
.
data
.
data
)
this
.
queryCouponRecordList
()
this
.
queryCouponRecordList
()
}
else
{
this
.
spinning
=
false
this
.
$message
.
error
(
res
.
data
.
message
)
}
}
})
})
})
})
...
...
src/components/pages/PaymentManagement/PaymentManagementHome.vue
View file @
81b2cd99
...
@@ -9,15 +9,15 @@
...
@@ -9,15 +9,15 @@
style=
"height: 100%"
style=
"height: 100%"
@
click=
"routerPush"
@
click=
"routerPush"
>
>
<a-menu-item
class=
"itemFlex"
key=
"accountManagement"
><div
:class=
"[chooseMenuList === 'accountManagement' ? 'menuIcon menuIcon1_2' : 'menuIcon menuIcon1_1']"
></div>
账户中心
</a-menu-item>
<a-menu-item
v-if=
"this.$store.state.menuList.indexOf('3100') > -1"
class=
"itemFlex"
key=
"accountManagement"
><div
:class=
"[chooseMenuList === 'accountManagement' ? 'menuIcon menuIcon1_2' : 'menuIcon menuIcon1_1']"
></div>
账户中心
</a-menu-item>
<a-menu-item
class=
"itemFlex"
key=
"rechargeRecord"
><div
:class=
"[chooseMenuList === 'rechargeRecord' ? 'menuIcon menuIcon2_2' : 'menuIcon menuIcon2_1']"
></div>
充值记录
</a-menu-item>
<a-menu-item
v-if=
"this.$store.state.menuList.indexOf('3200') > -1"
class=
"itemFlex"
key=
"rechargeRecord"
><div
:class=
"[chooseMenuList === 'rechargeRecord' ? 'menuIcon menuIcon2_2' : 'menuIcon menuIcon2_1']"
></div>
充值记录
</a-menu-item>
<a-menu-item
class=
"itemFlex"
key=
"allowancePayment"
><div
:class=
"[chooseMenuList === 'allowancePayment' ? 'menuIcon menuIcon3_2' : 'menuIcon menuIcon3_1']"
></div>
津贴发放
</a-menu-item>
<a-menu-item
v-if=
"this.$store.state.menuList.indexOf('3300') > -1"
class=
"itemFlex"
key=
"allowancePayment"
><div
:class=
"[chooseMenuList === 'allowancePayment' ? 'menuIcon menuIcon3_2' : 'menuIcon menuIcon3_1']"
></div>
津贴发放
</a-menu-item>
<a-menu-item
class=
"itemFlex"
key=
"recordsOfConsumption"
><div
:class=
"[chooseMenuList === 'recordsOfConsumption' ? 'menuIcon menuIcon4_2' : 'menuIcon menuIcon4_1']"
></div>
消费记录
</a-menu-item>
<a-menu-item
v-if=
"this.$store.state.menuList.indexOf('3400') > -1"
class=
"itemFlex"
key=
"recordsOfConsumption"
><div
:class=
"[chooseMenuList === 'recordsOfConsumption' ? 'menuIcon menuIcon4_2' : 'menuIcon menuIcon4_1']"
></div>
消费记录
</a-menu-item>
<a-menu-item
class=
"itemFlex"
key=
"systemReconciliation"
><div
:class=
"[chooseMenuList === 'systemReconciliation' ? 'menuIcon menuIcon6_2' : 'menuIcon menuIcon6_1']"
></div>
系统对账
</a-menu-item>
<a-menu-item
v-if=
"this.$store.state.menuList.indexOf('3500') > -1"
class=
"itemFlex"
key=
"systemReconciliation"
><div
:class=
"[chooseMenuList === 'systemReconciliation' ? 'menuIcon menuIcon6_2' : 'menuIcon menuIcon6_1']"
></div>
系统对账
</a-menu-item>
<!--
<a-menu-item
class=
"itemFlex"
key=
"cashierManagement"
><div
:class=
"[chooseMenuList === 'cashierManagement' ? 'menuIcon menuIcon5_2' : 'menuIcon menuIcon5_1']"
></div>
设置收银员
</a-menu-item>
<!--
<a-menu-item
class=
"itemFlex"
key=
"cashierManagement"
><div
:class=
"[chooseMenuList === 'cashierManagement' ? 'menuIcon menuIcon5_2' : 'menuIcon menuIcon5_1']"
></div>
设置收银员
</a-menu-item>
<a-menu-item
class=
"itemFlex"
key=
"SetAdministrators"
><div
:class=
"[chooseMenuList === 'SetAdministrators' ? 'menuIcon menuIcon5_2' : 'menuIcon menuIcon5_1']"
></div>
设置管理员
</a-menu-item>
-->
<a-menu-item
class=
"itemFlex"
key=
"SetAdministrators"
><div
:class=
"[chooseMenuList === 'SetAdministrators' ? 'menuIcon menuIcon5_2' : 'menuIcon menuIcon5_1']"
></div>
设置管理员
</a-menu-item>
-->
<a-menu-item
class=
"itemFlex"
key=
"paymentManagementSetting"
><div
:class=
"[chooseMenuList === 'paymentManagementSetting' ? 'menuIcon menuIcon7_2' : 'menuIcon menuIcon7_1']"
></div>
设置中心
</a-menu-item>
<a-menu-item
v-if=
"this.$store.state.menuList.indexOf('3600') > -1"
class=
"itemFlex"
key=
"paymentManagementSetting"
><div
:class=
"[chooseMenuList === 'paymentManagementSetting' ? 'menuIcon menuIcon7_2' : 'menuIcon menuIcon7_1']"
></div>
设置中心
</a-menu-item>
<a-menu-item
class=
"itemFlex"
key=
"operationLog"
><div
:class=
"[chooseMenuList === 'operationLog' ? 'menuIcon menuIcon8_2' : 'menuIcon menuIcon8_1']"
></div>
操作日志
</a-menu-item>
<a-menu-item
v-if=
"this.$store.state.menuList.indexOf('3700') > -1"
class=
"itemFlex"
key=
"operationLog"
><div
:class=
"[chooseMenuList === 'operationLog' ? 'menuIcon menuIcon8_2' : 'menuIcon menuIcon8_1']"
></div>
操作日志
</a-menu-item>
</a-menu>
</a-menu>
</a-layout-sider>
</a-layout-sider>
<a-layout-content
:style=
"
{ padding: '0 24px', minHeight: '280px' }">
<a-layout-content
:style=
"
{ padding: '0 24px', minHeight: '280px' }">
...
...
src/components/pages/rightsManagement/rightsManagement.vue
View file @
81b2cd99
...
@@ -106,6 +106,7 @@ export default {
...
@@ -106,6 +106,7 @@ export default {
roleCode
:
roleCode
roleCode
:
roleCode
}
}
$http
.
post
(
`/admin/manager/modifyFullRole`
,
data
).
then
(
success
=>
{
$http
.
post
(
`/admin/manager/modifyFullRole`
,
data
).
then
(
success
=>
{
this
.
$message
.
success
(
'编辑成功'
)
return
this
.
getAllAdminisgtrator
()
return
this
.
getAllAdminisgtrator
()
})
})
})
})
...
@@ -120,7 +121,8 @@ export default {
...
@@ -120,7 +121,8 @@ export default {
cancelText
:
'取消'
,
cancelText
:
'取消'
,
onOk
()
{
onOk
()
{
let
data
=
{
roleId
:
record
.
key
}
let
data
=
{
roleId
:
record
.
key
}
$http
.
post
(
`/admin/role/del`
,
data
).
then
(
res
=>
{
$http
.
post
(
`/admin/role/del1`
,
data
).
then
(
res
=>
{
_that
.
$message
.
success
(
'删除成功'
)
_that
.
getAllAdminisgtrator
()
_that
.
getAllAdminisgtrator
()
})
})
}
}
...
@@ -166,7 +168,7 @@ export default {
...
@@ -166,7 +168,7 @@ export default {
roleName
:
item
.
roleName
||
'---'
,
roleName
:
item
.
roleName
||
'---'
,
userHasRoles
:
userHasRoles
||
'---'
,
userHasRoles
:
userHasRoles
||
'---'
,
roleDesc
:
item
.
roleDesc
||
'---'
,
roleDesc
:
item
.
roleDesc
||
'---'
,
creatTime
:
item
.
createTime
.
replace
(
'T'
,
' '
)
,
creatTime
:
item
.
createTime
?
item
.
createTime
.
replace
(
'T'
,
' '
)
:
''
,
action
:
{
ddUserId
:
ddUserId
,
name
:
userHasRoles
}
action
:
{
ddUserId
:
ddUserId
,
name
:
userHasRoles
}
})
})
}
}
...
...
src/components/pages/rightsManagement/rightsManagementHome.vue
View file @
81b2cd99
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
style=
"height: 100%"
style=
"height: 100%"
@
click=
"routerPush"
@
click=
"routerPush"
>
>
<a-menu-item
class=
"itemFlex"
key=
"rightsManagement"
>
<a-menu-item
v-if=
"this.$store.state.menuList.indexOf('9100') > -1"
class=
"itemFlex"
key=
"rightsManagement"
>
<div
:class=
"[chooseMenuList === 'rightsManagement' ? 'menuIcon menuIcon1_2' : 'menuIcon menuIcon1_1']"
></div><div>
角色管理
</div>
<div
:class=
"[chooseMenuList === 'rightsManagement' ? 'menuIcon menuIcon1_2' : 'menuIcon menuIcon1_1']"
></div><div>
角色管理
</div>
</a-menu-item>
</a-menu-item>
</a-menu>
</a-menu>
...
...
src/main.js
View file @
81b2cd99
...
@@ -35,7 +35,6 @@ Vue.use(Input.TextArea)
...
@@ -35,7 +35,6 @@ Vue.use(Input.TextArea)
Vue
.
use
(
message
)
Vue
.
use
(
message
)
Vue
.
use
(
Pagination
)
Vue
.
use
(
Pagination
)
Vue
.
config
.
productionTip
=
false
Vue
.
config
.
productionTip
=
false
Vue
.
prototype
.
$confirm
=
Modal
.
confirm
Vue
.
prototype
.
$confirm
=
Modal
.
confirm
Vue
.
prototype
.
$message
=
message
Vue
.
prototype
.
$message
=
message
Vue
.
prototype
.
$echarts
=
echarts
Vue
.
prototype
.
$echarts
=
echarts
...
@@ -48,26 +47,27 @@ router.beforeEach(function (to, from, next) {
...
@@ -48,26 +47,27 @@ router.beforeEach(function (to, from, next) {
if
(
sessionStorage
.
getItem
(
'isFirstAction'
))
{
if
(
sessionStorage
.
getItem
(
'isFirstAction'
))
{
next
()
next
()
}
else
{
}
else
{
sessionStorage
.
setItem
(
'isFirstAction'
,
true
)
if
(
to
.
redirectedFrom
.
substr
(
1
)
!==
localStorage
.
getItem
(
'orgId'
))
{
if
(
to
.
redirectedFrom
.
substr
(
1
)
!==
localStorage
.
getItem
(
'orgId'
))
{
localStorage
.
clear
()
localStorage
.
clear
()
localStorage
.
setItem
(
'orgId'
,
to
.
redirectedFrom
.
substr
(
1
))
localStorage
.
setItem
(
'orgId'
,
to
.
redirectedFrom
.
substr
(
1
))
}
}
config
.
ddconfig
().
then
((
res
)
=>
{
// config.ddconfig().then((res) => {
if
(
res
===
'no'
)
{
// if (res === 'no') {
next
({
name
:
'configError'
})
// next({ name: 'configError' })
// }
// }).then(() => {
// }).catch((err) => {
// console.log(err, '登录失败')
// })
config
.
ddready
(
'ddpermission'
).
then
((
res
)
=>
{
if
(
res
===
'noPermission'
)
{
next
({
name
:
'noPermission'
})
}
else
{
next
({
name
:
'accountManagement'
})
}
}
}).
then
(()
=>
{
config
.
ddready
(
'ddpermission'
).
then
((
res
)
=>
{
if
(
res
===
'noPermission'
)
{
next
({
name
:
'noPermission'
})
}
else
{
next
({
name
:
'accountManagement'
})
}
}).
catch
((
err
)
=>
{
console
.
log
(
'ddpermission'
,
err
)
})
}).
catch
((
err
)
=>
{
}).
catch
((
err
)
=>
{
console
.
log
(
err
,
'登录失败'
)
console
.
log
(
'ddpermission'
,
err
)
})
})
}
}
}
}
...
...
src/store.js
View file @
81b2cd99
...
@@ -4,12 +4,19 @@ import Vuex from 'vuex'
...
@@ -4,12 +4,19 @@ import Vuex from 'vuex'
Vue
.
use
(
Vuex
)
Vue
.
use
(
Vuex
)
export
default
new
Vuex
.
Store
({
export
default
new
Vuex
.
Store
({
state
:
{
state
:
{
menuList
:
[],
spinning
:
false
},
},
mutations
:
{
mutations
:
{
setMenuList
(
state
,
payload
)
{
state
.
menuList
=
payload
},
setSpinning
(
state
,
payload
)
{
state
.
spinning
=
payload
}
},
},
actions
:
{
actions
:
{
setMenuList
:
({
commit
},
menuList
)
=>
commit
(
'setMenuList'
,
menuList
),
setSpinning
:
({
commit
},
spinning
)
=>
commit
(
'setSpinning'
,
spinning
)
}
}
})
})
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment