forked from Gitlink/forgeplus-react
修改创客、公告、成果等文件下载参数,修改头部导航等
This commit is contained in:
parent
c617b3b47a
commit
8a9247ea6a
|
@ -33,8 +33,8 @@ export function initAxiosInterceptors(props) {
|
||||||
initOnlineOfflineListener();
|
initOnlineOfflineListener();
|
||||||
|
|
||||||
// var proxy = "http://192.168.1.40:3000";
|
// var proxy = "http://192.168.1.40:3000";
|
||||||
// var proxy = "http://111.8.36.180:8000";
|
var proxy = "http://111.8.36.180:8000";
|
||||||
var proxy = "http://117.50.100.12:49999";
|
// var proxy = "http://117.50.100.12:49999";
|
||||||
// var proxy = "https://www.osredm.com";
|
// var proxy = "https://www.osredm.com";
|
||||||
|
|
||||||
//响应前的设置
|
//响应前的设置
|
||||||
|
|
|
@ -147,7 +147,7 @@
|
||||||
height: 446px;
|
height: 446px;
|
||||||
box-shadow: 0px 4px 8px 2px rgba(212, 212, 212, 0.5);
|
box-shadow: 0px 4px 8px 2px rgba(212, 212, 212, 0.5);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
margin-top: -10px;
|
margin-top: -11px;
|
||||||
padding: 12px 1px 12px 0;
|
padding: 12px 1px 12px 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -184,6 +184,9 @@
|
||||||
|
|
||||||
.message-icon{
|
.message-icon{
|
||||||
position: relative;
|
position: relative;
|
||||||
|
height: 60px;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
.ant-scroll-number{
|
.ant-scroll-number{
|
||||||
// right:12px;
|
// right:12px;
|
||||||
padding: 0 0px;
|
padding: 0 0px;
|
||||||
|
|
|
@ -18,7 +18,7 @@ export const editorConfig = {
|
||||||
customInsert: function (insertImgFn, result) {
|
customInsert: function (insertImgFn, result) {
|
||||||
// insertImgFn 可把图片插入到编辑器,传入图片 src ,执行函数即可
|
// insertImgFn 可把图片插入到编辑器,传入图片 src ,执行函数即可
|
||||||
if (result && result.data && result.data.id) {
|
if (result && result.data && result.data.id) {
|
||||||
insertImgFn(`${httpUrl}/busiAttachments/view/${result.data.id}`);
|
insertImgFn(`${httpUrl}/busiAttachments/viewAttachment/${result.data.uniqueFileName}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -90,7 +90,7 @@ const NoticeEdit = Form.create()(({ form, match, history, showNotification }) =>
|
||||||
// result 即服务端返回的接口
|
// result 即服务端返回的接口
|
||||||
// insertImgFn 可把图片插入到编辑器,传入图片 src ,执行函数即可
|
// insertImgFn 可把图片插入到编辑器,传入图片 src ,执行函数即可
|
||||||
if (result && result.data && result.data.id) {
|
if (result && result.data && result.data.id) {
|
||||||
insertImgFn(`${actionUrl}/busiAttachments/view/${result.data.id}`);
|
insertImgFn(`${actionUrl}/busiAttachments/viewAttachment/${result.data.uniqueFileName}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -149,7 +149,8 @@ const NoticeEdit = Form.create()(({ form, match, history, showNotification }) =>
|
||||||
params.isSecret = Number(params.isSecret);
|
params.isSecret = Number(params.isSecret);
|
||||||
if (fileList && fileList.length) {
|
if (fileList && fileList.length) {
|
||||||
params.fileName = fileList[0].fileName || fileList[0].response.data.fileName;
|
params.fileName = fileList[0].fileName || fileList[0].response.data.fileName;
|
||||||
params.fileDownloadPath = fileList[0].fileDownloadPath || `${actionUrl}/busiAttachments/download/${fileList[0].response.data.id}`;
|
// params.fileDownloadPath = fileList[0].fileDownloadPath || `${actionUrl}/busiAttachments/download/${fileList[0].response.data.id}`;
|
||||||
|
params.fileDownloadPath = fileList[0].fileDownloadPath || `${actionUrl}/busiAttachments/downloadAttachment/${fileList[0].response.data.uniqueFileName}`;
|
||||||
}
|
}
|
||||||
if (id) {
|
if (id) {
|
||||||
// 编辑
|
// 编辑
|
||||||
|
|
|
@ -172,7 +172,7 @@ function List(props){
|
||||||
title: '任务书',
|
title: '任务书',
|
||||||
dataIndex: 'assignmentBookAttachments',
|
dataIndex: 'assignmentBookAttachments',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
render: (text, record) => {return text ? <a href={`${httpUrl}/busiAttachments/download/${text[0].id}`}>{text[0].fileName}</a> : '--'}
|
render: (text, record) => {return text ? <a href={`${httpUrl}/busiAttachments/downloadAttachment/${text[0].uniqueFileName}`}>{text[0].fileName}</a> : '--'}
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
case 3: return [
|
case 3: return [
|
||||||
|
@ -233,7 +233,7 @@ function List(props){
|
||||||
title: '策划书',
|
title: '策划书',
|
||||||
dataIndex: 'competitionProposalAttachments',
|
dataIndex: 'competitionProposalAttachments',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
render: (text, record) => {return text ? <a href={`${httpUrl}/busiAttachments/download/${text[0].id}`}>{text[0].fileName}</a> : '--'}
|
render: (text, record) => {return text ? <a href={`${httpUrl}/busiAttachments/downloadAttachment/${text[0].uniqueFileName}`}>{text[0].fileName}</a> : '--'}
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
default: return [
|
default: return [
|
||||||
|
@ -292,7 +292,7 @@ function List(props){
|
||||||
title: '成果证明材料',
|
title: '成果证明材料',
|
||||||
dataIndex: 'achievementMaterialAttachments',
|
dataIndex: 'achievementMaterialAttachments',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
render: (text, record) => {return text ? <a href={`${httpUrl}/busiAttachments/download/${text[0].id}`}>{text[0].fileName}</a> : '--'}
|
render: (text, record) => {return text ? <a href={`${httpUrl}/busiAttachments/downloadAttachment/${text[0].uniqueFileName}`}>{text[0].fileName}</a> : '--'}
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,7 +91,7 @@ const NoticeEdit = Form.create()(forwardRef(({ form, match, history }, ref) => {
|
||||||
// result 即服务端返回的接口
|
// result 即服务端返回的接口
|
||||||
// insertImgFn 可把图片插入到编辑器,传入图片 src ,执行函数即可
|
// insertImgFn 可把图片插入到编辑器,传入图片 src ,执行函数即可
|
||||||
if (result && result.data && result.data.id) {
|
if (result && result.data && result.data.id) {
|
||||||
insertImgFn(`${actionUrl}/busiAttachments/view/${result.data.id}`);
|
insertImgFn(`${actionUrl}/busiAttachments/viewAttachment/${result.data.uniqueFileName}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -151,7 +151,8 @@ const NoticeEdit = Form.create()(forwardRef(({ form, match, history }, ref) => {
|
||||||
params.isSecret = Number(params.isSecret);
|
params.isSecret = Number(params.isSecret);
|
||||||
if (fileList && fileList.length) {
|
if (fileList && fileList.length) {
|
||||||
params.fileName = fileList[0].fileName || fileList[0].response.data.fileName;
|
params.fileName = fileList[0].fileName || fileList[0].response.data.fileName;
|
||||||
params.fileDownloadPath = fileList[0].fileDownloadPath || `${actionUrl}/busiAttachments/download/${fileList[0].response.data.id}`;
|
// params.fileDownloadPath = fileList[0].fileDownloadPath || `${actionUrl}/busiAttachments/download/${fileList[0].response.data.id}`;
|
||||||
|
params.fileDownloadPath = fileList[0].fileDownloadPath || `${actionUrl}/busiAttachments/downloadAttachment/${fileList[0].response.data.uniqueFileName}`;
|
||||||
}
|
}
|
||||||
if (id) {
|
if (id) {
|
||||||
// 编辑
|
// 编辑
|
||||||
|
|
|
@ -18,7 +18,7 @@ export const editorConfig = {
|
||||||
customInsert: function (insertImgFn, result) {
|
customInsert: function (insertImgFn, result) {
|
||||||
// insertImgFn 可把图片插入到编辑器,传入图片 src ,执行函数即可
|
// insertImgFn 可把图片插入到编辑器,传入图片 src ,执行函数即可
|
||||||
if (result && result.data && result.data.id) {
|
if (result && result.data && result.data.id) {
|
||||||
insertImgFn(`${httpUrl}/busiAttachments/view/${result.data.id}`);
|
insertImgFn(`${httpUrl}/busiAttachments/viewAttachment/${result.data.uniqueFileName}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -92,7 +92,7 @@ export default ({ current_user, showLoginDialog }) => {
|
||||||
src={getImageUrl(current_user.image_url)} width="34">
|
src={getImageUrl(current_user.image_url)} width="34">
|
||||||
</img>
|
</img>
|
||||||
{/* </a> */}
|
{/* </a> */}
|
||||||
<ul className="edu-menu-list" style={{ top: '60px', textAlign: 'center' }}>
|
<ul className="edu-menu-list" style={{ top: '70px', textAlign: 'center' }}>
|
||||||
<li className="bor-bottom-greyE" style={{ cursor: "default", background: "#fff" }}>{current_user.username}</li>
|
<li className="bor-bottom-greyE" style={{ cursor: "default", background: "#fff" }}>{current_user.username}</li>
|
||||||
<li>
|
<li>
|
||||||
<a target='_blank' href={`${main_web_site_url}/accounts/${current_user.login}`}>个人中心</a>
|
<a target='_blank' href={`${main_web_site_url}/accounts/${current_user.login}`}>个人中心</a>
|
||||||
|
|
|
@ -158,7 +158,7 @@ function RegisterList({ showNotification }) {
|
||||||
key: 'resumeAttachments',
|
key: 'resumeAttachments',
|
||||||
render: (text, record) => {
|
render: (text, record) => {
|
||||||
return text && text.map(item => {
|
return text && text.map(item => {
|
||||||
return <a key={item.id} className="link" onClick={() => { downFile(item.id) }}>{item.fileName}</a>
|
return <a key={item.id} className="link" onClick={() => { downFile(item) }}>{item.fileName}</a>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -168,7 +168,7 @@ function RegisterList({ showNotification }) {
|
||||||
key: 'titleCertificateAttachments',
|
key: 'titleCertificateAttachments',
|
||||||
render: (text, record) => {
|
render: (text, record) => {
|
||||||
return text && text.map(item => {
|
return text && text.map(item => {
|
||||||
return <a key={item.id} className="link" onClick={() => { downFile(item.id) }}>{item.fileName}</a>
|
return <a key={item.id} className="link" onClick={() => { downFile(item) }}>{item.fileName}</a>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -178,7 +178,7 @@ function RegisterList({ showNotification }) {
|
||||||
key: 'academicAchievementsAttachments',
|
key: 'academicAchievementsAttachments',
|
||||||
render: (text, record) => {
|
render: (text, record) => {
|
||||||
return text && text.map(item => {
|
return text && text.map(item => {
|
||||||
return <a key={item.id} className="link" onClick={() => { downFile(item.id) }}>{item.fileName}</a>
|
return <a key={item.id} className="link" onClick={() => { downFile(item) }}>{item.fileName}</a>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -188,7 +188,7 @@ function RegisterList({ showNotification }) {
|
||||||
key: 'honorsAttachments',
|
key: 'honorsAttachments',
|
||||||
render: (text, record) => {
|
render: (text, record) => {
|
||||||
return text && text.map(item => {
|
return text && text.map(item => {
|
||||||
return <a key={item.id} className="link" onClick={() => { downFile(item.id) }}>{item.fileName}</a>
|
return <a key={item.id} className="link" onClick={() => { downFile(item) }}>{item.fileName}</a>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -204,9 +204,8 @@ function RegisterList({ showNotification }) {
|
||||||
];
|
];
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
function downFile(id) {
|
function downFile(item) {
|
||||||
let url = httpUrl + '/busiAttachments/download/' + id;
|
window.open(httpUrl+'/busiAttachments/downloadAttachment/'+item.uniqueFileName);
|
||||||
window.open(url);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取列表
|
// 获取列表
|
||||||
|
|
|
@ -247,8 +247,7 @@ function ReviewTasks({ showNotification, match, history, current_user }) {
|
||||||
|
|
||||||
function downFile(item) {
|
function downFile(item) {
|
||||||
if (containerType == 1) {
|
if (containerType == 1) {
|
||||||
let url = httpUrl + '/busiAttachments/download/' + item.id;
|
window.open(httpUrl+'/busiAttachments/downloadAttachment/'+item.uniqueFileName);
|
||||||
window.open(url);
|
|
||||||
} else {
|
} else {
|
||||||
let url = main_web_site_url + `/attachments/send_file/${item.id}?disposition=attachment`;
|
let url = main_web_site_url + `/attachments/send_file/${item.id}?disposition=attachment`;
|
||||||
window.open(url);
|
window.open(url);
|
||||||
|
|
|
@ -121,7 +121,7 @@ function RegisterList({ showNotification, form }) {
|
||||||
dataIndex: 'resumeAttachments',
|
dataIndex: 'resumeAttachments',
|
||||||
render: (text, record) => {
|
render: (text, record) => {
|
||||||
return text && text.map(item => {
|
return text && text.map(item => {
|
||||||
return <a className="link" onClick={()=>{downFile(item.id)}}>{item.fileName}</a>
|
return <a className="link" onClick={()=>{downFile(item)}}>{item.fileName}</a>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -130,7 +130,7 @@ function RegisterList({ showNotification, form }) {
|
||||||
dataIndex: 'titleCertificateAttachments',
|
dataIndex: 'titleCertificateAttachments',
|
||||||
render: (text, record) => {
|
render: (text, record) => {
|
||||||
return text && text.map(item => {
|
return text && text.map(item => {
|
||||||
return <a className="link" onClick={()=>{downFile(item.id)}}>{item.fileName}</a>
|
return <a className="link" onClick={()=>{downFile(item)}}>{item.fileName}</a>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -139,7 +139,7 @@ function RegisterList({ showNotification, form }) {
|
||||||
dataIndex: 'academicAchievementsAttachments',
|
dataIndex: 'academicAchievementsAttachments',
|
||||||
render: (text, record) => {
|
render: (text, record) => {
|
||||||
return text && text.map(item => {
|
return text && text.map(item => {
|
||||||
return <a className="link" onClick={()=>{downFile(item.id)}}>{item.fileName}</a>
|
return <a className="link" onClick={()=>{downFile(item)}}>{item.fileName}</a>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -148,7 +148,7 @@ function RegisterList({ showNotification, form }) {
|
||||||
dataIndex: 'honorsAttachments',
|
dataIndex: 'honorsAttachments',
|
||||||
render: (text, record) => {
|
render: (text, record) => {
|
||||||
return text && text.map(item => {
|
return text && text.map(item => {
|
||||||
return <a className="link" onClick={()=>{downFile(item.id)}}>{item.fileName}</a>
|
return <a className="link" onClick={()=>{downFile(item)}}>{item.fileName}</a>
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -167,9 +167,8 @@ function RegisterList({ showNotification, form }) {
|
||||||
];
|
];
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
function downFile(id) {
|
function downFile(item) {
|
||||||
let url = httpUrl + '/busiAttachments/download/' + id;
|
window.open(httpUrl+'/busiAttachments/downloadAttachment/'+item.uniqueFileName);
|
||||||
window.open(url);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onShowSizeChange(current, pageSize){
|
function onShowSizeChange(current, pageSize){
|
||||||
|
|
|
@ -68,8 +68,7 @@ export default Form.create()((props) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
function downFile(item) {
|
function downFile(item) {
|
||||||
let url = httpUrl + '/busiAttachments/download/' + item.id;
|
window.open(httpUrl+'/busiAttachments/downloadAttachment/'+item.uniqueFileName);
|
||||||
window.open(url);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const helper = useCallback(
|
const helper = useCallback(
|
||||||
|
@ -89,7 +88,7 @@ export default Form.create()((props) => {
|
||||||
return (
|
return (
|
||||||
<div className="list-box" key={item.id}>
|
<div className="list-box" key={item.id}>
|
||||||
|
|
||||||
<img alt="" className="radius mr15" height="50px" src={item.user && getImageUrl(item.user.logo)} width="50px" />
|
<img alt="" className="radius mr15" height="50px" src={item.user && getImageUrl(item.user.logo||'images/avatars/User/boy.jpg')} width="50px" />
|
||||||
<div className="flex1">
|
<div className="flex1">
|
||||||
<li className="clearfix mb20">
|
<li className="clearfix mb20">
|
||||||
<a className="user-box fl mr15 color-grey-3 font-16" onClick={() => {item.user && goUser(item.user.login) }}>{item.user && (item.user.nickname || item.user.login)}</a>
|
<a className="user-box fl mr15 color-grey-3 font-16" onClick={() => {item.user && goUser(item.user.login) }}>{item.user && (item.user.nickname || item.user.login)}</a>
|
||||||
|
|
|
@ -133,7 +133,7 @@ export default Form.create()((props) => {
|
||||||
return (
|
return (
|
||||||
<div className="list-box" key={item.id}>
|
<div className="list-box" key={item.id}>
|
||||||
|
|
||||||
<img alt="" className="radius mr15" height="50px" src={item.user && getImageUrl(item.user.logo)} width="50px" onClick={() => { goUser(item.user.login) }} />
|
<img alt="" className="radius mr15" height="50px" src={item.user && getImageUrl(item.user.logo||'images/avatars/User/boy.jpg')} width="50px" onClick={() => { goUser(item.user.login) }} />
|
||||||
<div className="flex1">
|
<div className="flex1">
|
||||||
|
|
||||||
<div className="clearfix">
|
<div className="clearfix">
|
||||||
|
|
|
@ -144,21 +144,21 @@ export default Form.create()((props) => {
|
||||||
title: '凭证文件',
|
title: '凭证文件',
|
||||||
dataIndex: 'fileName',
|
dataIndex: 'fileName',
|
||||||
render: (text, record) => {
|
render: (text, record) => {
|
||||||
return <a className="line_1 color-grey3" onClick={() => { download(record.winnerContracts[0].id) }}> {record.winnerContracts && record.winnerContracts[0].fileName}</a >
|
return <a className="line_1 color-grey3" onClick={() => { download(record.winnerContracts[0]) }}> {record.winnerContracts && record.winnerContracts[0].fileName}</a >
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
dataIndex: 'action',
|
dataIndex: 'action',
|
||||||
render: (text, record) => {
|
render: (text, record) => {
|
||||||
return <a className="line_1 color-grey3" onClick={(e) => { download(record.winnerContracts[0].id) }}> 下载凭证</a >
|
return <a className="line_1 color-grey3" onClick={(e) => { download(record.winnerContracts[0]) }}> 下载凭证</a >
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
function download(id) {
|
function download(item) {
|
||||||
window.open(httpUrl + '/busiAttachments/download/' + id);
|
window.open(httpUrl+'/busiAttachments/downloadAttachment/'+item.uniqueFileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
function unfollow(id) {
|
function unfollow(id) {
|
||||||
|
|
|
@ -47,8 +47,7 @@ export default Form.create()((props) => {
|
||||||
|
|
||||||
function downFile(item) {
|
function downFile(item) {
|
||||||
if(item.uniqueFileName){
|
if(item.uniqueFileName){
|
||||||
let url = httpUrl + '/busiAttachments/download/' + item.id;
|
window.open(httpUrl+'/busiAttachments/downloadAttachment/'+item.uniqueFileName);
|
||||||
window.open(url);
|
|
||||||
}else{
|
}else{
|
||||||
showNotification("您没有下载权限!");
|
showNotification("您没有下载权限!");
|
||||||
}
|
}
|
||||||
|
@ -169,7 +168,7 @@ export default Form.create()((props) => {
|
||||||
const winReview = [5,6,7,8].includes(detailStatus) && expertReview && item.reviewFinalGrades!==null;
|
const winReview = [5,6,7,8].includes(detailStatus) && expertReview && item.reviewFinalGrades!==null;
|
||||||
return (
|
return (
|
||||||
<div className="fileComments df" key={item.id}>
|
<div className="fileComments df" key={item.id}>
|
||||||
<img alt="头像加载失败" src={item.user && getImageUrl(item.user.logo)} width="50" height="50" className="bor-radius-all mr20" />
|
<img alt="头像加载失败" src={item.user && getImageUrl(item.user.logo||'images/avatars/User/boy.jpg')} width="50" height="50" className="bor-radius-all mr20" />
|
||||||
<div className="flex1">
|
<div className="flex1">
|
||||||
<ul>
|
<ul>
|
||||||
<li className="fl pr taskReview">
|
<li className="fl pr taskReview">
|
||||||
|
|
|
@ -48,7 +48,7 @@ export default (props) => {
|
||||||
</div>
|
</div>
|
||||||
<div className="list-other">
|
<div className="list-other">
|
||||||
<span className="user-box mr30" onClick={() => { goUser(item.user && item.user.login) }}>
|
<span className="user-box mr30" onClick={() => { goUser(item.user && item.user.login) }}>
|
||||||
<img alt="" className="head-log-small" src={getImageUrl(item.user && item.user.logo)} />
|
<img alt="" className="head-log-small" src={getImageUrl(item.user && item.user.logo||'images/avatars/User/boy.jpg')} />
|
||||||
<span>{(item.user && item.user.nickname) || (item.user && item.user.login)}</span>
|
<span>{(item.user && item.user.nickname) || (item.user && item.user.login)}</span>
|
||||||
</span>
|
</span>
|
||||||
<span className="font-14 mr30"><i className="iconfont icon-dianjiliang mr3 font-12" />{item.visits}</span>
|
<span className="font-14 mr30"><i className="iconfont icon-dianjiliang mr3 font-12" />{item.visits}</span>
|
||||||
|
|
|
@ -4,8 +4,9 @@ import { Link } from "react-router-dom";
|
||||||
import Nodata from 'forge/Nodata';
|
import Nodata from 'forge/Nodata';
|
||||||
import Loading from "src/Loading";
|
import Loading from "src/Loading";
|
||||||
import Upload from 'military/components/Upload';
|
import Upload from 'military/components/Upload';
|
||||||
import { timeAgo, getImageUrl,goUser,goUserMes } from 'educoder';
|
import { timeAgo, getImageUrl, goUser, goUserMes } from 'educoder';
|
||||||
import { uploadPayProof } from '../../api';
|
import { uploadPayProof } from '../../api';
|
||||||
|
import { httpUrl } from '../../fetch';
|
||||||
import './index.scss';
|
import './index.scss';
|
||||||
|
|
||||||
export default Form.create()((props) => {
|
export default Form.create()((props) => {
|
||||||
|
@ -47,6 +48,10 @@ export default Form.create()((props) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function downFile(item) {
|
||||||
|
window.open(httpUrl+'/busiAttachments/downloadAttachment/'+item.uniqueFileName);
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
loading ? <Loading /> :
|
loading ? <Loading /> :
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
|
@ -55,10 +60,10 @@ export default Form.create()((props) => {
|
||||||
return (
|
return (
|
||||||
<div className="list-box" key={item.id}>
|
<div className="list-box" key={item.id}>
|
||||||
|
|
||||||
<img alt="" className="radius mr15" height="50px" src={item.user && getImageUrl(item.user.logo)} width="50px" />
|
<img alt="" className="radius mr15" height="50px" src={item.user && getImageUrl(item.user.logo || 'images/avatars/User/boy.jpg')} width="50px" />
|
||||||
<div className="flex1">
|
<div className="flex1">
|
||||||
<li className="clearfix mb20">
|
<li className="clearfix mb20">
|
||||||
<a className="user-box fl mr15 color-grey-3 font-16" onClick={() => {item.user && goUser(item.user.login) }}>{item.user && (item.user.nickname || item.user.login)}</a>
|
<a className="user-box fl mr15 color-grey-3 font-16" onClick={() => { item.user && 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="fl color-grey-9 mt3 mr15">{timeAgo(item.createdAt)}</span>
|
||||||
<span className="infos_item color-grey-9 fl">发布方式:</span>
|
<span className="infos_item color-grey-9 fl">发布方式:</span>
|
||||||
<span className="infos_item mr15 fl">{item.task && item.task.publishMode === 1 ? '统筹任务' : '自主提交'}</span>
|
<span className="infos_item mr15 fl">{item.task && item.task.publishMode === 1 ? '统筹任务' : '自主提交'}</span>
|
||||||
|
@ -79,12 +84,22 @@ export default Form.create()((props) => {
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div className="clearfix">
|
<div className="clearfix">
|
||||||
<span className="with40 fl lineh-35" style={{ display: "inline-flex" }}>
|
<span className="with40 fl lineh-35" style={{ display: "inline-flex" }}>
|
||||||
<span className="color-grey-9 fl">联系手机:</span>
|
<span className="color-grey-9 fl">联系手机:</span>
|
||||||
<span className="infos_item">{item.user.phone}</span>
|
<span className="infos_item">{item.user.phone}</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{
|
||||||
|
item.paperPayOrder && item.paperPayOrder.payOrderAttachments && item.paperPayOrder.payOrderAttachments.map(i => {
|
||||||
|
return <div className="file-list-box" key={i.id}>
|
||||||
|
<a className="primary-link" onClick={() => { downFile(i) }}><i className="iconfont icon-fujian color-green font-14 mr3"></i>
|
||||||
|
{i.fileName} </a>
|
||||||
|
<span className="ml10 color-grey-9">({i.fileSizeString})</span>
|
||||||
|
</div>
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
<div className="clearfix"></div>
|
<div className="clearfix"></div>
|
||||||
{!item.isPay && (item.status !== 8) && <div className="width100 lineh-35 clearfix">
|
{!item.isPay && (item.status !== 8) && <div className="width100 lineh-35 clearfix">
|
||||||
<Button type="primary" onClick={() => { setVisible(true); setCheckedItem(item) }}>上传支付报酬凭证</Button>
|
<Button type="primary" onClick={() => { setVisible(true); setCheckedItem(item) }}>上传支付报酬凭证</Button>
|
||||||
|
|
|
@ -62,8 +62,7 @@ export default (props) => {
|
||||||
|
|
||||||
|
|
||||||
function downFile(item) {
|
function downFile(item) {
|
||||||
let url = httpUrl + '/busiAttachments/download/' + item.id;
|
window.open(httpUrl+'/busiAttachments/downloadAttachment/'+item.uniqueFileName);
|
||||||
window.open(url);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -76,7 +75,7 @@ export default (props) => {
|
||||||
return (
|
return (
|
||||||
<div className="list-box" key={item.id}>
|
<div className="list-box" key={item.id}>
|
||||||
|
|
||||||
<img alt="" className="radius mr15" height="50px" src={item.user && getImageUrl(item.user.logo)} width="50px" />
|
<img alt="" className="radius mr15" height="50px" src={item.user && getImageUrl(item.user.logo||'images/avatars/User/boy.jpg')} width="50px" />
|
||||||
<div className="flex1">
|
<div className="flex1">
|
||||||
<li className="clearfix mb20">
|
<li className="clearfix mb20">
|
||||||
<a className="user-box fl mr15 color-grey-3 font-16" onClick={() => {item.user && goUser(item.user.login) }}>{item.user && (item.user.nickname || item.user.login)}</a>
|
<a className="user-box fl mr15 color-grey-3 font-16" onClick={() => {item.user && goUser(item.user.login) }}>{item.user && (item.user.nickname || item.user.login)}</a>
|
||||||
|
|
|
@ -61,8 +61,7 @@ export default Form.create()((props) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
function downFile(item) {
|
function downFile(item) {
|
||||||
let url = httpUrl + '/busiAttachments/download/' + item.id;
|
window.open(httpUrl+'/busiAttachments/downloadAttachment/'+item.uniqueFileName);
|
||||||
window.open(url);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const helper = useCallback(
|
const helper = useCallback(
|
||||||
|
@ -83,7 +82,7 @@ export default Form.create()((props) => {
|
||||||
return (
|
return (
|
||||||
<div className="list-box" key={item.id}>
|
<div className="list-box" key={item.id}>
|
||||||
|
|
||||||
<img alt="头像加载失败" className="radius mr15" height="50px" src={item.user && getImageUrl(item.user.logo)} width="50px" />
|
<img alt="头像加载失败" className="radius mr15" height="50px" src={item.user && getImageUrl(item.user.logo||'images/avatars/User/boy.jpg')} width="50px" />
|
||||||
<div className="flex1">
|
<div className="flex1">
|
||||||
<li className="clearfix mb20">
|
<li className="clearfix mb20">
|
||||||
<a className="user-box fl mr15 color-grey-3 font-16" onClick={() => {item.user && goUser(item.user.login) }}>{item.user && (item.user.nickname || item.user.login)}</a>
|
<a className="user-box fl mr15 color-grey-3 font-16" onClick={() => {item.user && goUser(item.user.login) }}>{item.user && (item.user.nickname || item.user.login)}</a>
|
||||||
|
|
|
@ -83,7 +83,7 @@ export default (props) => {
|
||||||
return (
|
return (
|
||||||
<div className="list-box" key={item.id}>
|
<div className="list-box" key={item.id}>
|
||||||
|
|
||||||
<img alt="头像加载失败" className="radius mr15" height="50px" src={item.user && getImageUrl(item.user.logo)} width="50px" />
|
<img alt="头像加载失败" className="radius mr15" height="50px" src={item.user && getImageUrl(item.user.logo||'images/avatars/User/boy.jpg')} width="50px" />
|
||||||
<div className="flex1">
|
<div className="flex1">
|
||||||
<li className="clearfix mb20">
|
<li className="clearfix mb20">
|
||||||
<a className="user-box fl mr15 color-grey-3 font-16" onClick={() => {item.user && goUser(item.user.login) }}>{item.user && (item.user.nickname || item.user.login)}</a>
|
<a className="user-box fl mr15 color-grey-3 font-16" onClick={() => {item.user && goUser(item.user.login) }}>{item.user && (item.user.nickname || item.user.login)}</a>
|
||||||
|
|
|
@ -1,12 +1,8 @@
|
||||||
import React, { useCallback, useEffect, useState, useMemo } from 'react';
|
import React, { useCallback, useEffect, useState, useMemo } from 'react';
|
||||||
import { Tabs, Input, Table, Pagination, Modal, Button } from 'antd';
|
import { Tabs, Input, Modal, Button } from 'antd';
|
||||||
import { Link } from "react-router-dom";
|
|
||||||
import ChooseNav from '../../components/chooseNav';
|
|
||||||
import ItemListMyTask from '../components/itemListMyTask';
|
import ItemListMyTask from '../components/itemListMyTask';
|
||||||
import AgreementModal from '../components/agreementModal';
|
|
||||||
import ComplainModal from '../components/complainModal';
|
|
||||||
import { applyStatusAllArr, paperCheckStatusArr, applyStatusArr, publishModeArr, taskStatusAllArr,} from '../static';
|
import { applyStatusAllArr, paperCheckStatusArr, applyStatusArr, publishModeArr, taskStatusAllArr,} from '../static';
|
||||||
import { getJoinTaskList, followTaskList, confirmReceipt } from '../api';
|
import { followTaskList } from '../api';
|
||||||
import './index.scss';
|
import './index.scss';
|
||||||
const Search = Input.Search;
|
const Search = Input.Search;
|
||||||
|
|
||||||
|
@ -22,26 +18,14 @@ for (const item of paperCheckStatusArr) {
|
||||||
paperCheckStatus[item.dicItemCode] = item.dicItemName;
|
paperCheckStatus[item.dicItemCode] = item.dicItemName;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ({ taskCategoryValueArr, showNotification,current_user }) => {
|
export default ({ taskCategoryValueArr, current_user }) => {
|
||||||
|
|
||||||
const [paperStatusString, setPaperStatusString] = useState('0,1,2,3,4');
|
|
||||||
const [taskStatusString, setTaskStatusString] = useState('3,4,5,6,7,8');
|
|
||||||
|
|
||||||
const [requirePaper, setRequirePaper] = useState('1');
|
|
||||||
const [searchInput, setSearchInput] = useState('');
|
const [searchInput, setSearchInput] = useState('');
|
||||||
const [curPage, setCurPage] = useState(1);
|
const [curPage, setCurPage] = useState(1);
|
||||||
const [total, setTotal] = useState(0);
|
const [total, setTotal] = useState(0);
|
||||||
const [taskList, setTaskList] = useState([]);
|
const [taskList, setTaskList] = useState([]);
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
|
|
||||||
const [curPagePaper, setCurPagePaper] = useState(1);
|
|
||||||
const [totalPaper, setTotalPaper] = useState(0);
|
|
||||||
const [paperList, setPaperList] = useState([]);
|
|
||||||
|
|
||||||
const [checkedItem, setCheckedItem] = useState({});
|
|
||||||
const [complainVisible, setComplainVisible] = useState(false);
|
|
||||||
const [agreeVisible, setAgreeVisible] = useState(false);
|
|
||||||
|
|
||||||
const [reload, setReload] = useState(0);
|
const [reload, setReload] = useState(0);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -62,21 +46,6 @@ export default ({ taskCategoryValueArr, showNotification,current_user }) => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function confirmReceiptModal(paperId) {
|
|
||||||
Modal.confirm({
|
|
||||||
title: '确认收款',
|
|
||||||
content: '确认已经收到任务报酬',
|
|
||||||
onOk: () => {
|
|
||||||
confirmReceipt(paperId).then(res => {
|
|
||||||
if (res && res.message === "success") {
|
|
||||||
showNotification("您已确认收款!");
|
|
||||||
reloadList();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
const reloadList = useCallback(() => {
|
const reloadList = useCallback(() => {
|
||||||
setReload(Math.random());
|
setReload(Math.random());
|
||||||
}, [])
|
}, [])
|
||||||
|
|
|
@ -91,8 +91,7 @@ export default Form.create()(({ form, showNotification, history}) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
function downFile(item) {
|
function downFile(item) {
|
||||||
let url = httpUrl + '/busiAttachments/download/' + item.id;
|
window.open(httpUrl+'/busiAttachments/downloadAttachment/'+item.uniqueFileName);
|
||||||
window.open(url);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const columns = useMemo(() => {
|
const columns = useMemo(() => {
|
||||||
|
|
|
@ -193,9 +193,9 @@ export default Form.create()(({ current_user, form, showNotification, match, his
|
||||||
key: 'action',
|
key: 'action',
|
||||||
render: (text, record) => (
|
render: (text, record) => (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
{record.checkStatus ===2&&<Button className="mr5 font-12" type="primary" size="small" onClick={() => { checkPaperItem(record.id, true) }}>通过</Button>}
|
{record.task&&record.task.status==3&&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.task&&record.task.status==4&&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&&record.checkStatus ===2&&<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 type="danger" size="small" className="mr5 font-12" onClick={() => { deleteItem(record.id) }}>删除</Button>}
|
||||||
|
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
|
@ -211,6 +211,7 @@ export default Form.create()(({ current_user, form, showNotification, match, his
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
if (res && res.message === 'success') {
|
if (res && res.message === 'success') {
|
||||||
setReload(Math.random());
|
setReload(Math.random());
|
||||||
|
showNotification('操作成功!');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -191,8 +191,7 @@ export default Form.create()(
|
||||||
showLoginDialog();
|
showLoginDialog();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let url = httpUrl + '/busiAttachments/download/' + item.id;
|
window.open(httpUrl+'/busiAttachments/downloadAttachment/'+item.uniqueFileName);
|
||||||
window.open(url);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const helper = useCallback(
|
const helper = useCallback(
|
||||||
|
@ -432,9 +431,8 @@ export default Form.create()(
|
||||||
|
|
||||||
// 在线预览佐证材料
|
// 在线预览佐证材料
|
||||||
function showProof() {
|
function showProof() {
|
||||||
let pdfId = detailData.taskResultProof && detailData.taskResultProof.proofFileNumbers;
|
let proofFile = detailData.taskResultProof && detailData.taskResultProof.proofAttachments&& detailData.taskResultProof.proofAttachments[0];
|
||||||
|
proofFile && window.open(`${httpUrl}/busiAttachments/viewAttachment/${proofFile.uniqueFileName}?disposition=inline`, '_blank');
|
||||||
Number(pdfId) > 0 && window.open(`${httpUrl}/busiAttachments/view/${pdfId}?disposition=inline`, '_blank');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
|
@ -372,11 +372,7 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="padding30 bor-bottom-greyE">
|
<div className="padding30 bor-bottom-greyE">
|
||||||
<p className="partTitle">任务内容<span className="color-red font-14">(*必填)</span>
|
<p className="partTitle">任务内容<span className="color-red font-14">(*必填)</span></p>
|
||||||
{/* <span>
|
|
||||||
<a href="https://task.osredm.com/busiAttachments/download/121" className="icon icon-attachment font-13 color-blue" length="32" target="_blank">创客任务模版.xlsx</a>
|
|
||||||
</span><span className="color-grey-9 ml5 font-12 ">点击下载示例模版</span> */}
|
|
||||||
</p>
|
|
||||||
|
|
||||||
<div className="pl15 task-edit-content">
|
<div className="pl15 task-edit-content">
|
||||||
<p className="color-grey3 mb20">选择任务所在领域</p>
|
<p className="color-grey3 mb20">选择任务所在领域</p>
|
||||||
|
|
|
@ -594,7 +594,7 @@ class NewHeader extends Component {
|
||||||
str = match.path;
|
str = match.path;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(str, (url + "/"), url && str === url);
|
// console.log(str, (url + "/"), url && str === url);
|
||||||
if (url && (str === url || str === (url + "/"))) {
|
if (url && (str === url || str === (url + "/"))) {
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
|
@ -803,7 +803,7 @@ class NewHeader extends Component {
|
||||||
{this.props.user && this.props.user.login &&
|
{this.props.user && this.props.user.login &&
|
||||||
<div className="edu-menu-panel mr5">
|
<div className="edu-menu-panel mr5">
|
||||||
<i className={`iconfont icon-tianjiafangda ${activeIndex ? 'color-home' : 'color-grey-6'} `}></i>
|
<i className={`iconfont icon-tianjiafangda ${activeIndex ? 'color-home' : 'color-grey-6'} `}></i>
|
||||||
<div className="edu-menu-list" style={{ top: '48px' }}>
|
<div className="edu-menu-list" style={{ top: '53px' }}>
|
||||||
<div className="overPart"></div>
|
<div className="overPart"></div>
|
||||||
{
|
{
|
||||||
(coursestypes === true && this.props.user.main_site === false && (settings && !settings.add && (settings.add && settings.add.length === 0))) ? "" :
|
(coursestypes === true && this.props.user.main_site === false && (settings && !settings.add && (settings.add && settings.add.length === 0))) ? "" :
|
||||||
|
@ -892,7 +892,7 @@ class NewHeader extends Component {
|
||||||
src={getImageUrl(user.image_url)} width="34">
|
src={getImageUrl(user.image_url)} width="34">
|
||||||
</img>
|
</img>
|
||||||
{/* </a> */}
|
{/* </a> */}
|
||||||
<ul className="edu-menu-list" style={{ top: '60px', textAlign: 'center' }}>
|
<ul className="edu-menu-list" style={{ top: '70px', textAlign: 'center' }}>
|
||||||
<li className="bor-bottom-greyE ellipsis-1" style={{ cursor: "default", background: "#fff" }}>{this.props.current_user.username}</li>
|
<li className="bor-bottom-greyE ellipsis-1" style={{ cursor: "default", background: "#fff" }}>{this.props.current_user.username}</li>
|
||||||
{
|
{
|
||||||
settings && settings.personal && settings.personal.length > 0 && settings.personal.map((item, key) => {
|
settings && settings.personal && settings.personal.length > 0 && settings.personal.map((item, key) => {
|
||||||
|
|
|
@ -32,7 +32,7 @@ body>.-task-title {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
color: #333;
|
color: #333;
|
||||||
/* box-shadow: 0 0 12px rgb(0 ,0 ,0,10%); */
|
box-shadow: 0 0 12px rgb(0 ,0 ,0,10%);
|
||||||
}
|
}
|
||||||
.newHeaders.publicNav{
|
.newHeaders.publicNav{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -321,7 +321,7 @@ body>.-task-title {
|
||||||
.logoimg {
|
.logoimg {
|
||||||
float: left;
|
float: left;
|
||||||
min-width: 34px;
|
min-width: 34px;
|
||||||
height: 34px;
|
height: 48px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.headwith100b {
|
.headwith100b {
|
||||||
|
|
Loading…
Reference in New Issue