This commit is contained in:
姚宇浩 2024-04-18 14:52:07 +08:00
parent 8981fd2476
commit f255a861a8
6 changed files with 916 additions and 112 deletions

View File

@ -1,5 +1,5 @@
<template>
<div ref="chart" style="width: 100%; height:250px;"></div>
<div ref="chart" style="width: 100%; height: 330px"></div>
</template>
<script setup>
@ -9,8 +9,8 @@ import * as echarts from "echarts";
const chart = ref(); // DOM
const data = [120, 200, 50, 80, 70, ];
const lineData = [150, 230, 24, 218, 135,];
const data = [120, 200, 50, 80, 70];
const lineData = [150, 230, 24, 218, 135];
const max = data
.concat(lineData)
.reduce((pre, cur) => (pre > cur ? pre : cur), 0); //
@ -77,8 +77,8 @@ const option = {
},
},
axisTick: {
show: false, //
},
show: false, //
},
data: ["2019", "2020", "2021", "2022", "2023"],
},
{
@ -88,7 +88,7 @@ const option = {
},
],
yAxis: [
{
{
type: "value",
scale: true,
name: "救助人数",
@ -146,16 +146,11 @@ const option = {
},
},
},
],
series: [
{
name: "救助金额",
data: data,
barWidth: 20,
type: "bar",
},
{
name: "救助人数",
data: lineData,
type: "line", //线
itemStyle: {
@ -164,6 +159,24 @@ const option = {
color: "#00FCFF",
},
},
{
name: "救助人数",
data: data,
barWidth: 20,
type: "bar",
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "rgba(142, 187, 255, 1)",
},
{
offset: 1,
color: "rgba(142, 187, 255, 0.20)",
},
]),
},
},
{
xAxisIndex: 1,
itemStyle: {

View File

@ -0,0 +1,230 @@
<template>
<div ref="chart" style="width: 100%; height: 330px"></div>
</template>
<script setup>
import { onMounted, reactive, ref } from "vue";
// echarts
import * as echarts from "echarts";
const chart = ref(); // DOM
const data = [120, 200, 50, 80, 70];
const lineData = [150, 230, 24, 218, 135];
const max = data
.concat(lineData)
.reduce((pre, cur) => (pre > cur ? pre : cur), 0); //
//
const color = [
{
type: "linear",
x: 0,
x2: 0,
y: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "rgba(142, 187, 255, 1)",
},
{
offset: 0.5,
color: "rgba(142, 187, 255, 0.5)",
},
{
offset: 1,
color: "rgba(142, 187, 255, 0.20)",
},
],
},
];
const option = {
tooltip: {
trigger: "axis",
formatter: "{b0}<br/> {a0}:{c0}<br/>{a1}:{c1}",
axisPointer: {
type: "cross",
label: {
backgroundColor: "#3F82F7", //
},
},
},
legend: {
data: ["救助金额", "救助人数"],
top: "8%",
textStyle: {
fontSize: 12,
color: "#ffffff", //
},
},
grid: {
left: "6%",
right: "9%",
bottom: "0%",
containLabel: true,
color: "#ffffff",
},
calculable: true,
color,
xAxis: [
{
type: "category",
axisLabel: {
//
textStyle: {
color: "#ffffff",
},
},
axisTick: {
show: false, //
},
data: ["2019", "2020", "2021", "2022", "2023"],
},
{
type: "category",
show: false,
data: ["2019", "2020", "2021", "2022", "2023"],
},
],
yAxis: [
{
type: "value",
scale: true,
name: "救助人数",
max: max,
splitLine: {
//线
show: false,
lineStyle: {
color: "#ffffff",
width: 1,
},
},
axisLabel: {
//y
textStyle: {
color: "#ffffff",
},
},
axisLine: {
//y线
show: false,
lineStyle: {
color: "#ffffff",
width: 1,
type: "solid",
},
},
},
{
type: "value",
scale: true,
min: 0,
max: max,
name: "救助金额/万",
splitLine: {
show: false,
lineStyle: {
color: "rgba(226, 226, 226, 0.3)",
width: 1,
},
},
axisLabel: {
//y
textStyle: {
color: "#ffffff",
},
},
axisLine: {
//y线
show: false,
lineStyle: {
color: "#ffffff",
width: 1,
type: "solid",
},
},
},
],
series: [
{
name: "救助金额",
data: lineData,
type: "line", //线
itemStyle: {
borderColor: "#00FCFF",
borderWidth: 1,
color: "#2468FF",
},
},
{
name: "救助人数",
data: data,
barWidth: 20,
type: "bar",
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)",
},
]),
},
},
{
xAxisIndex: 1,
itemStyle: {
color: "rgba(180, 180, 180, 0.2)", //
},
data: data.map(() => max),
barWidth: 40, //
emphasis: {
itemStyle: {
color: {
type: "linear",
x: 0,
x2: 0,
y: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "rgba(64, 247, 176, 0.25)",
},
{
offset: 1,
color: "rgba(17, 34, 64, 0.25)",
},
],
},
},
},
type: "bar",
},
],
};
// 使
onMounted(() => {
// domecharts
// var myChart = echarts.init(document.getElementById('main'));
// Vue3
var myChart = echarts.init(chart.value);
// init(); // vue3.2this
// 使
myChart.setOption(option);
// :
// window.addEventListener("resize", () => {
// myChart.resize();
// });
});
</script>
<style scoped></style>

