diff --git a/src/views/modules/news/allnews-add-or-update.vue b/src/views/modules/news/allnews-add-or-update.vue index bbf3e98..79a4969 100644 --- a/src/views/modules/news/allnews-add-or-update.vue +++ b/src/views/modules/news/allnews-add-or-update.vue @@ -100,8 +100,8 @@ export default { street: null, communityId: null, community: null, - gridId: null, - grid: null, + deptId: null, + dept: null, newsCateroryId: '', newsProperty: '', newsTitle: '', @@ -155,7 +155,7 @@ export default { this.getListCategory() this.visible = true this.$nextTick(() => { - this.dataForm.communityId = this.dataForm.streetId = this.dataForm.gridId = null + this.dataForm.communityId = this.dataForm.streetId = this.dataForm.deptId = null // 富文本 this.hideUpload = false this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/oss/file/upload?token=${Cookies.get('token')}` @@ -212,13 +212,13 @@ export default { this.quillEditor.root.innerHTML = res.data.newsContent if (this.dataForm.streetId) { 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) } if (this.dataForm.communityId) { - if (this.dataForm.gridId === 0) { - this.dataForm.gridId = null + if (this.dataForm.deptId === 0) { + this.dataForm.deptId = null } this.getDeptInfoList('grid', this.dataForm.communityId) } @@ -246,20 +246,20 @@ export default { changeStreet (event) { let choosenItem = this.streetList.filter(item => item.id === this.dataForm.streetId)[0] 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.getDeptInfoList('community', event) }, changeCommunity (event) { let choosenItem = this.communityList.filter(item => item.id === this.dataForm.communityId)[0] this.dataForm.community = choosenItem.name - this.dataForm.gridId = this.dataForm.grid = null + this.dataForm.deptId = this.dataForm.dept = null this.gridList = [] this.getDeptInfoList('grid', event) }, changeGrid (event) { - let choosenItem = this.gridList.filter(item => item.id === this.dataForm.gridId)[0] - this.dataForm.grid = choosenItem.name + let choosenItem = this.gridList.filter(item => item.id === this.dataForm.deptId)[0] + this.dataForm.dept = choosenItem.name }, changeCaterory () { // 给新闻类别变量赋值 diff --git a/src/views/modules/news/allnotice.vue b/src/views/modules/news/allnotice.vue index 253427b..47c6990 100644 --- a/src/views/modules/news/allnotice.vue +++ b/src/views/modules/news/allnotice.vue @@ -182,9 +182,9 @@ export default { watch: { 'deptIdList': function (val) { if (val.length !== 0) { - this.dataForm.gridId = val[val.length - 1] + this.dataForm.deptId = val[val.length - 1] } else { - this.dataForm.gridId = '' + this.dataForm.deptId = '' } } }, diff --git a/src/views/modules/news/notice-add-or-update.vue b/src/views/modules/news/notice-add-or-update.vue index ab10df9..a7590fd 100644 --- a/src/views/modules/news/notice-add-or-update.vue +++ b/src/views/modules/news/notice-add-or-update.vue @@ -64,8 +64,8 @@ export default { street: null, communityId: null, community: null, - gridId: null, - grid: null, + deptId: null, + dept: null, noticeTitle: '', noticeContent: '', allDeptIdsShow: [] @@ -164,7 +164,7 @@ export default { init () { this.visible = true 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.hideUpload = false @@ -193,13 +193,13 @@ export default { this.quillEditor.root.innerHTML = res.data.noticeContent if (this.dataForm.streetId) { 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) } if (this.dataForm.communityId) { - if (this.dataForm.gridId === 0) { - this.dataForm.gridId = null + if (this.dataForm.deptId === 0) { + this.dataForm.deptId = null } this.getDeptInfoList('grid', this.dataForm.communityId) } @@ -265,7 +265,7 @@ export default { let choosenItem = this.streetList.filter(item => item.id === this.dataForm.streetId)[0] 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.getDeptInfoList('community', this.dataForm.streetId) @@ -275,7 +275,7 @@ export default { let choosenItem = this.communityList.filter(item => item.id === this.dataForm.communityId)[0] this.dataForm.community = choosenItem.name // 情况网格的变量值 - this.dataForm.gridId = this.dataForm.grid = null + this.dataForm.deptId = this.dataForm.dept = null this.gridList = [] // 获取社区下属网格 this.getDeptInfoList('grid', this.dataForm.communityId) @@ -283,9 +283,9 @@ export default { changeGrid (item) { console.log(item) // 给网格变量赋值 - // let choosenItem = this.gridList.filter(item => item.id === this.dataForm.gridId)[0] - // this.dataForm.grid = choosenItem.name - // this.dataForm = Object.assign(this.dataForm, { gridId: item }) + // let choosenItem = this.gridList.filter(item => item.id === this.dataForm.deptId)[0] + // this.dataForm.dept = choosenItem.name + // this.dataForm = Object.assign(this.dataForm, { deptId: item }) console.log(this.dataForm) }