|
|
@ -1,7 +1,7 @@ |
|
|
|
import React from 'react'; |
|
|
|
import { connect } from 'react-redux'; |
|
|
|
import { Spin, Card, Modal, TreeSelect, message } from 'antd'; |
|
|
|
import ProForm, { ProFormText, ModalForm, ProFormSwitch, ProFormTreeSelect } from '@ant-design/pro-form'; |
|
|
|
import ProForm, { ProFormText, ModalForm, ProFormSwitch, ProFormTreeSelect ,ProFormSelect} from '@ant-design/pro-form'; |
|
|
|
|
|
|
|
const UserModal = (props) => { |
|
|
|
const { visible, modalType, depData, onVisibleChange, onConfirm, editData ,tableList} = props |
|
|
@ -105,10 +105,11 @@ const UserModal = (props) => { |
|
|
|
/> |
|
|
|
</ProForm.Group> |
|
|
|
<ProForm.Group> |
|
|
|
<ProFormTreeSelect |
|
|
|
{/* <ProFormTreeSelect |
|
|
|
name={['contract', 'structure']} |
|
|
|
placeholder="请选择结构物" |
|
|
|
width="md" |
|
|
|
mode="multiple" |
|
|
|
label="关注结构物" |
|
|
|
required |
|
|
|
// fieldNames={{
|
|
|
@ -120,6 +121,7 @@ const UserModal = (props) => { |
|
|
|
|
|
|
|
}} |
|
|
|
fieldProps={{ |
|
|
|
mode: 'multiple', |
|
|
|
fieldNames: { |
|
|
|
label: 'title', |
|
|
|
}, |
|
|
@ -132,7 +134,25 @@ const UserModal = (props) => { |
|
|
|
return opts |
|
|
|
}} |
|
|
|
expandedKeys={["title"]} |
|
|
|
/> |
|
|
|
/> */} |
|
|
|
<ProFormSelect |
|
|
|
width="md" |
|
|
|
label="关注结构物" |
|
|
|
name={['contract', 'structure']} |
|
|
|
mode="multiple" |
|
|
|
// fieldProps={{//这里使用了select的onChange方法,必须使用这样的写法来进行调用onChange方法
|
|
|
|
// onChange:(val) => handleChange(val),
|
|
|
|
// }}
|
|
|
|
|
|
|
|
request={async () => { |
|
|
|
console.log(tableList); |
|
|
|
const opts = tableList?.map(i=>({label:i.name,value:i.id})) |
|
|
|
return opts |
|
|
|
}} |
|
|
|
placeholder="请选择结构物" |
|
|
|
rules={[{ required: true, message: '结构物不能为空' }]} |
|
|
|
/> |
|
|
|
|
|
|
|
<ProFormText |
|
|
|
name={['contract', 'email']} |
|
|
|
width="md" |
|
|
|