Merge branch 'master' of http://182.92.203.7:2001/r/wyyDatabase
| | |
| | | <li class="left-title"> |
| | | <div> |
| | | <span>{{ annual.title }}</span> |
| | | <span> |
| | | <span @click="timeSortChange()"> |
| | | 时间 |
| | | <img |
| | | class="sort-Icon" |
| | | :src="[isDisplay ? sortTop : sortBottom]" |
| | | :src="[resourceTypeSortInfo ? sortTop : sortBottom]" |
| | | alt="" |
| | | /> |
| | | </span> |
| | | <span |
| | | <span @click="countSortChange()" |
| | | >文献量 |
| | | <img |
| | | class="sort-Icon" |
| | | :src="[isDisplay ? sortBottom : sortTop]" |
| | | :src="[particularYearSortInfo ? sortTop : sortBottom]" |
| | | alt="" |
| | | /> |
| | | </span> |
| | |
| | | <li class="left-title"> |
| | | <div> |
| | | <span>{{ sources.title }}</span> |
| | | <span> |
| | | <span @click="sourcesSortChange()"> |
| | | 文献量 |
| | | <img |
| | | class="sort-Icon" |
| | | :src="[isDisplay ? sortBottom : sortTop]" |
| | | :src="[sourceFromSortInfo ? sortBottom : sortTop]" |
| | | alt="" |
| | | /> |
| | | </span> |
| | |
| | | <!-- title部分 --> |
| | | <ul class="right-header"> |
| | | <li v-for="(item, index) in associationList" :key="index"> |
| | | <p>{{ item.type }} : {{ item.content }}</p> |
| | | <p>{{ item.type }} : {{ item.name }}</p> |
| | | <img |
| | | @click="removeAssociationList(item.content)" |
| | | @click="removeAssociationList(item)" |
| | | :src="errorIcon" |
| | | alt="" |
| | | /> |
| | |
| | | subjectCheckList: [], |
| | | |
| | | postedSortInfo: true, |
| | | resourceTypeSortInfo: true, |
| | | particularYearSortInfo: true, |
| | | sourceFromSortInfo: true, |
| | | // 年度 |
| | | annual: { |
| | | title: "年度", |
| | |
| | | }; |
| | | }, |
| | | mounted() { |
| | | console.log(this.$route.query, "query"); |
| | | this.inputType = this.$route.query.type; |
| | | this.inputValue = this.$route.query.value; |
| | | this.getSelectData(); |
| | |
| | | |
| | | methods: { |
| | | categoryChange(typeName, val) { |
| | | console.log(val, "val"); |
| | | console.log(typeName, "typeName"); |
| | | if (val.checked) { |
| | | this.categoryChecList.push(val.value); |
| | | this.associationList.push({ |
| | | type: typeName, |
| | | content: val.name, |
| | | value: val.value, |
| | | name: val.valueName || val.name, |
| | | }); |
| | | } else { |
| | | const index = this.categoryChecList.findIndex( |
| | |
| | | |
| | | // 删除 |
| | | removeAssociationList(value) { |
| | | console.log(value, "value"); |
| | | this.associationList = this.associationList.filter( |
| | | (item) => item.content !== value |
| | | (item) => item.content !== value.content |
| | | ); |
| | | this.inputValue = ""; |
| | | |
| | | switch (value.value) { |
| | | case "resourceType": |
| | | this.categoryOBJ.list.forEach((item) => { |
| | | if (item.name == value.content) { |
| | | item.checked = false; |
| | | } |
| | | }); |
| | | break; |
| | | |
| | | case "particularYear": |
| | | this.annual.list.forEach((item) => { |
| | | if (item.name == value.content) { |
| | | item.checked = false; |
| | | } |
| | | }); |
| | | break; |
| | | case "sourceFrom": |
| | | this.sources.list.forEach((item) => { |
| | | if (item.name == value.content) { |
| | | item.checked = false; |
| | | } |
| | | }); |
| | | break; |
| | | } |
| | | // 通知父组件数据已改变 |
| | | this.getItemList(); |
| | | }, |
| | |
| | | // 请求数据 |
| | | getItemList() { |
| | | this.loading = true; |
| | | console.log(this.inputValue, " inputValue"); |
| | | console.log(this.inputType, " inputType"); |
| | | |
| | | let searchData = {}; // 初始化一个空对象来存储搜索数据 |
| | | if (this.inputValue) { |
| | |
| | | } |
| | | } |
| | | |
| | | console.log(this.associationList, "searchData11111"); |
| | | console.log(this.associationList, "this.associationList"); |
| | | if (this.associationList && this.associationList.length) { |
| | | let resourceTypeValueList = []; |
| | | let particularYearValueList = []; |
| | | let sourceFromValueList = []; |
| | | |
| | | this.associationList.forEach((item) => { |
| | | debugger; |
| | | if (item.value !== "all") { |
| | | if (item.value == "year") { |
| | | const endDate = item.content.split("/")[0] + "/12/31 23:59:59"; |
| | | const startDate = item.content.split("/")[0] + "/01/01 00:00:00"; |
| | | searchData[item.value + ">="] = startDate; |
| | | searchData[item.value + "<="] = endDate; |
| | | } else if (item.value) { |
| | | // searchData[item.value + "*"] = item.content; |
| | | const key = |
| | | item.value === "resourceType" ? "resourceType*" : item.value; |
| | | if (!searchData[key]) { |
| | | searchData[key] = []; // 如果属性不存在,初始化为数组 |
| | | } else if (item.value != "year") { |
| | | if (item.value == "resourceType") { |
| | | resourceTypeValueList.push(item.content); |
| | | searchData[item.value + "*"] = resourceTypeValueList; |
| | | } else if (item.value == "particularYear") { |
| | | particularYearValueList.push(item.content); |
| | | searchData[item.value + "*"] = particularYearValueList; |
| | | } else if (item.value == "sourceFrom") { |
| | | sourceFromValueList.push(item.content); |
| | | searchData[item.value + "*"] = sourceFromValueList; |
| | | } |
| | | searchData[key].push(item.content); |
| | | } else { |
| | | searchData["||" + item.value + "*"] = item.content; |
| | | } |
| | |
| | | // searchData[key] = searchData[key][0]; |
| | | // } |
| | | // } |
| | | |
| | | console.log(searchData, "searchData"); |
| | | console.log(this.resourceTypeValueList, "resourceTypeValueList"); |
| | | const isResourceTypeValueList = this.categoryChecList.filter( |
| | | (item) => this.resourceTypeValueList.indexOf(item) !== -1 |
| | | ); |
| | | MG.resource |
| | | .getItem({ |
| | | path: "*", |
| | |
| | | fields: { |
| | | cmsType: ["cmsItem"], |
| | | "resourceType*": |
| | | this.categoryChecList.length > 0 |
| | | ? this.categoryChecList |
| | | isResourceTypeValueList.length > 0 |
| | | ? isResourceTypeValueList |
| | | : this.resourceTypeValueList, |
| | | source: [], |
| | | isbn: [], |
| | |
| | | AIReading: [], |
| | | file: [], |
| | | IssueNumber: [], |
| | | // "particularYear*": ["2009"], |
| | | GroupBy: [["particularYear"], ["sourceFrom"], ["resourceType"]], |
| | | "subjectAffiliation*": this.subjectCheckList, |
| | | ...searchData, |
| | |
| | | this.postedSortInfo = !this.postedSortInfo; |
| | | this.getItemList(); |
| | | }, |
| | | timeSortChange() { |
| | | this.resourceTypeSortInfo = !this.resourceTypeSortInfo; |
| | | this.annual.list.sort((a, b) => { |
| | | a.name - b.name; |
| | | }); |
| | | if (this.resourceTypeSortInfo) { |
| | | this.annual.list.sort((a, b) => a.name - b.name); |
| | | } else { |
| | | this.annual.list.sort((a, b) => b.name - a.name); |
| | | } |
| | | }, |
| | | countSortChange() { |
| | | this.particularYearSortInfo = !this.particularYearSortInfo; |
| | | |
| | | if (!this.particularYearSortInfo) { |
| | | this.annual.list.sort((a, b) => a.num - b.num); |
| | | } else { |
| | | this.annual.list.sort((a, b) => b.num - a.num); |
| | | } |
| | | console.log(this.annual.list, "this.annual.list"); |
| | | }, |
| | | sourcesSortChange() { |
| | | this.sourceFromSortInfo = !this.sourceFromSortInfo; |
| | | if (this.sourceFromSortInfo) { |
| | | this.sources.list.sort((a, b) => a.num - b.num); |
| | | } else { |
| | | this.sources.list.sort((a, b) => b.num - a.num); |
| | | } |
| | | }, |
| | | getResourceTypeClass(typeName) { |
| | | switch (typeName) { |
| | | case "journal": |
| | |
| | | <div> |
| | | <div class="subtitle"> |
| | | <div class="source">{{ info.source }}</div> |
| | | <div class="journalInformation">2005 3月 第40卷 第4期</div> |
| | | <div :title="info.contributor">贡献者:{{ info.contributor + "" }}</div> |
| | | <div class="journalInformation">{{ info.endDate }}</div> |
| | | </div> |
| | | <div class="contentBox" style="text-align: left"> |
| | | <div class="contentBox" style="text-align: left"> |
| | |
| | | </div> |
| | | <div class="audioBox" v-if="info.cmsItemType === 'audio'"> |
| | | <div style="text-align: center"> |
| | | <audio |
| | | style="width: 90%" |
| | | :src="info.fileLink" |
| | | controls |
| | | ></audio> |
| | | <audio style="width: 90%" :src="info.fileLink" controls></audio> |
| | | </div> |
| | | <div> |
| | | <div class="subtitle"> |
| | | <div class="source">{{ info.source }}</div> |
| | | <div class="journalInformation">2005 3月 第40卷 第4期</div> |
| | | <div :title="info.contributor" class="source">{{ info.source }}</div> |
| | | <div :title="info.contributor">贡献者:{{ info.contributor + "" }}</div> |
| | | <div :title="info.contributor" class="journalInformation">{{ info.endDate }}</div> |
| | | </div> |
| | | <div class="contentBox" style="text-align: left"> |
| | | <div class="audioContent" v-html="info.abstract"></div> |
| | |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | .subtitle > div { |
| | | max-width: 32%; |
| | | overflow: hidden; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | } |
| | | .subtitle { |
| | | margin-top: 20px; |
| | | } |
| | |
| | | abstract: [], |
| | | keyWords: [], |
| | | subjectAffiliation: [], |
| | | contributor: [], |
| | | file: [], |
| | | }, |
| | | SysType: "CmsItem", |
| | |
| | | <SearchBox @search="handleSearch" /> |
| | | </div> |
| | | </div> |
| | | <div class="menuBox"> |
| | | <div class="menuList"> |
| | | <div |
| | | class="menuBox" |
| | | v-loading="loading" |
| | | element-loading-text="加载中" |
| | | element-loading-spinner="el-icon-loading" |
| | | element-loading-background="rgba(0, 0, 0, 0)" |
| | | > |
| | | <div class="menuList" v-show="!loading"> |
| | | <div |
| | | class="menu" |
| | | v-for="item in menuList" |
| | |
| | | <img class="autoImg" :src="item.icon" alt="" /> |
| | | </div> |
| | | <div class="menuTitle">{{ item.title }}</div> |
| | | <div class="menuSubTitle">{{ item.subTitle }}</div> |
| | | <div class="menuSubTitle" v-if="item.title == '年谱'"> |
| | | {{ startYear + "-" + endDate }} |
| | | </div> |
| | | <div class="menuSubTitle" v-else-if="item.title == '学术成果'"> |
| | | {{ achievementsNum > 100 ? "100+" : achievementsNum }} |
| | | </div> |
| | | <div class="menuSubTitle" v-else-if="item.title == '荣誉奖项'"> |
| | | {{ honorNum > 100 ? "100+" : honorNum }} |
| | | </div> |
| | | <div class="menuSubTitle" v-else-if="item.title == '学生目录'"> |
| | | {{ studentNum > 100 ? "100+" : studentNum }} |
| | | </div> |
| | | <div class="menuLine"> |
| | | <img class="autoImg" :src="arrow" alt="" /> |
| | | </div> |
| | |
| | | data() { |
| | | return { |
| | | arrow, |
| | | loading: false, |
| | | resourceList: [ |
| | | "journal", |
| | | "books", |
| | | "audio", |
| | | "video", |
| | | "newspaper", |
| | | "other", |
| | | ], |
| | | menuList: [ |
| | | { |
| | | icon: nianpu1, |
| | | title: "年谱", |
| | | subTitle: "1936-2024", |
| | | subTitle: "100+", |
| | | path: "/chronology", |
| | | }, |
| | | { |
| | |
| | | }, |
| | | ], |
| | | introduction: "", |
| | | startYear: "", |
| | | endDate: "", |
| | | achievementsNum: "", |
| | | honorNum: "", |
| | | studentNum: "", |
| | | }; |
| | | }, |
| | | |
| | | momunted() {}, |
| | | created() { |
| | | this.getPersonInfo(); |
| | | this.getListData(); |
| | | this.getAchievementList(); |
| | | this.getHonorList(); |
| | | this.getStudentList(); |
| | | }, |
| | | methods: { |
| | | goPage(row) { |
| | | console.log(row); |
| | | this.$router.push(row.path); |
| | | }, |
| | | |
| | | getStudentList() { |
| | | this.MG.resource |
| | | .getItem({ |
| | | path: "WYY_student", |
| | | fields: { |
| | | // 性别 |
| | | gender: "", |
| | | //学习时间 |
| | | studyTime: [], |
| | | // 单位 |
| | | unit: [], |
| | | // 现工作单位(到二级单位全称) |
| | | currentEmployer_secondary: "", |
| | | //职务 |
| | | jobTitle: "", |
| | | professionalTitle: "", |
| | | //学位 |
| | | academicDegree: "", |
| | | // 学生简介 |
| | | studentProfile: "", |
| | | }, |
| | | paging: { |
| | | size: 99999, |
| | | }, |
| | | }) |
| | | .then((res) => { |
| | | console.log(res, "res1111111"); |
| | | this.studentNum = res.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | |
| | | getHonorList() { |
| | | this.MG.resource |
| | | .getItem({ |
| | | path: "WYY_honor", |
| | | fields: { |
| | | honor: [], |
| | | year: [], |
| | | }, |
| | | paging: { |
| | | start: 0, |
| | | size: 999, |
| | | }, |
| | | }) |
| | | .then((res) => { |
| | | this.honorNum = res.total; |
| | | }); |
| | | }, |
| | | getAchievementList() { |
| | | this.MG.resource |
| | | .getItem({ |
| | | path: "*", |
| | | queryType: "*", |
| | | paging: { |
| | | start: (this.paginationPage - 1) * 10, |
| | | size: 10, |
| | | }, |
| | | sort: { |
| | | year: this.postedSortInfo ? "Desc" : "Asc", |
| | | }, |
| | | fields: { |
| | | cmsType: ["cmsItem"], |
| | | "resourceType*": this.resourceList, |
| | | source: [], |
| | | isbn: [], |
| | | year: [], |
| | | particularYear: [], |
| | | contributor: [], |
| | | abstract: [], |
| | | keyWords: [], |
| | | author: [], |
| | | DOI: [], |
| | | AIReading: [], |
| | | file: [], |
| | | IssueNumber: [], |
| | | }, |
| | | }) |
| | | .then((res) => { |
| | | console.log(res, "res"); |
| | | this.achievementsNum = res.total; |
| | | }); |
| | | }, |
| | | |
| | | getListData() { |
| | | this.loading = true; |
| | | this.MG.resource |
| | | .getItem({ |
| | | path: "WYY_chronology", |
| | | fields: { |
| | | year: [], |
| | | age: [], |
| | | eventOverview: [], |
| | | eventPictures: [], |
| | | }, |
| | | paging: { |
| | | start: 0, |
| | | size: 999, |
| | | }, |
| | | }) |
| | | .then((res) => { |
| | | this.startYear = res.datas[res.datas.length - 1].year.split("/")[0]; |
| | | this.endDate = res.datas[0].year.split("/")[0]; |
| | | }); |
| | | }, |
| | | |
| | | handleSearch(type) { |
| | |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | <style lang="less" scoped> |
| | | .home { |
| | | width: 100%; |
| | | height: 100vh; |
| | |
| | | text-align: center; |
| | | } |
| | | |
| | | ::v-deep .el-loading-spinner { |
| | | .el-loading-text { |
| | | font-size: 14px; |
| | | color: #937950; |
| | | } |
| | | |
| | | .el-icon-loading { |
| | | font-size: 14px; |
| | | color: #937950; |
| | | } |
| | | } |
| | | |
| | | /* @media screen and (min-width: 1950px) { |
| | | .textInfo { |
| | | font-size: 20px; |