forked from Gitlink/forgeplus-react
修改加密权限及公告PDF预览
This commit is contained in:
parent
ee7c95965d
commit
940d19a2f5
|
@ -229,7 +229,7 @@ export default Form.create()((props) => {
|
|||
<span className="mr50 fl"><span className="color-grey9">提交时间:</span>{item.createdAt}</span>
|
||||
<span className="fl"><span className="color-grey9">稿件状态:</span>{item.read ? '雇主已浏览' : '雇主未浏览'}</span>
|
||||
{
|
||||
item.user.nickname !== "******" && <span className="fr">
|
||||
item.paperDetail&&item.paperDetail.content !== "******" && <span className="fr">
|
||||
{[4, 5].includes(detailStatus) && <a className="mr20" onClick={() => { setReportVisible(!reportVisible); setCheckedItem(item) }}><i className="iconfont icon-jinggao font-15 mr3"></i>举报</a>}
|
||||
<a className="mr20" onClick={() => { commentEdit(item.id) }}><i className="iconfont icon-huifu1 font-15 mr3"></i>{item.comments ? item.comments.length : 0}</a>
|
||||
<a onClick={() => { thumbUp(item.id) }}><i className={`iconfont ${item.currentUserCanThumbsUp?'icon-morendianzan_icon':'icon-dianzan_icon'} font-16 mr3`}></i>{item.thumbsUp}</a>
|
||||
|
|
|
@ -3,7 +3,7 @@ import { Form, Input, Button, Modal, Checkbox, Tooltip } from 'antd';
|
|||
import classNames from 'classnames';
|
||||
import moment from 'moment';
|
||||
import { Link } from "react-router-dom";
|
||||
import { formatDuring, getImageUrl } from 'educoder';
|
||||
import { getImageUrl } from 'educoder';
|
||||
import Upload from '../../components/Upload';
|
||||
import StatusNav from '../../components/statusNav';
|
||||
import ItemListPaper from '../components/itemListPaper';
|
||||
|
@ -267,6 +267,7 @@ export default Form.create()(
|
|||
});
|
||||
}
|
||||
|
||||
// 公示应征者信息
|
||||
function showUser() {
|
||||
if (dataList.length === 0) {
|
||||
Modal.info({
|
||||
|
@ -290,6 +291,7 @@ export default Form.create()(
|
|||
}
|
||||
}
|
||||
|
||||
// 添加专家评审流程
|
||||
function addExpertReviewModal() {
|
||||
Modal.confirm({
|
||||
title: '提示',
|
||||
|
@ -306,14 +308,17 @@ export default Form.create()(
|
|||
})
|
||||
}
|
||||
|
||||
// 刷新成果列表
|
||||
const reloadList = useCallback(() => {
|
||||
setRelaodChildList(Math.random());
|
||||
});
|
||||
|
||||
// 刷新详情
|
||||
const reloadDetail = useCallback(() => {
|
||||
setReload(Math.random());
|
||||
}, []);
|
||||
|
||||
// 实名认证
|
||||
function certificationCheck() {
|
||||
if (current_user.authentication || current_user.enterpriseCertification) {
|
||||
setApplyModal(true);
|
||||
|
@ -327,6 +332,7 @@ export default Form.create()(
|
|||
}
|
||||
}
|
||||
|
||||
// 签订协议/提交成果
|
||||
const signContent = useCallback(() => {
|
||||
if (signAgreement && isPaper) {
|
||||
let checkStatustext;
|
||||
|
@ -376,18 +382,22 @@ export default Form.create()(
|
|||
}
|
||||
}, [signAgreement, isPaper, current_user, detailData, dataList]);
|
||||
|
||||
// 用户详情页
|
||||
function goUser(login) {
|
||||
window.location.href = mygetHelmetapi && mygetHelmetapi.main_web_site_url + `/accounts/${login}`;
|
||||
}
|
||||
|
||||
// 身份认证页
|
||||
function goUserProfiles() {
|
||||
window.open(mygetHelmetapi && mygetHelmetapi.main_web_site_url + `/users/${current_user.login}/profiles`);
|
||||
}
|
||||
|
||||
// 公示时间计算
|
||||
function backPublicEnd(makePublicAt, makePublicDays) {
|
||||
return moment(new Date(makePublicAt).getTime() + makePublicDays * 24 * 3600 * 1000).format('YYYY-MM-DD HH:mm:ss');
|
||||
}
|
||||
|
||||
// 关注
|
||||
function follow() {
|
||||
followTask({
|
||||
userId: current_user.user_id,
|
||||
|
@ -400,6 +410,7 @@ export default Form.create()(
|
|||
})
|
||||
}
|
||||
|
||||
// 取关
|
||||
function unfollow() {
|
||||
unfollowTask({
|
||||
userId: current_user.user_id,
|
||||
|
@ -412,6 +423,14 @@ export default Form.create()(
|
|||
})
|
||||
}
|
||||
|
||||
// 在线预览佐证材料
|
||||
function showProof(){
|
||||
let pdfId=detailData.taskResultProof&&detailData.taskResultProof.proofFileNumbers;
|
||||
|
||||
Number(pdfId)>0&&window.open(`${httpUrl}/busiAttachments/view/${pdfId}?disposition=inline`, '_blank');
|
||||
}
|
||||
|
||||
console.log(detailData.status === 4 && dataList.length && (!detailData.isProofBoolean) && (!detailData.expertReview) && detailData.user)
|
||||
return (
|
||||
<div className="centerbox task-detail">
|
||||
<div className="head-navigation">
|
||||
|
@ -553,8 +572,13 @@ export default Form.create()(
|
|||
{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>}
|
||||
|
||||
{/* 若后台为“手动公示”,则显示按钮,是否公示由雇主与管理员是否点击“应征者名单公示”按钮决定,同时必须有成果,非关闭状态 */}
|
||||
{!detailData.showUserStatus && !detailData.expertReview && taskLimit && detailData.showUserMode===2 && <a className="fr color-orange ml20" onClick={showUser}>应征者名单公示 >></a>}
|
||||
|
||||
{detailData.isProofBoolean&& <a className="fr color-orange ml20" onClick={showProof}>评审结果公示</a>}
|
||||
|
||||
|
||||
{/* [添加专家评审流程]按钮入口,仅管理员可见 */}
|
||||
{taskLimit && !detailData.expertReview && detailData.status < 4 && <a className="fr color-orange ml20" onClick={addExpertReviewModal}>添加专家评审流程</a>}
|
||||
</div>
|
||||
|
|
|
@ -616,7 +616,7 @@ class NewHeader extends Component {
|
|||
}
|
||||
needAdd=(url)=> {
|
||||
let {current_user,mygetHelmetapi,history}=this.props;
|
||||
if (current_user.authentication || current_user.enterpriseCertification) {
|
||||
if (current_user.authentication || current_user.enterprise_certification) {
|
||||
history.push('/needs/new')
|
||||
} else {
|
||||
Modal.confirm({
|
||||
|
|
Loading…
Reference in New Issue