From f79096d67dbd8a243c0b9808703142559dab4d2c Mon Sep 17 00:00:00 2001 From: 田源 <lastanimals@163.com> Date: 星期五, 08 九月 2023 14:26:10 +0800 Subject: [PATCH] 元数据编辑-枚举弹窗分页bug --- Source/UBCS-WEB/src/views/modeling/original.vue | 2 +- Source/UBCS-WEB/src/components/FormTemplate/index.vue | 27 +++++++++++++++------------ Source/UBCS-WEB/src/views/modeling/originalAdd.vue | 8 +++++++- Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue | 13 ++++++++++--- 4 files changed, 33 insertions(+), 17 deletions(-) diff --git a/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue b/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue index f865672..d8657d0 100644 --- a/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue +++ b/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue @@ -138,7 +138,7 @@ let value='' formItemList.forEach((formItem) => { formItem = this.resetFormConfig(formItem); - console.log('formItem',formItem) + // console.log('formItem',formItem) // console.log('formItem.dicData.value',formItem.dicData) if (formItem.type === "line") { group.push({ @@ -195,10 +195,12 @@ valueFormat:formItem.dateFormate, format: formItem.dateFormate, keyAttr: formItem.keyAttr, - value: formItem.dicData && formItem.dicData.length > 0 && formItem.type == 'combox' ? formItem.dicData[0].id : null, + value: (formItem.dicData && formItem.dicData.length > 0 && formItem.secType == "codefixedsec" ? formItem.dicData[0].id : null) || + (formItem.secType == "codedatesec"?formItem.codeDateFormatStr: null), placeholder: formItem.inputTip, comboxKey: formItem.comboxKey, tip: formItem.tooltips, + // hidden:formItem.secType && formItem.codeValueApplyStatus == 3 ? true : false, // readonly:formItem.codeValueApplyStatus && formItem.codeValueApplyStatus == 2 ?true : false , display: !formItem.hidden, maxlength: formItem.maxlength, @@ -239,6 +241,7 @@ }; // console.log('columnItem',columnItem) slotColumnList.push(columnItem); + // console.log('slotColumnList',slotColumnList) if (group.length === 0) { column.push(columnItem); } else { @@ -255,6 +258,7 @@ this.geDictData(dictKeys); this.getFormDetail(); + // console.log('selfColumnConfig',this.selfColumnConfig) }, // 浣跨敤浼犲叆鐨勮〃鍗曟暟鎹厤缃� @@ -274,6 +278,9 @@ if (Object.hasOwnProperty.call(element, newAttr)) { const oldAttr = element[newAttr]; formItem[newAttr] = formItem[oldAttr]; + // console.log(formItem) + // console.log(newAttr,oldAttr) + // console.log(formItem[newAttr],formItem[oldAttr]) } } } else if (configType === "directVoluation") { @@ -364,7 +371,7 @@ ); }, setReferValue(data) { - console.log(data) + // console.log(data) if (data.field) { this.form[data.field] = data.value || ""; this.form[data.showField] = data.text || ""; diff --git a/Source/UBCS-WEB/src/components/FormTemplate/index.vue b/Source/UBCS-WEB/src/components/FormTemplate/index.vue index cefd61a..2f714ce 100644 --- a/Source/UBCS-WEB/src/components/FormTemplate/index.vue +++ b/Source/UBCS-WEB/src/components/FormTemplate/index.vue @@ -142,7 +142,7 @@ coderefersec: "refer",//寮曠敤鐮佹 codeattrsec: "text", codelevelsec: "text", - codedatesec: "date" + codedatesec: "text" }, selfColumnConfig: { function: { @@ -263,9 +263,10 @@ }, // 鑾峰彇鐮佸�肩敵璇锋暟鎹� getCodeRule() { - getCodeRule({ codeClassifyOid: this.codeClassifyOid }).then((res) => { + let that = this; + getCodeRule({ codeClassifyOid: that.codeClassifyOid }).then((res) => { if (res.data && res.data.code === 200) { - this.codeRuleOid = res.data.data.oid; + that.codeRuleOid = res.data.data.oid; const typeList = [ //灞炴�х爜娈� 鍙 "codeattrsec", @@ -283,20 +284,20 @@ "codelevelsec", //娴佹按鐮佹 闅愯棌 ]; - this.secVOList = (res.data.data.secVOList || []).filter((item) => + that.secVOList = (res.data.data.secVOList || []).filter((item) => typeList.includes(item.secType) ); - if (this.secVOList.length > 0 && this.type === "add") { - this.showCodeApply = true; - this.activeName = "codeApply"; - this.$nextTick(() => { - this.$refs.CodeApply.templateRender(this.secVOList); + if (that.secVOList.length > 0 && that.type === "add") { + that.showCodeApply = true; + that.activeName = "codeApply"; + that.$nextTick(() => { + that.$refs.CodeApply.templateRender(that.secVOList); }); } else { - this.showCodeApply = false; + that.showCodeApply = false; } } - // console.log(' this.secVOList',this.secVOList) + // console.log(' this.secVOList',that.secVOList) // console.log(' res.data.data.secVOList',res.data.data.secVOList) }); }, @@ -382,7 +383,6 @@ this.$delete(formValue, item); }); const keys = Object.keys(formValue); - debugger keys.forEach((item, index) => { keys.forEach((itm, idx) => { if ((item === ('$' + itm)) && idx !== index) { @@ -475,6 +475,8 @@ } else if (item.secType == "coderefersec") { //寮曠敤鐮佹 params = JSON.parse(item.referValueInfo); + // console.log('item',item) + console.log('params',params) } return params; }, @@ -492,6 +494,7 @@ isRequired(item) { return item.nullableFlag != "true"; }, + //榛樿鍊� getOptionList(item) { if ( Array.isArray(item.fixedValueVOList) && diff --git a/Source/UBCS-WEB/src/views/modeling/original.vue b/Source/UBCS-WEB/src/views/modeling/original.vue index 11490ee..d701e74 100644 --- a/Source/UBCS-WEB/src/views/modeling/original.vue +++ b/Source/UBCS-WEB/src/views/modeling/original.vue @@ -1,4 +1,4 @@ -<template> + <template> <el-container> <el-main> <basic-container> diff --git a/Source/UBCS-WEB/src/views/modeling/originalAdd.vue b/Source/UBCS-WEB/src/views/modeling/originalAdd.vue index 73f633b..6b06bb8 100644 --- a/Source/UBCS-WEB/src/views/modeling/originalAdd.vue +++ b/Source/UBCS-WEB/src/views/modeling/originalAdd.vue @@ -111,7 +111,7 @@ <!-- 閫夋嫨鏋氫妇鏃剁殑寮圭獥 --> <el-dialog title="鏋氫妇鍒楄〃" :visible.sync="enumRefer.show" append-to-body @close="closeEnumDialog" width="70%" style="height: 115vh;"> - <avue-crud ref="eunmTable" :option="enumRefer.option" :data="enumRefer.data" class="enumTable" + <avue-crud ref="eunmTable" :option="enumRefer.option" @on-load="enumOnLoad" :data="enumRefer.data" class="enumTable" @row-click="enumReferClick" :page.sync="enumRefer.enumPage"> <template slot="radio" slot-scope="{row}"> <el-radio v-model="enumRefer.selectRow" :label="row.$index"> @@ -281,6 +281,12 @@ this.initAttributeReferTypeList(); }, methods: { + enumOnLoad(){ + getParentList(this.enumRefer.enumPage.currentPage, this.enumRefer.enumPage.pageSize).then(res => { + this.enumRefer.enumPage.total = res.data.data.total; + this.enumRefer.data = res.data.data.records; + }) + }, closeSubmitDialog() { this.resetAttributeForm(); this.showSubmitDialog = false; -- Gitblit v1.9.3