From 6182cfa388f258c6e076aa46e3849ca909985d8d Mon Sep 17 00:00:00 2001 From: zhongshujie <2862698242@qq.com> Date: 星期一, 21 四月 2025 09:37:58 +0800 Subject: [PATCH] 荣誉,学生列表接口 --- src/views/directory/index.vue | 76 ++++++++++++++++++++++++++++++++------ 1 files changed, 64 insertions(+), 12 deletions(-) diff --git a/src/views/directory/index.vue b/src/views/directory/index.vue index b94eafc..a9d3cf1 100644 --- a/src/views/directory/index.vue +++ b/src/views/directory/index.vue @@ -182,6 +182,7 @@ import axios from "axios"; import debounce from "lodash/debounce"; import treeData from "./treeData.json"; +import MG from '@/assets/js/middleGround/WebMiddleGroundApi.js' export default { data() { return { @@ -393,6 +394,7 @@ mounted() { this.initChart(); + this.getStudentList() window.addEventListener("resize", this.handleResize); }, beforeDestroy() { @@ -461,37 +463,38 @@ { type: "tree", data: [this.chartData], - // symbol: "emptyCircle", top: "10%", bottom: "10%", layout: "radial", - symbol: "emptyCircle", + symbol: "circle", symbolSize: 7, initialTreeDepth: 3, // 灞曞紑鎵�鏈夎妭鐐� animationDurationUpdate: 750, emphasis: { focus: "descendant", }, + label: { position: "top", //鏍囩鐨勪綅缃�� verticalAlign: "middle", //鏂囧瓧鍨傜洿瀵归綈鏂瑰紡锛岄粯璁よ嚜鍔ㄣ�� fontSize: 12, //鏂囧瓧鐨勫瓧浣撳ぇ灏� color: "#bc1c00", }, - leaves: { - symbol: "emptyCircle", - label: { - fontSize: 12, - }, - }, + // leaves: { + // symbol: "emptyCircle", + // label: { + // fontSize: 12, + // }, + // }, expandAndCollapse: false, lineStyle: { color: "#bc1c00", width: 1, }, itemStyle: { - symbol: "emptyCircle", - color: "#bc1c00", + color: function (params) { + return "green"; + }, }, roam: true, center: ["5%", "0%"], // 寰皟鍨傜洿灞呬腑 @@ -512,6 +515,55 @@ this.chart.resize(); } }, + // 鑾峰彇鍒楄〃鏄剧ず + getStudentList() { + this.loading = true; + MG.resource.getItem({ + path: "WYY_student", + fields: { + // 鎬у埆 + gender:"", + //瀛︿範鏃堕棿 + studyTime: [], + // 鍗曚綅 + unit:[], + // 鐜板伐浣滃崟浣嶏紙鍒颁簩绾у崟浣嶅叏绉帮級 + currentEmployer_secondary:"", + //鑱屽姟 + jobTitle:"", + //瀛︿綅 + academicDegree:"", + // 瀛︾敓绠�浠� + studentProfile:"", + }, + paging: { + // start: (this.currentPage - 1) * 10, + size: 99999, + }, + // coverSize: { + // height: 70 + // } + }).then((res) => { + console.log(res, "res"); + if (res.datas && res.datas.length) { + this.honorList = res.datas.map(item => { + // 灏� year 瀛楁鏍煎紡鍖栦负 "2017骞�9鏈�" 杩欑鏍煎紡 + const date = new Date(item.year); + const year = date.getFullYear(); + const month = date.getMonth() + 1; // 鏈堜唤浠�0寮�濮嬶紝闇�瑕佸姞1 + return { + ...item, + year: `${year}骞�${month}鏈坄 + }; + }); + this.total = res.total; + this.loading = false; + } + }).catch((error) => { + console.error('鑾峰彇鑽h獕澶辫触:', error); + }); + }, + }, }; </script> @@ -519,7 +571,7 @@ <style lang="less" scoped> .page { width: 100%; - height: 100%; + height: 100vh; box-sizing: border-box; background-color: #e9e1d4; position: relative; @@ -527,7 +579,7 @@ } .page-header { - height: 9.4%; + height: 9.4vh; width: 100%; text-align: left; border-bottom: 2px solid #937950; -- Gitblit v1.9.1