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 @@
@@ -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 @@
-
-
+
{
+ console.log(res);
+ })
+ },
getColEcherts1() {
let chartDom1 = document.getElementById('chart1');
chartDom1.style.width = (window.innerWidth - 435) / 2 + "px";
@@ -315,20 +329,45 @@ export default {
onResize2() {
this.myChart2.resize()
},
- getListInit() {},
+ gridChange(val) {
+ console.log(val);
+ },
+
+ getGridList() {
+ this.instance.post(`/app/appgirdinfo/listAll`).then((res) => {
+ if (res.code == 0) {
+ this.girdOptions = this.formatTree(res.data)
+ }
+ })
+ },
+
+ formatTree(data) {
+ for (var i = 0; i < data.length; i++){
+ if(data[i].girdList.length < 1) {
+ data[i].girdList = undefined
+ } else {
+ this.formatTree(data[i].girdList)
+ }
+ }
+ return data
+ },
+
getTableData() {},
timeChange(index) {
if(index == 3) {
this.dialogDate = true
+ this.type = index
} else {
- this.currrntTime = index
+ this.type = index
}
},
+
open(id) {
this.dialog = true
this.getDetail(id)
},
+
getDetail(id) {
},
@@ -337,30 +376,24 @@ export default {
if(!this.timeList || !this.timeList.length) {
return this.$message.error('请选择自定义时间');
}
-
- if(this.isEffectTimeSelect) { //宣发效果
- this.timeListEffect = this.timeList
- this.effectType = 3
- // this.getEffect()
- } else { //宣发明细
- this.timeListDepart = this.timeList
- this.departType = 3
- // this.getDepart()
- }
+ this.startTime = this.timeList?.[0]
+ this.endTime = this.timeList?.[1]
this.dialogDate = false
+ this.getStatistics()
},
-
},
+
mounted() {
this.getColEcherts1()
this.getColEcherts2()
},
+
destroyed () {
window.removeEventListener('resize', this.onResize1)
window.removeEventListener('resize', this.onResize2)
},
-
+
}
From c6f3552c5639af7772175b50613915f87e045541 Mon Sep 17 00:00:00 2001
From: shijingjing <1789544664@qq.com>
Date: Tue, 9 Aug 2022 17:39:20 +0800
Subject: [PATCH 2/2] no message
---
.../AppGridMemberScore/components/gridScoreStatistics.vue | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/packages/conv/creditScore/AppGridMemberScore/components/gridScoreStatistics.vue b/packages/conv/creditScore/AppGridMemberScore/components/gridScoreStatistics.vue
index db61df53..77173969 100644
--- a/packages/conv/creditScore/AppGridMemberScore/components/gridScoreStatistics.vue
+++ b/packages/conv/creditScore/AppGridMemberScore/components/gridScoreStatistics.vue
@@ -330,7 +330,8 @@ export default {
this.myChart2.resize()
},
gridChange(val) {
- console.log(val);
+ this.girdId = val?.[val.length - 1]
+ this.$refs.cascader1.dropDownVisible = false;
},
getGridList() {