2022/3/21 界面差不多写完了,差数据和权限

master
GPU is all you need 4 years ago
parent ea193c5a2a
commit 9687773d9b
  1. 2
      awardFE/package.json
  2. 2
      awardFE/pont-config.json
  3. 2
      awardFE/src/pages/Authorized.tsx
  4. 10
      awardFE/src/pages/login/Index.tsx
  5. 92
      awardFE/src/pages/projectDeclare/components/Apply/index.tsx
  6. 2
      awardFE/src/pages/projectDeclare/components/BaseInfo/index.tsx
  7. 143
      awardFE/src/pages/projectDeclare/components/IntellectualProperty/index.tsx
  8. 83
      awardFE/src/pages/projectDeclare/components/Introduce/index.tsx
  9. 418
      awardFE/src/pages/projectDeclare/components/MainCompleters/index.tsx
  10. 7237
      awardFE/src/pages/projectDeclare/components/Public/regionSelect.tsx
  11. 7
      awardFE/src/pages/projectDeclare/index.less
  12. 18
      awardFE/src/pages/projectDeclare/index.tsx
  13. 1
      awardFE/src/pages/user/Login/model.ts
  14. 227
      awardFE/src/services/api.d.ts
  15. 131
      awardFE/src/services/baseClass.ts
  16. 0
      awardFE/src/services/cxzC
  17. 2
      awardFE/src/services/index.ts
  18. 4
      awardFE/src/services/mods/index.ts
  19. 6
      awardFE/src/services/mods/project/index.ts
  20. 25
      awardFE/src/services/mods/project/saveProject.ts
  21. 3098
      awardFE/src/services/undefined

@ -98,7 +98,7 @@
"gh-pages": "^3.2.0",
"jsdom-global": "^3.0.0",
"lint-staged": "^10.0.0",
"mockjs": "^1.1.0",
"mockjs": "^2.1.0",
"pont-engine": "1.0.13",
"prettier": "^2.5.0",
"puppeteer-core": "^8.0.0",

@ -2,7 +2,7 @@
"originUrl": "http://localhost:8083/v2/api-docs",
"templatePath": "./pontTemplate",
"outDir": "./src/services",
"surrounding": "typescript",
"surrounding": "typeScript",
"mocks": {
"enable": true
}

