@hkyhy/marsun-components-core 0.1.146 → 0.1.148
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/README.md +2 -0
- package/dist/components/Filter/createKneFilterField.js +52 -51
- package/dist/components/Filter/createKneFilterField.js.map +1 -1
- package/dist/components/Form/SuperSelect.d.ts +1 -1
- package/dist/components/Form/SuperSelect.js +70 -67
- package/dist/components/Form/SuperSelect.js.map +1 -1
- package/dist/components/Form/createPagedSuperSelectApi.d.ts +5 -0
- package/dist/components/Form/createPagedSuperSelectApi.js +5 -0
- package/dist/components/Form/createPagedSuperSelectApi.js.map +1 -1
- package/dist/components/Form/index.d.ts +1 -1
- package/dist/components/Form/superSelectEmpty.d.ts +5 -0
- package/dist/components/Form/superSelectEmpty.js +28 -5
- package/dist/components/Form/superSelectEmpty.js.map +1 -1
- package/dist/components/ReactFilter/fields/index.js +27 -26
- package/dist/components/ReactFilter/fields/index.js.map +1 -1
- package/dist/components/Tools/ActionTracking/CreateAction/CreateActionForm.d.ts +2 -0
- package/dist/components/Tools/ActionTracking/CreateAction/CreateActionForm.js +217 -210
- package/dist/components/Tools/ActionTracking/CreateAction/CreateActionForm.js.map +1 -1
- package/dist/components/Tools/ActionTracking/CreateAction/CreateActionModal.js +94 -93
- package/dist/components/Tools/ActionTracking/CreateAction/CreateActionModal.js.map +1 -1
- package/dist/components/Tools/ActionTracking/CreateAction/types.d.ts +2 -0
- package/dist/form-info.d.ts +1 -1
- package/dist/form-info.js +71 -70
- package/dist/index.js +205 -204
- package/package.json +1 -1
|
@@ -1,264 +1,270 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { useState as u, useRef as
|
|
3
|
-
import
|
|
4
|
-
import { message as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { SetFormFields as
|
|
8
|
-
import
|
|
9
|
-
import { createPagedSuperSelectApi as
|
|
10
|
-
import { Input as
|
|
11
|
-
import { SuperSelect as
|
|
12
|
-
import
|
|
13
|
-
import { useFormApi as
|
|
14
|
-
const
|
|
15
|
-
function
|
|
1
|
+
import { jsx as a, jsxs as Ve } from "react/jsx-runtime";
|
|
2
|
+
import { useState as u, useRef as Z, useCallback as W, useMemo as S, useEffect as y } from "react";
|
|
3
|
+
import Oe from "../../../Form/FormDataSync.js";
|
|
4
|
+
import { message as v } from "antd";
|
|
5
|
+
import Ce from "classnames";
|
|
6
|
+
import Ue from "./PersonRoleCascaderField.js";
|
|
7
|
+
import { SetFormFields as Re } from "./SetFormFields.js";
|
|
8
|
+
import T from "./CreateActionForm.module.scss.js";
|
|
9
|
+
import { createPagedSuperSelectApi as Ee, pagedSuperSelectGetSearchProps as Fe, pagedSuperSelectPagination as De } from "../../../Form/createPagedSuperSelectApi.js";
|
|
10
|
+
import { Input as N, TextArea as ke, DatePicker as Le } from "../../../FormInfo/fields.js";
|
|
11
|
+
import { SuperSelect as P } from "../../../Form/SuperSelect.js";
|
|
12
|
+
import et from "../../../FormInfo/FormInfo.js";
|
|
13
|
+
import { useFormApi as tt } from "@kne/react-form";
|
|
14
|
+
const J = 20, X = 20, G = 15e3;
|
|
15
|
+
function $(t, f) {
|
|
16
16
|
return Promise.race([
|
|
17
17
|
t.then(
|
|
18
|
-
(
|
|
19
|
-
(
|
|
18
|
+
(m) => ({ status: "fulfilled", value: m }),
|
|
19
|
+
(m) => ({ status: "rejected", reason: m })
|
|
20
20
|
),
|
|
21
|
-
new Promise((
|
|
22
|
-
setTimeout(() =>
|
|
21
|
+
new Promise((m) => {
|
|
22
|
+
setTimeout(() => m({ status: "rejected", reason: new Error("timeout") }), f);
|
|
23
23
|
})
|
|
24
24
|
]);
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function H(t) {
|
|
27
27
|
return t == null || t === "" ? "" : Array.isArray(t) ? String(t[0] ?? "").trim() : typeof t == "object" ? String(t.value ?? "").trim() : String(t).trim();
|
|
28
28
|
}
|
|
29
|
-
function
|
|
30
|
-
return
|
|
31
|
-
/* @__PURE__ */ a("span", { className:
|
|
32
|
-
/* @__PURE__ */ a("span", { className:
|
|
29
|
+
function St(t, f) {
|
|
30
|
+
return f ? /* @__PURE__ */ Ve("span", { className: T["assignee-option"], children: [
|
|
31
|
+
/* @__PURE__ */ a("span", { className: T["assignee-option-name"], children: t }),
|
|
32
|
+
/* @__PURE__ */ a("span", { className: T["assignee-option-org"], children: f })
|
|
33
33
|
] }) : t;
|
|
34
34
|
}
|
|
35
|
-
const
|
|
35
|
+
const ht = ({
|
|
36
36
|
scopeLock: t,
|
|
37
|
-
varietyLabel:
|
|
38
|
-
lockedContext:
|
|
39
|
-
scopeMode:
|
|
40
|
-
titlePlaceholder:
|
|
41
|
-
descriptionPlaceholder:
|
|
42
|
-
metricPlaceholder:
|
|
43
|
-
noneScopeHint:
|
|
44
|
-
dimensionOptions:
|
|
45
|
-
loaders:
|
|
46
|
-
emptyAssigneeHint:
|
|
47
|
-
emptyAllocatorHint:
|
|
48
|
-
allocatorPlaceholder:
|
|
49
|
-
assigneePlaceholder:
|
|
50
|
-
allocatorDisabled:
|
|
51
|
-
|
|
52
|
-
|
|
37
|
+
varietyLabel: f,
|
|
38
|
+
lockedContext: m,
|
|
39
|
+
scopeMode: Ne = "form",
|
|
40
|
+
titlePlaceholder: Te,
|
|
41
|
+
descriptionPlaceholder: Me,
|
|
42
|
+
metricPlaceholder: _e,
|
|
43
|
+
noneScopeHint: O,
|
|
44
|
+
dimensionOptions: Ae,
|
|
45
|
+
loaders: l,
|
|
46
|
+
emptyAssigneeHint: xe = "暂无执行人",
|
|
47
|
+
emptyAllocatorHint: M = "暂无分配人",
|
|
48
|
+
allocatorPlaceholder: Ge = "先选角色,再选分配人",
|
|
49
|
+
assigneePlaceholder: R = "先选角色,再选执行人",
|
|
50
|
+
allocatorDisabled: k = !0,
|
|
51
|
+
defaultAssigneeRoleCode: b = "",
|
|
52
|
+
defaultAssigneeUserId: _ = "",
|
|
53
|
+
defaultAssigneeLabel: B = "",
|
|
53
54
|
onAssigneeOptionsReady: c,
|
|
54
55
|
onAllocatorOptionsReady: h
|
|
55
56
|
}) => {
|
|
56
|
-
var
|
|
57
|
-
const
|
|
58
|
-
|
|
57
|
+
var ve, Pe, be, Ie;
|
|
58
|
+
const j = tt(), d = !!(l.loadAssigneeRoles && l.loadAssigneeUsersPage), [$e, L] = u([]), [ee, te] = u([]), [p, re] = u(
|
|
59
|
+
() => String(b || "").trim()
|
|
60
|
+
), [w, Be] = u(() => {
|
|
61
|
+
const e = String(_ || "").trim();
|
|
59
62
|
if (!e) return [];
|
|
60
|
-
const r = String(
|
|
63
|
+
const r = String(B || e).trim() || e;
|
|
61
64
|
return [{ value: e, label: r }];
|
|
62
|
-
}),
|
|
65
|
+
}), Y = Z(/* @__PURE__ */ new Map()), [je, ae] = u([]), [I, ne] = u([]), [Q, le] = u(!0), [ie, se] = u(!1), [oe, ue] = u(!1), [ce, we] = u(""), [Ye, me] = u(""), [de, fe] = u(() => {
|
|
63
66
|
var e;
|
|
64
67
|
return ((e = t == null ? void 0 : t.factory) == null ? void 0 : e.trim()) || "";
|
|
65
|
-
}),
|
|
66
|
-
c == null || c([...
|
|
67
|
-
}, [c]),
|
|
68
|
+
}), C = Z(((ve = t == null ? void 0 : t.factory) == null ? void 0 : ve.trim()) || ""), U = Z(String(b || "").trim()), A = W(() => {
|
|
69
|
+
c == null || c([...Y.current.values()]);
|
|
70
|
+
}, [c]), x = W(
|
|
68
71
|
(e, r) => {
|
|
69
|
-
const
|
|
70
|
-
if (!
|
|
71
|
-
const i = String(r ||
|
|
72
|
-
|
|
73
|
-
(s) => s.some((o) => o.value ===
|
|
74
|
-
),
|
|
72
|
+
const n = String(e || "").trim();
|
|
73
|
+
if (!n) return;
|
|
74
|
+
const i = String(r || n).trim() || n;
|
|
75
|
+
Y.current.set(n, { value: n, displayName: i }), Be(
|
|
76
|
+
(s) => s.some((o) => o.value === n) ? s : [{ value: n, label: i }, ...s]
|
|
77
|
+
), A();
|
|
75
78
|
},
|
|
76
|
-
[
|
|
77
|
-
),
|
|
79
|
+
[A]
|
|
80
|
+
), E = !!(m && m.length > 0), F = (E ? "locked" : Ne === "none" ? "none" : "form") === "none", ge = !!((Pe = t == null ? void 0 : t.factory) != null && Pe.trim()), D = !!((be = t == null ? void 0 : t.variety) != null && be.trim()), Qe = !!((Ie = t == null ? void 0 : t.metric) != null && Ie.trim()), V = typeof l.loadVarietyPage == "function", pe = !!de || D, ze = S(() => {
|
|
78
81
|
var r;
|
|
79
82
|
const e = (r = t == null ? void 0 : t.factory) == null ? void 0 : r.trim();
|
|
80
|
-
return !e ||
|
|
81
|
-
}, [
|
|
82
|
-
if (!
|
|
83
|
-
const e =
|
|
84
|
-
return
|
|
85
|
-
pageSize:
|
|
83
|
+
return !e || I.some((n) => n.value === e) ? I : [{ value: e, label: e }, ...I];
|
|
84
|
+
}, [I, t == null ? void 0 : t.factory]), Se = S(() => {
|
|
85
|
+
if (!V || !l.loadVarietyPage) return;
|
|
86
|
+
const e = l.loadVarietyPage;
|
|
87
|
+
return Ee({
|
|
88
|
+
pageSize: J,
|
|
86
89
|
loadPage: (r) => e({
|
|
87
90
|
...r,
|
|
88
|
-
factory:
|
|
91
|
+
factory: C.current
|
|
89
92
|
}),
|
|
90
|
-
onError: () =>
|
|
93
|
+
onError: () => v.error("品种列表加载失败")
|
|
91
94
|
});
|
|
92
|
-
}, [
|
|
93
|
-
() =>
|
|
95
|
+
}, [V, l.loadVarietyPage]), qe = S(
|
|
96
|
+
() => Fe(J),
|
|
94
97
|
[]
|
|
95
|
-
),
|
|
96
|
-
() =>
|
|
98
|
+
), Ke = S(
|
|
99
|
+
() => De(J),
|
|
97
100
|
[]
|
|
98
|
-
),
|
|
99
|
-
if (!
|
|
101
|
+
), he = S(() => {
|
|
102
|
+
if (!d || !p || !l.loadAssigneeUsersPage)
|
|
100
103
|
return;
|
|
101
|
-
const e =
|
|
102
|
-
return
|
|
103
|
-
pageSize:
|
|
104
|
-
loadPage: async (
|
|
104
|
+
const e = l.loadAssigneeUsersPage, r = p;
|
|
105
|
+
return Ee({
|
|
106
|
+
pageSize: X,
|
|
107
|
+
loadPage: async (n) => {
|
|
105
108
|
const i = await e({
|
|
106
|
-
...
|
|
109
|
+
...n,
|
|
107
110
|
roleCode: r
|
|
108
111
|
});
|
|
109
112
|
for (const s of i.pageData || []) {
|
|
110
113
|
const o = String(s.value || "").trim();
|
|
111
|
-
o &&
|
|
114
|
+
o && Y.current.set(o, {
|
|
112
115
|
value: o,
|
|
113
116
|
displayName: String(s.label || o),
|
|
114
117
|
employeeId: String(s.employeeId || "").trim() || void 0
|
|
115
118
|
});
|
|
116
119
|
}
|
|
117
|
-
return
|
|
120
|
+
return A(), i;
|
|
118
121
|
},
|
|
119
|
-
onError: () =>
|
|
122
|
+
onError: () => v.error("执行人列表加载失败")
|
|
120
123
|
});
|
|
121
|
-
}, [
|
|
122
|
-
() =>
|
|
124
|
+
}, [d, p, l.loadAssigneeUsersPage, A]), Ze = S(
|
|
125
|
+
() => Fe(X),
|
|
123
126
|
[]
|
|
124
|
-
),
|
|
125
|
-
() =>
|
|
127
|
+
), We = S(
|
|
128
|
+
() => De(X),
|
|
126
129
|
[]
|
|
127
|
-
),
|
|
130
|
+
), Je = W(
|
|
128
131
|
(e) => {
|
|
129
|
-
if (
|
|
130
|
-
const i =
|
|
131
|
-
if (i !==
|
|
132
|
-
const o =
|
|
133
|
-
|
|
134
|
-
|
|
132
|
+
if (d) {
|
|
133
|
+
const i = H(e.assigneeRoleCode);
|
|
134
|
+
if (i !== U.current) {
|
|
135
|
+
const o = U.current;
|
|
136
|
+
U.current = i, re(i), o && i !== o && queueMicrotask(() => {
|
|
137
|
+
j.openApi.setFieldValue({ name: "assigneeUserId" }, "", {
|
|
135
138
|
runValidate: !1
|
|
136
139
|
});
|
|
137
140
|
});
|
|
138
141
|
}
|
|
139
|
-
const s =
|
|
142
|
+
const s = H(e.assigneeUserId);
|
|
140
143
|
if (s) {
|
|
141
|
-
const o =
|
|
142
|
-
o &&
|
|
144
|
+
const o = w.find((g) => g.value === s);
|
|
145
|
+
o && x(s, String(o.label || s));
|
|
143
146
|
}
|
|
144
147
|
}
|
|
145
|
-
if (
|
|
146
|
-
const r =
|
|
147
|
-
if (r ===
|
|
148
|
-
const
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
if (E || F) return;
|
|
149
|
+
const r = H(e.factory);
|
|
150
|
+
if (r === C.current) return;
|
|
151
|
+
const n = C.current;
|
|
152
|
+
C.current = r, fe(r), n && r !== n && V && !D && queueMicrotask(() => {
|
|
153
|
+
j.openApi.setFieldValue({ name: "variety" }, "", { runValidate: !1 });
|
|
151
154
|
});
|
|
152
155
|
},
|
|
153
156
|
[
|
|
154
|
-
|
|
157
|
+
j.openApi,
|
|
158
|
+
V,
|
|
159
|
+
D,
|
|
155
160
|
E,
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
B,
|
|
161
|
-
M
|
|
161
|
+
F,
|
|
162
|
+
d,
|
|
163
|
+
w,
|
|
164
|
+
x
|
|
162
165
|
]
|
|
163
166
|
);
|
|
164
|
-
|
|
167
|
+
y(() => {
|
|
165
168
|
var r;
|
|
166
169
|
const e = ((r = t == null ? void 0 : t.factory) == null ? void 0 : r.trim()) || "";
|
|
167
|
-
e && (
|
|
168
|
-
}, [t == null ? void 0 : t.factory]),
|
|
170
|
+
e && (C.current = e, fe(e));
|
|
171
|
+
}, [t == null ? void 0 : t.factory]), y(() => {
|
|
169
172
|
let e = !1;
|
|
170
|
-
|
|
171
|
-
const r =
|
|
173
|
+
le(!0);
|
|
174
|
+
const r = d ? Promise.resolve({
|
|
172
175
|
status: "fulfilled",
|
|
173
176
|
value: {
|
|
174
177
|
cascadeOptions: [],
|
|
175
178
|
options: []
|
|
176
179
|
}
|
|
177
|
-
}) :
|
|
180
|
+
}) : $(l.loadAssigneeCatalog(), G);
|
|
178
181
|
return Promise.all([
|
|
179
182
|
r,
|
|
180
|
-
|
|
181
|
-
]).then(([
|
|
183
|
+
$(l.loadAllocatorCatalog(), G)
|
|
184
|
+
]).then(([n, i]) => {
|
|
182
185
|
if (!e)
|
|
183
|
-
if (
|
|
184
|
-
|
|
185
|
-
const s =
|
|
186
|
-
|
|
187
|
-
const g = i.value.options.find((
|
|
188
|
-
|
|
186
|
+
if (d || (n.status === "fulfilled" ? (L(n.value.cascadeOptions), c == null || c(n.value.options)) : (v.error("执行人列表加载失败"), L([]), c == null || c([]))), i.status === "fulfilled") {
|
|
187
|
+
ae(i.value.cascadeOptions), h == null || h(i.value.options);
|
|
188
|
+
const s = l.pickDefaultAllocatorUserId, o = s ? s(i.value.options) : "";
|
|
189
|
+
we(o);
|
|
190
|
+
const g = i.value.options.find((He) => He.value === o), q = String((g == null ? void 0 : g.displayName) || "").trim(), K = String((g == null ? void 0 : g.employeeId) || "").trim();
|
|
191
|
+
me(q && K ? `${q} · ${K}` : q || K || M);
|
|
189
192
|
} else
|
|
190
|
-
|
|
193
|
+
v.error("分配人列表加载失败"), ae([]), h == null || h([]), me(M);
|
|
191
194
|
}).finally(() => {
|
|
192
|
-
e ||
|
|
195
|
+
e || le(!1);
|
|
193
196
|
}), () => {
|
|
194
197
|
e = !0;
|
|
195
198
|
};
|
|
196
|
-
}, []),
|
|
197
|
-
if (!
|
|
199
|
+
}, []), y(() => {
|
|
200
|
+
if (!d || !l.loadAssigneeRoles) return;
|
|
198
201
|
let e = !1;
|
|
199
|
-
return
|
|
200
|
-
e || (r.status === "fulfilled" ?
|
|
202
|
+
return se(!0), $(l.loadAssigneeRoles(), G).then((r) => {
|
|
203
|
+
e || (r.status === "fulfilled" ? te(r.value) : (v.error("执行人角色加载失败"), te([])));
|
|
201
204
|
}).finally(() => {
|
|
202
|
-
e ||
|
|
205
|
+
e || se(!1);
|
|
203
206
|
}), () => {
|
|
204
207
|
e = !0;
|
|
205
208
|
};
|
|
206
|
-
}, []),
|
|
207
|
-
const e = String(
|
|
208
|
-
e &&
|
|
209
|
-
}, [
|
|
210
|
-
|
|
209
|
+
}, []), y(() => {
|
|
210
|
+
const e = String(_ || "").trim();
|
|
211
|
+
e && x(e, String(B || e));
|
|
212
|
+
}, [_, B, x]), y(() => {
|
|
213
|
+
const e = String(b || "").trim();
|
|
214
|
+
e && U.current !== e && (U.current = e, re(e));
|
|
215
|
+
}, [b]), y(() => {
|
|
216
|
+
if (E || F || !l.loadFactoryOptions) return;
|
|
211
217
|
let e = !1;
|
|
212
|
-
return
|
|
213
|
-
e || (r.status === "fulfilled" ?
|
|
218
|
+
return ue(!0), $(l.loadFactoryOptions(), G).then((r) => {
|
|
219
|
+
e || (r.status === "fulfilled" ? ne(r.value) : (v.error("分厂列表加载失败"), ne([])));
|
|
214
220
|
}).finally(() => {
|
|
215
|
-
e ||
|
|
221
|
+
e || ue(!1);
|
|
216
222
|
}), () => {
|
|
217
223
|
e = !0;
|
|
218
224
|
};
|
|
219
225
|
}, []);
|
|
220
|
-
const
|
|
221
|
-
|
|
226
|
+
const Xe = E ? (m || []).map((e, r) => /* @__PURE__ */ a(
|
|
227
|
+
N,
|
|
222
228
|
{
|
|
223
229
|
name: `lockedContext_${r}`,
|
|
224
230
|
label: e.label,
|
|
225
231
|
disabled: !0
|
|
226
232
|
},
|
|
227
233
|
`locked-${r}-${e.label}`
|
|
228
|
-
)) :
|
|
234
|
+
)) : F ? [] : [
|
|
229
235
|
/* @__PURE__ */ a(
|
|
230
|
-
|
|
236
|
+
P,
|
|
231
237
|
{
|
|
232
238
|
name: "factory",
|
|
233
239
|
label: "分厂",
|
|
234
240
|
single: !0,
|
|
235
|
-
options:
|
|
236
|
-
placeholder:
|
|
237
|
-
disabled:
|
|
238
|
-
allowClear: !
|
|
241
|
+
options: ze,
|
|
242
|
+
placeholder: oe ? "加载分厂…" : "选择分厂",
|
|
243
|
+
disabled: oe || ge,
|
|
244
|
+
allowClear: !ge
|
|
239
245
|
},
|
|
240
246
|
"factory"
|
|
241
247
|
),
|
|
242
|
-
|
|
243
|
-
|
|
248
|
+
V && Se ? /* @__PURE__ */ a(
|
|
249
|
+
P,
|
|
244
250
|
{
|
|
245
251
|
name: "variety",
|
|
246
|
-
label:
|
|
252
|
+
label: f || "品种",
|
|
247
253
|
single: !0,
|
|
248
|
-
api:
|
|
249
|
-
getSearchProps:
|
|
250
|
-
pagination:
|
|
251
|
-
placeholder:
|
|
252
|
-
disabled:
|
|
253
|
-
allowClear: !
|
|
254
|
+
api: Se,
|
|
255
|
+
getSearchProps: qe,
|
|
256
|
+
pagination: Ke,
|
|
257
|
+
placeholder: pe ? "选择品种" : "请先选择分厂",
|
|
258
|
+
disabled: D || !pe,
|
|
259
|
+
allowClear: !D,
|
|
254
260
|
searchPlaceholder: "搜索品种"
|
|
255
261
|
},
|
|
256
|
-
`variety-${
|
|
262
|
+
`variety-${de || "none"}`
|
|
257
263
|
) : /* @__PURE__ */ a(
|
|
258
|
-
|
|
264
|
+
P,
|
|
259
265
|
{
|
|
260
266
|
name: "variety",
|
|
261
|
-
label:
|
|
267
|
+
label: f || "品种",
|
|
262
268
|
single: !0,
|
|
263
269
|
options: [],
|
|
264
270
|
placeholder: "App 未注入 loadVarietyPage",
|
|
@@ -267,47 +273,48 @@ const pt = ({
|
|
|
267
273
|
"variety"
|
|
268
274
|
),
|
|
269
275
|
/* @__PURE__ */ a(
|
|
270
|
-
|
|
276
|
+
N,
|
|
271
277
|
{
|
|
272
278
|
name: "metric",
|
|
273
279
|
label: "关联指标",
|
|
274
|
-
placeholder:
|
|
280
|
+
placeholder: _e || "可选",
|
|
275
281
|
maxLength: 40,
|
|
276
|
-
disabled:
|
|
282
|
+
disabled: Qe
|
|
277
283
|
},
|
|
278
284
|
"metric"
|
|
279
285
|
)
|
|
280
|
-
],
|
|
281
|
-
return /* @__PURE__ */
|
|
282
|
-
/* @__PURE__ */ a(
|
|
286
|
+
], z = String(_ || "").trim(), ye = String(b || p || "").trim();
|
|
287
|
+
return /* @__PURE__ */ Ve("div", { className: Ce("create-action-form", T["create-action-form"]), children: [
|
|
288
|
+
/* @__PURE__ */ a(Oe, { onChange: Je }),
|
|
283
289
|
/* @__PURE__ */ a(
|
|
284
|
-
|
|
290
|
+
Re,
|
|
285
291
|
{
|
|
286
292
|
patch: {
|
|
287
|
-
allocatorUserId:
|
|
288
|
-
allocatorDisplay:
|
|
289
|
-
...
|
|
293
|
+
allocatorUserId: ce,
|
|
294
|
+
allocatorDisplay: Ye,
|
|
295
|
+
...ye ? { assigneeRoleCode: ye } : {},
|
|
296
|
+
...z ? { assigneeUserId: z } : {}
|
|
290
297
|
}
|
|
291
298
|
}
|
|
292
299
|
),
|
|
293
300
|
/* @__PURE__ */ a(
|
|
294
|
-
|
|
301
|
+
et,
|
|
295
302
|
{
|
|
296
303
|
column: 1,
|
|
297
304
|
list: [
|
|
298
305
|
/* @__PURE__ */ a(
|
|
299
|
-
|
|
306
|
+
N,
|
|
300
307
|
{
|
|
301
308
|
name: "title",
|
|
302
309
|
label: "任务标题",
|
|
303
310
|
rule: "REQ",
|
|
304
|
-
placeholder:
|
|
311
|
+
placeholder: Te || "请输入任务标题",
|
|
305
312
|
maxLength: 120
|
|
306
313
|
},
|
|
307
314
|
"title"
|
|
308
315
|
),
|
|
309
316
|
/* @__PURE__ */ a(
|
|
310
|
-
|
|
317
|
+
ke,
|
|
311
318
|
{
|
|
312
319
|
name: "description",
|
|
313
320
|
label: "任务描述",
|
|
@@ -315,99 +322,99 @@ const pt = ({
|
|
|
315
322
|
rows: 5,
|
|
316
323
|
block: !0,
|
|
317
324
|
maxLength: 2e3,
|
|
318
|
-
placeholder:
|
|
325
|
+
placeholder: Me || "说明目前情况、问题与需改进点,便于执行人理解背景"
|
|
319
326
|
},
|
|
320
327
|
"description"
|
|
321
328
|
),
|
|
322
329
|
/* @__PURE__ */ a(
|
|
323
|
-
|
|
330
|
+
P,
|
|
324
331
|
{
|
|
325
332
|
name: "dimension",
|
|
326
333
|
label: "任务类型",
|
|
327
334
|
rule: "REQ",
|
|
328
335
|
single: !0,
|
|
329
|
-
options:
|
|
336
|
+
options: Ae,
|
|
330
337
|
placeholder: "选择任务类型"
|
|
331
338
|
},
|
|
332
339
|
"dimension"
|
|
333
340
|
),
|
|
334
|
-
...
|
|
341
|
+
...k ? [
|
|
335
342
|
/* @__PURE__ */ a(
|
|
336
|
-
|
|
343
|
+
N,
|
|
337
344
|
{
|
|
338
345
|
name: "allocatorDisplay",
|
|
339
346
|
label: "分配人",
|
|
340
347
|
disabled: !0,
|
|
341
|
-
placeholder:
|
|
348
|
+
placeholder: Q ? "加载中…" : M
|
|
342
349
|
},
|
|
343
350
|
"allocatorDisplay"
|
|
344
351
|
),
|
|
345
352
|
// 只读展示不能替掉 name=allocatorUserId:提交校验仍读该字段(FormInfo hidden 仍注册)
|
|
346
|
-
/* @__PURE__ */ a(
|
|
353
|
+
/* @__PURE__ */ a(N, { name: "allocatorUserId", hidden: !0 }, "allocatorUserId")
|
|
347
354
|
] : [
|
|
348
355
|
/* @__PURE__ */ a(
|
|
349
|
-
|
|
356
|
+
Ue,
|
|
350
357
|
{
|
|
351
358
|
name: "allocatorUserId",
|
|
352
359
|
label: "分配人",
|
|
353
|
-
cascadeOptions:
|
|
354
|
-
loading:
|
|
355
|
-
disabled:
|
|
356
|
-
emptyHint:
|
|
357
|
-
placeholder:
|
|
358
|
-
defaultUserId:
|
|
360
|
+
cascadeOptions: je,
|
|
361
|
+
loading: Q,
|
|
362
|
+
disabled: k,
|
|
363
|
+
emptyHint: M,
|
|
364
|
+
placeholder: Ge,
|
|
365
|
+
defaultUserId: ce
|
|
359
366
|
},
|
|
360
367
|
"allocatorUserId"
|
|
361
368
|
)
|
|
362
369
|
],
|
|
363
|
-
|
|
364
|
-
|
|
370
|
+
d ? /* @__PURE__ */ a(
|
|
371
|
+
P,
|
|
365
372
|
{
|
|
366
373
|
name: "assigneeRoleCode",
|
|
367
374
|
label: "执行人角色",
|
|
368
375
|
rule: "REQ",
|
|
369
376
|
single: !0,
|
|
370
|
-
options:
|
|
371
|
-
placeholder:
|
|
372
|
-
disabled:
|
|
377
|
+
options: ee,
|
|
378
|
+
placeholder: ie ? "加载角色…" : "先选择角色",
|
|
379
|
+
disabled: ie || !ee.length,
|
|
373
380
|
allowClear: !0,
|
|
374
381
|
searchPlaceholder: "搜索角色"
|
|
375
382
|
},
|
|
376
383
|
"assigneeRoleCode"
|
|
377
384
|
) : null,
|
|
378
|
-
|
|
379
|
-
|
|
385
|
+
d ? /* @__PURE__ */ a(
|
|
386
|
+
P,
|
|
380
387
|
{
|
|
381
388
|
name: "assigneeUserId",
|
|
382
389
|
label: "执行人",
|
|
383
390
|
rule: "REQ",
|
|
384
391
|
single: !0,
|
|
385
|
-
api:
|
|
386
|
-
options:
|
|
387
|
-
getSearchProps:
|
|
388
|
-
pagination:
|
|
389
|
-
placeholder:
|
|
390
|
-
disabled: !
|
|
392
|
+
api: he,
|
|
393
|
+
options: w,
|
|
394
|
+
getSearchProps: Ze,
|
|
395
|
+
pagination: We,
|
|
396
|
+
placeholder: p ? R || "搜索姓名/工号选择执行人" : "请先选择角色",
|
|
397
|
+
disabled: !p || !he,
|
|
391
398
|
allowClear: !0,
|
|
392
399
|
searchPlaceholder: "搜索姓名/工号",
|
|
393
400
|
overlayStyle: { zIndex: 2e3 }
|
|
394
401
|
},
|
|
395
|
-
`assigneeUserId-${
|
|
402
|
+
`assigneeUserId-${p || "none"}`
|
|
396
403
|
) : /* @__PURE__ */ a(
|
|
397
|
-
|
|
404
|
+
Ue,
|
|
398
405
|
{
|
|
399
406
|
name: "assigneeUserId",
|
|
400
407
|
label: "执行人",
|
|
401
|
-
cascadeOptions:
|
|
402
|
-
loading:
|
|
403
|
-
emptyHint:
|
|
404
|
-
placeholder:
|
|
405
|
-
defaultUserId:
|
|
408
|
+
cascadeOptions: $e,
|
|
409
|
+
loading: Q,
|
|
410
|
+
emptyHint: xe,
|
|
411
|
+
placeholder: R,
|
|
412
|
+
defaultUserId: z
|
|
406
413
|
},
|
|
407
414
|
"assigneeUserId"
|
|
408
415
|
),
|
|
409
416
|
/* @__PURE__ */ a(
|
|
410
|
-
|
|
417
|
+
Le,
|
|
411
418
|
{
|
|
412
419
|
name: "dueDate",
|
|
413
420
|
label: "截止日期",
|
|
@@ -418,17 +425,17 @@ const pt = ({
|
|
|
418
425
|
},
|
|
419
426
|
"dueDate"
|
|
420
427
|
),
|
|
421
|
-
...
|
|
428
|
+
...Xe
|
|
422
429
|
]
|
|
423
430
|
}
|
|
424
431
|
),
|
|
425
|
-
|
|
432
|
+
F && O ? /* @__PURE__ */ a("p", { className: Ce("create-action-none-hint", T["create-action-none-hint"]), children: O }) : null
|
|
426
433
|
] });
|
|
427
434
|
};
|
|
428
435
|
export {
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
436
|
+
X as CREATE_ACTION_ASSIGNEE_PAGE_SIZE,
|
|
437
|
+
J as CREATE_ACTION_VARIETY_PAGE_SIZE,
|
|
438
|
+
ht as default,
|
|
439
|
+
St as renderPersonOptionLabel
|
|
433
440
|
};
|
|
434
441
|
//# sourceMappingURL=CreateActionForm.js.map
|