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
fcc1343c
Commit
fcc1343c
authored
Dec 07, 2019
by
fengzhaoyu
Browse files
Options
Browse Files
Download
Plain Diff
角色判断修改
parents
b44811bd
e0438335
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
10 deletions
+33
-10
axios.js
src/api/axios.js
+2
-6
Home.vue
src/components/common/Home.vue
+2
-0
CanteenManagementHome.vue
...ponents/pages/CanteenManagement/CanteenManagementHome.vue
+10
-1
PaymentManagementHome.vue
...ponents/pages/PaymentManagement/PaymentManagementHome.vue
+16
-3
rightsManagementHome.vue
...omponents/pages/rightsManagement/rightsManagementHome.vue
+3
-0
No files found.
src/api/axios.js
View file @
fcc1343c
...
...
@@ -28,17 +28,13 @@ axios.interceptors.request.use((config) => {
})
// 配置请求返回的拦截器,
axios
.
interceptors
.
response
.
use
(
res
=>
{
// if (res.data.resultCode === 0) {
// return Promise.resolve(res)
// } else {
// return Promise.reject()
// }
if
(
res
.
data
.
code
===
0
||
res
.
data
.
resultCode
===
0
)
{
store
.
dispatch
(
'setSpinning'
,
false
)
return
Promise
.
resolve
(
res
)
}
else
if
(
res
.
data
.
code
===
40003
||
res
.
data
.
resultCode
===
40003
)
{
store
.
dispatch
(
'setSpinning'
,
false
)
message
.
error
(
'权限不足'
)
return
Promise
.
reject
(
'1'
)
return
Promise
.
reject
()
}
},
err
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
...
...
src/components/common/Home.vue
View file @
fcc1343c
...
...
@@ -54,6 +54,7 @@ export default {
$http
.
post
(
'/admin/menu/user'
,
data
).
then
(
res
=>
{
const
result
=
that
.
getSelectList
(
res
.
data
.
data
)
store
.
dispatch
(
'setMenuList'
,
that
.
selectList
)
console
.
log
(
that
.
selectList
)
})
config
.
ddconfig
()
},
...
...
@@ -69,6 +70,7 @@ export default {
this
.
$router
.
push
({
name
:
obj
.
key
})
},
getSelectList
(
data
)
{
console
.
log
(
data
,
'12313123'
)
let
that
=
this
const
addKey
=
data
=>
data
.
map
(
item
=>
{
if
(
item
.
children
.
length
>
0
)
{
...
...
src/components/pages/CanteenManagement/CanteenManagementHome.vue
View file @
fcc1343c
...
...
@@ -36,12 +36,21 @@ export default {
data
()
{
return
{
defaultSelectedKeys
:
'defaultSelectedKeys'
,
chooseMenuList
:
'
classificationOfDishes
'
chooseMenuList
:
''
}
},
created
()
{
this
.
defaultSelectedKeys
=
this
.
$route
.
name
this
.
chooseMenuList
=
this
.
$route
.
name
if
(
this
.
$store
.
state
.
menuList
.
indexOf
(
'4100'
)
>
-
1
)
{
this
.
chooseMenuList
=
'classificationOfDishes'
}
else
if
(
this
.
$store
.
state
.
menuList
.
indexOf
(
'4200'
)
>
-
1
)
{
this
.
chooseMenuList
=
'menuManagement'
}
else
if
(
this
.
$store
.
state
.
menuList
.
indexOf
(
'4300'
)
>
-
1
)
{
this
.
chooseMenuList
=
'consumptionOrder'
}
else
if
(
this
.
$store
.
state
.
menuList
.
indexOf
(
'4400'
)
>
-
1
)
{
this
.
chooseMenuList
=
'consumptionStatistics'
}
},
watch
:
{
$route
(
to
,
from
)
{
...
...
src/components/pages/PaymentManagement/PaymentManagementHome.vue
View file @
fcc1343c
...
...
@@ -14,8 +14,6 @@
<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
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
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=
"SetAdministrators"
><div
:class=
"[chooseMenuList === 'SetAdministrators' ? 'menuIcon menuIcon5_2' : 'menuIcon menuIcon5_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
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>
...
...
@@ -33,13 +31,28 @@ export default {
data
()
{
return
{
defaultSelectedKeys
:
'defaultSelectedKeys'
,
chooseMenuList
:
'
accountManagement
'
chooseMenuList
:
''
}
},
created
()
{
console
.
log
(
this
.
$store
.
state
.
menuList
,
11111
)
this
.
defaultSelectedKeys
=
this
.
$route
.
name
this
.
chooseMenuList
=
this
.
$route
.
name
if
(
this
.
$store
.
state
.
menuList
.
indexOf
(
'3100'
)
>
-
1
)
{
this
.
chooseMenuList
=
'accountManagement'
}
else
if
(
this
.
$store
.
state
.
menuList
.
indexOf
(
'3200'
)
>
-
1
)
{
this
.
chooseMenuList
=
'rechargeRecord'
}
else
if
(
this
.
$store
.
state
.
menuList
.
indexOf
(
'3300'
)
>
-
1
)
{
this
.
chooseMenuList
=
'allowancePayment'
}
else
if
(
this
.
$store
.
state
.
menuList
.
indexOf
(
'3400'
)
>
-
1
)
{
this
.
chooseMenuList
=
'recordsOfConsumption'
}
else
if
(
this
.
$store
.
state
.
menuList
.
indexOf
(
'3500'
)
>
-
1
)
{
this
.
chooseMenuList
=
'systemReconciliation'
}
else
if
(
this
.
$store
.
state
.
menuList
.
indexOf
(
'3600'
)
>
-
1
)
{
this
.
chooseMenuList
=
'paymentManagementSetting'
}
else
if
(
this
.
$store
.
state
.
menuList
.
indexOf
(
'3700'
)
>
-
1
)
{
this
.
chooseMenuList
=
'operationLog'
}
},
watch
:
{
$route
(
to
,
from
)
{
...
...
src/components/pages/rightsManagement/rightsManagementHome.vue
View file @
fcc1343c
...
...
@@ -33,6 +33,9 @@ export default {
created
()
{
this
.
defaultSelectedKeys
=
this
.
$route
.
name
this
.
chooseMenuList
=
this
.
$route
.
name
if
(
this
.
$store
.
state
.
menuList
.
indexOf
(
'9100'
)
>
-
1
)
{
this
.
chooseMenuList
=
'rightsManagement'
}
},
watch
:
{
$route
(
to
,
from
)
{
...
...
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