View File

@ -0,0 +1,329 @@
<template>
<div ref="chart" style="width: 100%; height: 280px"></div>
</template>
<script setup>
import { onMounted, reactive, ref } from "vue";
// echarts
import * as echarts from "echarts";
const chart = ref(); // DOM
const data = [120, 200, 50, 80, 70];
const data2 = [12, 20, 5, 8, 7];
const data3 = [20, 100, 40, 80, 70];
const lineData = [150, 230, 24, 218, 135];
const lineData2 = [15, 23, 4, 18, 15];
const max = data
.concat(lineData)
.reduce((pre, cur) => (pre > cur ? pre : cur), 0); //
//
const color = [
{
type: "linear",
x: 0,
x2: 0,
y: 0,
y2: 1,
},
];
const option = {
tooltip: {
trigger: "axis",
formatter: "{b0}<br/> {a0}:{c0}<br/>{a1}:{c1}",
axisPointer: {
type: "cross",
label: {
backgroundColor: "#3F82F7", //
},
},
},
// legend: [
// {
// orient: "horizontal",
// icon: "circle",
// align: "left",
// bottom: "0",
// itemWidth: 8,
// itemHeight: 8,
// y: "20",
// x: "center",
// data: ["", ""],
// formatter: (name) => {
// return `{b|${name}} `;
// },
// textStyle: {
// color: "#999999",
// fontSize: 12,
// align: "left",
// //
// backgroundColor: "transparent",
// rich: {
// b: {
// width: 200,
// },
// },
// },
// },
// {
// orient: "horizontal",
// icon: "circle",
// align: "left",
// bottom: "0",
// itemWidth: 8,
// itemHeight: 8,
// y: "40",
// x: "center",
// data: ["", "", "/"],
// formatter: (name) => {
// return `{a|${name}} `;
// },
// textStyle: {
// color: "#999999",
// fontSize: 12,
// align: "left",
// //
// backgroundColor: "transparent",
// rich: {
// a: {
// width: 200,
// },
// },
// },
// },
// ],
legend: {
data: [
"特困救助金额",
"低保救助金额",
"",
"特困救助人次",
"低保救助人次",
"低边救助人次",
],
top: "8%",
textStyle: {
fontSize: 12,
color: "#ffffff", //
},
},
grid: {
top: "28%",
left: "6%",
right: "9%",
bottom: "0%",
containLabel: true,
color: "#ffffff",
},
calculable: true,
color,
xAxis: [
{
type: "category",
axisLabel: {
//
textStyle: {
color: "#ffffff",
},
},
axisTick: {
show: false, //
},
data: ["2019", "2020", "2021", "2022", "2023"],
},
{
type: "category",
show: false,
data: ["2019", "2020", "2021", "2022", "2023"],
},
],
yAxis: [
{
type: "value",
scale: true,
name: "救助人数",
max: max,
splitLine: {
//线
show: false,
lineStyle: {
color: "#ffffff",
width: 1,
},
},
axisLabel: {
//y
textStyle: {
color: "#ffffff",
},
},
axisLine: {
//y线
show: false,
lineStyle: {
color: "#ffffff",
width: 1,
type: "solid",
},
},
},
{
type: "value",
scale: true,
min: 0,
max: max,
name: "救助金额/万",
splitLine: {
show: false,
lineStyle: {
color: "rgba(226, 226, 226, 0.3)",
width: 1,
},
},
axisLabel: {
//y
textStyle: {
color: "#ffffff",
},
},
axisLine: {
//y线
show: false,
lineStyle: {
color: "#ffffff",
width: 1,
type: "solid",
},
},
},
],
series: [
{
name: "特困救助金额",
data: lineData,
type: "line", //线
itemStyle: {
borderColor: "#00FCFF",
borderWidth: 1,
color: "#00FCFF",
},
},
{
name: "低保救助金额",
data: lineData2,
type: "line", //线
itemStyle: {
borderColor: "#00FCFF",
borderWidth: 1,
color: "#2468FF",
},
},
{
name: "特困救助人次",
data: data,
barWidth: 10,
type: "bar",
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "rgba(142, 187, 255, 1)",
},
{
offset: 1,
color: "rgba(142, 187, 255, 0.20)",
},
]),
},
},
{
name: "低保救助人次",
data: data2,
barWidth: 10,
type: "bar",
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "rgba(23, 136, 255, 1)",
},
{
offset: 1,
color: "rgba(23, 136, 255, 0.20)",
},
]),
},
},
{
name: "低边救助人次",
data: data3,
barWidth: 10,
type: "bar",
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)",
},
]),
},
},
{
xAxisIndex: 1,
itemStyle: {
color: "rgba(180, 180, 180, 0.2)", //
},
data: data.map(() => max),
barWidth: 60, //
emphasis: {
itemStyle: {
color: {
type: "linear",
x: 0,
x2: 0,
y: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "rgba(64, 247, 176, 0.25)",
},
{
offset: 1,
color: "rgba(17, 34, 64, 0.25)",
},
],
},
},
},
type: "bar",
},
],
};
// 使
onMounted(() => {
// domecharts
// var myChart = echarts.init(document.getElementById('main'));
// Vue3
var myChart = echarts.init(chart.value);
// init(); // vue3.2this
// 使
myChart.setOption(option);
// :
// window.addEventListener("resize", () => {
// myChart.resize();
// });
});
</script>
<style scoped></style>

