sy-form-components 0.2.8 → 0.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -95,6 +95,7 @@ __export(index_exports, {
95
95
  defineFormSchema: () => defineFormSchema,
96
96
  deleteDataManagementRows: () => deleteDataManagementRows,
97
97
  deleteFormData: () => deleteFormData,
98
+ downloadDataManagementImportTemplate: () => downloadDataManagementImportTemplate,
98
99
  evaluateEffects: () => evaluateEffects,
99
100
  exportDataManagementRows: () => exportDataManagementRows,
100
101
  extractFormValues: () => extractFormValues,
@@ -6893,6 +6894,38 @@ var normalizeField = (key, field, system = false) => ({
6893
6894
  width: field?.width,
6894
6895
  system
6895
6896
  });
6897
+ var SYSTEM_VALUE_ALIASES = {
6898
+ formInstanceId: ["formInstanceId", "formInstId", "form_instance_id", "processInstanceId"],
6899
+ instanceTitle: ["instanceTitle", "instance_title", "processInstanceTitle", "title"],
6900
+ createdBy: ["createdBy", "created_by", "originator"],
6901
+ createdByName: ["createdByName", "created_by_name", "originatorName", "creatorName"],
6902
+ createdByDepartmentId: ["createdByDepartmentId", "created_by_department_id", "originatorCorp"],
6903
+ createdByDepartmentName: [
6904
+ "createdByDepartmentName",
6905
+ "created_by_department_name",
6906
+ "originatorDepartmentName",
6907
+ "originatorCorpName"
6908
+ ],
6909
+ createdAt: ["createdAt", "created_at", "createTime", "gmtCreate"],
6910
+ updatedAt: ["updatedAt", "updated_at", "modifiedTime", "modifyTime", "gmtModified"]
6911
+ };
6912
+ var pickAliasValue = (record, aliases) => {
6913
+ for (const alias of aliases) {
6914
+ const value = record?.[alias];
6915
+ if (value !== void 0 && value !== null && value !== "") return value;
6916
+ }
6917
+ return void 0;
6918
+ };
6919
+ var normalizeDataManagementRecord = (record) => {
6920
+ if (!record || typeof record !== "object" || Array.isArray(record)) return record;
6921
+ const normalized = { ...record };
6922
+ Object.entries(SYSTEM_VALUE_ALIASES).forEach(([targetKey, aliases]) => {
6923
+ if (normalized[targetKey] !== void 0 && normalized[targetKey] !== null) return;
6924
+ const aliasValue = pickAliasValue(record, aliases);
6925
+ if (aliasValue !== void 0) normalized[targetKey] = aliasValue;
6926
+ });
6927
+ return normalized;
6928
+ };
6896
6929
  var PROCESS_INSTANCE_STATUS_OPTIONS = [
6897
6930
  { label: "\u5F85\u5904\u7406", value: "pending" },
6898
6931
  { label: "\u5BA1\u6279\u4E2D", value: "running" },
@@ -6947,15 +6980,29 @@ var PROCESS_SYSTEM_FIELDS = [
6947
6980
  )
6948
6981
  ];
6949
6982
  var BASE_SYSTEM_FIELDS = [
6950
- normalizeField("createTime", { label: "\u521B\u5EFA\u65F6\u95F4", componentName: "DateField", width: 170 }, true),
6951
6983
  normalizeField(
6952
- "modifiedTime",
6953
- { label: "\u66F4\u65B0\u65F6\u95F4", componentName: "DateField", width: 170 },
6984
+ "instanceTitle",
6985
+ { label: "\u5B9E\u4F8B\u6807\u9898", componentName: "TextField", width: 220, displayable: true },
6954
6986
  true
6955
6987
  ),
6956
6988
  normalizeField(
6957
- "originatorName",
6958
- { label: "\u521B\u5EFA\u4EBA", componentName: "TextField", width: 130 },
6989
+ "createdByName",
6990
+ { label: "\u521B\u5EFA\u4EBA", componentName: "TextField", width: 130, displayable: true },
6991
+ true
6992
+ ),
6993
+ normalizeField(
6994
+ "createdByDepartmentName",
6995
+ { label: "\u521B\u5EFA\u4EBA\u90E8\u95E8", componentName: "TextField", width: 150, displayable: true },
6996
+ true
6997
+ ),
6998
+ normalizeField(
6999
+ "createdAt",
7000
+ { label: "\u521B\u5EFA\u65F6\u95F4", componentName: "DateField", width: 170, displayable: true },
7001
+ true
7002
+ ),
7003
+ normalizeField(
7004
+ "updatedAt",
7005
+ { label: "\u66F4\u65B0\u65F6\u95F4", componentName: "DateField", width: 170, displayable: true },
6959
7006
  true
6960
7007
  )
6961
7008
  ];
@@ -6976,7 +7023,7 @@ var normalizeDataManagementList = (payload) => {
6976
7023
  const records = body?.data || body?.records || body?.list || body?.items || [];
6977
7024
  const total = body?.totalCount ?? body?.total ?? body?.count ?? records.length;
6978
7025
  return {
6979
- records: Array.isArray(records) ? records : [],
7026
+ records: Array.isArray(records) ? records.map(normalizeDataManagementRecord) : [],
6980
7027
  total: Number(total) || 0
6981
7028
  };
6982
7029
  };
@@ -6996,7 +7043,9 @@ var buildFilterPayload = (group) => {
6996
7043
  var normalizeColumnConfig = (cfg, fields) => {
6997
7044
  const allowed = new Set(fields.map((field) => field.fieldId));
6998
7045
  const configured = Array.isArray(cfg?.showFields) ? cfg.showFields.filter((fieldId) => allowed.has(fieldId)) : [];
6999
- const defaultShow = fields.filter((field) => !field.system || field.displayable).slice(0, 8).map((field) => field.fieldId);
7046
+ const defaultBusinessFields = fields.filter((field) => !field.system).slice(0, 8).map((field) => field.fieldId);
7047
+ const defaultSystemFields = fields.filter((field) => field.system && field.displayable).map((field) => field.fieldId);
7048
+ const defaultShow = [...defaultBusinessFields, ...defaultSystemFields];
7000
7049
  return {
7001
7050
  showFields: configured.length > 0 ? configured : defaultShow,
7002
7051
  widths: cfg?.widths || {},
@@ -7099,6 +7148,16 @@ async function exportDataManagementRows(request, params) {
7099
7148
  }
7100
7149
  });
7101
7150
  }
7151
+ async function downloadDataManagementImportTemplate(request, params) {
7152
+ return request({
7153
+ url: `/${params.appType}/v1/form/advancedExportTemplate.xlsx`,
7154
+ method: "get",
7155
+ responseType: "blob",
7156
+ params: {
7157
+ formUuid: params.formUuid
7158
+ }
7159
+ });
7160
+ }
7102
7161
  async function importPreviewDataManagementRows(request, params) {
7103
7162
  const response = await request({
7104
7163
  url: `/${params.appType}/v1/form/importPreview.xlsx`,
@@ -7658,8 +7717,14 @@ var import_react49 = require("react");
7658
7717
  var FORM_INSTANCE_METADATA_KEYS = /* @__PURE__ */ new Set([
7659
7718
  "appType",
7660
7719
  "code",
7720
+ "createTime",
7721
+ "created_at",
7661
7722
  "createdAt",
7662
7723
  "createdBy",
7724
+ "created_by",
7725
+ "created_by_department_id",
7726
+ "created_by_department_name",
7727
+ "created_by_name",
7663
7728
  "createdByDepartmentId",
7664
7729
  "createdByDepartmentName",
7665
7730
  "createdByName",
@@ -7671,9 +7736,18 @@ var FORM_INSTANCE_METADATA_KEYS = /* @__PURE__ */ new Set([
7671
7736
  "formUuid",
7672
7737
  "instanceTitle",
7673
7738
  "message",
7739
+ "modifiedTime",
7740
+ "modifyTime",
7741
+ "originator",
7742
+ "originatorCorp",
7743
+ "originatorCorpName",
7744
+ "originatorDepartmentName",
7745
+ "originatorName",
7746
+ "processInstanceTitle",
7674
7747
  "result",
7675
7748
  "success",
7676
7749
  "title",
7750
+ "updated_at",
7677
7751
  "updatedAt"
7678
7752
  ]);
7679
7753
  var isPlainRecord = (value) => Boolean(value) && typeof value === "object" && !Array.isArray(value);
@@ -7720,6 +7794,76 @@ var extractFormValues = (formInstance, fieldIds) => {
7720
7794
  const flatValues = pickKnownFields(formInstance, fieldIds);
7721
7795
  return Object.keys(flatValues).length > 0 ? flatValues : null;
7722
7796
  };
7797
+ var firstValue = (source, keys) => {
7798
+ for (const key of keys) {
7799
+ const value = source[key];
7800
+ if (value !== void 0 && value !== null && value !== "") return value;
7801
+ }
7802
+ return void 0;
7803
+ };
7804
+ var normalizeFormInstanceInfo = (formInstance, fallback) => {
7805
+ if (!isPlainRecord(formInstance)) return null;
7806
+ const creator = isPlainRecord(formInstance.creator) ? formInstance.creator : {};
7807
+ const formInstanceId = firstValue(formInstance, [
7808
+ "formInstanceId",
7809
+ "formInstId",
7810
+ "form_instance_id",
7811
+ "id"
7812
+ ]);
7813
+ const createdByName = firstValue(formInstance, [
7814
+ "createdByName",
7815
+ "created_by_name",
7816
+ "originatorName",
7817
+ "creatorName"
7818
+ ]);
7819
+ const createdByDepartmentName = firstValue(formInstance, [
7820
+ "createdByDepartmentName",
7821
+ "created_by_department_name",
7822
+ "originatorDepartmentName",
7823
+ "originatorCorpName"
7824
+ ]);
7825
+ return {
7826
+ ...formInstance,
7827
+ formInstanceId: formInstanceId || fallback?.formInstanceId || "",
7828
+ formUuid: formInstance.formUuid || fallback?.formUuid || "",
7829
+ appType: formInstance.appType || fallback?.appType || "",
7830
+ data: isPlainRecord(formInstance.data) ? formInstance.data : {},
7831
+ title: firstValue(formInstance, [
7832
+ "title",
7833
+ "instanceTitle",
7834
+ "instance_title",
7835
+ "processInstanceTitle"
7836
+ ]) || void 0,
7837
+ instanceTitle: firstValue(formInstance, [
7838
+ "instanceTitle",
7839
+ "instance_title",
7840
+ "processInstanceTitle",
7841
+ "title"
7842
+ ]) || void 0,
7843
+ creator: {
7844
+ userId: creator.userId || creator.id || formInstance.createdBy || formInstance.originator || "",
7845
+ name: creator.name || createdByName || "",
7846
+ avatar: creator.avatar,
7847
+ department: creator.department || createdByDepartmentName || ""
7848
+ },
7849
+ createdBy: firstValue(formInstance, ["createdBy", "created_by", "originator"]),
7850
+ createdByName,
7851
+ createdByDepartmentId: firstValue(formInstance, [
7852
+ "createdByDepartmentId",
7853
+ "created_by_department_id",
7854
+ "originatorCorp"
7855
+ ]),
7856
+ createdByDepartmentName,
7857
+ createdAt: firstValue(formInstance, ["createdAt", "created_at", "createTime", "gmtCreate"]) || "",
7858
+ updatedAt: firstValue(formInstance, [
7859
+ "updatedAt",
7860
+ "updated_at",
7861
+ "modifiedTime",
7862
+ "modifyTime",
7863
+ "gmtModified"
7864
+ ])
7865
+ };
7866
+ };
7723
7867
 
7724
7868
  // src/hooks/useFormDetail.ts
7725
7869
  function useFormDetail(options) {
@@ -7750,8 +7894,13 @@ function useFormDetail(options) {
7750
7894
  if (!permResult || !hasViewOperation(permResult.operations, "view")) {
7751
7895
  onPermissionDenied?.();
7752
7896
  }
7897
+ const normalizedInfo = normalizeFormInstanceInfo(formResult, {
7898
+ formUuid,
7899
+ appType,
7900
+ formInstanceId
7901
+ });
7753
7902
  setPermissions(permResult);
7754
- setInstanceInfo(formResult);
7903
+ setInstanceInfo(normalizedInfo);
7755
7904
  setFormData(extractFormValues(formResult, fieldIds));
7756
7905
  } catch (error) {
7757
7906
  console.error("[useFormDetail] Failed to load data:", error);
@@ -9731,8 +9880,8 @@ var SummaryPanel = ({
9731
9880
  )
9732
9881
  ] }),
9733
9882
  /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("h1", { className: "m-0 break-words text-2xl font-semibold leading-9 text-ant-text md:text-[28px]", children: title }),
9734
- items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "mt-5 grid grid-cols-1 gap-4 md:grid-cols-3", children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex min-w-0 items-center gap-3", children: [
9735
- /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-gray-100 text-ant-text-secondary", children: item.icon }),
9883
+ items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("div", { className: "mt-5 grid grid-cols-1 gap-4 md:grid-cols-4", children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: "flex min-w-0 items-center gap-3", children: [
9884
+ item.icon && /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-gray-100 text-ant-text-secondary", children: item.icon }),
9736
9885
  /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("span", { className: "min-w-0", children: [
9737
9886
  /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "block text-xs leading-5 text-ant-text-tertiary", children: item.label }),
9738
9887
  /* @__PURE__ */ (0, import_jsx_runtime86.jsx)("span", { className: "block break-words text-sm font-medium leading-6 text-ant-text", children: item.value || "-" })
@@ -9847,6 +9996,7 @@ var ProcessPreview = ({
9847
9996
  // src/modules/DataManagementList.tsx
9848
9997
  var import_react61 = require("react");
9849
9998
  var import_antd32 = require("antd");
9999
+ var import_dayjs5 = __toESM(require("dayjs"));
9850
10000
  var import_icons11 = require("@ant-design/icons");
9851
10001
  var import_jsx_runtime89 = require("react/jsx-runtime");
9852
10002
  var createGroup = () => ({
@@ -9881,6 +10031,11 @@ var formatPrimitive = (value) => {
9881
10031
  return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "text-ant-color-text-quaternary", children: "--" });
9882
10032
  return String(value);
9883
10033
  };
10034
+ var formatDateTime = (value) => {
10035
+ if (value === void 0 || value === null || value === "") return formatPrimitive("");
10036
+ const parsed = (0, import_dayjs5.default)(value);
10037
+ return parsed.isValid() ? parsed.format("YYYY-MM-DD HH:mm:ss") : String(value);
10038
+ };
9884
10039
  var pickOptionLabel = (field, value) => {
9885
10040
  const options = field.options || field.optionList || field.option_list || field.componentProps?.options || [];
9886
10041
  const scalar = typeof value === "object" ? value?.value ?? value?.id ?? value?.label ?? value?.name : value;
@@ -9908,6 +10063,9 @@ var renderStatusTag = (value, fieldId) => {
9908
10063
  var renderCellValue = (value, field) => {
9909
10064
  const status = renderStatusTag(value, field.fieldId);
9910
10065
  if (status) return status;
10066
+ if (field.componentName === "DateField" || field.componentName === "DateTimeField") {
10067
+ return formatDateTime(value);
10068
+ }
9911
10069
  if (Array.isArray(value)) {
9912
10070
  if (value.length === 0) return formatPrimitive("");
9913
10071
  if (field.componentName === "ImageField") {
@@ -9964,6 +10122,74 @@ var fileToBase64 = (file) => new Promise((resolve, reject) => {
9964
10122
  reader.onerror = reject;
9965
10123
  reader.readAsDataURL(file);
9966
10124
  });
10125
+ var normalizeBasePath2 = (basePath) => {
10126
+ const normalized = String(basePath || "").replace(/^\/+|\/+$/g, "");
10127
+ return normalized ? `/${normalized}` : "";
10128
+ };
10129
+ var inferBasePath2 = (appType) => {
10130
+ if (typeof window === "undefined") return "";
10131
+ const pathname = window.location?.pathname || "";
10132
+ const marker = `/${appType}/`;
10133
+ const markerIndex = pathname.indexOf(marker);
10134
+ if (markerIndex <= 0) return "";
10135
+ return pathname.slice(0, markerIndex);
10136
+ };
10137
+ var buildDefaultDetailUrl = ({
10138
+ appType,
10139
+ formUuid,
10140
+ formType,
10141
+ formInstanceId,
10142
+ basePath
10143
+ }) => {
10144
+ const prefix = normalizeBasePath2(basePath ?? inferBasePath2(appType));
10145
+ const detailType = formType === "process" ? "processDetail" : "formDetail";
10146
+ return `${prefix}/${appType}/${detailType}/${formUuid}?formInstId=${encodeURIComponent(formInstanceId)}`;
10147
+ };
10148
+ var getHeaderValue = (headers, key) => {
10149
+ if (!headers) return "";
10150
+ if (typeof headers.get === "function")
10151
+ return headers.get(key) || headers.get(key.toLowerCase()) || "";
10152
+ return headers[key] || headers[key.toLowerCase()] || "";
10153
+ };
10154
+ var resolveDownloadFilename = (headers, fallbackName) => {
10155
+ const disposition = getHeaderValue(headers, "content-disposition");
10156
+ if (typeof disposition !== "string") return fallbackName;
10157
+ const matchStar = disposition.match(/filename\*=UTF-8''([^;]+)/i);
10158
+ if (matchStar?.[1]) return decodeURIComponent(matchStar[1]);
10159
+ const match = disposition.match(/filename="?([^";]+)"?/i);
10160
+ if (match?.[1]) return decodeURIComponent(match[1]);
10161
+ return fallbackName;
10162
+ };
10163
+ var downloadBlobResponse = async (response, fallbackName) => {
10164
+ if (typeof window === "undefined" || typeof document === "undefined") return;
10165
+ const headers = response?.headers;
10166
+ const payload = response?.data ?? response;
10167
+ const contentType = getHeaderValue(headers, "content-type") || payload?.type || "";
10168
+ const hasBlob = typeof Blob !== "undefined";
10169
+ if (hasBlob && payload instanceof Blob && String(contentType).includes("application/json")) {
10170
+ const text = await payload.text();
10171
+ try {
10172
+ const json = JSON.parse(text);
10173
+ throw new Error(json?.message || "\u4E0B\u8F7D\u5931\u8D25");
10174
+ } catch (error) {
10175
+ if (error instanceof SyntaxError) throw new Error("\u4E0B\u8F7D\u5931\u8D25");
10176
+ if (error instanceof Error) throw error;
10177
+ throw new Error("\u4E0B\u8F7D\u5931\u8D25");
10178
+ }
10179
+ }
10180
+ const blob = hasBlob && payload instanceof Blob ? payload : hasBlob && payload instanceof ArrayBuffer ? new Blob([payload], { type: contentType || "application/octet-stream" }) : new Blob([typeof payload === "string" ? payload : JSON.stringify(payload ?? "")], {
10181
+ type: contentType || "application/octet-stream"
10182
+ });
10183
+ const filename = resolveDownloadFilename(headers, fallbackName);
10184
+ const url = window.URL.createObjectURL(blob);
10185
+ const anchor = document.createElement("a");
10186
+ anchor.href = url;
10187
+ anchor.download = filename;
10188
+ document.body.appendChild(anchor);
10189
+ anchor.click();
10190
+ anchor.remove();
10191
+ window.URL.revokeObjectURL(url);
10192
+ };
9967
10193
  function FilterGroupEditor({
9968
10194
  group,
9969
10195
  fields,
@@ -10086,15 +10312,69 @@ function FilterGroupEditor({
10086
10312
  }
10087
10313
  );
10088
10314
  }
10315
+ function ResizableColumnTitle({
10316
+ label,
10317
+ width,
10318
+ onResize,
10319
+ onResizeEnd
10320
+ }) {
10321
+ const dragRef = (0, import_react61.useRef)({ startX: 0, startWidth: width, latestWidth: width });
10322
+ const handleMouseDown = (event) => {
10323
+ event.preventDefault();
10324
+ event.stopPropagation();
10325
+ dragRef.current = {
10326
+ startX: event.clientX,
10327
+ startWidth: width,
10328
+ latestWidth: width
10329
+ };
10330
+ const handleMouseMove = (moveEvent) => {
10331
+ const nextWidth = Math.min(
10332
+ 520,
10333
+ Math.max(96, dragRef.current.startWidth + moveEvent.clientX - dragRef.current.startX)
10334
+ );
10335
+ dragRef.current.latestWidth = nextWidth;
10336
+ onResize(nextWidth);
10337
+ };
10338
+ const handleMouseUp = () => {
10339
+ document.removeEventListener("mousemove", handleMouseMove);
10340
+ document.removeEventListener("mouseup", handleMouseUp);
10341
+ onResizeEnd(dragRef.current.latestWidth);
10342
+ };
10343
+ document.addEventListener("mousemove", handleMouseMove);
10344
+ document.addEventListener("mouseup", handleMouseUp);
10345
+ };
10346
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("span", { className: "relative flex min-w-0 items-center pr-3", children: [
10347
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "min-w-0 truncate", children: label }),
10348
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10349
+ "span",
10350
+ {
10351
+ "aria-hidden": true,
10352
+ className: "absolute -right-3 top-0 h-full w-4 cursor-col-resize after:absolute after:right-1 after:top-1/2 after:h-5 after:w-0.5 after:-translate-y-1/2 after:rounded after:bg-transparent hover:after:bg-ant-color-primary",
10353
+ onClickCapture: (event) => {
10354
+ event.preventDefault();
10355
+ event.stopPropagation();
10356
+ },
10357
+ onDoubleClickCapture: (event) => {
10358
+ event.preventDefault();
10359
+ event.stopPropagation();
10360
+ },
10361
+ onMouseDownCapture: handleMouseDown,
10362
+ title: "\u62D6\u62FD\u8C03\u6574\u5217\u5BBD"
10363
+ }
10364
+ )
10365
+ ] });
10366
+ }
10089
10367
  var DataManagementList = ({
10090
10368
  appType,
10091
10369
  formUuid,
10370
+ detailBasePath,
10092
10371
  menuFormUuid,
10093
10372
  readonly = false,
10094
10373
  fullHeight = true,
10095
10374
  configScope = "global",
10096
10375
  title,
10097
10376
  detailRenderer,
10377
+ detailPageUrlBuilder,
10098
10378
  submitRenderer,
10099
10379
  requestOverride,
10100
10380
  rowActions = []
@@ -10108,9 +10388,11 @@ var DataManagementList = ({
10108
10388
  }, [requestOverride]);
10109
10389
  const [fields, setFields] = (0, import_react61.useState)([]);
10110
10390
  const [config, setConfig] = (0, import_react61.useState)({});
10391
+ const [formType, setFormType] = (0, import_react61.useState)("form");
10111
10392
  const [showFields, setShowFields] = (0, import_react61.useState)([]);
10112
10393
  const [lockFieldIds, setLockFieldIds] = (0, import_react61.useState)([]);
10113
10394
  const [widths, setWidths] = (0, import_react61.useState)({});
10395
+ const widthsRef = (0, import_react61.useRef)({});
10114
10396
  const [sort, setSort] = (0, import_react61.useState)([]);
10115
10397
  const [density, setDensity] = (0, import_react61.useState)("middle");
10116
10398
  const [detailOpenMode, setDetailOpenMode] = (0, import_react61.useState)("drawer");
@@ -10132,6 +10414,7 @@ var DataManagementList = ({
10132
10414
  const [importOpen, setImportOpen] = (0, import_react61.useState)(false);
10133
10415
  const [importPreview, setImportPreview] = (0, import_react61.useState)([]);
10134
10416
  const [importBase64, setImportBase64] = (0, import_react61.useState)("");
10417
+ const [templateDownloading, setTemplateDownloading] = (0, import_react61.useState)(false);
10135
10418
  const [recordsOpen, setRecordsOpen] = (0, import_react61.useState)(false);
10136
10419
  const [recordTab, setRecordTab] = (0, import_react61.useState)("export");
10137
10420
  const [transferRecords, setTransferRecords] = (0, import_react61.useState)([]);
@@ -10147,7 +10430,7 @@ var DataManagementList = ({
10147
10430
  const fetchStateRef = (0, import_react61.useRef)({});
10148
10431
  const request = api.request;
10149
10432
  const getPopupContainer = (0, import_react61.useCallback)(
10150
- (triggerNode) => triggerNode?.parentElement || rootRef.current || document.body,
10433
+ (triggerNode) => rootRef.current || triggerNode?.ownerDocument?.body || (typeof document !== "undefined" ? document.body : triggerNode?.parentElement),
10151
10434
  []
10152
10435
  );
10153
10436
  const confirmDanger = (0, import_react61.useCallback)((title2, content, onOk) => {
@@ -10157,6 +10440,9 @@ var DataManagementList = ({
10157
10440
  () => showFields.map((fieldId) => fields.find((field) => field.fieldId === fieldId)).filter(Boolean),
10158
10441
  [fields, showFields]
10159
10442
  );
10443
+ (0, import_react61.useEffect)(() => {
10444
+ widthsRef.current = widths;
10445
+ }, [widths]);
10160
10446
  (0, import_react61.useEffect)(() => {
10161
10447
  fetchStateRef.current = {
10162
10448
  current,
@@ -10227,6 +10513,7 @@ var DataManagementList = ({
10227
10513
  const nextSearchKeyWord = saved?.filter?.searchKeyWord || "";
10228
10514
  const nextFilterGroup = hydrateFilterGroup(saved?.filter?.group);
10229
10515
  setFields(allFields);
10516
+ setFormType(schemaResult.formType || "form");
10230
10517
  setConfig(saved || {});
10231
10518
  setShowFields(resolved.showFields);
10232
10519
  setWidths(resolved.widths);
@@ -10279,22 +10566,65 @@ var DataManagementList = ({
10279
10566
  showFields,
10280
10567
  lockFieldIds,
10281
10568
  widths,
10569
+ sort,
10282
10570
  density,
10283
10571
  detailOpenMode,
10284
10572
  pageSize
10285
10573
  });
10574
+ await loadData({ current: 1, pageSize, sort });
10575
+ };
10576
+ const handleSortChange = (index, patch) => {
10577
+ setSort(
10578
+ (prev) => prev.map((item, itemIndex) => itemIndex === index ? { ...item, ...patch } : item)
10579
+ );
10580
+ };
10581
+ const handleAddSort = () => {
10582
+ const firstFieldId = showFields[0] || fields[0]?.fieldId;
10583
+ if (!firstFieldId) return;
10584
+ setSort((prev) => [...prev, { id: firstFieldId, isAsc: "y" }]);
10286
10585
  };
10586
+ const handleRemoveSort = (index) => {
10587
+ setSort((prev) => prev.filter((_, itemIndex) => itemIndex !== index));
10588
+ };
10589
+ const updateColumnWidth = (0, import_react61.useCallback)((fieldId, width) => {
10590
+ const nextWidth = Math.round(Math.max(96, Math.min(520, width)));
10591
+ widthsRef.current = { ...widthsRef.current, [fieldId]: nextWidth };
10592
+ setWidths(widthsRef.current);
10593
+ }, []);
10594
+ const commitColumnWidth = (0, import_react61.useCallback)(
10595
+ (fieldId, width) => {
10596
+ const nextWidth = Math.round(Math.max(96, Math.min(520, width)));
10597
+ const nextWidths = { ...widthsRef.current, [fieldId]: nextWidth };
10598
+ widthsRef.current = nextWidths;
10599
+ setWidths(nextWidths);
10600
+ void persistConfig({ widths: nextWidths });
10601
+ },
10602
+ [persistConfig]
10603
+ );
10287
10604
  const handleDetail = (0, import_react61.useCallback)(
10288
10605
  (record) => {
10289
10606
  const formInstanceId = getRecordId(record);
10290
- if (detailOpenMode === "newPage" && typeof window !== "undefined") {
10291
- window.open(`/${appType}/forms/${formUuid}/detail/${formInstanceId}`, "_blank");
10607
+ if (!formInstanceId) {
10608
+ import_antd32.message.warning("\u5F53\u524D\u8BB0\u5F55\u7F3A\u5C11\u5B9E\u4F8B ID\uFF0C\u65E0\u6CD5\u6253\u5F00\u8BE6\u60C5");
10292
10609
  return;
10293
10610
  }
10611
+ if (detailOpenMode === "newPage" && typeof window !== "undefined") {
10612
+ const detailUrl = detailPageUrlBuilder?.({ record, formInstanceId: String(formInstanceId) }) || buildDefaultDetailUrl({
10613
+ appType,
10614
+ formUuid,
10615
+ formType,
10616
+ formInstanceId: String(formInstanceId),
10617
+ basePath: detailBasePath
10618
+ });
10619
+ if (detailUrl) {
10620
+ window.open(detailUrl, "_blank");
10621
+ return;
10622
+ }
10623
+ }
10294
10624
  setActiveRecord(record);
10295
10625
  setDetailOpen(true);
10296
10626
  },
10297
- [appType, detailOpenMode, formUuid]
10627
+ [appType, detailBasePath, detailOpenMode, detailPageUrlBuilder, formType, formUuid]
10298
10628
  );
10299
10629
  const handleDelete = (0, import_react61.useCallback)(
10300
10630
  async (ids) => {
@@ -10376,6 +10706,19 @@ var DataManagementList = ({
10376
10706
  setExporting(false);
10377
10707
  }
10378
10708
  };
10709
+ const handleDownloadTemplate = async () => {
10710
+ setTemplateDownloading(true);
10711
+ try {
10712
+ const response = await downloadDataManagementImportTemplate(request, { appType, formUuid });
10713
+ await downloadBlobResponse(response, `\u5BFC\u5165\u6A21\u677F-${formUuid}.xlsx`);
10714
+ import_antd32.message.success("\u6A21\u677F\u4E0B\u8F7D\u5DF2\u5F00\u59CB");
10715
+ } catch (error) {
10716
+ console.error("[DataManagementList] download template failed:", error);
10717
+ import_antd32.message.error(error instanceof Error ? error.message : "\u4E0B\u8F7D\u5BFC\u5165\u6A21\u677F\u5931\u8D25");
10718
+ } finally {
10719
+ setTemplateDownloading(false);
10720
+ }
10721
+ };
10379
10722
  const loadTransferRecords = async (type) => {
10380
10723
  setRecordTab(type);
10381
10724
  setRecordsOpen(true);
@@ -10410,22 +10753,32 @@ var DataManagementList = ({
10410
10753
  await loadData({ current: 1, pageSize });
10411
10754
  };
10412
10755
  const columns = (0, import_react61.useMemo)(() => {
10413
- const baseColumns = visibleFields.map((field) => ({
10414
- title: field.label,
10415
- dataIndex: field.fieldId,
10416
- key: field.fieldId,
10417
- width: widths[field.fieldId] || field.width || 160,
10418
- fixed: lockFieldIds.includes(field.fieldId) ? "left" : void 0,
10419
- ellipsis: true,
10420
- sorter: true,
10421
- render: (value) => renderCellValue(value, field)
10422
- })) || [];
10756
+ const baseColumns = visibleFields.map((field) => {
10757
+ const columnWidth = widths[field.fieldId] || field.width || 160;
10758
+ return {
10759
+ title: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10760
+ ResizableColumnTitle,
10761
+ {
10762
+ label: field.label,
10763
+ width: columnWidth,
10764
+ onResize: (width) => updateColumnWidth(field.fieldId, width),
10765
+ onResizeEnd: (width) => commitColumnWidth(field.fieldId, width)
10766
+ }
10767
+ ),
10768
+ dataIndex: field.fieldId,
10769
+ key: field.fieldId,
10770
+ width: columnWidth,
10771
+ fixed: lockFieldIds.includes(field.fieldId) ? "left" : void 0,
10772
+ ellipsis: true,
10773
+ render: (value) => renderCellValue(value, field)
10774
+ };
10775
+ }) || [];
10423
10776
  return [
10424
10777
  ...baseColumns,
10425
10778
  {
10426
10779
  title: "\u64CD\u4F5C",
10427
10780
  key: "__actions",
10428
- width: 148,
10781
+ width: 136,
10429
10782
  fixed: "right",
10430
10783
  render: (_, record) => /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(import_antd32.Space, { size: 4, children: [
10431
10784
  /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_antd32.Button, { type: "link", size: "small", onClick: () => handleDetail(record), children: "\u8BE6\u60C5" }),
@@ -10436,18 +10789,6 @@ var DataManagementList = ({
10436
10789
  getPopupContainer,
10437
10790
  menu: {
10438
10791
  items: [
10439
- ...rowActions.map((action) => ({
10440
- key: action.key,
10441
- label: action.label,
10442
- danger: action.danger,
10443
- onClick: () => action.onClick(record)
10444
- })),
10445
- {
10446
- key: "workflow",
10447
- label: "\u6D41\u7A0B\u65E5\u5FD7",
10448
- icon: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_icons11.HistoryOutlined, {}),
10449
- onClick: () => import_antd32.message.info("\u8BF7\u901A\u8FC7 detailRenderer \u63A5\u5165\u6D41\u7A0B\u65E5\u5FD7\u6216\u6D41\u7A0B\u56FE\u5165\u53E3")
10450
- },
10451
10792
  ...!readonly ? [
10452
10793
  {
10453
10794
  key: "delete",
@@ -10460,6 +10801,20 @@ var DataManagementList = ({
10460
10801
  () => handleDelete([String(getRecordId(record))])
10461
10802
  )
10462
10803
  }
10804
+ ] : [],
10805
+ ...rowActions.map((action) => ({
10806
+ key: action.key,
10807
+ label: action.label,
10808
+ danger: action.danger,
10809
+ onClick: () => action.onClick(record)
10810
+ })),
10811
+ ...formType === "process" ? [
10812
+ {
10813
+ key: "workflow",
10814
+ label: "\u6D41\u7A0B\u65E5\u5FD7",
10815
+ icon: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_icons11.HistoryOutlined, {}),
10816
+ onClick: () => import_antd32.message.info("\u8BF7\u901A\u8FC7 detailRenderer \u63A5\u5165\u6D41\u7A0B\u65E5\u5FD7\u6216\u6D41\u7A0B\u56FE\u5165\u53E3")
10817
+ }
10463
10818
  ] : []
10464
10819
  ]
10465
10820
  },
@@ -10471,16 +10826,23 @@ var DataManagementList = ({
10471
10826
  ];
10472
10827
  }, [
10473
10828
  confirmDanger,
10829
+ commitColumnWidth,
10830
+ formType,
10474
10831
  getPopupContainer,
10475
10832
  handleDelete,
10476
10833
  handleDetail,
10477
10834
  lockFieldIds,
10478
10835
  readonly,
10479
10836
  rowActions,
10837
+ updateColumnWidth,
10480
10838
  visibleFields,
10481
10839
  widths
10482
10840
  ]);
10483
10841
  const tableSize = density === "compact" ? "small" : density === "loose" ? "large" : "middle";
10842
+ const tableScrollX = Math.max(
10843
+ 900,
10844
+ visibleFields.reduce((sum, field) => sum + (widths[field.fieldId] || field.width || 160), 136)
10845
+ );
10484
10846
  const importPreviewColumns = (0, import_react61.useMemo)(() => {
10485
10847
  const keys = Array.from(
10486
10848
  new Set(importPreview.flatMap((record) => Object.keys(record || {})))
@@ -10497,450 +10859,512 @@ var DataManagementList = ({
10497
10859
  };
10498
10860
  });
10499
10861
  }, [fields, importPreview]);
10500
- return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_antd32.ConfigProvider, { getPopupContainer, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { ref: rootRef, className: `${fullHeight ? "h-full min-h-full" : ""} bg-ant-bg-layout`, children: [
10501
- /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "mx-auto flex h-full max-w-[1440px] flex-col px-4 py-4 md:px-6", children: [
10502
- /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "mb-4 flex flex-col gap-3 md:flex-row md:items-center md:justify-between", children: [
10503
- /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { children: [
10504
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("h1", { className: "text-xl font-semibold text-ant-color-text", children: title || "\u6570\u636E\u7BA1\u7406" }),
10505
- /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("p", { className: "mt-1 text-sm text-ant-color-text-secondary", children: [
10506
- "\u5171 ",
10507
- total,
10508
- " \u6761\u6570\u636E\uFF0C\u5DF2\u9009\u62E9 ",
10509
- selectedRowKeys.length,
10510
- " \u6761"
10511
- ] })
10512
- ] }),
10513
- /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(import_antd32.Space, { wrap: true, children: [
10514
- !readonly && submitRenderer && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_antd32.Button, { icon: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_icons11.PlusOutlined, {}), type: "primary", onClick: () => setSubmitOpen(true), children: "\u65B0\u589E" }),
10515
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10516
- import_antd32.Input.Search,
10862
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_antd32.ConfigProvider, { getPopupContainer, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
10863
+ "div",
10864
+ {
10865
+ ref: rootRef,
10866
+ className: `relative w-full bg-ant-bg-layout ${fullHeight ? "flex h-[calc(100vh-88px)] min-h-[560px] overflow-hidden" : ""}`,
10867
+ children: [
10868
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "mx-auto flex min-h-0 w-full max-w-[1440px] flex-col px-4 py-4 md:px-6", children: [
10869
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "mb-4 flex flex-col gap-3 md:flex-row md:items-center md:justify-between", children: [
10870
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { children: [
10871
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("h1", { className: "text-xl font-semibold text-ant-color-text", children: title || "\u6570\u636E\u7BA1\u7406" }),
10872
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("p", { className: "mt-1 text-sm text-ant-color-text-secondary", children: [
10873
+ "\u5171 ",
10874
+ total,
10875
+ " \u6761\u6570\u636E\uFF0C\u5DF2\u9009\u62E9 ",
10876
+ selectedRowKeys.length,
10877
+ " \u6761"
10878
+ ] })
10879
+ ] }),
10880
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(import_antd32.Space, { wrap: true, children: [
10881
+ !readonly && submitRenderer && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_antd32.Button, { icon: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_icons11.PlusOutlined, {}), type: "primary", onClick: () => setSubmitOpen(true), children: "\u65B0\u589E" }),
10882
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10883
+ import_antd32.Input.Search,
10884
+ {
10885
+ allowClear: true,
10886
+ className: "w-[260px]",
10887
+ placeholder: "\u641C\u7D22\u5173\u952E\u5B57",
10888
+ value: searchKeyWord,
10889
+ onChange: (event) => setSearchKeyWord(event.target.value),
10890
+ onSearch: (value) => {
10891
+ const nextSearchKeyWord = String(value || "");
10892
+ setSearchKeyWord(nextSearchKeyWord);
10893
+ persistConfig({
10894
+ filter: { searchKeyWord: nextSearchKeyWord, group: filterGroup }
10895
+ });
10896
+ loadData({
10897
+ current: 1,
10898
+ pageSize,
10899
+ searchKeyWord: nextSearchKeyWord,
10900
+ filterGroup
10901
+ });
10902
+ }
10903
+ }
10904
+ ),
10905
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_antd32.Button, { icon: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_icons11.FilterOutlined, {}), onClick: () => setFilterOpen(true), children: "\u7B5B\u9009" }),
10906
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_antd32.Button, { icon: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_icons11.SettingOutlined, {}), onClick: () => setColumnOpen(true), children: "\u5217\u8BBE\u7F6E" }),
10907
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10908
+ import_antd32.Dropdown,
10909
+ {
10910
+ getPopupContainer,
10911
+ menu: {
10912
+ items: [
10913
+ {
10914
+ key: "selected",
10915
+ label: "\u5BFC\u51FA\u9009\u4E2D",
10916
+ disabled: selectedRowKeys.length === 0,
10917
+ onClick: () => {
10918
+ setExportScope("selected");
10919
+ setExportFields(showFields);
10920
+ setExportOpen(true);
10921
+ }
10922
+ },
10923
+ {
10924
+ key: "all",
10925
+ label: "\u5BFC\u51FA\u5168\u90E8",
10926
+ onClick: () => {
10927
+ setExportScope("all");
10928
+ setExportFields(showFields);
10929
+ setExportOpen(true);
10930
+ }
10931
+ },
10932
+ {
10933
+ key: "records",
10934
+ label: "\u5BFC\u51FA\u8BB0\u5F55",
10935
+ onClick: () => loadTransferRecords("export")
10936
+ }
10937
+ ]
10938
+ },
10939
+ children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_antd32.Button, { icon: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_icons11.DownloadOutlined, {}), children: "\u5BFC\u51FA" })
10940
+ }
10941
+ ),
10942
+ !readonly && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10943
+ import_antd32.Dropdown,
10944
+ {
10945
+ getPopupContainer,
10946
+ menu: {
10947
+ items: [
10948
+ { key: "import", label: "\u5BFC\u5165\u6570\u636E", onClick: () => setImportOpen(true) },
10949
+ {
10950
+ key: "records",
10951
+ label: "\u5BFC\u5165\u8BB0\u5F55",
10952
+ onClick: () => loadTransferRecords("import")
10953
+ }
10954
+ ]
10955
+ },
10956
+ children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_antd32.Button, { icon: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_icons11.ImportOutlined, {}), children: "\u5BFC\u5165" })
10957
+ }
10958
+ ),
10959
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_antd32.Button, { icon: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_icons11.ReloadOutlined, {}), onClick: () => loadData({ current, pageSize }) })
10960
+ ] })
10961
+ ] }),
10962
+ selectedRowKeys.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "mb-3 flex flex-wrap items-center justify-between gap-3 rounded-lg border border-ant-border-secondary bg-ant-bg-container px-4 py-3 shadow-sm", children: [
10963
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("span", { className: "text-sm text-ant-color-text-secondary", children: [
10964
+ "\u5DF2\u9009 ",
10965
+ selectedRowKeys.length,
10966
+ " \u6761"
10967
+ ] }),
10968
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(import_antd32.Space, { wrap: true, children: [
10969
+ !readonly && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_antd32.Button, { icon: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_icons11.SwapOutlined, {}), onClick: handleBatchApprove, children: "\u6279\u91CF\u5BA1\u6279" }),
10970
+ !readonly && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10971
+ import_antd32.Button,
10972
+ {
10973
+ danger: true,
10974
+ icon: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_icons11.DeleteOutlined, {}),
10975
+ onClick: () => confirmDanger(
10976
+ "\u786E\u8BA4\u6279\u91CF\u5220\u9664",
10977
+ `\u5C06\u5220\u9664 ${selectedRowKeys.length} \u6761\u6570\u636E\uFF0C\u786E\u8BA4\u7EE7\u7EED\u5417\uFF1F`,
10978
+ () => handleDelete(selectedRowKeys.map(String))
10979
+ ),
10980
+ children: "\u6279\u91CF\u5220\u9664"
10981
+ }
10982
+ ),
10983
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_antd32.Button, { type: "link", onClick: () => setSelectedRowKeys([]), children: "\u53D6\u6D88\u9009\u62E9" })
10984
+ ] })
10985
+ ] }),
10986
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "relative flex-1 overflow-hidden rounded-lg border border-ant-border-secondary bg-ant-bg-container", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10987
+ import_antd32.Table,
10517
10988
  {
10518
- allowClear: true,
10519
- className: "w-[260px]",
10520
- placeholder: "\u641C\u7D22\u5173\u952E\u5B57",
10521
- value: searchKeyWord,
10522
- onChange: (event) => setSearchKeyWord(event.target.value),
10523
- onSearch: (value) => {
10524
- const nextSearchKeyWord = String(value || "");
10525
- setSearchKeyWord(nextSearchKeyWord);
10526
- persistConfig({
10527
- filter: { searchKeyWord: nextSearchKeyWord, group: filterGroup }
10528
- });
10989
+ rowKey: (record) => String(getRecordId(record)),
10990
+ loading: loading || schemaLoading,
10991
+ columns,
10992
+ dataSource,
10993
+ size: tableSize,
10994
+ scroll: {
10995
+ x: tableScrollX,
10996
+ y: fullHeight ? selectedRowKeys.length > 0 ? "calc(100vh - 360px)" : "calc(100vh - 300px)" : void 0
10997
+ },
10998
+ rowSelection: {
10999
+ selectedRowKeys,
11000
+ onChange: setSelectedRowKeys
11001
+ },
11002
+ pagination: {
11003
+ current,
11004
+ pageSize,
11005
+ total,
11006
+ showSizeChanger: true,
11007
+ showTotal: (count) => `\u5171 ${count} \u6761`
11008
+ },
11009
+ onChange: (pagination) => {
10529
11010
  loadData({
10530
- current: 1,
10531
- pageSize,
10532
- searchKeyWord: nextSearchKeyWord,
10533
- filterGroup
11011
+ current: pagination.current || 1,
11012
+ pageSize: pagination.pageSize || pageSize,
11013
+ sort
10534
11014
  });
10535
11015
  }
10536
11016
  }
10537
- ),
10538
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_antd32.Button, { icon: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_icons11.FilterOutlined, {}), onClick: () => setFilterOpen(true), children: "\u7B5B\u9009" }),
10539
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_antd32.Button, { icon: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_icons11.SettingOutlined, {}), onClick: () => setColumnOpen(true), children: "\u5217\u8BBE\u7F6E" }),
10540
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10541
- import_antd32.Dropdown,
10542
- {
10543
- getPopupContainer,
10544
- menu: {
10545
- items: [
10546
- {
10547
- key: "selected",
10548
- label: "\u5BFC\u51FA\u9009\u4E2D",
10549
- disabled: selectedRowKeys.length === 0,
10550
- onClick: () => {
10551
- setExportScope("selected");
10552
- setExportFields(showFields);
10553
- setExportOpen(true);
10554
- }
10555
- },
10556
- {
10557
- key: "all",
10558
- label: "\u5BFC\u51FA\u5168\u90E8",
10559
- onClick: () => {
10560
- setExportScope("all");
10561
- setExportFields(showFields);
10562
- setExportOpen(true);
10563
- }
10564
- },
11017
+ ) })
11018
+ ] }),
11019
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
11020
+ import_antd32.Modal,
11021
+ {
11022
+ getContainer: false,
11023
+ title: "\u9AD8\u7EA7\u7B5B\u9009",
11024
+ open: filterOpen,
11025
+ width: 760,
11026
+ onCancel: () => setFilterOpen(false),
11027
+ onOk: () => {
11028
+ setFilterOpen(false);
11029
+ persistConfig({ filter: { searchKeyWord, group: filterGroup } });
11030
+ loadData({ current: 1, pageSize, searchKeyWord, filterGroup });
11031
+ },
11032
+ okText: "\u5E94\u7528\u7B5B\u9009",
11033
+ children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(FilterGroupEditor, { group: filterGroup, fields, onChange: setFilterGroup })
11034
+ }
11035
+ ),
11036
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
11037
+ import_antd32.Modal,
11038
+ {
11039
+ getContainer: false,
11040
+ title: "\u5217\u8BBE\u7F6E",
11041
+ open: columnOpen,
11042
+ width: 920,
11043
+ onCancel: () => setColumnOpen(false),
11044
+ onOk: handleColumnCommit,
11045
+ children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "space-y-5", children: [
11046
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { children: [
11047
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "mb-2 text-sm font-medium text-ant-color-text", children: "\u663E\u793A\u5217" }),
11048
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
11049
+ import_antd32.Checkbox.Group,
10565
11050
  {
10566
- key: "records",
10567
- label: "\u5BFC\u51FA\u8BB0\u5F55",
10568
- onClick: () => loadTransferRecords("export")
11051
+ className: "grid grid-cols-2 gap-2 md:grid-cols-3",
11052
+ value: showFields,
11053
+ options: fields.map((field) => ({ label: field.label, value: field.fieldId })),
11054
+ onChange: (values) => setShowFields(values.map(String))
10569
11055
  }
10570
- ]
10571
- },
10572
- children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_antd32.Button, { icon: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_icons11.DownloadOutlined, {}), children: "\u5BFC\u51FA" })
10573
- }
10574
- ),
10575
- !readonly && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10576
- import_antd32.Dropdown,
10577
- {
10578
- getPopupContainer,
10579
- menu: {
10580
- items: [
10581
- { key: "import", label: "\u5BFC\u5165\u6570\u636E", onClick: () => setImportOpen(true) },
11056
+ )
11057
+ ] }),
11058
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { children: [
11059
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "mb-2 text-sm font-medium text-ant-color-text", children: "\u51BB\u7ED3\u5217" }),
11060
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
11061
+ import_antd32.Select,
10582
11062
  {
10583
- key: "records",
10584
- label: "\u5BFC\u5165\u8BB0\u5F55",
10585
- onClick: () => loadTransferRecords("import")
11063
+ mode: "multiple",
11064
+ className: "w-full",
11065
+ value: lockFieldIds,
11066
+ options: showFields.map((fieldId) => {
11067
+ const field = fields.find((item) => item.fieldId === fieldId);
11068
+ return { label: field?.label || fieldId, value: fieldId };
11069
+ }),
11070
+ onChange: setLockFieldIds
10586
11071
  }
10587
- ]
10588
- },
10589
- children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_antd32.Button, { icon: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_icons11.ImportOutlined, {}), children: "\u5BFC\u5165" })
10590
- }
10591
- ),
10592
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_antd32.Button, { icon: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_icons11.ReloadOutlined, {}), onClick: () => loadData({ current, pageSize }) })
10593
- ] })
10594
- ] }),
10595
- selectedRowKeys.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "mb-3 flex flex-wrap items-center justify-between gap-3 rounded-lg border border-ant-border-secondary bg-ant-bg-container px-4 py-3 shadow-sm", children: [
10596
- /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("span", { className: "text-sm text-ant-color-text-secondary", children: [
10597
- "\u5DF2\u9009 ",
10598
- selectedRowKeys.length,
10599
- " \u6761"
10600
- ] }),
10601
- /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(import_antd32.Space, { wrap: true, children: [
10602
- !readonly && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_antd32.Button, { icon: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_icons11.SwapOutlined, {}), onClick: handleBatchApprove, children: "\u6279\u91CF\u5BA1\u6279" }),
10603
- !readonly && /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10604
- import_antd32.Button,
10605
- {
10606
- danger: true,
10607
- icon: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_icons11.DeleteOutlined, {}),
10608
- onClick: () => confirmDanger(
10609
- "\u786E\u8BA4\u6279\u91CF\u5220\u9664",
10610
- `\u5C06\u5220\u9664 ${selectedRowKeys.length} \u6761\u6570\u636E\uFF0C\u786E\u8BA4\u7EE7\u7EED\u5417\uFF1F`,
10611
- () => handleDelete(selectedRowKeys.map(String))
10612
- ),
10613
- children: "\u6279\u91CF\u5220\u9664"
10614
- }
10615
- ),
10616
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_antd32.Button, { type: "link", onClick: () => setSelectedRowKeys([]), children: "\u53D6\u6D88\u9009\u62E9" })
10617
- ] })
10618
- ] }),
10619
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "relative flex-1 overflow-hidden rounded-lg border border-ant-border-secondary bg-ant-bg-container", children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10620
- import_antd32.Table,
10621
- {
10622
- rowKey: (record) => String(getRecordId(record)),
10623
- loading: loading || schemaLoading,
10624
- columns,
10625
- dataSource,
10626
- size: tableSize,
10627
- scroll: {
10628
- x: Math.max(900, visibleFields.length * 160),
10629
- y: fullHeight ? selectedRowKeys.length > 0 ? "calc(100vh - 320px)" : "calc(100vh - 260px)" : void 0
10630
- },
10631
- rowSelection: {
10632
- selectedRowKeys,
10633
- onChange: setSelectedRowKeys
10634
- },
10635
- pagination: {
10636
- current,
10637
- pageSize,
10638
- total,
10639
- showSizeChanger: true,
10640
- showTotal: (count) => `\u5171 ${count} \u6761`
10641
- },
10642
- onChange: (pagination, _filters, sorter) => {
10643
- const sorters = Array.isArray(sorter) ? sorter : [sorter];
10644
- const nextSort = sorters.filter((item) => item?.field && item?.order).map((item) => ({
10645
- id: String(item.field),
10646
- isAsc: item.order === "ascend" ? "y" : "n"
10647
- }));
10648
- setSort(nextSort);
10649
- persistConfig({ sort: nextSort });
10650
- loadData({
10651
- current: pagination.current || 1,
10652
- pageSize: pagination.pageSize || pageSize,
10653
- sort: nextSort
10654
- });
11072
+ )
11073
+ ] }),
11074
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_antd32.Divider, { className: "my-1" }),
11075
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { children: [
11076
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "mb-2 flex items-center justify-between gap-3", children: [
11077
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "text-sm font-medium text-ant-color-text", children: "\u6392\u5E8F\u89C4\u5219" }),
11078
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_antd32.Button, { size: "small", onClick: handleAddSort, disabled: fields.length === 0, children: "\u6DFB\u52A0\u6392\u5E8F" })
11079
+ ] }),
11080
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "space-y-2", children: sort.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "rounded-lg border border-dashed border-ant-border-secondary px-3 py-4 text-center text-sm text-ant-color-text-tertiary", children: "\u6682\u65E0\u6392\u5E8F\u89C4\u5219" }) : sort.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "flex items-center gap-2", children: [
11081
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
11082
+ import_antd32.Select,
11083
+ {
11084
+ className: "min-w-0 flex-1",
11085
+ value: item.id,
11086
+ options: fields.map((field) => ({
11087
+ label: field.label,
11088
+ value: field.fieldId
11089
+ })),
11090
+ onChange: (value) => handleSortChange(index, { id: value })
11091
+ }
11092
+ ),
11093
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
11094
+ import_antd32.Segmented,
11095
+ {
11096
+ value: item.isAsc,
11097
+ options: [
11098
+ { label: "\u5347\u5E8F", value: "y" },
11099
+ { label: "\u964D\u5E8F", value: "n" }
11100
+ ],
11101
+ onChange: (value) => handleSortChange(index, { isAsc: value })
11102
+ }
11103
+ ),
11104
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
11105
+ import_antd32.Button,
11106
+ {
11107
+ danger: true,
11108
+ type: "text",
11109
+ icon: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_icons11.DeleteOutlined, {}),
11110
+ onClick: () => handleRemoveSort(index)
11111
+ }
11112
+ )
11113
+ ] }, `${item.id}_${index}`)) })
11114
+ ] }),
11115
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "grid gap-4 md:grid-cols-3", children: [
11116
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { children: [
11117
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "mb-2 text-sm font-medium text-ant-color-text", children: "\u8868\u683C\u5BC6\u5EA6" }),
11118
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
11119
+ import_antd32.Segmented,
11120
+ {
11121
+ block: true,
11122
+ value: density,
11123
+ options: [
11124
+ { label: "\u7D27\u51D1", value: "compact" },
11125
+ { label: "\u6807\u51C6", value: "middle" },
11126
+ { label: "\u5BBD\u677E", value: "loose" }
11127
+ ],
11128
+ onChange: (value) => setDensity(value)
11129
+ }
11130
+ )
11131
+ ] }),
11132
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { children: [
11133
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "mb-2 text-sm font-medium text-ant-color-text", children: "\u8BE6\u60C5\u6253\u5F00\u65B9\u5F0F" }),
11134
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
11135
+ import_antd32.Segmented,
11136
+ {
11137
+ block: true,
11138
+ value: detailOpenMode,
11139
+ options: [
11140
+ { label: "\u62BD\u5C49", value: "drawer" },
11141
+ { label: "\u65B0\u9875", value: "newPage" }
11142
+ ],
11143
+ onChange: (value) => setDetailOpenMode(value)
11144
+ }
11145
+ )
11146
+ ] }),
11147
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { children: [
11148
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "mb-2 text-sm font-medium text-ant-color-text", children: "\u9875\u5927\u5C0F" }),
11149
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
11150
+ import_antd32.Select,
11151
+ {
11152
+ className: "w-full",
11153
+ value: pageSize,
11154
+ options: [10, 20, 50, 100].map((value) => ({ label: `${value} \u6761`, value })),
11155
+ onChange: setPageSize
11156
+ }
11157
+ )
11158
+ ] })
11159
+ ] })
11160
+ ] })
10655
11161
  }
