فهرست منبع

Merge branch 'beta' into English

lsc 2 ماه پیش
والد
کامیت
381bea5393
30فایلهای تغییر یافته به همراه1267 افزوده شده و 574 حذف شده
  1. 4 0
      dist/index.html
  2. 0 0
      dist/static/css/app.6666d230cdb9b5e3afc926e2304747c7.css
  3. 0 0
      dist/static/css/app.6666d230cdb9b5e3afc926e2304747c7.css.map
  4. 0 0
      dist/static/css/app.9954fb857add13c904e4bf951029d5b7.css
  5. 0 0
      dist/static/css/app.9954fb857add13c904e4bf951029d5b7.css.map
  6. 0 0
      dist/static/js/app.1a0afa641c763d7152fc.js
  7. 0 0
      dist/static/js/app.1a0afa641c763d7152fc.js.map
  8. 0 0
      dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map
  9. 0 0
      dist/static/js/vendor.bc3479efe4e7d435ff02.js
  10. 0 0
      dist/static/js/vendor.cc2818e998cd275024e3.js
  11. 0 0
      dist/static/js/vendor.cc2818e998cd275024e3.js.map
  12. 10 0
      src/App.vue
  13. 17 0
      src/assets/icon/fold.svg
  14. 1 0
      src/assets/icon/testC/m_icon2.svg
  15. 1 0
      src/assets/icon/testC/m_icon3.svg
  16. 0 0
      src/assets/icon/testC/setting.svg
  17. 0 0
      src/assets/icon/testC/setting2.svg
  18. 22 5
      src/components/pages/knowledge/components/relateFiles.vue
  19. 1 3
      src/components/pages/knowledge/components/selectTag.vue
  20. 230 67
      src/components/pages/knowledge/components/testBox.vue
  21. 33 19
      src/components/pages/knowledge/fileBox.vue
  22. 372 227
      src/components/pages/knowledge/folder.vue
  23. 92 24
      src/components/pages/knowledge/folderDetail.vue
  24. 435 214
      src/components/pages/knowledge/folderFileBox.vue
  25. 3 2
      src/components/pages/knowledge/index.vue
  26. 8 1
      src/lang/cn.json
  27. 12 5
      src/lang/en.json
  28. 10 2
      src/lang/hk.json
  29. 14 0
      src/main.js
  30. 2 5
      src/router/index.js

+ 4 - 0
dist/index.html

