zhongshujie
14 小时以前 1da73648cde84467f0d6346b89b2e2101ef5ff20
src/views/achievements/index.vue
@@ -325,7 +325,6 @@
        { value: "all", label: "全部" },
        { value: "Name", label: "标题" },
        { value: "author", label: "作者" },
        // { value: "year", label: "年份" },
        { value: "keyWords", label: "关键词" },
        { value: "abstract", label: "摘要" },
        { value: "source", label: "来源" },
@@ -659,7 +658,6 @@
    //获取下拉选择框的内容
    async getSelectData() {
      this.loading = true;
      try {
        // 同时发起两个异步请求,并等待它们的结果
        const [subjectListResult, resourceListResult] = await Promise.all([
@@ -708,12 +706,15 @@
    // 搜索
    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();
      }
@@ -721,6 +722,7 @@
    // 请求数据
    getItemList() {
      this.loading = true;
      let searchData = {}; // 初始化一个空对象来存储搜索数据
      if (this.inputValue) {
        // 如果输入值存在
@@ -757,7 +759,7 @@
            searchData[item.value + ">="] = startDate;
            searchData[item.value + "<="] = endDate;
          } else {
            searchData[item.value + "*"] = item.content;
            searchData["||" +item.value + "*"] = item.content;
          }
        });
      }