lsc 3 ヶ月 前
コミット
3c5ba75854

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.d845805fc8dd4350fdef0a17fbe5dceb.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.48a578a7c9e065d22bb8.js></script><script type=text/javascript src=./static/js/app.e5eae1440132255eead6.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.7b9f90b5475bc2fda99d38b237bb75ea.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.007027b879cef6b150a5.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/css/app.7b9f90b5475bc2fda99d38b237bb75ea.css


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/css/app.7b9f90b5475bc2fda99d38b237bb75ea.css.map


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/css/app.d845805fc8dd4350fdef0a17fbe5dceb.css.map


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/app.007027b879cef6b150a5.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/app.007027b879cef6b150a5.js.map


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/app.e5eae1440132255eead6.js


ファイルの差分が大きいため隠しています
+ 0 - 0
dist/static/js/app.e5eae1440132255eead6.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.bc3479efe4e7d435ff02.js.map


+ 1 - 0
src/App.vue

@@ -561,4 +561,5 @@ html::-webkit-scrollbar-thumb {
   font-size: 12px;
   box-sizing: border-box;
 }
+
 </style>

+ 6 - 0
src/assets/icon/testC/del.svg

@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 32 32" width="24" height="24" style="" filter="none">
+    
+    <g>
+    <path d="M22.129 5.301l-1.614-3.687h-8.758l-1.614 3.687h-7.837v2.305h2.766v22.822h22.358v-22.823h2.536v-2.304h-7.837zM12.909 3.918h5.992l0.691 1.384h-7.146l0.462-1.38zM24.895 28.121h-17.749v-20.515h17.749v20.515zM9.451 11.526h2.305v13.138h-2.305zM14.752 11.526h2.305v13.138h-2.305zM20.285 11.526h2.305v13.138h-2.305z" fill="#667085"></path>
+    </g>
+  </svg>

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

@@ -0,0 +1 @@
+<?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="1744351511351" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7212" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M403.456 890.496h-237.44a34.56 34.56 0 0 1-34.304-32.448V167.68c0-19.84 14.464-34.304 34.304-34.304h543.488c18.944 0 34.304 14.464 34.304 34.304v206.336c0 19.84 14.4 34.304 34.304 34.304a33.728 33.728 0 0 0 34.304-34.304V167.68c0-57.728-45.184-103.68-102.016-103.68H166.016C109.12 64 64 109.952 64 167.68v688.576c0 57.664 45.12 103.68 102.016 103.68h238.336a33.728 33.728 0 0 0 34.304-34.304 35.84 35.84 0 0 0-35.2-35.2z" fill="#1296db" p-id="7213"></path><path d="M436.864 531.776c0-21.632-14.464-36.928-35.2-36.928H248.192c-19.84 0-35.2 16.192-35.2 36.928 0 21.632 14.4 36.928 35.2 36.928H402.56c18.048 0.896 34.304-15.36 34.304-36.928z m224.768-207.36c0-21.568-13.568-36.864-32.512-36.864H245.44c-18.048 0-32.512 16.192-32.512 36.928 0 21.632 13.568 36.928 32.512 36.928h384.64c16.192 0.896 31.552-17.088 31.552-36.928zM948.736 896.768l-119.168-114.432a212.48 212.48 0 0 0 39.68-107.264c12.672-121.664-72.192-224.448-194.048-237.056-121.92-12.608-224.832 72.128-237.44 193.792-12.672 121.664 72.192 224.448 194.048 237.056a207.488 207.488 0 0 0 144.448-35.2l121.92 116.288a36.864 36.864 0 0 0 51.456-0.896 36.928 36.928 0 0 0-0.896-52.288z m-147.2-229.76c-8.128 81.088-83.008 141.44-164.288 133.376a148.928 148.928 0 0 1-133.632-163.2 149.376 149.376 0 0 1 164.352-133.376c81.28 8.128 140.8 81.152 133.568 163.2zM242.752 660.672c-17.152 0-29.824 16.192-29.824 36.928 0 20.736 12.672 36.992 29.824 36.992h89.344c17.152 0 29.824-16.256 29.824-36.992 0-20.736-12.672-36.928-29.824-36.928H242.752z" fill="#1296db" p-id="7214"></path></svg>

ファイルの差分が大きいため隠しています
+ 0 - 0
src/assets/icon/testC/m_icon.svg


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

@@ -0,0 +1 @@
+<?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="1744335971172" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="18715" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M339.2 1008a309.12 309.12 0 0 1-219.52-90.88 310.976 310.976 0 0 1 0-439.04l64-64c18.56-18.56 49.28-18.56 67.84 0s18.56 49.28 0 67.84l-64 64a214.4 214.4 0 0 0 0 303.36 214.4 214.4 0 0 0 303.36 0l66.56-66.56c18.56-18.56 49.28-18.56 67.84 0 18.56 18.56 18.56 49.28 0 67.84l-66.56 66.56a309.12 309.12 0 0 1-219.52 90.88zM814.08 641.92c-12.16 0-24.32-4.48-33.92-14.08a48.256 48.256 0 0 1 0-67.84l81.92-81.92a214.4 214.4 0 0 0 0-303.36c-81.28-81.28-222.08-81.28-303.36 0l-76.8 76.8c-18.56 18.56-49.28 18.56-67.84 0s-18.56-49.28 0-67.84l76.8-76.8C549.76 48 627.2 16 710.4 16s160.64 32 219.52 90.88a310.976 310.976 0 0 1 0 439.04l-81.92 81.92c-9.6 9.6-21.76 14.08-33.92 14.08zM832 880c-12.16 0-24.32-4.48-33.92-14.08l-640-640c-18.56-18.56-18.56-49.28 0-67.84s49.28-18.56 67.84 0l640 640c18.56 18.56 18.56 49.28 0 67.84-9.6 9.6-21.76 14.08-33.92 14.08z" p-id="18716"></path></svg>

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

