From c423765d8a5ff0c58d23bb0a31af7df6c1fad95c Mon Sep 17 00:00:00 2001
From: YM <479443481@qq.com>
Date: 星期五, 26 七月 2024 16:10:25 +0800
Subject: [PATCH] 1

---
 src/pages/knowledgeBase/knowledgeBase.vue |  418 ++++++++++++++++++++++++++++++-----------------------------
 1 files changed, 212 insertions(+), 206 deletions(-)

diff --git a/src/pages/knowledgeBase/knowledgeBase.vue b/src/pages/knowledgeBase/knowledgeBase.vue
index 0053d7c..b2e9093 100644
--- a/src/pages/knowledgeBase/knowledgeBase.vue
+++ b/src/pages/knowledgeBase/knowledgeBase.vue
@@ -47,7 +47,16 @@
         class="advancedSeaTrue1"
       >
         <h3>楂樼骇鎼滅储</h3>
-        <MyForm @submit="onSubmit" @reset="resetForm" :from="from" />
+        <MyForm
+          @submit="
+            (data) => {
+              CurrentPage = 1;
+              onSubmit(data);
+            }
+          "
+          @reset="resetForm"
+          :from="from"
+        />
       </view>
     </view>
     <uni-row
@@ -340,7 +349,7 @@
             label: "鏃舵湡",
             name: "dynasty",
             value: ""
-          },
+          }
           // {
           //   type: "select",
           //   label: "鏈烘瀯",
@@ -382,7 +391,7 @@
       // 琛ㄦ牸鐨勬暟缁�
       tableData: [],
       // 鍒嗛〉鐨勬�绘暟
-      total: 100,
+      total: 0,
       // 褰撳墠椤�
       CurrentPage: 1,
       // 涓�椤垫樉绀哄灏戞潯鏁版嵁
@@ -397,7 +406,8 @@
         tagId: "",
         official: "",
         genderType: ""
-      }
+      },
+      aSearchData: ""
     };
   },
   onLoad(options) {
@@ -640,9 +650,16 @@
           document.querySelector(".fbox1").style.height = box1Height + "px";
         }
       });
+      if (this.isAdvancedSearch) {
+        this.keywords = "";
+        this.CurrentPage = 1;
+      }
     },
     // 楂樼骇鎼滅储
     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(
@@ -653,7 +670,7 @@
         this.dynasty.id = currentDynasty.dynastyId;
       }
       this.submitData = val;
-      this.CurrentPage = 1;
+
       let Obj = {
         keywords: "", //鎼滅储妗嗘绱�
         name: val.name, //濮撳悕
@@ -665,7 +682,6 @@
         dynasty: val.dynasty, //鏈濅唬id
         dynastyId: this.dynasty.id, //鏈濅唬id
         institution: val.institution, //鏈烘瀯
-        bookId: null, //鏉ユ簮id
         page: this.CurrentPage,
         pageSize: this.pageSize
       };
@@ -681,6 +697,7 @@
     // 鍩虹鎼滅储
     async onSearch(val, index) {
       this.keywords = val.text;
+      this.aSearchData = "";
       if (index !== undefined) {
         this.keywords = "";
         this.hotAciveIndex = index;
@@ -744,21 +761,33 @@
     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("");
+        if (this.isAdvancedSearch) {
+          this.onSubmit(this.aSearchData);
+        } else {
+          this.onSearch({ text: this.keywords });
+        }
       }
     },
     // 涓嬩竴椤�
     NextClick(val) {
       if (this.CurrentPage != val) {
         this.CurrentPage = val;
-        this.onSearch("");
+        if (this.isAdvancedSearch) {
+          this.onSubmit(this.aSearchData);
+        } else {
+          this.onSearch({ text: this.keywords });
+        }
       }
     }
   }
@@ -836,46 +865,42 @@
 /* 鍙充晶 */
 .rightList {
   padding-left: 0.2rem !important;
+}
+.rightList .light {
+  padding: 0.1rem 0.2rem !important;
+}
 
