| | |
| | | export const requestCtx = "http://182.92.203.7:3001"; // 请求地址 |
| | | export const appId = 12; |
| | | export const appId = 40; |
| | | // export const requestCtx = "https://www.tepcb.com"; // 请求地址 |
| | | // export const appId = 2; |
| | | export const requestTimeOut = 300000; // 请求超时时间 |
| | |
| | | export const publicStore = `defaultPublicStore${appId}`; // 默认资源开放仓储 |
| | | export const publicRepository = `defaultPublicRepository${appId}`; // 默认资源开放库 |
| | | |
| | | |
| | | const config = { |
| | | requestCtx, |
| | | requestTimeOut, |
| | |
| | | if (md5) { |
| | | src = requestCtx + `/file/GetPreViewImage?md5=${md5}`; |
| | | } else { |
| | | return require("@/assets/images/homeBg.png"); |
| | | return "" |
| | | // return require("@/assets/images/homeBg.png"); |
| | | } |
| | | if (width) src += `&width=${width}`; |
| | | if (height) src += `&height=${height}`; |
| | |
| | | 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 { |
| | |
| | | |
| | | mounted() { |
| | | this.initChart(); |
| | | this.getStudentList() |
| | | window.addEventListener("resize", this.handleResize); |
| | | }, |
| | | beforeDestroy() { |
| | |
| | | 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('获取荣誉失败:', error); |
| | | }); |
| | | }, |
| | | |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | <template> |
| | | <div class="honors"> |
| | | <div class="honors-title"> |
| | | <p>王永炎院士荣誉奖项</p> |
| | | <p> |
| | | <span>王永炎院士荣誉奖项</span> |
| | | </p> |
| | | </div> |
| | | <div class="page-main-father"> |
| | | <div class="honors-main"> |
| | | <div class="honors-main-box"> |
| | | <!-- 左边标题 --> |
| | | <div class="honors-main-title">荣<br />誉<br />奖<br />项</div> |
| | | <!-- 右边内容 --> |
| | | <div class="honors-text"> |
| | | <ul> |
| | | <ul v-loading="loading"> |
| | | <li v-for="(item, index) in honorList" :key="index"> |
| | | <img |
| | | class="main-img" |
| | | :src="item.imgSrc ? item.imgSrc : defaultImg" |
| | | alt="" |
| | | /> |
| | | <img class="main-img" :src="item.icon ? item.icon : defaultImg" alt="" /> |
| | | <div> |
| | | <p class="main-time">{{ item.time }}</p> |
| | | <p class="main-text" :title="item.txt">{{ item.txt }}</p> |
| | | <p class="main-time">{{ item.year }}</p> |
| | | <p class="main-text" :title="item.txt">{{ item.honor }}</p> |
| | | </div> |
| | | </li> |
| | | </ul> |
| | | <img |
| | | class="honor-Bg" |
| | | src="../../assets/images/honors/honor-Bg.png" |
| | | alt="" |
| | | /> |
| | | <!-- 分页 --> |
| | | <div class="pagination"> |
| | | <el-pagination |
| | | class="msg-pagination-container" |
| | | :background="isBackground" |
| | | layout="prev, pager, next" |
| | | :total="200" |
| | | > |
| | | </el-pagination> |
| | | <div> |
| | | <!-- 分页 --> |
| | | <div class="pagination"> |
| | | <el-pagination @current-change="handleCurrentChange" class="msg-pagination-container" |
| | | :background="isBackground" layout="prev, pager, next" :total="total"> |
| | | </el-pagination> |
| | | </div> |
| | | <!-- “山”图片 --> |
| | | <img class="honor-Bg" src="../../assets/images/honors/honor-Bg.png" alt="" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import MG from '@/assets/js/middleGround/WebMiddleGroundApi.js' |
| | | export default { |
| | | data() { |
| | | return { |
| | | defaultImg: require("@/assets/images/honors/honorImg.png"), |
| | | isBackground: true, |
| | | honorList: [ |
| | | { |
| | | imgSrc: "", |
| | | time: "1986年11月", |
| | | txt: "1991年11月'清开灵注射液治疗中风病痰热证的临床与实验研究'获1991年度国家科技进步奖三等奖", |
| | | }, |
| | | { |
| | | imgSrc: "", |
| | | time: "1986年11月", |
| | | txt: "1991年11月'清开灵注射液治疗中风病痰热证的临床与实验研究'获1991年度国家科技进步奖三等奖", |
| | | }, |
| | | { |
| | | imgSrc: "", |
| | | time: "1986年11月", |
| | | txt: "1991年11月'清开灵注射液治疗中风病痰热证的临床与实验研究'获1991年度国家科技进步奖三等奖", |
| | | }, |
| | | { |
| | | imgSrc: "", |
| | | time: "1986年11月", |
| | | txt: "1991年11月'清开灵注射液治疗中风病痰热证的临床与实验研究'获1991年度国家科技进步奖三等奖", |
| | | }, |
| | | { |
| | | imgSrc: "", |
| | | time: "1986年11月", |
| | | txt: "1991年11月'清开灵注射液治疗中风病痰热证的临床与实验研究'获1991年度国家科技进步奖三等奖", |
| | | }, |
| | | { |
| | | imgSrc: "", |
| | | time: "1986年11月", |
| | | txt: "1991年11月'清开灵注射液治疗中风病痰热证的临床与实验研究'获1991年度国家科技进步奖三等奖", |
| | | }, |
| | | { |
| | | imgSrc: "", |
| | | time: "1986年11月", |
| | | txt: "1991年11月'清开灵注射液治疗中风病痰热证的临床与实验研究'获1991年度国家科技进步奖三等奖", |
| | | }, |
| | | { |
| | | imgSrc: "", |
| | | time: "1986年11月", |
| | | txt: "1991年11月'清开灵注射液治疗中风病痰热证的临床与实验研究'获1991年度国家科技进步奖三等奖,1991年11月'清开灵注射液治疗中风病痰热证的临床与实验研究'获1991年度国家科技进步奖三等奖,1991年11月'清开灵注射液治疗中风病痰热证的临床与实验研究'获1991年度国家科技进步奖三等奖1991年11月'清开灵注射液治疗中风病痰热证的临床与实验研究'获1991年度国家科技进步奖三等奖,1991年11月'清开灵注射液治疗中风病痰热证的临床与实验研究'获1991年度国家科技进步奖三等奖", |
| | | }, |
| | | ], |
| | | honorList: [], |
| | | total: 0, |
| | | currentPage: 1, |
| | | loading: false, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.initChart(); |
| | | }, |
| | | methods: { |
| | | // 获取数据 |
| | | initChart() { |
| | | this.loading = true; |
| | | MG.resource.getItem({ |
| | | path: "WYY_honor", |
| | | fields: { |
| | | Link: "", |
| | | honor: "", |
| | | 'year': '', |
| | | }, |
| | | paging: { |
| | | start: (this.currentPage - 1) * 10, |
| | | size: 10, |
| | | }, |
| | | // 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('获取荣誉失败:', error); |
| | | }); |
| | | }, |
| | | // 处理页码变化 |
| | | handleCurrentChange(newPage) { |
| | | this.currentPage = newPage; |
| | | this.initChart(); // 重新获取数据 |
| | | }, |
| | | }, |
| | | |
| | | }; |
| | | </script> |
| | | |
| | |
| | | background-color: #e9e1d4; |
| | | position: relative; |
| | | overflow: hidden; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .honors-title { |
| | | padding: 8px 0; |
| | | height: 9.4%; |
| | | width: 100%; |
| | | text-align: left; |
| | |
| | | position: sticky; |
| | | top: 0; |
| | | z-index: 100; |
| | | |
| | | p { |
| | | padding: 1.6% 0 1.55% 0; |
| | | height: 100%; |
| | | font-family: Alimama DongFangDaKai; |
| | | font-size: 30px; |
| | | text-indent: 1em; |
| | | border-bottom: 1px solid #937950; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | } |
| | | |
| | | .page-main-father { |
| | | height: calc(100% - 9.4%); |
| | | flex: 1; |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow: auto; |
| | | padding-top: 2%; |
| | | padding-bottom: 2%; |
| | | } |
| | | |
| | | .honors-main { |
| | | width: 77.3%; |
| | | height: auto; |
| | | height: 100%; |
| | | margin: 0 auto; |
| | | margin-top: 2%; |
| | | |
| | | } |
| | | |
| | | .honors-main-box { |
| | | height: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | padding: 3.2% 6% 14% 4%; |
| | | padding: 3.2% 6% 0% 4%; |
| | | border: 1px solid #e4dace; |
| | | background: rgba(255, 253, 248, 0.9); |
| | | } |
| | |
| | | } |
| | | |
| | | .honors-text { |
| | | height: 100%; |
| | | width: 100%; |
| | | position: relative; |
| | | padding: 0 0 0 5.8%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | ul { |
| | | flex: 1; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | li { |
| | | height: 25%; |
| | | height: calc(20% - 20px); |
| | | width: 45%; |
| | | display: flex; |
| | | margin-right: 0.9%; |
| | |
| | | } |
| | | |
| | | .honor-Bg { |
| | | position: absolute; |
| | | width: 70.5%; |
| | | height: auto; |
| | | bottom: -36%; |
| | | left: -295px; |
| | | margin-left: -33%; |
| | | } |
| | | |
| | | .pagination { |
| | | // position: absolute; |
| | | // bottom: 0; |
| | | // right: 0; |
| | | padding-right: 47px; |
| | | padding-top: 30px; |
| | | text-align: end; |
| | | } |
| | | } |
| | | |
| | | @font-face { |
| | | font-family: "Alimama DongFangDaKai"; |
| | | src: url("../../assets/font/阿里妈妈东方大楷.ttf"); |
| | | } |
| | | |
| | | // @media screen and (min-width: 1920px) { |
| | | // .honors-main-box { |
| | | // display: flex; |
| | | // justify-content: center; |
| | | // padding: 3.2% 6% 11% 4%; |
| | | // border: 1px solid #e4dace; |
| | | // background: rgba(255, 253, 248, 0.9); |
| | | // } |
| | | // .honor-Bg { |
| | | // position: absolute; |
| | | // width: 70.5%; |
| | | // height: auto; |
| | | // bottom: -20%; |
| | | // left: -26.5%; |
| | | // } |
| | | // } |
| | | |
| | | @media screen and (min-width: 2560px) { |
| | | .honors-main { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | .honor-Bg { |
| | | position: absolute; |
| | | width: 70.5%; |
| | | height: auto; |
| | | bottom: -39%; |
| | | left: -295px; |
| | | } |
| | | |
| | | } |
| | | |
| | | @font-face { |
| | | font-family: "Alimama DongFangDaKai"; |
| | | src: url("../../assets/font/阿里妈妈东方大楷.ttf"); |
| | | } |
| | | |
| | | |
| | | :deep .msg-pagination-container.is-background .el-pager li { |
| | | /*对页数的样式进行修改*/ |
| | |
| | | border: 1px solid #cccccc; |
| | | } |
| | | |
| | | :deep.msg-pagination-container.is-background |
| | | .el-pager |
| | | li:not(.disabled).active { |
| | | :deep.msg-pagination-container.is-background .el-pager li:not(.disabled).active { |
| | | /*当前选中页数的样式进行修改*/ |
| | | background-color: #937950; |
| | | color: #fff; |