Browse Source

功能优化

songxy 4 months ago
parent
commit
cdb0644d0f

+ 0 - 4
ais_search_zj/web/src/components/NewSliderCardUpDown.vue

@@ -1,9 +1,5 @@
 <template>
   <div class="slider-card">
-    <div class="hot-box">
-      <img src="/images/home/icon-hot.png" />热门
-      <div class="diver"></div>
-    </div>
     <a-carousel
       style="width: 700px; height: 70px"
       :dots="false"

+ 1 - 0
ais_search_zj/web/src/router/routes.js

@@ -1,6 +1,7 @@
 export default [
   {
     path: '/',
+    redirect: 'index',
     component: () => import('@/layout/BasicLayout.vue'),
     children: [
       {

+ 1 - 1
ais_search_zj/web/src/utils/policy-api.js

@@ -3,7 +3,7 @@ import axios from 'axios'
 // const baseUrl = '/knowledge'
 const baseUrl=window.AppGlobalConfig.policyServer
 
-axios.defaults.withCredentials = false
+axios.defaults.withCredentials = true
 
 /**
  * 请求前拦截

+ 3 - 4
ais_search_zj/web/src/views/ai-search/ai-search.vue

@@ -2,7 +2,7 @@
   <div class="ai-search-detail">
     <a-affix>
       <div class="header">
-        <home-header @login="emits('login')" />
+        <home-header @login="emits('login')"  sub-title="自然资源大模型工具" />
       </div>
     </a-affix>
     <div class="search-panel" id="pageContainer">
@@ -646,9 +646,9 @@ const streamToAnswer = () => {
 };
 
 const tabs = [
-  { key: 'knowledge', name: '知识库' }
+  { key: 'knowledge', name: '知识库' },
   // { key: 'paper', name: '学术' },
-  // { key: 'net', name: '全网' }
+  { key: 'net', name: '全网' }
 ];
 
 const steps = ref([
@@ -1103,7 +1103,6 @@ const quest = async (isFllow) => {
   } else {
     questionUrl = '/chat/kb_chat';
   }
-
   const topKs = window?.AppGlobalConfig?.topKs || {
     0: 5,
     1: 10,

+ 0 - 1
ais_search_zj/web/src/views/document/FileDetail.vue

@@ -79,7 +79,6 @@ const closeHandle = () => {
   }
   .center-box {
     width: 80%;
-    border: 1px solid #f00;
     height: calc(100% - 60px);
     margin: auto;
     position: absolute;

+ 2 - 2
ais_search_zj/web/src/views/home/components/ComparePolicy.vue

@@ -1,11 +1,11 @@
 <template>
-  <div class="policy-compare" v-if="false">
+  <div class="policy-compare">
     <img src="/images/zczk/close.png" class="icon" @click="close" />
     <div class="title">
       <div class="name">政策<span>对比</span></div>
       <a-upload
         class="upload"
-        action="/knowledge/policy/file/upload"
+        action="https://zjugpt.com/knowledge/policy/file/upload"
         @change="handleChange"
         :showUploadList="false"
         :data="{ type: 'temp' }"

+ 9 - 4
ais_search_zj/web/src/views/home/home.vue

@@ -31,7 +31,6 @@
             <div class="tool-box">
               <a-select v-model:value="scope.name" class="select">
                 <a-select-option value="knowledge">知识库</a-select-option>
-                <a-select-option value="paper">学术</a-select-option>
                 <a-select-option value="net">全网</a-select-option>
               </a-select>
               <div class="ds-box">
@@ -54,7 +53,7 @@
           </div>
         </div>
       </div>
-      <div class="ai_tool_box">
+      <div class="ai_tool_box" v-if="false">
         <h4>AI工具</h4>
         <ul>
           <li @click="toToolPage('./#/policy/interpret')">
@@ -68,7 +67,7 @@
               </div>
             </div>
           </li>
-          <li @click="toToolPage('./#/policy/smart')">
+          <li @click="compareClick()">
             <div>
               <div class="icon_box icon_box2">
                 <span class="iconfont icon-a-lujing8794"></span>
@@ -82,7 +81,7 @@
         </ul>
       </div>
     </div>
-    <compare-policy />
+    <compare-policy v-if="compareVisible" />
   </div>
 </template>
 <script setup>
@@ -164,15 +163,21 @@ const dsChange = (type) => {
   isDeepSeek.value = type;
   localStorage.setItem("_isDeepSeek", type);
 }
+const compareVisible = ref(false)
 const toToolPage = (path) => {
   window.open(path, '_blank')
 }
+const compareClick = () => {
+  compareVisible.value = !compareVisible.value
+}
 </script>
 <style scoped lang="scss">
 $selectHeight: 36px;
 .aisaerch_box {
   position: relative;
   width: 100%;
+  height: 100%;
+  overflow-x: hidden;
   >.top-content {
     width: calc(100% - 96px);
     padding-top: 100px;

+ 129 - 121
ais_search_zj/web/src/views/zcdb/smartComparison.vue

@@ -1,36 +1,41 @@
 <template>
   <div class="smart-comparison">
-    <div class="top">
-      <div
-        v-for="(item, index) in fileList"
-        :key="item"
-        class="list-item"
-        @click="toggleFile(item)"
-        @mouseenter="handleMouseEnter(index)"
-        @mouseleave="handleMouseLeave(index)"
-      >
-        <div class="file-item">{{ item.f_title }}</div>
-        <div class="close-icon" v-if="hoveredIndex === index">
-          <CloseCircleOutlined class="close-icon-font" @click="remove(item)" />
-        </div>
-        <div class="vs-font" v-if="index != fileList.length - 1">VS</div>
-      </div>
+    <div class="header">
+      <home-header sub-title="自然资源大模型工具" />
     </div>
-    <div class="content">
-      <div class="left">
-        <div class="pdf">
-          <PDFViewer :src="current.url" ref="ifRef" v-if="current.url"> </PDFViewer>
+    <div class="content-box">
+      <div class="top">
+        <div
+          v-for="(item, index) in fileList"
+          :key="item"
+          class="list-item"
+          @click="toggleFile(item)"
+          @mouseenter="handleMouseEnter(index)"
+          @mouseleave="handleMouseLeave(index)"
+        >
+          <div class="file-item">{{ item.f_title }}</div>
+          <div class="close-icon" v-if="hoveredIndex === index">
+            <CloseCircleOutlined class="close-icon-font" @click="remove(item)" />
+          </div>
+          <div class="vs-font" v-if="index != fileList.length - 1">VS</div>
         </div>
       </div>
-      <a-affix :offsetTop="20">
-        <div class="right" :class="{ zm: zoomFlag }">
-          <AiAssistant :data="fileList" />
-
-          <!-- <div class="title">AI政策对比助手</div>
-        <div class="dialogue-box">可复用部分,全局查找 “文件内容太多,读起来太累了?”</div>
-        <div class="return-home" @click="returnHome"><span>➥</span><span>全部政策</span></div> -->
+      <div class="content">
+        <div class="left">
+          <div class="pdf">
+            <PDFViewer :src="current.url" ref="ifRef" v-if="current.url"> </PDFViewer>
+          </div>
         </div>
-      </a-affix>
+        <a-affix :offsetTop="20">
+          <div class="right" :class="{ zm: zoomFlag }">
+            <AiAssistant :data="fileList" />
+
+            <!-- <div class="title">AI政策对比助手</div>
+          <div class="dialogue-box">可复用部分,全局查找 “文件内容太多,读起来太累了?”</div>
+          <div class="return-home" @click="returnHome"><span>➥</span><span>全部政策</span></div> -->
+          </div>
+        </a-affix>
+      </div>
     </div>
   </div>
 </template>
@@ -38,6 +43,7 @@
 /**
  * @description 智能对比
  */
+import HomeHeader from '@/views/home/components/HomeHeader.vue';
 import { ref, onMounted, watch, toRefs, nextTick } from 'vue';
 import { CloseCircleOutlined } from '@ant-design/icons-vue';
 import PDFViewer from '@/components/pdf/PDFViewerSearch.vue';
@@ -183,113 +189,115 @@ const toggleFile = (item) => {
 .smart-comparison {
   width: 100%;
   height: 100%;
-  display: flex;
-  justify-content: center;
-  flex-wrap: wrap;
-  font-family: Alibaba PuHuiTi 2;
-  position: relative;
-  z-index: 1;
-
-  .top {
-    width: 1280px;
-    height: auto;
-    margin-top: 20px;
-    margin-bottom: 20px;
+  >.content-box {
+    height: calc(100% - 60px);
     display: flex;
-    // justify-content: space-between;
     justify-content: center;
-    .list-item {
-      width: auto;
-      cursor: pointer;
+    flex-wrap: wrap;
+    font-family: Alibaba PuHuiTi 2;
+    position: relative;
+    z-index: 1;
+    .top {
+      width: 1280px;
+      height: auto;
+      margin-top: 20px;
+      margin-bottom: 20px;
       display: flex;
-      position: relative;
-    }
-    .file-item {
-      width: 345px;
-      height: 106px;
-      background: #ffffff;
-      box-shadow: 0px 1px 8px 0px #e4e4e4;
-      border-radius: 10px;
-      border: 1px solid #3c8afb;
-      padding: 20px;
-      line-height: 30px;
-    }
-    .vs-font {
-      width: auto;
-      height: 106px;
-      font-weight: bold;
-      font-size: 24px;
-      color: #2185f2;
-      line-height: 106px;
-      margin: 0px 47px;
-    }
-    .close-icon {
-      position: absolute;
-      top: 42px;
-      left: 335px;
-      .close-icon-font {
-        color: #fff;
-        background-color: #2185f2;
-        border-radius: 50%;
-        font-size: 20px;
+      // justify-content: space-between;
+      justify-content: center;
+      .list-item {
+        width: auto;
         cursor: pointer;
+        display: flex;
+        position: relative;
       }
-    }
-  }
-  .content {
-    width: 1280px;
-    height: auto;
-    display: flex;
-    margin-bottom: 20px;
-    .left {
-      flex: 1;
-      min-height: calc(100vh - 270px);
-      background: #ffffff;
-      box-shadow: 0px 1px 8px 0px #e4e4e4;
-      border-radius: 10px;
-      .pdf {
-        width: 100%;
-        height: 100%;
+      .file-item {
+        width: 345px;
+        height: 106px;
+        background: #ffffff;
+        box-shadow: 0px 1px 8px 0px #e4e4e4;
+        border-radius: 10px;
+        border: 1px solid #3c8afb;
+        padding: 20px;
+        line-height: 30px;
       }
-    }
-    .right {
-      width: 320px;
-      margin-left: 20px;
-      background: #ffffff;
-      box-shadow: 0px 1px 8px 0px #e4e4e4;
-      border-radius: 10px;
-      position: relative;
-      .title {
-        font-weight: 600;
-        font-size: 20px;
-        color: #000;
-        line-height: 50px;
-        border-bottom: 1px solid #eaeaea;
+      .vs-font {
+        width: auto;
+        height: 106px;
+        font-weight: bold;
+        font-size: 24px;
+        color: #2185f2;
+        line-height: 106px;
+        margin: 0px 47px;
       }
-      .return-home {
+      .close-icon {
         position: absolute;
-        top: 620px;
-        left: 0;
-        height: 40px;
-        width: 460px;
-        background-color: #fff;
+        top: 42px;
+        left: 335px;
+        .close-icon-font {
+          color: #fff;
+          background-color: #2185f2;
+          border-radius: 50%;
+          font-size: 20px;
+          cursor: pointer;
+        }
+      }
+    }
+    .content {
+      width: 1280px;
+      height: auto;
+      display: flex;
+      margin-bottom: 20px;
+      .left {
+        flex: 1;
+        min-height: calc(100vh - 270px);
+        background: #ffffff;
         box-shadow: 0px 1px 8px 0px #e4e4e4;
         border-radius: 10px;
-        display: flex;
-        justify-content: center;
-        align-items: center;
-        cursor: pointer;
-        span {
-          margin: 0 5px;
-          font-size: 16px;
+        .pdf {
+          width: 100%;
+          height: 100%;
         }
       }
-      .return-home:hover {
-        color: #1677ff;
+      .right {
+        width: 320px;
+        margin-left: 20px;
+        background: #ffffff;
+        box-shadow: 0px 1px 8px 0px #e4e4e4;
+        border-radius: 10px;
+        position: relative;
+        .title {
+          font-weight: 600;
+          font-size: 20px;
+          color: #000;
+          line-height: 50px;
+          border-bottom: 1px solid #eaeaea;
+        }
+        .return-home {
+          position: absolute;
+          top: 620px;
+          left: 0;
+          height: 40px;
+          width: 460px;
+          background-color: #fff;
+          box-shadow: 0px 1px 8px 0px #e4e4e4;
+          border-radius: 10px;
+          display: flex;
+          justify-content: center;
+          align-items: center;
+          cursor: pointer;
+          span {
+            margin: 0 5px;
+            font-size: 16px;
+          }
+        }
+        .return-home:hover {
+          color: #1677ff;
+        }
+      }
+      .zm {
+        width: 640px;
       }
-    }
-    .zm {
-      width: 640px;
     }
   }
 }

+ 4 - 4
ais_search_zj/web/src/views/zjjd/index.vue

@@ -1,8 +1,8 @@
 <template>
   <div class="interpretation">
-      <div class="header">
-        <home-header sub-title="政策解读" />
-      </div>
+    <div class="header">
+      <home-header sub-title="自然资源大模型工具" />
+    </div>
     <div class="content-box">
       <div class="left-panel">
         <div class="content-top">
@@ -127,11 +127,11 @@
   </div>
 </template>
 <script setup>
-import HomeHeader from '@/views/home/components/HomeHeader.vue';
 
 /**
  * @description 解读详情
  */
+import HomeHeader from '@/views/home/components/HomeHeader.vue';
 import { ref, onMounted, watch, toRefs } from 'vue';
 import { useRouter, useRoute } from 'vue-router';
 import PDFViewer from '@/components/pdf/PDFViewerSearch.vue';