|
@@ -3,7 +3,6 @@
|
|
|
<div class="condition">
|
|
|
<div class="header">
|
|
|
<el-button style="float:left;" size="small" type="default" icon="el-icon-back" @click="goBack"></el-button>
|
|
|
- <span style="float:left;">{{ cenoteObj.name || '' }}</span>
|
|
|
<div class="edit-tool" v-if="!cenoteObj.onlyRead">
|
|
|
<el-button v-if="isMyTab == 2" size="small" style="float:right" @click="dialogVisible = true">添加</el-button>
|
|
|
<div v-else>
|
|
@@ -14,7 +13,8 @@
|
|
|
<addSpaceDialog :dialogVisible.sync="dialogVisible" ref="addSpaceDialog" @refresh="refresh" :params="cenoteObj" :spaceType="spaceType"
|
|
|
:floorType="floorType"></addSpaceDialog>
|
|
|
</div>
|
|
|
- <el-badge :is-dot="showSpaceDot">
|
|
|
+ <el-badge :is-dot="showSpaceDot" style="margin-left:15px;">
|
|
|
+ <label style="line-height:32px;">业务空间类型:</label>
|
|
|
<el-select v-model="space" placeholder="请选择业务空间" @change="changeSpace" style="margin-left:15px;">
|
|
|
<el-option v-for="item in spaceList" :key="item.Code" :label="item.Name" :value="item.Code">
|
|
|
</el-option>
|
|
@@ -29,9 +29,10 @@
|
|
|
</div>
|
|
|
<div v-show="isMyTab == 1" class="data-item">
|
|
|
<el-badge :is-dot="showBuildDot">
|
|
|
- <el-select v-model="building" placeholder="请选择建筑" @change="changeBuilding" v-loading="buildingLoading">
|
|
|
- <el-option v-for="item in buildingList" :key="item.value" :label="item.BuildLocalName" :value="item.BuildID"></el-option>
|
|
|
- </el-select>
|
|
|
+ <label style="line-height:32px;padding: 0 10px;">所属建筑:</label>
|
|
|
+ <el-select v-model="building" placeholder="请选择建筑" @change="changeBuilding" v-loading="buildingLoading">
|
|
|
+ <el-option v-for="item in buildingList" :key="item.value" :label="item.BuildLocalName" :value="item.BuildID"></el-option>
|
|
|
+ </el-select>
|
|
|
</el-badge>
|
|
|
<div style="height:calc(100% - 42px);margin:10px 0 0 0;width:100%;position:relative;">
|
|
|
<el-scrollbar style="height:100%;width:148px;border:1px solid rgb(201,201,201);margin:0px;float:left;">
|
|
@@ -43,7 +44,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-scrollbar>
|
|
|
- <div style="float:right;height:100%;width:calc(100% - 152px);border:1px solid rgb(201,201,201);">
|
|
|
+ <div style="float:right;height:100%;width:calc(100% - 152px);border:1px solid rgb(201,201,201);border-left:none;">
|
|
|
<cenote-graphy ref="cenotegraphy"></cenote-graphy>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -79,8 +80,8 @@ export default {
|
|
|
spaceType: {},//空间种类
|
|
|
floorType: {},//子组件楼层信息
|
|
|
buildingLoading: false,//左侧列表加载
|
|
|
- showSpaceDot:false,//空间提示红点
|
|
|
- showBuildDot:false,//楼层提示红点
|
|
|
+ showSpaceDot: false,//空间提示红点
|
|
|
+ showBuildDot: false,//楼层提示红点
|
|
|
}
|
|
|
},
|
|
|
computed: {
|
|
@@ -134,7 +135,7 @@ export default {
|
|
|
showDefaultSpace() {
|
|
|
if (this.spaceList.length) {
|
|
|
this.space = this.spaceList[0].Code;
|
|
|
- if(this.spaceList.length > 1 && this.cenoteObj.onlyRead){
|
|
|
+ if (this.spaceList.length > 1 && this.cenoteObj.onlyRead) {
|
|
|
this.showSpaceDot = true;
|
|
|
}
|
|
|
}
|
|
@@ -188,15 +189,26 @@ export default {
|
|
|
},
|
|
|
//处理建筑楼层数据
|
|
|
handleBuildingData() {
|
|
|
+ if (this.isMyTab == 2) {
|
|
|
+ this.$refs.relatedSpacelist.setFloorData(this.buildingList);
|
|
|
+ }
|
|
|
if (this.buildingList.length) {
|
|
|
- this.building = this.buildingList[0].BuildID;
|
|
|
- this.buildingObj = this.buildingList[0];
|
|
|
- if (this.buildingObj.Floor && this.buildingObj.Floor.length) {
|
|
|
- this.floor = this.buildingObj.Floor[0].FloorID;
|
|
|
- }
|
|
|
- if(this.buildingList.length > 1 && this.cenoteObj.onlyRead){
|
|
|
+ if (this.buildingList.length > 1 && this.cenoteObj.onlyRead) {
|
|
|
this.showBuildDot = true;
|
|
|
}
|
|
|
+ this.changeBuilding(this.buildingList[0].BuildID);
|
|
|
+ // this.building = this.buildingList[0].BuildID;
|
|
|
+ // this.buildingObj = this.buildingList[0];
|
|
|
+ // if (this.buildingObj.Floor && this.buildingObj.Floor.length) {
|
|
|
+ // this.floor = this.buildingObj.Floor[0].FloorID;
|
|
|
+ // }
|
|
|
+
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.buildingList = [];
|
|
|
+ this.building = '';
|
|
|
+ this.floor = '';
|
|
|
+ this.showBuildDot = false;
|
|
|
}
|
|
|
this.buildingList.map(item => {
|
|
|
if (item.BuildID && item.BuildLocalName) {
|
|
@@ -213,17 +225,24 @@ export default {
|
|
|
},
|
|
|
//更改业务空间类型
|
|
|
changeSpace(val) {
|
|
|
+ this.showSpaceDot = false;
|
|
|
this.space = val;
|
|
|
+ this.floor = '';
|
|
|
+ this.buildingList = [];
|
|
|
+ this.building = '';
|
|
|
+ this.changeFloor('');
|
|
|
this.loadBuildingData();
|
|
|
- this.showSpaceDot = false;
|
|
|
},
|
|
|
//更换建筑
|
|
|
changeBuilding(bid) {
|
|
|
+ this.buildingObj = {};
|
|
|
+ this.building = bid;
|
|
|
this.buildingList.map(item => {
|
|
|
if (item.BuildID == bid) {
|
|
|
this.buildingObj = item;
|
|
|
if (item.Floor && item.Floor.length) {
|
|
|
- this.floor = item.Floor[0].FloorID
|
|
|
+ // this.floor = item.Floor[0].FloorID
|
|
|
+ this.changeFloor(item.Floor[0].FloorID);
|
|
|
}
|
|
|
}
|
|
|
})
|
|
@@ -232,14 +251,17 @@ export default {
|
|
|
//更换楼层
|
|
|
changeFloor(fid) {
|
|
|
this.floor = fid;
|
|
|
+ this.isEdit = false;
|
|
|
+ let buildfloor = [this.building, fid]
|
|
|
+ this.$refs.cenotegraphy.getFloorMap(buildfloor, this.space)
|
|
|
},
|
|
|
//取消编辑
|
|
|
- cancelEdit(){
|
|
|
+ cancelEdit() {
|
|
|
this.isEdit = false;
|
|
|
this.$refs.cenotegraphy.cancelEdit();
|
|
|
},
|
|
|
//保存编辑
|
|
|
- saveEdit(){
|
|
|
+ saveEdit() {
|
|
|
this.isEdit = false;
|
|
|
this.$refs.cenotegraphy.saveEdit();
|
|
|
},
|
|
@@ -271,27 +293,13 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
- floor: {
|
|
|
- handler(val) {
|
|
|
- this.isEdit = false;
|
|
|
- let buildfloor = [this.building, val]
|
|
|
- this.$refs.cenotegraphy.getFloorMap(buildfloor, this.space)
|
|
|
- }
|
|
|
- },
|
|
|
- space: {
|
|
|
- handler(val) {
|
|
|
- this.isEdit = false;
|
|
|
- let buildfloor = [this.building, this.floor]
|
|
|
- this.$refs.cenotegraphy.getFloorMap(buildfloor, val)
|
|
|
- }
|
|
|
- },
|
|
|
isEdit: {
|
|
|
handler(val) {
|
|
|
this.$refs.cenotegraphy.setSelectAble(val);
|
|
|
}
|
|
|
},
|
|
|
- projectId:{
|
|
|
- handler(val){
|
|
|
+ projectId: {
|
|
|
+ handler(val) {
|
|
|
this.goBack();
|
|
|
}
|
|
|
}
|
|
@@ -375,8 +383,8 @@ export default {
|
|
|
.data-item {
|
|
|
height: calc(100% - 44px);
|
|
|
padding: 10px 0px;
|
|
|
- /deep/ .is-horizontal{
|
|
|
- display:none
|
|
|
+ /deep/ .is-horizontal {
|
|
|
+ display: none;
|
|
|
}
|
|
|
}
|
|
|
.floor-item {
|