@studio-west/employees 0.5.8 → 0.5.10

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.
@@ -1,16 +1,16 @@
1
- import { ref as f, createElementBlock as $, openBlock as h, createElementVNode as p, createCommentVNode as P, toDisplayString as b, unref as a, Fragment as q, renderList as W, normalizeClass as re, watch as ye, computed as Ce, resolveDirective as be, createBlock as B, createVNode as v, withDirectives as De, withCtx as m, createTextVNode as V, withModifiers as Se } from "vue";
2
- import { p as A, h as we } from "./index-DIjJDdmP.js";
1
+ import { ref as f, createElementBlock as $, openBlock as h, createElementVNode as p, createCommentVNode as P, toDisplayString as b, unref as a, Fragment as q, renderList as W, normalizeClass as re, watch as ye, computed as Ce, resolveDirective as be, createBlock as B, createVNode as v, withDirectives as De, withCtx as m, createTextVNode as V } from "vue";
2
+ import { p as A, h as Se } from "./index-DIjJDdmP.js";
3
3
  import { useI18n as me } from "vue-i18n";
4
- import { saveAs as xe } from "file-saver";
5
- import * as ke from "exceljs";
6
- import { ElSelect as ie, ElOption as de, ElButton as F, ElSkeleton as Ee, ElTable as $e, ElTableColumn as R, ElInput as Te, ElSkeletonItem as le, ElDialog as ve, ElForm as ce, ElFormItem as Ve, ElSwitch as Ie } from "element-plus";
7
- import { ContextMenu as Me, ContextMenuItem as se, ContextMenuSeparator as Ne } from "@imengyu/vue3-context-menu";
8
- const _e = (j, I) => {
4
+ import { saveAs as we } from "file-saver";
5
+ import * as xe from "exceljs";
6
+ import { ElSelect as ie, ElOption as de, ElButton as F, ElSkeleton as ke, ElTable as Ee, ElTableColumn as R, ElInput as $e, ElSkeletonItem as le, ElDialog as ve, ElForm as ce, ElFormItem as Te, ElSwitch as Ve } from "element-plus";
7
+ import { ContextMenu as Ie, ContextMenuItem as se, ContextMenuSeparator as Ne } from "@imengyu/vue3-context-menu";
8
+ const Me = (j, I) => {
9
9
  const o = j.__vccOpts || j;
10
10
  for (const [w, n] of I)
11
11
  o[w] = n;
12
12
  return o;
13
- }, Ye = { class: "wrapper" }, Be = { class: "month_year" }, Fe = { class: "text" }, Ae = { class: "week" }, je = { class: "month" }, ze = ["onClick"], Ge = { key: 0 }, Ue = { class: "month_year" }, Oe = { class: "text" }, Pe = { class: "week" }, qe = { class: "month" }, Le = ["onClick"], Re = {
13
+ }, _e = { class: "wrapper" }, Ye = { class: "month_year" }, Be = { class: "text" }, Fe = { class: "week" }, Ae = { class: "month" }, je = ["onClick"], ze = { key: 0 }, Ge = { class: "month_year" }, Ue = { class: "text" }, Oe = { class: "week" }, Pe = { class: "month" }, qe = ["onClick"], Le = {
14
14
  __name: "DataPicker",
15
15
  props: {
16
16
  data: Object,
@@ -22,14 +22,14 @@ const _e = (j, I) => {
22
22
  emits: ["input"],
23
23
  setup(j, { emit: I }) {
24
24
  var ae, ne, oe, Q;
25
- const o = f(/* @__PURE__ */ new Date()), w = f(/* @__PURE__ */ new Date()), n = j, J = I, S = f((/* @__PURE__ */ new Date()).getFullYear()), z = f((/* @__PURE__ */ new Date()).getMonth()), K = f((/* @__PURE__ */ new Date()).getFullYear()), g = f((/* @__PURE__ */ new Date()).getMonth()), s = f([]), G = f(0), L = f(0), D = f(-1), k = f(-1), { locale: H } = me(), N = /en|zh|ja|he/.test(H.value) ? 0 : 1, _ = n.range === "range" ? 2 : 1, U = (r) => {
25
+ const o = f(/* @__PURE__ */ new Date()), w = f(/* @__PURE__ */ new Date()), n = j, J = I, S = f((/* @__PURE__ */ new Date()).getFullYear()), z = f((/* @__PURE__ */ new Date()).getMonth()), K = f((/* @__PURE__ */ new Date()).getFullYear()), g = f((/* @__PURE__ */ new Date()).getMonth()), s = f([]), G = f(0), L = f(0), D = f(-1), k = f(-1), { locale: H } = me(), M = /en|zh|ja|he/.test(H.value) ? 0 : 1, _ = n.range === "range" ? 2 : 1, U = (r) => {
26
26
  const i = r.split(r.match(/\D.*?\D?/));
27
27
  return i[0].length > 2 ? i.join("-") + "T00:00:01" : i.reverse().join("-") + "T00:00:01";
28
28
  };
29
29
  typeof ((ae = n.data) == null ? void 0 : ae.startDate) < "u" && (o.value = new Date(U(n.data.startDate)), S.value = o.value.getFullYear(), g.value = o.value.getMonth()), typeof ((ne = n.data) == null ? void 0 : ne.endDate) < "u" && (w.value = new Date(U(n.data.endDate)), K.value = w.value.getFullYear(), z.value = w.value.getMonth());
30
30
  const c = () => {
31
31
  let r = new Date(S.value, g.value, 0);
32
- for (let t = r.getDate() - r.getDay() + N; t <= r.getDate() && r.getDay() !== 6 + N; t++)
32
+ for (let t = r.getDate() - r.getDay() + M; t <= r.getDate() && r.getDay() !== 6 + M; t++)
33
33
  G.value++, s.value.push({ day: t, month: r.getMonth(), year: r.getFullYear(), class: [] });
34
34
  for (let t = 1; t <= new Date(S.value, g.value + 1, 0).getDate(); t++)
35
35
  G.value++, s.value.push({ day: t, month: g.value, year: S.value, class: [] });
@@ -40,7 +40,7 @@ const _e = (j, I) => {
40
40
  }
41
41
  let i = new Date(S.value, g.value + _, 1);
42
42
  console.log(i.getDay());
43
- for (let t = 1; t <= (7 - i.getDay() + N) % 7 && i.getDay() !== N; t++)
43
+ for (let t = 1; t <= (7 - i.getDay() + M) % 7 && i.getDay() !== M; t++)
44
44
  s.value.push({ day: t, month: i.getMonth(), year: i.getFullYear(), class: [] });
45
45
  n.data.holiday.length !== 0 && (n.data.holiday.preholidays.forEach((t) => {
46
46
  let d = t.split("-");
@@ -104,9 +104,9 @@ const _e = (j, I) => {
104
104
  }
105
105
  return !0;
106
106
  };
107
- return (r, i) => (h(), $("div", Ye, [
107
+ return (r, i) => (h(), $("div", _e, [
108
108
  p("div", null, [
109
- p("p", Be, [
109
+ p("p", Ye, [
110
110
  p("span", null, [
111
111
  p("button", {
112
112
  onClick: i[0] || (i[0] = (t) => Y(S.value - 1, g.value))
@@ -115,7 +115,7 @@ const _e = (j, I) => {
115
115
  onClick: i[1] || (i[1] = (t) => Y(S.value, g.value - 1))
116
116
  }, "‹")
117
117
  ]),
118
- p("span", Fe, [
118
+ p("span", Be, [
119
119
  p("button", null, b(S.value), 1),
120
120
  p("button", null, b(a(A)(o.value.setMonth(g.value), "{F}")), 1)
121
121
  ]),
@@ -128,26 +128,26 @@ const _e = (j, I) => {
128
128
  }, "»")
129
129
  ])
130
130
  ]),
131
- p("div", Ae, [
131
+ p("div", Fe, [
132
132
  (h(), $(q, null, W(7, (t, d) => p("button", {
133
133
  key: d,
134
134
  class: "disabled"
135
- }, b(a(A)(new Date(1970, 1, t + a(N)), "{D}")), 1)), 64))
135
+ }, b(a(A)(new Date(1970, 1, t + a(M)), "{D}")), 1)), 64))
136
136
  ]),
137
- p("div", je, [
137
+ p("div", Ae, [
138
138
  (h(!0), $(q, null, W(s.value, (t, d) => (h(), $(q, { key: d }, [
139
- d < G.value + (7 - new Date(S.value, g.value + 1, 1).getDay() + a(N)) % 7 ? (h(), $("button", {
139
+ d < G.value + (7 - new Date(S.value, g.value + 1, 1).getDay() + a(M)) % 7 ? (h(), $("button", {
140
140
  key: 0,
141
141
  class: re(t.month === g.value && (!n.limitation || new Date(t.year, t.month, t.day + 1).getTime() > new Date(U(n.limitation[0].dateStart)).getTime() && new Date(t.year, t.month, t.day).getTime() < new Date(U(n.limitation[0].dateEnd)).getTime()) ? t.class : "disabled"),
142
142
  onClick: () => {
143
143
  t.month === g.value && E(t, d);
144
144
  }
145
- }, b(t.day), 11, ze)) : P("", !0)
145
+ }, b(t.day), 11, je)) : P("", !0)
146
146
  ], 64))), 128))
147
147
  ])
148
148
  ]),
149
- n.range === "range" ? (h(), $("div", Ge, [
150
- p("p", Ue, [
149
+ n.range === "range" ? (h(), $("div", ze, [
150
+ p("p", Ge, [
151
151
  p("span", null, [
152
152
  p("button", {
153
153
  onClick: i[4] || (i[4] = (t) => Y(S.value - 1, g.value))
@@ -156,7 +156,7 @@ const _e = (j, I) => {
156
156
  onClick: i[5] || (i[5] = (t) => Y(S.value, g.value - 1))
157
157
  }, "‹")
158
158
  ]),
159
- p("span", Oe, [
159
+ p("span", Ue, [
160
160
  p("button", null, b(new Date(S.value, g.value + 1).getFullYear()), 1),
161
161
  p("button", null, b(a(A)(o.value.setMonth(g.value + 1), "{F}")), 1)
162
162
  ]),
@@ -169,34 +169,34 @@ const _e = (j, I) => {
169
169
  }, "»")
170
170
  ])
171
171
  ]),
172
- p("div", Pe, [
172
+ p("div", Oe, [
173
173
  (h(), $(q, null, W(7, (t, d) => p("button", {
174
174
  key: d,
175
175
  class: "disabled"
176
- }, b(a(A)(new Date(1970, 1, t + a(N)), "{D}")), 1)), 64))
176
+ }, b(a(A)(new Date(1970, 1, t + a(M)), "{D}")), 1)), 64))
177
177
  ]),
178
- p("div", qe, [
178
+ p("div", Pe, [
179
179
  (h(!0), $(q, null, W(s.value, (t, d) => (h(), $(q, { key: d }, [
180
- d >= G.value - (7 + new Date(S.value, g.value + 1, 1).getDay() - a(N)) % 7 ? (h(), $("button", {
180
+ d >= G.value - (7 + new Date(S.value, g.value + 1, 1).getDay() - a(M)) % 7 ? (h(), $("button", {
181
181
  key: 0,
182
182
  class: re(t.month === L.value.getMonth() && (!n.limitation || new Date(t.year, t.month, t.day + 1).getTime() > new Date(U(n.limitation[0].dateStart)).getTime() && new Date(t.year, t.month, t.day).getTime() < new Date(U(n.limitation[0].dateEnd)).getTime()) ? t.class : "disabled"),
183
183
  onClick: () => {
184
184
  t.month === L.value.getMonth() && E(t, d);
185
185
  }
186
- }, b(t.day), 11, Le)) : P("", !0)
186
+ }, b(t.day), 11, qe)) : P("", !0)
187
187
  ], 64))), 128))
188
188
  ])
189
189
  ])) : P("", !0)
190
190
  ]));
191
191
  }
192
- }, We = /* @__PURE__ */ _e(Re, [["__scopeId", "data-v-d1aa0363"]]), Je = {
192
+ }, Re = /* @__PURE__ */ Me(Le, [["__scopeId", "data-v-d1aa0363"]]), We = {
193
193
  key: 1,
194
194
  class: "controls-container",
195
195
  style: { "margin-top": ".5rem" }
196
- }, Ke = { key: 0 }, Xe = {
196
+ }, Je = { key: 0 }, Ke = {
197
197
  key: 1,
198
198
  style: { padding: "0 1rem .5rem" }
199
- }, al = {
199
+ }, tl = {
200
200
  __name: "VacationTable",
201
201
  props: {
202
202
  checkEdit: { type: Boolean, default: () => !0 },
@@ -231,7 +231,7 @@ const _e = (j, I) => {
231
231
  minWidth: 230,
232
232
  x: 500,
233
233
  y: 200
234
- }), g = f(!1), s = f(!1), G = f({ participants: [] }), L = f([]), D = f([]), k = f("all"), H = f([{ value: "all", label: o("vacationSchedule.all"), key: "all" }]), N = f(!1), _ = f([]), U = f(!1), c = f({ name: "", length: 0, code: "" }), te = (/* @__PURE__ */ new Date()).getMonth() > 11 ? [{ value: n.value, label: n.value }, { value: n.value + 1, label: n.value + 1 }] : [{ value: n.value - 1, label: n.value - 1 }, { value: n.value, label: n.value }];
234
+ }), g = f(!1), s = f(!1), G = f({ participants: [] }), L = f([]), D = f([]), k = f("all"), H = f([{ value: "all", label: o("vacationSchedule.all"), key: "all" }]), M = f(!1), _ = f([]), U = f(!1), c = f({ name: "", length: 0, code: "" }), te = (/* @__PURE__ */ new Date()).getMonth() > 11 ? [{ value: n.value, label: n.value }, { value: n.value + 1, label: n.value + 1 }] : [{ value: n.value - 1, label: n.value - 1 }, { value: n.value, label: n.value }];
235
235
  ye(k, async (u, e) => {
236
236
  u !== e && (console.log(u), _.value = [], J.value = !1, I.odata.employee.forEach((y) => {
237
237
  (y.divisionName === u || u === "all") && (_.value.some((l) => (l == null ? void 0 : l.activeText) === y.roleName) || _.value.push({ val: !0, activeText: y.roleName }));
@@ -319,28 +319,28 @@ const _e = (j, I) => {
319
319
  };
320
320
  I.workSchedule.getBoss().then((u) => {
321
321
  L.value = u[0].users;
322
- }), we().then((u) => {
322
+ }), Se().then((u) => {
323
323
  D.value = u, Y();
324
324
  });
325
325
  const T = () => c.value.length < 2 ? [{ dateStart: "01.01." + n.value, dateEnd: "31.12." + n.value }] : [{ dateStart: "01.01." + n.value, dateEnd: "31.12." + n.value }], ge = async () => {
326
- N.value = !0;
327
- const u = new ke.Workbook(), e = u.addWorksheet(n.value.toString(), { pageSetup: { paperSize: 9, orientation: "landscape", fitToPage: !0 } }), y = { vertical: "middle", horizontal: "center" }, l = { top: { style: "thin" }, left: { style: "thin" }, bottom: { style: "thin" }, right: { style: "thin" } }, C = { vertical: "middle", horizontal: "center", wrapText: !0 }, ee = { vertical: "middle", horizontal: "right", wrapText: !0 };
326
+ M.value = !0;
327
+ const u = new xe.Workbook(), e = u.addWorksheet(n.value.toString(), { pageSetup: { paperSize: 9, orientation: "landscape", fitToPage: !0 } }), y = { vertical: "middle", horizontal: "center" }, l = { top: { style: "thin" }, left: { style: "thin" }, bottom: { style: "thin" }, right: { style: "thin" } }, C = { vertical: "middle", horizontal: "center", wrapText: !0 }, ee = { vertical: "middle", horizontal: "right", wrapText: !0 };
328
328
  e.mergeCells("D1:G1"), e.mergeCells("D2:G2"), e.mergeCells("D3:G3"), e.mergeCells("D4:G4"), e.mergeCells("A5:G5"), e.mergeCells("A6:G6"), e.mergeCells("A9:G9"), e.mergeCells("A10:A11"), e.mergeCells("B10:B11"), e.mergeCells("C10:C11"), e.mergeCells("D10:F10"), e.mergeCells("G10:G11"), e.getCell("D1").value = o("vacationSchedule.approve"), e.getCell("D2").value = o("vacationSchedule.dateApprove", { year: n.value - 1 }), e.getCell("D3").value = o("workSchedule.printPlace"), e.getCell("D4").value = o("vacationSchedule.dateApprove", { year: n.value - 1 }), e.getCell("A5").value = o("workSchedule.firm"), e.getCell("B7").value = o("vacationSchedule.vacationSchedule"), e.getCell("C7").value = o("vacationSchedule.numberDocs"), e.getCell("D7").value = o("vacationSchedule.compilation"), e.getCell("E7").value = o("vacationSchedule.year"), e.getCell("C8").value = "", e.getCell("D8").value = "", e.getCell("E8").value = n.value, e.getCell("E7").value = o("vacationSchedule.year"), e.getCell("A10").value = o("vacationSchedule.jobTitle"), e.getCell("B10").value = o("vacationSchedule.fullName"), e.getCell("C10").value = o("vacationSchedule.personnelNumber"), e.getCell("D10").value = o("vacationSchedule.vacation"), e.getCell("D11").value = o("vacationSchedule.days"), e.getCell("E11").value = o("vacationSchedule.date"), e.getCell("F11").value = o("vacationSchedule.endDate"), e.getCell("G11").value = o("vacationSchedule.note"), e.getRow(1).height = 80, e.getColumn(1).width = 28, e.getColumn(2).width = 28, e.getColumn(3).width = 18, e.getColumn(4).width = 18, e.getColumn(5).width = 14, e.getColumn(6).width = 14, e.getColumn(7).width = 14, e.getColumn(1).alignment = C, e.getColumn(2).alignment = C, e.getColumn(3).alignment = C, e.getColumn(4).alignment = C, e.getColumn(5).alignment = C, e.getColumn(6).alignment = C, e.getColumn(7).alignment = C, e.getCell("D1").alignment = ee, e.getCell("D2").alignment = ee, e.getCell("D4").alignment = ee, e.getCell("A5").alignment = y, e.getCell("C7").border = l, e.getCell("D7").border = l, e.getCell("E7").border = l, e.getCell("C8").border = l, e.getCell("D8").border = l, e.getCell("E8").border = l, e.getCell("A10").border = l, e.getCell("B10").border = l, e.getCell("C10").border = l, e.getCell("D10").border = l, e.getCell("G10").border = l, e.getCell("D11").border = l, e.getCell("E11").border = l, e.getCell("F11").border = l;
329
329
  let O = 11;
330
- for (const M of w.value)
331
- if (M.days.length > 1)
332
- M.days.forEach((X) => {
333
- let ue = [M.jobTitle, M.name, M.code, X.count, X.dateStart, X.dateEnd, X.note];
330
+ for (const N of w.value)
331
+ if (N.days.length > 1)
332
+ N.days.forEach((X) => {
333
+ let ue = [N.jobTitle, N.name, N.code, X.count, X.dateStart, X.dateEnd, X.note];
334
334
  const pe = e.addRow(ue);
335
335
  pe.border = l, O++;
336
- }), e.mergeCells(`A${O - M.days.length + 1}:A${O}`), e.mergeCells(`B${O - M.days.length + 1}:B${O}`), e.mergeCells(`C${O - M.days.length + 1}:C${O}`);
336
+ }), e.mergeCells(`A${O - N.days.length + 1}:A${O}`), e.mergeCells(`B${O - N.days.length + 1}:B${O}`), e.mergeCells(`C${O - N.days.length + 1}:C${O}`);
337
337
  else {
338
- let X = [M.jobTitle, M.name, M.code, M.days[0].count, M.days[0].dateStart, M.days[0].dateEnd, M.days[0].note];
338
+ let X = [N.jobTitle, N.name, N.code, N.days[0].count, N.days[0].dateStart, N.days[0].dateEnd, N.days[0].note];
339
339
  const ue = e.addRow(X);
340
340
  ue.border = l, O++;
341
341
  }
342
342
  const he = "export_" + A(Date.now(), "{dd}.{m}.{Y}") + ".xlsx", fe = await u.xlsx.writeBuffer();
343
- xe(new Blob([fe]), he), N.value = !1;
343
+ we(new Blob([fe]), he), M.value = !1;
344
344
  };
345
345
  return (u, e) => {
346
346
  const y = be("loading");
@@ -387,7 +387,7 @@ const _e = (j, I) => {
387
387
  ]),
388
388
  _: 1
389
389
  }, 8, ["modelValue"]),
390
- v(a(Ee), {
390
+ v(a(ke), {
391
391
  style: { width: "100%" },
392
392
  loading: S.value,
393
393
  animated: ""
@@ -415,11 +415,11 @@ const _e = (j, I) => {
415
415
  })
416
416
  ]),
417
417
  default: m(() => [
418
- v(a($e), {
418
+ v(a(Ee), {
419
419
  id: "printTable",
420
420
  data: E.value,
421
421
  "span-method": ne,
422
- onCellContextmenu: Se(oe, ["prevent"]),
422
+ onCellClick: oe,
423
423
  border: "",
424
424
  style: { width: "100%" },
425
425
  size: "small",
@@ -501,7 +501,7 @@ const _e = (j, I) => {
501
501
  align: "center"
502
502
  }, {
503
503
  default: m((l) => [
504
- v(a(Te), {
504
+ v(a($e), {
505
505
  modelValue: w.value[E.value[l.$index].ids].days[E.value[l.$index].key].note,
506
506
  "onUpdate:modelValue": (C) => w.value[E.value[l.$index].ids].days[E.value[l.$index].key].note = C,
507
507
  style: { width: "100%" },
@@ -521,7 +521,7 @@ const _e = (j, I) => {
521
521
  ]),
522
522
  _: 1
523
523
  }, 8, ["loading"]),
524
- j.checkEdit ? (h(), $("div", Je, [
524
+ j.checkEdit ? (h(), $("div", We, [
525
525
  J.value ? P("", !0) : (h(), B(a(F), {
526
526
  key: 0,
527
527
  type: "primary",
@@ -554,7 +554,7 @@ const _e = (j, I) => {
554
554
  })) : P("", !0)
555
555
  ])) : P("", !0),
556
556
  De((h(), B(a(F), {
557
- disabled: N.value,
557
+ disabled: M.value,
558
558
  plain: "",
559
559
  onClick: ge,
560
560
  style: { "margin-top": ".5rem" }
@@ -564,7 +564,7 @@ const _e = (j, I) => {
564
564
  ]),
565
565
  _: 1
566
566
  }, 8, ["disabled"])), [
567
- [y, N.value]
567
+ [y, M.value]
568
568
  ]),
569
569
  v(a(ve), {
570
570
  title: a(o)("workSchedule.jobTitle"),
@@ -599,9 +599,9 @@ const _e = (j, I) => {
599
599
  autocomplete: "on"
600
600
  }, {
601
601
  default: m(() => [
602
- (h(!0), $(q, null, W(_.value, (l) => (h(), B(a(Ve), null, {
602
+ (h(!0), $(q, null, W(_.value, (l) => (h(), B(a(Te), null, {
603
603
  default: m(() => [
604
- v(a(Ie), {
604
+ v(a(Ve), {
605
605
  modelValue: l.val,
606
606
  "onUpdate:modelValue": (C) => l.val = C,
607
607
  "active-text": l.activeText
@@ -670,7 +670,7 @@ const _e = (j, I) => {
670
670
  ]),
671
671
  _: 1
672
672
  }, 8, ["title", "modelValue"]),
673
- v(a(Me), {
673
+ v(a(Ie), {
674
674
  show: z.value,
675
675
  "onUpdate:show": e[14] || (e[14] = (l) => z.value = l),
676
676
  options: K.value
@@ -681,7 +681,7 @@ const _e = (j, I) => {
681
681
  disabled: ""
682
682
  }, null, 8, ["label"]),
683
683
  v(a(Ne)),
684
- c.value.level === 2 ? (h(), $("div", Ke, [
684
+ c.value.level === 2 ? (h(), $("div", Je, [
685
685
  c.value.length > 1 ? (h(), B(a(se), {
686
686
  key: 0,
687
687
  label: a(o)("vacationSchedule.deleteLast"),
@@ -692,8 +692,8 @@ const _e = (j, I) => {
692
692
  label: a(o)("vacationSchedule.addVacation"),
693
693
  onClick: e[12] || (e[12] = (l) => Q("add"))
694
694
  }, null, 8, ["label"])) : P("", !0)
695
- ])) : (h(), $("div", Xe, [
696
- v(We, {
695
+ ])) : (h(), $("div", Ke, [
696
+ v(Re, {
697
697
  data: c.value,
698
698
  range: "range",
699
699
  limitation: T(),
@@ -724,5 +724,5 @@ const _e = (j, I) => {
724
724
  }
725
725
  };
726
726
  export {
727
- al as default
727
+ tl as default
728
728
  };
@@ -1,3 +1,3 @@
1
- "use strict";const e=require("vue"),ne=require("file-saver"),oe=require("exceljs"),c=require("./index-CmFQ6bqG.cjs"),ue=require("vue-i18n"),i=require("element-plus"),H=require("@imengyu/vue3-context-menu");function re(p){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(p){for(const C in p)if(C!=="default"){const f=Object.getOwnPropertyDescriptor(p,C);Object.defineProperty(u,C,f.get?f:{enumerable:!0,get:()=>p[C]})}}return u.default=p,Object.freeze(u)}const ie=re(oe),de={style:{height:"100px",width:"100%",display:"inline-block"}},se={style:{height:"100px",width:"100%",display:"inline-block"}},ce={key:3,class:"controls-container",style:{"margin-top":".5rem"}},ve={key:0,style:{padding:"0.5em 1.5em"}},me={key:1,style:{padding:"0.5em 1.5em"}},ge={__name:"WorkTable",props:{checkEdit:{type:Boolean,default:()=>!0},odata:Object,workSchedule:Object,fullName:{type:String,default:"Вы"}},setup(p){const{t:u,d:C}=ue.useI18n(),f=p,T=e.ref(!1),n=e.ref([]),M=e.ref("1"),w=e.ref(new Date(new Date().getFullYear(),new Date().getMonth(),1).setMonth(new Date().getMonth()+Number(M.value))),r=e.ref([]),N=e.ref(0),x=e.ref(9),y=e.ref(8),A=e.ref(!1),O=e.ref(!0),E=e.ref(!1),Y=e.ref("5"),$=e.ref(1),S=e.ref("Сектор разработок и эксплуатации сети"),U=e.ref([]),V=e.ref([]),s=e.ref({name:"Имя",length:0,code:""}),I=e.ref(!1),R=e.ref({zIndex:30,minWidth:220,x:500,y:200}),P=e.ref({});e.watch(S,async(a,l)=>{a!==l&&(V.value=[],A.value=!1,f.odata.personal.forEach(o=>{o.divisionName===a&&(V.value.some(t=>(t==null?void 0:t.activeText)===o.roleName)||V.value.push({val:!0,activeText:o.roleName}))}),j())}),e.watch(M,async a=>{w.value=new Date(new Date().getFullYear(),new Date().getMonth(),1).setMonth(new Date().getMonth()+Number(a)),W()});const Z=(a,l,o,t)=>{s.value.ids=a.ids,s.value.key=a.key,s.value.add=a.days.length>0&&a.days[a.days.length-1].cont,s.value.level=l.level,s.value.day=o.cellIndex,R.value.y=t.clientY,R.value.x=t.clientX,l.level===2&&l.no===0&&f.checkEdit&&(s.value.name=u("workSchedule.autocomplete"),I.value=!0),l.level===3&&o.cellIndex-l.no===1&&f.checkEdit&&(b(o.cellIndex,a.ids),s.value.name=u("workSchedule.modeSelection"),I.value=!0)},W=()=>{const a=P.value,l=new Date(w.value),o=new Date(l.getFullYear(),l.getMonth()+1,0).getDate();let t=[],d=0;for(let m=1;m<=o;m++){const h=c.parseTime(l.setDate(m),"{Y}-{m}-{dd}");d+=a.nowork.includes(h)||a.holidays.includes(h)?0:a.preholidays.includes(h)?7:8;const g=a.nowork.includes(h)?"nowork":a.holidays.includes(h)?"holiday":a.preholidays.includes(h)?"preholiday":"";t.push({day:m,holidays:g,weekday:C(new Date(l.getFullYear(),l.getMonth(),m),"day")})}N.value=d,r.value=t,f.odata.getPersonal({}).then(m=>{var h;S.value=(h=m.find(g=>g.employeeName===f.fullName))==null?void 0:h.divisionName,m.forEach(g=>{U.value.some(k=>(k==null?void 0:k.value)===g.divisionName)||U.value.push({value:g.divisionName,label:g.divisionName,key:g.divisionName}),g.divisionName===S.value&&!V.value.some(k=>(k==null?void 0:k.activeText)===g.roleName)&&V.value.push({val:!0,activeText:g.roleName})}),j(),O.value=!1})},K=e.computed(()=>!n.value.some(a=>a.contHour!==N.value)),L=(a,l)=>{var m,h,g;const o=new Date(w.value),t=`${o.getFullYear()}-${(o.getMonth()+1).toString().padStart(2,"0")}-${a.toString().padStart(2,"0")}`,d=(m=n.value[l])==null?void 0:m.days.findIndex(k=>k.day===t);return l===-1||d===-1?"":((h=n.value[l].days[d])==null?void 0:h.time)+" "+((g=n.value[l].days[d])==null?void 0:g.tips)},j=()=>{n.value=[];let a=[];f.odata.personal.forEach(l=>{if(l.divisionName===S.value&&V.value.some(o=>o.val&&o.activeText===l.roleName)){let o=c.byInitials(l.employeeName);a.push(l.employeeKey),n.value.push({name:o+" ("+l.roleName+")",days:[],contHour:0,code:l.employeeKey,id:!1,ids:n.value.length})}}),Q(a),E.value=!1},Q=a=>{f.workSchedule.getWorkSchedule({code:a,date:c.parseTime(new Date(w.value),"{Y}-{m}-{dd}")}).then(l=>{l.forEach((o,t)=>{o!==null&&(n.value[t].days=o.data.days,n.value[t].id=o.id)}),D()})},D=()=>{n.value.forEach(a=>{a.contHour=a.days.reduce((l,o)=>l+o.time,0)})},X=a=>{n.value[a].days=[],D()},_=a=>{switch(Y.value){case"5":for(let l=$.value;l<=r.value.length;l++)r.value[l-1].holidays===""&&b(l,a,!0),r.value[l-1].holidays==="preholiday"&&(y.value-=1,b(l,a,!0),y.value+=1);break;case"2x2":for(let l=$.value;l<=r.value.length;l+=4)b(l,a,!0),l+1<=r.value.length&&b(l+1,a,!0);break;case"2x5":for(let l=$.value;l<=r.value.length;l+=7)for(let o=l;o<l+5&&o<=r.value.length;o++)r.value[o-1].holidays==="preholiday"?(y.value-=1,b(o,a,!0),y.value+=1):b(o,a,!0);break}},b=(a,l,o=!1)=>{const{date:t,ind:d}=z(a,l);d===-1?(n.value[l].days.push({day:t,time:y.value,tips:`(${x.value}:00 - ${x.value+y.value+1}:00)`}),D()):o||(y.value=n.value[l].days[d].time,x.value=parseInt(n.value[l].days[d].tips.slice(1,-12)))},ee=(a,l)=>{const{ind:o}=z(a,l);n.value[l].days.splice(o,1),D(),document.querySelector(".app-main").click()},G=(a,l)=>{const{date:o,ind:t}=z(a,l);n.value[l].days[t]={day:o,time:y.value,tips:`(${x.value}:00 - ${x.value+y.value+1}:00)`},D()},z=(a,l)=>{var d;const o=c.parseTime(new Date(w.value).setDate(a),"{Y}-{m}-{dd}"),t=(d=n.value[l])==null?void 0:d.days.findIndex(m=>m.day===o);return{date:o,ind:t}},le=async()=>{var J;T.value=!0;const a=new ie.Workbook,l=a.addWorksheet(C(w.value,"month"),{pageSetup:{paperSize:9,orientation:"landscape",fitToPage:!0}}),o={vertical:"middle",horizontal:"center"},t={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},d={vertical:"middle",horizontal:"center",wrapText:!0};l.mergeCells(`A1:${c.cellsDynamically("A1",r.value.length+5)}1`),l.mergeCells(`A2:${c.cellsDynamically("A2",r.value.length+5)}2`),l.mergeCells("A3:A4"),l.mergeCells(`B3:${c.cellsDynamically("B3",r.value.length)}3`),l.mergeCells(`${c.cellsDynamically("B3",r.value.length+1)}3:${c.cellsDynamically("B3",r.value.length+2)}3`),l.mergeCells(`${c.cellsDynamically("B3",r.value.length+3)}3:${c.cellsDynamically("B4",r.value.length+3)}4`),l.mergeCells(`${c.cellsDynamically("B3",r.value.length+4)}3:${c.cellsDynamically("B4",r.value.length+4)}4`),l.getCell("A1").value=u("workSchedule.firm"),l.getCell("A2").value=u("workSchedule.title",{name:S.value})+C(w.value,"month")+` ${new Date(w.value).getFullYear()}`,l.getCell("A3").value=u("workSchedule.month"),l.getCell("B3").value=u("workSchedule.numbersMonth"),l.getCell(3,r.value.length+2).value=u("workSchedule.onSchedule"),l.getCell(3,r.value.length+4).value=u("workSchedule.acquainted"),l.getCell(3,r.value.length+5).value=u("workSchedule.date"),l.getCell(4,r.value.length+2).value=u("workSchedule.days"),l.getCell(4,r.value.length+3).value=`${u("workSchedule.hours")} (${N.value})`;for(let v=2;v<=r.value.length+1;v++)l.getCell(4,v).value=r.value[v-2].weekday+`
2
- `+(v-1),l.getColumn(v).width=6,l.getColumn(v).alignment=d,l.getCell(4,v).border=t;l.getRow(1).height=40,l.getRow(2).height=30,l.getRow(3).height=20,l.getColumn(1).width=15,l.getColumn(r.value.length+2).width=5,l.getColumn(r.value.length+3).width=6,l.getColumn(r.value.length+4).width=13,l.getColumn(r.value.length+5).width=13,l.getColumn(1).alignment=d,l.getCell("A2").alignment=o,l.getCell("A3").alignment=o,l.getCell("B3").alignment=o,l.getCell(3,r.value.length+2).alignment=o,l.getColumn(r.value.length+2).alignment=d,l.getColumn(r.value.length+3).alignment=d,l.getColumn(r.value.length+4).alignment=o,l.getColumn(r.value.length+5).alignment=o,l.getCell("A3").border=t,l.getCell("B3").border=t,l.getCell(3,r.value.length+2).border=t,l.getCell(4,r.value.length+2).border=t,l.getCell(3,r.value.length+4).border=t,l.getCell(3,r.value.length+5).border=t,l.getCell(4,r.value.length+3).border=t;let m=0;for(const v of n.value){let F=[v.name];for(let B=1;B<=r.value.length;B++){const{ind:q}=z(B,m);q!==-1?F[B]=`${v.days[q].time} ${v.days[q].tips}`:F[B]=" "}F.push(((J=v.days)==null?void 0:J.length)||" ",v.contHour||0);const ae=l.addRow(F);ae.border=t,m++}let h="Щербина Е. В.";f.odata.personal.forEach(v=>{v.roleName==="Начальник отдела правовой и кадровой работы"&&(h=v.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=u("workSchedule.byInitials"),l.getCell(`Q${n.value.length+6}`).value=u("workSchedule.supervisorHR"),l.getCell(`B${n.value.length+8}`).value=u("workSchedule.compiled")+":",l.getCell(`S${n.value.length+8}`).value=u("workSchedule.approved")+":",l.getCell(`M${n.value.length+8}`).value=c.byInitials(f.fullName),l.getCell(`AD${n.value.length+8}`).value=c.byInitials(h),l.getCell(`Z${n.value.length+9}`).value=u("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",k=await a.xlsx.writeBuffer();ne.saveAs(new Blob([k]),g),T.value=!1},te=async()=>{A.value||f.workSchedule.addWorkSchedule({data:n.value,date:c.parseTime(new Date(w.value),"{Y}-{m}-{dd}")}).then(a=>A.value=a)};return c.holidays().then(a=>{P.value=a,W()}),(a,l)=>{const o=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",null,[p.checkEdit?(e.openBlock(),e.createBlock(e.unref(i.ElSelect),{key:0,modelValue:S.value,"onUpdate:modelValue":l[0]||(l[0]=t=>S.value=t),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,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),p.checkEdit?(e.openBlock(),e.createBlock(e.unref(i.ElButton),{key:1,plain:"",onClick:l[1]||(l[1]=t=>E.value=!0),style:{"margin-bottom":".5rem"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("workSchedule.jobTitle")),1)]),_:1})):e.createCommentVNode("",!0),p.checkEdit?(e.openBlock(),e.createBlock(e.unref(i.ElSwitch),{key:2,modelValue:M.value,"onUpdate:modelValue":l[2]||(l[2]=t=>M.value=t),"active-text":e.unref(u)("workSchedule.currentMonth"),"active-value":"0","inactive-value":"1",style:{"margin-bottom":".5rem","margin-left":".5rem"}},null,8,["modelValue","active-text"])):e.createCommentVNode("",!0),e.createVNode(e.unref(i.ElSkeleton),{style:{width:"100%"},loading:O.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%"},size:"small",align:"center",onCellContextmenu:e.withModifiers(Z,["prevent"]),"empty-text":e.unref(u)("workSchedule.emptyText")},{default:e.withCtx(()=>[e.createVNode(e.unref(i.ElTableColumn),{label:e.unref(u)("workSchedule.title",{name:S.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(u)("workSchedule.month"),width:"180",align:"center"},{default:e.withCtx(t=>[e.createElementVNode("div",de,e.toDisplayString(n.value[t.$index].name),1)]),_:1},8,["label"]),e.createVNode(e.unref(i.ElTableColumn),{label:e.unref(u)("workSchedule.numbersMonth"),align:"center"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,t=>(e.openBlock(),e.createBlock(e.unref(i.ElTableColumn),{key:t.day,width:"45","class-name":t.holidays,align:"center",label:t.weekday+`
3
- `+t.day.toString()},{default:e.withCtx(d=>[e.createElementVNode("div",se,e.toDisplayString(L(t.day,d.$index)||" "),1)]),_:2},1032,["class-name","label"]))),128))]),_:1},8,["label"]),e.createVNode(e.unref(i.ElTableColumn),{label:e.unref(u)("workSchedule.onSchedule"),align:"center"},{default:e.withCtx(()=>[e.createVNode(e.unref(i.ElTableColumn),{label:e.unref(u)("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(u)("workSchedule.hours")} ( ${N.value} )`,align:"center"},{default:e.withCtx(t=>[e.createElementVNode("div",{style:e.normalizeStyle(`color: ${N.value===t.row.contHour?"green":"red"};`)},e.toDisplayString(t.row.contHour),5)]),_:1},8,["label"])]),_:1},8,["label"])]),_:1},8,["label"])]),_:1},8,["data","empty-text"])]),_:1},8,["loading"]),K.value&&p.checkEdit?(e.openBlock(),e.createElementBlock("div",ce,[e.createTextVNode(e.toDisplayString(e.unref(u)("workSchedule.chartsFilled"))+": ",1),A.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(i.ElButton),{key:0,type:"primary",onClick:te},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("workSchedule.confirm")),1)]),_:1})),l[17]||(l[17]=e.createTextVNode()),e.createElementVNode("span",null,e.toDisplayString(p.fullName),1)])):e.createCommentVNode("",!0),e.withDirectives((e.openBlock(),e.createBlock(e.unref(i.ElButton),{disabled:T.value,plain:"",onClick:le,style:{"margin-top":".5rem"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("workSchedule.exportExcel")),1)]),_:1},8,["disabled"])),[[o,T.value]]),e.createVNode(e.unref(i.ElDialog),{title:e.unref(u)("workSchedule.jobTitle"),modelValue:E.value,"onUpdate:modelValue":l[4]||(l[4]=t=>E.value=t),width:"400px"},{footer:e.withCtx(()=>[e.createVNode(e.unref(i.ElButton),{onClick:l[3]||(l[3]=t=>E.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:j},{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:V.value,autocomplete:"on"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.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":d=>t.val=d,"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(H.ContextMenu),{show:I.value,"onUpdate:show":l[16]||(l[16]=t=>I.value=t),options:R.value},{default:e.withCtx(()=>[e.createVNode(e.unref(H.ContextMenuItem),{label:s.value.name,disabled:""},null,8,["label"]),e.createVNode(e.unref(H.ContextMenuSeparator)),s.value.level===2?(e.openBlock(),e.createElementBlock("div",ve,[e.createVNode(e.unref(i.ElRadioGroup),{modelValue:Y.value,"onUpdate:modelValue":l[5]||(l[5]=t=>Y.value=t),size:"small"},{default:e.withCtx(()=>[e.createVNode(e.unref(i.ElRadioButton),{label:e.unref(u)("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[18]||(l[18]=e.createElementVNode("br",null,null,-1)),e.createElementVNode("span",null,e.toDisplayString(e.unref(u)("workSchedule.fromDate"))+":",1),e.createVNode(e.unref(i.ElSlider),{modelValue:$.value,"onUpdate:modelValue":l[6]||(l[6]=t=>$.value=t),step:1,min:1,max:r.value.length},null,8,["modelValue","max"]),e.createElementVNode("span",null,e.toDisplayString(e.unref(u)("workSchedule.with"))+":",1),e.createVNode(e.unref(i.ElSlider),{modelValue:x.value,"onUpdate:modelValue":l[7]||(l[7]=t=>x.value=t),step:1,min:8,max:11},null,8,["modelValue"]),e.createElementVNode("span",null,e.toDisplayString(e.unref(u)("workSchedule.duration"))+":",1),e.createVNode(e.unref(i.ElSlider),{modelValue:y.value,"onUpdate:modelValue":l[8]||(l[8]=t=>y.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[9]||(l[9]=t=>_(s.value.ids))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("workSchedule.fillOut")),1)]),_:1}),e.createVNode(e.unref(i.ElButton),{style:{"margin-top":".5rem"},size:"small",onClick:l[10]||(l[10]=t=>X(s.value.ids))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("workSchedule.clearRow")),1)]),_:1})])):(e.openBlock(),e.createElementBlock("div",me,[e.createElementVNode("div",null,e.toDisplayString(L(s.value.day,s.value.ids)),1),l[19]||(l[19]=e.createElementVNode("br",null,null,-1)),e.createElementVNode("span",null,e.toDisplayString(e.unref(u)("workSchedule.with"))+":",1),e.createVNode(e.unref(i.ElSlider),{modelValue:x.value,"onUpdate:modelValue":l[11]||(l[11]=t=>x.value=t),step:1,min:8,max:11,onChange:l[12]||(l[12]=t=>G(s.value.day,s.value.ids))},null,8,["modelValue"]),e.createElementVNode("span",null,e.toDisplayString(e.unref(u)("workSchedule.duration"))+":",1),e.createVNode(e.unref(i.ElSlider),{modelValue:y.value,"onUpdate:modelValue":l[13]||(l[13]=t=>y.value=t),step:1,min:4,max:12,onChange:l[14]||(l[14]=t=>G(s.value.day,s.value.ids))},null,8,["modelValue"]),e.createVNode(e.unref(i.ElButton),{style:{"margin-top":".5rem"},size:"small",onClick:l[15]||(l[15]=t=>ee(s.value.day,s.value.ids))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("workSchedule.delete")),1)]),_:1})]))]),_:1},8,["show","options"])])}}};module.exports=ge;
1
+ "use strict";const e=require("vue"),oe=require("file-saver"),ue=require("exceljs"),c=require("./index-CmFQ6bqG.cjs"),re=require("vue-i18n"),i=require("element-plus"),O=require("@imengyu/vue3-context-menu");function ie(p){const u=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(p){for(const C in p)if(C!=="default"){const f=Object.getOwnPropertyDescriptor(p,C);Object.defineProperty(u,C,f.get?f:{enumerable:!0,get:()=>p[C]})}}return u.default=p,Object.freeze(u)}const de=ie(ue),se={style:{height:"100px",width:"100%",display:"inline-block"}},ce={style:{height:"100px",width:"100%",display:"inline-block"}},ve={key:3,class:"controls-container",style:{"margin-top":".5rem"}},me={key:0,style:{padding:"0.5em 1.5em"}},ge={key:1,style:{padding:"0.5em 1.5em"}},he={__name:"WorkTable",props:{checkEdit:{type:Boolean,default:()=>!0},odata:Object,workSchedule:Object,fullName:{type:String,default:"Вы"}},setup(p){const{t:u,d:C}=re.useI18n(),f=p,T=e.ref(!1),n=e.ref([]),M=e.ref("1"),w=e.ref(new Date(new Date().getFullYear(),new Date().getMonth(),1).setMonth(new Date().getMonth()+Number(M.value))),r=e.ref([]),N=e.ref(0),x=e.ref(9),y=e.ref(8),A=e.ref(!1),P=e.ref(!0),E=e.ref(!1),U=e.ref("5"),$=e.ref(1),S=e.ref("Сектор разработок и эксплуатации сети"),Y=e.ref([]),V=e.ref([]),s=e.ref({name:"Имя",length:0,code:""}),I=e.ref(!1),H=e.ref({zIndex:30,minWidth:220,x:500,y:200}),W=e.ref({}),R=e.ref("100%");e.watch(S,async(a,l)=>{a!==l&&(V.value=[],A.value=!1,f.odata.personal.forEach(o=>{o.divisionName===a&&(V.value.some(t=>(t==null?void 0:t.activeText)===o.roleName)||V.value.push({val:!0,activeText:o.roleName}))}),j())}),e.watch(M,async a=>{w.value=new Date(new Date().getFullYear(),new Date().getMonth(),1).setMonth(new Date().getMonth()+Number(a)),L()});const K=(a,l,o,t)=>{s.value.ids=a.ids,s.value.key=a.key,s.value.add=a.days.length>0&&a.days[a.days.length-1].cont,s.value.level=l.level,s.value.day=o.cellIndex,H.value.y=t.clientY,H.value.x=t.clientX,l.level===2&&l.no===0&&f.checkEdit&&(s.value.name=u("workSchedule.autocomplete"),I.value=!0),l.level===3&&o.cellIndex-l.no===1&&f.checkEdit&&(b(o.cellIndex,a.ids),s.value.name=u("workSchedule.modeSelection"),I.value=!0)},L=()=>{const a=W.value,l=new Date(w.value),o=new Date(l.getFullYear(),l.getMonth()+1,0).getDate();let t=[],d=0;for(let m=1;m<=o;m++){const h=c.parseTime(l.setDate(m),"{Y}-{m}-{dd}");d+=a.nowork.includes(h)||a.holidays.includes(h)?0:a.preholidays.includes(h)?7:8;const g=a.nowork.includes(h)?"nowork":a.holidays.includes(h)?"holiday":a.preholidays.includes(h)?"preholiday":"";t.push({day:m,holidays:g,weekday:C(new Date(l.getFullYear(),l.getMonth(),m),"day")})}N.value=d,r.value=t,f.odata.getPersonal({}).then(m=>{var h;S.value=(h=m.find(g=>g.employeeName===f.fullName))==null?void 0:h.divisionName,m.forEach(g=>{Y.value.some(k=>(k==null?void 0:k.value)===g.divisionName)||Y.value.push({value:g.divisionName,label:g.divisionName,key:g.divisionName}),g.divisionName===S.value&&!V.value.some(k=>(k==null?void 0:k.activeText)===g.roleName)&&V.value.push({val:!0,activeText:g.roleName})}),j(),P.value=!1})},Q=e.computed(()=>!n.value.some(a=>a.contHour!==N.value)),G=(a,l)=>{var m,h,g;const o=new Date(w.value),t=`${o.getFullYear()}-${(o.getMonth()+1).toString().padStart(2,"0")}-${a.toString().padStart(2,"0")}`,d=(m=n.value[l])==null?void 0:m.days.findIndex(k=>k.day===t);return l===-1||d===-1?"":((h=n.value[l].days[d])==null?void 0:h.time)+" "+((g=n.value[l].days[d])==null?void 0:g.tips)},j=()=>{n.value=[];let a=[];f.odata.personal.forEach(l=>{if(l.divisionName===S.value&&V.value.some(o=>o.val&&o.activeText===l.roleName)){let o=c.byInitials(l.employeeName);a.push(l.employeeKey),n.value.push({name:o+" ("+l.roleName+")",days:[],contHour:0,code:l.employeeKey,id:!1,ids:n.value.length})}}),X(a),E.value=!1},X=a=>{f.workSchedule.getWorkSchedule({code:a,date:c.parseTime(new Date(w.value),"{Y}-{m}-{dd}")}).then(l=>{l.forEach((o,t)=>{o!==null&&(n.value[t].days=o.data.days,n.value[t].id=o.id)}),D()})},D=()=>{n.value.forEach(a=>{a.contHour=a.days.reduce((l,o)=>l+o.time,0)})},_=a=>{n.value[a].days=[],D()},ee=a=>{switch(U.value){case"5":for(let l=$.value;l<=r.value.length;l++)r.value[l-1].holidays===""&&b(l,a,!0),r.value[l-1].holidays==="preholiday"&&(y.value-=1,b(l,a,!0),y.value+=1);break;case"2x2":for(let l=$.value;l<=r.value.length;l+=4)b(l,a,!0),l+1<=r.value.length&&b(l+1,a,!0);break;case"2x5":for(let l=$.value;l<=r.value.length;l+=7)for(let o=l;o<l+5&&o<=r.value.length;o++)r.value[o-1].holidays==="preholiday"?(y.value-=1,b(o,a,!0),y.value+=1):b(o,a,!0);break}},b=(a,l,o=!1)=>{const{date:t,ind:d}=z(a,l);d===-1?(n.value[l].days.push({day:t,time:y.value,tips:`(${x.value}:00 - ${x.value+y.value+1}:00)`}),D()):o||(y.value=n.value[l].days[d].time,x.value=parseInt(n.value[l].days[d].tips.slice(1,-12)))},le=(a,l)=>{const{ind:o}=z(a,l);n.value[l].days.splice(o,1),D(),document.querySelector(".app-main").click()},J=(a,l)=>{const{date:o,ind:t}=z(a,l);n.value[l].days[t]={day:o,time:y.value,tips:`(${x.value}:00 - ${x.value+y.value+1}:00)`},D()},z=(a,l)=>{var d;const o=c.parseTime(new Date(w.value).setDate(a),"{Y}-{m}-{dd}"),t=(d=n.value[l])==null?void 0:d.days.findIndex(m=>m.day===o);return{date:o,ind:t}},te=async()=>{var Z;T.value=!0;const a=new de.Workbook,l=a.addWorksheet(C(w.value,"month"),{pageSetup:{paperSize:9,orientation:"landscape",fitToPage:!0}}),o={vertical:"middle",horizontal:"center"},t={top:{style:"thin"},left:{style:"thin"},bottom:{style:"thin"},right:{style:"thin"}},d={vertical:"middle",horizontal:"center",wrapText:!0};l.mergeCells(`A1:${c.cellsDynamically("A1",r.value.length+5)}1`),l.mergeCells(`A2:${c.cellsDynamically("A2",r.value.length+5)}2`),l.mergeCells("A3:A4"),l.mergeCells(`B3:${c.cellsDynamically("B3",r.value.length)}3`),l.mergeCells(`${c.cellsDynamically("B3",r.value.length+1)}3:${c.cellsDynamically("B3",r.value.length+2)}3`),l.mergeCells(`${c.cellsDynamically("B3",r.value.length+3)}3:${c.cellsDynamically("B4",r.value.length+3)}4`),l.mergeCells(`${c.cellsDynamically("B3",r.value.length+4)}3:${c.cellsDynamically("B4",r.value.length+4)}4`),l.getCell("A1").value=u("workSchedule.firm"),l.getCell("A2").value=u("workSchedule.title",{name:S.value})+C(w.value,"month")+` ${new Date(w.value).getFullYear()}`,l.getCell("A3").value=u("workSchedule.month"),l.getCell("B3").value=u("workSchedule.numbersMonth"),l.getCell(3,r.value.length+2).value=u("workSchedule.onSchedule"),l.getCell(3,r.value.length+4).value=u("workSchedule.acquainted"),l.getCell(3,r.value.length+5).value=u("workSchedule.date"),l.getCell(4,r.value.length+2).value=u("workSchedule.days"),l.getCell(4,r.value.length+3).value=`${u("workSchedule.hours")} (${N.value})`;for(let v=2;v<=r.value.length+1;v++)l.getCell(4,v).value=r.value[v-2].weekday+`
2
+ `+(v-1),l.getColumn(v).width=6,l.getColumn(v).alignment=d,l.getCell(4,v).border=t;l.getRow(1).height=40,l.getRow(2).height=30,l.getRow(3).height=20,l.getColumn(1).width=15,l.getColumn(r.value.length+2).width=5,l.getColumn(r.value.length+3).width=6,l.getColumn(r.value.length+4).width=13,l.getColumn(r.value.length+5).width=13,l.getColumn(1).alignment=d,l.getCell("A2").alignment=o,l.getCell("A3").alignment=o,l.getCell("B3").alignment=o,l.getCell(3,r.value.length+2).alignment=o,l.getColumn(r.value.length+2).alignment=d,l.getColumn(r.value.length+3).alignment=d,l.getColumn(r.value.length+4).alignment=o,l.getColumn(r.value.length+5).alignment=o,l.getCell("A3").border=t,l.getCell("B3").border=t,l.getCell(3,r.value.length+2).border=t,l.getCell(4,r.value.length+2).border=t,l.getCell(3,r.value.length+4).border=t,l.getCell(3,r.value.length+5).border=t,l.getCell(4,r.value.length+3).border=t;let m=0;for(const v of n.value){let F=[v.name];for(let B=1;B<=r.value.length;B++){const{ind:q}=z(B,m);q!==-1?F[B]=`${v.days[q].time} ${v.days[q].tips}`:F[B]=" "}F.push(((Z=v.days)==null?void 0:Z.length)||" ",v.contHour||0);const ne=l.addRow(F);ne.border=t,m++}let h="Щербина Е. В.";f.odata.personal.forEach(v=>{v.roleName==="Начальник отдела правовой и кадровой работы"&&(h=v.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=u("workSchedule.byInitials"),l.getCell(`Q${n.value.length+6}`).value=u("workSchedule.supervisorHR"),l.getCell(`B${n.value.length+8}`).value=u("workSchedule.compiled")+":",l.getCell(`S${n.value.length+8}`).value=u("workSchedule.approved")+":",l.getCell(`M${n.value.length+8}`).value=c.byInitials(f.fullName),l.getCell(`AD${n.value.length+8}`).value=c.byInitials(h),l.getCell(`Z${n.value.length+9}`).value=u("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",k=await a.xlsx.writeBuffer();oe.saveAs(new Blob([k]),g),T.value=!1},ae=async()=>{A.value||f.workSchedule.addWorkSchedule({data:n.value,date:c.parseTime(new Date(w.value),"{Y}-{m}-{dd}")}).then(a=>A.value=a)};return c.holidays().then(a=>{W.value=a,L()}),(a,l)=>{const o=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",null,[p.checkEdit?(e.openBlock(),e.createBlock(e.unref(i.ElSelect),{key:0,modelValue:S.value,"onUpdate:modelValue":l[0]||(l[0]=t=>S.value=t),placeholder:"Select",style:{width:"240px","margin-bottom":".5rem","margin-right":".5rem"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Y.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),p.checkEdit?(e.openBlock(),e.createBlock(e.unref(i.ElButton),{key:1,plain:"",onClick:l[1]||(l[1]=t=>E.value=!0),style:{"margin-bottom":".5rem"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("workSchedule.jobTitle")),1)]),_:1})):e.createCommentVNode("",!0),p.checkEdit?(e.openBlock(),e.createBlock(e.unref(i.ElSwitch),{key:2,modelValue:M.value,"onUpdate:modelValue":l[2]||(l[2]=t=>M.value=t),"active-text":e.unref(u)("workSchedule.currentMonth"),"active-value":"0","inactive-value":"1",style:{"margin-bottom":".5rem","margin-left":".5rem"}},null,8,["modelValue","active-text"])):e.createCommentVNode("",!0),e.createVNode(e.unref(i.ElSwitch),{modelValue:R.value,"onUpdate:modelValue":l[3]||(l[3]=t=>R.value=t),"active-text":a.$t("bids.currentHeight"),"active-value":"100%","inactive-value":"calc(100vh - 10rem - var(--el-component-size)*4 - var(--el-tabs-header-height) - var(--el-main-padding)*2 - var(--header-height))",style:{"margin-bottom":".5rem","margin-left":".5rem"}},null,8,["modelValue","active-text"]),e.createVNode(e.unref(i.ElSkeleton),{style:{width:"100%"},loading:P.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%"},height:R.value,size:"small",align:"center",onCellClick:K,"empty-text":e.unref(u)("workSchedule.emptyText")},{default:e.withCtx(()=>[e.createVNode(e.unref(i.ElTableColumn),{label:e.unref(u)("workSchedule.title",{name:S.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(u)("workSchedule.month"),width:"180",align:"center"},{default:e.withCtx(t=>[e.createElementVNode("div",se,e.toDisplayString(n.value[t.$index].name),1)]),_:1},8,["label"]),e.createVNode(e.unref(i.ElTableColumn),{label:e.unref(u)("workSchedule.numbersMonth"),align:"center"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value,t=>(e.openBlock(),e.createBlock(e.unref(i.ElTableColumn),{key:t.day,width:"45","class-name":t.holidays,align:"center",label:t.weekday+`
3
+ `+t.day.toString()},{default:e.withCtx(d=>[e.createElementVNode("div",ce,e.toDisplayString(G(t.day,d.$index)||" "),1)]),_:2},1032,["class-name","label"]))),128))]),_:1},8,["label"]),e.createVNode(e.unref(i.ElTableColumn),{label:e.unref(u)("workSchedule.onSchedule"),align:"center"},{default:e.withCtx(()=>[e.createVNode(e.unref(i.ElTableColumn),{label:e.unref(u)("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(u)("workSchedule.hours")} ( ${N.value} )`,align:"center"},{default:e.withCtx(t=>[e.createElementVNode("div",{style:e.normalizeStyle(`color: ${N.value===t.row.contHour?"green":"red"};`)},e.toDisplayString(t.row.contHour),5)]),_:1},8,["label"])]),_:1},8,["label"])]),_:1},8,["label"])]),_:1},8,["data","height","empty-text"])]),_:1},8,["loading"]),Q.value&&p.checkEdit?(e.openBlock(),e.createElementBlock("div",ve,[e.createTextVNode(e.toDisplayString(e.unref(u)("workSchedule.chartsFilled"))+": ",1),A.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(i.ElButton),{key:0,type:"primary",onClick:ae},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("workSchedule.confirm")),1)]),_:1})),l[18]||(l[18]=e.createTextVNode()),e.createElementVNode("span",null,e.toDisplayString(p.fullName),1)])):e.createCommentVNode("",!0),e.withDirectives((e.openBlock(),e.createBlock(e.unref(i.ElButton),{disabled:T.value,plain:"",onClick:te,style:{"margin-top":".5rem"}},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("workSchedule.exportExcel")),1)]),_:1},8,["disabled"])),[[o,T.value]]),e.createVNode(e.unref(i.ElDialog),{title:e.unref(u)("workSchedule.jobTitle"),modelValue:E.value,"onUpdate:modelValue":l[5]||(l[5]=t=>E.value=t),width:"400px"},{footer:e.withCtx(()=>[e.createVNode(e.unref(i.ElButton),{onClick:l[4]||(l[4]=t=>E.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:j},{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:V.value,autocomplete:"on"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.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":d=>t.val=d,"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(O.ContextMenu),{show:I.value,"onUpdate:show":l[17]||(l[17]=t=>I.value=t),options:H.value},{default:e.withCtx(()=>[e.createVNode(e.unref(O.ContextMenuItem),{label:s.value.name,disabled:""},null,8,["label"]),e.createVNode(e.unref(O.ContextMenuSeparator)),s.value.level===2?(e.openBlock(),e.createElementBlock("div",me,[e.createVNode(e.unref(i.ElRadioGroup),{modelValue:U.value,"onUpdate:modelValue":l[6]||(l[6]=t=>U.value=t),size:"small"},{default:e.withCtx(()=>[e.createVNode(e.unref(i.ElRadioButton),{label:e.unref(u)("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[19]||(l[19]=e.createElementVNode("br",null,null,-1)),e.createElementVNode("span",null,e.toDisplayString(e.unref(u)("workSchedule.fromDate"))+":",1),e.createVNode(e.unref(i.ElSlider),{modelValue:$.value,"onUpdate:modelValue":l[7]||(l[7]=t=>$.value=t),step:1,min:1,max:r.value.length},null,8,["modelValue","max"]),e.createElementVNode("span",null,e.toDisplayString(e.unref(u)("workSchedule.with"))+":",1),e.createVNode(e.unref(i.ElSlider),{modelValue:x.value,"onUpdate:modelValue":l[8]||(l[8]=t=>x.value=t),step:1,min:8,max:11},null,8,["modelValue"]),e.createElementVNode("span",null,e.toDisplayString(e.unref(u)("workSchedule.duration"))+":",1),e.createVNode(e.unref(i.ElSlider),{modelValue:y.value,"onUpdate:modelValue":l[9]||(l[9]=t=>y.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[10]||(l[10]=t=>ee(s.value.ids))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("workSchedule.fillOut")),1)]),_:1}),e.createVNode(e.unref(i.ElButton),{style:{"margin-top":".5rem"},size:"small",onClick:l[11]||(l[11]=t=>_(s.value.ids))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("workSchedule.clearRow")),1)]),_:1})])):(e.openBlock(),e.createElementBlock("div",ge,[e.createElementVNode("div",null,e.toDisplayString(G(s.value.day,s.value.ids)),1),l[20]||(l[20]=e.createElementVNode("br",null,null,-1)),e.createElementVNode("span",null,e.toDisplayString(e.unref(u)("workSchedule.with"))+":",1),e.createVNode(e.unref(i.ElSlider),{modelValue:x.value,"onUpdate:modelValue":l[12]||(l[12]=t=>x.value=t),step:1,min:8,max:11,onChange:l[13]||(l[13]=t=>J(s.value.day,s.value.ids))},null,8,["modelValue"]),e.createElementVNode("span",null,e.toDisplayString(e.unref(u)("workSchedule.duration"))+":",1),e.createVNode(e.unref(i.ElSlider),{modelValue:y.value,"onUpdate:modelValue":l[14]||(l[14]=t=>y.value=t),step:1,min:4,max:12,onChange:l[15]||(l[15]=t=>J(s.value.day,s.value.ids))},null,8,["modelValue"]),e.createVNode(e.unref(i.ElButton),{style:{"margin-top":".5rem"},size:"small",onClick:l[16]||(l[16]=t=>le(s.value.day,s.value.ids))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(u)("workSchedule.delete")),1)]),_:1})]))]),_:1},8,["show","options"])])}}};module.exports=he;