@@ -0,0 +1 @@
+<?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="1744335971172" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="18715" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M339.2 1008a309.12 309.12 0 0 1-219.52-90.88 310.976 310.976 0 0 1 0-439.04l64-64c18.56-18.56 49.28-18.56 67.84 0s18.56 49.28 0 67.84l-64 64a214.4 214.4 0 0 0 0 303.36 214.4 214.4 0 0 0 303.36 0l66.56-66.56c18.56-18.56 49.28-18.56 67.84 0 18.56 18.56 18.56 49.28 0 67.84l-66.56 66.56a309.12 309.12 0 0 1-219.52 90.88zM814.08 641.92c-12.16 0-24.32-4.48-33.92-14.08a48.256 48.256 0 0 1 0-67.84l81.92-81.92a214.4 214.4 0 0 0 0-303.36c-81.28-81.28-222.08-81.28-303.36 0l-76.8 76.8c-18.56 18.56-49.28 18.56-67.84 0s-18.56-49.28 0-67.84l76.8-76.8C549.76 48 627.2 16 710.4 16s160.64 32 219.52 90.88a310.976 310.976 0 0 1 0 439.04l-81.92 81.92c-9.6 9.6-21.76 14.08-33.92 14.08zM832 880c-12.16 0-24.32-4.48-33.92-14.08l-640-640c-18.56-18.56-18.56-49.28 0-67.84s49.28-18.56 67.84 0l640 640c18.56 18.56 18.56 49.28 0 67.84-9.6 9.6-21.76 14.08-33.92 14.08z" p-id="18716" fill="#3370ff"></path></svg>

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

@@ -0,0 +1 @@
+<?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="1744334686063" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2510" id="mx_n_1744334686063" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M312.917333 796.416A28.416 28.416 0 0 1 341.333333 824.917333V853.333333a28.501333 28.501333 0 0 1-28.416 28.416H28.416A28.501333 28.501333 0 0 1 0 853.333333v-28.416a28.416 28.416 0 0 1 28.416-28.501333h284.501333z m227.498667 170.666667a28.416 28.416 0 0 1-28.416 28.501333h-28.416a28.501333 28.501333 0 0 1-28.501333-28.501333v-256A28.416 28.416 0 0 1 483.584 682.666667H512a28.416 28.416 0 0 1 28.416 28.416v85.333333h455.168a28.416 28.416 0 0 1 28.416 28.501333V853.333333a28.416 28.416 0 0 1-28.416 28.416H540.416v85.333334zM284.416 341.333333a28.416 28.416 0 0 1 28.501333 28.416v256a28.416 28.416 0 0 1-28.501333 28.501334H256a28.416 28.416 0 0 1-28.416-28.501334v-85.333333H28.416A28.416 28.416 0 0 1 0 512v-28.416a28.416 28.416 0 0 1 28.416-28.501333h199.168v-85.333334A28.416 28.416 0 0 1 256 341.333333h28.416z m711.168 113.749334a28.416 28.416 0 0 1 28.416 28.501333V512a28.416 28.416 0 0 1-28.416 28.416h-512A28.416 28.416 0 0 1 455.082667 512v-28.416a28.416 28.416 0 0 1 28.501333-28.501333h512zM768 0a28.416 28.416 0 0 1 28.416 28.416v85.333333h199.168a28.416 28.416 0 0 1 28.416 28.501334V170.666667a28.416 28.416 0 0 1-28.416 28.416H796.416v85.333333A28.416 28.416 0 0 1 768 312.917333h-28.416a28.416 28.416 0 0 1-28.501333-28.501333v-256A28.416 28.416 0 0 1 739.584 0H768zM540.416 113.749333a28.416 28.416 0 0 1 28.501333 28.501334V170.666667a28.416 28.416 0 0 1-28.501333 28.416h-512A28.416 28.416 0 0 1 0 170.666667v-28.416a28.416 28.416 0 0 1 28.416-28.501334h512z" fill="#111824" p-id="2511"></path></svg>

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

@@ -0,0 +1 @@
+<?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="1744336741732" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="23127" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M512 938.666667c235.648 0 426.666667-191.018667 426.666667-426.666667S747.648 85.333333 512 85.333333 85.333333 276.352 85.333333 512s191.018667 426.666667 426.666667 426.666667z m0 85.333333C229.248 1024 0 794.752 0 512S229.248 0 512 0s512 229.248 512 512-229.248 512-512 512z m42.666667-486.869333V298.538667C554.666667 275.328 535.552 256 512 256c-23.722667 0-42.666667 19.029333-42.666667 42.538667v256.256a41.984 41.984 0 0 0 12.202667 29.866666l121.258667 121.258667a42.368 42.368 0 0 0 60.032-0.298667 42.666667 42.666667 0 0 0 0.298666-60.032L554.666667 537.130667z" fill="#3D3D3D" p-id="23128"></path></svg>

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

