AiAppList-B11GJBSG.js 9.4 KB

1
  1. var H=Object.defineProperty;var U=Object.getOwnPropertySymbols;var Q=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable;var j=(d,e,s)=>e in d?H(d,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):d[e]=s,K=(d,e)=>{for(var s in e||(e={}))Q.call(e,s)&&j(d,s,e[s]);if(U)for(var s of U(e))W.call(e,s)&&j(d,s,e[s]);return d};import{f,r as N,ag as i,aq as T,ar as y,at as l,k as t,aB as M,ah as V,aO as X,aD as a,G as b,F as Y,aC as Z,au as J,A as k}from"./vue-vendor-Be68asQ6.js";import{I as $}from"./BasicModal-D4gc2R81.js";import"./index-CETWS1o0.js";import{ai as ee,a3 as oe,x as te}from"./antd-vue-vendor-DcqS7Wvq.js";import{c as ae,ad as O,u as ne,d as ie,a as le}from"./index-BFfnEkVs.js";import{d as re}from"./ailogo-DtF_kSHs.js";import se from"./AiAppModal-CglJH89b.js";import de from"./AiAppSettingModal-DODoIjNk.js";import pe from"./AiAppSendModal-B5DtoICv.js";import{a as ce,d as ue}from"./AiApp.api-BqGBU1Sc.js";import{y as me}from"./componentMap-BUTAcOmo.js";import{_ as ge}from"./JAddInput-BBXQvvpq.js";import"./useTimeout-Ca5eqGu-.js";import"./vxe-table-vendor-DHF2TRpV.js";import"./useWindowSizeFn-BTSGGcie.js";import"./index-BZ_MXCtW.js";import"./index-BIPzXG41.js";import"./index-CXEQnmRq.js";import"./useIntersectionObserver-Bl62RIZ4.js";import"./BasicForm-Cv-dsB-e.js";import"./index-D68l__AG.js";import"./useForm-kcRIHoe0.js";import"./JAreaLinkage-BNOKwn5l.js";import"./areaDataUtil-Cik-Rc_P.js";import"./JSelectUser-DCwPqRxp.js";import"./props-BPxWJPuD.js";import"./JSelectBiz-Be8KsC5j.js";import"./JSelectDept-DT6g7V5M.js";import"./index-BNFwynfr.js";import"./bem-BvvqSl-N.js";import"./props-Cw7AfxGV.js";import"./useContextMenu-BDwmjIwb.js";import"./JCodeEditor-CSivhUhT.js";import"./useFormItem-CtGMPcLp.js";import"./htmlmixed-DNSd26j0.js";import"./vue-DbzutmLn.js";/* empty css */import"./JPopup-DKJW27Yk.js";import"./EasyCronInput-wCv2YMHn.js";import"./JEllipsis-C04xKxcI.js";import"./AiApp.data-wU-aGD0q.js";import"./AiAppAddKnowledgeModal-BUooqrdA.js";import"./AiKnowledgeBase.api-BAwTQsCz.js";import"./knowledge-D-NCDCnz.js";import"./AiAppParamsSettingModal-CpSqT6ZE.js";import"./index-CgB-9WQb.js";import"./AiModelSeniorForm-DohnUmZo.js";import"./AiAppGeneratedPromptModal-DX7EzOZT.js";import"./AiAppQuickCommandModal-DZ0nuS32.js";import"./AiAppAddFlowModal-C0d1efaw.js";import"./chat-DNOp4Wum.js";import"./chatMessage-w2Up_JiZ.js";import"./chatText-CUNVf7ES.js";import"./presetQuestion-CGX7VL6v.js";import"./JMarkdownEditor-C0zDN7rg.js";import"./vuedraggable.umd-CvnwfRLh.js";import"./download-CjoX0_mR.js";import"./base64Conver-24EVOS6V.js";import"./index-D1703ozz.js";import"./index-Bi7PIj53.js";import"./useCountdown-B7iR27pS.js";import"./useFormItemSingle-nLM0QlcI.js";import"./JUpload-cB_Qj2H2.js";import"./index-iuayQczx.js";import"./index-DJQB4_Pr.js";import"./index-BOEzG86y.js";import"./depart.api-CDwTvdwQ.js";const _e={name:"AiAppList",components:{JDictSelectTag:ge,JInput:me,AiAppSendModal:pe,Icon:ae,Pagination:te,Avatar:oe,LoadingOutlined:ee,BasicModal:$,AiAppModal:se,AiAppSettingModal:de},emits:["success","register"],setup(d,{emit:e}){const s=f([]),o=f(1),h=f(10),S=f(0),E=f(["10","20","30"]),[w,{openModal:c}]=O(),[B,{openModal:A}]=O(),[F,{openModal:D}]=O(),{createMessage:u}=ne(),g=N({}),x=N({xs:24,sm:4,xl:6,xxl:6}),C=N({xs:24,sm:20}),v=f();p();function p(){let r={pageNo:o.value,pageSize:h.value,column:"createTime",order:"desc"};Object.assign(r,g),ce(r).then(m=>{m.success?(s.value=m.result.records,S.value=m.result.total):(s.value=[],S.value=0)})}function z(){c(!0,{})}function I(r,m){o.value=r,h.value=m,p()}function P(r){p(),A(!0,{isUpdate:!1,id:r})}function R(r){return r?ie(r):re}function L(r){A(!0,K({isUpdate:!0},r))}function q(r){window.open("/ai/app/chat/"+r,"_blank")}function n(r){ue({id:r.id,name:r.name},p)}function _(r,m){D(!0,{type:m,data:r})}function G(){v.value.resetFields(),g.name="",p()}return{handleCreateApp:z,knowledgeAppDataList:s,pageNo:o,pageSize:h,total:S,pageSizeOptions:E,handlePageChange:I,cardBodyStyle:{textAlign:"left",width:"100%"},registerModal:w,handleSuccess:P,getImage:R,handleEditClick:L,handleViewClick:q,handleDeleteClick:n,registerSettingModal:B,reload:p,queryParam:g,labelCol:x,wrapperCol:C,handleSendClick:_,registerAiAppSendModal:F,searchReset:G,formRef:v}}},fe={class:"p-2 knowledge"},ye={class:"jeecg-basic-table-form-container"},Ae={style:{float:"left",overflow:"hidden"},class:"table-page-search-submitButtons"},Ce={class:"flex"},ve=["src"],ke={class:"header-text"},he={class:"header-text-top header-name ellipsis"},Se={class:"header-text-top header-create ellipsis"},we={class:"header-tag"},Fe={class:"card-description"},xe={class:"card-footer"},Me=["onClick"],be=["onClick"];function Ee(d,e,s,o,h,S){const E=i("JInput"),w=i("a-form-item"),c=i("a-col"),B=i("j-dict-select-tag"),A=i("a-button"),F=i("a-row"),D=i("a-form"),u=i("Icon"),g=i("a-card"),x=i("a-tag"),C=i("a-tooltip"),v=i("a-divider"),p=i("a-menu-item"),z=i("a-menu"),I=i("a-dropdown"),P=i("Pagination"),R=i("AiAppModal"),L=i("AiAppSettingModal"),q=i("AiAppSendModal");return y(),T("div",fe,[l("div",ye,[t(D,{ref:"formRef",onKeyup:X(o.reload,["enter","native"]),model:o.queryParam,"label-col":o.labelCol,"wrapper-col":o.wrapperCol,style:{"background-color":"#f7f8fc"}},{default:a(()=>[t(F,{gutter:24},{default:a(()=>[t(c,{lg:6},{default:a(()=>[t(w,{name:"name",label:"应用名称"},{default:a(()=>[t(E,{value:o.queryParam.name,"onUpdate:value":e[0]||(e[0]=n=>o.queryParam.name=n),placeholder:"请输入应用名称"},null,8,["value"])]),_:1})]),_:1}),t(c,{lg:6},{default:a(()=>[t(w,{name:"type",label:"应用类型"},{default:a(()=>[t(B,{value:o.queryParam.type,"onUpdate:value":e[1]||(e[1]=n=>o.queryParam.type=n),"dict-code":"ai_app_type",placeholder:"请选择应用类型"},null,8,["value"])]),_:1})]),_:1}),t(c,{xl:6,lg:7,md:8,sm:24},{default:a(()=>[l("span",Ae,[t(c,{lg:6},{default:a(()=>[t(A,{type:"primary",preIcon:"ant-design:search-outlined",onClick:o.reload},{default:a(()=>e[4]||(e[4]=[b("查询")])),_:1},8,["onClick"]),t(A,{type:"primary",preIcon:"ant-design:reload-outlined",onClick:o.searchReset,style:{"margin-left":"8px"}},{default:a(()=>e[5]||(e[5]=[b("重置")])),_:1},8,["onClick"])]),_:1})])]),_:1})]),_:1})]),_:1},8,["onKeyup","model","label-col","wrapper-col"])]),t(F,{span:24,class:"knowledge-row"},{default:a(()=>[t(c,{xxl:4,xl:6,lg:6,md:6,sm:12,xs:24},{default:a(()=>[t(g,{class:"add-knowledge-card",bodyStyle:o.cardBodyStyle},{default:a(()=>[e[7]||(e[7]=l("span",{style:{"line-height":"18px","font-weight":"500",color:"#676f83","font-size":"12px"}},"创建应用",-1)),l("div",{class:"add-knowledge-doc",onClick:e[2]||(e[2]=(...n)=>o.handleCreateApp&&o.handleCreateApp(...n))},[t(u,{icon:"ant-design:form-outlined",size:"13"}),e[6]||(e[6]=l("span",null,"创建空白应用",-1))])]),_:1},8,["bodyStyle"])]),_:1}),(y(!0),T(Y,null,Z(o.knowledgeAppDataList,n=>(y(),M(c,{xxl:4,xl:6,lg:6,md:6,sm:12,xs:24},{default:a(()=>[t(g,{class:"knowledge-card pointer",onClick:_=>o.handleEditClick(n)},{default:a(()=>[l("div",Ce,[l("img",{class:"header-img",src:o.getImage(n.icon)},null,8,ve),l("div",ke,[l("span",he,J(n.name),1),l("span",Se," 创建者:"+J(n.createBy),1)])]),l("div",we,[n.type==="chatSimple"?(y(),M(x,{key:0,color:"#EBF1FF",style:{"margin-right":"0"}},{default:a(()=>e[8]||(e[8]=[l("span",{style:{color:"#3370ff"}},"简单配置",-1)])),_:1})):V("",!0),n.type==="chatFLow"?(y(),M(x,{key:1,color:"#FDF6EC",style:{"margin-right":"0"}},{default:a(()=>e[9]||(e[9]=[l("span",{style:{color:"#e6a343"}},"高级编排",-1)])),_:1})):V("",!0)]),l("div",Fe,[l("span",null,J(n.descr||"暂无描述"),1)]),l("div",xe,[t(C,{title:"演示"},{default:a(()=>[l("div",{class:"card-footer-icon",onClick:k(_=>o.handleViewClick(n.id),["prevent","stop"])},[t(u,{class:"operation",icon:"ant-design:youtube-outlined",size:"20",color:"#1F2329"})],8,Me)]),_:2},1024),t(v,{type:"vertical",style:{float:"left"}}),t(C,{title:"删除"},{default:a(()=>[l("div",{class:"card-footer-icon",onClick:k(_=>o.handleDeleteClick(n),["prevent","stop"])},[t(u,{icon:"ant-design:delete-outlined",class:"operation",size:"20",color:"#1F2329"})],8,be)]),_:2},1024),t(v,{type:"vertical",style:{float:"left"}}),t(C,{title:"发布"},{default:a(()=>[t(I,{class:"card-footer-icon",placement:"bottomRight",trigger:["click"]},{overlay:a(()=>[t(z,null,{default:a(()=>[t(p,{key:"web",onClick:k(_=>o.handleSendClick(n,"web"),["prevent","stop"])},{default:a(()=>[t(u,{icon:"ant-design:dribbble-outlined",size:"16"}),e[10]||(e[10]=b(" 嵌入网站 "))]),_:2},1032,["onClick"]),t(p,{key:"menu",onClick:k(_=>o.handleSendClick(n,"menu"),["prevent","stop"])},{default:a(()=>[t(u,{icon:"ant-design:menu-outlined",size:"16"}),e[11]||(e[11]=b(" 配置菜单 "))]),_:2},1032,["onClick"])]),_:2},1024)]),default:a(()=>[l("div",{onClick:e[3]||(e[3]=k(()=>{},["prevent","stop"]))},[t(u,{icon:"ant-design:send-outlined"})])]),_:2},1024)]),_:2},1024)])]),_:2},1032,["onClick"])]),_:2},1024))),256))]),_:1}),o.knowledgeAppDataList.length>0?(y(),M(P,{key:0,current:o.pageNo,"page-size":o.pageSize,"page-size-options":o.pageSizeOptions,total:o.total,showQuickJumper:!0,showSizeChanger:!0,onChange:o.handlePageChange,class:"list-footer",size:"small"},null,8,["current","page-size","page-size-options","total","onChange"])):V("",!0),t(R,{onRegister:o.registerModal,onSuccess:o.handleSuccess},null,8,["onRegister","onSuccess"]),t(L,{onRegister:o.registerSettingModal,onSuccess:o.reload},null,8,["onRegister","onSuccess"]),t(q,{onRegister:o.registerAiAppSendModal},null,8,["onRegister"])])}const To=le(_e,[["render",Ee],["__scopeId","data-v-8aa9feda"]]);export{To as default};