1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<template>
<div class="PaymentManagementHome">
<a-layout style="padding: 24px 0; background: #fff; min-height: calc(100vh - 149px);min-width:1100px">
<a-layout-sider width="200" style="background: #fff">
<a-menu
mode="inline"
:defaultSelectedKeys="[defaultSelectedKeys]"
:defaultOpenKeys="['sub1']"
style="height: 100%"
@click="routerPush"
>
<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 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 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 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>
</a-layout-sider>
<a-layout-content :style="{ padding: '0 24px', minHeight: '280px' }">
<router-view/>
</a-layout-content>
</a-layout>
</div>
</template>
<script>
import router from '../../../router'
export default {
name: 'paymentManagementHome',
data () {
return {
defaultSelectedKeys: 'defaultSelectedKeys',
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.$router.push({ name: 'accountManagement' })
this.chooseMenuList = 'accountManagement'
} else if (this.$store.state.menuList.indexOf('3200') > -1) {
this.$router.push({ name: 'rechargeRecord' })
this.chooseMenuList = 'rechargeRecord'
} else if (this.$store.state.menuList.indexOf('3300') > -1) {
this.$router.push({ name: 'allowancePayment' })
this.chooseMenuList = 'allowancePayment'
} else if (this.$store.state.menuList.indexOf('3400') > -1) {
this.$router.push({ name: 'recordsOfConsumption' })
this.chooseMenuList = 'recordsOfConsumption'
} else if (this.$store.state.menuList.indexOf('3500') > -1) {
this.$router.push({ name: 'systemReconciliation' })
this.chooseMenuList = 'systemReconciliation'
} else if (this.$store.state.menuList.indexOf('3600') > -1) {
this.$router.push({ name: 'paymentManagementSetting' })
this.chooseMenuList = 'paymentManagementSetting'
} else if (this.$store.state.menuList.indexOf('3700') > -1) {
this.$router.push({ name: 'operationLog' })
this.chooseMenuList = 'operationLog'
}
},
watch: {
$route (to, from) {
this.defaultSelectedKeys = to.name
this.chooseMenuList = to.name
}
},
methods: {
routerPush (obj) {
this.chooseMenuList = obj.key
this.$router.push({ name: obj.key })
}
}
}
</script>
<style lang="less" scoped>
.itemFlex{
display: flex;
align-items: center;
}
.menuIcon{
width: 13px;
height: 13px;
margin-right: 5px;
margin-top: -2px;
background-size: cover;
display: inline-block;
}
.menuIcon1_1{
background-image: url('../../../assets/menuIcon/accountManagement1.png');
}
.menuIcon1_2{
background-image: url('../../../assets/menuIcon/accountManagement2.png');
}
.menuIcon2_1{
background-image: url('../../../assets/menuIcon/rechargeRecord1.png');
}
.menuIcon2_2{
background-image: url('../../../assets/menuIcon/rechargeRecord2.png');
}
.menuIcon3_1{
background-image: url('../../../assets/menuIcon/allowancePayment1.png');
}
.menuIcon3_2{
background-image: url('../../../assets/menuIcon/allowancePayment2.png');
}
.menuIcon4_1{
background-image: url('../../../assets/menuIcon/recordsOfConsumption1.png');
}
.menuIcon4_2{
background-image: url('../../../assets/menuIcon/recordsOfConsumption2.png');
}
.menuIcon5_1{
background-image: url('../../../assets/menuIcon/cashierManagement1.png');
}
.menuIcon5_2{
background-image: url('../../../assets/menuIcon/cashierManagement2.png');
}
.menuIcon6_1{
background-image: url('../../../assets/menuIcon/systemReconciliation1.png');
}
.menuIcon6_2{
background-image: url('../../../assets/menuIcon/systemReconciliation2.png');
}
.menuIcon7_1{
background-image: url('../../../assets/menuIcon/paymentManagementSetting1.png');
}
.menuIcon7_2{
background-image: url('../../../assets/menuIcon/paymentManagementSetting2.png');
}
.menuIcon8_1{
background-image: url('../../../assets/menuIcon/operationLog1.png');
}
.menuIcon8_2{
background-image: url('../../../assets/menuIcon/operationLog2.png');
}
</style>