From ac4341ea6b66ae02427d39d35f41d42d78b2eb2e Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期五, 14 二月 2025 10:08:32 +0800
Subject: [PATCH] #
---
zy-asrs-framework/src/main/resources/templates/react/Edit.txt | 56 ++++++++------------------------------------------------
1 files changed, 8 insertions(+), 48 deletions(-)
diff --git a/zy-asrs-framework/src/main/resources/templates/react/Edit.txt b/zy-asrs-framework/src/main/resources/templates/react/Edit.txt
index aee6263..cf8b9f5 100644
--- a/zy-asrs-framework/src/main/resources/templates/react/Edit.txt
+++ b/zy-asrs-framework/src/main/resources/templates/react/Edit.txt
@@ -7,10 +7,12 @@
ProFormDateTimePicker
} from '@ant-design/pro-components';
import { Form, Modal } from 'antd';
+import { FormattedMessage, useIntl } from '@umijs/max';
import moment from 'moment';
import Http from '@/utils/http';
const Edit = (props) => {
+ const intl = useIntl();
const [form] = Form.useForm();
const { } = props;
@@ -36,7 +38,11 @@
return (
<>
<Modal
- title="Edit"
+ title={
+ Object.keys(props.values).length > 0
+ ? intl.formatMessage({ id: 'page.edit', defaultMessage: '缂栬緫' })
+ : intl.formatMessage({ id: 'page.add', defaultMessage: '娣诲姞' })
+ }
width={640}
forceRender
destroyOnClose
@@ -56,53 +62,7 @@
disabled
hidden={true}
/>
- <ProForm.Group>
- <ProFormText
- name="name"
- label="瑙掕壊鍚嶇О"
- colProps={{ md: 12, xl: 12 }}
- placeholder="璇疯緭鍏�"
- rules={[{ required: true, message: "璇疯緭鍏ヨ鑹插悕绉帮紒" }]}
- />
- <ProFormText
- name="code"
- label="瑙掕壊鏍囪瘑"
- colProps={{ md: 12, xl: 12 }}
- placeholder="璇疯緭鍏�"
- rules={[{ required: true, message: "璇疯緭鍏ヨ鑹叉爣璇嗭紒" }]}
- />
- </ProForm.Group>
- <ProForm.Group>
- <ProFormSelect
- name="status"
- label="鐘舵��"
- colProps={{ md: 12, xl: 12 }}
- options={[
- { label: '姝e父', value: 1 },
- { label: '绂佺敤', value: 0 },
- ]}
- rules={[{ required: true, message: "璇烽�夋嫨鐘舵�侊紒" }]}
- />
- <ProFormDateTimePicker
- name="updateTime"
- label="淇敼鏃堕棿"
- colProps={{ md: 12, xl: 12 }}
- transform={(value) => {
- return moment(value).toISOString();
- }}
- />
- </ProForm.Group>
- <ProFormSelect
- name="hostId"
- label="鏈烘瀯"
- colProps={{ md: 12, xl: 12 }}
- showSearch
- debounceTime={300}
- request={async ({ keyWords }) => {
- const resp = await Http.doPostForm('api/hostId/query', { condition: keyWords });
- return resp.data;
- }}
- />
+@{FORMEDITCOLUMNS}
</ProForm>
</Modal>
</>
--
Gitblit v1.9.1