upDateResult.vue 1.78 KB
<template>
    <div>
        <el-dialog title="新 增" :visible.sync="dialogVisible" width="50%" top="1vh" :close-on-click-modal="false"
            :show-close="false" append-to-body center>
            <el-table ref="filterTable" class="mt20" :data="resultData" 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="resultData.length == 0"></el-table-column>
                <el-table-column v-for="(value, key) in this.resultData[0]" :key="key"
                    v-if="key != 'errorMessage' && key != 'line'" header-align="center" align="center" :label="key"
                    :prop="key"></el-table-column>
            </el-table>
            <div slot="footer" class="dialog-footer">
                <el-button @click="close">取 消</el-button>
            </div>
        </el-dialog>
    </div>
</template>

<script>

export default {
    name: 'UpDateResult',
    props: {
        dialogVisible: {
            type: Boolean,
            default: false
        },
        resultData: {
            type: Array,
            default: null
        }
    },
    data() {
        return {
        }
    },
    wactch: {
        dialogVisible(val) {
            if (val) {
            }
        }
    },
    methods: {
        close() {
            this.$emit('close')
        }
    }
}
</script>

<style lang="scss" scoped>

</style>