-  .light {
-    padding: 0.1rem 0.2rem !important;
-  }
+.rightList .lightTop {
+  font-size: 0.14rem !important;
+}
 
-  .lightTop {
-    font-size: 0.14rem !important;
-  }
+.rightList .el-button {
+  font-size: 0.12rem !important;
+  padding: 0.05rem 0.18rem !important;
+}
 
-  .el-button {
-    font-size: 0.12rem !important;
-    padding: 0.05rem 0.18rem !important;
-  }
+.rightList .lightBo {
+  font-size: 0.14rem !important;
+}
 
-  .lightBo {
-    font-size: 0.14rem !important;
+.rightList .lightBo .is-leaf {
+  background-color: #c1d3ea !important;
+  color: #2c2c2c !important;
+  font-weight: 400;
+}
 
-    .is-leaf {
-      background-color: #c1d3ea !important;
-      color: #2c2c2c !important;
-      font-weight: 400;
+.rightList .lightBo .is-leaf .cell {
+  height: 0.3rem !important;
+  line-height: 0.3rem !important;
+}
 
-      .cell {
-        height: 0.3rem !important;
-        line-height: 0.3rem !important;
-      }
-    }
-  }
-
-  .el-table__body-wrapper {
-    .el-table__row {
-      height: 0.46rem !important;
-      line-height: 0.46rem !important;
-
-      .cell {
-        height: 0.3rem !important;
-        line-height: 0.3rem !important;
-      }
-    }
-  }
+.rightList .el-table__body-wrapper .el-table__row {
+  height: 0.46rem !important;
+  line-height: 0.46rem !important;
+}
+.rightList .el-table__body-wrapper .el-table__row .cell {
+  height: 0.3rem !important;
+  line-height: 0.3rem !important;
 }
 
 @media screen and (min-width: 2560px) and (max-width: 3840px) {
@@ -897,11 +922,11 @@
   .hotSearch {
     font-size: 0.12rem !important;
     margin-bottom: 0.19rem !important;
+  }
 
-    li {
-      font-size: 0.12rem !important;
-      margin: 0 0.1rem;
-    }
+  .hotSearch li {
+    font-size: 0.12rem !important;
+    margin: 0 0.1rem;
   }
 
   .advancedSeaTrue,
@@ -958,33 +983,32 @@
     padding: 0.1rem 0.09rem;
     min-height: 2rem !important;
     position: relative;
+  }
+  .boox ul {
+    margin-top: 0.16rem !important;
+  }
 
-    ul {
-      margin-top: 0.16rem !important;
-    }
+  .boox h3 {
+    font-size: 0.14rem;
+    margin-left: 0.1rem;
+  }
 
-    h3 {
-      font-size: 0.14rem;
-      margin-left: 0.1rem;
-    }
+  .boox li {
+    height: 0.3rem;
+    line-height: 0.3rem;
+    padding: 0 0.2rem !important;
+    margin: 0.05rem 0 !important;
+    border-radius: 0.3rem !important;
+  }
 
-    li {
-      height: 0.3rem;
-      line-height: 0.3rem;
-      padding: 0 0.2rem !important;
-      margin: 0.05rem 0 !important;
-      border-radius: 0.3rem !important;
-    }
+  .boox .toggleButton1 {
+    position: absolute;
+    bottom: 0.1rem !important;
+    left: 40% !important;
+  }
 
