From 2ad61a7f7f91c5a7626306418b0c41801f75fd5f Mon Sep 17 00:00:00 2001 From: zhouhefeng Date: Tue, 23 Dec 2025 10:15:44 +0800 Subject: [PATCH] commit --- .../dayofficework/careData/staff/index.html | 88 ++++++++----------- 1 file changed, 37 insertions(+), 51 deletions(-) diff --git a/src/main/resources/views/platform/zhgh/dayofficework/careData/staff/index.html b/src/main/resources/views/platform/zhgh/dayofficework/careData/staff/index.html index bb713f8..99e6352 100644 --- a/src/main/resources/views/platform/zhgh/dayofficework/careData/staff/index.html +++ b/src/main/resources/views/platform/zhgh/dayofficework/careData/staff/index.html @@ -154,18 +154,18 @@ layout("/layouts/platform.html"){ 职工慰问申请数 - + 困难帮扶申请数 - + 子女入学登记数 - + 撰写提案数 - - 参与活动数 - + 经费报销次数 @@ -176,24 +176,24 @@ layout("/layouts/platform.html"){ 今年 - + {{numData.now_year.zgww?numData.now_year.zgww:0}} - + {{numData.now_year.knbf?numData.now_year.knbf:0}} - + {{numData.now_year.znrx?numData.now_year.znrx:0}} {{numData.now_year.ta?numData.now_year.ta:0}} - - {{numData.now_year.hd?numData.now_year.hd:0}} - + {{numData.now_year.jfbx?numData.now_year.jfbx:0}} @@ -204,21 +204,21 @@ layout("/layouts/platform.html"){ 全部 - + {{numData.all.zgww?numData.all.zgww:0}} - + {{numData.all.knbf?numData.all.knbf:0}} - + {{numData.all.znrx?numData.all.znrx:0}} {{numData.all.ta?numData.all.ta:0}} - - {{numData.all.hd?numData.all.hd:0}} - + {{numData.all.jfbx?numData.all.jfbx:0}} @@ -415,54 +415,40 @@ layout("/layouts/platform.html"){ let container = document.getElementById('chart_one'); container.innerHTML = '' - - const config = { - "title": { - "visible": true, - "text": "职工动态曲线" - }, - "description": { - "visible": true, - "text": "单位(条)" - }, - "legend": { - "position": "top-right", - "flipPage": false - }, - "point": { - "visible": true - }, - "smooth": true, - "forceFit": false, - "width": $('#chart_one').width(), - "height": $('#chart_one').height(), - "xField": "year", - "yField": "value", - "stackField": "type", - - } let plot if (this.userid) { - $.post("/platform/careData/staff/getNumByYear", { + this.$axios.post("/platform/careData/staff/getNumByYear", { userid: this.userid, yearnum: this.yearnum, startYear: this.numYear.startYear, endYear: this.numYear.endYear, - }, (res) => { - if (res.code == 0) { + }).then(res=>{ + if (res.code === 0) { let {data} = res - plot = new G2Plot.Area(container, { + plot = new G2Plot.Line(container, { data, - ...config, + xField: 'year', + yField: 'value', + seriesField: 'type', + legend: { + position: 'top', + }, + smooth: true, + animation: { + appear: { + animation: 'path-in', + duration: 5000, + }, + }, }); plot.render(); this.chart_one_loading = false } - }, "json"); + }) } else { let data = [] let year = new Date().getFullYear() @@ -482,7 +468,7 @@ layout("/layouts/platform.html"){ }, getYearNumAndAllNum() { this.top_block_loading = true - this.$axios.post('/platform/careData/staff/getYearNumAndAllNum',{userid: this.userid,}).then(res => { + this.$axios.post('/platform/careData/staff/getYearNumAndAllNum', {userid: this.userid,}).then(res => { if (res.code === 0) { this.numData = res.data this.top_block_loading = false