Entrance.vue
3.14 KB
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
<template>
<view class="entrance-box">
<template v-if="entranceList.length">
<view class="entrance-container">
<view class="entrance-list">
<view class="entrance-item" v-for="(item, index) in entranceList" :key="index" @click="handleClick(item)">
<view :class="['sprite-icon', `icon-${item.icon}`]"></view>
<view class="entrance-name">{{ item.label }}</view>
</view>
</view>
</view>
</template>
<template v-else>
<view class="developing flex">
<image class="developing-icon" src="../assets/images/common/developing.webp" />
功能开发中
</view>
</template>
</view>
</template>
<script>
export default {
name: 'Entrance',
data() {
return {}
},
computed: {
entranceList() {
let { sceneType } = uni.$storage.get('userInfo'),
entranceList = [
{
icon: 'daily-report',
label: '驻店日报',
name: 'DailyReport',
sceneType: [0, 1, 7]
},
{
icon: 'create-order',
label: '新建工单',
name: 'CreateOrder',
sceneType: [0, 1]
},
{
icon: 'equity-order',
label: '权益提单',
name: 'EquityManagement',
sceneType: [0]
},
{
icon: 'defeat-order',
label: '战败下单',
name: 'DefeatOrder',
sceneType: [0, 1]
},
{
icon: 'order-management',
label: '工单列表',
name: 'OrderManagement',
sceneType: [0, 1]
},
{
icon: 'evaluation-management',
label: '评估单管理',
name: 'EvaluationFormList',
sceneType: [7]
},
{
icon: 'delivery-management',
label: '交付管理',
name: 'DeliveryManagement',
page: '/pages/usedCar/deliveryManagement/index',
sceneType: [7]
},
{
icon: 'report-management',
label: '报告管理',
name: 'ReportManagement',
page: '/pages/usedCar/reportManagement/index',
sceneType: [7]
}
]
return entranceList.filter(e => e.sceneType.includes(sceneType))
}
},
methods: {
handleClick(item) {
// 这里可以根据实际需求进行跳转或功能处理
this.$emit('entranceClick', item)
}
}
}
</script>
<style scoped lang="scss">
.entrance-container {
width: 100%;
// margin-top: toRpx(64);
display: flex;
// justify-content: center;
}
.entrance-list {
display: flex;
flex-wrap: wrap;
gap: toRpx(68);
justify-content: flex-start;
}
.entrance-item {
min-width: toRpx(120);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: toRpx(28);
color: #333;
.entrance-name {
margin-top: toRpx(8);
}
}
.developing {
height: 100%;
flex-direction: column;
color: #999999;
font-size: toRpx(20);
&-icon {
width: toRpx(344);
height: toRpx(208);
}
}
</style>