From 4d3f7f10d422fd6eee128fa32bc48ce7b10ec09d Mon Sep 17 00:00:00 2001 From: wangting <wangting@vci-tech.com> Date: 星期二, 07 一月 2025 18:24:21 +0800 Subject: [PATCH] 属性定义参照类型改成下拉树选择,处理值域显示不正确的问题,属性名选择改为下拉搜索 --- Source/plt-web/plt-web-ui/src/components/PLT-basic-component/basicForm.vue | 30 ++++++++++++++++-------------- 1 files changed, 16 insertions(+), 14 deletions(-) diff --git a/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/basicForm.vue b/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/basicForm.vue index 3a28de4..bd6df19 100644 --- a/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/basicForm.vue +++ b/Source/plt-web/plt-web-ui/src/components/PLT-basic-component/basicForm.vue @@ -187,11 +187,11 @@ ...item, label: item.text, prop: item.prop || item.field, - showProp:item.showProp || item.showField, + showProp: item.showProp || item.showField, type: type, - labelWidth:item.labelWidth || this.labelWidth || (item.text.length >= 6 ? 115 : 90), + labelWidth: item.labelWidth || this.labelWidth || (item.text.length >= 6 ? 115 : 90), disabled: item.disabled || this.disabled, - readonly:item.readonly || item.readOnly, + readonly: item.readonly || item.readOnly, span: item.span ? item.span : item.type === "textarea" @@ -199,30 +199,32 @@ : this.span, value: item.value || item.defaultValue, display: item.display || !item.hidden, + suffixIcon: item.suffixIcon || item.prefix, labelSuffix: item.labelSuffix || item.suffix, tip: item.tip || item.tooltips, dictCode: item.dictCode || item.comboxKey, - valueFormat: item.valueFormat ||item.dateFormate , + valueFormat: item.valueFormat || item.dateFormate, format: item.format || item.dateFormate, - rules: this.isEdit?(type=="select" || type=="refer" || type=="date" || type=="datetime"?[{ + }; + if(!item.rules || item.rules.length==0){ + col.rules=this.isEdit ? (type == "select" || type == "refer" || type == "date" || type == "datetime" ? [{ required: item.required || false, message: `璇烽�夋嫨${item.text}!`, trigger: "change" - },{ - required: item.required|| false, + }, { + required: item.required || false, message: `璇烽�夋嫨${item.text}!`, trigger: "submit" - }]:[{ - required: item.required|| false, + }] : [{ + required: item.required || false, message: `璇疯緭鍏�${item.text}!`, trigger: "blur" - },{ - required: item.required|| false, + }, { + required: item.required || false, message: `璇疯緭鍏�${item.text}!`, trigger: "submit" - }]):[], - - }; + }]) : [] + } if(!this.isEdit){ col.placeholder=col.label; col.disabled=true; -- Gitblit v1.9.3