@@ -32,7 +32,11 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
+<<<<<<< HEAD
     }</style><link href=./static/css/app.9954fb857add13c904e4bf951029d5b7.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.bc3479efe4e7d435ff02.js></script><script type=text/javascript src=./static/js/app.f17fc64d08d450cd6d73.js></script></body></html><script>function stopSafari() {
+=======
+    }</style><link href=./static/css/app.6666d230cdb9b5e3afc926e2304747c7.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.cc2818e998cd275024e3.js></script><script type=text/javascript src=./static/js/app.1a0afa641c763d7152fc.js></script></body></html><script>function stopSafari() {
+>>>>>>> beta
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/css/app.6666d230cdb9b5e3afc926e2304747c7.css


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/css/app.6666d230cdb9b5e3afc926e2304747c7.css.map


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/css/app.9954fb857add13c904e4bf951029d5b7.css


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/css/app.9954fb857add13c904e4bf951029d5b7.css.map


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/js/app.1a0afa641c763d7152fc.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/js/app.1a0afa641c763d7152fc.js.map


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/js/vendor.bc3479efe4e7d435ff02.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/js/vendor.cc2818e998cd275024e3.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/static/js/vendor.cc2818e998cd275024e3.js.map


+ 10 - 0
src/App.vue

@@ -562,4 +562,14 @@ html::-webkit-scrollbar-thumb {
   box-sizing: border-box;
 }
 
+.file_mySelect .el-input {
+  width: 80px !important;
+}
+.file_mySelect  .el-input .el-input__inner{
+  height: 28px !important;
+}
+.file_mySelect .el-input__suffix{
+  display: flex;
+  align-items: center;
+}
 </style>

+ 17 - 0
src/assets/icon/fold.svg

@@ -0,0 +1,17 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1747013458784"
+  class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2636"
+  xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200">
+  <path
+    d="M130.901333 529.493333l149.205334 130.517334a8.533333 8.533333 0 0 0 14.122666-6.4V392.533333a8.533333 8.533333 0 0 0-14.122666-6.4L130.901333 516.608a8.533333 8.533333 0 0 0 0 12.8z"
+    fill="#000" p-id="2637"></path>
+  <path
+    d="M128 213.333333m42.666667 0l682.666666 0q42.666667 0 42.666667 42.666667l0 0q0 42.666667-42.666667 42.666667l-682.666666 0q-42.666667 0-42.666667-42.666667l0 0q0-42.666667 42.666667-42.666667Z"
+    fill="#000" p-id="2638"></path>
+  <path
+    d="M128 725.333333m42.666667 0l682.666666 0q42.666667 0 42.666667 42.666667l0 0q0 42.666667-42.666667 42.666667l-682.666666 0q-42.666667 0-42.666667-42.666667l0 0q0-42.666667 42.666667-42.666667Z"
+    fill="#000" p-id="2639"></path>
+  <path
+    d="M384 469.333333m42.666667 0l426.666666 0q42.666667 0 42.666667 42.666667l0 0q0 42.666667-42.666667 42.666667l-426.666666 0q-42.666667 0-42.666667-42.666667l0 0q0-42.666667 42.666667-42.666667Z"
+    fill="#000" p-id="2640"></path>
+</svg>

+ 1 - 0
src/assets/icon/testC/m_icon2.svg

@@ -0,0 +1 @@
+<svg class="chakra-icon css-iq3ppm" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="128" height="128" focusable="false"><path d="m413.696 719.36-98.304 56.832-215.04-124.416v205.312l215.04 124.416 181.248-104.96-82.944-47.616V719.36z" fill="#2B85FB"></path><path d="m751.616 435.2-43.008-25.088-179.2 103.424-80.384-45.056 81.92-47.104V311.808l-215.04-124.416-215.04 124.416v248.32l41.984 24.064 173.568 100.352 98.304-56.832V540.16l79.36 44.032V783.36l215.04 124.416L924.16 783.36V535.04L751.616 435.2z" fill="#2B85FB"></path><path d="m610.304 375.808 98.304-56.832 77.312 44.544V166.912L570.88 42.496 396.8 142.848l212.992 122.88.512 110.08z" fill="#2B85FB"></path></svg>

+ 1 - 0
src/assets/icon/testC/m_icon3.svg

@@ -0,0 +1 @@
+<svg class="chakra-icon css-iq3ppm" viewBox="0 0 1407 1024" xmlns="http://www.w3.org/2000/svg" width="128" height="128" focusable="false"><path d="M1202.775 15.826a48.65 48.65 0 0 0-68.58 0 48.064 48.064 0 0 0 0 67.993 607.835 607.835 0 0 1 0 855.19 48.65 48.65 0 0 0 0 68.579 53.34 53.34 0 0 0 34.583 14.067 48.064 48.064 0 0 0 33.997-14.067 703.377 703.377 0 0 0 0-991.762zM96.715 511.706A603.146 603.146 0 0 1 272.558 83.234a48.299 48.299 0 0 0-67.407-69.165 703.377 703.377 0 0 0-146.537 771.37 689.896 689.896 0 0 0 152.398 224.494 47.478 47.478 0 0 0 33.997 13.482 48.65 48.65 0 0 0 33.996-82.647 599.043 599.043 0 0 1-182.292-429.06z" fill="#5D78FD"></path><path d="M999.968 218.633a48.65 48.65 0 0 0-69.165 67.993 318.864 318.864 0 0 1 0 448.99 48.65 48.65 0 0 0 0 68.579 48.064 48.064 0 0 0 33.996 14.067 46.306 46.306 0 0 0 31.652-13.481 410.303 410.303 0 0 0 120.746-293.074 416.165 416.165 0 0 0-117.23-293.074zM383.927 511.707a319.45 319.45 0 0 1 93.197-226.84 48.064 48.064 0 1 0-66.82-66.234 416.165 416.165 0 0 0 0 586.148 47.478 47.478 0 0 0 33.41 14.067 48.65 48.65 0 0 0 35.169-14.067 48.064 48.064 0 0 0 0-68.58 315.347 315.347 0 0 1-94.956-224.494z" fill="#5D78FD"></path><path d="M599.63 511.707a103.748 103.748 0 1 0 206.91 0 103.748 103.748 0 0 0-206.91 0z" fill="#FEC743"></path></svg>

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
src/assets/icon/testC/setting.svg


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
src/assets/icon/testC/setting2.svg


+ 22 - 5
src/components/pages/knowledge/components/relateFiles.vue

@@ -50,11 +50,13 @@
 
         </div>
       </div>
-      <div class="none_box" v-if="fileArray.length == 0">{{lang.nouploadFiles}}</div>
+      <div class="none_box" v-if="fileArray.length == 0" 
+            v-loading.body="isLoading"
+      >{{lang.nouploadFiles}}</div>
       <div
         class="f_box_file_list"
         v-else-if="fileArray.length"
-        v-loading.body="isLoading"
+        
       >
         <div class="list_file_box">
           <el-table
@@ -64,6 +66,8 @@
             style="width: 100%"
             @selection-change="handleSelectionChange"
             ref="myTable"
+            max-height="800px"
+            v-loading="isLoading"
             :row-key="row => row.id"
           >
             <el-table-column
@@ -112,7 +116,7 @@
             <!-- <el-table-column label="公开状态" show-overflow-tooltip width="80px"></el-table-column> -->
             <el-table-column
               prop="time"
-              :label=lang.uploadTime2
+              :label=lang.uploadTime
               show-overflow-tooltip
               min-width="20"
             ></el-table-column>
@@ -141,11 +145,20 @@
         <el-pagination
           class="pageBox"
           style="margin-top: 10px"
-          layout="total, prev, pager, next"
+          layout="total, prev, pager, next,  slot"
           :page-size="limit"
           :total="total"
           @current-change="handleCurrentChange"
-        >
+          :page-sizes="[10, 20, 50, 100]"
+      >
+      <el-select v-model="limit" @change="handleSizeChange" class="file_mySelect">
+          <el-option
+              v-for="item in [10, 20, 50, 100]"
+              :key="item"
+              :label="item"
+              :value="item"
+              ></el-option>
+          </el-select>
         </el-pagination>
       </div>
     </div>
@@ -234,6 +247,10 @@ export default {
       this.page = val;
       this.getData();
     },
+    handleSizeChange(val){
+      this.limit = val
+      this.getData()
+    },
     serchFile() {
       this.page = 1;
       this.getData();

+ 1 - 3
src/components/pages/knowledge/components/selectTag.vue

@@ -30,8 +30,6 @@
 </template>
 
 <script>
-import { values } from 'lodash';
-
 export default {
   name: 'select-tags',
   props: {
@@ -74,7 +72,7 @@ export default {
         const filteredVal = val.filter(item => item !== this.selectAllValue);
         const isAllSelected = filteredVal.length === this.options.length;
         console.log(isSelectAll);
-        
+
         if (isSelectAll) {
           this.$emit('input', isAllSelected ? [] : this.options.map(item => item.id)); // 全选或取消全选
         } else {

+ 230 - 67
src/components/pages/knowledge/components/testBox.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="testBox">
         <div class="test_right">
-            <div class="test_input_box" :class="{focus: isFocused}">
+            <div class="test_input_box" :class="{ focus: isFocused }">
                 <div class="setting">
                     <el-tooltip :content=lang.knowSearchConfig placement="bottom" effect="dark">
                         <!-- content to trigger tooltip here -->
@@ -13,11 +13,11 @@
                     resize="none" @focus="isFocused = true" @blur="isFocused = false">
                 </el-input>
                 <el-button class="btn" type="primary" size="mini" @click="testCheck"
-                    v-loading="isLoading">{{lang.test}}</el-button>
+                    v-loading="isLoading">{{ lang.test }}</el-button>
             </div>
 
             <div class="test_history" v-loading="isLoading2">
-                <div class="title">{{lang.testRecord}}</div>
+                <div class="title">{{ lang.testRecord }}</div>
                 <div class="test_history_box" v-for="(item, index) in ragArray" :key="index" @click="checkRag(item)"
                     :class="{ acitve: item.id == ragJson.id }">
                     <div class="typeIcon" :class="{
@@ -35,11 +35,11 @@
         </div>
         <div class="test_left">
             <div class="test_check" v-if="Object.keys(ragJson).length">
-                <div class="title">{{lang.testParameters}}</div>
+                <div class="title">{{ lang.testParameters }}</div>
                 <div class="can_box">
                     <div class="can_one" v-if="ragJson.setting">
                         <div class="one_box">
-                            <span>{{lang.searchWay}}</span>
+                            <span>{{ lang.searchWay }}</span>
                             <span class="typeIcon" :class="{
                                 type1: ragJson.setting.useType == 1,
                                 type2: ragJson.setting.useType == 2,
@@ -47,24 +47,24 @@
                             }">{{ getUseType(ragJson.setting.useType) }}</span>
                         </div>
                         <div class="one_box">
-                            <span>{{lang.citations}}</span>
+                            <span>{{ lang.citations }}</span>
                             <span>{{ ragJson.setting.tokens }}</span>
                         </div>
                         <div class="one_box">
-                            <span>{{lang.minRelevance}}</span>
+                            <span>{{ lang.minRelevance }}</span>
                             <span>{{ ragJson.setting.temperature }}</span>
                         </div>
                     </div>
                     <div class="can_one" v-if="ragJson.setting" style="margin-top: 10px">
                         <div class="one_box">
-                            <span>{{lang.testText}}</span>
+                            <span>{{ lang.testText }}</span>
                             <span>{{ ragJson.setting.query }}</span>
                         </div>
                     </div>
                 </div>
             </div>
             <div class="test_result" v-if="Object.keys(ragJson).length">
-                <div class="title">{{lang.testResult}}</div>
+                <div class="title">{{ lang.testResult }}</div>
                 <div v-if="ragJson.json && ragJson.json.chunkSearchResults" class="result_box">
                     <div v-for="(item, index) in ragJson.json.chunkSearchResults" :key="index" class="result">
                         <el-tooltip :content=lang.distance placement="bottom" effect="dark">
@@ -87,28 +87,71 @@
                 <div style="height: 50px; line-height: 50px; width: 47.4px">
                     <img style="width: 100%" src="../../../../assets/flieKong.svg" alt="" />
                 </div>
-                <div style="margin-top: 10px">{{lang.teResultArea}}</div>
+                <div style="margin-top: 10px">{{ lang.teResultArea }}</div>
             </div>
         </div>
         <el-dialog title="新建文件夹" :visible.sync="moveBox" width="650px" style="border-radius: 8px"
             @close="moveBox = false" class="canEditCss">
             <div class="canEditTit" slot="title">
                 <img src="../../../../assets/icon/testC/dialog_setting.svg" alt="" />
-                <span>{{lang.knowSearchConfig}}</span>
+                <span>{{ lang.knowSearchConfig }}</span>
             </div>
             <div style="width: 100%; padding: 10px 40px; box-sizing: border-box;">
                 <div class="setting_nav">
-                    <div class="setting_nav_box searchIcon active">
-                        <span>{{lang.searchFiltration}}</span>
+                    <div class="setting_nav_box settingIcon" :class="{ active: searchType == 1 }"
+                        @click="searchType = 1">
+                        <span>{{ lang.searchType }}</span>
                     </div>
+                    <div class="setting_nav_box searchIcon" :class="{ active: searchType == 2 }"
+                        @click="searchType = 2">
+                        <span>{{ lang.searchFiltration }}</span>
+                    </div>
+                </div>
+                <div class="setting_serach" v-if="searchType == 1">
+                    <div class="setting_type_box" @click="json.useType = 1" :class="{ active: json.useType == 1 }">
+                        <div class="checkBox">
+                            <el-radio v-model="json.useType" :label="1" fill="#3370ff"></el-radio>
+                        </div>
+                        <div class="setting_type_detail">
+                            <div class="title">{{ lang.semanticRetrieval }}</div>
+                            <div class="detail">{{ lang.semanticRetrievalD }}</div>
+                        </div>
+                    </div>
+                    <div class="setting_type_box" @click="json.useType = 2" :class="{ active: json.useType == 2 }">
+                        <div class="checkBox">
+                            <el-radio v-model="json.useType" :label="2" fill="#3370ff"></el-radio>
+                        </div>
+                        <div class="setting_type_detail">
+                            <div class="title">{{ lang.fullTextSearch }}</div>
+                            <div class="detail">{{lang.fullTextSearchD }}</div>
+                        </div>
+                    </div>
+                    <div class="setting_type_box" @click="json.useType = 3" :class="{ active: json.useType == 3 }">
+                        <div class="checkBox">
+                            <el-radio v-model="json.useType" :label="3" fill="#3370ff"></el-radio>
+                        </div>
+                        <div class="setting_type_detail">
+                            <div class="title">{{ lang.mixSearch }}</div>
+                            <div class="detail">{{ lang.mixSearchD }}</div>
+                            <div class="slider" v-show="json.useType == 3">
+                                <div style="display: flex; justify-content: space-between;">
+                                    <span>{{ lang.fullTextSearch }}: {{ 10 - json.mixSearchRatio }}</span>
+                                    <span>{{ lang.semanticRetrieval }}: {{ json.mixSearchRatio }}</span>
+                                </div>
+                                <el-slider v-model="json.mixSearchRatio" :min="1" :max="9" :step="1" :label-step="1"></el-slider>
+                            </div>
+                        </div>
+                    </div>
+
+
                 </div>
-                <div class="setting_serach">
+                <div class="setting_serach" v-if="searchType == 2">
                     <div class="setting_serach_box">
-                        <span class="title">{{lang.citations}}
+                        <span class="title">{{ lang.citations }}
                             <el-tooltip :content=lang.token placement="bottom" effect="dark" popper-class="maxWidth">
-                                    <!-- content to trigger tooltip here -->
-                                    <i class="tips"></i>
-                                </el-tooltip>
+                                <!-- content to trigger tooltip here -->
+                                <i class="tips"></i>
+                            </el-tooltip>
                         </span>
                         <el-slider class="slider" v-model="json.tokens" :min="100" :max="20000" :step="1"
                             :vertical="false"></el-slider>
@@ -116,22 +159,23 @@
                             min="100" max="20000" step="1"></el-input-number>
                     </div>
                     <div class="setting_serach_box">
-                        <span class="title">{{this.lang.minRelevance}}
-                            <el-tooltip :content=lang.refiltering placement="bottom" effect="dark" popper-class="maxWidth">
-                                    <!-- content to trigger tooltip here -->
-                                    <i class="tips"></i>
-                                </el-tooltip>
+                        <span class="title">{{ lang.minRelevance }}
+                            <el-tooltip :content=lang.refiltering placement="bottom" effect="dark"
+                                popper-class="maxWidth">
+                                <!-- content to trigger tooltip here -->
+                                <i class="tips"></i>
+                            </el-tooltip>
                         </span>
                         <el-slider class="slider" v-model="json.temperature" :min="0" :max="1" :step="0.01"
                             :vertical="false"></el-slider>
-                        <el-input-number class="number" controls-position="right" v-model="json.temperature" size="small"
-                            min="0" max="1" step="0.01"></el-input-number>
+                        <el-input-number class="number" controls-position="right" v-model="json.temperature"
+                            size="small" min="0" max="1" step="0.01"></el-input-number>
                     </div>
                 </div>
             </div>
             <span slot="footer">
-                <el-button @click="moveBox = false">{{lang.cancel}}</el-button>
-                <el-button type="primary" @click="confirmSetting">{{this.lang.confirm}}</el-button>
+                <el-button @click="moveBox = false">{{ lang.cancel }}</el-button>
+                <el-button type="primary" @click="confirmSetting">{{ lang.confirm }}</el-button>
             </span>
         </el-dialog>
     </div>
@@ -154,7 +198,10 @@ export default {
             json: {
                 temperature: 0,
                 tokens: 1500,
-            }
+            },
+            searchType: 1,
+            useType: 1,
+            mixSearchRatio: 5
         };
     },
     props: {
@@ -182,40 +229,56 @@ export default {
                     return this.lang.semanticRetrieval;
                 } else if (e == 2) {
                     return this.lang.fullTextSearch;
-                } else if (e == 2) {
+                } else if (e == 3) {
                     return this.lang.mixSearch;
                 }
             };
         },
     },
+    watch: {
+        folderid(newValue, oldValue) {
+            this.getRagData();
+
+        }
+    },
     methods: {
         testCheck() {
             this.isLoading = true;
+            let mixSearchRatio = 1
+            if (this.useType == 1) {
+                mixSearchRatio = 10
+            } else if (this.useType == 2) {
+                mixSearchRatio = 0
+            } else {
+                mixSearchRatio = this.mixSearchRatio
+            }
+
+            // let params = {
+            //     userid: this.userid,
+            //     ids: this.folderid,
+            //     query: this.value,
+            //     type: 2,
+            //     useType: this.useType,
+            //     fullTextWeight: 10 - mixSearchRatio,
+            //     semanticWeight: mixSearchRatio,
+            //     limit: 10,
+            //     temperature: this.temperature,
+            //     tokens: this.tokens,
+            // };
             let params = {
                 userid: this.userid,
-                ids: this.folderid,
+                documentids: "",
+                folderids: this.folderid,
                 query: this.value,
-                type: 2,
-                useType: 1,
-                fullTextWeight: 1,
-                semanticWeight: 5,
+                useType: this.useType,
+                fullTextWeight: 10 - mixSearchRatio,
+                semanticWeight: mixSearchRatio,
                 limit: 10,
                 temperature: this.temperature,
                 tokens: this.tokens,
             };
-            // let params = {
-            //     documentids: "",
-            //     folderids: this.folderid, 
-            //     query: this.value,
-            //     useType: 1,
-            //     fullTextWeight: 1,
-            //     semanticWeight: 5,
-            //     limit: 10,
-            //     temperature: this.temperature,
-            //     tokens: this.tokens,
-            // };
             this.ajax
-                .post(this.$store.state.fileApi + "ragFolder", [params])
+                .post(this.$store.state.fileApi + "searchFolder3", [params])
                 // .post(this.$store.state.fileApi + "searchFolder", [params])
                 .then((res) => {
                     this.isLoading = false;
@@ -247,6 +310,8 @@ export default {
                         this.ragJson = this.ragArray[0];
                         this.ragJson.setting = this.ragJson.setting;
                         this.ragJson.json = this.ragJson.json;
+                    } else {
+                        this.ragJson = {};
                     }
                 })
                 .catch((err) => {
@@ -319,13 +384,18 @@ export default {
         openSetting() {
             this.json = JSON.parse(JSON.stringify({
                 tokens: this.tokens,
-                temperature: this.temperature
+                temperature: this.temperature,
+                useType: this.useType,
+                mixSearchRatio: 5
             }));
+            this.searchType = 1
             this.moveBox = true;
         },
         confirmSetting() {
             this.tokens = this.json.tokens
             this.temperature = this.json.temperature
+            this.useType = this.json.useType
+            this.mixSearchRatio = this.json.mixSearchRatio
             this.moveBox = false;
         }
     },
@@ -595,6 +665,24 @@ export default {
     background-size: 100% 100%;
 }
 
+.type2:before {
+    content: "";
+    width: 14px;
+    height: 14px;
+    margin-right: 5px;
+    background-image: url(../../../../assets/icon/testC/m_icon2.svg);
+    background-size: 100% 100%;
+}
+
+.type3:before {
+    content: "";
+    width: 14px;
+    height: 14px;
+    margin-right: 5px;
+    background-image: url(../../../../assets/icon/testC/m_icon3.svg);
+    background-size: 100% 100%;
+}
+
 .result_box {
     width: 100%;
 }
@@ -679,7 +767,7 @@ export default {
 .setting_nav_box {
     display: flex;
     height: 100%;
-    width: calc(100% / 3);
+    width: calc(100% / 2);
     align-items: center;
     /* flex: 1; */
     color: #485264;
@@ -713,6 +801,16 @@ export default {
     background-image: url(../../../../assets/icon/testC/search2.svg);
 }
 
+.settingIcon::before {
+    background-image: url(../../../../assets/icon/testC/setting.svg);
+}
+
+.setting_nav_box:hover.settingIcon::before,
+.setting_nav_box.active.settingIcon::before {
+    background-image: url(../../../../assets/icon/testC/setting2.svg);
+}
+
+
 .setting_serach {
     width: 100%;
 }
@@ -727,7 +825,7 @@ export default {
 
 .setting_serach_box .title {
     display: flex;
-    flex: 0 0 120px;
+    flex: 0 0 140px;
     -webkit-box-align: center;
     align-items: center;
 }
@@ -735,12 +833,15 @@ export default {
 .setting_serach_box .slider {
     flex: 1;
 }
-.setting_serach_box .slider  >>> .el-slider__bar{
+
+.setting_serach_box .slider>>>.el-slider__bar {
     background: unset;
 }
-.setting_serach_box .slider  >>> .el-slider__button {
+
+.setting_serach_box .slider>>>.el-slider__button {
     border-color: #3370ff;
 }
+
 .setting_serach_box .number {
     flex: 0 0 120px;
 }
@@ -749,7 +850,7 @@ export default {
     margin-top: 30px;
 }
 
-.tips{
+.tips {
     display: block;
     background-image: url(../../../../assets/icon/testC/test_tips.svg);
     background-size: 100% 100%;
@@ -759,28 +860,90 @@ export default {
 }
 
 @media screen and (max-width: 1300px) {
-  .testBox {
-    flex-direction: column;
-  }
+    .testBox {
+        flex-direction: column;
+    }
+
+    .testBox .test_right {
+        flex-direction: row;
+        width: 100%;
+        height: 250px;
+    }
+
+    .testBox .test_right .test_input_box {
+        flex: 0 0 250px;
+    }
+
+    .testBox .test_right .test_history {
+        flex: 1;
+    }
+}
+
+.setting_type_box>>>.el-radio__input.is-checked .el-radio__inner {
+    border-color: #3370ff;
+    background: #3370ff;
+}
+
+.setting_type_box>>>.el-radio__label {
+    display: none;
+}
+
+.setting_type_box .slider {
+    margin-top: 15px;
+}
+
+.setting_type_box .slider>>>.el-slider__bar {
+    background: #3370ff;
+}
 
-  .testBox .test_right{
-    flex-direction: row;
+.setting_type_box .slider>>>.el-slider__runway {
+    background: #f9518e;
+}
+
+.setting_type_box .slider>>>.el-slider__button {
+    border-color: #3370ff;
+}
+
+.setting_type_box {
+    display: flex;
+    background: #f7f8fa;
+    padding: 12px;
+    box-sizing: border-box;
     width: 100%;
-    height: 250px;
-  }
-  
-  .testBox .test_right .test_input_box{
-    flex: 0 0 250px;
-  }
-  .testBox .test_right .test_history{
-    flex: 1;
-  }
+    border: 1px solid #eaedf1;
+    border-radius: 5px;
+    cursor: pointer;
+    transition: all .3s;
 }
 
+.setting_type_box.active,
+.setting_type_box:hover {
+    border: 1px solid #3370ff;
+}
+
+.setting_type_box+.setting_type_box {
+    margin-top: 15px;
+}
+
+.setting_type_box .checkBox {
+    margin-right: 12px;
+}
+
+.setting_type_box .setting_type_detail {}
+
+.setting_type_box .setting_type_detail>.title {
+    color: #111824;
+    margin-bottom: 3px;
+}
+
+.setting_type_box .setting_type_detail>.detail {
+    color: #667085;
+    word-break: break-word;
+}
 </style>
 
 <style>
-.maxWidth{
+.maxWidth {
     max-width: 240px;
     word-break: break-all;
 }

+ 33 - 19
src/components/pages/knowledge/fileBox.vue

@@ -21,7 +21,7 @@
           v-if="$parent.barNam == 1"
           v-model="checkFolderid"
           :options="myFolderArray2"
-          :placeholder=this.lang.selectFolder
+          :placeholder=lang.selectFolder
           style="width: 250px;"
           @change="serchFile()"
         />
@@ -30,7 +30,7 @@
           style="width: 120px;margin-left: 10px"
           v-loading="!userArray.length"
           v-model="user"
-          :placeholder=this.lang.owner
+          :placeholder=lang.owner
           clearable
           filterable
           @change="serchFile2()"
@@ -49,7 +49,7 @@
           <input
             type="text"
             v-model="fileName"
-            :placeholder=this.lang.selectFileName
+            :placeholder=lang.selectFileName
             @input="debouncedSearch"
           />
         </div>
@@ -74,7 +74,7 @@
           <el-button style="background: #F56C6C;" type="danger" size="small" v-if="checkArray.length" @click="batchDelete"
             >{{lang.delete}}</el-button
           >
-          <span v-if="checkArray.length" style="margin-left: 12px;color: #b0b0b0;font-size: 14px;flex-shrink:0;line-height: 35px;">{{lang.selectedFiles}}&nbsp;{{checkArray.length}}&nbsp;{{lang.piece}}</span>
+          <span v-if="checkArray.length" style="margin-left: 12px;color: #b0b0b0;font-size: 14px;flex-shrink:0;line-height: 35px;">{{ lang.x_items_selected.replace("${x}",checkArray.length) }}</span>
 
       </div>
       </div>
@@ -93,6 +93,7 @@
           @selection-change="handleSelectionChange"
           :row-key="row => row.id"
           ref="myTable"
+          max-height="800px"
           @row-click="checkFile"
         >
           <el-table-column
@@ -119,7 +120,7 @@
             show-overflow-tooltip
             width="120"
           ></el-table-column>
-         
+
           <el-table-column :label=lang.sliceClassification width="120px">
             <template slot-scope="scope">
               {{ getState(scope.row.ingestionStatus) }}
@@ -154,7 +155,7 @@
                   >
                   <div class="BtnHP">
                     <div class="BtnHPDel1">
-                    
+
                       <!-- <el-button
                         type="text"
                         size="small"
@@ -162,15 +163,15 @@
                         :disabled="scope.row.ingestionStatus == 'failed'"
                         >提取</el-button
                       > -->
-                      <div class="btnBh" 
+                      <div class="btnBh"
                        @click="extractFile(scope.row)"
                         @mouseover="isHover = true"
                         :disabled="scope.row.ingestionStatus == 'failed'"
                         @mouseleave="isHover = false"
                         v-if="scope.row.userid == userid">
-                        <img 
+                        <img
                         style="width: 14px;"
-                        :src="isHover ? tqList2 : tqList" 
+                        :src="isHover ? tqList2 : tqList"
                          alt="">
                         <span :class="isHover ? 'lookHp2' : 'lookHp1'">{{lang.extract}}</span>
                       </div>
@@ -182,23 +183,23 @@
                         >查看</el-button
                       > -->
 
-                      <div class="btnBh" 
+                      <div class="btnBh"
                       @click="checkFile(scope.row)"
                         @mouseover="isHover2 = true"
                         :disabled="scope.row.ingestionStatus == 'failed'"
                         @mouseleave="isHover2 = false">
-                        <img 
-                        :src="isHover2 ? look2 : look1" 
+                        <img
+                        :src="isHover2 ? look2 : look1"
                          alt="">
                         <span :class="isHover2 ? 'lookHp2' : 'lookHp1'">{{lang.view}}</span>
                       </div>
-                      <div class="btnBh" 
+                      <div class="btnBh"
                       @click="downloadFile(scope.row)"
                         @mouseover="isHover3 = true"
                         :disabled="scope.row.ingestionStatus == 'failed'"
                         @mouseleave="isHover3 = false">
-                        <img 
-                        :src="isHover3 ? download2 : download" 
+                        <img
+                        :src="isHover3 ? download2 : download"
                          alt="">
                         <span :class="isHover3 ? 'lookHp2' : 'lookHp1'">{{lang.download}}</span>
                       </div>
@@ -212,7 +213,7 @@
                         @click="deleteFile(scope.row.id, scope.row.documentid)"
                         >删除</el-button
                       > -->
-                      <div class="btnBh2" 
+                      <div class="btnBh2"
                       @click="deleteFile(scope.row.id, scope.row.documentid)"
                       v-if="scope.row.userid == userid">
                         <img src="../../../assets/listdel.svg" alt="">
@@ -232,11 +233,20 @@
       <el-pagination
         class="pageBox"
         style="margin-top: 10px"
-        layout="total,prev, pager, next"
+        layout="total,prev, pager, next,  slot"
         :page-size="limit"
         :total="total"
         @current-change="handleCurrentChange"
+        :page-sizes="[10, 20, 50, 100]"
       >
+      <el-select v-model="limit" @change="handleSizeChange" class="file_mySelect">
+          <el-option
+              v-for="item in [10, 20, 50, 100]"
+              :key="item"
+              :label="item"
+              :value="item"
+              ></el-option>
+          </el-select>
       </el-pagination>
       <div v-if="proVisible" class="mask">
         <div class="progressBox">
@@ -418,6 +428,10 @@ export default {
       this.page = val;
       this.getData();
     },
+    handleSizeChange(val){
+      this.limit = val
+      this.getData()
+    },
     getData() {
       let type = this.pid.split("/");
       this.isLoading = true;
@@ -593,7 +607,7 @@ export default {
         };
         const res2 = await this.ajax.post(this.$store.state.api + "addFile", [
           params
-        ]);        
+        ]);
       } catch (err) {
         console.error(err);
         this.$message.error(this.lang.uploadFail);
@@ -682,7 +696,7 @@ export default {
 
     extractFile(row) {
       if (row.ingestionStatus != "success") return this.$message.info(this.lang.fileUploadFail)
-      
+
       let params = {
         documentid: row.documentid
       };

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 372 - 227
src/components/pages/knowledge/folder.vue


+ 92 - 24
src/components/pages/knowledge/folderDetail.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="f_box">
-    
-    <div class="f_box_top2">
+
+    <div class="f_box_top2" :style="{maxWidth:fold ? 'calc(100% - 10px)' : 'calc(100% - 320px)'}">
       <folderFileBoxVue
         :pid="pid"
         :userid="userid"
@@ -13,13 +13,17 @@
       ></folderFileBoxVue>
     </div>
 
-    <div class="f_box_top" v-loading="isLoading">
-       
+    <div class="f_box_top" v-loading="isLoading" v-show="!fold">
+      <div class="f_b_foldBtn">
+        <div @click="fold = true">
+          <img src="../../../assets/icon/fold.svg">
+        </div>
+      </div>
         <div class="t_title">
           <div class="t_title">
             <img style="width: 20px;margin-right: 5px;" src="../../../assets/listfolder2.svg" alt="">
             <el-tooltip class="item" effect="dark" :content="data.name" placement="top">
-              <div class="perName">{{ data.name }}</div>    
+              <div class="perName">{{ data.name }}</div>
             </el-tooltip>
 
           </div>
@@ -27,7 +31,7 @@
             <img style="width: 11px;" src="../../../assets/xiugai.svg" alt="">
           </div>
         </div>
-        
+
         <div class="t_btn" v-if="userid == data.userid && data.isMo == '2'">
            <div v-if="userid == data.userid && data.isMo == '2'" @click="copyFolder">
             <img style="height: 14px; margin-right: 8px;" src="../../../assets/copyFlieG2.svg" alt="">
@@ -44,12 +48,12 @@
           </div>
         </div>
 
-        <div 
+        <div
         style="height: 1px;border-bottom: 1px #E8EBF0 solid; margin: 16px 0;"
         v-if="check1.length || check2.length || check3.length"
         ></div>
 
-        <div 
+        <div
         style="font-size: 12px;font-family: PingFang;color: #111824;margin-bottom: 12px;font-weight: 600;"
         v-if="check1.length || check2.length || check3.length"
         >{{ lang.tag }}</div>
@@ -69,11 +73,11 @@
                 </div>
               </div>
               <!-- <div class="tags" v-if="check2.length">
-               
+
               </div>
 
               <div class="tags" v-if="check3.length">
-                
+
               </div> -->
 
           </div>
@@ -118,6 +122,12 @@
         </div>
     </div>
 
+    <div class="f_b_foldArea" v-show="fold">
+      <div @click="fold = false">
+          <img src="../../../assets/icon/fold.svg">
+        </div>
+    </div>
+
       <el-dialog
         :visible.sync="canEdit"
         width="30%"
@@ -150,7 +160,7 @@
             style="width: 65%"
           />
           <!-- @change="updateFolder()" -->
-          
+
           <div class="canEditFileName">{{lang.gradeTag}}</div>
           <selectTag
             v-loading="tagLoading2"
@@ -177,7 +187,7 @@
           />
           <!-- @change="handleTagChange" -->
           <div class="canEditFileName" style="margin-bottom: 9px;">{{ lang.permissions }}</div>
-          
+
           <div class="tag" >
               <div class="tag_check">
                 <el-radio-group  v-model="fileDetail.juri" >
@@ -243,7 +253,8 @@ export default {
       tagData3: [],
       check1: [],
       check2: [],
-      check3: []
+      check3: [],
+      fold:false,
     };
   },
   watch: {
@@ -261,7 +272,7 @@ export default {
        if (this.check1.includes(val.id)) {
         for (let index = 0; index < this.check1.length; index++) {
           if (this.check1[index] == val.id) {
-            return val.name
+              return val.name
           }
         }
        }
@@ -330,14 +341,14 @@ export default {
   methods: {
     openCanEdit(){
       this.canEdit = true;
-      
+
       this.fileDetail = JSON.parse(JSON.stringify(this.data))
       this.fileDetailCheck1 = JSON.parse(JSON.stringify(this.check1))
       this.fileDetailCheck2 = JSON.parse(JSON.stringify(this.check2))
       this.fileDetailCheck3 = JSON.parse(JSON.stringify(this.check3))
-      
-      
-      
+
+
+
     },
     modifyDetail(){
       if (!this.fileDetail.name.trim()) {
@@ -429,7 +440,16 @@ export default {
         .post(this.$store.state.api + "getKnowledgeTag", [params])
         .then(res => {
           tagLoadings[type - 1] = false;
-          this[`tagData${type}`] = res.data[0];
+
+          let _data = res.data[0];
+          _data.forEach(i=>{
+            if(this.lang.lang == "en" && i.com){
+              i.name = i.com;
+            }else if(this.lang.lang == "hk" && i.hk){
+              i.name = i.hk;
+            }
+          })
+          this[`tagData${type}`] = _data
 
           const checkKey = `check${type}`;
           if (type == 3) {
@@ -532,7 +552,7 @@ export default {
         folderid: this.folderid
       };
       // return console.log('params',params);
-      
+
       this.ajax
         .post(this.$store.state.fileApi + "updateFolder", [params])
         .then(res => {
@@ -545,7 +565,7 @@ export default {
     },
     handleTagChange(value) {
       // console.log('value',value);
-      
+
       const tagArray = this.tagData3;
       const selectedTags = value.flatMap(tag =>
         tag.split(/[,,]/).map(t => t.trim())
@@ -624,7 +644,7 @@ export default {
 .f_box_top {
   padding: 10px;
   width: 272px;
-  padding: 24px;
+  padding: 16px 24px 24px 24px;
   flex-shrink: 0;
   box-sizing: border-box;
   height: calc(100% - 24px);
@@ -632,6 +652,54 @@ export default {
   background-color: #fff;
   box-sizing: border-box;
 }
+
+.f_b_foldBtn{
+  width: 100%;
+  height: 20px;
+  display: flex;
+  align-items: center;
+  justify-content: flex-end;
+}
+
+.f_b_foldArea{
+  width: auto;
+  height: auto;
+  position: absolute;
+  right: -10px;
+  top: 5px;
+  display: flex;
+}
+
+.f_b_foldArea>div{
+  width: 30px;
+  height: 30px;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  border-radius: 15px 0 0 15px;
+  background-color: #fff;
+  cursor: pointer;
+  box-sizing: border-box;
+  border: 1px #E8EBF0 solid;
+  border-right: none;
+}
+
+.f_b_foldArea>div>img{
+  width: 20px;
+  height: 20px;
+}
+
+.f_b_foldBtn>div{
+  width: 20px;
+  height: 20px;
+  cursor: pointer;
+}
+.f_b_foldBtn>div>img{
+  width: 100%;
+  height: 100%;
+  transform: rotate(180deg);
+}
+
 .f_box_top2{
   height: calc(100% - 48px);
   flex: 1;
@@ -696,9 +764,9 @@ export default {
   margin-bottom: 10px;
 }
 .tags >>> span{
-   
+
     height: 24.38px;
-    line-height: 24.38px; 
+    line-height: 24.38px;
     padding: 4px 10px;
     border-radius: 6px;
     border: none;

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 435 - 214
src/components/pages/knowledge/folderFileBox.vue


+ 3 - 2
src/components/pages/knowledge/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="l_box">
     <div class="l_type_box" v-loading="isLoading">
-      <div class="header">
+      <div class="header" @click="checkType('0')">
         <img style="width: 35px;margin-right: 10px;" src="../../../assets/knowledge.png" alt="">
         <span class="title">{{ lang.myKnowledgeBase }}</span>
       </div>
@@ -51,7 +51,7 @@
       </div>
 
 
-      <folder :userid="userid" :typeArray="typeArray" :pid="pid" @checkType="checkType" v-show="pid.split('/').length == 1 && (barNam ==0 || barNam == 2)" ref="folder"></folder>
+      <folder :userid="userid" :typeArray="typeArray" :pid="pid" @checkType="checkType" v-show="pid.split('/').length == 1 && (barNam ==0 || barNam == 2)" :showBool="pid.split('/').length == 1 && (barNam ==0 || barNam == 2)" ref="folder"></folder>
 
 
       <fileBox :userid="userid" :typeArray="typeArray" :pid="pid" :type='type' ref="fileBox" v-show="pid.split('/').length == 1 && moFolderid && barNam ==1" :moFolderid="moFolderid" :myFolderArray="myFolderArray">
@@ -252,6 +252,7 @@ export default {
   display: flex;
   /* justify-content: space-between; */
   align-items: center;
+  cursor: pointer;
 }
 
 .l_type_box>.header>.title {

+ 8 - 1
src/lang/cn.json

@@ -1,4 +1,5 @@
 {
+  "lang":"cn",
   "test":"测试",
   "myKnowledgeBase":"我的知识库",
   "allFolders":"所有文件夹",
@@ -117,11 +118,15 @@
   "viewFrom":"点击查看来源",
   "teResultArea":"测试结果将在这里展示",
   "searchFiltration":"搜索过滤",
+  "searchType":"搜索方式",
   "token":"单次搜索最大的 token 数量,中文约1字=1.7tokens,英文约1字=1token",
   "refiltering":"不同索引模型的相关度有区别,请通过搜索测试来选择合适的数值。使用 结果重排 时,使用重排结果进行过滤。",
   "semanticRetrieval":"语义检索",
+  "semanticRetrievalD":"使用向量进行文本相关性查询",
   "fullTextSearch":"全文检索",
+  "fullTextSearchD":"使用传统的全文检索,适合查找一些关键词和主谓语特殊的数据",
   "mixSearch":"混合检索",
+  "mixSearchD": "使用向量检索和全文检索的综合结果返回,使用RRF算法进行排序",
   "sureDeRecord":"确定删除该记录嘛?",
   "Summary":"文章摘要:",
   "FileName":"文档名",
@@ -145,5 +150,7 @@
   "addSuccess":"添加成功",
   "cancelAllSelect":"取消全选",
   "allSelect":"全选",
-  "pleaseSelect":"请选择"
+  "pleaseSelect":"请选择",
+  "a_total_of_x_items":"共 ${x} 条",
+  "x_items_selected":"已选文件${x}个"
 }

+ 12 - 5
src/lang/en.json

@@ -1,4 +1,5 @@
 {
+  "lang":"en",
   "test":"Test",
   "myKnowledgeBase":"My Knowledge Base",
   "allFolders":"All Folders",
@@ -63,7 +64,7 @@
   "extract":"Extract",
   "download":"Download",
   "uploadWait":"Uploading, please wait...",
-  "sucucess":"Success",
+  "success":"Success",
   "fail":"Failure",
   "sliced":"Chunking",
   "pending":"Pending",
@@ -85,11 +86,11 @@
   "edit":"Edit",
   "inputName":"Input folder name",
   "inputDesc":"Please enter folder description",
-  "subjectTag":"Subject Tag",
+  "subjectTag":"Subject",
   "seTagType":"Choose Subject",
-  "gradeTag":"Grade Tag",
+  "gradeTag":"Grade",
   "seGradeTag":"Choose Grade",
-  "customTag":"Customize Tag",
+  "customTag":"Customize",
   "updateSuccess":"Update Success",
   "confirmDeTag":"Are you sure you want to delete this tag?",
   "rootDirectory":"Root Directory",
@@ -117,11 +118,15 @@
   "viewFrom":"Click to view source",
   "teResultArea":"Test records will be displayed here",
   "searchFiltration":"Search Filtering",
+  "searchType":"Search Type",
   "token":"Maximum number of tokens for a single search, about 1 character = 1.7 tokens in Chinese, about 1 character = 1 token in English",
   "refiltering":"Re-filtering results based on the search results. The relevance of different index models varies, please choose the appropriate value through search testing. When using result reordering, use the reordered results for filtering.",
   "semanticRetrieval":"Semantic Retrieval",
+  "semanticRetrievalD":"Using vectors for text relevance queries",
   "fullTextSearch":"Full Text Search",
+  "fullTextSearchD":"Using traditional full-text search, suitable for finding some keyword and subject-predicate specific data",
   "mixSearch":"Mixed Search",
+  "mixSearchD": "Returns a combined result of vector search and full-text search, sorted using the RRF algorithm",
   "sureDeRecord":"Are you sure you want to delete this record?",
   "Summary":"Summary",
   "FileName":"File Name",
@@ -145,5 +150,7 @@
   "addSuccess":"Add Success",
   "cancelAllSelect":"Cancel all selection",
   "allSelect":"All Select",
-  "pleaseSelect":"Please select"
+  "pleaseSelect":"Please select",
+  "a_total_of_x_items":"A total of ${x} items.",
+  "x_items_selected":"${x} items selected"
 }

+ 10 - 2
src/lang/hk.json

@@ -1,4 +1,5 @@
 {
+  "lang":"hk",
   "test": "测试",
   "myKnowledgeBase": "我的知識庫",
   "allFolders": "所有文件夾",
@@ -63,7 +64,7 @@
   "extract": "提取",
   "download": "下載",
   "uploadWait": "小可正在上傳中,請稍後",
-  "sucucess": "成功",
+  "success": "成功",
   "fail": "失敗",
   "sliced": "切片中",
   "pending": "待處理",
@@ -117,11 +118,15 @@
   "viewFrom": "點擊查看來源",
   "teResultArea": "測試結果將在這裡展示",
   "searchFiltration": "搜索過濾",
+  "searchType":"搜索方式",
   "token": "單次搜索最大的 token 數量,中文約1字=1.7tokens,英文約1字=1token",
   "refiltering": "不同索引模型的相關度有區別,請通過搜索測試來選擇合適的數值。使用 結果重排 時,使用重排結果進行過濾。",
   "semanticRetrieval":"語義檢索",
+  "semanticRetrievalD":"使用向量進行文本相關性查詢",
   "fullTextSearch":"全文檢索",
+  "fullTextSearchD":"使用傳統的全文檢索,適合查找一些關鍵詞和主謂語特殊的數據",
   "mixSearch":"混合檢索",
+  "mixSearchD": "使用向量檢索和全文檢索的綜合結果返回,使用RRF算法進行排序",
   "sureDeRecord": "確定刪除該記錄嘛?",
   "Summary": "文章摘要:",
   "FileName":"文檔名",
@@ -145,5 +150,8 @@
   "addSuccess":"添加成功",
   "cancelAllSelect":"取消全選",
   "allSelect":"全選",
-  "pleaseSelect":"請選擇"
+  "pleaseSelect":"請選擇",
+  "a_total_of_x_items":"共 ${x} 條",
+  "x_items_selected":"已選文件${x}個"
+
 }

+ 14 - 0
src/main.js

@@ -23,6 +23,10 @@ import './assets/css/dialog.css'
 import './assets/css/markdownCss.css'
 import './assets/css/markdownCssCopy.css'
 
+import ElementUI from "element-ui";
+import "element-ui/lib/theme-chalk/index.css";
+import locale from 'element-ui/lib/locale/lang/en'
+
 import cn from './lang/cn.json'
 import hk from './lang/hk.json'
 import en from './lang/en.json'
@@ -48,6 +52,16 @@ Vue.use(VideoPlayer).use(VueAudio).use(VueCookies).use(Viewer).use(hevueImgPrevi
 })
 
 Vue.prototype.lang = lang;
+// 全局修改默认配置,点击空白处不能关闭弹窗
+ElementUI.Dialog.props.closeOnClickModal.default = false;
+
+if(lang.lang=='en'){//英文版
+	Vue.use(ElementUI,{locale})
+}else{
+	Vue.use(ElementUI)
+}
+
+
 Vue.config.productionTip = false
 Vue.prototype.$store = store; // 将store实例挂在vue原型上
 Vue.prototype.ajax = ajax

+ 2 - 5
src/router/index.js

@@ -1,12 +1,9 @@
 import Vue from "vue";
 import Router from "vue-router";
-import ElementUI from "element-ui";
-import "element-ui/lib/theme-chalk/index.css";
 import knowledge from "@/components/pages/knowledge/index";
 
-// 全局修改默认配置,点击空白处不能关闭弹窗
-ElementUI.Dialog.props.closeOnClickModal.default = false;
-Vue.use(Router).use(ElementUI);
+
+Vue.use(Router);
 
 export default new Router({
   routes: [

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است