10656
- }
10657
- ) })
10658
- ] }),
10659
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10660
- import_antd32.Modal,
10661
- {
10662
- getContainer: false,
10663
- title: "\u9AD8\u7EA7\u7B5B\u9009",
10664
- open: filterOpen,
10665
- width: 760,
10666
- onCancel: () => setFilterOpen(false),
10667
- onOk: () => {
10668
- setFilterOpen(false);
10669
- persistConfig({ filter: { searchKeyWord, group: filterGroup } });
10670
- loadData({ current: 1, pageSize, searchKeyWord, filterGroup });
10671
- },
10672
- okText: "\u5E94\u7528\u7B5B\u9009",
10673
- children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(FilterGroupEditor, { group: filterGroup, fields, onChange: setFilterGroup })
10674
- }
10675
- ),
10676
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10677
- import_antd32.Modal,
10678
- {
10679
- getContainer: false,
10680
- title: "\u5217\u8BBE\u7F6E",
10681
- open: columnOpen,
10682
- width: 720,
10683
- onCancel: () => setColumnOpen(false),
10684
- onOk: handleColumnCommit,
10685
- children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "space-y-5", children: [
10686
- /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { children: [
10687
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "mb-2 text-sm font-medium text-ant-color-text", children: "\u663E\u793A\u5217" }),
10688
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
11162
+ ),
11163
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
11164
+ import_antd32.Modal,
11165
+ {
11166
+ getContainer: false,
11167
+ title: exportScope === "selected" ? "\u5BFC\u51FA\u9009\u4E2D\u6570\u636E" : "\u5BFC\u51FA\u5168\u90E8\u6570\u636E",
11168
+ open: exportOpen,
11169
+ onCancel: () => setExportOpen(false),
11170
+ footer: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(import_antd32.Space, { children: [
11171
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_antd32.Button, { onClick: () => setExportOpen(false), children: "\u53D6\u6D88" }),
11172
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
11173
+ import_antd32.Button,
11174
+ {
11175
+ type: "primary",
11176
+ loading: exporting,
11177
+ disabled: exportScope === "selected" && selectedRowKeys.length === 0,
11178
+ onClick: () => handleExport(exportScope),
11179
+ children: exportScope === "selected" ? `\u5BFC\u51FA\u9009\u4E2D (${selectedRowKeys.length})` : "\u5BFC\u51FA\u5168\u90E8"
11180
+ }
11181
+ )
11182
+ ] }),
11183
+ children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10689
11184
  import_antd32.Checkbox.Group,
