|
|
@ -23,7 +23,6 @@ const ProjectModal = (props) => { |
|
|
|
const [records, setRecords] = useState()//处理
|
|
|
|
const [recordsay, setRecordsay] = useState()//必填数据
|
|
|
|
const [success, setSuccess] = useState() //状态
|
|
|
|
const [flage, setFlage] = useState() //xiangmujinzhan
|
|
|
|
useEffect(() => { |
|
|
|
const array = [] |
|
|
|
if (rewkeys === 'road') { |
|
|
@ -78,40 +77,39 @@ const ProjectModal = (props) => { |
|
|
|
visible={visible} |
|
|
|
onVisibleChange={onVisibleChange} |
|
|
|
onFinish={(values) => { |
|
|
|
console.log(values) |
|
|
|
if (rewkeys === 'road') { |
|
|
|
if (typecard == '111') { |
|
|
|
setDelet(values) |
|
|
|
setDelet(values) |
|
|
|
|
|
|
|
const query = { ...values, type:rewkeys } |
|
|
|
const query = { ...values, type:rewkeys,projectId:records?.[0]?.value || '' } |
|
|
|
dispatch(putProject(query)).then((res) => { |
|
|
|
setSuccess(res.success) |
|
|
|
|
|
|
|
}) |
|
|
|
return success |
|
|
|
return true |
|
|
|
} else { |
|
|
|
setDelet(values) |
|
|
|
const query = { ...values, type:rewkeys } |
|
|
|
dispatch(putProject(query)).then((res) => { |
|
|
|
setSuccess(res.success) |
|
|
|
|
|
|
|
}) |
|
|
|
return success |
|
|
|
return true |
|
|
|
} |
|
|
|
} |
|
|
|
if (rewkeys === 'bridge') { |
|
|
|
if (typecard == '111') { |
|
|
|
setDelet(values) |
|
|
|
const query = { ...values, type:rewkeys } |
|
|
|
const query = { ...values, type:rewkeys,projectId:records?.[0]?.value || '' } |
|
|
|
dispatch(putProject(query)).then((res) => { |
|
|
|
setSuccess(res.success) |
|
|
|
|
|
|
|
}) |
|
|
|
return success |
|
|
|
return true |
|
|
|
} else { |
|
|
|
setDelet(values) |
|
|
|
const query = { ...values, type:rewkeys } |
|
|
|
dispatch(putProject(query)).then((res) => { |
|
|
|
setSuccess(res.success) |
|
|
|
|
|
|
|
}) |
|
|
|
return success |
|
|
|
return true |
|
|
|
} |
|
|
|
} |
|
|
|
}} |
|
|
@ -127,7 +125,7 @@ const ProjectModal = (props) => { |
|
|
|
|
|
|
|
placeholder="请输入名称" |
|
|
|
// value={recordsay?.[0]?.value}
|
|
|
|
rules={[{ required: true, message: "必填" }]} |
|
|
|
// rules={[{ required: true, message: "必填" }]}
|
|
|
|
/><ProFormText |
|
|
|
name={newlys?.[1]?.type} |
|
|
|
width="md" |
|
|
@ -135,7 +133,7 @@ const ProjectModal = (props) => { |
|
|
|
|
|
|
|
placeholder="请输入名称" |
|
|
|
// value={recordsay?.[1]?.value}
|
|
|
|
rules={[{ required: true, message: "必填" }]} |
|
|
|
// rules={[{ required: true, message: "必填" }]}
|
|
|
|
/> |
|
|
|
<ProFormSelect |
|
|
|
options={[ |
|
|
@ -150,6 +148,7 @@ const ProjectModal = (props) => { |
|
|
|
width="xs" |
|
|
|
name='done' |
|
|
|
label='是否已完成' |
|
|
|
rules={[{ required: true, message: "必填" }]} |
|
|
|
/> |
|
|
|
{newlysay?.map((item, index) => { |
|
|
|
return <ProFormText width="md" |
|
|
@ -167,7 +166,7 @@ const ProjectModal = (props) => { |
|
|
|
|
|
|
|
placeholder="请输入名称" |
|
|
|
// value={recordssy?.[0]?.value}
|
|
|
|
rules={[{ required: true, message: "必填" }]} |
|
|
|
// rules={[{ required: true, message: "必填" }]}
|
|
|
|
/><ProFormText |
|
|
|
name={newlys?.[1]?.type} |
|
|
|
width="md" |
|
|
@ -175,7 +174,7 @@ const ProjectModal = (props) => { |
|
|
|
|
|
|
|
placeholder="请输入名称" |
|
|
|
// value={recordssy?.[1]?.value}
|
|
|
|
rules={[{ required: true, message: "必填" }]} |
|
|
|
// rules={[{ required: true, message: "必填" }]}
|
|
|
|
/> |
|
|
|
<ProFormSelect |
|
|
|
options={[ |
|
|
@ -190,6 +189,7 @@ const ProjectModal = (props) => { |
|
|
|
width="xs" |
|
|
|
name='done' |
|
|
|
label='是否已完成' |
|
|
|
rules={[{ required: true, message: "必填" }]} |
|
|
|
/> |
|
|
|
{newlysay?.map((item, index) => { |
|
|
|
return <ProFormText width="md" |
|
|
|