This commit is contained in:
duanxiaohai 2024-10-24 13:50:15 +08:00
parent b33f790fee
commit a4074d2546
5 changed files with 78 additions and 55 deletions

BIN
dist.zip

Binary file not shown.

View File

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

View File

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

View File

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

View File

@ -76,7 +76,7 @@
参保人数 参保人数
</div> </div>
</div> </div>
<!-- <eP4 :list="data.list2"></eP4> --> <eP4 :list="data.list2" :month="data.sybx.month"></eP4>
</div> </div>
<div class="flex1" style="flex: 1.1"> <div class="flex1" style="flex: 1.1">
<div class="yd_title service"> <div class="yd_title service">
@ -124,7 +124,7 @@ import jy7 from "@/assets/images/lysd/jy7.png";
import jy8 from "@/assets/images/lysd/jy8.png"; import jy8 from "@/assets/images/lysd/jy8.png";
const data = reactive({ const data = reactive({
// list2: {}, //
employmentList: [ employmentList: [
{ {
name: "2024年发布人力资源供求信息", name: "2024年发布人力资源供求信息",
@ -174,7 +174,7 @@ const data = reactive({
dw: "份", dw: "份",
img: jy8, img: jy8,
}, },
], ], //
ViewData: [ ViewData: [
{ {
name: "一级/高级技师", name: "一级/高级技师",
@ -222,7 +222,14 @@ const data = reactive({
{ name: "博士", value: 0 }, { name: "博士", value: 0 },
{ name: "其他", value: 0 }, { name: "其他", value: 0 },
], // ], //
sybx: {}, // sybx: {
month: [], //
cbrs: [], //
sybx: {
sybxjxsrs: [], //
ffsybxjje: [], //
}, //
}, //
gsbx: {}, // gsbx: {}, //
}); });
const showEchart = ref(false); const showEchart = ref(false);
@ -239,8 +246,8 @@ const jzChange = (index, value) => {
console.log(index, value); console.log(index, value);
jz.value[index].choose = value; jz.value[index].choose = value;
if (index === 0) { if (index === 0) {
data.list2 = value == "1" ? data.education : data.medical; data.list2 = value == "1" ? data.sybx.sybx : data.sybx.cbrs;
// console.log(value, data.education, data.medical); console.log(value, data.list2);
} else if (index === 1) { } else if (index === 1) {
data.list = value === "1" ? data.housing : data.temporary; data.list = value === "1" ? data.housing : data.temporary;
} }
@ -280,7 +287,11 @@ const getData = async () => {
data.rczy[3].value = res.data.rczy.bs; // data.rczy[3].value = res.data.rczy.bs; //
data.rczy[4].value = res.data.rczy.qt; // data.rczy[4].value = res.data.rczy.qt; //
data.sybx = res.data.sybx; // 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 = res.data.gsbx; // data.gsbx = res.data.gsbx; //
} }
}); });