import{d as I,r as l,s as k,K as x,e as i,f as u,g as d,n as m,F as w,j as N,C as T,t as F,u as s,a as D,A as E,h as _,l as O,L as p,M as S,N as j,_ as R}from"./index.0308b213.js";/* empty css                                                 *//* empty css                                                                    */import"./isBetween.903653b2.js";/* empty css                                                                 *//* empty css                                                                 *//* empty css                                                                      */import{_ as W}from"./OccupyModal.vue_vue_type_script_setup_true_lang.8777f9a9.js";import q from"./SubscribeModal.26c2e33a.js";const L={class:"plan"},P=["onClick"],K=O('<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-c5670e88><symbol id="icon-multiply" style="color:#409EFF;" viewBox="0 0 1024 1024" data-v-c5670e88><path d="M704 192h160v736H160V192h160v64h384zM288 512h448v-64H288zm0 256h448v-64H288zm96-576V96h256v96z" fill="currentColor" data-v-c5670e88></path></symbol></svg><svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-c5670e88><symbol id="icon-occupy" style="color:#409EFF;" viewBox="0 0 1024 1024" data-v-c5670e88><path d="M576 128v288l96-96 96 96V128h128v768H320V128zm-448 0h128v768H128z" fill="currentColor" data-v-c5670e88></path></symbol></svg><svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-c5670e88><symbol id="icon-del" style="color:#F56C6C;" viewBox="0 0 1024 1024" data-v-c5670e88><path d="M352 192V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64H96a32 32 0 0 1 0-64zm64 0h192v-64H416zM192 960a32 32 0 0 1-32-32V256h704v672a32 32 0 0 1-32 32zm224-192a32 32 0 0 0 32-32V416a32 32 0 0 0-64 0v320a32 32 0 0 0 32 32m192 0a32 32 0 0 0 32-32V416a32 32 0 0 0-64 0v320a32 32 0 0 0 32 32" fill="currentColor" data-v-c5670e88></path></symbol></svg>',3),$=I({props:{blockData:{type:Object,required:!0},rowIdx:{type:Number,required:!0},rowData:{type:Object,required:!0},cellHeight:{type:Number,default:0},scale:{type:Number,default:30},getPositionOffset:Function,getWidthAbout2Times:Function,reload:{type:Function,default:()=>!1}},setup(C){const e=C;l(null);const n=24,v=l(!1),f=t=>{const{event:o,index:a,item:c}=t,r=a;let g=[{svgIcon:"#icon-multiply",label:p("div",{},"\u9884\u7EA6"),onClick:()=>{V()}},{svgIcon:"#icon-occupy",label:p("div",{},"\u5360\u7528"),onClick:()=>{B()}}];o.target.className==="middle-item"&&g.push({label:p("div",{},"\u5220\u9664"),svgIcon:"#icon-del",onClick:()=>{A(r)}}),S.showContextMenu({x:o.x,y:o.y,items:g})},A=t=>{const o=e.blockData.taskArray[t];console.log("itemData\uFF1A\uFF1A\uFF1A",{index:t,itemData:o}),j.confirm("\u662F\u5426\u5220\u9664\u8BE5\u9884\u7EA6\uFF1F","\u63D0\u793A",{confirmButtonText:"\u662F",cancelButtonText:"\u5426",type:"warning"}).then(()=>{console.log("itemData:::",o)}).catch(()=>{})},H=l(899),M=k(()=>{const t=e.blockData;return e.getWidthAbout2Times(t.start,t.end)}),h=k(()=>{const t=e.blockData;return e.getPositionOffset(t.start,t.end)}),y=l(),V=x(function(){var t;v.value=!1,(t=y.value)==null||t.open({startTime:e.blockData.start,times:e.scale,userData:e.rowData})},250),b=l(),B=x(function(){var t;v.value=!1,(t=b.value)==null||t.open()},250),z=t=>e.getPositionOffset(t)-s(h)||0;return(t,o)=>(i(),u(w,null,[d("div",{draggable:!1,style:m({left:s(h)+"px",width:s(M)+"px",zIndex:H.value}),class:"task-block-item"},[d("div",L,[d("ul",{style:m({height:e.blockData.taskArray.length*n+10+"px"}),class:"middle",onClick:o[1]||(o[1]=a=>f({event:a,item:{},index:""}))},[e.blockData.taskArray.length>0?(i(!0),u(w,{key:0},N(e.blockData.taskArray,(a,c)=>(i(),u("li",{key:a.id,style:m({marginTop:c>0?"5px":"0px",height:n+"px",lineHeight:n+"px",left:z(a.start)+"px",top:c*n+"px",width:e.getWidthAbout2Times(a.start,a.end)+"px"}),class:"middle-item",onClick:r=>f({event:r,item:a,index:c}),onMousedown:o[0]||(o[0]=T(()=>{},["right","stop"]))},F(s(D)(a.start).format("HH:mm:ss"))+" - "+F(s(D)(a.end).format("HH:mm:ss")),45,P))),128)):E("",!0)],4)])],4),_(s(q),{ref_key:"subscribeRef",ref:y},null,512),_(s(W),{ref_key:"occupyRef",ref:b},null,512),K],64))}}),ot=R($,[["__scopeId","data-v-c5670e88"]]);export{ot as default};
