From 33c8db885ab2b5117c064d064f6e7c7eb0357a1c Mon Sep 17 00:00:00 2001 From: fujunling <2984387807@qq.com> Date: 星期五, 02 六月 2023 16:24:54 +0800 Subject: [PATCH] 动态模块 --- Source/UBCS-WEB/src/components/FormTemplate/index.vue | 24 ++++++++++++++++++++---- 1 files changed, 20 insertions(+), 4 deletions(-) diff --git a/Source/UBCS-WEB/src/components/FormTemplate/index.vue b/Source/UBCS-WEB/src/components/FormTemplate/index.vue index 8a1c2d1..23edc8f 100644 --- a/Source/UBCS-WEB/src/components/FormTemplate/index.vue +++ b/Source/UBCS-WEB/src/components/FormTemplate/index.vue @@ -7,19 +7,22 @@ class="avue-dialog avue-dialog--top" :width="width" append-to-body + @opened="openDialog" > <FormTempalte v-bind="$attrs" - :dialogOpen="visible" + :visible="visible" :type="type" + v-if="dialogVisible" + ref="FormTempalte" @getFormTemplateEnd="getFormTemplate" @getFormData="getFormData" ></FormTempalte> - <div class="tab_box"> + <div class="tab_box" v-if="type !== 'detail' && dialogVisible"> <el-tabs v-model="activeName" type="card"> <el-tab-pane label="鐮佸�肩敵璇�" name="codeApply" v-if="showCodeApply"> - <CodeApply v-bind="$attrs"></CodeApply> + <CodeApply ref="CodeApply" v-bind="$attrs" @getCodeRuleOid="getCodeRuleOid"></CodeApply> </el-tab-pane> <el-tab-pane label="鐩镐技椤规煡璇�" @@ -32,6 +35,7 @@ :hasResemble="this.hasResemble" :column="this.resembleTableColumn" :form="this.form" + :codeRuleOid="codeRuleOid" ></ResembleQuery> </el-tab-pane> </el-tabs> @@ -79,7 +83,9 @@ submitBtnLoading: false, hasResemble: false, resembleTableColumn: [], + secVOList: [], activeName: "resembleQuery", + codeRuleOid: '', form: {} }; }, @@ -95,7 +101,7 @@ }, showCodeApply() { if (this.type === "add") { - if (this.hasResemble && this.resembleTableColumn.length === 0) { + if (this.hasResemble && this.secVOList.length === 0) { return false; } } else { @@ -110,9 +116,19 @@ }, }, methods: { + openDialog() { + this.$nextTick(() => { + this.$refs.FormTempalte.init() + this.$refs.CodeApply.getCodeRule() + }) + }, close() { this.dialogVisible = false; }, + getCodeRuleOid(data) { + this.codeRuleOid = data.oid + this.secVOList = data.secVOList + }, getFormTemplate(data) { this.hasResemble = data.resembleTableVO && -- Gitblit v1.9.3