forked from Gitlink/forgeplus-react
Merge pull request '修改创客成果审核权限等' (#485) from tongChong/forgeplus-react:pre_dev_military into pre_dev_military
This commit is contained in:
commit
177e45979a
|
@ -402,6 +402,13 @@ export function checkPaper(data) {
|
|||
});
|
||||
}
|
||||
|
||||
export function agreeNoPassAPI(paperId){
|
||||
return fetch({
|
||||
url: `/api/paper/updatePaperCheckStatus/${paperId}`,
|
||||
method: 'put',
|
||||
});
|
||||
}
|
||||
|
||||
// 成果申诉
|
||||
export function complainPaper(data) {
|
||||
return fetch({
|
||||
|
|
|
@ -76,7 +76,7 @@ export default Form.create()(props => {
|
|||
onCancel={() => { setVisible(false) }}
|
||||
className="form-edit-modal"
|
||||
>
|
||||
{checkedItem.checkStatus == 2 && detailStatus === 3 && <p className=" mb10 color-orange task_tip">审核意见:{checkedItem.auditing.message}</p>}
|
||||
{checkedItem.checkStatus == 0 && detailStatus === 3 && <p className=" mb10 color-orange task_tip">审核意见:{checkedItem.auditing.message}</p>}
|
||||
<p className="edu-txt-center lineh-20 mb10">你的申诉信息将发送给平台管理员</p>
|
||||
<p className="edu-txt-center lineh-20">请如实填写有效的申诉原由,我们将尽快完成审核</p>
|
||||
{
|
||||
|
|
|
@ -46,8 +46,12 @@ export default Form.create()((props) => {
|
|||
}, [page]);
|
||||
|
||||
function downFile(item) {
|
||||
let url = httpUrl + '/busiAttachments/download/' + item.id;
|
||||
window.open(url);
|
||||
if(item.uniqueFileName){
|
||||
let url = httpUrl + '/busiAttachments/download/' + item.id;
|
||||
window.open(url);
|
||||
}else{
|
||||
showNotification("您没有下载权限!");
|
||||
}
|
||||
}
|
||||
|
||||
function report() {
|
||||
|
|
|
@ -41,37 +41,10 @@
|
|||
top:-10px;
|
||||
margin-left: -40px;
|
||||
}
|
||||
// .chuangke_icon{
|
||||
// position: relative;
|
||||
// top:-8px;
|
||||
// background-image: url("../../image/chuangke_icon.png");
|
||||
// width: 140px;
|
||||
// height: 46px;
|
||||
// background-size: 100% 100%;
|
||||
// font-size: 14px;
|
||||
// color: #fff;
|
||||
// display: flex;
|
||||
// transform: scale(0.75);
|
||||
// justify-content: center;
|
||||
// align-items: center;
|
||||
// padding-left: 10px;
|
||||
// margin-right: -15px;
|
||||
// margin-left: -27px;
|
||||
// }
|
||||
}
|
||||
.list-title:hover {
|
||||
color: #4154f1;
|
||||
}
|
||||
.list-title span {
|
||||
padding: 0px 10px;
|
||||
margin-left: .625rem;
|
||||
background: #f8c753;
|
||||
font-size: .8rem;
|
||||
line-height: 1.8;
|
||||
color: #fff;
|
||||
border-radius: 14px;
|
||||
}
|
||||
|
||||
|
||||
.list-other {
|
||||
font-size: 12px;
|
||||
|
|
|
@ -68,7 +68,15 @@
|
|||
-webkit-box-orient: vertical;
|
||||
}
|
||||
}
|
||||
|
||||
.list-title span {
|
||||
padding: 0px 10px;
|
||||
margin-left: .625rem;
|
||||
background: #f8c753;
|
||||
font-size: .8rem;
|
||||
line-height: 1.8;
|
||||
color: #fff;
|
||||
border-radius: 14px;
|
||||
}
|
||||
span.list-yellow {
|
||||
background: #fa6400;
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ import { Input, Radio, Select, Button, Form, DatePicker, Table, Pagination, Moda
|
|||
import { Link } from "react-router-dom";
|
||||
import { Confirm } from '../../components/ModalFun';
|
||||
import { paperCheckStatusArr,taskStatusAllArr } from '../static';
|
||||
import { readyCheckPapers, checkPaper,deletePaper } from '../api';
|
||||
import { readyCheckPapers, checkPaper,deletePaper,agreeNoPassAPI } from '../api';
|
||||
import '../index.scss';
|
||||
import './index.scss';
|
||||
const format = "YYYY-MM-DD HH:mm:ss";
|
||||
|
@ -180,10 +180,12 @@ export default Form.create()(({ current_user, form, showNotification, match, his
|
|||
title: '审核状态',
|
||||
dataIndex: 'checkStatus',
|
||||
render: (text, record) => {
|
||||
return text === 2 ? <React.Fragment>
|
||||
<Button className="mr5 font-12" type="primary" size="small" onClick={() => { checkPaperItem(record.id, true) }}>通过</Button>
|
||||
<Button className="mr5 font-12" type="info" size="small" onClick={() => { disagree(record) }}>不通过</Button>
|
||||
</React.Fragment> : checkStatusArr[text]
|
||||
return checkStatusArr[text]
|
||||
// text === 2 ? <React.Fragment>
|
||||
// <Button className="mr5 font-12" type="primary" size="small" onClick={() => { checkPaperItem(record.id, true) }}>通过</Button>
|
||||
// <Button className="mr5 font-12" type="info" size="small" onClick={() => { disagree(record) }}>不通过</Button>
|
||||
// </React.Fragment> :
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -191,16 +193,28 @@ export default Form.create()(({ current_user, form, showNotification, match, his
|
|||
key: 'action',
|
||||
render: (text, record) => (
|
||||
<React.Fragment>
|
||||
<Link className="mr5 line_1 color-grey3" to={`/task/taskDetail/${record.taskId}`}>查看</Link>
|
||||
{record.task&&record.task.status==3&&<a className="mr5 line_1 color-grey3" onClick={() => { deleteItem(record.id) }}>删除</a>}
|
||||
{record.checkStatus ===2&&<Button className="mr5 font-12" type="primary" size="small" onClick={() => { checkPaperItem(record.id, true) }}>通过</Button>}
|
||||
{record.checkStatus ===0&&<Button className="mr5 font-12" type="primary" size="small" onClick={() => { agreeNoPass(record.id) }}>通过</Button>}
|
||||
{record.checkStatus !==0&&<Button className="mr5 font-12" type="info" size="small" onClick={() => { disagree(record) }}>不通过</Button>}
|
||||
{record.task&&record.task.status==3&&<Button type="danger" size="small" className="mr5 font-12" onClick={() => { deleteItem(record.id) }}>删除</Button>}
|
||||
|
||||
{/* {record.task&&record.task.status==3&&<Button className=" font-12" type="danger" size="small" onClick={() => { deleteItem(record.id) }}>删除</Button>} */}
|
||||
</React.Fragment>
|
||||
),
|
||||
},
|
||||
]
|
||||
}, []);
|
||||
|
||||
|
||||
function agreeNoPass(paperId){
|
||||
setLoading(true);
|
||||
agreeNoPassAPI(paperId).then(res => {
|
||||
setLoading(false);
|
||||
if (res && res.message === 'success') {
|
||||
setReload(Math.random());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 不通过评论或者成果
|
||||
function disagree(item) {
|
||||
if (!item.parentId) {
|
||||
|
|
|
@ -3,8 +3,13 @@ import { formatDuring } from 'educoder';
|
|||
// task静态数据,工具函数
|
||||
// 任务状态分组
|
||||
export const taskStatusArr = [
|
||||
{ dicItemCode: "3,4,5,6,7", name: "正在进行中", dicItemName: "正在进行中" },
|
||||
{ dicItemCode: "8", name: "已完成", dicItemName: "已完成" },
|
||||
// { dicItemCode: "3,4,5,6,7", name: "正在进行中", dicItemName: "正在进行中" },
|
||||
{ dicItemCode: 3, name: "成果征集中", dicItemName: "成果征集中" },
|
||||
{ dicItemCode: 4, name: "成果评选中", dicItemName: "成果评选中" },
|
||||
{ dicItemCode: 5, name: "公示中", dicItemName: "公示中" },
|
||||
{ dicItemCode: 6, name: "协议签订中", dicItemName: "协议签订中" },
|
||||
{ dicItemCode: 7, name: "支付中", dicItemName: "支付中" },
|
||||
{ dicItemCode: 8, name: "已完成", dicItemName: "已完成" },
|
||||
];
|
||||
|
||||
// 所有任务状态
|
||||
|
|
|
@ -535,10 +535,10 @@ export default Form.create()(
|
|||
|
||||
<div className="applyList edu-back-white padding30 mt20">
|
||||
<div className="font-16 font-bd">交稿
|
||||
{/* ({dataList.length}) */}
|
||||
{!detailData.showUserStatus && <Tooltip placement="top" title={"不公示应征者姓名"}>
|
||||
{/* 此功能暂时去掉 */}
|
||||
{/* {!detailData.showUserStatus && <Tooltip placement="top" title={"不公示应征者姓名"}>
|
||||
<i data-tip-down="不公示应征者姓名" className="iconfont icon-yincang1 color-grey9 font-20 ml5"></i>
|
||||
</Tooltip>}
|
||||
</Tooltip>} */}
|
||||
{detailData.status === 4 && dataList.length && (!detailData.isProofBoolean) && (!detailData.expertReview) && detailData.user && (current_user.admin || current_user.login === detailData.user.login) ?
|
||||
<a className="line_1 color-blue fr ml20" onClick={() => { setVisibleProofs(true) }}>上传佐证材料</a> : ''}
|
||||
{dataList.length > 0 && taskLimit && <a className="line_1 color-blue fr ml20" onClick={() => { window.open(`${httpUrl}/api/paper/papers/download/${id}`) }}>一键导出成果物 >></a>}
|
||||
|
|
|
@ -240,7 +240,7 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
}
|
||||
}, []);
|
||||
|
||||
// 保存
|
||||
// 发布/保存
|
||||
function saveItem(status) {
|
||||
validateFields((error, values) => {
|
||||
if (!error) {
|
||||
|
|
|
@ -151,24 +151,28 @@ export default ({ history, current_user, showLoginDialog, location, mygetHelmeta
|
|||
history.push(`/task/taskDetail/${id}`);
|
||||
}
|
||||
|
||||
// 新增校验
|
||||
// 发布任务校验
|
||||
function goAdd() {
|
||||
if (!current_user.user_id) {
|
||||
showLoginDialog();
|
||||
return;
|
||||
}
|
||||
if(current_user.admin){
|
||||
history.push("/task/taskAdd");
|
||||
return
|
||||
}
|
||||
getCompanyInfo().then(res => {
|
||||
if (res) {
|
||||
if (res.message === 'success') {
|
||||
history.push("/task/taskAdd");
|
||||
} else {
|
||||
//if (res.message === '未进行实体认证')
|
||||
setVisible(true)
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 身份认证
|
||||
function certificationCheck() {
|
||||
if (current_user.authentication || current_user.enterpriseCertification) {
|
||||
history.push('/needs/new')
|
||||
|
|
|
@ -7,6 +7,9 @@ import './LoginRegisterPage.scss';
|
|||
const Option = Select.Option;
|
||||
|
||||
function Register(props) {
|
||||
const settings=localStorage.getItem('chromesetting')?JSON.parse(localStorage.getItem('chromesetting')):{};
|
||||
let professional_field=settings.professional_field||[];
|
||||
let is_local=settings.is_local;
|
||||
const { form } = props;
|
||||
const { getFieldDecorator,setFieldsValue,validateFields,getFieldValue } = form;
|
||||
//用户输入的符合规则的手机号(用于获取验证码)
|
||||
|
@ -36,7 +39,7 @@ function Register(props) {
|
|||
company_name: values.company_name,
|
||||
user_type: values.user_type,
|
||||
professional_field:values.professional_field,
|
||||
code: values.captcha
|
||||
code:is_local?'111111': values.captcha
|
||||
}).then((response) => {
|
||||
if (response.data && response.data.status === -6) {
|
||||
//验证码不正确
|
||||
|
@ -178,8 +181,7 @@ function Register(props) {
|
|||
clear();
|
||||
}, [])
|
||||
|
||||
const settings=localStorage.getItem('chromesetting')?JSON.parse(localStorage.getItem('chromesetting')):{};
|
||||
let professional_field=settings.professional_field||[];
|
||||
|
||||
|
||||
return (
|
||||
<div className="right_cont Register_content">
|
||||
|
@ -222,7 +224,7 @@ function Register(props) {
|
|||
</Form.Item>
|
||||
|
||||
|
||||
<Form.Item>
|
||||
{!is_local&&<Form.Item>
|
||||
<div className="login_register_head">
|
||||
{getFieldDecorator('captcha', {
|
||||
rules: [{
|
||||
|
@ -235,7 +237,7 @@ function Register(props) {
|
|||
)}
|
||||
<Button className={getCaptchaBut||(isMobile && !countDown) ? 'codeBut' : 'codeBut disable'} disabled={!getCaptchaBut && !(isMobile && !countDown)} onClick={getCaptcha}>{getCaptchaBut||(isMobile && !countDown) || (!getCaptchaBut && !countDown) ? "获取验证码" : `重发(${secondsStr}s)`}</Button>
|
||||
</div>
|
||||
</Form.Item>
|
||||
</Form.Item>}
|
||||
|
||||
<Form.Item>
|
||||
{getFieldDecorator('register_psd', {
|
||||
|
|
Loading…
Reference in New Issue