奇橙 hai 1 ano
pai
achega
7dac2f8715

BIN=BIN
dist.zip


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
dist/assets/Knowledge-BDtUkzH8.js


+ 1 - 1
dist/assets/Login-C033wflh.js → dist/assets/Login-Qq6jm70S.js

@@ -1 +1 @@
-import{_ as g}from"./login-VH6pjdPe.js";import{_,d as f,f as r,o as w,c as h,b as o,g as p,r as u,i as k,p as v,l as V}from"./index-BNYXFgmN.js";const $=f({components:{},props:[],setup(){const{ajax:e,helper:s}=k("$global"),a=u("user"),i=u("123");return{login:async()=>{const t=await e.user.login(a.value,i.value);t&&(s.write("userName",t.nickname||t.username),s.write("token",t.access_token),s.goLink("/"))},username:a,password:i,goRegister:()=>{s.goLink("register")}}}}),l=e=>(v("data-v-2f95801b"),e=e(),V(),e),b=l(()=>o("header",null,[o("img",{src:g}),o("p",null,"欢迎使用")],-1)),y=l(()=>o("p",null,"账号登录",-1)),C=l(()=>o("p",null,"账号",-1)),I=l(()=>o("p",null,"密码",-1));function R(e,s,a,i,d,c){const t=r("a-input"),m=r("a-input-password");return w(),h("main",null,[o("section",null,[b,y,o("section",null,[C,o("div",null,[p(t,{placeholder:"请输入手机号",style:{width:"250px",height:"40px"},modelValue:e.username,"onUpdate:modelValue":s[0]||(s[0]=n=>e.username=n)},null,8,["modelValue"])])]),o("section",null,[I,o("div",null,[p(m,{placeholder:"请输入手机号",style:{width:"250px",height:"40px"},modelValue:e.password,"onUpdate:modelValue":s[1]||(s[1]=n=>e.password=n)},null,8,["modelValue"])])]),o("section",null,[o("p",{style:{cursor:"pointer"},onClick:s[2]||(s[2]=(...n)=>e.goRegister&&e.goRegister(...n))},"去注册")]),o("div",{onClick:s[3]||(s[3]=(...n)=>e.login&&e.login(...n))},"登录")])])}const N=_($,[["render",R],["__scopeId","data-v-2f95801b"]]);export{N as default};
+import{_ as g}from"./login-VH6pjdPe.js";import{_,d as f,f as r,o as w,c as h,b as o,g as p,r as u,i as k,p as v,l as V}from"./index-BgP2Zkvd.js";const $=f({components:{},props:[],setup(){const{ajax:e,helper:s}=k("$global"),a=u("user"),i=u("123");return{login:async()=>{const t=await e.user.login(a.value,i.value);t&&(s.write("userName",t.nickname||t.username),s.write("token",t.access_token),s.goLink("/"))},username:a,password:i,goRegister:()=>{s.goLink("register")}}}}),l=e=>(v("data-v-2f95801b"),e=e(),V(),e),b=l(()=>o("header",null,[o("img",{src:g}),o("p",null,"欢迎使用")],-1)),y=l(()=>o("p",null,"账号登录",-1)),C=l(()=>o("p",null,"账号",-1)),I=l(()=>o("p",null,"密码",-1));function R(e,s,a,i,d,c){const t=r("a-input"),m=r("a-input-password");return w(),h("main",null,[o("section",null,[b,y,o("section",null,[C,o("div",null,[p(t,{placeholder:"请输入手机号",style:{width:"250px",height:"40px"},modelValue:e.username,"onUpdate:modelValue":s[0]||(s[0]=n=>e.username=n)},null,8,["modelValue"])])]),o("section",null,[I,o("div",null,[p(m,{placeholder:"请输入手机号",style:{width:"250px",height:"40px"},modelValue:e.password,"onUpdate:modelValue":s[1]||(s[1]=n=>e.password=n)},null,8,["modelValue"])])]),o("section",null,[o("p",{style:{cursor:"pointer"},onClick:s[2]||(s[2]=(...n)=>e.goRegister&&e.goRegister(...n))},"去注册")]),o("div",{onClick:s[3]||(s[3]=(...n)=>e.login&&e.login(...n))},"登录")])])}const N=_($,[["render",R],["__scopeId","data-v-2f95801b"]]);export{N as default};

+ 1 - 1
dist/assets/Register-uFw-t5f1.js → dist/assets/Register-C1ysCMcq.js

