فهرست منبع

fix:智能数据优化

张涛 1 سال پیش
والد
کامیت
716966b44c

+ 1 - 1
dist/assets/Agent-0c335e37.js → dist/assets/Agent-f37ee6a7.js

@@ -1 +1 @@
-import{a4 as t}from"./index-7cd176a6.js";function s(a){return t.get("/api/v1/canvas/list",{params:a})}function e(){return t.get("/api/v1/llm/distinct",{})}function n(a){return t.get("/api/v1/conversation/app_usage")}function o(a){return t.post("/api/v1/conversation/app_usage/rm",a)}export{n as a,e as b,o as d,s as q};
+import{a4 as t}from"./index-6135d382.js";function s(a){return t.get("/api/v1/canvas/list",{params:a})}function e(){return t.get("/api/v1/llm/distinct",{})}function n(a){return t.get("/api/v1/conversation/app_usage")}function o(a){return t.post("/api/v1/conversation/app_usage/rm",a)}export{n as a,e as b,o as d,s as q};

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/assets/Knowledge-bb1a7b94.js


+ 1 - 1
dist/assets/Login-fb3fc008.js → dist/assets/Login-c6ab2f01.js

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

+ 1 - 1
dist/assets/Register-cef17b22.js → dist/assets/Register-4529cd63.js

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

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/assets/authheader.vue_vue_type_script_setup_true_lang-c4a24959.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/assets/default-layout-c4a9d990.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/assets/index-217a7ab4.js


+ 1 - 1
dist/assets/index-5fbbb099.js → dist/assets/index-436edbf7.js

