From 6783802bb0f69c5d003bcc5680b849abc13a9eab Mon Sep 17 00:00:00 2001 From: yujt Date: Fri, 29 May 2020 17:02:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=B0=E9=97=BB=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E9=A1=B5=E9=9D=A2=EF=BC=9B=E5=85=B6=E4=BB=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/news/allnews.vue | 69 +---- src/views/modules/police/group-detail.vue | 2 +- src/views/modules/police/police.vue | 176 ++++++------ .../property/property-add-or-update.vue | 198 ++++++------- .../propertyproject-add-or-update.vue | 264 +++++++++--------- 5 files changed, 325 insertions(+), 384 deletions(-) diff --git a/src/views/modules/news/allnews.vue b/src/views/modules/news/allnews.vue index e46dbb2..ad751a2 100644 --- a/src/views/modules/news/allnews.vue +++ b/src/views/modules/news/allnews.vue @@ -5,7 +5,7 @@ - + { }) - this.getDeptInfoList('street', localStorage.getItem('street') === null ? '1169154711480528897' : localStorage.getItem('street')) this.getListCategory() }, methods: { @@ -201,58 +194,6 @@ export default { return '已下线' } }, - // 获取部门列表 - getDeptInfoList (dataReceiver, faDeptId) { - this.$http.get(`/sys/dept/sublist/` + faDeptId).then(({ data: res }) => { - if (res.code !== 0) { - return this.$message.error(res.msg) - } - if (dataReceiver === 'street') { - this.streetList = res.data - } else if (dataReceiver === 'community') { - this.communityList = res.data - } else if (dataReceiver === 'grid') { - this.gridList = res.data - } - }).catch(() => { }) - }, - changeStreet (event) { - if (this.dataForm.streetId === '') { - this.communityList = [] - this.gridList = [] - this.dataForm.communityId = '' - this.dataForm.gridId = '' - return - } - this.dataForm.streetId = event - let choosenItem = this.streetList.filter(item => item.id === this.dataForm.streetId)[0] - this.initDeptIdAndName(choosenItem) - this.dataForm.communityId = this.dataForm.gridId = null - this.communityList = this.gridList = [] - this.getDeptInfoList('community', event) - }, - changeCommunity (event) { - if (this.dataForm.communityId === '') { - this.gridList = [] - this.dataForm.gridId = '' - return - } - this.communityId = event - let choosenItem = this.communityList.filter(item => item.id === this.dataForm.communityId)[0] - this.initDeptIdAndName(choosenItem) - this.dataForm.gridId = null - this.gridList = [] - this.getDeptInfoList('grid', event) - }, - changeGrid (event) { - this.dataForm.gridId = event - let choosenItem = this.gridList.filter(item => item.id === this.gridId)[0] - this.initDeptIdAndName(choosenItem) - }, - initDeptIdAndName (choosenItem) { - this.dataForm.dept = choosenItem.name - this.dataForm.deptId = choosenItem.id - }, setRegistTime () { console.log(this.time[0]) this.dataForm.startTime = this.time[0] @@ -349,9 +290,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/police/group-detail.vue b/src/views/modules/police/group-detail.vue index 944a2b1..f05264c 100644 --- a/src/views/modules/police/group-detail.vue +++ b/src/views/modules/police/group-detail.vue @@ -178,7 +178,7 @@ export default { if (res.code !== 0) { return this.$message.error(res.msg) } - if (res.data.resultCode == 1) { + if (res.data.resultCode === 1) { this.$confirm(res.data.resultMessage, '提示', { confirmButtonText: '确定', cancelButtonText: '取消', diff --git a/src/views/modules/police/police.vue b/src/views/modules/police/police.vue index ac5b4d8..a678f68 100644 --- a/src/views/modules/police/police.vue +++ b/src/views/modules/police/police.vue @@ -88,96 +88,96 @@ \ No newline at end of file + diff --git a/src/views/modules/property/property-add-or-update.vue b/src/views/modules/property/property-add-or-update.vue index d717ecd..c73ba3f 100644 --- a/src/views/modules/property/property-add-or-update.vue +++ b/src/views/modules/property/property-add-or-update.vue @@ -24,105 +24,105 @@ diff --git a/src/views/modules/property/propertyproject-add-or-update.vue b/src/views/modules/property/propertyproject-add-or-update.vue index 821d430..b806874 100644 --- a/src/views/modules/property/propertyproject-add-or-update.vue +++ b/src/views/modules/property/propertyproject-add-or-update.vue @@ -45,138 +45,138 @@