|
@@ -945,16 +945,16 @@ export default {
|
|
|
{required: true, message: "行政区不能为空", trigger: "change"}
|
|
|
],
|
|
|
areaId: [
|
|
|
- {required: true, message: "小区id不能为空", trigger: "change"}
|
|
|
+ {required: true, message: "小区不能为空", trigger: "change"}
|
|
|
],
|
|
|
buildingId: [
|
|
|
- {required: true, message: "楼宇id不能为空", trigger: "change"}
|
|
|
+ {required: true, message: "楼宇不能为空", trigger: "change"}
|
|
|
],
|
|
|
unitId: [
|
|
|
- {required: true, message: "单元id不能为空", trigger: "change"}
|
|
|
+ {required: true, message: "单元不能为空", trigger: "change"}
|
|
|
],
|
|
|
houseId: [
|
|
|
- {required: true, message: "房间id不能为空", trigger: "change"}
|
|
|
+ {required: true, message: "房间不能为空", trigger: "change"}
|
|
|
],
|
|
|
enginType: [
|
|
|
{required: true, message: "工程类型不能为空", trigger: "change"}
|
|
@@ -1210,6 +1210,10 @@ export default {
|
|
|
this.queryParams.areaId = null
|
|
|
this.queryParams.buildingId = null
|
|
|
this.queryParams.unitId = null
|
|
|
+ this.communityOptions = [];
|
|
|
+ this.buildingOptions = [];
|
|
|
+ this.unitOptions=[];
|
|
|
+ this.houseOptions=[];
|
|
|
getAreaList({district}).then(res => {
|
|
|
this.communityOptions = res.data
|
|
|
})
|
|
@@ -1218,18 +1222,23 @@ export default {
|
|
|
communityHasChanged(areaId) {
|
|
|
this.queryParams.buildingId = null
|
|
|
this.queryParams.unitId = null
|
|
|
+ this.buildingOptions = [];
|
|
|
+ this.unitOptions=[];
|
|
|
+ this.houseOptions=[];
|
|
|
getBuildingList({areaId}).then(res => {
|
|
|
this.buildingOptions = res.data
|
|
|
})
|
|
|
},
|
|
|
buildingHasChanged(buildingId, areaId) {
|
|
|
- console.log(buildingId)
|
|
|
+ this.unitOptions=[];
|
|
|
+ this.houseOptions=[];
|
|
|
this.queryParams.unitId = null
|
|
|
getUnits(buildingId).then(res => {
|
|
|
this.unitOptions = res.data
|
|
|
})
|
|
|
},
|
|
|
unitHasChanged(unitId) {
|
|
|
+ this.houseOptions=[];
|
|
|
getHousesList({unitId}).then(res => {
|
|
|
console.log(res)
|
|
|
this.houseOptions = res.data
|
|
@@ -1376,24 +1385,26 @@ export default {
|
|
|
// 收集节点信息
|
|
|
this.currentCheckList.forEach((e, idx) => {
|
|
|
let nodeItem = this.$refs['EnginNodeInfo' + idx][0].infoCollection()
|
|
|
- // console.log(nodeItem)
|
|
|
nodeCollection.push(nodeItem)
|
|
|
})
|
|
|
this.queryParams.zEngineeringNodeBoList = nodeCollection
|
|
|
if (this.enginNodeStatus == '修改') {
|
|
|
- putEngineeringCivil(this.queryParams).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message({
|
|
|
- message: '添加成功',
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- this.open = false
|
|
|
- console.log('选中节点集合', this.currentCheckList)
|
|
|
- this.currentCheckList = []
|
|
|
- this.getList()
|
|
|
- // this.$emit('closeToSucceed')
|
|
|
- }
|
|
|
- })
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ putEngineeringCivil(this.queryParams).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message({
|
|
|
+ message: '添加成功',
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ this.open = false
|
|
|
+ console.log('选中节点集合', this.currentCheckList)
|
|
|
+ this.currentCheckList = []
|
|
|
+ this.getList()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
} else if (this.enginNodeStatus == '添加用料') {
|
|
|
addEngineeringCivil(this.queryParams).then(res => {
|
|
|
if (res.code == 200) {
|
|
@@ -1405,7 +1416,6 @@ export default {
|
|
|
console.log('选中节点集合', this.currentCheckList)
|
|
|
this.currentCheckList = []
|
|
|
this.getList()
|
|
|
- // this.$emit('closeToSucceed')
|
|
|
}
|
|
|
})
|
|
|
} else if (this.enginNodeStatus == '添加用料') {
|
|
@@ -1418,24 +1428,26 @@ export default {
|
|
|
this.open = false
|
|
|
console.log('选中节点集合', this.currentCheckList)
|
|
|
this.currentCheckList = []
|
|
|
- // this.$emit('closeToSucceed')
|
|
|
}
|
|
|
})
|
|
|
} else {
|
|
|
- addEngineeringCivil(this.queryParams).then(res => {
|
|
|
- if (res.code == 200) {
|
|
|
- this.$message({
|
|
|
- message: '新增成功',
|
|
|
- type: 'success'
|
|
|
- });
|
|
|
- this.open = false
|
|
|
- console.log('选中节点集合', this.currentCheckList)
|
|
|
- this.currentCheckList = []
|
|
|
- // this.$emit('closeToSucceed')
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ addEngineeringCivil(this.queryParams).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.$message({
|
|
|
+ message: '新增成功',
|
|
|
+ type: 'success'
|
|
|
+ });
|
|
|
+ this.open = false
|
|
|
+ console.log('选中节点集合', this.currentCheckList)
|
|
|
+ this.currentCheckList = []
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
}
|
|
|
-
|
|
|
+ this.getList();
|
|
|
return
|
|
|
getDictList({enginType: ['new_built', 'old_renovation']}).then(res => {
|
|
|
this.nodeList = res.data
|