@@ -1,4 +1,4 @@
-import{a3 as qk,a4 as Ks,m as Of,r as Zt,a5 as Ta,U as t1,b as _h,V as bg,C as zr,D as Fn,E as or,u as Ti,J as _s,K as lc,L as xa,R as r1,_ as zu,l as Iu,a6 as n1,f as wA,w as i1,x as vn,v as Qr,F as Fr,G as Ya,a7 as Ig,Q as qs,Z as mu,M as ys,n as XI,H as Ma,I as Ca,a8 as X5,N as wh,O as Bh,a9 as Wk,aa as Kk,ab as $5,ac as zk,ad as Vk}from"./index-7cd176a6.js";import{a as U5,d as Zk,q as Xk}from"./Agent-0c335e37.js";import{p as $k}from"./icon-chart-38e5438e.js";import{a as JI}from"./auth-54229761.js";import{a as xB,u as e9}from"./index-f52c9cfb.js";const SB="/assets/icon-user-007bea0f.jpg",Vp="/assets/icon-picture-144a065f.png";var t9=Object.defineProperty,r9=(D,U,K)=>U in D?t9(D,U,{enumerable:!0,configurable:!0,writable:!0,value:K}):D[U]=K,PI=(D,U,K)=>r9(D,typeof U!="symbol"?U+"":U,K);class j5 extends Error{constructor(U,K){super(U),PI(this,"type"),PI(this,"field"),PI(this,"value"),PI(this,"line"),this.name="ParseError",this.type=K.type,this.field=K.field,this.value=K.value,this.line=K.line}}function dB(D){}function n9(D){const{onEvent:U=dB,onError:K=dB,onRetry:ee=dB,onComment:ge}=D;let Ue="",ht=!0,ut,_t="",Jt="";function ar(sr){const Ir=ht?sr.replace(/^\xEF\xBB\xBF/,""):sr,[hn,Oe]=i9(`${Ue}${Ir}`);for(const Et of hn)Tt(Et);Ue=Oe,ht=!1}function Tt(sr){if(sr===""){yr();return}if(sr.startsWith(":")){ge&&ge(sr.slice(sr.startsWith(": ")?2:1));return}const Ir=sr.indexOf(":");if(Ir!==-1){const hn=sr.slice(0,Ir),Oe=sr[Ir+1]===" "?2:1,Et=sr.slice(Ir+Oe);Fe(hn,Et,sr);return}Fe(sr,"",sr)}function Fe(sr,Ir,hn){switch(sr){case"event":Jt=Ir;break;case"data":_t=`${_t}${Ir}
+import{a3 as qk,a4 as Ks,m as Of,r as Zt,a5 as Ta,U as t1,b as _h,V as bg,C as zr,D as Fn,E as or,u as Ti,J as _s,K as lc,L as xa,R as r1,_ as zu,l as Iu,a6 as n1,f as wA,w as i1,x as vn,v as Qr,F as Fr,G as Ya,a7 as Ig,Q as qs,Z as mu,M as ys,n as XI,H as Ma,I as Ca,a8 as X5,N as wh,O as Bh,a9 as Wk,aa as Kk,ab as $5,ac as zk,ad as Vk}from"./index-6135d382.js";import{a as U5,d as Zk,q as Xk}from"./Agent-f37ee6a7.js";import{p as $k}from"./icon-chart-38e5438e.js";import{a as JI}from"./auth-54229761.js";import{a as xB,u as e9}from"./index-cc00d3d5.js";const SB="/assets/icon-user-007bea0f.jpg",Vp="/assets/icon-picture-144a065f.png";var t9=Object.defineProperty,r9=(D,U,K)=>U in D?t9(D,U,{enumerable:!0,configurable:!0,writable:!0,value:K}):D[U]=K,PI=(D,U,K)=>r9(D,typeof U!="symbol"?U+"":U,K);class j5 extends Error{constructor(U,K){super(U),PI(this,"type"),PI(this,"field"),PI(this,"value"),PI(this,"line"),this.name="ParseError",this.type=K.type,this.field=K.field,this.value=K.value,this.line=K.line}}function dB(D){}function n9(D){const{onEvent:U=dB,onError:K=dB,onRetry:ee=dB,onComment:ge}=D;let Ue="",ht=!0,ut,_t="",Jt="";function ar(sr){const Ir=ht?sr.replace(/^\xEF\xBB\xBF/,""):sr,[hn,Oe]=i9(`${Ue}${Ir}`);for(const Et of hn)Tt(Et);Ue=Oe,ht=!1}function Tt(sr){if(sr===""){yr();return}if(sr.startsWith(":")){ge&&ge(sr.slice(sr.startsWith(": ")?2:1));return}const Ir=sr.indexOf(":");if(Ir!==-1){const hn=sr.slice(0,Ir),Oe=sr[Ir+1]===" "?2:1,Et=sr.slice(Ir+Oe);Fe(hn,Et,sr);return}Fe(sr,"",sr)}function Fe(sr,Ir,hn){switch(sr){case"event":Jt=Ir;break;case"data":_t=`${_t}${Ir}
 `;break;case"id":ut=Ir.includes("\0")?void 0:Ir;break;case"retry":/^\d+$/.test(Ir)?ee(parseInt(Ir,10)):K(new j5(`Invalid \`retry\` value: "${Ir}"`,{type:"invalid-retry",value:Ir,line:hn}));break;default:K(new j5(`Unknown field "${sr.length>20?`${sr.slice(0,20)}…`:sr}"`,{type:"unknown-field",field:sr,value:Ir,line:hn}));break}}function yr(){_t.length>0&&U({id:ut,event:Jt||void 0,data:_t.endsWith(`
 `)?_t.slice(0,-1):_t}),ut=void 0,_t="",Jt=""}function Le(sr={}){Ue&&sr.consume&&Tt(Ue),ut=void 0,_t="",Jt="",Ue=""}return{feed:ar,reset:Le}}function i9(D){const U=[];let K="";const ee=D.length;for(let ge=0;ge<ee;ge++){const Ue=D[ge];Ue==="\r"&&D[ge+1]===`
 `?(U.push(K),K="",ge++):Ue==="\r"||Ue===`

+ 1 - 1
dist/assets/index-7b955436.js → dist/assets/index-5166ba7f.js

@@ -1 +1 @@
-import{m as s,r as n,U as r,ae as o,x as _,C as c,D as i,v as l,E as t,_ as d}from"./index-7cd176a6.js";const u={class:"container"},m={class:"iframe-box"},f=["src"],p={name:"Agent"},v=s({...p,setup(h){const e=n("");return r(()=>{e.value=`${o.RAGFlowUrl?o.RAGFlowUrl:window.location.origin}/flow?${localStorage.Authorization}`}),(x,g)=>{const a=_("Breadcrumb");return c(),i("div",u,[l(a,{items:["Agent","配置"]}),t("div",m,[t("iframe",{src:e.value,height:"100%",width:"100%",frameborder:"0"},null,8,f)])])}}});const B=d(v,[["__scopeId","data-v-82ea0634"]]);export{B as default};
+import{m as s,r as n,U as r,ae as o,x as _,C as c,D as i,v as l,E as t,_ as d}from"./index-6135d382.js";const u={class:"container"},m={class:"iframe-box"},f=["src"],p={name:"Agent"},v=s({...p,setup(h){const e=n("");return r(()=>{e.value=`${o.RAGFlowUrl?o.RAGFlowUrl:window.location.origin}/flow?${localStorage.Authorization}`}),(x,g)=>{const a=_("Breadcrumb");return c(),i("div",u,[l(a,{items:["Agent","配置"]}),t("div",m,[t("iframe",{src:e.value,height:"100%",width:"100%",frameborder:"0"},null,8,f)])])}}});const B=d(v,[["__scopeId","data-v-82ea0634"]]);export{B as default};

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/assets/index-6135d382.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/assets/index-9cb8e2c7.css


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/assets/index-9f9a122d.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/assets/index-a239daa6.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/assets/index-a5339b93.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/assets/index-a7b240ff.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/assets/index-c1141dd8.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/assets/index-cc00d3d5.js


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 0
dist/assets/index-cf33434c.js


+ 1 - 1
dist/assets/loading-ed7f6d1d.js → dist/assets/loading-31015114.js

@@ -1 +1 @@
-import{r as a}from"./index-7cd176a6.js";function l(e=!1){const o=a(e);return{loading:o,setLoading:t=>{o.value=t},toggle:()=>{o.value=!o.value}}}export{l as u};
+import{r as a}from"./index-6135d382.js";function l(e=!1){const o=a(e);return{loading:o,setLoading:t=>{o.value=t},toggle:()=>{o.value=!o.value}}}export{l as u};

+ 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-7cd176a6.js"></script>
-      <link rel="stylesheet" href="/assets/index-54cd5b36.css">
+      <script type="module" crossorigin src="/assets/index-6135d382.js"></script>
+      <link rel="stylesheet" href="/assets/index-9cb8e2c7.css">
     </head>
     <body>
         <div id="app"></div>

+ 180 - 194
src/components/DialogWrap.vue

@@ -29,19 +29,10 @@
             <p style="margin-top: 0">{{ item.question }}</p>
           </div>
           <!-- 如果是代码则不显示头像 -->
-          <div class="dialog-header" v-if="item?.capacity && (!item.code || !item.sql)">
+          <div class="dialog-header" v-else-if="item?.capacity">
             <img alt="avatar" src="/src/assets/slider/logo.jpg" width="28" />
           </div>
-          <!-- 有代码则优先渲染代码,没有代码则渲染答案 -->
-          <div class="dialog-code-footer" v-if="item.code || item.sql">
-            <p class="dialog-code-footer-title" v-if="item.code">Python:</p>
-            <span v-html="getHTML(item.code)"></span>
-
-            <p class="dialog-code-footer-title" v-if="item.sql">SQL:</p>
-            <span v-html="getHTML(item.sql)"></span>
-          </div>
-
-          <div class="dialog-footer" v-else-if="item.capacity"
+          <div class="dialog-footer" v-else-if="item?.capacity"
             :style="{ display: dialogConfig.type === 'paper' ? 'inline-block' : 'block' }">
             <div v-if="type === 'knowledge'" @click="openCapacity(key)"
               :class="[readonly || item.capacity.status === 'loading' ? 'disabled' : '']">
@@ -108,6 +99,19 @@
             </p>
           </div>
 
+          <!-- 没有处理答案则渲染代码和sql -->
+          <div class="dialog-code-footer" v-if="item.code || item.sql">
+            <div v-if="item.code">
+              <p class="dialog-code-footer-title" v-if="item.code">Python:</p>
+              <span v-html="item.code"></span>
+            </div>
+
+            <div v-if="item.sql">
+              <p class="dialog-code-footer-title" v-if="item.sql">SQL:</p>
+              <span v-html="item.sql"></span>
+            </div>
+          </div>
+
           <div class="dialog-footer" v-else>
             <span v-html="getHTML(item.answer)"></span>
           </div>
@@ -353,7 +357,7 @@ export default defineComponent({
     const imageUrl = ref(undefined);
     const answerFile = ref(undefined);
     const answerCode = ref(undefined);
-    const answerSql = ref({});
+    const answerSql = ref(undefined);
     const addQuestion = (question, file = null) => {
       let result = { question, capacity: null, answer: "", other: null, file: null, };
       addData(result);
@@ -386,7 +390,6 @@ export default defineComponent({
 
     onMounted(() => {
       scrollToEnd();
-
       /**
        * 应用引用效果
        * 答案中 引用图标(感叹号)点击时,浮层显示引用内容
@@ -426,6 +429,7 @@ export default defineComponent({
             addAnswer(loadingData.value);
           }
         }
+
         if (type === "message") {
           message = replaceCode(message);
           answerData.value = getHTML(message);
@@ -443,40 +447,37 @@ export default defineComponent({
             });
           }
 
+          // 如果是智能数据则优先处理代码
           if (props.type == 'smartData') {
+            answerData.value = '正在处理中...'
             // 以下是智能数据对话的变量
             const { image_url, excel_url, excel_name, code, sql } = JSON.parse(event.data);
-            answerCode.value = getHTML(code);
             const port = window.location.port ? `:${window.location.port}` : '';
 
             // 如果有图片或excel,则更新图片或excel地址
             if (image_url) {
-              console.log('port', port)
               imageUrl.value = `http://${window.location.hostname}${port}${image_url}`
             }
             if (excel_url) {
               const file = {
                 file_url: `http://${window.location.hostname}${port}${excel_url}`,
-                // file_name: `${excel_name}` || 'excel.xlsx',
-                // 没有名字,暂时显示点击下载xlsx
-                file_name: '点击下载',
+                file_name: `${excel_name}.xlsx` || '点击下载',
               }
-              console.log('file', file)
               answerFile.value = file
             }
+            if (code) answerCode.value = getHTML(code);
+            if (sql) answerSql.value = getHTML(sql);
 
-            if (sql) {
-              answerSql.value = sql;
-            }
           }
 
