openxiangda 1.0.58 → 1.0.60
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/package.json
CHANGED
|
@@ -43,14 +43,24 @@ export function FormRoutePage({ mode }: { mode: Mode }) {
|
|
|
43
43
|
if (error) return <DefaultState title="加载失败" description={error} />;
|
|
44
44
|
if (!schema) return <DefaultState title="加载中" description="正在读取表单配置" />;
|
|
45
45
|
|
|
46
|
+
const formType = String(schema?.template?.formType || schema?.formMeta?.formType || "").toLowerCase();
|
|
47
|
+
const isProcessForm = mode === "process" || formType === "process" || formType === "flow";
|
|
48
|
+
const pageMode = mode === "process" ? "process" : mode === "detail" ? "detail" : "submit";
|
|
49
|
+
|
|
46
50
|
return (
|
|
47
51
|
<div className="ox-panel p-5">
|
|
48
52
|
<StandardFormPage
|
|
49
53
|
appType={appType}
|
|
50
54
|
formInstanceId={formInstId}
|
|
51
55
|
formUuid={formUuid}
|
|
52
|
-
mode={
|
|
53
|
-
onSubmitSuccess={id =>
|
|
56
|
+
mode={pageMode}
|
|
57
|
+
onSubmitSuccess={id =>
|
|
58
|
+
navigate(
|
|
59
|
+
isProcessForm
|
|
60
|
+
? `/view/${appType}/admin/process/${formUuid}/${id}`
|
|
61
|
+
: `/view/${appType}/admin/forms/${formUuid}/${id}`,
|
|
62
|
+
)
|
|
63
|
+
}
|
|
54
64
|
schema={schema}
|
|
55
65
|
/>
|
|
56
66
|
</div>
|