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 tools from "@/utils/tools";
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;
// HTTP request 拦截器

View File

@ -262,7 +262,7 @@ echarts.graphic.registerShape("CubeBottom_2", CubeBottom_2);
const getOption = () => {
data.option = {
legend: {
data: ["帮扶就业人数", "重点群体结构类型"],
data: ["重点群体帮扶","帮扶就业人数" ],
top: "0%",
// right: "30%",
textStyle: {
@ -350,7 +350,7 @@ const getOption = () => {
series: [
{
xAxisIndex: 0,
name: "重点群体结构类型",
name: "重点群体帮扶",
type: "custom",
renderItem: (params, api) => {
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";
const data = reactive({
list1: {}, //
list2: {}, //
employmentList: [
{
@ -152,7 +153,7 @@ const data = reactive({
dw: "次",
},
{
name: "见习岗位信息3次",
name: "见习岗位信息",
value: "0",
img: jy2,
dw: "个",
@ -272,43 +273,69 @@ const jzChange = (index, value) => {
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;
data.list1 = value === "1" ? data.housing : data.temporary;
console.log(value, data.list1);
}
};
// employmentListvalue
const updateEmploymentValues = (list, data) => {
const regex = /(\d+)(次|个|人次|份|场)?/g; //
// const updateEmploymentValues = (list, data) => {
// const regex = /(\d+)(||||)?/g; //
list.forEach((item) => {
const match = data.find((entry) => entry.includes(item.name));
if (match) {
const results = match.match(regex); //
if (results && results.length > 0) {
item.value = results[results.length - 1].replace(/[^\d]/g, ""); //
} else {
item.value = "0"; //
}
}
});
};
// list.forEach((item) => {
// const match = data.find((entry) => entry.includes(item.name));
// if (match) {
// const results = match.match(regex); //
// if (results && results.length > 0) {
// item.value = results[results.length - 1].replace(/[^\d]/g, ""); //
// } else {
// item.value = "0"; //
// }
// }
// });
// };
const getData = async () => {
await http.get("/api/ggfwyth/lysdOverview").then((res) => {
if (res.code == 200) {
data.jnrcs.month = res.data.jnrcs.month; //
data.ViewData[0].data = res.data.jnrcs.one; ///
data.ViewData[1].data = res.data.jnrcs.two; ///
data.ViewData[2].data = res.data.jnrcs.three; ///
data.ViewData[3].data = res.data.jnrcs.four; ///
data.ViewData[4].data = res.data.jnrcs.five; ///
const skillLevels = [
"one", ///
"two", ///
"three", ///
"four", ///
"five", ///
];
skillLevels.forEach((level, index) => {
data.ViewData[index].data = res.data.jnrcs[level];
});
data.syl.bf = res.data.syl.bf; //
data.syl.zd = res.data.syl.zd; //
updateEmploymentValues(data.employmentList, res.data.jyfws); //
data.rczy[0].value = res.data.rczy.dz; //
data.rczy[1].value = res.data.rczy.bk; //
data.rczy[2].value = res.data.rczy.yjs; //
data.rczy[3].value = res.data.rczy.bs; //
data.rczy[4].value = res.data.rczy.qt; //
// updateEmploymentValues(data.employmentList, res.data.jyfws); //
const keys = [
"rlzygq", //
"jxgw", //
"kzjycyzcxc", //
"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.cbrs = res.data.sybx.cbrs; //