10690
11185
  {
10691
- className: "grid grid-cols-2 gap-2 md:grid-cols-3",
10692
- value: showFields,
11186
+ className: "grid grid-cols-2 gap-2",
11187
+ value: exportFields,
10693
11188
  options: fields.map((field) => ({ label: field.label, value: field.fieldId })),
10694
- onChange: (values) => setShowFields(values.map(String))
10695
- }
10696
- )
10697
- ] }),
10698
- /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { children: [
10699
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "mb-2 text-sm font-medium text-ant-color-text", children: "\u51BB\u7ED3\u5217" }),
10700
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10701
- import_antd32.Select,
10702
- {
10703
- mode: "multiple",
10704
- className: "w-full",
10705
- value: lockFieldIds,
10706
- options: showFields.map((fieldId) => {
10707
- const field = fields.find((item) => item.fieldId === fieldId);
10708
- return { label: field?.label || fieldId, value: fieldId };
10709
- }),
10710
- onChange: setLockFieldIds
11189
+ onChange: (values) => setExportFields(values.map(String))
10711
11190
  }
10712
11191
  )
10713
- ] }),
10714
- /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "grid gap-4 md:grid-cols-3", children: [
10715
- /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { children: [
10716
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "mb-2 text-sm font-medium text-ant-color-text", children: "\u8868\u683C\u5BC6\u5EA6" }),
11192
+ }
11193
+ ),
11194
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
11195
+ import_antd32.Modal,
11196
+ {
11197
+ getContainer: false,
11198
+ title: "\u6279\u91CF\u5BA1\u6279",
11199
+ open: batchApprovalOpen,
11200
+ onCancel: () => setBatchApprovalOpen(false),
11201
+ onOk: handleBatchApprovalConfirm,
11202
+ okText: batchApprovalAction === "approved" ? "\u786E\u8BA4\u901A\u8FC7" : "\u786E\u8BA4\u62D2\u7EDD",
11203
+ confirmLoading: batchApproving,
11204
+ children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "space-y-4", children: [
11205
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "text-sm text-ant-color-text-secondary", children: [
11206
+ "\u5DF2\u9009\u62E9 ",
11207
+ selectedRowKeys.length,
11208
+ " \u6761\u8BB0\u5F55"
11209
+ ] }),
10717
11210
  /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10718
