WokerTask/public/admin/assets/edit.c09edae7.js

2 lines
4.9 KiB
JavaScript
Raw Normal View History

2023-12-27 14:06:33 +08:00
import{_ as T}from"./index.fade38ae.js";import{T as q,I as A,B as $,C as I,G as N,H as j,t as G,O as H,P as L,D as M,w as O}from"./element-plus.10e48c93.js";import{u as P,a as S}from"./vue-router.9f65afb1.js";import{c as z,d as J,e as K,f as Q}from"./system.cd6f7be8.js";import{e as W}from"./index.5a613cc5.js";import{d as w,$ as F,s as X,r as Y,j as Z,o as ee,c as oe,U as e,L as l,u as a,a as m,R as b}from"./@vue.51d7f2d8.js";import"./@vueuse.ec90c285.js";import"./@element-plus.c80b8015.js";import"./lodash-es.29c53eac.js";import"./dayjs.e873ead7.js";import"./@amap.8a62addd.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.08438971.js";import"./axios.105476b3.js";import"./pinia.56356cb7.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.7ac6f233.js";import"./color.44a05936.js";import"./clone.0afcbf90.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.86067895.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.40d5feba.js";const te={class:"article-edit"},ae={class:"w-80"},le={class:"w-80"},ue={class:"w-80"},se={class:"w-80"},re={class:"w-80"},ne=w({name:"scheduledTaskEdit"}),ze=w({...ne,setup(me){const i=P(),E=S(),t=F({id:"",name:"",command:"",expression:"",params:"",remark:"",status:1,type:1}),{removeTab:B}=W(),d=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 s=await z({id:i.query.id});Object.keys(t).forEach(o=>{t[o]=s[o]})},p=Y([]),c=async()=>{var o;await((o=d.value)==null?void 0:o.validateField(["expression"]));const s=await J({expression:t.expression});p.value=s},x=async()=>{var s;await((s=d.value)==null?void 0:s.validate()),i.query.id?await K(t):await Q(t),B(),E.back()};return Z(async()=>{!i.query.id||(await v(),await c())}),(s,o)=>{const C=q,_=A,n=$,r=I,h=N,y=j,k=G,f=H,D=L,g=M,R=O,U=T;return ee(),oe("div",te,[e(_,{class:"!border-none",shadow:"never"},{default:l(()=>[e(C,{content:s.$route.meta.title,onBack:o[0]||(o[0]=u=>s.$router.back())},null,8,["content"])]),_:1}),e(_,{class:"mt-4 !border-none",shadow:"never"},{default:l(()=>[e(g,{ref_key:"formRef",ref:d,class:"ls-form",model:a(t),"label-width":"85px",rules:a(V)},{default:l(()=>[e(r,{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(r,{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(r,{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(r,{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(r,{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(r,{label:"\u89C4\u5219",prop:"expression"},{default:l(()=>[m("div",se,[e(n,{onBlur:c,mod