From c5296e984c52baca99341c0d6aff29c4647790e9 Mon Sep 17 00:00:00 2001 From: yaoyuhao Date: Wed, 17 Apr 2024 15:25:25 +0800 Subject: [PATCH] 1 --- src/view/echarts_hygiene/eP3.vue | 88 +++++++++++++++--- src/view/echarts_hygiene/eP4.vue | 149 +++++++++++++++++++++++++++++++ src/view/echarts_hygiene/eP5.vue | 25 +++--- src/view/echarts_hygiene/eP7.vue | 89 +++++++++++++++--- src/view/hygiene.vue | 53 ++++++----- 5 files changed, 339 insertions(+), 65 deletions(-) create mode 100644 src/view/echarts_hygiene/eP4.vue diff --git a/src/view/echarts_hygiene/eP3.vue b/src/view/echarts_hygiene/eP3.vue index cacab81..7a3ebd5 100644 --- a/src/view/echarts_hygiene/eP3.vue +++ b/src/view/echarts_hygiene/eP3.vue @@ -90,28 +90,94 @@ let option = { }, }, }, - ], series: [ { name: "职工医疗保险发放人次", type: "bar", - data: [2.0, 4.9, 7.0, 23.2, 25.6], + data: [2.0, 4.9, 7.0, 23.2, 25.6,7,8], barWidth: 20, itemStyle: { normal: { color: function (params) { let colorList = [ - "#FA897B", - "#FFDD94", - "#D0E6A5", - "#FFDD94", - "#4675C0", - "#B8BFD6", - "#FFA876", + ["rgba(23, 237, 255, 1)", "rgba(23, 237, 255, 0.20)"], + ["rgba(142, 187, 255, 1)", "rgba(142, 187, 255, 0.20)"], + ["rgba(255, 243, 119, 1)", "rgba(255, 242, 142, 0.20)"], ]; - let colorItem = colorList[params.dataIndex]; - return colorItem; + if (params.dataIndex == 0) { + return new echarts.graphic.LinearGradient( + 0, + 0, + 0, + 1, //y->y2 + [ + { + offset: 0, + color: "rgba(23, 237, 255, 1)", + }, + { + offset: 1, + color: "rgba(23, 237, 255, 0.20)", + }, + ], + false + ); + } else if (params.dataIndex % 3 == 0) { + return new echarts.graphic.LinearGradient( + 0, + 0, + 0, + 1, //y->y2 + [ + { + offset: 0, + color: "rgba(23, 237, 255, 1)", + }, + { + offset: 1, + color: "rgba(23, 237, 255, 0.20)", + }, + ], + false + ); + } else if (params.dataIndex % 2 == 0) { + return new echarts.graphic.LinearGradient( + 0, + 0, + 0, + 1, //y->y2 + [ + { + offset: 0, + color: "rgba(255, 243, 119, 1)", + }, + { + offset: 1, + color: "rgba(255, 242, 142, 0.20)", + }, + ], + false + ); + } else { + return new echarts.graphic.LinearGradient( + 0, + 0, + 0, + 1, //y->y2 + [ + { + offset: 0, + color: "rgba(142, 187, 255, 1)", + }, + { + offset: 1, + color: "rgba(142, 187, 255, 0.20)", + }, + ], + false + ); + } }, }, }, diff --git a/src/view/echarts_hygiene/eP4.vue b/src/view/echarts_hygiene/eP4.vue new file mode 100644 index 0000000..83250eb --- /dev/null +++ b/src/view/echarts_hygiene/eP4.vue @@ -0,0 +1,149 @@ + + + + + \ No newline at end of file diff --git a/src/view/echarts_hygiene/eP5.vue b/src/view/echarts_hygiene/eP5.vue index 1564dea..7540f39 100644 --- a/src/view/echarts_hygiene/eP5.vue +++ b/src/view/echarts_hygiene/eP5.vue @@ -108,22 +108,17 @@ let option = { type: "bar", data: [2.0, 4.9, 7.0, 23.2, 25.6], barWidth: 20, - itemStyle: { - normal: { - color: function (params) { - let colorList = [ - "#FA897B", - "#FFDD94", - "#D0E6A5", - "#FFDD94", - "#4675C0", - "#B8BFD6", - "#FFA876", - ]; - let colorItem = colorList[params.dataIndex]; - return colorItem; + itemStyle: { + color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + { + offset: 0, + color: "rgba(23, 237, 255, 1)", }, - }, + { + offset: 1, + color: "rgba(23, 237, 255, 0.20)", + }, + ]), }, }, ], diff --git a/src/view/echarts_hygiene/eP7.vue b/src/view/echarts_hygiene/eP7.vue index 9292916..baad6cf 100644 --- a/src/view/echarts_hygiene/eP7.vue +++ b/src/view/echarts_hygiene/eP7.vue @@ -96,22 +96,89 @@ let option = { { name: "职工医疗保险发放人次", type: "bar", - data: [2.0, 4.9, 7.0, 23.2, 25.6], + data: [2.0, 4.9, 7.0, 23.2, 25.6,9,9], barWidth: 20, - itemStyle: { + itemStyle: { normal: { color: function (params) { let colorList = [ - "#FA897B", - "#FFDD94", - "#D0E6A5", - "#FFDD94", - "#4675C0", - "#B8BFD6", - "#FFA876", + ["rgba(23, 237, 255, 1)", "rgba(23, 237, 255, 0.20)"], + ["rgba(142, 187, 255, 1)", "rgba(142, 187, 255, 0.20)"], + ["rgba(255, 243, 119, 1)", "rgba(255, 242, 142, 0.20)"], ]; - let colorItem = colorList[params.dataIndex]; - return colorItem; + if (params.dataIndex == 0) { + return new echarts.graphic.LinearGradient( + 0, + 0, + 0, + 1, //y->y2 + [ + { + offset: 0, + color: "rgba(23, 237, 255, 1)", + }, + { + offset: 1, + color: "rgba(23, 237, 255, 0.20)", + }, + ], + false + ); + } else if (params.dataIndex % 3 == 0) { + return new echarts.graphic.LinearGradient( + 0, + 0, + 0, + 1, //y->y2 + [ + { + offset: 0, + color: "rgba(23, 237, 255, 1)", + }, + { + offset: 1, + color: "rgba(23, 237, 255, 0.20)", + }, + ], + false + ); + } else if (params.dataIndex % 2 == 0) { + return new echarts.graphic.LinearGradient( + 0, + 0, + 0, + 1, //y->y2 + [ + { + offset: 0, + color: "rgba(255, 243, 119, 1)", + }, + { + offset: 1, + color: "rgba(255, 242, 142, 0.20)", + }, + ], + false + ); + } else { + return new echarts.graphic.LinearGradient( + 0, + 0, + 0, + 1, //y->y2 + [ + { + offset: 0, + color: "rgba(142, 187, 255, 1)", + }, + { + offset: 1, + color: "rgba(142, 187, 255, 0.20)", + }, + ], + false + ); + } }, }, }, diff --git a/src/view/hygiene.vue b/src/view/hygiene.vue index e2125bf..f954aeb 100644 --- a/src/view/hygiene.vue +++ b/src/view/hygiene.vue @@ -50,7 +50,8 @@
-
+
+
建档率
92.96%
@@ -74,23 +75,22 @@
-
+
-
+
-
+
-
3月2日健康日,在龙中公园进行健康活动宣
-
3月2日健康日,在龙中公园进行健康活动宣
-
3月2日健康日,在龙中公园进行健康活动宣
-
3月2日健康日,在龙中公园进行健康活动宣
-
3月2日健康日,在龙中公园进行健康活动宣
-
3月2日健康日,在龙中公园进行健康活动宣
+
3月2日健康日,在龙中公园进行健康活动宣
+
3月2日健康日,在龙中公园进行健康活动宣
+
3月2日健康日,在龙中公园进行健康活动宣
+
3月2日健康日,在龙中公园进行健康活动宣
+
3月2日健康日,在龙中公园进行健康活动宣
@@ -105,8 +105,7 @@ import eP3 from "./echarts_hygiene/eP3.vue"; import eP7 from "./echarts_hygiene/eP7.vue"; import eP6 from "./echarts_hygiene/eP6.vue"; import eP5 from "./echarts_hygiene/eP5.vue"; -import ylSMFW from "./echarts_yl/ylSMFW.vue"; -import ylXZZC from "./echarts_yl/ylXZZC.vue"; +import eP4 from "./echarts_hygiene/eP4.vue"; import { ref, onMounted, onBeforeMount } from "vue"; const leftchoose = ref({ first: "1", @@ -618,12 +617,10 @@ const change = (name, index) => { align-items: center; justify-content: center; margin-left: 60px; + margin-top: -10px; .leftImg { - width: 81px; - height: 81px; - background-image: url(@/assets/images/hygiene/xia_right.png); - background-repeat: no-repeat; - background-size: 100% 100%; + width: 105px; + height: 105px; } .left_me { margin-left: 10px; @@ -636,7 +633,7 @@ const change = (name, index) => { display: flex; align-items: center; // justify-content: center; - margin-left: 60px; + margin-left: 40px; .rightImg { width: 81px; height: 81px; @@ -654,17 +651,17 @@ const change = (name, index) => { } .table { width: 95%; - min-height: 200px; + height: 200px; height: calc(100% - 75px); - background: red; + // background: red; overflow-y: auto; - // .item { - // margin-top: 10px; - // padding: 16px 20px; - // background-image: url(@/assets/images/hygiene/table_bg.png); - // background-repeat: no-repeat; - // background-size: 100% 100%; - // color: #ffffff; - // } + .item { + margin-top: 10px; + padding: 16px 20px; + background-image: url(@/assets/images/hygiene/table_bg.png); + background-repeat: no-repeat; + background-size: 100% 100%; + color: #ffffff; + } }