|
@ -64,8 +64,8 @@ export default { |
|
|
street: null, |
|
|
street: null, |
|
|
communityId: null, |
|
|
communityId: null, |
|
|
community: null, |
|
|
community: null, |
|
|
gridId: null, |
|
|
deptId: null, |
|
|
grid: null, |
|
|
dept: null, |
|
|
noticeTitle: '', |
|
|
noticeTitle: '', |
|
|
noticeContent: '', |
|
|
noticeContent: '', |
|
|
allDeptIdsShow: [] |
|
|
allDeptIdsShow: [] |
|
@ -164,7 +164,7 @@ export default { |
|
|
init () { |
|
|
init () { |
|
|
this.visible = true |
|
|
this.visible = true |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
this.dataForm.communityId = this.dataForm.streetId = this.dataForm.gridId = null |
|
|
this.dataForm.communityId = this.dataForm.streetId = this.dataForm.deptId = null |
|
|
this.communityList = this.gridList = [] |
|
|
this.communityList = this.gridList = [] |
|
|
// 富文本 |
|
|
// 富文本 |
|
|
this.hideUpload = false |
|
|
this.hideUpload = false |
|
@ -193,13 +193,13 @@ export default { |
|
|
this.quillEditor.root.innerHTML = res.data.noticeContent |
|
|
this.quillEditor.root.innerHTML = res.data.noticeContent |
|
|
if (this.dataForm.streetId) { |
|
|
if (this.dataForm.streetId) { |
|
|
if (this.dataForm.communityId === 0) { |
|
|
if (this.dataForm.communityId === 0) { |
|
|
this.dataForm.communityId = this.dataForm.gridId = null |
|
|
this.dataForm.communityId = this.dataForm.deptId = null |
|
|
} |
|
|
} |
|
|
this.getDeptInfoList('community', this.dataForm.streetId) |
|
|
this.getDeptInfoList('community', this.dataForm.streetId) |
|
|
} |
|
|
} |
|
|
if (this.dataForm.communityId) { |
|
|
if (this.dataForm.communityId) { |
|
|
if (this.dataForm.gridId === 0) { |
|
|
if (this.dataForm.deptId === 0) { |
|
|
this.dataForm.gridId = null |
|
|
this.dataForm.deptId = null |
|
|
} |
|
|
} |
|
|
this.getDeptInfoList('grid', this.dataForm.communityId) |
|
|
this.getDeptInfoList('grid', this.dataForm.communityId) |
|
|
} |
|
|
} |
|
@ -265,7 +265,7 @@ export default { |
|
|
let choosenItem = this.streetList.filter(item => item.id === this.dataForm.streetId)[0] |
|
|
let choosenItem = this.streetList.filter(item => item.id === this.dataForm.streetId)[0] |
|
|
this.dataForm.street = choosenItem.name |
|
|
this.dataForm.street = choosenItem.name |
|
|
// 清空社区与网格的变量值 |
|
|
// 清空社区与网格的变量值 |
|
|
this.dataForm.communityId = this.dataForm.gridId = this.dataForm.community = this.dataForm.grid = null |
|
|
this.dataForm.communityId = this.dataForm.deptId = this.dataForm.community = this.dataForm.dept = null |
|
|
this.communityList = this.gridList = [] |
|
|
this.communityList = this.gridList = [] |
|
|
// 获取街道下属社区 |
|
|
// 获取街道下属社区 |
|
|
this.getDeptInfoList('community', this.dataForm.streetId) |
|
|
this.getDeptInfoList('community', this.dataForm.streetId) |
|
@ -275,7 +275,7 @@ export default { |
|
|
let choosenItem = this.communityList.filter(item => item.id === this.dataForm.communityId)[0] |
|
|
let choosenItem = this.communityList.filter(item => item.id === this.dataForm.communityId)[0] |
|
|
this.dataForm.community = choosenItem.name |
|
|
this.dataForm.community = choosenItem.name |
|
|
// 情况网格的变量值 |
|
|
// 情况网格的变量值 |
|
|
this.dataForm.gridId = this.dataForm.grid = null |
|
|
this.dataForm.deptId = this.dataForm.dept = null |
|
|
this.gridList = [] |
|
|
this.gridList = [] |
|
|
// 获取社区下属网格 |
|
|
// 获取社区下属网格 |
|
|
this.getDeptInfoList('grid', this.dataForm.communityId) |
|
|
this.getDeptInfoList('grid', this.dataForm.communityId) |
|
@ -283,9 +283,9 @@ export default { |
|
|
changeGrid (item) { |
|
|
changeGrid (item) { |
|
|
console.log(item) |
|
|
console.log(item) |
|
|
// 给网格变量赋值 |
|
|
// 给网格变量赋值 |
|
|
// let choosenItem = this.gridList.filter(item => item.id === this.dataForm.gridId)[0] |
|
|
// let choosenItem = this.gridList.filter(item => item.id === this.dataForm.deptId)[0] |
|
|
// this.dataForm.grid = choosenItem.name |
|
|
// this.dataForm.dept = choosenItem.name |
|
|
// this.dataForm = Object.assign(this.dataForm, { gridId: item }) |
|
|
// this.dataForm = Object.assign(this.dataForm, { deptId: item }) |
|
|
console.log(this.dataForm) |
|
|
console.log(this.dataForm) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|