diff --git a/src/views/modules/group/group.vue b/src/views/modules/group/group.vue index 389dd5f8..73d26634 100644 --- a/src/views/modules/group/group.vue +++ b/src/views/modules/group/group.vue @@ -1,13 +1,20 @@ @@ -107,14 +159,14 @@ export default { }, watch: { 'ids': function (val) { - if (val.length === 1){ + if (val.length === 1) { this.dataForm.streetId = this.ids[0] } - if (val.length === 2){ + if (val.length === 2) { this.dataForm.streetId = this.ids[0] this.dataForm.communityId = this.ids[1] } - if (val.length === 3){ + if (val.length === 3) { this.dataForm.streetId = this.ids[0] this.dataForm.communityId = this.ids[1] this.dataForm.gridId = this.ids[2] @@ -145,8 +197,7 @@ export default { ban (id) { this.postForm.state = 15 this.postForm.id = id - this.$http['post']( - '/group/group/operate', this.postForm).then(({ data: res }) => { + this.$http['post']('/group/group/operate', this.postForm).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) } @@ -156,13 +207,12 @@ export default { type: 'success', duration: 500 }) - }).catch(() => {}) + }).catch(() => { }) }, liftTheBan (id) { this.postForm.state = 10 this.postForm.id = id - this.$http['post']( - '/group/group/operate', this.postForm).then(({ data: res }) => { + this.$http['post']('/group/group/operate', this.postForm).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) } @@ -172,13 +222,12 @@ export default { type: 'success', duration: 500 }) - }).catch(() => {}) + }).catch(() => { }) }, disband (id) { this.postForm.state = 20 this.postForm.id = id - this.$http['post']( - '/group/group/operate', this.postForm).then(({ data: res }) => { + this.$http['post']('/group/group/operate', this.postForm).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) } @@ -188,7 +237,7 @@ export default { type: 'success', duration: 500 }) - }).catch(() => {}) + }).catch(() => { }) }, look (id) { this.groupDetailVisible = true @@ -210,7 +259,7 @@ export default { return this.$message.error(res.msg) } this.options = res.data.options - }).catch(() => {}) + }).catch(() => { }) } } } diff --git a/src/views/modules/user/partymembers-add-or-update.vue b/src/views/modules/user/partymembers-add-or-update.vue index 5ca185da..0ad70266 100755 --- a/src/views/modules/user/partymembers-add-or-update.vue +++ b/src/views/modules/user/partymembers-add-or-update.vue @@ -23,7 +23,7 @@ - + --> + + - + + - + { this.$refs['dataForm'].resetFields() if (this.dataForm.id) { this.getInfo() + } else { + this.dataForm.allDeptIds = [] + this.dataForm.cadreFlag = [] } }) }, + getByLoginUser () { + this.$http + .get(`/sys/user/deptOptions/getByLoginUser`) + .then(({ data: res }) => { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.options = res.data.options + }) + .catch(() => { }) + }, getTagOptions () { this.$http.get(`/app-user/usertag/list`).then(({ data: res }) => { if (res.code !== 0) { @@ -166,37 +177,37 @@ export default { this.tagOptions = res.data }).catch(() => { }) }, - getStreetList () { - this.$http.get(`/sys/dept/sublist/` + (localStorage.getItem('street') === null ? '1169154711480528897' : localStorage.getItem('street'))).then(({ data: res }) => { - if (res.code !== 0) { - return this.$message.error(res.msg) - } - this.streetOptions = res.data - }).catch(() => { }) - }, - getCommunityList () { - let choosenItem = this.streetOptions.filter(item => item.id === this.dataForm.streetId)[0] - this.dataForm.streetName = choosenItem.name - this.dataForm.communityId = '' - this.dataForm.gridId = '' - this.$http.get(`/sys/dept/sublist/` + this.dataForm.streetId).then(({ data: res }) => { - if (res.code !== 0) { - return this.$message.error(res.msg) - } - this.communityOptions = res.data - }).catch(() => { }) - }, - getGridList () { - let choosenItem = this.communityOptions.filter(item => item.id === this.dataForm.communityId)[0] - this.dataForm.communityName = choosenItem.name - this.dataForm.gridId = '' - this.$http.get(`/sys/dept/sublist/` + this.dataForm.communityId).then(({ data: res }) => { - if (res.code !== 0) { - return this.$message.error(res.msg) - } - this.gridOptions = res.data - }).catch(() => { }) - }, + // getStreetList () { + // this.$http.get(`/sys/dept/sublist/` + (localStorage.getItem('street') === null ? '1169154711480528897' : localStorage.getItem('street'))).then(({ data: res }) => { + // if (res.code !== 0) { + // return this.$message.error(res.msg) + // } + // this.streetOptions = res.data + // }).catch(() => { }) + // }, + // getCommunityList () { + // let choosenItem = this.streetOptions.filter(item => item.id === this.dataForm.streetId)[0] + // this.dataForm.streetName = choosenItem.name + // this.dataForm.communityId = '' + // this.dataForm.gridId = '' + // this.$http.get(`/sys/dept/sublist/` + this.dataForm.streetId).then(({ data: res }) => { + // if (res.code !== 0) { + // return this.$message.error(res.msg) + // } + // this.communityOptions = res.data + // }).catch(() => { }) + // }, + // getGridList () { + // let choosenItem = this.communityOptions.filter(item => item.id === this.dataForm.communityId)[0] + // this.dataForm.communityName = choosenItem.name + // this.dataForm.gridId = '' + // this.$http.get(`/sys/dept/sublist/` + this.dataForm.communityId).then(({ data: res }) => { + // if (res.code !== 0) { + // return this.$message.error(res.msg) + // } + // this.gridOptions = res.data + // }).catch(() => { }) + // }, evaluation () { let choosenItem = this.gridOptions.filter(item => item.id === this.dataForm.gridId)[0] this.dataForm.gridName = choosenItem.name @@ -212,18 +223,18 @@ export default { ...res.data } this.dataForm.tagIds = res.data.tagIdsNew - this.$http.get(`/sys/dept/sublist/` + this.dataForm.streetId).then(({ data: res }) => { - if (res.code !== 0) { - return this.$message.error(res.msg) - } - this.communityOptions = res.data - }).catch(() => { }) - this.$http.get(`/sys/dept/sublist/` + this.dataForm.communityId).then(({ data: res }) => { - if (res.code !== 0) { - return this.$message.error(res.msg) - } - this.gridOptions = res.data - }).catch(() => { }) + // this.$http.get(`/sys/dept/sublist/` + this.dataForm.streetId).then(({ data: res }) => { + // if (res.code !== 0) { + // return this.$message.error(res.msg) + // } + // this.communityOptions = res.data + // }).catch(() => { }) + // this.$http.get(`/sys/dept/sublist/` + this.dataForm.communityId).then(({ data: res }) => { + // if (res.code !== 0) { + // return this.$message.error(res.msg) + // } + // this.gridOptions = res.data + // }).catch(() => { }) }).catch(() => { }) }, // 表单提交 diff --git a/src/views/modules/user/partymembers.vue b/src/views/modules/user/partymembers.vue index e8c72cbb..e6502126 100755 --- a/src/views/modules/user/partymembers.vue +++ b/src/views/modules/user/partymembers.vue @@ -5,7 +5,14 @@ - + + + + + - - - + { + if (res.code !== 0) { + return this.$message.error(res.msg) + } + this.options = res.data.options + }) + .catch(() => { }) + // this.getStreetList() this.getRegistOptions() - this.getPostOptions() + // this.getPostOptions() this.uploadUrl = `${window.SITE_CONFIG['apiURL']}/app-user/partymembers/importExcel?token=${Cookies.get('token')}` }, methods: { @@ -286,14 +318,14 @@ export default { this.dataForm.startTime = this.timeRange[0] this.dataForm.endTime = this.timeRange[1] }, - getStreetList () { - this.$http.get(`/sys/dept/sublist/` + (localStorage.getItem('street') === null ? '1169154711480528897' : localStorage.getItem('street'))).then(({ data: res }) => { - if (res.code !== 0) { - return this.$message.error(res.msg) - } - this.streetOptions = res.data - }).catch(() => { }) - }, + // getStreetList () { + // this.$http.get(`/sys/dept/sublist/` + (localStorage.getItem('street') === null ? '1169154711480528897' : localStorage.getItem('street'))).then(({ data: res }) => { + // if (res.code !== 0) { + // return this.$message.error(res.msg) + // } + // this.streetOptions = res.data + // }).catch(() => { }) + // }, getCommunityList () { if (this.dataForm.streetId === '') { this.communityOptions = [] @@ -333,14 +365,14 @@ export default { this.registOptions = res.data }).catch(() => { }) }, - getPostOptions () { - this.$http.get(`/sys/dict/sublist/1168770417290366977`).then(({ data: res }) => { - if (res.code !== 0) { - return this.$message.error(res.msg) - } - this.postOptions = res.data - }).catch(() => { }) - }, + // getPostOptions () { + // this.$http.get(`/sys/dict/sublist/1168770417290366977`).then(({ data: res }) => { + // if (res.code !== 0) { + // return this.$message.error(res.msg) + // } + // this.postOptions = res.data + // }).catch(() => { }) + // }, formatCadre: function (row, column) { return row.cadreFlag === '1' ? '是' : row.cadreFlag === '0' ? '否' : '未知' },