From dbb8f101f25741739c97b938743c43cca8715d98 Mon Sep 17 00:00:00 2001 From: weidy <lastanimals@163.com> Date: 星期日, 25 六月 2023 10:53:42 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/UBCS-WEB/src/components/FormTemplate/index.vue | 59 +++++++++++++++++++++++++++++++++++------------------------ 1 files changed, 35 insertions(+), 24 deletions(-) diff --git a/Source/UBCS-WEB/src/components/FormTemplate/index.vue b/Source/UBCS-WEB/src/components/FormTemplate/index.vue index b6946b6..f37041e 100644 --- a/Source/UBCS-WEB/src/components/FormTemplate/index.vue +++ b/Source/UBCS-WEB/src/components/FormTemplate/index.vue @@ -29,7 +29,7 @@ " > <el-tabs v-model="activeName" type="border-card" @tab-click="handleClick"> - <el-tab-pane label="鐮佸�肩敵璇�" name="codeApply"> + <el-tab-pane label="鐮佸�肩敵璇�" name="codeApply" v-if="showCodeApply"> <FormTempalte v-bind="$attrs" :type="type" @@ -57,18 +57,25 @@ </el-tab-pane> </el-tabs> </div> - <div class="avue-dialog__footer" v-if="type !== 'detail'"> - <el-button @click="close()">鍙� 娑�</el-button> - <el-button @click="submit()" type="primary" :loading="submitBtnLoading">{{ - submitText - }}</el-button> - <el-button - @click="resembleQuerySubmit" - type="primary" - v-if="showResembleQuery" - >鐩镐技鍍忔煡璇�</el-button - > - </div> + <template #footer> + <div class="" v-if="type !== 'detail'"> + <el-button @click="close()" size="small">鍙� 娑�</el-button> + <el-button + @click="submit()" + type="primary" + :loading="submitBtnLoading" + size="small" + >{{ submitText }}</el-button + > + <el-button + @click="resembleQuerySubmit" + type="primary" + size="small" + v-if="showResembleQuery" + >鐩镐技鍍忔煡璇�</el-button + > + </div> + </template> </el-dialog> </template> @@ -236,6 +243,7 @@ // 鑾峰彇鐮佸�肩敵璇锋暟鎹� getCodeRule() { getCodeRule({ codeClassifyOid: this.codeClassifyOid }).then((res) => { + console.log(res, "resresresresres"); if (res.data && res.data.code === 200) { const typeList = [ "codefixedsec", @@ -244,8 +252,9 @@ "coderefersec", ]; this.secVOList = (res.data.data.secVOList || []).filter((item) => - typeList.includes(item) + typeList.includes(item.secType) ); + console.log(this.secVOList, "this.secVOListthis.secVOList"); this.$nextTick(() => { if (this.secVOList.length > 0 && this.type === "add") { this.showCodeApply = true; @@ -301,19 +310,21 @@ this.form ); if (resembleQueryList.length === 0) { - let resForm = {} - const { defaultValue, formValue } = this.getDefaultValueAndFormValues(this.form) - resForm.data = formValue - resForm = Object.assign({}, resForm, defaultValue) - resForm.secDTOList = [] + let resForm = {}; + const { defaultValue, formValue } = this.getDefaultValueAndFormValues( + this.form + ); + resForm.data = formValue; + resForm = Object.assign({}, resForm, defaultValue); + resForm.secDTOList = []; for (const key in this.codeApplyForm) { - if (Object.hasOwnProperty.call(this.codeApplyForm, key)) { - const value = this.codeApplyForm[key]; - if (value) { - resForm.secDTOList.push({[key]: value}) + if (Object.hasOwnProperty.call(this.codeApplyForm, key)) { + const value = this.codeApplyForm[key]; + if (value) { + resForm.secDTOList.push({ [key]: value }); + } } } - } this.$emit("submit", resForm); } else { this.$confirm( -- Gitblit v1.9.3