Browse Source

table 行列问题'

:q
YaolongHan 3 years ago
parent
commit
77827ea653

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

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

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

@@ -79,7 +79,7 @@ export default class extends Vue {
     if (columnIndex === 0) {
       if (row.rowspan && row.rowspan > 1) {
         return {
-          rowspan: row.rowspan + 1,
+          rowspan: row.rowspan,
           colspan: 1,
         };
       } else {
@@ -92,7 +92,7 @@ export default class extends Vue {
     if (row.moreMsg) {
       // 如果为打开更多按钮则合并
       if (columnIndex === 4) {
-        return [1, 4];
+        return [1, 5];
       } else if (columnIndex < 4 && columnIndex > 0) {
         return [0, 0];
       }

+ 1 - 0
src/views/maintain/relationship/relation/index.vue

@@ -360,6 +360,7 @@ export default class extends Vue {
             objList = item.objectInfo.slice(0, 9);
           }
           const objInfo = JSON.parse(JSON.stringify(objList));
+          const rowspan = (objInfo.length >= 9) ? 10 :objInfo.length
           objInfo.forEach((objItem: any, index: number) => {
             const newItem = JSON.parse(JSON.stringify(item));
             Object.assign(newItem, {

+ 10 - 5
vue.config.js

@@ -28,22 +28,26 @@ module.exports = {
                 }
             },
             "/datacenter": {
-                target: "http://192.168.64.17:28890",
+                // target: "http://192.168.64.17:28890",
+                target: "http://192.168.0.72:8080",
                 changeOrigin: true
             },
             "/equip-component": {
-                target: "http://192.168.64.17:28890",
+                // target: "http://192.168.64.17:28890",
+                target: "http://192.168.0.72:8080",
                 changeOrigin: true
             },
             "/schedulerapi": {
-                target: "http://192.168.64.17:28890",
+                // target: "http://192.168.64.17:28890",
+                target: "http://192.168.0.72:8080",
                 changeOrigin: true,
                 pathRewrite: {
                     "^/schedulerapi": "/scheduler"
                 }
             },
             "/modelapi": {
-                target: "http://192.168.64.17:28890",
+                // target: "http://192.168.64.17:28890",
+                target: "http://192.168.0.72:8080",
                 changeOrigin: true,
                 pathRewrite: {
                     "^/modelapi": "/revit-algorithm"
@@ -57,7 +61,8 @@ module.exports = {
             //     }
             // },
             "/message-center": {
-                target: "http://192.168.64.17:28890",
+                // target: "http://192.168.64.17:28890",
+                target: "http://192.168.0.72:8080",
                 changeOrigin: true
             },
             "/rwd": {