From 1bccfb0296202ecde9c59fd8a16c3d198210319c Mon Sep 17 00:00:00 2001 From: ludc Date: 星期一, 03 七月 2023 18:53:27 +0800 Subject: [PATCH] 依赖修改,部分不兼容关键字修改,SQL、 --- Source/UBCS-WEB/src/components/FormTemplate/index.vue | 85 +++++++++++++++++++++++------------------- 1 files changed, 47 insertions(+), 38 deletions(-) diff --git a/Source/UBCS-WEB/src/components/FormTemplate/index.vue b/Source/UBCS-WEB/src/components/FormTemplate/index.vue index b6946b6..57cfa45 100644 --- a/Source/UBCS-WEB/src/components/FormTemplate/index.vue +++ b/Source/UBCS-WEB/src/components/FormTemplate/index.vue @@ -9,15 +9,15 @@ append-to-body @opened="openDialog" > - <FormTempalte + <FormTemplate v-bind="$attrs" :visible="visible" :type="type" :rowOid="rowOid" :templateOid="templateOid" - ref="FormTempalte" + ref="FormTemplate" @getFormData="getFormData" - ></FormTempalte> + ></FormTemplate> <div class="tab_box" @@ -29,8 +29,8 @@ " > <el-tabs v-model="activeName" type="border-card" @tab-click="handleClick"> - <el-tab-pane label="鐮佸�肩敵璇�" name="codeApply"> - <FormTempalte + <el-tab-pane label="鐮佸�肩敵璇�" name="codeApply" v-if="showCodeApply"> + <FormTemplate v-bind="$attrs" :type="type" :selfColumnType="selfColumnType" @@ -38,7 +38,7 @@ ref="CodeApply" @getFormData="getCodeApplyFormData" @referConfigDataUpdate="referConfigDataUpdate" - ></FormTempalte> + ></FormTemplate> </el-tab-pane> <el-tab-pane label="鐩镐技椤规煡璇�" @@ -57,28 +57,35 @@ </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> <script> import { getCodeRule, getFormTemplate } from "@/api/formTemplate.js"; -import FormTempalte from "./FormTempalte"; +import FormTemplate from "./FormTemplate"; import ResembleQuery from "./ResembleQuery"; export default { name: "FormTemplateDialog", - components: { ResembleQuery, FormTempalte }, + components: { ResembleQuery, FormTemplate }, props: { visible: { type: Boolean, @@ -226,10 +233,10 @@ this.activeName = "resembleQuery"; this.showResembleQuery = true; } - this.$refs.FormTempalte.templateRender(res.data.formDefineVO.items); + this.$refs.FormTemplate.templateRender(res.data.formDefineVO.items); } }) - .catch((err) => { + .catch(() => { this.loading = false; }); }, @@ -244,7 +251,7 @@ "coderefersec", ]; this.secVOList = (res.data.data.secVOList || []).filter((item) => - typeList.includes(item) + typeList.includes(item.secType) ); this.$nextTick(() => { if (this.secVOList.length > 0 && this.type === "add") { @@ -287,7 +294,7 @@ }, async submit() { // 杩涜琛ㄥ崟鏍¢獙 - const formValidate = await this.$refs.FormTempalte.validate(); + const formValidate = await this.$refs.FormTemplate.validate(); if (!formValidate) return; let codeValidate = true; // 杩涜鐮佸�肩敵璇锋牎楠� @@ -301,19 +308,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( @@ -350,11 +359,11 @@ }; }, getType(item) { - return this.selfColumnType[item.sectype]; + return this.selfColumnType[item.secType]; }, getReferConfig(item) { let params = {}; - if (item.sectype == "codeclassifysec") { + if (item.secType == "codeclassifysec") { params = { isMuti: false, type: "grid", @@ -398,13 +407,13 @@ : "", }, }; - } else if (item.sectype == "coderefersec") { + } else if (item.secType == "coderefersec") { params = JSON.parse(item.referValueInfo); } return params; }, getDisabled(item) { - if (item.sectype === "codeclassifysec") { + if (item.secType === "codeclassifysec") { if (item.parentClassifySecOid) { if (!this.codeApplyForm[item.parentClassifySecOid]) { return true; -- Gitblit v1.9.3