@studio-west/employees 0.5.36 → 0.5.38
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 +2 -2
- package/dist/WorkTable.js +39 -39
- package/package.json +1 -1
package/dist/WorkTable.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";const e=require("vue"),de=require("file-saver"),se=require("exceljs"),c=require("./index-DxdyeKnm.cjs"),ce=require("vue-i18n"),i=require("element-plus"),L=require("@imengyu/vue3-context-menu");function ve(k){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(k){for(const C in k)if(C!=="default"){const f=Object.getOwnPropertyDescriptor(k,C);Object.defineProperty(r,C,f.get?f:{enumerable:!0,get:()=>k[C]})}}return r.default=k,Object.freeze(r)}const me=ve(se),ge={class:"work"},he={class:"nav"},fe={style:{height:"100px",width:"100%",display:"inline-block"}},pe=["innerHTML"],ye={key:0,class:"controls-container",style:{"margin-top":".5rem"}},we={key:0,style:{padding:"0.5em 1.5em"}},ke={key:1,style:{padding:"0.5em 1.5em"}},Ce={__name:"WorkTable",props:{checkEdit:{type:Boolean,default:()=>!0},odata:Object,workSchedule:Object,fullName:{type:String,default:"Вы"}},setup(k){const{t:r,d:C}=ce.useI18n(),f=k,A=e.ref(!1),n=e.ref([]),R=e.ref(new Date().getMonth()+1),G=e.ref(!1),b=e.ref([]),w=e.ref(new Date(new Date().getFullYear(),new Date().getMonth(),1)),u=e.ref([]),E=e.ref(0),x=e.ref(9),p=e.ref(8),I=e.ref(!1),J=e.ref(!0),D=e.ref(!1),j=e.ref("5"),$=e.ref(1),V=e.ref(""),q=e.ref([]),S=e.ref([]),z=e.ref([]),v=e.ref({name:"Имя",length:0,code:""}),F=e.ref(!1),O=e.ref({zIndex:30,minWidth:220,x:500,y:200}),Z=e.ref({}),B=e.ref("100%");e.watch(V,async(a,l)=>{a!==l&&(S.value=[],I.value=!1,f.odata.personal.forEach(o=>{o.divisionName===a&&(S.value.some(d=>(d==null?void 0:d.activeText)===o.roleName)||S.value.push({val:!0,activeText:o.roleName}))}),P())}),e.watch(R,async a=>{let l=new Date().getMonth(),o=a===null?l:a-1;o=l-1<=o?o:o+12,w.value=new Date(new Date().getFullYear(),o,1),K()});const _=(a,l,o,d)=>{v.value.ids=a.ids,v.value.key=a.key,v.value.add=a.days.length>0&&a.days[a.days.length-1].cont,v.value.level=l.level,v.value.day=o.cellIndex,O.value.y=d.clientY,O.value.x=d.clientX,l.level===2&&l.no===0&&f.checkEdit&&(v.value.name=r("workSchedule.autocomplete"),F.value=!0),l.level===3&&o.cellIndex-l.no===1&&f.checkEdit&&(N(o.cellIndex,a.ids),v.value.name=r("workSchedule.modeSelection"),F.value=!0)},ee=a=>{console.log(a);let l="ee",o="2025.04.21";if(!b.value||b.value.length===0)return"tt";const d=new Date(c.parseDate(o)).getTime();for(let t of b.value){const{dateStart:s,dateEnd:m,code:g}=t;if(s&&m&&g===l){const y=new Date(c.parseDate(s)).getTime(),Y=new Date(c.parseDate(m)).getTime();if(d>=y&&d<=Y)return"vacation"}}return"test"},K=()=>{const a=Z.value,l=new Date(w.value),o=new Date(l.getFullYear(),l.getMonth()+1,0).getDate();let d=[],t=0;for(let s=1;s<=o;s++){const m=c.parseTime(l.setDate(s),"{Y}-{m}-{dd}");t+=a.nowork.includes(m)||a.holidays.includes(m)?0:a.preholidays.includes(m)?7:8;const g=a.nowork.includes(m)?"nowork":a.holidays.includes(m)?"holiday":a.preholidays.includes(m)?"preholiday":"";d.push({day:s,holidays:g,weekday:C(new Date(l.getFullYear(),l.getMonth(),s),"day")})}E.value=t,u.value=d,f.odata.getPersonal({}).then(s=>{var m;V.value.length===0&&(V.value=(m=s.find(g=>g.employeeName===f.fullName))==null?void 0:m.divisionName),s.forEach(g=>{q.value.some(y=>(y==null?void 0:y.value)===g.divisionName)||q.value.push({value:g.divisionName,label:g.divisionName,key:g.divisionName}),g.divisionName===V.value&&!S.value.some(y=>(y==null?void 0:y.activeText)===g.roleName)&&S.value.push({val:!0,activeText:g.roleName})}),P(),J.value=!1})},le=computed(()=>!n.value.some(a=>a.contHour!==E.value)),Q=(a,l)=>{var s,m,g;const o=new Date(w.value),d=`${o.getFullYear()}-${(o.getMonth()+1).toString().padStart(2,"0")}-${a.toString().padStart(2,"0")}`,t=(s=n.value[l])==null?void 0:s.days.findIndex(y=>y.day===d);return l===-1||t===-1?"":((m=n.value[l].days[t])==null?void 0:m.tips)+"<br>"+((g=n.value[l].days[t])==null?void 0:g.time)},P=()=>{n.value=[],z.value=[],b.value=[],f.odata.personal.forEach(a=>{if(a.divisionName===V.value&&S.value.some(l=>l.val&&l.activeText===a.roleName)){let l=c.byInitials(a.employeeName);z.value.push(a.employeeKey),n.value.push({name:l+" ("+a.roleName+")",days:[],contHour:0,code:a.employeeKey,id:!1,ids:n.value.length})}}),f.workSchedule.getUsersYear({code:z.value,year:new Date(w.value).getFullYear()}).then(a=>{a.forEach(l=>{l.dateStart&&b.value.push({code:l.code,dateStart:l.dateStart,dateEnd:l.dateEnd})}),console.log(a),te(),D.value=!1})},te=()=>{f.workSchedule.getWorkSchedule({code:z.value,date:c.parseTime(new Date(w.value),"{Y}-{m}-{dd}")}).then(a=>{a.forEach((l,o)=>{l!==null&&(n.value[o].days=l.data.days,n.value[o].id=l.id)}),T()})},T=()=>{n.value.forEach(a=>{a.contHour=a.days.reduce((l,o)=>l+o.time,0)})},ae=a=>{n.value[a].days=[],T()},ne=a=>{switch(j.value){case"5":for(let l=$.value;l<=u.value.length;l++)u.value[l-1].holidays===""&&N(l,a,!0),u.value[l-1].holidays==="preholiday"&&(p.value-=1,N(l,a,!0),p.value+=1);break;case"2x2":for(let l=$.value;l<=u.value.length;l+=4)N(l,a,!0),l+1<=u.value.length&&N(l+1,a,!0);break;case"2x5":for(let l=$.value;l<=u.value.length;l+=7)for(let o=l;o<l+5&&o<=u.value.length;o++)u.value[o-1].holidays==="preholiday"?(p.value-=1,N(o,a,!0),p.value+=1):N(o,a,!0);break}},N=(a,l,o=!1)=>{const{date:d,ind:t}=U(a,l);t===-1?(n.value[l].days.push({day:d,time:p.value,tips:`(${x.value}:00 - ${x.value+p.value+1}:00)`}),T()):o||(p.value=n.value[l].days[t].time,x.value=parseInt(n.value[l].days[t].tips.slice(1,-12)))},oe=(a,l)=>{const{ind:o}=U(a,l);n.value[l].days.splice(o,1),T(),document.querySelector(".app-main").click()},X=(a,l)=>{const{date:o,ind:d}=U(a,l);n.value[l].days[d]={day:o,time:p.value,tips:`(${x.value}:00 - ${x.value+p.value+1}:00)`},T()},U=(a,l)=>{var t;const o=c.parseTime(new Date(w.value).setDate(a),"{Y}-{m}-{dd}"),d=(t=n.value[l])==null?void 0:t.days.findIndex(s=>s.day===o);return{date:o,ind:d}},ue=async()=>{var Y;A.value=!0;const a=new me.Workbook,l=a.addWorksheet(C(w.value,"month"),{pageSetup:{paperSize:9,orientation:"landscape",fitToPage:!0}}),o={vertical:"middle",horizontal:"center"},d={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},t={vertical:"middle",horizontal:"center",wrapText:!0};l.mergeCells(`A1:${c.cellsDynamically("A1",u.value.length+5)}1`),l.mergeCells(`A2:${c.cellsDynamically("A2",u.value.length+5)}2`),l.mergeCells("A3:A4"),l.mergeCells(`B3:${c.cellsDynamically("B3",u.value.length)}3`),l.mergeCells(`${c.cellsDynamically("B3",u.value.length+1)}3:${c.cellsDynamically("B3",u.value.length+2)}3`),l.mergeCells(`${c.cellsDynamically("B3",u.value.length+3)}3:${c.cellsDynamically("B4",u.value.length+3)}4`),l.mergeCells(`${c.cellsDynamically("B3",u.value.length+4)}3:${c.cellsDynamically("B4",u.value.length+4)}4`),l.getCell("A1").value=r("workSchedule.firm"),l.getCell("A2").value=r("workSchedule.title",{name:V.value})+C(w.value,"month")+` ${new Date(w.value).getFullYear()}`,l.getCell("A3").value=r("workSchedule.month"),l.getCell("B3").value=r("workSchedule.numbersMonth"),l.getCell(3,u.value.length+2).value=r("workSchedule.onSchedule"),l.getCell(3,u.value.length+4).value=r("workSchedule.acquainted"),l.getCell(3,u.value.length+5).value=r("workSchedule.date"),l.getCell(4,u.value.length+2).value=r("workSchedule.days"),l.getCell(4,u.value.length+3).value=`${r("workSchedule.hours")} (${E.value})`;for(let h=2;h<=u.value.length+1;h++)l.getCell(4,h).value=u.value[h-2].weekday+`
|
|
1
|
+
"use strict";const e=require("vue"),de=require("file-saver"),se=require("exceljs"),c=require("./index-DxdyeKnm.cjs"),ce=require("vue-i18n"),i=require("element-plus"),L=require("@imengyu/vue3-context-menu");function ve(k){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(k){for(const C in k)if(C!=="default"){const f=Object.getOwnPropertyDescriptor(k,C);Object.defineProperty(r,C,f.get?f:{enumerable:!0,get:()=>k[C]})}}return r.default=k,Object.freeze(r)}const me=ve(se),ge={class:"work"},he={class:"nav"},fe={style:{height:"100px",width:"100%",display:"inline-block"}},pe=["innerHTML"],ye={key:0,class:"controls-container",style:{"margin-top":".5rem"}},we={key:0,style:{padding:"0.5em 1.5em"}},ke={key:1,style:{padding:"0.5em 1.5em"}},Ce={__name:"WorkTable",props:{checkEdit:{type:Boolean,default:()=>!0},odata:Object,workSchedule:Object,fullName:{type:String,default:"Вы"}},setup(k){const{t:r,d:C}=ce.useI18n(),f=k,A=e.ref(!1),n=e.ref([]),R=e.ref(new Date().getMonth()+1),G=e.ref(!1),b=e.ref([]),w=e.ref(new Date(new Date().getFullYear(),new Date().getMonth(),1)),u=e.ref([]),E=e.ref(0),x=e.ref(9),p=e.ref(8),I=e.ref(!1),J=e.ref(!0),D=e.ref(!1),j=e.ref("5"),$=e.ref(1),V=e.ref(""),q=e.ref([]),S=e.ref([]),z=e.ref([]),v=e.ref({name:"Имя",length:0,code:""}),F=e.ref(!1),O=e.ref({zIndex:30,minWidth:220,x:500,y:200}),Z=e.ref({}),B=e.ref("100%");e.watch(V,async(a,l)=>{a!==l&&(S.value=[],I.value=!1,f.odata.personal.forEach(o=>{o.divisionName===a&&(S.value.some(d=>(d==null?void 0:d.activeText)===o.roleName)||S.value.push({val:!0,activeText:o.roleName}))}),P())}),e.watch(R,async a=>{let l=new Date().getMonth(),o=a===null?l:a-1;o=l-1<=o?o:o+12,w.value=new Date(new Date().getFullYear(),o,1),K()});const _=(a,l,o,d)=>{v.value.ids=a.ids,v.value.key=a.key,v.value.add=a.days.length>0&&a.days[a.days.length-1].cont,v.value.level=l.level,v.value.day=o.cellIndex,O.value.y=d.clientY,O.value.x=d.clientX,l.level===2&&l.no===0&&f.checkEdit&&(v.value.name=r("workSchedule.autocomplete"),F.value=!0),l.level===3&&o.cellIndex-l.no===1&&f.checkEdit&&(N(o.cellIndex,a.ids),v.value.name=r("workSchedule.modeSelection"),F.value=!0)},ee=a=>{console.log(a.row),console.log(row);let l="ee",o="2025.04.21";if(!b.value||b.value.length===0)return"tt";const d=new Date(c.parseDate(o)).getTime();for(let t of b.value){const{dateStart:s,dateEnd:m,code:g}=t;if(s&&m&&g===l){const y=new Date(c.parseDate(s)).getTime(),Y=new Date(c.parseDate(m)).getTime();if(d>=y&&d<=Y)return"vacation"}}return"test"},K=()=>{const a=Z.value,l=new Date(w.value),o=new Date(l.getFullYear(),l.getMonth()+1,0).getDate();let d=[],t=0;for(let s=1;s<=o;s++){const m=c.parseTime(l.setDate(s),"{Y}-{m}-{dd}");t+=a.nowork.includes(m)||a.holidays.includes(m)?0:a.preholidays.includes(m)?7:8;const g=a.nowork.includes(m)?"nowork":a.holidays.includes(m)?"holiday":a.preholidays.includes(m)?"preholiday":"";d.push({day:s,holidays:g,weekday:C(new Date(l.getFullYear(),l.getMonth(),s),"day")})}E.value=t,u.value=d,f.odata.getPersonal({}).then(s=>{var m;V.value.length===0&&(V.value=(m=s.find(g=>g.employeeName===f.fullName))==null?void 0:m.divisionName),s.forEach(g=>{q.value.some(y=>(y==null?void 0:y.value)===g.divisionName)||q.value.push({value:g.divisionName,label:g.divisionName,key:g.divisionName}),g.divisionName===V.value&&!S.value.some(y=>(y==null?void 0:y.activeText)===g.roleName)&&S.value.push({val:!0,activeText:g.roleName})}),P(),J.value=!1})},le=e.computed(()=>!n.value.some(a=>a.contHour!==E.value)),Q=(a,l)=>{var s,m,g;const o=new Date(w.value),d=`${o.getFullYear()}-${(o.getMonth()+1).toString().padStart(2,"0")}-${a.toString().padStart(2,"0")}`,t=(s=n.value[l])==null?void 0:s.days.findIndex(y=>y.day===d);return l===-1||t===-1?"":((m=n.value[l].days[t])==null?void 0:m.tips)+"<br>"+((g=n.value[l].days[t])==null?void 0:g.time)},P=()=>{n.value=[],z.value=[],b.value=[],f.odata.personal.forEach(a=>{if(a.divisionName===V.value&&S.value.some(l=>l.val&&l.activeText===a.roleName)){let l=c.byInitials(a.employeeName);z.value.push(a.employeeKey),n.value.push({name:l+" ("+a.roleName+")",days:[],contHour:0,code:a.employeeKey,id:!1,ids:n.value.length})}}),f.workSchedule.getUsersYear({code:z.value,year:new Date(w.value).getFullYear()}).then(a=>{a.forEach(l=>{l.dateStart&&b.value.push({code:l.code,dateStart:l.dateStart,dateEnd:l.dateEnd})}),console.log(a),te(),D.value=!1})},te=()=>{f.workSchedule.getWorkSchedule({code:z.value,date:c.parseTime(new Date(w.value),"{Y}-{m}-{dd}")}).then(a=>{a.forEach((l,o)=>{l!==null&&(n.value[o].days=l.data.days,n.value[o].id=l.id)}),T()})},T=()=>{n.value.forEach(a=>{a.contHour=a.days.reduce((l,o)=>l+o.time,0)})},ae=a=>{n.value[a].days=[],T()},ne=a=>{switch(j.value){case"5":for(let l=$.value;l<=u.value.length;l++)u.value[l-1].holidays===""&&N(l,a,!0),u.value[l-1].holidays==="preholiday"&&(p.value-=1,N(l,a,!0),p.value+=1);break;case"2x2":for(let l=$.value;l<=u.value.length;l+=4)N(l,a,!0),l+1<=u.value.length&&N(l+1,a,!0);break;case"2x5":for(let l=$.value;l<=u.value.length;l+=7)for(let o=l;o<l+5&&o<=u.value.length;o++)u.value[o-1].holidays==="preholiday"?(p.value-=1,N(o,a,!0),p.value+=1):N(o,a,!0);break}},N=(a,l,o=!1)=>{const{date:d,ind:t}=U(a,l);t===-1?(n.value[l].days.push({day:d,time:p.value,tips:`(${x.value}:00 - ${x.value+p.value+1}:00)`}),T()):o||(p.value=n.value[l].days[t].time,x.value=parseInt(n.value[l].days[t].tips.slice(1,-12)))},oe=(a,l)=>{const{ind:o}=U(a,l);n.value[l].days.splice(o,1),T(),document.querySelector(".app-main").click()},X=(a,l)=>{const{date:o,ind:d}=U(a,l);n.value[l].days[d]={day:o,time:p.value,tips:`(${x.value}:00 - ${x.value+p.value+1}:00)`},T()},U=(a,l)=>{var t;const o=c.parseTime(new Date(w.value).setDate(a),"{Y}-{m}-{dd}"),d=(t=n.value[l])==null?void 0:t.days.findIndex(s=>s.day===o);return{date:o,ind:d}},ue=async()=>{var Y;A.value=!0;const a=new me.Workbook,l=a.addWorksheet(C(w.value,"month"),{pageSetup:{paperSize:9,orientation:"landscape",fitToPage:!0}}),o={vertical:"middle",horizontal:"center"},d={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},t={vertical:"middle",horizontal:"center",wrapText:!0};l.mergeCells(`A1:${c.cellsDynamically("A1",u.value.length+5)}1`),l.mergeCells(`A2:${c.cellsDynamically("A2",u.value.length+5)}2`),l.mergeCells("A3:A4"),l.mergeCells(`B3:${c.cellsDynamically("B3",u.value.length)}3`),l.mergeCells(`${c.cellsDynamically("B3",u.value.length+1)}3:${c.cellsDynamically("B3",u.value.length+2)}3`),l.mergeCells(`${c.cellsDynamically("B3",u.value.length+3)}3:${c.cellsDynamically("B4",u.value.length+3)}4`),l.mergeCells(`${c.cellsDynamically("B3",u.value.length+4)}3:${c.cellsDynamically("B4",u.value.length+4)}4`),l.getCell("A1").value=r("workSchedule.firm"),l.getCell("A2").value=r("workSchedule.title",{name:V.value})+C(w.value,"month")+` ${new Date(w.value).getFullYear()}`,l.getCell("A3").value=r("workSchedule.month"),l.getCell("B3").value=r("workSchedule.numbersMonth"),l.getCell(3,u.value.length+2).value=r("workSchedule.onSchedule"),l.getCell(3,u.value.length+4).value=r("workSchedule.acquainted"),l.getCell(3,u.value.length+5).value=r("workSchedule.date"),l.getCell(4,u.value.length+2).value=r("workSchedule.days"),l.getCell(4,u.value.length+3).value=`${r("workSchedule.hours")} (${E.value})`;for(let h=2;h<=u.value.length+1;h++)l.getCell(4,h).value=u.value[h-2].weekday+`
|
|
2
2
|
`+(h-1),l.getColumn(h).width=6,l.getColumn(h).alignment=t,l.getCell(4,h).border=d;l.getRow(1).height=40,l.getRow(2).height=30,l.getRow(3).height=20,l.getColumn(1).width=15,l.getColumn(u.value.length+2).width=5,l.getColumn(u.value.length+3).width=6,l.getColumn(u.value.length+4).width=13,l.getColumn(u.value.length+5).width=13,l.getColumn(1).alignment=t,l.getCell("A2").alignment=o,l.getCell("A3").alignment=o,l.getCell("B3").alignment=o,l.getCell(3,u.value.length+2).alignment=o,l.getColumn(u.value.length+2).alignment=t,l.getColumn(u.value.length+3).alignment=t,l.getColumn(u.value.length+4).alignment=o,l.getColumn(u.value.length+5).alignment=o,l.getCell("A3").border=d,l.getCell("B3").border=d,l.getCell(3,u.value.length+2).border=d,l.getCell(4,u.value.length+2).border=d,l.getCell(3,u.value.length+4).border=d,l.getCell(3,u.value.length+5).border=d,l.getCell(4,u.value.length+3).border=d;let s=0;for(const h of n.value){let H=[h.name];for(let M=1;M<=u.value.length;M++){const{ind:W}=U(M,s);W!==-1?H[M]=`${h.days[W].time} ${h.days[W].tips}`:H[M]=" "}H.push(((Y=h.days)==null?void 0:Y.length)||" ",h.contHour||0);const ie=l.addRow(H);ie.border=d,s++}let m="Щербина Е. В.";f.odata.personal.forEach(h=>{h.roleName==="Начальник отдела правовой и кадровой работы"&&(m=h.employeeName)}),l.mergeCells(`A${n.value.length+6}:P${n.value.length+6}`),l.mergeCells(`Q${n.value.length+6}:AG${n.value.length+6}`),l.mergeCells(`B${n.value.length+8}:E${n.value.length+8}`),l.mergeCells(`F${n.value.length+8}:L${n.value.length+8}`),l.mergeCells(`M${n.value.length+8}:P${n.value.length+8}`),l.mergeCells(`S${n.value.length+8}:V${n.value.length+8}`),l.mergeCells(`W${n.value.length+8}:AC${n.value.length+8}`),l.mergeCells(`AD${n.value.length+8}:AG${n.value.length+8}`),l.mergeCells(`Z${n.value.length+9}:AA${n.value.length+9}`),l.getCell(`A${n.value.length+6}`).value=r("workSchedule.byInitials"),l.getCell(`Q${n.value.length+6}`).value=r("workSchedule.supervisorHR"),l.getCell(`B${n.value.length+8}`).value=r("workSchedule.compiled")+":",l.getCell(`S${n.value.length+8}`).value=r("workSchedule.approved")+":",l.getCell(`M${n.value.length+8}`).value=c.byInitials(f.fullName),l.getCell(`AD${n.value.length+8}`).value=c.byInitials(m),l.getCell(`Z${n.value.length+9}`).value=r("workSchedule.printPlace"),l.getCell(`A${n.value.length+6}`).alignment={vertical:"middle",horizontal:"right"},l.getCell(`Q${n.value.length+6}`).alignment={vertical:"middle",horizontal:"right"},l.getCell(`B${n.value.length+8}`).alignment={vertical:"middle",horizontal:"right"},l.getCell(`F${n.value.length+8}`).alignment={vertical:"middle",horizontal:"right"},l.getCell(`M${n.value.length+8}`).alignment={vertical:"middle",horizontal:"left"},l.getCell(`AD${n.value.length+8}`).alignment={vertical:"middle",horizontal:"left"},l.getCell(`Z${n.value.length+9}`).alignment=o,l.getCell(`F${n.value.length+8}`).border={bottom:{style:"thin"}},l.getCell(`W${n.value.length+8}`).border={bottom:{style:"thin"}};const g="export_"+c.parseTime(Date.now(),"{dd}.{m}.{Y}")+".xlsx",y=await a.xlsx.writeBuffer();de.saveAs(new Blob([y]),g),A.value=!1},re=async()=>{I.value||f.workSchedule.addWorkSchedule({data:n.value,date:c.parseTime(new Date(w.value),"{Y}-{m}-{dd}")}).then(a=>I.value=a)};return c.holidays().then(a=>{Z.value=a,K()}),(a,l)=>{const o=e.resolveComponent("el-date-picker"),d=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",ge,[e.createElementVNode("div",he,[k.checkEdit?(e.openBlock(),e.createBlock(e.unref(i.ElSelect),{key:0,modelValue:V.value,"onUpdate:modelValue":l[0]||(l[0]=t=>V.value=t),placeholder:"Select",style:{width:"240px"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(q.value,t=>(e.openBlock(),e.createBlock(e.unref(i.ElOption),{key:t.value,label:t.label,value:t.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])):e.createCommentVNode("",!0),k.checkEdit?(e.openBlock(),e.createBlock(e.unref(i.ElButton),{key:1,plain:"",onClick:l[1]||(l[1]=t=>D.value=!0)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.jobTitle")),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(o,{modelValue:R.value,"onUpdate:modelValue":l[2]||(l[2]=t=>R.value=t),type:"month",placeholder:"Выберите месяц",format:"MMM","value-format":"M"},null,8,["modelValue"]),l[19]||(l[19]=e.createElementVNode("div",{class:"expander"},null,-1)),e.createVNode(e.unref(i.ElSwitch),{modelValue:B.value,"onUpdate:modelValue":l[3]||(l[3]=t=>B.value=t),"active-text":a.$t("bids.currentHeight"),"active-value":"100%","inactive-value":"calc(100vh - var(--el-component-size)*4 - var(--el-main-padding)*2 - var(--header-height))"},null,8,["modelValue","active-text"]),e.createVNode(e.unref(i.ElSwitch),{modelValue:G.value,"onUpdate:modelValue":l[4]||(l[4]=t=>G.value=t),"active-text":"Отпуска","active-value":!0,"inactive-value":!1},null,8,["modelValue"])]),e.createVNode(e.unref(i.ElSkeleton),{style:{width:"100%"},loading:J.value,animated:""},{template:e.withCtx(()=>[e.createVNode(e.unref(i.ElSkeletonItem),{variant:"text",style:{width:"100%",height:"2rem"}}),e.createVNode(e.unref(i.ElSkeletonItem),{variant:"text",style:{width:"180px",height:"4rem","margin-right":"4px"}}),e.createVNode(e.unref(i.ElSkeletonItem),{variant:"text",style:{width:"calc( 100% - 184px)",height:"4rem"}}),e.createVNode(e.unref(i.ElSkeletonItem),{variant:"text",style:{width:"180px",height:"8rem","margin-right":"4px"}}),e.createVNode(e.unref(i.ElSkeletonItem),{variant:"text",style:{width:"calc( 100% - 184px)",height:"8rem"}})]),default:e.withCtx(()=>[e.createVNode(e.unref(i.ElTable),{id:"printTable",data:n.value,style:{width:"100%"},"max-height":B.value,size:"small",align:"center",onCellClick:_,"empty-text":e.unref(r)("workSchedule.emptyText"),"cell-class-name":ee()},{default:e.withCtx(()=>[e.createVNode(e.unref(i.ElTableColumn),{label:e.unref(r)("workSchedule.title",{name:V.value})+e.unref(C)(w.value,"month")+` ${new Date(w.value).getFullYear()}`,align:"center",height:"34"},{default:e.withCtx(()=>[e.createVNode(e.unref(i.ElTableColumn),{label:e.unref(r)("workSchedule.month"),width:"180",align:"center",fixed:B.value!=="100%"},{default:e.withCtx(t=>[e.createElementVNode("div",fe,e.toDisplayString(n.value[t.$index].name),1)]),_:1},8,["label","fixed"]),e.createVNode(e.unref(i.ElTableColumn),{label:e.unref(r)("workSchedule.numbersMonth"),align:"center"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,t=>(e.openBlock(),e.createBlock(e.unref(i.ElTableColumn),{key:t.day,width:"46","class-name":t.holidays,align:"center",label:t.weekday+`
|
|
3
|
-
`+t.day.toString()},{default:e.withCtx(s=>[e.createElementVNode("div",{style:{height:"100px",width:"100%",display:"inline-block"},innerHTML:Q(t.day,s.$index)||" "},null,8,pe)]),_:2},1032,["class-name","label"]))),128))]),_:1},8,["label"]),e.createVNode(e.unref(i.ElTableColumn),{label:e.unref(r)("workSchedule.onSchedule"),align:"center",fixed:B.value!=="100%"?"right":!1},{default:e.withCtx(()=>[e.createVNode(e.unref(i.ElTableColumn),{label:e.unref(r)("workSchedule.days"),align:"center"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(n.value[t.$index].days.length||0),1)]),_:1},8,["label"]),e.createVNode(e.unref(i.ElTableColumn),{label:`${e.unref(r)("workSchedule.hours")} ( ${E.value} )`,align:"center"},{default:e.withCtx(t=>[e.createElementVNode("div",{style:e.normalizeStyle(`color: ${E.value===t.row.contHour?"green":"red"};`)},e.toDisplayString(t.row.contHour),5)]),_:1},8,["label"])]),_:1},8,["label","fixed"])]),_:1},8,["label"])]),_:1},8,["data","max-height","empty-text","cell-class-name"])]),_:1},8,["loading"]),
|
|
3
|
+
`+t.day.toString()},{default:e.withCtx(s=>[e.createElementVNode("div",{style:{height:"100px",width:"100%",display:"inline-block"},innerHTML:Q(t.day,s.$index)||" "},null,8,pe)]),_:2},1032,["class-name","label"]))),128))]),_:1},8,["label"]),e.createVNode(e.unref(i.ElTableColumn),{label:e.unref(r)("workSchedule.onSchedule"),align:"center",fixed:B.value!=="100%"?"right":!1},{default:e.withCtx(()=>[e.createVNode(e.unref(i.ElTableColumn),{label:e.unref(r)("workSchedule.days"),align:"center"},{default:e.withCtx(t=>[e.createTextVNode(e.toDisplayString(n.value[t.$index].days.length||0),1)]),_:1},8,["label"]),e.createVNode(e.unref(i.ElTableColumn),{label:`${e.unref(r)("workSchedule.hours")} ( ${E.value} )`,align:"center"},{default:e.withCtx(t=>[e.createElementVNode("div",{style:e.normalizeStyle(`color: ${E.value===t.row.contHour?"green":"red"};`)},e.toDisplayString(t.row.contHour),5)]),_:1},8,["label"])]),_:1},8,["label","fixed"])]),_:1},8,["label"])]),_:1},8,["data","max-height","empty-text","cell-class-name"])]),_:1},8,["loading"]),le.value&&k.checkEdit?(e.openBlock(),e.createElementBlock("div",ye,[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.chartsFilled"))+": ",1),I.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(i.ElButton),{key:0,type:"primary",onClick:re},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.confirm")),1)]),_:1})),l[20]||(l[20]=e.createTextVNode()),e.createElementVNode("span",null,e.toDisplayString(k.fullName),1)])):e.createCommentVNode("",!0),e.withDirectives((e.openBlock(),e.createBlock(e.unref(i.ElButton),{disabled:A.value,plain:"",onClick:ue,style:{"margin-top":".5rem"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.exportExcel")),1)]),_:1},8,["disabled"])),[[d,A.value]]),e.createVNode(e.unref(i.ElDialog),{title:e.unref(r)("workSchedule.jobTitle"),modelValue:D.value,"onUpdate:modelValue":l[6]||(l[6]=t=>D.value=t),width:"400px"},{footer:e.withCtx(()=>[e.createVNode(e.unref(i.ElButton),{onClick:l[5]||(l[5]=t=>D.value=!1),size:"default"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("workSchedule.cancel")),1)]),_:1}),e.createVNode(e.unref(i.ElButton),{size:"default",type:"primary",onClick:P},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.$t("workSchedule.select")),1)]),_:1})]),default:e.withCtx(()=>[e.createVNode(e.unref(i.ElForm),{ref:"dialogForm",model:S.value,autocomplete:"on"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,t=>(e.openBlock(),e.createBlock(e.unref(i.ElFormItem),null,{default:e.withCtx(()=>[e.createVNode(e.unref(i.ElSwitch),{modelValue:t.val,"onUpdate:modelValue":s=>t.val=s,"active-text":t.activeText},null,8,["modelValue","onUpdate:modelValue","active-text"])]),_:2},1024))),256))]),_:1},8,["model"])]),_:1},8,["title","modelValue"]),e.createVNode(e.unref(L.ContextMenu),{show:F.value,"onUpdate:show":l[18]||(l[18]=t=>F.value=t),options:O.value},{default:e.withCtx(()=>[e.createVNode(e.unref(L.ContextMenuItem),{label:v.value.name,disabled:""},null,8,["label"]),e.createVNode(e.unref(L.ContextMenuSeparator)),v.value.level===2?(e.openBlock(),e.createElementBlock("div",we,[e.createVNode(e.unref(i.ElRadioGroup),{modelValue:j.value,"onUpdate:modelValue":l[7]||(l[7]=t=>j.value=t),size:"small"},{default:e.withCtx(()=>[e.createVNode(e.unref(i.ElRadioButton),{label:e.unref(r)("workSchedule.Days5"),value:"5"},null,8,["label"]),e.createVNode(e.unref(i.ElRadioButton),{label:"2 Х 2",value:"2x2"}),e.createVNode(e.unref(i.ElRadioButton),{label:"2 Х 5",value:"2x5"})]),_:1},8,["modelValue"]),l[21]||(l[21]=e.createElementVNode("br",null,null,-1)),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("workSchedule.fromDate"))+":",1),e.createVNode(e.unref(i.ElSlider),{modelValue:$.value,"onUpdate:modelValue":l[8]||(l[8]=t=>$.value=t),step:1,min:1,max:u.value.length},null,8,["modelValue","max"]),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("workSchedule.with"))+":",1),e.createVNode(e.unref(i.ElSlider),{modelValue:x.value,"onUpdate:modelValue":l[9]||(l[9]=t=>x.value=t),step:1,min:8,max:11},null,8,["modelValue"]),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("workSchedule.duration"))+":",1),e.createVNode(e.unref(i.ElSlider),{modelValue:p.value,"onUpdate:modelValue":l[10]||(l[10]=t=>p.value=t),step:1,min:4,max:12},null,8,["modelValue"]),e.createVNode(e.unref(i.ElButton),{style:{"margin-top":".5rem"},size:"small",onClick:l[11]||(l[11]=t=>ne(v.value.ids))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.fillOut")),1)]),_:1}),e.createVNode(e.unref(i.ElButton),{style:{"margin-top":".5rem"},size:"small",onClick:l[12]||(l[12]=t=>ae(v.value.ids))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.clearRow")),1)]),_:1})])):(e.openBlock(),e.createElementBlock("div",ke,[e.createElementVNode("div",null,e.toDisplayString(Q(v.value.day,v.value.ids)),1),l[22]||(l[22]=e.createElementVNode("br",null,null,-1)),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("workSchedule.with"))+":",1),e.createVNode(e.unref(i.ElSlider),{modelValue:x.value,"onUpdate:modelValue":l[13]||(l[13]=t=>x.value=t),step:1,min:8,max:11,onChange:l[14]||(l[14]=t=>X(v.value.day,v.value.ids))},null,8,["modelValue"]),e.createElementVNode("span",null,e.toDisplayString(e.unref(r)("workSchedule.duration"))+":",1),e.createVNode(e.unref(i.ElSlider),{modelValue:p.value,"onUpdate:modelValue":l[15]||(l[15]=t=>p.value=t),step:1,min:4,max:12,onChange:l[16]||(l[16]=t=>X(v.value.day,v.value.ids))},null,8,["modelValue"]),e.createVNode(e.unref(i.ElButton),{style:{"margin-top":".5rem"},size:"small",onClick:l[17]||(l[17]=t=>oe(v.value.day,v.value.ids))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)("workSchedule.delete")),1)]),_:1})]))]),_:1},8,["show","options"])])}}};module.exports=Ce;
|
package/dist/WorkTable.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { ref as v, watch as fe,
|
|
2
|
-
import { saveAs as
|
|
3
|
-
import * as
|
|
4
|
-
import { p as P, b as ie, h as
|
|
5
|
-
import { useI18n as
|
|
6
|
-
import { ElSelect as
|
|
7
|
-
import { ContextMenu as
|
|
8
|
-
const
|
|
1
|
+
import { ref as v, watch as fe, computed as Me, resolveComponent as Ne, resolveDirective as Ae, createElementBlock as A, openBlock as f, createElementVNode as w, createVNode as i, createCommentVNode as _, withDirectives as Te, createBlock as T, unref as a, withCtx as s, Fragment as ue, renderList as de, createTextVNode as $, toDisplayString as h, normalizeStyle as Be } from "vue";
|
|
2
|
+
import { saveAs as ze } from "file-saver";
|
|
3
|
+
import * as Fe from "exceljs";
|
|
4
|
+
import { p as P, b as ie, h as Ue, a as re, c as D } from "./index-D4ZMBdCa.js";
|
|
5
|
+
import { useI18n as Ye } from "vue-i18n";
|
|
6
|
+
import { ElSelect as Ie, ElOption as He, ElButton as M, ElSwitch as se, ElSkeleton as Re, ElTable as We, ElTableColumn as B, ElSkeletonItem as j, ElDialog as Pe, ElForm as je, ElFormItem as Le, ElRadioGroup as Oe, ElRadioButton as ve, ElSlider as L } from "element-plus";
|
|
7
|
+
import { ContextMenu as Ge, ContextMenuItem as Ze, ContextMenuSeparator as qe } from "@imengyu/vue3-context-menu";
|
|
8
|
+
const Je = { class: "work" }, Ke = { class: "nav" }, Qe = { style: { height: "100px", width: "100%", display: "inline-block" } }, Xe = ["innerHTML"], _e = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "controls-container",
|
|
11
11
|
style: { "margin-top": ".5rem" }
|
|
12
|
-
},
|
|
12
|
+
}, el = {
|
|
13
13
|
key: 0,
|
|
14
14
|
style: { padding: "0.5em 1.5em" }
|
|
15
|
-
},
|
|
15
|
+
}, ll = {
|
|
16
16
|
key: 1,
|
|
17
17
|
style: { padding: "0.5em 1.5em" }
|
|
18
|
-
},
|
|
18
|
+
}, il = {
|
|
19
19
|
__name: "WorkTable",
|
|
20
20
|
props: {
|
|
21
21
|
checkEdit: { type: Boolean, default: () => !0 },
|
|
@@ -24,7 +24,7 @@ const qe = { class: "work" }, Je = { class: "nav" }, Ke = { style: { height: "10
|
|
|
24
24
|
fullName: { type: String, default: "Вы" }
|
|
25
25
|
},
|
|
26
26
|
setup(z) {
|
|
27
|
-
const { t: d, d: O } =
|
|
27
|
+
const { t: d, d: O } = Ye(), S = z, G = v(!1), n = v([
|
|
28
28
|
// { name: 'Иванов П.М. (Ведущий работник месяца)',
|
|
29
29
|
// days: [], // {day: "2024-11-01", tips: '(9:00 - 18:00)', time: 8 }
|
|
30
30
|
// contHour: 0,
|
|
@@ -54,7 +54,7 @@ const qe = { class: "work" }, Je = { class: "nav" }, Ke = { style: { height: "10
|
|
|
54
54
|
const we = (t, e, o, r) => {
|
|
55
55
|
m.value.ids = t.ids, m.value.key = t.key, m.value.add = t.days.length > 0 && t.days[t.days.length - 1].cont, m.value.level = e.level, m.value.day = o.cellIndex, ae.value.y = r.clientY, ae.value.x = r.clientX, e.level === 2 && e.no === 0 && S.checkEdit && (m.value.name = d("workSchedule.autocomplete"), J.value = !0), e.level === 3 && o.cellIndex - e.no === 1 && S.checkEdit && (N(o.cellIndex, t.ids), m.value.name = d("workSchedule.modeSelection"), J.value = !0);
|
|
56
56
|
}, ke = (t) => {
|
|
57
|
-
console.log(t);
|
|
57
|
+
console.log(t.row), console.log(row);
|
|
58
58
|
let e = "ee", o = "2025.04.21";
|
|
59
59
|
if (!F.value || F.value.length === 0) return "tt";
|
|
60
60
|
const r = new Date(re(o)).getTime();
|
|
@@ -81,7 +81,7 @@ const qe = { class: "work" }, Je = { class: "nav" }, Ke = { style: { height: "10
|
|
|
81
81
|
te.value.some((C) => (C == null ? void 0 : C.value) === p.divisionName) || te.value.push({ value: p.divisionName, label: p.divisionName, key: p.divisionName }), p.divisionName === V.value && !E.value.some((C) => (C == null ? void 0 : C.activeText) === p.roleName) && E.value.push({ val: !0, activeText: p.roleName });
|
|
82
82
|
}), ne(), me.value = !1;
|
|
83
83
|
});
|
|
84
|
-
}, Ce =
|
|
84
|
+
}, Ce = Me(() => !n.value.some((t) => t.contHour !== U.value)), pe = (t, e) => {
|
|
85
85
|
var g, c, p;
|
|
86
86
|
const o = new Date(x.value), r = `${o.getFullYear()}-${(o.getMonth() + 1).toString().padStart(2, "0")}-${t.toString().padStart(2, "0")}`, l = (g = n.value[e]) == null ? void 0 : g.days.findIndex((C) => C.day === r);
|
|
87
87
|
return e === -1 || l === -1 ? "" : ((c = n.value[e].days[l]) == null ? void 0 : c.tips) + "<br>" + ((p = n.value[e].days[l]) == null ? void 0 : p.time);
|
|
@@ -150,7 +150,7 @@ const qe = { class: "work" }, Je = { class: "nav" }, Ke = { style: { height: "10
|
|
|
150
150
|
}, Ve = async () => {
|
|
151
151
|
var Q;
|
|
152
152
|
G.value = !0;
|
|
153
|
-
const t = new
|
|
153
|
+
const t = new Fe.Workbook(), e = t.addWorksheet(O(x.value, "month"), { pageSetup: { paperSize: 9, orientation: "landscape", fitToPage: !0 } }), o = { vertical: "middle", horizontal: "center" }, r = { top: { style: "thin" }, left: { style: "thin" }, bottom: { style: "thin" }, right: { style: "thin" } }, l = { vertical: "middle", horizontal: "center", wrapText: !0 };
|
|
154
154
|
e.mergeCells(`A1:${D("A1", u.value.length + 5)}1`), e.mergeCells(`A2:${D("A2", u.value.length + 5)}2`), e.mergeCells("A3:A4"), e.mergeCells(`B3:${D("B3", u.value.length)}3`), e.mergeCells(`${D("B3", u.value.length + 1)}3:${D("B3", u.value.length + 2)}3`), e.mergeCells(`${D("B3", u.value.length + 3)}3:${D("B4", u.value.length + 3)}4`), e.mergeCells(`${D("B3", u.value.length + 4)}3:${D("B4", u.value.length + 4)}4`), e.getCell("A1").value = d("workSchedule.firm"), e.getCell("A2").value = d("workSchedule.title", { name: V.value }) + O(x.value, "month") + ` ${new Date(x.value).getFullYear()}`, e.getCell("A3").value = d("workSchedule.month"), e.getCell("B3").value = d("workSchedule.numbersMonth"), e.getCell(3, u.value.length + 2).value = d("workSchedule.onSchedule"), e.getCell(3, u.value.length + 4).value = d("workSchedule.acquainted"), e.getCell(3, u.value.length + 5).value = d("workSchedule.date"), e.getCell(4, u.value.length + 2).value = d("workSchedule.days"), e.getCell(4, u.value.length + 3).value = `${d("workSchedule.hours")} (${U.value})`;
|
|
155
155
|
for (let y = 2; y <= u.value.length + 1; y++)
|
|
156
156
|
e.getCell(4, y).value = u.value[y - 2].weekday + `
|
|
@@ -172,17 +172,17 @@ const qe = { class: "work" }, Je = { class: "nav" }, Ke = { style: { height: "10
|
|
|
172
172
|
y.roleName === "Начальник отдела правовой и кадровой работы" && (c = y.employeeName);
|
|
173
173
|
}), 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 = d("workSchedule.byInitials"), e.getCell(`Q${n.value.length + 6}`).value = d("workSchedule.supervisorHR"), e.getCell(`B${n.value.length + 8}`).value = d("workSchedule.compiled") + ":", e.getCell(`S${n.value.length + 8}`).value = d("workSchedule.approved") + ":", e.getCell(`M${n.value.length + 8}`).value = ie(S.fullName), e.getCell(`AD${n.value.length + 8}`).value = ie(c), e.getCell(`Z${n.value.length + 9}`).value = d("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 = o, e.getCell(`F${n.value.length + 8}`).border = { bottom: { style: "thin" } }, e.getCell(`W${n.value.length + 8}`).border = { bottom: { style: "thin" } };
|
|
174
174
|
const p = "export_" + P(Date.now(), "{dd}.{m}.{Y}") + ".xlsx", C = await t.xlsx.writeBuffer();
|
|
175
|
-
|
|
175
|
+
ze(new Blob([C]), p), G.value = !1;
|
|
176
176
|
}, De = async () => {
|
|
177
177
|
Z.value || S.workSchedule.addWorkSchedule({ data: n.value, date: P(new Date(x.value), "{Y}-{m}-{dd}") }).then((t) => Z.value = t);
|
|
178
178
|
};
|
|
179
|
-
return
|
|
179
|
+
return Ue().then((t) => {
|
|
180
180
|
he.value = t, ce();
|
|
181
181
|
}), (t, e) => {
|
|
182
|
-
const o =
|
|
183
|
-
return f(), A("div",
|
|
184
|
-
w("div",
|
|
185
|
-
z.checkEdit ? (f(), T(a(
|
|
182
|
+
const o = Ne("el-date-picker"), r = Ae("loading");
|
|
183
|
+
return f(), A("div", Je, [
|
|
184
|
+
w("div", Ke, [
|
|
185
|
+
z.checkEdit ? (f(), T(a(Ie), {
|
|
186
186
|
key: 0,
|
|
187
187
|
modelValue: V.value,
|
|
188
188
|
"onUpdate:modelValue": e[0] || (e[0] = (l) => V.value = l),
|
|
@@ -190,7 +190,7 @@ const qe = { class: "work" }, Je = { class: "nav" }, Ke = { style: { height: "10
|
|
|
190
190
|
style: { width: "240px" }
|
|
191
191
|
}, {
|
|
192
192
|
default: s(() => [
|
|
193
|
-
(f(!0), A(ue, null, de(te.value, (l) => (f(), T(a(
|
|
193
|
+
(f(!0), A(ue, null, de(te.value, (l) => (f(), T(a(He), {
|
|
194
194
|
key: l.value,
|
|
195
195
|
label: l.label,
|
|
196
196
|
value: l.value
|
|
@@ -232,7 +232,7 @@ const qe = { class: "work" }, Je = { class: "nav" }, Ke = { style: { height: "10
|
|
|
232
232
|
"inactive-value": !1
|
|
233
233
|
}, null, 8, ["modelValue"])
|
|
234
234
|
]),
|
|
235
|
-
i(a(
|
|
235
|
+
i(a(Re), {
|
|
236
236
|
style: { width: "100%" },
|
|
237
237
|
loading: me.value,
|
|
238
238
|
animated: ""
|
|
@@ -260,7 +260,7 @@ const qe = { class: "work" }, Je = { class: "nav" }, Ke = { style: { height: "10
|
|
|
260
260
|
})
|
|
261
261
|
]),
|
|
262
262
|
default: s(() => [
|
|
263
|
-
i(a(
|
|
263
|
+
i(a(We), {
|
|
264
264
|
id: "printTable",
|
|
265
265
|
data: n.value,
|
|
266
266
|
style: { width: "100%" },
|
|
@@ -285,7 +285,7 @@ const qe = { class: "work" }, Je = { class: "nav" }, Ke = { style: { height: "10
|
|
|
285
285
|
fixed: H.value !== "100%"
|
|
286
286
|
}, {
|
|
287
287
|
default: s((l) => [
|
|
288
|
-
w("div",
|
|
288
|
+
w("div", Qe, h(n.value[l.$index].name), 1)
|
|
289
289
|
]),
|
|
290
290
|
_: 1
|
|
291
291
|
}, 8, ["label", "fixed"]),
|
|
@@ -306,7 +306,7 @@ const qe = { class: "work" }, Je = { class: "nav" }, Ke = { style: { height: "10
|
|
|
306
306
|
w("div", {
|
|
307
307
|
style: { height: "100px", width: "100%", display: "inline-block" },
|
|
308
308
|
innerHTML: pe(l.day, g.$index) || " "
|
|
309
|
-
}, null, 8,
|
|
309
|
+
}, null, 8, Xe)
|
|
310
310
|
]),
|
|
311
311
|
_: 2
|
|
312
312
|
}, 1032, ["class-name", "label"]))), 128))
|
|
@@ -334,7 +334,7 @@ const qe = { class: "work" }, Je = { class: "nav" }, Ke = { style: { height: "10
|
|
|
334
334
|
}, {
|
|
335
335
|
default: s((l) => [
|
|
336
336
|
w("div", {
|
|
337
|
-
style:
|
|
337
|
+
style: Be(`color: ${U.value === l.row.contHour ? "green" : "red"};`)
|
|
338
338
|
}, h(l.row.contHour), 5)
|
|
339
339
|
]),
|
|
340
340
|
_: 1
|
|
@@ -351,7 +351,7 @@ const qe = { class: "work" }, Je = { class: "nav" }, Ke = { style: { height: "10
|
|
|
351
351
|
]),
|
|
352
352
|
_: 1
|
|
353
353
|
}, 8, ["loading"]),
|
|
354
|
-
|
|
354
|
+
Ce.value && z.checkEdit ? (f(), A("div", _e, [
|
|
355
355
|
$(h(a(d)("workSchedule.chartsFilled")) + ": ", 1),
|
|
356
356
|
Z.value ? _("", !0) : (f(), T(a(M), {
|
|
357
357
|
key: 0,
|
|
@@ -366,7 +366,7 @@ const qe = { class: "work" }, Je = { class: "nav" }, Ke = { style: { height: "10
|
|
|
366
366
|
e[20] || (e[20] = $()),
|
|
367
367
|
w("span", null, h(z.fullName), 1)
|
|
368
368
|
])) : _("", !0),
|
|
369
|
-
|
|
369
|
+
Te((f(), T(a(M), {
|
|
370
370
|
disabled: G.value,
|
|
371
371
|
plain: "",
|
|
372
372
|
onClick: Ve,
|
|
@@ -379,7 +379,7 @@ const qe = { class: "work" }, Je = { class: "nav" }, Ke = { style: { height: "10
|
|
|
379
379
|
}, 8, ["disabled"])), [
|
|
380
380
|
[r, G.value]
|
|
381
381
|
]),
|
|
382
|
-
i(a(
|
|
382
|
+
i(a(Pe), {
|
|
383
383
|
title: a(d)("workSchedule.jobTitle"),
|
|
384
384
|
modelValue: Y.value,
|
|
385
385
|
"onUpdate:modelValue": e[6] || (e[6] = (l) => Y.value = l),
|
|
@@ -407,13 +407,13 @@ const qe = { class: "work" }, Je = { class: "nav" }, Ke = { style: { height: "10
|
|
|
407
407
|
})
|
|
408
408
|
]),
|
|
409
409
|
default: s(() => [
|
|
410
|
-
i(a(
|
|
410
|
+
i(a(je), {
|
|
411
411
|
ref: "dialogForm",
|
|
412
412
|
model: E.value,
|
|
413
413
|
autocomplete: "on"
|
|
414
414
|
}, {
|
|
415
415
|
default: s(() => [
|
|
416
|
-
(f(!0), A(ue, null, de(E.value, (l) => (f(), T(a(
|
|
416
|
+
(f(!0), A(ue, null, de(E.value, (l) => (f(), T(a(Le), null, {
|
|
417
417
|
default: s(() => [
|
|
418
418
|
i(a(se), {
|
|
419
419
|
modelValue: l.val,
|
|
@@ -429,19 +429,19 @@ const qe = { class: "work" }, Je = { class: "nav" }, Ke = { style: { height: "10
|
|
|
429
429
|
]),
|
|
430
430
|
_: 1
|
|
431
431
|
}, 8, ["title", "modelValue"]),
|
|
432
|
-
i(a(
|
|
432
|
+
i(a(Ge), {
|
|
433
433
|
show: J.value,
|
|
434
434
|
"onUpdate:show": e[18] || (e[18] = (l) => J.value = l),
|
|
435
435
|
options: ae.value
|
|
436
436
|
}, {
|
|
437
437
|
default: s(() => [
|
|
438
|
-
i(a(
|
|
438
|
+
i(a(Ze), {
|
|
439
439
|
label: m.value.name,
|
|
440
440
|
disabled: ""
|
|
441
441
|
}, null, 8, ["label"]),
|
|
442
|
-
i(a(
|
|
443
|
-
m.value.level === 2 ? (f(), A("div",
|
|
444
|
-
i(a(
|
|
442
|
+
i(a(qe)),
|
|
443
|
+
m.value.level === 2 ? (f(), A("div", el, [
|
|
444
|
+
i(a(Oe), {
|
|
445
445
|
modelValue: le.value,
|
|
446
446
|
"onUpdate:modelValue": e[7] || (e[7] = (l) => le.value = l),
|
|
447
447
|
size: "small"
|
|
@@ -507,7 +507,7 @@ const qe = { class: "work" }, Je = { class: "nav" }, Ke = { style: { height: "10
|
|
|
507
507
|
]),
|
|
508
508
|
_: 1
|
|
509
509
|
})
|
|
510
|
-
])) : (f(), A("div",
|
|
510
|
+
])) : (f(), A("div", ll, [
|
|
511
511
|
w("div", null, h(pe(m.value.day, m.value.ids)), 1),
|
|
512
512
|
e[22] || (e[22] = w("br", null, null, -1)),
|
|
513
513
|
w("span", null, h(a(d)("workSchedule.with")) + ":", 1),
|
|
@@ -547,5 +547,5 @@ const qe = { class: "work" }, Je = { class: "nav" }, Ke = { style: { height: "10
|
|
|
547
547
|
}
|
|
548
548
|
};
|
|
549
549
|
export {
|
|
550
|
-
|
|
550
|
+
il as default
|
|
551
551
|
};
|