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