| 1 |
- import{_ as I,m as B,r as y,B as r,C as i,I as M,J as C,D as o,L as H,y as q,w as V,b as E,v as l,q as n,E as m,F as S,K as k,Q as L,H as D,a0 as K,a1 as O,a2 as T}from"./index-DmzX1BBr.js";const U=B({components:{},props:["index"],setup(t,{emit:e}){return{list:y([{icon:new URL("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2032%2032'%20width='16'%20height='16'%20style='border-color:%20rgba(0,0,0,0);border-width:%20bpx;border-style:%20undefined'%20filter='none'%3e%3cg%3e%3cpath%20d='M13.333%2019.568v-0.083c0-3.344%202.688-6.157%206.337-6.977-0.485-3.069-3.725-5.575-7.804-5.575-4.427%200-7.867%202.951-7.867%206.373%200%201.292%200.48%202.533%201.387%203.597%200.043%200.051%200.111%200.125%200.203%200.22%200.758%200.778%201.252%201.816%201.335%202.969l0.001%200.015c0.691-0.406%201.523-0.647%202.41-0.647%200.261%200%200.518%200.021%200.768%200.061l-0.028-0.004c0.221%200.035%200.403%200.061%200.54%200.080%200.374%200.051%200.807%200.081%201.246%200.081%200.519%200%201.029-0.041%201.526-0.12l-0.055%200.007zM13.943%2022.169c-0.625%200.113-1.344%200.177-2.078%200.177-0.562%200-1.114-0.038-1.656-0.111l0.063%200.007c-0.341-0.044-0.547-0.076-0.753-0.109l0.147%200.020c-0.099-0.016-0.214-0.026-0.331-0.026-0.41%200-0.793%200.115-1.119%200.314l0.009-0.005-2.539%201.531c-0.16%200.1-0.355%200.16-0.564%200.16-0.032%200-0.063-0.001-0.094-0.004l0.004%200c-0.547-0.043-0.975-0.497-0.975-1.052%200-0.029%200.001-0.058%200.004-0.087l-0%200.004%200.2-2.375c0.005-0.052%200.007-0.113%200.007-0.174%200-0.567-0.226-1.081-0.593-1.457l0%200c-0.107-0.109-0.212-0.223-0.313-0.34l-0.008-0.009c-1.272-1.493-2.023-3.336-2.023-5.328%200-4.992%204.716-9.039%2010.533-9.039%205.413%200%209.871%203.503%2010.467%208.011%204.496%200.204%208.067%203.353%208.067%207.208%200%201.591-0.608%203.061-1.639%204.253-0.068%200.080-0.155%200.173-0.26%200.28-0.297%200.299-0.48%200.711-0.48%201.165%200%200.048%200.002%200.095%200.006%200.142l-0-0.006%200.161%201.897c0.001%200.019%200.002%200.040%200.002%200.062%200%200.447-0.347%200.814-0.786%200.845l-0.003%200c-0.021%200.002-0.047%200.003-0.072%200.003-0.169%200-0.327-0.048-0.461-0.13l0.004%200.002-2.057-1.223c-0.257-0.154-0.567-0.246-0.898-0.246-0.094%200-0.187%200.007-0.278%200.022l0.010-0.001c-0.196%200.031-0.36%200.053-0.491%200.071-0.421%200.053-0.853%200.083-1.292%200.083-3.592%200-6.664-1.877-7.924-4.535zM23.245%2023.916c0.203-0.033%200.436-0.052%200.674-0.052%200.561%200%201.097%200.104%201.591%200.294l-0.030-0.010c0.199-0.787%200.59-1.464%201.122-2.003l-0%200c0.067-0.067%200.116-0.12%200.141-0.149%200.652-0.753%200.991-1.617%200.991-2.511%200-2.405-2.537-4.552-5.867-4.552s-5.867%202.147-5.867%204.552%202.537%204.552%205.867%204.552c0.321%200%200.64-0.021%200.952-0.061%200.107-0.013%200.251-0.033%200.427-0.061z'%20fill='rgba(132.09,134.895,142.03500000000003,1)'%3e%3c/path%3e%3c/g%3e%3c/svg%3e",import.meta.url).href,type:"wechat"},{icon:new URL("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2032%2032'%20width='16'%20height='16'%20style='border-color:%20rgba(0,0,0,0);border-width:%20bpx;border-style:%20undefined'%20filter='none'%3e%3cg%3e%3cpath%20d='M21.333%2022.667v-1.333h-4v-4h4v2.667h2.667v2.667h-1.333v2.667h-2.667v2.667h-2.667v-4h2.667v-1.333h1.333zM28%2028h-5.333v-2.667h2.667v-2.667h2.667v5.333zM4%204h10.667v10.667h-10.667v-10.667zM6.667%206.667v5.333h5.333v-5.333h-5.333zM17.333%204h10.667v10.667h-10.667v-10.667zM20%206.667v5.333h5.333v-5.333h-5.333zM4%2017.333h10.667v10.667h-10.667v-10.667zM6.667%2020v5.333h5.333v-5.333h-5.333zM24%2017.333h4v2.667h-4v-2.667zM8%208h2.667v2.667h-2.667v-2.667zM8%2021.333h2.667v2.667h-2.667v-2.667zM21.333%208h2.667v2.667h-2.667v-2.667z'%20fill='rgba(132.09,134.895,142.03500000000003,1)'%3e%3c/path%3e%3c/g%3e%3c/svg%3e",import.meta.url).href,title:"qr"},{icon:new URL("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2032%2032'%20width='16'%20height='16'%20style='border-color:%20rgba(0,0,0,0);border-width:%20bpx;border-style:%20undefined'%20filter='none'%3e%3cg%3e%3cpath%20d='M16%2029.333c-7.364%200-13.333-5.969-13.333-13.333s5.969-13.333%2013.333-13.333%2013.333%205.969%2013.333%2013.333-5.969%2013.333-13.333%2013.333zM16%2026.667c5.891%200%2010.667-4.776%2010.667-10.667s-4.776-10.667-10.667-10.667v0c-5.891%200-10.667%204.776-10.667%2010.667s4.776%2010.667%2010.667%2010.667v0zM17.333%2016h5.333v2.667h-8v-9.333h2.667v6.667z'%20fill='rgba(132.09,134.895,142.03500000000003,1)'%3e%3c/path%3e%3c/g%3e%3c/svg%3e",import.meta.url).href,title:"record"}]),chooseNav:h=>{e("choose-nav",h)}}}}),F=["onClick"],A=["src"];function J(t,e,v,p,h,f){return r(),i("main",null,[(r(!0),i(M,null,C(t.list,(a,u)=>(r(),i("div",{key:u,onClick:s=>t.chooseNav(u)},[o("img",{src:a.icon},null,8,A)],8,F))),128))])}const Q=I(U,[["render",J],["__scopeId","data-v-759fc2e0"]]),W="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2048%2048'%20width='12'%20height='12'%20style='border-color:%20rgba(0,0,0,0);border-width:%20bpx;border-style:%20undefined'%20filter='none'%3e%3cg%3e%3cg%20fill='rgba(255,255,255,1)'%3e%3cg%20fill='rgba(255,255,255,1)'%3e%3crect%20fill-opacity='0.01'%20fill='rgba(255,255,255,1)'%20x='0'%20y='0'%20width='48'%20height='48'%20stroke-width='4'%20stroke='none'%20fill-rule='evenodd'%3e%3c/rect%3e%3cpolyline%20stroke='rgba(255,255,255,1)'%20stroke-width='4'%20stroke-linecap='round'%20stroke-linejoin='round'%20points='4%2030%209%206%209%206%2039%206%2044%2030'%20fill='none'%20fill-rule='evenodd'%3e%3c/polyline%3e%3cpolygon%20stroke='rgba(255,255,255,1)'%20stroke-width='4'%20fill='none'%20fill-rule='nonzero'%20stroke-linejoin='round'%20points='4%2030%2014.9090909%2030%2016.7272727%2036%2031.2727273%2036%2033.0909091%2030%2044%2030%2044%2043%204%2043'%3e%3c/polygon%3e%3cpolyline%20stroke='rgba(255,255,255,1)'%20stroke-width='4'%20stroke-linecap='round'%20stroke-linejoin='round'%20transform='translate(24.000000,%2017.000000)%20scale(1,%20-1)%20translate(-24.000000,%20-17.000000)%20'%20points='18%2014%2024%2020%2030%2014'%20fill='none'%20fill-rule='evenodd'%3e%3c/polyline%3e%3cpath%20d='M24,26%20L24,14'%20stroke='rgba(255,255,255,1)'%20stroke-width='4'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%20fill-rule='evenodd'%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e",Z="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2048%2048'%20width='10'%20height='10'%20style='border-color:%20rgba(0,0,0,0);border-width:%20bpx;border-style:%20undefined'%20filter='none'%3e%3cg%3e%3crect%20width='48'%20height='48'%20fill='rgba(153,153,153,1)'%20fill-opacity='0.01'%20stroke='none'%3e%3c/rect%3e%3cpath%20d='M8%206C8%204.89543%208.89543%204%2010%204H30L40%2014V42C40%2043.1046%2039.1046%2044%2038%2044H10C8.89543%2044%208%2043.1046%208%2042V6Z'%20fill='none'%20stroke='rgba(153,153,153,1)'%20stroke-width='4'%20stroke-linejoin='round'%3e%3c/path%3e%3cpath%20d='M16%2020H32'%20stroke='rgba(153,153,153,1)'%20stroke-width='4'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%3e%3c/path%3e%3cpath%20d='M16%2028H32'%20stroke='rgba(153,153,153,1)'%20stroke-width='4'%20stroke-linecap='round'%20stroke-linejoin='round'%20fill='none'%3e%3c/path%3e%3c/g%3e%3c/svg%3e",G="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2032%2032'%20width='16'%20height='16'%20style='border-color:%20rgba(0,0,0,0);border-width:%20bpx;border-style:%20undefined'%20filter='none'%3e%3cg%3e%3cpath%20d='M24.485%207.515l-1.885%201.885c-1.689-1.689-4.023-2.734-6.6-2.734-5.155%200-9.333%204.179-9.333%209.333s4.179%209.333%209.333%209.333c5.154%200%209.333-4.178%209.333-9.333v-0h2.667c-0%206.627-5.373%2012-12%2012s-12-5.373-12-12%205.373-12%2012-12c3.314%200%206.314%201.343%208.485%203.515v0z'%20fill='rgba(147.89999999999998,155.04,136.935,1)'%3e%3c/path%3e%3c/g%3e%3c/svg%3e",P="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2032%2032'%20width='16'%20height='16'%20style='border-color:%20rgba(0,0,0,0);border-width:%20bpx;border-style:%20undefined'%20filter='none'%3e%3cg%3e%3cpath%20d='M26.667%209.333v18.667c0%200.736-0.597%201.333-1.333%201.333v0h-18.667c-0.736%200-1.333-0.597-1.333-1.333v0-18.667h-2.667v-2.667h26.667v2.667h-2.667zM8%209.333v17.333h16v-17.333h-16zM9.333%202.667h13.333v2.667h-13.333v-2.667zM14.667%2013.333h2.667v9.333h-2.667v-9.333z'%20fill='rgba(147.89999999999998,155.04,136.935,1)'%3e%3c/path%3e%3c/g%3e%3c/svg%3e",X="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2032%2032'%20width='16'%20height='16'%20style='border-color:%20rgba(0,0,0,0);border-width:%20bpx;border-style:%20undefined'%20filter='none'%3e%3cg%3e%3cpath%20d='M10.667%2026.667v2.576c0%200%200%200.001%200%200.001%200%200.368-0.298%200.667-0.667%200.667-0.163%200-0.312-0.058-0.428-0.155l0.001%200.001-5.493-4.577c-0.147-0.123-0.24-0.307-0.24-0.512%200-0.368%200.298-0.667%200.667-0.667%200.001%200%200.002%200%200.003%200h19.491c1.473%200%202.667-1.194%202.667-2.667v0-10.667h2.667v10.667c0%202.946-2.388%205.333-5.333%205.333v0h-13.333zM21.333%205.333v-2.576c0-0%200-0.001%200-0.001%200-0.368%200.298-0.667%200.667-0.667%200.163%200%200.312%200.058%200.428%200.155l-0.001-0.001%205.493%204.577c0.147%200.123%200.24%200.307%200.24%200.512%200%200.368-0.298%200.667-0.667%200.667-0%200-0.001%200-0.001%200h-19.492c-1.473%200-2.667%201.194-2.667%202.667v0%2010.667h-2.667v-10.667c0-2.946%202.388-5.333%205.333-5.333v0h13.333z'%20fill='rgba(147.89999999999998,155.04,136.935,1)'%3e%3c/path%3e%3c/g%3e%3c/svg%3e",Y=B({setup(){const{helper:t,ajax:e}=H("$global"),v=y({name:"未命名"}),p=q(),h=y([]),f=y(p.query.documentId),a=p.query.knowledgeId,u=g=>{const{status:c,id:w}=g;t.goLink("document",{documentId:w,knowledgeId:p.query.knowledgeId})};return V(()=>p.query,g=>{f.value=g.documentId}),E(async()=>{const g=await e.knowledge.getKnowledge(a);g&&(v.value=g);const c=await e.knowledge.getTask(a);c&&(h.value=c.files)}),{list:h,knowledgeInfo:v,goDocument:u,documentId:f}}}),e0={class:"knowledge-name"},o0={class:"knowledge-list"},t0=["onClick"],n0={key:0},s0={key:1};function l0(t,e,v,p,h,f){const a=l("a-typography-paragraph"),u=l("a-upload");return r(),i(M,null,[o("div",e0,[e[0]||(e[0]=o("span",null,null,-1)),n(a,{style:{flex:"1",margin:"0 0 0 8px","font-size":"14px",color:"rgba(16, 16, 16, 1)"},ellipsis:{rows:1,css:!0}},{default:m(()=>[S(k(t.knowledgeInfo.name),1)]),_:1})]),n(u,{multiple:!1,"show-file-list":!1,limit:1,"show-upload-button":{showOnExceedLimit:!0},accept:".pdf,.doc,.docx,.txt,.md,.ppt.pptx",style:{display:"block",width:"100%"}},{"upload-button":m(()=>e[1]||(e[1]=[o("div",{class:"upload-main"},[o("div",null,[o("img",{src:W,width:"12"}),o("p",null,"添加文件")])],-1)])),_:1}),e[6]||(e[6]=o("p",{class:"knowledge-length"},"14个文件",-1)),o("div",o0,[(r(!0),i(M,null,C(t.list,(s,g)=>(r(),i("div",{key:g,class:L([s.status==="5"?s.id===t.documentId?"active":"method":""]),onClick:c=>t.goDocument(s)},[e[5]||(e[5]=o("img",{src:Z,width:"10"},null,-1)),o("div",{class:L([s.status!==2?"opacity":""])},[n(a,{style:{flex:"1",margin:"0 0 0 8px","font-size":"14px",color:"rgba(16, 16, 16, 1)"},ellipsis:{rows:1,css:!0}},{default:m(()=>[S(k(s.fileName),1)]),_:2},1024)],2),s.status===4||s.status===5?(r(),i("section",n0,[o("p",null,k(s.status===4?"上传中":"解析中")+"...",1),e[2]||(e[2]=o("img",{src:G,width:"12",class:"rotate"},null,-1))])):D("",!0),s.status===1||![1,2,4,5].includes(s.status)?(r(),i("section",s0,[o("p",null,k(s.status===1?"上传":"解析")+"失败",1),e[3]||(e[3]=o("img",{src:P,width:"12",class:"method"},null,-1)),e[4]||(e[4]=o("img",{src:X,width:"12",class:"method"},null,-1))])):D("",!0)],10,t0))),128))])],64)}const r0=I(Y,[["render",l0],["__scopeId","data-v-4455e67f"]]),i0=B({components:{},props:["open","data"],setup(){}}),a0={class:"input-wrap"},c0={class:"list-wrap"},d0={key:0},p0=["id"],h0={class:"menu"};function g0(t,e,v,p,h,f){const a=l("icon-close"),u=l("icon-search"),s=l("a-input"),g=l("a-typography-paragraph"),c=l("icon-more"),w=l("icon-edit"),_=l("a-doption"),j=l("icon-delete"),z=l("a-dropdown");return r(),i("div",{class:L(["record-wrap",t.open?"":"record-wrap-close"])},[o("header",null,[e[1]||(e[1]=o("p",null,"对话记录",-1)),o("p",{onClick:e[0]||(e[0]=d=>t.$emit("closeRecord"))},[n(a,{size:"18"})])]),o("div",a0,[n(s,{placeholder:"搜索关键词",style:{height:"40px",borderRadius:"4px"}},{prefix:m(()=>[n(u)]),_:1})]),o("div",c0,[(r(!0),i(M,null,C(t.data,(d,x)=>{var R;return r(),i("div",{key:x},[((R=d==null?void 0:d.list)==null?void 0:R.length)>0?(r(),i("div",d0,[o("p",null,k(d.name),1),(r(!0),i(M,null,C(d.list,(N,$)=>(r(),i("div",{key:$,id:`recod-item-${x}-${$}`},[n(g,{ellipsis:{rows:1,css:!0},style:{lineHeight:"36px",padding:"0 8px",marginBottom:"0",flex:"1"}},{default:m(()=>[S(k(N),1)]),_:2},1024),o("div",h0,[n(z,{onSelect:b=>t.$emit("handleSelect",b,x,$)},{content:m(()=>[n(_,{value:"edit"},{default:m(()=>[n(w),e[2]||(e[2]=o("span",{style:{"margin-left":"8px"}},"编辑",-1))]),_:1}),n(_,{value:"delete"},{default:m(()=>[n(j),e[3]||(e[3]=o("span",{style:{"margin-left":"8px"}},"删除",-1))]),_:1})]),default:m(()=>[n(c)]),_:2},1032,["onSelect"])])],8,p0))),128))])):D("",!0)])}),128))])],2)}const u0=I(i0,[["render",g0],["__scopeId","data-v-e1168d33"]]),v0=B({components:{Slider:K,DialogWrap:O,MessageInput:T,TopBar:Q,Directory:r0,RecordList:u0},setup(){const{helper:t}=H("$global"),e=["有没有关于AI agent的论文"],v=y(!1),p=y(!1),h=y([{name:"今天",list:["你必须知道的8种产品设计能力提升技巧","干货|学会写简历,轻松拿offer","探索了5种改善移动用户体验的绝佳做","通知必读,再不看就晚啦","最佳产品管理书籍在此,获取职场上升上"]},{name:"昨天",list:["探索了5种改善移动用户体验的绝佳做","面试攻略:超级加分的10个面试满分小技"]},{name:"过去7天",list:["你必须知道的8种产品设计能力提升技巧","干货|学会写简历,轻松拿offer","探索了5种改善移动用户体验的绝佳做","通知必读,再不看就晚啦","最佳产品管理书籍在此,获取职场上升上"]},{name:"过去半年",list:["探索了5种改善移动用户体验的绝佳做","面试攻略:超级加分的10个面试满分小技"]},{name:"更久以前",list:["你必须知道的8种产品设计能力提升技巧","干货|学会写简历,轻松拿offer","探索了5种改善移动用户体验的绝佳做","通知必读,再不看就晚啦","最佳产品管理书籍在此,获取职场上升上"]}]),f=(c,w,_,j)=>{switch(c){case"delete":h.value[w].list.splice(_,1);break;case"edit":const z=document.getElementById(`recod-item-${w}-${_}`),d=z.cloneNode(),{width:x,height:R,top:N,left:$}=z.getBoundingClientRect();d.style.width=`${x}px`,d.style.height=`${R}px`,d.style.top=`${N}px`,d.style.left=`${$}px`,d.style.position="absolute";const b=document.createElement("input");b.value=h.value[w].list[_],b.style="width: 100%;height: 100%",d.append(b),t.setDialog(!0,d,()=>{b.focus()},()=>{h.value[w].list[_]=b.value});break}},a=()=>p.value=!0;return{recordList:h,isOpenRecord:p,readonly:v,setReadonly:c=>{v.value=c},suggestions:e,handleSelect:f,openRecord:a,closeRecord:()=>p.value=!1,chooseNav:c=>{switch(c){case 2:a();break}}}}}),w0={id:"app"},m0={class:"main"};function f0(t,e,v,p,h,f){const a=l("Directory"),u=l("Slider"),s=l("top-bar"),g=l("dialog-wrap"),c=l("message-input"),w=l("record-list");return r(),i("div",w0,[n(u,null,{default:m(()=>[n(a)]),_:1}),o("div",m0,[o("header",null,[n(s,{onChooseNav:t.chooseNav},null,8,["onChooseNav"])]),o("section",null,[n(g,{suggestions:t.suggestions,isSetting:!1,readonly:t.readonly,onSetReadonly:t.setReadonly},null,8,["suggestions","readonly","onSetReadonly"])]),o("footer",null,[n(c,{readonly:t.readonly},null,8,["readonly"])])]),n(w,{data:t.recordList,open:t.isOpenRecord,onCloseRecord:t.closeRecord,onHandleSelect:t.handleSelect},null,8,["data","open","onCloseRecord","onHandleSelect"])])}const b0=I(v0,[["render",f0],["__scopeId","data-v-05eb0908"]]);export{b0 as default};
|