<template>
<div>
<el-dialog :title="dialogConfig.title" :visible.sync="dialogConfig.isDialog" :width="dialogConfig.width" :top="dialogConfig.top">
<el-form :model="dialogModel" :inline="dialogConfig.inline">
<template v-for="(item, $index) in dialogData">
<el-form-item :label="item.label" :label-width="item.labelWidth" v-if="item.isShow">
<el-date-picker v-if="item.isType === "r"" v-model="dialogModel[item.prop]" :size="item.size" :type="item.type" :placeholder="item.placeholder" :disabled="item.disabled"></el-date-picker>
<el-input v-if="item.isType === "1"" v-model="dialogModel[item.prop]" :size="item.size" :type="item.type" :placeholder="item.placeholder" :disabled="item.disabled"></el-input>
<el-select v-if="item.isType === "isSelect"" v-model="dialogModel[item.prop]" :size="item.size" :type="item.type" :placeholder="item.placeholder" :disabled="item.disabled">
<el-option v-for="(option, $option) in item.state" :key="$option" :value="parseInt(option.state)">{{option.text}}</el-option>
</el-select>
</el-form-item>
</template>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogConfig.isDialog = false" v-text="dialogConfig.cancel"></el-button>
<el-button type="primary" @click.sync="clickBus(dialogConfig.evenName, model)" v-text="dialogConfig.Submit"></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
mixins: [],
props: ["dialogConfig", "dialogData", "dialogModel"],
data () {
return {}
},
computed: {},
updated () {},
mounted () {},
destroyed () {
},
watch: {},
methods: {
clickBus (eveName, parameters) {
this.$emit(eveName, parameters)
}
}
}
</script>
<style scoped>
</style>