-
           if (answerData.value && !isLoaded.value) {
             answerLoaded();
           }
           addAnswer(loadingData.value);
         }
 
+
+
         if (type === "close") {
           if (!answerData.value) {
             answerLoaded();
@@ -502,7 +503,6 @@ export default defineComponent({
         if (props.type === 'doc') {
           sendData.doc_ids = [helper.read('docId')];
         }
-
         helper.webSocket.send(JSON.stringify(sendData));
       });
       helper.$bus.on("clear-message", () => {
@@ -581,15 +581,16 @@ export default defineComponent({
 
 .paper-wrap {
   display: flex;
-  /* TODO 加后缀 */
   align-items: center;
-  margin-left: 40px;
   margin-bottom: 10px;
   cursor: pointer;
+  background-color: #F5F7FE;
+  border-radius: 16px;
+  padding: 6px;
 
   >img {
     width: 50px;
-    margin-right: 10px;
+    margin: 8px 6px;
   }
 
   >span {
@@ -739,218 +740,203 @@ export default defineComponent({
       padding-left: 0;
     }
   }
-}
-
-.dialog-flex-wrap {
-  position: relative;
-  flex: 1;
-  margin-top: 16px;
-  height: 100%;
-}
-
-.dialog-flex {
-  position: absolute;
-  left: 0;
-  top: 0;
-  right: 0;
-  bottom: 0;
-  overflow-y: auto;
-  overflow-x: hidden;
-}
-
-.section-open {
-  margin-top: 12px;
-}
-
-.dialog-file {
-  width: 421px;
-  height: 48px;
-  border-radius: 12px;
-  background-color: rgba(255, 255, 255, 1);
-  color: rgba(16, 16, 16, 1);
-  font-size: 14px;
-  border: 1px solid rgba(229, 229, 229, 1);
-  display: flex;
-  align-items: center;
-  margin-bottom: 16px;
-  padding: 0 8px;
-}
-
-.dialog-footer {
-  border-radius: 12px;
-  background-color: rgba(245, 247, 254, 1);
-  padding: 12px 16px;
-  margin: 16px 0;
-
-  &:nth-child(2) {
-    background-color: rgba(0, 0, 0, 0);
-    margin: 0;
-  }
 
-  >p {
-    color: rgba(16, 16, 16, 1);
-    font-size: 14px;
-  }
-
-  >div {
-    border: 1px solid rgba(64, 95, 234, 0.42);
-    background-color: rgba(255, 255, 255, 1);
-    color: rgba(16, 16, 16, 1);
+  .dialog-code-footer {
+    border-radius: 12px;
     font-size: 14px;
-    display: inline-flex;
-    padding: 4px 8px;
-    border-radius: 4px;
-    align-items: center;
-    cursor: pointer;
-    height: 30px;
+    background-color: #32333c;
+    color: #BCBDC3;
+    margin: 16px 0;
 
-    &.disabled {
-      cursor: not-allowed;
+    .dialog-code-footer-title {
+      font-size: 16px;
+      font-weight: 500;
+      margin: 12px 0;
+      width: 100%;
+      padding: 4px 8px;
+      background-color: #3D3F3F;
+      color: #BCBDC3;
     }
 
-    &:hover {
-      background: rgb(245, 247, 254, 0.4);
+    &:nth-child(2) {
+      background-color: rgba(0, 0, 0, 0);
+      margin: 0;
     }
 
-    >span {
-      margin: 0 8px;
+    >p {
+      font-size: 14px;
     }
 
-    >b {
-      margin-right: 8px;
-    }
-  }
+    >div {
+      font-size: 14px;
+      padding: 4px 8px;
+      border-radius: 4px;
+      align-items: center;
+      cursor: pointer;
 
-  >section {
-    padding: 0 16px;
-    background-color: #ffffff;
-    border-radius: 12px;
-    margin-top: 16px;
+      &.disabled {
+        cursor: not-allowed;
+      }
 
-    >p {
-      display: inline-block;
-      color: rgba(16, 16, 16, 1);
-      font-size: 12px;
-      margin-top: 16px;
-      width: 100%;
+      >b {
+        margin-right: 8px;
+      }
     }
 
-    >div {
-      margin-top: 4px;
-      overflow: hidden;
-      margin-bottom: 16px;
-      display: inline-block;
-      width: 100%;
+    >section {
+      padding: 0 16px;
+      background-color: #ffffff;
+      border-radius: 12px;
+      margin-top: 16px;
+
+      >p {
+        display: inline-block;
+        color: rgba(16, 16, 16, 1);
+        font-size: 12px;
+        margin-top: 16px;
+        width: 100%;
+      }
 
       >div {
-        margin-top: 8px;
+        margin-top: 4px;
+        overflow: hidden;
+        margin-bottom: 16px;
+        display: inline-block;
+        width: 100%;
 
         >div {
-          &:nth-child(1) {
-            border-radius: 4px;
-            color: rgba(16, 16, 16, 1);
-            font-size: 12px;
-            height: 24px;
-            border: 1px solid rgba(229, 229, 229, 1);
-            display: flex;
-            justify-content: center;
-            align-items: center;
-            padding-right: 8px;
-            cursor: pointer;
-
-            &.disabled {
-              cursor: not-allowed;
-            }
-
-            &:hover {
-              background: rgba(229, 229, 229, 0.2);
-            }
+          margin-top: 8px;
+
+          >div {
+            &:nth-child(1) {
+              border-radius: 4px;
+              color: rgba(16, 16, 16, 1);
+              font-size: 12px;
+              height: 24px;
+              border: 1px solid rgba(229, 229, 229, 1);
+              display: flex;
+              justify-content: center;
+              align-items: center;
+              padding-right: 8px;
+              cursor: pointer;
 
-            >span {
-              &:nth-child(1) {
-                background-color: rgba(0, 174, 163, 0.2);
-                color: #00aea3;
-                font-size: 12px;
-                border: 1px solid rgba(64, 95, 234, 0.13);
-                padding: 0 4px;
-                margin: 0 4px 0 0;
+              &.disabled {
+                cursor: not-allowed;
               }
 
-              &:nth-child(3) {
-                color: #00aea3;
-                font-size: 12px;
+              &:hover {
+                background: rgba(229, 229, 229, 0.2);
+              }
 
-                em {
+              >span {
+                &:nth-child(1) {
+                  background-color: rgba(0, 174, 163, 0.2);
+                  color: #00aea3;
+                  font-size: 12px;
+                  border: 1px solid rgba(64, 95, 234, 0.13);
                   padding: 0 4px;
-                  font-style: normal;
-                  border-left: 1px solid rgba(64, 95, 234, 1);
-                  font-weight: bold;
+                  margin: 0 4px 0 0;
+                }
 
-                  &:nth-child(1) {
-                    border: none;
+                &:nth-child(3) {
+                  color: #00aea3;
+                  font-size: 12px;
+
+                  em {
+                    padding: 0 4px;
+                    font-style: normal;
+                    border-left: 1px solid rgba(64, 95, 234, 1);
+                    font-weight: bold;
+
+                    &:nth-child(1) {
+                      border: none;
+                    }
                   }
                 }
               }
             }
-          }
 
-          &:nth-child(2) {
-            >p {
-              margin: 8px 0;
-              display: flex;
+            &:nth-child(2) {
+              >p {
+                margin: 8px 0;
+                display: flex;
 
-              >span {
-                transform: translateY(2px);
-                color: #00aea3;
-                font-weight: bold;
-                font-size: 12px;
-                margin-right: 8px;
+                >span {
+                  transform: translateY(2px);
+                  color: #00aea3;
+                  font-weight: bold;
+                  font-size: 12px;
+                  margin-right: 8px;
+                }
               }
             }
           }
         }
-      }
-
-      >p {
-        float: left;
-        width: 48%;
-        border-radius: 4px;
-        background-color: rgba(245, 247, 254, 1);
-        color: rgba(16, 16, 16, 1);
-        font-size: 12px;
-        margin-top: 8px;
-        height: 36px;
-        line-height: 36px;
-        padding: 0 8px;
-        display: flex;
-        align-items: center;
 
-        &:nth-child(odd) {
-          margin-right: 4%;
+        >p {
+          float: left;
+          width: 48%;
+          border-radius: 4px;
+          background-color: rgba(245, 247, 254, 1);
+          color: rgba(16, 16, 16, 1);
+          font-size: 12px;
+          margin-top: 8px;
+          height: 36px;
+          line-height: 36px;
+          padding: 0 8px;
+          display: flex;
+          align-items: center;
+
+          &:nth-child(odd) {
+            margin-right: 4%;
+          }
         }
       }
     }
   }
 }
 
-.dialog-code-footer {
+.dialog-flex-wrap {
+  position: relative;
+  flex: 1;
+  margin-top: 16px;
+  height: 100%;
+}
+
+.dialog-flex {
+  position: absolute;
+  left: 0;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  overflow-y: auto;
+  overflow-x: hidden;
+}
+
+.section-open {
+  margin-top: 12px;
+}
+
+.dialog-file {
+  width: 421px;
+  height: 48px;
   border-radius: 12px;
+  background-color: rgba(255, 255, 255, 1);
+  color: rgba(16, 16, 16, 1);
   font-size: 14px;
-  background-color: #32333c;
-  color: #BCBDC3;
+  border: 1px solid rgba(229, 229, 229, 1);
+  display: flex;
+  align-items: center;
+  margin-bottom: 16px;
+  padding: 0 8px;
+}
+
+.dialog-footer {
+  border-radius: 12px;
+  background-color: rgba(245, 247, 254, 1);
   padding: 12px 16px;
   margin: 16px 0;
 
-  .dialog-code-footer-title {
-    font-size: 16px;
-    font-weight: 500;
-    margin: 16px 0;
-    width: 100%;
-    padding: 4px 8px;
-    background-color: #3D3F3F;
-    color: #BCBDC3;
-  }
-
   &:nth-child(2) {
     background-color: rgba(0, 0, 0, 0);
     margin: 0;

+ 1 - 6
src/components/DocumentCards.vue

@@ -121,10 +121,6 @@
           </div>
         </template>
       </a-popover>
-      <!-- <section v-if="hasSlider">
-        <p>出题随机性</p>
-        <a-slider :default-value="50" :style="{ width: '100px' }" />
-      </section> -->
     </footer>
   </main>
 </template>
@@ -132,7 +128,7 @@
 import dayjs from "dayjs";
 import { defineComponent, ref, inject, reactive } from "vue";
 export default defineComponent({
-  props: ["data", "hasUpload", "hasSlider", "uploadFile", "isQuestion", "agentId", "agengtName"],
+  props: ["data", "hasUpload", "uploadFile", "isQuestion", "agentId", "agengtName"],
   setup(props) {
     const showUpload = ref(false);
     const { helper, ajax } = inject("$global");
@@ -228,7 +224,6 @@ export default defineComponent({
       onSuccess();
     };
     const onBeforeRemove = (data) => {
-      console.log('data', data)
       fileList.value = fileList.value.filter((item) => item.id !== data.uid);
       return true;
     };

+ 1 - 1
src/views/DocumentQuestion.vue

@@ -1,5 +1,5 @@
 <template>
-    <document-cards :data="data" :hasUpload="true" :hasSlider="true" :isQuestion="true" />
+    <document-cards :data="data" :hasUpload="false" :isQuestion="true" />
 </template>
 <script>
 import DocumentCards from "@/components/DocumentCards.vue";

+ 33 - 0
src/views/DocumentQuestion2.vue

@@ -0,0 +1,33 @@
+<template>
+    <document-cards :data="data" :hasUpload="false" :isQuestion="true" />
+</template>
+<script>
+import DocumentCards from "@/components/DocumentCards.vue";
+import { defineComponent, ref, inject, reactive } from "vue";
+export default defineComponent({
+    components: {
+        DocumentCards
+    },
+    setup() {
+        const data = ref([
+            {
+                background: "rgba(72, 177, 244, 0.06)",
+                color: "rgb(72, 177, 244)",
+                img: "/src/assets/answer/1.png",
+                title: "多类型题目",
+                content: "支持生成单选、多选、判断、问答题等多种题目类型"
+            },
+            {
+                background: "rgba(158, 128, 255, 0.06)",
+                color: "rgb(158, 128, 255)",
+                img: "/src/assets/answer/2.png",
+                title: "文档管理",
+                content: "支持生成单选、多选、判断、问答题等多种题目类型"
+            },
+        ]);
+        return {
+            data
+        };
+    }
+});
+</script>

+ 6 - 0
src/views/Home.vue

@@ -41,6 +41,8 @@
               <!-- 文档出卷 -->
               <DocumentQuestion v-if="navId === 7 && !showDialog" :agentId="selectId" />
 
+              <DocumentQuestion2 v-if="navId === 8 && !showDialog" :agentId="selectId" />
+
               <!-- 文库详情 -->
               <DocumentDetail v-if="navId === -2" @go-back="goBack" />
               <dialog-wrap v-if="showDialog && initDialog" v-show="!hideDialog" :type="dialogType[navId]"
@@ -150,6 +152,7 @@ import DocumentAnswer from "./DocumentAnswer.vue";
 import DocumentsmartData from "./DocumentsmartData.vue";
 import DocumentInterlocution from './DocumentInterlocution.vue';
 import DocumentQuestion from "./DocumentQuestion.vue";
+import DocumentQuestion2 from "./DocumentQuestion2.vue";
 import Analysis from "./Analysis.vue";
 import { defineComponent, ref, onMounted, inject, onBeforeUnmount } from "vue";
 
@@ -168,6 +171,7 @@ export default defineComponent({
     DocumentsmartData,
     DocumentInterlocution,
     DocumentQuestion,
+    DocumentQuestion2,
     Analysis,
     DocumentDetail,
     DocumentCombine
@@ -376,6 +380,8 @@ export default defineComponent({
         dialogList.value = [];
         showDialog.value = true;
         initDialog.value = true;
+        // TODO
+        console.log('value', value)
         setTimeout(() => {
           helper.$bus.emit("send-message", value);
         }, 200);

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