This commit is contained in:
姚宇浩 2024-07-12 11:50:43 +08:00
parent e853f99d73
commit f1350b05d9
16 changed files with 864 additions and 65 deletions

BIN
dist.zip

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

View File

@ -0,0 +1,468 @@
<template>
<div ref="chart" style="width: 96%; height: 250px"></div>
</template>
<script setup>
import { onMounted, onBeforeMount, reactive, ref } from "vue";
// echarts
import * as echarts from "echarts";
const props = defineProps({
list: {
type: Array,
default: () => {
return [];
},
},
});
const chart = ref(); // DOM
const colors = [
{
left: "rgba(14, 252, 255, .16)",
right: "rgba(14, 252, 255, .6)",
top: "rgba(14, 252, 255, 1)",
bottom: "rgba(14, 252, 255, .46)",
front: "rgba(14, 252, 255, .66)",
},
{
left: "rgba(14, 252, 255, .16)",
right: "rgba(14, 252, 255, .6)",
top: "rgba(14, 252, 255, 1)",
bottom: "rgba(14, 252, 255, .46)",
front: "rgba(14, 252, 255, .66)",
},
{
left: "rgba(14, 252, 255, .16)",
right: "rgba(14, 252, 255, .6)",
top: "rgba(14, 252, 255, 1)",
bottom: "rgba(14, 252, 255, .46)",
front: "rgba(14, 252, 255, .66)",
},
];
const maxList = ref([]);
// const valueList = [20, 53, 47, 65, 29, 11, 10];
const data = reactive({
list: [],
option: {},
Max: 200,
valueList: [20, 53, 47, 65, 29, 11, 10],
xxname: [
],
});
// 5:
//c0:c1,c2:c3
// -ok rgba(103, 180, 233, 0.04)
const CubeLeft_1 = echarts.graphic.extendShape({
shape: {
x: 0,
y: 0,
},
buildPath: function (ctx, shape) {
// canvasshapecustom
const xAxisPoint = shape.xAxisPoint;
const c0 = [shape.x - 20, shape.y];
const c1 = [shape.x - 7, shape.y - 14];
const c2 = [xAxisPoint[0] - 7, xAxisPoint[1] - 14];
const c3 = [xAxisPoint[0] - 20, xAxisPoint[1]];
ctx
.moveTo(c0[0], c0[1])
.lineTo(c1[0], c1[1])
.lineTo(c2[0], c2[1])
.lineTo(c3[0], c3[1])
.closePath();
},
});
const CubeFront_1 = echarts.graphic.extendShape({
shape: {
x: 0,
y: 0,
},
buildPath: function (ctx, shape) {
// canvasshapecustom
const xAxisPoint = shape.xAxisPoint;
const c0 = [shape.x - 20, shape.y];
const c1 = [shape.x + 2, shape.y];
const c2 = [xAxisPoint[0] + 2, xAxisPoint[1]];
const c3 = [xAxisPoint[0] - 20, xAxisPoint[1]];
ctx
.moveTo(c0[0], c0[1])
.lineTo(c1[0], c1[1])
.lineTo(c2[0], c2[1])
.lineTo(c3[0], c3[1])
.closePath();
},
});
const CubeRight_1 = echarts.graphic.extendShape({
shape: {
x: 0,
y: 0,
},
buildPath: function (ctx, shape) {
const xAxisPoint = shape.xAxisPoint;
const c0 = [shape.x + 2, shape.y];
const c1 = [shape.x + 15, shape.y - 14];
const c2 = [xAxisPoint[0] + 15, xAxisPoint[1] - 14];
const c3 = [xAxisPoint[0] + 2, xAxisPoint[1]];
ctx
.moveTo(c0[0], c0[1])
.lineTo(c1[0], c1[1])
.lineTo(c2[0], c2[1])
.lineTo(c3[0], c3[1])
.closePath();
},
});
const CubeTop_1 = echarts.graphic.extendShape({
shape: {
x: 0,
y: 0,
},
buildPath: function (ctx, shape) {
const c0 = [shape.x - 20, shape.y];
const c1 = [shape.x + 2, shape.y];
const c2 = [shape.x + 15, shape.y - 14];
const c3 = [shape.x - 7, shape.y - 14];
ctx
.moveTo(c0[0], c0[1])
.lineTo(c1[0], c1[1])
.lineTo(c2[0], c2[1])
.lineTo(c3[0], c3[1])
.closePath();
},
});
const CubeBottom_1 = echarts.graphic.extendShape({
shape: {
x: 0,
y: 0,
},
buildPath: function (ctx, shape) {
// canvasshapecustom
const xAxisPoint = shape.xAxisPoint;
const c0 = [xAxisPoint[0] - 20, xAxisPoint[1]];
const c1 = [xAxisPoint[0] + 2, xAxisPoint[1]];
const c2 = [xAxisPoint[0] + 15, xAxisPoint[1] - 14];
const c3 = [xAxisPoint[0] - 7, xAxisPoint[1] - 14];
ctx
.moveTo(c0[0], c0[1])
.lineTo(c1[0], c1[1])
.lineTo(c2[0], c2[1])
.lineTo(c3[0], c3[1])
.closePath();
},
});
echarts.graphic.registerShape("CubeLeft_1", CubeLeft_1);
echarts.graphic.registerShape("CubeFront_1", CubeFront_1);
echarts.graphic.registerShape("CubeRight_1", CubeRight_1);
echarts.graphic.registerShape("CubeTop_1", CubeTop_1);
echarts.graphic.registerShape("CubeBottom_1", CubeBottom_1);
const getOption = () => {
data.option = {
tooltip: {
trigger: "axis",
formatter: "{b0}:{c1}",
},
legend: {
data: ["两慢病免费用药情况"],
top: "4%",
right: "5%",
textStyle: {
fontSize: 16,
color: "#ffffff",
},
},
grid: {
left: 10,
right: 0,
bottom: 20,
top: 70,
containLabel: true,
},
xAxis: [
{
type: "category",
data: data.xxname,
axisLine: {
show: false,
},
offset: 10,
axisTick: {
show: false,
},
axisLabel: {
show: true,
color: "#fff",
fontSize: 16,
// formatter: function (value) {
// return value.length > 3 ? value.slice(0, 2) + "..." : value;
// },
},
},
{
type: "category",
data: data.xxname,
axisLine: {
show: false,
},
offset: 10,
axisTick: {
show: false,
},
axisLabel: {
show: false,
color: "#fff",
fontSize: 16,
},
},
],
yAxis: {
min: 0,
max: data.Max,
// interval: 100,
type: "value",
axisLine: {
show: true,
lineStyle: {
color: "rgba(255, 255, 255, .16)",
},
},
splitLine: {
show: true,
lineStyle: {
type: "dashed",
color: "rgba(255, 255, 255, .16)",
},
},
axisTick: {
show: false,
},
axisLabel: {
show: true,
fontSize: 16,
color: "#fff",
},
},
series: [
//
{
type: "custom",
renderItem: function (params, api) {
// console.log(api);
const location = api.coord([api.value(0), api.value(1)]);
return {
type: "group",
children: [
{
type: "CubeBottom_1",
shape: {
api,
x: location[0],
y: location[1],
xAxisPoint: api.coord([api.value(0), 0]),
},
style: {
fill: "rgba(103, 180, 233, .16)",
},
},
{
type: "CubeLeft_1",
shape: {
api,
x: location[0],
y: location[1],
xAxisPoint: api.coord([api.value(0), 0]),
},
style: {
fill: "rgba(103, 180, 233, .04)",
},
},
{
type: "CubeFront_1",
shape: {
api,
x: location[0],
y: location[1],
xAxisPoint: api.coord([api.value(0), 0]),
},
style: {
fill: "rgba(103, 180, 233, .16)",
},
},
{
type: "CubeRight_1",
shape: {
api,
x: location[0],
y: location[1],
xAxisPoint: api.coord([api.value(0), 0]),
},
style: {
fill: "rgba(103, 180, 233, .08)",
},
},
{
type: "CubeTop_1",
shape: {
api,
x: location[0],
y: location[1],
xAxisPoint: api.coord([api.value(0), 0]),
},
style: {
fill: "rgba(103, 180, 233, .26)",
},
},
],
};
},
data: maxList.value,
},
{
name:'两慢病免费用药情况',
type: "custom",
itemStyle: {
color:'#0efdff',
},
renderItem: (params, api) => {
const location = api.coord([api.value(0), api.value(1)]);
return {
type: "group",
children: [
{
type: "CubeBottom_1",
shape: {
api,
xValue: api.value(0),
yValue: api.value(1),
x: location[0],
y: location[1],
xAxisPoint: api.coord([api.value(0), 0]),
},
style: {
fill: colors[`${params.dataIndexInside % 3}`]["bottom"],
},
},
{
type: "CubeLeft_1",
shape: {
api,
xValue: api.value(0),
yValue: api.value(1),
x: location[0],
y: location[1],
xAxisPoint: api.coord([api.value(0), 0]),
},
style: {
fill: colors[`${params.dataIndexInside % 3}`]["left"],
},
},
{
type: "CubeFront_1",
shape: {
api,
xValue: api.value(0),
yValue: api.value(1),
x: location[0],
y: location[1],
xAxisPoint: api.coord([api.value(0), 0]),
},
style: {
fill: colors[`${params.dataIndexInside % 3}`]["front"],
},
},
{
type: "CubeRight_1",
shape: {
api,
xValue: api.value(0),
yValue: api.value(1),
x: location[0],
y: location[1],
xAxisPoint: api.coord([api.value(0), 0]),
},
style: {
fill: colors[`${params.dataIndexInside % 3}`]["right"],
},
},
{
type: "CubeTop_1",
shape: {
api,
xValue: api.value(0),
yValue: api.value(1),
x: location[0],
y: location[1],
xAxisPoint: api.coord([api.value(0), 0]),
},
style: {
fill: colors[`${params.dataIndexInside % 3}`]["top"],
},
},
],
};
},
data: data.valueList,
},
//
{
type: "bar",
xAxisIndex: 1,
label: {
show: true,
fontSize: 18,
position: "top",
color: "#ffffff",
formatter: function (data) {
return data.value - 5;
},
},
itemStyle: {
color: "rgba(221, 242, 255, 0)",
},
data: data.valueList.map((item) => parseInt(item) + 5),
barWidth: 20,
},
],
};
};
const setChart = () => {
var myChart = echarts.init(chart.value);
myChart.setOption(data.option);
};
const getMaxCeilingValue = (arr) => {
let max = Math.max(...arr); //
return Math.ceil(max / 100) * 100; // 100
};
const setChart1 = () => {
data.valueList = [];
data.xxname = [];
if (data.list.length !== 0) {
data.list.forEach((item) => {
data.xxname.push(item.name); //
data.valueList.push(item.num); //
});
}
};
onBeforeMount(() => {
setTimeout(() => {
data.list = props.list;
setChart1();
data.Max = getMaxCeilingValue(data.valueList);
maxList.value = data.valueList.map((item) => parseInt(data.Max) * 0.9); // data.Max 90%
getOption();
setChart();
}, 800);
});
</script>
<style lang="scss" scoped></style>