@@ -1 +1 @@
-import{_}from"./login-VH6pjdPe.js";import{_ as g,d as f,f as p,o as h,c as w,b as s,g as i,r as d,i as v,p as V,l as b}from"./index-BNYXFgmN.js";const $=f({components:{},props:[],setup(){const{ajax:e,helper:o}=v("$global"),l=d(""),a=d("");return{register:async()=>{const r=await e.user.register(l.value,a.value);r&&(o.write("userName",String(r.username)),o.goLink("/login"))},username:l,password:a}}}),t=e=>(V("data-v-b8d3c93b"),e=e(),b(),e),k=t(()=>s("header",null,[s("img",{src:_}),s("p",null,"欢迎使用")],-1)),y=t(()=>s("p",null,"账号注册",-1)),I=t(()=>s("p",null,"账号",-1)),S=t(()=>s("p",null,"密码",-1));function B(e,o,l,a,u,r){const c=p("a-input"),m=p("a-input-password");return h(),w("main",null,[s("section",null,[k,y,s("section",null,[I,s("div",null,[i(c,{placeholder:"请输入账号",style:{width:"250px",height:"40px"},modelValue:e.username,"onUpdate:modelValue":o[0]||(o[0]=n=>e.username=n)},null,8,["modelValue"])])]),s("section",null,[S,s("div",null,[i(m,{type:"password",placeholder:"请输入密码",style:{width:"250px",height:"40px"},modelValue:e.password,"onUpdate:modelValue":o[1]||(o[1]=n=>e.password=n)},null,8,["modelValue"])])]),s("div",{onClick:o[2]||(o[2]=(...n)=>e.register&&e.register(...n))},"注册")])])}const j=g($,[["render",B],["__scopeId","data-v-b8d3c93b"]]);export{j as default};
+import{_}from"./login-VH6pjdPe.js";import{_ as g,d as f,f as p,o as h,c as w,b as s,g as i,r as d,i as v,p as V,l as b}from"./index-BgP2Zkvd.js";const $=f({components:{},props:[],setup(){const{ajax:e,helper:o}=v("$global"),l=d(""),a=d("");return{register:async()=>{const r=await e.user.register(l.value,a.value);r&&(o.write("userName",String(r.username)),o.goLink("/login"))},username:l,password:a}}}),t=e=>(V("data-v-b8d3c93b"),e=e(),b(),e),k=t(()=>s("header",null,[s("img",{src:_}),s("p",null,"欢迎使用")],-1)),y=t(()=>s("p",null,"账号注册",-1)),I=t(()=>s("p",null,"账号",-1)),S=t(()=>s("p",null,"密码",-1));function B(e,o,l,a,u,r){const c=p("a-input"),m=p("a-input-password");return h(),w("main",null,[s("section",null,[k,y,s("section",null,[I,s("div",null,[i(c,{placeholder:"请输入账号",style:{width:"250px",height:"40px"},modelValue:e.username,"onUpdate:modelValue":o[0]||(o[0]=n=>e.username=n)},null,8,["modelValue"])])]),s("section",null,[S,s("div",null,[i(m,{type:"password",placeholder:"请输入密码",style:{width:"250px",height:"40px"},modelValue:e.password,"onUpdate:modelValue":o[1]||(o[1]=n=>e.password=n)},null,8,["modelValue"])])]),s("div",{onClick:o[2]||(o[2]=(...n)=>e.register&&e.register(...n))},"注册")])])}const j=g($,[["render",B],["__scopeId","data-v-b8d3c93b"]]);export{j as default};

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 5
dist/assets/index-BNYXFgmN.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 5 - 0
dist/assets/index-BgP2Zkvd.js


A diferenza do arquivo foi suprimida porque é demasiado grande
+ 0 - 0
dist/assets/index-_tY_RxH2.css


+ 2 - 2
dist/index.html

@@ -5,8 +5,8 @@
         <link rel="icon" href="/logo.svg" />
         <meta name="viewport" content="width=device-width, initial-scale=1.0" />
         <title>大模型系统</title>
-      <script type="module" crossorigin src="/assets/index-BNYXFgmN.js"></script>
-      <link rel="stylesheet" crossorigin href="/assets/index-eYtEQo7i.css">
+      <script type="module" crossorigin src="/assets/index-BgP2Zkvd.js"></script>
+      <link rel="stylesheet" crossorigin href="/assets/index-_tY_RxH2.css">
     </head>
     <body>
         <div id="app"></div>

+ 5 - 11
src/App.vue

@@ -3,15 +3,8 @@
     <section v-show="isLoading">
         <a-spin dot />
     </section>
-    <a-modal
-        v-model:visible="showMask"
-        :hide-cancel="true"
-        :simple="true"
-        :mask-closable="false"
-        ok-text="重试"
-        :title="maskTitle"
-        @ok="reload"
-    >
+    <a-modal v-model:visible="showMask" :hide-cancel="true" :simple="true" :mask-closable="false" ok-text="重试"
+        :title="maskTitle" @ok="reload">
     </a-modal>
 </template>
 <script>
