This commit is contained in:
duanxiaohai 2024-11-01 17:25:17 +08:00
parent a4d24556d5
commit 9cc25dc575
5 changed files with 57 additions and 30 deletions

BIN
dist.zip

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

@ -2,7 +2,7 @@ import axios from "axios";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import tools from "@/utils/tools"; import tools from "@/utils/tools";
import router from "../router"; import router from "../router";
axios.defaults.baseURL = 'https://jzzf.longyou.gov.cn:998/' // axios.defaults.baseURL = 'https://jzzf.longyou.gov.cn:998/'
axios.defaults.timeout = 120000; axios.defaults.timeout = 120000;
// HTTP request 拦截器 // HTTP request 拦截器

View File

@ -262,7 +262,7 @@ echarts.graphic.registerShape("CubeBottom_2", CubeBottom_2);
const getOption = () => { const getOption = () => {
data.option = { data.option = {
legend: { legend: {
data: ["帮扶就业人数", "重点群体结构类型"], data: ["重点群体帮扶","帮扶就业人数" ],
top: "0%", top: "0%",
// right: "30%", // right: "30%",
textStyle: { textStyle: {
@ -350,7 +350,7 @@ const getOption = () => {
series: [ series: [
{ {
xAxisIndex: 0, xAxisIndex: 0,
name: "重点群体结构类型", name: "重点群体帮扶",
type: "custom", type: "custom",
renderItem: (params, api) => { renderItem: (params, api) => {
const location = api.coord([api.value(0), api.value(1)]); const location = api.coord([api.value(0), api.value(1)]);

View File

@ -143,6 +143,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({
list1: {}, //
list2: {}, // list2: {}, //
employmentList: [ employmentList: [
{ {
@ -152,7 +153,7 @@ const data = reactive({
dw: "次", dw: "次",
}, },
{ {
name: "见习岗位信息3次", name: "见习岗位信息",
value: "0", value: "0",
img: jy2, img: jy2,
dw: "个", dw: "个",
@ -272,43 +273,69 @@ const jzChange = (index, value) => {
data.list2 = value == "1" ? data.sybx.sybx : data.sybx.cbrs; data.list2 = value == "1" ? data.sybx.sybx : data.sybx.cbrs;
console.log(value, data.list2); console.log(value, data.list2);
} else if (index === 1) { } else if (index === 1) {
data.list = value === "1" ? data.housing : data.temporary; data.list1 = value === "1" ? data.housing : data.temporary;
console.log(value, data.list1);
} }
}; };
// employmentListvalue // employmentListvalue
const updateEmploymentValues = (list, data) => { // const updateEmploymentValues = (list, data) => {
const regex = /(\d+)(次|个|人次|份|场)?/g; // // const regex = /(\d+)(||||)?/g; //
list.forEach((item) => { // list.forEach((item) => {
const match = data.find((entry) => entry.includes(item.name)); // const match = data.find((entry) => entry.includes(item.name));
if (match) { // if (match) {
const results = match.match(regex); // // const results = match.match(regex); //
if (results && results.length > 0) { // if (results && results.length > 0) {
item.value = results[results.length - 1].replace(/[^\d]/g, ""); // // item.value = results[results.length - 1].replace(/[^\d]/g, ""); //
} else { // } else {
item.value = "0"; // // item.value = "0"; //
} // }
} // }
}); // });
}; // };
const getData = async () => { const getData = async () => {
await http.get("/api/ggfwyth/lysdOverview").then((res) => { await http.get("/api/ggfwyth/lysdOverview").then((res) => {
if (res.code == 200) { if (res.code == 200) {
data.jnrcs.month = res.data.jnrcs.month; // data.jnrcs.month = res.data.jnrcs.month; //
data.ViewData[0].data = res.data.jnrcs.one; /// const skillLevels = [
data.ViewData[1].data = res.data.jnrcs.two; /// "one", ///
data.ViewData[2].data = res.data.jnrcs.three; /// "two", ///
data.ViewData[3].data = res.data.jnrcs.four; /// "three", ///
data.ViewData[4].data = res.data.jnrcs.five; /// "four", ///
"five", ///
];
skillLevels.forEach((level, index) => {
data.ViewData[index].data = res.data.jnrcs[level];
});
data.syl.bf = res.data.syl.bf; // data.syl.bf = res.data.syl.bf; //
data.syl.zd = res.data.syl.zd; // data.syl.zd = res.data.syl.zd; //
updateEmploymentValues(data.employmentList, res.data.jyfws); // // updateEmploymentValues(data.employmentList, res.data.jyfws); //
data.rczy[0].value = res.data.rczy.dz; // const keys = [
data.rczy[1].value = res.data.rczy.bk; // "rlzygq", //
data.rczy[2].value = res.data.rczy.yjs; // "jxgw", //
data.rczy[3].value = res.data.rczy.bs; // "kzjycyzcxc", //
data.rczy[4].value = res.data.rczy.qt; // "ldygzcfgzx", //
"zzzph", //
"tggw", //
"qzyxdj", //
"ldryrsda", //
];
keys.forEach((key, index) => {
data.employmentList[index].value = res.data.jyfw[key];
});
//
const rczyKeys = [
"dz", //
"bk", //
"yjs", //
"bs", //
"qt", //
];
rczyKeys.forEach((key, index) => {
data.rczy[index].value = res.data.rczy[key];
});
data.sybx.month = res.data.sybx.month; // data.sybx.month = res.data.sybx.month; //
data.sybx.cbrs = res.data.sybx.cbrs; // data.sybx.cbrs = res.data.sybx.cbrs; //