From 9940aed62715c924c502a71dca541000e16e26aa Mon Sep 17 00:00:00 2001 From: qushutong <1976590620@qq.com> Date: Fri, 27 Sep 2019 12:04:10 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/user/partymembers.vue | 31 ++++++++++++++++ src/views/modules/user/user.vue | 31 ++++++++++++++++ .../modules/user/usertag-add-or-update.vue | 36 +++++++++++++------ 3 files changed, 88 insertions(+), 10 deletions(-) diff --git a/src/views/modules/user/partymembers.vue b/src/views/modules/user/partymembers.vue index 2642c032..954f5238 100755 --- a/src/views/modules/user/partymembers.vue +++ b/src/views/modules/user/partymembers.vue @@ -305,6 +305,37 @@ export default { return row.registFlag === '1' ? '是' : row.registFlag === '0' ? '否' : '未知' }, importData () { + }, + // 获取数据列表 + getDataList () { + if (this.timeRange === null) { + this.dataForm.startTime = '' + this.dataForm.endTime = '' + } + this.dataListLoading = true + this.$http.get( + this.mixinViewModuleOptions.getDataListURL, + { + params: { + order: this.order, + orderField: this.orderField, + page: this.mixinViewModuleOptions.getDataListIsPage ? this.page : null, + limit: this.mixinViewModuleOptions.getDataListIsPage ? this.limit : null, + ...this.dataForm + } + } + ).then(({ data: res }) => { + this.dataListLoading = false + if (res.code !== 0) { + this.dataList = [] + this.total = 0 + return this.$message.error(res.msg) + } + this.dataList = this.mixinViewModuleOptions.getDataListIsPage ? res.data.list : res.data + this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total : 0 + }).catch(() => { + this.dataListLoading = false + }) } } } diff --git a/src/views/modules/user/user.vue b/src/views/modules/user/user.vue index 47c529ac..54a59d78 100644 --- a/src/views/modules/user/user.vue +++ b/src/views/modules/user/user.vue @@ -431,6 +431,37 @@ export default { this.dataForm.isParty = '' } this.getDataList() + }, + // 获取数据列表 + getDataList () { + if (this.time === null) { + this.dataForm.startTime = '' + this.dataForm.endTime = '' + } + this.dataListLoading = true + this.$http.get( + this.mixinViewModuleOptions.getDataListURL, + { + params: { + order: this.order, + orderField: this.orderField, + page: this.mixinViewModuleOptions.getDataListIsPage ? this.page : null, + limit: this.mixinViewModuleOptions.getDataListIsPage ? this.limit : null, + ...this.dataForm + } + } + ).then(({ data: res }) => { + this.dataListLoading = false + if (res.code !== 0) { + this.dataList = [] + this.total = 0 + return this.$message.error(res.msg) + } + this.dataList = this.mixinViewModuleOptions.getDataListIsPage ? res.data.list : res.data + this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total : 0 + }).catch(() => { + this.dataListLoading = false + }) } }, components: { diff --git a/src/views/modules/user/usertag-add-or-update.vue b/src/views/modules/user/usertag-add-or-update.vue index 32098fa8..6e5ec21d 100755 --- a/src/views/modules/user/usertag-add-or-update.vue +++ b/src/views/modules/user/usertag-add-or-update.vue @@ -1,16 +1,32 @@ @@ -60,7 +76,7 @@ export default { ...this.dataForm, ...res.data } - }).catch(() => {}) + }).catch(() => { }) }, // 表单提交 dataFormSubmitHandle: debounce(function () { @@ -81,7 +97,7 @@ export default { this.$emit('refreshDataList') } }) - }).catch(() => {}) + }).catch(() => { }) }) }, 1000, { 'leading': true, 'trailing': false }) } From 0a6f0f413980b2156c568d02669f4d334289f9c6 Mon Sep 17 00:00:00 2001 From: qushutong <1976590620@qq.com> Date: Fri, 27 Sep 2019 13:55:27 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/user/user-add-or-update.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/modules/user/user-add-or-update.vue b/src/views/modules/user/user-add-or-update.vue index ee829444..c70d6375 100644 --- a/src/views/modules/user/user-add-or-update.vue +++ b/src/views/modules/user/user-add-or-update.vue @@ -186,7 +186,7 @@ export default { return this.$message.error(res.msg) } // 审核通过之后触发发短信 - this.registerResult(this.dataForm.id, this.dataForm.pass) + this.registerResult(this.dataForm.id) this.$message({ message: this.$t('prompt.success'), type: 'success', @@ -199,7 +199,7 @@ export default { }).catch(() => { }) }) }, 1000, { 'leading': true, 'trailing': false }), - registerResult (userId, state) { + registerResult (userId) { this.$http.get(`api/message/sms/registerResult?userId=` + userId + '&state=' + state).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) From ea67739c59deee0714a07b70e9a84106f615ba6e Mon Sep 17 00:00:00 2001 From: qushutong <1976590620@qq.com> Date: Fri, 27 Sep 2019 13:58:15 +0800 Subject: [PATCH 3/3] bug --- src/views/modules/user/user-add-or-update.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/modules/user/user-add-or-update.vue b/src/views/modules/user/user-add-or-update.vue index c70d6375..3e6755f1 100644 --- a/src/views/modules/user/user-add-or-update.vue +++ b/src/views/modules/user/user-add-or-update.vue @@ -200,7 +200,7 @@ export default { }) }, 1000, { 'leading': true, 'trailing': false }), registerResult (userId) { - this.$http.get(`api/message/sms/registerResult?userId=` + userId + '&state=' + state).then(({ data: res }) => { + this.$http.get(`api/message/sms/registerResult?userId=` + userId).then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) }