forked from Gitlink/forgeplus-react
修改任务发布限制及文档
This commit is contained in:
parent
b633da312d
commit
555ca5c831
|
@ -7,12 +7,18 @@ import "./index.scss";
|
|||
|
||||
export default Form.create()(({ form,current_user, showNotification, match, history }) => {
|
||||
const { getFieldDecorator, validateFields, setFieldsValue } = form;
|
||||
// console.log(history.location.search);
|
||||
let search=history.location.search;
|
||||
let title='协议模板';
|
||||
if(search){
|
||||
title=window.decodeURIComponent(search.split('title=')[1]);
|
||||
}
|
||||
|
||||
const [id,setId]=useState(0);
|
||||
const [content,setContent]=useState(null);
|
||||
|
||||
useEffect(()=>{
|
||||
getAgreement({title:'协议模板'}).then(res=>{
|
||||
getAgreement({title}).then(res=>{
|
||||
if(res.data){
|
||||
setContent(res.data.content);
|
||||
setId(res.data.id);
|
||||
|
@ -66,20 +72,20 @@ export default Form.create()(({ form,current_user, showNotification, match, hist
|
|||
return (
|
||||
<div className="centerbox task-manage agreement-content">
|
||||
{helper(
|
||||
"协议名称",
|
||||
"文档名称",
|
||||
"title",
|
||||
[{ required: true, message: "请输入协议名称" }],
|
||||
[{ required: true, message: "请输入文档名称" }],
|
||||
<Input
|
||||
placeholder={"请输入协议名称"}
|
||||
placeholder={"请输入文档名称"}
|
||||
maxLength={50}
|
||||
disabled
|
||||
/>,
|
||||
"协议模板"
|
||||
title
|
||||
)}
|
||||
|
||||
<Form.Item className="mb0">
|
||||
<MDEditor
|
||||
placeholder={"请输入协议内容"}
|
||||
placeholder={"请输入内容"}
|
||||
height={500}
|
||||
mdID={"order-new-description"}
|
||||
initValue={content}
|
||||
|
@ -87,7 +93,7 @@ export default Form.create()(({ form,current_user, showNotification, match, hist
|
|||
className="mt20"
|
||||
></MDEditor>
|
||||
{getFieldDecorator("content", {
|
||||
rules: [{ required: true, message: "请输入协议内容" }],
|
||||
rules: [{ required: true, message: "请输入内容" }],
|
||||
validateFirst: true,
|
||||
})(<Input style={{ display: "none" }} />)}
|
||||
</Form.Item>
|
||||
|
|
|
@ -330,10 +330,10 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
{helper(
|
||||
"",
|
||||
"name",
|
||||
[{ required: true, message: "请用一句话概括您要做什么?比如:开源项目网站开发,最大限制60个字符" },
|
||||
{ max: 60, message: '长度不能超过60个字符' }],
|
||||
[{ required: true, message: "请用一句话概括您要做什么?比如:开源项目网站开发,最大限制200个字符" },
|
||||
{ max: 200, message: '长度不能超过200个字符' }],
|
||||
<Input
|
||||
placeholder="请用一句话概括您要做什么?比如:开源项目网站开发,最大限制60个字符"
|
||||
placeholder="请用一句话概括您要做什么?比如:开源项目网站开发,最大限制200个字符"
|
||||
/>
|
||||
)}
|
||||
|
||||
|
|
Loading…
Reference in New Issue