From 5e73d562bae941a7658c3c13fdb585461f1a24e4 Mon Sep 17 00:00:00 2001 From: zhongshujie <2862698242@qq.com> Date: 星期一, 28 四月 2025 21:21:07 +0800 Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/wyyDatabase --- src/views/achievements/details.vue | 63 +++++++++++++++++++------------ 1 files changed, 39 insertions(+), 24 deletions(-) diff --git a/src/views/achievements/details.vue b/src/views/achievements/details.vue index c2b8297..e3708e1 100644 --- a/src/views/achievements/details.vue +++ b/src/views/achievements/details.vue @@ -22,14 +22,14 @@ <p> <span v-for="(item, index) in details.author" :key="index">{{ item }}</span> </p> - <p v-if="details.abstract"> - <span>鎽樿锛�</span> - <span class="page-main-abstract" v-html="details.abstract"></span> + <p v-if="details.cleanAbstract"> + <span class="abstract-title">鎽樿锛�</span> + <span class="page-main-abstract-main" v-html="details.cleanAbstract"></span> </p> <p v-if="details.keyWords && details.keyWords.length > 0"> <span>鍏抽敭璇嶏細</span> <span class="page-main-keyword" v-for="(item, index) in details.keyWords" :key="index">{{ item - }}</span> + }}</span> </p> <p v-if="details.cmsItemType != 'video' && details.cmsItemType != 'audio'"> <el-button @click="openPdf(details.name)">鏌ョ湅鍏ㄦ枃</el-button> @@ -63,9 +63,9 @@ <li class="main-author"> {{ item.author }} </li> - <li class="main-title" :title="item.abstract" v-if="item.abstract"> + <li class="main-title" :title="item.abstract" v-if="item.cleanAbstract"> <span>鎽樿: </span> - <span class="page-main-abstract" v-html="item.abstract"></span> + <span class="page-main-abstract" v-html="item.cleanAbstract"></span> </li> <li class="main-keyword" v-if="item.keyWords && item.keyWords.length > 0"> <span>鍏抽敭璇嶏細</span> @@ -154,7 +154,7 @@ resourceTypeValueList: [], // 鏌ヨ缁撴灉 resultList: [], - loading: false, + loading: true, pdfLoading: false, }; }, @@ -182,6 +182,7 @@ if (this.details.cmsItemType == "video" || this.details.cmsItemType == "audio") { if (this.details.file != "") { this.details.src = await this.getResourcePath(this.details.file) + console.log(this.details.src, "瑙嗛鍦板潃"); } } @@ -206,6 +207,7 @@ cmsType: ["cmsItem"], "Id=": [id + ""], source: [], + isbn: [], year: [], abstract: [], keyWords: [], @@ -227,6 +229,10 @@ if (item.author && item.author.length > 0) { item.author = item.author.split(";"); } + if (item.abstract) { + item.cleanAbstract = item.abstract.replace(/<[^>]+>/g, ""); + } + const foundItem = this.category.list.find((citem) => citem.value == item.cmsItemType); item.resourceTypeName = foundItem ? foundItem.name : ''; }) @@ -428,6 +434,7 @@ // 'id=':[this.$route.params.key], "resourceType*": this.resourceTypeValueList, source: [], + isbn: [], year: [], abstract: [], keyWords: [], @@ -446,6 +453,9 @@ } else { // 璁剧疆涓�涓粯璁ゅ�兼垨鑰呰繘琛屽叾浠栭敊璇鐞� item.keyWords = []; + } + if (item.abstract) { + item.cleanAbstract = item.abstract.replace(/<[^>]+>/g, ""); } const foundItem = this.category.list.find((citem) => citem.value == item.cmsItemType); item.resourceTypeName = foundItem ? foundItem.name : ''; @@ -478,6 +488,7 @@ cmsType: ["cmsItem"], "resourceType*": this.resourceTypeValueList, source: [], + isbn: [], year: [], abstract: [], keyWords: [], @@ -496,6 +507,9 @@ } else { // 璁剧疆涓�涓粯璁ゅ�兼垨鑰呰繘琛屽叾浠栭敊璇鐞� item.keyWords = []; + } + if (item.abstract) { + item.cleanAbstract = item.abstract.replace(/<[^>]+>/g, ""); } const foundItem = this.category.list.find((citem) => citem.value == item.cmsItemType); item.resourceTypeName = foundItem ? foundItem.name : ''; @@ -582,11 +596,11 @@ font-size: 14px; background-color: transparent; color: #937950; - border: 1px solid #6f5a3a; + border: 1px solid #937950; border-radius: 0; &:hover { - background-color: #6f5a3a; + background-color: #937950; color: #fffdf8; } } @@ -630,11 +644,11 @@ font-size: 14px; background-color: #937950; color: #fff; - border: 1px solid #6f5a3a; + border: 1px solid #937950; border-radius: 0; &:hover { - background-color: #6f5a3a; + background-color: #937950; color: #fffdf8; } } @@ -642,9 +656,9 @@ .page-main-abstract { font-family: Source Han Sans !important; font-size: 14px !important; - font-weight: 350 !important; line-height: 26px !important; color: #333333 !important; + font-weight: 100 !important; } p:nth-child(1) { @@ -670,20 +684,22 @@ margin-bottom: 13px; font-family: Source Han Sans; font-size: 14px; - font-weight: 350; line-height: 26px; color: #333333; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; - -webkit-line-clamp: 3; + + .abstract-title { + font-weight: bold; + } span { font-family: Source Han Sans; font-size: 14px; - font-weight: bold; color: #333333; } + } p:nth-child(3) { @@ -816,16 +832,17 @@ font-size: 16px; font-weight: bold; color: #937950; + margin-bottom: 5px; ::v-deep .el-button { font-size: 14px; background-color: transparent; color: #937950; - border: 1px solid #6f5a3a; + border: 1px solid #937950; border-radius: 0; &:hover { - background-color: #6f5a3a; + background-color: #937950; color: #fffdf8; } } @@ -868,9 +885,7 @@ border-left: 1px solid #2c2c2c; } - - - margin-bottom: 10px; + margin-bottom: 15px; } .main-author { @@ -891,7 +906,7 @@ overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; - -webkit-line-clamp: 4; + -webkit-line-clamp: 3; span { font-family: Source Han Sans; @@ -947,6 +962,7 @@ object-fit: contain; } } + ::v-deep .el-loading-spinner { .el-loading-text { font-size: 14px; @@ -958,8 +974,6 @@ color: #937950; } } - - </style> <style lang="less"> @@ -990,7 +1004,8 @@ .el-dialog__title, .el-dialog__headerbtn .el-dialog__close { color: #fff; - font-weight: 900;font-size: 16px; + font-weight: 900; + font-size: 16px; } } } -- Gitblit v1.9.1