From 6938616d7e67a8822569420f6bddd8754a63d574 Mon Sep 17 00:00:00 2001 From: 杨磊 <505174330@qq.com> Date: 星期一, 28 四月 2025 16:36:23 +0800 Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/wyyDatabase --- src/views/honors/index.vue | 11 + src/views/achievements/index.vue | 10 + src/views/chronology/index.vue | 139 ++++++---------------- src/views/directory/index.vue | 162 +++++++++----------------- 4 files changed, 109 insertions(+), 213 deletions(-) diff --git a/src/views/achievements/index.vue b/src/views/achievements/index.vue index 5f30d05..a69ae53 100644 --- a/src/views/achievements/index.vue +++ b/src/views/achievements/index.vue @@ -668,7 +668,6 @@ //鑾峰彇涓嬫媺閫夋嫨妗嗙殑鍐呭 async getSelectData() { - this.loading = true; try { // 鍚屾椂鍙戣捣涓や釜寮傛璇锋眰锛屽苟绛夊緟瀹冧滑鐨勭粨鏋� const [subjectListResult, resourceListResult] = await Promise.all([ @@ -718,12 +717,15 @@ handleSearch(isText) { console.log(isText, "isText"); this.associationList = []; + console.log(isText, "isText"); + if (isText.text != "") { this.inputValue = isText.text; this.inputType = isText.type; this.associationList.push({ type: isText.label, content: isText.text, + value: isText.type, }); this.getItemList(); } @@ -731,6 +733,7 @@ // 璇锋眰鏁版嵁 getItemList() { + this.loading = true; let searchData = {}; // 鍒濆鍖栦竴涓┖瀵硅薄鏉ュ瓨鍌ㄦ悳绱㈡暟鎹� if (this.inputValue) { // 濡傛灉杈撳叆鍊煎瓨鍦� @@ -1341,7 +1344,7 @@ overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; - -webkit-line-clamp: 4; + -webkit-line-clamp: 3; span { font-family: Source Han Sans; @@ -1424,6 +1427,9 @@ border-radius: 5px; border: 1px solid #cccccc; } +:deep.el-pagination.is-background .el-pager li:not(.disabled):hover{ + color: #937950 +} </style> <style> diff --git a/src/views/chronology/index.vue b/src/views/chronology/index.vue index 4f981b1..d2af371 100644 --- a/src/views/chronology/index.vue +++ b/src/views/chronology/index.vue @@ -49,14 +49,10 @@ class="gradchild" v-for="(citem, cindex) in item.list" :style="{ background: citem.color }" - @click.self="showDetail(index, cindex, 1, $event)" + @click.stop="showDetail(index, cindex, 1, $event)" :key="cindex" > - <div - class="detailDialog" - :style="popupStyle" - v-if="citem.showChildDetail" - > + <div class="detailDialog" v-if="citem.showDetail"> <div class="closeBtn" @click.stop="closeDetail(index, cindex, 0)" @@ -95,9 +91,7 @@ import moment from "moment"; import floatingWindow from "./floatingWindow.vue"; import yearWindow from "./yearWindow.vue"; -import { nextTick } from "vue"; -import fileApi from "@/assets/js/middleGround/api/file"; -import { requestCtx, appRefCode } from "@/assets/js/config"; + export default { components: { floatingWindow, @@ -115,10 +109,6 @@ audio: "#b9a587", newspaper: "#8d77b3", other: "#009f9f", - }, - popupStyle: { - left: "0", - top: "0", }, }; }, @@ -159,21 +149,17 @@ }, }) .then(async (res) => { - console.log(res, "res"); for (let i = 0; i < res.datas.length; i++) { const item = res.datas[i]; this.$set(item, "showDetail", false); const listData = await this.getYearResource(item); if (listData.length > 0) { this.$set(item, "list", listData); - for (let j = 0; j < listData.length; j++) { - const element = listData[j]; - this.$set(element, "showChildDetail", false); - } console.log(item, "item"); } } + console.log(this.contentList, "this.contentList"); this.contentList = res.datas; this.showList = true; }); @@ -206,12 +192,13 @@ const filterList = yearDataList.datas.filter((item) => { return item.cmsItemType != "chronology" && item.cmsItemType != "AWARD"; }); + if (filterList && filterList.length > 0) { for (let i = 0; i < filterList.length; i++) { const item = filterList[i]; if (item.file) { - const requestCtx = await this.getResourcePath(item.file); - console.log(requestCtx, "requestCtx"); + const requestCtx = + this.config.requestCtx + `/file/api/ApiDownload?md5=${item.file}`; this.$set(item, "fileLink", requestCtx); } this.$set(item, "showDetail", false); @@ -224,79 +211,35 @@ } return filterList; }, - - // 鑾峰彇闃块噷浜戝姞閫熷湴鍧� (瑙嗛锛岄煶棰�) - async getResourcePath(md5) { - try { - // 濡傛灉杩斿洖鐨勬暟鎹负绌烘垨鏈畾涔夛紝鍒欐嫾鎺ラ粯璁や笅杞借矾寰� - return requestCtx + "/file/api/ApiDownload?md5=" + md5; - } catch (error) { - // 鎹曡幏寮傚父骞舵墦鍗伴敊璇棩蹇� - console.error("鑾峰彇璧勬簮璺緞澶辫触:", error); - // 杩斿洖涓�涓粯璁ゅ�兼垨鎶涘嚭閿欒锛堟牴鎹笟鍔¢渶姹傦級 - return requestCtx + "/file/api/ApiDownload?md5=" + md5; - } - }, - closeDetail(index, cindex, type) { for (let i = 0; i < this.contentList.length; i++) { const item = this.contentList[i]; - if (item && item.list?.length > 0) { + if (item && item.length > 0) { for (let j = 0; j < item.list.length; j++) { const citem = item.list[j]; - this.$set(citem, "showChildDetail", false); + this.$set(citem, "showDetail", false); } } } this.contentList[index].list[cindex].showDetail = false; - - console.log( - this.contentList[index].list, - "this.contentList[index].list[cindex]" - ); }, showDetail(index, cindex, type, event) { - const rect = event.target.getBoundingClientRect(); - const screenWidth = window.innerWidth; - const popupWidth = 542; // 鍋囪寮规瀹藉害涓�200px - // 鍒ゆ柇瑙﹀彂鍏冪礌浣嶇疆 - if (rect.left + rect.width / 2 < screenWidth / 2) { - // 宸︿晶鏄剧ず寮规鍦ㄥ彸渚� - this.popupStyle = { - left: `${rect.right}px`, - top: `${rect.bottom - 150}px`, - }; - } else { - // 鍙充晶鏄剧ず寮规鍦ㄥ乏渚� - this.popupStyle = { - left: `${rect.left - popupWidth}px`, - top: `${rect.bottom - 150}px`, - }; - } - console.log(this.popupStyle.top, "this.top"); - console.log(this.popupStyle.left, "this.left"); - // if (rect.left - popupWidth < 0) { - // // 宸︿晶绌洪棿涓嶈冻鏃跺己鍒跺彸渚ф樉绀� - // this.popupStyle.left = `${rect.right}px`; - // } else if (rect.right + popupWidth > screenWidth) { - // // 鍙充晶绌洪棿涓嶈冻鏃跺己鍒跺乏渚ф樉绀� - // this.popupStyle.left = `${rect.left - popupWidth}px`; - // } + console.log(event, "event"); for (let i = 0; i < this.contentList.length; i++) { const item = this.contentList[i]; - if (item && item.list?.length > 0) { + if (item && item.length > 0) { for (let j = 0; j < item.list.length; j++) { const citem = item.list[j]; - if (citem.showChildDetail) { - this.contentList[i].list[j].showDetail = false; - citem.showChildDetail = false; - } + this.$set(citem, "showDetail", false); + item.showDetail = false; } } } + if (this.contentList[index].list[cindex].type) { - this.contentList[index].list[cindex].showChildDetail = true; + this.contentList[index].list[cindex].showDetail = true; } + console.log(this.contentList[index].list, "this.contentList[index].list[cindex]"); }, }, }; @@ -311,7 +254,6 @@ display: flex; flex-direction: column; overflow: auto; - font-family: Source Han Sans; } .pageBox { @@ -422,18 +364,13 @@ position: relative; } -// .gradchild :hover { -// transform: scale(1.1); -// z-index: 999; -// } - -/* 閲嶇疆瀛愬厓绱犵殑鏍峰紡 */ -// .gradchild:hover .detailDialog { -// transform: scale(1); -// z-index: 999; -// } -.item-circle :hover ::before { - background-color: #b9a587 !important; +.gradchild:hover { + width: 25px; + height: 25px; + margin-top: 2px; + margin-right: 2px; + cursor: pointer; + position: relative; } .item-circle { width: 100%; @@ -477,7 +414,10 @@ align-items: center; } .detailDialog { - position: fixed; + position: absolute; + top: -700%; + transform: translateY(20%); + transform: translateX(-50%); width: 524px; z-index: 9999; cursor: pointer; @@ -485,11 +425,7 @@ border: 2px solid #cbbeaa; box-shadow: 2px 2px 4px 1px rgba(0, 0, 0, 0.5); } -video { - border-radius: 10px; - border: 1px solid #dcdcdc; - box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.1); -} + .yaerWindow { position: absolute; left: -54px; @@ -501,15 +437,15 @@ border: 2px solid #cbbeaa; box-shadow: 2px 2px 4px 1px rgba(0, 0, 0, 0.5); } -// .detailDialog .dialogContent { -// width: 100%; -// height: 100%; -// background-color: #fff; -// position: relative; -// padding: 5px; -// z-index: 20; -// box-sizing: border-box; -// } +.detailDialog .dialogContent { + width: 100%; + height: 100%; + background-color: #fff; + position: relative; + padding: 5px; + z-index: 20; + box-sizing: border-box; +} .closeBtn { position: absolute; width: 20px; @@ -530,4 +466,5 @@ color: #937950; } } + </style> diff --git a/src/views/directory/index.vue b/src/views/directory/index.vue index 4e022f1..a953a4a 100644 --- a/src/views/directory/index.vue +++ b/src/views/directory/index.vue @@ -7,33 +7,18 @@ </div> <div class="page-main-father"> <div class="page-main-title"> - <p - @click="changeTab('chart')" - :class="[activeTabs == 'chart' ? 'active-tab' : '']" - > - <img - :src="[activeTabs == 'chart' ? chartIcon : noChartIcon]" - alt="" - /> + <p @click="changeTab('chart')" :class="[activeTabs == 'chart' ? 'active-tab' : '']"> + <img :src="[activeTabs == 'chart' ? chartIcon : noChartIcon]" alt="" /> <span>鍥捐〃鏄剧ず</span> </p> - <p - @click="changeTab('list')" - :class="[activeTabs == 'list' ? 'active-tab' : '']" - > + <p @click="changeTab('list')" :class="[activeTabs == 'list' ? 'active-tab' : '']"> <img :src="[activeTabs == 'list' ? listIcon : noListIcon]" alt="" /> <span>鍒楄〃鏄剧ず</span> </p> </div> <!-- 鍥捐〃鏄剧ず --> - <div - class="charts-main" - v-show="activeTabs == 'chart'" - v-loading="loading" - element-loading-text="鍥捐〃鍔犺浇涓�" - element-loading-spinner="el-icon-loading" - element-loading-background="rgba(0, 0, 0, 0)" - > + <div class="charts-main" v-show="activeTabs == 'chart'" v-loading="loading" element-loading-text="鍥捐〃鍔犺浇涓�" + element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0)"> <div class="radial-tree-container" v-show="!loading"> <div ref="chart" style="width: 100%; height: 70vh"></div> </div> @@ -48,49 +33,36 @@ </div> <transition name="el-fade-in-linear"> <div class="tooltipBox" v-show="tooltipShow"> - <div - style=" + <div style=" padding: 10px; background: #fdf8f0; border-radius: 5px; width: 100%; max-height: 500px; text-align: center; - " - > + "> <div class="closeBtn" @click="tooltipShow = false"> <i class="el-icon-close"></i> </div> <div style="display: flex"> - <div - style=" + <div style=" width: 80px; height: 80px; position: relative; margin-bottom: 10px; background: #d8d8d8; - " - > - <img - class="autoImg" - :src=" - currentNodeInfo.icon - ? currentNodeInfo.icon - : '@/assets/images/directory/touxiang.png' - " - alt="" - /> + "> + <img class="autoImg" :src="currentNodeInfo.icon + ? currentNodeInfo.icon + : '@/assets/images/directory/touxiang.png' + " alt="" /> </div> - <div - style="padding-top: 20px; text-align: left; margin-left: 20px" - > - <div - style=" + <div style="padding-top: 20px; text-align: left; margin-left: 20px"> + <div style=" font-size: 16px; font-weight: bold; margin-bottom: 5px; - " - > + "> {{ currentNodeInfo.name }} </div> <div style="margin-top: 20px"> @@ -111,15 +83,13 @@ </div> </div> - <div - style=" + <div style=" font-size: 16px; font-weight: bold; margin-bottom: 5px; text-align: left; margin-top: 10px; - " - > + "> <p style="margin-bottom: 15px"> 瀛︿範鏃堕棿锛歿{ currentNodeInfo.studyTime || "-" }} </p> @@ -134,15 +104,13 @@ 鑱岀О锛歿{ currentNodeInfo.professionalTitle || "-" }} </p> </div> - <div - style=" + <div style=" text-align: left; line-height: 22px; max-height: 200px; overflow-y: auto; padding: 10px; - " - > + "> <div v-html="currentNodeInfo.studentProfile"></div> </div> <!-- <div @@ -167,17 +135,10 @@ </div> <!-- 鍒楄〃鏄剧ず --> <div class="page-main" v-show="activeTabs == 'list'"> - <div - v-loading="loading" - style="min-height: 550px" - element-loading-background="rgba(0, 0, 0, 0)" - element-loading-text="瀛︾敓鍒楄〃鍔犺浇涓�" - element-loading-spinner="el-icon-loading" - > + <div v-loading="loading" style="min-height: 550px" element-loading-background="rgba(0, 0, 0, 0)" + element-loading-text="瀛︾敓鍒楄〃鍔犺浇涓�" element-loading-spinner="el-icon-loading"> <div v-for="(item, index) in universityList" :key="index"> - <div - class="table-title" - v-if="item.studentList && item.studentList.length > 0"> + <div class="table-title" v-if="item.studentList && item.studentList.length > 0"> <div class="table-title-left"> <p class="table-title-name">{{ item.unitName }}</p> <p class="table-title-degree">{{ item.academicDegreeName }}</p> @@ -185,19 +146,13 @@ {{ item.studentList.length }}浜� </p> </div> - <div - class="table-title-right" - @click="item.isShow = !item.isShow"> + <div class="table-title-right" @click="item.isShow = !item.isShow"> <img :src="[item.isShow ? topIcon : bottomIcon]" alt="" /> </div> </div> - <table - cellpadding="100" - v-if=" - item.studentList && item.studentList.length > 0 && item.isShow - " - style="vertical-align: middle" - > + <table cellpadding="100" v-if=" + item.studentList && item.studentList.length > 0 && item.isShow + " style="vertical-align: middle"> <tr class="table-heading"> <th>濮撳悕</th> <th>鎬у埆</th> @@ -225,7 +180,7 @@ <td> {{ citem.professionalTitle === undefined || - citem.professionalTitle === "" + citem.professionalTitle === "" ? "-" : citem.professionalTitle }} @@ -340,34 +295,26 @@ text-align: center; "> <div style="width: 80px;height: 80px;position: relative; margin: 0 auto; margin-bottom: 10px;background: #D8D8D8;"> - <img class="autoImg" src="${ - data.icon - ? data.icon - : require("@/assets/images/directory/touxiang.png") - }" alt=""> + <img class="autoImg" src="${data.icon + ? data.icon + : require("@/assets/images/directory/touxiang.png") + }" alt=""> </div> - <div style="font-size: 16px; font-weight: bold; margin-bottom: 5px;">${ - data.name || "-" + <div style="font-size: 16px; font-weight: bold; margin-bottom: 5px;">${data.name || "-" }</div> - <div> <span> ${ - data.gender == "male" ? "鐢�" : "濂�" || "-" - } </span> <span> ${data.academicName || "-"} </span> <span> ${ - this.legendList.find((item) => item.value == data.unit)?.name || + <div> <span> ${data.gender == "male" ? "鐢�" : "濂�" || "-" + } </span> <span> ${data.academicName || "-"} </span> <span> ${this.legendList.find((item) => item.value == data.unit)?.name || "-" - } </span></div> + } </span></div> <div style="font-size: 16px; font-weight: bold; margin-bottom: 5px;text-align: left;margin-top: 10px;overflow: hidden;"> - <p style="margin-bottom: 5px;">瀛︿範鏃堕棿锛�${ - data.studyTime || "-" - }</p> - <p style="margin-bottom: 5px; white-space: pre-wrap" >鐜板伐浣滃崟浣嶏細${ - data.currentEmployer_secondary || "-" - }</p> - <p style="margin-bottom: 5px;">鑱屽姟锛�${ - data.jobTitle || "-" - }</p> - <p style="margin-bottom: 5px;">鑱岀О锛�${ - data.professionalTitle || "-" - }</p> + <p style="margin-bottom: 5px;">瀛︿範鏃堕棿锛�${data.studyTime || "-" + }</p> + <p style="margin-bottom: 5px; white-space: pre-wrap" >鐜板伐浣滃崟浣嶏細${data.currentEmployer_secondary || "-" + }</p> + <p style="margin-bottom: 5px;">鑱屽姟锛�${data.jobTitle || "-" + }</p> + <p style="margin-bottom: 5px;">鑱岀О锛�${data.professionalTitle || "-" + }</p> </div> </div> @@ -385,8 +332,7 @@ <div style="width: 80px;height: 80px;position: relative; margin: 0 auto; margin-bottom: 10px;background: #D8D8D8;"> <img class="autoImg" src="${require("@/assets/images/directory/touxiang.png")}" alt=""> </div> - <div style="font-size: 16px; font-weight: bold; margin-bottom: 5px;">${ - data.name + <div style="font-size: 16px; font-weight: bold; margin-bottom: 5px;">${data.name }</div> <div> <span> ${data.academicDegreeName || "-"} </span></div> @@ -523,6 +469,8 @@ }) .then((res) => { let arrList = []; + console.log(this.unitList, "unitList"); + console.log(this.academicDegreeList, "this.academicDegreeList"); this.unitList.forEach((item) => { this.academicDegreeList.forEach((citem) => { arrList.push({ @@ -543,9 +491,9 @@ }); }); }); - this.loading = false; - console.log(res, "res"); console.log(arrList, "arrList"); + console.log(res, "res"); + if (res.datas && res.datas.length) { res.datas.forEach((item) => { arrList.forEach((citem) => { @@ -561,10 +509,9 @@ } }); }); + console.log(arrList, "鍘婚櫎arrList"); arrList = arrList.filter((item) => item.studentList.length); - - // console.log(arrList, "arrList"); - + console.log(arrList, "arrList"); this.universityList = arrList; this.chartData.children = arrList; const temp_chartData = { @@ -572,9 +519,9 @@ children: arrList, }; this.chartData = temp_chartData; - // console.log(this.chartData, "this.chartData"); this.initChart(); + this.loading = false; } }) .catch((error) => { @@ -595,7 +542,6 @@ overflow: hidden; display: flex; flex-direction: column; - font-family: Source Han Sans; } .page-header { @@ -671,6 +617,7 @@ overflow: hidden; margin-bottom: 100px; padding-top: 50px; + table { width: 100%; border-collapse: collapse; @@ -797,6 +744,7 @@ .tagText { margin-left: 30px; } + ::v-deep .el-loading-spinner { color: #937950 !important; } @@ -812,7 +760,7 @@ color: #937950; } - .el-icon-loading { + .el-icon-loading{ font-size: 14px; color: #937950; } diff --git a/src/views/honors/index.vue b/src/views/honors/index.vue index b942876..7d14eb4 100644 --- a/src/views/honors/index.vue +++ b/src/views/honors/index.vue @@ -241,9 +241,9 @@ } } -.honor-main-bottom{ - display: flex; - justify-content: space-between +.honor-main-bottom { + display: flex; + justify-content: space-between } ::v-deep .el-loading-spinner { @@ -341,4 +341,9 @@ border-radius: 5px; border: 1px solid#cccccc; } + +//淇敼榧犳爣婊戣繃鐨勯鑹� +:deep.el-pagination.is-background .el-pager li:not(.disabled):hover{ + color: #937950 +} </style> -- Gitblit v1.9.1