From 2ef77429e8906bdfec24bfb6fbc07509bd6ea855 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期四, 21 九月 2023 10:32:11 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue |   21 ++++++++-------------
 1 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue b/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue
index cd0af83..ac2b1e4 100644
--- a/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue
+++ b/Source/UBCS-WEB/src/components/FormTemplate/FormTemplate.vue
@@ -154,7 +154,6 @@
       handler(newval,oldval){
         if(newval){
           this.TreeValueForm=newval;
-          // console.log(this.TreeValueForm)
         }
       },
       deep:true,
@@ -167,7 +166,7 @@
       if (this.eventList) {
         this.eventFlag= this.eventList.some(item => {
           if (item.classifyInvokeEditFlag === 'true') {
-            // console.log('even', item);
+            console.log('even', item);
             this.eventObject = item;
             return true;
           }
@@ -179,11 +178,8 @@
       let group = [];
       let dictKeys = [];
       let slotColumnList = [];
-      let value=''
       formItemList.forEach((formItem) => {
         formItem = this.resetFormConfig(formItem);
-        // console.log(formItem)
-        // console.log('formItem.dicData.value',formItem.dicData)
         if (formItem.type === "line") {
           group.push({
             label: formItem.text,
@@ -307,7 +303,6 @@
     },
     // 浣跨敤浼犲叆鐨勮〃鍗曟暟鎹厤缃�
     resetFormConfig(formItem) {
-      // console.log(this.selfColumnConfig)
       for (const configType in this.selfColumnConfig) {
         if (Object.hasOwnProperty.call(this.selfColumnConfig, configType)) {
           const element = this.selfColumnConfig[configType];
@@ -323,9 +318,6 @@
               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") {
@@ -430,21 +422,24 @@
               if (!_item.attributes) {
                 _item.attributes = _item;
               }
+              if (!_item.attributes.data) {
+                _item.attributes.data = {};
+              }
               if (mapFields.length == 1) {
                 var mapField = mapFields[0];
                 if (mapField.indexOf("attribute.") > -1) {
-                  temp = _item['attributes'][mapField.subString("attribute.".length)];
+                  temp = _item['attributes'][mapField.subString("attribute.".length)] || _item['attributes']['data'][mapField.subString("attribute.".length)];
                 } else {
-                  temp = _item['attributes'][mapField] || _item[mapField];
+                  temp = _item['attributes'][mapField] ||_item['attributes']['data'][mapField] || _item[mapField];
                 }
               } else {
                 //鏈夊涓�
                 var mutiTemp = [];
                 layui.each(mapFields, function (_indexField, _itemField) {
                   if (_itemField.indexOf("attribute.") > -1) {
-                    mutiTemp.push(_item['attributes'][_itemField.subString("attribute.".length)]);
+                    mutiTemp.push(_item['attributes'][_itemField.subString("attribute.".length)] || _item['attributes']['data'][_itemField.subString("attribute.".length)]);
                   } else {
-                    mutiTemp.push(_item['attributes'][_itemField] || _item[_itemField]);
+                    mutiTemp.push(_item['attributes'][_itemField] || _item['attributes']['data'][_itemField] || _item[_itemField]);
                   }
                 });
                 temp = mutiTemp.join(' ');

--
Gitblit v1.9.3