From bd2e072d58d598a874d90fd2976434d84eb03e97 Mon Sep 17 00:00:00 2001 From: zhangyongzhangyong <2012005003@qq.coom> Date: Tue, 12 May 2020 16:18:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BF=97=E6=84=BF=E8=80=85=E7=AE=A1=E7=90=86-?= =?UTF-8?q?=E7=A7=AF=E5=88=86=E8=AE=B0=E5=BD=95=E9=A1=B5=E9=9D=A2=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/points/volunteer-points-log.vue | 38 +++++++------------ .../modules/user/volunteerinfo-check.vue | 2 +- src/views/modules/user/volunteerinfo.vue | 9 ++--- 3 files changed, 18 insertions(+), 31 deletions(-) diff --git a/src/views/modules/points/volunteer-points-log.vue b/src/views/modules/points/volunteer-points-log.vue index 5687e09..b5d5806 100644 --- a/src/views/modules/points/volunteer-points-log.vue +++ b/src/views/modules/points/volunteer-points-log.vue @@ -7,12 +7,12 @@ > - + + :key="item.behaviorCode" + :label="item.behaviorDesc" + :value="item.behaviorCode"> @@ -20,8 +20,8 @@ - - + + @@ -51,7 +51,7 @@ export default { }, visible: false, dataForm: { - volunteerId: '', + userId: '', behaviorCode: '' }, behaviorTypeList: [], @@ -67,7 +67,7 @@ export default { this.visible = true this.$nextTick(() => { this.$refs['dataForm'].resetFields() - if (this.dataForm.volunteerId) { + if (this.dataForm.userId) { this.getDataList() } }) @@ -86,17 +86,16 @@ export default { .catch(() => {}) }, showOperationTypeFormatter: function (row, column) { - if (row.operationType) { - let dict = this.operationTypeList.filter(item => item.dictValue === row.operationType)[0] - if (dict) { - return dict.dictName - } + if (row.operationType === '0') { + return '减积分' + } + if (row.operationType === '1') { + return '加积分' } - return '' }, getBehaviorTypeList () { this.$http - .get(`/sys/dict/listSimple/pointsrule_behavior`) + .get(`/points/pointsbehavior/getBehaviorDesc`) .then(({ data: res }) => { if (res.code !== 0) { return this.$message.error(res.msg) @@ -105,15 +104,6 @@ export default { }) .catch(() => {}) }, - showBehaviorCodeFormatter: function (row, column) { - if (row.behaviorCode) { - let dict = this.behaviorTypeList.filter(item => item.dictValue === row.behaviorCode)[0] - if (dict) { - return dict.dictName - } - } - return '' - }, queryByBehaviorCode () { this.getDataList() } diff --git a/src/views/modules/user/volunteerinfo-check.vue b/src/views/modules/user/volunteerinfo-check.vue index fea42c7..ef1e234 100644 --- a/src/views/modules/user/volunteerinfo-check.vue +++ b/src/views/modules/user/volunteerinfo-check.vue @@ -8,7 +8,7 @@ ref="dataForm" v-if="clickStatus === 1" @keyup.enter.native="dataFormSubmitHandle()" - :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'"> + :label-width="$i18n.locale === 'en-US' ? '140px' : '120px'"> @@ -236,10 +233,10 @@ export default { }) }, // 积分记录 - pointsLogs (id) { + pointsLogs (userId) { this.volunteerPointsLogVisible = true this.$nextTick(() => { - this.$refs.volunteerPointsLog.dataForm.volunteerId = id + this.$refs.volunteerPointsLog.dataForm.userId = userId this.$refs.volunteerPointsLog.init() }) },