Pārlūkot izejas kodu

修改ui-源端设置/末端设置--级联

shaun-sheep 5 gadi atpakaļ
vecāks
revīzija
3d3b227a4c
2 mainītis faili ar 4 papildinājumiem un 3 dzēšanām
  1. 1 1
      config/index.js
  2. 3 2
      src/views/relation/overview/index.vue

+ 1 - 1
config/index.js

@@ -150,4 +150,4 @@ module.exports = {
         // Set to `true` or `false` to always turn it on or off
         bundleAnalyzerReport: process.env.npm_config_report
     }
-}
+}

+ 3 - 2
src/views/relation/overview/index.vue

@@ -116,12 +116,13 @@
             api.graphic(data, res => {
                 res.Content.forEach(item => {
                     // 二级从属关系
-                    item.ChildGraphicTypeList.forEach(child => {
+                    (item.ChildGraphicTypeList != null) && item.ChildGraphicTypeList.forEach(child => {
+
                         this.countNumber.forEach(number => {
                             if (number.GraphTypeName === child.GraphTypeName) { //二级名字
                                 number.RelationTypeProjectList.forEach(counts => {
                                     //对应子集
-                                    child.RelationTypeProjectList.forEach(relation => {
+                                    (child.RelationTypeProjectList != null) && child.RelationTypeProjectList.forEach(relation => {
                                         if (relation.Id === counts.Id) {
                                             relation.count = counts.Count
                                         }