From d9522d959e8e31ca48e30aa23d4fe8c7d1992b6b Mon Sep 17 00:00:00 2001
From: fujunling <2984387807@qq.com>
Date: 星期一, 19 六月 2023 15:41:38 +0800
Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs

---
 Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue |   33 ++++++++++++++-------------------
 1 files changed, 14 insertions(+), 19 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue b/Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue
index 6afac39..42912d0 100644
--- a/Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue
+++ b/Source/UBCS-WEB/src/components/FormTemplate/FormTempalte.vue
@@ -29,6 +29,8 @@
           :referConfig="item.referConfig || {}"
           :value="form[item.referConfig.field] || item.value"
           :text="form[item.referConfig.showField]"
+          :disabled="item.disabled"
+          :display="item.display"
           @setReferValue="setReferValue"
         ></vciWebRefer>
       </template>
@@ -515,6 +517,7 @@
             collapse: true,
             column: [],
           });
+          return
         }
         if (
           formItem.type === "combox" &&
@@ -558,15 +561,12 @@
           maxlength: formItem.maxlength,
           filterable: true,
           referConfig:formItem.type=='refer'?{
-            title:formItem.text,
+            title:formItem.text ,
             showField:formItem.showField || formItem.field,
             field: formItem.field,
             placeholder: formItem.inputTip,
             options:formItem.referConfig
           }:{},
-          change: () => {
-            this.changeFun(formItem.displayExtension, formItem.prop);
-          },
           span: formItem.type === "textarea" ? 24 : this.trendsSpan,
           rules: [
             {
@@ -597,7 +597,9 @@
       this.$set(this.option, "column", column);
       this.$set(this.option, "group", group);
       this.formIndex++;
-      this.loading = false;
+      if (this.type === 'add' || this.type === 'preview') {
+        this.loading = false;
+      }
       this.geDictData(dictKeys);
       this.getFormDetail();
     },
@@ -646,21 +648,16 @@
         return val;
       }
     },
-    changeFun(displayExtension, prop) {
-      // executeCode({displayExtension, data: this.form}).then(res => {
-      //   this.form[prop] = res.data.data
-      // })
-    },
     // 鑾峰彇swich鍜屽凡鎷垮埌鐨勪笅鎷夋暟鎹�
     getDataList(type, dicData) {
       if (type === "truefalse") {
         return [
           {
-            key: false,
+            key: 'false',
             value: "鍚�",
           },
           {
-            key: true,
+            key: 'true',
             value: "鏄�",
           },
         ];
@@ -692,8 +689,7 @@
     // 琛ㄥ崟鏍¢獙
     validate() {
       return new Promise((resolve) => {
-        this.$refs.form.validate((valid, done, msg) => {
-          console.error(msg, valid);
+        this.$refs.form.validate((valid, done) => {
           if (valid) {
             done();
             resolve(true);
@@ -705,12 +701,11 @@
     },
     // 鑾峰彇琛ㄥ崟璇︽儏鏁版嵁
     getFormDetail() {
-      if (this.type === 'add') return
-      if (this.type === "add") return;
-      getFormDetail({ templateOid: this.templateOid, oid: '213D13D5-76D3-6B42-0932-705693F6B6E4' }).then(
+      if (this.type === 'add' || this.type === 'preview') return
+      getFormDetail({ templateOid: this.templateOid, oid: this.rowOid }).then(
         (res) => {
-          this.form = Object.assign(this.form, res.obj)
-          console.log(res, "res");
+          this.form = Object.assign(this.form, res.data.data[0])
+          this.loading = false;
         }
       );
     },

--
Gitblit v1.9.3