| | |
| | | </li> |
| | | </ul> |
| | | <!-- 学科 --> |
| | | <ul> |
| | | <!-- <ul> |
| | | <li class="left-title"> |
| | | <span>{{ subject.title }}</span> |
| | | <p @click="subject.isDisplay = !subject.isDisplay"> |
| | |
| | | <span class="">{{ item.num }}</span> |
| | | </div> |
| | | </li> |
| | | </ul> |
| | | </ul> --> |
| | | </div> |
| | | <div |
| | | class="content-right" |
| | |
| | | v-if="item.abstract" |
| | | > |
| | | <span>摘要: </span> |
| | | <span class="page-main-abstract" v-html="item.cleanAbstract"></span> |
| | | <span |
| | | class="page-main-abstract" |
| | | v-html="item.cleanAbstract" |
| | | ></span> |
| | | </li> |
| | | <li |
| | | class="main-keyword" |
| | |
| | | { |
| | | type: "input", |
| | | label: "标 题", |
| | | name: "title", |
| | | name: "Name", |
| | | value: "", |
| | | }, |
| | | { |
| | |
| | | author: "作者", |
| | | keyword: "关键词", |
| | | source: "来源", |
| | | title: "标题", |
| | | Name: "标题", |
| | | year: "年份", |
| | | }, |
| | | }; |
| | |
| | | }, |
| | | |
| | | async onSubmit(val) { |
| | | console.log(val, "val"); |
| | | console.log(this.associationList, "associationList"); |
| | | |
| | | for (let key in val) { |
| | | if (val[key] != "") { |
| | | this.associationList.push({ |
| | | type: this.labelList[key], |
| | | content: val[key], |
| | | value: key, |
| | | }); |
| | | const hasKey = this.associationList.find((item) => item.value == key); |
| | | if (!hasKey) { |
| | | this.associationList.push({ |
| | | type: this.labelList[key], |
| | | content: val[key], |
| | | value: key, |
| | | }); |
| | | }else { |
| | | hasKey.content = val[key] |
| | | } |
| | | } |
| | | } |
| | | console.log(this.associationList, "this.associationList"); |
| | | this.getItemList(); |
| | | }, |
| | | //重置搜索结果 |
| | |
| | | |
| | | // 搜索 |
| | | handleSearch(isText) { |
| | | console.log(isText, "isText"); |
| | | this.associationList = []; |
| | | console.log(isText, "isText"); |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | console.log(searchData, "searchData1"); |
| | | |
| | | if (this.associationList && this.associationList.length) { |
| | | this.associationList.forEach((item) => { |
| | | if (item.value == "year") { |
| | |
| | | const startDate = item.content.split("/")[0] + "/01/01 00:00:00"; |
| | | searchData[item.value + ">="] = startDate; |
| | | searchData[item.value + "<="] = endDate; |
| | | } else { |
| | | searchData["||" +item.value + "*"] = item.content; |
| | | } else if (item.value) { |
| | | searchData[item.value + "*"] = item.content; |
| | | } |
| | | }); |
| | | } |
| | |
| | | this.resultList = res.datas; |
| | | this.total = res.total; |
| | | this.loading = false; |
| | | }).catch((error) => { |
| | | }) |
| | | .catch((error) => { |
| | | // 打印错误信息 |
| | | console.error("获取数据失败:", error); |
| | | }); |
| | | |
| | | // 滚动到页面顶部 |
| | | this.$nextTick(() => { |
| | | const pageMain = document.querySelector('.page-main-father'); |
| | | const pageMain = document.querySelector(".page-main-father"); |
| | | if (pageMain) { |
| | | pageMain.scrollTo({ |
| | | top: 0, |
| | | behavior: 'smooth' |
| | | behavior: "smooth", |
| | | }); |
| | | } |
| | | }); |