weatherTable.vue
2.51 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
<template>
<div style="padding:10px">
<!-- <el-button class="ml20 mb20" size="small" icon="el-icon-back" @click="close">返 回</el-button> -->
<el-card header="流水信息">
<Tables ref="weatherTable" ductName="weatherTable" :order="true" :border="false" :data="data"
:headerData="tableHeader" :showOverflowTooltip="false" :height="tableHeight" :page="selectData.page"
:limitSize="selectData.size" :pageSizes="[100]" :pagination="false" :loading="loading"
@currentChange="currentChange">
</Tables>
</el-card>
</div>
</template>
<script>
import { getDmFlowInformation } from "@/api/system/logConfig.js";
export default {
name: 'weatherTable',
data() {
return {
data: [],
tableHeader: this.tableHeaders['weatherTable'],
selectData: {
page: 1,
size: 100,
},
loading: false,
tableHeight: null
}
},
created() {
if (this.$route.params.data) {
this.data = this.$route.params.data
sessionStorage.setItem('accsid', this.data[0].accsId)
} else {
this.getWeatherTable()
}
},
activated() {
if (this.$route.params.data) {
this.data = this.$route.params.data
sessionStorage.setItem('accsid', this.data[0].accsId)
} else {
this.getWeatherTable()
}
},
methods: {
//accsid获取流水
getWeatherTable() {
this.loading = true
let accsid = ''
accsid = sessionStorage.getItem('accsid')
getDmFlowInformation('accsId=' + accsid).then(res => {
this.loading = false
if (res.code === 200) {
this.data = res.data.list
} else {
this.msgWarning(res.msg)
}
}).catch(err => {
this.loading = false
console.log(err)
})
},
//返回
close() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$store.state.tagsView.visitedViews.splice(
this.$store.state.tagsView.visitedViews.findIndex(
(item) => item.path === this.$route.path
),
);
this.$router.push({ name: 'DmLog' })
},
//翻页
currentChange(val) { },
}
}
</script>
<style>
</style>