11211
  import_antd32.Segmented,
10719
11212
  {
10720
11213
  block: true,
10721
- value: density,
11214
+ value: batchApprovalAction,
10722
11215
  options: [
10723
- { label: "\u7D27\u51D1", value: "compact" },
10724
- { label: "\u6807\u51C6", value: "middle" },
10725
- { label: "\u5BBD\u677E", value: "loose" }
11216
+ { label: "\u540C\u610F", value: "approved" },
11217
+ { label: "\u62D2\u7EDD", value: "rejected" }
10726
11218
  ],
10727
- onChange: (value) => setDensity(value)
11219
+ onChange: (value) => setBatchApprovalAction(value)
11220
+ }
11221
+ ),
11222
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
11223
+ import_antd32.Input.TextArea,
11224
+ {
11225
+ value: batchApprovalComments,
11226
+ rows: 4,
11227
+ maxLength: 500,
11228
+ showCount: true,
11229
+ placeholder: "\u586B\u5199\u5BA1\u6279\u610F\u89C1",
11230
+ onChange: (event) => setBatchApprovalComments(event.target.value)
10728
11231
  }
10729
11232
  )
10730
- ] }),
10731
- /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { children: [
10732
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "mb-2 text-sm font-medium text-ant-color-text", children: "\u8BE6\u60C5\u6253\u5F00\u65B9\u5F0F" }),
11233
+ ] })
11234
+ }
11235
+ ),
11236
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
11237
+ import_antd32.Modal,
11238
+ {
11239
+ getContainer: false,
11240
+ title: "\u5BFC\u5165\u6570\u636E",
11241
+ open: importOpen,
11242
+ width: 720,
11243
+ onCancel: () => setImportOpen(false),
11244
+ onOk: handleImportConfirm,
11245
+ okButtonProps: { disabled: !importBase64 },
11246
+ okText: "\u786E\u8BA4\u5BFC\u5165",
11247
+ children: [
11248
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "mb-3 flex flex-col gap-3 rounded-lg border border-ant-border-secondary bg-ant-bg-container px-4 py-3 md:flex-row md:items-center md:justify-between", children: [
11249
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { children: [
11250
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "text-sm font-medium text-ant-color-text", children: "\u5BFC\u5165\u6A21\u677F" }),
11251
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "mt-1 text-xs text-ant-color-text-secondary", children: "\u5148\u4E0B\u8F7D\u6A21\u677F\u586B\u5199\u6570\u636E\uFF0C\u518D\u4E0A\u4F20 Excel \u6587\u4EF6\u5BFC\u5165" })
11252
+ ] }),
11253
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
11254
+ import_antd32.Button,
11255
+ {
11256
+ icon: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_icons11.DownloadOutlined, {}),
11257
+ loading: templateDownloading,
11258
+ onClick: handleDownloadTemplate,
11259
+ children: "\u4E0B\u8F7D\u5BFC\u5165\u6A21\u677F"
11260
+ }
11261
+ )
11262
+ ] }),
11263
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
11264
+ import_antd32.Upload.Dragger,
11265
+ {
11266
+ accept: ".xlsx,.xls",
11267
+ maxCount: 1,
11268
+ beforeUpload: handleImportPreview,
11269
+ onRemove: () => {
11270
+ setImportBase64("");
11271
+ setImportPreview([]);
11272
+ },
11273
+ children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("p", { className: "text-ant-color-text-secondary", children: "\u62D6\u62FD Excel \u6587\u4EF6\u5230\u6B64\u5904\uFF0C\u6216\u70B9\u51FB\u9009\u62E9\u6587\u4EF6" })
11274
+ }
11275
+ ),
11276
+ importPreview.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "mt-4", children: [
11277
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "mb-2 text-sm font-medium text-ant-color-text", children: "\u5BFC\u5165\u9884\u89C8" }),
11278
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
11279
+ import_antd32.Table,
11280
+ {
11281
+ size: "small",
11282
+ dataSource: importPreview,
11283
+ columns: importPreviewColumns,
11284
+ scroll: { x: Math.max(600, (importPreviewColumns?.length || 0) * 150) },
11285
+ pagination: false,
11286
+ rowKey: (_, index) => String(index)
11287
+ }
11288
+ )
11289
+ ] })
11290
+ ]
11291
+ }
11292
+ ),
11293
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
11294
+ import_antd32.Drawer,
11295
+ {
11296
+ getContainer: false,
11297
+ rootStyle: { position: "absolute" },
11298
+ styles: { body: { padding: 24, overflow: "auto" } },
11299
+ title: recordTab === "import" ? "\u5BFC\u5165\u8BB0\u5F55" : "\u5BFC\u51FA\u8BB0\u5F55",
11300
+ open: recordsOpen,
11301
+ width: 720,
11302
+ onClose: () => setRecordsOpen(false),
11303
+ children: [
10733
11304
  /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10734
11305
  import_antd32.Segmented,
10735
11306
  {
10736
- block: true,
10737
- value: detailOpenMode,
11307
+ value: recordTab,
10738
11308
  options: [
10739
- { label: "\u62BD\u5C49", value: "drawer" },
10740
- { label: "\u65B0\u9875", value: "newPage" }
11309
+ { label: "\u5BFC\u5165\u8BB0\u5F55", value: "import" },
11310
+ { label: "\u5BFC\u51FA\u8BB0\u5F55", value: "export" }
10741
11311
  ],
10742
- onChange: (value) => setDetailOpenMode(value)
11312
+ onChange: (value) => loadTransferRecords(value)
10743
11313
  }
10744
- )
10745
- ] }),
10746
- /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { children: [
10747
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "mb-2 text-sm font-medium text-ant-color-text", children: "\u9875\u5927\u5C0F" }),
11314
+ ),
10748
11315
  /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10749
