forked from Gitlink/forgeplus-react
修改延期时间显示
This commit is contained in:
parent
fa80b5d1df
commit
8efbea44ab
|
@ -7153,7 +7153,8 @@
|
|||
"ansi-regex": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
|
||||
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
|
||||
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=",
|
||||
"optional": true
|
||||
},
|
||||
"aproba": {
|
||||
"version": "1.2.0",
|
||||
|
@ -7174,12 +7175,14 @@
|
|||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
|
||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
||||
"optional": true
|
||||
},
|
||||
"brace-expansion": {
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
|
@ -7194,17 +7197,20 @@
|
|||
"code-point-at": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
|
||||
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
|
||||
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=",
|
||||
"optional": true
|
||||
},
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
||||
"optional": true
|
||||
},
|
||||
"console-control-strings": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
|
||||
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4="
|
||||
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",
|
||||
"optional": true
|
||||
},
|
||||
"core-util-is": {
|
||||
"version": "1.0.2",
|
||||
|
@ -7321,7 +7327,8 @@
|
|||
"inherits": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
||||
"optional": true
|
||||
},
|
||||
"ini": {
|
||||
"version": "1.3.5",
|
||||
|
@ -7333,6 +7340,7 @@
|
|||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
|
||||
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"number-is-nan": "^1.0.0"
|
||||
}
|
||||
|
@ -7347,6 +7355,7 @@
|
|||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
|
@ -7354,12 +7363,14 @@
|
|||
"minimist": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
|
||||
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
|
||||
"integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
|
||||
"optional": true
|
||||
},
|
||||
"minipass": {
|
||||
"version": "2.9.0",
|
||||
"resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz",
|
||||
"integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"safe-buffer": "^5.1.2",
|
||||
"yallist": "^3.0.0"
|
||||
|
@ -7378,6 +7389,7 @@
|
|||
"version": "0.5.3",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.3.tgz",
|
||||
"integrity": "sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"minimist": "^1.2.5"
|
||||
}
|
||||
|
@ -7439,7 +7451,8 @@
|
|||
"npm-normalize-package-bin": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz",
|
||||
"integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA=="
|
||||
"integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==",
|
||||
"optional": true
|
||||
},
|
||||
"npm-packlist": {
|
||||
"version": "1.4.8",
|
||||
|
@ -7467,7 +7480,8 @@
|
|||
"number-is-nan": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
|
||||
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
|
||||
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=",
|
||||
"optional": true
|
||||
},
|
||||
"object-assign": {
|
||||
"version": "4.1.1",
|
||||
|
@ -7479,6 +7493,7 @@
|
|||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
|
@ -7556,7 +7571,8 @@
|
|||
"safe-buffer": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==",
|
||||
"optional": true
|
||||
},
|
||||
"safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
|
@ -7592,6 +7608,7 @@
|
|||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
|
||||
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"code-point-at": "^1.0.0",
|
||||
"is-fullwidth-code-point": "^1.0.0",
|
||||
|
@ -7611,6 +7628,7 @@
|
|||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
|
||||
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"ansi-regex": "^2.0.0"
|
||||
}
|
||||
|
@ -7654,12 +7672,14 @@
|
|||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
|
||||
"optional": true
|
||||
},
|
||||
"yallist": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
|
||||
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
|
||||
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -147,23 +147,23 @@ export default Form.create()(
|
|||
let surplusTimetext = '';
|
||||
let surplus = detailData.collectingDays * 24 * 3600 - (new Date() - new Date(detailData.publishedAt || detailData.createdAt)) / 1000;
|
||||
if (detailData.status === status) {
|
||||
if (status >= 4) {
|
||||
surplus += detailData.choosingDays * 24 * 3600;
|
||||
if (status === 4) {
|
||||
surplus = detailData.choosingDays * 24 * 3600 - (new Date() - new Date(detailData.collectingCompleteAt)) / 1000;
|
||||
}
|
||||
if (status >= 5) {
|
||||
if (status === 5) {
|
||||
surplus = detailData.makePublicDays * 24 * 3600 - (new Date() - new Date(detailData.makePublicAt)) / 1000;
|
||||
}
|
||||
if (status >= 6) {
|
||||
surplus += detailData.signingDays * 24 * 3600;
|
||||
if (status === 6) {
|
||||
surplus = detailData.signingDays * 24 * 3600 - (new Date() - new Date(detailData.publicityCompleteAt)) / 1000;
|
||||
}
|
||||
if (status >= 7) {
|
||||
surplus += detailData.payingDays * 24 * 3600;
|
||||
if (status === 7) {
|
||||
surplus = detailData.payingDays * 24 * 3600 - (new Date() - new Date(detailData.payingCompleteAt)) / 1000;
|
||||
}
|
||||
|
||||
surplusTimetext = formatDuring(surplus);
|
||||
}
|
||||
return (
|
||||
<li key={title} className={classNames({ active: (detailData.status !== 9 && detailData.status >= status) })} >
|
||||
<li key={title} className={classNames({ active: (detailData.status !== 9 && detailData.status >= status && (![4, 5, 6, 7].includes(status) || ([4, 5, 6, 7].includes(status) && (!detailData.exceptClosedBoolean)))) })} >
|
||||
<span>{title}</span>
|
||||
{detailData.status !== status && days && <p className="color-grey-6 font-12">{days}天</p>}
|
||||
|
||||
|
@ -329,35 +329,6 @@ export default Form.create()(
|
|||
window.location.href = `/users/${login}`;
|
||||
}
|
||||
|
||||
|
||||
// 第二种数据展示方式,暂时注释
|
||||
// const columns = useMemo(() => {
|
||||
// return [
|
||||
// {
|
||||
// title: '应征者姓名',
|
||||
// dataIndex: 'name',
|
||||
// render: (text, record) => {
|
||||
// return !detailData.showUserStatus && record.user ? (record.user.nickname || record.user.login) : '******'
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// title: '投稿时间',
|
||||
// dataIndex: 'createdAt',
|
||||
// },
|
||||
// {
|
||||
// title: '状态',
|
||||
// dataIndex: 'status',
|
||||
// render: (text, record) => {
|
||||
// return text === 2 ? <img alt="胜出" src={winpng} /> : applyStatusAllNameArr[text]
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// title: '详情',
|
||||
// dataIndex: 'detail',
|
||||
// },
|
||||
// ];
|
||||
// }, [detailData]);
|
||||
|
||||
function goUserProfiles() {
|
||||
window.open(`/users/${current_user.login}/profiles`);
|
||||
}
|
||||
|
@ -478,25 +449,6 @@ export default Form.create()(
|
|||
changeOptionId={changeOptionId}
|
||||
/>
|
||||
|
||||
{/* {
|
||||
// 第二种数据展示方式,暂时注释
|
||||
detailData.status > 6 ?
|
||||
<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>
|
||||
: */}
|
||||
<ItemListPaper
|
||||
current_user={current_user}
|
||||
list={dataList}
|
||||
|
|
|
@ -382,7 +382,7 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
"bounty",
|
||||
[{ required: true, message: "您打算支付多少赏金呢" }],
|
||||
<InputNumber
|
||||
min={0}
|
||||
min={1}
|
||||
max={99999999}
|
||||
className="number-input"
|
||||
placeholder="您打算支付多少赏金呢"
|
||||
|
@ -435,7 +435,7 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
<InputNumber
|
||||
className="date-input"
|
||||
onChange={(v) => { changeDate(v, 'collectingDays') }}
|
||||
min={0}
|
||||
min={1}
|
||||
max={180}
|
||||
/>,
|
||||
displayTime.collectingTime
|
||||
|
@ -450,7 +450,7 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
<InputNumber
|
||||
className="date-input"
|
||||
onChange={(v) => { changeDate(v, 'choosingDays') }}
|
||||
min={0}
|
||||
min={1}
|
||||
max={180}
|
||||
/>,
|
||||
displayTime.choosingTime
|
||||
|
@ -463,7 +463,7 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
<InputNumber
|
||||
className="date-input"
|
||||
onChange={(v) => { changeDate(v, 'makePublicDays') }}
|
||||
min={0}
|
||||
min={1}
|
||||
max={180}
|
||||
/>,
|
||||
displayTime.makePublicTime
|
||||
|
@ -476,7 +476,7 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
<InputNumber
|
||||
className="date-input"
|
||||
onChange={(v) => { changeDate(v, 'signingDays') }}
|
||||
min={0}
|
||||
min={1}
|
||||
max={180}
|
||||
/>,
|
||||
displayTime.signingTime
|
||||
|
@ -489,7 +489,7 @@ export default Form.create()(forwardRef(({ current_user, form, showNotification,
|
|||
<InputNumber
|
||||
className="date-input"
|
||||
onChange={(v) => { changeDate(v, 'payingDays') }}
|
||||
min={0}
|
||||
min={1}
|
||||
max={180}
|
||||
/>,
|
||||
displayTime.payingTime
|
||||
|
|
Loading…
Reference in New Issue