import{r as a,a2 as e,c as t,e as s,Q as n,cP as l,o as c,h as p,w as i,i as m,j as o,t as d,a as r,k as u,F as g,l as y,A as f,W as _,m as h,z as k,y as v}from"./index-WeUkftbp.js";import{h as x}from"./moment.BD7_iMEL.js";import{_ as j}from"./_plugin-vue_export-helper.BCo6x5W8.js";const C=j({__name:"applyForMenuModal",props:{type:{type:Number,default:0},modal:{type:Boolean,default:!1},dateVal:{type:String,default:""}},emits:["cancel","ok"],setup(j,{emit:C}){let M=a([]);const $=j,{type:b,modal:F,dateVal:Q}=e($),S=t((()=>x(Q.value).format("M月D日"))),V=C;s([{img:"/static/image/attendance/apply-0.png",path:"",name:"请假",type:0},{img:"/static/image/attendance/apply-1.png",path:"",name:"出差",type:1},{img:"/static/image/attendance/apply-2.png",path:"",name:"外出",type:2},{img:"/static/image/attendance/apply-3.png",path:"",name:"补卡",type:3},{img:"/static/image/attendance/apply-4.png",path:"",name:"加班",type:4}]);const w=()=>{V("cancel")};n((()=>{z()}));const z=()=>{l({date:Q.value}).then((a=>{M.value=a.data})).catch((a=>{message.error(a.message)}))};return(a,e)=>{const t=k,s=v;return c(),p(t,{class:"main"},{default:i((()=>[m(t,{class:"title"},{default:i((()=>[o("选择申请单("+d(r(S))+")",1)])),_:1}),m(t,{class:"menu"},{default:i((()=>[(c(!0),u(g,null,y(r(M),(a=>(c(),p(t,{class:"item",key:a.type},{default:i((()=>[m(t,{class:"item-logo"},{default:i((()=>{return[m(t,{onClick:e=>(a=>{h(`/pages/users/examine/default?id=${a.id}&name=${a.name}`),V("cancel")})(a),class:f(["iconfont",(e=a.icon,e.indexOf("-")>-1?e:`icon-${e.slice(4)}`)]),style:_({color:a.color})},null,8,["onClick","class","style"])];var e})),_:2},1024),m(t,{class:"name"},{default:i((()=>[o(d(a.name),1)])),_:2},1024)])),_:2},1024)))),128))])),_:1}),m(s,{class:"iconfont icon-guanbi",onClick:w})])),_:1})}}},[["__scopeId","data-v-7c474c1a"]]);export{C as a};
