text: var O=Object.defineProperty,N=Object.defineProperties;var W=Object.getOwnPropertyDescriptors;var A=Object.getOwnPropertySymbols;var I=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable;var T=(c,r,i)=>r in c?O(c,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):c[r]=i,U=(c,r)=>{for(var i in r||(r={}))I.call(r,i)&&T(c,i,r[i]);if(A)for(var i of A(r))J.call(r,i)&&T(c,i,r[i]);return c},j=(c,r)=>N(c,W(r));var B=(c,r,i)=>new Promise((_,F)=>{var E=p=>{try{w(i.next(p))}catch(g){F(g)}},d=p=>{try{w(i.throw(p))}catch(g){F(g)}},w=p=>p.done?_(p.value):Promise.resolve(p.value).then(E,d);w((i=i.apply(c,r)).next())});import{A as R,r as z,P as y,a0 as h,B as S,a1 as L,a6 as n,w as t,u as o,bC as M,aT as P,bD as X,bE as K,a4 as q,ae as x,H as k,J as Q,F as G,G as H,bF as Y,bA as C}from"./vendor.af2fe88b.js";import{P as Z}from"./index.0248b5d5.js";import{u as ee,B as te,a as ae}from"./index.22b4830b.js";import{u as $,ah as V,k as oe}from"./index.6733effe.js";import{h as ne}from"./edit.e0eb6616.js";/* empty css                *//* empty css                */import{a as le,d as ue,e as se}from"./list.fd3e66c9.js";/* empty css               *//* empty css                */import"./useWindowSizeFn.4124f9cf.js";import"./useContentViewHeight.b4e0fa30.js";/* empty css               */const ie=x(" \u70B9\u51FB\u4E0A\u4F20 "),re=x(" \u70B9\u51FB\u4E0B\u8F7D "),de=R({emits:["success","register"],setup(c,{emit:r}){const{uploadUrl:i}=$(),_=z([]),F=e=>{_.value.length>=2&&_.value.shift(),e.file.status==="done"?(console.log(e.file),d.data.zname=e.file.name,d.data.zpath=e.file.response.address+"/"+e.file.response.id+"."+e.file.response.sname):e.file.status==="error",console.log(_)},E=()=>{if(d.data.zpath){const e=d.data.zpath.split("/"),{apiUrl:a}=$();location.href=a+"/gen/att/one/"+e[e.length-1].split(".")[0]}},d=y({loadingText:"",url:"/bi/etl/main",data:{},rules:{name:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0"}]}}),[w,{setDrawerProps:p,changeLoading:g,closeDrawer:D}]=ee(e=>B(this,null,function*(){d.loadingText="\u52A0\u8F7D\u4E2D",g(!0),e.record.id?d.data=yield V.get({url:d.url+"/one/"+e.record.id}):(d.data=e.record,d.data.avtag=!0),g(!1)}));return(e,a)=>{const f=h("vxe-input"),l=h("vxe-form-item"),v=h("vxe-textarea"),u=h("vxe-switch"),b=h("vxe-form");return S(),L(o(te),q(e.$attrs,{loadingText:o(d).loadingText,showFooter:"",title:"ETL\u4EFB\u52A1",width:"70%",onOk:a[1]||(a[1]=s=>o(ne)(e.$refs.xForm,o(d),r,o(p),o(g),o(D))),onRegister:o(w)}),{default:n(()=>[t(b,{"title-colon":"",ref:(s,m)=>{m.xForm=s},"title-align":"right","title-width":"100",data:o(d).data,rules:o(d).rules},{default:n(()=>[t(l,{title:"ETL\u540D\u79F0",field:"name","item-render":{},span:"12","title-width":"150"},{default:n(({data:s})=>[t(f,{modelValue:s.name,"onUpdate:modelValue":m=>s.name=m,clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t(l,{title:"ETL\u4EE3\u7801",field:"code","item-render":{},span:"12","title-width":"150"},{default:n(({data:s})=>[t(f,{modelValue:s.code,"onUpdate:modelValue":m=>s.code=m,clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t(l,{title:"\u4EFB\u52A1\u8868\u8FBE\u5F0F",field:"cron","item-render":{},span:"24","title-width":"150"},{default:n(({data:s})=>[t(f,{modelValue:s.cron,"onUpdate:modelValue":m=>s.cron=m,clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t(l,{title:"ETL\u9644\u4EF6",field:"cron","item-render":{},span:"12","title-width":"150"},{default:n(()=>[t(o(M),{"file-list":_.value,"onUpdate:file-list":a[0]||(a[0]=s=>_.value=s),name:"file",multiple:!1,action:o(i),onChange:F},{default:n(()=>[t(o(P),null,{default:n(()=>[t(o(X)),ie]),_:1})]),_:1},8,["file-list","action"])]),_:1}),t(l,{title:"ETL\u9644\u4EF6",field:"cron","item-render":{},span:"12","title-width":"150"},{default:n(()=>[t(o(P),{onClick:E},{default:n(()=>[t(o(K)),re]),_:1})]),_:1}),t(l,{title:"ETL\u5907\u6CE8",field:"notes","item-render":{},span:"24","title-width":"150"},{default:n(({data:s})=>[t(v,{modelValue:s.notes,"onUpdate:modelValue":m=>s.notes=m,placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8",autosize:{minRows:4,maxRows:6},clearable:""},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t(l,{title:"\u662F\u5426\u53EF\u7528",field:"avtag","item-render":{},span:"12","title-width":"150"},{default:n(({data:s})=>[t(u,{modelValue:s.avtag,"onUpdate:modelValue":m=>s.avtag=m,"open-label":"\u662F","close-label":"\u5426"},null,8,["modelValue","onUpdate:modelValue"])]),_:1}),t(l,{title:"\u6392\u5E8F\u53F7",field:"ornum","item-render":{},span:"12","title-width":"150"},{default:n(({data:s})=>[t(f,{modelValue:s.ornum,"onUpdate:modelValue":m=>s.ornum=m,type:"number"},null,8,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1},8,["data","rules"])]),_:1},16,["loadingText","onRegister"])}}}),ce=x("\u67E5 \u8BE2"),me=x("\u65B0 \u589E"),fe=x("\u5220 \u9664"),pe=x("\u542F \u7528"),ge=x("\u7981 \u7528"),_e=["onClick"],he={class:"ant-tag ant-tag-success"},Fe={class:"ant-tag ant-tag-warning"},we={name:"BiEtlMain",inheritAttrs:!1};function xe(c){const r=z({}),i=y({name:""});oe();const _=y({id:"/bi/etl/main",highlightHoverRow:!0,checkboxConfig:{},height:"auto",pagerConfig:{pageSize:window.innerHeight<610?8:window.innerHeight>900?16:10},toolbarConfig:{slots:{buttons:"tbtns"}},proxyConfig:{ajax:{query:({page:e})=>{const a=Object.assign({},i);return a.page=`${e.currentPage}`,a.pageSize=`${e.pageSize}`,V.get({url:"/bi/etl/main",params:a})}}},columns:[{type:"checkbox",align:"center",width:42,fixed:"left"},{type:"seq",align:"center",width:50,fixed:"left"},{field:"name",title:"ETL\u4EFB\u52A1\u540D\u79F0",width:200,fixed:"left",slots:{default:"name_default"}},{field:"code",title:"ETL\u4EFB\u52A1\u4EE3\u7801",width:200},{field:"cron",title:"\u6267\u884C\u8868\u8FBE\u5F0F",width:200},{field:"crtim",title:"\u521B\u5EFA\u65F6\u95F4",width:140},{field:"avtag",title:"\u72B6\u6001",width:60,align:"center",slots:{default:"avtag_default"}},{field:"notes",title:"\u5907\u6CE8"},{title:"\u64CD\u4F5C",width:60,align:"center",slots:{default:"operate"}}]}),F=()=>{r.value.commitProxy("query")},E=e=>B(this,null,function*(){(yield C.modal.confirm("\u786E\u5B9A\u7ACB\u5373\u6267\u884C\u4E00\u6B21\u5417\uFF1F"))==="confirm"&&(yield V.post({url:"/bi/etl/main/once/"+e}))}),d=e=>B(this,null,function*(){let a=e.id;e.params&&e.params.url&&(a=e.params.url);const f=e.getCheckboxRecords();if(f.length==0){yield C.modal.message({content:"\u8BF7\u9009\u62E9\u540E\u518D\u8FDB\u884C\u542F\u52A8",status:"warning"});return}let l="";for(const u of f)l+=u.id+",";(yield C.modal.confirm("\u60A8\u786E\u5B9A\u8981\u542F\u52A8\u5417\uFF1F"))==="confirm"&&(yield V.post({url:a+"/start/"+l.substr(0,l.length-1)}),yield e.commitProxy("query"))}),w=e=>B(this,null,function*(){let a=e.id;e.params&&e.params.url&&(a=e.params.url);const f=e.getCheckboxRecords();if(f.length==0){yield C.modal.message({content:"\u8BF7\u9009\u62E9\u540E\u518D\u8FDB\u884C\u7981\u7528",status:"warning"});return}let l="";for(const u of f)l+=u.id+",";(yield C.modal.confirm("\u60A8\u786E\u5B9A\u8981\u7981\u7528\u5417\uFF1F"))==="confirm"&&(yield V.post({url:a+"/stop/"+l.substr(0,l.length-1)}),yield e.commitProxy("query"))}),[p,{openDrawer:g}]=ae();function D(){F()}return(e,a)=>{const f=h("vxe-input"),l=h("vxe-button"),v=h("vxe-grid");return S(),L(o(Z),{class:"ztable",contentFullHeight:""},{default:n(()=>[t(v,q({ref:(u,b)=>{b.xGrid=u,r.value=u}},o(_)),{tbtns:n(()=>[t(f,{modelValue:o(i).name,"onUpdate:modelValue":a[0]||(a[0]=u=>o(i).name=u),placeholder:"\u8F93\u5165\u540D\u79F0\u67E5\u8BE2"},null,8,["modelValue"]),t(l,{onClick:F,status:"primary"},{default:n(()=>[ce]),_:1}),t(l,{onClick:a[1]||(a[1]=u=>o(le)({},o(g)))},{default:n(()=>[me]),_:1}),t(l,{onClick:a[2]||(a[2]=u=>o(ue)(e.$refs.xGrid))},{default:n(()=>[fe]),_:1}),t(l,{onClick:a[3]||(a[3]=u=>d(e.$refs.xGrid))},{default:n(()=>[pe]),_:1}),t(l,{onClick:a[4]||(a[4]=u=>w(e.$refs.xGrid))},{default:n(()=>[ge]),_:1})]),name_default:n(({row:u})=>[k("span",{style:{cursor:"pointer",color:"#3e9ece"},onClick:b=>o(se)({id:u.id},o(g))},Q(u.name),9,_e)]),avtag_default:n(({row:u})=>[G(k("span",he,"\u542F\u7528",512),[[H,u.avtag===!0]]),G(k("span",Fe,"\u7981\u7528",512),[[H,u.avtag===!1]])]),operate:n(({row:u})=>[t(o(Y),{onClick:b=>E(u.id),style:{"font-size":"15px"},title:"\u7ACB\u5373\u6267\u884C\u4E00\u6B21"},null,8,["onClick"])]),_:1},16),t(de,{onRegister:o(p),onSuccess:D},null,8,["onRegister"])]),_:1})}}const ze=R(j(U({},we),{setup:xe}));export{ze as default};
  