View File

@ -1,5 +1,5 @@
<template> <template>
<div ref="chart" style="width: 100%; height: 260px"></div> <div ref="chart" style="width: 100%; height: 280px"></div>
</template> </template>
<script setup > <script setup >
@ -19,26 +19,25 @@ const props = defineProps({
}); });
const data = reactive({ const data = reactive({
list: [], list: [],
wgcs: [100,140,230,100,130], zg: [3136,4345, 4964, 5846, 8076],
wgje: [150,100,200,14,100], cx: [3860,6980, 7585, 8858, 12737],
year: [2020,2021,2022,2023,2024], year: [2019,2020, 2021, 2022, 2023],
option: {}, option: {},
bg: [0,0,0,0,0], bg: [0, 0, 0, 0, 0],
}); });
const chart = ref(); // DOM const chart = ref(); // DOM
const getOption = () => { const getOption = () => {
data.option = { data.option = {
tooltip: { tooltip: {
trigger: "axis", trigger: "axis",
formatter: "{b0}<br />{a1}:{c1} <br />{a3}:{c3}万元 ", formatter: "{b0}<br />{a1}:{c1} <br />{a3}:{c3}",
}, },
legend: { legend: {
data: ["违规次数", "违规金额"], data: ["职工医疗保险", "城乡医疗保险"],
top: "6%", top: "6%",
right: "11%", right: "5%",
textStyle: { textStyle: {
fontSize: 16, fontSize: 16,
color: "#ffffff", color: "#ffffff",
@ -48,7 +47,7 @@ const getOption = () => {
top: "23%", top: "23%",
left: "1%", left: "1%",
right: "10%", right: "10%",
bottom: "5%", bottom: "0%",
containLabel: true, containLabel: true,
}, },
calculable: true, calculable: true,
@ -104,7 +103,7 @@ const getOption = () => {
}, },
}, },
axisLine: { axisLine: {
show: false, show: false,
lineStyle: { lineStyle: {
type: "dotted", type: "dotted",
}, },
@ -124,9 +123,9 @@ const getOption = () => {
name: "上部1", name: "上部1",
type: "pictorialBar", type: "pictorialBar",
symbolPosition: "end", symbolPosition: "end",
data: data.wgcs, data: data.zg,
symbol: "diamond", symbol: "diamond",
symbolOffset: ["-55%", "-50%"], symbolOffset: ["-65%", "-50%"],
symbolSize: [15, 10], symbolSize: [15, 10],
itemStyle: { itemStyle: {
borderColor: "#2fffa4", borderColor: "#2fffa4",
@ -135,10 +134,10 @@ const getOption = () => {
}, },
{ {
z: 1, z: 1,
name: "违规次数", name: "职工医疗保险",
type: "bar", type: "bar",
barGap: 0.3 /*多个并排柱子设置柱子之间的间距*/, barGap: 0.3 /*多个并排柱子设置柱子之间的间距*/,
data: data.wgcs, data: data.zg,
barWidth: "30%", barWidth: "30%",
label: { label: {
show: true, show: true,
@ -166,7 +165,7 @@ const getOption = () => {
name: "上部1", name: "上部1",
type: "pictorialBar", type: "pictorialBar",
symbolPosition: "end", symbolPosition: "end",
data: data.wgje, data: data.cx,
symbol: "diamond", symbol: "diamond",
symbolOffset: ["62%", "-50%"], symbolOffset: ["62%", "-50%"],
symbolSize: [15, 10], symbolSize: [15, 10],
@ -177,18 +176,18 @@ const getOption = () => {
}, },
{ {
z: 2, z: 2,
name: "违规金额", name: "城乡医疗保险",
type: "bar", type: "bar",
barGap: 0.3 /*多个并排柱子设置柱子之间的间距*/, barGap: 0.3 /*多个并排柱子设置柱子之间的间距*/,
data: data.wgje, data: data.cx,
barWidth: "30%", barWidth: "30%",
label: { label: {
show: true, show: true,
color: "#ffffff", color: "#ffffff",
position: "top", position: "top",
formatter: function (data) { // formatter: function (data) {
return data.value + "万"; // return data.value + "";
}, // },
}, },
// itemStyle: { // itemStyle: {
// color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
@ -202,7 +201,7 @@ const getOption = () => {
// }, // },
// ]), // ]),
// }, // },
itemStyle: { itemStyle: {
color: { color: {
type: "linear", type: "linear",
x: 0, x: 0,

View File

@ -0,0 +1,175 @@
<template>
<div ref="chart" style="width: 100%; height: 280px"></div>
</template>
<script setup >
import { onMounted, reactive, ref, onBeforeMount, defineProps } from "vue";
// echarts
import * as echarts from "echarts";
const props = defineProps({
list: {
type: Array,
default: () => [],
},
year: {
type: Array,
default: () => [],
},
});
const chart = ref(); // DOM
const data = reactive({
list1: [4167.703845,4736.436645, 5345.882021, 5761.09324, 7615.018745],
list2: [4160.310608,5668.346418, 6463.614862, 7169.546084, 9450.380778],
year: [2019,2020, 2021, 2022, 2023],
bg: [0, 0, 0, 0,0],
option: {},
});
const getOption = () => {
data.option = {
tooltip: {
trigger: "axis",
padding: [20, 10, 20, 10],
formatter: "{b0}<br />{a0}:{c0}万元<br />{a1}:{c1}万元 ",
},
legend: {
data: ["职工", "城乡"],
top: "6%",
right: "5%",
textStyle: {
fontSize: 16,
color: "#ffffff",
},
},
grid: {
top: "20%",
left: "1%",
right: "10%",
bottom: "3%",
containLabel: true,
},
xAxis: {
type: "category",
// boundaryGap: false,
data: data.year,
axisLabel: {
//
textStyle: {
color: "#ffffff",
fontSize: 16,
},
},
},
yAxis: {
name: "金额/万元",
type: "value",
nameTextStyle: {
// Y
fontSize: 14, // 20
},
splitLine: {
show: true,
lineStyle: {
color: "rgba(226, 226, 226, 0.3)",
width: 1,
},
},
axisLabel: {
//
textStyle: {
color: "#ffffff",
fontSize: 16,
},
},
axisLine: {
//y线
show: false,
lineStyle: {
color: "#ffffff",
fontSize: 16,
width: 1,
type: "solid",
},
},
},
series: [
{
name: "职工",
type: "line",
stack: "Total",
symbol: "emptyCircle",
smooth: true,
symbolSize: 10,
label: {
show: true,
color: "#ffffff",
position: "top",
fontSize: 14,
formatter: function (data) {
return data.value.toFixed(0);
},
},
itemStyle: {
borderColor: "#00FCFF",
borderWidth: 1,
color: "#00FCFF",
},
data: data.list1,
},
{
name: "城乡",
type: "line",
stack: "Total",
symbol: "emptyCircle",
smooth: true,
symbolSize: 10,
label: {
show: true,
color: "#ffffff",
position: "top",
fontSize: 14,
formatter: function (data) {
return data.value.toFixed(0);
},
},
itemStyle: {
borderColor: "#2468FF",
borderWidth: 1,
color: "#2468FF",
},
data: data.list2,
},
{
name: "背景",
type: "bar",
data: data.bg,
showBackground: true,
backgroundStyle: {
color: "rgba(180, 180, 180, 0.2)",
},
},
],
};
};
const setChart = () => {
// Vue3
var myChart = echarts.init(chart.value);
// 使
myChart.setOption(data.option);
};
onBeforeMount(() => {
setTimeout(() => {
// data.list = props.list;
// data.year = props.year;
getOption();
setChart();
}, 600);
});
</script>
<style scoped>
</style>

View File

@ -19,22 +19,21 @@ const props = defineProps({
}); });
const chart = ref(); // DOM const chart = ref(); // DOM
const data = reactive({ const data = reactive({
list: [6280,5924,1824], list: [6280, 5924, 1824],
year: [2022,2023,2024], year: [2022, 2023, 2024],
bg:[0,0,0], bg: [0, 0, 0],
option: {}, option: {},
}); });
const getOption = () => { const getOption = () => {
data.option = { data.option = {
tooltip: { tooltip: {
trigger: "axis", trigger: "axis",
padding: [20, 10, 20, 10], padding: [20, 10, 20, 10],
formatter: "{b0}<br />{a0}:{c0} ", formatter: "{b0}<br />{a0}:{c0} ",
}, },
grid: { grid: {
top: "5%", top: "15%",
left: "1%", left: "1%",
right: "10%", right: "10%",
bottom: "3%", bottom: "3%",
@ -62,7 +61,12 @@ const getOption = () => {
}, },
}, },
yAxis: { yAxis: {
name: "人数/次",
type: "value", type: "value",
nameTextStyle: {
// Y
fontSize: 14, // 20
},
splitLine: { splitLine: {
show: true, show: true,
lineStyle: { lineStyle: {
@ -77,6 +81,16 @@ const getOption = () => {
fontSize: 16, fontSize: 16,
}, },
}, },
axisLine: {
//y线
show: false,
lineStyle: {
color: "#ffffff",
fontSize: 16,
width: 1,
type: "solid",
},
},
}, },
series: [ series: [
{ {
@ -84,12 +98,13 @@ const getOption = () => {
type: "line", type: "line",
stack: "Total", stack: "Total",
symbol: "emptyCircle", symbol: "emptyCircle",
smooth: true,
symbolSize: 10, symbolSize: 10,
label: { label: {
show: true, show: true,
color: "#ffffff", color: "#ffffff",
position:'top', position: "top",
fontSize: 14,
formatter: function (data) { formatter: function (data) {
return data.value; return data.value;
}, },
@ -127,7 +142,7 @@ const getOption = () => {
data: data.list, data: data.list,
}, },
{ {
name: "背景", name: "背景",
type: "bar", type: "bar",
data: data.bg, data: data.bg,

View File

@ -1,5 +1,5 @@
<template> <template>
<div ref="chart" style="width: 100%; height: 210px"></div> <div ref="chart" style="width: 100%; height: 250px"></div>
</template> </template>
<script setup > <script setup >
@ -19,6 +19,10 @@ const props = defineProps({
type: Array, type: Array,
default: () => [], default: () => [],
}, },
list2: {
type: Array,
default: () => [],
},
year: { year: {
type: Array, type: Array,
default: () => [], default: () => [],
@ -26,6 +30,7 @@ const props = defineProps({
}); });
const data = reactive({ const data = reactive({
list: [], list: [],
list2: [],
year: [], year: [],
option: {}, option: {},
bg: [], bg: [],
@ -37,10 +42,19 @@ const getOption = () => {
tooltip: { tooltip: {
trigger: "axis", trigger: "axis",
padding: [20, 10, 20, 10], padding: [20, 10, 20, 10],
formatter: "{b0}<br />{a1}:{c1} ", formatter: "{b0}<br />{a1}:{c1}<br />{a2}:{c2} ",
},
legend: {
data: ["糖尿病人数", "高血压人数"],
top: "6%",
right: "11%",
textStyle: {
fontSize: 16,
color: "#ffffff",
},
}, },
grid: { grid: {
top: "5%", top: "25%",
left: "1%", left: "1%",
right: "10%", right: "10%",
bottom: "3%", bottom: "3%",
@ -99,7 +113,7 @@ const getOption = () => {
type: "line", type: "line",
stack: "Total", stack: "Total",
symbol: "emptyCircle", symbol: "emptyCircle",
smooth: true,
symbolSize: 10, symbolSize: 10,
itemStyle: { itemStyle: {
borderColor: "#E8FF00", borderColor: "#E8FF00",
@ -141,6 +155,53 @@ const getOption = () => {
}, },
data: data.list, data: data.list,
}, },
{
name: "高血压人数",
type: "line",
stack: "Total",
symbol: "emptyCircle",
smooth: true,
symbolSize: 10,
itemStyle: {
borderColor: "#00FCFF",
borderWidth: 1,
color: "#00FCFF",
},
label: {
show: true,
color: "#ffffff",
position: "top",
formatter: function (data) {
return data.value;
},
},
areaStyle: {
color: "#F4F65B",
normal: {
//线4x0,y0,x2,y2(0~1);true
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
[
{
offset: 0,
// color: 'RGBA(184, 204, 241, 1)'
color: "rgba(0, 252, 255, 0.50)",
},
{
offset: 1,
color: "rgba(0, 252, 255, 0)",
},
],
false
),
shadowBlur: 0, //shadowBlurshadowColor,shadowOffsetX/Y,
},
},
data: data.list2,
},
], ],
}; };
}; };
@ -149,6 +210,7 @@ watch(
(newValue, oldValue) => { (newValue, oldValue) => {
setTimeout(() => { setTimeout(() => {
data.list = props.list; data.list = props.list;
data.list2 = props.list2;
data.year = props.year; data.year = props.year;
data.year.forEach(() => { data.year.forEach(() => {
data.bg.push(0); data.bg.push(0);
@ -170,6 +232,7 @@ const setChart = () => {
onBeforeMount(() => { onBeforeMount(() => {
setTimeout(() => { setTimeout(() => {
data.list = props.list; data.list = props.list;
data.list2 = props.list2;
data.year = props.year; data.year = props.year;
data.year.forEach(() => { data.year.forEach(() => {
data.bg.push(0); data.bg.push(0);

View File

@ -46,40 +46,64 @@
></ePie2> ></ePie2>
<div></div> <div></div>
<div class="left_1_xia"> <div class="left_1_xia">
<!-- <div class="left_1_xia_item"> <div class="left_1_xia_item" style="flex:1.5">
<div class="choose">
<div
:class="
tabYd[0].choose == '异地就医人数' ? 'choose_1' : 'choose_2'
"
@click="changeYd('异地就医人数')"
>
异地就医人数
</div>
<div
:class="
tabYd[0].choose == '异地就医金额' ? 'choose_1' : 'choose_2'
"
@click="changeYd('异地就医金额')"
>
异地就医金额
</div>
</div>
<ePie3 <ePie3
:list="data.medicalInsurance.ffrc" :list="data.medicalInsurance.ffrc"
:year="data.medicalInsurance.year" :year="data.medicalInsurance.year"
v-if="showEchart && tabYd[0].choose == '异地就医人数'"
></ePie3> ></ePie3>
<div class="historyimg">医保基金监管</div> <ePie3_1
</div> --> :list="data.medicalInsurance.ffrc"
<div class="left_1_xia_item"> :year="data.medicalInsurance.year"
<ePie4 :list="data.lmb.gxyrs" :year="data.lmb.year"></ePie4> v-if="showEchart && tabYd[0].choose == '异地就医金额'"
></ePie3_1>
</div>
<div class="left_1_xia_item" style="margin-top: 40px">
<ePie4 :list="data.lmb.gxyrs" :year="data.lmb.year" v-if="showEchart"></ePie4>
<div class="historyimg">手工零星报销人数</div> <div class="historyimg">手工零星报销人数</div>
</div> </div>
</div> </div>
</div> </div>
<div class="flex1" style="margin-top: 10px"> <div class="flex1" style="margin-top: 10px">
<div class="yd_title " :class="lmb=='糖尿病'? 'left_3': 'left_3_1'" @click="lmbqh"> <div
<!-- <div class="qh" @click="lmbqh">{{ lmb }}</div> --> class="yd_title"
:class="lmb == '两慢病' ? 'left_3' : 'left_3_1'"
@click="lmbqh"
>
<div class="animate-border"> <div class="animate-border">
<i></i> <i></i>
<i></i> <i></i>
</div> </div>
</div> </div>
<div class="sm_title_1" v-if="lmb != '糖尿病'"></div>
<tnb <tnb
:list="data.lmb.tnbrs" :list="data.lmb.tnbrs"
:list2="data.lmb.gxyrs"
:year="data.lmb.year" :year="data.lmb.year"
v-if="showEchart && lmb != '糖尿病'" v-if="showEchart && lmb == '两慢病'"
></tnb> ></tnb>
<div class="sm_title_2" v-if="lmb != '高血压'"></div> <mfyyqk
<gxy :list="data.mfyyqk"
:list="data.lmb.gxyrs" v-if="showEchart && lmb == '免费用药情况'"
:year="data.lmb.year" ></mfyyqk>
v-if="showEchart && lmb != '高血压'"
></gxy>
</div> </div>
</div> </div>
<div class="displayFlex center_bg"> <div class="displayFlex center_bg">
@ -233,6 +257,7 @@
import ePie from "./echarts_hygiene/pie.vue"; import ePie from "./echarts_hygiene/pie.vue";
import ePie2 from "./echarts_hygiene/pie2.vue"; import ePie2 from "./echarts_hygiene/pie2.vue";
import ePie3 from "./echarts_hygiene/pie3.vue"; import ePie3 from "./echarts_hygiene/pie3.vue";
import ePie3_1 from "./echarts_hygiene/pie3_1.vue";
import ePie4 from "./echarts_hygiene/pie4.vue"; import ePie4 from "./echarts_hygiene/pie4.vue";
import eP2 from "./echarts_hygiene/eP2.vue"; import eP2 from "./echarts_hygiene/eP2.vue";
import eP3 from "./echarts_hygiene/eP3.vue"; import eP3 from "./echarts_hygiene/eP3.vue";
@ -242,30 +267,25 @@ import eP5 from "./echarts_hygiene/eP5.vue";
import eP4 from "./echarts_hygiene/eP4.vue"; import eP4 from "./echarts_hygiene/eP4.vue";
import eP4_1 from "./echarts_hygiene/eP4_1.vue"; import eP4_1 from "./echarts_hygiene/eP4_1.vue";
import tnb from "./echarts_hygiene/tnb.vue"; import tnb from "./echarts_hygiene/tnb.vue";
import gxy from "./echarts_hygiene/gxy.vue"; import mfyyqk from "./echarts_hygiene/mfyyqk.vue";
import { ref, reactive, onMounted, onBeforeMount } from "vue"; import { ref, reactive, onMounted, onBeforeMount } from "vue";
import http from "@/utils/request.js"; import http from "@/utils/request.js";
const lmb = ref("高血压"); const lmb = ref("两慢病");
const showEchart = ref(false); const showEchart = ref(false);
const leftchoose = ref({ const leftchoose = ref({
first: "1", first: "1",
second: "1", second: "1",
third: "1", third: "1",
}); });
const lmbqh = () => {
if (lmb.value == "高血压") {
lmb.value = "糖尿病";
} else {
lmb.value = "高血压";
}
console.log(lmb.value);
};
const change = (name, index) => {
leftchoose.value[name] = index;
};
const data = reactive({ const data = reactive({
medicalInsurance: {}, // medicalInsurance: {}, //
lmb: {}, // lmb: {}, //
mfyyqk: [
{ name: "2020", num: 1399947.19 },
{ name: "2021", num: 4968369.09 },
{ name: "2022", num: 6452334.81 },
{ name: "2023", num: 7301560.28 },
], //
mz: {}, // mz: {}, //
jkda: {}, // jkda: {}, //
jsbgl: [], // jsbgl: [], //
@ -273,6 +293,25 @@ const data = reactive({
jktj: {}, //65 jktj: {}, //65
jkhd: [], // jkhd: [], //
}); });
const tabYd = ref([
{
choose: "异地就医人数",
},
]);
const changeYd = (name) => {
tabYd.value[0].choose = name;
};
const lmbqh = () => {
if (lmb.value == "两慢病") {
lmb.value = "免费用药情况";
} else {
lmb.value = "两慢病";
}
};
//
const change = (name, index) => {
leftchoose.value[name] = index;
};
// //
const mainRef = ref(null); const mainRef = ref(null);
let isAutoScrolling = true; let isAutoScrolling = true;
@ -618,13 +657,13 @@ const getData = async () => {
// } // }
.left_3 { .left_3 {
background-image: url(@/assets/images/hygiene/gxy_new.png); background-image: url(@/assets/images/hygiene/lmb.png);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
cursor: pointer; cursor: pointer;
} }
.left_3_1 { .left_3_1 {
background-image: url(@/assets/images/hygiene/tnb_new.png); background-image: url(@/assets/images/hygiene/mfyyqk.png);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
cursor: pointer; cursor: pointer;
@ -1221,4 +1260,44 @@ const getData = async () => {
margin-top: 15px; margin-top: 15px;
margin-bottom: 10px; margin-bottom: 10px;
} }
.choose {
display: flex;
justify-content: center;
margin-top: 5px;
margin-bottom: 5px;
.choose_1 {
cursor: pointer;
width: 124px;
height: 42px;
display: flex;
align-items: center;
justify-content: center;
font-weight: 500;
font-size: 16px;
color: #ffffff;
line-height: 22px;
margin-right: 15px;
background-image: url(@/assets/images/work/choose.png);
background-repeat: no-repeat;
background-size: 100% 100%;
}
.choose_2 {
cursor: pointer;
width: 124px;
height: 42px;
display: flex;
align-items: center;
justify-content: center;
font-weight: 500;
font-size: 16px;
color: #ffffff;
line-height: 22px;
margin-right: 15px;
background-image: url(@/assets/images/work/noChoose.png);
background-repeat: no-repeat;
background-size: 100% 100%;
}
}
</style> </style>