|
@@ -11,7 +11,7 @@
|
|
|
</div>
|
|
|
</el-header>
|
|
|
<el-container>
|
|
|
- <el-aside width="500px">
|
|
|
+ <el-aside width="450px">
|
|
|
<div class="aside-top">
|
|
|
<div class="aside-top-left">
|
|
|
<p><b>空间功能区类型:</b>{{spaceDetails.RoomFuncType?spaceDetails.RoomFuncType:"-"}}</p>
|
|
@@ -25,7 +25,6 @@
|
|
|
</div>
|
|
|
<div v-if="spaceDetails.Outline && spaceDetails.Outline.length">
|
|
|
<p><b>位置图片:</b></p>
|
|
|
- <!-- <graphy @getSp="checkSpace" @dimension="checkSpace" @businessDetails="getBuinessDetails" ref="graphy"></graphy> -->
|
|
|
<graphy ref="graphy"></graphy>
|
|
|
</div>
|
|
|
</el-aside>
|
|
@@ -33,15 +32,14 @@
|
|
|
<el-tabs v-model="activeTab" type='card'>
|
|
|
<template v-for="(item,index) in tabsList">
|
|
|
<el-tab-pane :name="item.Code" :key="index" :label="item.Name">
|
|
|
- <!-- 静态数据 -->
|
|
|
- <div v-if="activeTab === 'staticData'" style="width:100%">
|
|
|
+ <div v-if="activeTab === 'staticData'" style="width:100%;textAlign:left;">
|
|
|
<iframe height="100%" width="100%" :src="iframeSrc" id="staticData"></iframe>
|
|
|
</div>
|
|
|
<!-- 动态数据 -->
|
|
|
- <div v-if="activeTab === 'dynamicData'" style="width:100%">
|
|
|
- <!-- <iframe height="100%" width="100%" :src="iframeSrc"></iframe> -->
|
|
|
+ <div v-if="activeTab === 'dynamicData'" style="width:100%;textAlign:left;">
|
|
|
+ <handsontable-main @lookEqu="lookEqu" ref="handsontable" :zoneCode="spaceDetails.ObjectType" :id="`handsontable${spaceDetails.ObjectType}`">
|
|
|
+ </handsontable-main>
|
|
|
</div>
|
|
|
- <!-- 对象关系 -->
|
|
|
<div v-if="activeTab === 'objectRelationship'" class="objectRelationship">
|
|
|
<div class="objectRelationship-left">
|
|
|
<h5>空间内设备:</h5>
|
|
@@ -67,10 +65,11 @@
|
|
|
|
|
|
<script>
|
|
|
import { mapGetters } from 'vuex'
|
|
|
-import { queryZone, getAllbusiness } from '@/api/scan/request'
|
|
|
+import { queryZone, getAllbusiness, getDataDictionary } from '@/api/scan/request'
|
|
|
import graphy from "@/components/business_space/newGraphy/graphy";
|
|
|
import eqToSpaceTable from '@/components/business_space/newTables/eqToSpaceTable'
|
|
|
import syInSpaceTable from '@/components/business_space/newTables/syInSpaceTable'
|
|
|
+import handsontableMain from "@/components/business_space/business/handsontable";
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
@@ -81,22 +80,35 @@ export default {
|
|
|
{ Code: 'objectRelationship', Name: '对象关系' }
|
|
|
],
|
|
|
activeTab: 'staticData',
|
|
|
+ checked: true,
|
|
|
spaceDetails: {},
|
|
|
iframeSrc: '',
|
|
|
projectId: '',
|
|
|
- params: {}
|
|
|
+ params: {},
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
|
graphy,
|
|
|
eqToSpaceTable,
|
|
|
- syInSpaceTable
|
|
|
+ syInSpaceTable,
|
|
|
+ handsontableMain
|
|
|
},
|
|
|
created() {
|
|
|
if (this.$route.query.RoomID && this.$route.query.zone && !this.$route.query.isMyTab) {
|
|
|
this.getData();
|
|
|
+ this.setFrame();
|
|
|
this.params = this.$route.query;
|
|
|
}
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.getSpaceImg();
|
|
|
+ })
|
|
|
+ },
|
|
|
+ updated() {
|
|
|
+ if (this.activeTab === "dynamicData") {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.initMessage();
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters('layout', ['userInfo', 'projects', 'userId', 'secret'])
|
|
@@ -111,24 +123,53 @@ export default {
|
|
|
zone: this.$route.query.zone
|
|
|
}
|
|
|
queryZone(params, res => {
|
|
|
- console.log(res, 1111111)
|
|
|
this.spaceDetails = res.Content[0];
|
|
|
- if (this.$route.query.RoomID && this.$route.query.zone) {
|
|
|
- this.setFrame();
|
|
|
- this.getSpaceImg();
|
|
|
- }
|
|
|
})
|
|
|
+ this.setFrame();
|
|
|
},
|
|
|
setFrame() {
|
|
|
// 设置静态数据tab的iframe地址
|
|
|
this.projectId = localStorage.getItem('projectId');
|
|
|
- // document.getElementById("staticData").contentWindow.location.reload(true);
|
|
|
this.iframeSrc = `${process.env.BASE_URL}:8889/#/details?perjectId=${this.projectId}&secret=${this.secret}&FmId=${this.$route.query.RoomID}&type=0&code=${this.$route.query.zone}`
|
|
|
},
|
|
|
getSpaceImg() {
|
|
|
- // 获取空间位置图片
|
|
|
- console.log(this.spaceDetails, 222222)
|
|
|
- }
|
|
|
+ // 获取业务空间位置图片
|
|
|
+ // console.log(this.spaceDetails, 8888)
|
|
|
+ this.buildFloorSelectd = [this.spaceDetails.BuildingId,this.spaceDetails.FloorId];
|
|
|
+ this.$refs.graphy.getData(this.buildFloorSelectd, this.FloorMap, this.activeTabType);
|
|
|
+ },
|
|
|
+ initMessage() {
|
|
|
+ let params = {
|
|
|
+ data: {
|
|
|
+ Orders: "sort asc",
|
|
|
+ PageNumber: 1,
|
|
|
+ PageSize: 500
|
|
|
+ },
|
|
|
+ type: this.spaceDetails.ObjectType
|
|
|
+ }
|
|
|
+ getDataDictionary(params, res => {
|
|
|
+ console.log(res, 99999)
|
|
|
+ console.log(this.$refs.handsontable,12345678)
|
|
|
+ this.buildFloorSelectd = [this.spaceDetails.BuildingId,this.spaceDetails.FloorId];
|
|
|
+ this.$refs.handsontable[0].getHeader(res.Content, this.buildFloorSelectd);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //获取表格主体内容
|
|
|
+ getMain() {
|
|
|
+ if (!!this.hot) {
|
|
|
+ this.hot.destroy();
|
|
|
+ this.hot = null;
|
|
|
+ }
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.initHot();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ lookEqu(infos) {
|
|
|
+ infos.id = infos.RoomID
|
|
|
+ infos.name = infos.RoomLocalName
|
|
|
+ this.floor.facility = true
|
|
|
+ this.$refs.facility.getData(infos, this.buildMess)
|
|
|
+ },
|
|
|
},
|
|
|
watch: {
|
|
|
// 监听路由地址,并判断有RoomID和zone,重新请求空间数据
|