|
|
@ -414,21 +414,32 @@ export default { |
|
|
this.formData.agencyId = val.length ? val[val.length - 1] : val[0]; |
|
|
this.formData.agencyId = val.length ? val[val.length - 1] : val[0]; |
|
|
}, |
|
|
}, |
|
|
getOrgTreeList() { |
|
|
getOrgTreeList() { |
|
|
this.$http |
|
|
this.$http |
|
|
.post('/gov/org/customeragency/agencygridtree', {}) |
|
|
.post('/gov/org/customeragency/agencygridtree', {}) |
|
|
.then(({ data: res }) => { |
|
|
.then(({ data: res }) => { |
|
|
if (res.code !== 0) { |
|
|
if (res.code !== 0) { |
|
|
return this.$message.error(res.msg) |
|
|
return this.$message.error(res.msg) |
|
|
} else { |
|
|
} else { |
|
|
console.log('获取组织树成功', res.data) |
|
|
console.log('获取组织树成功', res.data) |
|
|
this.orgOptions = [] |
|
|
// this.orgOptions = [] |
|
|
this.orgOptions.push(res.data) |
|
|
// this.orgOptions.push(res.data) |
|
|
} |
|
|
const filteredData = { |
|
|
}) |
|
|
...res.data, |
|
|
.catch(() => { |
|
|
subAgencyList: res.data.subAgencyList.filter(item => ["district", "street", "community"].includes(item.level)) |
|
|
return this.$message.error('网络错误') |
|
|
}; |
|
|
}) |
|
|
this.orgOptions = [] |
|
|
}, |
|
|
this.orgOptions.push(filteredData) |
|
|
|
|
|
filteredData.subAgencyList.forEach(item => { |
|
|
|
|
|
console.log(item.level); |
|
|
|
|
|
}); |
|
|
|
|
|
console.log('获取组织树成功111', this.orgOptions) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
|
.catch(() => { |
|
|
|
|
|
return this.$message.error('网络错误') |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
addInput() { |
|
|
addInput() { |
|
|
if (this.inputList.some(item => item.hazardDesc.trim() === '')) { |
|
|
if (this.inputList.some(item => item.hazardDesc.trim() === '')) { |
|
|
} else { |
|
|
} else { |
|
|
|