@studio-west/employees 0.0.6 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/WorkTable.cjs +3 -3
- package/dist/WorkTable.js +253 -245
- package/package.json +1 -1
package/dist/WorkTable.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(function(e,D){typeof exports=="object"&&typeof module<"u"?module.exports=D(require("vue"),require("file-saver"),require("exceljs"),require("vue-i18n"),require("element-plus"),require("@imengyu/vue3-context-menu"),require("js-cookie")):typeof define=="function"&&define.amd?define(["vue","file-saver","exceljs","vue-i18n","element-plus","@imengyu/vue3-context-menu","js-cookie"],D):(e=typeof globalThis<"u"?globalThis:e||self,e["employees-vue"]=D(e.vue,e.fileSaver,e.ExcelJS,e.vueI18n,e.elementPlus,e.vue3ContextMenu,e.Cookies))})(this,function(e,D,
|
|
2
|
-
`+(
|
|
3
|
-
`+l.day.toString()},{default:e.withCtx(
|
|
1
|
+
(function(e,D){typeof exports=="object"&&typeof module<"u"?module.exports=D(require("vue"),require("file-saver"),require("exceljs"),require("vue-i18n"),require("element-plus"),require("@imengyu/vue3-context-menu"),require("js-cookie")):typeof define=="function"&&define.amd?define(["vue","file-saver","exceljs","vue-i18n","element-plus","@imengyu/vue3-context-menu","js-cookie"],D):(e=typeof globalThis<"u"?globalThis:e||self,e["employees-vue"]=D(e.vue,e.fileSaver,e.ExcelJS,e.vueI18n,e.elementPlus,e.vue3ContextMenu,e.Cookies))})(this,function(e,D,P,ee,u,Y,te){"use strict";function le(d){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(d){for(const c in d)if(c!=="default"){const s=Object.getOwnPropertyDescriptor(d,c);Object.defineProperty(o,c,s.get?s:{enumerable:!0,get:()=>d[c]})}}return o.default=d,Object.freeze(o)}const ae=le(P);function $(d,o){if(arguments.length===0||!d)return null;const c=o||"{Y}-{m}-{d} {G}:{i}:{s}";let s;typeof d=="object"?s=d:(typeof d=="string"&&(/^[0-9]+$/.test(d)?d=parseInt(d):d=d.replace(new RegExp(/-/gm),"/")),typeof d=="number"&&d.toString().length===10&&(d=d*1e3),s=new Date(d));const C="ru-RU",n={Y:s.getFullYear(),m:(s.getMonth()+1).toString().padStart(2,"0"),d:s.getDate(),dd:s.getDate().toString().padStart(2,"0"),G:s.getHours(),H:s.getHours().toString().padStart(2,"0"),i:s.getMinutes().toString().padStart(2,"0"),s:s.getSeconds().toString().padStart(2,"0"),D:new Intl.DateTimeFormat(C,{weekday:"short"}).format(s),F:new Intl.DateTimeFormat(C,{month:"long"}).format(s),M:new Intl.DateTimeFormat(C,{month:"short"}).format(s)};return c.replace(/{(dd|[YmdGHisDFM])+}/g,(G,w)=>n[w])}function x(d,o){let s=d.replace(/[0-9]/g,"").split("").reverse().map(C=>C.charCodeAt(0));return L(s,o,0),s.map(C=>String.fromCharCode(C)).reverse().join("")}function I(d){return d.split(" ",3).map((o,c)=>c!==0?o.slice(0,1)+".":o).join(" ")}function L(d,o,c){if(typeof o!="number"||o<1)return!0;if(o=o-1,(typeof d[c]!="number"||d[c]<65)&&(d[c]=65),d[c]+o<=90)d[c]=d[c]+o;else{let s=Math.floor((d[c]-65+o)/26);d[c]=(d[c]-65+o)%26+65,L(d,s,c+1)}}const ne={style:{height:"100px",width:"100%",display:"inline-block"}},oe={style:{height:"100px",width:"100%",display:"inline-block"}},re={key:2,class:"controls-container"},ie={key:0,style:{padding:"0.5em 1.5em"}},de={key:1,style:{padding:"0.5em 1.5em"}};return{__name:"WorkTable",props:{checkEdit:{type:Boolean,default:()=>!0},odata:Object,workSchedule:Object,fullName:{type:String,default:"Вы"}},setup(d){const{t:o,d:c}=ee.useI18n(),s=d,C=e.ref(!1),n=e.ref([]),G=e.ref(1),w=e.ref(new Date(new Date().getFullYear(),new Date().getMonth(),1).setMonth(new Date().getMonth()+Number(G.value))),i=e.ref([]),N=e.ref(0),V=e.ref(9),k=e.ref(8),F=e.ref(!1),J=e.ref(!0),B=e.ref(!1),H=e.ref("5"),T=e.ref(1),b=e.ref("Сектор разработок и эксплуатации сети"),U=e.ref([]),v=e.ref([]),h=e.ref({name:"Имя",length:0,code:""}),j=e.ref(!1),O=e.ref({zIndex:30,minWidth:220,x:500,y:200}),X=e.ref({});e.watch(b,async(a,t)=>{a!==t&&(v.value=[],F.value=!1,s.odata.personalManagerData.forEach(r=>{r.Status!=="Увольнение"&&r.Group===a&&(v.value.some(l=>(l==null?void 0:l.activeText)===r.Role)||v.value.push({val:!0,activeText:r.Role}))}),q())}),e.watch(G,async(a,t)=>{a!==t&&(w.value=new Date(new Date().getFullYear(),new Date().getMonth(),1).setMonth(new Date().getMonth()+Number(a)),Z())});const ue=(a,t,r,l)=>{h.value.ids=a.ids,h.value.key=a.key,h.value.add=a.days.length>0&&a.days[a.days.length-1].cont,h.value.level=t.level,h.value.day=r.cellIndex,O.value.y=l.clientY,O.value.x=l.clientX,t.level===2&&t.no===0&&s.checkEdit&&(h.value.name=o("workSchedule.autocomplete"),j.value=!0),t.level===3&&r.cellIndex-t.no===1&&s.checkEdit&&(E(r.cellIndex,a.ids),h.value.name=o("workSchedule.modeSelection"),j.value=!0)},Z=()=>{const a=X.value,t=new Date(w.value),r=new Date(t.getFullYear(),t.getMonth()+1,0).getDate();let l=[],g=0;for(let p=1;p<=r;p++){const y=$(t.setDate(p),"{Y}-{m}-{dd}");g+=a.nowork.includes(y)||a.holidays.includes(y)?0:a.preholidays.includes(y)?7:8;const f=a.nowork.includes(y)?"nowork":a.holidays.includes(y)?"holiday":a.preholidays.includes(y)?"preholiday":"";l.push({day:p,holidays:f,weekday:c(new Date(t.getFullYear(),t.getMonth(),p),"day")})}N.value=g,i.value=l,s.odata.getPersonalManagerData({}).then(p=>{var y;b.value=(y=p.find(f=>f.Status!=="Увольнение"&&f.Description===s.fullName))==null?void 0:y.Group,p.forEach(f=>{f.Status!=="Увольнение"&&(U.value.some(S=>(S==null?void 0:S.value)===f.Group)||U.value.push({value:f.Group,label:f.Group,key:f.Group}),f.Group===b.value&&!v.value.some(S=>(S==null?void 0:S.activeText)===f.Role)&&v.value.push({val:!0,activeText:f.Role}))}),q(),J.value=!1})},se=e.computed(()=>!n.value.some(a=>a.contHour!==N.value)),Q=(a,t)=>{var p,y,f;const r=new Date(w.value),l=`${r.getFullYear()}-${(r.getMonth()+1).toString().padStart(2,"0")}-${a.toString().padStart(2,"0")}`,g=(p=n.value[t])==null?void 0:p.days.findIndex(S=>S.day===l);return t===-1||g===-1?"":((y=n.value[t].days[g])==null?void 0:y.time)+" "+((f=n.value[t].days[g])==null?void 0:f.tips)},q=()=>{n.value=[];let a=[];s.odata.personalManagerData.forEach(t=>{if(t.Status!=="Увольнение"&&t.Group===b.value&&v.value.some(r=>r.val&&r.activeText===t.Role)){let r=I(t.Description);a.push(t.Code),n.value.push({name:r+" ("+t.Role+")",days:[],contHour:0,code:t.Code,id:!1,ids:n.value.length})}}),ce(a),B.value=!1},ce=a=>{s.workSchedule.getWorkSchedule({code:a,date:$(new Date(w.value),"{Y}-{m}-{dd}")}).then(t=>{t.forEach((r,l)=>{r!==null&&(n.value[l].days=r.data.days,n.value[l].id=r.id)}),M()})},M=()=>{n.value.forEach(a=>{a.contHour=a.days.reduce((t,r)=>t+r.time,0)})},ge=a=>{n.value[a].days=[],M()},he=a=>{switch(H.value){case"5":for(let t=T.value;t<=i.value.length;t++)i.value[t-1].holidays===""&&E(t,a,!0),i.value[t-1].holidays==="preholiday"&&(k.value-=1,E(t,a,!0),k.value+=1);break;case"2x2":for(let t=T.value;t<=i.value.length;t+=4)E(t,a,!0),t+1<=i.value.length&&E(t+1,a,!0);break;case"2x5":for(let t=T.value;t<=i.value.length;t+=7)for(let r=t;r<t+5&&r<=i.value.length;r++)i.value[r-1].holidays==="preholiday"?(k.value-=1,E(r,a,!0),k.value+=1):E(r,a,!0);break}},E=(a,t,r=!1)=>{const{date:l,ind:g}=R(a,t);g===-1?(n.value[t].days.push({day:l,time:k.value,tips:`(${V.value}:00 - ${V.value+k.value+1}:00)`}),M()):r||(k.value=n.value[t].days[g].time,V.value=parseInt(n.value[t].days[g].tips.slice(1,-12)))},fe=(a,t)=>{const{ind:r}=R(a,t);n.value[t].days.splice(r,1),M(),document.querySelector(".app-main").click()},K=(a,t)=>{const{date:r,ind:l}=R(a,t);n.value[t].days[l]={day:r,time:k.value,tips:`(${V.value}:00 - ${V.value+k.value+1}:00)`},M()},R=(a,t)=>{var g;const r=$(new Date(w.value).setDate(a),"{Y}-{m}-{dd}"),l=(g=n.value[t])==null?void 0:g.days.findIndex(p=>p.day===r);return{date:r,ind:l}},me=async()=>{var _;C.value=!0;const a=new ae.Workbook,t=a.addWorksheet(c(w.value,"month"),{pageSetup:{paperSize:9,orientation:"landscape",fitToPage:!0}}),r={vertical:"middle",horizontal:"center"},l={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},g={vertical:"middle",horizontal:"center",wrapText:!0};t.mergeCells(`A1:${x("A1",i.value.length+5)}1`),t.mergeCells(`A2:${x("A2",i.value.length+5)}2`),t.mergeCells("A3:A4"),t.mergeCells(`B3:${x("B3",i.value.length)}3`),t.mergeCells(`${x("B3",i.value.length+1)}3:${x("B3",i.value.length+2)}3`),t.mergeCells(`${x("B3",i.value.length+3)}3:${x("B4",i.value.length+3)}4`),t.mergeCells(`${x("B3",i.value.length+4)}3:${x("B4",i.value.length+4)}4`),t.getCell("A1").value=o("workSchedule.firm"),t.getCell("A2").value=o("workSchedule.title",{name:b.value})+c(w.value,"month")+` ${new Date(w.value).getFullYear()}`,t.getCell("A3").value=o("workSchedule.month"),t.getCell("B3").value=o("workSchedule.numbersMonth"),t.getCell(3,i.value.length+2).value=o("workSchedule.onSchedule"),t.getCell(3,i.value.length+4).value=o("workSchedule.acquainted"),t.getCell(3,i.value.length+5).value=o("workSchedule.date"),t.getCell(4,i.value.length+2).value=o("workSchedule.days"),t.getCell(4,i.value.length+3).value=`${o("workSchedule.hours")} (${N.value})`;for(let m=2;m<=i.value.length+1;m++)t.getCell(4,m).value=i.value[m-2].weekday+`
|
|
2
|
+
`+(m-1),t.getColumn(m).width=6,t.getColumn(m).alignment=g,t.getCell(4,m).border=l;t.getRow(1).height=40,t.getRow(2).height=30,t.getRow(3).height=20,t.getColumn(1).width=15,t.getColumn(i.value.length+2).width=5,t.getColumn(i.value.length+3).width=6,t.getColumn(i.value.length+4).width=13,t.getColumn(i.value.length+5).width=13,t.getColumn(1).alignment=g,t.getCell("A2").alignment=r,t.getCell("A3").alignment=r,t.getCell("B3").alignment=r,t.getCell(3,i.value.length+2).alignment=r,t.getColumn(i.value.length+2).alignment=g,t.getColumn(i.value.length+3).alignment=g,t.getColumn(i.value.length+4).alignment=r,t.getColumn(i.value.length+5).alignment=r,t.getCell("A3").border=l,t.getCell("B3").border=l,t.getCell(3,i.value.length+2).border=l,t.getCell(4,i.value.length+2).border=l,t.getCell(3,i.value.length+4).border=l,t.getCell(3,i.value.length+5).border=l,t.getCell(4,i.value.length+3).border=l;let p=0;for(const m of n.value){let z=[m.name];for(let A=1;A<=i.value.length;A++){const{ind:W}=R(A,p);W!==-1?z[A]=`${m.days[W].time} ${m.days[W].tips}`:z[A]=" "}z.push(((_=m.days)==null?void 0:_.length)||" ",m.contHour||0);const ye=t.addRow(z);ye.border=l,p++}let y="Начальник отдела";s.odata.personalManagerData.forEach(m=>{m.Status!=="Увольнение"&&m.Role==="Начальник отдела правовой и кадровой работы"&&(y=m.Description)}),t.mergeCells(`A${n.value.length+6}:P${n.value.length+6}`),t.mergeCells(`Q${n.value.length+6}:AG${n.value.length+6}`),t.mergeCells(`B${n.value.length+8}:E${n.value.length+8}`),t.mergeCells(`F${n.value.length+8}:L${n.value.length+8}`),t.mergeCells(`M${n.value.length+8}:P${n.value.length+8}`),t.mergeCells(`S${n.value.length+8}:V${n.value.length+8}`),t.mergeCells(`W${n.value.length+8}:AC${n.value.length+8}`),t.mergeCells(`AD${n.value.length+8}:AG${n.value.length+8}`),t.mergeCells(`Z${n.value.length+9}:AA${n.value.length+9}`),t.getCell(`A${n.value.length+6}`).value=o("workSchedule.byInitials"),t.getCell(`Q${n.value.length+6}`).value=o("workSchedule.supervisorHR"),t.getCell(`B${n.value.length+8}`).value=o("workSchedule.compiled")+":",t.getCell(`S${n.value.length+8}`).value=o("workSchedule.approved")+":",t.getCell(`M${n.value.length+8}`).value=I(s.fullName),t.getCell(`AD${n.value.length+8}`).value=I(y),t.getCell(`Z${n.value.length+9}`).value=o("workSchedule.printPlace"),t.getCell(`A${n.value.length+6}`).alignment={vertical:"middle",horizontal:"right"},t.getCell(`Q${n.value.length+6}`).alignment={vertical:"middle",horizontal:"right"},t.getCell(`B${n.value.length+8}`).alignment={vertical:"middle",horizontal:"right"},t.getCell(`F${n.value.length+8}`).alignment={vertical:"middle",horizontal:"right"},t.getCell(`M${n.value.length+8}`).alignment={vertical:"middle",horizontal:"left"},t.getCell(`AD${n.value.length+8}`).alignment={vertical:"middle",horizontal:"left"},t.getCell(`Z${n.value.length+9}`).alignment=r,t.getCell(`F${n.value.length+8}`).border={bottom:{style:"thin"}},t.getCell(`W${n.value.length+8}`).border={bottom:{style:"thin"}};const f="export_"+$(Date.now(),"{dd}.{m}.{Y}")+".xlsx",S=await a.xlsx.writeBuffer();D.saveAs(new Blob([S]),f),C.value=!1},pe=async()=>{F.value||s.workSchedule.addWorkSchedule({data:n.value,date:$(new Date(w.value),"{Y}-{m}-{dd}")}).then(a=>F.value=a)};return fetch("https://cp.avanta-telecom.ru/api/v2/calendar/getHoliday",{method:"GET",mode:"cors",cache:"default",credentials:"same-origin",headers:{"Content-Type":"application/json",Accept:"text/html","X-Token":te.get("X-Token")||!1,"Cache-Control":"no-cache"},redirect:"follow",referrerPolicy:"no-referrer"}).then(a=>{if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return a.json()}).then(a=>{X.value=a.result,Z()}).catch(a=>{console.error("Ошибка загрузки файла:",a)}),(a,t)=>{const r=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",null,[d.checkEdit?(e.openBlock(),e.createBlock(e.unref(u.ElSelect),{key:0,modelValue:b.value,"onUpdate:modelValue":t[0]||(t[0]=l=>b.value=l),placeholder:"Select",style:{width:"240px","margin-bottom":".5rem","margin-right":".5rem"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(U.value,l=>(e.openBlock(),e.createBlock(e.unref(u.ElOption),{key:l.value,label:l.label,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),d.checkEdit?(e.openBlock(),e.createBlock(e.unref(u.ElButton),{key:1,plain:"",onClick:t[1]||(t[1]=l=>B.value=!0),style:{"margin-bottom":".5rem"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("workSchedule.jobTitle")),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(e.unref(u.ElSkeleton),{style:{width:"100%"},loading:J.value,animated:""},{template:e.withCtx(()=>[e.createVNode(e.unref(u.ElSkeletonItem),{variant:"text",style:{width:"100%",height:"2rem"}}),e.createVNode(e.unref(u.ElSkeletonItem),{variant:"text",style:{width:"180px",height:"4rem","margin-right":"4px"}}),e.createVNode(e.unref(u.ElSkeletonItem),{variant:"text",style:{width:"calc( 100% - 184px)",height:"4rem"}}),e.createVNode(e.unref(u.ElSkeletonItem),{variant:"text",style:{width:"180px",height:"8rem","margin-right":"4px"}}),e.createVNode(e.unref(u.ElSkeletonItem),{variant:"text",style:{width:"calc( 100% - 184px)",height:"8rem"}})]),default:e.withCtx(()=>[e.createVNode(e.unref(u.ElTable),{id:"printTable",data:n.value,style:{width:"100%"},size:"small",align:"center",onCellClick:ue,"empty-text":e.unref(o)("workSchedule.emptyText")},{default:e.withCtx(()=>[e.createVNode(e.unref(u.ElTableColumn),{label:e.unref(o)("workSchedule.title",{name:b.value})+e.unref(c)(w.value,"month")+` ${new Date(w.value).getFullYear()}`,align:"center",height:"34"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.ElTableColumn),{label:e.unref(o)("workSchedule.month"),width:"180",align:"center"},{default:e.withCtx(l=>[e.createElementVNode("div",ne,e.toDisplayString(n.value[l.$index].name),1)]),_:1},8,["label"]),e.createVNode(e.unref(u.ElTableColumn),{label:e.unref(o)("workSchedule.numbersMonth"),align:"center"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,l=>(e.openBlock(),e.createBlock(e.unref(u.ElTableColumn),{key:l.day,width:"45","class-name":l.holidays,align:"center",label:l.weekday+`
|
|
3
|
+
`+l.day.toString()},{default:e.withCtx(g=>[e.createElementVNode("div",oe,e.toDisplayString(Q(l.day,g.$index)||" "),1)]),_:2},1032,["class-name","label"]))),128))]),_:1},8,["label"]),e.createVNode(e.unref(u.ElTableColumn),{label:e.unref(o)("workSchedule.onSchedule"),align:"center"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.ElTableColumn),{label:e.unref(o)("workSchedule.days"),align:"center"},{default:e.withCtx(l=>[e.createTextVNode(e.toDisplayString(n.value[l.$index].days.length||0),1)]),_:1},8,["label"]),e.createVNode(e.unref(u.ElTableColumn),{label:`${e.unref(o)("workSchedule.hours")} ( ${N.value} )`,align:"center"},{default:e.withCtx(l=>[e.createElementVNode("div",{style:e.normalizeStyle(`color: ${N.value===l.row.contHour?"green":"red"};`)},e.toDisplayString(l.row.contHour),5)]),_:1},8,["label"])]),_:1},8,["label"])]),_:1},8,["label"])]),_:1},8,["data","empty-text"])]),_:1},8,["loading"]),se.value&&d.checkEdit?(e.openBlock(),e.createElementBlock("div",re,[e.createTextVNode(e.toDisplayString(e.unref(o)("workSchedule.chartsFilled"))+": ",1),F.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(u.ElButton),{key:0,type:"primary",onClick:pe},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("workSchedule.confirm")),1)]),_:1})),t[16]||(t[16]=e.createTextVNode()),e.createElementVNode("span",null,e.toDisplayString(d.fullName),1)])):e.createCommentVNode("",!0),e.withDirectives((e.openBlock(),e.createBlock(e.unref(u.ElButton),{disabled:C.value,plain:"",onClick:me,style:{"margin-top":".5rem"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("workSchedule.exportExcel")),1)]),_:1},8,["disabled"])),[[r,C.value]]),e.createVNode(e.unref(u.ElDialog),{title:e.unref(o)("workSchedule.jobTitle"),modelValue:B.value,"onUpdate:modelValue":t[3]||(t[3]=l=>B.value=l),width:"400px"},{footer:e.withCtx(()=>[e.createVNode(e.unref(u.ElButton),{onClick:t[2]||(t[2]=l=>B.value=!1),size:"default"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("workSchedule.cancel")),1)]),_:1}),e.createVNode(e.unref(u.ElButton),{size:"default",type:"primary",onClick:q},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("workSchedule.select")),1)]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(u.ElForm),{ref:"dialogForm",model:v.value,autocomplete:"on"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,l=>(e.openBlock(),e.createBlock(e.unref(u.ElFormItem),null,{default:e.withCtx(()=>[e.createVNode(e.unref(u.ElSwitch),{modelValue:l.val,"onUpdate:modelValue":g=>l.val=g,"active-text":l.activeText},null,8,["modelValue","onUpdate:modelValue","active-text"])]),_:2},1024))),256))]),_:1},8,["model"])]),_:1},8,["title","modelValue"]),e.createVNode(e.unref(Y.ContextMenu),{show:j.value,"onUpdate:show":t[15]||(t[15]=l=>j.value=l),options:O.value},{default:e.withCtx(()=>[e.createVNode(e.unref(Y.ContextMenuItem),{label:h.value.name,disabled:""},null,8,["label"]),e.createVNode(e.unref(Y.ContextMenuSeparator)),h.value.level===2?(e.openBlock(),e.createElementBlock("div",ie,[e.createVNode(e.unref(u.ElRadioGroup),{modelValue:H.value,"onUpdate:modelValue":t[4]||(t[4]=l=>H.value=l),size:"small"},{default:e.withCtx(()=>[e.createVNode(e.unref(u.ElRadioButton),{label:e.unref(o)("workSchedule.Days5"),value:"5"},null,8,["label"]),e.createVNode(e.unref(u.ElRadioButton),{label:"2 Х 2",value:"2x2"}),e.createVNode(e.unref(u.ElRadioButton),{label:"2 Х 5",value:"2x5"})]),_:1},8,["modelValue"]),t[17]||(t[17]=e.createElementVNode("br",null,null,-1)),e.createElementVNode("span",null,e.toDisplayString(e.unref(o)("workSchedule.fromDate"))+":",1),e.createVNode(e.unref(u.ElSlider),{modelValue:T.value,"onUpdate:modelValue":t[5]||(t[5]=l=>T.value=l),step:1,min:1,max:i.value.length},null,8,["modelValue","max"]),e.createElementVNode("span",null,e.toDisplayString(e.unref(o)("workSchedule.with"))+":",1),e.createVNode(e.unref(u.ElSlider),{modelValue:V.value,"onUpdate:modelValue":t[6]||(t[6]=l=>V.value=l),step:1,min:8,max:11},null,8,["modelValue"]),e.createElementVNode("span",null,e.toDisplayString(e.unref(o)("workSchedule.duration"))+":",1),e.createVNode(e.unref(u.ElSlider),{modelValue:k.value,"onUpdate:modelValue":t[7]||(t[7]=l=>k.value=l),step:1,min:4,max:12},null,8,["modelValue"]),e.createVNode(e.unref(u.ElButton),{style:{"margin-top":".5rem"},size:"small",onClick:t[8]||(t[8]=l=>he(h.value.ids))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("workSchedule.fillOut")),1)]),_:1}),e.createVNode(e.unref(u.ElButton),{style:{"margin-top":".5rem"},size:"small",onClick:t[9]||(t[9]=l=>ge(h.value.ids))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("workSchedule.clearRow")),1)]),_:1})])):(e.openBlock(),e.createElementBlock("div",de,[e.createElementVNode("div",null,e.toDisplayString(Q(h.value.day,h.value.ids)),1),t[18]||(t[18]=e.createElementVNode("br",null,null,-1)),e.createElementVNode("span",null,e.toDisplayString(e.unref(o)("workSchedule.with"))+":",1),e.createVNode(e.unref(u.ElSlider),{modelValue:V.value,"onUpdate:modelValue":t[10]||(t[10]=l=>V.value=l),step:1,min:8,max:11,onChange:t[11]||(t[11]=l=>K(h.value.day,h.value.ids))},null,8,["modelValue"]),e.createElementVNode("span",null,e.toDisplayString(e.unref(o)("workSchedule.duration"))+":",1),e.createVNode(e.unref(u.ElSlider),{modelValue:k.value,"onUpdate:modelValue":t[12]||(t[12]=l=>k.value=l),step:1,min:4,max:12,onChange:t[13]||(t[13]=l=>K(h.value.day,h.value.ids))},null,8,["modelValue"]),e.createVNode(e.unref(u.ElButton),{style:{"margin-top":".5rem"},size:"small",onClick:t[14]||(t[14]=l=>fe(h.value.day,h.value.ids))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("workSchedule.delete")),1)]),_:1})]))]),_:1},8,["show","options"])])}}}});
|
package/dist/WorkTable.js
CHANGED
|
@@ -1,57 +1,65 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { saveAs as
|
|
3
|
-
import * as
|
|
4
|
-
import { useI18n as
|
|
5
|
-
import { ElSelect as
|
|
6
|
-
import { ContextMenu as
|
|
7
|
-
import
|
|
8
|
-
function P(
|
|
9
|
-
if (arguments.length === 0 || !
|
|
1
|
+
import { ref as m, watch as ge, computed as be, resolveDirective as $e, openBlock as C, createElementBlock as z, createBlock as R, unref as a, withCtx as v, Fragment as te, renderList as ae, createCommentVNode as q, createTextVNode as E, toDisplayString as c, createVNode as i, createElementVNode as x, normalizeStyle as xe, withDirectives as De } from "vue";
|
|
2
|
+
import { saveAs as Ee } from "file-saver";
|
|
3
|
+
import * as Ve from "exceljs";
|
|
4
|
+
import { useI18n as Me } from "vue-i18n";
|
|
5
|
+
import { ElSelect as Te, ElOption as Ae, ElButton as B, ElSkeleton as Be, ElSkeletonItem as N, ElTable as Fe, ElTableColumn as Y, ElDialog as ze, ElForm as Re, ElFormItem as Ye, ElSwitch as Ge, ElRadioGroup as He, ElRadioButton as ne, ElSlider as W } from "element-plus";
|
|
6
|
+
import { ContextMenu as Ue, ContextMenuItem as je, ContextMenuSeparator as Ie } from "@imengyu/vue3-context-menu";
|
|
7
|
+
import Ne from "js-cookie";
|
|
8
|
+
function P(d, o) {
|
|
9
|
+
if (arguments.length === 0 || !d)
|
|
10
10
|
return null;
|
|
11
|
-
const
|
|
12
|
-
let
|
|
13
|
-
typeof
|
|
14
|
-
const
|
|
15
|
-
Y:
|
|
16
|
-
m: (
|
|
17
|
-
d:
|
|
18
|
-
dd:
|
|
19
|
-
G:
|
|
20
|
-
H:
|
|
21
|
-
i:
|
|
22
|
-
s:
|
|
23
|
-
D: new Intl.DateTimeFormat(
|
|
24
|
-
F: new Intl.DateTimeFormat(
|
|
25
|
-
M: new Intl.DateTimeFormat(
|
|
11
|
+
const h = o || "{Y}-{m}-{d} {G}:{i}:{s}";
|
|
12
|
+
let s;
|
|
13
|
+
typeof d == "object" ? s = d : (typeof d == "string" && (/^[0-9]+$/.test(d) ? d = parseInt(d) : d = d.replace(new RegExp(/-/gm), "/")), typeof d == "number" && d.toString().length === 10 && (d = d * 1e3), s = new Date(d));
|
|
14
|
+
const $ = "ru-RU", n = {
|
|
15
|
+
Y: s.getFullYear(),
|
|
16
|
+
m: (s.getMonth() + 1).toString().padStart(2, "0"),
|
|
17
|
+
d: s.getDate(),
|
|
18
|
+
dd: s.getDate().toString().padStart(2, "0"),
|
|
19
|
+
G: s.getHours(),
|
|
20
|
+
H: s.getHours().toString().padStart(2, "0"),
|
|
21
|
+
i: s.getMinutes().toString().padStart(2, "0"),
|
|
22
|
+
s: s.getSeconds().toString().padStart(2, "0"),
|
|
23
|
+
D: new Intl.DateTimeFormat($, { weekday: "short" }).format(s),
|
|
24
|
+
F: new Intl.DateTimeFormat($, { month: "long" }).format(s),
|
|
25
|
+
M: new Intl.DateTimeFormat($, { month: "short" }).format(s)
|
|
26
26
|
};
|
|
27
|
-
return
|
|
27
|
+
return h.replace(/{(dd|[YmdGHisDFM])+}/g, (J, S) => n[S]);
|
|
28
28
|
}
|
|
29
|
-
function M(
|
|
30
|
-
let
|
|
31
|
-
return
|
|
29
|
+
function M(d, o) {
|
|
30
|
+
let s = d.replace(/[0-9]/g, "").split("").reverse().map(($) => $.charCodeAt(0));
|
|
31
|
+
return he(s, o, 0), s.map(($) => String.fromCharCode($)).reverse().join("");
|
|
32
32
|
}
|
|
33
|
-
function oe(
|
|
34
|
-
return
|
|
33
|
+
function oe(d) {
|
|
34
|
+
return d.split(" ", 3).map((o, h) => h !== 0 ? o.slice(0, 1) + "." : o).join(" ");
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
function he(d, o, h) {
|
|
37
|
+
if (typeof o != "number" || o < 1) return !0;
|
|
38
|
+
if (o = o - 1, (typeof d[h] != "number" || d[h] < 65) && (d[h] = 65), d[h] + o <= 90) d[h] = d[h] + o;
|
|
39
|
+
else {
|
|
40
|
+
let s = Math.floor((d[h] - 65 + o) / 26);
|
|
41
|
+
d[h] = (d[h] - 65 + o) % 26 + 65, he(d, s, h + 1);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const We = { style: { height: "100px", width: "100%", display: "inline-block" } }, Pe = { style: { height: "100px", width: "100%", display: "inline-block" } }, Oe = {
|
|
37
45
|
key: 2,
|
|
38
46
|
class: "controls-container"
|
|
39
|
-
},
|
|
47
|
+
}, Le = {
|
|
40
48
|
key: 0,
|
|
41
49
|
style: { padding: "0.5em 1.5em" }
|
|
42
|
-
},
|
|
50
|
+
}, Xe = {
|
|
43
51
|
key: 1,
|
|
44
52
|
style: { padding: "0.5em 1.5em" }
|
|
45
|
-
},
|
|
53
|
+
}, ll = {
|
|
46
54
|
__name: "WorkTable",
|
|
47
55
|
props: {
|
|
48
56
|
checkEdit: { type: Boolean, default: () => !0 },
|
|
49
|
-
|
|
57
|
+
odata: Object,
|
|
50
58
|
workSchedule: Object,
|
|
51
59
|
fullName: { type: String, default: "Вы" }
|
|
52
60
|
},
|
|
53
|
-
setup(
|
|
54
|
-
const { t:
|
|
61
|
+
setup(d) {
|
|
62
|
+
const { t: o, d: h } = Me(), s = d, $ = m(!1), n = m([
|
|
55
63
|
// { name: 'Иванов П.М. (Ведущий работник месяца)',
|
|
56
64
|
// days: [], // {day: "2024-11-01", tips: '(9:00 - 18:00)', time: 8 }
|
|
57
65
|
// contHour: 0,
|
|
@@ -64,128 +72,128 @@ const Ne = { style: { height: "100px", width: "100%", display: "inline-block" }
|
|
|
64
72
|
// code: '0000-00052'
|
|
65
73
|
// ids: 1
|
|
66
74
|
// }
|
|
67
|
-
]), J =
|
|
75
|
+
]), J = m(1), S = m(new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), 1).setMonth((/* @__PURE__ */ new Date()).getMonth() + Number(J.value))), r = m([]), G = m(0), V = m(9), b = m(8), O = m(!1), ue = m(!0), H = m(!1), Q = m("5"), U = m(1), T = m("Сектор разработок и эксплуатации сети"), K = m([]), A = m([]), p = m({ name: "Имя", length: 0, code: "" }), L = m(!1), _ = m({
|
|
68
76
|
zIndex: 30,
|
|
69
77
|
minWidth: 220,
|
|
70
78
|
x: 500,
|
|
71
79
|
y: 200
|
|
72
|
-
}), re =
|
|
80
|
+
}), re = m({});
|
|
73
81
|
ge(T, async (t, e) => {
|
|
74
|
-
t !== e && (A.value = [], O.value = !1,
|
|
75
|
-
|
|
82
|
+
t !== e && (A.value = [], O.value = !1, s.odata.personalManagerData.forEach((u) => {
|
|
83
|
+
u.Status !== "Увольнение" && u.Group === t && (A.value.some((l) => (l == null ? void 0 : l.activeText) === u.Role) || A.value.push({ val: !0, activeText: u.Role }));
|
|
76
84
|
}), ee());
|
|
77
85
|
}), ge(J, async (t, e) => {
|
|
78
|
-
t !== e && (
|
|
86
|
+
t !== e && (S.value = new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), 1).setMonth((/* @__PURE__ */ new Date()).getMonth() + Number(t)), de());
|
|
79
87
|
});
|
|
80
|
-
const
|
|
81
|
-
|
|
88
|
+
const me = (t, e, u, l) => {
|
|
89
|
+
p.value.ids = t.ids, p.value.key = t.key, p.value.add = t.days.length > 0 && t.days[t.days.length - 1].cont, p.value.level = e.level, p.value.day = u.cellIndex, _.value.y = l.clientY, _.value.x = l.clientX, e.level === 2 && e.no === 0 && s.checkEdit && (p.value.name = o("workSchedule.autocomplete"), L.value = !0), e.level === 3 && u.cellIndex - e.no === 1 && s.checkEdit && (F(u.cellIndex, t.ids), p.value.name = o("workSchedule.modeSelection"), L.value = !0);
|
|
82
90
|
}, de = () => {
|
|
83
|
-
const t = re.value, e = new Date(
|
|
91
|
+
const t = re.value, e = new Date(S.value), u = new Date(e.getFullYear(), e.getMonth() + 1, 0).getDate();
|
|
84
92
|
let l = [], g = 0;
|
|
85
|
-
for (let
|
|
86
|
-
const
|
|
87
|
-
g += t.nowork.includes(
|
|
88
|
-
const
|
|
89
|
-
l.push({ day:
|
|
93
|
+
for (let w = 1; w <= u; w++) {
|
|
94
|
+
const k = P(e.setDate(w), "{Y}-{m}-{dd}");
|
|
95
|
+
g += t.nowork.includes(k) || t.holidays.includes(k) ? 0 : t.preholidays.includes(k) ? 7 : 8;
|
|
96
|
+
const f = t.nowork.includes(k) ? "nowork" : t.holidays.includes(k) ? "holiday" : t.preholidays.includes(k) ? "preholiday" : "";
|
|
97
|
+
l.push({ day: w, holidays: f, weekday: h(new Date(e.getFullYear(), e.getMonth(), w), "day") });
|
|
90
98
|
}
|
|
91
|
-
|
|
92
|
-
var
|
|
93
|
-
T.value = (
|
|
94
|
-
|
|
99
|
+
G.value = g, r.value = l, s.odata.getPersonalManagerData({}).then((w) => {
|
|
100
|
+
var k;
|
|
101
|
+
T.value = (k = w.find((f) => f.Status !== "Увольнение" && f.Description === s.fullName)) == null ? void 0 : k.Group, w.forEach((f) => {
|
|
102
|
+
f.Status !== "Увольнение" && (K.value.some((D) => (D == null ? void 0 : D.value) === f.Group) || K.value.push({ value: f.Group, label: f.Group, key: f.Group }), f.Group === T.value && !A.value.some((D) => (D == null ? void 0 : D.activeText) === f.Role) && A.value.push({ val: !0, activeText: f.Role }));
|
|
95
103
|
}), ee(), ue.value = !1;
|
|
96
104
|
});
|
|
97
|
-
},
|
|
98
|
-
var
|
|
99
|
-
const
|
|
100
|
-
return e === -1 || g === -1 ? "" : ((
|
|
105
|
+
}, ce = be(() => !n.value.some((t) => t.contHour !== G.value)), ie = (t, e) => {
|
|
106
|
+
var w, k, f;
|
|
107
|
+
const u = new Date(S.value), l = `${u.getFullYear()}-${(u.getMonth() + 1).toString().padStart(2, "0")}-${t.toString().padStart(2, "0")}`, g = (w = n.value[e]) == null ? void 0 : w.days.findIndex((D) => D.day === l);
|
|
108
|
+
return e === -1 || g === -1 ? "" : ((k = n.value[e].days[g]) == null ? void 0 : k.time) + " " + ((f = n.value[e].days[g]) == null ? void 0 : f.tips);
|
|
101
109
|
}, ee = () => {
|
|
102
110
|
n.value = [];
|
|
103
111
|
let t = [];
|
|
104
|
-
|
|
105
|
-
if (e.Status !== "Увольнение" && e.Group === T.value && A.value.some((
|
|
106
|
-
let
|
|
107
|
-
t.push(e.Code), n.value.push({ name:
|
|
112
|
+
s.odata.personalManagerData.forEach((e) => {
|
|
113
|
+
if (e.Status !== "Увольнение" && e.Group === T.value && A.value.some((u) => u.val && u.activeText === e.Role)) {
|
|
114
|
+
let u = oe(e.Description);
|
|
115
|
+
t.push(e.Code), n.value.push({ name: u + " (" + e.Role + ")", days: [], contHour: 0, code: e.Code, id: !1, ids: n.value.length });
|
|
108
116
|
}
|
|
109
|
-
}),
|
|
110
|
-
},
|
|
111
|
-
|
|
117
|
+
}), pe(t), H.value = !1;
|
|
118
|
+
}, pe = (t) => {
|
|
119
|
+
s.workSchedule.getWorkSchedule({ code: t, date: P(new Date(S.value), "{Y}-{m}-{dd}") }).then(
|
|
112
120
|
(e) => {
|
|
113
|
-
e.forEach((
|
|
114
|
-
|
|
115
|
-
}),
|
|
121
|
+
e.forEach((u, l) => {
|
|
122
|
+
u !== null && (n.value[l].days = u.data.days, n.value[l].id = u.id);
|
|
123
|
+
}), j();
|
|
116
124
|
}
|
|
117
125
|
);
|
|
118
|
-
},
|
|
126
|
+
}, j = () => {
|
|
119
127
|
n.value.forEach((t) => {
|
|
120
|
-
t.contHour = t.days.reduce((e,
|
|
128
|
+
t.contHour = t.days.reduce((e, u) => e + u.time, 0);
|
|
121
129
|
});
|
|
122
|
-
}, pe = (t) => {
|
|
123
|
-
n.value[t].days = [], U();
|
|
124
130
|
}, fe = (t) => {
|
|
131
|
+
n.value[t].days = [], j();
|
|
132
|
+
}, ye = (t) => {
|
|
125
133
|
switch (Q.value) {
|
|
126
134
|
case "5":
|
|
127
|
-
for (let e =
|
|
128
|
-
r.value[e - 1].holidays === "" && F(e, t, !0), r.value[e - 1].holidays === "preholiday" && (
|
|
135
|
+
for (let e = U.value; e <= r.value.length; e++)
|
|
136
|
+
r.value[e - 1].holidays === "" && F(e, t, !0), r.value[e - 1].holidays === "preholiday" && (b.value -= 1, F(e, t, !0), b.value += 1);
|
|
129
137
|
break;
|
|
130
138
|
case "2x2":
|
|
131
|
-
for (let e =
|
|
139
|
+
for (let e = U.value; e <= r.value.length; e += 4)
|
|
132
140
|
F(e, t, !0), e + 1 <= r.value.length && F(e + 1, t, !0);
|
|
133
141
|
break;
|
|
134
142
|
case "2x5":
|
|
135
|
-
for (let e =
|
|
136
|
-
for (let
|
|
137
|
-
r.value[
|
|
143
|
+
for (let e = U.value; e <= r.value.length; e += 7)
|
|
144
|
+
for (let u = e; u < e + 5 && u <= r.value.length; u++)
|
|
145
|
+
r.value[u - 1].holidays === "preholiday" ? (b.value -= 1, F(u, t, !0), b.value += 1) : F(u, t, !0);
|
|
138
146
|
break;
|
|
139
147
|
}
|
|
140
|
-
}, F = (t, e,
|
|
148
|
+
}, F = (t, e, u = !1) => {
|
|
141
149
|
const { date: l, ind: g } = X(t, e);
|
|
142
150
|
g === -1 ? (n.value[e].days.push({
|
|
143
151
|
day: l,
|
|
144
|
-
time:
|
|
145
|
-
tips: `(${V.value}:00 - ${V.value +
|
|
146
|
-
}),
|
|
147
|
-
},
|
|
148
|
-
const { ind:
|
|
149
|
-
n.value[e].days.splice(
|
|
152
|
+
time: b.value,
|
|
153
|
+
tips: `(${V.value}:00 - ${V.value + b.value + 1}:00)`
|
|
154
|
+
}), j()) : u || (b.value = n.value[e].days[g].time, V.value = parseInt(n.value[e].days[g].tips.slice(1, -12)));
|
|
155
|
+
}, we = (t, e) => {
|
|
156
|
+
const { ind: u } = X(t, e);
|
|
157
|
+
n.value[e].days.splice(u, 1), j(), document.querySelector(".app-main").click();
|
|
150
158
|
}, se = (t, e) => {
|
|
151
|
-
const { date:
|
|
159
|
+
const { date: u, ind: l } = X(t, e);
|
|
152
160
|
n.value[e].days[l] = {
|
|
153
|
-
day:
|
|
154
|
-
time:
|
|
155
|
-
tips: `(${V.value}:00 - ${V.value +
|
|
156
|
-
},
|
|
161
|
+
day: u,
|
|
162
|
+
time: b.value,
|
|
163
|
+
tips: `(${V.value}:00 - ${V.value + b.value + 1}:00)`
|
|
164
|
+
}, j();
|
|
157
165
|
}, X = (t, e) => {
|
|
158
166
|
var g;
|
|
159
|
-
const
|
|
160
|
-
return { date:
|
|
161
|
-
},
|
|
167
|
+
const u = P(new Date(S.value).setDate(t), "{Y}-{m}-{dd}"), l = (g = n.value[e]) == null ? void 0 : g.days.findIndex((w) => w.day === u);
|
|
168
|
+
return { date: u, ind: l };
|
|
169
|
+
}, ke = async () => {
|
|
162
170
|
var ve;
|
|
163
|
-
|
|
164
|
-
const t = new
|
|
165
|
-
e.mergeCells(`A1:${M("A1", r.value.length + 5)}1`), e.mergeCells(`A2:${M("A2", r.value.length + 5)}2`), e.mergeCells("A3:A4"), e.mergeCells(`B3:${M("B3", r.value.length)}3`), e.mergeCells(`${M("B3", r.value.length + 1)}3:${M("B3", r.value.length + 2)}3`), e.mergeCells(`${M("B3", r.value.length + 3)}3:${M("B4", r.value.length + 3)}4`), e.mergeCells(`${M("B3", r.value.length + 4)}3:${M("B4", r.value.length + 4)}4`), e.getCell("A1").value =
|
|
166
|
-
for (let
|
|
167
|
-
e.getCell(4,
|
|
168
|
-
` + (
|
|
169
|
-
e.getRow(1).height = 40, e.getRow(2).height = 30, e.getRow(3).height = 20, e.getColumn(1).width = 15, e.getColumn(r.value.length + 2).width = 5, e.getColumn(r.value.length + 3).width = 6, e.getColumn(r.value.length + 4).width = 13, e.getColumn(r.value.length + 5).width = 13, e.getColumn(1).alignment = g, e.getCell("A2").alignment =
|
|
170
|
-
let
|
|
171
|
-
for (const
|
|
172
|
-
let Z = [
|
|
173
|
-
for (let
|
|
174
|
-
const { ind: le } = X(
|
|
175
|
-
le !== -1 ? Z[
|
|
171
|
+
$.value = !0;
|
|
172
|
+
const t = new Ve.Workbook(), e = t.addWorksheet(h(S.value, "month"), { pageSetup: { paperSize: 9, orientation: "landscape", fitToPage: !0 } }), u = { vertical: "middle", horizontal: "center" }, l = { top: { style: "thin" }, left: { style: "thin" }, bottom: { style: "thin" }, right: { style: "thin" } }, g = { vertical: "middle", horizontal: "center", wrapText: !0 };
|
|
173
|
+
e.mergeCells(`A1:${M("A1", r.value.length + 5)}1`), e.mergeCells(`A2:${M("A2", r.value.length + 5)}2`), e.mergeCells("A3:A4"), e.mergeCells(`B3:${M("B3", r.value.length)}3`), e.mergeCells(`${M("B3", r.value.length + 1)}3:${M("B3", r.value.length + 2)}3`), e.mergeCells(`${M("B3", r.value.length + 3)}3:${M("B4", r.value.length + 3)}4`), e.mergeCells(`${M("B3", r.value.length + 4)}3:${M("B4", r.value.length + 4)}4`), e.getCell("A1").value = o("workSchedule.firm"), e.getCell("A2").value = o("workSchedule.title", { name: T.value }) + h(S.value, "month") + ` ${new Date(S.value).getFullYear()}`, e.getCell("A3").value = o("workSchedule.month"), e.getCell("B3").value = o("workSchedule.numbersMonth"), e.getCell(3, r.value.length + 2).value = o("workSchedule.onSchedule"), e.getCell(3, r.value.length + 4).value = o("workSchedule.acquainted"), e.getCell(3, r.value.length + 5).value = o("workSchedule.date"), e.getCell(4, r.value.length + 2).value = o("workSchedule.days"), e.getCell(4, r.value.length + 3).value = `${o("workSchedule.hours")} (${G.value})`;
|
|
174
|
+
for (let y = 2; y <= r.value.length + 1; y++)
|
|
175
|
+
e.getCell(4, y).value = r.value[y - 2].weekday + `
|
|
176
|
+
` + (y - 1), e.getColumn(y).width = 6, e.getColumn(y).alignment = g, e.getCell(4, y).border = l;
|
|
177
|
+
e.getRow(1).height = 40, e.getRow(2).height = 30, e.getRow(3).height = 20, e.getColumn(1).width = 15, e.getColumn(r.value.length + 2).width = 5, e.getColumn(r.value.length + 3).width = 6, e.getColumn(r.value.length + 4).width = 13, e.getColumn(r.value.length + 5).width = 13, e.getColumn(1).alignment = g, e.getCell("A2").alignment = u, e.getCell("A3").alignment = u, e.getCell("B3").alignment = u, e.getCell(3, r.value.length + 2).alignment = u, e.getColumn(r.value.length + 2).alignment = g, e.getColumn(r.value.length + 3).alignment = g, e.getColumn(r.value.length + 4).alignment = u, e.getColumn(r.value.length + 5).alignment = u, e.getCell("A3").border = l, e.getCell("B3").border = l, e.getCell(3, r.value.length + 2).border = l, e.getCell(4, r.value.length + 2).border = l, e.getCell(3, r.value.length + 4).border = l, e.getCell(3, r.value.length + 5).border = l, e.getCell(4, r.value.length + 3).border = l;
|
|
178
|
+
let w = 0;
|
|
179
|
+
for (const y of n.value) {
|
|
180
|
+
let Z = [y.name];
|
|
181
|
+
for (let I = 1; I <= r.value.length; I++) {
|
|
182
|
+
const { ind: le } = X(I, w);
|
|
183
|
+
le !== -1 ? Z[I] = `${y.days[le].time} ${y.days[le].tips}` : Z[I] = " ";
|
|
176
184
|
}
|
|
177
|
-
Z.push(((ve =
|
|
178
|
-
const
|
|
179
|
-
|
|
185
|
+
Z.push(((ve = y.days) == null ? void 0 : ve.length) || " ", y.contHour || 0);
|
|
186
|
+
const Se = e.addRow(Z);
|
|
187
|
+
Se.border = l, w++;
|
|
180
188
|
}
|
|
181
|
-
let
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}), e.mergeCells(`A${n.value.length + 6}:P${n.value.length + 6}`), e.mergeCells(`Q${n.value.length + 6}:AG${n.value.length + 6}`), e.mergeCells(`B${n.value.length + 8}:E${n.value.length + 8}`), e.mergeCells(`F${n.value.length + 8}:L${n.value.length + 8}`), e.mergeCells(`M${n.value.length + 8}:P${n.value.length + 8}`), e.mergeCells(`S${n.value.length + 8}:V${n.value.length + 8}`), e.mergeCells(`W${n.value.length + 8}:AC${n.value.length + 8}`), e.mergeCells(`AD${n.value.length + 8}:AG${n.value.length + 8}`), e.mergeCells(`Z${n.value.length + 9}:AA${n.value.length + 9}`), e.getCell(`A${n.value.length + 6}`).value =
|
|
185
|
-
const
|
|
186
|
-
|
|
187
|
-
},
|
|
188
|
-
O.value ||
|
|
189
|
+
let k = "Начальник отдела";
|
|
190
|
+
s.odata.personalManagerData.forEach((y) => {
|
|
191
|
+
y.Status !== "Увольнение" && y.Role === "Начальник отдела правовой и кадровой работы" && (k = y.Description);
|
|
192
|
+
}), e.mergeCells(`A${n.value.length + 6}:P${n.value.length + 6}`), e.mergeCells(`Q${n.value.length + 6}:AG${n.value.length + 6}`), e.mergeCells(`B${n.value.length + 8}:E${n.value.length + 8}`), e.mergeCells(`F${n.value.length + 8}:L${n.value.length + 8}`), e.mergeCells(`M${n.value.length + 8}:P${n.value.length + 8}`), e.mergeCells(`S${n.value.length + 8}:V${n.value.length + 8}`), e.mergeCells(`W${n.value.length + 8}:AC${n.value.length + 8}`), e.mergeCells(`AD${n.value.length + 8}:AG${n.value.length + 8}`), e.mergeCells(`Z${n.value.length + 9}:AA${n.value.length + 9}`), e.getCell(`A${n.value.length + 6}`).value = o("workSchedule.byInitials"), e.getCell(`Q${n.value.length + 6}`).value = o("workSchedule.supervisorHR"), e.getCell(`B${n.value.length + 8}`).value = o("workSchedule.compiled") + ":", e.getCell(`S${n.value.length + 8}`).value = o("workSchedule.approved") + ":", e.getCell(`M${n.value.length + 8}`).value = oe(s.fullName), e.getCell(`AD${n.value.length + 8}`).value = oe(k), e.getCell(`Z${n.value.length + 9}`).value = o("workSchedule.printPlace"), e.getCell(`A${n.value.length + 6}`).alignment = { vertical: "middle", horizontal: "right" }, e.getCell(`Q${n.value.length + 6}`).alignment = { vertical: "middle", horizontal: "right" }, e.getCell(`B${n.value.length + 8}`).alignment = { vertical: "middle", horizontal: "right" }, e.getCell(`F${n.value.length + 8}`).alignment = { vertical: "middle", horizontal: "right" }, e.getCell(`M${n.value.length + 8}`).alignment = { vertical: "middle", horizontal: "left" }, e.getCell(`AD${n.value.length + 8}`).alignment = { vertical: "middle", horizontal: "left" }, e.getCell(`Z${n.value.length + 9}`).alignment = u, e.getCell(`F${n.value.length + 8}`).border = { bottom: { style: "thin" } }, e.getCell(`W${n.value.length + 8}`).border = { bottom: { style: "thin" } };
|
|
193
|
+
const f = "export_" + P(Date.now(), "{dd}.{m}.{Y}") + ".xlsx", D = await t.xlsx.writeBuffer();
|
|
194
|
+
Ee(new Blob([D]), f), $.value = !1;
|
|
195
|
+
}, Ce = async () => {
|
|
196
|
+
O.value || s.workSchedule.addWorkSchedule({ data: n.value, date: P(new Date(S.value), "{Y}-{m}-{dd}") }).then((t) => O.value = t);
|
|
189
197
|
};
|
|
190
198
|
return fetch(
|
|
191
199
|
"https://cp.avanta-telecom.ru/api/v2/calendar/getHoliday",
|
|
@@ -201,7 +209,7 @@ const Ne = { style: { height: "100px", width: "100%", display: "inline-block" }
|
|
|
201
209
|
headers: {
|
|
202
210
|
"Content-Type": "application/json",
|
|
203
211
|
Accept: "text/html",
|
|
204
|
-
"X-Token":
|
|
212
|
+
"X-Token": Ne.get("X-Token") || !1,
|
|
205
213
|
"Cache-Control": "no-cache"
|
|
206
214
|
},
|
|
207
215
|
redirect: "follow",
|
|
@@ -215,21 +223,21 @@ const Ne = { style: { height: "100px", width: "100%", display: "inline-block" }
|
|
|
215
223
|
throw new Error(`HTTP error! status: ${t.status}`);
|
|
216
224
|
return t.json();
|
|
217
225
|
}).then((t) => {
|
|
218
|
-
|
|
226
|
+
re.value = t.result, de();
|
|
219
227
|
}).catch((t) => {
|
|
220
228
|
console.error("Ошибка загрузки файла:", t);
|
|
221
229
|
}), (t, e) => {
|
|
222
|
-
const
|
|
223
|
-
return
|
|
224
|
-
|
|
230
|
+
const u = $e("loading");
|
|
231
|
+
return C(), z("div", null, [
|
|
232
|
+
d.checkEdit ? (C(), R(a(Te), {
|
|
225
233
|
key: 0,
|
|
226
234
|
modelValue: T.value,
|
|
227
235
|
"onUpdate:modelValue": e[0] || (e[0] = (l) => T.value = l),
|
|
228
236
|
placeholder: "Select",
|
|
229
237
|
style: { width: "240px", "margin-bottom": ".5rem", "margin-right": ".5rem" }
|
|
230
238
|
}, {
|
|
231
|
-
default:
|
|
232
|
-
(
|
|
239
|
+
default: v(() => [
|
|
240
|
+
(C(!0), z(te, null, ae(K.value, (l) => (C(), R(a(Ae), {
|
|
233
241
|
key: l.value,
|
|
234
242
|
label: l.label,
|
|
235
243
|
value: l.value
|
|
@@ -237,77 +245,77 @@ const Ne = { style: { height: "100px", width: "100%", display: "inline-block" }
|
|
|
237
245
|
]),
|
|
238
246
|
_: 1
|
|
239
247
|
}, 8, ["modelValue"])) : q("", !0),
|
|
240
|
-
|
|
248
|
+
d.checkEdit ? (C(), R(a(B), {
|
|
241
249
|
key: 1,
|
|
242
250
|
plain: "",
|
|
243
|
-
onClick: e[1] || (e[1] = (l) =>
|
|
251
|
+
onClick: e[1] || (e[1] = (l) => H.value = !0),
|
|
244
252
|
style: { "margin-bottom": ".5rem" }
|
|
245
253
|
}, {
|
|
246
|
-
default:
|
|
247
|
-
|
|
254
|
+
default: v(() => [
|
|
255
|
+
E(c(a(o)("workSchedule.jobTitle")), 1)
|
|
248
256
|
]),
|
|
249
257
|
_: 1
|
|
250
258
|
})) : q("", !0),
|
|
251
|
-
|
|
259
|
+
i(a(Be), {
|
|
252
260
|
style: { width: "100%" },
|
|
253
261
|
loading: ue.value,
|
|
254
262
|
animated: ""
|
|
255
263
|
}, {
|
|
256
|
-
template:
|
|
257
|
-
|
|
264
|
+
template: v(() => [
|
|
265
|
+
i(a(N), {
|
|
258
266
|
variant: "text",
|
|
259
267
|
style: { width: "100%", height: "2rem" }
|
|
260
268
|
}),
|
|
261
|
-
|
|
269
|
+
i(a(N), {
|
|
262
270
|
variant: "text",
|
|
263
271
|
style: { width: "180px", height: "4rem", "margin-right": "4px" }
|
|
264
272
|
}),
|
|
265
|
-
|
|
273
|
+
i(a(N), {
|
|
266
274
|
variant: "text",
|
|
267
275
|
style: { width: "calc( 100% - 184px)", height: "4rem" }
|
|
268
276
|
}),
|
|
269
|
-
|
|
277
|
+
i(a(N), {
|
|
270
278
|
variant: "text",
|
|
271
279
|
style: { width: "180px", height: "8rem", "margin-right": "4px" }
|
|
272
280
|
}),
|
|
273
|
-
|
|
281
|
+
i(a(N), {
|
|
274
282
|
variant: "text",
|
|
275
283
|
style: { width: "calc( 100% - 184px)", height: "8rem" }
|
|
276
284
|
})
|
|
277
285
|
]),
|
|
278
|
-
default:
|
|
279
|
-
|
|
286
|
+
default: v(() => [
|
|
287
|
+
i(a(Fe), {
|
|
280
288
|
id: "printTable",
|
|
281
289
|
data: n.value,
|
|
282
290
|
style: { width: "100%" },
|
|
283
291
|
size: "small",
|
|
284
292
|
align: "center",
|
|
285
|
-
onCellClick:
|
|
286
|
-
"empty-text": a(
|
|
293
|
+
onCellClick: me,
|
|
294
|
+
"empty-text": a(o)("workSchedule.emptyText")
|
|
287
295
|
}, {
|
|
288
|
-
default:
|
|
289
|
-
|
|
290
|
-
label: a(
|
|
296
|
+
default: v(() => [
|
|
297
|
+
i(a(Y), {
|
|
298
|
+
label: a(o)("workSchedule.title", { name: T.value }) + a(h)(S.value, "month") + ` ${new Date(S.value).getFullYear()}`,
|
|
291
299
|
align: "center",
|
|
292
300
|
height: "34"
|
|
293
301
|
}, {
|
|
294
|
-
default:
|
|
295
|
-
|
|
296
|
-
label: a(
|
|
302
|
+
default: v(() => [
|
|
303
|
+
i(a(Y), {
|
|
304
|
+
label: a(o)("workSchedule.month"),
|
|
297
305
|
width: "180",
|
|
298
306
|
align: "center"
|
|
299
307
|
}, {
|
|
300
|
-
default:
|
|
301
|
-
|
|
308
|
+
default: v((l) => [
|
|
309
|
+
x("div", We, c(n.value[l.$index].name), 1)
|
|
302
310
|
]),
|
|
303
311
|
_: 1
|
|
304
312
|
}, 8, ["label"]),
|
|
305
|
-
|
|
306
|
-
label: a(
|
|
313
|
+
i(a(Y), {
|
|
314
|
+
label: a(o)("workSchedule.numbersMonth"),
|
|
307
315
|
align: "center"
|
|
308
316
|
}, {
|
|
309
|
-
default:
|
|
310
|
-
(
|
|
317
|
+
default: v(() => [
|
|
318
|
+
(C(!0), z(te, null, ae(r.value, (l) => (C(), R(a(Y), {
|
|
311
319
|
key: l.day,
|
|
312
320
|
width: "45",
|
|
313
321
|
"class-name": l.holidays,
|
|
@@ -315,36 +323,36 @@ const Ne = { style: { height: "100px", width: "100%", display: "inline-block" }
|
|
|
315
323
|
label: l.weekday + `
|
|
316
324
|
` + l.day.toString()
|
|
317
325
|
}, {
|
|
318
|
-
default:
|
|
319
|
-
|
|
326
|
+
default: v((g) => [
|
|
327
|
+
x("div", Pe, c(ie(l.day, g.$index) || " "), 1)
|
|
320
328
|
]),
|
|
321
329
|
_: 2
|
|
322
330
|
}, 1032, ["class-name", "label"]))), 128))
|
|
323
331
|
]),
|
|
324
332
|
_: 1
|
|
325
333
|
}, 8, ["label"]),
|
|
326
|
-
|
|
327
|
-
label: a(
|
|
334
|
+
i(a(Y), {
|
|
335
|
+
label: a(o)("workSchedule.onSchedule"),
|
|
328
336
|
align: "center"
|
|
329
337
|
}, {
|
|
330
|
-
default:
|
|
331
|
-
|
|
332
|
-
label: a(
|
|
338
|
+
default: v(() => [
|
|
339
|
+
i(a(Y), {
|
|
340
|
+
label: a(o)("workSchedule.days"),
|
|
333
341
|
align: "center"
|
|
334
342
|
}, {
|
|
335
|
-
default:
|
|
336
|
-
|
|
343
|
+
default: v((l) => [
|
|
344
|
+
E(c(n.value[l.$index].days.length || 0), 1)
|
|
337
345
|
]),
|
|
338
346
|
_: 1
|
|
339
347
|
}, 8, ["label"]),
|
|
340
|
-
|
|
341
|
-
label: `${a(
|
|
348
|
+
i(a(Y), {
|
|
349
|
+
label: `${a(o)("workSchedule.hours")} ( ${G.value} )`,
|
|
342
350
|
align: "center"
|
|
343
351
|
}, {
|
|
344
|
-
default:
|
|
345
|
-
|
|
346
|
-
style:
|
|
347
|
-
},
|
|
352
|
+
default: v((l) => [
|
|
353
|
+
x("div", {
|
|
354
|
+
style: xe(`color: ${G.value === l.row.contHour ? "green" : "red"};`)
|
|
355
|
+
}, c(l.row.contHour), 5)
|
|
348
356
|
]),
|
|
349
357
|
_: 1
|
|
350
358
|
}, 8, ["label"])
|
|
@@ -360,71 +368,71 @@ const Ne = { style: { height: "100px", width: "100%", display: "inline-block" }
|
|
|
360
368
|
]),
|
|
361
369
|
_: 1
|
|
362
370
|
}, 8, ["loading"]),
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
O.value ? q("", !0) : (
|
|
371
|
+
ce.value && d.checkEdit ? (C(), z("div", Oe, [
|
|
372
|
+
E(c(a(o)("workSchedule.chartsFilled")) + ": ", 1),
|
|
373
|
+
O.value ? q("", !0) : (C(), R(a(B), {
|
|
366
374
|
key: 0,
|
|
367
375
|
type: "primary",
|
|
368
|
-
onClick:
|
|
376
|
+
onClick: Ce
|
|
369
377
|
}, {
|
|
370
|
-
default:
|
|
371
|
-
|
|
378
|
+
default: v(() => [
|
|
379
|
+
E(c(a(o)("workSchedule.confirm")), 1)
|
|
372
380
|
]),
|
|
373
381
|
_: 1
|
|
374
382
|
})),
|
|
375
|
-
e[16] || (e[16] =
|
|
376
|
-
|
|
383
|
+
e[16] || (e[16] = E()),
|
|
384
|
+
x("span", null, c(d.fullName), 1)
|
|
377
385
|
])) : q("", !0),
|
|
378
|
-
|
|
379
|
-
disabled:
|
|
386
|
+
De((C(), R(a(B), {
|
|
387
|
+
disabled: $.value,
|
|
380
388
|
plain: "",
|
|
381
|
-
onClick:
|
|
389
|
+
onClick: ke,
|
|
382
390
|
style: { "margin-top": ".5rem" }
|
|
383
391
|
}, {
|
|
384
|
-
default:
|
|
385
|
-
|
|
392
|
+
default: v(() => [
|
|
393
|
+
E(c(a(o)("workSchedule.exportExcel")), 1)
|
|
386
394
|
]),
|
|
387
395
|
_: 1
|
|
388
396
|
}, 8, ["disabled"])), [
|
|
389
|
-
[
|
|
397
|
+
[u, $.value]
|
|
390
398
|
]),
|
|
391
|
-
|
|
392
|
-
title: a(
|
|
393
|
-
modelValue:
|
|
394
|
-
"onUpdate:modelValue": e[3] || (e[3] = (l) =>
|
|
399
|
+
i(a(ze), {
|
|
400
|
+
title: a(o)("workSchedule.jobTitle"),
|
|
401
|
+
modelValue: H.value,
|
|
402
|
+
"onUpdate:modelValue": e[3] || (e[3] = (l) => H.value = l),
|
|
395
403
|
width: "400px"
|
|
396
404
|
}, {
|
|
397
|
-
footer:
|
|
398
|
-
|
|
399
|
-
onClick: e[2] || (e[2] = (l) =>
|
|
405
|
+
footer: v(() => [
|
|
406
|
+
i(a(B), {
|
|
407
|
+
onClick: e[2] || (e[2] = (l) => H.value = !1),
|
|
400
408
|
size: "default"
|
|
401
409
|
}, {
|
|
402
|
-
default:
|
|
403
|
-
|
|
410
|
+
default: v(() => [
|
|
411
|
+
E(c(t.$t("workSchedule.cancel")), 1)
|
|
404
412
|
]),
|
|
405
413
|
_: 1
|
|
406
414
|
}),
|
|
407
|
-
|
|
415
|
+
i(a(B), {
|
|
408
416
|
size: "default",
|
|
409
417
|
type: "primary",
|
|
410
418
|
onClick: ee
|
|
411
419
|
}, {
|
|
412
|
-
default:
|
|
413
|
-
|
|
420
|
+
default: v(() => [
|
|
421
|
+
E(c(t.$t("workSchedule.select")), 1)
|
|
414
422
|
]),
|
|
415
423
|
_: 1
|
|
416
424
|
})
|
|
417
425
|
]),
|
|
418
|
-
default:
|
|
419
|
-
|
|
426
|
+
default: v(() => [
|
|
427
|
+
i(a(Re), {
|
|
420
428
|
ref: "dialogForm",
|
|
421
429
|
model: A.value,
|
|
422
430
|
autocomplete: "on"
|
|
423
431
|
}, {
|
|
424
|
-
default:
|
|
425
|
-
(
|
|
426
|
-
default:
|
|
427
|
-
|
|
432
|
+
default: v(() => [
|
|
433
|
+
(C(!0), z(te, null, ae(A.value, (l) => (C(), R(a(Ye), null, {
|
|
434
|
+
default: v(() => [
|
|
435
|
+
i(a(Ge), {
|
|
428
436
|
modelValue: l.val,
|
|
429
437
|
"onUpdate:modelValue": (g) => l.val = g,
|
|
430
438
|
"active-text": l.activeText
|
|
@@ -438,112 +446,112 @@ const Ne = { style: { height: "100px", width: "100%", display: "inline-block" }
|
|
|
438
446
|
]),
|
|
439
447
|
_: 1
|
|
440
448
|
}, 8, ["title", "modelValue"]),
|
|
441
|
-
|
|
449
|
+
i(a(Ue), {
|
|
442
450
|
show: L.value,
|
|
443
451
|
"onUpdate:show": e[15] || (e[15] = (l) => L.value = l),
|
|
444
452
|
options: _.value
|
|
445
453
|
}, {
|
|
446
|
-
default:
|
|
447
|
-
|
|
448
|
-
label:
|
|
454
|
+
default: v(() => [
|
|
455
|
+
i(a(je), {
|
|
456
|
+
label: p.value.name,
|
|
449
457
|
disabled: ""
|
|
450
458
|
}, null, 8, ["label"]),
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
459
|
+
i(a(Ie)),
|
|
460
|
+
p.value.level === 2 ? (C(), z("div", Le, [
|
|
461
|
+
i(a(He), {
|
|
454
462
|
modelValue: Q.value,
|
|
455
463
|
"onUpdate:modelValue": e[4] || (e[4] = (l) => Q.value = l),
|
|
456
464
|
size: "small"
|
|
457
465
|
}, {
|
|
458
|
-
default:
|
|
459
|
-
|
|
460
|
-
label: a(
|
|
466
|
+
default: v(() => [
|
|
467
|
+
i(a(ne), {
|
|
468
|
+
label: a(o)("workSchedule.Days5"),
|
|
461
469
|
value: "5"
|
|
462
470
|
}, null, 8, ["label"]),
|
|
463
|
-
|
|
471
|
+
i(a(ne), {
|
|
464
472
|
label: "2 Х 2",
|
|
465
473
|
value: "2x2"
|
|
466
474
|
}),
|
|
467
|
-
|
|
475
|
+
i(a(ne), {
|
|
468
476
|
label: "2 Х 5",
|
|
469
477
|
value: "2x5"
|
|
470
478
|
})
|
|
471
479
|
]),
|
|
472
480
|
_: 1
|
|
473
481
|
}, 8, ["modelValue"]),
|
|
474
|
-
e[17] || (e[17] =
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
modelValue:
|
|
478
|
-
"onUpdate:modelValue": e[5] || (e[5] = (l) =>
|
|
482
|
+
e[17] || (e[17] = x("br", null, null, -1)),
|
|
483
|
+
x("span", null, c(a(o)("workSchedule.fromDate")) + ":", 1),
|
|
484
|
+
i(a(W), {
|
|
485
|
+
modelValue: U.value,
|
|
486
|
+
"onUpdate:modelValue": e[5] || (e[5] = (l) => U.value = l),
|
|
479
487
|
step: 1,
|
|
480
488
|
min: 1,
|
|
481
489
|
max: r.value.length
|
|
482
490
|
}, null, 8, ["modelValue", "max"]),
|
|
483
|
-
|
|
484
|
-
|
|
491
|
+
x("span", null, c(a(o)("workSchedule.with")) + ":", 1),
|
|
492
|
+
i(a(W), {
|
|
485
493
|
modelValue: V.value,
|
|
486
494
|
"onUpdate:modelValue": e[6] || (e[6] = (l) => V.value = l),
|
|
487
495
|
step: 1,
|
|
488
496
|
min: 8,
|
|
489
497
|
max: 11
|
|
490
498
|
}, null, 8, ["modelValue"]),
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
modelValue:
|
|
494
|
-
"onUpdate:modelValue": e[7] || (e[7] = (l) =>
|
|
499
|
+
x("span", null, c(a(o)("workSchedule.duration")) + ":", 1),
|
|
500
|
+
i(a(W), {
|
|
501
|
+
modelValue: b.value,
|
|
502
|
+
"onUpdate:modelValue": e[7] || (e[7] = (l) => b.value = l),
|
|
495
503
|
step: 1,
|
|
496
504
|
min: 4,
|
|
497
505
|
max: 12
|
|
498
506
|
}, null, 8, ["modelValue"]),
|
|
499
|
-
|
|
507
|
+
i(a(B), {
|
|
500
508
|
style: { "margin-top": ".5rem" },
|
|
501
509
|
size: "small",
|
|
502
|
-
onClick: e[8] || (e[8] = (l) =>
|
|
510
|
+
onClick: e[8] || (e[8] = (l) => ye(p.value.ids))
|
|
503
511
|
}, {
|
|
504
|
-
default:
|
|
505
|
-
|
|
512
|
+
default: v(() => [
|
|
513
|
+
E(c(a(o)("workSchedule.fillOut")), 1)
|
|
506
514
|
]),
|
|
507
515
|
_: 1
|
|
508
516
|
}),
|
|
509
|
-
|
|
517
|
+
i(a(B), {
|
|
510
518
|
style: { "margin-top": ".5rem" },
|
|
511
519
|
size: "small",
|
|
512
|
-
onClick: e[9] || (e[9] = (l) =>
|
|
520
|
+
onClick: e[9] || (e[9] = (l) => fe(p.value.ids))
|
|
513
521
|
}, {
|
|
514
|
-
default:
|
|
515
|
-
|
|
522
|
+
default: v(() => [
|
|
523
|
+
E(c(a(o)("workSchedule.clearRow")), 1)
|
|
516
524
|
]),
|
|
517
525
|
_: 1
|
|
518
526
|
})
|
|
519
|
-
])) : (
|
|
520
|
-
|
|
521
|
-
e[18] || (e[18] =
|
|
522
|
-
|
|
523
|
-
|
|
527
|
+
])) : (C(), z("div", Xe, [
|
|
528
|
+
x("div", null, c(ie(p.value.day, p.value.ids)), 1),
|
|
529
|
+
e[18] || (e[18] = x("br", null, null, -1)),
|
|
530
|
+
x("span", null, c(a(o)("workSchedule.with")) + ":", 1),
|
|
531
|
+
i(a(W), {
|
|
524
532
|
modelValue: V.value,
|
|
525
533
|
"onUpdate:modelValue": e[10] || (e[10] = (l) => V.value = l),
|
|
526
534
|
step: 1,
|
|
527
535
|
min: 8,
|
|
528
536
|
max: 11,
|
|
529
|
-
onChange: e[11] || (e[11] = (l) => se(
|
|
537
|
+
onChange: e[11] || (e[11] = (l) => se(p.value.day, p.value.ids))
|
|
530
538
|
}, null, 8, ["modelValue"]),
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
modelValue:
|
|
534
|
-
"onUpdate:modelValue": e[12] || (e[12] = (l) =>
|
|
539
|
+
x("span", null, c(a(o)("workSchedule.duration")) + ":", 1),
|
|
540
|
+
i(a(W), {
|
|
541
|
+
modelValue: b.value,
|
|
542
|
+
"onUpdate:modelValue": e[12] || (e[12] = (l) => b.value = l),
|
|
535
543
|
step: 1,
|
|
536
544
|
min: 4,
|
|
537
545
|
max: 12,
|
|
538
|
-
onChange: e[13] || (e[13] = (l) => se(
|
|
546
|
+
onChange: e[13] || (e[13] = (l) => se(p.value.day, p.value.ids))
|
|
539
547
|
}, null, 8, ["modelValue"]),
|
|
540
|
-
|
|
548
|
+
i(a(B), {
|
|
541
549
|
style: { "margin-top": ".5rem" },
|
|
542
550
|
size: "small",
|
|
543
|
-
onClick: e[14] || (e[14] = (l) =>
|
|
551
|
+
onClick: e[14] || (e[14] = (l) => we(p.value.day, p.value.ids))
|
|
544
552
|
}, {
|
|
545
|
-
default:
|
|
546
|
-
|
|
553
|
+
default: v(() => [
|
|
554
|
+
E(c(a(o)("workSchedule.delete")), 1)
|
|
547
555
|
]),
|
|
548
556
|
_: 1
|
|
549
557
|
})
|
|
@@ -556,5 +564,5 @@ const Ne = { style: { height: "100px", width: "100%", display: "inline-block" }
|
|
|
556
564
|
}
|
|
557
565
|
};
|
|
558
566
|
export {
|
|
559
|
-
|
|
567
|
+
ll as default
|
|
560
568
|
};
|