| 1 |
- var G=Object.defineProperty,z=Object.defineProperties;var J=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols;var P=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable;var S=(o,t,a)=>t in o?G(o,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):o[t]=a,x=(o,t)=>{for(var a in t||(t={}))P.call(t,a)&&S(o,a,t[a]);if(D)for(var a of D(t))U.call(t,a)&&S(o,a,t[a]);return o},B=(o,t)=>z(o,J(t));var n=(o,t,a)=>new Promise((l,f)=>{var _=i=>{try{u(a.next(i))}catch(m){f(m)}},y=i=>{try{u(a.throw(i))}catch(m){f(m)}},u=i=>i.done?l(i.value):Promise.resolve(i.value).then(_,y);u((a=a.apply(o,t)).next())});import{u as Y,a as Z,_ as A}from"./useTable-bf847966.js";import{aj as T,b7 as H,at as Q}from"./index.js";import{c as W,_ as X}from"./viewDrawer.vue_vue_type_script_setup_true_lang-8f90aa79.js";import{i as I,a as h}from"./jobApi-dc75aaae.js";import{l as ee}from"./index-fe06ec6c.js";import{u as te}from"./index-d7f80bb7.js";import{P as ae}from"./ImportModal.vue_vue_type_style_index_0_scoped_a59c69fa_lang-367be871.js";import"./index-c733fbf6.js";import{O as j,B as oe}from"./antd-f204cf77.js";import{d as ie,f as R,B as se,q as re,Y as p,Z as ne,_ as F,l as k,u as s,a7 as d,a6 as w,E as v,$ as V,a9 as C,n as le}from"./vue-b33f04cb.js";import"./useForm-b1e549d3.js";import"./FormItem.vue_vue_type_script_lang-aa52e9e4.js";import"./useFormItem-1a9613e7.js";import"./uuid-31b8b5a4.js";import"./useSortable-764357db.js";import"./download-7fff4f5c.js";import"./index-2f799b33.js";import"./copyTextToClipboard-2136d900.js";import"./index-2f695166.js";import"./TextEditor-6383dadf.js";import"./onMountedOrActivated-3a1cee4e.js";import"./componentMap-5ed4f2d1.js";import"./useWindowSizeFn-e2b93e2a.js";import"./sortable.esm-4ae27e0b.js";import"./index-f7f1225a.js";const ce={class:"warp"},ue={class:"flex justify-between"},Me=ie({__name:"index",setup(o){const t=R();se(()=>n(this,null,function*(){t.value=yield ee({dictCode:"sys_create_type"})}));const{createConfirm:a,createMessage:l}=Q(),[f,{openDrawer:_}]=te(),y=R([{field:"startTime",direction:"DESC"}]),[u,{reload:i,getSelectRows:m,getSelectRowKeys:$,clearSelectedRowKeys:K}]=Y({title:"",api:I,rowKey:"id",columns:W,showIndexColumn:!0,rowSelection:{type:"checkbox"},clickToRowSelect:!1,useSearchForm:!1,bordered:!1,striped:!1,actionColumn:{width:220,title:"操作",dataIndex:"action"},beforeFetch:M,sortFn:L});function q(e){return n(this,null,function*(){if(e)yield h([e.id]),l.success("删除成功!"),yield i();else{const r=$();r.length>0?a({content:"你确定要删除?",iconType:"warning",onOk:()=>n(this,null,function*(){yield h(r),l.success("删除成功!"),yield i(),K()})}):l.warning("请选择要删除的数据")}})}function L(e){e!=null&&e.order&&(e!=null&&e.columnKey)&&(y.value=[{field:e.columnKey,direction:e.order.replace(/(\w+)(end)/g,"$1").toUpperCase()}])}function M(e){return n(this,null,function*(){return B(x({},e),{orders:y.value})})}function N(e){_(!0,{record:e})}function O(e,r){return n(this,null,function*(){r=="del"&&a({content:"你确定要删除?",iconType:"warning",onOk:()=>n(this,null,function*(){yield h(e.map(g=>g.id)),l.success("删除成功!"),yield i()})})})}function E(g){return n(this,arguments,function*({isUpdate:e,values:r}){yield i()})}return(e,r)=>{const g=re("auth");return p(),ne("div",ce,[F("div",ue,[k(s(ae),{title:"调度日志",class:"mb-2"})]),k(s(A),{onRegister:s(u)},{bodyCell:d(({column:b,record:c})=>[b.key==="jobGroup"?(p(),w(s(j),{key:0,color:s(T)(t.value,c.jobGroup,"fontColor")},{default:d(()=>[v(V(s(T)(t.value,c.jobGroup,"label")),1)]),_:2},1032,["color"])):C("",!0),b.key==="status"?(p(),w(s(j),{key:1,color:c.status===1?"red":"blue"},{default:d(()=>[v(V(s(H)(c.status,4)),1)]),_:2},1032,["color"])):C("",!0),b.key==="action"?(p(),w(s(Z),{key:2,actions:[{auth:"quartz:job:query",tooltip:"查看",label:"查看",icon:"icon-eye|iconfont",onClick:N.bind(null,c)},{auth:"quartz:jobLog:remove",icon:"icon-delete|iconfont",tooltip:"删除",label:"删除",color:"error",popConfirm:{title:"是否确认删除",placement:"left",confirm:q.bind(null,c)}}]},null,8,["actions"])):C("",!0)]),tableFooter:d(()=>[F("div",null,[le((p(),w(s(oe),{type:"primary",ghost:"",danger:"",class:"mr-2 btn btn-primary btn-sm",onClick:r[0]||(r[0]=b=>O(s(m)(),"del"))},{default:d(()=>[v(" 批量删除 ")]),_:1})),[[g,["storage:jobLog:remove"]]])])]),_:1},8,["onRegister"]),k(X,{onRegister:s(f),onSuccess:E},null,8,["onRegister"])])}}});export{Me as default};
|