- import_antd32.Select,
11316
+ import_antd32.Table,
10750
11317
  {
10751
- className: "w-full",
10752
- value: pageSize,
10753
- options: [10, 20, 50, 100].map((value) => ({ label: `${value} \u6761`, value })),
10754
- onChange: setPageSize
11318
+ className: "mt-4",
11319
+ size: "small",
11320
+ dataSource: transferRecords,
11321
+ rowKey: (record) => record.id || record.recordId
10755
11322
  }
10756
11323
  )
10757
- ] })
10758
- ] })
10759
- ] })
10760
- }
10761
- ),
10762
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10763
- import_antd32.Modal,
10764
- {
10765
- getContainer: false,
10766
- title: exportScope === "selected" ? "\u5BFC\u51FA\u9009\u4E2D\u6570\u636E" : "\u5BFC\u51FA\u5168\u90E8\u6570\u636E",
10767
- open: exportOpen,
10768
- onCancel: () => setExportOpen(false),
10769
- footer: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(import_antd32.Space, { children: [
10770
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_antd32.Button, { onClick: () => setExportOpen(false), children: "\u53D6\u6D88" }),
10771
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10772
- import_antd32.Button,
10773
- {
10774
- type: "primary",
10775
- loading: exporting,
10776
- disabled: exportScope === "selected" && selectedRowKeys.length === 0,
10777
- onClick: () => handleExport(exportScope),
10778
- children: exportScope === "selected" ? `\u5BFC\u51FA\u9009\u4E2D (${selectedRowKeys.length})` : "\u5BFC\u51FA\u5168\u90E8"
10779
- }
10780
- )
10781
- ] }),
10782
- children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10783
- import_antd32.Checkbox.Group,
11324
+ ]
11325
+ }
11326
+ ),
11327
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
11328
+ import_antd32.Drawer,
10784
11329
  {
10785
- className: "grid grid-cols-2 gap-2",
10786
- value: exportFields,
10787
- options: fields.map((field) => ({ label: field.label, value: field.fieldId })),
10788
- onChange: (values) => setExportFields(values.map(String))
11330
+ getContainer: false,
11331
+ rootStyle: { position: "absolute" },
11332
+ styles: { body: { padding: 0, overflow: "auto" } },
11333
+ title: "\u8BE6\u60C5",
11334
+ open: detailOpen,
11335
+ width: 720,
11336
+ onClose: () => setDetailOpen(false),
11337
+ destroyOnClose: true,
11338
+ children: activeRecord && detailRenderer ? detailRenderer({
11339
+ record: activeRecord,
11340
+ formInstanceId: String(getRecordId(activeRecord)),
11341
+ onClose: () => setDetailOpen(false)
11342
+ }) : /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_antd32.Empty, { description: "\u8BF7\u901A\u8FC7 detailRenderer \u63A5\u5165\u8BE6\u60C5\u6A21\u677F" })
10789
11343
  }
