Przeglądaj źródła

部分关系表由于数据不全报错的问题

YaolongHan 3 lat temu
rodzic
commit
1a46c5a727

+ 9 - 9
src/views/maintain/relationship/components/tableHeader.ts

@@ -1,12 +1,12 @@
 const tableHeader = {
-    '设备所在建筑': [['建筑', 'objectInfo'], ['BIM构件名称', 'localName'], ['系统分类','systemCategory'], ['设备类型名称','codeName'], ['设备本地编码', "localId"]],
-    '设备所在楼层': [['建筑', 'objectInfo'], ['楼层','floorName'], ['BIM构件名称', 'localName'], ['系统分类','systemCategory'], ['设备类型名称','codeName'], ['设备本地编码', "localId"]],
-    '设备所在功能空间': [['空间本地名称', "localName"], ['空间本地编码', "localId"], ['建筑', 'objectInfo'], ['楼层','floorName'], ['BIM构件名称', 'localName'], ['系统分类','systemCategory'], ['设备类型名称','codeName'], ['设备本地编码', "localId"]],
-    '设备服务功能空间': [['空间本地名称', "localName"], ['空间本地编码', "localId"], ['建筑', 'objectInfo'], ['楼层','floorName'], ['BIM构件名称', 'localName'], ['系统分类','systemCategory'], ['设备类型名称','codeName'], ['设备本地编码', "localId"]],
-    '设备所在供电空间': [['空间本地名称', "localName"], ['空间本地编码', "localId"], ['建筑', 'objectInfo'], ['楼层','floorName'], ['BIM构件名称', 'localName'], ['系统分类','systemCategory'], ['设备类型名称','codeName'], ['设备本地编码', "localId"]],
-    '空间所在建筑': [['建筑', 'objectInfo'], ['空间本地名称', "localName"], ['空间本地编码', "localId"], ['楼层','floorName']],
-    '空间所在楼层': [['建筑', 'objectInfo'], ['楼层','floorName'], ['空间本地名称', "localName"], ['空间本地编码', "localId"]],
-    '空间服务空间': [['空间本地名称', "localName"], ['空间本地编码', "localId"], ['建筑', 'objectInfo'], ['楼层','floorName'], ['空间本地名称', "localName"], ['空间本地编码', "localId"], ['建筑', 'objectInfo'], ['楼层','floorName']],
-    '系统下的设备': [['系统分类','systemCategory'], ['分类名称',''], ['系统编码',''], ['BIM构件名称', 'localName'], ['系统分类','systemCategory'], ['设备类型名称','codeName'], ['设备本地编码', "localId"]],
+    '设备所在建筑': [['建筑', 'objectInfo-name'], ['BIM构件名称', 'bimTypeId'], ['系统分类','systemCategory'], ['设备类型名称','codeName'], ['设备本地编码', "localId"]],
+    '设备所在楼层': [['建筑', 'objectInfo-name'], ['楼层','floorName'], ['BIM构件名称', 'bimTypeId'], ['系统分类','systemCategory'], ['设备类型名称','codeName'], ['设备本地编码', "localId"]],
+    '设备所在功能空间': [['空间本地名称', "localName"], ['空间本地编码', "localId"], ['建筑', 'objectInfo-name'], ['楼层','floorName'], ['BIM构件名称', 'bimTypeId'], ['系统分类','systemCategory'], ['设备类型名称','codeName'], ['设备本地编码', "localId"]],
+    '设备服务功能空间': [['空间本地名称', "localName"], ['空间本地编码', "localId"], ['建筑', 'objectInfo-name'], ['楼层','floorName'], ['BIM构件名称', 'bimTypeId'], ['系统分类','systemCategory'], ['设备类型名称','codeName'], ['设备本地编码', "localId"]],
+    '设备所在供电空间': [['空间本地名称', "localName"], ['空间本地编码', "localId"], ['建筑', 'objectInfo-name'], ['楼层','floorName'], ['BIM构件名称', 'bimTypeId'], ['系统分类','systemCategory'], ['设备类型名称','codeName'], ['设备本地编码', "localId"]],
+    '空间所在建筑': [['建筑', 'objectInfo-name'], ['空间本地名称', "localName"], ['空间本地编码', "localId"], ['楼层','floorName']],
+    '空间所在楼层': [['建筑', 'objectInfo-name'], ['楼层','floorName'], ['空间本地名称', "localName"], ['空间本地编码', "localId"]],
+    '空间服务空间': [['空间本地名称', "localName"], ['空间本地编码', "localId"], ['建筑', 'objectInfo-name'], ['楼层','floorName'], ['空间本地名称', "localName"], ['空间本地编码', "localId"], ['楼层','floorName']],
+    '系统下的设备': [['系统分类','systemCategory'], ['系统名称',''], ['系统编码',''], ['BIM构件名称', 'bimTypeId'], ['系统分类','systemCategory'], ['设备类型名称','codeName'], ['设备本地编码', "localId"]],
 }
 export default tableHeader

+ 1 - 1
src/views/maintain/relationship/relation/components/table.vue

@@ -20,7 +20,7 @@
       align="left"
     >
       <template slot-scope="scope">
-        {{ item[1] == 'objectInfo' ? scope.row.objectInfo[0].name :scope.row[item[1]] }}
+        {{ (item[1].includes('objectInfo') && scope.row.objectInfo ? scope.row.objectInfo[0][item[1].split('-')[1]] :scope.row[item[1]]) || '--' }}
       </template>
     </el-table-column>
     <el-table-column label="操作" align="left">