View File

@ -0,0 +1,255 @@
<template>
<div ref="chart" style="width: 100%; height: 360px"></div>
</template>
<script setup>
import { onMounted, reactive, ref } from "vue";
// echarts
import * as echarts from "echarts";
const chart = ref(); // DOM
const data = [120, 200, 50, 80, 70];
const data2 = [12, 20, 5, 8, 7];
const lineData = [150, 230, 24, 218, 135];
const lineData2 = [15, 23, 4, 18, 15];
const max = data
.concat(lineData)
.reduce((pre, cur) => (pre > cur ? pre : cur), 0); //
//
const color = [
{
type: "linear",
x: 0,
x2: 0,
y: 0,
y2: 1,
},
];
const option = {
tooltip: {
trigger: "axis",
formatter: "{b0}<br/> {a0}:{c0}<br/>{a1}:{c1}",
axisPointer: {
type: "cross",
label: {
backgroundColor: "#3F82F7", //
},
},
},
legend: {
data: [
"困难残疾人生活补贴人数",
"护理补贴人数",
"",
"困难残疾人生活补贴金额",
"护理补贴金额",
],
top: "3%",
textStyle: {
fontSize: 12,
color: "#ffffff", //
},
},
grid: {
top: "25%",
left: "6%",
right: "9%",
bottom: "5%",
containLabel: true,
color: "#ffffff",
},
calculable: true,
color,
xAxis: [
{
type: "category",
axisLabel: {
//
textStyle: {
color: "#ffffff",
},
},
axisTick: {
show: false, //
},
data: ["2019", "2020", "2021", "2022", "2023"],
},
{
type: "category",
show: false,
data: ["2019", "2020", "2021", "2022", "2023"],
},
],
yAxis: [
{
type: "value",
scale: true,
name: "补贴人数",
max: max,
splitLine: {
//线
show: false,
lineStyle: {
color: "#ffffff",
width: 1,
},
},
axisLabel: {
//y
textStyle: {
color: "#ffffff",
},
},
axisLine: {
//y线
show: false,
lineStyle: {
color: "#ffffff",
width: 1,
type: "solid",
},
},
},
{
type: "value",
scale: true,
min: 0,
max: max,
name: "救助金额/元",
splitLine: {
show: false,
lineStyle: {
color: "rgba(226, 226, 226, 0.3)",
width: 1,
},
},
axisLabel: {
//y
textStyle: {
color: "#ffffff",
},
},
axisLine: {
//y线
show: false,
lineStyle: {
color: "#ffffff",
width: 1,
type: "solid",
},
},
},
],
series: [
{
name: "困难残疾人生活补贴金额",
data: lineData,
type: "line", //线
itemStyle: {
borderColor: "#00FCFF",
borderWidth: 1,
color: "#00FCFF",
},
},
{
name: "护理补贴金额",
data: lineData2,
type: "line", //线
itemStyle: {
borderColor: "#00FCFF",
borderWidth: 1,
color: "#2468FF",
},
},
{
name: "困难残疾人生活补贴人数",
data: data,
barWidth: 10,
type: "bar",
itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "rgba(142, 187, 255, 1)",
},
{
offset: 1,
color: "rgba(142, 187, 255, 0.20)",
},
]),
},
},
{
name: "护理补贴人数",
data: data2,
barWidth: 10,
type: "bar",
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)",
},
]),
},
},
{
xAxisIndex: 1,
itemStyle: {
color: "rgba(180, 180, 180, 0.2)", //
},
data: data.map(() => max),
barWidth: 60, //
emphasis: {
itemStyle: {
color: {
type: "linear",
x: 0,
x2: 0,
y: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "rgba(64, 247, 176, 0.25)",
},
{
offset: 1,
color: "rgba(17, 34, 64, 0.25)",
},
],
},
},
},
type: "bar",
},
],
};
// 使
onMounted(() => {
// domecharts
// var myChart = echarts.init(document.getElementById('main'));
// Vue3
var myChart = echarts.init(chart.value);
// init(); // vue3.2this
// 使
myChart.setOption(option);
// :
// window.addEventListener("resize", () => {
// myChart.resize();
// });
});
</script>
<style scoped></style>

