From c5ea838fef2a6e4fc3940009ee938fbfa29551b5 Mon Sep 17 00:00:00 2001
From: yuxc <yuxc@vci-tech.com>
Date: 星期一, 03 六月 2024 14:53:49 +0800
Subject: [PATCH] 1、平台JAR上传

---
 Source/ProjectWeb/src/components/PLT-basic-component/basicForm.vue |   35 +++++++++++++++++++++++++++--------
 1 files changed, 27 insertions(+), 8 deletions(-)

diff --git a/Source/ProjectWeb/src/components/PLT-basic-component/basicForm.vue b/Source/ProjectWeb/src/components/PLT-basic-component/basicForm.vue
index c8c67c8..ca5e5b4 100644
--- a/Source/ProjectWeb/src/components/PLT-basic-component/basicForm.vue
+++ b/Source/ProjectWeb/src/components/PLT-basic-component/basicForm.vue
@@ -70,7 +70,16 @@
       //琛ㄥ崟鏄惁鍙紪杈�
       type:Boolean,
       default:true
-    }
+    },
+    initValue:{
+      type: Object,
+      default: () => {},
+    },
+    uploadattachment:{
+      //鏄惁鏄剧ず涓婁紶闄勪欢
+      type:Boolean,
+      default:false
+    },
   },
   data() {
     return {
@@ -103,10 +112,13 @@
   watch: {
     formItems: {
       handler(val) {
-        if(val[0] &&val[0].column && val[0].column.isArray()){
+        if (val[0] && val[0].column && val[0].column.isArray()) {
           this.getInitGroup(val);
-        }else{
+        } else {
           this.getInit(val);
+        }
+        if (this.initValue) {
+          Object.assign(this.form, this.initValue);
         }
       },
       immediate: true,
@@ -154,7 +166,6 @@
         code = this.initItem(code);
         column.push(code);
         this.allColumn.push(code);
-        console.log('allColumn',this.allColumn)
       }
       this.option.column = column;
     },
@@ -180,7 +191,7 @@
         showProp:item.showField,
         type: type,
         labelWidth: this.labelWidth || (item.text.length >= 6 ? 115 : 90),
-        disabled: item.readOnly || this.disabled,
+        disabled: !this.isEdit || item.readOnly || this.disabled,
         span: item.span
           ? item.span
           : item.type === "textarea"
@@ -206,6 +217,10 @@
           required: item.required,
           message: `璇疯緭鍏�${item.text}!`,
           trigger: "blur"
+        },{
+          required: item.required,
+          message: `璇疯緭鍏�${item.text}!`,
+          trigger: "submit"
         }]):[]
       };
       if(!this.isEdit){
@@ -215,14 +230,18 @@
         this.subitemName = col.field;
       }else if(col.type === 'upload'){
         console.log('col',col)
+      }else if(col.type=="multiFile"){
+        if(this.uploadattachment == "false" || this.uploadattachment == false){
+          col.display=false
+        }
       }
       if (col.type === "select") {
         if(col.data && col.data.length>0){
           col.dicData = col.data.map((d) => {
             return {
-              label: d.value,
-              key: d.key,
-              value: d.key,
+              label: d.key,
+              key: d.value,
+              value: d.value,
               attributes:d.attributes
             };
           });

--
Gitblit v1.9.3