|
@@ -24,9 +24,19 @@
|
|
|
position: absolute;
|
|
|
bottom: 36rpx;
|
|
|
right: 32rpx;
|
|
|
+ &.fold {
|
|
|
+ }
|
|
|
+ &.building {
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+.search-btn-box {
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
+}
|
|
|
.page-intelligent-control .location-wrapper .search-btn {
|
|
|
+ // position: absolute;
|
|
|
+ // right: 0;
|
|
|
margin-bottom: 16rpx;
|
|
|
width: 96rpx;
|
|
|
height: 96rpx;
|
|
@@ -266,23 +276,22 @@ movable-view {
|
|
|
:style="{top: selectArea.isAbnormity? ((selectArea['borderWidth'][0]+selectArea['borderWidth'][2])/2 - selectArea['borderWidth'][0])*mapScale +'px' : (selectArea.top*mapScale-54 + (selectArea.height*mapScale/2))+'px', left: selectArea.isAbnormity? ((selectArea['borderWidth'][1]+selectArea['borderWidth'][3])/2 - selectArea['borderWidth'][3])*mapScale +'px': (selectArea.left*mapScale+(selectArea.width*mapScale/2)-36)+'px', transform: 'rotate('+(selectArea.rotate)+'deg)' }"
|
|
|
src="{{h5StaticPath + 'map-icon/' + selectArea.selectIcon}}"
|
|
|
/>
|
|
|
-
|
|
|
</div>
|
|
|
</movable-view>
|
|
|
<div class="{{'location-wrapper ' + foldStatus}}">
|
|
|
- <image
|
|
|
+ <div class="search-btn-box">
|
|
|
+ <image
|
|
|
v-on:click="toSearchPage"
|
|
|
class="search-btn"
|
|
|
src="{{h5StaticPath}}icon-search-big.svg"
|
|
|
- />
|
|
|
- <!-- 博锐尚格正式环境暂不显示该入口 -->
|
|
|
- <location
|
|
|
- v-if="isShowLocationEntrance"
|
|
|
- @component-location-position="positionFun($event)"
|
|
|
- ></location>
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+
|
|
|
<floor
|
|
|
status="{{floorStatus}}"
|
|
|
:floors="floors"
|
|
|
+ :buildings="buildingData"
|
|
|
+ selectedBuilding="{{ selectedBuilding }}"
|
|
|
selectedFloor="{{selectedFloor}}"
|
|
|
@component-floor-fold="flodFloorFun"
|
|
|
@component-floor-change="changeFloorFun($event)"
|
|
@@ -291,12 +300,6 @@ movable-view {
|
|
|
</div>
|
|
|
</movable-area>
|
|
|
</div>
|
|
|
- <!-- <block v-if="query.from && query.from=='officehome'">
|
|
|
- <div class="office-content-abstract">
|
|
|
- <div class="title">{{selectArea.title}}</div>
|
|
|
- <div class="btn-switch" v-on:click="goBack">切换</div>
|
|
|
- </div>
|
|
|
- </block>-->
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -305,7 +308,6 @@ import wepy from '@wepy/core';
|
|
|
import store from '@/store';
|
|
|
|
|
|
import {
|
|
|
- getMapInfoHttp,
|
|
|
getSpaceBytoothHttp,
|
|
|
getMapDetailHttp
|
|
|
} from '@/packagesEnv/api/intelligentControl';
|
|
@@ -315,7 +317,11 @@ import config from '@/config';
|
|
|
import { mapState } from '@wepy/x';
|
|
|
import { saveCompanyConfig } from '@/service/companyConfig';
|
|
|
import { getCompanyMapData } from '@/api/home';
|
|
|
-import { getBuildingList, getFloorList } from '@/packagesEnv/api/mapApi.js';
|
|
|
+import {
|
|
|
+ getBuildingList,
|
|
|
+ getFloorList,
|
|
|
+ getMapInfo
|
|
|
+} from '@/packagesEnv/api/mapApi.js';
|
|
|
|
|
|
let h5StaticPath = config.h5StaticPath + '/page-intelligent-control/';
|
|
|
const tarBarHeight = 96;
|
|
@@ -346,7 +352,7 @@ let touchMapEndRecord = {
|
|
|
};
|
|
|
let from = 'officehome';
|
|
|
|
|
|
-let CompanyMapData;
|
|
|
+let CompanyMapData = {};
|
|
|
let combinedData = [];
|
|
|
|
|
|
wepy.component({
|
|
@@ -362,6 +368,7 @@ wepy.component({
|
|
|
selectArea: {},
|
|
|
x: 0,
|
|
|
y: 0,
|
|
|
+ selectedBuilding: '',
|
|
|
selectedFloor: '',
|
|
|
foldStatus: 'fold', // fold-最小化 expand-展开状态
|
|
|
floorStatus: 'fold', // flod-收起楼层 expand-展开楼层选则
|
|
@@ -381,7 +388,8 @@ wepy.component({
|
|
|
floors: [],
|
|
|
companyId: '',
|
|
|
buildingData: [],
|
|
|
- buildingItem: {}
|
|
|
+ buildingItem: {},
|
|
|
+ floorItem: {}
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState({
|
|
@@ -394,6 +402,7 @@ wepy.component({
|
|
|
},
|
|
|
ready() {
|
|
|
// 获取地图数据
|
|
|
+ console.log('地图模块触发了--');
|
|
|
this.init();
|
|
|
},
|
|
|
// 页面激活
|
|
@@ -421,12 +430,10 @@ wepy.component({
|
|
|
projectId: 'Pj1101080259'
|
|
|
}
|
|
|
};
|
|
|
- console.log(this.projectId);
|
|
|
getBuildingList(params).then(res => {
|
|
|
- console.log('获取常驻空间');
|
|
|
- console.log(res);
|
|
|
this.buildingData = res.content || [];
|
|
|
this.buildingItem = this.buildingData[0];
|
|
|
+ this.selectedBuilding = this.buildingItem.id;
|
|
|
this.getFloorList();
|
|
|
});
|
|
|
},
|
|
@@ -442,18 +449,28 @@ wepy.component({
|
|
|
};
|
|
|
getFloorList(params).then(res => {
|
|
|
this.floors = res.content || [];
|
|
|
+ console.log('===', this.floors);
|
|
|
+ CompanyMapData.mapWidth = 2314;
|
|
|
+ this.floorItem = this.floors[0];
|
|
|
+ this.selectedFloor = this.floorItem.id;
|
|
|
+ this.getMapSize();
|
|
|
+ this.getPageMapInfo();
|
|
|
});
|
|
|
},
|
|
|
/**
|
|
|
* 获取地图信息
|
|
|
*/
|
|
|
- getMapInfo() {
|
|
|
+ getPageMapInfo() {
|
|
|
let params = {
|
|
|
- projectId: '',
|
|
|
- floorId: 'proxyData.floorItem.id'
|
|
|
+ projectId: 'Pj1101080259',
|
|
|
+ floorId: this.floorItem.id
|
|
|
};
|
|
|
getMapInfo(params)
|
|
|
- .then(res => {})
|
|
|
+ .then(res => {
|
|
|
+ let data = res.data || {};
|
|
|
+ this.mapAreasInfo = data.spaceList || [];
|
|
|
+ console.log('地图数据--');
|
|
|
+ })
|
|
|
.catch(() => {});
|
|
|
},
|
|
|
getMapSize() {
|
|
@@ -622,12 +639,6 @@ wepy.component({
|
|
|
this.foldStatus = 'fold';
|
|
|
}
|
|
|
},
|
|
|
- expandPanelFun() {
|
|
|
- if (this.foldStatus === 'fold') {
|
|
|
- this.foldStatus = 'expand';
|
|
|
- this.setAreaCenter(this.selectArea);
|
|
|
- }
|
|
|
- },
|
|
|
flodFloorFun() {
|
|
|
if (this.floorStatus !== 'fold') {
|
|
|
this.floorStatus = 'fold';
|