| | |
| | | <template> |
| | | <div class="page"> |
| | | <div class="page-header"> |
| | | <p>王永炎院士学术成果</p> |
| | | <p><span>王永炎院士学术成果</span></p> |
| | | </div> |
| | | <div class="page-main-father"> |
| | | <ul class="page-main"> |
| | | <li class="page-main-name"> |
| | | <p> |
| | | <el-button icon="el-icon-arrow-left" @click="goBack()" |
| | | >返回</el-button |
| | | > |
| | | <el-button icon="el-icon-arrow-left" @click="goBack()">返回</el-button> |
| | | </p> |
| | | <p>{{ detailsList.name }}</p> |
| | | </li> |
| | | <li class="page-main-time"> |
| | | <p> |
| | | <span>{{ detailsList.sources }}</span> |
| | | <span>{{ detailsList.time }}</span> |
| | | <span>{{ detailsList.source }}</span> |
| | | <span>{{ detailsList.year }}</span> |
| | | </p> |
| | | </li> |
| | | <li class="page-main-title"> |
| | | <p> |
| | | <span |
| | | v-for="(item, index) in detailsList.characterList" |
| | | :key="index" |
| | | >{{ item.name }}</span |
| | | > |
| | | <span v-for="(item, index) in detailsList.characterList" :key="index">{{ item.name }}</span> |
| | | </p> |
| | | <p><span>摘要:</span>{{ detailsList.title }}</p> |
| | | <p> |
| | | <span>摘要:</span> |
| | | <span class="page-main-abstract" v-html="detailsList.abstract"></span> |
| | | </p> |
| | | <p> |
| | | <span>关键词:</span> |
| | | <span |
| | | class="page-main-keyword" |
| | | v-for="(item, index) in detailsList.keyword" |
| | | :key="index" |
| | | >{{ item.name }}</span |
| | | > |
| | | <span class="page-main-keyword" v-for="(item, index) in detailsList.keyWords" :key="index">{{ item |
| | | }}</span> |
| | | </p> |
| | | <p v-if="!isDisplay"> |
| | | <el-button @click="isDisplay = !isDisplay">查看全文</el-button> |
| | | </p> |
| | | <p class="page-main-video" v-if="isDisplay"> |
| | | <video |
| | | :src="detailsList.videoUrl" |
| | | controls |
| | | autoplay |
| | | class="video" |
| | | width="70%" |
| | | ></video> |
| | | <video :src="detailsList.videoUrl" controls autoplay class="video" width="70%"></video> |
| | | </p> |
| | | <p class="page-main-audio" v-if="isDisplay"> |
| | | <audio |
| | | :src="detailsList.videoUrl" |
| | | controls |
| | | autoplay |
| | | class="video" |
| | | width="100%" |
| | | ></audio> |
| | | <audio :src="detailsList.videoUrl" controls autoplay class="video" width="100%"></audio> |
| | | </p> |
| | | </li> |
| | | <li class="page-main-literature"> |
| | | <p class="literature-header">相关文献</p> |
| | | <div class="content-right"> |
| | | <!-- 结果展示 --> |
| | | <ul |
| | | class="right-main" |
| | | v-for="(item, index) in resultList" |
| | | :key="index" |
| | | > |
| | | <ul class="right-main" v-for="(item, index) in resultList" :key="index"> |
| | | <li class="main-name"> |
| | | <p>{{ item.name }}</p> |
| | | <p> |
| | |
| | | </li> |
| | | <li class="main-keyword"> |
| | | <span>关键词:</span> |
| | | <span |
| | | class="keyWord" |
| | | v-for="(citem, cindex) in item.keyword" |
| | | :key="cindex" |
| | | > |
| | | <span class="keyWord" v-for="(citem, cindex) in item.keyword" :key="cindex"> |
| | | {{ citem.name }} |
| | | </span> |
| | | </li> |
| | |
| | | ], |
| | | }; |
| | | }, |
| | | mounted() { |
| | | console.log(this.$route.params.key, "key001"); |
| | | this.detailsList = this.$route.params.key; |
| | | }, |
| | | methods: { |
| | | goPage(key) {}, |
| | | goPage(key) { }, |
| | | |
| | | goBack() { |
| | | this.$router.go(-1); |
| | |
| | | background-color: #e9e1d4; |
| | | position: relative; |
| | | overflow: hidden; |
| | | display: flex; |
| | | flex-direction: column; |
| | | } |
| | | |
| | | .page-header { |
| | | 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%); |
| | | |
| | | .page-main-father { |
| | | flex: 1; |
| | | width: 100%; |
| | | height: 100%; |
| | | overflow: auto; |
| | | padding-top: 2%; |
| | | padding-bottom: 2%; |
| | | } |
| | | |
| | | |
| | |
| | | background-color: #6f5a3a; |
| | | color: #fffdf8; |
| | | } |
| | | } |
| | | |
| | | .page-main-abstract { |
| | | font-family: Source Han Sans !important; |
| | | font-size: 14px !important; |
| | | font-weight: 350 !important; |
| | | line-height: 26px !important; |
| | | color: #333333 !important; |
| | | } |
| | | |
| | | p:nth-child(1) { |
| | |
| | | display: flex; |
| | | justify-content: center; |
| | | |
| | | audio { |
| | | } |
| | | audio {} |
| | | } |
| | | |
| | | .page-main-literature { |
| | |
| | | <!-- 搜索框 --> |
| | | <ul class="page-input"> |
| | | <li class="input-main"> |
| | | <SearchBox /> |
| | | <SearchBox @search="handleSearch" /> |
| | | </li> |
| | | <li class="input-txt" @click="isDisplay = !isDisplay"> |
| | | 高级检索 |
| | |
| | | <!-- 共xx条 --> |
| | | <ul class="right-number"> |
| | | <ul class="number-number"> |
| | | 共找到<span>{{ resultList.length }}</span>条结果 |
| | | 共找到<span>{{ this.total }}</span>条结果 |
| | | </ul> |
| | | <ul class="number-time"> |
| | | 发表时间 |
| | |
| | | </p> |
| | | </li> |
| | | <li class="main-sources"> |
| | | <span>{{ item.type }}</span> |
| | | <span>{{ item.sources }}</span> |
| | | <span>{{ item.time }}</span> |
| | | <span>{{ item.resourceTypeName }}</span> |
| | | <span>{{ item.source }}</span> |
| | | <span>{{ item.year }}</span> |
| | | </li> |
| | | <li class="main-author"> |
| | | {{ item.author }} |
| | | </li> |
| | | <li class="main-title" :title="item.title"> |
| | | <span>摘要: </span>{{ item.title }} |
| | | <li class="main-title" :title="item.abstract"> |
| | | <span>摘要: </span> |
| | | <span class="page-main-abstract" v-html="item.abstract"></span> |
| | | </li> |
| | | <li class="main-keyword"> |
| | | <span>关键词:</span> |
| | | <span class="keyWord" v-for="(citem, cindex) in item.keyword" :key="cindex"> |
| | | {{ citem.name }} |
| | | <span class="keyWord" v-for="(citem, cindex) in item.keyWords" :key="cindex"> |
| | | {{ citem }} |
| | | </span> |
| | | </li> |
| | | </ul> |
| | | <!-- 分页 --> |
| | | <div class="pagination"> |
| | | <el-pagination class="msg-pagination-container" :background="isBackground" layout="prev, pager, next" |
| | | :total="200"> |
| | | <el-pagination @current-change="handleCurrentChange" class="msg-pagination-container" |
| | | :background="isBackground" layout="prev, pager, next" :total="total"> |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | |
| | | <script> |
| | | import MyForm from "@/components/form/form.vue"; |
| | | import SearchBox from "@/views/home/components/searchBox.vue"; |
| | | import MG from "@/assets/js/middleGround/WebMiddleGroundApi.js"; |
| | | import moment from "moment"; |
| | | /* eslint-disable vue/no-unused-components */ |
| | | export default { |
| | | name: "achievements", |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | subjectAffiliationRefCode: "subjectAffiliation", |
| | | resourceTypeRefCode: "resourceType", |
| | | errorIcon: require("@/assets/images/achievements/errorIcon.png"), |
| | | topIcon: require("@/assets/images/achievements/top-Icon.png"), |
| | | bottomIcon: require("@/assets/images/achievements/bottom-Icon.png"), |
| | |
| | | ], |
| | | }, |
| | | ], |
| | | total: 0, |
| | | currentPage: 1, |
| | | loading: false, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.getSelectContent(); |
| | | this.getLeftCheckbox() |
| | | this.getSelectData(); |
| | | this.getItemList() |
| | | }, |
| | | |
| | | methods: { |
| | |
| | | }, |
| | | // 页面跳转 |
| | | goPage(key) { |
| | | console.log(key,"key"); |
| | | this.$router.push({ name: "details", params: { key: key } }); |
| | | }, |
| | | // 收起和展示 |
| | |
| | | this.activeBox = this.activeBox === "b" ? null : "b"; |
| | | } |
| | | }, |
| | | // 获取左侧checkbox数据 |
| | | getLeftCheckbox() { |
| | | |
| | | |
| | | }, |
| | | |
| | | //获取下拉选择框的内容 |
| | | async getSelectData() { |
| | | try { |
| | | // 同时发起两个异步请求,并等待它们的结果 |
| | | const [subjectListResult, resourceListResult] = await Promise.all([ |
| | | this.getSelectContent(this.subjectAffiliationRefCode), |
| | | this.getSelectContent(this.resourceTypeRefCode), |
| | | ]); |
| | | this.subject.list = subjectListResult.option |
| | | this.category.list = resourceListResult.option; |
| | | } catch (error) { |
| | | console.error("获取下拉框数据失败:", error); |
| | | } |
| | | }, |
| | | |
| | | //获取选择内容 |
| | | getSelectContent(refCode) { |
| | | let requestData = { refCodes: [refCode] }; |
| | | return MG.store |
| | | .getProductTypeField(requestData) |
| | | .then((res) => { |
| | | const selestList = JSON.parse(res[0].config); |
| | | this.getLeftCheckbox() |
| | | return selestList; |
| | | }) |
| | | .catch((error) => { |
| | | console.error("获取荣誉失败:", error); |
| | | return null; |
| | | }); |
| | | }, |
| | | |
| | | // 搜索 |
| | | handleSearch(text, type) { |
| | | console.log(1234); |
| | | console.log(text, type, "搜索123"); |
| | | }, |
| | | |
| | | // getTtem |
| | | getItemList() { |
| | | this.loading = true; |
| | | MG.resource |
| | | .getItem({ |
| | | path: "*", |
| | | queryType: "*", |
| | | paging: { |
| | | start: (this.currentPage - 1) * 6, |
| | | size: 6 |
| | | }, |
| | | fields: { |
| | | cmsType: ["cmsItem"], |
| | | resourceType: [], |
| | | source: [], |
| | | year: [], |
| | | abstract: [], |
| | | keyWords: [], |
| | | }, |
| | | }) |
| | | .then((res) => { |
| | | console.log(res, "全部数据"); |
| | | res.datas.forEach((item) => { |
| | | item.year = moment(item.year).format("YYYY-MM-DD") |
| | | item.keyWords = item.keyWords.split(";;") |
| | | item.resourceTypeName = this.category.list.find((citem) => citem.value == item.resourceType).name |
| | | }) |
| | | this.resultList = res.datas |
| | | this.total = res.total; |
| | | this.loading = false; |
| | | }) |
| | | }, |
| | | |
| | | // 处理页码变化 |
| | | handleCurrentChange(newPage) { |
| | | this.currentPage = newPage; |
| | | this.getItemList(); // 重新获取数据 |
| | | }, |
| | | |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | flex: 1; |
| | | width: 100%; |
| | | height: 100%; |
| | | min-width: 1292px; |
| | | overflow: auto; |
| | | padding-top: 1%; |
| | | padding-bottom: 2%; |
| | |
| | | } |
| | | } |
| | | |
| | | .page-main-abstract { |
| | | font-family: Source Han Sans !important; |
| | | font-size: 14px !important; |
| | | font-weight: 350 !important; |
| | | line-height: 26px !important; |
| | | color: #333333 !important; |
| | | } |
| | | |
| | | .main-keyword { |
| | | span:nth-child(1) { |
| | | font-family: Source Han Sans; |
| | |
| | | </el-select> |
| | | <div class="inputBox"> |
| | | <input type="text" v-model="searchText" class="search-input" /> |
| | | <div class="searchBtn">搜索</div> |
| | | <div class="searchBtn" @click="handleSearch()">搜索</div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | <script> |
| | | export default { |
| | | name: "SearchBox", |
| | | props: { |
| | | // 接收外部传入的选项 |
| | | options: { |
| | | type: Array, |
| | | default: () => [ |
| | | { value: "all", label: "全部" }, |
| | | { value: "name", label: "标题" }, |
| | | { value: "author", label: "作者" }, |
| | | { value: "year", label: "年份" }, |
| | | { value: "keyWords", label: "关键词" }, |
| | | { value: "abstract", label: "摘要" }, |
| | | { value: "source", label: "来源" }, |
| | | ], |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | searchText: "", // 输入框内容 |
| | | selectedType: "", // 下拉框选中值 |
| | | options: [ |
| | | // 下拉选项 |
| | | { value: "all", label: "全部" }, |
| | | { value: "name", label: "名称" }, |
| | | { value: "id", label: "ID" }, |
| | | { value: "code", label: "编码" }, |
| | | ], |
| | | }; |
| | | }, |
| | | methods: { |