From fcac8dfb49248569351f170deed4606db7718b9c Mon Sep 17 00:00:00 2001 From: wangting <675591594@qq.com> Date: 星期五, 08 九月 2023 15:55:41 +0800 Subject: [PATCH] 修改参照setValue --- Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue | 23 ++++++++++++----------- 1 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue b/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue index 1f4e6a3..d8657d0 100644 --- a/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue +++ b/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue @@ -138,12 +138,8 @@ let value='' formItemList.forEach((formItem) => { formItem = this.resetFormConfig(formItem); - if( formItem.type === "combox" && formItem.dicData){ - value=formItem.dicData[0].key - } // console.log('formItem',formItem) - // console.log('formItem.dicData[0].value',formItem.dicData[0].key) - // console.log('formItem.dicData[0].value',formItem.dicData[0].id) + // console.log('formItem.dicData.value',formItem.dicData) if (formItem.type === "line") { group.push({ label: formItem.text, @@ -191,7 +187,7 @@ field: formItem.field, type: this.columnType[formItem.type], dicData: this.getDataList(formItem.type, formItem.data), - disabled: this.type === "detail" ? true : formItem.readOnly, + disabled: this.type === "detail" ? true : formItem.readOnly || (formItem.codeValueApplyStatus && formItem.codeValueApplyStatus == 2 ?true : false) , prepend: this.preOrSufFixShow("text", formItem.prefix), append: this.preOrSufFixShow("text", formItem.suffix), prefixIcon: this.preOrSufFixShow("icon", formItem.prefix), @@ -199,11 +195,13 @@ valueFormat:formItem.dateFormate, format: formItem.dateFormate, keyAttr: formItem.keyAttr, - value: value, + 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, - readonly:true, + // hidden:formItem.secType && formItem.codeValueApplyStatus == 3 ? true : false, + // readonly:formItem.codeValueApplyStatus && formItem.codeValueApplyStatus == 2 ?true : false , display: !formItem.hidden, maxlength: formItem.maxlength, filterable: true, @@ -241,11 +239,9 @@ value: "key", }, }; - // if(columnItem.type == "select"){ - // columnItem.value=value - // } // console.log('columnItem',columnItem) slotColumnList.push(columnItem); + // console.log('slotColumnList',slotColumnList) if (group.length === 0) { column.push(columnItem); } else { @@ -262,6 +258,7 @@ this.geDictData(dictKeys); this.getFormDetail(); + // console.log('selfColumnConfig',this.selfColumnConfig) }, // 浣跨敤浼犲叆鐨勮〃鍗曟暟鎹厤缃� @@ -281,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") { @@ -371,6 +371,7 @@ ); }, setReferValue(data) { + // console.log(data) if (data.field) { this.form[data.field] = data.value || ""; this.form[data.showField] = data.text || ""; -- Gitblit v1.9.3