| | |
| | | <template> |
| | | <basic-dialog |
| | | <el-dialog |
| | | :visible.sync="dialog.showDialog" |
| | | :title="dialog.title" |
| | | width="40%" |
| | | append-to-body |
| | | :submit-icon="dialog.submitIcon" |
| | | :submit-txt="dialog.submitTxt" |
| | | :loading="dialog.loading" |
| | |
| | | :form-prop="ruleForm" |
| | | ref="referDialogFormRef" |
| | | ></d-from> |
| | | </basic-dialog> |
| | | </el-dialog> |
| | | </template> |
| | | <script> |
| | | import { DFrom } from "@/views/test/referDemo/DynamicsFrom"; |
| | | import { deferFormTemplate } from "@/views/test/referDemo/referDemo"; |
| | | import DFrom from "@/views/test/referDemo/DynamicsFrom"; |
| | | import {deferFormTemplate} from "@/views/test/referDemo/referDemo"; |
| | | import { handlerObj } from "@/util/platformUtils"; |
| | | export default { |
| | | name: "referDemoDialog", |
| | |
| | | methods: { |
| | | // 打开对话框 |
| | | openDialog(event) { |
| | | console.log(event) |
| | | this.dialog.type = event.type; |
| | | if (event.type === "add") { |
| | | this.dialog.title = "新增"; |
| | | this.dialog.submitTxt = "新增"; |
| | | this.dialog.submitIcon = "el-icon-plus"; |
| | | this.formData = deferFormTemplate; |
| | | this.ruleForm = handlerObj("prop", "value", deferFormTemplate); |
| | | this.ruleForm = this.formData |
| | | |
| | | } else if (event.type === "edit") { |
| | | this.dialog.title = "修改"; |
| | | this.dialog.submitTxt = "修改"; |