upDateResult.vue 1.72 KB
<template>
    <div>
        <el-button class="ml20 mb20" size="small" icon="el-icon-back" @click="close">返 回</el-button>
        <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="错误信息" prop="errorMessage" width="200">
                <template slot-scope="scope">
                    <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 this.tableData[0]" :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() {
        this.tableData = this.$route.params.data
        this.fromRoute = this.$route.params.from
    },
    wactch: {
        dialogVisible(val) {
            if (val) {
            }
        }
    },
    methods: {
        close() {
            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>