@ -24,7 +24,7 @@ const AuthComponent: React.FC<AuthComponentProps> = ({
// 未登录态跳转到登录页面
if (!isLogin && localStorage.getItem('USER_LOGIN') != "true") {
history.push('/user/login');
history.push('/user/ ');
}
return (

@ -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;

@ -29,8 +29,6 @@ const fieldLabels = {
evaluateLevel: '评价水平',
inventionPatent: '授权发明专利',
intellectualProperty: '授权的其他知识产权',
projectInfo: '项目简介',
techInnovation: '技术创新',
};
const BaseInfo = forwardRef((props, ref) => {

@ -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;

@ -1,5 +1,10 @@
@import '~antd/es/style/themes/default.less';
// 禁止textarea resize
* textarea {
resize: none;
}
.toolbar {
position: fixed;
right: 0;
@ -26,7 +31,7 @@
float: right;
}
button + button {
button+button {
margin-left: 8px;
}
}

@ -5,6 +5,11 @@ import BaseInfo from './components/BaseInfo';
import FooterToolbar from './components/FooterToolbar';
import Award from './components/Award';
import { UploadOutlined } from '@ant-design/icons';
import Introduce from './components/Introduce';
import { FormInstance } from 'antd/es/form';
import Apply from './components/Apply';
import IntellectualProperty from './components/IntellectualProperty';
import MainCompleters from './components/MainCompleters';
type InternalNamePath = (string | number)[];
const { TabPane } = Tabs;
@ -15,7 +20,11 @@ interface ErrorField {
errors: string[];
}
const SlidingTabsDemo: React.FC<{}> = (props) => {
const baseRef = useRef();
const baseRef = useRef<FormInstance>();
const introduceRef = useRef<FormInstance>();
const applyRef = useRef<FormInstance>();
const mainCompletersRef = useRef<FormInstance>();
const [filesList, setFilesList] = useState<any[]>([]);
const finish = () => {
@ -28,6 +37,9 @@ const SlidingTabsDemo: React.FC<{}> = (props) => {
const onTabChange = (activeKey: string) => {
//保存当前页签内数据到本地存储localstorage中
baseRef.current?.submit();
introduceRef.current?.submit();
applyRef.current?.submit();
mainCompletersRef.current?.submit();
};
const uploadChange = (info: any) => {
let imgs = [];
@ -76,18 +88,22 @@ const SlidingTabsDemo: React.FC<{}> = (props) => {
</TabPane>
<TabPane tab={`项目简介`} key={2}>
<Introduce ref={introduceRef} />
</TabPane>
<TabPane tab={`应用情况和效益`} key={3}>
<Apply ref={applyRef} />
</TabPane>
<TabPane tab={`主要知识产权和标准规范等目录`} key={4}>
<IntellectualProperty/>
</TabPane>
<TabPane tab={`曾获科技奖励情况`} key={5}>
<Award></Award>
</TabPane>
<TabPane tab={`主要完成人情况`} key={6}>
<MainCompleters ref={mainCompletersRef}/>
</TabPane>
<TabPane tab={`主要完成单位情况`} key={7}>

@ -37,6 +37,7 @@ const Model: ModelType = {
const tempToken = localStorage.getItem('TEMP_TOKEN');
console.log('password', payload.password);
console.log(payload);
const response = yield call(loginByAccount, {
...payload,

@ -13,7 +13,7 @@ declare namespace defs {
current?: number;
/** 列表数据 */
list?: T0[];
list?: Array<T0>;
/** 每页记录数 */
pageSize?: number;
@ -24,7 +24,7 @@ declare namespace defs {
export class MajorCategory {
/** 下级分类列表 */
children?: defs.MajorCategory[];
children?: Array<defs.MajorCategory>;
/** 分类编码 */
code?: string;
@ -68,7 +68,7 @@ declare namespace defs {
export class Menu {
/** 下级菜单 */
children?: defs.Menu[];
children?: Array<defs.Menu>;
/** 删除时间 */
deleteTime?: string;
@ -101,14 +101,145 @@ declare namespace defs {
url?: string;
}
export class ProjectEntityObject {
/** 成果登记号 */
achieveCode?: string;
/** 应用日期 */
appDate?: string;
/** 应用领域 A、民用 B、军民通用 */
appField?: string;
/** 应用推广情况概述 */
applicationSummary?: string;
/** 奖励类别 APP_TECH:应用技术成果 BASIC_TECH:基础技术成果 EXTENSION:推广成果 TECH_BASIC:技术基础成果 SOFT_TECH:软科学成果 OTHER:其他 */
awardType?: number;
/** 项目中文名 */
chnName?: string;
/** 创建时间 */
createTime?: string;
/** 创建者 */
createUserId?: number;
/** 删除时间 */
deleteTime?: string;
/** 删除者 */
deleteUserId?: number;
/** 主管部门 */
departmentId?: number;
/** 直接经济效益概述 */
directBenifit?: string;
/** 项目英文名 */
engName?: string;
/** 评价日期 */
evaluateDate?: string;
/** 评价水平 */
evaluateLevel?: number;
/** 成果评价机构 */
evaluateOrgId?: number;
/** 项目ID */
id?: number;
/** 间接经济效益概述 */
indirectBenifit?: string;
/** 授权的其他知识产权 */
intellectualProperty?: number;
/** 授权发明专利 */
inventionPatent?: number;
/** 最后修改时间 */
lastModifyTime?: string;
/** 最后修改者 */
lastModifyUserId?: number;
/** 专业分类 */
majorCategoryId?: number;
/** 计划名称 */
plan?: string;
/** 计划编号 */
planCode?: string;
/** 项目终止日期 */
projectEndTime?: string;
/** 项目简介 */
projectInfo?: string;
/** 项目开始日期 */
projectStartTime?: string;
/** 推荐等级 */
recomendLevel?: number;
/** 推荐单位 */
recomendUnitId?: number;
/** 推荐日期 */
recommendDate?: string;
/** 项目备注 */
remark?: string;
/** 主要完成人 */
responsePersonId?: number;
/** 密级 */
secretLevel?: number;
/** 社会效益概述 */
socialBenifit?: string;
/** 项目状态 {0:保存;1:提交;2::已分配专家;3:专家评审通过;4:已通过;6:专家评审未通过;7:打回修改;8:已拒绝;-1:无效项目 */
status?: number;
/** 任务来源 A、国家计划 B、省部级计划、集团公司计划 C、计划外 */
taskSource?: string;
/** 技术创新 */
techInnovation?: string;
/** 技术局限性 */
techLimitation?: string;
/** 主题词 */
theme?: string;
/** 第三方评价描述 */
thirdEvaluation?: string;
/** 完成单位贡献情况阐述 */
unitContribution?: string;
/** 主要完成单位 */
unitId?: number;
}
export class ResetMenuDTO {
/** menus */
menus?: defs.Menu[];
menus?: Array<defs.Menu>;
}
export class Resource {
/** 上级菜单ID */
children?: defs.Resource[];
children?: Array<defs.Resource>;
/** 资源ID */
id?: number;
@ -197,7 +328,7 @@ declare namespace defs {
address?: string;
/** authorities */
authorities?: defs.GrantedAuthority[];
authorities?: Array<defs.GrantedAuthority>;
/** 创建时间 */
createTime?: string;
@ -236,7 +367,7 @@ declare namespace defs {
phone?: string;
/** 角色列表 */
roles?: defs.Role[];
roles?: Array<defs.Role>;
/** 所属单位 */
unitId?: number;
@ -265,7 +396,7 @@ declare namespace defs {
phone?: string;
/** 角色列表 */
roles?: defs.Role[];
roles?: Array<defs.Role>;
/** 所属单位 */
unitId?: number;
@ -331,7 +462,10 @@ declare namespace API {
export const URL: string;
export function request(bodyParams: defs.Menu, options?: any): ResponseType;
export function request(
bodyParams: defs.Menu,
options?: any,
): ResponseType;
}
/**
@ -378,7 +512,7 @@ declare namespace API {
roleId?: number;
}
export type ResponseType = Promise<defs.ResultVO<number[]>>;
export type ResponseType = Promise<defs.ResultVO<Array<number>>>;
export const URL: string;
@ -399,7 +533,9 @@ declare namespace API {
sorter?: string;
}
export type ResponseType = Promise<defs.ResultVO<defs.ListResultVO<defs.Menu>>>;
export type ResponseType = Promise<
defs.ResultVO<defs.ListResultVO<defs.Menu>>
>;
export const URL: string;
@ -415,7 +551,10 @@ declare namespace API {
export const URL: string;
export function request(bodyParams: defs.Menu, options?: any): ResponseType;
export function request(
bodyParams: defs.Menu,
options?: any,
): ResponseType;
}
/**
@ -427,7 +566,10 @@ declare namespace API {
export const URL: string;
export function request(bodyParams: defs.ResetMenuDTO, options?: any): ResponseType;
export function request(
bodyParams: defs.ResetMenuDTO,
options?: any,
): ResponseType;
}
/**
@ -435,7 +577,7 @@ declare namespace API {
* /api/menu/tree
*/
export namespace getMenuTree {
export type ResponseType = Promise<defs.ResultVO<defs.Menu[]>>;
export type ResponseType = Promise<defs.ResultVO<Array<defs.Menu>>>;
export const URL: string;
@ -447,7 +589,7 @@ declare namespace API {
* /api/menu/user/authority
*/
export namespace getCurrentUserMenuAuthority {
export type ResponseType = Promise<defs.ResultVO<string[]>>;
export type ResponseType = Promise<defs.ResultVO<Array<string>>>;
export const URL: string;
@ -459,7 +601,7 @@ declare namespace API {
* /api/menu/user/current
*/
export namespace getCurrentUserMenuTree {
export type ResponseType = Promise<defs.ResultVO<defs.Menu[]>>;
export type ResponseType = Promise<defs.ResultVO<Array<defs.Menu>>>;
export const URL: string;
@ -476,11 +618,36 @@ declare namespace API {
userId: number;
}
export type ResponseType = Promise<defs.ResultVO<defs.ListResultVO<defs.Menu>>>;
export type ResponseType = Promise<
defs.ResultVO<defs.ListResultVO<defs.Menu>>
>;
export const URL: string;
export function request(
pathParams: PathParams,
options?: any,
): ResponseType;
}
}
/**
* Project Controller
*/
export namespace project {
/**
* project数据
* /api/project
*/
export namespace saveProject {
export type ResponseType = Promise<defs.ProjectEntityObject>;
export const URL: string;
export function request(pathParams: PathParams, options?: any): ResponseType;
export function request(
bodyParams: defs.ProjectEntityObject,
options?: any,
): ResponseType;
}
}
@ -607,7 +774,10 @@ declare namespace API {
export const URL: string;
export function request(bodyParams: defs.UserQuery, options?: any): ResponseType;
export function request(
bodyParams: defs.UserQuery,
options?: any,
): ResponseType;
}
/**
@ -619,7 +789,10 @@ declare namespace API {
export const URL: string;
export function request(bodyParams: defs.UserQuery, options?: any): ResponseType;
export function request(
bodyParams: defs.UserQuery,
options?: any,
): ResponseType;
}
/**
@ -631,7 +804,10 @@ declare namespace API {
export const URL: string;
export function request(bodyParams: defs.MajorCategory, options?: any): ResponseType;
export function request(
bodyParams: defs.MajorCategory,
options?: any,
): ResponseType;
}
/**
@ -643,7 +819,10 @@ declare namespace API {
export const URL: string;
export function request(bodyParams: defs.Resource, options?: any): ResponseType;
export function request(
bodyParams: defs.Resource,
options?: any,
): ResponseType;
}
}
@ -675,7 +854,9 @@ declare namespace API {
phone?: string;
}
export type ResponseType = Promise<defs.ResultVO<defs.ListResultVO<defs.User>>>;
export type ResponseType = Promise<
defs.ResultVO<defs.ListResultVO<defs.User>>
>;
export const URL: string;

@ -96,6 +96,137 @@ export class Menu {
url = '';
}
export class ProjectEntityObject {
/** 成果登记号 */
achieveCode = '';
/** 应用日期 */
appDate = '';
/** 应用领域 A、民用 B、军民通用 */
appField = '';
/** 应用推广情况概述 */
applicationSummary = '';
/** 奖励类别 APP_TECH:应用技术成果 BASIC_TECH:基础技术成果 EXTENSION:推广成果 TECH_BASIC:技术基础成果 SOFT_TECH:软科学成果 OTHER:其他 */
awardType = undefined;
/** 项目中文名 */
chnName = '';
/** 创建时间 */
createTime = '';
/** 创建者 */
createUserId = undefined;
/** 删除时间 */
deleteTime = '';
/** 删除者 */
deleteUserId = undefined;
/** 主管部门 */
departmentId = undefined;
/** 直接经济效益概述 */
directBenifit = '';
/** 项目英文名 */
engName = '';
/** 评价日期 */
evaluateDate = '';
/** 评价水平 */
evaluateLevel = undefined;
/** 成果评价机构 */
evaluateOrgId = undefined;
/** 项目ID */
id = undefined;
/** 间接经济效益概述 */
indirectBenifit = '';
/** 授权的其他知识产权 */
intellectualProperty = undefined;
/** 授权发明专利 */
inventionPatent = undefined;
/** 最后修改时间 */
lastModifyTime = '';
/** 最后修改者 */
lastModifyUserId = undefined;
/** 专业分类 */
majorCategoryId = undefined;
/** 计划名称 */
plan = '';
/** 计划编号 */
planCode = '';
/** 项目终止日期 */
projectEndTime = '';
/** 项目简介 */
projectInfo = '';
/** 项目开始日期 */
projectStartTime = '';
/** 推荐等级 */
recomendLevel = undefined;
/** 推荐单位 */
recomendUnitId = undefined;
/** 推荐日期 */
recommendDate = '';
/** 项目备注 */
remark = '';
/** 主要完成人 */
responsePersonId = undefined;
/** 密级 */
secretLevel = undefined;
/** 社会效益概述 */
socialBenifit = '';
/** 项目状态 {0:保存;1:提交;2::已分配专家;3:专家评审通过;4:已通过;6:专家评审未通过;7:打回修改;8:已拒绝;-1:无效项目 */
status = undefined;
/** 任务来源 A、国家计划 B、省部级计划、集团公司计划 C、计划外 */
taskSource = '';
/** 技术创新 */
techInnovation = '';
/** 技术局限性 */
techLimitation = '';
/** 主题词 */
theme = '';
/** 第三方评价描述 */
thirdEvaluation = '';
/** 完成单位贡献情况阐述 */
unitContribution = '';
/** 主要完成单位 */
unitId = undefined;
}
export class ResetMenuDTO {
/** menus */
menus = [];

@ -1,4 +1,4 @@
import * as defs from './baseClass';
import './mods/';
window.defs = defs;
(window as any).defs = defs;

@ -1,13 +1,15 @@
import * as auth from './auth';
import * as captcha from './captcha';
import * as menu from './menu';
import * as project from './project';
import * as test from './test';
import * as user from './user';
window.API = {
(window as any).API = {
auth,
captcha,
menu,
project,
test,
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…
Cancel
Save