forked from Gitlink/forgeplus-react
上传申诉材料审核及修改成果对接代码
This commit is contained in:
parent
a4d38f8c86
commit
66c5f09813
|
@ -51,6 +51,11 @@ const ProofManage = Loadable({
|
|||
loading: Loading,
|
||||
});
|
||||
|
||||
const PublicityComplain = Loadable({
|
||||
loader: () => import("./task/publicityComplain"),
|
||||
loading: Loading,
|
||||
});
|
||||
|
||||
const Index = (propsTransmit) => {
|
||||
// 开发时,从代理的位置获取用户信息
|
||||
const [currentUser, setCurrentUser] = useState(null);
|
||||
|
@ -71,6 +76,7 @@ const Index = (propsTransmit) => {
|
|||
<div className="newMain clearfix">
|
||||
<Switch {...propsF}>
|
||||
|
||||
{/* 任务详情 */}
|
||||
<Route
|
||||
path="/task/taskDetail/:taskId"
|
||||
render={(props) => (
|
||||
|
@ -78,6 +84,7 @@ const Index = (propsTransmit) => {
|
|||
)}
|
||||
></Route>
|
||||
|
||||
{/* 新增任务 */}
|
||||
<Route
|
||||
path="/task/taskAdd"
|
||||
render={(props) => (
|
||||
|
@ -85,6 +92,7 @@ const Index = (propsTransmit) => {
|
|||
)}
|
||||
></Route>
|
||||
|
||||
{/* 编辑任务 */}
|
||||
<Route
|
||||
path="/task/taskEdit/:taskId"
|
||||
render={(props) => (
|
||||
|
@ -92,6 +100,7 @@ const Index = (propsTransmit) => {
|
|||
)}
|
||||
></Route>
|
||||
|
||||
{/* 我的任务 */}
|
||||
<Route
|
||||
path="/task/myTask"
|
||||
render={(props) => (
|
||||
|
@ -99,6 +108,7 @@ const Index = (propsTransmit) => {
|
|||
)}
|
||||
></Route>
|
||||
|
||||
{/* 任务管理审核 */}
|
||||
<Route
|
||||
path="/task/taskManage"
|
||||
render={(props) => (
|
||||
|
@ -106,6 +116,7 @@ const Index = (propsTransmit) => {
|
|||
)}
|
||||
></Route>
|
||||
|
||||
{/* 成果管理审核 */}
|
||||
<Route
|
||||
path="/task/paperManage"
|
||||
render={(props) => (
|
||||
|
@ -113,6 +124,7 @@ const Index = (propsTransmit) => {
|
|||
)}
|
||||
></Route>
|
||||
|
||||
{/* 成果申诉管理审核 */}
|
||||
<Route
|
||||
path="/task/paperComplain"
|
||||
render={(props) => (
|
||||
|
@ -120,6 +132,15 @@ const Index = (propsTransmit) => {
|
|||
)}
|
||||
></Route>
|
||||
|
||||
{/* 公示期成果申诉管理审核 */}
|
||||
<Route
|
||||
path="/task/publicityComplain"
|
||||
render={(props) => (
|
||||
<PublicityComplain {...propsF} {...props} />
|
||||
)}
|
||||
></Route>
|
||||
|
||||
{/* 佐证管理审核 */}
|
||||
<Route
|
||||
path="/task/proofManage"
|
||||
render={(props) => (
|
||||
|
@ -127,6 +148,7 @@ const Index = (propsTransmit) => {
|
|||
)}
|
||||
></Route>
|
||||
|
||||
{/* 成果列表 */}
|
||||
<Route
|
||||
path="/task"
|
||||
render={(props) => (
|
||||
|
|
|
@ -155,6 +155,40 @@ export async function getTaskPaper(params){
|
|||
}
|
||||
}
|
||||
|
||||
// 审核任务成果
|
||||
export async function readyCheckPapers(params){
|
||||
let res = await fetch({
|
||||
url: '/api/paper/admin/readyCheckPapers',
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
if (res.data) {
|
||||
return res.data;
|
||||
} else {
|
||||
notification.open({
|
||||
message: "提示",
|
||||
description: res.message || '请求错误',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 我的成果
|
||||
export async function myPapers(params){
|
||||
let res = await fetch({
|
||||
url: '/api/paper/my',
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
if (res.data) {
|
||||
return res.data;
|
||||
} else {
|
||||
notification.open({
|
||||
message: "提示",
|
||||
description: res.message || '请求错误',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//更新成果
|
||||
export function updatePaper(data) {
|
||||
return fetch({
|
||||
|
@ -331,4 +365,39 @@ export function checkProof(data){
|
|||
method: 'post',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
// 应征者公示期申诉
|
||||
export function publicityComplain(data){
|
||||
return fetch({
|
||||
url: `/api/myTasks/applicantComplaintDuringPublicity`,
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
}
|
||||
|
||||
// 审核公示期申诉列表查询
|
||||
export async function publicityComplainList(params) {
|
||||
let res = await fetch({
|
||||
url: '/api/tasks/backend/complaintMaterialList',
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
if (res.data) {
|
||||
return res.data;
|
||||
} else {
|
||||
notification.open({
|
||||
message: "提示",
|
||||
description: res.message || '请求错误',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 审核公示期申诉
|
||||
export function checkPublicity(data){
|
||||
return fetch({
|
||||
url: `/api/tasks/backend/adminCheck/complaintMaterialDuringPublicity`,
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
}
|
|
@ -13,7 +13,7 @@ for (const item of taskStatusAllArr) {
|
|||
statusArr[item.dicItemCode] = item.dicItemName;
|
||||
}
|
||||
export default (props) => {
|
||||
const { list, curPage, total, changePage, taskCategoryValueArr, loading, publish, showNotification ,reloadList} = props;
|
||||
const { list, curPage, total, changePage, taskCategoryValueArr, loading, publish, showNotification, reloadList } = props;
|
||||
|
||||
const [page, setPage] = useState(1);
|
||||
const [visibleProofs, setVisibleProofs] = useState(false);
|
||||
|
@ -36,6 +36,13 @@ export default (props) => {
|
|||
})
|
||||
}
|
||||
|
||||
function proofAdvice(advice){
|
||||
Modal.info({
|
||||
title: '审核意见',
|
||||
content: advice
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
return (
|
||||
<React.Fragment>
|
||||
|
@ -85,10 +92,13 @@ export default (props) => {
|
|||
|
||||
{item.status === 4 && <Link className="line_1 color-blue" to={`/task/taskDetail/${item.id}`}>成果评选</Link>}
|
||||
{
|
||||
// item.status === 4 && item.papersCount && (!item.isProofBoolean) &&
|
||||
item.status === 4 && item.papersCount && (!item.isProofBoolean) &&
|
||||
<a onClick={() => { uploadProofs(item) }} className="line_1 color-blue">上传佐证材料</a>}
|
||||
{
|
||||
(!item.isProofBoolean) && (item.taskResultProof && item.taskResultProof.status === 0) &&
|
||||
<a onClick={() => { proofAdvice(item.advice) }} className="line_1 color-blue">佐证被拒原因</a>}
|
||||
|
||||
{(item.status === 9) && <a onClick={() => { repairAdvice(item.repairAdvice) }} className="line_1 color-blue">审核意见</a>}
|
||||
{(item.status === 9) && <a onClick={() => { repairAdvice(item.advice) }} className="line_1 color-blue">审核意见</a>}
|
||||
|
||||
{/* <a href="javascript:void(0)" className="line_1 color-blue" onClick="paying_register_popup()">支付登记</a> */}
|
||||
{/* <a href="javascript:void(0)" className="color-blue line_1">上传支付凭证</a> */}
|
||||
|
|
|
@ -1,35 +1,36 @@
|
|||
import React, { useEffect, useState, useCallback } from 'react';
|
||||
import { Pagination, Modal, Form, Input, Button } from 'antd';
|
||||
import ReactWEditor from 'wangeditor-for-react';
|
||||
import { getImageUrl, timeAgo } from 'educoder';
|
||||
import { timeAgo } from 'educoder';
|
||||
import Nodata from 'forge/Nodata';
|
||||
import Loading from "src/Loading";
|
||||
import { editorConfig } from 'military/components/config';
|
||||
import Upload from 'military/components/Upload';
|
||||
import { reportPaper, thumbUpPaper, commentAdd, complainPaper } from '../../api';
|
||||
import { reportPaper, thumbUpPaper, commentAdd, complainPaper, publicityComplain } from '../../api';
|
||||
import { httpUrl } from '../../../fetch';
|
||||
import winpng from '../../image/win.png';
|
||||
|
||||
import winpng from '../../image/winner.png';
|
||||
import headpng from '../../image/head.png';
|
||||
import './index.scss';
|
||||
|
||||
const { TextArea } = Input;
|
||||
|
||||
export default Form.create()((props) => {
|
||||
const { list, curPage, total, changePage, loading, applyStatusAllNameArr, reloadList, showNotification, current_user, form } = props;
|
||||
const { getFieldDecorator, validateFields, } = form;
|
||||
const { list, curPage, total, changePage, loading, applyStatusAllNameArr, reloadList, showNotification, current_user, form, detailStatus } = props;
|
||||
const { getFieldDecorator, validateFields, setFieldsValue } = form;
|
||||
const [page, setPage] = useState(1);
|
||||
const pageSize = props.pageSize || 10;
|
||||
const [checkedItem, setCheckedItem] = useState({});
|
||||
const [reportVisible, setReportVisible] = useState(false);
|
||||
const [reportValue, setReportValue] = useState('');
|
||||
const [commentHtml, setCommentHtml] = useState('');
|
||||
|
||||
const [commentId, setCommentId] = useState(undefined);
|
||||
|
||||
const [complainVisible, setComplainVisible] = useState(false);
|
||||
const [complainValue, setComplainValue] = useState('');
|
||||
const [fileList, setFileList] = useState(null);
|
||||
|
||||
const [loadingChild, setLoadingChild] = useState(false);
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
changePage(page);
|
||||
}, [page]);
|
||||
|
@ -42,6 +43,7 @@ export default Form.create()((props) => {
|
|||
function report() {
|
||||
validateFields((error, values) => {
|
||||
if (!error) {
|
||||
setLoadingChild(true);
|
||||
reportPaper({
|
||||
paperId: checkedItem.id,
|
||||
content: values.reportValue
|
||||
|
@ -49,16 +51,22 @@ export default Form.create()((props) => {
|
|||
if (res.message === 'success') {
|
||||
showNotification('举报成功');
|
||||
setReportVisible(false);
|
||||
setReportValue('');
|
||||
setFieldsValue({
|
||||
reportValue: '',
|
||||
complainValue: '',
|
||||
});
|
||||
}
|
||||
setLoadingChild(false);
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function thumbUp(id) {
|
||||
setLoadingChild(true);
|
||||
thumbUpPaper(id).then(res => {
|
||||
reloadList();
|
||||
setLoadingChild(false);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -108,24 +116,38 @@ export default Form.create()((props) => {
|
|||
for (const item of fileList) {
|
||||
files.push(item.id || (item.response.data && item.response.data.id));
|
||||
}
|
||||
complainPaper({
|
||||
paperId: checkedItem.id,
|
||||
params: {
|
||||
|
||||
if (detailStatus === 5) {
|
||||
publicityComplain({
|
||||
content: values.complainValue,
|
||||
files: files.join()
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.message === 'success') {
|
||||
showNotification('申诉提交成功');
|
||||
setComplainVisible(false);
|
||||
setComplainValue('');
|
||||
setFileList(null);
|
||||
}
|
||||
});
|
||||
files: files.join(),
|
||||
paperId: checkedItem.id,
|
||||
}).then(res => {
|
||||
complainDeal(res);
|
||||
});
|
||||
} else {
|
||||
complainPaper({
|
||||
paperId: checkedItem.id,
|
||||
params: {
|
||||
content: values.complainValue,
|
||||
files: files.join()
|
||||
}
|
||||
}).then(res => {
|
||||
complainDeal(res);
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function complainDeal(res) {
|
||||
if (res.message === 'success') {
|
||||
showNotification('申诉提交成功');
|
||||
setComplainVisible(false);
|
||||
setFileList(null);
|
||||
}
|
||||
}
|
||||
|
||||
// 上传附件后得到的文件数组
|
||||
function UploadFunc(fileList) {
|
||||
setFileList(fileList);
|
||||
|
@ -142,37 +164,30 @@ export default Form.create()((props) => {
|
|||
|
||||
return (
|
||||
<React.Fragment>
|
||||
{loading ? <Loading /> :
|
||||
{loading || loadingChild ? <Loading /> :
|
||||
<React.Fragment>
|
||||
{
|
||||
list.map(item => {
|
||||
return (
|
||||
|
||||
<div className="fileComments df" key={item.id}>
|
||||
<img alt="头像加载失败" src={getImageUrl("images/educoder/competition/1.png")} width="50" height="50" className="bor-radius-all mr20" />
|
||||
<img alt="头像加载失败" src={headpng} width="50" height="50" className="bor-radius-all mr20" />
|
||||
<div className="flex1">
|
||||
<ul className="clearfix">
|
||||
<ul className="">
|
||||
<li className="fl pr">
|
||||
<span className="user-box font-16 mr20 color-grey3" onClick={() => { goUser(item.user.login) }}>
|
||||
<img alt="头像加载失败" className="radius mr5" src={winpng} />
|
||||
{item.user.nickname || item.user.login}
|
||||
</span>
|
||||
<span className="color-grey9">{timeAgo(item.createdAt)}</span>
|
||||
<span className="color-blue ml10">{item.verifyStatus ? applyStatusAllNameArr[item.status] : "待审核"}</span>
|
||||
|
||||
{item.status === 2 ? <img alt="胜出" className="mr5" src={winpng} /> : <span className="color-blue ml10">{item.checkStatus === 0 ? "待审核" : applyStatusAllNameArr[item.status]}</span>}
|
||||
</li>
|
||||
<li className="fr">
|
||||
{/* <a className="color-blue fl mr10">
|
||||
{applyStatusAllNameArr[item.status]}
|
||||
</a> */}
|
||||
{item.needComplain && (current_user.login === item.user.login) && <a className="base_smallBtn blue_line_btn fl" onClick={() => { setComplainVisible(true); setCheckedItem(item) }}>
|
||||
{(item.needComplain || detailStatus === 5) && (current_user.login === item.user.login) && <a className="base_smallBtn blue_line_btn fl" onClick={() => { setComplainVisible(true); setCheckedItem(item) }}>
|
||||
申诉
|
||||
</a>}
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div className="paper-detail-content markdown-body editormd-html-preview editor-w-text" dangerouslySetInnerHTML={{ __html: item.paperDetail ? item.paperDetail.content : '' }}>
|
||||
</div>
|
||||
<div className="paper-detail-content markdown-body editormd-html-preview editor-w-text" dangerouslySetInnerHTML={{ __html: item.paperDetail ? item.paperDetail.content : '' }}></div>
|
||||
|
||||
<div className="attachments" >
|
||||
{
|
||||
|
@ -286,14 +301,6 @@ export default Form.create()((props) => {
|
|||
<div className="task-popup-content">
|
||||
<p className="edu-txt-center lineh-20 mb10">你的申诉信息将发送给平台管理员</p>
|
||||
<p className="edu-txt-center lineh-20">请如实填写有效的申诉原由,我们将尽快完成审核</p>
|
||||
{/* <TextArea
|
||||
value={complainValue}
|
||||
placeholder="(必填)请在此输入发起申诉的原因,最大限制100个字符"
|
||||
autoSize={{ minRows: 6 }}
|
||||
className="applyText mb20"
|
||||
onChange={(e) => { setComplainValue(e.target.value) }}
|
||||
maxLength={100}
|
||||
/> */}
|
||||
{
|
||||
helper('complainValue', [{ required: complainVisible, message: "(必填)请在此输入发起申诉的原因,最大限制100个字符" },
|
||||
{ max: 100, message: '长度不能超过100个字符' }],
|
||||
|
|
|
@ -34,3 +34,7 @@
|
|||
width: 100%;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.small-head{
|
||||
max-width: 2rem;
|
||||
}
|
|
@ -40,7 +40,7 @@ export default (props) => {
|
|||
<div className="list-box" key={item.id}>
|
||||
<div className="list-content">
|
||||
<div className="list-title mb10" onClick={() => { itemClick(item.id) }}>
|
||||
{item.name || item.title}
|
||||
<div className="title-content text-ellipsis">{item.name}</div>
|
||||
{item.status && <span className={classArr[item.status]}>{statusArr[item.status]}</span>}
|
||||
{(item.status !== 8) && item.delayTime && <span className="list-yellow">延期中</span>}
|
||||
</div>
|
||||
|
|
|
@ -18,19 +18,26 @@
|
|||
padding-top: 10px;
|
||||
}
|
||||
.list-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 1rem;
|
||||
color: #333;
|
||||
cursor: pointer;
|
||||
font-weight: 500;
|
||||
.title-content{
|
||||
display: inline-block;
|
||||
max-width: 80%;
|
||||
}
|
||||
}
|
||||
.list-title:hover {
|
||||
color: #409eff;
|
||||
}
|
||||
.list-title span {
|
||||
padding: 2px 10px;
|
||||
padding: 0px 10px;
|
||||
margin-left: .625rem;
|
||||
background: #f8c753;
|
||||
font-size: .8rem;
|
||||
line-height: 1.8;
|
||||
color: #fff;
|
||||
border-radius: 14px;
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
import React, { useEffect, useState } from 'react';
|
||||
import React, { useEffect, useState, } from 'react';
|
||||
import { Pagination, Modal, Input } from 'antd';
|
||||
import { Link } from "react-router-dom";
|
||||
import Nodata from 'forge/Nodata';
|
||||
import Loading from "src/Loading";
|
||||
import { timeAgo } from 'educoder';
|
||||
import { checkProof } from '../../api';
|
||||
import { checkPublicity } from '../../api';
|
||||
import { httpUrl } from 'military/fetch';
|
||||
import './index.scss';
|
||||
import winpng from '../../image/win.png';
|
||||
|
@ -27,11 +27,18 @@ export default (props) => {
|
|||
Modal.confirm({
|
||||
title: '是否确认审批通过?',
|
||||
onOk() {
|
||||
checkProof({
|
||||
id: item.taskResultProof.id,
|
||||
isPassed: 1,
|
||||
taskId: item.id,
|
||||
checkPublicity({
|
||||
// id: item.id,
|
||||
// isPassed: 1,
|
||||
// taskId: item.id,
|
||||
// advice: "",
|
||||
complaintMaterialId: 0,
|
||||
isAccepted: "",
|
||||
isChanged: "",
|
||||
isReconsidered: "",
|
||||
advice: "",
|
||||
delayDuration: 0,
|
||||
|
||||
}).then(res => {
|
||||
if (res && res.message === 'success') {
|
||||
showNotification('操作成功');
|
||||
|
@ -52,7 +59,7 @@ export default (props) => {
|
|||
showNotification('请输入拒绝的理由');
|
||||
return;
|
||||
}
|
||||
checkProof({
|
||||
checkPublicity({
|
||||
id: checkedItem.taskResultProof.id,
|
||||
taskId: checkedItem.id,
|
||||
isPassed: 0,
|
||||
|
@ -80,6 +87,8 @@ export default (props) => {
|
|||
window.open(url);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return (
|
||||
loading ? <Loading /> :
|
||||
<React.Fragment>
|
||||
|
@ -138,7 +147,7 @@ export default (props) => {
|
|||
}
|
||||
</div>
|
||||
|
||||
{item.taskResultProof.status === 0 && <p className="color-orange lineh-35 "><span className="fl color-orange mr5">拒绝原因:</span>test1111</p>}
|
||||
{item.taskResultProof.status === 0 && <p className="color-orange lineh-35 "><span className="fl color-orange mr5">拒绝原因:</span>{item.advice}</p>}
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,239 @@
|
|||
import React, { useEffect, useState, useCallback } from 'react';
|
||||
import { Pagination, Modal, Input, Radio, Form, InputNumber } from 'antd';
|
||||
import { Link } from "react-router-dom";
|
||||
import Nodata from 'forge/Nodata';
|
||||
import Loading from "src/Loading";
|
||||
import { timeAgo } from 'educoder';
|
||||
import { checkPublicity } from '../../api';
|
||||
import { httpUrl } from 'military/fetch';
|
||||
import './index.scss';
|
||||
import winpng from '../../image/win.png';
|
||||
|
||||
const { TextArea } = Input;
|
||||
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;
|
||||
|
||||
const [isAccepted, setIsAccepted] = useState('');
|
||||
const [isReconsidered, setIsReconsidered] = useState('');
|
||||
const [isChanged, setIsChanged] = useState('');
|
||||
|
||||
|
||||
useEffect(() => {
|
||||
changePage(page);
|
||||
}, [page]);
|
||||
|
||||
|
||||
function deal(item) {
|
||||
setCheckedItem(item);
|
||||
setVisible(true);
|
||||
}
|
||||
|
||||
function dealAction() {
|
||||
validateFields((error, values) => {
|
||||
// console.log(error);
|
||||
// console.log(values)
|
||||
if (!error) {
|
||||
checkPublicity({
|
||||
complaintMaterialId: checkedItem.id,
|
||||
...values,
|
||||
}).then(res => {
|
||||
if (res && res.message === 'success') {
|
||||
showNotification('操作成功');
|
||||
reloadList();
|
||||
setFieldsValue({
|
||||
isAccepted: '',
|
||||
reason: '',
|
||||
});
|
||||
setVisible(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function goUser(login) {
|
||||
window.location.href = `/users/${login}`;
|
||||
}
|
||||
|
||||
function goUserMes(login) {
|
||||
window.location.href = `/users/${login}/message_detail`;
|
||||
}
|
||||
|
||||
function downFile(item) {
|
||||
let url = httpUrl + '/busiAttachments/download/' + item.id;
|
||||
window.open(url);
|
||||
}
|
||||
|
||||
const helper = useCallback(
|
||||
(label, name, rules, widget) => (
|
||||
<Form.Item label={label}>
|
||||
{getFieldDecorator(name, { rules, validateFirst: true })(widget)}
|
||||
</Form.Item>
|
||||
),
|
||||
[]
|
||||
);
|
||||
|
||||
return (
|
||||
loading ? <Loading /> :
|
||||
<React.Fragment>
|
||||
{
|
||||
list.map(item => {
|
||||
return (
|
||||
<div className="list-box" key={item.id}>
|
||||
|
||||
<img alt="头像加载失败" className="radius mr15" height="50px" src={winpng} width="50px" />
|
||||
<div className="flex1">
|
||||
<li className="clearfix mb20">
|
||||
<a className="user-box fl mr15 color-grey-3 font-16" onClick={() => { goUser(item.user.login) }}>{item.user && (item.user.nickname || item.user.login)}</a>
|
||||
<span className="fl color-grey-9 mt3 mr15">{timeAgo(item.createdAt)}</span>
|
||||
<span className="fr">
|
||||
<a className="edu-default-btn edu-orangeline-btn ml20 fl" onClick={() => { goUserMes(item.user.login) }}>私信</a>
|
||||
<a className="edu-default-btn edu-blueline-btn ml20 fl" onClick={() => { deal(item) }}>处理</a>
|
||||
|
||||
{/* {item.taskResultProof.status === 1 && <span className="spanTitle color-grey-6 fl ml20">已同意</span>}
|
||||
{item.taskResultProof.status === 0 && <span className="spanTitle color-red fl ml20">已拒绝</span>}
|
||||
|
||||
{
|
||||
item.taskResultProof.status === 2 && <React.Fragment>
|
||||
<a className="edu-default-btn edu-orangeline-btn ml20 fl" onClick={() => { goUserMes(item.user.login) }}>私信</a>
|
||||
<a className="edu-default-btn edu-blueline-btn ml20 fl" onClick={() => { agreeClick(item) }}>同意</a>
|
||||
<a className="edu-default-btn edu-greyline-btn ml20 fl" onClick={() => { deal(item) }}>拒绝</a>
|
||||
</React.Fragment>
|
||||
} */}
|
||||
</span>
|
||||
</li>
|
||||
<div className="clearfix">
|
||||
|
||||
|
||||
{/* <div className="width100">
|
||||
<span className="with40 fl lineh-35">
|
||||
<span className="color-grey-9 fl">联系手机:</span>
|
||||
<span className="infos_item">{item.contactPhone}(位置分析:河北-唐山)</span>
|
||||
</span>
|
||||
<span className="inline-block lineh-35">
|
||||
<span className="color-grey-9 fl">IP地址:</span>
|
||||
<span className="infos_item">{item.ip}(位置分析:北京-北京)</span>
|
||||
</span>
|
||||
</div> */}
|
||||
|
||||
<div className="clearfix"></div>
|
||||
<div className="width100 lineh-35">
|
||||
<span className="color-grey-9 fl">成果编号:</span>
|
||||
<span className="fl lineh-35 ml5">
|
||||
<Link className="primary-link" to={`/task/taskDetail/${item.taskId}`}>{item.number}</Link>
|
||||
</span>
|
||||
</div>
|
||||
<div className="clearfix"></div>
|
||||
<div className="width100 lineh-35 clearfix">
|
||||
<span className="color-grey-9 fl">申诉材料:</span>
|
||||
{
|
||||
item.materials && item.materials.map(fileItem => {
|
||||
return <span className="file-list-prof " key={fileItem.id}>
|
||||
<a onClick={() => { downFile(fileItem) }}><i className="iconfont icon-fujian color-green font-14 mr3"></i>
|
||||
{fileItem.fileName} </a>
|
||||
<span className="ml10 color-grey-9">({fileItem.fileSizeString})</span>
|
||||
</span>
|
||||
})
|
||||
}
|
||||
</div>
|
||||
<div className="width100 lineh-35">
|
||||
<span className="color-grey-9 fl">申诉原因:</span>
|
||||
<span className="infos_item">{item.content}</span>
|
||||
</div>
|
||||
{/* {item.taskResultProof.status === 0 && <p className="color-orange lineh-35 "><span className="fl color-orange mr5">拒绝原因:</span>{item.advice}</p>} */}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
{list.length > 0 ?
|
||||
<div className="edu-txt-center mt20 mb20">
|
||||
{total > pageSize && <Pagination
|
||||
showQuickJumper
|
||||
onChange={(page) => { setPage(page) }}
|
||||
current={curPage}
|
||||
total={total}
|
||||
showTotal={total => `共 ${total} 条`}
|
||||
/>}
|
||||
</div> :
|
||||
<Nodata _html="暂无数据" />}
|
||||
|
||||
<Modal
|
||||
title="处理申诉"
|
||||
visible={visible}
|
||||
onOk={dealAction}
|
||||
onCancel={() => { setVisible(false) }}
|
||||
className="form-edit-modal"
|
||||
>
|
||||
|
||||
{
|
||||
helper('是否受理', 'isAccepted', [{ required: true, message: "请选择是否受理" }],
|
||||
<Radio.Group
|
||||
className="mb10"
|
||||
onChange={(e) => { setIsAccepted(e.target.value) }}
|
||||
>
|
||||
<Radio value={'1'}>受理</Radio>
|
||||
<Radio value={'0'}>不受理</Radio>
|
||||
</Radio.Group>
|
||||
)
|
||||
}
|
||||
|
||||
{
|
||||
isAccepted === '1' && helper('复议评审', 'isReconsidered', [{ required: true, message: "请选择是否启动复议评审" }],
|
||||
<Radio.Group
|
||||
className="mb10"
|
||||
onChange={(e) => { setIsReconsidered(e.target.value) }}
|
||||
>
|
||||
<Radio value={'1'}>启动</Radio>
|
||||
<Radio value={'0'}>不启动</Radio>
|
||||
</Radio.Group>
|
||||
)
|
||||
}
|
||||
|
||||
{
|
||||
isReconsidered === '0' && helper('公示结果', 'isChanged', [{ required: true, message: "请选择是否更改公示结果" }],
|
||||
<Radio.Group
|
||||
className="mb10"
|
||||
onChange={(e) => { setIsChanged(e.target.value) }}
|
||||
>
|
||||
<Radio value={'1'}>更改</Radio>
|
||||
<Radio value={'0'}>不更改</Radio>
|
||||
</Radio.Group>
|
||||
)
|
||||
}
|
||||
|
||||
{
|
||||
isAccepted === '1' && isReconsidered === '0' && isChanged === '1' && helper('延长公示', 'delayDuration',
|
||||
[{ required: true, message: "请输入延长天数" }],
|
||||
<InputNumber
|
||||
placeholder="您打算延长多少天呢"
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
{
|
||||
helper('原因', 'reason', [{ required: true, message: "请输入选择的原因" }, { max: 200, message: '不能超过200字符' }],
|
||||
<TextArea
|
||||
placeholder="(必填)我想说点什么呢,200字以内"
|
||||
autoSize={{ minRows: 6 }}
|
||||
className="applyText"
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
</Modal>
|
||||
</React.Fragment>
|
||||
|
||||
)
|
||||
}
|
||||
)
|
|
@ -0,0 +1,52 @@
|
|||
.list-box {
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 20px;
|
||||
margin: 0 1.5rem;
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #dedede;
|
||||
a.edu-orangeline-btn {
|
||||
padding: 0px 10px;
|
||||
}
|
||||
}
|
||||
|
||||
a.primary-link {
|
||||
color: #1890ff;
|
||||
}
|
||||
|
||||
.infos_item {
|
||||
float: left;
|
||||
max-width: 273px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
color: #343434;
|
||||
margin-right: 6px;
|
||||
line-height: 35px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.file-list-prof{
|
||||
background: #fafafa;
|
||||
padding:.25rem .5rem;
|
||||
margin-right:.5rem;
|
||||
}
|
||||
|
||||
.form-edit-modal {
|
||||
.ant-form-item{
|
||||
display: flex;
|
||||
}
|
||||
.ant-form-item-label{
|
||||
min-width: 5rem;
|
||||
}
|
||||
.ant-form-item-control-wrapper{
|
||||
width: 75%;
|
||||
display: inline-block;
|
||||
}
|
||||
.ant-input-number{
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1,8 +1,6 @@
|
|||
import React, { useEffect, useState, useCallback, useMemo } from 'react';
|
||||
import { Modal, Table, Radio, Form, Input, Button, Pagination } from 'antd';
|
||||
import { Modal, Table, Form, Input, Button, Pagination } from 'antd';
|
||||
import { Link } from "react-router-dom";
|
||||
import Nodata from 'forge/Nodata';
|
||||
import Loading from "src/Loading";
|
||||
import Upload from 'military/components/Upload';
|
||||
import { getTaskPaper, proofAdd } from "../../api";
|
||||
import { httpUrl } from 'military/fetch';
|
||||
|
@ -11,7 +9,7 @@ import './index.scss';
|
|||
|
||||
|
||||
export default Form.create()((props) => {
|
||||
const { changeVisible, taskId, visible, form, showNotification,reloadList } = props;
|
||||
const { changeVisible, taskId, visible, form, showNotification, reloadList } = props;
|
||||
const { getFieldDecorator, validateFields, setFieldsValue, } = form;
|
||||
|
||||
const pageSize = props.pageSize || 10;
|
||||
|
@ -38,7 +36,7 @@ export default Form.create()((props) => {
|
|||
taskId && getTaskPaper(params).then(data => {
|
||||
if (data && Array.isArray(data.rows)) {
|
||||
for (const item of data.rows) {
|
||||
item.detail = item.paperDetail.content;
|
||||
item.detail = item.paperDetail && item.paperDetail.content;
|
||||
}
|
||||
}
|
||||
setDataList(data.rows || []);
|
||||
|
@ -106,7 +104,6 @@ export default Form.create()((props) => {
|
|||
const rowSelection = {
|
||||
onChange: (selectedRowKeys, selectedRows) => {
|
||||
setSelectedRows(selectedRows);
|
||||
// console.log(`selectedRowKeys: ${selectedRowKeys}`, 'selectedRows: ', selectedRows);
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 66 KiB |
|
@ -11,21 +11,18 @@
|
|||
height: 4.5rem;
|
||||
margin: 1.25rem 0;
|
||||
background-color: #fff;
|
||||
|
||||
.ant-form-item {
|
||||
margin: 0 1rem 0 0;
|
||||
}
|
||||
}
|
||||
.center-left-but {
|
||||
.circle-button {
|
||||
border-radius: 1rem;
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.center-right-but{
|
||||
.ant-form-item {
|
||||
margin: 0 1rem 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
.ant-form-item-control-wrapper {
|
||||
display: inline-block;
|
||||
}
|
||||
|
@ -43,18 +40,11 @@
|
|||
color: #333;
|
||||
&:first-child {
|
||||
text-align: left;
|
||||
font-weight: bold;
|
||||
font-size: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
.text-ellipsis {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
// white-space: nowrap;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
|
||||
.text-ellipsis-2 {
|
||||
text-overflow: -o-ellipsis-lastline;
|
||||
overflow: hidden;
|
||||
|
@ -71,4 +61,12 @@
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
.text-ellipsis {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -19,6 +19,7 @@ for (const item of taskStatusAllArr) {
|
|||
}
|
||||
|
||||
export default ({ location, history, current_user,showNotification }) => {
|
||||
console.log(current_user);
|
||||
let defaultValue = decodeURI(location.search.split("=")[1] || "");
|
||||
|
||||
const [identity, setIdentity] = useState('1');
|
||||
|
|
|
@ -3,16 +3,16 @@ import { Tabs, Input, Table, Pagination } from 'antd';
|
|||
import { Link } from "react-router-dom";
|
||||
import ChooseNav from '../../components/chooseNav';
|
||||
import ItemListMyTask from '../components/itemListMyTask';
|
||||
import { taskStatusAllArr, applyStatusArr, publishModeArr } from '../static';
|
||||
import { getJoinTaskList,getTaskPaper } from '../api';
|
||||
import { applyStatusAllArr, applyStatusArr, publishModeArr } from '../static';
|
||||
import { getJoinTaskList, myPapers } from '../api';
|
||||
import './index.scss';
|
||||
const Search = Input.Search;
|
||||
const { TabPane } = Tabs;
|
||||
|
||||
const publishStatusArr = taskStatusAllArr.slice(3, 9);
|
||||
const publishStatusArr = applyStatusAllArr.slice(3, 9);
|
||||
|
||||
const statusArr = [];
|
||||
for (const item of taskStatusAllArr) {
|
||||
for (const item of applyStatusAllArr) {
|
||||
statusArr[item.dicItemCode] = item.dicItemName;
|
||||
}
|
||||
|
||||
|
@ -22,73 +22,87 @@ export default ({ taskCategoryValueArr }) => {
|
|||
const [taskStatusString, setTaskStatusString] = useState('3,4,5,6,7,8');
|
||||
|
||||
const [requirePaper, setRequirePaper] = useState('1');
|
||||
|
||||
const [searchInput, setSearchInput] = useState('');
|
||||
const [orderBy, setOrderBy] = useState('createdAtDesc');
|
||||
const [curPage, setCurPage] = useState(1);
|
||||
const [total, setTotal] = useState(0);
|
||||
const [taskList, setTaskList] = useState([]);
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
const [curPagePaper, setCurPagePaper] = useState(1);
|
||||
const [totalPaper, setTotalPaper] = useState(0);
|
||||
const [paperList, setPaperList] = useState([]);
|
||||
|
||||
useEffect(() => {
|
||||
const params = {
|
||||
paperStatusString,
|
||||
taskStatusString,
|
||||
searchInput,
|
||||
orderBy,
|
||||
curPage,
|
||||
pageSize: 10,
|
||||
};
|
||||
setLoading(true);
|
||||
getJoinTaskList(params).then(data => {
|
||||
if (data) {
|
||||
setTaskList(data.rows);
|
||||
setTotal(data.total);
|
||||
}
|
||||
setLoading(false);
|
||||
})
|
||||
}, [paperStatusString, taskStatusString, searchInput, orderBy, curPage]);
|
||||
if (requirePaper === '1') {
|
||||
const params = {
|
||||
paperStatusString,
|
||||
taskStatusString,
|
||||
searchInput,
|
||||
curPage,
|
||||
pageSize: 10,
|
||||
};
|
||||
setLoading(true);
|
||||
getJoinTaskList(params).then(data => {
|
||||
if (data) {
|
||||
setTaskList(data.rows);
|
||||
setTotal(data.total);
|
||||
}
|
||||
setLoading(false);
|
||||
});
|
||||
}
|
||||
}, [requirePaper, paperStatusString, taskStatusString, searchInput, curPage]);
|
||||
|
||||
useEffect(() => {
|
||||
if (requirePaper === '2') {
|
||||
const params = {
|
||||
status: paperStatusString,
|
||||
searchInput,
|
||||
curPage,
|
||||
pageSize: 10,
|
||||
};
|
||||
setLoading(true);
|
||||
myPapers(params).then(data => {
|
||||
if (data) {
|
||||
setPaperList(data.rows);
|
||||
setTotalPaper(data.total);
|
||||
}
|
||||
setLoading(false);
|
||||
})
|
||||
}
|
||||
}, [requirePaper, paperStatusString, searchInput, curPagePaper]);
|
||||
|
||||
|
||||
const columns = useMemo(() => {
|
||||
return [
|
||||
{
|
||||
title: '任务',
|
||||
title: '任务/编号名称',
|
||||
dataIndex: 'name',
|
||||
},
|
||||
{
|
||||
title: '类型',
|
||||
dataIndex: 'createdAt',
|
||||
render: (text, record) => {
|
||||
return <div className="flex-column">
|
||||
<span className="line_1">{taskCategoryValueArr[record.categoryId]}</span>
|
||||
<span className="line_1">{publishModeArr[record.publishMode]}</span>
|
||||
</div>
|
||||
return <Link className="color-grey3 font-16 font-bd" to={`/task/taskDetail/${record.task.id}`}>{record.task.number +" "+ record.task.name}</Link>
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '应征投稿',
|
||||
dataIndex: 'papersCount',
|
||||
title: '成果编号',
|
||||
dataIndex: 'number',
|
||||
},
|
||||
{
|
||||
title: '上传文件',
|
||||
dataIndex: 'files',
|
||||
render: (text) => {
|
||||
return text || 0
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '金额',
|
||||
dataIndex: 'bounty',
|
||||
render: (text) => {
|
||||
return <span className="color-orange">¥{text}</span>
|
||||
}
|
||||
title: '提交时间',
|
||||
dataIndex: 'createdAt',
|
||||
},
|
||||
{
|
||||
title: '任务状态',
|
||||
title: '应征状态',
|
||||
dataIndex: 'status',
|
||||
render: (text, record) => {
|
||||
return statusArr[text]
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
key: 'action',
|
||||
|
@ -102,7 +116,6 @@ export default ({ taskCategoryValueArr }) => {
|
|||
}, [taskCategoryValueArr, publishModeArr, statusArr]);
|
||||
|
||||
|
||||
|
||||
const changeOptionId = useCallback((option, type) => {
|
||||
if (type === 'taskStatus') {
|
||||
setTaskStatusString(option.dicItemCode.toString() || '3,4,5,6,7,8');
|
||||
|
@ -176,16 +189,16 @@ export default ({ taskCategoryValueArr }) => {
|
|||
<Table
|
||||
loading={loading}
|
||||
rowKey={(row) => row.id}
|
||||
dataSource={taskList}
|
||||
dataSource={paperList}
|
||||
columns={columns}
|
||||
pagination={false}
|
||||
className="mt10"
|
||||
/>
|
||||
{taskList.length > 10 &&
|
||||
<Pagination
|
||||
onChange={(page) => { setCurPage(page) }}
|
||||
onChange={(page) => { setCurPagePaper(page) }}
|
||||
current={curPage}
|
||||
total={total}
|
||||
total={totalPaper}
|
||||
/>}
|
||||
</TabPane>
|
||||
</Tabs>
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
import React, { useCallback, useMemo, useEffect, useState } from 'react';
|
||||
import { Input, Button,Radio, Form,Table,Pagination,Modal } from 'antd';
|
||||
import { Input, Button, Radio, Form, Table, Pagination, Modal } from 'antd';
|
||||
import { Link } from "react-router-dom";
|
||||
import ItemTaskManage from '../components/itemTaskManage';
|
||||
import StatusNav from '../../components/statusNav';
|
||||
import { approveArr } from '../static';
|
||||
import { complainPaperList ,checkComplain} from '../api';
|
||||
import { complainPaperList, checkComplain } from '../api';
|
||||
import { proofArr } from '../static';
|
||||
import '../index.scss';
|
||||
|
||||
const TextArea = Input.TextArea;
|
||||
|
||||
export default Form.create()(({ current_user, form, showNotification, match, history }) => {
|
||||
const proofArrCheck = proofArr.slice(0, 2);
|
||||
|
||||
export default Form.create()(({ current_user, form, showNotification, match, }) => {
|
||||
|
||||
const { getFieldDecorator, validateFields, setFieldsValue, getFieldsValue } = form;
|
||||
|
||||
const [approve,setApprove]=useState(1);
|
||||
const [approve, setApprove] = useState(1);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [searchObj, setSearchObj] = useState({});
|
||||
const [curPage, setCurPage] = useState(1);
|
||||
|
@ -39,9 +41,11 @@ export default Form.create()(({ current_user, form, showNotification, match, his
|
|||
}
|
||||
setLoading(false);
|
||||
})
|
||||
|
||||
}, [reload, curPage, searchObj]);
|
||||
|
||||
|
||||
|
||||
const helper = useCallback(
|
||||
(name, rules, widget) => (
|
||||
<Form.Item>
|
||||
|
@ -57,7 +61,7 @@ export default Form.create()(({ current_user, form, showNotification, match, his
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function clearSearch() {
|
||||
setFieldsValue({
|
||||
numberInput: '',
|
||||
|
@ -88,7 +92,7 @@ export default Form.create()(({ current_user, form, showNotification, match, his
|
|||
width: "20%",
|
||||
render: (text, record) => (
|
||||
<span>
|
||||
<Link className="line_1 color-grey3 text-ellipsis" to={`/task/taskDetail/${record.taskId}`}>{text}</Link>
|
||||
<Link className="line_1 color-grey3" to={`/task/taskDetail/${record.taskId}`}>{text}</Link>
|
||||
</span >
|
||||
),
|
||||
},
|
||||
|
@ -149,6 +153,11 @@ export default Form.create()(({ current_user, form, showNotification, match, his
|
|||
});
|
||||
}
|
||||
|
||||
const changeOptionId = useCallback((option) => {
|
||||
// setProofStatusString(option.dicItemCode.toString() || '0,1');
|
||||
setCurPage(1);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="centerbox task-manage">
|
||||
|
||||
|
@ -175,7 +184,16 @@ export default Form.create()(({ current_user, form, showNotification, match, his
|
|||
|
||||
|
||||
<div className="center-content">
|
||||
<Table
|
||||
{
|
||||
approve === 2 && <StatusNav
|
||||
key={'approveStatus'}
|
||||
type={'approveStatus'}
|
||||
options={proofArrCheck}
|
||||
changeOptionId={changeOptionId}
|
||||
/>
|
||||
}
|
||||
|
||||
<Table
|
||||
loading={loading}
|
||||
rowKey={(row) => row.id}
|
||||
dataSource={taskList}
|
||||
|
|
|
@ -1,19 +1,27 @@
|
|||
import React, { useCallback, useEffect, useState, useMemo } from 'react';
|
||||
import { Input, Radio, Select, Button, Form, DatePicker, Table, Pagination, Modal } from 'antd';
|
||||
import { Link } from "react-router-dom";
|
||||
import { paperVerifyStatusArr } from '../static';
|
||||
import { getTaskPaper, checkPaper } from '../api';
|
||||
import { paperCheckStatusArr } from '../static';
|
||||
import { readyCheckPapers, checkPaper } from '../api';
|
||||
import '../index.scss';
|
||||
const format = "YYYY-MM-DD HH:mm:ss";
|
||||
const Option = Select.Option;
|
||||
const TextArea = Input.TextArea;
|
||||
|
||||
|
||||
const checkStatusArr=[];
|
||||
for(const item of paperCheckStatusArr){
|
||||
checkStatusArr[item.dicItemCode]=item.dicItemName;
|
||||
}
|
||||
export default Form.create()(({ current_user, form, showNotification, match, history }) => {
|
||||
|
||||
|
||||
const { getFieldDecorator, validateFields, setFieldsValue, getFieldsValue } = form;
|
||||
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [searchObj, setSearchObj] = useState({});
|
||||
const [searchObj, setSearchObj] = useState({
|
||||
checkStatus:'0,1,2'
|
||||
});
|
||||
const [curPage, setCurPage] = useState(1);
|
||||
const [total, setTotal] = useState(0);
|
||||
const [taskList, setTaskList] = useState([]);
|
||||
|
@ -28,12 +36,12 @@ export default Form.create()(({ current_user, form, showNotification, match, his
|
|||
useEffect(() => {
|
||||
const params = {
|
||||
...searchObj,
|
||||
orderBy: 'createdAtDesc',
|
||||
// orderBy: 'createdAtDesc',
|
||||
curPage,
|
||||
pageSize: 10,
|
||||
};
|
||||
setLoading(true);
|
||||
getTaskPaper(params).then(data => {
|
||||
readyCheckPapers(params).then(data => {
|
||||
if (data) {
|
||||
setTaskList(data.rows);
|
||||
setTotal(data.total);
|
||||
|
@ -54,9 +62,9 @@ export default Form.create()(({ current_user, form, showNotification, match, his
|
|||
function onSearch() {
|
||||
validateFields((err, values) => {
|
||||
if (!err) {
|
||||
if (values.startTime) values.startTime = values.startTime.format(format);
|
||||
if (values.endTime) values.endTime = values.endTime.format(format);
|
||||
if (values.verifyStatus === '-1') values.verifyStatus = '';
|
||||
if (values.startCreatedAt) values.startCreatedAt = values.startCreatedAt.format(format);
|
||||
if (values.endCreatedAt) values.endCreatedAt = values.endCreatedAt.format(format);
|
||||
if (values.checkStatus === '0,1,2') values.checkStatus = '';
|
||||
setSearchObj(values);
|
||||
}
|
||||
});
|
||||
|
@ -64,9 +72,9 @@ export default Form.create()(({ current_user, form, showNotification, match, his
|
|||
|
||||
function clearSearch() {
|
||||
setFieldsValue({
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
verifyStatus: '-1'
|
||||
startCreatedAt: '',
|
||||
endCreatedAt: '',
|
||||
checkStatus: '0,1,2'
|
||||
});
|
||||
setSearchObj({});
|
||||
}
|
||||
|
@ -79,7 +87,7 @@ export default Form.create()(({ current_user, form, showNotification, match, his
|
|||
width: "20%",
|
||||
render: (text, record) => (
|
||||
<span>
|
||||
<Link className="line_1 color-grey3 text-ellipsis" to={`/task/taskDetail/${record.taskId}`}>{text}</Link>
|
||||
<Link className="line_1 color-grey3" to={`/task/taskDetail/${record.taskId}`}>{record.task.name}</Link>
|
||||
</span >
|
||||
),
|
||||
},
|
||||
|
@ -104,9 +112,9 @@ export default Form.create()(({ current_user, form, showNotification, match, his
|
|||
},
|
||||
{
|
||||
title: '审核状态',
|
||||
dataIndex: 'verifyStatus',
|
||||
dataIndex: 'checkStatus',
|
||||
render: (text, record) => {
|
||||
return text ? '通过' : '未通过'
|
||||
return checkStatusArr[text]
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -143,6 +151,13 @@ export default Form.create()(({ current_user, form, showNotification, match, his
|
|||
});
|
||||
}
|
||||
|
||||
function changeStatus(e){
|
||||
setSearchObj({
|
||||
...searchObj,
|
||||
checkStatus:e,
|
||||
});
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="centerbox task-manage">
|
||||
|
||||
|
@ -150,19 +165,21 @@ export default Form.create()(({ current_user, form, showNotification, match, his
|
|||
<div className="center-left-but">
|
||||
{helper(
|
||||
"",
|
||||
"verifyStatus",
|
||||
"checkStatus",
|
||||
[],
|
||||
<Select
|
||||
showArrow
|
||||
placeholder="请选择审核状态"
|
||||
onChange={changeStatus}
|
||||
>
|
||||
<Option key={'0,1,2'}>{'全部成果'}</Option>
|
||||
{
|
||||
paperVerifyStatusArr.map(item => {
|
||||
paperCheckStatusArr.map(item => {
|
||||
return <Option key={item.dicItemCode}>{item.dicItemName}</Option>
|
||||
})
|
||||
}
|
||||
</Select>,
|
||||
'-1'
|
||||
'0,1,2'
|
||||
)}
|
||||
</div>
|
||||
|
||||
|
@ -171,7 +188,7 @@ export default Form.create()(({ current_user, form, showNotification, match, his
|
|||
|
||||
{helper(
|
||||
"发布时间:",
|
||||
"startTime",
|
||||
"startCreatedAt",
|
||||
[],
|
||||
<DatePicker
|
||||
showTime
|
||||
|
@ -182,7 +199,7 @@ export default Form.create()(({ current_user, form, showNotification, match, his
|
|||
|
||||
{helper(
|
||||
"",
|
||||
"endTime",
|
||||
"endCreatedAt",
|
||||
[],
|
||||
<DatePicker
|
||||
showTime
|
||||
|
|
|
@ -0,0 +1,129 @@
|
|||
import React, { useCallback, useEffect, useState } from 'react';
|
||||
import { Input, Button, Form } from 'antd';
|
||||
import ItemPublicityComplain from '../components/itemPublicityComplain';
|
||||
import StatusNav from '../../components/statusNav';
|
||||
import { publicityArr } from '../static';
|
||||
import { publicityComplainList, } from '../api';
|
||||
import '../index.scss';
|
||||
|
||||
export default Form.create()(({ current_user, form, showNotification, match, history }) => {
|
||||
const { getFieldDecorator, validateFields, setFieldsValue } = form;
|
||||
const [approve, setApprove] = useState(1);
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [searchObj, setSearchObj] = useState({});
|
||||
const [statusString, setStatusString] = useState('2');
|
||||
const [curPage, setCurPage] = useState(1);
|
||||
const [total, setTotal] = useState(0);
|
||||
const [taskList, setTaskList] = useState([]);
|
||||
|
||||
const [reload, setReload] = useState(0);
|
||||
|
||||
useEffect(() => {
|
||||
const params = {
|
||||
...searchObj,
|
||||
statusString,
|
||||
orderBy: 'createdAtDesc',
|
||||
curPage,
|
||||
pageSize: 10,
|
||||
};
|
||||
setLoading(true);
|
||||
publicityComplainList(params).then(data => {
|
||||
if (data) {
|
||||
setTaskList(data.rows);
|
||||
setTotal(data.total);
|
||||
}
|
||||
setLoading(false);
|
||||
})
|
||||
}, [reload, statusString, curPage, searchObj]);
|
||||
|
||||
|
||||
const helper = useCallback(
|
||||
(name, rules, widget) => (
|
||||
<Form.Item>
|
||||
{getFieldDecorator(name, { rules, validateFirst: true, })(widget)}
|
||||
</Form.Item>
|
||||
), []);
|
||||
|
||||
|
||||
function onSearch() {
|
||||
validateFields((err, values) => {
|
||||
if (!err) {
|
||||
setSearchObj(values);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
const changeOptionId = useCallback((option) => {
|
||||
setStatusString(option.dicItemCode.toString() || '0,1');
|
||||
setCurPage(1);
|
||||
}, []);
|
||||
|
||||
|
||||
function changeApprove(approve) {
|
||||
setApprove(approve);
|
||||
setCurPage(1);
|
||||
if (approve === 1) {
|
||||
setStatusString('2');
|
||||
} else {
|
||||
setStatusString('0,1');
|
||||
}
|
||||
}
|
||||
|
||||
function clearSearch() {
|
||||
setFieldsValue({
|
||||
numberInput: '',
|
||||
});
|
||||
setSearchObj({});
|
||||
}
|
||||
|
||||
const reloadList = useCallback(() => {
|
||||
setReload(reload + 1);
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<div className="centerbox task-manage">
|
||||
|
||||
<div className="center-screen" >
|
||||
<div className="center-left-but">
|
||||
<Button className="circle-button" type={approve === 1 ? 'primary' : ''} onClick={() => { changeApprove(1) }}>待审批</Button>
|
||||
<Button className="circle-button" type={approve === 2 ? 'primary' : ''} onClick={() => { changeApprove(2) }}>已审批</Button>
|
||||
</div>
|
||||
|
||||
<div className="center-right-but">
|
||||
{helper(
|
||||
"numberInput",
|
||||
[{ max: 20, message: '长度不能超过20个字符' }],
|
||||
<Input
|
||||
placeholder="输入成果编号进行检索"
|
||||
/>
|
||||
)}
|
||||
<Button className="mr10" type="primary" onClick={onSearch}>搜索</Button>
|
||||
<Button className="mr10" type="" onClick={clearSearch}>清除</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="center-content">
|
||||
{
|
||||
approve === 2 && <StatusNav
|
||||
key={'status'}
|
||||
type={'status'}
|
||||
options={publicityArr}
|
||||
changeOptionId={changeOptionId}
|
||||
/>
|
||||
}
|
||||
<ItemPublicityComplain
|
||||
list={taskList}
|
||||
curPage={curPage}
|
||||
total={total}
|
||||
changePage={(page) => { setCurPage(page) }}
|
||||
loading={loading}
|
||||
showNotification={showNotification}
|
||||
reloadList={reloadList}
|
||||
/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
)
|
||||
}
|
||||
)
|
|
@ -41,6 +41,11 @@ export const proofArr = [
|
|||
{ dicItemCode: 2, name: "待审核", dicItemName: "待审核" },
|
||||
]
|
||||
|
||||
export const publicityArr=[
|
||||
{ dicItemCode: 1, name: "已受理", dicItemName: "已受理" },
|
||||
{ dicItemCode: 0, name: "不受理", dicItemName: "不受理" },
|
||||
]
|
||||
|
||||
export const publishModeArr=["自主提交","统筹任务"];
|
||||
|
||||
export const sortArr = [{
|
||||
|
@ -79,12 +84,13 @@ export const applyStatusAllArr = [
|
|||
{ dicItemCode: '4', name: "待确认", dicItemName: '待确认' },
|
||||
];
|
||||
|
||||
export const paperVerifyStatusArr=[
|
||||
{ dicItemCode: '-1', name: "全部成果评论", dicItemName: '全部成果评论' },
|
||||
export const paperCheckStatusArr=[
|
||||
{ dicItemCode: '0', name: "待审核", dicItemName: '待审核' },
|
||||
{ dicItemCode: '1', name: "通过", dicItemName: '通过' },
|
||||
{ dicItemCode: '0', name: "未通过", dicItemName: '未通过' },
|
||||
{ dicItemCode: '2', name: "未通过", dicItemName: '未通过' },
|
||||
]
|
||||
|
||||
|
||||
export const formItemLayout = {
|
||||
labelCol: {
|
||||
xs: { span: 10 },
|
||||
|
|
|
@ -2,14 +2,16 @@ import React, { forwardRef, useEffect, useState, useCallback, useMemo } from 're
|
|||
import { Form, Input, Button, Modal, Table, Pagination, Checkbox, Tooltip } from 'antd';
|
||||
import classNames from 'classnames';
|
||||
import { Link } from "react-router-dom";
|
||||
import { getImageUrl, formatDuring } from 'educoder';
|
||||
import { formatDuring } from 'educoder';
|
||||
import Upload from '../../components/Upload';
|
||||
import StatusNav from '../../components/statusNav';
|
||||
import ItemListPaper from '../components/itemListPaper';
|
||||
import ProofModal from '../components/proofModal';
|
||||
import { getTaskDetail, getTaskCategory, getTaskPaper, updateTask, addPaper, getAgreement, agreement, checkAgreement, checkHavePaper } from '../api';
|
||||
import { taskModeIdArr, applyStatusArr, applyStatusAllArr, agreementContent } from '../static';
|
||||
import { httpUrl } from '../../fetch';
|
||||
import winpng from '../image/win.png';
|
||||
import headpng from '../image/head.png';
|
||||
import './index.scss';
|
||||
const { TextArea } = Input;
|
||||
|
||||
|
@ -24,31 +26,9 @@ for (const item of applyStatusAllArr) {
|
|||
applyStatusAllNameArr[item.dicItemCode] = item.dicItemName;
|
||||
}
|
||||
|
||||
const columns = [
|
||||
{
|
||||
title: '应征者姓名',
|
||||
dataIndex: 'name',
|
||||
},
|
||||
{
|
||||
title: '投稿时间',
|
||||
dataIndex: 'createdAt',
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'status',
|
||||
render: (text, record) => {
|
||||
return text === 2 ? <img alt="胜出" src={winpng} /> : applyStatusAllNameArr[text]
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '详情',
|
||||
dataIndex: 'detail',
|
||||
},
|
||||
];
|
||||
|
||||
export default Form.create()(
|
||||
forwardRef(({ match, current_user, form, history, showNotification }, ref) => {
|
||||
console.log(current_user);
|
||||
const id = match.params.taskId;
|
||||
const { getFieldDecorator, validateFields, setFieldsValue } = form;
|
||||
|
||||
|
@ -71,6 +51,9 @@ export default Form.create()(
|
|||
const [reload, setReload] = useState(0);
|
||||
const [relaodChildList, setRelaodChildList] = useState(0);
|
||||
|
||||
const [visibleProofs, setVisibleProofs] = useState(false);
|
||||
|
||||
|
||||
// 获取任务领域配置数据
|
||||
useEffect(() => {
|
||||
getTaskCategory().then(data => {
|
||||
|
@ -143,7 +126,7 @@ export default Form.create()(
|
|||
id && getTaskPaper(params).then(data => {
|
||||
if (data && Array.isArray(data.rows)) {
|
||||
for (const item of data.rows) {
|
||||
item.detail = item.paperDetail?item.paperDetail.content:"";
|
||||
item.detail = item.paperDetail ? item.paperDetail.content : "";
|
||||
}
|
||||
}
|
||||
setDataList(data.rows || []);
|
||||
|
@ -280,10 +263,13 @@ export default Form.create()(
|
|||
}
|
||||
}
|
||||
|
||||
function reloadList() {
|
||||
const reloadList = useCallback(() => {
|
||||
setRelaodChildList(relaodChildList + 1);
|
||||
}
|
||||
});
|
||||
|
||||
const reloadDetail = useCallback(() => {
|
||||
setReload(reload + 1);
|
||||
}, []);
|
||||
|
||||
const signContent = useCallback(() => {
|
||||
if (signAgreement && isPaper) {
|
||||
|
@ -320,12 +306,12 @@ export default Form.create()(
|
|||
<Button className="mr20" type={"primary"} onClick={() => { saveItem() }}>提交</Button>
|
||||
</div>
|
||||
)
|
||||
} else {
|
||||
} else if (detailData.user && (current_user.login !== detailData.user.login)) {
|
||||
return <div className="edu-back-white padding30 mt20 text-center">
|
||||
<Button className="mr20" type={"primary"} onClick={() => { setApplyModal(true) }}>我要应征投稿</Button>
|
||||
</div>
|
||||
}
|
||||
}, [signAgreement, isPaper]);
|
||||
}, [signAgreement, isPaper, current_user, detailData]);
|
||||
|
||||
function goUser(login) {
|
||||
window.location.href = `/users/${login}`;
|
||||
|
@ -335,6 +321,34 @@ export default Form.create()(
|
|||
Modal.info({ title: '暂未提供接口' });
|
||||
}
|
||||
|
||||
const columns = useMemo(() => {
|
||||
return [
|
||||
{
|
||||
title: '应征者姓名',
|
||||
dataIndex: 'name',
|
||||
render: (text, record) => {
|
||||
return !detailData.showUserStatus && record.user ? (record.user.nickname || record.user.login) : '******'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '投稿时间',
|
||||
dataIndex: 'createdAt',
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'status',
|
||||
render: (text, record) => {
|
||||
return text === 2 ? <img alt="胜出" src={winpng} /> : applyStatusAllNameArr[text]
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '详情',
|
||||
dataIndex: 'detail',
|
||||
},
|
||||
];
|
||||
}, [detailData]);
|
||||
|
||||
|
||||
return (
|
||||
<div className="centerbox task-detail">
|
||||
<div className="head-navigation">
|
||||
|
@ -347,7 +361,7 @@ export default Form.create()(
|
|||
<div className="df mb20">
|
||||
<div className="mr30">
|
||||
<a onClick={() => { goUser(detailData.user.login) }} alt="用户头像">
|
||||
<img alt="头像加载失败" className="bor-radius-all" height="60" src={getImageUrl("images/educoder/competition/1.png")} width="60" />
|
||||
<img alt="头像加载失败" className="bor-radius-all" height="60" src={headpng} width="60" />
|
||||
</a>
|
||||
<p className="lineh-20 mt10 edu-txt-center">{detailData && detailData.user && (detailData.user.nickname || detailData.user.login)}</p>
|
||||
</div>
|
||||
|
@ -360,7 +374,7 @@ export default Form.create()(
|
|||
<ul className="fl">
|
||||
<li><span className="mr10 color-grey9">悬赏模式:</span><span className="color-grey3">{taskModeNameArr[detailData.taskModeId]}</span></li>
|
||||
<li><span className="mr10 color-grey9">任务编号:</span><span className="color-grey3">{detailData.number}</span></li>
|
||||
<li><span className="mr10 color-grey9">发布时间:</span><span className="color-grey3">{detailData.publishedAt}</span></li>
|
||||
<li><span className="mr10 color-grey9">发布时间:</span><span className="color-grey3">{detailData.publishedAt || detailData.createdAt}</span></li>
|
||||
{/* <li><span className="mr10 color-grey9">截止时间:</span><span className="color-grey3">{detailData.expiredAt}</span></li> */}
|
||||
</ul>
|
||||
<ul className="fr edu-txt-right">
|
||||
|
@ -373,8 +387,12 @@ export default Form.create()(
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{detailData.status === 5 && <p className="color-orange mb10 task_tip fl">
|
||||
<i className="iconfont icon-laba fl mr5 color-orange font-15"></i>该需求已选稿,作品公示期为{detailData.makePublicDays}天接受监督和举报,于{detailData.makePublicAt}公示期满后支付赏金
|
||||
</p>}
|
||||
|
||||
<div className="clearfix padding20 mb30" style={{ background: "#FAFAFA" }}>
|
||||
|
||||
<ul className="tasks_status clearfix">
|
||||
<li className="active"><span>发布任务</span></li>
|
||||
|
||||
|
@ -430,7 +448,8 @@ export default Form.create()(
|
|||
{!detailData.showUserStatus && <Tooltip placement="top" title={"不公示应征者姓名"}>
|
||||
<i data-tip-down="不公示应征者姓名" className="iconfont icon-yincang1 color-grey9 font-20"></i>
|
||||
</Tooltip>}
|
||||
{/* <a href="javascript:void(0)" onclick="upload_proofs_popup(130)" className="line_1 color-blue fr ml20" id="proof-upload-button">上传佐证材料</a> */}
|
||||
{detailData.status === 3 && dataList.length && (!detailData.isProofBoolean) && detailData.user && (current_user.login === detailData.user.login) &&
|
||||
<a className="line_1 color-blue fr ml20" onClick={() => { setVisibleProofs(true) }}>上传佐证材料</a>}
|
||||
{/* <a href="/tasks/130/export_papers" className="line_1 color-blue fr ml20" data-disable-with="<img alt="Loading" className="download-loading" src="/images/loading.gif?1564989000" ></a>下载中..." target="_blank">一键导出成果物</a> */}
|
||||
{dataList.length > 0 && taskLimit && <a className="line_1 color-blue fr ml20" onClick={exportPaper}>一键导出成果物 >></a>}
|
||||
{(!detailData.showUserStatus) && taskLimit && <a className="fr color-orange ml20" onClick={showUser}>应征者名单公示 >></a>}
|
||||
|
@ -444,7 +463,7 @@ export default Form.create()(
|
|||
/>
|
||||
|
||||
{
|
||||
detailData.status > 4 ?
|
||||
detailData.status > 6 ?
|
||||
<React.Fragment>
|
||||
<Table
|
||||
loading={loading}
|
||||
|
@ -472,6 +491,7 @@ export default Form.create()(
|
|||
applyStatusAllNameArr={applyStatusAllNameArr}
|
||||
reloadList={reloadList}
|
||||
showNotification={showNotification}
|
||||
detailStatus={detailData.status}
|
||||
/>}
|
||||
</div>
|
||||
|
||||
|
@ -489,6 +509,13 @@ export default Form.create()(
|
|||
</div>
|
||||
</Modal>
|
||||
|
||||
<ProofModal
|
||||
taskId={id}
|
||||
visible={visibleProofs}
|
||||
changeVisible={setVisibleProofs}
|
||||
showNotification={showNotification}
|
||||
reloadList={reloadDetail}
|
||||
/>
|
||||
</div>
|
||||
|
||||
)
|
||||
|
|
|
@ -26,6 +26,14 @@
|
|||
line-height: 1.25rem;
|
||||
}
|
||||
|
||||
.task_tip {
|
||||
padding: 0px 20px;
|
||||
border-radius: 15px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
background: #FFF8F5;
|
||||
}
|
||||
|
||||
.tasks_status li {
|
||||
float: left;
|
||||
position: relative;
|
||||
|
|
|
@ -6,9 +6,12 @@ import SortBox from '../../components/sortBox';
|
|||
import ItemListTask from '../components/itemListTask';
|
||||
import { taskTimeArr, taskStatusArr, sortArr, taskModeIdArr } from '../static';
|
||||
import { getTaskList, getTaskCategory } from '../api';
|
||||
import '../index.scss';
|
||||
const Search = Input.Search;
|
||||
|
||||
export default ({ history, }) => {
|
||||
export default ({ history, current_user}) => {
|
||||
console.log(current_user);
|
||||
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [taskCategoryArr, setTaskCategoryArr] = useState([]);
|
||||
const [categoryId, setCategoryId] = useState('');
|
||||
|
|
Loading…
Reference in New Issue