@@ -0,0 +1 @@
+<?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="1744339252198" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="25130" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M875.1 21.1H138.3C75.1 21.1 19 77.2 19 147.4v736.8c0 70.2 56.1 119.3 119.3 119.3h736.8c70.2 0 119.3-56.1 119.3-119.3V147.4c7-70.2-49.1-126.3-119.3-126.3z m63.1 856.1c0 35.1-28.1 63.2-63.2 63.2H138.3c-35.1 0-63.2-28.1-63.2-63.2V147.4c0-35.1 28.1-63.2 63.2-63.2h736.8c35.1 0 63.2 28.1 63.2 63.2v729.8z m0 0" fill="#111824" p-id="25131"></path><path d="M772.5 343.2H224.8c-17.7 0-32.3-14.5-32.3-32.3 0-17.7 14.5-32.3 32.3-32.3h547.7c17.7 0 32.3 14.5 32.3 32.3 0 17.8-14.5 32.3-32.3 32.3zM772.5 548.9H224.8c-17.7 0-32.3-14.5-32.3-32.3 0-17.7 14.5-32.3 32.3-32.3h547.7c17.7 0 32.3 14.5 32.3 32.3 0 17.8-14.5 32.3-32.3 32.3zM772.5 767.3H224.8c-17.7 0-32.3-14.5-32.3-32.3 0-17.7 14.5-32.3 32.3-32.3h547.7c17.7 0 32.3 14.5 32.3 32.3 0 17.7-14.5 32.3-32.3 32.3z" fill="#111824" p-id="25132"></path><path d="M663.8 674.9v102.5c0 17.7-14.5 32.3-32.3 32.3-17.7 0-32.3-14.5-32.3-32.3V674.9c0-17.7 14.5-32.3 32.3-32.3 17.7 0.1 32.3 14.6 32.3 32.3zM499.3 461.6v102.5c0 17.7-14.5 32.3-32.3 32.3-17.7 0-32.3-14.5-32.3-32.3V461.6c0-17.7 14.5-32.3 32.3-32.3 17.8 0.1 32.3 14.6 32.3 32.3zM733.3 249.6v102.5c0 17.7-14.5 32.3-32.3 32.3-17.7 0-32.3-14.5-32.3-32.3V249.6c0-17.7 14.5-32.3 32.3-32.3 17.8 0 32.3 14.6 32.3 32.3z" fill="#111824" p-id="25133"></path></svg>

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

@@ -0,0 +1 @@
+<?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="1744336037741" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="21046" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M449.194667 82.346667a128 128 0 0 1 125.610666 0l284.16 160a128 128 0 0 1 65.194667 111.530666v316.245334a128 128 0 0 1-65.194667 111.530666l-284.16 160a128 128 0 0 1-125.610666 0l-284.16-160a128 128 0 0 1-65.194667-111.530666V353.877333A128 128 0 0 1 165.034667 242.346667z m83.754666 74.410666a42.666667 42.666667 0 0 0-41.898666 0L206.933333 316.714667a42.666667 42.666667 0 0 0-21.76 37.162666v316.245334a42.666667 42.666667 0 0 0 21.76 37.162666l284.16 160a42.666667 42.666667 0 0 0 41.898667 0l284.16-160a42.666667 42.666667 0 0 0 21.76-37.162666V353.877333a42.666667 42.666667 0 0 0-21.76-37.162666zM512 341.333333a170.666667 170.666667 0 1 1 0 341.333334 170.666667 170.666667 0 0 1 0-341.333334z m0 85.333334a85.333333 85.333333 0 1 0 0 170.666666 85.333333 85.333333 0 0 0 0-170.666666z" fill="#111824" p-id="21047"></path></svg>

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

@@ -0,0 +1 @@
+<?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="1744353577514" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2328" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M512 938.666667c235.648 0 426.666667-191.018667 426.666667-426.666667S747.648 85.333333 512 85.333333 85.333333 276.352 85.333333 512s191.018667 426.666667 426.666667 426.666667z m0 85.333333C229.248 1024 0 794.752 0 512S229.248 0 512 0s512 229.248 512 512-229.248 512-512 512z" fill="#667085" p-id="2329"></path><path d="M520.96 232.106667c-62.293333 0-111.786667 17.92-147.626667 54.613333-36.693333 35.84-54.613333 84.48-54.613333 146.773333h90.453333c0-37.546667 7.68-67.413333 23.04-87.893333 17.066667-23.893333 45.226667-35.84 83.626667-35.84 30.72 0 54.613333 8.533333 71.68 25.6 16.213333 17.066667 24.746667 40.106667 24.746667 69.973333 0 22.186667-7.68 42.666667-23.04 62.293334l-14.506667 16.213333c-52.906667 46.933333-85.333333 81.92-97.28 105.813333-11.093333 22.186667-16.213333 49.493333-16.213333 81.066667v14.506667h91.306666v-14.506667c0-21.333333 4.266667-40.106667 13.653334-57.173333 7.68-15.36 19.626667-29.866667 34.986666-43.52 40.96-34.986667 64.853333-57.173333 72.533334-66.56 20.48-27.306667 31.573333-62.293333 31.573333-104.106667 0-51.2-17.066667-92.16-50.346667-122.026667-34.133333-30.72-78.506667-45.226667-133.973333-45.226666z m-14.506667 499.2c-17.92 0-32.426667 5.12-43.52 17.066666-12.8 11.093333-18.773333 25.6-18.773333 43.52 0 17.066667 5.973333 31.573333 18.773333 43.52 11.093333 11.946667 25.6 17.92 43.52 17.92 17.066667 0 32.426667-5.973333 45.226667-17.066666 11.946667-11.946667 17.92-26.453333 17.92-44.373334 0-17.92-5.973333-32.426667-17.92-43.52-11.946667-11.946667-27.306667-17.066667-45.226667-17.066666z" fill="#667085" p-id="2330"></path></svg>

+ 673 - 22
src/components/pages/knowledge/components/testBox.vue

@@ -1,43 +1,191 @@
 <template>
     <div class="testBox">
         <div class="test_right">
-            <div class="test_input_box">
+            <div class="test_input_box" :class="{focus: isFocused}">
+                <div class="setting">
+                    <el-tooltip content="知识库搜索配置" placement="bottom" effect="dark">
+                        <!-- content to trigger tooltip here -->
+                        <i @click="openSetting"></i>
+                        <!-- <span>知识库搜索配置</span> -->
+                    </el-tooltip>
+                </div>
                 <el-input class="test_input" type="textarea" :rows="8" v-model="value" placeholder="输入需要测试的文本"
-                    resize="none">
+                    resize="none" @focus="isFocused = true" @blur="isFocused = false">
                 </el-input>
-                <el-button type="primary" size="small" @click="testCheck" v-loading="isLoading">测试</el-button>
+                <el-button class="btn" type="primary" size="mini" @click="testCheck"
+                    v-loading="isLoading">测试</el-button>
             </div>
 
-            <div class="test_history">
+            <div class="test_history" v-loading="isLoading2">
                 <div class="title">测试记录</div>
-                <div class="test_history_box" v-for="item in 100" :key="item">{{ item }}</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="{
+                        type1: item.setting.useType == 1,
+                        type2: item.setting.useType == 2,
+                        type3: item.setting.useType == 3,
+                    }">
+                        {{ getUseType(item.setting.useType) }}
+                    </div>
+                    <div class="query">{{ item.setting.query }}</div>
+                    <div class="time">{{ item.time }}</div>
+                    <div class="del" @click.stop="deleteRag(item.id)"></div>
+                </div>
             </div>
         </div>
         <div class="test_left">
-            <div class="test_check">
+            <div class="test_check" v-if="Object.keys(ragJson).length">
                 <div class="title">测试参数</div>
+                <div class="can_box">
+                    <div class="can_one" v-if="ragJson.setting">
+                        <div class="one_box">
+                            <span>搜索方式</span>
+                            <span class="typeIcon" :class="{
+                                type1: ragJson.setting.useType == 1,
+                                type2: ragJson.setting.useType == 2,
+                                type3: ragJson.setting.useType == 3,
+                            }">{{ getUseType(ragJson.setting.useType) }}</span>
+                        </div>
+                        <div class="one_box">
+                            <span>引用上限</span>
+                            <span>{{ ragJson.setting.tokens }}</span>
+                        </div>
+                        <div class="one_box">
+                            <span>最低相关度</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>测试文本</span>
+                            <span>{{ ragJson.setting.query }}</span>
+                        </div>
+                    </div>
+                </div>
             </div>
-            <div class="test_result">
+            <div class="test_result" v-if="Object.keys(ragJson).length">
                 <div class="title">测试结果</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="通过计算向量之间的距离获取得分,范围为0~1。" placement="bottom" effect="dark">
+                            <div class="result_score">
+                                {{ getUseType(ragJson.setting.useType) }}
+                                {{ item.score.toFixed(4) }}
+                            </div>
+                        </el-tooltip>
+
+                        <div class="vditor-reset" v-html="MarkdownT(item.text)"></div>
+                        <el-tooltip content="点击查看来源" placement="bottom" effect="dark">
+                            <div class="result_file" @click="downloadFile(item.documentId, item.metadata.title)">
+                                {{ item.metadata.title }}
+                            </div>
+                        </el-tooltip>
+                    </div>
+                </div>
+            </div>
+            <div class="customC" v-if="!Object.keys(ragJson).length">
+                <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">测试结果将在这里展示</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>知识库搜索配置</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>搜索过滤</span>
+                    </div>
+                </div>
+                <div class="setting_serach">
+                    <div class="setting_serach_box">
+                        <span class="title">引用上限
+                            <el-tooltip content="单次搜索最大的 token 数量,中文约1字=1.7tokens,英文约1字=1token" 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.tokens" :min="100" :max="20000" :step="1"
+                            :vertical="false"></el-slider>
+                        <el-input-number class="number" controls-position="right" v-model="json.tokens" size="small"
+                            min="100" max="20000" step="1"></el-input-number>
+                    </div>
+                    <div class="setting_serach_box">
+                        <span class="title">最低相关度
+                            <el-tooltip content="不同索引模型的相关度有区别,请通过搜索测试来选择合适的数值。使用 结果重排 时,使用重排结果进行过滤。" 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>
+                    </div>
+                </div>
+            </div>
+            <span slot="footer">
+                <el-button @click="moveBox = false">取 消</el-button>
+                <el-button type="primary" @click="confirmSetting">确 定</el-button>
+            </span>
+        </el-dialog>
     </div>
 </template>
 
 <script>
