zhulizhen1111 пре 4 година
родитељ
комит
ee34e037bc
3 измењених фајлова са 89 додато и 89 уклоњено
  1. 22 50
      src/api/legendLibrary.js
  2. 5 2
      src/views/equipment/eqDialog.vue
  3. 62 37
      src/views/equipment/fenbuPic.vue

+ 22 - 50
src/api/legendLibrary.js

@@ -1,14 +1,10 @@
-import httputils from '@/api/httputils'
+import httputils from "@/api/httputils"
 // 图例库-查询
-export function queryLegend({
-    postParams
-}) {
+export function queryLegend({ postParams }) {
     return httputils.postJson(`/serve/topology-wanda/graphElement/query`, postParams)
 }
 // 图例库-新增
-export function createLegend({
-    postParams
-}) {
+export function createLegend({ postParams }) {
     return httputils.postJson(`/serve/topology-wanda/graphElement/create`, postParams)
 }
 // 图例库-新增
@@ -18,86 +14,62 @@ export function createLegend({
 //     return httputils.postJson(`/serve/topology-wanda/graphElement/create`, postParams)
 // }
 //图例库-更新
-export function updateLegend({
-    postParams
-}) {
+export function updateLegend({ postParams }) {
     return httputils.postJson(`/serve/topology-wanda/graphElement/update`, postParams)
 }
 //图例库-作废
-export function deleteLegend({
-    postParams
-}) {
+export function deleteLegend({ postParams }) {
     return httputils.postJson(`/serve/topology-wanda/graphElement/deleteByFlag`, postParams)
 }
 //图例库-系统tree查询
-export function getLegendTree({
-    getParams
-}) {
+export function getLegendTree({ getParams }) {
     return httputils.getJson(`/serve/topology-wanda/graphCategory/queryByGroup`, getParams)
 }
 
 //图例库-系统tree相关表格查询
-export function queryRelation({
-    data,
-    postParams
-}) {
+export function queryRelation({ data, postParams }) {
     return httputils.fetchJson(`/serve/topology-wanda/graphRelation/query`, data, postParams)
 }
 //图例库-更新关系图
-export function updateRelation({
-    postParams
-}) {
+export function updateRelation({ postParams }) {
     return httputils.postJson(`/serve/topology-wanda/graphRelation/update`, postParams)
 }
 //图例库-系统tree相关表格删除
-export function deleteRelation({
-    postParams
-}) {
+export function deleteRelation({ postParams }) {
     return httputils.postJson(`/serve/topology-wanda/graphRelation/delete`, postParams)
 }
 //图例库-上传图片
-export function uploadImg({
-    postParams
-}) {
+export function uploadImg({ postParams }) {
     return httputils.postJson(`/serve/topology-wanda/Picture/create`, postParams)
 }
 //图例库-穿梭框的搜索
-export function getTransfer({
-    getParams
-}) {
+export function getTransfer({ getParams }) {
     return httputils.getJson(`/serve/topology-wanda/graphElement/search`, getParams)
 }
 //图例库typeId
-export function queryTypeId({
-    postParams
-}) {
+export function queryTypeId({ postParams }) {
     return httputils.postJson(`/serve/topology-wanda/graphElement/type/query`, postParams)
 }
 // 搜索图铺位可视化类型信息
-export function getVisualization({
-    getParams
-}) {
+export function getVisualization({ getParams }) {
     return httputils.getJson(`/serve/topology-wanda/graphElement/type/search`, getParams)
-
 }
 // 图例分层展示
-export function groupByCategory({
-    getParams
-}) {
+export function groupByCategory({ getParams }) {
     // return httputils.getJson(`/serve/topology-wanda/graphRelation/groupByCategory`, getParams)
     return httputils.getJson(`/serve/topology-wanda/graphElement/groupByInfoSystem`, getParams)
 }
 // 图例搜索
-export function graphElementSearch({
-    postParams
-}) {
+export function graphElementSearch({ postParams }) {
     return httputils.postJson(`/serve/topology-wanda/graphElement/search`, postParams)
-
 }
 
 // 业下设备分类和位置分类树形结构
-export function queryDeviceAndPOsition({
-    postParams
-}) {
+export function queryDeviceAndPOsition({ postParams }) {
     return httputils.postJson(`/data/data/t_system_wzfl/query`, postParams)
-}
+}
+
+//图形查询
+export function queryPics({ postParams }) {
+    return httputils.postJson(`/serve/topology-wanda/graph/query`, postParams)
+}

+ 5 - 2
src/views/equipment/eqDialog.vue

@@ -151,8 +151,8 @@ export default {
             if (this.dialogInfo.children.length > 0) {
                 this.typecode = this.dialogInfo.children[`${tab.index}`].param.type_code
                 this.diff = this.dialogInfo.children[`${tab.index}`].param.diff
-            }
-            if (this.dialogInfo.children[0].id.slice(2, 4) == 'YL') {
+            }     
+            if (this.dialogInfo.children[0].id.slice(2, 4) == 'YL' && this.typecode!="FBT") {
                 this.initImage(this.typecode)
             }
             this.tabLabel = tab.label
@@ -304,6 +304,9 @@ export default {
         color: rgba(31, 36, 41, 1);
         border: 1px solid rgba(195, 199, 203, 1);
     }
+    .el-tab-pane {
+        height: 60% !important;
+    }
     .el-tabs,
     .el-tabs__content {
         height: 700px;

+ 62 - 37
src/views/equipment/fenbuPic.vue

@@ -1,26 +1,32 @@
 <template>
     <div class='fenbu-box'>
         <!-- 图例 -->
-        <div class='legend-boxs'>
-            <Legend></Legend>
+        <div class='legend-boxs' v-if='floors.length>0'>
+            <Legend :floors='floors'></Legend>
         </div>
-        <floor-list v-if='floorsArr.length>0' :floorsArr='floorsArr' :type='1' @emitFloor='emitFloor' :id='"floor"'></floor-list>
-        <!-- <div class='additional-box'>
+        <floor-list v-if='floors.length>0' :floorsArr='floors' :type='1' @emitFloor='emitFloor' :id='"floor"'></floor-list>
+        <div class='additional-box' v-if='floors.length>0'>
             <div class='additional' @click='additionalColl'>
                 <img src='../../assets/imgs/bg.png' alt />
             </div>
             <el-collapse-transition>
                 <div v-if='show' class='add-img'>我是放附加数据图片哒。。。</div>
             </el-collapse-transition>
-        </div>-->
-        <floorMap ref='floorMap' :loadName='loadName' :type='"floor"'></floorMap>
+        </div>
+        <div v-show='floors.length>0'>
+            <floorMap ref='floorMap' :loadName='loadName' :type='"floor"'></floorMap>
+        </div>
+        <div class='nodata' v-show='floors.length==0'>
+            <img class='img1' src='@/assets/imgs/wtp.png' alt />
+            <div class='no-img'>暂无分布图,请手动绘制</div>
+        </div>
     </div>
 </template>
 <script>
 import floorMap from '@/components/floorMap/index.vue'
 import floorList from '@/components/floorList.vue'
 import { mapGetters } from 'vuex'
-
+import { queryPics } from '@/api/legendLibrary.js'
 export default {
     components: { floorMap, floorList },
     data() {
@@ -31,7 +37,8 @@ export default {
                 code: 'F1'
             },
             loadName: '',
-            type: ''
+            type: '',
+            floors: []
         }
     },
     computed: {
@@ -41,47 +48,51 @@ export default {
         emitFloor(item) {
             this.floorInfo = item
             this.$refs.floorMap.init(this.floorInfo.gname)
-            this.init()
         },
         additionalColl() {
             this.show = !this.show
         },
-        init() {
-            this.loadName = `楼层功能-${this.floorInfo.code}`
+        getFloorData() {
+            let postParams = {
+                Distinct: true,
+                Filters: "projectId ='1000423';categoryId='LCGN' or categoryId='XFBFYCFL';isPub=true",
+                PageNumber: 1,
+                PageSize: 500,
+                Projection: ['floorId']
+            }
+            let floor = []
+            queryPics({ postParams }).then(res => {
+                console.log(res)
+                if (res.Total == 0) {
+                    this.floors = []
+                } else {
+                    floor = res.Content
+                    this.floorsArr.forEach(el=>{
+                        floor.forEach(ele=>{
+                            if(ele.floorId == el.gname){
+                                this.floors.push({
+                                    gname:el.gname,
+                                    code:el.code
+                                })
+                            }
+                        })
+                    })
+                }
+            })
         }
     },
     mounted() {
-        this.init()
-        this.$refs.floorMap.init(this.floorInfo.gname)
+        this.getFloorData()
+        // this.$refs.floorMap.init(this.floorInfo.gname)
     }
 }
 </script>
 <style lang="less">
 .fenbu-box {
-    background: rgba(242, 245, 247, 1);
-    height: calc(100vh - 48px);
-    flex: 1;
-    .eq-title {
-        position: fixed;
-        z-index: 2;
-        top: 92px;
-        left: 242px;
-        width: 140px;
-        height: 32px;
-        background: linear-gradient(270deg, rgba(199, 217, 234, 0) 0%, rgba(199, 217, 234, 1) 100%);
-        box-shadow: -6px 2px 8px 0px rgba(31, 36, 41, 0.1);
-        color: #025baa;
-        font-size: 16px;
-        &::before {
-            width: 2px;
-            height: 16px;
-            background: rgba(2, 91, 170, 1);
-            display: inline-block;
-            content: '';
-            margin-right: 10px;
-            margin-top: 8px;
-        }
-    }
+    display: flex;
+    height: 100%;
+    justify-content: center;
+    align-items: center;
     .legend-boxs {
         position: fixed;
         z-index: 9;
@@ -123,5 +134,19 @@ export default {
             z-index: 2;
         }
     }
+    .nodata {
+        height: calc(100%-50px);
+        .img1 {
+            width: 126px;
+            height: 121px;
+        }
+        .no-img {
+            font-size: 16px;
+            font-family: MicrosoftYaHei;
+            color: rgba(100, 108, 115, 1);
+
+            margin-top: 8px;
+        }
+    }
 }
 </style>