10790
- )
10791
- }
10792
- ),
10793
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10794
- import_antd32.Modal,
10795
- {
10796
- getContainer: false,
10797
- title: "\u6279\u91CF\u5BA1\u6279",
10798
- open: batchApprovalOpen,
10799
- onCancel: () => setBatchApprovalOpen(false),
10800
- onOk: handleBatchApprovalConfirm,
10801
- okText: batchApprovalAction === "approved" ? "\u786E\u8BA4\u901A\u8FC7" : "\u786E\u8BA4\u62D2\u7EDD",
10802
- confirmLoading: batchApproving,
10803
- children: /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "space-y-4", children: [
10804
- /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "text-sm text-ant-color-text-secondary", children: [
10805
- "\u5DF2\u9009\u62E9 ",
10806
- selectedRowKeys.length,
10807
- " \u6761\u8BB0\u5F55"
10808
- ] }),
10809
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10810
- import_antd32.Segmented,
10811
- {
10812
- block: true,
10813
- value: batchApprovalAction,
10814
- options: [
10815
- { label: "\u540C\u610F", value: "approved" },
10816
- { label: "\u62D2\u7EDD", value: "rejected" }
10817
- ],
10818
- onChange: (value) => setBatchApprovalAction(value)
10819
- }
10820
- ),
10821
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10822
- import_antd32.Input.TextArea,
10823
- {
10824
- value: batchApprovalComments,
10825
- rows: 4,
10826
- maxLength: 500,
10827
- showCount: true,
10828
- placeholder: "\u586B\u5199\u5BA1\u6279\u610F\u89C1",
10829
- onChange: (event) => setBatchApprovalComments(event.target.value)
10830
- }
10831
- )
10832
- ] })
10833
- }
10834
- ),
10835
- /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
10836
- import_antd32.Modal,
10837
- {
10838
- getContainer: false,
10839
- title: "\u5BFC\u5165\u6570\u636E",
10840
- open: importOpen,
10841
- width: 720,
10842
- onCancel: () => setImportOpen(false),
10843
- onOk: handleImportConfirm,
10844
- okButtonProps: { disabled: !importBase64 },
10845
- okText: "\u786E\u8BA4\u5BFC\u5165",
10846
- children: [
10847
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10848
- import_antd32.Upload.Dragger,
10849
- {
10850
- accept: ".xlsx,.xls",
10851
- maxCount: 1,
10852
- beforeUpload: handleImportPreview,
10853
- onRemove: () => {
10854
- setImportBase64("");
10855
- setImportPreview([]);
10856
- },
10857
- children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("p", { className: "text-ant-color-text-secondary", children: "\u62D6\u62FD Excel \u6587\u4EF6\u5230\u6B64\u5904\uFF0C\u6216\u70B9\u51FB\u9009\u62E9\u6587\u4EF6" })
10858
- }
10859
- ),
10860
- importPreview.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "mt-4", children: [
10861
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "mb-2 text-sm font-medium text-ant-color-text", children: "\u5BFC\u5165\u9884\u89C8" }),
10862
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10863
- import_antd32.Table,
10864
- {
10865
- size: "small",
10866
- dataSource: importPreview,
10867
- columns: importPreviewColumns,
10868
- scroll: { x: Math.max(600, (importPreviewColumns?.length || 0) * 150) },
10869
- pagination: false,
10870
- rowKey: (_, index) => String(index)
11344
+ ),
11345
+ /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
11346
+ import_antd32.Drawer,
11347
+ {
11348
+ getContainer: false,
11349
+ rootStyle: { position: "absolute" },
11350
+ styles: { body: { padding: 0, overflow: "auto" } },
11351
+ title: "\u65B0\u589E\u6570\u636E",
11352
+ open: submitOpen,
11353
+ width: 720,
11354
+ onClose: () => setSubmitOpen(false),
11355
+ destroyOnClose: true,
11356
+ children: submitRenderer ? submitRenderer({
11357
+ onClose: () => setSubmitOpen(false),
11358
+ onSubmitted: () => {
11359
+ setSubmitOpen(false);
11360
+ loadData({ current: 1, pageSize });
10871
11361
  }
10872
- )
10873
- ] })
10874
- ]
10875
- }
10876
- ),
10877
- /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(
10878
- import_antd32.Drawer,
10879
- {
10880
- getContainer: false,
10881
- title: recordTab === "import" ? "\u5BFC\u5165\u8BB0\u5F55" : "\u5BFC\u51FA\u8BB0\u5F55",
10882
- open: recordsOpen,
10883
- width: 720,
10884
- onClose: () => setRecordsOpen(false),
10885
- children: [
10886
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10887
- import_antd32.Segmented,
10888
- {
10889
- value: recordTab,
10890
- options: [
10891
- { label: "\u5BFC\u5165\u8BB0\u5F55", value: "import" },
10892
- { label: "\u5BFC\u51FA\u8BB0\u5F55", value: "export" }
10893
- ],
10894
- onChange: (value) => loadTransferRecords(value)
10895
- }
10896
- ),
10897
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10898
- import_antd32.Table,
10899
- {
10900
- className: "mt-4",
10901
- size: "small",
10902
- dataSource: transferRecords,
10903
- rowKey: (record) => record.id || record.recordId
10904
- }
10905
- )
10906
- ]
10907
- }
10908
- ),
10909
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10910
- import_antd32.Drawer,
10911
- {
10912
- getContainer: false,
10913
- title: "\u8BE6\u60C5",
10914
- open: detailOpen,
10915
- width: 720,
10916
- onClose: () => setDetailOpen(false),
10917
- destroyOnClose: true,
10918
- children: activeRecord && detailRenderer ? detailRenderer({
10919
- record: activeRecord,
10920
- formInstanceId: String(getRecordId(activeRecord)),
10921
- onClose: () => setDetailOpen(false)
10922
- }) : /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_antd32.Empty, { description: "\u8BF7\u901A\u8FC7 detailRenderer \u63A5\u5165\u8BE6\u60C5\u6A21\u677F" })
10923
- }
10924
- ),
10925
- /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
10926
- import_antd32.Drawer,
10927
- {
10928
- getContainer: false,
10929
- title: "\u65B0\u589E\u6570\u636E",
10930
- open: submitOpen,
10931
- width: 720,
10932
- onClose: () => setSubmitOpen(false),
10933
- destroyOnClose: true,
10934
- children: submitRenderer ? submitRenderer({
10935
- onClose: () => setSubmitOpen(false),
10936
- onSubmitted: () => {
10937
- setSubmitOpen(false);
10938
- loadData({ current: 1, pageSize });
11362
+ }) : /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_antd32.Empty, { description: "\u8BF7\u901A\u8FC7 submitRenderer \u63A5\u5165\u63D0\u4EA4\u6A21\u677F" })
10939
11363
  }
