瀏覽代碼

Merge branch 'master' of git.sagacloud.cn:web/wanda-adm

zhangyu 3 年之前
父節點
當前提交
39104dbe58

+ 21 - 0
src/components/Breadcrumb/index.vue

@@ -37,12 +37,33 @@ export default class extends Vue {
     private getBreadcrumb() {
         let matched = this.$route.matched.filter((item) => item.meta && item.meta.title);
         const first = matched[0];
+        //针对关系模块添加面包屑
+        if(first) {
+        matched = this.relationModel(matched)
+        }
 
         this.breadcrumbs = matched.filter((item) => {
             return item.meta && item.meta.title && item.meta.breadcrumb !== false;
         });
     }
 
+    /**
+     * 关系模块
+     *
+     */
+    relationModel(matched:any = []){
+        if(matched.length >= 2 && matched[1].path == '/maintain/relation'){
+            matched[2] = {
+              path: "/maintain/relationship",
+              meta:{
+                  title:this.$route.query.relationTypeName,
+                  hidden: true,
+              }
+            }
+        }
+        return matched
+    }
+
     // private isDashboard(route: RouteRecord) {
     //     const name = route && route.meta && route.meta.title;
     //     return name === "Dashboard";

+ 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">