From 3eba8102f54dba44758865df0cccf4aae8aea2da Mon Sep 17 00:00:00 2001
From: 杨磊 <505174330@qq.com>
Date: 星期一, 21 四月 2025 18:28:25 +0800
Subject: [PATCH] 年谱接口

---
 src/views/directory/index.vue |   51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 51 insertions(+), 0 deletions(-)

diff --git a/src/views/directory/index.vue b/src/views/directory/index.vue
index ac083af..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() {
@@ -513,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>

--
Gitblit v1.9.1