From 2fc52c10964ef98247e6e0eeb4be9c85c9d513f6 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期五, 22 十一月 2024 11:06:17 +0800
Subject: [PATCH] 修改basic表单组件

---
 Source/plt-web/plt-web-ui/src/components/PLT-basic-component/basicForm.vue |   34 +++++++++++++++-------------------
 1 files changed, 15 insertions(+), 19 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 630a90e..ba912dd 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
@@ -99,10 +99,6 @@
         text: "input",
         combox: "select",
         truefalse: "switch",
-        number: "number",
-        textarea: "textarea",
-        datetime: "datetime",
-        date: "date",
         refer: "refer",
         multiFile:"upload",
         richText:'richText'
@@ -190,24 +186,25 @@
       let col= {
         ...item,
         label: item.text,
-        prop: item.field,
-        showProp:item.showField,
+        prop: item.prop || item.field,
+        showProp:item.showProp || item.showField,
         type: type,
-        labelWidth: this.labelWidth || (item.text.length >= 6 ? 115 : 90),
-        disabled: item.readOnly || this.disabled,
+        labelWidth:item.labelWidth || this.labelWidth || (item.text.length >= 6 ? 115 : 90),
+        disabled: item.disabled || this.disabled,
+        readonly:item.readonly || item.readOnly,
         span: item.span
           ? item.span
           : item.type === "textarea"
             ? 24
             : this.span,
-        value: item.defaultValue,
-        display: !item.hidden,
-        labelSuffix: item.suffix,
-        suffixIcon: item.prefix,
-        tip: item.tooltips,
-        dictCode: item.comboxKey,
-        valueFormat: item.dateFormate || "yyyy-MM-dd HH:mm:ss",
-        format: item.dateFormate,
+        value: item.value || item.defaultValue,
+        display: item.display || !item.hidden,
+        labelSuffix: item.labelSuffix || item.suffix,
+        suffixIcon: item.suffixIcon || item.prefix,
+        tip: item.tip || item.tooltips,
+        dictCode: item.dictCode || item.comboxKey,
+        valueFormat: item.valueFormat ||item.dateFormate ,
+        format: item.format || item.dateFormate,
         rules: this.isEdit?(type=="select" || type=="refer" || type=="date" || type=="datetime"?[{
           required: item.required || false,
           message: `璇烽�夋嫨${item.text}!`,
@@ -224,7 +221,8 @@
           required: item.required|| false,
           message: `璇疯緭鍏�${item.text}!`,
           trigger: "submit"
-        }]):[]
+        }]):[],
+
       };
       if(!this.isEdit){
         col.placeholder=col.label;
@@ -266,8 +264,6 @@
               });
             }
           });
-        } else {
-          col.dicData = [];
         }
       }
       if (col.type==='refer') {

--
Gitblit v1.9.3