+import MarkdownIt from "markdown-it";
 export default {
     data() {
         return {
+            isFocused: "",
             value: "",
-            isLoading: false
-        }
+            isLoading: false,
+            isLoading2: false,
+            ragArray: [],
+            ragJson: {},
+            moveBox: false,
+            tokens: 1500,
+            temperature: 0,
+            json: {
+                temperature: 0,
+                tokens: 1500,
+            }
+        };
     },
     props: {
         userid: {
-            type: String
+            type: String,
         },
         folderid: {
-            type: String
+            type: String,
+        },
+    },
+    computed: {
+        MarkdownT() {
+            return function (c) {
+                let md = new MarkdownIt({
+                    html: true, // 允许渲染 HTML
+                    // linkify: true, // 自动将URL链接转化为可点击链接
+                    typographer: true, // 启用排版规则(如替换 `"` 为 “)
+                });
+                return c ? md.render(c) : "";
+            };
+        },
+        getUseType() {
+            return function (e) {
+                if (e == 1) {
+                    return "语义检索";
+                } else if (e == 2) {
+                    return "全文检索";
+                } else if (e == 2) {
+                    return "混合检索";
+                }
+            };
         },
     },
     methods: {
@@ -49,25 +197,130 @@ export default {
                 query: this.value,
                 type: 2,
                 useType: 1,
-                fullTextWeight: 5,
+                fullTextWeight: 1,
                 semanticWeight: 5,
                 limit: 10,
-                temperature: 0,
-                tokens: 1500,
+                temperature: this.temperature,
+                tokens: this.tokens,
             };
             this.ajax
                 .post(this.$store.state.fileApi + "ragFolder", [params])
                 .then((res) => {
                     this.isLoading = false;
+                    this.getRagData();
                     console.log(res);
                 })
                 .catch((err) => {
                     this.isLoading = false;
                     console.error(err);
                 });
+        },
+        getRagData() {
+            this.isLoading2 = true;
+            let params = {
+                userid: this.userid,
+                fid: this.folderid,
+            };
+            this.ajax
+                .post(this.$store.state.fileApi + "getRagData", [params])
+                .then((res) => {
+                    this.isLoading2 = false;
+                    console.log(res);
+                    this.ragArray = res.data[0];
+                    for (var i = 0; i < this.ragArray.length; i++) {
+                        this.ragArray[i].setting = JSON.parse(this.ragArray[i].setting);
+                        this.ragArray[i].json = JSON.parse(this.ragArray[i].json);
+                    }
+                    if (this.ragArray.length) {
+                        this.ragJson = this.ragArray[0];
+                        this.ragJson.setting = this.ragJson.setting;
+                        this.ragJson.json = this.ragJson.json;
+                    }
+                })
+                .catch((err) => {
+                    this.isLoading2 = false;
+                    console.error(err);
+                });
+        },
+        downloadFile(id, rname) {
+            let params = {
+                documentid: id,
+                filename: rname,
+            };
+            // 使用axios发送GET请求下载文件
+            this.ajax
+                .post(`${this.$store.state.fileApi}downloadFile2`, [params], {
+                    responseType: "blob",
+                })
+                .then((response) => {
+                    const url = window.URL.createObjectURL(new Blob([response.data]));
+                    const link = document.createElement("a");
+                    link.href = url;
+                    link.setAttribute("download", rname); // 设置下载文件名
+                    document.body.appendChild(link);
+                    link.click();
+                    link.remove();
+                    this.$message({
+                        message: "下载成功",
+                        type: "success",
+                    });
+                })
+                .catch((err) => {
+                    this.$message.error("下载失败");
+                    console.error(err);
+                });
+        },
+        checkRag(item) {
+            if (item.id == this.ragJson.id) {
+                return;
+            }
+            this.ragJson = item;
+        },
+        deleteRag(id) {
+            this.$confirm("确定删除该记录嘛?", "提示", {
+                confirmButtonText: "确定",
+                cancelButtonText: "取消",
+                type: "warning",
+            })
+                .then(() => {
+                    let params = [
+                        {
+                            id: id,
+                        },
+                    ];
+                    this.ajax
+                        .post(this.$store.state.fileApi + "delRagData", params)
+                        .then((res) => {
+                            this.$message({
+                                message: "删除成功",
+                                type: "success",
+                            });
+                            this.getRagData();
+                        })
+                        .catch((err) => {
+                            this.$message.error("删除失败");
+                            console.error(err);
+                        });
+                })
+                .catch(() => { });
+        },
+        openSetting() {
+            this.json = JSON.parse(JSON.stringify({
+                tokens: this.tokens,
+                temperature: this.temperature
+            }));
+            this.moveBox = true;
+        },
+        confirmSetting() {
+            this.tokens = this.json.tokens
+            this.temperature = this.json.temperature
+            this.moveBox = false;
         }
     },
-}
+    mounted() {
+        this.getRagData();
+    },
+};
 </script>
 
 <style scoped>