10940
- }) : /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_antd32.Empty, { description: "\u8BF7\u901A\u8FC7 submitRenderer \u63A5\u5165\u63D0\u4EA4\u6A21\u677F" })
10941
- }
10942
- )
10943
- ] }) });
11364
+ )
11365
+ ]
11366
+ }
11367
+ ) });
10944
11368
  };
10945
11369
 
10946
11370
  // src/templates/FormSubmitTemplate.tsx
@@ -11198,52 +11622,66 @@ var InnerFormContent = ({
11198
11622
  actions,
11199
11623
  inDrawer,
11200
11624
  position: "inline",
11201
- className: "mt-6 -mx-5 -mb-5 rounded-b-lg md:-mx-6 md:-mb-6"
11625
+ className: inDrawer ? "mt-5 -mx-4 -mb-4 rounded-b-lg md:-mx-5 md:-mb-5" : "mt-6 -mx-5 -mb-5 rounded-b-lg md:-mx-6 md:-mb-6"
11202
11626
  }
11203
11627
  ) : null;
11204
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(RuntimePageShell, { inDrawer, children: [
11205
- /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "space-y-6", children: [
11206
- header,
11207
- enableDraft && hasDraft && !submitted && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
11208
- DraftManager,
11209
- {
11210
- hasDraft,
11211
- draftTimestamp,
11212
- onRestore: handleRestoreDraft,
11213
- onDiscard: clearDraft
11214
- }
11215
- ) }),
11216
- !submitted ? /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "rounded-lg border border-ant-border-secondary bg-ant-bg-container p-5 md:p-6", children: [
11217
- departmentSelector,
11218
- beforeForm,
11219
- renderForm ? renderForm({ schema, config }) : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(FormRenderer, { columns: 2 }),
11220
- afterForm,
11221
- actionsNode
11222
- ] }) : successInfo && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
11223
- SubmitSuccessCard,
11224
- {
11225
- info: successInfo,
11226
- mode: submitSuccessMode,
11227
- isRedirecting,
11228
- countdown,
11229
- onContinue: handleContinue,
11230
- onViewDetail: handleViewDetail,
11231
- renderSuccess
11232
- }
11233
- ),
11234
- footer
11235
- ] }),
11236
- /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
11237
- ProcessPreview,
11238
- {
11239
- open: previewOpen,
11240
- routes: previewRoutes,
11241
- loading: previewLoading,
11242
- onClose: () => setPreviewOpen(false),
11243
- onConfirm: handlePreviewConfirm
11244
- }
11245
- )
11246
- ] });
11628
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
11629
+ RuntimePageShell,
11630
+ {
11631
+ inDrawer,
11632
+ maxWidth: inDrawer ? "100%" : 1240,
11633
+ contentClassName: inDrawer ? "px-4 py-4 md:px-5" : "py-4 md:py-6",
11634
+ children: [
11635
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { className: "space-y-6", children: [
11636
+ header,
11637
+ enableDraft && hasDraft && !submitted && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
11638
+ DraftManager,
11639
+ {
11640
+ hasDraft,
11641
+ draftTimestamp,
11642
+ onRestore: handleRestoreDraft,
11643
+ onDiscard: clearDraft
11644
+ }
11645
+ ) }),
11646
+ !submitted ? /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(
11647
+ "div",
11648
+ {
11649
+ className: `rounded-lg border border-ant-border-secondary bg-ant-bg-container ${inDrawer ? "p-4 md:p-5" : "p-5 shadow-sm md:p-6"}`,
11650
+ children: [
11651
+ departmentSelector,
11652
+ beforeForm,
11653
+ renderForm ? renderForm({ schema, config }) : /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(FormRenderer, { columns: 2 }),
11654
+ afterForm,
11655
+ actionsNode
11656
+ ]
11657
+ }
11658
+ ) : successInfo && /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
11659
+ SubmitSuccessCard,
11660
+ {
11661
+ info: successInfo,
11662
+ mode: submitSuccessMode,
11663
+ isRedirecting,
11664
+ countdown,
11665
+ onContinue: handleContinue,
11666
+ onViewDetail: handleViewDetail,
11667
+ renderSuccess
11668
+ }
11669
+ ),
11670
+ footer
11671
+ ] }),
11672
+ /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
11673
+ ProcessPreview,
11674
+ {
11675
+ open: previewOpen,
11676
+ routes: previewRoutes,
11677
+ loading: previewLoading,
11678
+ onClose: () => setPreviewOpen(false),
11679
+ onConfirm: handlePreviewConfirm
11680
+ }
11681
+ )
11682
+ ]
11683
+ }
11684
+ );
11247
11685
  };
