1
This commit is contained in:
Vendored
+1
@@ -0,0 +1 @@
|
||||
import{v as q,D as T,_ as J,d as K,c as g,b as m,l as Q,f as i,H as X,B as Y,w as a,I as L,h as l,u as o,F as S,e as n,G as Z,o as u,g as r,z as c,x as ee,i as E,p as te,j as le,m as oe}from"./index.89c8c085.js";import{t as v}from"./date.86e91942.js";import{s as ae}from"./settings.3d3ee3ea.js";import"./number.46c8fb59.js";const ne=q.create(),se=()=>ne({url:"https://holidays-jp.github.io/api/v1/2023/date.json",method:"GET"}),de={"Content-Type":"application/json;charsetset=UTF-8"},ue=_=>T({url:"/calendar/api/v1/event",method:"PUT",data:_}),ie=()=>T({url:"/calendar/api/v1/event",method:"GET",headers:de});const U=_=>(te("data-v-c6866494"),_=_(),le(),_),ce={key:0,class:"date-cell-holiday"},re=["onClick"],_e=U(()=>r("br",null,null,-1)),pe={key:1,class:"date-cell"},me=["onClick"],ve=["onClick"],fe={key:2,class:"date-cell-event"},he=U(()=>r("span",null,"\u5F85\u529E\u4E8B\u9879",-1)),be={class:"dialog-footer"},ge=E("Cancel"),ke=E(" Confirm "),ye=K({setup(_){const f=ae(),k=g({}),y=g([]),x=g({}),d=g({event_date:"",title:"",event_info:""}),D=m(new Date),p=m(!1),h="140px",w=m(!1),B=m(!0),F=m([]),$=["email","messageBox","\u624B\u673A\u77ED\u4FE1","\u5FAE\u4FE1\u901A\u77E5"],C=s=>{d.event_date=v(s),p.value=!0},N=async()=>{await ue(d).then(()=>{}),p.value=!1,O("refresh")},O=s=>{s==="refresh"&&(f.settings.isLoading=!0,f.settings.isRouterAlive=!1,oe(()=>{f.settings.isRouterAlive=!0,f.settings.isLoading=!1}))};return Q(async()=>{await se().then(s=>{Object.keys(s.data).forEach(t=>{k[t]=s.data[t]})}),await ie().then(s=>{y.length=0,s.data.forEach(t=>{y.push(t),x[t.event_date]=t.title})}),w.value=!0,B.value=!1}),(s,t)=>{const G=n("el-calendar"),V=n("el-table-column"),R=n("el-table"),b=n("el-form-item"),A=n("el-input"),z=n("el-checkbox"),H=n("el-checkbox-group"),M=n("el-form"),j=n("el-button"),P=n("el-dialog"),W=Z("loading");return u(),i(S,null,[w.value?X((u(),Y(G,{key:0,modelValue:D.value,"onUpdate:modelValue":t[0]||(t[0]=e=>D.value=e),"element-loading-text":"\u4E3B\u4EBA\uFF0C\u522B\u7740\u6025\u6211\u5728\u52AA\u529B\u52A0\u8F7D\u4E2D^_^"},{dateCell:a(({data:e})=>[Object.keys(o(k)).includes(o(v)(e.date))?(u(),i("div",ce,[r("span",{style:{color:"red"},onClick:I=>C(e.date)},c(e.date.getDate()),9,re),_e,r("span",null,c(o(k)[o(v)(e.date)]),1)])):(u(),i("div",pe,[e.date.getDay()==0||e.date.getDay()==6?(u(),i("span",{key:0,style:{color:"red"},onClick:I=>C(e.date)},c(e.date.getDate()),9,me)):(u(),i("span",{key:1,onClick:I=>C(e.date)},c(e.date.getDate()),9,ve))])),Object.keys(o(x)).includes(o(v)(e.date))?(u(),i("div",fe,[r("span",null,c(o(x)[o(v)(e.date)]),1)])):L("",!0)]),_:1},8,["modelValue"])),[[W,B.value]]):L("",!0),he,l(R,{data:o(y)},{default:a(()=>[l(V,{property:"event_date",label:"Date",width:"150"}),l(V,{property:"title",label:"title",width:"200"}),l(V,{property:"event_info",label:"eventInfo"})]),_:1},8,["data"]),l(P,{modelValue:p.value,"onUpdate:modelValue":t[5]||(t[5]=e=>p.value=e),title:"\u5F85\u529E\u4E8B\u9879"},{footer:a(()=>[r("span",be,[l(j,{onClick:t[4]||(t[4]=e=>p.value=!1)},{default:a(()=>[ge]),_:1}),l(j,{type:"primary",onClick:N},{default:a(()=>[ke]),_:1})])]),default:a(()=>[l(M,{model:o(d)},{default:a(()=>[l(b,{label:"\u65E5\u671F","label-width":h},{default:a(()=>[r("span",null,c(o(d).event_date),1)]),_:1}),l(b,{label:"title","label-width":h},{default:a(()=>[l(A,{modelValue:o(d).title,"onUpdate:modelValue":t[1]||(t[1]=e=>o(d).title=e),autocomplete:"off"},null,8,["modelValue"])]),_:1}),l(b,{label:"eventInfo","label-width":h},{default:a(()=>[l(A,{modelValue:o(d).event_info,"onUpdate:modelValue":t[2]||(t[2]=e=>o(d).event_info=e),autocomplete:"off",type:"textarea"},null,8,["modelValue"])]),_:1}),l(b,{label:"alert","label-width":h},{default:a(()=>[l(H,{modelValue:F.value,"onUpdate:modelValue":t[3]||(t[3]=e=>F.value=e),min:0,max:2},{default:a(()=>[(u(),i(S,null,ee($,e=>l(z,{key:e,label:e},{default:a(()=>[E(c(e),1)]),_:2},1032,["label"])),64))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"])]),_:1},8,["modelValue"])],64)}}});var De=J(ye,[["__scopeId","data-v-c6866494"]]);export{De as default};
|
||||
Reference in New Issue
Block a user