@@ -76,6 +329,7 @@ export default {
     gap: 20px;
     height: 100%;
     overflow: hidden;
+    padding: 10px 24px;
 }
 
 .testBox .test_right {
@@ -88,17 +342,59 @@ export default {
     gap: 10px;
 }
 
-.testBox .test_right .test_input_box {}
+.testBox .test_right .test_input_box {
+    position: relative;
+    display: flex;
+    flex-direction: column;
+    /* gap: 5px; */
+    padding: 5px;
+    border-radius: 5px;
+    box-sizing: border-box;
+    border: 2px solid #94b5ff;
+    margin: 2.4px;
+    transition: all .3s;
+}
+
+.testBox .test_right .test_input_box>.setting {
+    margin-left: auto;
+    display: flex;
+    align-items: center;
+    /* color: #667085;
+    font-size: 14px; */
+}
+
+.test_input_box.focus {
+    border-color: #487fff !important;
+    box-shadow: rgba(51, 112, 255, 0.15) 0px 0px 0px 2.4px;
+}
+
+.testBox .test_right .test_input_box>.setting i {
+    display: block;
+    width: 18px;
+    height: 18px;
+    cursor: pointer;
+    background-image: url(../../../../assets/icon/testC/test_setting.svg);
+    background-size: 100% 100%;
+}
 
 .testBox .test_right .test_input_box .test_input {}
 
+.testBox .test_right .test_input_box .test_input>>>.el-textarea__inner {
+    border: none;
+    padding: 5px;
+}
+
+.testBox .test_right .test_input_box>.btn {
+    margin-left: auto;
+}
+
 .testBox .test_right .test_input_box>>>.el-button {
-    height: 35px !important;
+    height: 30px !important;
     font-size: 12.8px;
-    background-color: #3370FF;
+    background-color: #3370ff;
     border-radius: 6px;
-    margin-left: 12px;
-    border:none;
+    /* margin-left: 12px; */
+    border: none;
 }
 
 .testBox .test_right .test_input_box>>>.el-button--primary:focus,
@@ -111,9 +407,81 @@ export default {
     overflow: auto;
 }
 
-.testBox .test_right .test_history>.title {}
+.testBox .test_right .test_history>.title {
+    display: flex;
+    align-items: center;
+    margin-bottom: 8px;
+    font-size: 16px;
+}
+
+.testBox .test_right .test_history>.title:before {
+    content: "";
+    width: 16px;
+    height: 16px;
+    margin-right: 5px;
+    background-image: url(../../../../assets/icon/testC/test_history.svg);
+    background-size: 100% 100%;
+}
+
+.testBox .test_right .test_history>.test_history_box {
+    display: flex;
+    font-size: 14px;
+    align-items: center;
+    padding: 5px 12px;
+    box-sizing: border-box;
+    width: 100%;
+    color: #667085;
+    border-radius: 8px;
+    border: 1px solid #e8ebf0;
+    cursor: pointer;
+}
+
+.test_history_box.acitve {
+    background: #f0f4ff;
+}
+
+.testBox .test_right .test_history>.test_history_box+.test_history_box {
+    margin-top: 8px;
+}
+
+.testBox .test_right .test_history>.test_history_box:hover {
+    border: 1px solid #94b5ff;
+}
+
+.testBox .test_right .test_history>.test_history_box:hover .time {
+    display: none;
+}
+
+.testBox .test_right .test_history>.test_history_box:hover .del {
+    display: block;
+}
+
+.testBox .test_right .test_history>.test_history_box>.typeIcon {
+    min-width: fit-content;
+}
+
+.testBox .test_right .test_history>.test_history_box>.query {
+    margin: 5px;
+    white-space: nowrap;
+    overflow: hidden;
+    flex: 1;
+    text-overflow: ellipsis;
+}
+
+.testBox .test_right .test_history>.test_history_box>.time {
+    margin-left: auto;
+    min-width: fit-content;
+}
 
-.testBox .test_right .test_history>.test_history_box {}
+.testBox .test_right .test_history>.test_history_box>.del {
+    margin-left: auto;
+    cursor: pointer;
+    width: 14px;
+    height: 14px;
+    background-image: url("../../../../assets/icon/testC/del.svg");
+    background-size: 100% 100%;
+    display: none;
+}
 
 .testBox .test_left {
     width: 100%;
@@ -121,4 +489,287 @@ export default {
     height: 100%;
     overflow: auto;
 }
+
+.testBox .test_left .test_check {}
+
+.testBox .test_left .test_check .title {
+    display: flex;
+    align-items: center;
+    margin-bottom: 10px;
+    font-size: 16px;
+}
+
+.testBox .test_left .test_check .title:before {
+    content: "";
+    width: 16px;
+    height: 16px;
+    margin-right: 8px;
+    background-image: url(../../../../assets/icon/testC/test_can.svg);
+    background-size: 100% 100%;
+}
+
+.can_box {
+    width: 100%;
+    overflow: auto;
+    background: #f0f4ff;
+    border: 1px solid #e2e8f0;
+    border-radius: 10px;
+    padding: 15px 20px;
+    box-sizing: border-box;
+}
+
+.can_one {
+    display: flex;
+    justify-content: space-between;
+    width: 100%;
+    /* height: 60px; */
+}
+
+.one_box {
+    font-size: 14px;
+    display: flex;
+    flex-direction: column;
+    justify-content: space-evenly;
+    min-width: fit-content;
+}
+
+.one_box+.one_box {
+    margin-left: 20px;
+}
+
+.one_box>span:nth-child(1) {
+    color: #4a5568;
+    font-weight: bold;
+}
+
+.one_box>span:nth-child(2) {
+    font-weight: 400;
+    color: #1d2532;
+    word-break: break-all;
+    margin-top: 5px;
+}
+
+.testBox .test_left .test_result {
+    margin-top: 20px;
+}
+
+.testBox .test_left .test_result .title {
+    display: flex;
+    align-items: center;
+    margin-bottom: 10px;
+    font-size: 16px;
+}
+
+.testBox .test_left .test_result .title:before {
+    content: "";
+    width: 16px;
+    height: 16px;
+    margin-right: 8px;
+    background-image: url(../../../../assets/icon/testC/test_result.svg);
+    background-size: 100% 100%;
+}
+
+.typeIcon {
+    display: flex;
+    align-items: center;
+}
+
+.type1:before {
+    content: "";
+    width: 14px;
+    height: 14px;
+    margin-right: 5px;
+    background-image: url(../../../../assets/icon/testC/m_icon.svg);
+    background-size: 100% 100%;
+}
+
+.result_box {
+    width: 100%;
+}
+
+.result_box>.result {
+    background: #f4f4f7;
+    border-radius: 10px;
+    width: 100%;
+    padding: 10px;
+    box-sizing: border-box;
+}
+
+.result_box>.result+.result {
+    margin-top: 10px;
+}
+
+.result_box>.result .result_score {
+    font-size: 14px;
+    width: fit-content;
+    border-radius: 7px;
+    padding: 5px 12px;
+    color: #2b5fd9;
+    background: #f0f4ff;
+    border: 1px solid #c5d7ff;
+    margin-bottom: 10px;
+}
+
+.result_file {
+    font-size: 14px;
+    margin-top: 10px;
+    font-weight: bold;
+    text-decoration: underline;
+    cursor: pointer;
+    width: fit-content;
+}
+
+.customC {
+    height: 100%;
+    width: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    color: #667085;
+    flex-direction: column;
+}
+
+.canEditTit {
+    display: flex;
+    justify-content: flex-start;
+    align-items: center;
+}
+
+.canEditTit img {
+    width: 25px;
+    margin-right: 10px;
+}
+
+.canEditCss>>>.el-dialog__body {
+    padding: 10px 20px;
+}
+
+.canEditCss>>>.el-dialog__header {
+    background-color: rgb(251, 251, 252);
+    border-radius: 8px 8px 0 0;
+    font-family: Pingfang;
+    border-bottom: 0.5px rgb(244, 246, 248) solid;
+}
+
+.canEditCss>>>.el-dialog {
+    border-radius: 8px;
+    width: 600px !important;
+}
+
+.setting_nav {
+    display: flex;
+    /* border-bottom: 1px solid #E2E8F0; */
+    height: 30px;
+    margin-bottom: 20px;
+    /* justify-content: flex-start; */
+}
+
+.setting_nav_box {
+    display: flex;
+    height: 100%;
+    width: calc(100% / 3);
+    align-items: center;
+    /* flex: 1; */
+    color: #485264;
+    justify-content: center;
+    font-size: 16px;
+    border-bottom: 1px solid #E2E8F0;
+    cursor: pointer;
+}
+
+.setting_nav_box::before {
+    content: '';
+    background-size: 100%;
+    margin-right: 5px;
+    width: 16px;
+    height: 16px;
+    display: block;
+}
+
+.setting_nav_box:hover,
+.setting_nav_box.active {
+    color: #3370ff;
+    border-color: #3370ff;
+}
+
+.searchIcon::before {
+    background-image: url(../../../../assets/icon/testC/search.svg);
+}
+
+.setting_nav_box:hover.searchIcon::before,
+.setting_nav_box.active.searchIcon::before {
+    background-image: url(../../../../assets/icon/testC/search2.svg);
+}
+
+.setting_serach {
+    width: 100%;
+}
+
+.setting_serach_box {
+    width: 100%;
+    display: flex;
+    align-items: center;
+    color: #111824;
+    gap: 15px;
+}
+
+.setting_serach_box .title {
+    display: flex;
+    flex: 0 0 120px;
+    -webkit-box-align: center;
+    align-items: center;
+}
+
+.setting_serach_box .slider {
+    flex: 1;
+}
+.setting_serach_box .slider  >>> .el-slider__bar{
+    background: unset;
+}
+.setting_serach_box .slider  >>> .el-slider__button {
+    border-color: #3370ff;
+}
+.setting_serach_box .number {
+    flex: 0 0 120px;
+}
+
+.setting_serach_box+.setting_serach_box {
+    margin-top: 30px;
+}
+
+.tips{
+    display: block;
+    background-image: url(../../../../assets/icon/testC/test_tips.svg);
+    background-size: 100% 100%;
+    height: 14px;
+    width: 14px;
+    margin-left: 5px;
+}
+
+@media screen and (max-width: 1300px) {
+  .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;
+  }
+}
+
+</style>
+
+<style>
+.maxWidth{
+    max-width: 240px;
+    word-break: break-all;
+}
 </style>

+ 3 - 3
src/components/pages/knowledge/folderDetail.vue

@@ -618,7 +618,7 @@ export default {
   border-radius: 8px;
   box-sizing: border-box;
   display: flex;
-  gap: 8px;
+  gap: 16px;
 }
 
 .f_box_top {
@@ -627,7 +627,7 @@ export default {
   padding: 24px;
   flex-shrink: 0;
   box-sizing: border-box;
-  height: 100%;
+  height: calc(100% - 24px);
   border-radius: 8px;
   background-color: #fff;
   box-sizing: border-box;
@@ -640,7 +640,7 @@ export default {
   flex-direction: column !important;
   background-color: #fff;
   border-radius: 8px;
-  padding: 24px;
+  padding: 0 0 24px;
 }
 .t_title{
   display: flex;

+ 75 - 64
src/components/pages/knowledge/folderFileBox.vue

@@ -8,75 +8,74 @@
         </el-breadcrumb>
       <!-- <div class="f_box_top_title">文件</div> -->
       </div>
-      <div class="f_box_top_center" v-show="false">
+      <div class="f_box_top_center">
         <span :class="{active: fileType == 1}" @click="checkType(1)">文件数据</span>
         <span :class="{active: fileType == 2}" @click="checkType(2)">召回测试</span>
       </div>
-      <div class="f_box_top_right" v-if="fileType == 1">
-
-        <div class="input">
-          <input
-            type="text"
-            v-model="fileName"
-            placeholder="请输入你需要搜索的文件名字"
-            @input="debouncedSearch"
-          />
-          <div class="serch"></div>
-        </div>
+    </div>
+    <div class="f_box_top_right" v-if="fileType == 1">
+
+      <div class="input">
+        <input
+          type="text"
+          v-model="fileName"
+          placeholder="请输入你需要搜索的文件名字"
+          @input="debouncedSearch"
+        />
+        <div class="serch"></div>
+      </div>
 
-        <el-button type="primary" size="small" @click="serchFile"
-          >
-          <img style="vertical-align: middle;transform: scale(1.1);padding-bottom: 2px;box-sizing: border-box;" src="../../../assets/shuax.svg" alt="">
-          刷新</el-button
+      <el-button type="primary" size="small" @click="serchFile"
         >
-        <el-button v-if="userid == data.userid" type="primary" icon="el-icon-plus" size="small" @click="addImg($event)"
-          >上传文件
-          <input
-            type="file"
-            accept="*"
-            style="display: none"
-            multiple="multiple"
-            @change="beforeUpload($event)"
-        /></el-button>
-        <el-button
-          type="primary"
-          size="small"
-          @click="openG"
-          v-if="userid == data.userid && data.isMo == '2'"
-          >
-          <img style="vertical-align: middle;" src="../../../assets/ETL.svg" alt="">
-          关联文件</el-button
+        <img style="vertical-align: middle;transform: scale(1.1);padding-bottom: 2px;box-sizing: border-box;" src="../../../assets/shuax.svg" alt="">
+        刷新</el-button
+      >
+      <el-button v-if="userid == data.userid" type="primary" icon="el-icon-plus" size="small" @click="addImg($event)"
+        >上传文件
+        <input
+          type="file"
+          accept="*"
+          style="display: none"
+          multiple="multiple"
+          @change="beforeUpload($event)"
+      /></el-button>
+      <el-button
+        type="primary"
+        size="small"
+        @click="openG"
+        v-if="userid == data.userid && data.isMo == '2'"
         >
+        <img style="vertical-align: middle;" src="../../../assets/ETL.svg" alt="">
+        关联文件</el-button
+      >
 
-        <el-button type="primary"  v-if="checkArray.length && userid == data.userid " size="small" @click="batchRemove"
-          >
-          <img style="vertical-align: middle;padding-bottom: 3px;" src="../../../assets/yichuBtn.svg" alt="">
-          移除</el-button
+      <el-button type="primary"  v-if="checkArray.length && userid == data.userid " size="small" @click="batchRemove"
         >
-        <el-button type="danger" style="background: #F56C6C;" v-if="checkArray.length && userid == data.userid " size="small" @click="batchDelete"
-          >
-          <img style="vertical-align: middle;padding-bottom: 3px;" src="../../../assets/delBtn.svg" alt="">
-          删除</el-button
+        <img style="vertical-align: middle;padding-bottom: 3px;" src="../../../assets/yichuBtn.svg" alt="">
+        移除</el-button
+      >
+      <el-button type="danger" style="background: #F56C6C;" v-if="checkArray.length && userid == data.userid " size="small" @click="batchDelete"
         >
-        <div v-if="checkArray.length" style="margin-left: 12px;color: #b0b0b0;font-size: 14px;flex-shrink: 0;line-height: 35px;">已选文件{{checkArray.length}}个</div>
-
-        <!-- <div class="btn" @click="serchFile">刷新</div>
-        <div class="btn" @click="addImg($event)">
-          上传文件
-          <input
-            type="file"
-            accept="*"
-            style="display: none"
-            multiple="multiple"
-            @change="beforeUpload($event)"
-          />
-        </div> -->
-        <!-- <div class="btn" @click="openG" v-if="userid == data.userid && data.isMo == '2'">关联文件</div>
-        <div class="btn" @click="batchRemove">移除</div>
-        <div class="btn delBtn" @click="batchDelete">删除</div> -->
+        <img style="vertical-align: middle;padding-bottom: 3px;" src="../../../assets/delBtn.svg" alt="">
+        删除</el-button
+      >
+      <div v-if="checkArray.length" style="margin-left: 12px;color: #b0b0b0;font-size: 14px;flex-shrink: 0;line-height: 35px;">已选文件{{checkArray.length}}个</div>
+
+      <!-- <div class="btn" @click="serchFile">刷新</div>
+      <div class="btn" @click="addImg($event)">
+        上传文件
+        <input
+          type="file"
+          accept="*"
+          style="display: none"
+          multiple="multiple"
+          @change="beforeUpload($event)"
+        />
+      </div> -->
+      <!-- <div class="btn" @click="openG" v-if="userid == data.userid && data.isMo == '2'">关联文件</div>
+      <div class="btn" @click="batchRemove">移除</div>
+      <div class="btn delBtn" @click="batchDelete">删除</div> -->
       </div>
-    </div>
-
     <!-- <div class="f_box_top">
       <div class="f_box_top_left"></div>
       <div class="f_box_top_right">
@@ -283,7 +282,7 @@
         </div>
       </div>
     </div>
-    <testBox v-show="fileType == 2" :userid="userid" :folderid="folderid"></testBox>
+    <testBox v-if="fileType == 2" :userid="userid" :folderid="folderid"></testBox>
     <wpdf :dialogVisiblePdf.sync="dialogVisiblePdf" :url="wurl"></wpdf>
     <wVideo :dialogVisibleVideo.sync="dialogVisibleVideo" :url="wurl"></wVideo>
     <wOffice
@@ -839,10 +838,15 @@ export default {
 .f_box_top {
   display: flex;
   align-items: center;
-  padding: 10px 0 12px;
+  padding: 10px 0 0;
   padding-top: 0px;
   width: 100%;
   box-sizing: border-box;
+  position: relative;
+  height: 50px;
+  min-height: 50px;
+  border-bottom: 1px solid #E8EBF0;
+  padding: 0 24px;
 }
 
 .f_box_top_left {
@@ -902,11 +906,12 @@ export default {
   overflow: hidden;
   display: flex;
   /* align-items: center; */
+  padding: 0 24px;
 }
 
 .f_box_top_right > .input {
   position: relative;
-  height: 40px;
+  /* height: 40px; */
 }
 .f_box_top_right >>> .el-button{
   height: 35px !important;
@@ -1136,10 +1141,11 @@ export default {
   /* height: calc(100% - 55px); */
   /* overflow: auto; */
   width: 100%;
-  padding: 10px 0;
+  /* padding: 10px 0; */
   padding-top: 0;
   box-sizing: border-box;
   position: relative;
+  padding: 0 24px;
 }
 
 .f_box_file_list > .f_box_file {
@@ -1573,10 +1579,14 @@ export default {
   margin: auto;
   display: flex;
   align-items: center;
+  position: absolute;
+  top: 50%;
+  left: 50%;
+  transform: translate(-50%, -50%);
 }
 
 .f_box_top_center > span{
-  font-size: 14px;
+  font-size: 16px;
   cursor: pointer;
   padding: 6px 8px;
   color: #1A202C;
@@ -1590,5 +1600,6 @@ export default {
 .f_box_top_center > span.active{
   color: #2B5FD9;
 }
+
 </style>
 

この差分においてかなりの量のファイルが変更されているため、一部のファイルを表示していません