2 lines
4.1 KiB
JavaScript
2 lines
4.1 KiB
JavaScript
|
import{d as T,n as z,r as k,h as c,c as h,e as a,w as r,u as o,N as n,i as p,t as i,a as b,y as F,I as $,W as B,X as N,cK as Y,E as U,Y as j,$ as I,ah as L,aj as S,at as H,a0 as M}from"./index-4dcc0234.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";import{S as R}from"./sys-8ead7f22.js";import{_ as K}from"./cron-info.vue_vue_type_script_setup_true_lang-13e7b8d6.js";/* empty css */const W={class:"main-container"},X={class:"mt-[16px]"},q={key:0},A={key:1},G={class:"mt-[16px] flex justify-end"},he=T({__name:"cron",setup(J){const e=z({page:1,limit:10,total:0,loading:!0,data:[],searchParam:{title:"",type:"",last_time:""}}),y=k(),m=(d=1)=>{e.loading=!0,e.page=d,R({page:e.page,limit:e.limit,...e.searchParam}).then(l=>{e.loading=!1,e.data=l.data.data,e.total=l.data.total}).catch(()=>{e.loading=!1})};m();const _=k(null),w=d=>{_.value.setFormData(d),_.value.showDialog=!0};return(d,l)=>{const x=B,u=N,C=Y,f=U,D=j,v=I,s=L,E=S,P=H,V=M;return c(),h("div",W,[a(v,{class:"box-card !border-none",shadow:"never"},{default:r(()=>[a(v,{class:"box-card !border-none my-[16px] table-search-wrap",shadow:"never"},{default:r(()=>[a(D,{inline:!0,model:e.searchParam,ref_key:"searchFormRef",ref:y},{default:r(()=>[a(u,{label:o(n)("title"),prop:"title"},{default:r(()=>[a(x,{modelValue:e.searchParam.title,"onUpdate:modelValue":l[0]||(l[0]=t=>e.searchParam.title=t),placeholder:o(n)("titlePlaceholder")},null,8,["modelValue","placeholder"])]),_:1},8,["label"]),a(u,{label:o(n)("lastTime"),prop:"last_time"},{default:r(()=>[a(C,{modelValue:e.searchParam.last_time,"onUpdate:modelValue":l[1]||(l[1]=t=>e.searchParam.last_time=t),type:"datetimerange","value-format":"YYYY-MM-DD HH:mm:ss","start-placeholder":o(n)("startDate"),"end-placeholder":o(n)("endDate")},null,8,["modelValue","start-placeholder","end-placeholder"])]),_:1},8,["label"]),a(u,null,{default:r(()=>[a(f,{type:"primary",onClick:l[2]||(l[2]=t=>m())},{default:r(()=>[p(i(o(n)("search")),1)]),_:1}),a(f,{onClick:l[3]||(l[3]=t=>{var g;return(g=y.value)==null?void 0:g.resetFields()})},{default:r(()=>[p(i(o(n)("reset")),1)]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),b("div",X,[F((c(),$(E,{data:e.data,size:"large"},{empty:r(()=>[b("span",null,i(e.loading?"":o(n)("emptyData")),1)]),default:r(()=>[a(s,{prop:"title","show-overflow-tooltip":!0,label:o(n)("title"),"min-width":"150"},null,8,["label"]),a(s,{prop:"type_name",label:o(n)("typeName"),"min-width":"120"},null,8,["label"]),a(s,{label:o(n)("crondType"),"min-width":"180",align:"center"},{default:r(({row:t})=>[t.type=="crond"?(c(),h("span",q,i(t.crond_length)+i(t.crond_type_name),1)):(c(),h("span",A,i(o(n)("cron")),1))]),_:1},8,["label"]),a(s,{prop:"count",label:o(n)("count"),"min-width":"120"},null,8,["label"]),a(s,{label:o(n)("lastTime"),"min-width":"180",align:"center"},{default:r(({row:t})=>[p(i(t.last_time||""),1)]),_:1},8,["label"]),a(s,{label:o(n)("nextTime"),"min-width":"180",align:"center"},{default:r(({row:t})=>[p(i(t.next_time||""),1)]),_:1},8,["label"]),a(s,{label:o(n)("operation"),align:"right",fixed:"right",width:"100"},{default:r(({row:t})=>[a(f,{type:"primary",link:"",onClick:g=>w(t)},{default:r(()=>[p(i(o(n)("info")),1)]),_:2},1032,["onClick"])]),_:1},8,["label"])]),_:1},8,["data"])),[[V,e.loading]]),b("div",G,[a(P,{"current-page":e.page,"onUpdate:current-page":l[4]||(l[4]=t=>e.page=t),"page-size":e.limit,"onUpdate:page-size":l[5]||(l[5]=t=>e.limit=t),layout:"total, sizes, prev, pager, next, jumper",total:e.total,onSizeChange:l[6]||(l[6]=t=>m()),onCurrentChange:m},null,8,["current-page","page-size","total"])])])]),_:1}),a(K,{ref_key:"cronDialog",ref:_
|