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

连接接口完毕:关系总览

shaun-sheep 5 éve
szülő
commit
f01d407bae

+ 9 - 0
src/api/relation/api.js

@@ -0,0 +1,9 @@
+import httpUtil from "../scan/httpUtil";
+
+export default {
+    graphic: function (param,success) {
+        let url = '/api/datacenter/graphic/page-query'
+        let data = param
+        httpUtil.postJson(url, data,success)
+    }
+}

+ 2 - 1
src/api/scan/request.js

@@ -1,6 +1,7 @@
 import fetch from './fetch'
-import { api, physics, business, venders, baseUrl, zone } from './config.js'
+import {api, baseUrl, business, physics, venders, zone} from './config.js'
 import http from './httpUtil'
+
 let arithmetic = '/arithmetic'
 
 var Comming = 'revit'

+ 208 - 0
src/components/ready/buildfloor/container.vue

@@ -0,0 +1,208 @@
+<template>
+    <div class="container">
+        <el-button
+            size="small"
+            type="default"
+            @click="addFloor"
+            style="margin: 10px 11px;"
+        >添加楼层
+        </el-button>
+
+        <div class="table">
+            <el-table
+                :data="tableData"
+                style="width: 100%"
+                height="100%"
+                v-loading="loading"
+                :header-cell-style="headerStyle"
+            >
+                <el-table-column label="楼层本地名">
+                    <template slot-scope="scope">{{scope.row.FloorLocalName||scope.row.FloorName}}</template>
+                </el-table-column>
+                <el-table-column label="楼层顺序号">
+                    <template slot-scope="scope">{{scope.row.FloorSequenceID}}</template>
+                </el-table-column>
+                <el-table-column label="楼层信息">
+                    <template slot-scope="scope">
+                        <el-button
+                            size="mini"
+                            @click="editFloorData(scope.row)"
+                            plain
+                            icon="el-icon-edit-outline"
+                        ></el-button>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                    prop="Datasource"
+                    label="平面图"
+                >
+                    <template
+                        slot-scope="scope">
+                        <p
+                            v-if="scope.row.Sign > 0"
+                            class="cursor"
+                            @click="childCheckDrawImg(scope.row,2)"
+                        >
+                            <el-badge is-dot>
+                                <i class="iconfont icon-floorplan"/>
+                            </el-badge>
+                            平面图重复
+                        </p>
+                        <p
+                            class="cursor"
+                            v-else-if="scope.row.StructureInfo?scope.row.StructureInfo.FloorMap:false"
+                            @click="childCheckDrawImg(scope.row,1)"
+                        >
+                            <i class="iconfont icon-floorplan"/>
+                            查看平面图
+                        </p>
+                        <p
+                            class="cursor"
+                            v-else
+                            @click="childCheckDrawImg(scope.row,3)"
+                        >
+                            <i class="iconfont icon-nopicture"/>
+                            暂无平面图
+                        </p>
+                    </template>
+                </el-table-column>
+                <el-table-column
+                    prop="SubTypeName"
+                    label="楼层贯通关系"
+                >
+                    <template slot-scope="scope">
+                        <span style="margin-right:20px">{{scope.row.FloorThroughList?scope.row.FloorThroughList.length:0}}</span>
+                        <el-button
+                            size="mini"
+                            @click="changeConnection(scope.row)"
+                            plain
+                            icon="el-icon-edit-outline"
+                        />
+                    </template>
+                </el-table-column>
+                <el-table-column
+                    prop="action"
+                    label="操作">
+                    <template slot-scope="scope">
+                        <el-button
+                            size="mini"
+                            @click="handleDelete(scope.row)"
+                            type="danger"
+                            plain
+                            icon="el-icon-delete"
+                        />
+                    </template>
+                </el-table-column>
+            </el-table>
+        </div>
+        <!-- 添加-修改楼层 -->
+        <addFloor
+            :title="floorTitle"
+            ref="addFloorDialog"
+            :curBuildId="curBuildId"
+            :curFloorId="curFloorId"
+        />
+        <!-- 添加贯通关系弹窗 -->
+        <addConnectivity
+            ref="addConnectivity"
+        />
+        <!-- 删除建筑-删除楼层 -->
+        <el-dialog
+            title="提示"
+            :visible.sync="delDialogVis"
+            width="20%"
+            @close="handleClose"
+            id="messageDialog"
+        >
+            <div>确定要删除该{{delText}}?</div>
+            <span
+                slot="footer"
+                class="dialog-footer"
+            >
+        <el-button
+            size="small"
+            @click="delDialogVis=false"
+        >取消</el-button>
+        <el-button
+            size="small"
+            type="primary"
+            @click="confirmDelete"
+        >确认</el-button>
+      </span>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+    import addFloor from "@/views/ready/buildfloor/addFloor/index";
+    import addConnectivity from "./addConnectivity";
+
+    export default {
+        name: "container",
+        props: ['tableData', 'curBuildId'],
+        data() {
+            return {
+                floorTitle: "添加楼层",
+                curFloorId: "", //当前选中的楼层id
+                headerStyle: {
+                    backgroundColor: "#d9d9d9",
+                    color: "#2b2b2b",
+                    lineHeight: "30px"
+                },
+                loading: false, //列表loading
+                delText: "楼层",
+                delDialogVis: false,
+            }
+        },
+        components: {addFloor, addConnectivity},
+
+        methods: {
+            addFloor() {
+                this.curFloorId = "";
+                this.$refs.addFloorDialog.showDialog();
+            },
+            // 修改楼层贯通关系
+            changeConnection(row) {
+                this.$refs.addConnectivity.showDialog();
+                this.$refs.addConnectivity.floor = row;
+            },
+            // 修改楼层信息
+            editFloorData(floor) {
+                this.floorTitle = "编辑楼层信息";
+                this.curFloorId = floor.FloorID;
+                this.$refs.addFloorDialog.showDialog(floor);
+            },
+            //delete floor
+            handleDelete(floor) {
+                this.delText = "楼层";
+                this.delDialogVis = true;
+                this.curFloorId = floor.FloorID;
+            },
+            // 确认删除(删除建筑-楼层公用)
+            confirmDelete() {
+                this.delDialogVis = false;
+                this.$listeners.confirmDel()
+            },
+            //确认删除弹窗关闭
+            handleClose() {
+            },
+            // 查看平面图
+            childCheckDrawImg(row, index) {
+                this.$listeners.checkDrawImg(row, index)
+            }
+        }
+    }
+</script>
+
+<style scoped lang="less">
+    .container {
+        height: 100%;
+
+        .table {
+            height: 100%;
+        }
+        .cursor{
+            cursor: pointer;
+        }
+    }
+</style>

