|
@@ -14,7 +14,7 @@
|
|
|
</el-tabs>
|
|
|
</div>
|
|
|
<div class="deleBtn">
|
|
|
- <el-button size="small">删除业务空间</el-button>
|
|
|
+ <el-button size="small" @click="deleteSpace">删除业务空间</el-button>
|
|
|
</div>
|
|
|
</el-row>
|
|
|
<div v-if="activeTab=='detail'" style="height:calc(100% - 110px)">
|
|
@@ -31,13 +31,13 @@
|
|
|
|
|
|
<script>
|
|
|
import { mapGetters } from "vuex"
|
|
|
-import { queryZone } from '@/api/scan/request'
|
|
|
+import { queryZone, deleteZone } from '@/api/scan/request'
|
|
|
import eqToSpaceTable from '@/components/business_space/newTables/eqToSpaceTable'
|
|
|
import syInSpaceTable from '@/components/business_space/newTables/syInSpaceTable'
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- params: {}, //参数-包含空间id 分区类型
|
|
|
+ params: {}, //参数-包含空间id 分区类型 进入方式(1-平面图 2-列表)
|
|
|
tabsList: [
|
|
|
{ Code: 'detail', Name: '空间详情' },
|
|
|
{ Code: 'equipment', Name: '空间内设备' },
|
|
@@ -70,7 +70,7 @@ export default {
|
|
|
goBack() {
|
|
|
this.$router.push({
|
|
|
name: "spacelist",
|
|
|
- params: { Family: this.params.Family }
|
|
|
+ params: this.params
|
|
|
})
|
|
|
},
|
|
|
// 查询空间详情
|
|
@@ -83,12 +83,26 @@ export default {
|
|
|
}
|
|
|
queryZone(pa, res => {
|
|
|
this.spaceDetails = res.Content[0];
|
|
|
+ this.params.BuildingId = this.spaceDetails.BuildingId;
|
|
|
+ this.params.FloorId = this.spaceDetails.FloorId;
|
|
|
})
|
|
|
},
|
|
|
// 设置iframe
|
|
|
setFrame() {
|
|
|
this.iframeSrc =
|
|
|
`${process.env.BASE_URL}:8889/#/details?perjectId=${this.projectId}&secret=${this.secret}&FmId=${this.params.RoomID}&type=0&code=${this.params.zone}`;
|
|
|
+ },
|
|
|
+ // 删除业务空间
|
|
|
+ deleteSpace() {
|
|
|
+ let pa = {
|
|
|
+ data: [{
|
|
|
+ Id: this.spaceDetails.RoomID
|
|
|
+ }],
|
|
|
+ zone: this.params.zone
|
|
|
+ }
|
|
|
+ deleteZone(pa, res => {
|
|
|
+ console.log(res)
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
};
|