dialog.vue
2.9 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
<template>
<div>
<el-dialog title="查看日志" width="80%" :visible.sync="dialogVisible" :close-on-click-modal="false"
:show-close="false" :append-to-body="true" top="2vh" @close="close">
<el-form class="form-header" label-position="right" label-width="auto" size="small">
<el-row>
<el-col :span="4">
<el-form-item label="运单号">
<span>{{ data.waybillNo }}</span>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="ACCSID">
<span>{{ data.accsId }}</span>
</el-form-item>
</el-col>
</el-row>
</el-form>
<Tables ref="cargoLog" ductName="cargoLog" :order="false" :border='false' :data="data.tableData"
:headerData="tableHeader" tableAlign="center" :showOverflowTooltip="false"
:page="selectData.page" :limitSize="selectData.size" :pageSizes="[100]" :pagination="false"
:loading="loading" @currentChange="currentChange">
</Tables>
<div slot="footer" class="dialog-footer">
<el-button @click="close">关 闭</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { findCargoDataChangeLog } from "@/api/system/logConfig.js";
export default {
name: "Log",
props: {
dialogVisible: {
type: Boolean,
default: false
},
cargoData: {
type: Object,
default: null
}
},
data() {
return {
data: {
tableData: []
},
selectData: {
page: 1,
size: 100
},
tableHeader: this.tableHeaders['cargoLog'],
tableHeight: 300,
loading: false
}
},
watch: {
dialogVisible(val) {
if (val) {
this.data.waybillNo = this.cargoData.waybillNo
this.data.accsId = this.cargoData.accsId
this.getLog(this.cargoData.accsId)
}
}
},
methods: {
//通过accsid获取运单日志
getLog(val) {
this.loading = true
findCargoDataChangeLog(val).then(res => {
this.loading = false
if (res.code === 200) {
this.data.tableData = res.data.list
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.loading = false
console.log(err)
})
},
//关闭
close() {
this.$emit('close')
},
currentChange(val) { },
}
}
</script>
<style scoped>
</style>