ソースを参照

修改取消按钮

haojianlong 4 年 前
コミット
fc6e7a9321
1 ファイル変更12 行追加4 行削除
  1. 12 4
      src/views/ledger/facility/batchPoint.vue

+ 12 - 4
src/views/ledger/facility/batchPoint.vue

@@ -4,8 +4,8 @@
 			<el-button style="float:left;" size="small" type="default" icon="el-icon-back" @click="goback"></el-button>
 			<floor-cascader @change="changeFloor"></floor-cascader>
 			<my-cascader ref="cascader" @change="changeDevice"></my-cascader>
-			<el-button type="primary" size="mini" @click="handleClickSave" style="float:right;">保存</el-button>
-			<el-button size="mini" style="float:right;margin-right:10px;">取消</el-button>
+			<el-button type="primary" size="mini" @click="handleClickSave" style="float:right;">确认</el-button>
+			<el-button size="mini" style="float:right;margin-right:10px;" @click="cancel">取消</el-button>
 		</el-row>
 		<el-row class="main-container">
 			<el-row class="main-container-header">
@@ -47,7 +47,7 @@
 						<div v-show="!equipList.length" class="no-data">
 							<div class="position-icon">
 								<i class="icon-wushuju iconfont"></i>
-								数据暂无
+								暂无数据
 							</div>
 						</div>
 					</div>
@@ -295,6 +295,7 @@ export default {
 				params.Filters += `;EquipLocalName contain'${this.keyword}' or EquipLocalID contain '${this.keyword}' or CADID contain '${this.keyword}'`
 			}
 
+	        this.canvasLoading = true;
 			queryEquip(params, (res) => {
 				this.equipList = this.equipList.concat(res.Content.map(item => {item.selected = false; item.hasLocation = !!item.BIMLocation; return item;}));
 				if (this.view && this.view.scene) {
@@ -313,6 +314,8 @@ export default {
                     this.scene.spaceClick(this, this.spaceClick);
                     this.scene.iconClick(this, this.handleClickIcon);
 					this.view.update();
+                    this.canvasLoading = false;
+                    this.isChange = false;
 				}
 				this.total = res.Total;
 				if (!this.noMore) { //判断是否有更多数据
@@ -419,6 +422,7 @@ export default {
                 }
             })
             updateEquip(param, () => {
+                this.isChange = false
                 this.$message({message: '保存成功!', type: 'success'});
             })
         }
@@ -484,7 +488,11 @@ export default {
 	clearIcon() {
         if (this.scene)
         this.scene.clearIcon();
-	},
+    },
+    // 取消操作
+    cancel() {
+        this.initParams();
+    }
   },
   watch: {
     projectId() {