diff --git a/src/forge/Main/Index.js b/src/forge/Main/Index.js
index 25419402..2a1077f2 100644
--- a/src/forge/Main/Index.js
+++ b/src/forge/Main/Index.js
@@ -1,6 +1,6 @@
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
-import { Menu, Input , Spin, Pagination , Popover } from 'antd';
+import { Menu, Input , Spin, Pagination , Popover, Affix, } from 'antd';
import '../css/index.scss'
import './list.css';
import './Index.scss';
@@ -74,6 +74,12 @@ class Index extends Component {
getListData = (page,search, sort,category_id,language_id) => {
const { current_user } = this.props;
const url = `/projects.json`;
+ if(category_id==0){
+ category_id=undefined;
+ }
+ if(language_id==0){
+ language_id=undefined;
+ }
axios.get(url, {
params: {
user_id: current_user && current_user.user_id,
@@ -100,7 +106,11 @@ class Index extends Component {
const url = `/projects/group_type_list.json`;
axios.get(url).then((result) => {
if (result && result.data) {
- this.setTypeList(result.data, undefined)
+ result.data.unshift({
+ name:'全部语言',
+ id:0,
+ });
+ this.setTypeList(result.data, 0)
}
}).catch((error) => { })
}
@@ -109,7 +119,7 @@ class Index extends Component {
this.setState({
typeList: list.map((item, key) => {
return (
-
this.changeType(`${item.id}`, list)}>
+ this.changeType(`${item.id}`, list)}>
{item.name}
{item.projects_count}
@@ -120,14 +130,14 @@ class Index extends Component {
})
}
- // 切换类型
+ // 切换语言类型
changeType = (id, list) => {
this.setState({
isSpin: true,
languageId: id,
search: undefined
})
- this.setTypeList(list, id)
+ this.setTypeList(list, id);
const { page,sort, category_id} = this.state;
this.getListData(page,undefined, sort,category_id , id);
}
@@ -138,7 +148,11 @@ class Index extends Component {
axios.get(url).then((result) => {
if (result && result.data) {
- this.setCategoryList(result.data, undefined);
+ result.data.unshift({
+ name:'全部类别',
+ id:0,
+ });
+ this.setCategoryList(result.data, 0);
}
}).catch((error) => { })
}
@@ -147,7 +161,7 @@ class Index extends Component {
this.setState({
categoryList: list.map((item, key) => {
return (
-
this.changeCategory(`${item.id}`, list)}>
+ this.changeCategory(`${item.id}`, list)}>
{item.name}
{item.projects_count}
@@ -274,7 +288,9 @@ class Index extends Component {
}
*/}
-
+
+
+
- {this.getType();this.changeType(undefined, this.state.typeList);}}>
@@ -287,6 +303,8 @@ class Index extends Component {
{categoryList}
+
+
diff --git a/src/forge/Main/list.css b/src/forge/Main/list.css
index 017e7541..0ff23a2b 100644
--- a/src/forge/Main/list.css
+++ b/src/forge/Main/list.css
@@ -18,6 +18,14 @@
box-sizing: border-box;
margin-bottom: 20px;
}
+.affix-list-left{
+ width: 26%;
+ box-sizing: border-box;
+ margin-bottom: 20px;
+}
+.affix-list-content{
+ padding-right:20px;
+}
.list-right{
width:74%;
background: #fff;
diff --git a/src/military/notice/noticeList/index.jsx b/src/military/notice/noticeList/index.jsx
index 344dc1d0..fd7124f5 100644
--- a/src/military/notice/noticeList/index.jsx
+++ b/src/military/notice/noticeList/index.jsx
@@ -1,6 +1,6 @@
import React, { useEffect, useState } from 'react';
import classNames from 'classnames';
-import { Pagination, Icon, Input } from 'antd';
+import { Pagination, Icon, Input, Affix, } from 'antd';
import ItemList from '../components/itemList';
import Nodata from '../../../forge/Nodata';
import Loading from "../../../Loading";
@@ -239,6 +239,8 @@ export default (props) => {
公告
*/}
+
+ {/* */}
- click('0')}>项目公告
@@ -253,6 +255,7 @@ export default (props) => {
- click('6')}>成交公告
+
{sortNav()}
{loading ?
: content()}
diff --git a/src/military/task/components/itemAgreementManage/index.jsx b/src/military/task/components/itemAgreementManage/index.jsx
index 7e6d5907..787948c1 100644
--- a/src/military/task/components/itemAgreementManage/index.jsx
+++ b/src/military/task/components/itemAgreementManage/index.jsx
@@ -13,13 +13,9 @@ export default Form.create()((props) => {
const { form, list, curPage, total, changePage, loading, showNotification, reloadList } = props;
const { getFieldDecorator, validateFields, setFieldsValue } = form;
const [checkedItem, setCheckedItem] = useState({});
- const [page, setPage] = useState(1);
const [visible, setVisible] = useState(false);
const pageSize = props.pageSize || 10;
- useEffect(() => {
- changePage(page);
- }, [page]);
function refuseClick(item) {
@@ -175,7 +171,7 @@ export default Form.create()((props) => {
{total > pageSize &&
{ setPage(page) }}
+ onChange={(page) => { changePage(page) }}
current={curPage}
total={total}
showTotal={total => `共 ${total} 条`}
diff --git a/src/military/task/components/itemListMyTask/index.jsx b/src/military/task/components/itemListMyTask/index.jsx
index 8df5503f..5ece8d4c 100644
--- a/src/military/task/components/itemListMyTask/index.jsx
+++ b/src/military/task/components/itemListMyTask/index.jsx
@@ -19,7 +19,6 @@ export default Form.create()((props) => {
const { form, list, curPage, total, changePage, taskCategoryValueArr, loading, publish, showNotification, reloadList, joinTask } = props;
const { getFieldDecorator, validateFields, setFieldsValue, } = form;
- const [page, setPage] = useState(1);
const [visibleProofs, setVisibleProofs] = useState(false);
const [taskId, setTaskId] = useState();
const [checkItem, setCheckItem] = useState({});
@@ -35,9 +34,6 @@ export default Form.create()((props) => {
const [uploadList, setUploadList] = useState([]);
- useEffect(() => {
- changePage(page);
- }, [page]);
useEffect(() => {
visibleDownload && downAgreement({ taskId: dowloadTaskId }).then(res => {
@@ -191,8 +187,17 @@ export default Form.create()((props) => {
{item.myPaperStatus === 2 && {myPaperStatusArr[item.myPaperStatus]}}
{item.status === 6 && (item.agreementSigning === 1 || (item.agreementSigning === 2 && item.contractStatus === 1)) && 待签订协议}
+
+ {item.status !== 8 && item.delayTime > 0 &&延期中}
+ {item.status !== 8 && item.cancelStatus === 1 && item.delayTime < 0 && 手动延期中}
+ {item.status !== 8 && item.delayed && item.cancelStatus === 0 && item.delayTime < 0 && 系统自动延期中}
+
:
{item.status === 6 && (item.agreementSigning === 1 || (item.agreementSigning === 2 && item.auditing && item.auditing.pass === 1)) && 待签订协议}
+
+ {item.status !== 8 && item.delayTime > 0 &&延期中}
+ {item.status !== 8 && item.cancelStatus === 1 && item.delayTime < 0 &&手动延期中}
+ {item.status !== 8 && item.delayed && item.cancelStatus === 0 && item.delayTime < 0 &&系统自动延期中}
}
@@ -221,7 +226,7 @@ export default Form.create()((props) => {
}
{
- item.status === 4 && item.papersCount > 0 && (!item.isProofBoolean) && (!item.isProofBoolean)&&
+ item.status === 4 && item.papersCount > 0 && (!item.isProofBoolean) && (!item.isProofBoolean) &&
{ uploadProofs(item) }} className="line_1 color-blue">上传佐证材料
}
@@ -259,7 +264,7 @@ export default Form.create()((props) => {
{total > pageSize &&
{ setPage(page) }}
+ onChange={(page) => { changePage(page) }}
current={curPage}
total={total}
showTotal={total => `共 ${total} 条`}
diff --git a/src/military/task/components/itemListTask/index.jsx b/src/military/task/components/itemListTask/index.jsx
index bdf77fa2..8afe4554 100644
--- a/src/military/task/components/itemListTask/index.jsx
+++ b/src/military/task/components/itemListTask/index.jsx
@@ -14,12 +14,8 @@ for (const item of taskStatusAllArr) {
const classArr = ['', 'list-done', 'list-error', 'list-red', 'list-yellow', 'list-pay', '', 'list-pay', 'list-gray',];
export default (props) => {
const { list, itemClick, curPage, total, changePage, loading } = props;
- const [page, setPage] = useState(1);
const pageSize = props.pageSize || 10;
- useEffect(() => {
- changePage(page);
- }, [page]);
function goUser(login) {
window.location.href = `/users/${login}`;
@@ -36,8 +32,14 @@ export default (props) => {
{ itemClick(item.id) }}>
{item.name}
- {item.status &&
{item.exceptClosedBoolean?'已关闭':statusArr[item.status]}}
- {(item.status !== 8) && item.delayTime.indexOf('延期') > -1 &&
延期中}
+ {item.status &&
{item.exceptClosedBoolean ? '已关闭' : statusArr[item.status]}}
+ {(item.status !== 8) && item.delayTime.indexOf('延期') > -1 ?
延期中
+ :
+ {(item.status !== 8) && item.cancelStatus === 1 && 手动延期中}
+ {(item.status !== 8) && item.delayed && item.cancelStatus === 0 && 系统自动延期中}
+
+ }
+
{ goUser(item.user.login) }}>
@@ -63,7 +65,7 @@ export default (props) => {
{total > pageSize &&
{ setPage(page) }}
+ onChange={(page) => { changePage(page) }}
current={curPage}
total={total}
showTotal={total => `共 ${total} 条`}
diff --git a/src/military/task/components/itemPayProof/index.jsx b/src/military/task/components/itemPayProof/index.jsx
index 1fe04c4e..2c762146 100644
--- a/src/military/task/components/itemPayProof/index.jsx
+++ b/src/military/task/components/itemPayProof/index.jsx
@@ -13,14 +13,9 @@ export default Form.create()((props) => {
const { getFieldDecorator, validateFields, setFieldsValue } = form;
const [checkedItem, setCheckedItem] = useState({});
const [visible, setVisible] = useState(false);
- const [page, setPage] = useState(1);
const [fileList, setFileList] = useState(null);
const pageSize = props.pageSize || 10;
- useEffect(() => {
- changePage(page);
- }, [page]);
-
function goUser(login) {
window.location.href = `/users/${login}`;
@@ -117,7 +112,7 @@ export default Form.create()((props) => {
{total > pageSize &&
{ setPage(page) }}
+ onChange={(page) => { changePage(page) }}
current={curPage}
total={total}
showTotal={total => `共 ${total} 条`}
diff --git a/src/military/task/components/itemProofManage/index.jsx b/src/military/task/components/itemProofManage/index.jsx
index 578d5535..bf5025e0 100644
--- a/src/military/task/components/itemProofManage/index.jsx
+++ b/src/military/task/components/itemProofManage/index.jsx
@@ -12,16 +12,10 @@ const { TextArea } = Input;
export default (props) => {
const { list, curPage, total, changePage, loading, showNotification, reloadList } = props;
const [checkedItem, setCheckedItem] = useState('');
- const [page, setPage] = useState(1);
const [visible, setVisible] = useState(false);
const [advice, setRepairAdvice] = useState('');
const pageSize = props.pageSize || 10;
- useEffect(() => {
- changePage(page);
- }, [page]);
-
-
function agreeClick(item) {
Modal.confirm({
title: '是否确认审批通过?',
@@ -152,7 +146,7 @@ export default (props) => {
{total > pageSize &&
{ setPage(page) }}
+ onChange={(page) => { changePage(page) }}
current={curPage}
total={total}
showTotal={total => `共 ${total} 条`}
diff --git a/src/military/task/components/itemPublicityComplain/index.jsx b/src/military/task/components/itemPublicityComplain/index.jsx
index 0cf21ccb..e7f8bf2f 100644
--- a/src/military/task/components/itemPublicityComplain/index.jsx
+++ b/src/military/task/components/itemPublicityComplain/index.jsx
@@ -13,7 +13,6 @@ export default Form.create()((props) => {
const { form, list, curPage, total, changePage, loading, showNotification, reloadList } = props;
const { getFieldDecorator, validateFields, setFieldsValue } = form;
const [checkedItem, setCheckedItem] = useState('');
- const [page, setPage] = useState(1);
const [visible, setVisible] = useState(false);
const pageSize = props.pageSize || 10;
@@ -22,10 +21,6 @@ export default Form.create()((props) => {
const [isChanged, setIsChanged] = useState('');
- useEffect(() => {
- changePage(page);
- }, [page]);
-
function deal(item) {
setCheckedItem(item);
@@ -145,7 +140,7 @@ export default Form.create()((props) => {
{total > pageSize &&
{ setPage(page) }}
+ onChange={(page) => { changePage(page) }}
current={curPage}
total={total}
showTotal={total => `共 ${total} 条`}
diff --git a/src/military/task/components/itemTaskManage/index.jsx b/src/military/task/components/itemTaskManage/index.jsx
index abb38e12..5cbad31a 100644
--- a/src/military/task/components/itemTaskManage/index.jsx
+++ b/src/military/task/components/itemTaskManage/index.jsx
@@ -12,16 +12,11 @@ const { TextArea } = Input;
export default (props) => {
const { list, categoryArr, curPage, total, changePage, loading, showNotification, reloadList } = props;
const [checkedId, setCheckedId] = useState('');
- const [page, setPage] = useState(1);
const [visible, setVisible] = useState(false);
const [isRepairDocument, setIsRepairDocument] = useState('0');
const [repairAdvice, setRepairAdvice] = useState('');
const pageSize = props.pageSize || 10;
- useEffect(() => {
- changePage(page);
- }, [page]);
-
function agreeClick(id) {
Modal.confirm({
@@ -186,7 +181,7 @@ export default (props) => {
{total > pageSize &&
{ setPage(page) }}
+ onChange={(page) => { changePage(page) }}
current={curPage}
total={total}
showTotal={total => `共 ${total} 条`}
diff --git a/src/military/task/myTask/index.jsx b/src/military/task/myTask/index.jsx
index 98acaaa9..5c5b7083 100644
--- a/src/military/task/myTask/index.jsx
+++ b/src/military/task/myTask/index.jsx
@@ -63,6 +63,9 @@ export default ({ location, history, current_user, showNotification }) => {
setLoading(true);
getMyTaskList(params).then(data => {
if (data) {
+ for (const item of data.rows) {
+ item.delayTime = surplusTime(item);
+ }
setMyTaskList(data.rows);
setTotal(data.total);
}
@@ -73,6 +76,31 @@ export default ({ location, history, current_user, showNotification }) => {
function taskClick(id) {
history.push(`/task/taskDetail/${id}`);
}
+
+ function surplusTime(item) {
+ let surplus;
+ switch (item.status) {
+ case 3:
+ surplus = item.collectingDays * 24 * 3600 - (new Date() - new Date(item.publishedAt || item.createdAt)) / 1000;
+ break;
+ case 4:
+ surplus = item.choosingDays * 24 * 3600 - (new Date() - new Date(item.collectingCompleteAt)) / 1000;
+ break;
+ case 5:
+ surplus = item.makePublicDays * 24 * 3600 - (new Date() - new Date(item.makePublicAt)) / 1000;
+ break;
+ case 6:
+ surplus = item.signingDays * 24 * 3600 - (new Date() - new Date(item.publicityCompleteAt)) / 1000;
+ break;
+ case 7:
+ surplus = item.payingDays * 24 * 3600 - (new Date() - new Date(item.signingCompleteAt)) / 1000;
+ break;
+ default:
+ surplus = 0;
+ }
+
+ return surplus ;
+ }
const changeOptionId = useCallback((option, type) => {
if (type === 'publishStatus') {
diff --git a/src/military/task/myTask/joinTask.jsx b/src/military/task/myTask/joinTask.jsx
index fd266be2..4b818702 100644
--- a/src/military/task/myTask/joinTask.jsx
+++ b/src/military/task/myTask/joinTask.jsx
@@ -88,11 +88,18 @@ export default ({ taskCategoryValueArr, showNotification }) => {
const columns = useMemo(() => {
return [
{
- title: '任务/编号名称',
+ title: '任务编号',
dataIndex: 'name',
- width: '30%',
render: (text, record) => {
- return {record.task.number + " " + record.task.name}
+ return {record.task.number}
+ }
+ },
+ {
+ title: '任务名称',
+ dataIndex: 'name',
+ width: '20%',
+ render: (text, record) => {
+ return record.task.name
}
},
{
diff --git a/src/military/task/taskDetail/index.jsx b/src/military/task/taskDetail/index.jsx
index 30b77521..8429fd43 100644
--- a/src/military/task/taskDetail/index.jsx
+++ b/src/military/task/taskDetail/index.jsx
@@ -175,6 +175,9 @@ export default Form.create()(
{/* 因为有时只延期几秒或者几分钟时后端没有返回延期,所以这里加一个判断 */}
{detailData.status === status && days ? {surplus < 0 ? ('延期' + surplusTimetext) : ('剩余' + surplusTimetext)}
: ''}
+
+ {detailData.status === status && detailData.cancelStatus === 1 && surplus>0 && (手动延期)
}
+ {detailData.status === status && detailData.delayed && detailData.cancelStatus===0 && surplus>0 && (系统自动延期)
}
)
}, [detailData]);
diff --git a/src/military/task/taskDetail/index.scss b/src/military/task/taskDetail/index.scss
index c5ea1749..3d5f9f21 100644
--- a/src/military/task/taskDetail/index.scss
+++ b/src/military/task/taskDetail/index.scss
@@ -49,6 +49,12 @@
color: #05101a;
text-align: center;
margin-bottom: 32px;
+
+ .delay-text{
+ margin-top:-15px;
+ color: #666;
+ font-size: 12px;
+ }
}
.tasks_status li:not(:last-child){
margin-right: 20px;