multiStoreAdmin/build/store/assets/edit.769d13a4.js

2 lines
4.8 KiB
JavaScript

import{_ as U}from"./index.189d8be3.js";import{P as q,I as A,C as I,D as M,G as N,H as $,t as z,L as G,M as H,F as L,w as O}from"./element-plus.9175fe58.js";import{u as P,a as S}from"./vue-router.43c06794.js";import{e as j,y as W,z as J,B as K,D as Q}from"./index.669f9987.js";import{d as w,a0 as f,s as X,r as Y,i as Z,o as ee,c as oe,W as e,O as l,u as t,a as m,T as b}from"./@vue.c3e77981.js";import"./@vueuse.a48d0173.js";import"./@element-plus.12c58ce2.js";import"./lodash-es.2b5acb28.js";import"./dayjs.1f51da93.js";import"./axios.13991fdc.js";import"./async-validator.fb49d0f5.js";import"./@ctrl.b082b0c1.js";import"./@popperjs.36402333.js";import"./escape-html.e5dfadb9.js";import"./normalize-wheel-es.8aeb3683.js";import"./lodash.6c5d06b3.js";import"./pinia.b5130627.js";import"./css-color-function.23ed6179.js";import"./color.9c368256.js";import"./clone.e9277309.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.212df0f4.js";import"./vue-clipboard3.f310ddad.js";import"./clipboard.141ef824.js";import"./echarts.8535e5a6.js";import"./zrender.3eba8991.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b8b719e9.js";const ae={class:"article-edit"},te={class:"w-80"},le={class:"w-80"},ue={class:"w-80"},se={class:"w-80"},re={class:"w-80"},ne=w({name:"scheduledTaskEdit"}),Oe=w({...ne,setup(me){const i=P(),E=S(),a=f({id:"",name:"",command:"",expression:"",params:"",remark:"",status:1,type:1}),{removeTab:B}=j(),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 W({id:i.query.id});Object.keys(a).forEach(o=>{a[o]=s[o]})},p=Y([]),c=async()=>{var o;await((o=d.value)==null?void 0:o.validateField(["expression"]));const s=await J({expression:a.expression});p.value=s},x=async()=>{var s;await((s=d.value)==null?void 0:s.validate()),i.query.id?await K(a):await Q(a),B(),E.back()};return Z(async()=>{!i.query.id||(await v(),await c())}),(s,o)=>{const C=q,_=A,n=I,r=M,y=N,h=$,D=z,F=G,k=H,g=L,R=O,T=U;return ee(),oe("div",ae,[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:t(a),"label-width":"85px",rules:t(V)},{default:l(()=>[e(r,{label:"\u540D\u79F0",prop:"name"},{default:l(()=>[m("div",te,[e(n,{modelValue:t(a).name,"onUpdate:modelValue":o[1]||(o[1]=u=>t(a).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(h,{modelValue:t(a).type,"onUpdate:modelValue":o[2]||(o[2]=u=>t(a).type=u)},{default:l(()=>[e(y,{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:t(a).command,"onUpdate:modelValue":o[3]||(o[3]=u=>t(a).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:t(a).params,"onUpdate:modelValue":o[4]||(o[4]=u=>t(a).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(D,{modelValue:t(a).status,"onUpdate:modelValue":o[5]||(o[5]=u=>t(a).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,modelValue:t(a).expression,"onUpdate:modelValue":o[6]||(o[6]=u=>t(a).expression=u),placeholder:"\u8BF7\u8F93\u5165crontab\u89C4\u5219\uFF0C\u4F8B\uFF1A5 9 * * *"},null,8,["modelValue"])])]),_:1}),e(r,null,{default:l(()=>[e(k,{data:t(p),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(r,{label:"\u5907\u6CE8",prop:"remark"},{default:l(()=>[m("div",re,[e(n,{modelValue:t(a).remark,"onUpdate:modelValue":o[7]||(o[7]=u=>t(a).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(T,null,{default:l(()=>[e(R,{type:"primary",onClick:x},{default:l(()=>[b("\u4FDD\u5B58")]),_:1})]),_:1})])}}});export{Oe as default};