Browse Source

修改数据展示不全问题

shaun-sheep 5 years ago
parent
commit
eb040c9365

+ 1 - 1
src/components/ledger/details/detail/exhibitionBaseInformation.vue

@@ -56,7 +56,7 @@
         <el-button slot="reference" type="text">{{handleName(value.Value)}}</el-button>
       </el-popover>
       <el-popover
-        v-else-if="Array.isArray(value.Value) || value.InputMode=='N2'"
+        v-else-if="Array.isArray(value.Value) && value.InputMode=='N2'"
         placement="top"
         width="300"
         trigger="hover">

+ 17 - 6
src/views/ledger/cenotelist/cenoteDetail/index.vue

@@ -157,10 +157,10 @@
       } else if (val == 2) { //有值信息点
         let list = this.pointData
         list.map(j => {
-          if (this.exampleData.hasOwnProperty(j.Path)) {
+          if (this.instance.hasOwnProperty(j.Path)) {
             return {
               ...j,
-              value: this.exampleData[j.Path]
+              value: this.instance[j.Path]
             }
           }
           arr = list.filter(k => k.value)
@@ -177,8 +177,17 @@
     displayData(arr) {//对数据进行处理传给组件展示
       const result = {}
       arr.forEach(i => {
-        if (this.exampleData.hasOwnProperty(i.Path) && this.currentRadio != 2) {
-          i.value = this.exampleData[i.Path]
+        if (this.instance.hasOwnProperty(i.Path) && this.currentRadio != 2) {
+          i.value = this.instance[i.Path]
+        }
+        if (i.DataSource && i.DataSource.length) {
+          let source = JSON.parse(i.DataSource)
+          source.forEach(j => {
+            if (j.Code == this.instance[i.Path]) {
+              console.log(j.Name)
+              i.value = j.Name
+            }
+          })
         }
         switch (i.InputMode) {
           case "L":
@@ -194,7 +203,8 @@
                 InfoPointCode: i.InfoPointCode,
                 Value: i.value,
                 Visible: i.Visible,
-                KeyWord: i.KeyWord
+                KeyWord: i.KeyWord,
+                InputMode:i.InputMode
               })
             } else {
               result[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`] = {
@@ -204,7 +214,8 @@
                   InfoPointCode: i.InfoPointCode,
                   Value: i.value,
                   Visible: i.Visible,
-                  KeyWord: i.KeyWord
+                  KeyWord: i.KeyWord,
+                  InputMode:i.InputMode
                 }]
               }
             }

+ 13 - 2
src/views/ledger/facility/details/index.vue

@@ -345,6 +345,15 @@
           if (this.instance.hasOwnProperty(i.Path) && this.currentRadio != 2) {
             i.value = this.instance[i.Path]
           }
+          if (i.DataSource && i.DataSource.length) {
+            let source = JSON.parse(i.DataSource)
+            source.forEach(j => {
+              if (j.Code == this.instance[i.Path]) {
+                console.log(j.Name)
+                i.value = j.Name
+              }
+            })
+          }
           switch (i.InputMode) {
             case "L":
             case "L1":
@@ -359,7 +368,8 @@
                   InfoPointCode: i.InfoPointCode,
                   Value: i.value,
                   Visible: i.Visible,
-                  KeyWord: i.KeyWord
+                  KeyWord: i.KeyWord,
+                  InputMode:i.InputMode
                 })
               } else {
                 result[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`] = {
@@ -369,7 +379,8 @@
                     InfoPointCode: i.InfoPointCode,
                     Value: i.value,
                     Visible: i.Visible,
-                    KeyWord: i.KeyWord
+                    KeyWord: i.KeyWord,
+                    InputMode:i.InputMode
                   }]
                 }
               }

+ 19 - 8
src/views/ledger/property/details/index.vue

@@ -182,10 +182,10 @@
         //关键信息点
         this.exhibitionCrux.cruxArray = this.pointData.filter(i => i.KeyWord)
         this.exhibitionCrux.cruxArray.map(i => {
-          if (this.exampleData.hasOwnProperty(i.Path)) {
+          if (this.instance.hasOwnProperty(i.Path)) {
             return {
               ...i,
-              value: this.exampleData[i.Path]
+              value: this.instance[i.Path]
             }
           }
         })
@@ -200,10 +200,10 @@
         } else if (val == 2) { //有值信息点
           let list = this.pointData
           list.map(j => {
-            if (this.exampleData.hasOwnProperty(j.Path)) {
+            if (this.instance.hasOwnProperty(j.Path)) {
               return {
                 ...j,
-                value: this.exampleData[j.Path]
+                value: this.instance[j.Path]
               }
             }
             arr = list.filter(k => k.value)
@@ -283,8 +283,17 @@
       displayData(arr) {//对数据进行处理传给组件展示
         const result = {}
         arr.forEach(i => {
-          if (this.exampleData.hasOwnProperty(i.Path) && this.currentRadio != 2) {
-            i.value = this.exampleData[i.Path]
+          if (this.instance.hasOwnProperty(i.Path) && this.currentRadio != 2) {
+            i.value = this.instance[i.Path]
+          }
+          if (i.DataSource && i.DataSource.length) {
+            let source = JSON.parse(i.DataSource)
+            source.forEach(j => {
+              if (j.Code == this.instance[i.Path]) {
+                console.log(j.Name)
+                i.value = j.Name
+              }
+            })
           }
           switch (i.InputMode) {
             case "L":
@@ -300,7 +309,8 @@
                   InfoPointCode: i.InfoPointCode,
                   Value: i.value,
                   Visible: i.Visible,
-                  KeyWord: i.KeyWord
+                  KeyWord: i.KeyWord,
+                  InputMode:i.InputMode
                 })
               } else {
                 result[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`] = {
@@ -310,7 +320,8 @@
                     InfoPointCode: i.InfoPointCode,
                     Value: i.value,
                     Visible: i.Visible,
-                    KeyWord: i.KeyWord
+                    KeyWord: i.KeyWord,
+                    InputMode:i.InputMode
                   }]
                 }
               }

+ 19 - 8
src/views/ledger/spacelist/spaceDetail/index.vue

@@ -262,10 +262,10 @@
       //关键信息点
       this.exhibitionCrux.cruxArray = this.pointData.filter(i => i.KeyWord)
       this.exhibitionCrux.cruxArray.map(i => {
-        if (this.exampleData.hasOwnProperty(i.Path)) {
+        if (this.instance.hasOwnProperty(i.Path)) {
           return {
             ...i,
-            value: this.exampleData[i.Path]
+            value: this.instance[i.Path]
           }
         }
       })
@@ -279,10 +279,10 @@
       } else if (val == 2) { //有值信息点
         let list = this.pointData
         list.map(j => {
-          if (this.exampleData.hasOwnProperty(j.Path)) {
+          if (this.instance.hasOwnProperty(j.Path)) {
             return {
               ...j,
-              value: this.exampleData[j.Path]
+              value: this.instance[j.Path]
             }
           }
           arr = list.filter(k => k.value)
@@ -362,8 +362,17 @@
     displayData(arr) {//对数据进行处理传给组件展示
       const result = {}
       arr.forEach(i => {
-        if (this.exampleData.hasOwnProperty(i.Path) && this.currentRadio != 2) {
-          i.value = this.exampleData[i.Path]
+        if (this.instance.hasOwnProperty(i.Path) && this.currentRadio != 2) {
+          i.value = this.instance[i.Path]
+        }
+        if (i.DataSource && i.DataSource.length) {
+          let source = JSON.parse(i.DataSource)
+          source.forEach(j => {
+            if (j.Code == this.instance[i.Path]) {
+              console.log(j.Name)
+              i.value = j.Name
+            }
+          })
         }
         switch (i.InputMode) {
           case "L":
@@ -379,7 +388,8 @@
                 InfoPointCode: i.InfoPointCode,
                 Value: i.value,
                 Visible: i.Visible,
-                KeyWord: i.KeyWord
+                KeyWord: i.KeyWord,
+                InputMode:i.InputMode
               })
             } else {
               result[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`] = {
@@ -389,7 +399,8 @@
                   InfoPointCode: i.InfoPointCode,
                   Value: i.value,
                   Visible: i.Visible,
-                  KeyWord: i.KeyWord
+                  KeyWord: i.KeyWord,
+                  InputMode:i.InputMode
                 }]
               }
             }

+ 18 - 6
src/views/ledger/system/systemDetail/index.vue

@@ -255,10 +255,10 @@
       } else if (val == 2) { //有值信息点
         let list = this.pointData
         list.map(j => {
-          if (this.exampleData.hasOwnProperty(j.Path)) {
+          if (this.instance.hasOwnProperty(j.Path)) {
             return {
               ...j,
-              value: this.exampleData[j.Path]
+              value: this.instance[j.Path]
             }
           }
           arr = list.filter(k => k.value)
@@ -338,8 +338,18 @@
     displayData(arr) {//对数据进行处理传给组件展示
       const result = {}
       arr.forEach(i => {
-        if (this.exampleData.hasOwnProperty(i.Path) && this.currentRadio != 2) {
-          i.value = this.exampleData[i.Path]
+        if (this.instance.hasOwnProperty(i.Path) && this.currentRadio != 2) {
+          i.value = this.instance[i.Path]
+        }
+
+        if (i.DataSource && i.DataSource.length) {
+          let source = JSON.parse(i.DataSource)
+          source.forEach(j => {
+            if (j.Code == this.instance[i.Path]) {
+              console.log(j.Name)
+              i.value = j.Name
+            }
+          })
         }
         switch (i.InputMode) {
           case "L":
@@ -355,7 +365,8 @@
                 InfoPointCode: i.InfoPointCode,
                 Value: i.value,
                 Visible: i.Visible,
-                KeyWord: i.KeyWord
+                KeyWord: i.KeyWord,
+                InputMode:i.InputMode
               })
             } else {
               result[`${i.FirstName}${i.SecondName ? '/' + i.SecondName : ''}`] = {
@@ -365,7 +376,8 @@
                   InfoPointCode: i.InfoPointCode,
                   Value: i.value,
                   Visible: i.Visible,
-                  KeyWord: i.KeyWord
+                  KeyWord: i.KeyWord,
+                  InputMode:i.InputMode
                 }]
               }
             }