-    .toggleButton1 {
-      position: absolute;
-      bottom: 0.1rem !important;
-      left: 40% !important;
-    }
-
-    .toggleButton {
-      font-size: 0.14rem !important;
-    }
+  .boox .toggleButton {
+    font-size: 0.14rem !important;
   }
 
   .zhongjianleft {
@@ -1019,46 +1043,42 @@
   /* 鍙充晶 */
   .rightList {
     padding-left: 0.2rem !important;
+  }
+  .rightList .light {
+    padding: 0.1rem 0.2rem !important;
+  }
 
-    .light {
-      padding: 0.1rem 0.2rem !important;
-    }
+  .rightList .lightTop {
+    font-size: 0.14rem !important;
+  }
 
-    .lightTop {
-      font-size: 0.14rem !important;
-    }
+  .rightList .el-button {
+    font-size: 0.12rem !important;
+    padding: 0.05rem 0.18rem !important;
+  }
 
-    .el-button {
-      font-size: 0.12rem !important;
-      padding: 0.05rem 0.18rem !important;
-    }
+  .rightList .lightBo {
+    font-size: 0.14rem !important;
+  }
 
-    .lightBo {
-      font-size: 0.14rem !important;
+  .rightList .lightBo .is-leaf {
+    background-color: #c1d3ea !important;
+    color: #2c2c2c !important;
+    font-weight: 400;
+  }
 
-      .is-leaf {
-        background-color: #c1d3ea !important;
-        color: #2c2c2c !important;
-        font-weight: 400;
+  .rightList .lightBo .is-leaf .cell {
+    height: 0.3rem !important;
+    line-height: 0.3rem !important;
+  }
 
-        .cell {
-          height: 0.3rem !important;
-          line-height: 0.3rem !important;
-        }
-      }
-    }
-
-    .el-table__body-wrapper {
-      .el-table__row {
-        height: 0.46rem !important;
-        line-height: 0.46rem !important;
-
-        .cell {
-          height: 0.3rem !important;
-          line-height: 0.3rem !important;
-        }
-      }
-    }
+  .rightList .el-table__body-wrapper .el-table__row {
+    height: 0.46rem !important;
+    line-height: 0.46rem !important;
+  }
+  .rightList .el-table__body-wrapper .el-table__row .cell {
+    height: 0.3rem !important;
+    line-height: 0.3rem !important;
   }
 }
 
@@ -1081,11 +1101,11 @@
   .hotSearch {
     font-size: 0.12rem !important;
     margin-bottom: 0.19rem !important;
+  }
 
-    li {
-      font-size: 0.12rem !important;
-      margin: 0 0.1rem;
-    }
+  .hotSearch li {
+    font-size: 0.12rem !important;
+    margin: 0 0.1rem;
   }
   .advancedSeaTrue1 {
     border: 1px solid #c1d3ea;
@@ -1144,34 +1164,33 @@
     padding: 0.1rem 0.09rem;
     min-height: 2rem !important;
     position: relative;
+  }
+  .boox ul {
+    margin-top: 0.16rem !important;
+    margin-bottom: 0.2rem !important;
+  }
 
-    ul {
-      margin-top: 0.16rem !important;
-      margin-bottom: 0.2rem !important;
-    }
+  .boox h3 {
+    font-size: 0.14rem;
+    margin-left: 0.1rem;
+  }
 
-    h3 {
-      font-size: 0.14rem;
-      margin-left: 0.1rem;
-    }
+  .boox li {
+    height: 0.3rem;
+    line-height: 0.3rem;
+    padding: 0 0.2rem !important;
+    margin: 0.05rem 0 !important;
+    border-radius: 0.3rem !important;
+  }
 
-    li {
-      height: 0.3rem;
-      line-height: 0.3rem;
-      padding: 0 0.2rem !important;
-      margin: 0.05rem 0 !important;
-      border-radius: 0.3rem !important;
-    }
+  .boox .toggleButton1 {
+    position: absolute;
+    bottom: 0.1rem !important;
+    left: 40% !important;
+  }
 
