<template>
    <div class="add-edit-dialog-container">
        <el-dialog
            title="详情"
            :visible.sync="visible"
            width="600px"
            :before-close="close"
            :close-on-click-modal="false"
        >
            <el-form :model="formData" ref="formData" label-width="90px">
                <el-form-item label="文件名称:">
                    <span>{{ formData.name }}</span>
                </el-form-item>
                <el-form-item label="文件:">
                    <span>{{ formData.url }}</span>
                </el-form-item>
                <el-form-item label="排序:">
                    <span>{{ formData.sort }}</span>
                </el-form-item>
                <el-form-item label="创建时间:">
                    <span>{{ formData.createTime | formatTimePipe }}</span>
                </el-form-item>
                <el-form-item label="启用状态:" min-width="110px;">
                    <el-switch
                        v-model="formData.statuz"
                        disabled
                        active-text="是"
                        inactive-text="否"
                        :active-value="1"
                        :inactive-value="0"
                    ></el-switch>
                </el-form-item>
            </el-form>
        </el-dialog>
    </div>
</template>
<script>
export default {
    data() {
        return {
            formData: {},
            visible: false,
        };
    },
    methods: {
        open(data) {
            this.formData = Object.assign({}, data);
            this.visible = true;
        },
        close() {
            this.formData = {};
            this.visible = false;
        },
    },
};
</script>
<style lang="stylus" scoped>
.add-edit-dialog-container {
    ::v-deep .el-form-item {
        margin-bottom: 0;
    }

    .images {
        margin-right: 5px;
    }
}
</style>
