weatherTable.vue 2.44 KB
<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.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>