11248
11686
  var FormSubmitTemplate = ({
11249
11687
  schema,
@@ -11290,6 +11728,7 @@ var FormSubmitTemplate = ({
11290
11728
 
11291
11729
  // src/templates/FormDetailTemplate.tsx
11292
11730
  var import_react63 = require("react");
11731
+ var import_dayjs6 = __toESM(require("dayjs"));
11293
11732
 
11294
11733
  // src/templates/PageSkeleton.tsx
11295
11734
  var import_antd34 = require("antd");
@@ -11361,6 +11800,11 @@ function FormDataBridge({
11361
11800
  formDataRef.current = getFormData2;
11362
11801
  return null;
11363
11802
  }
11803
+ var formatDateTime2 = (value) => {
11804
+ if (!value || typeof value !== "string") return value || "-";
11805
+ const parsed = (0, import_dayjs6.default)(value);
11806
+ return parsed.isValid() ? parsed.format("YYYY-MM-DD HH:mm:ss") : value;
11807
+ };
11364
11808
  var InnerDetailContent = ({
11365
11809
  schema,
11366
11810
  formUuid,
@@ -11471,14 +11915,36 @@ var InnerDetailContent = ({
11471
11915
  renderSummary && instanceInfo ? renderSummary(instanceInfo) : /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(
11472
11916
  SummaryPanel,
11473
11917
  {
11474
- title: instanceInfo?.title || formData?.instanceTitle || schema.formMeta.title,
11918
+ title: instanceInfo?.title || instanceInfo?.instanceTitle || schema.formMeta.title,
11475
11919
  eyebrow: `\u6570\u636E\u5B9E\u4F8B ${formInstanceId?.slice(0, 8) || "-"}`,
11476
- creator: instanceInfo?.creator ? {
11477
- name: instanceInfo.creator.name,
11478
- avatar: instanceInfo.creator.avatar,
11479
- department: instanceInfo.creator.department
11920
+ creator: instanceInfo?.creator || instanceInfo?.createdByName ? {
11921
+ name: instanceInfo?.creator?.name || instanceInfo?.createdByName,
11922
+ avatar: instanceInfo?.creator?.avatar,
11923
+ department: instanceInfo?.creator?.department || instanceInfo?.createdByDepartmentName
11480
11924
  } : void 0,
11481
- createdAt: instanceInfo?.createdAt,
11925
+ createdAt: formatDateTime2(instanceInfo?.createdAt),
11926
+ metaItems: [
11927
+ {
11928
+ key: "creator",
11929
+ label: "\u521B\u5EFA\u4EBA",
11930
+ value: instanceInfo?.creator?.name || instanceInfo?.createdByName || "\u672A\u77E5\u7528\u6237"
11931
+ },
11932
+ {
11933
+ key: "department",
11934
+ label: "\u521B\u5EFA\u4EBA\u90E8\u95E8",
11935
+ value: instanceInfo?.creator?.department || instanceInfo?.createdByDepartmentName || "-"
11936
+ },
11937
+ {
11938
+ key: "createdAt",
11939
+ label: "\u521B\u5EFA\u65F6\u95F4",
11940
+ value: formatDateTime2(instanceInfo?.createdAt)
11941
+ },
11942
+ {
11943
+ key: "updatedAt",
11944
+ label: "\u66F4\u65B0\u65F6\u95F4",
11945
+ value: formatDateTime2(instanceInfo?.updatedAt)
11946
+ }
11947
+ ],
11482
11948
  status: mode === "edit" ? { label: "\u7F16\u8F91\u4E2D", tone: "brand" } : void 0
11483
11949
  }
11484
11950
  ),
@@ -11826,6 +12292,7 @@ var ProcessDetailTemplate = (props) => {
11826
12292
  defineFormSchema,
11827
12293
  deleteDataManagementRows,
11828
12294
  deleteFormData,
12295
+ downloadDataManagementImportTemplate,
11829
12296
  evaluateEffects,
11830
12297
  exportDataManagementRows,
11831
12298
  extractFormValues,