SopTaskDrawer-CxISvhlG.js 2.5 KB

1
  1. var B=Object.defineProperty;var f=Object.getOwnPropertySymbols;var D=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable;var d=(r,o,e)=>o in r?B(r,o,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[o]=e,w=(r,o)=>{for(var e in o||(o={}))D.call(o,e)&&d(r,e,o[e]);if(f)for(var e of f(o))T.call(o,e)&&d(r,e,o[e]);return r};var l=(r,o,e)=>new Promise((n,m)=>{var c=s=>{try{a(e.next(s))}catch(i){m(i)}},p=s=>{try{a(e.throw(s))}catch(i){m(i)}},a=s=>s.done?n(s.value):Promise.resolve(s.value).then(c,p);a((e=e.apply(r,o)).next())});import{B as F,u as S}from"./useForm-B-PbqzOc.js";import{f as v}from"./sopTask.data-DOnEL4J1.js";import{B as b,a as $}from"./index-CwBw3p8r.js";import{v as C,_ as R}from"./entry/index-BOVpYCVt-1731915664217.js";import{u as y,c as I}from"./sopTask-BeGg6IK8.js";import{d as L,f as P,c as N,u,a9 as g,_ as O,a6 as U,a7 as V,k as j,aa as A}from"./vue-B5pbXMv7.js";import"./index-x2bUusKH.js";import"./antd-DXvsKA0x.js";import"./tree-Nv0Zt4Ov.js";import"./copyTextToClipboard-7uPthhEV.js";import"./index-BEZBHtc2.js";import"./index-DaqRmjER.js";import"./index-EdNvCi60.js";import"./useWindowSizeFn-CzjmevD7.js";import"./uuid-BUBnBT7J.js";import"./useSortable-CRwDSVfI.js";import"./index-BcSUkfeU.js";import"./index-DKfaJplO.js";import"./index-DTfAZuwl.js";import"./plugin-CRRssOeV.js";import"./onMountedOrActivated-C3HH8-CK.js";const G=L({name:"SopTaskDrawer",components:{BasicDrawer:b,BasicForm:F},emits:["success","register"],setup(r,{emit:o}){const e=P(!0),{t:n}=C.useI18n(),[m,{resetFields:c,setFieldsValue:p,validate:a}]=S({labelWidth:160,baseColProps:{span:24},layout:"vertical",schemas:v,showActionButtonGroup:!1}),[s,{setDrawerProps:i,closeDrawer:k}]=$(t=>l(this,null,function*(){c(),i({confirmLoading:!1}),e.value=!!(t!=null&&t.isUpdate),u(e)&&p(w({},t.record))})),h=N(()=>u(e)?n("wechat.sopTask.editSopTask"):n("wechat.sopTask.addSopTask"));function _(){return l(this,null,function*(){const t=yield a();i({confirmLoading:!0}),t.id=u(e)?Number(t.id):0,(u(e)?yield y(t):yield I(t)).code===0&&(k(),o("success")),i({confirmLoading:!1})})}return{registerDrawer:s,registerForm:m,getTitle:h,handleSubmit:_}}});function W(r,o,e,n,m,c){const p=g("BasicForm"),a=g("BasicDrawer");return O(),U(a,A(r.$attrs,{onRegister:r.registerDrawer,showFooter:"",title:r.getTitle,width:"500px",onOk:r.handleSubmit}),{default:V(()=>[j(p,{onRegister:r.registerForm},null,8,["onRegister"])]),_:1},16,["onRegister","title","onOk"])}const ue=R(G,[["render",W]]);export{ue as default};