@hkyhy/marsun-components-core 0.1.119 → 0.1.121
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/components/Filter/createKneFilterField.js +55 -53
- package/dist/components/Filter/createKneFilterField.js.map +1 -1
- package/dist/components/Form/SuperSelect.d.ts +1 -0
- package/dist/components/Form/SuperSelect.js +67 -58
- package/dist/components/Form/SuperSelect.js.map +1 -1
- package/dist/components/Form/createPagedSuperSelectApi.d.ts +60 -0
- package/dist/components/Form/createPagedSuperSelectApi.js +46 -0
- package/dist/components/Form/createPagedSuperSelectApi.js.map +1 -0
- package/dist/components/Form/index.d.ts +3 -0
- package/dist/components/Form/superSelectEmpty.d.ts +5 -0
- package/dist/components/Form/superSelectEmpty.js +11 -0
- package/dist/components/Form/superSelectEmpty.js.map +1 -0
- package/dist/components/FormInfo/fields.d.ts +2 -0
- package/dist/components/FormInfo/fields.js.map +1 -1
- package/dist/components/FormInfo/index.d.ts +2 -2
- package/dist/components/ReactFilter/fields/index.js +35 -27
- package/dist/components/ReactFilter/fields/index.js.map +1 -1
- package/dist/components/Tools/ActionTracking/Cancel/CancelExecutionModal.d.ts +20 -0
- package/dist/components/Tools/ActionTracking/Cancel/CancelExecutionModal.js +82 -0
- package/dist/components/Tools/ActionTracking/Cancel/CancelExecutionModal.js.map +1 -0
- package/dist/components/Tools/ActionTracking/Cancel/CancelExecutionModal.module.scss.js +7 -0
- package/dist/components/Tools/ActionTracking/Cancel/CancelExecutionModal.module.scss.js.map +1 -0
- package/dist/components/Tools/ActionTracking/Cancel/index.d.ts +3 -0
- package/dist/components/Tools/ActionTracking/CreateAction/CreateActionForm.d.ts +25 -0
- package/dist/components/Tools/ActionTracking/CreateAction/CreateActionForm.js +257 -0
- package/dist/components/Tools/ActionTracking/CreateAction/CreateActionForm.js.map +1 -0
- package/dist/components/Tools/ActionTracking/CreateAction/CreateActionForm.module.scss.js +10 -0
- package/dist/components/Tools/ActionTracking/CreateAction/CreateActionForm.module.scss.js.map +1 -0
- package/dist/components/Tools/ActionTracking/CreateAction/CreateActionModal.d.ts +47 -0
- package/dist/components/Tools/ActionTracking/CreateAction/CreateActionModal.js +148 -0
- package/dist/components/Tools/ActionTracking/CreateAction/CreateActionModal.js.map +1 -0
- package/dist/components/Tools/ActionTracking/CreateAction/CreateActionModal.module.scss.js +7 -0
- package/dist/components/Tools/ActionTracking/CreateAction/CreateActionModal.module.scss.js.map +1 -0
- package/dist/components/Tools/ActionTracking/CreateAction/PersonRoleCascader.d.ts +18 -0
- package/dist/components/Tools/ActionTracking/CreateAction/PersonRoleCascader.js +73 -0
- package/dist/components/Tools/ActionTracking/CreateAction/PersonRoleCascader.js.map +1 -0
- package/dist/components/Tools/ActionTracking/CreateAction/PersonRoleCascader.module.scss.js +5 -0
- package/dist/components/Tools/ActionTracking/CreateAction/PersonRoleCascader.module.scss.js.map +1 -0
- package/dist/components/Tools/ActionTracking/CreateAction/PersonRoleCascaderField.d.ts +19 -0
- package/dist/components/Tools/ActionTracking/CreateAction/PersonRoleCascaderField.js +62 -0
- package/dist/components/Tools/ActionTracking/CreateAction/PersonRoleCascaderField.js.map +1 -0
- package/dist/components/Tools/ActionTracking/CreateAction/PersonRoleCascaderField.module.scss.js +8 -0
- package/dist/components/Tools/ActionTracking/CreateAction/PersonRoleCascaderField.module.scss.js.map +1 -0
- package/dist/components/Tools/ActionTracking/CreateAction/SetFormFields.d.ts +4 -0
- package/dist/components/Tools/ActionTracking/CreateAction/SetFormFields.js +14 -0
- package/dist/components/Tools/ActionTracking/CreateAction/SetFormFields.js.map +1 -0
- package/dist/components/Tools/ActionTracking/CreateAction/index.d.ts +12 -0
- package/dist/components/Tools/ActionTracking/CreateAction/personCascadePath.d.ts +5 -0
- package/dist/components/Tools/ActionTracking/CreateAction/personCascadePath.js +30 -0
- package/dist/components/Tools/ActionTracking/CreateAction/personCascadePath.js.map +1 -0
- package/dist/components/Tools/ActionTracking/CreateAction/submitHelpers.d.ts +8 -0
- package/dist/components/Tools/ActionTracking/CreateAction/submitHelpers.js +35 -0
- package/dist/components/Tools/ActionTracking/CreateAction/submitHelpers.js.map +1 -0
- package/dist/components/Tools/ActionTracking/CreateAction/types.d.ts +108 -0
- package/dist/components/Tools/ActionTracking/Follow/ActionFollowModal.d.ts +27 -0
- package/dist/components/Tools/ActionTracking/Follow/ActionFollowModal.js +107 -0
- package/dist/components/Tools/ActionTracking/Follow/ActionFollowModal.js.map +1 -0
- package/dist/components/Tools/ActionTracking/Follow/ActionFollowModal.module.scss.js +11 -0
- package/dist/components/Tools/ActionTracking/Follow/ActionFollowModal.module.scss.js.map +1 -0
- package/dist/components/Tools/ActionTracking/Follow/index.d.ts +3 -0
- package/dist/components/Tools/ActionTracking/List/ActionFilterBar.d.ts +23 -0
- package/dist/components/Tools/ActionTracking/List/ActionFilterBar.js +31 -0
- package/dist/components/Tools/ActionTracking/List/ActionFilterBar.js.map +1 -0
- package/dist/components/Tools/ActionTracking/List/ActionFilterBar.module.scss.js +8 -0
- package/dist/components/Tools/ActionTracking/List/ActionFilterBar.module.scss.js.map +1 -0
- package/dist/components/Tools/ActionTracking/List/ActionListTable.d.ts +29 -0
- package/dist/components/Tools/ActionTracking/List/ActionListTable.js +76 -0
- package/dist/components/Tools/ActionTracking/List/ActionListTable.js.map +1 -0
- package/dist/components/Tools/ActionTracking/List/ActionListTable.module.scss.js +8 -0
- package/dist/components/Tools/ActionTracking/List/ActionListTable.module.scss.js.map +1 -0
- package/dist/components/Tools/ActionTracking/List/filterDefaults.d.ts +15 -0
- package/dist/components/Tools/ActionTracking/List/filterDefaults.js +27 -0
- package/dist/components/Tools/ActionTracking/List/filterDefaults.js.map +1 -0
- package/dist/components/Tools/ActionTracking/List/index.d.ts +6 -0
- package/dist/components/Tools/ActionTracking/List/listTypes.d.ts +49 -0
- package/dist/components/Tools/ActionTracking/{ActionTrackingShell.d.ts → Shell/ActionTrackingShell.d.ts} +1 -1
- package/dist/components/Tools/ActionTracking/{ActionTrackingShell.js → Shell/ActionTrackingShell.js} +1 -1
- package/dist/components/Tools/ActionTracking/Shell/ActionTrackingShell.js.map +1 -0
- package/dist/components/Tools/ActionTracking/Shell/index.d.ts +3 -0
- package/dist/components/Tools/ActionTracking/index.d.ts +11 -2
- package/dist/components/Tools/ActionTracking/utils/index.d.ts +1 -0
- package/dist/components/Tools/ActionTracking/utils/sanitizeActionHtml.d.ts +2 -0
- package/dist/components/Tools/index.d.ts +2 -0
- package/dist/form-info.d.ts +3 -0
- package/dist/form-info.js +80 -72
- package/dist/form-info.js.map +1 -1
- package/dist/index.js +855 -811
- package/dist/index.js.map +1 -1
- package/dist/marsun-components-core.css +2 -2
- package/dist/styles/global.css +2 -2
- package/package.json +1 -1
- package/dist/components/Tools/ActionTracking/ActionTrackingShell.js.map +0 -1
- /package/dist/components/Tools/ActionTracking/{style.module.scss.js → Shell/style.module.scss.js} +0 -0
- /package/dist/components/Tools/ActionTracking/{style.module.scss.js.map → Shell/style.module.scss.js.map} +0 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/** 新建 / 下发预填(App 注入) */
|
|
3
|
+
export type CreateActionPrefill = {
|
|
4
|
+
factory?: string;
|
|
5
|
+
variety?: string;
|
|
6
|
+
metric?: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
dimension?: string;
|
|
9
|
+
bizDate?: string;
|
|
10
|
+
factoryCode?: string;
|
|
11
|
+
};
|
|
12
|
+
/** 分厂/品种/指标只读锁定 */
|
|
13
|
+
export type CreateActionScopeLock = {
|
|
14
|
+
factory?: string;
|
|
15
|
+
variety?: string;
|
|
16
|
+
metric?: string;
|
|
17
|
+
};
|
|
18
|
+
/** 分域只读上下文(分厂名/机台/指标展示名等);有则不再出品种/关联指标 */
|
|
19
|
+
export type LockedContextField = {
|
|
20
|
+
label: string;
|
|
21
|
+
value: string;
|
|
22
|
+
};
|
|
23
|
+
/** 角色→用户两级级联节点 */
|
|
24
|
+
export type ActionPersonCascadeOption = {
|
|
25
|
+
value: string;
|
|
26
|
+
label: ReactNode;
|
|
27
|
+
children?: ActionPersonCascadeOption[];
|
|
28
|
+
};
|
|
29
|
+
/** 扁平人员选项(提交时解析展示名) */
|
|
30
|
+
export type ActionPersonOption = {
|
|
31
|
+
value: string;
|
|
32
|
+
displayName?: string;
|
|
33
|
+
label?: ReactNode;
|
|
34
|
+
};
|
|
35
|
+
export type CreateActionPersonCatalog = {
|
|
36
|
+
cascadeOptions: ActionPersonCascadeOption[];
|
|
37
|
+
options: ActionPersonOption[];
|
|
38
|
+
};
|
|
39
|
+
export type CreateActionSelectOption = {
|
|
40
|
+
value: string;
|
|
41
|
+
label: string;
|
|
42
|
+
};
|
|
43
|
+
export type CreateActionDimensionOption = {
|
|
44
|
+
value: string;
|
|
45
|
+
label: string;
|
|
46
|
+
};
|
|
47
|
+
/** 品种等远程分页下拉:对齐 kne SuperSelect.api loader 返回面 */
|
|
48
|
+
export type CreateActionSelectPageQuery = {
|
|
49
|
+
keyword?: string;
|
|
50
|
+
currentPage: number;
|
|
51
|
+
pageSize: number;
|
|
52
|
+
/**
|
|
53
|
+
* 当前选中的分厂(code/value)。
|
|
54
|
+
* App 应按分厂筛品种;未选时宜返回空页。
|
|
55
|
+
*/
|
|
56
|
+
factory?: string;
|
|
57
|
+
};
|
|
58
|
+
export type CreateActionSelectPageResult = {
|
|
59
|
+
pageData: CreateActionSelectOption[];
|
|
60
|
+
totalCount: number;
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* 建单数据加载器(App 注入;core 禁直连业务 API / DEMO)。
|
|
64
|
+
* loadFactoryOptions / loadVarietyPage 在 lockedContext 模式下可不传。
|
|
65
|
+
*/
|
|
66
|
+
export type CreateActionLoaders = {
|
|
67
|
+
loadAssigneeCatalog: () => Promise<CreateActionPersonCatalog>;
|
|
68
|
+
loadAllocatorCatalog: () => Promise<CreateActionPersonCatalog>;
|
|
69
|
+
loadFactoryOptions?: () => Promise<CreateActionSelectOption[]>;
|
|
70
|
+
/**
|
|
71
|
+
* 品种(或 App 自定义 label)分页下拉。
|
|
72
|
+
* 有则 FormInfo SuperSelect + api/滚动分页;禁 FE 平行码表。
|
|
73
|
+
*/
|
|
74
|
+
loadVarietyPage?: (query: CreateActionSelectPageQuery) => Promise<CreateActionSelectPageResult>;
|
|
75
|
+
/** 分配人默认 userId(如 localStorage 上次) */
|
|
76
|
+
pickDefaultAllocatorUserId?: (options: ActionPersonOption[]) => string;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* Modal 提交契约(对齐 EAM CreateActionModal 字段面;
|
|
80
|
+
* actor / analysisId / eventSource / API 由 App onSubmit 补齐)。
|
|
81
|
+
*/
|
|
82
|
+
export type CreateActionSubmitPayload = {
|
|
83
|
+
title: string;
|
|
84
|
+
dimension: string;
|
|
85
|
+
status: string;
|
|
86
|
+
assignee: string;
|
|
87
|
+
assigneeUserId: string;
|
|
88
|
+
allocator: string;
|
|
89
|
+
allocatorUserId: string;
|
|
90
|
+
owner: string;
|
|
91
|
+
dueDate?: string;
|
|
92
|
+
factory: string;
|
|
93
|
+
variety: string;
|
|
94
|
+
metric: string;
|
|
95
|
+
factoryCode?: string;
|
|
96
|
+
factoryName?: string;
|
|
97
|
+
verifyMetric?: string;
|
|
98
|
+
eventLabel: string;
|
|
99
|
+
};
|
|
100
|
+
export type CreateActionPersonValidateError = 'missing_allocator' | 'invalid_allocator' | 'missing_assignee' | 'invalid_assignee';
|
|
101
|
+
export type CreateActionPersonValidateResult = {
|
|
102
|
+
ok: true;
|
|
103
|
+
allocator: ActionPersonOption;
|
|
104
|
+
assignee: ActionPersonOption;
|
|
105
|
+
} | {
|
|
106
|
+
ok: false;
|
|
107
|
+
code: CreateActionPersonValidateError;
|
|
108
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type ActionFollowView = 'follow' | 'review' | 'cancelled';
|
|
3
|
+
export type ActionFollowModalProps = {
|
|
4
|
+
open: boolean;
|
|
5
|
+
title: string;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
saving?: boolean;
|
|
9
|
+
view: ActionFollowView;
|
|
10
|
+
/** 摘要区(App 注入 ActionFollowSummary 等) */
|
|
11
|
+
summarySlot: ReactNode;
|
|
12
|
+
/** 告警处置等扩展(可选) */
|
|
13
|
+
dispositionSlot?: ReactNode;
|
|
14
|
+
/** 表单字段区(跟进/复核);cancelled 忽略 */
|
|
15
|
+
formSlot?: ReactNode;
|
|
16
|
+
formData?: Record<string, unknown>;
|
|
17
|
+
formKey?: string;
|
|
18
|
+
onSubmit?: (values: Record<string, unknown>, mode: 'follow' | 'complete') => Promise<void>;
|
|
19
|
+
width?: number;
|
|
20
|
+
className?: string;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* 行动跟进弹层壳:布局 + 页脚;业务摘要/表单/API 由 App 注入。
|
|
24
|
+
* 可控 HTML 展示须经 sanitizeActionHtml(F3)。
|
|
25
|
+
*/
|
|
26
|
+
declare const ActionFollowModal: React.FC<ActionFollowModalProps>;
|
|
27
|
+
export default ActionFollowModal;
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { jsx as o, jsxs as l, Fragment as i } from "react/jsx-runtime";
|
|
2
|
+
import { useState as k } from "react";
|
|
3
|
+
import { Button as w, Modal as A } from "antd";
|
|
4
|
+
import a from "classnames";
|
|
5
|
+
import e from "./ActionFollowModal.module.scss.js";
|
|
6
|
+
import H from "../../../VirtualScrollbar/VirtualScrollbar/index.js";
|
|
7
|
+
import { SubmitButton as d } from "../../../FormInfo/fields.js";
|
|
8
|
+
import O from "../../../FormInfo/Form.js";
|
|
9
|
+
const J = ({
|
|
10
|
+
open: u,
|
|
11
|
+
title: y,
|
|
12
|
+
onClose: t,
|
|
13
|
+
loading: h,
|
|
14
|
+
saving: M,
|
|
15
|
+
view: m,
|
|
16
|
+
summarySlot: N,
|
|
17
|
+
dispositionSlot: b,
|
|
18
|
+
formSlot: g,
|
|
19
|
+
formData: B = {},
|
|
20
|
+
formKey: v = "follow",
|
|
21
|
+
onSubmit: n,
|
|
22
|
+
width: x = 720,
|
|
23
|
+
className: C
|
|
24
|
+
}) => {
|
|
25
|
+
const [D, c] = k("follow"), r = !!(M || h), s = m === "cancelled", F = m === "review", f = /* @__PURE__ */ o(
|
|
26
|
+
H,
|
|
27
|
+
{
|
|
28
|
+
className: a("actions-follow-modal-scroll", e["actions-follow-modal-scroll"]),
|
|
29
|
+
wrapperClassName: e["actions-follow-modal-scroll-wrap"],
|
|
30
|
+
children: /* @__PURE__ */ l("div", { className: a("actions-follow-modal-body", e["actions-follow-modal-body"]), children: [
|
|
31
|
+
N,
|
|
32
|
+
b,
|
|
33
|
+
s ? null : g
|
|
34
|
+
] })
|
|
35
|
+
}
|
|
36
|
+
), p = /* @__PURE__ */ o(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
className: a("actions-follow-modal-footer", e["actions-follow-modal-footer"]),
|
|
40
|
+
children: s ? /* @__PURE__ */ o(w, { type: "primary", onClick: t, children: "关闭" }) : /* @__PURE__ */ l(i, { children: [
|
|
41
|
+
/* @__PURE__ */ o(w, { onClick: t, disabled: r, children: "取消" }),
|
|
42
|
+
F ? /* @__PURE__ */ o(
|
|
43
|
+
d,
|
|
44
|
+
{
|
|
45
|
+
type: "primary",
|
|
46
|
+
loading: r,
|
|
47
|
+
onMouseDown: () => c("complete"),
|
|
48
|
+
children: "保存备注"
|
|
49
|
+
}
|
|
50
|
+
) : /* @__PURE__ */ l(i, { children: [
|
|
51
|
+
/* @__PURE__ */ o(
|
|
52
|
+
d,
|
|
53
|
+
{
|
|
54
|
+
type: "default",
|
|
55
|
+
loading: r,
|
|
56
|
+
onMouseDown: () => c("follow"),
|
|
57
|
+
children: "跟进"
|
|
58
|
+
}
|
|
59
|
+
),
|
|
60
|
+
/* @__PURE__ */ o(
|
|
61
|
+
d,
|
|
62
|
+
{
|
|
63
|
+
type: "primary",
|
|
64
|
+
loading: r,
|
|
65
|
+
onMouseDown: () => c("complete"),
|
|
66
|
+
children: "提交并完成"
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
] })
|
|
70
|
+
] })
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
return /* @__PURE__ */ o(
|
|
74
|
+
A,
|
|
75
|
+
{
|
|
76
|
+
className: a("actions-follow-modal", e["actions-follow-modal"], C),
|
|
77
|
+
title: y,
|
|
78
|
+
open: u,
|
|
79
|
+
onCancel: t,
|
|
80
|
+
width: x,
|
|
81
|
+
centered: !0,
|
|
82
|
+
destroyOnHidden: !0,
|
|
83
|
+
footer: null,
|
|
84
|
+
children: s ? /* @__PURE__ */ l(i, { children: [
|
|
85
|
+
f,
|
|
86
|
+
p
|
|
87
|
+
] }) : /* @__PURE__ */ l(
|
|
88
|
+
O,
|
|
89
|
+
{
|
|
90
|
+
data: B,
|
|
91
|
+
onSubmit: async (j) => {
|
|
92
|
+
await (n == null ? void 0 : n(j, D));
|
|
93
|
+
},
|
|
94
|
+
children: [
|
|
95
|
+
f,
|
|
96
|
+
p
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
v
|
|
100
|
+
)
|
|
101
|
+
}
|
|
102
|
+
);
|
|
103
|
+
};
|
|
104
|
+
export {
|
|
105
|
+
J as default
|
|
106
|
+
};
|
|
107
|
+
//# sourceMappingURL=ActionFollowModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionFollowModal.js","sources":["../../../../../src/components/Tools/ActionTracking/Follow/ActionFollowModal.tsx"],"sourcesContent":["import { useState, type ReactNode } from 'react';\nimport { Form, SubmitButton } from '../../../FormInfo';\nimport { Button, Modal } from 'antd';\nimport classNames from 'classnames';\nimport { VirtualScrollbar } from '../../../VirtualScrollbar';\nimport styles from './ActionFollowModal.module.scss';\n\nexport type ActionFollowView = 'follow' | 'review' | 'cancelled';\n\nexport type ActionFollowModalProps = {\n open: boolean;\n title: string;\n onClose: () => void;\n loading?: boolean;\n saving?: boolean;\n view: ActionFollowView;\n /** 摘要区(App 注入 ActionFollowSummary 等) */\n summarySlot: ReactNode;\n /** 告警处置等扩展(可选) */\n dispositionSlot?: ReactNode;\n /** 表单字段区(跟进/复核);cancelled 忽略 */\n formSlot?: ReactNode;\n formData?: Record<string, unknown>;\n formKey?: string;\n onSubmit?: (values: Record<string, unknown>, mode: 'follow' | 'complete') => Promise<void>;\n width?: number;\n className?: string;\n};\n\n/**\n * 行动跟进弹层壳:布局 + 页脚;业务摘要/表单/API 由 App 注入。\n * 可控 HTML 展示须经 sanitizeActionHtml(F3)。\n */\nconst ActionFollowModal: React.FC<ActionFollowModalProps> = ({\n open,\n title,\n onClose,\n loading,\n saving,\n view,\n summarySlot,\n dispositionSlot,\n formSlot,\n formData = {},\n formKey = 'follow',\n onSubmit,\n width = 720,\n className,\n}) => {\n const [submitMode, setSubmitMode] = useState<'follow' | 'complete'>('follow');\n const busy = Boolean(saving || loading);\n const isCancelled = view === 'cancelled';\n const isReview = view === 'review';\n\n const scrollBody = (\n <VirtualScrollbar\n className={classNames('actions-follow-modal-scroll', styles['actions-follow-modal-scroll'])}\n wrapperClassName={styles['actions-follow-modal-scroll-wrap']}\n >\n <div className={classNames('actions-follow-modal-body', styles['actions-follow-modal-body'])}>\n {summarySlot}\n {dispositionSlot}\n {!isCancelled ? formSlot : null}\n </div>\n </VirtualScrollbar>\n );\n\n const footer = (\n <div\n className={classNames('actions-follow-modal-footer', styles['actions-follow-modal-footer'])}\n >\n {isCancelled ? (\n <Button type=\"primary\" onClick={onClose}>\n 关闭\n </Button>\n ) : (\n <>\n <Button onClick={onClose} disabled={busy}>\n 取消\n </Button>\n {isReview ? (\n <SubmitButton\n type=\"primary\"\n loading={busy}\n onMouseDown={() => setSubmitMode('complete')}\n >\n 保存备注\n </SubmitButton>\n ) : (\n <>\n <SubmitButton\n type=\"default\"\n loading={busy}\n onMouseDown={() => setSubmitMode('follow')}\n >\n 跟进\n </SubmitButton>\n <SubmitButton\n type=\"primary\"\n loading={busy}\n onMouseDown={() => setSubmitMode('complete')}\n >\n 提交并完成\n </SubmitButton>\n </>\n )}\n </>\n )}\n </div>\n );\n\n return (\n <Modal\n className={classNames('actions-follow-modal', styles['actions-follow-modal'], className)}\n title={title}\n open={open}\n onCancel={onClose}\n width={width}\n centered\n destroyOnHidden\n footer={null}\n >\n {isCancelled ? (\n <>\n {scrollBody}\n {footer}\n </>\n ) : (\n <Form\n key={formKey}\n data={formData}\n onSubmit={async (values: Record<string, unknown>) => {\n await onSubmit?.(values, submitMode);\n }}\n >\n {scrollBody}\n {footer}\n </Form>\n )}\n </Modal>\n );\n};\n\nexport default ActionFollowModal;\n"],"names":["ActionFollowModal","open","title","onClose","loading","saving","view","summarySlot","dispositionSlot","formSlot","formData","formKey","onSubmit","width","className","submitMode","setSubmitMode","useState","busy","isCancelled","isReview","scrollBody","jsx","VirtualScrollbar","classNames","styles","jsxs","footer","Button","Fragment","SubmitButton","Modal","Form","values"],"mappings":";;;;;;;;AAiCA,MAAMA,IAAsD,CAAC;AAAA,EAC3D,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,QAAAC;AAAA,EACA,MAAAC;AAAA,EACA,aAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC,IAAW,CAAA;AAAA,EACX,SAAAC,IAAU;AAAA,EACV,UAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,WAAAC;AACF,MAAM;AACJ,QAAM,CAACC,GAAYC,CAAa,IAAIC,EAAgC,QAAQ,GACtEC,IAAO,GAAQb,KAAUD,IACzBe,IAAcb,MAAS,aACvBc,IAAWd,MAAS,UAEpBe,IACJ,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAW,+BAA+BC,EAAO,6BAA6B,CAAC;AAAA,MAC1F,kBAAkBA,EAAO,kCAAkC;AAAA,MAE3D,UAAA,gBAAAC,EAAC,SAAI,WAAWF,EAAW,6BAA6BC,EAAO,2BAA2B,CAAC,GACxF,UAAA;AAAA,QAAAlB;AAAA,QACAC;AAAA,QACCW,IAAyB,OAAXV;AAAA,MAAW,EAAA,CAC7B;AAAA,IAAA;AAAA,EAAA,GAIEkB,IACJ,gBAAAL;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWE,EAAW,+BAA+BC,EAAO,6BAA6B,CAAC;AAAA,MAEzF,UAAAN,sBACES,GAAA,EAAO,MAAK,WAAU,SAASzB,GAAS,UAAA,KAAA,CAEzC,IAEA,gBAAAuB,EAAAG,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAP,EAACM,GAAA,EAAO,SAASzB,GAAS,UAAUe,GAAM,UAAA,MAE1C;AAAA,QACCE,IACC,gBAAAE;AAAA,UAACQ;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,SAASZ;AAAA,YACT,aAAa,MAAMF,EAAc,UAAU;AAAA,YAC5C,UAAA;AAAA,UAAA;AAAA,QAAA,IAID,gBAAAU,EAAAG,GAAA,EACE,UAAA;AAAA,UAAA,gBAAAP;AAAA,YAACQ;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,SAASZ;AAAA,cACT,aAAa,MAAMF,EAAc,QAAQ;AAAA,cAC1C,UAAA;AAAA,YAAA;AAAA,UAAA;AAAA,UAGD,gBAAAM;AAAA,YAACQ;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,SAASZ;AAAA,cACT,aAAa,MAAMF,EAAc,UAAU;AAAA,cAC5C,UAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QAED,EAAA,CACF;AAAA,MAAA,EAAA,CAEJ;AAAA,IAAA;AAAA,EAAA;AAKN,SACE,gBAAAM;AAAA,IAACS;AAAA,IAAA;AAAA,MACC,WAAWP,EAAW,wBAAwBC,EAAO,sBAAsB,GAAGX,CAAS;AAAA,MACvF,OAAAZ;AAAA,MACA,MAAAD;AAAA,MACA,UAAUE;AAAA,MACV,OAAAU;AAAA,MACA,UAAQ;AAAA,MACR,iBAAe;AAAA,MACf,QAAQ;AAAA,MAEP,cACC,gBAAAa,EAAAG,GAAA,EACG,UAAA;AAAA,QAAAR;AAAA,QACAM;AAAA,MAAA,EAAA,CACH,IAEA,gBAAAD;AAAA,QAACM;AAAA,QAAA;AAAA,UAEC,MAAMtB;AAAA,UACN,UAAU,OAAOuB,MAAoC;AACnD,mBAAMrB,KAAA,gBAAAA,EAAWqB,GAAQlB;AAAA,UAC3B;AAAA,UAEC,UAAA;AAAA,YAAAM;AAAA,YACAM;AAAA,UAAA;AAAA,QAAA;AAAA,QAPIhB;AAAA,MAAA;AAAA,IAQP;AAAA,EAAA;AAIR;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const o = {
|
|
2
|
+
"actions-follow-modal": "_actions-follow-modal_klxkn_1",
|
|
3
|
+
"actions-follow-modal-scroll-wrap": "_actions-follow-modal-scroll-wrap_klxkn_6",
|
|
4
|
+
"actions-follow-modal-scroll": "_actions-follow-modal-scroll_klxkn_6",
|
|
5
|
+
"actions-follow-modal-body": "_actions-follow-modal-body_klxkn_21",
|
|
6
|
+
"actions-follow-modal-footer": "_actions-follow-modal-footer_klxkn_58"
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
o as default
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=ActionFollowModal.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionFollowModal.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { FilterValue } from '../../../ReactFilter';
|
|
3
|
+
export type ActionFilterBarProps = {
|
|
4
|
+
value: FilterValue;
|
|
5
|
+
onChange: (next: FilterValue) => void;
|
|
6
|
+
/** ReactFilter list 配置(App 注入选项/标签) */
|
|
7
|
+
list: unknown;
|
|
8
|
+
label?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
/**
|
|
11
|
+
* F1:当前筛选是否可查(通常 = canQueryActionList)。
|
|
12
|
+
* false 时展示 hint,不拦 onChange(由 App 在 load 前拒扫)。
|
|
13
|
+
*/
|
|
14
|
+
canQuery?: boolean;
|
|
15
|
+
/** !canQuery 时提示(默认文案) */
|
|
16
|
+
queryBlockedHint?: ReactNode;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* 行动列表筛选壳:Filter + canQuery 提示钩子。
|
|
20
|
+
* 字段选项 / 默认窗逻辑由 App 注入;core 禁写死业务码表。
|
|
21
|
+
*/
|
|
22
|
+
declare const ActionFilterBar: React.FC<ActionFilterBarProps>;
|
|
23
|
+
export default ActionFilterBar;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsxs as m, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import t from "classnames";
|
|
3
|
+
import i from "./ActionFilterBar.module.scss.js";
|
|
4
|
+
import "../../../ReactFilter/entry.js";
|
|
5
|
+
import f from "../../../ReactFilter/Filter.js";
|
|
6
|
+
const u = f, y = ({
|
|
7
|
+
value: e,
|
|
8
|
+
onChange: a,
|
|
9
|
+
list: o,
|
|
10
|
+
label: l = "筛选",
|
|
11
|
+
className: s,
|
|
12
|
+
canQuery: c = !0,
|
|
13
|
+
queryBlockedHint: n
|
|
14
|
+
}) => /* @__PURE__ */ m("div", { className: t("action-filter-bar", i["action-filter-bar"], s), children: [
|
|
15
|
+
/* @__PURE__ */ r(u, { label: l, value: e, onChange: a, list: o }),
|
|
16
|
+
c ? null : /* @__PURE__ */ r(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
className: t(
|
|
20
|
+
"action-filter-bar-query-hint",
|
|
21
|
+
i["action-filter-bar-query-hint"]
|
|
22
|
+
),
|
|
23
|
+
role: "status",
|
|
24
|
+
children: n ?? "请保留创建时间范围后再查询(禁止无条件扫全表)"
|
|
25
|
+
}
|
|
26
|
+
)
|
|
27
|
+
] });
|
|
28
|
+
export {
|
|
29
|
+
y as default
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=ActionFilterBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionFilterBar.js","sources":["../../../../../src/components/Tools/ActionTracking/List/ActionFilterBar.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport type { ComponentType, ReactNode } from 'react';\nimport Filter from '../../../ReactFilter';\nimport type { FilterValue } from '../../../ReactFilter';\nimport styles from './ActionFilterBar.module.scss';\n\nexport type ActionFilterBarProps = {\n value: FilterValue;\n onChange: (next: FilterValue) => void;\n /** ReactFilter list 配置(App 注入选项/标签) */\n list: unknown;\n label?: string;\n className?: string;\n /**\n * F1:当前筛选是否可查(通常 = canQueryActionList)。\n * false 时展示 hint,不拦 onChange(由 App 在 load 前拒扫)。\n */\n canQuery?: boolean;\n /** !canQuery 时提示(默认文案) */\n queryBlockedHint?: ReactNode;\n};\n\nconst ReactFilterBar = Filter as ComponentType<{\n value: FilterValue;\n onChange: (next: FilterValue) => void;\n list: unknown;\n label?: string;\n}>;\n\n/**\n * 行动列表筛选壳:Filter + canQuery 提示钩子。\n * 字段选项 / 默认窗逻辑由 App 注入;core 禁写死业务码表。\n */\nconst ActionFilterBar: React.FC<ActionFilterBarProps> = ({\n value,\n onChange,\n list,\n label = '筛选',\n className,\n canQuery = true,\n queryBlockedHint,\n}) => {\n return (\n <div className={classNames('action-filter-bar', styles['action-filter-bar'], className)}>\n <ReactFilterBar label={label} value={value} onChange={onChange} list={list} />\n {!canQuery ? (\n <div\n className={classNames(\n 'action-filter-bar-query-hint',\n styles['action-filter-bar-query-hint'],\n )}\n role=\"status\"\n >\n {queryBlockedHint ?? '请保留创建时间范围后再查询(禁止无条件扫全表)'}\n </div>\n ) : null}\n </div>\n );\n};\n\nexport default ActionFilterBar;\n"],"names":["ReactFilterBar","Filter","ActionFilterBar","value","onChange","list","label","className","canQuery","queryBlockedHint","jsxs","classNames","styles","jsx"],"mappings":";;;;;AAsBA,MAAMA,IAAiBC,GAWjBC,IAAkD,CAAC;AAAA,EACvD,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,WAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,kBAAAC;AACF,MAEI,gBAAAC,EAAC,SAAI,WAAWC,EAAW,qBAAqBC,EAAO,mBAAmB,GAAGL,CAAS,GACpF,UAAA;AAAA,EAAA,gBAAAM,EAACb,GAAA,EAAe,OAAAM,GAAc,OAAAH,GAAc,UAAAC,GAAoB,MAAAC,GAAY;AAAA,EAC1EG,IAUE,OATF,gBAAAK;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWF;AAAA,QACT;AAAA,QACAC,EAAO,8BAA8B;AAAA,MAAA;AAAA,MAEvC,MAAK;AAAA,MAEJ,UAAAH,KAAoB;AAAA,IAAA;AAAA,EAAA;AAErB,GACN;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionFilterBar.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Table, TableColumnConfigFetcher, TableColumnConfigSaver } from '../../../Table';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { ActionListColumns, ActionListRowBase } from './listTypes';
|
|
4
|
+
export type ActionListTableProps<T extends ActionListRowBase = ActionListRowBase> = {
|
|
5
|
+
loading: boolean;
|
|
6
|
+
items: T[];
|
|
7
|
+
columns: ActionListColumns<T> | never[];
|
|
8
|
+
total: number;
|
|
9
|
+
currentPage: number;
|
|
10
|
+
pageSize: number;
|
|
11
|
+
onPageChange: (page: number, pageSize: number) => void;
|
|
12
|
+
/** 业务列表必填;列配置偏好 key */
|
|
13
|
+
tableName: string;
|
|
14
|
+
fetchColumnConfig?: TableColumnConfigFetcher;
|
|
15
|
+
saveColumnConfig?: TableColumnConfigSaver;
|
|
16
|
+
scrollX?: number;
|
|
17
|
+
emptyText?: ReactNode;
|
|
18
|
+
emptyIcon?: ReactNode;
|
|
19
|
+
className?: string;
|
|
20
|
+
wrapperClassName?: string;
|
|
21
|
+
pageSizeOptions?: string[];
|
|
22
|
+
/** antd Table components(如列宽拖拽) */
|
|
23
|
+
components?: React.ComponentProps<typeof Table>['components'];
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* 行动列表 Table 壳:VirtualScrollbar + core Table;列与行操作由 App 注入。
|
|
27
|
+
*/
|
|
28
|
+
declare function ActionListTable<T extends ActionListRowBase>({ loading, items, columns, total, currentPage, pageSize, onPageChange, tableName, fetchColumnConfig, saveColumnConfig, scrollX, emptyText, emptyIcon, className, wrapperClassName, pageSizeOptions, components, }: ActionListTableProps<T>): import("react").JSX.Element;
|
|
29
|
+
export default ActionListTable;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { jsx as r, jsxs as S } from "react/jsx-runtime";
|
|
2
|
+
import { Space as y } from "antd";
|
|
3
|
+
import o from "classnames";
|
|
4
|
+
import a from "./ActionListTable.module.scss.js";
|
|
5
|
+
import z from "../../../VirtualScrollbar/VirtualScrollbar/index.js";
|
|
6
|
+
import C from "../../../Table/Table.js";
|
|
7
|
+
import { ListTodo as N } from "../../../Icons/ListTodo.js";
|
|
8
|
+
function W({
|
|
9
|
+
loading: e,
|
|
10
|
+
items: i,
|
|
11
|
+
columns: l,
|
|
12
|
+
total: s,
|
|
13
|
+
currentPage: c,
|
|
14
|
+
pageSize: n,
|
|
15
|
+
onPageChange: m,
|
|
16
|
+
tableName: p,
|
|
17
|
+
fetchColumnConfig: d,
|
|
18
|
+
saveColumnConfig: f,
|
|
19
|
+
scrollX: h = 1560,
|
|
20
|
+
emptyText: b = "暂无跟踪任务,可点击「新建任务」主动添加",
|
|
21
|
+
emptyIcon: u,
|
|
22
|
+
className: x,
|
|
23
|
+
wrapperClassName: T,
|
|
24
|
+
pageSizeOptions: g = ["10", "20", "30", "50", "100"],
|
|
25
|
+
components: w
|
|
26
|
+
}) {
|
|
27
|
+
return /* @__PURE__ */ r(
|
|
28
|
+
z,
|
|
29
|
+
{
|
|
30
|
+
className: o(
|
|
31
|
+
"action-list-table-scroll",
|
|
32
|
+
a["action-list-table-scroll"],
|
|
33
|
+
x
|
|
34
|
+
),
|
|
35
|
+
wrapperClassName: o(
|
|
36
|
+
"action-list-table-card",
|
|
37
|
+
a["action-list-table-card"],
|
|
38
|
+
T
|
|
39
|
+
),
|
|
40
|
+
children: /* @__PURE__ */ r(
|
|
41
|
+
C,
|
|
42
|
+
{
|
|
43
|
+
size: "small",
|
|
44
|
+
rowKey: (t) => t.id,
|
|
45
|
+
loading: e,
|
|
46
|
+
columns: l,
|
|
47
|
+
dataSource: i,
|
|
48
|
+
scroll: { x: h },
|
|
49
|
+
tableName: p,
|
|
50
|
+
fetchColumnConfig: d,
|
|
51
|
+
saveColumnConfig: f,
|
|
52
|
+
components: w,
|
|
53
|
+
pagination: {
|
|
54
|
+
current: c,
|
|
55
|
+
pageSize: n,
|
|
56
|
+
total: s,
|
|
57
|
+
showSizeChanger: !0,
|
|
58
|
+
pageSizeOptions: g,
|
|
59
|
+
showTotal: (t) => `共 ${t} 条`,
|
|
60
|
+
onChange: m
|
|
61
|
+
},
|
|
62
|
+
locale: {
|
|
63
|
+
emptyText: /* @__PURE__ */ S(y, { direction: "vertical", align: "center", children: [
|
|
64
|
+
u ?? /* @__PURE__ */ r(N, { size: 28, strokeWidth: 1.5 }),
|
|
65
|
+
/* @__PURE__ */ r("span", { children: b })
|
|
66
|
+
] })
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
export {
|
|
74
|
+
W as default
|
|
75
|
+
};
|
|
76
|
+
//# sourceMappingURL=ActionListTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionListTable.js","sources":["../../../../../src/components/Tools/ActionTracking/List/ActionListTable.tsx"],"sourcesContent":["import { Table } from '../../../Table';\nimport type { TableColumnConfigFetcher, TableColumnConfigSaver } from '../../../Table';\nimport { VirtualScrollbar } from '../../../VirtualScrollbar';\nimport { ListTodo } from '../../../Icons';\nimport { Space } from 'antd';\nimport classNames from 'classnames';\nimport type { ReactNode } from 'react';\nimport type { ActionListColumns, ActionListRowBase } from './listTypes';\nimport styles from './ActionListTable.module.scss';\n\nexport type ActionListTableProps<T extends ActionListRowBase = ActionListRowBase> = {\n loading: boolean;\n items: T[];\n columns: ActionListColumns<T> | never[];\n total: number;\n currentPage: number;\n pageSize: number;\n onPageChange: (page: number, pageSize: number) => void;\n /** 业务列表必填;列配置偏好 key */\n tableName: string;\n fetchColumnConfig?: TableColumnConfigFetcher;\n saveColumnConfig?: TableColumnConfigSaver;\n scrollX?: number;\n emptyText?: ReactNode;\n emptyIcon?: ReactNode;\n className?: string;\n wrapperClassName?: string;\n pageSizeOptions?: string[];\n /** antd Table components(如列宽拖拽) */\n components?: React.ComponentProps<typeof Table>['components'];\n};\n\n/**\n * 行动列表 Table 壳:VirtualScrollbar + core Table;列与行操作由 App 注入。\n */\nfunction ActionListTable<T extends ActionListRowBase>({\n loading,\n items,\n columns,\n total,\n currentPage,\n pageSize,\n onPageChange,\n tableName,\n fetchColumnConfig,\n saveColumnConfig,\n scrollX = 1560,\n emptyText = '暂无跟踪任务,可点击「新建任务」主动添加',\n emptyIcon,\n className,\n wrapperClassName,\n pageSizeOptions = ['10', '20', '30', '50', '100'],\n components,\n}: ActionListTableProps<T>) {\n return (\n <VirtualScrollbar\n className={classNames(\n 'action-list-table-scroll',\n styles['action-list-table-scroll'],\n className,\n )}\n wrapperClassName={classNames(\n 'action-list-table-card',\n styles['action-list-table-card'],\n wrapperClassName,\n )}\n >\n <Table<T>\n size=\"small\"\n rowKey={(r) => r.id}\n loading={loading}\n columns={columns as never}\n dataSource={items}\n scroll={{ x: scrollX }}\n tableName={tableName}\n fetchColumnConfig={fetchColumnConfig}\n saveColumnConfig={saveColumnConfig}\n components={components}\n pagination={{\n current: currentPage,\n pageSize,\n total,\n showSizeChanger: true,\n pageSizeOptions,\n showTotal: (n) => `共 ${n} 条`,\n onChange: onPageChange,\n }}\n locale={{\n emptyText: (\n <Space direction=\"vertical\" align=\"center\">\n {emptyIcon ?? <ListTodo size={28} strokeWidth={1.5} />}\n <span>{emptyText}</span>\n </Space>\n ),\n }}\n />\n </VirtualScrollbar>\n );\n}\n\nexport default ActionListTable;\n"],"names":["ActionListTable","loading","items","columns","total","currentPage","pageSize","onPageChange","tableName","fetchColumnConfig","saveColumnConfig","scrollX","emptyText","emptyIcon","className","wrapperClassName","pageSizeOptions","components","jsx","VirtualScrollbar","classNames","styles","Table","r","n","jsxs","Space","ListTodo"],"mappings":";;;;;;;AAmCA,SAASA,EAA6C;AAAA,EACpD,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,cAAAC;AAAA,EACA,WAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,WAAAC,IAAY;AAAA,EACZ,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,iBAAAC,IAAkB,CAAC,MAAM,MAAM,MAAM,MAAM,KAAK;AAAA,EAChD,YAAAC;AACF,GAA4B;AAC1B,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACT;AAAA,QACAC,EAAO,0BAA0B;AAAA,QACjCP;AAAA,MAAA;AAAA,MAEF,kBAAkBM;AAAA,QAChB;AAAA,QACAC,EAAO,wBAAwB;AAAA,QAC/BN;AAAA,MAAA;AAAA,MAGF,UAAA,gBAAAG;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,QAAQ,CAACC,MAAMA,EAAE;AAAA,UACjB,SAAAtB;AAAA,UACA,SAAAE;AAAA,UACA,YAAYD;AAAA,UACZ,QAAQ,EAAE,GAAGS,EAAA;AAAA,UACb,WAAAH;AAAA,UACA,mBAAAC;AAAA,UACA,kBAAAC;AAAA,UACA,YAAAO;AAAA,UACA,YAAY;AAAA,YACV,SAASZ;AAAA,YACT,UAAAC;AAAA,YACA,OAAAF;AAAA,YACA,iBAAiB;AAAA,YACjB,iBAAAY;AAAA,YACA,WAAW,CAACQ,MAAM,KAAKA,CAAC;AAAA,YACxB,UAAUjB;AAAA,UAAA;AAAA,UAEZ,QAAQ;AAAA,YACN,WACE,gBAAAkB,EAACC,GAAA,EAAM,WAAU,YAAW,OAAM,UAC/B,UAAA;AAAA,cAAAb,KAAa,gBAAAK,EAACS,GAAA,EAAS,MAAM,IAAI,aAAa,KAAK;AAAA,cACpD,gBAAAT,EAAC,UAAM,UAAAN,EAAA,CAAU;AAAA,YAAA,EAAA,CACnB;AAAA,UAAA;AAAA,QAEJ;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionListTable.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ActionListFilters } from './listTypes';
|
|
2
|
+
/**
|
|
3
|
+
* 默认可查窗:近 N 天创建时间(含今天;EAM/S3 D10 = 30)。
|
|
4
|
+
* F1:列表请求须带此窗,禁无条件扫全表。
|
|
5
|
+
*/
|
|
6
|
+
export declare function defaultCreatedRange(now?: Date, daySpan?: number): Pick<ActionListFilters, 'from' | 'to'>;
|
|
7
|
+
/** 清理空字段 */
|
|
8
|
+
export declare function normalizeActionFilters(raw: ActionListFilters): ActionListFilters;
|
|
9
|
+
/**
|
|
10
|
+
* F1 门禁:须有创建时间 from+to 才可查。
|
|
11
|
+
* 弱条件(仅状态/执行人等)不可单独成门。
|
|
12
|
+
*/
|
|
13
|
+
export declare function canQueryActionList(filters: ActionListFilters): boolean;
|
|
14
|
+
/** 清空后回落到默认窗(禁 `{}` 全表) */
|
|
15
|
+
export declare function resetActionFiltersToDefault(now?: Date, daySpan?: number): ActionListFilters;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
function o(t) {
|
|
2
|
+
const e = t.getFullYear(), n = String(t.getMonth() + 1).padStart(2, "0"), r = String(t.getDate()).padStart(2, "0");
|
|
3
|
+
return `${e}-${n}-${r}`;
|
|
4
|
+
}
|
|
5
|
+
function a(t = /* @__PURE__ */ new Date(), e = 30) {
|
|
6
|
+
const n = new Date(t.getFullYear(), t.getMonth(), t.getDate()), r = new Date(n);
|
|
7
|
+
return r.setDate(r.getDate() - Math.max(1, e) + 1), { from: o(r), to: o(n) };
|
|
8
|
+
}
|
|
9
|
+
function i(t) {
|
|
10
|
+
const e = { ...t };
|
|
11
|
+
return Object.keys(e).forEach((n) => {
|
|
12
|
+
e[n] || delete e[n];
|
|
13
|
+
}), e;
|
|
14
|
+
}
|
|
15
|
+
function c(t) {
|
|
16
|
+
return !!(String(t.from || "").trim() && String(t.to || "").trim());
|
|
17
|
+
}
|
|
18
|
+
function u(t = /* @__PURE__ */ new Date(), e = 30) {
|
|
19
|
+
return i(a(t, e));
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
c as canQueryActionList,
|
|
23
|
+
a as defaultCreatedRange,
|
|
24
|
+
i as normalizeActionFilters,
|
|
25
|
+
u as resetActionFiltersToDefault
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=filterDefaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filterDefaults.js","sources":["../../../../../src/components/Tools/ActionTracking/List/filterDefaults.ts"],"sourcesContent":["import type { ActionListFilters } from './listTypes';\n\nfunction fmtYmd(d: Date): string {\n const y = d.getFullYear();\n const m = String(d.getMonth() + 1).padStart(2, '0');\n const day = String(d.getDate()).padStart(2, '0');\n return `${y}-${m}-${day}`;\n}\n\n/**\n * 默认可查窗:近 N 天创建时间(含今天;EAM/S3 D10 = 30)。\n * F1:列表请求须带此窗,禁无条件扫全表。\n */\nexport function defaultCreatedRange(\n now = new Date(),\n daySpan = 30,\n): Pick<ActionListFilters, 'from' | 'to'> {\n const to = new Date(now.getFullYear(), now.getMonth(), now.getDate());\n const from = new Date(to);\n from.setDate(from.getDate() - Math.max(1, daySpan) + 1);\n return { from: fmtYmd(from), to: fmtYmd(to) };\n}\n\n/** 清理空字段 */\nexport function normalizeActionFilters(raw: ActionListFilters): ActionListFilters {\n const next: ActionListFilters = { ...raw };\n (Object.keys(next) as (keyof ActionListFilters)[]).forEach((k) => {\n if (!next[k]) delete next[k];\n });\n return next;\n}\n\n/**\n * F1 门禁:须有创建时间 from+to 才可查。\n * 弱条件(仅状态/执行人等)不可单独成门。\n */\nexport function canQueryActionList(filters: ActionListFilters): boolean {\n return Boolean(String(filters.from || '').trim() && String(filters.to || '').trim());\n}\n\n/** 清空后回落到默认窗(禁 `{}` 全表) */\nexport function resetActionFiltersToDefault(now = new Date(), daySpan = 30): ActionListFilters {\n return normalizeActionFilters(defaultCreatedRange(now, daySpan));\n}\n"],"names":["fmtYmd","d","y","m","day","defaultCreatedRange","now","daySpan","to","from","normalizeActionFilters","raw","next","k","canQueryActionList","filters","resetActionFiltersToDefault"],"mappings":"AAEA,SAASA,EAAOC,GAAiB;AAC/B,QAAMC,IAAID,EAAE,YAAA,GACNE,IAAI,OAAOF,EAAE,SAAA,IAAa,CAAC,EAAE,SAAS,GAAG,GAAG,GAC5CG,IAAM,OAAOH,EAAE,QAAA,CAAS,EAAE,SAAS,GAAG,GAAG;AAC/C,SAAO,GAAGC,CAAC,IAAIC,CAAC,IAAIC,CAAG;AACzB;AAMO,SAASC,EACdC,IAAM,oBAAI,KAAA,GACVC,IAAU,IAC8B;AACxC,QAAMC,IAAK,IAAI,KAAKF,EAAI,YAAA,GAAeA,EAAI,SAAA,GAAYA,EAAI,SAAS,GAC9DG,IAAO,IAAI,KAAKD,CAAE;AACxB,SAAAC,EAAK,QAAQA,EAAK,QAAA,IAAY,KAAK,IAAI,GAAGF,CAAO,IAAI,CAAC,GAC/C,EAAE,MAAMP,EAAOS,CAAI,GAAG,IAAIT,EAAOQ,CAAE,EAAA;AAC5C;AAGO,SAASE,EAAuBC,GAA2C;AAChF,QAAMC,IAA0B,EAAE,GAAGD,EAAA;AACpC,gBAAO,KAAKC,CAAI,EAAkC,QAAQ,CAACC,MAAM;AAChE,IAAKD,EAAKC,CAAC,KAAG,OAAOD,EAAKC,CAAC;AAAA,EAC7B,CAAC,GACMD;AACT;AAMO,SAASE,EAAmBC,GAAqC;AACtE,SAAO,GAAQ,OAAOA,EAAQ,QAAQ,EAAE,EAAE,UAAU,OAAOA,EAAQ,MAAM,EAAE,EAAE;AAC/E;AAGO,SAASC,EAA4BV,IAAM,oBAAI,KAAA,GAAQC,IAAU,IAAuB;AAC7F,SAAOG,EAAuBL,EAAoBC,GAAKC,CAAO,CAAC;AACjE;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as ActionFilterBar } from './ActionFilterBar';
|
|
2
|
+
export type { ActionFilterBarProps } from './ActionFilterBar';
|
|
3
|
+
export { default as ActionListTable } from './ActionListTable';
|
|
4
|
+
export type { ActionListTableProps } from './ActionListTable';
|
|
5
|
+
export { defaultCreatedRange, normalizeActionFilters, canQueryActionList, resetActionFiltersToDefault, } from './filterDefaults';
|
|
6
|
+
export type { ActionListFilters, ActionListRowBase, ActionListSelectOption, ActionListColumns, ActionListEmptyConfig, } from './listTypes';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ColumnsType } from 'antd/es/table';
|
|
3
|
+
/** 行动列表筛选(App 可扩展字段;core 认 created 窗作 canQuery) */
|
|
4
|
+
export type ActionListFilters = {
|
|
5
|
+
dimension?: string;
|
|
6
|
+
status?: string;
|
|
7
|
+
assignee?: string;
|
|
8
|
+
factory?: string;
|
|
9
|
+
q?: string;
|
|
10
|
+
from?: string;
|
|
11
|
+
to?: string;
|
|
12
|
+
startedFrom?: string;
|
|
13
|
+
startedTo?: string;
|
|
14
|
+
completedFrom?: string;
|
|
15
|
+
completedTo?: string;
|
|
16
|
+
};
|
|
17
|
+
/** 列表行最小字段(列 render 由 App 注入) */
|
|
18
|
+
export type ActionListRowBase = {
|
|
19
|
+
id: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
status?: string;
|
|
22
|
+
dimension?: string;
|
|
23
|
+
assignee?: string;
|
|
24
|
+
owner?: string;
|
|
25
|
+
createdAt?: string;
|
|
26
|
+
startedAt?: string;
|
|
27
|
+
completedAt?: string;
|
|
28
|
+
cancelReason?: string;
|
|
29
|
+
factory?: string;
|
|
30
|
+
factoryCode?: string;
|
|
31
|
+
factoryName?: string;
|
|
32
|
+
variety?: string;
|
|
33
|
+
materialName?: string;
|
|
34
|
+
machine?: string;
|
|
35
|
+
machineName?: string;
|
|
36
|
+
metric?: string;
|
|
37
|
+
metricCode?: string;
|
|
38
|
+
metricName?: string;
|
|
39
|
+
verifyMetric?: string;
|
|
40
|
+
};
|
|
41
|
+
export type ActionListSelectOption = {
|
|
42
|
+
value: string;
|
|
43
|
+
label: string;
|
|
44
|
+
};
|
|
45
|
+
export type ActionListColumns<T extends ActionListRowBase = ActionListRowBase> = ColumnsType<T> | readonly unknown[];
|
|
46
|
+
export type ActionListEmptyConfig = {
|
|
47
|
+
icon?: ReactNode;
|
|
48
|
+
text?: ReactNode;
|
|
49
|
+
};
|
package/dist/components/Tools/ActionTracking/{ActionTrackingShell.js → Shell/ActionTrackingShell.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as l } from "react/jsx-runtime";
|
|
2
2
|
import d from "classnames";
|
|
3
|
-
import f from "
|
|
3
|
+
import f from "../../../Layout/ModulePageShell/index.js";
|
|
4
4
|
import g from "./style.module.scss.js";
|
|
5
5
|
const S = ({
|
|
6
6
|
title: r = "行动跟踪",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ActionTrackingShell.js","sources":["../../../../../src/components/Tools/ActionTracking/Shell/ActionTrackingShell.tsx"],"sourcesContent":["import classNames from 'classnames';\nimport type { ReactNode } from 'react';\nimport ModulePageShell, { type ModulePageShellProps } from '../../../Layout/ModulePageShell';\nimport type { PageShellActionItem } from '../../../Layout/PageShell';\nimport styles from './style.module.scss';\n\nexport type ActionTrackingShellProps = {\n title?: string;\n description?: ReactNode;\n /** 顶栏操作(如「新建任务」);权限由 App 决定是否传入 */\n actions?: PageShellActionItem[];\n spinning?: boolean;\n /** 筛选条(App 注入) */\n filterSlot?: ReactNode;\n /** 列表+分页(App 注入;含行执行闭环钮) */\n listSlot?: ReactNode;\n /** 告警处置等扩展槽(可选;S3 可空) */\n dispositionSlot?: ReactNode;\n /** 弹层:新建/跟进/取消等 */\n modalSlot?: ReactNode;\n className?: string;\n bodyClassName?: string;\n syncPageMeta?: boolean;\n fillHeight?: boolean;\n};\n\n/**\n * 行动跟踪页壳(D8):布局 + 注入点;权限码 / 筛选项 / 列 / 处置 / API 均由 App 注入。\n * 告警处置与执行闭环分型由 App 遵守;壳不内置认领逻辑。\n */\nconst ActionTrackingShell: React.FC<ActionTrackingShellProps> = ({\n title = '行动跟踪',\n description,\n actions,\n spinning,\n filterSlot,\n listSlot,\n dispositionSlot,\n modalSlot,\n className,\n bodyClassName,\n syncPageMeta,\n fillHeight,\n}) => {\n const shellProps: ModulePageShellProps = {\n title,\n description,\n actions,\n spinning,\n syncPageMeta,\n fillHeight,\n bodyClassName,\n };\n\n return (\n <ModulePageShell {...shellProps}>\n <div\n className={classNames('action-tracking-shell', styles['action-tracking-shell'], className)}\n >\n {filterSlot}\n {dispositionSlot}\n {listSlot}\n </div>\n {modalSlot}\n </ModulePageShell>\n );\n};\n\nexport default ActionTrackingShell;\n"],"names":["ActionTrackingShell","title","description","actions","spinning","filterSlot","listSlot","dispositionSlot","modalSlot","className","bodyClassName","syncPageMeta","fillHeight","jsxs","ModulePageShell","classNames","styles"],"mappings":";;;;AA8BA,MAAMA,IAA0D,CAAC;AAAA,EAC/D,OAAAC,IAAQ;AAAA,EACR,aAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,cAAAC;AAAA,EACA,YAAAC;AACF,MAYI,gBAAAC,EAACC,GAAA,EAAiB,GAXqB;AAAA,EACvC,OAAAb;AAAA,EACA,aAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AAAA,EACA,cAAAO;AAAA,EACA,YAAAC;AAAA,EACA,eAAAF;AAAA,GAKE,UAAA;AAAA,EAAA,gBAAAG;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWE,EAAW,yBAAyBC,EAAO,uBAAuB,GAAGP,CAAS;AAAA,MAExF,UAAA;AAAA,QAAAJ;AAAA,QACAE;AAAA,QACAD;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAAA,EAEFE;AAAA,GACH;"}
|