+ 119 - 0
src/components/ready/buildfloor/sidebar.vue

@@ -0,0 +1,119 @@
+<template>
+    <div class="sidebar">
+        <div style="padding: 10px">
+            <el-button
+                size="small"
+                type="default"
+                icon="el-icon-plus"
+
+            />
+            <el-button
+                size="small"
+                type="default"
+                icon="el-icon-minus"
+
+            />
+            <el-button
+                size="small"
+                type="default"
+                icon="el-icon-edit-outline"
+
+            />
+        </div>
+            <h4>建筑</h4>
+
+        <div class="build-list">
+            <div
+                v-if="content.length"
+                v-for="(item,index) in content"
+                :key="item.BuildID"
+                :class="{'floor-item':true,active:currentIndex  === index}"
+                @click="changeBuild(index)"
+
+            >
+            <span>
+            {{item.BuildLocalName || item.BuildName}}
+            <el-badge
+                v-if="item.Count > 0"
+                class="mark"
+                :value="item.Count"
+            />
+            </span>
+            </div>
+        </div>
+        <addBuild
+            :title="buildTitle"
+            ref="addBuildDialog"
+        />
+    </div>
+
+</template>
+
+<script>
+    import addBuild from "./addBuild";
+
+    export default {
+        name: "sidebar",
+        props: ['content'],
+        data() {
+            return {
+                currentIndex: 0,
+                buildTitle: "添加建筑",
+
+            }
+        },
+        components: {addBuild},
+        created() {
+            console.log(this.content)
+        },
+        methods: {
+            changeBuild(index) {
+                this.currentIndex = index
+                this.$emit('currentBuild', index)
+            }
+        }
+    }
+</script>
+
+<style scoped lang="less">
+    .sidebar {
+        h4 {
+            padding-left: 10px;
+            border-top: 1px solid #d9d9d9;
+            border-bottom: 1px solid #d9d9d9;
+            background: #d9d9d9;
+            color: #2b2b2b;
+            line-height: 44px;
+        }
+        .floor-item {
+            white-space: nowrap;
+            overflow: hidden;
+            text-overflow: ellipsis;
+
+            span {
+                margin-left: 10px;
+            }
+        }
+
+        .build-list {
+            line-height: 48px;
+
+            .floor-item {
+                white-space: nowrap;
+                overflow: hidden;
+                text-overflow: ellipsis;
+
+                span {
+                    margin-left: 10px;
+                }
+            }
+
+            .floor-item.active,
+            .floor-item:hover {
+                background-color: #f5f7fa;
+                color: #000;
+            }
+        }
+
+    }
+</style>

+ 81 - 114
src/components/relation/overview/cardList.vue

@@ -1,13 +1,20 @@
 <template>
     <div>
-        <section class="container" style="position: relative">
-            <!--蒙层-->
-            <div style="position:absolute;pointer-events: none;"></div>
+        <div
+            v-for="(item,index) in content"
+            :key="index"
+        >
+            <p class="slave-relation-title">{{item.GraphTypeName}}</p>
+            <section
+                class="container"
+                v-for="(child,childIndex) in item.ChildGraphicTypeList"
+                :key="child.GraphTypeId"
+            >
             <p class="relation-text">
-                建筑从属关系
-                <span class="pic-code">图编码xxxx</span>
+                {{child.GraphTypeName}}
+                <span class="pic-code">图编码{{child.GraphTypeCode}}</span>
                 <el-tooltip
-                    content="这是个提示"
+                    :content="child.Note"
                     placement="top">
                     <i
                         class="icon-shuoming iconfont"
@@ -16,15 +23,24 @@
                 </el-tooltip>
             </p>
 
-            <el-row :gutter="24">
-                <el-col :span="8">
-                    <el-card shadow="hover" style="position: relative" class="card">
-                        <div class="mask"></div>
+                <el-row :gutter="24">
+                    <el-col
+                        :span="8"
+                        v-for="(relation,relIndex) in child.RelationTypeProjectList"
+                        :key="relation.Id"
+                    >
+                        <el-card
+                            shadow="hover"
+                            style="position: relative;"
+                            class="card"
+                        >
+                            <!-- border:none-->
+                            <!--<div class="mask"></div>-->
                         <p class="relation-title">
