45 lines
1.5 KiB
Vue
45 lines
1.5 KiB
Vue
<template>
|
|
<el-dialog title="查看" :visible.sync="dialogVisible" width="60%">
|
|
<form-create :value.sync="dynamicFormData" v-model="fapi" :rule="formCreateRule" :option="formCreateOption" disabled></form-create>
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button @click="dialogVisible = false">取 消</el-button>
|
|
<el-button type="primary" @click="dialogVisible = false">确 定</el-button>
|
|
</span>
|
|
</el-dialog>
|
|
</template>
|
|
|
|
<script>
|
|
module.exports = {
|
|
name: "dynamic-Table-form-eval",
|
|
data() {
|
|
return {
|
|
dialogVisible: false,
|
|
dynamicFormData: {},
|
|
formCreateRule: [],
|
|
formCreateOption: {},
|
|
fapi: null
|
|
}
|
|
},
|
|
methods: {
|
|
onOpen(formConfig, dynamicFormData) {
|
|
debugger
|
|
this.dialogVisible = true
|
|
this.$nextTick(() => {
|
|
this.formCreateRule = formCreate.parseJson(formConfig.rule)
|
|
this.formCreateOption = formCreate.parseJson(formConfig.options)
|
|
if (typeof dynamicFormData === "string") {
|
|
try {
|
|
this.dynamicFormData = JSON.parse(dynamicFormData)
|
|
} catch (e) {}
|
|
} else if (typeof dynamicFormData === "object") {
|
|
this.dynamicFormData = dynamicFormData
|
|
}
|
|
this.fapi.disabled(true)
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped></style>
|