From 215e13d19d1ca8d511f2fb758d76cc2b770a31f0 Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Tue, 9 Aug 2022 17:07:09 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/gridScoreDetail.vue | 58 ++++++++-- .../components/gridScoreStatistics.vue | 109 ++++++++++++------ 2 files changed, 119 insertions(+), 48 deletions(-) diff --git a/packages/conv/creditScore/AppGridMemberScore/components/gridScoreDetail.vue b/packages/conv/creditScore/AppGridMemberScore/components/gridScoreDetail.vue index 98533195..7e7e496e 100644 --- a/packages/conv/creditScore/AppGridMemberScore/components/gridScoreDetail.vue +++ b/packages/conv/creditScore/AppGridMemberScore/components/gridScoreDetail.vue @@ -9,11 +9,11 @@

积分余额

-

{{ data.integral }}

+

{{ data.integral || 0 }}

已用积分

-

{{ data.usedIntegral }}

+

{{ data.usedIntegral || 0 }}

@@ -21,7 +21,7 @@

事件汇总

- 时间: + 时间:
@@ -79,8 +79,10 @@ export default { }, page: {current: 1, size: 10, total: 0}, girdList: [], - time: '', + timeList: [], data: {}, + startTime: '', + endTime: '', } }, props: { @@ -88,28 +90,57 @@ export default { dict: Object, permissions: Function, }, + watch: { + timeList(newVal, oldVal) { + if(!newVal) { + // this.getList() + } + } + }, computed: { colConfigs() { return [ - { prop: "", label: '时间', align: "left", width: "200px" }, - { prop: "", label: '类型', align: "center", width: "180px" }, - { prop: "", label: '变动积分', align: "center",width: "200px" }, - { prop: "", label: '剩余积分', align: "center",width: "200px" }, - { prop: "", label: '事件', align: "center", }, + { prop: "doTime", label: '时间', align: "left", width: "200px" }, + { prop: "integralType", label: '类型', align: "center", width: "180px" }, + { prop: "changeIntegral", label: '变动积分', align: "center",width: "200px" }, + { prop: "nowIntegral", label: '剩余积分', align: "center",width: "200px" }, + { prop: "eventDesc", label: '事件', align: "center", }, ] } }, created() { this.getDetail() + this.getIntegralChange() }, methods: { + // 详情 getDetail() { - this.instance.post(`/app/appintegraluser/girdDetail?id=${id}`).then(res=>{ + this.instance.post(`/app/appintegraluser/girdDetail?id`).then(res=>{ if(res?.data) { this.data = res.data } }) }, + // 余额变动明细 + getIntegralChange() { + this.instance.post(`/app/appintegraluser/getChangeDetail`, null, { + param: { + ...this.page, + type: this.type //积分类型 + } + }).then(res => { + if(res?.data) { + this.tableData = res.data.detailList + } + }) + }, + + timeChange() { + if(this.timeList.length) { + this.startTime = this.timeList[0] + this.endTime = this.timeList[1] + } + }, getColEcherts() { let chartDom = document.getElementById('chartDom'); @@ -165,21 +196,28 @@ export default { }, true); window.addEventListener("resize", this.onResize) }, + onResize() { this.myChart.resize() }, + getTableData() {}, + getListInit() {}, + cancel(isRefresh) { this.$emit('change', { type: 'gridScoreManage', isRefresh: !!isRefresh }) } + }, + mounted() { this.getColEcherts() }, + destroyed () { window.removeEventListener('resize', this.onResize) }, diff --git a/packages/conv/creditScore/AppGridMemberScore/components/gridScoreStatistics.vue b/packages/conv/creditScore/AppGridMemberScore/components/gridScoreStatistics.vue index 5278459a..db61df53 100644 --- a/packages/conv/creditScore/AppGridMemberScore/components/gridScoreStatistics.vue +++ b/packages/conv/creditScore/AppGridMemberScore/components/gridScoreStatistics.vue @@ -4,31 +4,26 @@

总体统计

-
{{item}}
- - - - +
+ {{ item }} +
+

剩余积分汇总

-

20

+

{{ data.nowIntegral || 0 }}

发放积分

-

5

+

{{ data.addIntegral || 0 }}

消耗积分

-

0

+

{{ data.reduceIntegral || 0 }}

@@ -50,13 +45,7 @@