-    .toggleButton1 {
-      position: absolute;
-      bottom: 0.1rem !important;
-      left: 40% !important;
-    }
-
-    .toggleButton {
-      font-size: 0.14rem !important;
-    }
+  .boox .toggleButton {
+    font-size: 0.14rem !important;
   }
 
   .zhongjianleft {
@@ -1208,46 +1227,42 @@
   .rightList {
     width: 100%;
     padding-left: 0.2rem !important;
+  }
+  .rightList .light {
+    padding: 0.1rem 0.2rem !important;
+  }
 
-    .light {
-      padding: 0.1rem 0.2rem !important;
-    }
+  .rightList .lightTop {
+    font-size: 0.14rem !important;
+  }
 
-    .lightTop {
-      font-size: 0.14rem !important;
-    }
+  .rightList .el-button {
+    font-size: 0.12rem !important;
+    padding: 0.05rem 0.18rem !important;
+  }
 
-    .el-button {
-      font-size: 0.12rem !important;
-      padding: 0.05rem 0.18rem !important;
-    }
+  .rightList .lightBo {
+    font-size: 0.14rem !important;
+  }
+  .rightList .lightBo .is-leaf {
+    background-color: #c1d3ea !important;
+    color: #2c2c2c !important;
+    font-weight: 400;
+  }
 
-    .lightBo {
-      font-size: 0.14rem !important;
+  .rightList .lightBo .is-leaf .cell {
+    height: 0.3rem !important;
+    line-height: 0.3rem !important;
+  }
 
-      .is-leaf {
-        background-color: #c1d3ea !important;
-        color: #2c2c2c !important;
-        font-weight: 400;
+  .rightList .el-table__body-wrapper .el-table__row {
+    height: 0.46rem !important;
+    line-height: 0.46rem !important;
+  }
 
-        .cell {
-          height: 0.3rem !important;
-          line-height: 0.3rem !important;
-        }
-      }
-    }
-
-    .el-table__body-wrapper {
-      .el-table__row {
-        height: 0.46rem !important;
-        line-height: 0.46rem !important;
-
-        .cell {
-          height: 0.3rem !important;
-          line-height: 0.3rem !important;
-        }
-      }
-    }
+  .rightList .el-table__body-wrapper .el-table__row .cell {
+    height: 0.3rem !important;
+    line-height: 0.3rem !important;
   }
 }
 
@@ -1258,24 +1273,16 @@
 .hotSearch {
   font-size: 0.12rem;
   margin-bottom: 0.19rem;
-
-  li {
-    font-size: 0.12rem;
-    margin: 0 0.1rem;
-    &.active {
-      color: #027edc !important;
-      font-weight: bold;
-    }
-  }
 }
 
-/* 	.a {
-		height: 2rem;
-	}
-
-	.b {
-		height: 100px;
-	} */
+.hotSearch li {
+  font-size: 0.12rem;
+  margin: 0 0.1rem;
+}
+.hotSearch li.active {
+  color: #027edc !important;
+  font-weight: bold;
+}
 
 .box {
   transition: height 0.3s;
@@ -1291,34 +1298,33 @@
   min-height: 2rem !important;
   position: relative;
   border: 1px solid #c1d3ea !important;
+}
+.boox ul {
+  margin-top: 0.16rem !important;
+}
 
-  ul {
-    margin-top: 0.16rem !important;
-  }
+.boox h3 {
+  font-size: 0.14rem;
+  margin-left: 0.1rem;
+}
 
-  h3 {
-    font-size: 0.14rem;
-    margin-left: 0.1rem;
-  }
+.boox li {
+  height: 0.3rem;
+  line-height: 0.3rem;
+  padding: 0 0.2rem !important;
+  margin: 0.05rem 0 !important;
+  border-radius: 0.3rem !important;
+  font-size: 0.14rem;
+}
 
-  li {
-    height: 0.3rem;
-    line-height: 0.3rem;
-    padding: 0 0.2rem !important;
-    margin: 0.05rem 0 !important;
-    border-radius: 0.3rem !important;
-    font-size: 0.14rem;
-  }
+.boox .toggleButton1 {
+  position: absolute;
+  bottom: 0.1rem !important;
+  left: 40% !important;
+}
 
-  .toggleButton1 {
-    position: absolute;
-    bottom: 0.1rem !important;
-    left: 40% !important;
-  }
-
-  .toggleButton {
-    font-size: 0.14rem !important;
-  }
+.boox .toggleButton {
+  font-size: 0.14rem !important;
 }
 
 ::v-deep .el-table th,

--
Gitblit v1.9.1