-                            项目下的建筑体
-                            <span class="asc">ph2db</span>
+                            {{relation.RelationTypeName}}
+                            <span class="asc">{{relation.RelationTypeCode}}</span>
                             <el-tooltip
-                                content="这是个提示"
+                                :content="relation.Note"
                                 placement="top"
                                 style="z-index: 3;position:relative;"
                             >
@@ -37,7 +53,7 @@
                                 class="main-object "
                             >
                                 <p class="object">主要连接对象</p>
-                                <p class="group">项目→建筑体</p>
+                                <p class="group">{{relation.ConneObject}}</p>
                             </el-col>
                             <el-col
                                 :span="1"
@@ -47,12 +63,12 @@
                                 :span="10"
                                 class="main-object"
                             >
-                                <p class="line-number">接数量</p>
+                                <p class="line-number">接数量</p>
                                 <p class="line-number">0</p>
                             </el-col>
                         </article>
-                        <p class="last-computed">
-                            最后一次计算时间
+                            <p class="last-computed">
+                                <span v-show="relation.ComputingTime">最后一次计算时间 {{relation.ComputingTime}}</span>
                             <el-tooltip
                                 content="启动计算"
                                 placement="top"
@@ -65,86 +81,9 @@
                                         circle
                                         icon="iconfont icon-changyongtubiao-mianxing-"
                                         @click="computed"
-                                    >
-                                    </el-button>
-                                </el-badge>
-                            </el-tooltip>
-                            <el-tooltip
-                                content="手动编辑"
-                                placement="top"
-                            >
-                                <el-button
-                                    circle
-                                    class="float-right"
-                                    icon="iconfont icon-bianji"
-                                    @click="manual"
-                                >
-                                </el-button>
 
-                            </el-tooltip>
-                            <el-tooltip
-                                content="设定设备对象源/末端"
-                                placement="top"
-                            >
-                                <el-button
-                                    circle
-                                    class="float-right"
-                                    icon="iconfont icon-23 "
-                                    style="transform: rotate(90deg);"
-                                    @click="equipment"
-                                >
-                                </el-button>
-                            </el-tooltip>
-                        </p>
-                    </el-card>
-                </el-col>
-                <el-col :span="8">
-                    <el-card shadow="hover">
-                        <p class="relation-title">
-                            项目下的建筑体
-                            <span class="asc">ph2db</span>
-                            <el-tooltip
-                                content="这是个提示"
-                                placement="top"
-                            >
-                                <i class="iconfont icon-warn icon"/>
-                            </el-tooltip>
-                        </p>
-                        <article>
-                            <el-col
-                                :span="13"
-                                class="main-object "
-                            >
-                                <p class="object">主要连接对象</p>
-                                <p class="group">项目→建筑体</p>
-                            </el-col>
-                            <el-col
-                                :span="1"
-                                class="main-object ">&nbsp;
-                            </el-col>
-                            <el-col
-                                :span="10"
-                                class="main-object"
-                            >
-                                <p class="line-number">链接数量</p>
-                                <p class="line-number">0</p>
-                            </el-col>
-                        </article>
-                        <p class="last-computed">
-                            最后一次计算时间
-                            <el-tooltip
-                                content="启动计算"
-                                placement="top"
-                            >
-                                <el-badge
-                                    is-dot
-                                    class="item float-right"
-                                >
-                                    <el-button
-                                        circle
-                                        icon="iconfont icon-changyongtubiao-mianxing-"
-                                        @click="computed"
                                     >
+                                        <!--style="background: #000;color: #fff"-->
                                     </el-button>
                                 </el-badge>
                             </el-tooltip>
@@ -156,7 +95,9 @@
                                     circle
                                     class="float-right"
                                     icon="iconfont icon-bianji"
-                                    @click="manual"
+                                    @click="manual(relation.Manual,relation.Prompting,relation.RelationTypeName,relation.ComputingTime)"
+                                    :disabled="relation.Manual === 1"
+                                    :style="{'border':(relation.Manual===1? '1px solid #DCDFE6' :'')}"
                                 >
                                 </el-button>
 
@@ -164,6 +105,7 @@
                             <el-tooltip
                                 content="设定设备对象源/末端"
                                 placement="top"
+                                v-if="relation.IsSource"
                             >
                                 <el-button
                                     circle
@@ -177,21 +119,25 @@
                         </p>
                     </el-card>
                 </el-col>
-
             </el-row>
-
-            <maintain ref="maintain" :values="values"/>
         </section>
     </div>
-
+        <RelationMaintain
+            ref="maintain"
+            :values="values"
+        />
+    </div>
 
 </template>
 
 <script>
