|
@@ -27,6 +27,10 @@
|
|
|
<p><b>位置图片:</b></p>
|
|
|
<graphy ref="graphy"></graphy>
|
|
|
</div>
|
|
|
+ <div class="space-img">
|
|
|
+ <!-- 业务空间图片,后台未提供 -->
|
|
|
+ <img src="" alt="">
|
|
|
+ </div>
|
|
|
</el-aside>
|
|
|
<el-main>
|
|
|
<el-tabs v-model="activeTab" type='card'>
|
|
@@ -37,7 +41,7 @@
|
|
|
</div>
|
|
|
<!-- 动态数据 -->
|
|
|
<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 ref="handsontable" :zoneCode="spaceDetails.ObjectType" :id="`handsontable${spaceDetails.ObjectType}`">
|
|
|
</handsontable-main>
|
|
|
</div>
|
|
|
<div v-if="activeTab === 'objectRelationship'" class="objectRelationship">
|
|
@@ -65,7 +69,7 @@
|
|
|
|
|
|
<script>
|
|
|
import { mapGetters } from 'vuex'
|
|
|
-import { queryZone, getAllbusiness, getDataDictionary } from '@/api/scan/request'
|
|
|
+import { queryZone, getAllbusiness, getDataDictionary, floorQuery, buildingQuery } 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'
|
|
@@ -84,7 +88,7 @@ export default {
|
|
|
spaceDetails: {},
|
|
|
iframeSrc: '',
|
|
|
projectId: '',
|
|
|
- params: {},
|
|
|
+ params: {}
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
@@ -99,16 +103,13 @@ export default {
|
|
|
this.setFrame();
|
|
|
this.params = this.$route.query;
|
|
|
}
|
|
|
- this.$nextTick(() => {
|
|
|
- this.getSpaceImg();
|
|
|
- })
|
|
|
},
|
|
|
updated() {
|
|
|
- if (this.activeTab === "dynamicData") {
|
|
|
- this.$nextTick(() => {
|
|
|
- this.initMessage();
|
|
|
- })
|
|
|
- }
|
|
|
+ // if (this.activeTab === "dynamicData") {
|
|
|
+ // this.$nextTick(() => {
|
|
|
+ // this.initMessage();
|
|
|
+ // })
|
|
|
+ // }
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters('layout', ['userInfo', 'projects', 'userId', 'secret'])
|
|
@@ -124,6 +125,10 @@ export default {
|
|
|
}
|
|
|
queryZone(params, res => {
|
|
|
this.spaceDetails = res.Content[0];
|
|
|
+ this.buildFloorSelectd = [this.FloorMap.BuildID,this.FloorMap.FloorID];
|
|
|
+ if(this.spaceDetails.Outline && this.spaceDetails.Outline.length){
|
|
|
+ this.getSpaceFloor();
|
|
|
+ }
|
|
|
})
|
|
|
this.setFrame();
|
|
|
},
|
|
@@ -132,11 +137,19 @@ export default {
|
|
|
this.projectId = localStorage.getItem('projectId');
|
|
|
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}`
|
|
|
},
|
|
|
+ getSpaceFloor() {
|
|
|
+ // 获取业务空间楼层
|
|
|
+ let params = {
|
|
|
+ Filters: `FloorID='${this.spaceDetails.FloorId}'`
|
|
|
+ }
|
|
|
+ floorQuery(params, res => {
|
|
|
+ this.FloorMap = res.Content[0];
|
|
|
+ this.getSpaceImg();
|
|
|
+ })
|
|
|
+ },
|
|
|
getSpaceImg() {
|
|
|
- // 获取业务空间位置图片
|
|
|
- // console.log(this.spaceDetails, 8888)
|
|
|
- this.buildFloorSelectd = [this.spaceDetails.BuildingId,this.spaceDetails.FloorId];
|
|
|
- this.$refs.graphy.getData(this.buildFloorSelectd, this.FloorMap, this.activeTabType);
|
|
|
+ // 获取业务空间楼层图片
|
|
|
+ this.$refs.graphy.getData(this.buildFloorSelectd, this.FloorMap, {code: this.spaceDetails.ObjectType});
|
|
|
},
|
|
|
initMessage() {
|
|
|
let params = {
|
|
@@ -148,9 +161,7 @@ export default {
|
|
|
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.buildFloorSelectd = [this.spaceDetails.BuildingId, this.spaceDetails.FloorId];
|
|
|
this.$refs.handsontable[0].getHeader(res.Content, this.buildFloorSelectd);
|
|
|
})
|
|
|
},
|
|
@@ -164,18 +175,13 @@ export default {
|
|
|
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,重新请求空间数据
|
|
|
"$route"() {
|
|
|
if (this.$route.query.RoomID && this.$route.query.zone) {
|
|
|
this.getData();
|
|
|
+ // window.location.reload();
|
|
|
}
|
|
|
}
|
|
|
}
|