This commit is contained in:
姚宇浩 2024-10-24 17:01:13 +08:00
commit 6650896e88
10 changed files with 421 additions and 406 deletions

BIN
dist.zip

Binary file not shown.

View File

@ -94,7 +94,7 @@ const updateSeries = () => {
data.legend.data = data.list.map((item) => item.name);
data.formatter =
"{b0}<br />" +
"{b0}<br />" +
data.list.map((_, index) => `{a${index}}:{c${index}}<br />`).join("");
};
@ -195,29 +195,11 @@ const setChart = () => {
myChart.setOption(data.option);
};
// watch(
// () => props.list,
// (newVal, oldVal) => {
// if (newVal.length < oldVal.length) {
// clear.value = true;
// } else {
// clear.value = false;
// }
// data.list = newVal;
// updateSeries();
// getOption();
// setChart();
// }
// );
onMounted(() => {
setTimeout(() => {
data.list = props.list;
data.month = props.month;
// console.log(666, data.list, data.month);
// data.month.forEach((item) => {
// item = item + "";
// });
data.month = props.month.map((item) => item + "月");
updateSeries();
getOption();

View File

@ -619,8 +619,6 @@ onBeforeMount(() => {
// data.xxname = props.list.year;
data.list = props.list;
setChart1()
// console.log(666,data.valueList,data.valueList2);
getOption();
setChart();
}, 800);

View File

@ -204,8 +204,6 @@ const setChart = () => {
onBeforeMount(() => {
setTimeout(() => {
data.list = props.list;
console.log(666,data.list);
getOption();
setChart();
}, 600);

View File

@ -28,7 +28,7 @@ const props = defineProps({
// return [];
// },
// },
year: {
month: {
type: Array,
default: () => {
return [];
@ -42,7 +42,7 @@ const data = reactive({
list: [],
list1: [],
list2: [],
year: [],
month: [],
option: {},
// max: null,
});
@ -60,7 +60,7 @@ const getOption = () => {
formatter: "{b0}<br/> {a0}:{c0}<br/>{a1}:{c1}",
},
legend: {
data: ["救助金额", "救助人数"],
data: ["失业保险金享受人数", "发放失业保险金金额"],
top: "8%",
textStyle: {
fontSize: 14,
@ -68,8 +68,8 @@ const getOption = () => {
},
},
grid: {
left: "6%",
right: "9%",
left: "3%",
right: "3%",
bottom: "0%",
containLabel: true,
color: "#ffffff",
@ -91,19 +91,19 @@ const getOption = () => {
show: false, //
},
// data: ["2019", "2020", "2021", "2022", "2023"],
data: data.list.year,
data: data.month,
},
{
type: "category",
show: false,
data: data.list.year,
data: data.month,
},
],
yAxis: [
{
type: "value",
scale: true,
name: "救助人数",
// name: "",
min: 0,
splitLine: {
//线
@ -136,8 +136,7 @@ const getOption = () => {
type: "value",
scale: true,
min: 0,
name: "救助金额/万",
// name: "/",
splitLine: {
show: false,
lineStyle: {
@ -192,7 +191,7 @@ const getOption = () => {
series: [
{
yAxisIndex: 1,
name: "救助金额",
name: "失业保险金享受人数",
data: data.list2,
type: "line", //线
stack: "Total",
@ -207,15 +206,15 @@ const getOption = () => {
},
},
itemStyle: {
borderColor: "#00FCFF",
borderColor: "rgba(165, 255, 200, 1)",
borderWidth: 1,
color: "#00FCFF",
color: "rgba(165, 255, 200, 1)",
},
},
{
z: 1,
yAxisIndex: 0,
name: "救助人数",
name: "发放失业保险金金额",
data: data.list1,
barWidth: 20,
type: "bar",
@ -235,10 +234,10 @@ const getOption = () => {
y: 0,
y2: 0,
colorStops: [
{ offset: 0, color: "rgba(255, 242, 142, .7)" },
{ offset: 0.5, color: "rgba(255, 242, 142, .7)" },
{ offset: 0.5, color: "rgba(255, 242, 142, .3)" },
{ offset: 1, color: "rgba(255, 242, 142, .5)" },
{ offset: 0, color: "rgba(142, 187, 255, 0.7)" },
{ offset: 0.5, color: "rgba(142, 187, 255, 0.7)" },
{ offset: 0.5, color: "rgba(142, 187, 255, 0.3)" },
{ offset: 1, color: "rgba(142, 187, 255, 0.5)" },
],
},
},
@ -271,8 +270,8 @@ const getOption = () => {
itemStyle: {
color: "rgba(221, 242, 255, 0.1)",
},
data: data.list.year.map(() => 100),
barWidth: 50,
data: data.month.map(() => 100),
barWidth: 30,
},
{
z: 1,
@ -282,10 +281,9 @@ const getOption = () => {
symbol: "diamond",
symbolOffset: ["0%", "-50%"],
symbolSize: [21, 15],
itemStyle: {
borderColor: "#2fffa4",
color: "rgba(255, 242, 142, 1)",
color: "rgba(142, 187, 255, 1)",
},
},
],
@ -301,31 +299,33 @@ const setChart1 = () => {
if (data.list.length !== 0) {
data.list1 = [];
data.list2 = [];
data.list.data.forEach((item) => {
data.list1.push(item.jzrs); //
data.list2.push(item.jzje); //
});
data.list1 = data.list.sybxjxsrs;
data.list2 = data.list.ffsybxjje;
// data.list.forEach((item) => {
// data.list1.push(item.sybxjxsrs); //
// data.list2.push(item.ffsybxjje); //
// });
}
};
watch(
() => props.list,
(newVal, oldVal) => {
data.list = newVal;
// console.log("1", data.list);
// setChart1();
// getOption();
// setChart();
data.month = props.month.map((item) => item + "月");
setChart1();
getOption();
setChart();
}
);
// 使
onBeforeMount(() => {
// setTimeout(() => {
// data.list = props.list;
// setChart1();
// // console.log(data.list, "");
// getOption();
// setChart();
// }, 600);
setTimeout(() => {
data.list = props.list;
data.month = props.month.map((item) => item + "月");
setChart1();
getOption();
setChart();
}, 600);
});
</script>

View File

@ -7,9 +7,9 @@ import {
onBeforeMount,
onMounted,
ref,
watch,
reactive,
defineProps,
watch,
nextTick,
} from "vue";
// echarts
@ -28,7 +28,7 @@ const props = defineProps({
// return [];
// },
// },
year: {
month: {
type: Array,
default: () => {
return [];
@ -42,28 +42,35 @@ const data = reactive({
list: [],
list1: [],
list2: [],
year: [],
month: [],
option: {},
// max: null,
});
// const data1 = [120, 200, 50, 80, 70];
// const lineData = [1500, 2300, 204, 2018, 1305];
// const max = data1
// .concat(lineData)
// .reduce((pre, cur) => (pre > cur ? pre : cur), 0); //
const getOption = () => {
data.option = {
tooltip: {
trigger: "axis",
formatter: "{b0}<br/> {a0}:{c0}<br/>{a1}:{c1}",
},
legend: {
data: ["救助金额", "救助人数"],
top: "8%",
textStyle: {
fontSize: 14,
color: "#ffffff", //
},
formatter: "{b0}<br/> {a0}:{c0}",
},
// legend: {
// data: [""],
// top: "8%",
// textStyle: {
// fontSize: 14,
// color: "#ffffff", //
// },
// },
grid: {
left: "6%",
right: "9%",
top: "0",
left: "3%",
right: "3%",
bottom: "0%",
containLabel: true,
color: "#ffffff",
@ -85,19 +92,19 @@ const getOption = () => {
show: false, //
},
// data: ["2019", "2020", "2021", "2022", "2023"],
data: data.list.year,
data: data.month,
},
{
type: "category",
show: false,
data: data.list.year,
data: data.month,
},
],
yAxis: [
{
type: "value",
scale: true,
name: "救助人数",
// name: "",
min: 0,
splitLine: {
//线
@ -130,8 +137,7 @@ const getOption = () => {
type: "value",
scale: true,
min: 0,
name: "救助金额/万",
// name: "/",
splitLine: {
show: false,
lineStyle: {
@ -184,33 +190,33 @@ const getOption = () => {
},
],
series: [
{
yAxisIndex: 1,
name: "救助金额",
data: data.list2,
type: "line", //线
stack: "Total",
symbol: "emptyCircle",
symbolSize: 10,
label: {
show: true,
position: "top",
color: "#ffffff",
formatter: function (data) {
return data.value;
},
},
itemStyle: {
borderColor: "#00FCFF",
borderWidth: 1,
color: "#2468FF",
},
},
// {
// yAxisIndex: 1,
// name: "",
// data: data.list2,
// type: "line", //线
// stack: "Total",
// symbol: "emptyCircle",
// symbolSize: 10,
// label: {
// show: true,
// position: "top",
// color: "#ffffff",
// formatter: function (data) {
// return data.value;
// },
// },
// itemStyle: {
// borderColor: "rgba(165, 255, 200, 1)",
// borderWidth: 1,
// color: "rgba(165, 255, 200, 1)",
// },
// },
{
z: 1,
yAxisIndex: 0,
name: "救助人数",
data: data.list1,
name: "参保人数",
data: data.list,
barWidth: 20,
type: "bar",
label: {
@ -229,10 +235,10 @@ const getOption = () => {
y: 0,
y2: 0,
colorStops: [
{ offset: 0, color: "rgba(23, 237, 255, .7)" },
{ offset: 0.5, color: "rgba(23, 237, 255, .7)" },
{ offset: 0.5, color: "rgba(23, 237, 255, .3)" },
{ offset: 1, color: "rgba(23, 237, 255, .5)" },
{ offset: 0, color: "rgba(142, 187, 255, 0.7)" },
{ offset: 0.5, color: "rgba(142, 187, 255, 0.7)" },
{ offset: 0.5, color: "rgba(142, 187, 255, 0.3)" },
{ offset: 1, color: "rgba(142, 187, 255, 0.5)" },
],
},
},
@ -265,23 +271,20 @@ const getOption = () => {
itemStyle: {
color: "rgba(221, 242, 255, 0.1)",
},
data: data.list.year.map(() => 100),
// data: 100,
barWidth: 50,
data: data.month.map(() => 100),
barWidth: 30,
},
//
{
z: 1,
type: "pictorialBar",
symbolPosition: "end",
data: data.list1,
data: data.list,
symbol: "diamond",
symbolOffset: ["0%", "-50%"],
symbolSize: [21, 15],
itemStyle: {
borderColor: "#2fffa4",
color: "rgba(23, 237, 255, 1)",
color: "rgba(142, 187, 255, 1)",
},
},
],
@ -297,30 +300,29 @@ const setChart1 = () => {
if (data.list.length !== 0) {
data.list1 = [];
data.list2 = [];
data.list.data.forEach((item) => {
data.list1.push(item.jzrs); //
data.list2.push(item.jzje); //
});
// console.log("2", data.list1, data.list2);
data.list1 = data.list.sybxjxsrs;
data.list2 = data.list.ffsybxjje;
// data.list.forEach((item) => {
// data.list1.push(item.sybxjxsrs); //
// data.list2.push(item.ffsybxjje); //
// });
}
};
watch(
() => props.list,
(newVal, oldVal) => {
data.list = newVal;
// console.log("1", data.list);
setChart1();
data.month = props.month.map((item) => item + "月");
// setChart1();
getOption();
setChart();
}
);
// 使
onBeforeMount(() => {
setTimeout(() => {
data.list = props.list;
setChart1();
// console.log(data.list, data.list1, data.list2, "");
data.month = props.month.map((item) => item + "月");
getOption();
setChart();
}, 600);

View File

@ -28,7 +28,7 @@
// return [];
// },
// },
year: {
month: {
type: Array,
default: () => {
return [];
@ -41,7 +41,7 @@
const data = reactive({
list: [],
list1: [],
year: [],
month: [],
option: {},
// max: null,
});
@ -61,8 +61,9 @@
// },
// },
grid: {
top: "3%",
left: "6%",
right: "9%",
right: "3%",
bottom: "0%",
containLabel: true,
color: "#ffffff",
@ -84,12 +85,12 @@
show: false, //
},
// data: ["2019", "2020", "2021", "2022", "2023"],
data: data.year,
data: data.month,
},
{
type: "category",
show: false,
data: data.year,
data: data.month,
},
],
yAxis: [
@ -157,7 +158,7 @@
yAxisIndex: 0,
name: "救助人数",
data: data.list1,
barWidth: 20,
barWidth: 30,
type: "bar",
label: {
show: true,
@ -211,9 +212,9 @@
itemStyle: {
color: "rgba(221, 242, 255, 0.1)",
},
data: data.year.map(() => 100),
data: data.month.map(() => 100),
// data: 100,
barWidth: 50,
barWidth: 40,
},
//
{
@ -223,7 +224,7 @@
data: data.list1,
symbol: "diamond",
symbolOffset: ["0%", "-50%"],
symbolSize: [21, 15],
symbolSize: [31, 15],
itemStyle: {
borderColor: "#2fffa4",
@ -261,7 +262,8 @@
onBeforeMount(() => {
setTimeout(() => {
data.list1 = props.list;
data.year=props.year;
// data.month = props.month;
data.month = props.month.map((item) => item + "月");
// setChart1();
getOption();
setChart();
@ -270,4 +272,3 @@
</script>
<style scoped></style>

View File

@ -28,7 +28,7 @@
// return [];
// },
// },
year: {
month: {
type: Array,
default: () => {
return [];
@ -41,7 +41,7 @@
const data = reactive({
list: [],
list1: [],
year: [],
month: [],
option: {},
// max: null,
});
@ -61,8 +61,9 @@
// },
// },
grid: {
left: "6%",
right: "9%",
top: "3%",
left: "3%",
right: "3%",
bottom: "0%",
containLabel: true,
color: "#ffffff",
@ -84,12 +85,12 @@
show: false, //
},
// data: ["2019", "2020", "2021", "2022", "2023"],
data: data.year,
data: data.month,
},
{
type: "category",
show: false,
data: data.year,
data: data.month,
},
],
yAxis: [
@ -157,7 +158,7 @@
yAxisIndex: 0,
name: "救助人数",
data: data.list1,
barWidth: 20,
barWidth: 30,
type: "bar",
label: {
show: true,
@ -211,9 +212,9 @@
itemStyle: {
color: "rgba(221, 242, 255, 0.1)",
},
data: data.year.map(() => 100),
data: data.month.map(() => 100),
// data: 100,
barWidth: 50,
barWidth: 40,
},
//
{
@ -223,7 +224,7 @@
data: data.list1,
symbol: "diamond",
symbolOffset: ["0%", "-50%"],
symbolSize: [21, 15],
symbolSize: [31, 15],
itemStyle: {
borderColor: "#2fffa4",
@ -261,7 +262,7 @@
onBeforeMount(() => {
setTimeout(() => {
data.list1 = props.list;
data.year=props.year;
data.month = props.month.map((item) => item + "月");
// setChart1();
getOption();
setChart();

View File

@ -287,16 +287,16 @@ const data = reactive({
img: icon3,
visible: false,
son: [
// {
// id: "0",
// name: "",
// },
{
id: "0",
name: "就业创业服务",
name: "概况",
},
{
id: "1",
name: "就业创业服务",
},
{
id: "2",
name: "工伤失业保险服务",
},
],
@ -568,6 +568,8 @@ const tapshow = (parentId, childId) => {
childId == 0 &&
(parentId.name == "幼有所育" ||
parentId.name == "弱有所扶" ||
parentId.name == "劳有所得" ||
parentId.name == "学有所教" ||
parentId.name == "老有所养" ||
parentId.name == "病有所医" ||
@ -588,6 +590,7 @@ const tapshow = (parentId, childId) => {
"幼有善育",
"学有优教",
"病有良医",
"劳有所得",
"老有康养",
"住有宜居",
"弱有众扶",
@ -630,9 +633,9 @@ const gaikuang = (name) => {
} else if (name == "学有所教") {
gaikuangList.education = true;
}
// else if (name == "") {
// gaikuangList.lysd = true;
// }
else if (name == "劳有所得") {
gaikuangList.lysd = true;
}
else if (name == "老有所养") {
gaikuangList.yl = true;
} else if (name == "病有所医") {

View File

@ -76,10 +76,19 @@
参保人数
</div>
</div>
<!-- <eP4 :list="data.list2"></eP4> -->
<eP4
:list="data.list2"
:month="data.sybx.month"
v-if="jz[0].choose == '1'"
></eP4>
<eP5
:list="data.list2"
:month="data.sybx.month"
v-if="jz[0].choose == '2'"
></eP5>
</div>
<div class="flex1" style="flex: 1.1">
<div class="yd_title service">
<div class="yd_title last">
<div class="animate-border">
<i></i>
<i></i>
@ -99,8 +108,16 @@
累计待遇金额
</div>
</div>
<gsbx_1 :list="data.gsbx.list1" :year="data.gsbx.year" v-if="jz[1].choose == '1'"></gsbx_1>
<gsbx_2 :list="data.gsbx.list1" :year="data.gsbx.year" v-if="jz[1].choose == '2'"></gsbx_2>
<gsbx_1
:list="data.gsbx.list1"
:month="data.gsbx.month"
v-if="jz[1].choose == '1'"
></gsbx_1>
<gsbx_2
:list="data.gsbx.list2"
:month="data.gsbx.month"
v-if="jz[1].choose == '2'"
></gsbx_2>
</div>
</div>
</div>
@ -126,7 +143,7 @@ import jy7 from "@/assets/images/lysd/jy7.png";
import jy8 from "@/assets/images/lysd/jy8.png";
const data = reactive({
//
list2: {}, //
employmentList: [
{
name: "2024年发布人力资源供求信息",
@ -176,7 +193,7 @@ const data = reactive({
dw: "份",
img: jy8,
},
],
], //
ViewData: [
{
name: "一级/高级技师",
@ -224,11 +241,18 @@ const data = reactive({
{ name: "博士", value: 0 },
{ name: "其他", value: 0 },
], //
sybx: {}, //
sybx: {
month: [], //
cbrs: [], //
sybx: {
sybxjxsrs: [], //
ffsybxjje: [], //
}, //
}, //
gsbx: {
list1: [100, 200, 300],
list2: [],
year:['5','6','7']
month: ["5", "6", "7"],
}, //
});
const showEchart = ref(false);
@ -245,8 +269,8 @@ const jzChange = (index, value) => {
console.log(index, value);
jz.value[index].choose = value;
if (index === 0) {
data.list2 = value == "1" ? data.education : data.medical;
// console.log(value, data.education, data.medical);
data.list2 = value == "1" ? data.sybx.sybx : data.sybx.cbrs;
console.log(value, data.list2);
} else if (index === 1) {
data.list = value === "1" ? data.housing : data.temporary;
}
@ -286,8 +310,14 @@ const getData = async () => {
data.rczy[3].value = res.data.rczy.bs; //
data.rczy[4].value = res.data.rczy.qt; //
data.sybx = res.data.sybx; //
data.gsbx = res.data.gsbx; //
data.sybx.month = res.data.sybx.month; //
data.sybx.cbrs = res.data.sybx.cbrs; //
data.sybx.sybx = res.data.sybx.sybx; //
data.list2 = data.sybx.sybx;
data.gsbx.month = res.data.gsbx.month; //
data.gsbx.list1 = res.data.gsbx.gsbxjxsrs; //
data.gsbx.list2 = res.data.gsbx.gsffbxjje; //
}
});
};
@ -478,7 +508,7 @@ onMounted(() => {});
background-size: 100% 100%;
}
.last {
background-image: url(@/assets/images/hygiene/new_jkhd.png);
background-image: url(@/assets/images/lysd/lysd_6.png);
background-repeat: no-repeat;
background-size: 100% 100%;
}
@ -585,7 +615,7 @@ onMounted(() => {});
color: #ffffff;
line-height: 22px;
margin-right: 15px;
background-image: url(@/assets/images/hygiene/choose.png);
background-image: url(@/assets/images/lysd/lysd_7.png);
background-repeat: no-repeat;
background-size: 100% 100%;
}
@ -601,7 +631,7 @@ onMounted(() => {});
color: #ffffff;
line-height: 22px;
margin-right: 15px;
background-image: url(@/assets/images/hygiene/noChoose.png);
background-image: url(@/assets/images/lysd/lysd_8.png);
background-repeat: no-repeat;
background-size: 100% 100%;
}
@ -1217,7 +1247,7 @@ onMounted(() => {});
color: #ffffff;
line-height: 22px;
margin-right: 15px;
background-image: url(@/assets/images/work/choose.png);
background-image: url(@/assets/images/lysd/lysd_7.png);
background-repeat: no-repeat;
background-size: 100% 100%;
}
@ -1234,7 +1264,7 @@ onMounted(() => {});
color: #ffffff;
line-height: 22px;
margin-right: 15px;
background-image: url(@/assets/images/work/noChoose.png);
background-image: url(@/assets/images/lysd/lysd_8.png);
background-repeat: no-repeat;
background-size: 100% 100%;
}