This commit is contained in:
duanxiaohai 2024-10-24 11:46:09 +08:00
parent 045bc1f155
commit fa07b4fad1
3 changed files with 31 additions and 17 deletions

View File

@ -31,7 +31,7 @@ const pieData = [
{ name: "博士", value: 121 }, { name: "博士", value: 121 },
{ name: "其他", value: 121 }, { name: "其他", value: 121 },
]; ];
const YData = pieData.map((item) => item.value); const YData = data.list.map((item) => item.value);
const sum = YData.reduce((item, index) => item + index, 0); // const sum = YData.reduce((item, index) => item + index, 0); //
var scale = 1; var scale = 1;
@ -105,7 +105,7 @@ const getOption = () => {
type: "pie", type: "pie",
radius: ["25%", "45%"], radius: ["25%", "45%"],
center: ["50%", "50%"], center: ["50%", "50%"],
data: pieData, data: data.list,
avoidLabelOverlap: true, // (线) avoidLabelOverlap: true, // (线)
label: { label: {
normal: { normal: {
@ -203,6 +203,9 @@ const setChart = () => {
onBeforeMount(() => { onBeforeMount(() => {
setTimeout(() => { setTimeout(() => {
data.list = props.list;
console.log(666,data.list);
getOption(); getOption();
setChart(); setChart();
}, 600); }, 600);

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: "概况",
},
{
id: "1",
name: "就业创业服务", name: "就业创业服务",
}, },
{ {
id: "2", id: "1",
name: "工伤失业保险服务", name: "工伤失业保险服务",
}, },
], ],
@ -568,7 +568,6 @@ 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 == "病有所医" ||
@ -588,7 +587,6 @@ const tapshow = (parentId, childId) => {
const menuName = [ const menuName = [
"幼有善育", "幼有善育",
"学有优教", "学有优教",
"劳有所得",
"病有良医", "病有良医",
"老有康养", "老有康养",
"住有宜居", "住有宜居",
@ -631,9 +629,11 @@ const gaikuang = (name) => {
gaikuangList.work = true; gaikuangList.work = true;
} else if (name == "学有所教") { } else if (name == "学有所教") {
gaikuangList.education = true; gaikuangList.education = true;
} else if (name == "劳有所得") { }
gaikuangList.lysd = true; // else if (name == "") {
} else if (name == "老有所养") { // gaikuangList.lysd = true;
// }
else if (name == "老有所养") {
gaikuangList.yl = true; gaikuangList.yl = true;
} else if (name == "病有所医") { } else if (name == "病有所医") {
gaikuangList.hygiene = true; gaikuangList.hygiene = true;

View File

@ -50,7 +50,7 @@
<i></i> <i></i>
</div> </div>
</div> </div>
<eP3></eP3> <eP3 :list="data.rczy"></eP3>
</div> </div>
</div> </div>
@ -215,7 +215,13 @@ const data = reactive({
zd: [], // zd: [], //
}, // }, //
jyfws: {}, // jyfws: {}, //
rczy: {}, // rczy: [
{ name: "大专", value: 0 },
{ name: "大学本科", value: 0 },
{ name: "研究生", value: 0 },
{ name: "博士", value: 0 },
{ name: "其他", value: 0 },
], //
sybx: {}, // sybx: {}, //
gsbx: {}, // gsbx: {}, //
}); });
@ -268,7 +274,12 @@ const getData = async () => {
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 = res.data.rczy; // 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; //
data.sybx = res.data.sybx; // data.sybx = res.data.sybx; //
data.gsbx = res.data.gsbx; // data.gsbx = res.data.gsbx; //
} }
@ -276,7 +287,7 @@ const getData = async () => {
}; };
onBeforeMount(async () => { onBeforeMount(async () => {
// getData(); getData();
}); });
onMounted(() => {}); onMounted(() => {});
</script> </script>