View File

@ -69,8 +69,6 @@ let option = {
},
{
type: "value",
min: 0,
max: 100,
splitLine: {
show: false,
lineStyle: {

View File

@ -8,14 +8,49 @@
@click="zxjzChange()"
></div>
<div class="choose">
<div :class="jz[0].choose == '1' ? 'choose_1' : 'choose_2'" @click="jzChange(0,'1')">教育</div>
<div :class="jz[0].choose == '2' ? 'choose_1' : 'choose_2'" @click="jzChange(0,'2')">医疗</div>
<div :class="jz[0].choose == '3' ? 'choose_1' : 'choose_2'" @click="jzChange(0,'3')">就业</div>
<div
:class="jz[0].choose == '1' ? 'choose_1' : 'choose_2'"
@click="jzChange(0, '1')"
>
教育
</div>
<div
:class="jz[0].choose == '2' ? 'choose_1' : 'choose_2'"
@click="jzChange(0, '2')"
>
医疗
</div>
<div
:class="jz[0].choose == '3' ? 'choose_1' : 'choose_2'"
@click="jzChange(0, '3')"
>
就业
</div>
</div>
<eP1></eP1>
</div>
<div class="flex1">
<!-- <div class="yd_title left_2"></div> -->
<div class="choose">
<div
:class="jz[1].choose == '1' ? 'choose_1' : 'choose_2'"
@click="jzChange(1, '1')"
>
住房
</div>
<div
:class="jz[1].choose == '2' ? 'choose_1' : 'choose_2'"
@click="jzChange(1, '2')"
>
自然灾害
</div>
<div
:class="jz[1].choose == '3' ? 'choose_1' : 'choose_2'"
@click="jzChange(1, '3')"
>
临时救助
</div>
</div>
<eP2></eP2>
</div>
</div>
<div class="displayFlex center_bg">
@ -66,32 +101,7 @@
</div>
</div>
<div class="flex1">
<div style="width: 100%; display: flex; flex-wrap: wrap">
<edie></edie>
<div class="rating">
<edXX :list="selectData.list1" :active="selectData.active"></edXX>
<div class="ratingBtn">
<div
class="onImg"
:class="{ ratingImg: selectData.active === '城市' }"
>
<span @click="ratingBtn('城市')">城市</span>
</div>
<div
class="onImg"
:class="{ ratingImg: selectData.active === '县镇' }"
>
<span @click="ratingBtn('县镇')">县镇</span>
</div>
<div
class="onImg"
:class="{ ratingImg: selectData.active === '农村' }"
>
<span @click="ratingBtn('农村')">农村</span>
</div>
</div>
</div>
</div>
<eP3></eP3>
</div>
<div class="flex1">
<div class="fundingBox">
@ -117,53 +127,31 @@
<div class="displayFlex right_bg">
<div class="flex1">
<div class="yd_title right_1"></div>
<div class="czr-sl">
<div class="historyimg historyimg1">
<span>覆盖医疗机构数量</span>
<span>22</span>
<div class="choose">
<div
:class="jz[2].choose == '1' ? 'choose_1' : 'choose_2'"
@click="jzChange(2, '1')"
>
困难残疾人
</div>
<div class="historyimg historyimg2">
<span>启用角色数量</span>
<span>101</span>
<div
:class="jz[2].choose == '2' ? 'choose_1' : 'choose_2'"
@click="jzChange(2, '2')"
>
困难军人
</div>
<!-- <img src="@/assets/eduImg/jyImg14.png" alt="" />
<img src="@/assets/eduImg/jyImg15.png" alt="" /> -->
</div>
<edCSR></edCSR>
</div>
<div class="flex11">
<div class="earlyWarning">
<div class="earlyWarning1">
<div>
<span class="green">16</span>
</div>
<img src="@/assets/eduImg/jyImg10.png" alt="" />
<div class="historyimg historyimg1">
<span>绿色预警</span>
</div>
</div>
<div class="earlyWarning1">
<div>
<span class="yellow">239</span>
</div>
<img src="@/assets/eduImg/jyImg9.png" alt="" />
<div class="historyimg historyimg2">
<span>黄色预警</span>
</div>
</div>
<div class="earlyWarning1">
<div>
<span class="red">139</span>
</div>
<img src="@/assets/eduImg/jyImg8.png" alt="" />
<div class="historyimg historyimg3">
<span>红色预警</span>
</div>
<div
:class="jz[2].choose == '3' ? 'choose_1' : 'choose_2'"
@click="jzChange(2, '3')"
>
困难职工
</div>
</div>
<eP4></eP4>
</div>
<div class="flex1">
<div style="display: flex; justify-content: center">
<div class="yd_title right_2"></div>
<div style="margin-top:20px;">
<div class="czr-bj">
<div class="czrBox">
<div class="situation situation1"></div>
@ -189,7 +177,9 @@
<script setup>
import { ref, reactive, onMounted, onBeforeMount } from "vue";
import eP1 from "./echarts_work/eP1.vue";
import eP2 from "./echarts_work/eP2.vue";
import eP3 from "./echarts_work/eP3.vue";
import eP4 from "./echarts_work/eP4.vue";
const zxjz = ref(true);
const zxjzChange = () => {
zxjz.value = !zxjz.value;
@ -201,12 +191,13 @@ const jz = ref([
{
choose: "1",
},
{
choose: "1",
},
]);
const jzChange=(index,value)=>{
const jzChange = (index, value) => {
jz.value[index].choose = value;
}
};
const selectData = reactive({
value1: "111",
@ -435,13 +426,18 @@ onBeforeMount(() => {
}
.center_1 {
background-image: url(@/assets/eduImg/title3.png);
background-image: url(@/assets/images/work/center.png);
background-repeat: no-repeat;
background-size: 100% 100%;
}
.right_1 {
background-image: url(@/assets/eduImg/title4.png);
background-image: url(@/assets/images/work/right_1.png);
background-repeat: no-repeat;
background-size: 100% 100%;
}
.right_2 {
background-image: url(@/assets/images/work/right_2.png);
background-repeat: no-repeat;
background-size: 100% 100%;
}
@ -690,8 +686,9 @@ onBeforeMount(() => {
display: flex;
justify-content: center;
margin-top: 47px;
margin-bottom: 20px;
.choose_1 {
cursor: pointer;
width: 124px;
height: 42px;
display: flex;
@ -707,6 +704,7 @@ onBeforeMount(() => {
background-size: 100% 100%;
}
.choose_2 {
cursor: pointer;
width: 124px;
height: 42px;
display: flex;
@ -1163,23 +1161,4 @@ onBeforeMount(() => {
-webkit-box-shadow: inset 0 0 6px rgba(20, 20, 20, 0.3);
}
</style>
<style lang="scss">
.selectBox {
.el-select--large .el-select__wrapper {
font-size: 18px !important;
}
.el-select__wrapper {
background-color: rgba(255, 255, 255, 0) !important;
}
.el-select__placeholder {
color: #fff !important;
}
.el-select__caret {
color: #fff !important;
font-size: 18px !important;
}
}
</style>