@kengic/core.react 0.0.1-beta.51 → 0.0.1-beta.52
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/kengic-core.react.js +42 -42
- package/package.json +1 -1
package/kengic-core.react.js
CHANGED
|
@@ -66502,58 +66502,58 @@ function useKgUtil() {
|
|
|
66502
66502
|
};
|
|
66503
66503
|
}
|
|
66504
66504
|
function KgWorkStationModal() {
|
|
66505
|
-
var
|
|
66506
|
-
const e = useID(), t = doKgWorkStation(e), r = useReduxDispatch(), n =
|
|
66505
|
+
var ia;
|
|
66506
|
+
const e = useID(), t = doKgWorkStation(e), r = useReduxDispatch(), n = useIntl(), a = useKgUtil(), s = useReduxSelector(getIsVisible(e)), u = useReduxSelector(getIsOpen(e)), [g, C] = reactExports.useState([]), [w, D] = reactExports.useState([]), [G, ne] = reactExports.useState([]), oe = useReduxSelector(getWorkStation(e)), se = useReduxSelector(getWorkStationArea(e)), ue = ((ia = g.find((ca) => ca.devcod === w[0])) == null ? void 0 : ia.workstationAreas) ?? [], ae = {
|
|
66507
66507
|
hideSelectAll: !0,
|
|
66508
|
-
onChange(
|
|
66509
|
-
|
|
66508
|
+
onChange(ca) {
|
|
66509
|
+
D(ca.length > 1 ? [ca[0]] : ca);
|
|
66510
66510
|
},
|
|
66511
|
-
selectedRowKeys:
|
|
66512
|
-
},
|
|
66511
|
+
selectedRowKeys: w
|
|
66512
|
+
}, ct = {
|
|
66513
66513
|
hideSelectAll: !0,
|
|
66514
|
-
onChange(
|
|
66515
|
-
|
|
66514
|
+
onChange(ca) {
|
|
66515
|
+
ne(ca.length > 1 ? [ca[0]] : ca);
|
|
66516
66516
|
},
|
|
66517
|
-
selectedRowKeys:
|
|
66518
|
-
},
|
|
66517
|
+
selectedRowKeys: G
|
|
66518
|
+
}, ea = [
|
|
66519
66519
|
{
|
|
66520
66520
|
dataIndex: "devcodDsc",
|
|
66521
|
-
render: (
|
|
66521
|
+
render: (ca) => ca,
|
|
66522
66522
|
title: /* @__PURE__ */ jsxRuntimeExports.jsx(MemoizedFormattedMessage, { id: "KgWorkStation.workStation" })
|
|
66523
66523
|
}
|
|
66524
|
-
],
|
|
66524
|
+
], ut = [
|
|
66525
66525
|
{
|
|
66526
66526
|
dataIndex: "wrkareDsc",
|
|
66527
|
-
render: (
|
|
66527
|
+
render: (ca) => ca,
|
|
66528
66528
|
title: /* @__PURE__ */ jsxRuntimeExports.jsx(MemoizedFormattedMessage, { id: "KgWorkStation.workStationArea" })
|
|
66529
66529
|
}
|
|
66530
66530
|
];
|
|
66531
66531
|
reactExports.useEffect(() => {
|
|
66532
|
-
|
|
66533
|
-
}, [
|
|
66534
|
-
function
|
|
66532
|
+
u && oa();
|
|
66533
|
+
}, [u]);
|
|
66534
|
+
function ra() {
|
|
66535
66535
|
t.closeModal();
|
|
66536
66536
|
}
|
|
66537
|
-
function
|
|
66538
|
-
const
|
|
66539
|
-
r(setWorkStation({ id: e, workStation:
|
|
66537
|
+
function ta() {
|
|
66538
|
+
const ca = () => {
|
|
66539
|
+
r(setWorkStation({ id: e, workStation: g.find((sa) => sa.devcod === w[0]) ?? null })), r(setWorkStationArea({ id: e, workStationArea: ue.find((sa) => sa.wrkare === G[0]) ?? null }));
|
|
66540
66540
|
};
|
|
66541
|
-
|
|
66542
|
-
content:
|
|
66541
|
+
s ? (w[0] !== (oe == null ? void 0 : oe.devcod) || G[0] !== (se == null ? void 0 : se.wrkare)) && (ca(), console.log("333"), a.confirm({
|
|
66542
|
+
content: n.formatMessage({ id: "KgWorkStation.reloadMessage" }),
|
|
66543
66543
|
kgHideCancelButton: !0,
|
|
66544
66544
|
okButtonProps: { danger: !1 },
|
|
66545
|
-
okText:
|
|
66545
|
+
okText: n.formatMessage({ id: "kg.refresh" }),
|
|
66546
66546
|
onOk: () => {
|
|
66547
66547
|
window.location.reload();
|
|
66548
66548
|
}
|
|
66549
|
-
})) : (
|
|
66549
|
+
})) : (ca(), emit({ event: "onOk", id: e, parameter: {} })), t.closeModal();
|
|
66550
66550
|
}
|
|
66551
|
-
async function
|
|
66552
|
-
var
|
|
66553
|
-
const
|
|
66554
|
-
|
|
66551
|
+
async function oa() {
|
|
66552
|
+
var sa, va;
|
|
66553
|
+
const ca = ((sa = await List({ params: { pageNo: 1, pageSize: 999 } })) == null ? void 0 : sa.records) ?? [];
|
|
66554
|
+
ca.find((ga) => ga.devcod === (oe == null ? void 0 : oe.devcod)) ? (D([oe == null ? void 0 : oe.devcod]), (va = oe == null ? void 0 : oe.workstationAreas) != null && va.find((ga) => ga.wrkare === (se == null ? void 0 : se.wrkare)) ? ne([se == null ? void 0 : se.wrkare]) : ne([])) : (D([]), ne([])), C(ca);
|
|
66555
66555
|
}
|
|
66556
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children:
|
|
66556
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, { children: u && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
66557
66557
|
KgModal,
|
|
66558
66558
|
{
|
|
66559
66559
|
open: !0,
|
|
@@ -66562,22 +66562,22 @@ function KgWorkStationModal() {
|
|
|
66562
66562
|
confirmLoading: !1,
|
|
66563
66563
|
wrapClassName: "kgcrant-kg-work-station-modal",
|
|
66564
66564
|
zIndex: 2e3,
|
|
66565
|
-
onCancel:
|
|
66566
|
-
onOk:
|
|
66565
|
+
onCancel: ra,
|
|
66566
|
+
onOk: ta,
|
|
66567
66567
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { display: "flex" }, children: [
|
|
66568
66568
|
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { flex: "1", borderRight: "1px solid #f0f0f0" }, children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
66569
66569
|
ForwardTable,
|
|
66570
66570
|
{
|
|
66571
66571
|
className: "kg-flex-table",
|
|
66572
|
-
dataSource:
|
|
66573
|
-
columns:
|
|
66572
|
+
dataSource: g,
|
|
66573
|
+
columns: ea,
|
|
66574
66574
|
size: "small",
|
|
66575
66575
|
pagination: !1,
|
|
66576
|
-
rowSelection:
|
|
66577
|
-
rowKey: (
|
|
66578
|
-
onRow: (
|
|
66576
|
+
rowSelection: ae,
|
|
66577
|
+
rowKey: (ca) => ca.devcod,
|
|
66578
|
+
onRow: (ca) => ({
|
|
66579
66579
|
onClick() {
|
|
66580
|
-
|
|
66580
|
+
w.includes(ca.devcod) ? D([]) : D([ca.devcod]);
|
|
66581
66581
|
}
|
|
66582
66582
|
})
|
|
66583
66583
|
}
|
|
@@ -66586,15 +66586,15 @@ function KgWorkStationModal() {
|
|
|
66586
66586
|
ForwardTable,
|
|
66587
66587
|
{
|
|
66588
66588
|
className: "kg-flex-table",
|
|
66589
|
-
dataSource:
|
|
66590
|
-
columns:
|
|
66589
|
+
dataSource: ue,
|
|
66590
|
+
columns: ut,
|
|
66591
66591
|
size: "small",
|
|
66592
66592
|
pagination: !1,
|
|
66593
|
-
rowSelection:
|
|
66594
|
-
rowKey: (
|
|
66595
|
-
onRow: (
|
|
66593
|
+
rowSelection: ct,
|
|
66594
|
+
rowKey: (ca) => ca.wrkare,
|
|
66595
|
+
onRow: (ca) => ({
|
|
66596
66596
|
onClick() {
|
|
66597
|
-
|
|
66597
|
+
G.includes(ca.wrkare) ? ne([]) : ne([ca.wrkare]);
|
|
66598
66598
|
}
|
|
66599
66599
|
})
|
|
66600
66600
|
}
|