2 lines
4.9 KiB
JavaScript
2 lines
4.9 KiB
JavaScript
import{_ as q}from"./index.461f83d2.js";import{U as T,J as A,C as $,D as I,H as N,I as H,t as M,P,Q,F as S,w as j}from"./element-plus.ff90c99c.js";import{u as z,a as G}from"./vue-router.6d4cf914.js";import{c as J,d as L,e as O,f as W}from"./system.000e0218.js";import{e as K}from"./index.2c97e227.js";import{d as w,$ as f,s as X,r as Y,i as Z,o as ee,c as oe,W as e,Q as l,u as a,a as m,U as b}from"./@vue.f8dfc830.js";import"./lodash-es.a73406b7.js";import"./@vueuse.a2e59ee9.js";import"./@element-plus.0374639c.js";import"./@popperjs.36402333.js";import"./@ctrl.b082b0c1.js";import"./dayjs.7f1be2bc.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./memoize-one.4ee5c96d.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./@floating-ui.34a21088.js";import"./lodash.2e6f447e.js";import"./axios.075403c9.js";import"./pinia.4b196199.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.b6f240ee.js";import"./color.35874cfa.js";import"./clone.d8e67888.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.e6aad81b.js";import"./ms.a9ae1d6d.js";import"./nprogress.f73355d0.js";import"./vue-clipboard3.dca5bca3.js";import"./clipboard.16e4491b.js";import"./echarts.ac57a99a.js";import"./zrender.d54ce080.js";import"./tslib.60310f1a.js";import"./highlight.js.dba6fa1b.js";import"./@highlightjs.79024f1a.js";const te={class:"article-edit"},ae={class:"w-80"},le={class:"w-80"},ue={class:"w-80"},re={class:"w-80"},se={class:"w-80"},ne=w({name:"scheduledTaskEdit"}),We=w({...ne,setup(me){const i=z(),E=G(),t=f({id:"",name:"",command:"",expression:"",params:"",remark:"",status:1,type:1}),{removeTab:B}=K(),p=X(),V=f({name:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0"}],command:[{required:!0,message:"\u8BF7\u8F93\u5165thankphp\u547D\u4EE4\uFF0C\u5982vresion"}],expression:[{required:!0,message:"\u8BF7\u8F93\u5165crontab\u89C4\u5219\uFF0C\u4F8B\uFF1A5 9 * * *"}]}),v=async()=>{const r=await J({id:i.query.id});Object.keys(t).forEach(o=>{t[o]=r[o]})},d=Y([]),c=async()=>{var o;await((o=p.value)==null?void 0:o.validateField(["expression"]));const r=await L({expression:t.expression});d.value=r},x=async()=>{var r;await((r=p.value)==null?void 0:r.validate()),i.query.id?await O(t):await W(t),B(),E.back()};return Z(async()=>{!i.query.id||(await v(),await c())}),(r,o)=>{const C=T,_=A,n=$,s=I,h=N,y=H,k=M,F=P,D=Q,g=S,R=j,U=q;return ee(),oe("div",te,[e(_,{class:"!border-none",shadow:"never"},{default:l(()=>[e(C,{content:r.$route.meta.title,onBack:o[0]||(o[0]=u=>r.$router.back())},null,8,["content"])]),_:1}),e(_,{class:"mt-4 !border-none",shadow:"never"},{default:l(()=>[e(g,{ref_key:"formRef",ref:p,class:"ls-form",model:a(t),"label-width":"85px",rules:a(V)},{default:l(()=>[e(s,{label:"\u540D\u79F0",prop:"name"},{default:l(()=>[m("div",ae,[e(n,{modelValue:a(t).name,"onUpdate:modelValue":o[1]||(o[1]=u=>a(t).name=u),placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0",maxlength:"30",clearable:""},null,8,["modelValue"])])]),_:1}),e(s,{label:"\u7C7B\u578B",prop:"type"},{default:l(()=>[e(y,{modelValue:a(t).type,"onUpdate:modelValue":o[2]||(o[2]=u=>a(t).type=u)},{default:l(()=>[e(h,{label:1},{default:l(()=>[b("\u5B9A\u65F6\u4EFB\u52A1")]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(s,{label:"\u547D\u4EE4",prop:"command"},{default:l(()=>[m("div",le,[e(n,{modelValue:a(t).command,"onUpdate:modelValue":o[3]||(o[3]=u=>a(t).command=u),placeholder:"\u8BF7\u8F93\u5165thinkphp\u547D\u4EE4\uFF0C\u5982vresion",clearable:""},null,8,["modelValue"])])]),_:1}),e(s,{label:"\u53C2\u6570",prop:"params"},{default:l(()=>[m("div",ue,[e(n,{modelValue:a(t).params,"onUpdate:modelValue":o[4]||(o[4]=u=>a(t).params=u),placeholder:"\u8BF7\u8F93\u5165\u53C2\u6570\uFF0C\u4F8B:--id 8 --name \u6D4B\u8BD5",clearable:""},null,8,["modelValue"])])]),_:1}),e(s,{label:"\u72B6\u6001"},{default:l(()=>[e(k,{modelValue:a(t).status,"onUpdate:modelValue":o[5]||(o[5]=u=>a(t).status=u),"active-value":1,"inactive-value":2},null,8,["modelValue"])]),_:1}),e(s,{label:"\u89C4\u5219",prop:"expression"},{default:l(()=>[m("div",re,[e(n,{onBlur:c,modelValue:a(t).expression,"onUpdate:modelValue":o[6]||(o[6]=u=>a(t).expression=u),placeholder:"\u8BF7\u8F93\u5165crontab\u89C4\u5219\uFF0C\u4F8B\uFF1A5 9 * * *"},null,8,["modelValue"])])]),_:1}),e(s,null,{default:l(()=>[e(D,{data:a(d),style:{"max-width":"320px"}},{default:l(()=>[e(F,{prop:"time",label:"\u5E8F\u53F7","min-width":"80"}),e(F,{prop:"date",label:"\u6267\u884C\u65F6\u95F4","min-width":"240"})]),_:1},8,["data"])]),_:1}),e(s,{label:"\u5907\u6CE8",prop:"remark"},{default:l(()=>[m("div",se,[e(n,{modelValue:a(t).remark,"onUpdate:modelValue":o[7]||(o[7]=u=>a(t).remark=u),type:"textarea",autosize:{minRows:3,maxRows:6},maxlength:200,"show-word-limit":"",clearable:""},null,8,["modelValue"])])]),_:1})]),_:1},8,["model","rules"])]),_:1}),e(U,null,{default:l(()=>[e(R,{type:"primary",onClick:x},{default:l(()=>[b("\u4FDD\u5B58")]),_:1})]),_:1})])}}});export{We as default};
|