From a460a8094e5e1f3954185b25df0361c3b2d3d948 Mon Sep 17 00:00:00 2001
From: 杨磊 <505174330@qq.com>
Date: 星期一, 28 四月 2025 16:35:22 +0800
Subject: [PATCH] 高级检索

---
 src/assets/js/middleGround/api/resource.js |    2 ++
 src/views/achievements/index.vue           |   44 +++++++++++++++++++++++++++++---------------
 src/views/chronology/index.vue             |    1 +
 3 files changed, 32 insertions(+), 15 deletions(-)

diff --git a/src/assets/js/middleGround/api/resource.js b/src/assets/js/middleGround/api/resource.js
index 112b320..78e69fb 100644
--- a/src/assets/js/middleGround/api/resource.js
+++ b/src/assets/js/middleGround/api/resource.js
@@ -89,6 +89,8 @@
     }).then((resp) => {
       if (resp.length > 0) {
         const data = resp[0];
+        console.log(data,'datas');
+        debugger
         const datas = handleQueryResourceListData({
           datas: data.datas,
           fields,
diff --git a/src/views/achievements/index.vue b/src/views/achievements/index.vue
index 8788281..5f30d05 100644
--- a/src/views/achievements/index.vue
+++ b/src/views/achievements/index.vue
@@ -170,7 +170,7 @@
               </li>
             </ul>
             <!-- 瀛︾ -->
-            <ul>
+            <!-- <ul>
               <li class="left-title">
                 <span>{{ subject.title }}</span>
                 <p @click="subject.isDisplay = !subject.isDisplay">
@@ -196,7 +196,7 @@
                   <span class="">{{ item.num }}</span>
                 </div>
               </li>
-            </ul>
+            </ul> -->
           </div>
           <div
             class="content-right"
@@ -257,7 +257,10 @@
                 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"
@@ -370,7 +373,7 @@
           {
             type: "input",
             label: "鏍囥��棰�",
-            name: "title",
+            name: "Name",
             value: "",
           },
           {
@@ -573,7 +576,7 @@
         author: "浣滆��",
         keyword: "鍏抽敭璇�",
         source: "鏉ユ簮",
-        title: "鏍囬",
+        Name: "鏍囬",
         year: "骞翠唤",
       },
     };
@@ -617,16 +620,23 @@
     },
 
     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();
     },
     //閲嶇疆鎼滅储缁撴灉
@@ -706,6 +716,7 @@
 
     // 鎼滅储
     handleSearch(isText) {
+      console.log(isText, "isText");
       this.associationList = [];
       if (isText.text != "") {
         this.inputValue = isText.text;
@@ -748,6 +759,8 @@
           }
         }
       }
+      console.log(searchData, "searchData1");
+
       if (this.associationList && this.associationList.length) {
         this.associationList.forEach((item) => {
           if (item.value == "year") {
@@ -755,7 +768,7 @@
             const startDate = item.content.split("/")[0] + "/01/01 00:00:00";
             searchData[item.value + ">="] = startDate;
             searchData[item.value + "<="] = endDate;
-          } else {
+          } else if (item.value) {
             searchData[item.value + "*"] = item.content;
           }
         });
@@ -814,18 +827,19 @@
           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",
           });
         }
       });
diff --git a/src/views/chronology/index.vue b/src/views/chronology/index.vue
index ba47e3f..4f981b1 100644
--- a/src/views/chronology/index.vue
+++ b/src/views/chronology/index.vue
@@ -465,6 +465,7 @@
   margin-left: -9px;
   z-index: 99;
   background: #fff;
+  cursor: pointer;
 }
 
 .item-text {

--
Gitblit v1.9.1