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
| <template>
| <el-dialog title="查看物流" :visible.sync="dialogVisible" @close="dialogFormVisible" :close-on-click-modal="false"
| :close-on-press-escape="false" width="900px">
| <el-timeline :reverse="reverse">
| <el-timeline-item v-for="(activity, index) in activities" :key="index" :color="index==0?'#2ECC40':''" :timestamp="activity.time">
| {{activity.context}}
| </el-timeline-item>
| </el-timeline>
| </el-dialog>
| </template>
|
| <script>
| import OrderApi from '@/api/order.js';
| export default {
| data() {
| return {
| /*是否显示*/
| dialogVisible: false,
| /*结果类别*/
| type: 'error',
| /*传出去的参数*/
| params: null,
| reverse: false,
| order_id:0,
| activities: []
| }
| },
| props: ['isLogistics','logisticsData'],
| watch: {
| isLogistics: function(n, o) {
| if (n != o) {
| if (n) {
| this.dialogVisible = n;
| this.type = 'error';
|
| }
| }
| },
| logisticsData: function(n, o) {
| if (n != o) {
| if (n) {
| this.activities = n;
| console.log(this.activities)
|
| }
| }
| }
| },
| methods: {
| getData(){
| let self=this;
| let Params={
| order_id:self.order_id,
| }
| OrderApi.orderlist(Params, true)
| .then(res => {
|
| })
| .catch(error => {});
| },
| /*关闭弹窗*/
| dialogFormVisible() {
| this.$emit('closeDialog', {
| type: this.type,
| openDialog: false,
| params: this.params
| });
| },
| }
| }
| </script>
|
| <style>
| .el-step__main .el-step__description {
| padding-bottom: 10px;
| }
| </style>
|
|