Ben Lin
2024-04-25 e404c076586d9682c3d782a4ecb0dc254f0bfd48
1
var B=Object.defineProperty;var I=Object.getOwnPropertySymbols;var k=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable;var w=(e,a,t)=>a in e?B(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,T=(e,a)=>{for(var t in a||(a={}))k.call(a,t)&&w(e,t,a[t]);if(I)for(var t of I(a))A.call(a,t)&&w(e,t,a[t]);return e};var d=(e,a,t)=>new Promise((c,n)=>{var m=r=>{try{o(t.next(r))}catch(l){n(l)}},s=r=>{try{o(t.throw(r))}catch(l){n(l)}},o=r=>r.done?c(r.value):Promise.resolve(r.value).then(m,s);o((t=t.apply(e,a)).next())});import{B as M,__tla as N}from"./BasicForm-1f7b4828.js";import{__tla as q}from"./componentMap-44c327dc.js";import{u as v,__tla as J}from"./useForm-2e36096a.js";import{__tla as j}from"./RadioButtonGroup-3086b2b2.js";import{o as C,b as O,__tla as L}from"./tsk_job-a2bc8bee.js";import{n as U,d as V,k as W,u as f,e as $,a7 as D,_ as z,a8 as G,a9 as H,f as X,ac as Y}from"./vue-1631514e.js";import{T as Z}from"./antd-057b41b1.js";import{B as K,a as Q,__tla as ee}from"./index-49ac20fc.js";import{l as te,b as ae,_ as re,__tla as se}from"./index-f0df2f76.js";let F,P,b,R,oe=Promise.all([(()=>{try{return N}catch(e){}})(),(()=>{try{return q}catch(e){}})(),(()=>{try{return J}catch(e){}})(),(()=>{try{return j}catch(e){}})(),(()=>{try{return L}catch(e){}})(),(()=>{try{return ee}catch(e){}})(),(()=>{try{return se}catch(e){}})()]).then(()=>d(void 0,null,function*(){let e,a,t,c,n;P=[{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"JobName",width:200},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"CREATE_TIME",width:180},{title:"\u4FEE\u6539\u65F6\u95F4",dataIndex:"UPDATE_TIME",width:180},{title:"\u72B6\u6001",dataIndex:"Status",customRender:({record:s})=>U(Z,{title:s.Status.split(",")[1]},()=>s.Status.split(",")[0]),width:180},{title:"\u63CF\u8FF0",dataIndex:"Remark",width:180}],R=[{field:"JobName",label:"\u4EFB\u52A1\u540D\u79F0",component:"Input",colProps:{span:8}},{field:"CREATE_TIME",label:"\u521B\u5EFA\u65F6\u95F4",component:"RangePicker",colProps:{span:8}},{field:"Status",label:"\u72B6\u6001",component:"ApiSelect",componentProps:{api:C,resultField:"Data",labelField:"Name",valueField:"Value"},colProps:{span:8}}],e=[{field:"JobName",label:"\u4EFB\u52A1\u540D\u79F0",required:!0,component:"Input"},{field:"JobType",label:"\u4EFB\u52A1\u7C7B\u540D",required:!0,component:"Input"},{field:"AssemblyName",label:"\u547D\u540D\u7A7A\u95F4",required:!0,component:"Input"},{field:"Remark",label:"\u63CF\u8FF0",required:!0,component:"Input"},{field:"Period",label:"\u95F4\u9694\u65F6\u95F4(m)",required:!0,component:"InputNumber"},{field:"ID",label:"ID",component:"Input",show:!1}],{t:a}=te(),{notification:t,createErrorModal:c}=ae(),n=V({name:"WHDrawer",components:{BasicDrawer:K,BasicForm:M},emits:["success","register"],setup(s,{emit:o}){const r=W(!0),[l,{resetFields:h,setFieldsValue:g,validate:u}]=v({labelWidth:90,schemas:e,showActionButtonGroup:!1}),[p,{setDrawerProps:_,closeDrawer:S}]=Q(i=>d(this,null,function*(){h(),_({confirmLoading:!1}),r.value=!!(i!=null&&i.isUpdate),f(r)&&g(T({},i.record))})),E=$(()=>f(r)?"\u7F16\u8F91\u4EFB\u52A1":"\u65B0\u589E\u4EFB\u52A1");function x(){return d(this,null,function*(){try{const i=yield u();_({confirmLoading:!0}),O(i,f(r)).then(y=>{y.IsSuccessed?(S(),o("success")):c({title:a("sys.api.errorTip"),content:y.Message,getContainer:()=>document.body})})}finally{_({confirmLoading:!1})}})}return{registerDrawer:p,registerForm:l,getTitle:E,handleSubmit:x}}});function m(s,o,r,l,h,g){const u=D("BasicForm"),p=D("BasicDrawer");return z(),G(p,Y(s.$attrs,{onRegister:s.registerDrawer,showFooter:"",title:s.getTitle,width:"500px",onOk:s.handleSubmit}),{default:H(()=>[X(u,{onRegister:s.registerForm},null,8,["onRegister"])]),_:1},16,["onRegister","title","onOk"])}b=re(n,[["render",m]]),F=Object.freeze(Object.defineProperty({__proto__:null,default:b},Symbol.toStringTag,{value:"Module"}))}));export{oe as __tla,F as a,P as c,b as j,R as s};