operational.vue
2.18 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
<!-- 快递作业管理 -->
<template>
<div class="dashboard-container operational">
<div class="app-container">
<el-card
shadow="never"
class="operation-box"
>
<div
v-for="(item, index) in menu"
:key="index"
class="operation-item"
:class="{ active: isActive == item.value ? true : false }"
@click="
isActive = item.value
currentComp = item.comp
"
>
{{ item.name }}
</div>
</el-card>
<el-container>
<test1 :is="currentComp" />
</el-container>
</div>
</div>
</template>
<script>
import pickUptask from './components/pickup-task'
import dispatchTask from './components/dispatch-task'
import cancelTask from './components/cancel-task'
export default {
name: 'Courses',
components: {
pickUptask,
dispatchTask,
cancelTask
},
data() {
return {
city: '',
value: '',
currentComp: 'pickUptask',
isActive: '1',
id: '',
menu: [
{
name: '取件作业',
value: '1',
comp: 'pickUptask'
},
{
name: '派件作业',
value: '2',
comp: 'dispatchTask'
}
// {
// name: '已取消',
// value: '3',
// comp: 'cancelTask'
// }
]
}
},
computed: {
status() {
return status
}
},
// 挂载结束
mounted: function () {},
// 创建完毕状态
created() {},
// 组件更新
updated: function () {},
methods: {}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
.operational {
.operation-box {
height: 48px;
line-height: 48px;
border-radius: 4px;
/deep/ .el-card__body {
padding: 0;
display: flex;
}
.operation-item {
width: 120px;
font-size: 14px;
text-align: center;
font-weight: 400;
color: #20232a;
cursor: pointer;
&.active {
background: #ffeeeb;
color: #e15536;
}
}
}
}
.alert {
margin: 10px 0px;
}
.pagination {
margin-top: 10px;
}
</style>
<style lang="scss" scoped>
.active {
color: #ff643d;
}
</style>