suyuan/public/admin/assets/edit.5cb1ff84.js

2 lines
4.8 KiB
JavaScript
Raw Normal View History

2023-11-25 14:28:04 +08:00
import{_ as U}from"./index.c54e75e2.js";import{Q as q,H as T,B as A,C as N,N as $,O as I,t as S,I as j,J as H,D as L,w as M}from"./element-plus.c4a2af8a.js";import{u as O,a as z}from"./vue-router.12d45bc3.js";import{c as G,d as J,e as P,f as Q}from"./system.7352f651.js";import{e as K}from"./index.7c5c8d56.js";import{d as f,$ as F,s as W,r as X,j as Y,o as Z,c as ee,U as e,L as a,a as n,S as b}from"./@vue.e8706010.js";import"./@vueuse.1e5a6e21.js";import"./@element-plus.196c7323.js";import"./lodash-es.29c53eac.js";import"./dayjs.ff93117e.js";import"./axios.eb055ccc.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.82a509e0.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.ec5da75f.js";import"./pinia.dfca86b4.js";import"./vue-demi.ebc8116b.js";import"./css-color-function.31dc130b.js";import"./color.b6d632a4.js";import"./clone.7a47b02c.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./debug.3a33898e.js";import"./ms.a9ae1d6d.js";import"./nprogress.fa64f2fc.js";import"./vue-clipboard3.be0dfeee.js";import"./clipboard.824ba320.js";import"./echarts.8d7a50ae.js";import"./zrender.1084fa23.js";import"./tslib.60310f1a.js";import"./highlight.js.4ebdf9a4.js";import"./@highlightjs.2cdc8407.js";const oe={class:"article-edit"},te={class:"w-80"},ae=b("\u5B9A\u65F6\u4EFB\u52A1"),le={class:"w-80"},ue={class:"w-80"},se={class:"w-80"},re={class:"w-80"},ne=b("\u4FDD\u5B58"),me=f({name:"scheduledTaskEdit"}),Pe=f({...me,setup(ie){const m=O(),w=z(),t=F({id:"",name:"",command:"",expression:"",params:"",remark:"",status:1,type:1}),{removeTab:E}=K(),i=W(),B=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 u=await G({id:m.query.id});Object.keys(t).forEach(o=>{t[o]=u[o]})},d=X([]),p=async()=>{var o;await((o=i.value)==null?void 0:o.validateField(["expression"]));const u=await J({expression:t.expression});d.value=u},V=async()=>{var u;await((u=i.value)==null?void 0:u.validate()),m.query.id?await P(t):await Q(t),E(),w.back()};return Y(async()=>{!m.query.id||(await v(),await p())}),(u,o)=>{const x=q,c=T,r=A,s=N,C=$,h=I,y=S,_=j,k=H,D=L,g=M,R=U;return Z(),ee("div",oe,[e(c,{class:"!border-none",shadow:"never"},{default:a(()=>[e(x,{content:u.$route.meta.title,onBack:o[0]||(o[0]=l=>u.$router.back())},null,8,["content"])]),_:1}),e(c,{class:"mt-4 !border-none",shadow:"never"},{default:a(()=>[e(D,{ref_key:"formRef",ref:i,class:"ls-form",model:t,"label-width":"85px",rules:B},{default:a(()=>[e(s,{label:"\u540D\u79F0",prop:"name"},{default:a(()=>[n("div",te,[e(r,{modelValue:t.name,"onUpdate:modelValue":o[1]||(o[1]=l=>t.name=l),placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0",maxlength:"30",clearable:""},null,8,["modelValue"])])]),_:1}),e(s,{label:"\u7C7B\u578B",prop:"type"},{default:a(()=>[e(h,{modelValue:t.type,"onUpdate:modelValue":o[2]||(o[2]=l=>t.type=l)},{default:a(()=>[e(C,{label:1},{default:a(()=>[ae]),_:1})]),_:1},8,["modelValue"])]),_:1}),e(s,{label:"\u547D\u4EE4",prop:"command"},{default:a(()=>[n("div",le,[e(r,{modelValue:t.command,"onUpdate:modelValue":o[3]||(o[3]=l=>t.command=l),placeholder:"\u8BF7\u8F93\u5165thinkphp\u547D\u4EE4\uFF0C\u5982vresion",clearable:""},null,8,["modelValue"])])]),_:1}),e(s,{label:"\u53C2\u6570",prop:"params"},{default:a(()=>[n("div",ue,[e(r,{modelValue:t.params,"onUpdate:modelValue":o[4]||(o[4]=l=>t.params=l),placeholder:"\u8BF7\u8F93\u5165\u53C2\u6570\uFF0C\u4F8B:--id 8 --name \u6D4B\u8BD5",clearable:""},null,8,["modelValue"])])]),_:1}),e(s,{label:"\u72B6\u6001"},{default:a(()=>[e(y,{modelValue:t.status,"onUpdate:modelValue":o[5]||(o[5]=l=>t.status=l),"active-value":1,"inactive-value":2},null,8,["modelValue"])]),_:1}),e(s,{label:"\u89C4\u5219",prop:"expression"},{default:a(()=>[n("div",se,[e(r,{onBlur:p,modelValue:t.expr