upDateResult.vue 2.07 KB
<template>
    <div>
        <el-table ref="filterTable" class="mt20" :data="tableData" size="small" border>
            <!-- <el-table-column label="行号" prop="line" width="50" align="center">
            </el-table-column> -->
            <el-table-column label="序号" type="index" width="70" align="center" />
            <el-table-column label="运单号" prop="waybillNo" width="150" v-if="fromRoute == 'queryCargo'" />
            <el-table-column label="错误信息" prop="errorMessage">
                <template slot-scope="scope">
                    <span v-if="fromRoute == 'queryCargo'">{{ scope.row.errorMessage }}</span>
                    <span v-else> {{ scope.row }}</span>
                    <!-- <div v-for="(m, key) in scope.row.errorMessage" :key="key">
                        {{ m }}
                    </div> -->
                </template>
            </el-table-column>
            <!-- <el-table-column v-if="tableData.length == 0"></el-table-column>
            <el-table-column v-for="(value, key) in tableData" :key="key" v-if="key != 'errorMessage' && key != 'line'"
                header-align="center" align="center" :label="key" :prop="key"></el-table-column> -->
        </el-table>

    </div>
</template>

<script>

export default {
    name: 'UpDateResult',
    data() {
        return {
            tableData: [],
            fromRoute: ''
        }
    },
    created() {
        console.log(this.$route)
        this.tableData = this.$route.query.data
        this.fromRoute = this.$route.query.from
    },
    activated() {
        this.tableData = this.$route.query.data
        this.fromRoute = this.$route.query.from
    },
    methods: {
        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: this.fromRoute })
        }
    }
}
</script>

<style lang="scss" scoped></style>