diff --git a/packages/conv/creditScore/AppGridMemberScore/components/gridScoreDetail.vue b/packages/conv/creditScore/AppGridMemberScore/components/gridScoreDetail.vue index c08274d1..7bc959a9 100644 --- a/packages/conv/creditScore/AppGridMemberScore/components/gridScoreDetail.vue +++ b/packages/conv/creditScore/AppGridMemberScore/components/gridScoreDetail.vue @@ -17,7 +17,7 @@ - + @@ -64,10 +70,8 @@ export default { name: '', girdId: '', type: '', - }, - page: { - current: 1, - size: 10, + current: 1, + size: 10, total: 0 }, girdList: [], @@ -75,7 +79,6 @@ export default { data: {}, startTime: '', endTime: '', - } }, props: { @@ -83,28 +86,22 @@ export default { dict: Object, permissions: Function, }, - watch: { - timeList(newVal, oldVal) { - if(!newVal) { - // this.getList() - } - } - }, + computed: { colConfigs() { return [ { prop: "doTime", label: '时间', align: "left", width: "200px" }, - { prop: "integralType", label: '类型', align: "center", width: "180px", dict:"integralDetailType"}, + { prop: "integralType", label: '类型', align: "center", width: "240px", dict:"integralType"}, { prop: "changeIntegral", label: '变动积分', align: "center",width: "200px",render: (h, { row }) => { return h('span', {}, `${row.integralCalcType == 1 ? '+' : '-'}${row.changeIntegral}`) }}, { prop: "nowIntegral", label: '剩余积分', align: "center",width: "200px" }, - { prop: "eventDesc", label: '事件', align: "center", }, + { slot: "eventDesc", label: '事件', align: "center", }, ] } }, created() { - this.$dict.load('integralDetailType') + this.$dict.load('integralType') this.getDetail() this.getIntegralChange() }, @@ -124,12 +121,12 @@ export default { // 事件汇总 暂定 + // 余额变动明细 getIntegralChange() { this.instance.post(`/app/appintegraluser/getChangeDetail`, null, { params: { - ...this.page, - type: this.search.type, //积分类型 + ...this.search, //积分类型 id: this.$route.query.id, } }).then(res => { @@ -205,10 +202,6 @@ export default { this.myChart.resize() }, - getTableData() {}, - - getListInit() {}, - cancel(isRefresh) { this.$emit('change', { type: 'gridScoreManage', @@ -219,7 +212,7 @@ export default { }, mounted() { - // this.getColEcherts() + this.getColEcherts() }, destroyed () { @@ -234,6 +227,7 @@ export default { height: 100%; padding: 0 20px; box-sizing: border-box; + overflow-y: scroll; .card_list { display: flex; .card { diff --git a/packages/conv/creditScore/AppGridMemberScore/components/gridScoreManage.vue b/packages/conv/creditScore/AppGridMemberScore/components/gridScoreManage.vue index ec126b84..e8a88d81 100644 --- a/packages/conv/creditScore/AppGridMemberScore/components/gridScoreManage.vue +++ b/packages/conv/creditScore/AppGridMemberScore/components/gridScoreManage.vue @@ -12,7 +12,7 @@ - 导出 @@ -96,6 +96,8 @@ export default { search: { userName: '', girdId: '', + current: 1, + size: 10, }, tableData: [], page: {current: 1, size: 10, total: 0}, @@ -116,7 +118,6 @@ export default { label: 'girdName', value: 'id', checkStrictly: true, - expandTrigger: 'hover', }, } }, diff --git a/packages/conv/creditScore/AppGridMemberScore/components/gridScoreRules.vue b/packages/conv/creditScore/AppGridMemberScore/components/gridScoreRules.vue index bdcda121..a3fd18e7 100644 --- a/packages/conv/creditScore/AppGridMemberScore/components/gridScoreRules.vue +++ b/packages/conv/creditScore/AppGridMemberScore/components/gridScoreRules.vue @@ -39,12 +39,12 @@ @@ -120,9 +120,8 @@ export default { {prop: "type", label: "类型", dict: "integralRuleEventType"}, {prop: "ruleType", label: "规则", dict: "integralRuleRuleType"}, {prop: "scoringCycle", label: "周期范围", dict: "integralRuleScoringCycle"}, - // {prop: "", label: "积分分值", dict: "integralRuleScoringCycle"}, {slot: "integral",label: "积分分值", align: "center"}, - {prop: "", label: "有效范围", dict: "integralRuleScoringCycle"}, + {prop: "validRangeType", label: "有效范围", dict: "integralRuleScoringCycle"}, {prop: "status", label: "状态", align: "center", width: 96, dict: "integralRuleStatus"}, {slot: "options", label: "操作", align: "center"}, ], @@ -145,7 +144,7 @@ export default { }, methods: { getList() { - this.instance.post(`/app/appvillagerintegralrule/list`, null, { + this.instance.post(`/app/appintegralrule/list`, null, { params: {...this.search, ...this.page}, }).then(res => { if (res?.data) { @@ -176,11 +175,9 @@ export default { this.$confirm("删除后不可恢复,是否要删除该事项?", { type: 'error' }).then(() => { - this.instance - .post(`/app/appvillagerintegralrule/delete?ids=${id}`) - .then((res) => { + this.instance.post(`/app/appintegralrule/delete?ids=${id}`).then((res) => { if (res.code == 0) { - this.$message.success("删除成功!"); + this.$message.success("删除成功!") this.getList(); } }); @@ -189,7 +186,7 @@ export default { changeStatus(id, status) { let text = status == 1 ? '启用' : '停用' this.$confirm(`确定${text}该条规则?`).then(() => { - this.instance.post(`/app/appvillagerintegralrule/enableOrDisable?id=${id}`).then((res) => { + this.instance.post(`/app/appintegralrule/enableStatus?id=${id}`).then((res) => { if (res.code == 0) { this.$message.success(`${text}成功!`) this.getList(); @@ -213,7 +210,7 @@ export default { let formData = this.$copy(this.form) formData.ladderRule = JSON.stringify(formData.ladderRule) formData.integral = formData.integral || 0 - this.instance.post(`/app/appvillagerintegralrule/addOrUpdate`, formData).then((res) => { + this.instance.post(`/app/appintegralrule/addOrUpdate`, formData).then((res) => { if (res.code == 0) { this.$message.success(`${this.isEdit ? '编辑成功' : '添加成功'}`) this.onReset() diff --git a/packages/conv/creditScore/AppGridMemberScore/components/gridScoreStatistics.vue b/packages/conv/creditScore/AppGridMemberScore/components/gridScoreStatistics.vue index 235294ef..c0a775b7 100644 --- a/packages/conv/creditScore/AppGridMemberScore/components/gridScoreStatistics.vue +++ b/packages/conv/creditScore/AppGridMemberScore/components/gridScoreStatistics.vue @@ -35,12 +35,18 @@
-
- +

个人积分排行

+
+
+ +
-
- +

网格积分排行

+
+
+ +
@@ -51,14 +57,16 @@ @@ -121,23 +129,25 @@ export default { }, data() { return { - name: "积分统计", myChart1: null, myChart2: null, tableData: [], search: { current: 1, - name: '', - girdId: '' + userName: '', + girdId: '', + integralType: '', + startTime: '', + endTime: '', }, page: {current: 1, size: 10,total: 0,}, girdList: [], - time: '', + time: [], timeCheck: ['昨日','近7天','近30天','自定义'], dialog: false, dialogDate: false, - timeList: '', - type: '0', + timeList: [], + type: '1', startTime: '', endTime: '', data: {}, @@ -147,13 +157,13 @@ export default { label: 'girdName', value: 'id', checkStrictly: true, - expandTrigger: 'hover', }, details: {}, fileDownLoad: [], - girdSortList: [], - userSortList: [], - + userSortListX: [], + userSortListY: [], + girdSortListX: [], + girdSortListY: [], } }, computed: { @@ -163,7 +173,7 @@ export default { { prop: "integralUserName", label: '姓名', align: "left", width: "200px" }, { prop: "girdName", label: '所属网格', align: "center", width: "180px" }, { prop: "eventDesc", label: '事件', align: "center",width: "200px" }, - { prop: "integralType", label: '类型', align: "center",width: "200px", dict:"integralDetailType" }, + { prop: "integralType", label: '类型', align: "center",width: "200px", dict:"integralType" }, // render: (h, {row}) => { // return h('span', { // style: { @@ -179,11 +189,12 @@ export default { } }, created() { - this.$dict.load('epidemicDangerousAreaLevel') - this.getStatistics() - this.getGridList() - this.getRanking() - this.getTableData() + this.$dict.load('epidemicDangerousAreaLevel','integralType').then(() => { + this.getStatistics() + this.getGridList() + this.getRanking() + this.getTableData() + }) }, methods: { // 统计接口 @@ -212,9 +223,14 @@ export default { endTime: this.endTime } }).then((res) => { - console.log(res, '积分排行'); - this.userSortList = res.data.userSortList - this.girdSortList = res.data.girdSortList + if(res?.data) { + this.userSortListX = res.data.userSortList.map(e=> e.userName).reverse() + this.userSortListY = res.data.userSortList.map(e=> e.changeIntegral).reverse() + this.girdSortListX = res.data.girdSortList.map(e=> e.girdName).reverse() + this.girdSortListY = res.data.girdSortList.map(e=> e.changeIntegral).reverse() + this.getColEcherts1(this.userSortListX,this.userSortListY) + this.getColEcherts2(this.girdSortListX,this.girdSortListY) + } }) }, // 积分明细 @@ -223,9 +239,6 @@ export default { params: { ...this.page, ...this.search, - integralType: this.integralType, - startTime: this.startTime, - endTime: this.endTime, } }).then(res => { if(res?.data) { @@ -235,21 +248,17 @@ export default { }) }, - gridChangeOpt() { + gridChangeOpt(val) { this.search.girdId = val?.[val.length - 1] this.$refs.cascader2.dropDownVisible = false; this.getTableData() }, - getColEcherts1() { + getColEcherts1(xData,yData) { let chartDom1 = document.getElementById('chart1'); chartDom1.style.width = (window.innerWidth - 435) / 2 + "px"; this.myChart1 = echarts.init(chartDom1); this.myChart1.setOption({ - - title: { - text: '个人积分排行' - }, tooltip: { trigger: 'axis', axisPointer: { @@ -260,7 +269,7 @@ export default { left: '16px', right: '28px', bottom: '14px', - top: '50px', + top: '16px', containLabel: true }, xAxis: { @@ -269,7 +278,7 @@ export default { }, yAxis: { type: 'category', - data: ['Brazil', 'Indonesia', 'India', 'China', 'World'], + data: xData, axisTick: { show: false, }, @@ -280,7 +289,7 @@ export default { series: [ { - data: [120, 200, 150, 80, 70,], + data: yData, type: 'bar', itemStyle: { normal: { @@ -302,14 +311,11 @@ export default { }, true); window.addEventListener("resize", this.onResize) }, - getColEcherts2() { + getColEcherts2(xData,yData) { let chartDom2 = document.getElementById('chart2'); chartDom2.style.width = (window.innerWidth - 435) / 2 + "px"; this.myChart2 = echarts.init(chartDom2); this.myChart2.setOption({ - title: { - text: '网格积分排行' - }, tooltip: { trigger: 'axis', axisPointer: { @@ -320,7 +326,7 @@ export default { left: '16px', right: '28px', bottom: '14px', - top: '50px', + top: '16px', containLabel: true }, xAxis: { @@ -329,7 +335,7 @@ export default { }, yAxis: { type: 'category', - data: ['Brazil', 'Indonesia', 'India', 'China', 'World'], + data: xData, axisTick: { show: false, }, @@ -339,7 +345,7 @@ export default { }, series: [ { - data: [120, 200, 150, 80, 70,], + data: yData, type: 'bar', itemStyle: { normal: { @@ -373,7 +379,7 @@ export default { this.getStatistics() this.getRanking() }, - + // 所有网格 getGridList() { this.instance.post(`/app/appgirdinfo/listAll3`).then((res) => { if (res.code == 0) { @@ -417,6 +423,12 @@ export default { this.getDetail(id) }, + onChange(val) { + this.search.startTime = val?.[0] + this.search.endTime = val?.[1] + this.getTableData() + }, + getDetail(id) { this.instance.post(`/app/appintegraldetail/queryDetailById?id=${id}`).then(res=> { if(res?.data) { @@ -436,6 +448,7 @@ export default { this.endTime = this.timeList?.[1] this.dialogDate = false this.getStatistics() + this.getRanking() }, }, @@ -455,7 +468,6 @@ export default {