|
@@ -105,11 +105,18 @@
|
|
|
@handleBuild="handleBuild"
|
|
|
/>
|
|
|
<!-- 删除建筑-删除楼层 -->
|
|
|
- <el-dialog :visible.sync="delDialogVis" @close="handleClose" id="messageDialog" title="提示" width="20%">
|
|
|
+ <el-dialog
|
|
|
+ :visible.sync="delDialogVis"
|
|
|
+ @close="handleClose"
|
|
|
+ id="messageDialog"
|
|
|
+ title="提示"
|
|
|
+ width="20%"
|
|
|
+
|
|
|
+ >
|
|
|
<div>确定要删除该{{delText}}?</div>
|
|
|
<span class="dialog-footer" slot="footer">
|
|
|
<el-button @click="delDialogVis=false" size="small">取消</el-button>
|
|
|
- <el-button @click="confirmDel" size="small" type="primary">确认</el-button>
|
|
|
+ <el-button @click="confirmDel" size="small" type="primary" :disabled="buildDisabled">确认</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
<!-- 添加贯通关系弹窗 -->
|
|
@@ -151,6 +158,7 @@
|
|
|
floorTitle: "添加楼层",
|
|
|
buildTitle: "添加建筑",
|
|
|
delDialogVis: false,
|
|
|
+ buildDisabled: false,
|
|
|
delText: "建筑",
|
|
|
headerStyle: {
|
|
|
backgroundColor: "#d9d9d9",
|
|
@@ -354,10 +362,12 @@
|
|
|
},
|
|
|
// 确认删除(删除建筑-楼层公用)
|
|
|
confirmDel() {
|
|
|
+ this.buildDisabled = true
|
|
|
if (this.delText == "楼层") {
|
|
|
let delParam = [{FloorID: this.curFloorId}];
|
|
|
manageDeleteFloor(delParam, res => {
|
|
|
this.$message.success("删除成功");
|
|
|
+ this.buildDisabled = false
|
|
|
this.delDialogVis = false;
|
|
|
this.init();
|
|
|
});
|
|
@@ -367,14 +377,14 @@
|
|
|
if (this.tableData && this.tableData.length) {
|
|
|
this.$message.error("当前建筑中包含楼层,不可删除");
|
|
|
this.delDialogVis = false;
|
|
|
+ this.buildDisabled = false
|
|
|
} else {
|
|
|
let param = [{BuildId: this.curBuildId}];
|
|
|
objectDeleteBuild(param, res => {
|
|
|
- setTimeout(() => {
|
|
|
- this.handleBuildQuery()
|
|
|
- this.init()
|
|
|
- })
|
|
|
+ this.handleBuildQuery()
|
|
|
+ this.init()
|
|
|
this.$message.success("删除成功");
|
|
|
+ this.buildDisabled = false
|
|
|
this.delDialogVis = false;
|
|
|
})
|
|
|
}
|