| 1 |
- var x=Object.defineProperty;var g=Object.getOwnPropertySymbols;var C=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;var h=(i,t,o)=>t in i?x(i,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):i[t]=o,_=(i,t)=>{for(var o in t||(t={}))C.call(t,o)&&h(i,o,t[o]);if(g)for(var o of g(t))F.call(t,o)&&h(i,o,t[o]);return i};var d=(i,t,o)=>new Promise((r,m)=>{var p=a=>{try{s(o.next(a))}catch(l){m(l)}},n=a=>{try{s(o.throw(a))}catch(l){m(l)}},s=a=>a.done?r(a.value):Promise.resolve(a.value).then(p,n);s((o=o.apply(i,t)).next())});import{f,u as w,ag as v,aq as O,ar as P,k as y,aD as I}from"./vue-vendor-Be68asQ6.js";import{I as S}from"./BasicModal-D4gc2R81.js";import"./index-CETWS1o0.js";import{B as D}from"./BasicForm-Cv-dsB-e.js";import"./index-D68l__AG.js";import{d as R}from"./AiKnowledgeBase.data-BCjuIj-H.js";import{f as A}from"./AiKnowledgeBase.api-BAwTQsCz.js";import{u as L}from"./useForm-kcRIHoe0.js";import{ac as N,a as V}from"./index-BFfnEkVs.js";import"./antd-vue-vendor-DcqS7Wvq.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"./componentMap-BUTAcOmo.js";import"./useFormItem-CtGMPcLp.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"./JSelectUser-DCwPqRxp.js";import"./props-BPxWJPuD.js";import"./JSelectBiz-Be8KsC5j.js";import"./JAddInput-BBXQvvpq.js";import"./areaDataUtil-Cik-Rc_P.js";import"./index-BOEzG86y.js";import"./index-BNFwynfr.js";import"./bem-BvvqSl-N.js";import"./props-Cw7AfxGV.js";import"./useContextMenu-BDwmjIwb.js";import"./depart.api-CDwTvdwQ.js";import"./JSelectDept-DT6g7V5M.js";import"./JPopup-DKJW27Yk.js";import"./JEllipsis-C04xKxcI.js";import"./JUpload-cB_Qj2H2.js";import"./index-iuayQczx.js";import"./index-DJQB4_Pr.js";import"./JAreaLinkage-BNOKwn5l.js";import"./JCodeEditor-CSivhUhT.js";import"./htmlmixed-DNSd26j0.js";import"./vue-DbzutmLn.js";/* empty css */import"./EasyCronInput-wCv2YMHn.js";const b={name:"AiragKnowledgeDocModal",components:{BasicForm:D,BasicModal:S},emits:["success","register"],setup(i,{emit:t}){const o=f("创建知识库"),r=f(!1),m=f(),[p,{resetFields:n,setFieldsValue:s,validate:a,clearValidate:l,updateSchema:T}]=L({schemas:R,showActionButtonGroup:!1,layout:"vertical",wrapperCol:{span:24}}),[k,{closeModal:u,setModalProps:c}]=N(e=>d(null,null,function*(){yield n(),c({confirmLoading:!1}),r.value=!!(e!=null&&e.isUpdate),o.value=r.value?"编辑文档":"创建文档",w(r)?(e.record.type==="file"&&e.record.metadata&&(e.record.filePath=JSON.parse(e.record.metadata).filePath),yield s(_({},e.record))):(m.value=e.knowledgeId,yield s({type:e.type})),c({bodyStyle:{padding:"10px"}})}));function B(){return d(this,null,function*(){try{c({confirmLoading:!0});let e=yield a();w(r)||(e.knowledgeId=m.value),e.filePath&&(e.metadata=JSON.stringify({filePath:e.filePath}),delete e.filePath),yield A(e),u(),t("success")}finally{c({confirmLoading:!1})}})}function M(){u()}return{registerModal:k,registerForm:p,title:o,handleOk:B,handleCancel:M}}},J={class:"p-2"};function K(i,t,o,r,m,p){const n=v("BasicForm"),s=v("BasicModal");return P(),O("div",J,[y(s,{destroyOnClose:"",onRegister:r.registerModal,width:"600px",title:r.title,onOk:r.handleOk,onCancel:r.handleCancel},{default:I(()=>[y(n,{onRegister:r.registerForm},null,8,["onRegister"])]),_:1},8,["onRegister","title","onOk","onCancel"])])}const bo=V(b,[["render",K],["__scopeId","data-v-fb5176f6"]]);export{bo as default};
|