-    import maintain from './modal/relation-maintain'
+    import RelationMaintain from './Modal/RelationMaintain'
 
     export default {
         name: "cardList",
+        props: {
+            content: Array
+        },
         data() {
             return {
                 values: {
@@ -209,12 +155,11 @@
                     existTitle: '计算方向使用的源端和末端如下:',
                     originEquipment: '源端设备类:',
                     endEquipment: '末端设备类:',
-                    tips: '请前往以下功能页面维护xxx',
-                    device: '【设备台账】',
-                    system: '【系统台账】',
-                    optionTips: '请下载最新最新 传感器测量设备关系 数据进行手动维护',
+                    device: '', //提示引导内容
+                    tips: '', //请前往以下功能页面维护
+                    optionTips: '', //请下载最新最新 xxxx 数据进行手动维护
                     currentNum: '当前关系数量:',
-                    lastTime: '最后更新时间为',
+                    lastTime: '', //最后更新时间为
                     uploadTxt: '将Excel文件拖到此处,或<em>单击上传Excel文件<em>',
                     uploadTips: '上传的Excel数据将完全覆盖当前关系表(关系表先前数据不会保留)',
                     inHand: '数据文件处理中...',
@@ -225,9 +170,10 @@
                 }
             }
         },
+        computed: {},
         methods: {
             explain() {
-                alert('explain click')
+                // alert('explain click')
             },
             computed() {
                 // this.$refs.maintain.dialogTableVisible = true
@@ -236,12 +182,21 @@
             equipment() {
                 this.$refs.maintain.dialogEquipment = true
             },
-            manual() {
-                // this.$refs.maintain.dialogManualTip = true
-                this.$refs.maintain.dialogManualOption = true
+            manual(type, tips, typeName, lastTime) {
+                if (type === 2) {
+                    this.values.device = tips.split(',')
+                    this.values.tips = `请前往以下功能页面维护 <${typeName}>`
+                    this.$refs.maintain.dialogManualTip = true
+                }
+                if (type === 3) {
+                    this.values.optionTips = `请下载最新最新 <${typeName}> 数据进行手动维护`
+                    this.values.lastTime = `最后更新时间为 ${lastTime}`
+                    this.$refs.maintain.dialogManualOption = true
+                }
+
             }
         },
-        components: {maintain}
+        components: {RelationMaintain}
     }
 </script>
 
@@ -253,12 +208,23 @@
     @pos-relative: relative;
     @pos-absolute: absolute;
     @pos-zero: 0;
+    @5px: 5px;
+    .slave-relation-title {
+        color: @font-code;
+        font-weight: 600;
+        border-bottom: 2px dashed @font-code;
+        padding-bottom: @5px;
+    }
     .container {
         .el-card {
             border: 1px solid #000;
             margin: 10px 0;
         }
 
+        .el-button {
+            border: 1px solid #000;
+        }
+
         .relation-text {
             overflow: hidden;
             margin-top: 10px;
@@ -270,7 +236,7 @@
             .pic-code {
                 font-size: @font-small;
                 color: @font-code;
-                margin-left: 5px;
+                margin-left: @5px;
                 font-weight: 400;
             }
         }
@@ -340,16 +306,17 @@
         }
 
         .last-computed {
+            overflow: hidden;
             color: @font-code;
 
             .float-right {
                 float: right;
-                margin-left: 5px;
+                margin-left: @5px;
             }
 
             /deep/ .is-dot {
                 margin-top: 7px;
-                margin-right: 5px;
+                margin-right: @5px;
             }
 
         }

+ 8 - 11
src/components/relation/overview/modal/relation-maintain.vue

@@ -75,7 +75,7 @@
             :title="values.title"
             :visible.sync="dialogEquipment"
         >
-            <span>{{values.underDesign}}</span>
+            <span class="font-big">{{values.underDesign}}</span>
             <footer
                 slot="footer"
                 class="dialog-footer"
@@ -93,8 +93,10 @@
             :visible.sync="dialogManualTip"
         >
             <p class="font-big">{{values.tips}}</p>
-            <p class="font-big">{{values.device}}</p>
-            <p class="font-big">{{values.system}}</p>
+            <p
+                class="font-big"
+                v-for="item in values.device"
+            >{{item}}</p>
             <footer
                 slot="footer"
                 class="dialog-footer "
@@ -113,7 +115,7 @@
                 <el-col :span="8">
                     <p>
                         <i class="iconfont icon-doc-line"/>
-                        {{values.currentNum}}2333
+                        {{values.currentNum}} 0
                     </p>
                     <el-button
                         type="primary"
@@ -123,7 +125,6 @@
                 </el-col>
                 <el-col :span="10">
                     {{values.lastTime}}
-                    2010-10-14
                 </el-col>
             </el-row>
             <el-upload
@@ -181,12 +182,8 @@
 <script>
 
     export default {
-        props: {
-            values: {
-                type: Object,
-                required: true
-            }
-        },
+        name: "RelationMaintain",
+        props:['values'],
         created() {
         },
 

+ 71 - 73
src/views/ready/buildfloor/addFloor/index.vue

@@ -10,81 +10,79 @@
   </el-dialog>
 </template>
 <script>
-import {
-  manageCreateFloor,
-  manageUpdateFloor
-} from "@/api/scan/request";
-import formItems from "@/components/ready/buildfloor/formItems";
-import tools from "@/utils/buildfloor/tools";
-export default {
-  props: {
-    title: {
-      default: '提示'
-    },
-    type: {
-      default: 'Floor'
-    },
-    curBuildId: {
-      default: ''
-    },
-    curFloorId: {
-      default: ''
-    }
-  },
-  components: {
-    formItems
-  },
-  data() {
-    return {
-      dialogVisible: false, //弹窗显示与隐藏
-      floorData: {}
-    };
-  },
-  methods: {
-    showDialog(data) {
-      this.floorData = data || {};
-      this.floorData = tools.desFormatData(this.floorData)
-      this.timeoutSetVal()
-      this.dialogVisible = true;
-    },
-    timeoutSetVal() {
-      setTimeout(() => {
-        if (this.$refs.formItems) {
-          this.$refs.formItems.form = this.floorData
-        } else {
+    import {manageCreateFloor, manageUpdateFloor} from "@/api/scan/request";
+    import formItems from "@/components/ready/buildfloor/formItems";
+    import tools from "@/utils/buildfloor/tools";
+
+    export default {
+      props: {
+        title: {
+          default: '提示'
+        },
+        type: {
+          default: 'Floor'
+        },
+        curBuildId: {
+          default: ''
+        },
+        curFloorId: {
+          default: ''
+        }
+      },
+      components: {
+        formItems
+      },
+      data() {
+        return {
+          dialogVisible: false, //弹窗显示与隐藏
+          floorData: {}
+        };
+      },
+      methods: {
+        showDialog(data) {
+          this.floorData = data || {};
+          this.floorData = tools.desFormatData(this.floorData)
           this.timeoutSetVal()
+          this.dialogVisible = true;
+        },
+        timeoutSetVal() {
+          setTimeout(() => {
+            if (this.$refs.formItems) {
+              this.$refs.formItems.form = this.floorData
+            } else {
+              this.timeoutSetVal()
+            }
+          }, 500)
+        },
+        handleClose() { },
+        //创建
+        confirm() {
+          this.$refs.formItems.submitForm(this.save)
+        },
+        save() {
+          let form = this.$refs.formItems.form
+          let newform = tools.formatData(form)
+          newform.BuildID = this.curBuildId
+          let Param = {
+            Content: [newform]
+          }
+          if (newform.FloorID) {
+            manageUpdateFloor(Param, res => {
+              this.$message.success('更新成功')
+              this.$emit('refresh')
+              this.dialogVisible = false;
+            })
+          } else {
+            manageCreateFloor(Param, res => {
+              this.$message.success('创建成功')
+              this.$emit('refresh')
+              this.dialogVisible = false;
+            })
+          }
         }
-      }, 500)
-    },
-    handleClose() { },
-    //创建
-    confirm() {
-      this.$refs.formItems.submitForm(this.save)
-    },
-    save() {
-      let form = this.$refs.formItems.form
-      let newform = tools.formatData(form)
-      newform.BuildID = this.curBuildId
-      let Param = {
-        Content: [newform]
-      }
-      if (newform.FloorID) {
-        manageUpdateFloor(Param, res => {
-          this.$message.success('更新成功')
-          this.$emit('refresh')
-          this.dialogVisible = false;
-        })
-      } else {
-        manageCreateFloor(Param, res => {
-          this.$message.success('创建成功')
-          this.$emit('refresh')
-          this.dialogVisible = false;
-        })
-      }
-    }
-  },
-  mounted() { },
-  created() { }
+      },
+      mounted() { },
+      created() { }
 };
 </script>
 <style lang="scss" scoped>

+ 134 - 80
src/views/ready/buildfloor/index.vue

@@ -29,7 +29,7 @@
             <div
                 v-for="(item,index) in buildList"
                 :key="item.BuildID"
-                :class="{'floor-item':true,active:item.active}"
+                :class="{'floor-item':true,active:currentIndex === index}"
                 @click="changeBuild(index)"
             >
             <span>
@@ -183,10 +183,30 @@
           ref="checkGraphy"
           @refresh="refresh"
       />
+
+<!--      <el-row :gutter="24">-->
+<!--          <el-col :span="4">-->
+<!--              <sidebar-->
+<!--                  :content="buildList"-->
+<!--                  @currentBuild="currentBuild"-->
+<!--              />-->
+<!--          </el-col>-->
+<!--          <el-col :span="20" style="float:right;">-->
+<!--              <container-->
+<!--                  :curBuildId="curBuildId"-->
+<!--                  :tableData="tableData"-->
+<!--                  @checkDrawImg="checkDrawImg"-->
+<!--                  @confirmDel="confirmDel"-->
+<!--              />-->
+<!--          </el-col>-->
+<!--      </el-row>-->
   </div>
+
 </template>
 
 <script>
+    import container from "../../../components/ready/buildfloor/container";
+    import sidebar from "../../../components/ready/buildfloor/sidebar";
     import addFloor from "@/views/ready/buildfloor/addFloor/index";
     import addBuild from "@/components/ready/buildfloor/addBuild";
     import {mapGetters} from "vuex";
@@ -196,11 +216,13 @@
 
     export default {
         components: {
-    addFloor,
-    addBuild,
-    addConnectivity,
-    checkGraphy
-  },
+            addFloor,
+            addBuild,
+            addConnectivity,
+            checkGraphy,
+            sidebar,
+            container
+        },
         data() {
             return {
                 repetitionGraphyVisible: false, // 替换平面图弹窗
@@ -213,6 +235,7 @@
                     color: "#2b2b2b",
                     lineHeight: "30px"
                 },
+                currentIndex: 0,//第一座高亮
                 buildList: [],
                 tableData: [],
                 page: {
@@ -242,18 +265,27 @@
                 };
                 buildingQueryAndCount(bdParam, res => {
                     this.buildList = res.Content;
-                    if (this.buildList.length) {
-                        this.changeBuild(0);
-                    }
+                    this.buildList.length ? this.changeBuild(this.currentIndex) : null;
+                    this.curBuildId = this.buildList[0].BuildID;
+
+                    // if (this.buildList.length) {
+                    //     this.changeBuild(0);
+                    // }
                 });
             },
+            currentBuild(index) {
+                this.curBuildId = this.buildList[index].BuildID;
+                this.getFloorTableData();
+                this.$forceUpdate();
+            },
             //change build
             changeBuild(index) {
-                this.buildList.map(item => {
-                    item.active = false;
-                    return item;
-                });
-                this.buildList[index].active = true;
+                this.currentIndex = index;
+                // this.buildList.map(item => {
+                //     item.active = false;
+                //     return item;
+                // });
+                // this.buildList[index].active = true;
                 this.curBuildId = this.buildList[index].BuildID;
                 this.getFloorTableData();
                 this.$forceUpdate();
@@ -344,78 +376,100 @@
             }
         },
         watch: {
-    projectId() {
-      this.init();
+            projectId() {
+                this.init();
     }
   }
 };
 </script>
 <style lang="less" scoped>
     #bd-fl-manage {
-  overflow: hidden;
-  height: 100%;
-  position: relative;
-  .el-row {
-    height: 100%;
-    & > div {
-      float: left;
-      height: 100%;
-      overflow: hidden;
-      background-color: #fff;
-      box-sizing: border-box;
-      border: 1px solid #dfe6ec;
-      .action-box {
-        padding: 10px;
-        .el-button--small {
-          padding: 10px 11px;
-        }
-      }
-    }
-    .l-list {
-      width: 17%;
-      overflow-y: auto;
-      h4 {
-        padding-left: 10px;
-        border-top: 1px solid #d9d9d9;
-        border-bottom: 1px solid #d9d9d9;
-        background: #d9d9d9;
-        color: #2b2b2b;
-        line-height: 44px;
-      }
-      .build-list {
-        line-height: 48px;
-        .floor-item {
-          white-space: nowrap;
-          overflow: hidden;
-          text-overflow: ellipsis;
-          span {
-            margin-left: 10px;
-          }
-        }
-        .floor-item.active,
-        .floor-item:hover {
-          background-color: #f5f7fa;
-          color: #000;
-        }
-      }
-    }
-    .r-table {
-      width: 82%;
-      margin-left: 1%;
-      .table-box {
-        height: calc(100% - 54px);
-        margin-bottom: 8px;
-        .iconfont {
-          vertical-align: middle;
-        }
-        /deep/ .el-badge__content.is-fixed {
-          transform: translateY(-6%) translateX(-100%);
-        }
-        p {
-          cursor: pointer;
+
+        overflow: hidden;
+        height: 100%;
+        position: relative;
+
+        .el-row {
+            height: 100%;
+
+            .el-col-4 {
+                width: 17%;
+            }
+            .el-col-20 {
+                width: 82%;
+            }
+            & > div {
+                float: left;
+                height: 100%;
+                overflow: hidden;
+                background-color: #fff;
+                box-sizing: border-box;
+                border: 1px solid #dfe6ec;
+
+                .action-box {
+                    padding: 10px;
+
+                    .el-button--small {
+                        padding: 10px 11px;
+                    }
+                }
+            }
+
+            .l-list {
+                width: 17%;
+                overflow-y: auto;
+
+                h4 {
+                    padding-left: 10px;
+                    border-top: 1px solid #d9d9d9;
+                    border-bottom: 1px solid #d9d9d9;
+                    background: #d9d9d9;
+                    color: #2b2b2b;
+                    line-height: 44px;
+                }
+
+                .build-list {
+                    line-height: 48px;
+
+                    .floor-item {
+                        white-space: nowrap;
+                        overflow: hidden;
+                        text-overflow: ellipsis;
+
+                        span {
+                            margin-left: 10px;
+                        }
+                    }
+
+                    .floor-item.active,
+                    .floor-item:hover {
+                        background-color: #f5f7fa;
+                        color: #000;
+                    }
+                }
+            }
+
+            .r-table {
+                width: 82%;
+                margin-left: 1%;
+
+                .table-box {
+                    height: calc(100% - 54px);
+                    margin-bottom: 8px;
+
+                    .iconfont {
+                        vertical-align: middle;
+                    }
+
+                    /deep/ .el-badge__content.is-fixed {
+                        transform: translateY(-6%) translateX(-100%);
+                    }
+
+                    p {
+                        cursor: pointer;
+                    }
+                }
+            }
         }
-      }
-    }
-  }
 }
 </style>

+ 10 - 11
src/views/ready/collectsetting/index.vue

@@ -74,15 +74,14 @@
     import buildInput from "@/components/common/search_input";
     import configDialog from "@/components/dialogs/config/infoPoint"
     import {
-        // getAllFamily, //获取所有设备族
-        queryPhysicsAllType, //查询设备、部件、系统
-        queryFamilyAll, //查询所有设备族
-        getDataDictionary, //点击时后去右侧的数据
-        setDataDictionary, //修改右侧数据
-        // getEqCode,
-        getBussTypes
+        getBussTypes,
+        getDataDictionary,
+        queryFamilyAll,
+        queryPhysicsAllType,
+        setDataDictionary
     } from "@/api/scan/request";
-    import { mapGetters, mapActions } from "vuex";
+    import {mapGetters} from "vuex";
+
     export default {
         name: "family",
         components: {
@@ -543,7 +542,7 @@
                             }
                         })
                         this.isLoading = false
-                        this.familySort() 
+                        this.familySort()
                     })
                 } else if (this.value == "space") {
                     getBussTypes(res => {
@@ -578,14 +577,14 @@
                         this.familySort();
                     })
                 } else if (this.value == "tenant") {
-                    this.allFamily = [{ 
+                    this.allFamily = [{
                             "code": "Tenant",
                             "name": "租户"
                         }
                     ]
                     this.familySort()
                 } else if (this.value == "shaft") {
-                    this.allFamily = [{ 
+                    this.allFamily = [{
                             "code": "Shaft",
                             "name": "竖井"
                         }

+ 177 - 15
src/views/relation/overview/index.vue

@@ -1,33 +1,195 @@
 <template>
     <div>
-        <p class="slave-relation-title">架构从属关系</p>
-        <cardList/>
-        <cardList/>
+        <cardList
+            :content="list"
+        />
     </div>
 </template>
 
 <script>
-    import cardList from "@/components/relation/overview/cardList"
+    import CardList from "@/components/relation/Overview/CardList"
+    import api from "../../../api/relation/api";
+
 
     export default {
     data() {
         return {
-          plan: "2019-10-30",
-          finish: "2019-10-30",
-          onLine: "2019-10-30",
-          explain: "所有关系的检索查看以及维护(查看方式包含:列表,平面图,拓扑图等)"
+            list: [
+                {
+                    GraphTypeId: '3535436',//大分类id
+                    GraphTypeName: '架构从属关系',//大分类名称
+                    GraphTypeCode: '',//大分类编码
+                    Note: '',//说明
+                    ParentId: '',//父id
+                    ChildGraphicTypeList: [
+                        {
+                            GraphTypeId: '234534543',//图类型id
+                            GraphTypeName: '建筑从属关系',//图类型名称
+                            GraphTypeCode: 'ksaajdk',//图类型编码
+                            Note: '显示数字字典excel中的xxx',//说明
+                            ParentId: '3535436',//父id,GraphTypeId
+                            RelationTypeProjectList: [
+                                {
+                                    Id: '23445433534',
+                                    RelationTypeName: '项目下的建筑体',//关系类型名称
+                                    RelationTypeCode: 'Pj2Bd',//关系类型编码
+                                    GraphicId: 'ksaajdk',//图类型编码
+                                    Note: '边类型说明(待补充)',//说明
+                                    ConneObject: '项目→建筑体',//连接对象
+                                    IsSource: true,//是否需要配置源末端
+                                    IsAutomatic: true,//是否自动计算类型
+                                    Manual: 2,//123选一个手动计算类型1禁用2提示引导3手动维护
+                                    Prompting: '【设备台账】,【系统台账】',//提示信息
+                                    ProjectId: 'Pj1245',//项目id
+                                    ComputingTime: '2019.12.12 12:00',//null不显示,最后一次自动计算时间
+                                    ComputationalState: 1,//计算状态
+                                },
+                                {
+                                    Id: '345646',
+                                    RelationTypeName: '建筑体下的业务空间',//关系类型名称
+                                    RelationTypeCode: 'Bd2Sp',//关系类型编码
+                                    GraphicId: 'ksaajdk',//图类型编码
+                                    Note: '边类型说明(待补充)',//说明
+                                    ConneObject: '建筑体→业务空间',//连接对象
+                                    IsSource: true,//是否需要配置源末端
+                                    IsAutomatic: true,//是否自动计算类型
+                                    Manual: 1,//123选一个手动计算类型1禁用2提示引导3手动维护
+                                    Prompting: '【设备台账】',//提示信息
+                                    ProjectId: 'Pj1245',//项目id
+                                    ComputingTime: '2019.12.12 12:00',//null不显示,最后一次自动计算时间
+                                    ComputationalState: 1,//计算状态
+                                },
+                                {
+                                    Id: '345646546',
+                                    RelationTypeName: '建筑体下的高度',//关系类型名称
+                                    RelationTypeCode: 'Bd2F1',//关系类型编码
+                                    GraphicId: 'ksaajdk',//图类型编码
+                                    Note: '边类型说明(待补充)',//说明
+                                    ConneObject: '建筑体→优势',//连接对象
+                                    IsSource: true,//是否需要配置源末端
+                                    IsAutomatic: true,//是否自动计算类型
+                                    Manual: 3,//123选一个手动计算类型1禁用2提示引导3手动维护
+                                    Prompting: '【设备台账】,【系统台账】',//提示信息
+                                    ProjectId: 'Pj1245',//项目id
+                                    ComputingTime: '2019.12.11 12:00',//null不显示,最后一次自动计算时间
+                                    ComputationalState: 1,//计算状态
+                                },
+                                {
+                                    Id: '345644356',
+                                    RelationTypeName: '建筑体下的竖井',//关系类型名称
+                                    RelationTypeCode: 'Bd2Sh',//关系类型编码
+                                    GraphicId: 'ksaajdk',//图类型编码
+                                    Note: '边类型说明(待补充)',//说明
+                                    ConneObject: '建筑体→竖井',//连接对象
+                                    IsSource: true,//是否需要配置源末端
+                                    IsAutomatic: true,//是否自动计算类型
+                                    Manual: 2,//123选一个手动计算类型1禁用2提示引导3手动维护
+                                    Prompting: '【设备台账】',//提示信息
+                                    ProjectId: 'Pj1245',//项目id
+                                    ComputingTime: '2019.12.11 12:00',//null不显示,最后一次自动计算时间
+                                    ComputationalState: 1,//计算状态
+                                },
+                                {
+                                    Id: '3456465sss46',
+                                    RelationTypeName: '建筑体下的高度',//关系类型名称
+                                    RelationTypeCode: 'Bd2F1',//关系类型编码
+                                    GraphicId: 'ksaajdk',//图类型编码
+                                    Note: '边类型说明(待补充)',//说明
+                                    ConneObject: '建筑体→优势',//连接对象
+                                    IsSource: true,//是否需要配置源末端
+                                    IsAutomatic: true,//是否自动计算类型
+                                    Manual: 3,//123选一个手动计算类型1禁用2提示引导3手动维护
+                                    Prompting: '【设备台账】,【系统台账】,【xx台账】',//提示信息
+                                    ProjectId: 'Pj1245',//项目id
+                                    ComputingTime: '2019.12.11 12:00',//null不显示,最后一次自动计算时间
+                                    ComputationalState: 1,//计算状态
+                                },
+                            ]
+                        },
+                        {
+                            GraphTypeId: '23453645645433',//图类型id
+                            GraphTypeName: '机电从属关系',//图类型名称
+                            GraphTypeCode: 'ksaajdk',//图类型编码
+                            Note: '显示数字字典excel中的xxx',//说明
+                            ParentId: '3535436',//父id,GraphTypeId
+                            RelationTypeProjectList: [
+                                {
+                                    Id: '234454345363534',
+                                    RelationTypeName: '项目下的系统',//关系类型名称
+                                    RelationTypeCode: 'Pj2Bd',//关系类型编码
+                                    GraphicId: 'ksaajdk',//图类型编码
+                                    Note: '边类型说明(待补充)',//说明
+                                    ConneObject: '项目→建筑体',//连接对象
+                                    IsSource: false,//是否需要配置源末端
+                                    IsAutomatic: true,//是否自动计算类型
+                                    Manual: 1,//123选一个手动计算类型1禁用2提示引导3手动维护
+                                    Prompting: '【设备台账】,【系统台账】',//提示信息
+                                    ProjectId: 'Pj1245',//项目id
+                                    ComputingTime: '2019.12.12 12:00',//null不显示,最后一次自动计算时间
+                                    ComputationalState: 1,//计算状态
+                                }
+                            ]
+                        }
+                    ]
+                }, {
+                    GraphTypeId: '3535436',//大分类id
+                    GraphTypeName: '物理连通关系',//大分类名称
+                    GraphTypeCode: '',//大分类编码
+                    Note: '',//说明
+                    ParentId: '',//父id
+                    ChildGraphicTypeList: [
+                        {
+                            GraphTypeId: '23453455436343',//图类型id
+                            GraphTypeName: '业务空间(同类)初步关系',//图类型名称
+                            GraphTypeCode: 'ksaajdk',//图类型编码
+                            Note: '显示数字字典excel中的xxx',//说明
+                            ParentId: '3535436',//父id,GraphTypeId
+                            RelationTypeProjectList: [
+                                {
+                                    Id: '23445476533534',
+                                    RelationTypeName: '项目下的建筑体',//关系类型名称
+                                    RelationTypeCode: 'Pj2Bd',//关系类型编码
+                                    GraphicId: 'ksaajdk',//图类型编码
+                                    Note: '边类型说明(待补充)',//说明
+                                    ConneObject: '项目→建筑体',//连接对象
+                                    IsSource: true,//是否需要配置源末端
+                                    IsAutomatic: true,//是否自动计算类型
+                                    Manual: 1,//123选一个手动计算类型1禁用2提示引导3手动维护
+                                    Prompting: '【设备台账】,【系统台账】',//提示信息
+                                    ProjectId: 'Pj1245',//项目id
+                                    ComputingTime: '2019.12.12 12:00',//null不显示,最后一次自动计算时间
+                                    ComputationalState: 1,//计算状态
+                                }
+                            ]
+                        }
+                    ]
+                }
+            ]
         }
     },
+        created() {
+            let data = {
+                "Cascade": [{
+                    "Cascade": [{
+                        "Filters": " projectId = 'Pj4201050001'",
+                        "Name": "relationTypeProjectList"
+                    }],
+                    "Filters": " not parentId isnull",
+                    "Name": "childGraphicTypeList"
+                }],
+                "Filters": " parentId isnull ",
+                "PageNumber": 1,
+                "PageSize": 50
+            }
+            api.graphic(data, res => {
+                console.log(res)
+            })
+        },
         mounted() {
         },
-        components: {cardList}
+        components: {CardList}
 }
 </script>
 <style lang="less" scoped>
-    .slave-relation-title {
-        color: #AAAAAA;
-        font-weight: 600;
-        border-bottom: 2px dashed #555;
-        padding-bottom: 5px;
-    }
+
 </style>