From ab2d5b7629e3ed1e13150d5b9a309f010d81f13e Mon Sep 17 00:00:00 2001 From: zhanglipeng <chinazhanglipeng@qq.com> Date: Wed, 2 Dec 2020 21:43:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=84=E4=BC=B0=E9=9B=B7=E8=BE=BE=E5=9B=BE?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/dashboard/RadarChart.vue | 162 +++++++++++++----- .../src/views/dashboard/RadarChart_jk.vue | 84 +++++---- .../src/views/dashboard/RadarChart_kx.vue | 132 ++++++++++---- .../src/views/dashboard/RadarChart_sh.vue | 132 ++++++++++---- .../src/views/dashboard/RadarChart_ys.vue | 132 ++++++++++---- .../src/views/dashboard/RadarChart_yy.vue | 132 ++++++++++---- .../ByAssessmentcontentController.java | 20 +-- .../ruoyi/project/common/SchoolCommon.java | 12 ++ 8 files changed, 599 insertions(+), 207 deletions(-) diff --git a/ruoyi-ui/src/views/dashboard/RadarChart.vue b/ruoyi-ui/src/views/dashboard/RadarChart.vue index 5a7dbdf38..e9048745c 100644 --- a/ruoyi-ui/src/views/dashboard/RadarChart.vue +++ b/ruoyi-ui/src/views/dashboard/RadarChart.vue @@ -108,22 +108,12 @@ export default { radius: "66%", center: ["50%", "52%"], splitNumber: 12, - splitArea: { - areaStyle: { - color: "rgba(127,95,132,.3)", - opacity: 1, - shadowBlur: 45, - shadowColor: "rgba(0,0,0,.5)", - shadowOffsetX: 0, - shadowOffsetY: 15, - }, - }, indicator: [ - { name: "健康", max: 100 }, - { name: "语言", max: 100 }, - { name: "社会", max: 100 }, - { name: "科学", max: 100 }, - { name: "艺术", max: 100 }, + { name: "健康", max: 72 }, + { name: "语言", max: 72 }, + { name: "社会", max: 72 }, + { name: "科学", max: 72 }, + { name: "艺术", max: 72 }, ], }, legend: { @@ -134,6 +124,15 @@ export default { series: [ { type: "radar", + label: { + normal: { + show: true, + formatter: (params) => { + return params.value; + }, + fontSize: 14, + }, + }, symbolSize: 0, areaStyle: { normal: { @@ -148,10 +147,35 @@ export default { { value: [72, 72, 72, 72, 72], name: "60-72个月幼儿测评范围值", + symbol: "circle", + symbolSize: 10, + lineStyle: { + normal: { + type: "solid", + }, + }, + itemStyle: { + color: "#f08080", + }, + areaStyle: { + opacity: 0.7, + }, }, { value: this.values, name: "幼儿实际测评值", + symbolSize: 5, + lineStyle: { + normal: { + type: "dotted", + }, + }, + itemStyle: { + color: "#ebcc7b", + }, + areaStyle: { + opacity: 0.5, + }, }, ], animationDuration: animationDuration, @@ -180,22 +204,12 @@ export default { radius: "66%", center: ["50%", "52%"], splitNumber: 10, - splitArea: { - areaStyle: { - color: "rgba(127,95,132,.3)", - opacity: 1, - shadowBlur: 45, - shadowColor: "rgba(0,0,0,.5)", - shadowOffsetX: 0, - shadowOffsetY: 15, - }, - }, indicator: [ - { name: "健康", max: 100 }, - { name: "语言", max: 100 }, - { name: "社会", max: 100 }, - { name: "科学", max: 100 }, - { name: "艺术", max: 100 }, + { name: "健康", max: 72 }, + { name: "语言", max: 72 }, + { name: "社会", max: 72 }, + { name: "科学", max: 72 }, + { name: "艺术", max: 72 }, ], }, legend: { @@ -206,6 +220,15 @@ export default { series: [ { type: "radar", + label: { + normal: { + show: true, + formatter: (params) => { + return params.value; + }, + fontSize: 14, + }, + }, symbolSize: 0, areaStyle: { normal: { @@ -220,10 +243,35 @@ export default { { value: [60, 60, 60, 60, 60], name: "48-60个月幼儿测评范围值", + symbol: "circle", + symbolSize: 10, + lineStyle: { + normal: { + type: "solid", + }, + }, + itemStyle: { + color: "#f08080", + }, + areaStyle: { + opacity: 0.7, + }, }, { value: this.values, name: "幼儿实际测评值", + symbolSize: 5, + lineStyle: { + normal: { + type: "dotted", + }, + }, + itemStyle: { + color: "#ebcc7b", + }, + areaStyle: { + opacity: 0.5, + }, }, ], animationDuration: animationDuration, @@ -252,22 +300,12 @@ export default { radius: "66%", center: ["50%", "52%"], splitNumber: 8, - splitArea: { - areaStyle: { - color: "rgba(127,95,132,.3)", - opacity: 1, - shadowBlur: 45, - shadowColor: "rgba(0,0,0,.5)", - shadowOffsetX: 0, - shadowOffsetY: 15, - }, - }, indicator: [ - { name: "健康", max: 100 }, - { name: "语言", max: 100 }, - { name: "社会", max: 100 }, - { name: "科学", max: 100 }, - { name: "艺术", max: 100 }, + { name: "健康", max: 72 }, + { name: "语言", max: 72 }, + { name: "社会", max: 72 }, + { name: "科学", max: 72 }, + { name: "艺术", max: 72 }, ], }, legend: { @@ -278,6 +316,15 @@ export default { series: [ { type: "radar", + label: { + normal: { + show: true, + formatter: (params) => { + return params.value; + }, + fontSize: 14, + }, + }, symbolSize: 0, areaStyle: { normal: { @@ -292,10 +339,35 @@ export default { { value: [48, 48, 48, 48, 48], name: "36-48个月幼儿测评范围值", + symbol: "circle", + symbolSize: 10, + lineStyle: { + normal: { + type: "solid", + }, + }, + itemStyle: { + color: "#f08080", + }, + areaStyle: { + opacity: 0.7, + }, }, { value: this.values, name: "幼儿实际测评值", + symbolSize: 5, + lineStyle: { + normal: { + type: "dotted", + }, + }, + itemStyle: { + color: "#ebcc7b", + }, + areaStyle: { + opacity: 0.5, + }, }, ], animationDuration: animationDuration, diff --git a/ruoyi-ui/src/views/dashboard/RadarChart_jk.vue b/ruoyi-ui/src/views/dashboard/RadarChart_jk.vue index d369b3147..82f34efec 100644 --- a/ruoyi-ui/src/views/dashboard/RadarChart_jk.vue +++ b/ruoyi-ui/src/views/dashboard/RadarChart_jk.vue @@ -138,16 +138,6 @@ export default { radius: "66%", center: ["50%", "50%"], splitNumber: 12, - splitArea: { - areaStyle: { - color: "rgba(127,95,132,.3)", - opacity: 1, - shadowBlur: 45, - shadowColor: "rgba(0,0,0,.5)", - shadowOffsetX: 0, - shadowOffsetY: 15, - }, - }, indicator: this.names, }, legend: { @@ -158,6 +148,15 @@ export default { series: [ { type: "radar", + label: { + normal: { + show: true, + formatter: (params) => { + return params.value; + }, + fontSize: 14, + }, + }, symbolSize: 0, areaStyle: { normal: { @@ -204,16 +203,6 @@ export default { radius: "66%", center: ["50%", "50%"], splitNumber: 10, - splitArea: { - areaStyle: { - color: "rgba(127,95,132,.3)", - opacity: 1, - shadowBlur: 45, - shadowColor: "rgba(0,0,0,.5)", - shadowOffsetX: 0, - shadowOffsetY: 15, - }, - }, indicator: this.names, }, legend: { @@ -224,6 +213,15 @@ export default { series: [ { type: "radar", + label: { + normal: { + show: true, + formatter: (params) => { + return params.value; + }, + fontSize: 14, + }, + }, symbolSize: 0, areaStyle: { normal: { @@ -260,7 +258,7 @@ export default { left: "center", }, tooltip: { - trigger: 'item', + trigger: "item", axisPointer: { // 坐标轴指示器,坐标轴触发有效 type: "shadow", // 默认为直线,可选为:'line' | 'shadow' @@ -270,16 +268,6 @@ export default { radius: "66%", center: ["50%", "50%"], splitNumber: 8, - splitArea: { - areaStyle: { - color: "rgba(127,95,132,.3)", - opacity: 1, - shadowBlur: 45, - shadowColor: "rgba(0,0,0,.5)", - shadowOffsetX: 0, - shadowOffsetY: 15, - }, - }, indicator: this.names, }, legend: { @@ -290,6 +278,15 @@ export default { series: [ { type: "radar", + label: { + normal: { + show: true, + formatter: (params) => { + return params.value; + }, + fontSize: 14, + }, + }, symbolSize: 0, areaStyle: { normal: { @@ -304,10 +301,35 @@ export default { { value: this.mbvalues, name: "36-48个月幼儿测评范围值", + symbol: "circle", + symbolSize: 10, + lineStyle: { + normal: { + type: "solid", + }, + }, + itemStyle: { + color: "#f08080", + }, + areaStyle: { + opacity: 0.7, + }, }, { value: this.values, name: "幼儿实际测评值", + symbolSize: 5, + lineStyle: { + normal: { + type: "dotted", + }, + }, + itemStyle: { + color: "#ebcc7b", + }, + areaStyle: { + opacity: 0.5, + }, }, ], animationDuration: animationDuration, diff --git a/ruoyi-ui/src/views/dashboard/RadarChart_kx.vue b/ruoyi-ui/src/views/dashboard/RadarChart_kx.vue index 9b3ff42fb..6d41d1809 100644 --- a/ruoyi-ui/src/views/dashboard/RadarChart_kx.vue +++ b/ruoyi-ui/src/views/dashboard/RadarChart_kx.vue @@ -138,16 +138,6 @@ export default { radius: "66%", center: ["50%", "50%"], splitNumber: 12, - splitArea: { - areaStyle: { - color: "rgba(127,95,132,.3)", - opacity: 1, - shadowBlur: 45, - shadowColor: "rgba(0,0,0,.5)", - shadowOffsetX: 0, - shadowOffsetY: 15, - }, - }, indicator: this.names, }, legend: { @@ -158,6 +148,15 @@ export default { series: [ { type: "radar", + label: { + normal: { + show: true, + formatter: (params) => { + return params.value; + }, + fontSize: 14, + }, + }, symbolSize: 0, areaStyle: { normal: { @@ -172,10 +171,35 @@ export default { { value: this.mbvalues, name: "60-72个月幼儿测评范围值", + symbol: "circle", + symbolSize: 10, + lineStyle: { + normal: { + type: "solid", + }, + }, + itemStyle: { + color: "#f08080", + }, + areaStyle: { + opacity: 0.7, + }, }, { value: this.values, name: "幼儿实际测评值", + symbolSize: 5, + lineStyle: { + normal: { + type: "dotted", + }, + }, + itemStyle: { + color: "#ebcc7b", + }, + areaStyle: { + opacity: 0.5, + }, }, ], animationDuration: animationDuration, @@ -204,16 +228,6 @@ export default { radius: "66%", center: ["50%", "50%"], splitNumber: 10, - splitArea: { - areaStyle: { - color: "rgba(127,95,132,.3)", - opacity: 1, - shadowBlur: 45, - shadowColor: "rgba(0,0,0,.5)", - shadowOffsetX: 0, - shadowOffsetY: 15, - }, - }, indicator: this.names, }, legend: { @@ -224,6 +238,15 @@ export default { series: [ { type: "radar", + label: { + normal: { + show: true, + formatter: (params) => { + return params.value; + }, + fontSize: 14, + }, + }, symbolSize: 0, areaStyle: { normal: { @@ -238,10 +261,35 @@ export default { { value: this.mbvalues, name: "48-60个月幼儿测评范围值", + symbol: "circle", + symbolSize: 10, + lineStyle: { + normal: { + type: "solid", + }, + }, + itemStyle: { + color: "#f08080", + }, + areaStyle: { + opacity: 0.7, + }, }, { value: this.values, name: "幼儿实际测评值", + symbolSize: 5, + lineStyle: { + normal: { + type: "dotted", + }, + }, + itemStyle: { + color: "#ebcc7b", + }, + areaStyle: { + opacity: 0.5, + }, }, ], animationDuration: animationDuration, @@ -270,16 +318,6 @@ export default { radius: "66%", center: ["50%", "50%"], splitNumber: 8, - splitArea: { - areaStyle: { - color: "rgba(127,95,132,.3)", - opacity: 1, - shadowBlur: 45, - shadowColor: "rgba(0,0,0,.5)", - shadowOffsetX: 0, - shadowOffsetY: 15, - }, - }, indicator: this.names, }, legend: { @@ -290,6 +328,15 @@ export default { series: [ { type: "radar", + label: { + normal: { + show: true, + formatter: (params) => { + return params.value; + }, + fontSize: 14, + }, + }, symbolSize: 0, areaStyle: { normal: { @@ -304,10 +351,35 @@ export default { { value: this.mbvalues, name: "36-48个月幼儿测评范围值", + symbol: "circle", + symbolSize: 10, + lineStyle: { + normal: { + type: "solid", + }, + }, + itemStyle: { + color: "#f08080", + }, + areaStyle: { + opacity: 0.7, + }, }, { value: this.values, name: "幼儿实际测评值", + symbolSize: 5, + lineStyle: { + normal: { + type: "dotted", + }, + }, + itemStyle: { + color: "#ebcc7b", + }, + areaStyle: { + opacity: 0.5, + }, }, ], animationDuration: animationDuration, diff --git a/ruoyi-ui/src/views/dashboard/RadarChart_sh.vue b/ruoyi-ui/src/views/dashboard/RadarChart_sh.vue index aac579470..ada5ac070 100644 --- a/ruoyi-ui/src/views/dashboard/RadarChart_sh.vue +++ b/ruoyi-ui/src/views/dashboard/RadarChart_sh.vue @@ -138,16 +138,6 @@ export default { radius: "66%", center: ["50%", "50%"], splitNumber: 12, - splitArea: { - areaStyle: { - color: "rgba(127,95,132,.3)", - opacity: 1, - shadowBlur: 45, - shadowColor: "rgba(0,0,0,.5)", - shadowOffsetX: 0, - shadowOffsetY: 15, - }, - }, indicator: this.names, }, legend: { @@ -158,6 +148,15 @@ export default { series: [ { type: "radar", + label: { + normal: { + show: true, + formatter: (params) => { + return params.value; + }, + fontSize: 14, + }, + }, symbolSize: 0, areaStyle: { normal: { @@ -172,10 +171,35 @@ export default { { value: this.mbvalues, name: "60-72个月幼儿测评范围值", + symbol: "circle", + symbolSize: 10, + lineStyle: { + normal: { + type: "solid", + }, + }, + itemStyle: { + color: "#f08080", + }, + areaStyle: { + opacity: 0.7, + }, }, { value: this.values, name: "幼儿实际测评值", + symbolSize: 5, + lineStyle: { + normal: { + type: "dotted", + }, + }, + itemStyle: { + color: "#ebcc7b", + }, + areaStyle: { + opacity: 0.5, + }, }, ], animationDuration: animationDuration, @@ -204,16 +228,6 @@ export default { radius: "66%", center: ["50%", "50%"], splitNumber: 10, - splitArea: { - areaStyle: { - color: "rgba(127,95,132,.3)", - opacity: 1, - shadowBlur: 45, - shadowColor: "rgba(0,0,0,.5)", - shadowOffsetX: 0, - shadowOffsetY: 15, - }, - }, indicator: this.names, }, legend: { @@ -224,6 +238,15 @@ export default { series: [ { type: "radar", + label: { + normal: { + show: true, + formatter: (params) => { + return params.value; + }, + fontSize: 14, + }, + }, symbolSize: 0, areaStyle: { normal: { @@ -238,10 +261,35 @@ export default { { value: this.mbvalues, name: "48-60个月幼儿测评范围值", + symbol: "circle", + symbolSize: 10, + lineStyle: { + normal: { + type: "solid", + }, + }, + itemStyle: { + color: "#f08080", + }, + areaStyle: { + opacity: 0.7, + }, }, { value: this.values, name: "幼儿实际测评值", + symbolSize: 5, + lineStyle: { + normal: { + type: "dotted", + }, + }, + itemStyle: { + color: "#ebcc7b", + }, + areaStyle: { + opacity: 0.5, + }, }, ], animationDuration: animationDuration, @@ -270,16 +318,6 @@ export default { radius: "66%", center: ["50%", "50%"], splitNumber: 8, - splitArea: { - areaStyle: { - color: "rgba(127,95,132,.3)", - opacity: 1, - shadowBlur: 45, - shadowColor: "rgba(0,0,0,.5)", - shadowOffsetX: 0, - shadowOffsetY: 15, - }, - }, indicator: this.names, }, legend: { @@ -290,6 +328,15 @@ export default { series: [ { type: "radar", + label: { + normal: { + show: true, + formatter: (params) => { + return params.value; + }, + fontSize: 14, + }, + }, symbolSize: 0, areaStyle: { normal: { @@ -304,10 +351,35 @@ export default { { value: this.mbvalues, name: "36-48个月幼儿测评范围值", + symbol: "circle", + symbolSize: 10, + lineStyle: { + normal: { + type: "solid", + }, + }, + itemStyle: { + color: "#f08080", + }, + areaStyle: { + opacity: 0.7, + }, }, { value: this.values, name: "幼儿实际测评值", + symbolSize: 5, + lineStyle: { + normal: { + type: "dotted", + }, + }, + itemStyle: { + color: "#ebcc7b", + }, + areaStyle: { + opacity: 0.5, + }, }, ], animationDuration: animationDuration, diff --git a/ruoyi-ui/src/views/dashboard/RadarChart_ys.vue b/ruoyi-ui/src/views/dashboard/RadarChart_ys.vue index 4fa8d1c2c..241562da3 100644 --- a/ruoyi-ui/src/views/dashboard/RadarChart_ys.vue +++ b/ruoyi-ui/src/views/dashboard/RadarChart_ys.vue @@ -138,16 +138,6 @@ export default { radius: "66%", center: ["50%", "50%"], splitNumber: 12, - splitArea: { - areaStyle: { - color: "rgba(127,95,132,.3)", - opacity: 1, - shadowBlur: 45, - shadowColor: "rgba(0,0,0,.5)", - shadowOffsetX: 0, - shadowOffsetY: 15, - }, - }, indicator: this.names, }, legend: { @@ -158,6 +148,15 @@ export default { series: [ { type: "radar", + label: { + normal: { + show: true, + formatter: (params) => { + return params.value; + }, + fontSize: 14, + }, + }, symbolSize: 0, areaStyle: { normal: { @@ -172,10 +171,35 @@ export default { { value: this.mbvalues, name: "60-72个月幼儿测评范围值", + symbol: "circle", + symbolSize: 10, + lineStyle: { + normal: { + type: "solid", + }, + }, + itemStyle: { + color: "#f08080", + }, + areaStyle: { + opacity: 0.7, + }, }, { value: this.values, name: "幼儿实际测评值", + symbolSize: 5, + lineStyle: { + normal: { + type: "dotted", + }, + }, + itemStyle: { + color: "#ebcc7b", + }, + areaStyle: { + opacity: 0.5, + }, }, ], animationDuration: animationDuration, @@ -204,16 +228,6 @@ export default { radius: "66%", center: ["50%", "50%"], splitNumber: 10, - splitArea: { - areaStyle: { - color: "rgba(127,95,132,.3)", - opacity: 1, - shadowBlur: 45, - shadowColor: "rgba(0,0,0,.5)", - shadowOffsetX: 0, - shadowOffsetY: 15, - }, - }, indicator: this.names, }, legend: { @@ -224,6 +238,15 @@ export default { series: [ { type: "radar", + label: { + normal: { + show: true, + formatter: (params) => { + return params.value; + }, + fontSize: 14, + }, + }, symbolSize: 0, areaStyle: { normal: { @@ -238,10 +261,35 @@ export default { { value: this.mbvalues, name: "48-60个月幼儿测评范围值", + symbol: "circle", + symbolSize: 10, + lineStyle: { + normal: { + type: "solid", + }, + }, + itemStyle: { + color: "#f08080", + }, + areaStyle: { + opacity: 0.7, + }, }, { value: this.values, name: "幼儿实际测评值", + symbolSize: 5, + lineStyle: { + normal: { + type: "dotted", + }, + }, + itemStyle: { + color: "#ebcc7b", + }, + areaStyle: { + opacity: 0.5, + }, }, ], animationDuration: animationDuration, @@ -270,16 +318,6 @@ export default { radius: "66%", center: ["50%", "50%"], splitNumber: 8, - splitArea: { - areaStyle: { - color: "rgba(127,95,132,.3)", - opacity: 1, - shadowBlur: 45, - shadowColor: "rgba(0,0,0,.5)", - shadowOffsetX: 0, - shadowOffsetY: 15, - }, - }, indicator: this.names, }, legend: { @@ -290,6 +328,15 @@ export default { series: [ { type: "radar", + label: { + normal: { + show: true, + formatter: (params) => { + return params.value; + }, + fontSize: 14, + }, + }, symbolSize: 0, areaStyle: { normal: { @@ -304,10 +351,35 @@ export default { { value: this.mbvalues, name: "36-48个月幼儿测评范围值", + symbol: "circle", + symbolSize: 10, + lineStyle: { + normal: { + type: "solid", + }, + }, + itemStyle: { + color: "#f08080", + }, + areaStyle: { + opacity: 0.7, + }, }, { value: this.values, name: "幼儿实际测评值", + symbolSize: 5, + lineStyle: { + normal: { + type: "dotted", + }, + }, + itemStyle: { + color: "#ebcc7b", + }, + areaStyle: { + opacity: 0.5, + }, }, ], animationDuration: animationDuration, diff --git a/ruoyi-ui/src/views/dashboard/RadarChart_yy.vue b/ruoyi-ui/src/views/dashboard/RadarChart_yy.vue index e71e70fa6..ec0ad1a09 100644 --- a/ruoyi-ui/src/views/dashboard/RadarChart_yy.vue +++ b/ruoyi-ui/src/views/dashboard/RadarChart_yy.vue @@ -138,16 +138,6 @@ export default { radius: "66%", center: ["50%", "50%"], splitNumber: 12, - splitArea: { - areaStyle: { - color: "rgba(127,95,132,.3)", - opacity: 1, - shadowBlur: 45, - shadowColor: "rgba(0,0,0,.5)", - shadowOffsetX: 0, - shadowOffsetY: 15, - }, - }, indicator: this.names, }, legend: { @@ -158,6 +148,15 @@ export default { series: [ { type: "radar", + label: { + normal: { + show: true, + formatter: (params) => { + return params.value; + }, + fontSize: 14, + }, + }, symbolSize: 0, areaStyle: { normal: { @@ -172,10 +171,35 @@ export default { { value: this.mbvalues, name: "60-72个月幼儿测评范围值", + symbol: "circle", + symbolSize: 10, + lineStyle: { + normal: { + type: "solid", + }, + }, + itemStyle: { + color: "#f08080", + }, + areaStyle: { + opacity: 0.7, + }, }, { value: this.values, name: "幼儿实际测评值", + symbolSize: 5, + lineStyle: { + normal: { + type: "dotted", + }, + }, + itemStyle: { + color: "#ebcc7b", + }, + areaStyle: { + opacity: 0.5, + }, }, ], animationDuration: animationDuration, @@ -204,16 +228,6 @@ export default { radius: "66%", center: ["50%", "50%"], splitNumber: 10, - splitArea: { - areaStyle: { - color: "rgba(127,95,132,.3)", - opacity: 1, - shadowBlur: 45, - shadowColor: "rgba(0,0,0,.5)", - shadowOffsetX: 0, - shadowOffsetY: 15, - }, - }, indicator: this.names, }, legend: { @@ -224,6 +238,15 @@ export default { series: [ { type: "radar", + label: { + normal: { + show: true, + formatter: (params) => { + return params.value; + }, + fontSize: 14, + }, + }, symbolSize: 0, areaStyle: { normal: { @@ -238,10 +261,35 @@ export default { { value: this.mbvalues, name: "48-60个月幼儿测评范围值", + symbol: "circle", + symbolSize: 10, + lineStyle: { + normal: { + type: "solid", + }, + }, + itemStyle: { + color: "#f08080", + }, + areaStyle: { + opacity: 0.7, + }, }, { value: this.values, name: "幼儿实际测评值", + symbolSize: 5, + lineStyle: { + normal: { + type: "dotted", + }, + }, + itemStyle: { + color: "#ebcc7b", + }, + areaStyle: { + opacity: 0.5, + }, }, ], animationDuration: animationDuration, @@ -270,16 +318,6 @@ export default { radius: "66%", center: ["50%", "50%"], splitNumber: 8, - splitArea: { - areaStyle: { - color: "rgba(127,95,132,.3)", - opacity: 1, - shadowBlur: 45, - shadowColor: "rgba(0,0,0,.5)", - shadowOffsetX: 0, - shadowOffsetY: 15, - }, - }, indicator: this.names, }, legend: { @@ -290,6 +328,15 @@ export default { series: [ { type: "radar", + label: { + normal: { + show: true, + formatter: (params) => { + return params.value; + }, + fontSize: 14, + }, + }, symbolSize: 0, areaStyle: { normal: { @@ -304,10 +351,35 @@ export default { { value: this.mbvalues, name: "36-48个月幼儿测评范围值", + symbol: "circle", + symbolSize: 10, + lineStyle: { + normal: { + type: "solid", + }, + }, + itemStyle: { + color: "#f08080", + }, + areaStyle: { + opacity: 0.7, + }, }, { value: this.values, name: "幼儿实际测评值", + symbolSize: 5, + lineStyle: { + normal: { + type: "dotted", + }, + }, + itemStyle: { + color: "#ebcc7b", + }, + areaStyle: { + opacity: 0.5, + }, }, ], animationDuration: animationDuration, diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByAssessmentcontentController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByAssessmentcontentController.java index 6574cef3e..970f597c9 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByAssessmentcontentController.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByAssessmentcontentController.java @@ -3,9 +3,7 @@ package com.ruoyi.project.benyi.controller; import java.util.ArrayList; import java.util.List; -import com.ruoyi.common.utils.ServletUtils; -import com.ruoyi.framework.security.LoginUser; -import com.ruoyi.framework.security.service.TokenService; +import com.ruoyi.project.common.SchoolCommon; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -37,7 +35,7 @@ public class ByAssessmentcontentController extends BaseController { @Autowired private IByAssessmentcontentService byAssessmentcontentService; @Autowired - private TokenService tokenService; + private SchoolCommon schoolCommon; /** * 查询评估内容列表 @@ -170,7 +168,7 @@ public class ByAssessmentcontentController extends BaseController { public AjaxResult getAssessmentStatistics(@PathVariable("childid") Long childid, @PathVariable("scope") String scope) { AjaxResult ajaxResult = AjaxResult.success(); String[] strArr = new String[]{"健康", "语言", "社会", "科学", "艺术"}; - List<Double> douArr = new ArrayList<Double>(); + List<String> douArr = new ArrayList<String>(); ByAssessmentcontent byAssessmentcontent = null; for (int i = 0; i < strArr.length; i++) { byAssessmentcontent = new ByAssessmentcontent(); @@ -185,11 +183,11 @@ public class ByAssessmentcontentController extends BaseController { int count = byAssessmentcontentService.selectCountElement(byAssessmentcontent); int countChild = byAssessmentcontentService.selectCountElementByChild(byAssessmentcontent); if (scope.equals("1")) { - douArr.add((((double) 48 / count) * countChild)); + douArr.add((schoolCommon.format1((double) 48 * countChild / count))); } else if (scope.equals("2")) { - douArr.add((((double) 60 / count) * countChild)); + douArr.add((schoolCommon.format1(((double) 60 * countChild / count)))); } else if (scope.equals("3")) { - douArr.add((((double) 72 / count) * countChild)); + douArr.add((schoolCommon.format1(((double) 72 * countChild / count)))); } } } @@ -234,13 +232,13 @@ public class ByAssessmentcontentController extends BaseController { int countChild = byAssessmentcontentService.selectCountElementByChild(byAssessmentcontent); if (scope.equals("1")) { douArr.add((((double) 48 / count) * countChild)); - System.out.println("48:"+count+"-"+countChild); + System.out.println("48:" + count + "-" + countChild); } else if (scope.equals("2")) { douArr.add((((double) 60 / count) * countChild)); - System.out.println("60:"+count+"-"+countChild); + System.out.println("60:" + count + "-" + countChild); } else if (scope.equals("3")) { douArr.add((((double) 72 / count) * countChild)); - System.out.println("72:"+count+"-"+countChild); + System.out.println("72:" + count + "-" + countChild); } } ajaxResult.put("statistics", douArr); diff --git a/ruoyi/src/main/java/com/ruoyi/project/common/SchoolCommon.java b/ruoyi/src/main/java/com/ruoyi/project/common/SchoolCommon.java index 63536b50b..5d35be7dc 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/common/SchoolCommon.java +++ b/ruoyi/src/main/java/com/ruoyi/project/common/SchoolCommon.java @@ -12,6 +12,8 @@ import io.swagger.models.auth.In; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RestController; +import java.math.BigDecimal; +import java.math.RoundingMode; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; @@ -242,4 +244,14 @@ public class SchoolCommon { return weekDays[w]; } + /** + * 使用BigDecimal,保留小数点后两位 + */ + public String format1(double value) { + + BigDecimal bd = new BigDecimal(value); + bd = bd.setScale(2, RoundingMode.HALF_UP); + return bd.toString(); + } + }