From 8527d83c19bf5047a0e6dfd1363d74b51acb0e8e Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期日, 18 二月 2024 16:29:27 +0800
Subject: [PATCH] #

---
 zy-asrs-flow/src/pages/system/role/components/edit.jsx |   77 +++++++++++++++++++++++++-------------
 1 files changed, 51 insertions(+), 26 deletions(-)

diff --git a/zy-asrs-flow/src/pages/system/role/components/edit.jsx b/zy-asrs-flow/src/pages/system/role/components/edit.jsx
index c362075..7dca9b1 100644
--- a/zy-asrs-flow/src/pages/system/role/components/edit.jsx
+++ b/zy-asrs-flow/src/pages/system/role/components/edit.jsx
@@ -1,18 +1,18 @@
-import React, { useEffect, useState } from 'react';
+import React, { useState, useRef, useEffect } from 'react';
 import {
     ProForm,
     ProFormDigit,
     ProFormText,
-    ProFormRadio,
-    ProFormTextArea,
+    ProFormSelect,
+    ProFormDateTimePicker
 } from '@ant-design/pro-components';
 import { Form, Modal } from 'antd';
-import { useIntl, FormattedMessage } from '@umijs/max';
+import moment from 'moment';
+import Http from '@/utils/http';
 
 const Edit = (props) => {
     const [form] = Form.useForm();
     const { } = props;
-    const intl = useIntl();
 
     useEffect(() => {
         form.resetFields();
@@ -56,27 +56,52 @@
                         disabled
                         hidden={true}
                     />
-                    <ProFormText
-                        name="name"
-                        label="瑙掕壊鍚嶇О"
-                        placeholder="璇疯緭鍏�"
-                        rules={[
-                            {
-                                required: true,
-                                message: "璇疯緭鍏ヨ鑹插悕绉帮紒",
-                            },
-                        ]}
-                    />
-                    <ProFormText
-                        name="code"
-                        label="瑙掕壊鏍囪瘑"
-                        placeholder="璇疯緭鍏�"
-                        rules={[
-                            {
-                                required: true,
-                                message: "璇疯緭鍏ヨ鑹叉爣璇嗭紒",
-                            },
-                        ]}
+                    <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/host/query', { condition: keyWords });
+                            return resp.data;
+                        }}
                     />
                 </ProForm>
             </Modal>

--
Gitblit v1.9.1