order-actions.vue
2.33 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>
<div class="pane-body">
<div
class="video-wrapper"
v-if="appraiseVideoUrl && pageName === 'list'"
@click="
() =>
onVideoHandler({
videoUrl: appraiseVideoUrl,
orderCode: order.orderCode
})
"
>
<div class="play-btn"></div>
<div class="play-txt">鉴定视频</div>
</div>
<div class="after-video" v-else></div>
<div class="actions-wrapper">
<Button
v-for="action in actionList"
:key="action.code"
@click="() => onActionHandler(action)"
>{{ action.text }}</Button
>
</div>
</div>
</template>
<script>
import { orderActionsMap, ownType } from "constants/order-constants";
import { createNamespacedHelpers } from "vuex";
export default {
props: {
order: {
type: Object,
default: {}
},
pageName: {
type: String,
default: ""
}
},
computed: {
actionList: function() {
return this.order.buttons;
},
appraiseVideoUrl: function() {
return this.order.appraiseVideoUrl;
}
},
methods: {
onActionHandler(action) {
this.$emit("on-action", action);
},
onVideoHandler(params) {
this.$emit("on-video", params);
}
}
};
</script>
<style lang="scss">
.action-dialog-content {
text-align: center;
color: #000;
}
.action-confirm {
color: #d0021b;
}
.action-cancel {
color: #000;
}
</style>
<style lang="scss" scoped>
.pane-body {
display: flex;
justify-content: space-between;
}
.video-wrapper {
display: flex;
align-items: center;
.play-btn {
width: 28.4px;
height: 28.4px;
background: url("~statics/image/order/play@3x.png");
background-size: cover;
}
.play-txt {
margin-left: 6.8px;
color: #000;
font-size: 24px;
line-height: 1.4;
}
}
.after-video {
background-color: transparent;
}
.actions-wrapper {
display: flex;
justify-content: flex-end;
button {
font-size: 24px;
// padding: 18.4px 64px;
width: 226px;
height: 80px;
color: #999;
letter-spacing: 0;
background: #fff;
border: 1px solid #ccc;
line-height: 1.4;
margin-right: 20px;
white-space: nowrap;
border-radius: 40px;
}
& :last-child {
background: #002b47;
color: #fff;
border: 1px solid #002b47;
margin-right: 0;
}
}
</style>