|
@@ -3,7 +3,7 @@
|
|
|
<div class="condition">
|
|
|
<div class="header">
|
|
|
<el-button style="float:left;" size="small" type="default" icon="el-icon-back" @click="goBack"></el-button>
|
|
|
- <div class="edit-tool" v-if="!cenoteObj.onlyRead">
|
|
|
+ <div class="edit-tool" v-if="!(cenoteObj.onlyRead == 'true')">
|
|
|
<el-button v-if="isMyTab == 2" size="small" style="float:right" @click="dialogVisible = true">添加</el-button>
|
|
|
<div v-else>
|
|
|
<el-button v-show="!isEdit" @click="changeEditType" size="small" style="float:right">编辑</el-button>
|
|
@@ -36,7 +36,7 @@
|
|
|
:value="item.BuildID"></el-option>
|
|
|
</el-select>
|
|
|
</el-badge>
|
|
|
- <el-switch v-if="!cenoteObj.onlyRead" style="margin-left:15px;" v-model="isAI" @change="handleChangeAI"
|
|
|
+ <el-switch v-if="!(cenoteObj.onlyRead == 'true')" style="margin-left:15px;" v-model="isAI" @change="handleChangeAI"
|
|
|
active-text="打开AI">
|
|
|
</el-switch>
|
|
|
<div style="height:calc(100% - 42px);margin:10px 0 0 0;width:100%;">
|
|
@@ -59,7 +59,7 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<div class="elevation-box">
|
|
|
- <elevation-map ref="elevationMap" :onlyRead="cenoteObj.onlyRead" :isEdit="isEdit" :isAI="isAI"
|
|
|
+ <elevation-map ref="elevationMap" :onlyRead="cenoteObj.onlyRead=='true'" :isEdit="isEdit" :isAI="isAI"
|
|
|
@elevationChecked="handleCheckedSpace"
|
|
|
@elevationUncheck="handleUncheckSpace"
|
|
|
:params="{BuildingId: building, ObjectType: ObjectType, ShaftId: $route.query.ShaftId}">
|
|
@@ -84,7 +84,6 @@ import elevationMap from "@/components/ledger/cenote/elevationMap";
|
|
|
import addSpaceDialog from '@/components/ledger/cenote/dialog/addSpaceDialog';
|
|
|
import {
|
|
|
queryAllZoneType,
|
|
|
- // buildingQuery,
|
|
|
shaftSpaceTypeQuery,
|
|
|
shaftSpaceBuildingQuery,
|
|
|
verticalSpace
|
|
@@ -120,10 +119,10 @@ export default {
|
|
|
return this.$route.query;
|
|
|
},
|
|
|
showSpaceDot() {
|
|
|
- return this.spaceList.length > 1 && this.cenoteObj.onlyRead ? true : false;
|
|
|
+ return this.spaceList.length > 1 && this.cenoteObj.onlyRead == 'true' ? true : false;
|
|
|
},
|
|
|
showBuildDot() {
|
|
|
- return this.buildingList.length > 1 && this.cenoteObj.onlyRead ? true : false;
|
|
|
+ return this.buildingList.length > 1 && this.cenoteObj.onlyRead == 'true' ? true : false;
|
|
|
},
|
|
|
...mapGetters("layout", ["projectId"])
|
|
|
},
|
|
@@ -136,13 +135,14 @@ export default {
|
|
|
elevationMap
|
|
|
},
|
|
|
created() {
|
|
|
- this.isAI = this.$route.query.onlyRead ? false : true;
|
|
|
+ console.log(this.cenoteObj.onlyRead == 'true');
|
|
|
+ this.isAI = this.$route.query.onlyRead == 'true' ? false : true;
|
|
|
this.getSpaceData();
|
|
|
},
|
|
|
methods: {
|
|
|
//获取空间信息
|
|
|
getSpaceData() {
|
|
|
- if (this.cenoteObj.onlyRead) {
|
|
|
+ if (this.cenoteObj.onlyRead == 'true') {
|
|
|
let pa = {
|
|
|
shaftId: this.$route.query.ShaftId
|
|
|
}
|
|
@@ -174,7 +174,13 @@ export default {
|
|
|
}
|
|
|
return t;
|
|
|
});
|
|
|
- this.space = [val2.content[0].objectType];
|
|
|
+ if (val2.content.length) {
|
|
|
+ this.space = [val2.content[0].objectType];
|
|
|
+ } else {
|
|
|
+ this.space = this.spaceList.find((item) => {
|
|
|
+ return item.Code == "GeneralZone"
|
|
|
+ }) ? ["GeneralZone"] : [this.spaceList[0].Code];
|
|
|
+ }
|
|
|
this.ObjectType = this.space[0];
|
|
|
//加载楼层信息
|
|
|
this.loadBuildingData();
|
|
@@ -183,7 +189,7 @@ export default {
|
|
|
},
|
|
|
//默认显示默认分区,无默认分区显示第一个分区
|
|
|
showDefaultSpace() {
|
|
|
- if (this.spaceList.length && this.cenoteObj.onlyRead) {
|
|
|
+ if (this.spaceList.length && this.cenoteObj.onlyRead == 'true') {
|
|
|
this.space = this.spaceList.find((item) => {
|
|
|
return item.Code == "GeneralZone"
|
|
|
}) ? ["GeneralZone"] : [this.spaceList[0].Code];
|
|
@@ -200,7 +206,7 @@ export default {
|
|
|
},
|
|
|
//获取楼层信息
|
|
|
loadBuildingData() {
|
|
|
- if (this.cenoteObj.onlyRead) {
|
|
|
+ if (this.cenoteObj.onlyRead == 'true') {
|
|
|
let param = {
|
|
|
ShaftId: this.$route.query.ShaftId,
|
|
|
ObjectType: this.ObjectType
|
|
@@ -245,15 +251,11 @@ export default {
|
|
|
this.$refs.relatedSpacelist.setFloorData(this.buildingList);
|
|
|
}
|
|
|
if (this.buildingList.length) {
|
|
|
- // if (this.buildingList.length > 1 && this.cenoteObj.onlyRead) {
|
|
|
- // this.showBuildDot = true;
|
|
|
- // }
|
|
|
this.changeBuilding(this.buildingList[0].id);
|
|
|
} else {
|
|
|
this.buildingList = [];
|
|
|
this.building = '';
|
|
|
this.floor = '';
|
|
|
- // this.showBuildDot = false;
|
|
|
}
|
|
|
this.buildingList.map(item => {
|
|
|
if (item.id && item.BuildLocalName) {
|