forked from Gitlink/forgeplus-react
修改需求的部分bug及对接成果
This commit is contained in:
parent
4109e4b07e
commit
6ec6ab2308
|
@ -1,4 +1,4 @@
|
|||
import moment from "moment";
|
||||
import moment from "moment";
|
||||
|
||||
// 处理整点 半点
|
||||
// 取传入时间往后的第一个半点
|
||||
|
@ -12,7 +12,7 @@ export function handleDateString(dateString) {
|
|||
if (miniute < 30 || miniute == 60) {
|
||||
return [ar[0], '30'].join(':')
|
||||
}
|
||||
if (miniute < 60) {
|
||||
if (miniute < 60) {
|
||||
// 加一个小时
|
||||
const tempStr = [ar[0], '00'].join(':');
|
||||
const format = "YYYY-MM-DD HH:mm";
|
||||
|
@ -20,7 +20,7 @@ export function handleDateString(dateString) {
|
|||
_moment.add(1, 'hours')
|
||||
return _moment.format(format)
|
||||
}
|
||||
|
||||
|
||||
return dateString
|
||||
}
|
||||
|
||||
|
@ -38,62 +38,91 @@ export function getNextHalfHourOfMoment(moment) {
|
|||
return moment
|
||||
}
|
||||
|
||||
export function formatSeconds(value) {
|
||||
export function formatSeconds(value) {
|
||||
|
||||
var theTime = parseInt(value);// 秒
|
||||
var middle= 0;// 分
|
||||
var hour= 0;// 小时
|
||||
|
||||
if(theTime > 60) {
|
||||
middle= parseInt(theTime/60);
|
||||
theTime = parseInt(theTime%60);
|
||||
if(middle> 60) {
|
||||
hour= parseInt(middle/60);
|
||||
middle= parseInt(middle%60);
|
||||
}
|
||||
}
|
||||
var result = ""+parseInt(theTime)+"秒";
|
||||
if(middle > 0) {
|
||||
if(hour>0){
|
||||
result = ""+parseInt(middle)+"分";
|
||||
}else{
|
||||
result = ""+parseInt(middle)+"分"+result;
|
||||
}
|
||||
|
||||
}
|
||||
if(hour> 0) {
|
||||
result = ""+parseInt(hour)+"小时"+result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
var theTime = parseInt(value);// 秒
|
||||
var middle = 0;// 分
|
||||
var hour = 0;// 小时
|
||||
|
||||
export function formatDuring(mss){
|
||||
if (theTime > 60) {
|
||||
middle = parseInt(theTime / 60);
|
||||
theTime = parseInt(theTime % 60);
|
||||
if (middle > 60) {
|
||||
hour = parseInt(middle / 60);
|
||||
middle = parseInt(middle % 60);
|
||||
}
|
||||
}
|
||||
var result = "" + parseInt(theTime) + "秒";
|
||||
if (middle > 0) {
|
||||
if (hour > 0) {
|
||||
result = "" + parseInt(middle) + "分";
|
||||
} else {
|
||||
result = "" + parseInt(middle) + "分" + result;
|
||||
}
|
||||
|
||||
}
|
||||
if (hour > 0) {
|
||||
result = "" + parseInt(hour) + "小时" + result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
export function formatDuring(mss) {
|
||||
var days = parseInt(mss / (1000 * 60 * 60 * 24));
|
||||
var hours = parseInt((mss % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
|
||||
var minutes = parseInt((mss % (1000 * 60 * 60)) / (1000 * 60));
|
||||
// console.log("formatDuringformatDuring");
|
||||
// console.log(days);
|
||||
// console.log(hours);
|
||||
// console.log(minutes);
|
||||
// console.log(Math.abs(days));
|
||||
// console.log(Math.abs(hours));
|
||||
// console.log(Math.abs(minutes));
|
||||
// console.log("formatDuringformatDuring");
|
||||
// console.log(days);
|
||||
// console.log(hours);
|
||||
// console.log(minutes);
|
||||
// console.log(Math.abs(days));
|
||||
// console.log(Math.abs(hours));
|
||||
// console.log(Math.abs(minutes));
|
||||
|
||||
try {
|
||||
days = Math.abs(days);
|
||||
} catch (e) {
|
||||
try {
|
||||
days = Math.abs(days);
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
try {
|
||||
hours = Math.abs(hours);
|
||||
} catch (e) {
|
||||
}
|
||||
try {
|
||||
hours = Math.abs(hours);
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
try {
|
||||
minutes = Math.abs(minutes);
|
||||
} catch (e) {
|
||||
}
|
||||
try {
|
||||
minutes = Math.abs(minutes);
|
||||
} catch (e) {
|
||||
|
||||
}
|
||||
}
|
||||
return days + "天" + hours + "小时" + minutes + "分";
|
||||
}
|
||||
|
||||
/*
|
||||
返回多久以前
|
||||
backDate:以前的某个日期
|
||||
*/
|
||||
export function timeAgo(backDate) {
|
||||
try {
|
||||
moment(backDate);
|
||||
} catch (e) {
|
||||
return;
|
||||
}
|
||||
let time = new Date() - moment(backDate);
|
||||
var days = Math.round(time / (1000 * 60 * 60 * 24));
|
||||
var hours = Math.round((time % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
|
||||
var minutes = Math.round((time % (1000 * 60 * 60)) / (1000 * 60));
|
||||
var seconds = Math.round((time % (1000 * 60 * 60)) / 1000);
|
||||
if (days) {
|
||||
return "约" + days + "天前";
|
||||
}
|
||||
if (hours) {
|
||||
return "约" + hours + "小时前";
|
||||
}
|
||||
if (minutes) {
|
||||
return "约" + minutes + "分前";
|
||||
}
|
||||
if (seconds) {
|
||||
return "约" + seconds + "秒前";
|
||||
}
|
||||
}
|
|
@ -27,7 +27,7 @@ export {
|
|||
markdownToHTML, uploadNameSizeSeperator, appendFileSizeToUploadFile, appendFileSizeToUploadFileAll, isImageExtension,
|
||||
downloadFile, sortDirections, validateLength, mdJSONParse, exportMdtoHtml
|
||||
} from './TextUtil'
|
||||
export { handleDateString, getNextHalfHourOfMoment, formatDuring, formatSeconds } from './DateUtil'
|
||||
export { handleDateString, getNextHalfHourOfMoment, formatDuring, formatSeconds ,timeAgo} from './DateUtil'
|
||||
|
||||
export { configShareForIndex, configShareForPaths, configShareForShixuns, configShareForCourses, configShareForCustom } from './util/ShareUtil'
|
||||
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
text-align: center;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
flex:none;
|
||||
}
|
||||
|
||||
.choose-box-big{
|
||||
|
@ -27,6 +28,7 @@
|
|||
.choose-list {
|
||||
display: flex;
|
||||
justify-content: start;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.choose-item {
|
||||
color:#666;
|
||||
|
|
|
@ -1,100 +1,212 @@
|
|||
import React, { useEffect, useState } from 'react';
|
||||
import { Icon, Pagination } from 'antd';
|
||||
import { getImageUrl } from 'educoder';
|
||||
import { Icon, Pagination, Modal, Input ,Button} from 'antd';
|
||||
import { getImageUrl, timeAgo } from 'educoder';
|
||||
import ReactWEditor from 'wangeditor-for-react';
|
||||
import { reportAchieve, thumbUpAchieve, commentAdd } from '../../task/api';
|
||||
import { httpUrl } from '../../fetch';
|
||||
import Nodata from '../../../forge/Nodata';
|
||||
import Loading from "../../../Loading";
|
||||
|
||||
import './index.scss';
|
||||
|
||||
const statusArr = ["草稿", "待审核", "已拒绝", "成果征集中", "成果评选中", "公示中", "协议签订中", "支付中", "已完成"];
|
||||
const classArr = ['', 'list-done', 'list-error', 'list-red', 'list-yellow', '', '', 'list-pay', 'list-gray',];
|
||||
const { TextArea } = Input;
|
||||
|
||||
// 如果是开发,那么文件系统默认使用117.50.100.12
|
||||
let fileHttpUrl = httpUrl;
|
||||
if (window.location.href.indexOf('localhost') > -1) {
|
||||
fileHttpUrl = 'http://117.50.100.12:8001';
|
||||
}
|
||||
|
||||
// const classArr = ['', 'list-done', 'list-error', 'list-red', 'list-yellow', '', '', 'list-pay', 'list-gray',];
|
||||
export default (props) => {
|
||||
const { list, curPage, total, changePage, loading } = props;
|
||||
const { list, curPage, total, changePage, loading, applyStatusAllNameArr, relaodList, showNotification } = props;
|
||||
const [page, setPage] = useState(1);
|
||||
const [pageSize, setPageSize] = useState(() => {
|
||||
return props.pageSize || 10;
|
||||
});
|
||||
const [checkedItem, setCheckedItem] = useState({});
|
||||
const [reportVisible, setReportVisible] = useState(false);
|
||||
const [reportValue, setReportValue] = useState('');
|
||||
const [commentHtml, setCommentHtml] = useState('');
|
||||
|
||||
useEffect(() => {
|
||||
changePage(page);
|
||||
}, [page]);
|
||||
|
||||
function downFile(item) {
|
||||
let url = fileHttpUrl + '/busiAttachments/download/' + item.id;
|
||||
window.open(url);
|
||||
}
|
||||
|
||||
function report() {
|
||||
if (!reportValue) {
|
||||
return;
|
||||
}
|
||||
reportAchieve({
|
||||
paperId: checkedItem.id,
|
||||
content: reportValue
|
||||
}).then(res => {
|
||||
if (res.message === 'success') {
|
||||
showNotification('举报成功');
|
||||
setReportVisible(false);
|
||||
setReportValue('');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function thumbUp(id) {
|
||||
thumbUpAchieve(id).then(res => {
|
||||
relaodList();
|
||||
});
|
||||
}
|
||||
|
||||
function commentPush(item) {
|
||||
commentAdd({
|
||||
content:commentHtml,
|
||||
paperId:''
|
||||
}).then(res => {
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function commentEdit(id){
|
||||
|
||||
}
|
||||
|
||||
return (
|
||||
loading ? <Loading /> :
|
||||
<React.Fragment>
|
||||
{
|
||||
list.map(item => {
|
||||
return (
|
||||
|
||||
<React.Fragment>
|
||||
{loading ? <Loading /> :
|
||||
<React.Fragment>
|
||||
{
|
||||
list.map(item => {
|
||||
return (
|
||||
|
||||
<div className="fileComments df" key={item.id}>
|
||||
<img src={getImageUrl("images/educoder/competition/1.png")} width="50" height="50" className="bor-radius-all mr20" />
|
||||
<img alt="头像加载失败" src={getImageUrl("images/educoder/competition/1.png")} width="50" height="50" className="bor-radius-all mr20" />
|
||||
<div className="flex1">
|
||||
<ul className="clearfix">
|
||||
<li className="fl pr">
|
||||
<span className="font-16 mr20 color-grey3">
|
||||
莫胜吕
|
||||
{item.user.nickName || item.user.login}
|
||||
</span>
|
||||
<span className="color-grey9">2 天前</span>
|
||||
<span className="color-blue ml10">待审核</span>
|
||||
<span className="color-grey9">{timeAgo(item.createdAt)}</span>
|
||||
<span className="color-blue ml10">{!item.verifyStatus && "待审核"}</span>
|
||||
|
||||
</li>
|
||||
<li className="fr">
|
||||
<a className="base_smallBtn blue_line_btn fl">
|
||||
待确认
|
||||
</a>
|
||||
{applyStatusAllNameArr[item.status]}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
{/* <li className="color-grey-6 mt10 mb10 justify break_word lineh-20">
|
||||
<div className="paper-detail-content" id="paper-detail-content-184" style="box-sizing: border-box;">
|
||||
<textarea style="display:none;">测试</textarea>
|
||||
</div>
|
||||
|
||||
</li> */}
|
||||
<div>
|
||||
<div className="attachments" >
|
||||
{
|
||||
item.paperDetail.busiAttachments && item.paperDetail.busiAttachments.map(fileItem => {
|
||||
return <div className="file-list-box" 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>
|
||||
</div>
|
||||
})
|
||||
}
|
||||
</div>
|
||||
|
||||
{/* <div>
|
||||
<div className="attachments" >
|
||||
<p className="clearfix" id="attachments_1541">
|
||||
<span title="歌曲ID代入演示.txt" id="attachment_">
|
||||
<i className="iconfont icon-fujian color-green font-14 mr3"></i>
|
||||
<a href="/attachments/download/1541/%E6%AD%8C%E6%9B%B2ID%E4%BB%A3%E5%85%A5%E6%BC%94%E7%A4%BA.txt" className="icon icon-attachment font-14" length="32">歌曲ID代入演示.txt</a> </span>
|
||||
<a href="/attachments/download/1541/%E6%AD%8C%E6%9B%B2ID%E4%BB%A3%E5%85%A5%E6%BC%94%E7%A4%BA.txt" className="icon icon-attachment font-14" length="32">歌曲ID代入演示.txt</a>
|
||||
|
||||
</span>
|
||||
<span className="size color-grey-9 ml10">(299 Bytes)</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
*/}
|
||||
<li className="clearfix color-grey-6 mt10 mb20">
|
||||
<span className="mr50 fl"><span className="color-grey9">成果编号:</span>#25698320</span>
|
||||
<span className="mr50 fl"><span className="color-grey9">提交时间:</span>2021-06-17 13: 45: 53</span>
|
||||
<span className="fl"><span className="color-grey9">稿件状态:</span>雇主已浏览</span>
|
||||
<span className="mr50 fl"><span className="color-grey9">成果编号:</span>#{item.number}</span>
|
||||
<span className="mr50 fl"><span className="color-grey9">提交时间:</span>{item.createdAt}</span>
|
||||
<span className="fl"><span className="color-grey9">稿件状态:</span>{item.read ? '雇主已浏览' : '雇主未浏览'}</span>
|
||||
<span className="fr">
|
||||
<a href="javascript:void(0)" className="mr20" onclick="tipOffs(184);"><i className="iconfont icon-jinggao font-15 mr3"></i>举报</a>
|
||||
<a href="/papers/184/add_comments" className="mr20" data-remote="true"><i className="iconfont icon-huifu1 font-15 mr3"></i>0</a>
|
||||
<span id="vote_link">
|
||||
<a onclick="vote(184, 'Paper')" href="javascript:void(0)"><i className="iconfont icon-dianzan11 font-15 mr3"></i>2</a>
|
||||
</span>
|
||||
<a className="mr20" onClick={() => { setReportVisible(true); 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>0</a>
|
||||
<a onClick={() => { thumbUp(item.id) }}><i className="iconfont icon-dianzan11 font-16 mr3"></i>{item.thumbsUp}</a>
|
||||
</span>
|
||||
</li>
|
||||
<div id="paper-comment-add-184"></div>
|
||||
|
||||
<React.Fragment>
|
||||
<ReactWEditor
|
||||
value={commentHtml}
|
||||
config={
|
||||
{
|
||||
placeholder: "把您的任务内容补充详细一些吧,越清晰具体,任务完成质量越高哟~",
|
||||
uploadImgServer: fileHttpUrl + '/busiAttachments/upload',
|
||||
uploadFileName: 'file',
|
||||
uploadImgHeaders: {
|
||||
'X-Requested-With': 'XMLHttpRequest'
|
||||
},
|
||||
uploadImgHooks: {
|
||||
// 图片上传并返回了结果,想要自己把图片插入到编辑器中
|
||||
customInsert: function (insertImgFn, result) {
|
||||
// insertImgFn 可把图片插入到编辑器,传入图片 src ,执行函数即可
|
||||
if (result && result.data && result.data.id) {
|
||||
insertImgFn(`${fileHttpUrl}/busiAttachments/view/${result.data.id}`);
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
onChange={(html) => {
|
||||
setCommentHtml(html);
|
||||
}}
|
||||
/>
|
||||
<Button className="mr20 fr" type={"primary"} onClick={() => { commentPush(item) }}>发表</Button>
|
||||
</React.Fragment>
|
||||
|
||||
</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="暂无数据" />}
|
||||
</React.Fragment>
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
{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="暂无数据" />}
|
||||
</React.Fragment>
|
||||
}
|
||||
|
||||
|
||||
<Modal
|
||||
title="举报"
|
||||
visible={reportVisible}
|
||||
onOk={report}
|
||||
onCancel={() => { setReportVisible(false) }}
|
||||
className="form-edit-modal"
|
||||
>
|
||||
<div className="task-popup-content">
|
||||
<p className="edu-txt-center lineh-20 mb10">你的申诉信息将发送给平台管理员</p>
|
||||
<p className="edu-txt-center lineh-20">请如实填写有效的申诉原由,我们将尽快完成审核</p>
|
||||
<TextArea
|
||||
value={reportValue}
|
||||
placeholder="(必填)请在此输入发起申诉的原因,最大限制100个字符"
|
||||
autoSize={{ minRows: 6 }}
|
||||
className="applyText"
|
||||
onChange={(e) => { setReportValue(e.target.value) }}
|
||||
/>
|
||||
</div>
|
||||
</Modal>
|
||||
|
||||
</React.Fragment>
|
||||
|
||||
)
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ export default (props) => {
|
|||
<span className="line_1">{publishModeArr[item.publishMode]}</span>
|
||||
</li>
|
||||
|
||||
<li key={3} className="with10 draft_only">{item.papersCount}</li>
|
||||
<li key={3} className="with10 draft_only">{item.papersCount||0}</li>
|
||||
|
||||
<li key={4} className="with10 color-orange">¥{item.bounty}</li>
|
||||
<li className="flex1">
|
||||
|
@ -68,7 +68,7 @@ export default (props) => {
|
|||
</li>
|
||||
<li key={5} className="with15 flex-column">
|
||||
{
|
||||
item.status == 0 ?
|
||||
item.status == 0 ||item.status == 2 ?
|
||||
<Link className="line_1 color-grey3" to={`/task/taskEdit/${item.id}`}>编辑草稿</Link> :
|
||||
<Link className="line_1 color-grey3" to={`/task/taskDetail/${item.id}`}>查看详情</Link>
|
||||
}
|
||||
|
|
|
@ -32,8 +32,8 @@ export default (props) => {
|
|||
{(!item.status == '8') && item.delayTime && <span className="list-yellow">延期中</span>}
|
||||
</div>
|
||||
<div className="list-other">
|
||||
<span className=" mr30"><i className="iconfont icon-dianjiliang mr3 font-12" />{item.visits}</span>
|
||||
<span className=" mr30"><Icon type="user" /><span className="color-orange">{item.papersCount}</span>人参与</span>
|
||||
<span className=" mr30"><i className="iconfont icon-dianjiliang mr3 font-12" />{item.visits || 0}</span>
|
||||
<span className=" mr30"><Icon type="user" /><span className="color-orange">{item.papersCount || 0}</span>人参与</span>
|
||||
{(!item.status == '8') && item.delayTime && <span className=" mr30"><i className="mr5 iconfont icon-shijian color-grey9 font-14"></i>{item.delayTime}</span>}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
padding: 1rem 0;
|
||||
display: flex;
|
||||
justify-content: start;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.status-item {
|
||||
font-size: 14px;
|
||||
|
|
|
@ -5,7 +5,8 @@ import cookie from 'react-cookies';
|
|||
// export const httpUrl='http://117.50.100.12:8001';
|
||||
// export const httpUrl='http://192.168.31.72:8081';
|
||||
// export const httpUrl = 'http://106.75.31.211:58088';
|
||||
export const httpUrl = 'http://192.168.31.72:8089';
|
||||
// export const httpUrl = 'http://192.168.31.72:8089';
|
||||
export const httpUrl = 'http://192.168.31.104:8081';
|
||||
|
||||
|
||||
const TokenKey = 'autologin_forge_military';
|
||||
|
@ -15,7 +16,7 @@ axios.defaults.withCredentials = true;
|
|||
// 创建axios实例
|
||||
const service = axios.create({
|
||||
baseURL: httpUrl,
|
||||
timeout: 5000 // 请求超时时间
|
||||
timeout: 10000 // 请求超时时间
|
||||
});
|
||||
|
||||
// request拦截器
|
||||
|
@ -23,6 +24,15 @@ service.interceptors.request.use(config => {
|
|||
if (cookie.load(TokenKey)) {
|
||||
config.headers['Authorization'] = cookie.load(TokenKey); // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||
}
|
||||
if (window.location.port === "3007") {
|
||||
// 模拟token为登录用户
|
||||
const taskToken=sessionStorage.taskToken||'fde0d895b20856ccea4ff2df032c4450d6b692fd';
|
||||
if (config.url.indexOf('?') === -1) {
|
||||
config.url = `${config.url}?token=${taskToken}`;
|
||||
} else {
|
||||
config.url = `${config.url}&token=${taskToken}`;
|
||||
}
|
||||
}
|
||||
return config;
|
||||
}, error => {
|
||||
// Do something with request error
|
||||
|
|
|
@ -111,6 +111,7 @@
|
|||
|
||||
.ant-modal-footer{
|
||||
text-align: center;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ export async function getTaskDetail(id) {
|
|||
}
|
||||
}
|
||||
|
||||
//新增公告
|
||||
//新增任务
|
||||
export function addTask(data) {
|
||||
return fetch({
|
||||
url: '/api/tasks/add',
|
||||
|
@ -93,11 +93,98 @@ export function deleteTask(id) {
|
|||
});
|
||||
}
|
||||
|
||||
//更新
|
||||
//更新任务
|
||||
export function updateTask(data) {
|
||||
return fetch({
|
||||
url: '/api/tasks/',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
//新增成果
|
||||
export function addAchieve(data) {
|
||||
return fetch({
|
||||
url: '/api/paper/',
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
// 任务成果
|
||||
export async function getTaskAchieve(params){
|
||||
let res = await fetch({
|
||||
url: '/api/paper/',
|
||||
method: 'get',
|
||||
params,
|
||||
});
|
||||
if (res.data) {
|
||||
return res.data;
|
||||
} else {
|
||||
notification.open({
|
||||
message: "提示",
|
||||
description: res.message || '请求错误',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//更新成果
|
||||
export function updateAchieve(data) {
|
||||
return fetch({
|
||||
url: '/api/paper/',
|
||||
method: 'put',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
//举报成果
|
||||
export function reportAchieve(data) {
|
||||
return fetch({
|
||||
url: `/api/paper/${data.paperId}/paperReport`,
|
||||
method: 'post',
|
||||
data: data
|
||||
});
|
||||
}
|
||||
|
||||
//点赞成果
|
||||
export function thumbUpAchieve(id) {
|
||||
return fetch({
|
||||
url: `/api/paper/${id}/thumbUp`,
|
||||
method: 'post',
|
||||
data: {paperId:id}
|
||||
});
|
||||
}
|
||||
|
||||
// 检查用户是否同意协议
|
||||
export function checkAgreement(taskId) {
|
||||
return fetch({
|
||||
url: `/api/paper/${taskId}/agreement`,
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 获取协议
|
||||
export function getAgreement() {
|
||||
return fetch({
|
||||
url: '/api/paper/agreementSettings/1',
|
||||
method: 'get'
|
||||
});
|
||||
}
|
||||
|
||||
// 同意协议
|
||||
export function agreement(taskId) {
|
||||
return fetch({
|
||||
url: `/api/paper/${taskId}/agreement`,
|
||||
method: 'post',
|
||||
data: {taskId}
|
||||
});
|
||||
}
|
||||
|
||||
// 新增评论
|
||||
export function commentAdd(data) {
|
||||
return fetch({
|
||||
url: `/api/paper/${data.paperId}/comment`,
|
||||
method: 'post',
|
||||
data,
|
||||
});
|
||||
}
|
|
@ -30,7 +30,7 @@ export default ({ location, history, current_user }) => {
|
|||
const [requireAchieve, setRequireAchieve] = useState('1');
|
||||
|
||||
const [searchInput, setSearchInput] = useState('');
|
||||
const [orderBy, setOrderBy] = useState('');
|
||||
const [orderBy, setOrderBy] = useState('createdAtDesc');
|
||||
const [curPage, setCurPage] = useState(1);
|
||||
const [total, setTotal] = useState(0);
|
||||
const [taskList, setTaskList] = useState([]);
|
||||
|
@ -132,7 +132,7 @@ export default ({ location, history, current_user }) => {
|
|||
/>
|
||||
}
|
||||
>
|
||||
<TabPane tab="我发布的需求" key="1">
|
||||
<TabPane tab="我发布的任务" key="1">
|
||||
<StatusNav
|
||||
key={'publishStatus'}
|
||||
type={'publishStatus'}
|
||||
|
@ -151,7 +151,7 @@ export default ({ location, history, current_user }) => {
|
|||
/>
|
||||
</TabPane>
|
||||
|
||||
<TabPane tab="需求草稿" key="2">
|
||||
<TabPane tab="任务草稿" key="2">
|
||||
<StatusNav
|
||||
key={'unpublishStatus'}
|
||||
type={'unpublishStatus'}
|
||||
|
@ -188,7 +188,7 @@ export default ({ location, history, current_user }) => {
|
|||
/>
|
||||
}
|
||||
>
|
||||
<TabPane tab="我发布的需求" key="1">
|
||||
<TabPane tab="我参加的任务" key="1">
|
||||
<ChooseNav
|
||||
key={'taskStatus'}
|
||||
type={'taskStatus'}
|
||||
|
@ -216,7 +216,7 @@ export default ({ location, history, current_user }) => {
|
|||
/>
|
||||
</TabPane>
|
||||
|
||||
<TabPane tab="需求草稿" key="2">
|
||||
<TabPane tab="我的成果" key="2">
|
||||
<ChooseNav
|
||||
key={'applyStatus'}
|
||||
type={'applyStatus'}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,25 +1,33 @@
|
|||
import React, { forwardRef, useEffect, useState, useCallback } from 'react';
|
||||
import { Form, Input, Button, Modal, Table, Pagination } from 'antd';
|
||||
import { Form, Input, Button, Modal, Table, Pagination, Checkbox } from 'antd';
|
||||
import classNames from 'classnames';
|
||||
import { Link } from "react-router-dom";
|
||||
import { getImageUrl } from 'educoder';
|
||||
import Upload from '../../components/Upload';
|
||||
import StatusNav from '../../components/statusNav';
|
||||
import ItemListAchieve from '../../components/itemListAchieve';
|
||||
import { getTaskDetail, getTaskCategory } from '../api';
|
||||
import { taskModeIdArr, applyStatusArr } from '../static';
|
||||
import { getTaskDetail, getTaskCategory, getTaskAchieve, addAchieve, getAgreement, agreement, checkAgreement, } from '../api';
|
||||
import { taskModeIdArr, applyStatusArr, applyStatusAllArr, agreementContent } from '../static';
|
||||
import { httpUrl } from '../../fetch';
|
||||
|
||||
import winpng from '../../image/win.png';
|
||||
|
||||
import './index.scss';
|
||||
const { TextArea } = Input;
|
||||
|
||||
// 如果是开发,那么文件系统默认使用117.50.100.12
|
||||
let fileHttpUrl = httpUrl;
|
||||
if (window.location.href.indexOf('localhost') > -1) {
|
||||
fileHttpUrl = 'http://117.50.100.12:8001';
|
||||
}
|
||||
const taskModeNameArr = [];
|
||||
for (const item of taskModeIdArr) {
|
||||
taskModeNameArr[item.dicItemCode] = item.dicItemName;
|
||||
}
|
||||
|
||||
const applyStatusAllNameArr = [];
|
||||
for (const item of applyStatusAllArr) {
|
||||
applyStatusAllNameArr[item.dicItemCode] = item.dicItemName;
|
||||
}
|
||||
|
||||
|
||||
const columns = [
|
||||
{
|
||||
|
@ -28,15 +36,14 @@ const columns = [
|
|||
},
|
||||
{
|
||||
title: '投稿时间',
|
||||
dataIndex: 'age',
|
||||
dataIndex: 'createdAt',
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'status',
|
||||
render: (text, record) => {
|
||||
return <img src={winpng} />
|
||||
return text == 2 ? <img src={winpng} /> : applyStatusAllNameArr[text]
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
title: '详情',
|
||||
|
@ -46,7 +53,7 @@ const columns = [
|
|||
|
||||
export default Form.create()(
|
||||
forwardRef(({ match, current_user, form, history, showNotification }, ref) => {
|
||||
console.log(current_user);
|
||||
// console.log(current_user);
|
||||
const id = match.params.taskId;
|
||||
const { getFieldDecorator, validateFields, setFieldsValue } = form;
|
||||
|
||||
|
@ -55,21 +62,21 @@ export default Form.create()(
|
|||
const [fileList, setFileList] = useState(null);
|
||||
|
||||
const [applyModal, setApplyModal] = useState(false);
|
||||
const [applyContent, setApplyContent] = useState({ title: '应征投稿协议内容', content: agreementContent });
|
||||
const [agreementCheckBox, setAgreementCheckBox] = useState(false);
|
||||
const [signAgreement,setSignAgreement] = useState(false);
|
||||
|
||||
|
||||
const [status, setStatus] = useState('');
|
||||
const [curPage, setCurPage] = useState(1);
|
||||
const [total, setTotal] = useState(0);
|
||||
const [orderBy, setOrderBy] = useState('');
|
||||
const [dataList, setDataList] = useState([
|
||||
{ name: '测试方式', id: 1 },
|
||||
{ name: '测试方式', id: 2 },
|
||||
{ name: '测试方式', id: 3 },
|
||||
{ name: '测试方式', id: 4 },
|
||||
]);
|
||||
const [dataList, setDataList] = useState([]);
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
const [reload, setReload] = useState(0);
|
||||
const [relaodChildList, setRelaodChildList] = useState(0);
|
||||
|
||||
// 获取任务领域数组
|
||||
// 获取任务领域配置数据
|
||||
useEffect(() => {
|
||||
getTaskCategory().then(data => {
|
||||
if (data) {
|
||||
|
@ -82,33 +89,75 @@ export default Form.create()(
|
|||
});
|
||||
}, []);
|
||||
|
||||
|
||||
|
||||
// 获取本任务详情
|
||||
useEffect(() => {
|
||||
id && getTaskDetail(id).then(data => {
|
||||
setDetailData(data || {});
|
||||
console.log(data);
|
||||
})
|
||||
}, [id]);
|
||||
}, [id, reload]);
|
||||
|
||||
// 检查用户是否同意协议
|
||||
useEffect(() => {
|
||||
id && checkAgreement(id).then(res => {
|
||||
if(res&&res.data&&res.data.status==1){
|
||||
setSignAgreement(true);
|
||||
}
|
||||
})
|
||||
}, []);
|
||||
|
||||
// 获取协议内容
|
||||
useEffect(() => {
|
||||
applyModal && getAgreement().then(res => {
|
||||
if (res && res.data) {
|
||||
setApplyContent({
|
||||
title: res.data.title,
|
||||
content: res.data.content,
|
||||
});
|
||||
}
|
||||
});
|
||||
}, [applyModal]);
|
||||
|
||||
// 获取成果列表
|
||||
useEffect(() => {
|
||||
let params = {
|
||||
taskId: id,
|
||||
orderBy,
|
||||
pageSize: 10,
|
||||
curPage,
|
||||
status,
|
||||
}
|
||||
id && getTaskAchieve(params).then(data => {
|
||||
if (data && Array.isArray(data.rows)) {
|
||||
for (const item of data.rows) {
|
||||
item.detail = item.paperDetail.content;
|
||||
}
|
||||
}
|
||||
setDataList(data.rows || []);
|
||||
console.log(data);
|
||||
});
|
||||
console.log(relaodChildList);
|
||||
}, [id, status, curPage, reload, relaodChildList]);
|
||||
|
||||
|
||||
// 流程步骤显示
|
||||
const process = useCallback((title, days, active) => {
|
||||
return (
|
||||
<li key={title} className={classNames({ active: active })} >
|
||||
<span>{title}</span>
|
||||
{days && <p className="color-grey-6 font-12">
|
||||
{typeof days === 'string' && days.includes('延期') && <p className="color-grey-6 font-12">{days}</p>}
|
||||
{(typeof days === 'number') && <p className="color-grey-6 font-12">
|
||||
{days}天
|
||||
</p>}
|
||||
</li>
|
||||
)
|
||||
}, []);
|
||||
}, [detailData]);
|
||||
|
||||
function downFile(item) {
|
||||
let url = httpUrl + '/busiAttachments/download/' + item.id;
|
||||
let url = fileHttpUrl + '/busiAttachments/download/' + item.id;
|
||||
window.open(url);
|
||||
}
|
||||
|
||||
|
||||
const helper = useCallback(
|
||||
(label, name, rules, widget) => (
|
||||
<Form.Item label={label}>
|
||||
|
@ -118,7 +167,6 @@ export default Form.create()(
|
|||
[]
|
||||
);
|
||||
|
||||
|
||||
// 上传附件后得到的文件数组
|
||||
function UploadFunc(fileList) {
|
||||
setFileList(fileList);
|
||||
|
@ -127,29 +175,50 @@ export default Form.create()(
|
|||
files.push(item.id || item.response.data.id);
|
||||
}
|
||||
setFieldsValue({
|
||||
uploadFileNumbers: files.join()
|
||||
files: files.join()
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 提交成果
|
||||
function saveItem(status) {
|
||||
function saveItem() {
|
||||
validateFields((error, values) => {
|
||||
if (!error) {
|
||||
|
||||
let params = {
|
||||
...values,
|
||||
taskId: id
|
||||
}
|
||||
addAchieve(params).then((res) => {
|
||||
if (res.message === 'success') {
|
||||
showNotification('成果提交成功');
|
||||
setReload(reload + 1);
|
||||
setCurPage(1);
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function changeOptionId(option, type) {
|
||||
// if (type === 'publishStatus') {
|
||||
// // setStatusString(option.dicItemCode.toString() || '3,4,5,6,7,8');
|
||||
// } else if (type === 'unpublishStatus') {
|
||||
// // setStatusString(option.dicItemCode.toString() || '0,1,2');
|
||||
// }
|
||||
// setCurPage(1);
|
||||
function changeOptionId(option) {
|
||||
setStatus(option.dicItemCode.toString() || '');
|
||||
setCurPage(1);
|
||||
}
|
||||
|
||||
// 签订协议
|
||||
function agreementSign() {
|
||||
agreement(id).then(res => {
|
||||
if (res.message === 'success') {
|
||||
showNotification('已签订协议');
|
||||
setApplyModal(false);
|
||||
setSignAgreement(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function relaodList() {
|
||||
setRelaodChildList(relaodChildList + 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return (
|
||||
|
@ -164,6 +233,7 @@ export default Form.create()(
|
|||
<div className="edu-back-white padding30">
|
||||
<div className="df mb20">
|
||||
<div className="mr30">
|
||||
{/* <Link to={`/users/${detailData.user.login}`} alt="用户头像"><img alt="头像加载失败" className="bor-radius-all" height="60" src={getImageUrl("images/educoder/competition/1.png")} width="60" /></Link> */}
|
||||
<a href="/users/p51497208" alt="用户头像"><img alt="头像加载失败" className="bor-radius-all" height="60" src={getImageUrl("images/educoder/competition/1.png")} width="60" /></a>
|
||||
<p className="lineh-20 mt10 edu-txt-center">{current_user.username}</p>
|
||||
</div>
|
||||
|
@ -177,7 +247,7 @@ export default Form.create()(
|
|||
<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.expiredAt}</span></li>
|
||||
{/* <li><span className="mr10 color-grey9">截止时间:</span><span className="color-grey3">{detailData.expiredAt}</span></li> */}
|
||||
</ul>
|
||||
<ul className="fr edu-txt-right">
|
||||
<li className="color-orange font-bd lineh-30"><span className="font-18">¥</span><span className="font-28">{detailData.bounty}</span></li>
|
||||
|
@ -194,31 +264,30 @@ export default Form.create()(
|
|||
<ul className="tasks_status clearfix">
|
||||
<li className="active"><span>发布任务</span></li>
|
||||
|
||||
{process('成果提交', detailData.collectingDays, detailData.status > 2)}
|
||||
{process('成果提交', detailData.status === 3 && detailData.delayTime ? detailData.delayTime : detailData.collectingDays, detailData.status > 2)}
|
||||
|
||||
{process('成果评选', detailData.choosingDays, detailData.status > 3)}
|
||||
{process('成果评选', detailData.status === 4 && detailData.delayTime ? detailData.delayTime : detailData.choosingDays, detailData.status > 3)}
|
||||
|
||||
{process('结果公示', detailData.makePublicDays, detailData.status > 4)}
|
||||
{process('结果公示', detailData.status === 5 && detailData.delayTime ? detailData.delayTime : detailData.makePublicDays, detailData.status > 4)}
|
||||
|
||||
{process('任务协议签订', detailData.signingDays, detailData.status > 5)}
|
||||
{process('任务协议签订', detailData.status === 6 && detailData.delayTime ? detailData.delayTime : detailData.signingDays, detailData.status > 5)}
|
||||
|
||||
{process('支付', detailData.payingDays, detailData.status > 6)}
|
||||
{process('支付', detailData.status === 7 && detailData.delayTime ? detailData.delayTime : detailData.payingDays, detailData.status > 6)}
|
||||
|
||||
{process('任务完成', '', detailData.status > 7)}
|
||||
{process('任务完成', undefined, detailData.status > 7)}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div className="font-16 font-bd">需求详情:</div>
|
||||
<div className="font-16 font-bd">任务详情:</div>
|
||||
|
||||
{/* 富文本内容插入 */}
|
||||
<div className="content-text" dangerouslySetInnerHTML={{ __html: detailData.description }}></div>
|
||||
|
||||
{detailData.tasksAttachments && <React.Fragment>
|
||||
<div className="font-16 font-bd">需求文件:</div>
|
||||
<div className="font-16 font-bd">任务文件:</div>
|
||||
{
|
||||
detailData.tasksAttachments.map(item => {
|
||||
return <div className="file-list-box" key={item.id}>
|
||||
|
||||
<a onClick={() => { downFile(item) }}><i className="iconfont icon-fujian color-green font-14 mr3"></i>
|
||||
{item.fileName} </a>
|
||||
<span className="ml10 color-grey-9">({item.fileSizeString})</span>
|
||||
|
@ -233,9 +302,7 @@ export default Form.create()(
|
|||
1、参赛作品一经采用,其所有权、修改权和使用权均归主办方所有,设计者不得再在任何地方使用;<br />
|
||||
2、应征者所提交的作品必须由应征者本人创作或参与创作,应征者应确认其作品的原创性,主办单位不承担因作品侵犯他人(或单位)的权利而产生的法律责任,其法律责任由应征者本人承担。
|
||||
</p>
|
||||
|
||||
<div className="font-16 font-bd">交稿声明:</div>
|
||||
|
||||
<p className="color-grey-6 lineh-20 padding10-15 mb10">
|
||||
应征者提交的稿件必须是设计作品,广告等无效交稿一律不采用!
|
||||
</p>
|
||||
|
@ -251,7 +318,7 @@ export default Form.create()(
|
|||
<div className="font-16 font-bd">我要应征投稿:</div>
|
||||
{helper(
|
||||
"",
|
||||
"achievementRemark",
|
||||
"content",
|
||||
[{ required: true, message: "请输入" }],
|
||||
<TextArea
|
||||
placeholder="请输入"
|
||||
|
@ -266,27 +333,25 @@ export default Form.create()(
|
|||
load={UploadFunc}
|
||||
size={50}
|
||||
showNotification={showNotification}
|
||||
// actionUrl={httpUrl}
|
||||
actionUrl={'http://117.50.100.12:8001'}
|
||||
actionUrl={fileHttpUrl}
|
||||
fileList={fileList}
|
||||
/>
|
||||
{getFieldDecorator('uploadFileNumbers', {
|
||||
{getFieldDecorator('files', {
|
||||
validateFirst: true
|
||||
})(<Input style={{ display: 'none' }} />)}
|
||||
</Form.Item>
|
||||
|
||||
<Button className="mr20" type={"primary"} onClick={() => { saveItem(0) }}>提交</Button>
|
||||
<Button className="mr20" type={"primary"} onClick={() => { saveItem() }}>提交</Button>
|
||||
</div>
|
||||
{/* } */}
|
||||
|
||||
|
||||
|
||||
<div className="applyList edu-back-white padding30 mt20">
|
||||
<div class="font-16 font-bd">交稿(0)<i data-tip-down="不公示应征者姓名" class="iconfont icon-yincang1 color-grey9 font-20"></i>
|
||||
<div className="font-16 font-bd">交稿(0)<i data-tip-down="不公示应征者姓名" className="iconfont icon-yincang1 color-grey9 font-20"></i>
|
||||
|
||||
{/* <a href="javascript:void(0)" onclick="upload_proofs_popup(130)" class="line_1 color-blue fr ml20" id="proof-upload-button">上传佐证材料</a> */}
|
||||
{/* <a href="/tasks/130/export_papers" class="line_1 color-blue fr ml20" data-disable-with="<img alt="Loading" class="download-loading" src="/images/loading.gif?1564989000" ></a>下载中..." target="_blank">一键导出成果物</a> */}
|
||||
<a href="javascript:notice_box('暂无应征者提交')"><span class="fr color-orange ml20">应征者名单公示 >></span></a>
|
||||
{/* <a href="javascript:void(0)" onclick="upload_proofs_popup(130)" className="line_1 color-blue fr ml20" id="proof-upload-button">上传佐证材料</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> */}
|
||||
{/* <a href="javascript:notice_box('暂无应征者提交')"><span className="fr color-orange ml20">应征者名单公示 >></span></a> */}
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -297,118 +362,52 @@ export default Form.create()(
|
|||
changeOptionId={changeOptionId}
|
||||
/>
|
||||
|
||||
<Table
|
||||
loading={loading}
|
||||
rowKey={(row) => row.id}
|
||||
dataSource={dataList}
|
||||
columns={columns}
|
||||
pagination={false}
|
||||
/>
|
||||
{dataList.length > 10 &&
|
||||
<Pagination
|
||||
onChange={(page) => { setCurPage(page) }}
|
||||
current={curPage}
|
||||
total={total}
|
||||
/>}
|
||||
|
||||
<ItemListAchieve
|
||||
list={dataList}
|
||||
itemClick={dataList}
|
||||
curPage={curPage}
|
||||
total={total}
|
||||
changePage={(page) => { setCurPage(page) }}
|
||||
loading={loading}
|
||||
/>
|
||||
{
|
||||
detailData.status > 4 ?
|
||||
<React.Fragment>
|
||||
<Table
|
||||
loading={loading}
|
||||
rowKey={(row) => row.id}
|
||||
dataSource={dataList}
|
||||
columns={columns}
|
||||
pagination={false}
|
||||
/>
|
||||
{dataList.length > 10 &&
|
||||
<Pagination
|
||||
onChange={(page) => { setCurPage(page) }}
|
||||
current={curPage}
|
||||
total={total}
|
||||
/>}
|
||||
</React.Fragment>
|
||||
:
|
||||
<ItemListAchieve
|
||||
list={dataList}
|
||||
itemClick={dataList}
|
||||
curPage={curPage}
|
||||
total={total}
|
||||
changePage={(page) => { setCurPage(page) }}
|
||||
loading={loading}
|
||||
applyStatusAllNameArr={applyStatusAllNameArr}
|
||||
relaodList={relaodList}
|
||||
showNotification={showNotification}
|
||||
/>}
|
||||
</div>
|
||||
|
||||
|
||||
<Modal
|
||||
title="应征投稿协议内容"
|
||||
title={applyContent.title}
|
||||
visible={applyModal}
|
||||
// onOk={checkItem}
|
||||
onOk={agreementSign}
|
||||
onCancel={() => { setApplyModal(false) }}
|
||||
className="form-edit-modal"
|
||||
width='60vw'
|
||||
>
|
||||
<div className="new_li markdown-body editormd-html-preview" id="agreement_content" style={{ boxSizing: 'border-box', padding: '0px 20px' }}>
|
||||
<p>投稿协议内容示例,请在管理 — 创客 — 基础数据 — 应征投稿协议内容 修改.</p>
|
||||
<p> <strong>在您通过本平台在线签署应征投稿合同前,请您认真细致地阅读以下《应征投稿协议》,特别是其中以粗体下划线明显标注的条款,并在您同意了下述协议条款再正式进入后续程序</strong></p>
|
||||
<p>本协议由甲方(任务发布方)和乙方(应征者)在线签订,请甲乙双方仔细阅读协议内容, <strong>请务必审慎阅读、充分理解各条款内容,特别是免除或者限制责任的条款、法律适用和争议解决条款</strong>。 甲乙双方点击接受本协议,即意味着已阅读、理解并接受本协议所有条款,并对本协议条款的含义及相应的法律后果已全部知晓并充分认可。甲乙双方点击确认本协议后,本协议即产生法律约束力。</p>
|
||||
<p>本协议内容包括协议正文及甲乙双方在线相互确认的合同。所签订的合同、合同附件为本协议不可分割的一部分,与本协议正文具有同等法律效力。若您继续使用本平台创客空间,则表明您已经完全知晓、认可并同意遵守本协议内容、所有汇新云已经发布的各类规则以及签订的合同。</p>
|
||||
<p>在阅读本协议的过程中,如不同意本协议或其中任何条款约定,应拒绝接受本协议所约定的内容,甲乙双方都有权自主选择拒绝达成合作。</p>
|
||||
<h5 id="h5-1-"><a name="1.定义" className="reference-link"></a><span className="header-link octicon octicon-link"></span>1.定义</h5><p>除非本协议另有约定,在本协议中所用下列术语定义如下:</p>
|
||||
<p>1.1 本平台:是指www.XXXXXX.com 为用户提供需求信息发布、交流,第三方以“企业”或“个人”入驻的形式应征需求的电子商务交易服务平台;</p>
|
||||
<p>1.2 用户:指在本平台合法注册,接受并认可服务平台相关协议、规则、规范、制度等的自然人、法人或其他非法人组织。</p>
|
||||
<p>1.3 甲方:指在本平台上发布创客需求的用户。</p>
|
||||
<p>1.4 乙方:是指经本平台审核通过入驻本平台,根据需求方发布的需求,提供各种定制服务或IT产品,在平台开展业务经营的企业或个人。</p>
|
||||
<p>1.5 服务需求:指甲方基于自身需求向乙方提出的具体服务要求。</p>
|
||||
<p>1.6 项目款:指甲方和乙方的交易金额,即本协议约定交易金额或后续经协商调整后确定的交易总金额。</p>
|
||||
<p>1.7 平台账户:指用户在本平台注册的帐号,用户只能通过该帐户登陆服务平台进行交易。</p>
|
||||
<h5 id="h5-2-"><a name="2.甲方权利义务" className="reference-link"></a><span className="header-link octicon octicon-link"></span>2.甲方权利义务</h5><p>2.1 甲方应当根据服务需求主动向乙方提交本项目所需的相关资料,并保证该资料的真实性、合法性、准确性、完整性,如因甲方未按照前述标准提供资料导致乙方无法履行协议义务,由此产生的责任由甲方自行承担。</p>
|
||||
<p>2.2 甲方在向乙方提交项目所涉及资料时有权一并对乙方的服务提出建议和思路,同时有权在验收时对乙方的服务成果提出修改意见,但甲方提出的服务建议或思路以及修改意见应当明确具体,如不明确,有权不听取建议或拒绝修改,同时甲方不得借机拖延进度及应支付的款项,甲方提出超出协议或合同约定范围的修改要求,乙方有权拒绝或者另行收取费用。</p>
|
||||
<p>2.3 甲方未按照合同在约定的日期内支付项目款的,乙方有权拒绝或顺延提供服务。</p>
|
||||
<p>2.4 甲方应充分了解且同意遵守服务平台公布的所有协议、规则、制度等文件,并按照服务平台的相关规定处理相关交易事项。</p>
|
||||
<p>2.5 甲方应及时验收乙方交付的服务成果(包括阶段成果和最终成果),如乙方向甲方提交服务成果后在规定期限日内甲方未给出具体验收意见的,视为乙方提交的服务成果合格。如有下一阶段服务的,乙方有权继续推进;如下一阶段服务因甲方原因导致无法继续推进的,乙方不承担任何责任。</p>
|
||||
<p>2.6 甲方有义务向乙方提供必要的配合义务,包括提供必要资料、及时验收、及时回复等。</p>
|
||||
<p><strong>2.7 甲方同意并知晓,乙方仅提供合法、合规、合理的服务,对甲方违背法律法规或行政规章的服务要求,乙方有权拒绝提供服务。</strong></p>
|
||||
<p><strong>2.8 甲方应当保证委托的服务事项不违反任何法律法规或侵犯他人合法权利,否则乙方有权拒绝提供服务并有权立即解除本协议。</strong></p>
|
||||
<p><strong>2.9 甲方应当保证合法使用乙方提交的服务成果,不得将服务成果用于任何违法违规或侵犯他人合法权益的活动,甲方应自行承担服务成果使用过程中发生的全部责任。</strong></p>
|
||||
<p><strong>2.10 甲方同意,为便于双方交易,本协议作为交易的主要内容和双方之间权利义务的根本性约定,具体服务项目、期限、金额等甲方在平台与乙方签订电子合同时在合同上予以标注,甲方对在合同中提供的所有信息的真实性负责。</strong></p>
|
||||
<p><strong>2.11 甲方在签订线下子合同时,应仔细确认所需要的服务内容、价格、数量、交付方式等信息。该信息将作为甲方的真实意思表示,甲方应对该等信息的法律后果承担责任。</strong></p>
|
||||
<p><strong>2.12 甲方理解并同意:签订线下合同时系统生成的订单信息是计算机信息系统根据乙方填写的内容自动生成的数据,仅是乙方发出的合同要约;甲方收到乙方的合同信息内容并确认签字后,合同生效。</strong></p>
|
||||
<p><strong>2.13 甲方同意并授权平台方保存其信息(包括但不限于注册信息)</strong></p>
|
||||
<h5 id="h5-3-"><a name="3. 乙方权利义务" className="reference-link"></a><span className="header-link octicon octicon-link"></span>3. 乙方权利义务</h5><p>3.1 乙方应按照合同约定的时间和质量向甲方提供服务。</p>
|
||||
<p>3.2 乙方应当积极听取甲方的修改意见,甲方提出合理需求且提出明确的修改意见的,乙方在提交服务成果后可提供修改服务,但超出合同约定内容的修改需求乙方有权拒绝。</p>
|
||||
<p>3.3 乙方应当对甲方提供的相关资料承担保密义务,除为履行本协议义务及法律规定外,不得向第三方透露。</p>
|
||||
<p>3.4 乙方有权要求甲方按照合同约定的日期支付相应款项,否则乙方有权拒绝、顺延提供服务和不发起项目验收;</p>
|
||||
<p>3.5 甲方与乙方约定分阶段工作的,乙方完成阶段性工作并发起验收,甲方应在规定期限日内予以验收确认,验收合格后乙方有权要求甲方支付下一开发阶段的项目启动资金;如甲方在规定期限日内未予以验收的,则视为验收合格。</p>
|
||||
<p>3.6 在双方签订的合同生效后,乙方有权要求甲方先支付阶段性工作的项目启动资金进行托管后,再进行工作。</p>
|
||||
<p>3.7 因乙方自身原因导致约定分阶段工作未能如期完成并交付,则乙方需要与甲方提前协商沟通,并在汇新云平台上发起项目延期函,甲方进行确认后方可生效。若乙方未提前发起项目延期函并与甲方确认,否则乙方需按照约定的日期进行交付,由此产生的责任由乙方自行承担。</p>
|
||||
<p>3.8 乙方应按照法律规定自行缴纳相应税费。</p>
|
||||
<p>3.9 乙方可能会向实现甲方需求所必须的关联方或合作伙伴共享甲方的订单信息,以保障为甲方提供的服务顺利进行。比如乙方必须将甲方的订单信息与第三方服务商共享来实现甲方的服务需求,并使其完成后续的售后服务,甲方对此无异议。</p>
|
||||
<p>3.10 乙方应将平台方公布的最新信息传递给甲方,维护三方合作关系。</p>
|
||||
<p>3.11 乙方对服务中产生的因己方原因造成的甲方损失负有责任,应负责解决;若因此对平台造成损失的,乙方应赔偿平台方全部损失。</p>
|
||||
<h5 id="h5-4-"><a name="4.服务平台方权利义务" className="reference-link"></a><span className="header-link octicon octicon-link"></span>4.服务平台方权利义务</h5><p>4.1 平台方对甲乙双方的注册申请有审核决定的权利;</p>
|
||||
<p>4.2 平台方享有为维护系统而短暂停止服务的权利,暂停服务之前,平台方将在系统进行通知,甲乙双方应留意公告并做好相应备份工作。</p>
|
||||
<p>4.3 平台方有权根据中国法律法规的调整、行政执法机关的命令和社会伦理道德的变化相应调整在线管理服务的审核标准,甲乙双方不得以类似“以前曾通过汇新云服务审核”的理由要求平台方继续审核通过;</p>
|
||||
<p>4.4 乙方使用服务平台的账号密码所进行的一切操作视为乙方行为。乙方应妥善平台的账号密码,否则由此造成的一切后果由乙方承担;一旦发生安全问题应立即通知平台方以共同采取措施包括但不限于冻结账号等。</p>
|
||||
<p>4.5 平台方有权根据自身需求改变平台服务规则,并在服务平台进行公告;</p>
|
||||
<p>4.6 若乙方超过90天不使用平台账号的,平台方有权屏蔽或注销其账号。</p>
|
||||
<h5 id="h5-5-"><a name="5. 知识产权" className="reference-link"></a><span className="header-link octicon octicon-link"></span>5. 知识产权</h5><p>5.1 本协议所产生成果的知识产权在甲方支付完全部项目款后,归甲方所有,乙方或乙方委托提供服务的第三方保留法律规定禁止转让部分的知识产权,同时保留服务成果用于案例展示、评选的权利。但甲方与乙方另有约定的除外。</p>
|
||||
<p>5.2 乙方应当保证服务成果符合国家法律法规的规定,不存在任何侵犯第三方的所有权、知识产权、名誉权、肖像权等侵权行为,并承担因此产生的全部责任。</p>
|
||||
<p>5.3 甲方的服务需求如需采购第三方知识产权产品的,乙方应当及时告知甲方经甲方书面同意且支付采购费用后,乙方予以采购并使用或由甲方自行采购并提供给乙方使用。</p>
|
||||
<p>5.4 甲方在未付清所有服务费用之前,不得使用服务成果,不得主张服务成果的知识产权。如甲方在未付清服务费用之前自行或许可他人使用(包含但不限于直接使用、修改后使用)乙方提交的服务成果的,导致乙方或者其他第三方遭受损失的,甲方应承担由此产生的全部责任。</p>
|
||||
<p>5.5 甲方应积极就服务成果申请相关知识产权(如有),如发生第三方侵权的,乙方可协助甲方维权,但不对维权结果承担任何责任。</p>
|
||||
<ol>
|
||||
<li>责任限制</li></ol>
|
||||
<p>乙方依照法律规定履行基础保障义务,但对于下述原因导致的合同履行障碍、履行瑕疵、履行延后或履行内容变更等情形,乙方并不承担相应的违约责任:</p>
|
||||
<p>6、因自然灾害、罢工、暴乱、战争、政府行为、司法行政命令等不可抗力因素;</p>
|
||||
<p>6、因电力供应故障、通讯网络故障等公共服务因素或第三人因素;</p>
|
||||
<p>6、在乙方已尽善意管理的情况下,因常规或紧急的设备与系统维护、设备与系统故障、网络信息与数据安全等因素。</p>
|
||||
<ol>
|
||||
<li>违约责任</li></ol>
|
||||
<p>7.1 乙方未按照合同的约定按时提交服务成果的,应向甲方支付合同中规定的违约金。</p>
|
||||
<p>7.2 甲方在服务期间无正当理由单方终止协议的,已支付费用无权要求返还。</p>
|
||||
<p>7.3 乙方在服务期间无正当理由单方终止协议的,所收取的费用应当全部退回给甲方。</p>
|
||||
<p>7.4 甲乙双方应遵守平台规则以及维护平台商业形象以及维护平台方正常运营,若因甲乙双方任何一方的原因给平台方造成损失的,平台方有权追究其责任,要求其支付违约金,并有权冻结其享有的平台账号;若平台方以法律手段维护其权益的,平台方所支付的全部费用,包括但不限于律师费、诉讼费等,全部由违约方承担。</p>
|
||||
<ol>
|
||||
<li>争议解决</li></ol>
|
||||
<p>8.1 因本协议及与本协议有关的争议、解释等,均适用中华人民共和国法律。</p>
|
||||
<p>8.2 本协议签订或履行过程中,如有争议,双方应当友好协商解决;协商不成,双方一致同意提交平台方所在地人民法院解决。</p>
|
||||
<ol>
|
||||
<li>其他</li></ol>
|
||||
<p>9.1 本协议以电子文本形式生成,甲方与乙方完成协议订立手续后,即具有与手写签名同等的法律效力。</p>
|
||||
<p>9.2 本协议中的任何约定如违反法律法规的规定而无效的,该无效条款不影响本协议其他条款的效力,甲方与乙方仍因履行其他条款所约定的权利义务。</p>
|
||||
<p>9.3 本协议内容中以加粗方式显著标识的条款,请着重阅读。甲乙方点击“确认”按钮即视为完全接受本协议,在点击之前请再次确认已知悉并完全理解本协议的全部内容</p>
|
||||
</div>
|
||||
|
||||
<div className="new_li markdown-body editormd-html-preview" id="agreement_content" style={{ boxSizing: "border-box", padding: "0px 20px" }} dangerouslySetInnerHTML={{ __html: applyContent.content }}></div>
|
||||
<div className="mt5 mb10 pl20 pr20 ml15">
|
||||
<input type="checkbox" name="agreements" value="1" className="magic-checkbox" id="agreements" />
|
||||
<label htmlFor="agreements" className="color-grey-6">我已阅读并同意本电子协议内容</label>
|
||||
<Checkbox checked={agreementCheckBox} onChange={(e) => { setAgreementCheckBox(e.target.checked) }}>我已阅读并同意本电子协议内容</Checkbox>
|
||||
</div>
|
||||
</Modal>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
)
|
||||
|
|
|
@ -9,6 +9,7 @@ import { httpUrl } from '../../fetch';
|
|||
import { getTaskDetail, addTask, updateTask, getTaskCategory } from '../api';
|
||||
import { formItemLayout, formModalLayout } from '../static';
|
||||
import './index.scss';
|
||||
import { number } from 'prop-types';
|
||||
|
||||
const { info } = Modal;
|
||||
|
||||
|
@ -18,7 +19,7 @@ if (window.location.href.indexOf('localhost') > -1) {
|
|||
}
|
||||
|
||||
function getSomeDayAfter(nDay) {
|
||||
return moment(new Date().setDate(new Date().getDate() + nDay)).format('YYYY-MM-DD HH:mm:ss');
|
||||
return moment(new Date().setDate(new Date().getDate() + nDay)).format('YYYY-MM-DD HH:mm');
|
||||
}
|
||||
|
||||
export default Form.create()(forwardRef(({ current_user, form, showNotification, match, history }, ref) => {
|
||||
|
@ -45,7 +46,7 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
const [isSend, setIsSend] = useState(false) // 是否发送验证码
|
||||
|
||||
const id = match.params.taskId;
|
||||
const { getFieldDecorator, validateFields, setFieldsValue, } = form;
|
||||
const { getFieldDecorator, validateFields, setFieldsValue, getFieldsValue } = form;
|
||||
|
||||
// 根据是否传id判断是新增还是修改
|
||||
useEffect(() => {
|
||||
|
@ -95,7 +96,7 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
let formValue = {
|
||||
taskModeId: 1,
|
||||
collectionMode: 1,
|
||||
publishMode: 0,
|
||||
publishMode: '0',
|
||||
collectingDays: 30,
|
||||
choosingDays: 15,
|
||||
makePublicDays: 7,
|
||||
|
@ -172,9 +173,9 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
{getFieldDecorator(name, { rules, validateFirst: true, })(widget)}
|
||||
</Form.Item>
|
||||
<span className="days-word color-grey-9 ">天</span>
|
||||
{publishMode == 1 && <span>{displayTime}</span>}
|
||||
{publishMode == '0' && <p className="display-time">{displayTime}</p>}
|
||||
</div>
|
||||
), []);
|
||||
), [publishMode]);
|
||||
|
||||
function changeHtml(html) {
|
||||
setFieldsValue({
|
||||
|
@ -186,10 +187,10 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
// 新增或者修改后的处理函数
|
||||
const publishDeal = useCallback((status, publishMode, res) => {
|
||||
if (res && res.data) {
|
||||
showNotification("需求保存成功!");
|
||||
showNotification("任务保存成功!");
|
||||
if (!status) {
|
||||
history.push("/task/myTask?published=false")
|
||||
} else if (publishMode == 1) {
|
||||
} else if (publishMode == '1') {
|
||||
info({
|
||||
title: '提示',
|
||||
content: <div>
|
||||
|
@ -227,12 +228,12 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
// 编辑
|
||||
params.id = id;
|
||||
updateTask(params).then(res => {
|
||||
publishDeal(res);
|
||||
publishDeal(status, publishMode, res);
|
||||
});
|
||||
} else {
|
||||
// 新增
|
||||
addTask(params).then(res => {
|
||||
publishDeal(res);
|
||||
publishDeal(status, publishMode, res);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -240,15 +241,18 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
}
|
||||
|
||||
function changeDate(v, field) {
|
||||
validateFields((error, values) => {
|
||||
let collectingTime = getSomeDayAfter(values.collectingDays);
|
||||
let choosingTime = getSomeDayAfter(values.collectingDays + values.choosingDays);
|
||||
let makePublicTime = getSomeDayAfter(values.collectingDays + values.choosingDays + values.makePublicDays);
|
||||
let signingTime = getSomeDayAfter(values.collectingDays + values.choosingDays + values.makePublicDays + values.signingDays);
|
||||
let payingTime = getSomeDayAfter(values.collectingDays + values.choosingDays + values.makePublicDays + values.signingDays + values.payingDays);
|
||||
if (typeof v !== 'number' || v < 0) {
|
||||
return;
|
||||
}
|
||||
let values = getFieldsValue();
|
||||
values[field] = v;
|
||||
let collectingTime = getSomeDayAfter(values.collectingDays);
|
||||
let choosingTime = getSomeDayAfter(values.collectingDays + values.choosingDays);
|
||||
let makePublicTime = getSomeDayAfter(values.collectingDays + values.choosingDays + values.makePublicDays);
|
||||
let signingTime = getSomeDayAfter(values.collectingDays + values.choosingDays + values.makePublicDays + values.signingDays);
|
||||
let payingTime = getSomeDayAfter(values.collectingDays + values.choosingDays + values.makePublicDays + values.signingDays + values.payingDays);
|
||||
|
||||
setDisplayTime({ collectingTime, choosingTime, makePublicTime, signingTime, payingTime });
|
||||
})
|
||||
setDisplayTime({ collectingTime, choosingTime, makePublicTime, signingTime, payingTime });
|
||||
}
|
||||
|
||||
return (
|
||||
|
@ -256,9 +260,9 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
<div className="head-navigation">
|
||||
<Link to="/task">创客空间 ></Link>
|
||||
<Link to="/task">任务大厅 ></Link>
|
||||
<span >发布需求 </span>
|
||||
<span >发布任务 </span>
|
||||
</div>
|
||||
<p className="font-18 font-bd mb15">任务需求提交</p>
|
||||
<p className="font-18 font-bd mb15">任务提交</p>
|
||||
|
||||
<div className="edu-back-white mb30">
|
||||
<div className="padding30 bor-bottom-greyE">
|
||||
|
@ -294,14 +298,14 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
</div>
|
||||
|
||||
<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>
|
||||
<span>
|
||||
<a href="http://117.50.100.12:8000/attachments/download/523/%E5%88%9B%E5%AE%A2%E4%BB%BB%E5%8A%A1%E5%88%97%E8%A1%A8_2019-07-26_20-53.xlsx" className="icon icon-attachment font-13 color-blue" length="32" target="_blank">创客任务列表_2019-07-26_20-53.xlsx</a>
|
||||
</span><span className="color-grey-9 ml5 font-12 ">点击下载示例模版</span>
|
||||
</p>
|
||||
|
||||
<div className="pl15">
|
||||
<p className="color-grey3 mb20">选择需求所在领域</p>
|
||||
<p className="color-grey3 mb20">选择任务所在领域</p>
|
||||
|
||||
<div className="mb20 clearfix areaDiv" >
|
||||
{
|
||||
|
@ -318,7 +322,8 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
{helper(
|
||||
"",
|
||||
"name",
|
||||
[{ required: true, message: "请用一句话概括您要做什么?比如:开源项目网站开发,最大限制60个字符" }],
|
||||
[{ required: true, message: "请用一句话概括您要做什么?比如:开源项目网站开发,最大限制60个字符" },
|
||||
{ max: 60, message: '长度不能超过60个字符' }],
|
||||
<Input
|
||||
placeholder="请用一句话概括您要做什么?比如:开源项目网站开发,最大限制60个字符"
|
||||
/>
|
||||
|
@ -329,7 +334,7 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
value={description}
|
||||
config={
|
||||
{
|
||||
placeholder: "把您的需求内容补充详细一些吧,越清晰具体,任务完成质量越高哟~",
|
||||
placeholder: "把您的任务内容补充详细一些吧,越清晰具体,任务完成质量越高哟~",
|
||||
uploadImgServer: actionUrl + '/busiAttachments/upload',
|
||||
uploadFileName: 'file',
|
||||
uploadImgHeaders: {
|
||||
|
@ -352,14 +357,14 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
/>
|
||||
{/* 用一个隐藏的input实现上必填校验 */}
|
||||
{getFieldDecorator('description', {
|
||||
rules: [{ required: true, message: "把您的需求内容补充详细一些吧,越清晰具体,任务完成质量越高哟~" }],
|
||||
rules: [{ required: true, message: "把您的任务内容补充详细一些吧,越清晰具体,任务完成质量越高哟~" }],
|
||||
validateFirst: true
|
||||
})(<Input style={{ display: 'none' }} />)}
|
||||
</Form.Item>
|
||||
|
||||
<p className="color-grey3 mb10 mt20">
|
||||
<span className="color-orange mr2 ">*</span>
|
||||
注:需求发布之后,将会公开展示在交易中心。不要把与项目、客户相关等隐私信息,以及QQ号、微信号、电话号码等联系方式填写在需求中。
|
||||
注:任务发布之后,将会公开展示在交易中心。不要把与项目、客户相关等隐私信息,以及QQ号、微信号、电话号码等联系方式填写在任务中。
|
||||
</p>
|
||||
|
||||
<Form.Item >
|
||||
|
@ -394,9 +399,9 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
)}
|
||||
|
||||
{helper(
|
||||
"赏金分配:",
|
||||
"悬赏模式:",
|
||||
"taskModeId",
|
||||
[{ required: true, message: "请选择赏金分配" }],
|
||||
[{ required: true, message: "请选择悬赏模式" }],
|
||||
<Radio.Group>
|
||||
<Radio value={1}>单人悬赏,只设置一个中标者</Radio>
|
||||
<Radio value={2}>多人悬赏,设置多分中标分享赏金</Radio>
|
||||
|
@ -407,7 +412,7 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
{helper(
|
||||
"征集方式:",
|
||||
"collectionMode",
|
||||
[{ required: true, message: "请选择赏金分配" }],
|
||||
[{ required: true, message: "请选择征集方式" }],
|
||||
<Radio.Group>
|
||||
<Radio value={1}>创意征集,应征者以开放讨论的形式参与</Radio>
|
||||
<Radio value={0}>物化成果征集,应征者以各自提交成果物的形式参与</Radio>
|
||||
|
@ -417,10 +422,10 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
{helper(
|
||||
"发布方式:",
|
||||
"publishMode",
|
||||
[{ required: true, message: "请选择赏金分配" }],
|
||||
[{ required: true, message: "请选择发布方式" }],
|
||||
<Radio.Group onChange={(e) => { setPublishMode(e.target.value) }}>
|
||||
<Radio value={0}>自主提交方式,由发布方自行支付赏金,一键自助发布</Radio>
|
||||
<Radio value={1}>统筹任务,由平台支付赏金,需经过平台遴选方能发布</Radio>
|
||||
<Radio value={'0'}>自主提交方式,由发布方自行支付赏金,一键自助发布</Radio>
|
||||
<Radio value={'1'}>统筹任务,由平台支付赏金,需经过平台遴选方能发布</Radio>
|
||||
</Radio.Group>
|
||||
)}
|
||||
|
||||
|
@ -436,8 +441,10 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
"collectingDays",
|
||||
[{ required: true, message: "请输入天数" }],
|
||||
<InputNumber
|
||||
onChange={(v) => { changeDate(v, 'collectingDays') }}
|
||||
className="date-input"
|
||||
onChange={(v) => { changeDate(v, 'collectingDays') }}
|
||||
min={0}
|
||||
max={180}
|
||||
/>,
|
||||
displayTime.collectingTime
|
||||
)}
|
||||
|
@ -450,6 +457,9 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
[{ required: true, message: "请输入天数" }],
|
||||
<InputNumber
|
||||
className="date-input"
|
||||
onChange={(v) => { changeDate(v, 'choosingDays') }}
|
||||
min={0}
|
||||
max={180}
|
||||
/>,
|
||||
displayTime.choosingTime
|
||||
)}
|
||||
|
@ -460,6 +470,9 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
[{ required: true, message: "请输入天数" }],
|
||||
<InputNumber
|
||||
className="date-input"
|
||||
onChange={(v) => { changeDate(v, 'makePublicDays') }}
|
||||
min={0}
|
||||
max={180}
|
||||
/>,
|
||||
displayTime.makePublicTime
|
||||
)}
|
||||
|
@ -470,6 +483,9 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
[{ required: true, message: "请输入天数" }],
|
||||
<InputNumber
|
||||
className="date-input"
|
||||
onChange={(v) => { changeDate(v, 'signingDays') }}
|
||||
min={0}
|
||||
max={180}
|
||||
/>,
|
||||
displayTime.signingTime
|
||||
)}
|
||||
|
@ -480,6 +496,9 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
[{ required: true, message: "请输入天数" }],
|
||||
<InputNumber
|
||||
className="date-input"
|
||||
onChange={(v) => { changeDate(v, 'payingDays') }}
|
||||
min={0}
|
||||
max={180}
|
||||
/>,
|
||||
displayTime.payingTime
|
||||
)}
|
||||
|
|
|
@ -130,10 +130,17 @@
|
|||
|
||||
.no-label {
|
||||
display: inline-block;
|
||||
margin-bottom: 0;
|
||||
.ant-form-explain {
|
||||
position: absolute;
|
||||
white-space: nowrap;
|
||||
bottom: -40px;
|
||||
}
|
||||
}
|
||||
.display-time{
|
||||
position: relative;
|
||||
top:-6px;
|
||||
}
|
||||
.days-word {
|
||||
line-height: 40px;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React, { useEffect, useState } from 'react';
|
||||
import { Pagination, Input, Button } from 'antd';
|
||||
import { Input, Button } from 'antd';
|
||||
import moment from 'moment';
|
||||
import ChooseNav from '../../components/chooseNav';
|
||||
import SortBox from '../../components/sortBox';
|
||||
|
@ -79,7 +79,6 @@ export default ({ history, current_user }) => {
|
|||
}
|
||||
|
||||
function changeSort(sortType) {
|
||||
console.log(sortType);
|
||||
let sortValue = '';
|
||||
if (sortType.type !== 'default') {
|
||||
if (sortType.desc) {
|
||||
|
@ -160,7 +159,7 @@ export default ({ history, current_user }) => {
|
|||
onSearch={(value) => setSearchInput(value)}
|
||||
/>
|
||||
|
||||
<Button className="mr20 font-12" type="primary" onClick={goAdd}><i className="iconfont icon-zaibianji font-12 mr3"></i>发布需求</Button>
|
||||
<Button className="mr20 font-12" type="primary" onClick={goAdd}><i className="iconfont icon-zaibianji font-12 mr3"></i>发布任务</Button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue