|
@@ -165,7 +165,6 @@
|
|
|
// currentType: 'add'
|
|
|
buildMessage: {},
|
|
|
visible: false,
|
|
|
- currentBuild: {},//当前建筑
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -175,6 +174,7 @@
|
|
|
},
|
|
|
created() {
|
|
|
this.init();
|
|
|
+ this.handleBuildQuery()
|
|
|
},
|
|
|
methods: {
|
|
|
init() {
|
|
@@ -198,7 +198,6 @@
|
|
|
});
|
|
|
this.buildList[index].active = true;
|
|
|
this.curBuildId = this.buildList[index].BuildID;
|
|
|
- this.currentBuild = this.buildList[index]
|
|
|
this.getFloorTableData();
|
|
|
this.$forceUpdate();
|
|
|
},
|
|
@@ -207,6 +206,11 @@
|
|
|
// this.$message.warning("开发中...");
|
|
|
// return;
|
|
|
this.buildTitle = '添加建筑';
|
|
|
+
|
|
|
+ this.$refs.addBuildDialog.showDialog();
|
|
|
+ this.handleSearchBuildKey()
|
|
|
+ },
|
|
|
+ handleSearchBuildKey() {
|
|
|
let params = {
|
|
|
projectId: this.projectId,
|
|
|
data: {
|
|
@@ -248,7 +252,6 @@
|
|
|
this.buildMessage = first
|
|
|
|
|
|
})
|
|
|
- this.$refs.addBuildDialog.showDialog();
|
|
|
},
|
|
|
//delete build ,根据id删除建筑信息
|
|
|
delBuild() {
|
|
@@ -268,18 +271,24 @@
|
|
|
},
|
|
|
//edit build
|
|
|
editBuild() {
|
|
|
- // this.currentType = 'edit';
|
|
|
this.buildTitle = '编辑建筑';
|
|
|
- this.$refs.addBuildDialog.showDialog(this.currentBuild);
|
|
|
+ this.handleSearchBuildKey()
|
|
|
+
|
|
|
+ let list = this.currentBuildList.filter(i => i.BuildID === this.curBuildId)
|
|
|
+ let obj = {}
|
|
|
+ for (let i = 0; i < list.length; i++) {
|
|
|
+ obj = list[i]
|
|
|
+ }
|
|
|
+ this.$refs.addBuildDialog.showDialog(obj);
|
|
|
+
|
|
|
},
|
|
|
// handleBuild 获取建筑信息
|
|
|
handleBuild(val) {
|
|
|
let newform = tools.formatData(val)
|
|
|
- newform.BuildID = this.curBuildId || ''
|
|
|
let Param = {
|
|
|
Content: [newform]
|
|
|
}
|
|
|
- if (newform.curBuildId) {
|
|
|
+ if (newform.BuildID) {
|
|
|
objectUpdateBuild(Param, res => {
|
|
|
this.$message.success('更新成功')
|
|
|
this.$refs.addBuildDialog.closeDialog()
|
|
@@ -366,11 +375,13 @@
|
|
|
},
|
|
|
// 查询建筑信息
|
|
|
handleBuildQuery() {
|
|
|
- let floorParam = {
|
|
|
- projectId: this.projectId
|
|
|
+ let param = {
|
|
|
+ projectId: this.projectId,
|
|
|
+ Orders: "BuildLocalName asc"
|
|
|
};
|
|
|
- objectQueryBuild(floorParam, res => {
|
|
|
+ objectQueryBuild(param, res => {
|
|
|
|
|
|
+ this.currentBuildList = res.Content
|
|
|
});
|
|
|
},
|
|
|
|