parent
ea193c5a2a
commit
9687773d9b
@ -0,0 +1,10 @@ |
|||||||
|
import React from 'react' |
||||||
|
import {connect} from 'umi' |
||||||
|
|
||||||
|
const Index = () => { |
||||||
|
return ( |
||||||
|
<div>index</div> |
||||||
|
) |
||||||
|
} |
||||||
|
|
||||||
|
export default connect(() => ({}))(Index); |
||||||
@ -0,0 +1,92 @@ |
|||||||
|
import { Col, DatePicker, Form, Input, Row, Select, Cascader, InputNumber } from 'antd'; |
||||||
|
import { createRef } from 'react'; |
||||||
|
import type { FormInstance } from 'antd'; |
||||||
|
import { useEffect, forwardRef, useImperativeHandle } from 'react'; |
||||||
|
|
||||||
|
|
||||||
|
const fieldLabels = { |
||||||
|
applicatons: "应用情况", |
||||||
|
directBenefits: "直接经济效益", |
||||||
|
inDirectBenefits: "简介经济效益", |
||||||
|
socialBenefits: "社会效益" |
||||||
|
}; |
||||||
|
|
||||||
|
const Apply = forwardRef((props, ref) => { |
||||||
|
const [form] = Form.useForm(); |
||||||
|
|
||||||
|
const submitRef = createRef<FormInstance>(); |
||||||
|
|
||||||
|
// 校验表单,保存数据
|
||||||
|
const onSave = async (): Promise<boolean> => { |
||||||
|
try { |
||||||
|
var values = await form.validateFields(); // Promise fulfilled result为PromiseResult
|
||||||
|
console.log('succ:', values); |
||||||
|
if (values) { |
||||||
|
// dosomething
|
||||||
|
console.log('basicInfo:', JSON.stringify(values)); |
||||||
|
localStorage.setItem('basicInfo', JSON.stringify(values)); |
||||||
|
} |
||||||
|
return true; |
||||||
|
} catch (err) { |
||||||
|
//rejected
|
||||||
|
console.log('err:', err); |
||||||
|
return false; |
||||||
|
} |
||||||
|
}; |
||||||
|
|
||||||
|
// 页面加载完成后对数据进行加载
|
||||||
|
useEffect(() => { }, []); |
||||||
|
|
||||||
|
useImperativeHandle(ref, () => ({ |
||||||
|
submit: onSave, |
||||||
|
})); |
||||||
|
|
||||||
|
return ( |
||||||
|
<Form form={form} layout="vertical" ref={submitRef} labelCol={{ span: 0 }} labelAlign="left"> |
||||||
|
<Row gutter={{ xs: 8, sm: 16, md: 24, lg: 32 }}> |
||||||
|
<Col span={24}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.applicatons} |
||||||
|
initialValue={""} |
||||||
|
name="applications" |
||||||
|
rules={[{ required: true, message: `请输入${fieldLabels.applicatons}` }]} |
||||||
|
> |
||||||
|
<Input.TextArea maxLength={1000} placeholder={"限1000字"} rows={10} /> |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
<Col span={12}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.directBenefits} |
||||||
|
initialValue={""} |
||||||
|
name="directBenefits" |
||||||
|
rules={[{ required: true, message: `请输入${fieldLabels.applicatons}` }]} |
||||||
|
> |
||||||
|
<Input.TextArea maxLength={350} placeholder={"限350字"} rows={10} /> |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
<Col span={12}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.inDirectBenefits} |
||||||
|
initialValue={""} |
||||||
|
name="inDirectBenefits" |
||||||
|
rules={[{ required: true, message: `请输入${fieldLabels.inDirectBenefits}` }]} |
||||||
|
> |
||||||
|
<Input.TextArea maxLength={350} placeholder={"限350字"} rows={10} /> |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
<Col span={24}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.socialBenefits} |
||||||
|
initialValue={""} |
||||||
|
name="innovation" |
||||||
|
rules={[{ required: true, message: `请输入${fieldLabels.socialBenefits}` }]} |
||||||
|
> |
||||||
|
<Input.TextArea maxLength={350} placeholder={"限350字"} rows={10} /> |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
</Row> |
||||||
|
</Form> |
||||||
|
); |
||||||
|
}); |
||||||
|
|
||||||
|
export default Apply; |
||||||
@ -0,0 +1,143 @@ |
|||||||
|
import ProTable, { ProColumns, TableDropdown } from '@ant-design/pro-table'; |
||||||
|
import { Space, Tag, Button, DatePicker, Select, Col, Row } from 'antd'; |
||||||
|
import User from '@/models/user'; |
||||||
|
import { ActionType } from '@ant-design/pro-table'; |
||||||
|
import { PlusOutlined } from '@ant-design/icons'; |
||||||
|
const genData = () => { |
||||||
|
const data: any = []; |
||||||
|
for (let i = 1; i <= 6; i++) { |
||||||
|
data.push({ |
||||||
|
id: i, |
||||||
|
category: '发明专利', |
||||||
|
fullname: '生物医用可吸收 Mg-Si-Sr-Ca 多元镁合金材料及生产方法和应用', |
||||||
|
region: '中国', |
||||||
|
authorityNumber: 'ZL201310039370.1', |
||||||
|
gainTime: '2014年 12 月 10日', |
||||||
|
certificateNumber: '1543276', |
||||||
|
rightHolder: '中国科学院金属研究所', |
||||||
|
inventor:'刘辰,谭丽丽,杨柯,万鹏,于晓明', |
||||||
|
inventionPatentState:'有效', |
||||||
|
}); |
||||||
|
} |
||||||
|
return data; |
||||||
|
}; |
||||||
|
|
||||||
|
const columns: ProColumns[] = [ |
||||||
|
{ |
||||||
|
dataIndex: 'index', |
||||||
|
valueType: 'indexBorder', |
||||||
|
width: 48, |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '知识产权(标准)类别', |
||||||
|
dataIndex: 'category', |
||||||
|
formItemProps: { |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
required: true, |
||||||
|
message: '此项为必填项', |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '知识产权(标准)具体名称', |
||||||
|
dataIndex: 'fullname', |
||||||
|
hideInSearch: true, |
||||||
|
filters: true, |
||||||
|
onFilter: true, |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '国家(地区)', |
||||||
|
dataIndex: 'region', |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '授权号(标准编号)', |
||||||
|
dataIndex: 'authorityNumber', |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '授权(标准发布)日期', |
||||||
|
dataIndex: 'gainTime', |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '证书编号(标准批准发布部门)', |
||||||
|
dataIndex: 'certificateNumber', |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '权利人(标准起草单位)', |
||||||
|
dataIndex: 'rightHolder', |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '发明人(标准起草人)', |
||||||
|
dataIndex: 'inventor', |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '发明专利(标准)有效状态', |
||||||
|
dataIndex: 'inventionPatentState', |
||||||
|
}, |
||||||
|
{ |
||||||
|
title: '操作', |
||||||
|
valueType: 'option', |
||||||
|
render: (text, record, _, action) => [ |
||||||
|
<a |
||||||
|
key="editable" |
||||||
|
onClick={() => { |
||||||
|
action?.startEditable?.(record.id); |
||||||
|
}} |
||||||
|
> |
||||||
|
编辑 |
||||||
|
</a>, |
||||||
|
], |
||||||
|
}, |
||||||
|
]; |
||||||
|
|
||||||
|
export default () => { |
||||||
|
// const actionRef = useRef<ActionType>();
|
||||||
|
return ( |
||||||
|
<ProTable<defs.UserInfoVO> |
||||||
|
columns={columns} |
||||||
|
// actionRef={actionRef}
|
||||||
|
request={(params, sorter, filter) => { |
||||||
|
// 表单搜索项会从 params 传入,传递给后端接口。
|
||||||
|
console.log(params, sorter, filter); |
||||||
|
return Promise.resolve({ |
||||||
|
data: genData(), |
||||||
|
}); |
||||||
|
}} |
||||||
|
editable={{ |
||||||
|
type: 'multiple', |
||||||
|
}} |
||||||
|
columnsState={{ |
||||||
|
persistenceKey: 'pro-table-singe-demos', |
||||||
|
persistenceType: 'localStorage', |
||||||
|
}} |
||||||
|
rowKey="id" |
||||||
|
// search={{
|
||||||
|
// labelWidth: 'auto',
|
||||||
|
// }}
|
||||||
|
search={false} |
||||||
|
form={{ |
||||||
|
// 由于配置了 transform,提交的参与与定义的不同这里需要转化一下
|
||||||
|
syncToUrl: (values, type) => { |
||||||
|
if (type === 'get') { |
||||||
|
return { |
||||||
|
...values, |
||||||
|
created_at: [values.startTime, values.endTime], |
||||||
|
}; |
||||||
|
} |
||||||
|
return values; |
||||||
|
}, |
||||||
|
}} |
||||||
|
pagination={{ |
||||||
|
pageSize: 5, |
||||||
|
}} |
||||||
|
dateFormatter="string" |
||||||
|
headerTitle="数据" |
||||||
|
toolBarRender={() => [ |
||||||
|
<Button key="button" icon={<PlusOutlined />} type="primary"> |
||||||
|
新建 |
||||||
|
</Button>, |
||||||
|
]} |
||||||
|
/> |
||||||
|
); |
||||||
|
}; |
||||||
@ -0,0 +1,83 @@ |
|||||||
|
import { Col, DatePicker, Form, Input, Row, Select, Cascader, InputNumber } from 'antd'; |
||||||
|
import { createRef } from 'react'; |
||||||
|
import type { FormInstance } from 'antd'; |
||||||
|
import { useEffect, forwardRef, useImperativeHandle } from 'react'; |
||||||
|
|
||||||
|
const { RangePicker } = DatePicker; |
||||||
|
|
||||||
|
const fieldLabels = { |
||||||
|
introduction: "简介", |
||||||
|
trick: "技术局限性", |
||||||
|
innovation: "技术创新", |
||||||
|
conmention: "第三方评价" |
||||||
|
}; |
||||||
|
|
||||||
|
const Introduce = forwardRef((props, ref) => { |
||||||
|
const [form] = Form.useForm(); |
||||||
|
|
||||||
|
const submitRef = createRef<FormInstance>(); |
||||||
|
|
||||||
|
// 校验表单,保存数据
|
||||||
|
const onSave = async (): Promise<boolean> => { |
||||||
|
try { |
||||||
|
var values = await form.validateFields(); // Promise fulfilled result为PromiseResult
|
||||||
|
console.log('succ:', values); |
||||||
|
if (values) { |
||||||
|
// dosomething
|
||||||
|
console.log('basicInfo:', JSON.stringify(values)); |
||||||
|
localStorage.setItem('basicInfo', JSON.stringify(values)); |
||||||
|
} |
||||||
|
return true; |
||||||
|
} catch (err) { |
||||||
|
//rejected
|
||||||
|
console.log('err:', err); |
||||||
|
return false; |
||||||
|
} |
||||||
|
}; |
||||||
|
|
||||||
|
// 页面加载完成后对数据进行加载
|
||||||
|
useEffect(() => { }, []); |
||||||
|
|
||||||
|
useImperativeHandle(ref, () => ({ |
||||||
|
submit: onSave, |
||||||
|
})); |
||||||
|
|
||||||
|
return ( |
||||||
|
<Form form={form} layout="vertical" ref={submitRef} labelCol={{ span: 0 }} labelAlign="left"> |
||||||
|
<Row gutter={{ xs: 8, sm: 16, md: 24, lg: 32 }}> |
||||||
|
<Col span={12}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.introduction} |
||||||
|
initialValue={""} |
||||||
|
name="introduction" |
||||||
|
rules={[{ required: true, message: '请输入简介' }]} |
||||||
|
> |
||||||
|
<Input.TextArea maxLength={1000} placeholder={"限1000字"} rows={10}/> |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
<Col span={12}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.trick} |
||||||
|
initialValue={""} |
||||||
|
name="trick" |
||||||
|
rules={[{ required: true, message: '请输入简介' }]} |
||||||
|
> |
||||||
|
<Input.TextArea maxLength={1000} placeholder={"限1000字"} rows={10}/> |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
<Col span={24}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.innovation} |
||||||
|
initialValue={""} |
||||||
|
name="innovation" |
||||||
|
rules={[{ required: true, message: '请输入简介' }]} |
||||||
|
> |
||||||
|
<Input.TextArea maxLength={1000} placeholder={"限1000字"} rows={10}/> |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
</Row> |
||||||
|
</Form> |
||||||
|
); |
||||||
|
}); |
||||||
|
|
||||||
|
export default Introduce; |
||||||
@ -0,0 +1,418 @@ |
|||||||
|
import { Col, DatePicker, Form, Input, Row, Select, Cascader, InputNumber, Radio } from 'antd'; |
||||||
|
import { createRef } from 'react'; |
||||||
|
import type { FormInstance } from 'antd'; |
||||||
|
import { useEffect, forwardRef, useImperativeHandle } from 'react'; |
||||||
|
import provice from '../Public/regionSelect' |
||||||
|
|
||||||
|
const { RangePicker } = DatePicker; |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const fieldLabels = { |
||||||
|
name: '姓名', |
||||||
|
sex: '性别', |
||||||
|
rank: '排名', |
||||||
|
nationality: '国籍', |
||||||
|
birthDate: '出生年月', |
||||||
|
birthPlace: '出生地', |
||||||
|
ehnic: '民族', |
||||||
|
IDnumber: '身份证号', |
||||||
|
returnPerson: '归国人员', |
||||||
|
returnTime: '归国时间', |
||||||
|
technicalTitle: '技术职称', |
||||||
|
highestDegree_xueli: '最高学历', |
||||||
|
highestDegree_xuewei: '最高学位', |
||||||
|
graduateSchool: '毕业学校', |
||||||
|
graduateTime: '毕业时间', |
||||||
|
majorOfStudy: '所学专业', |
||||||
|
email: '电子邮箱', |
||||||
|
officePhone: '办公电话', |
||||||
|
mobilePhone: '移动电话', |
||||||
|
correspondenceAddress: '通讯地址', |
||||||
|
zipCode: '邮政编码', |
||||||
|
workUnit: '工作单位', |
||||||
|
administrativeTitle: '行政职务', |
||||||
|
secondaryUnit: '二级单位', |
||||||
|
partisan: '党派', |
||||||
|
completingUnit: '完成单位', |
||||||
|
location: '所在地', |
||||||
|
unitProperties: '单位性质', |
||||||
|
theStartAndEndTime: '参加本项目的起止时间', |
||||||
|
contributonTo: '对本项目主要科技创新的贡献', |
||||||
|
awardsAndHonorary: '曾获奖励及荣誉称号情况', |
||||||
|
}; |
||||||
|
|
||||||
|
const MainCompleters = forwardRef((props, ref) => { |
||||||
|
const [form] = Form.useForm(); |
||||||
|
|
||||||
|
const submitRef = createRef<FormInstance>(); |
||||||
|
|
||||||
|
// 校验表单,保存数据
|
||||||
|
const onSave = async (): Promise<boolean> => { |
||||||
|
try { |
||||||
|
console.log(form.getFieldValue('sex')) |
||||||
|
var values = await form.validateFields(); // Promise fulfilled result为PromiseResult
|
||||||
|
console.log('succ:', values); |
||||||
|
if (values) { |
||||||
|
// dosomething
|
||||||
|
console.log('basicInfo:', JSON.stringify(values)); |
||||||
|
localStorage.setItem('basicInfo', JSON.stringify(values)); |
||||||
|
} |
||||||
|
return true; |
||||||
|
} catch (err) { |
||||||
|
//rejected
|
||||||
|
console.log('err:', err); |
||||||
|
return false; |
||||||
|
} |
||||||
|
}; |
||||||
|
|
||||||
|
// 页面加载完成后对数据进行加载
|
||||||
|
useEffect(() => { }, []); |
||||||
|
|
||||||
|
useImperativeHandle(ref, () => ({ |
||||||
|
submit: onSave, |
||||||
|
})); |
||||||
|
|
||||||
|
return ( |
||||||
|
<Form form={form} layout="vertical" ref={submitRef}> |
||||||
|
<Row gutter={{ xs: 8, sm: 16, md: 24, lg: 32 }}> |
||||||
|
{/* 设备分类 */} |
||||||
|
<Col span={6}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.name} |
||||||
|
name="name" |
||||||
|
rules={[{ required: true, message: '请输入姓名' }]} |
||||||
|
> |
||||||
|
<Input placeholder="最多只能输入10字" /> |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
<Col span={6}> |
||||||
|
<Form.Item |
||||||
|
initialValue={"男"} |
||||||
|
label={fieldLabels.sex} |
||||||
|
name="sex" |
||||||
|
rules={[{ required: true, message: '请选择性别' }]} |
||||||
|
> |
||||||
|
<Radio.Group name="radiogroup" defaultValue={1}> |
||||||
|
<Radio value={"男"} checked>男</Radio> |
||||||
|
<Radio value={"女"}>女</Radio> |
||||||
|
</Radio.Group> |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
<Col span={6}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.rank} |
||||||
|
name="rank" |
||||||
|
rules={[{ required: true, message: '请输入排名' }]} |
||||||
|
> |
||||||
|
<InputNumber min={1} defaultValue={1} /> |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
<Col span={6}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.nationality} |
||||||
|
name="nationality" |
||||||
|
rules={[{ required: true, message: '请选择国籍' }]} |
||||||
|
> |
||||||
|
<Cascader |
||||||
|
options={[ |
||||||
|
{ |
||||||
|
label: '中国', |
||||||
|
value: '中国', |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '美国', |
||||||
|
value: '美国', |
||||||
|
}, |
||||||
|
{ |
||||||
|
label: '日本', |
||||||
|
value: '日本', |
||||||
|
}, |
||||||
|
]} |
||||||
|
placeholder="请选择国籍" |
||||||
|
/> |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
<Col span={6}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.birthDate} |
||||||
|
name="birthDate" |
||||||
|
rules={[{ required: true, message: '请选出生年月' }]} |
||||||
|
> |
||||||
|
<DatePicker placeholder="请选出生年月" /> |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
{/* 设备分类 */} |
||||||
|
<Col span={6}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.birthPlace} |
||||||
|
name="birthPlace" |
||||||
|
rules={[{ required: true, message: '请选择推荐单位' }]} |
||||||
|
> |
||||||
|
<Cascader |
||||||
|
options={provice} |
||||||
|
placeholder="请选择推荐单位" |
||||||
|
/> |
||||||
|
{console.log(provice)} |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
<Col span={6}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.ehnic} |
||||||
|
name="ehnic" |
||||||
|
rules={[{ required: true, message: '请选择推荐等级' }]} |
||||||
|
> |
||||||
|
<Select placeholder="请选择推荐等级"> |
||||||
|
<Select.Option value={'1级'}>1级</Select.Option> |
||||||
|
</Select> |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
<Col span={6}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.IDnumber} |
||||||
|
name="IDnumber" |
||||||
|
rules={[{ required: true, message: '请选择推荐日期' }]} |
||||||
|
> |
||||||
|
<DatePicker placeholder="请选择推荐日期"></DatePicker> |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
|
||||||
|
<Col span={6}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.returnPerson} |
||||||
|
name="returnPerson" |
||||||
|
rules={[{ required: true, message: '请选择主管部门' }]} |
||||||
|
> |
||||||
|
<Cascader |
||||||
|
options={[ |
||||||
|
{ |
||||||
|
children: [], |
||||||
|
isLeaf: true, |
||||||
|
title: '单位1', |
||||||
|
label: '单位1', |
||||||
|
value: '1', |
||||||
|
}, |
||||||
|
]} |
||||||
|
placeholder="请选择主管部门" |
||||||
|
/> |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
<Col span={6}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.returnTime} |
||||||
|
name="returnTime" |
||||||
|
rules={[{ required: true, message: '请输入成果登记号' }]} |
||||||
|
> |
||||||
|
<Input placeholder="请输入成果登记号"></Input> |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
<Col span={6}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.technicalTitle} |
||||||
|
name="technicalTitle" |
||||||
|
rules={[{ required: true, message: '请选择任务来源' }]} |
||||||
|
> |
||||||
|
<Select placeholder={'请选择任务来源'}> |
||||||
|
<Select.Option value={'1级'}>1级</Select.Option> |
||||||
|
</Select> |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
<Col span={6}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.highestDegree_xueli} |
||||||
|
name="highestDegree_xueli" |
||||||
|
rules={[{ required: true, message: '请选择专业分类' }]} |
||||||
|
> |
||||||
|
<Select placeholder={'请选择专业分类'}> |
||||||
|
<Select.Option value={'1级'}>1级</Select.Option> |
||||||
|
</Select> |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
<Col span={12}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.highestDegree_xuewei} |
||||||
|
name="highestDegree_xuewei" |
||||||
|
rules={[{ required: true, message: '请输入主题词' }]} |
||||||
|
> |
||||||
|
<Input placeholder="请输入主题词"></Input> |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
|
||||||
|
<Col span={12}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.graduateSchool} |
||||||
|
name="graduateSchool" |
||||||
|
rules={[{ required: true, message: '请选择项目起止日期' }]} |
||||||
|
> |
||||||
|
<RangePicker /> |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
<Col span={6}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.graduateTime} |
||||||
|
name="graduateTime" |
||||||
|
rules={[{ required: true, message: '请输入计划名称' }]} |
||||||
|
> |
||||||
|
<Input placeholder="请输入计划名称"></Input> |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
<Col span={6}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.majorOfStudy} |
||||||
|
name="majorOfStudy" |
||||||
|
rules={[{ required: true, message: '请输入计划编号' }]} |
||||||
|
> |
||||||
|
<Input placeholder="请输入计划编号"></Input> |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
|
||||||
|
<Col span={6}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.email} |
||||||
|
name="email" |
||||||
|
rules={[{ required: true, message: '请选择应用领域' }]} |
||||||
|
> |
||||||
|
<Select placeholder={'请选择应用领域'}> |
||||||
|
<Select.Option value={'1级'}>1级</Select.Option> |
||||||
|
</Select> |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
<Col span={6}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.officePhone} |
||||||
|
name="officePhone" |
||||||
|
rules={[{ required: true, message: '请选择应用日期' }]} |
||||||
|
> |
||||||
|
<DatePicker placeholder="请选择应用日期"></DatePicker> |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
<Col span={6}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.mobilePhone} |
||||||
|
name="mobilePhone" |
||||||
|
rules={[{ required: true, message: '请选择成果评价机构' }]} |
||||||
|
> |
||||||
|
<Select placeholder={'请选择成果评价机构'}> |
||||||
|
<Select.Option value={'1级'}>1级</Select.Option> |
||||||
|
</Select> |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
<Col span={6}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.correspondenceAddress} |
||||||
|
name="correspondenceAddress" |
||||||
|
rules={[{ required: true, message: '请选择评价水平' }]} |
||||||
|
> |
||||||
|
<Select placeholder={'请选择评价水平'}> |
||||||
|
<Select.Option value={'1级'}>1级</Select.Option> |
||||||
|
</Select> |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
<Col span={12}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.zipCode} |
||||||
|
name="zipCode" |
||||||
|
rules={[{ required: true, message: '请选择评价日期' }]} |
||||||
|
> |
||||||
|
<DatePicker placeholder="请选择评价日期"></DatePicker> |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
<Col span={6} style={{ marginBottom: '40px' }}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.workUnit} |
||||||
|
initialValue={0} |
||||||
|
name="workUnit" |
||||||
|
rules={[{ required: true, message: '请输入授权的其他知识产权' }]} |
||||||
|
> |
||||||
|
<InputNumber defaultValue={0} min={0}></InputNumber>项 |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
<Col span={6} style={{ marginBottom: '40px' }}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.administrativeTitle} |
||||||
|
initialValue={0} |
||||||
|
name="administrativeTitle" |
||||||
|
rules={[{ required: true, message: '请输入授权发明专利' }]} |
||||||
|
> |
||||||
|
<InputNumber defaultValue={0} min={0}></InputNumber>项 |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
<Col span={6} style={{ marginBottom: '40px' }}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.secondaryUnit} |
||||||
|
initialValue={0} |
||||||
|
name="secondaryUnit" |
||||||
|
rules={[{ required: true, message: '请输入授权发明专利' }]} |
||||||
|
> |
||||||
|
<InputNumber defaultValue={0} min={0}></InputNumber>项 |
||||||
|
</Form.Item> |
||||||
|
</Col> <Col span={6} style={{ marginBottom: '40px' }}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.partisan} |
||||||
|
initialValue={0} |
||||||
|
name="partisan" |
||||||
|
rules={[{ required: true, message: '请输入授权发明专利' }]} |
||||||
|
> |
||||||
|
<InputNumber defaultValue={0} min={0}></InputNumber>项 |
||||||
|
</Form.Item> |
||||||
|
</Col> <Col span={6} style={{ marginBottom: '40px' }}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.completingUnit} |
||||||
|
initialValue={0} |
||||||
|
name="completingUnit" |
||||||
|
rules={[{ required: true, message: '请输入授权发明专利' }]} |
||||||
|
> |
||||||
|
<InputNumber defaultValue={0} min={0}></InputNumber>项 |
||||||
|
</Form.Item> |
||||||
|
</Col> <Col span={6} style={{ marginBottom: '40px' }}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.location} |
||||||
|
initialValue={0} |
||||||
|
name="location" |
||||||
|
rules={[{ required: true, message: '请输入授权发明专利' }]} |
||||||
|
> |
||||||
|
<InputNumber defaultValue={0} min={0}></InputNumber>项 |
||||||
|
</Form.Item> |
||||||
|
</Col> <Col span={6} style={{ marginBottom: '40px' }}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.unitProperties} |
||||||
|
initialValue={0} |
||||||
|
name="unitProperties" |
||||||
|
rules={[{ required: true, message: '请输入授权发明专利' }]} |
||||||
|
> |
||||||
|
<InputNumber defaultValue={0} min={0}></InputNumber>项 |
||||||
|
</Form.Item> |
||||||
|
</Col> <Col span={6} style={{ marginBottom: '40px' }}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.theStartAndEndTime} |
||||||
|
initialValue={0} |
||||||
|
name="theStartAndEndTime" |
||||||
|
rules={[{ required: true, message: '请输入授权发明专利' }]} |
||||||
|
> |
||||||
|
<InputNumber defaultValue={0} min={0}></InputNumber>项 |
||||||
|
</Form.Item> |
||||||
|
</Col> <Col span={6} style={{ marginBottom: '40px' }}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.contributonTo} |
||||||
|
initialValue={0} |
||||||
|
name="contributonTo" |
||||||
|
rules={[{ required: true, message: '请输入授权发明专利' }]} |
||||||
|
> |
||||||
|
<InputNumber defaultValue={0} min={0}></InputNumber>项 |
||||||
|
</Form.Item> |
||||||
|
</Col> <Col span={6} style={{ marginBottom: '40px' }}> |
||||||
|
<Form.Item |
||||||
|
label={fieldLabels.awardsAndHonorary} |
||||||
|
initialValue={0} |
||||||
|
name="awardsAndHonorary" |
||||||
|
rules={[{ required: true, message: '请输入授权发明专利' }]} |
||||||
|
> |
||||||
|
<InputNumber defaultValue={0} min={0}></InputNumber>项 |
||||||
|
</Form.Item> |
||||||
|
</Col> |
||||||
|
</Row> |
||||||
|
</Form> |
||||||
|
); |
||||||
|
}); |
||||||
|
|
||||||
|
export default MainCompleters; |
||||||
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,4 @@ |
|||||||
import * as defs from './baseClass'; |
import * as defs from './baseClass'; |
||||||
import './mods/'; |
import './mods/'; |
||||||
|
|
||||||
window.defs = defs; |
(window as any).defs = defs; |
||||||
|
|||||||
@ -1,13 +1,15 @@ |
|||||||
import * as auth from './auth'; |
import * as auth from './auth'; |
||||||
import * as captcha from './captcha'; |
import * as captcha from './captcha'; |
||||||
import * as menu from './menu'; |
import * as menu from './menu'; |
||||||
|
import * as project from './project'; |
||||||
import * as test from './test'; |
import * as test from './test'; |
||||||
import * as user from './user'; |
import * as user from './user'; |
||||||
|
|
||||||
window.API = { |
(window as any).API = { |
||||||
auth, |
auth, |
||||||
captcha, |
captcha, |
||||||
menu, |
menu, |
||||||
|
project, |
||||||
test, |
test, |
||||||
user, |
user, |
||||||
}; |
}; |
||||||
|
|||||||
@ -0,0 +1,6 @@ |
|||||||
|
/** |
||||||
|
* @description Project Controller |
||||||
|
*/ |
||||||
|
import * as saveProject from './saveProject'; |
||||||
|
|
||||||
|
export { saveProject }; |
||||||
@ -0,0 +1,25 @@ |
|||||||
|
import fetch from '../../../utils/request'; |
||||||
|
import { RequestOptionsInit } from 'umi-request'; |
||||||
|
|
||||||
|
export const URL = '/api/project'; |
||||||
|
|
||||||
|
/** |
||||||
|
* @desc 保存project数据 |
||||||
|
*/ |
||||||
|
export function request( |
||||||
|
bodyParams: defs.ProjectEntityObject, |
||||||
|
options?: RequestOptionsInit, |
||||||
|
) { |
||||||
|
const fetchOption = Object.assign( |
||||||
|
{ |
||||||
|
method: 'POST', |
||||||
|
headers: { |
||||||
|
'Content-Type': 'application/json', |
||||||
|
}, |
||||||
|
|
||||||
|
data: bodyParams, |
||||||
|
}, |
||||||
|
options, |
||||||
|
); |
||||||
|
return fetch('/api/project', fetchOption); |
||||||
|
} |
||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue