From 8f7dd147703c853f0168b1bcfcc153a3b0a6b7e7 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 28 二月 2024 14:49:04 +0800
Subject: [PATCH] #

---
 zy-asrs-flow/src/pages/system/user/components/edit.jsx |   21 +++++++++------------
 1 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/zy-asrs-flow/src/pages/system/user/components/edit.jsx b/zy-asrs-flow/src/pages/system/user/components/edit.jsx
index 52ea22b..77e7cb0 100644
--- a/zy-asrs-flow/src/pages/system/user/components/edit.jsx
+++ b/zy-asrs-flow/src/pages/system/user/components/edit.jsx
@@ -8,18 +8,21 @@
     ProFormTextArea,
     ProFormRadio
 } from '@ant-design/pro-components';
+import { FormattedMessage, useIntl } from '@umijs/max';
 import { Form, Modal } from 'antd';
 import moment from 'moment';
 import Http from '@/utils/http';
 
 const Edit = (props) => {
+    const intl = useIntl();
     const [form] = Form.useForm();
     const { } = props;
 
     useEffect(() => {
         form.resetFields();
         form.setFieldsValue({
-            ...props.values
+            ...props.values,
+            roleIds: props.values.userRoleIds
         })
     }, [form, props])
 
@@ -151,16 +154,6 @@
                         />
                     </ProForm.Group>
                     <ProForm.Group>
-                        {/* <ProFormSelect
-                            name="status"
-                            label="鐘舵��"
-                            colProps={{ md: 12, xl: 12 }}
-                            placeholder="璇烽�夋嫨"
-                            options={[
-                                { label: '姝e父', value: 1 },
-                                { label: '绂佺敤', value: 0 },
-                            ]}
-                        /> */}
                         <ProFormRadio.Group
                             name="status"
                             label="鐘舵��"
@@ -177,7 +170,11 @@
                             label="瑙掕壊"
                             colProps={{ md: 12, xl: 12 }}
                             placeholder="璇烽�夋嫨"
-                            rules={[{ required: true, message: '瑙掕壊涓嶈兘涓虹┖!' }]}
+                            rules={[{ required: true, type: 'array', message: '瑙掕壊涓嶈兘涓虹┖!' }]}
+                            request={async ({ keyWords }) => {
+                                const resp = await Http.doPostForm('api/role/query', { condition: keyWords });
+                                return resp.data;
+                            }}
                         />
                     </ProForm.Group>
                     <ProFormTextArea

--
Gitblit v1.9.1