@@ -26,7 +19,7 @@ export default defineComponent({
         const maskTitle = ref("");
         const showMask = ref(false);
         const { helper } = inject("$global");
-        let callbackFunc = () => {};
+        let callbackFunc = () => { };
         onMounted(() => {
             helper.$bus.on("set-loading", (value) => {
                 setTimeout(
@@ -64,6 +57,7 @@ export default defineComponent({
 .arco-modal-simple .arco-modal-header {
     margin-bottom: 0;
 }
+
 body {
     --primary-6: 59, 202, 168;
     --primary-5: 59 202 168 / 80%;
@@ -77,7 +71,7 @@ section {
     top: 0;
     bottom: 0;
     right: 0;
-    z-index: 1000;
+    z-index: 100000;
     display: flex;
     align-items: center;
     justify-content: center;

+ 1 - 1
src/ajax/request.js

@@ -3,7 +3,7 @@ import ArcoVue from "@arco-design/web-vue";
 import helper from "@/utils/helper";
 const service = axios.create({
   withCredentials: true, // 跨域发送 cookie
-  timeout: 10000, // 请求超时
+  timeout: 300000, // 请求超时
   headers: {
     "Content-Type": "application/json"
   }

+ 7 - 11
src/components/DialogWrap.vue

@@ -110,13 +110,6 @@
                             {{ item.answer }}
                         </p>
                     </div>
-                    <div v-if="dialogConfig.type === 'paper' && item.other" class="paper-download">
-                        <a-tooltip content="下载">
-                            <span>
-                                <icon-download />
-                            </span>
-                        </a-tooltip>
-                    </div>
                     <div v-if="type === 'knowledge' && item.other" class="knowledge-wrap">
                         <header>
                             <p>来源</p>
@@ -522,11 +515,14 @@ export default defineComponent({
                 loadingData.value = addLoading(data);
                 const sendData =
                     props.type === "report" || props.type === "excel"
-                        ? JSON.stringify(value)
-                        : JSON.stringify({
+                        ? value
+                        : {
                             message: value
-                        });
-                helper.webSocket.send(sendData);
+                        };
+                if (props.type === 'doc') {
+                    sendData.doc_ids = [helper.read('docId')];
+                }
+                helper.webSocket.send(JSON.stringify(sendData));
             });
             helper.$bus.on("clear-message", () => {
                 dialogList.splice(0);

+ 18 - 10
src/components/DocumentCards.vue

@@ -100,8 +100,10 @@
                         <div>
                             <a-button type="outline" style="margin-right: 10px"
                                 @click="selectFiles(false)">取消</a-button>
-                            <a-button type="primary" @click="selectFiles(true, 'paper')">去{{ uploadFile ? '提问' : '合并'
-                                }}({{ fileList.length
+                            <a-button :loading="buttonLoading" type="primary" @click="selectFiles(true, 'paper')">去{{
+                                uploadFile ? '提问'
+                                    : '合并'
+                            }}({{ fileList.length
                                 }})</a-button>
                         </div>
                     </div>
@@ -126,27 +128,32 @@ export default defineComponent({
         let formData = new FormData();
         const showDeleteTooltip = ref(false);
         const deleteId = ref("");
+        const buttonLoading = ref(false);
         const selectFiles = async (isSelect, type) => {
-            showUpload.value = false;
-            helper.dialogConfig = {
-                isQuestion: props.isQuestion,
-                selectedKeys: selectedKeys.value,
-                type
-            };
             if (isSelect) {
                 if (props.uploadFile) {
                     const data = await ajax.message.createDialog(props.agentId);
                     fileList.value.forEach(file => {
                         formData.append('file', file)
                     });
+                    buttonLoading.value = true;
                     const result = await ajax.file.uploadFile(props.agentId, data.chat_id, formData);
-                    console.log(result);
+                    showUpload.value = false;
+                    helper.dialogConfig = {
+                        isQuestion: props.isQuestion,
+                        selectedKeys: selectedKeys.value,
+                        type
+                    };
+                    buttonLoading.value = false;
+                    if (result) {
+                        helper.write('docId', result.doc_ids[0]);
+                    }
                 } else {
                     fileList.value.forEach(file => {
                         formData.append('files', file)
                     });
                     await ajax.file.uploadExcels(formData);
-                    helper.$bus.emit("open-dialog", '合并Excel文件');
+                    helper.$bus.emit("open-dialog", '合并Excel');
                 }
             }
 
@@ -231,6 +238,7 @@ export default defineComponent({
         const downloadDocument = (record) => { };
         const deleteDocument = () => { };
         return {
+            buttonLoading,
             fileList,
             selectedKeys,
             getAssetURL: helper.getAssetURL,

+ 1 - 1
src/views/Home.vue

@@ -114,7 +114,7 @@ export default defineComponent({
     },
     setup() {
         // nav对应的问答类型,4文库问答,对应的是knowledge类型
-        const dialogType = ["report", "excel", "normal", "normal", "normal", "normal", "normal", "normal"];
+        const dialogType = ["report", "excel", "normal", "doc", "normal", "normal", "normal", "normal"];
         const { config, helper, ajax } = inject("$global");
         const closeOthers = ref(false);
         const swiperNumber = ref(5);

Algúns arquivos non se mostraron porque demasiados arquivos cambiaron neste cambio