| | |
| | | { value: "all", label: "全部" }, |
| | | { value: "Name", label: "标题" }, |
| | | { value: "author", label: "作者" }, |
| | | // { value: "year", label: "年份" }, |
| | | { value: "keyWords", label: "关键词" }, |
| | | { value: "abstract", label: "摘要" }, |
| | | { value: "source", label: "来源" }, |
| | |
| | | |
| | | //获取下拉选择框的内容 |
| | | async getSelectData() { |
| | | this.loading = true; |
| | | try { |
| | | // 同时发起两个异步请求,并等待它们的结果 |
| | | const [subjectListResult, resourceListResult] = await Promise.all([ |
| | |
| | | // 搜索 |
| | | handleSearch(isText) { |
| | | this.associationList = []; |
| | | console.log(isText, "isText"); |
| | | |
| | | if (isText.text != "") { |
| | | this.inputValue = isText.text; |
| | | this.inputType = isText.type; |
| | | this.associationList.push({ |
| | | type: isText.label, |
| | | content: isText.text, |
| | | value: isText.type, |
| | | }); |
| | | this.getItemList(); |
| | | } |
| | |
| | | |
| | | // 请求数据 |
| | | getItemList() { |
| | | this.loading = true; |
| | | let searchData = {}; // 初始化一个空对象来存储搜索数据 |
| | | if (this.inputValue) { |
| | | // 如果输入值存在 |
| | |
| | | searchData[item.value + ">="] = startDate; |
| | | searchData[item.value + "<="] = endDate; |
| | | } else { |
| | | searchData[item.value + "*"] = item.content; |
| | | searchData["||" +item.value + "*"] = item.content; |
| | | } |
| | | }); |
| | | } |