Forráskód Böngészése

wanda-adm:feat > 添加表头数据,映射关系表头

shaun-sheep 4 éve
szülő
commit
34aed86b5c

+ 0 - 5
src/components/business/baseDataForm.vue

@@ -157,11 +157,6 @@ export default class extends Vue {
 <style scoped lang="scss">
 $border: 1px solid #E1E7EA;
 .data-form {
-    //.el-upload-dragger {
-    //    width: auto;
-    //    height: auto;
-    //}
-
     .title {
         border-left: 7px solid;
         text-indent: 10px;

+ 1 - 0
src/main.ts

@@ -19,6 +19,7 @@ import "@/permission";
 import moment from "moment";
 Vue.prototype.moment = moment;
 moment.locale('zh-cn')
+
 Vue.use(uploader);
 Vue.use(ElementUI, { size: "small", zIndex: 1000 });
 Vue.use(SvgIcon, {

+ 12 - 0
src/views/maintain/relationship/components/tableHeader.ts

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

+ 4 - 6
src/views/maintain/relationship/index.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="relationship" v-loading="loading">
         <template v-for="(item,index) in content">
-            <p class="title" :key="index">架构从属关系</p>
+            <p class="title" >架构从属关系</p>
             <section v-for="(child,childIndex) in item.childGraphicTypeList" :key="childIndex">
                 <p class="ship-title">{{ child.graphTypeName }}
                     <i class="iconfont icon-xiangmuguanli"></i>
@@ -161,11 +161,9 @@ export default class extends Vue {
         this.$set(relation, 'times', moment(Date.now()).format("YYYY-MM-DD HH:mm:ss"))
     }
 
-    manual() {
-        this.$router.push({
-            path: 'relation',
-            meta: [{ title: '222', hidden: true }]
-        })
+    manual(relation) {
+        console.log(relation.relationTypeName)
+        this.$router.push({ path: 'relation', query:relation})
     }
 }
 </script>

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

@@ -8,51 +8,10 @@
         height="100%"
     >
         <el-table-column
-            prop="Name"
-            label="空间本地名称"
-            align="left"
-            min-width="140"
-        >
-        </el-table-column>
-        <el-table-column
-            prop="LocalID"
-            label="空间本地编码"
-            align="left"
-            min-width="140"
-        >
-        </el-table-column>
-        <el-table-column
-            prop="LocalName"
-            label="建筑-楼层"
-            align="left"
-            min-width="140"
-        >
-        </el-table-column>
-        <el-table-column
-            prop="CADID"
-            label="BIM构件名称"
-            align="left"
-            min-width="100"
-        >
-        </el-table-column>
-        <el-table-column
-            class-name="td-bl"
-            prop="cName"
-            label="系统分类"
-            width="180"
-            align="left"
-        >
-        </el-table-column>
-
-        <el-table-column
-            prop="cLocalName"
-            label="设备类型名称"
-            align="left"
-        >
-        </el-table-column>
-        <el-table-column
+            v-for="(item,index) in tableHeader"
+            :key="index"
             prop="cCADID"
-            label="设备本地编码"
+            :label="item"
             align="left"
         >
         </el-table-column>
@@ -69,12 +28,14 @@
 </template>
 
 <script lang="ts">
-import { Component, Vue } from "vue-property-decorator";
+import { Component, Prop, Vue } from "vue-property-decorator";
 
 @Component({
     name: 'relation-table'
 })
 export default class extends Vue {
+
+    @Prop({default:Array}) tableHeader?:[]
     tableData = []
 
     objectSpanMethod() {

+ 14 - 5
src/views/maintain/relationship/relation/index.vue

@@ -19,7 +19,7 @@
                 <AdmSearch/>
             </el-col>
         </el-row>
-        <relationTable/>
+        <relationTable :tableHeader="tableHeader"/>
     </div>
 </template>
 
@@ -27,13 +27,20 @@
 import { Component, Vue } from "vue-property-decorator";
 import { AdmSearch } from "./../../components"
 import relationTable from "./components/table"
+import tableHeader from "@/views/maintain/relationship/components/tableHeader";
 @Component({
     name: 'relation',
-    components: { AdmSearch,relationTable }
+    components: { AdmSearch, relationTable }
 })
 export default class extends Vue {
     mainObject = ''
+    //表头数据
+    tableHeader = []
 
+    created() {
+        let relationTypeName = this.$route.query.relationTypeName
+        this.tableHeader = tableHeader[relationTypeName]
+    }
 }
 </script>
 
@@ -47,10 +54,12 @@ export default class extends Vue {
         overflow: hidden;
         border-bottom: 1px solid #E1E7EA;
     }
-    .content{
+
+    .content {
         padding: 12px;
-        .object{
-            p{
+
+        .object {
+            p {
                 border-left: 7px solid #555555;
                 text-indent: 10px;
                 margin-bottom: 10px;

+ 0 - 25
src/views/maintain/system/index.vue

@@ -342,36 +342,11 @@ export default class extends Vue {
                 tableData = res[1].content; // 主体数据
                 // 添加系统分类
                 this.tableData = tableData.map((item) => {
-                    // this.all.forEach(i=> {
-                    //     const category = ['ENUM', 'MENUM', 'BOOLEAN']
-                    //     if (i.category == 'STATIC' && category.includes(i.dataType) && i.dataSource) {
-                    //         let inx = i.path.substr(i.path.indexOf('.') + 1)
-                    //         for(let i in item) {
-                    //             if(inx == i) {
-                    //                 console.log(i,'ppppp')
-                    //             }
-                    //         }
-                    //     }
-                    // })
                     item = { ...item, classification: this.systemLabel };
                     return item;
                 });
                 this.getBatch(this.tableData);
             });
-            // // 动态信息点
-            // this.codeToDataSource = {};
-            // this.all.forEach((item) => {
-            //     if (item.dataSource) {
-            //         try {
-            //             this.codeToDataSource[item.code] = {};
-            //             item.dataSource.forEach((dic) => {
-            //                 this.codeToDataSource[item.code][dic.code] = dic.name;
-            //             });
-            //         } catch (e) {
-            //             console.log(e);
-            //         }
-            //     }
-            // });
         } else {
             console.log("void");
         }