YM
2024-07-26 21e72d18e42e0b5966f5c76ed853ff175f4418ad
src/pages/knowledgeBase/knowledgeBase.vue
@@ -340,7 +340,7 @@
            label: "时期",
            name: "dynasty",
            value: ""
          },
          }
          // {
          //   type: "select",
          //   label: "机构",
@@ -397,7 +397,8 @@
        tagId: "",
        official: "",
        genderType: ""
      }
      },
      aSearchData: ""
    };
  },
  onLoad(options) {
@@ -643,6 +644,9 @@
    },
    // 高级搜索
    async onSubmit(val) {
      this.keywords = "";
      this.hotAciveIndex = "";
      this.aSearchData = val;
      this.profession.index = Number(val.tagId);
      this.profession.id = Number(val.tagId);
      const currentDynasty = this.dynasty.list.find(
@@ -681,6 +685,7 @@
    // 基础搜索
    async onSearch(val, index) {
      this.keywords = val.text;
      this.aSearchData = "";
      if (index !== undefined) {
        this.keywords = "";
        this.hotAciveIndex = index;
@@ -744,21 +749,25 @@
    CurrentChange(val) {
      if (this.CurrentPage != val) {
        this.CurrentPage = val;
        this.onSearch("");
        if (this.isAdvancedSearch) {
          this.onSubmit(this.aSearchData);
        } else {
          this.onSearch({ text: this.keywords });
        }
      }
    },
    // 上一页
    PrevClick(val) {
      if (this.CurrentPage != val) {
        this.CurrentPage = val;
        this.onSearch("");
        this.onSearch({ text: this.keywords });
      }
    },
    // 下一页
    NextClick(val) {
      if (this.CurrentPage != val) {
        this.CurrentPage = val;
        this.onSearch("");
        this.onSearch({ text: this.keywords });
      }
    }
  }