forked from Gitlink/forgeplus-react
Merge branch 'pre_dev_military' of http://106.75.45.236:3000/Gitlink/forgeplus-react into dev_military_admin
This commit is contained in:
commit
b5431907b5
|
@ -762,7 +762,7 @@
|
|||
},
|
||||
"abbrev": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/abbrev/-/abbrev-1.1.1.tgz",
|
||||
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
|
||||
"dev": true
|
||||
},
|
||||
|
@ -1364,7 +1364,7 @@
|
|||
},
|
||||
"axios": {
|
||||
"version": "0.24.0",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/axios/-/axios-0.24.0.tgz",
|
||||
"resolved": "https://registry.npmjs.org/axios/-/axios-0.24.0.tgz",
|
||||
"integrity": "sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==",
|
||||
"requires": {
|
||||
"follow-redirects": "^1.14.4"
|
||||
|
@ -7542,7 +7542,7 @@
|
|||
},
|
||||
"fstream": {
|
||||
"version": "1.0.12",
|
||||
"resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/fstream/-/fstream-1.0.12.tgz",
|
||||
"integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -7602,7 +7602,7 @@
|
|||
},
|
||||
"gaze": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/gaze/-/gaze-1.1.3.tgz",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/gaze/-/gaze-1.1.3.tgz",
|
||||
"integrity": "sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -8821,7 +8821,7 @@
|
|||
},
|
||||
"in-publish": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/in-publish/-/in-publish-2.0.1.tgz",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/in-publish/-/in-publish-2.0.1.tgz",
|
||||
"integrity": "sha512-oDM0kUSNFC31ShNxHKUyfZKy8ZeXZBWMjMdZHKLOk13uvT27VTL/QzRGfRUcevJhpkZAvlhPYuXkF7eNWrtyxQ==",
|
||||
"dev": true
|
||||
},
|
||||
|
@ -11101,7 +11101,7 @@
|
|||
},
|
||||
"node-gyp": {
|
||||
"version": "3.8.0",
|
||||
"resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/node-gyp/-/node-gyp-3.8.0.tgz",
|
||||
"integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -11196,7 +11196,7 @@
|
|||
},
|
||||
"node-sass": {
|
||||
"version": "4.14.1",
|
||||
"resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.14.1.tgz",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/node-sass/-/node-sass-4.14.1.tgz",
|
||||
"integrity": "sha512-sjCuOlvGyCJS40R8BscF5vhVlQjNN069NtQ1gSxyK1u9iqvn6tf7O1R4GNowVZfiZUCRt5MmMs1xd+4V/7Yr0g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -11290,7 +11290,7 @@
|
|||
},
|
||||
"npmlog": {
|
||||
"version": "4.1.2",
|
||||
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/npmlog/-/npmlog-4.1.2.tgz",
|
||||
"integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -11600,7 +11600,7 @@
|
|||
},
|
||||
"osenv": {
|
||||
"version": "0.1.5",
|
||||
"resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/osenv/-/osenv-0.1.5.tgz",
|
||||
"integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -16514,7 +16514,7 @@
|
|||
},
|
||||
"sass-graph": {
|
||||
"version": "2.2.5",
|
||||
"resolved": "https://registry.npmjs.org/sass-graph/-/sass-graph-2.2.5.tgz",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/sass-graph/-/sass-graph-2.2.5.tgz",
|
||||
"integrity": "sha512-VFWDAHOe6mRuT4mZRd4eKE+d8Uedrk6Xnh7Sh9b4NGufQLQjOrvf/MQoOdx+0s92L89FeyUUNfU597j/3uNpag==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -16532,13 +16532,13 @@
|
|||
},
|
||||
"camelcase": {
|
||||
"version": "5.3.1",
|
||||
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/camelcase/-/camelcase-5.3.1.tgz",
|
||||
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
|
||||
"dev": true
|
||||
},
|
||||
"cliui": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/cliui/-/cliui-5.0.0.tgz",
|
||||
"integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -16549,13 +16549,13 @@
|
|||
},
|
||||
"emoji-regex": {
|
||||
"version": "7.0.3",
|
||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/emoji-regex/-/emoji-regex-7.0.3.tgz",
|
||||
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
|
||||
"dev": true
|
||||
},
|
||||
"find-up": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/find-up/-/find-up-3.0.0.tgz",
|
||||
"integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -16564,13 +16564,13 @@
|
|||
},
|
||||
"get-caller-file": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/get-caller-file/-/get-caller-file-2.0.5.tgz",
|
||||
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
|
||||
"dev": true
|
||||
},
|
||||
"locate-path": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/locate-path/-/locate-path-3.0.0.tgz",
|
||||
"integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -16580,7 +16580,7 @@
|
|||
},
|
||||
"p-limit": {
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/p-limit/-/p-limit-2.3.0.tgz",
|
||||
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -16589,7 +16589,7 @@
|
|||
},
|
||||
"p-locate": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/p-locate/-/p-locate-3.0.0.tgz",
|
||||
"integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -16598,19 +16598,19 @@
|
|||
},
|
||||
"p-try": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/p-try/-/p-try-2.2.0.tgz",
|
||||
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
|
||||
"dev": true
|
||||
},
|
||||
"require-main-filename": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/require-main-filename/-/require-main-filename-2.0.0.tgz",
|
||||
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
|
||||
"dev": true
|
||||
},
|
||||
"string-width": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/string-width/-/string-width-3.1.0.tgz",
|
||||
"integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -16621,7 +16621,7 @@
|
|||
},
|
||||
"strip-ansi": {
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/strip-ansi/-/strip-ansi-5.2.0.tgz",
|
||||
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -16636,7 +16636,7 @@
|
|||
},
|
||||
"wrap-ansi": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
|
||||
"integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -16647,13 +16647,13 @@
|
|||
},
|
||||
"y18n": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/y18n/-/y18n-4.0.3.tgz",
|
||||
"integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==",
|
||||
"dev": true
|
||||
},
|
||||
"yargs": {
|
||||
"version": "13.3.2",
|
||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/yargs/-/yargs-13.3.2.tgz",
|
||||
"integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -16671,7 +16671,7 @@
|
|||
},
|
||||
"yargs-parser": {
|
||||
"version": "13.1.2",
|
||||
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/yargs-parser/-/yargs-parser-13.1.2.tgz",
|
||||
"integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -16683,7 +16683,7 @@
|
|||
},
|
||||
"sass-loader": {
|
||||
"version": "7.3.1",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/sass-loader/-/sass-loader-7.3.1.tgz",
|
||||
"resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-7.3.1.tgz",
|
||||
"integrity": "sha512-tuU7+zm0pTCynKYHpdqaPpe+MMTQ76I9TPZ7i4/5dZsigE350shQWe5EZNl5dBidM49TPET75tNqRbcsUZWeNA==",
|
||||
"requires": {
|
||||
"clone-deep": "^4.0.1",
|
||||
|
@ -16707,7 +16707,7 @@
|
|||
},
|
||||
"save-dev": {
|
||||
"version": "0.0.1-security",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/save-dev/-/save-dev-0.0.1-security.tgz",
|
||||
"resolved": "https://registry.npmjs.org/save-dev/-/save-dev-0.0.1-security.tgz",
|
||||
"integrity": "sha512-k6knZTDNK8PKKbIqnvxiOveJinuw2LcQjqDoaorZWP9M5AR2EPsnpDeSbeoZZ0pHr5ze1uoaKdK8NBGQrJ34Uw=="
|
||||
},
|
||||
"sax": {
|
||||
|
@ -17749,7 +17749,7 @@
|
|||
},
|
||||
"stdout-stream": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.1.tgz",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/stdout-stream/-/stdout-stream-1.4.1.tgz",
|
||||
"integrity": "sha512-j4emi03KXqJWcIeF8eIXkjMFN1Cmb8gUlDYGeBALLPo5qdyTfA9bOtl8m33lRoC+vFMkP3gl0WsDr6+gzxbbTA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -18291,7 +18291,7 @@
|
|||
},
|
||||
"tar": {
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/tar/-/tar-2.2.2.tgz",
|
||||
"integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
@ -18701,7 +18701,7 @@
|
|||
},
|
||||
"true-case-path": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.3.tgz",
|
||||
"resolved": "http://173.15.15.82:8081/repository/npm-all/true-case-path/-/true-case-path-1.0.3.tgz",
|
||||
"integrity": "sha512-m6s2OdQe5wgpFMC+pAJ+q9djG82O2jcHPOI6RNg1yy9rCYR+WD6Nbpl32fDpfC56nirdRy+opFa/Vk7HYhqaew==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
import React, { forwardRef, useState } from 'react';
|
||||
import { Upload , Icon , message } from "antd";
|
||||
import { getUploadActionUrl } from 'educoder';
|
||||
let chromeSettingArray = JSON.parse(localStorage.getItem('chromesetting'));
|
||||
|
||||
function UploadImage({ getImageId , imageId }){
|
||||
// 上传前
|
||||
function beforeUpload(file){
|
||||
const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';
|
||||
if (!isJpgOrPng) {
|
||||
message.error('上传的图片只能是JPG或者PNG格式!');
|
||||
}
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
if (!isLt2M) {
|
||||
message.error('上传的图片不能超过2MB!');
|
||||
}
|
||||
return isJpgOrPng && isLt2M;
|
||||
}
|
||||
// 上传完成后
|
||||
function handleChange(info){
|
||||
if(info && info.file && info.file.status === "done"){
|
||||
getImageId(info.file.response.id);
|
||||
}
|
||||
}
|
||||
|
||||
return(
|
||||
<Upload
|
||||
listType="picture-card"
|
||||
className="avatar-uploader"
|
||||
showUploadList={false}
|
||||
action={getUploadActionUrl()}
|
||||
accept=".png,.jpg,.jpeg"
|
||||
beforeUpload={beforeUpload}
|
||||
onChange={handleChange}
|
||||
>
|
||||
{
|
||||
imageId ? <img src={`${chromeSettingArray.current_main_site_url}/api/attachments/${imageId}`} alt="avatar" style={{ width: '100%' }} /> :
|
||||
<div>
|
||||
<Icon type={'plus'} />
|
||||
<div className="ant-upload-text">点击上传</div>
|
||||
</div>
|
||||
}
|
||||
</Upload>
|
||||
)
|
||||
}
|
||||
export default forwardRef(UploadImage);
|
|
@ -9,10 +9,10 @@ function Cards({img , title, desc , rightBtn , src , bottomInfos}){
|
|||
{img &&<div className="img"><img src={getImageUrl(`/${img}`)} alt=""/></div>}
|
||||
<div className="content">
|
||||
<p className="titles">
|
||||
<Link to={src}>{title}</Link>
|
||||
<a href={src} className='organizationName font-18'>{title}</a>
|
||||
{rightBtn}
|
||||
</p>
|
||||
<div className="desc">
|
||||
<div className="desc font-15 pr10">
|
||||
{desc}
|
||||
</div>
|
||||
{bottomInfos}
|
||||
|
|
|
@ -16,11 +16,9 @@ li.ant-menu-item{
|
|||
.cards{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding:20px 34px;
|
||||
padding:35px 30px;
|
||||
background-color: #fff;
|
||||
margin-bottom:18px;
|
||||
min-height: 130px;
|
||||
border:1px solid #eee;
|
||||
.img{
|
||||
margin-right: 20px;
|
||||
width: 190px;
|
||||
|
@ -41,13 +39,16 @@ li.ant-menu-item{
|
|||
.titles{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10px!important;
|
||||
margin-bottom: 15px!important;
|
||||
align-items: center;
|
||||
height: 22px;
|
||||
line-height: 22px;;
|
||||
&>a{
|
||||
font-size:18px ;
|
||||
color: #333;
|
||||
line-height: 22px;
|
||||
.organizationName{
|
||||
color: #1e2941;
|
||||
font-weight: 700;
|
||||
}
|
||||
.settingsLink{
|
||||
color:#104fd9;
|
||||
}
|
||||
}
|
||||
.desc{
|
||||
|
@ -56,7 +57,10 @@ li.ant-menu-item{
|
|||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
line-height: 20px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.bottomInfos{
|
||||
color:#67738e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
Binary file not shown.
After Width: | Height: | Size: 87 KiB |
Binary file not shown.
After Width: | Height: | Size: 873 B |
|
@ -12,6 +12,10 @@ import img_new from '../Images/new.png';
|
|||
import img_array from '../Images/array.png';
|
||||
import banner from '../Images/banner_list.png';
|
||||
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
import Slider from 'react-slick';
|
||||
import left from './img/left.png';
|
||||
import right from './img/right.png';
|
||||
import { getImageUrl } from '../../managements/common/utils';
|
||||
|
||||
const Search = Input.Search;
|
||||
|
||||
|
@ -27,18 +31,14 @@ class Index extends Component {
|
|||
total: 0,
|
||||
isSpin: true,
|
||||
category_id: undefined,
|
||||
|
||||
typeList: undefined,
|
||||
categoryList: undefined,
|
||||
recommendList:undefined,
|
||||
|
||||
recommendOriList:undefined,
|
||||
|
||||
languageList:undefined,
|
||||
languageId:undefined,
|
||||
|
||||
CategoryList:undefined
|
||||
|
||||
CategoryList:undefined,
|
||||
bannerList: undefined
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -46,18 +46,26 @@ class Index extends Component {
|
|||
componentDidMount = () => {
|
||||
const { page,search, sort,category_id , languageId } = this.state;
|
||||
this.getListData(page,search, sort,category_id , languageId);
|
||||
|
||||
this.getType();
|
||||
|
||||
this.getCategory();
|
||||
|
||||
// this.getRecommand();
|
||||
|
||||
this.getLanguage();
|
||||
|
||||
this.getBannerList();
|
||||
// this.getRecommandOri();
|
||||
}
|
||||
|
||||
// 获取banner图列表
|
||||
getBannerList = ()=>{
|
||||
const url = '/topics.json?topic_type=banner&limit=5';
|
||||
axios.get(url).then(result=>{
|
||||
if(result){
|
||||
this.setState({
|
||||
bannerList:result.data.topics
|
||||
})
|
||||
}
|
||||
}).catch(error=>{})
|
||||
}
|
||||
|
||||
// 获取语言列表
|
||||
getLanguage=()=>{
|
||||
const url = '/project_languages.json';
|
||||
|
@ -283,73 +291,82 @@ class Index extends Component {
|
|||
)
|
||||
}
|
||||
|
||||
render() {
|
||||
const { current_user } = this.props;
|
||||
|
||||
const { projectsList , recommendList , languageList , languageId ,
|
||||
isSpin, total, search, limit, page, typeList, categoryList ,
|
||||
recommendOriList , CategoryList , category_id } = this.state;
|
||||
render() {
|
||||
const { current_user, mygetHelmetapi} = this.props;
|
||||
|
||||
const { projectsList ,isSpin, total, search, limit, page, typeList, categoryList ,bannerList } = this.state;
|
||||
|
||||
let settings={
|
||||
dots:true,
|
||||
infinite: true,
|
||||
speed: 2000,
|
||||
slidesToShow: 1,
|
||||
slidesToScroll: 1,
|
||||
pauseOnDotsHover:true,
|
||||
autoplaySpeed:5000,
|
||||
pauseOnFocus:true,
|
||||
autoplay:true,
|
||||
arrows:true,
|
||||
prevArrow:<button type='button' class='changeImgBut'><img src={left} width="70px" alt=""/></button>,
|
||||
nextArrow:<button type='button' class='changeImgBut'><img src={right} width="70px" alt=""/></button>
|
||||
}
|
||||
|
||||
return (
|
||||
<div>
|
||||
<p className="t_project_banner">
|
||||
<img src={banner} width="100%" alt=""/>
|
||||
</p>
|
||||
{/* {
|
||||
recommendOriList && recommendOriList.length>0?
|
||||
<Slider {...settings} className="recommandOri">
|
||||
{
|
||||
recommendOriList.map((i,k)=>{
|
||||
return(
|
||||
<li><Link to={''}><img src={getImageUrl(`/${i.avatar_url}`)} alt={i.name} title={i.name} width="80px"/></Link></li>
|
||||
)
|
||||
})
|
||||
}
|
||||
</Slider>
|
||||
:""
|
||||
} */}
|
||||
{/* {
|
||||
recommendList && recommendList.length>0 &&
|
||||
<Slider {...setting} className={recommendList.length>5 ? "recommandProjects":"recommandProjects mb20"}>
|
||||
{
|
||||
recommendList.map((item,key)=>{
|
||||
return(
|
||||
<div className="items" onClick={()=>this.getoDetail(item.author && item.author.login,item.identifier)}>
|
||||
<div className="mainInfo">
|
||||
<img src={getImageUrl(`/${item.author && item.author.image_url}`)} width="50px" height="50px"alt=""/>
|
||||
<p className="school">{item.name}</p>
|
||||
<p className="name">{item.author && item.author.name}</p>
|
||||
</div>
|
||||
<div className="baseInfo">
|
||||
<span className="look"><i className="iconfont icon-dianjiliang font-12"></i>{item.visits}</span>
|
||||
<span className="type">{item.category && item.category.name}</span>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
})
|
||||
}
|
||||
</Slider>
|
||||
} */}
|
||||
{bannerList ? bannerList.length === 1 ? bannerList[0].url ? <a href={bannerList[0].url} target={'_blank'}><img alt={bannerList[0].title} src={bannerList[0].image ? `${ mygetHelmetapi && mygetHelmetapi.current_main_site_url }${bannerList[0].image}` : banner} width='100%' height='100%' className='imgBox'/></a> :
|
||||
<img alt={bannerList[0].title} src={bannerList[0].image ? `${ mygetHelmetapi && mygetHelmetapi.current_main_site_url }${bannerList[0].image}` : banner} width='100%' height='100%' className='imgBox'/> :
|
||||
<Slider {...settings} className="projectBannerBox">
|
||||
{bannerList.map((item) => {
|
||||
return item.url ? (
|
||||
<a href={item.url} target={'_blank'}>
|
||||
<img alt={item.title} src={item.image ? `${ mygetHelmetapi && mygetHelmetapi.current_main_site_url }${item.image}` : banner} width='100%' height='100%' className='imgBox'/>
|
||||
</a>
|
||||
) : <img src={item.image ? `${ mygetHelmetapi && mygetHelmetapi.current_main_site_url }${item.image}` : banner} alt="" width="100%" height='100%' className='imgBox'/>
|
||||
;
|
||||
})}
|
||||
</Slider>: <img src={banner} width="100%" alt=""/>}
|
||||
{bannerList && bannerList.length === 0 && <img src={banner} width="100%" alt=""/>}
|
||||
<div className="ProjectListIndex">
|
||||
|
||||
<Affix className="affix-list-left" offsetTop={90}>
|
||||
<div className="affix-list-content">
|
||||
<ul className="list-l-Menu">
|
||||
<li className="MenuTitle" onClick={() => {this.getType();this.changeType(undefined, this.state.typeList);}}>
|
||||
<span><i className="iconfont icon-bianchengyuyan color-grey-9 font-15 mr5"></i>
|
||||
语言</span></li>
|
||||
<div className="list-affix">{typeList}</div>
|
||||
</ul>
|
||||
<ul className="list-l-Menu">
|
||||
<li className="MenuTitle" onClick={() => {this.getCategory();this.changeCategory(undefined, this.state.categoryList);}}>
|
||||
<span><i className="iconfont icon-xiangmuleibie color-grey-9 font-15 mr5"></i>项目类别</span>
|
||||
</li>
|
||||
<div className="list-affix">{categoryList}</div>
|
||||
</ul>
|
||||
</div>
|
||||
<Affix className="affix-list-left" offsetTop={90}>
|
||||
<div className="affix-list-content">
|
||||
<ul className="list-l-Menu">
|
||||
<li
|
||||
className="MenuTitle"
|
||||
onClick={() => {
|
||||
this.getType();
|
||||
this.changeType(undefined, this.state.typeList);
|
||||
}}
|
||||
>
|
||||
<span>
|
||||
<i className="iconfont icon-bianchengyuyan color-grey-9 font-15 mr5"></i>
|
||||
语言
|
||||
</span>
|
||||
</li>
|
||||
<div className="list-affix">{typeList}</div>
|
||||
</ul>
|
||||
<ul className="list-l-Menu">
|
||||
<li
|
||||
className="MenuTitle"
|
||||
onClick={() => {
|
||||
this.getCategory();
|
||||
this.changeCategory(undefined, this.state.categoryList);
|
||||
}}
|
||||
>
|
||||
<span>
|
||||
<i className="iconfont icon-xiangmuleibie color-grey-9 font-15 mr5"></i>
|
||||
项目类别
|
||||
</span>
|
||||
</li>
|
||||
<div className="list-affix">{categoryList}</div>
|
||||
</ul>
|
||||
</div>
|
||||
</Affix>
|
||||
|
||||
<div className="list-right boxShandow radius-2" style={{padding:0}}>
|
||||
<div
|
||||
className="list-right boxShandow radius-2"
|
||||
style={{ padding: 0 }}
|
||||
>
|
||||
<Spin spinning={isSpin}>
|
||||
<div className="list-r-operation">
|
||||
<div>
|
||||
|
@ -364,35 +381,47 @@ class Index extends Component {
|
|||
/>
|
||||
</div>
|
||||
<div>
|
||||
{
|
||||
current_user && current_user.login &&
|
||||
{current_user && current_user.login && (
|
||||
<Popover
|
||||
overlayClassName="newPopUl"
|
||||
content={this.newItem()}
|
||||
trigger={["click"]}
|
||||
placement='bottom'
|
||||
overlayClassName="newPopUl"
|
||||
content={this.newItem()}
|
||||
trigger={["click"]}
|
||||
placement="bottom"
|
||||
className="mr50"
|
||||
>
|
||||
<a className="ant-dropdown-link">
|
||||
<span className="color-blue font-16"><img src={img_new} alt="" width="13px" /> 新建</span>
|
||||
<span className="color-blue font-16">
|
||||
<img src={img_new} alt="" width="13px" /> 新建
|
||||
</span>
|
||||
</a>
|
||||
</Popover>
|
||||
}
|
||||
)}
|
||||
|
||||
<Popover content={this.menu()} trigger={['click']} placement='bottom'>
|
||||
<Popover
|
||||
content={this.menu()}
|
||||
trigger={["click"]}
|
||||
placement="bottom"
|
||||
>
|
||||
<a className="ant-dropdown-link">
|
||||
<span className="color-blue font-16">排序 <img src={img_array} alt="" width="10px" /></span>
|
||||
<span className="color-blue font-16">
|
||||
排序 <img src={img_array} alt="" width="10px" />
|
||||
</span>
|
||||
</a>
|
||||
</Popover>
|
||||
</div>
|
||||
</div>
|
||||
<ListItem {...this.props} {...this.state} projects={projectsList} getListData={this.getListData}></ListItem>
|
||||
{this.pagination(total,limit,page)}
|
||||
<ListItem
|
||||
{...this.props}
|
||||
{...this.state}
|
||||
projects={projectsList}
|
||||
getListData={this.getListData}
|
||||
></ListItem>
|
||||
{this.pagination(total, limit, page)}
|
||||
</Spin>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
export default Index;
|
||||
|
|
|
@ -524,3 +524,58 @@
|
|||
}
|
||||
}
|
||||
|
||||
.projectBannerBox{
|
||||
.imgBox{
|
||||
max-height: 250px;
|
||||
}
|
||||
.slick-arrow{
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
z-index: 2;
|
||||
&::before{content: none;}
|
||||
&.slick-prev{left: 50px;}
|
||||
&.slick-next{right: 50px;}
|
||||
}
|
||||
.slick-dots{
|
||||
width: 1200px;
|
||||
left: 50%;
|
||||
margin-left: -600px;
|
||||
bottom: 7%;
|
||||
position: absolute;
|
||||
display: flex!important;
|
||||
justify-content: center;
|
||||
z-index: 2;
|
||||
li{
|
||||
background-color: rgba(225,225,225,0.5);
|
||||
position: relative;
|
||||
height: 3px;
|
||||
width: 46px;
|
||||
margin-right: 15px;
|
||||
&::after{
|
||||
position: absolute;
|
||||
left: 0px;
|
||||
width: 0px;
|
||||
top:0px;
|
||||
height: 100%;
|
||||
content: "";
|
||||
transition: 5.2s;
|
||||
transition-property: width;
|
||||
}
|
||||
&.slick-active::after{
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
}
|
||||
button{
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 10px;
|
||||
left:0px;
|
||||
background-color: transparent!important;
|
||||
border:none;
|
||||
cursor: pointer;
|
||||
color: transparent;
|
||||
&::before{content: none;}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 1018 B |
Binary file not shown.
After Width: | Height: | Size: 1018 B |
|
@ -42,7 +42,7 @@ export default (props)=>{
|
|||
active
|
||||
}
|
||||
return(
|
||||
<Box>
|
||||
<Box className="mt20">
|
||||
<Short>
|
||||
<Setnav header={<Title>团队设置</Title>} nav={array}></Setnav>
|
||||
</Short>
|
||||
|
|
|
@ -39,6 +39,45 @@
|
|||
width: 1200px;
|
||||
margin:0px auto;
|
||||
padding-top:18px;
|
||||
.newsAndTrends{
|
||||
.contentNews{
|
||||
padding-bottom: 35px;
|
||||
line-height: 1.5;
|
||||
color:#26314d;
|
||||
}
|
||||
.newTil{
|
||||
font-weight:700;
|
||||
color:#1e2941;
|
||||
display: inline-block;
|
||||
margin-bottom: 15px !important;
|
||||
}
|
||||
.contentNews, .titleHead{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.titleHead{
|
||||
justify-content: space-between;
|
||||
font-weight:700;
|
||||
color:#1e2941;
|
||||
margin-bottom: 20px;
|
||||
padding-right: 0px;
|
||||
}
|
||||
.borTop{
|
||||
width: 90%;
|
||||
border-top: 1px dashed rgba(0, 55, 175, 0.32);
|
||||
}
|
||||
.newImg{
|
||||
min-width: 376px;
|
||||
height:120px;
|
||||
margin-right: 18px;
|
||||
text-align: center;
|
||||
line-height: 120px;
|
||||
img{
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.list{
|
||||
display: flex;
|
||||
|
@ -143,6 +182,12 @@
|
|||
padding:15px 20px;
|
||||
border-top: 1px solid #eee;
|
||||
}
|
||||
.proYu{
|
||||
margin: 0 20px 0 23px;
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
.ant-progress{flex-grow: 1;}
|
||||
}
|
||||
}
|
||||
}
|
||||
.subNavs{
|
||||
|
@ -413,4 +458,96 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.bottomOrgBox{
|
||||
background-color: #fff;
|
||||
padding: 0 30px;
|
||||
.flexBox{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.overviewBox{
|
||||
border-color: #fff;
|
||||
.headCont{
|
||||
font-weight: bold;
|
||||
color:#202d40;
|
||||
height: 44px;
|
||||
padding: 0 20px 0 16px;
|
||||
background-image: url('../Images/organizationBg1.png');
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
}
|
||||
.linkOrg{
|
||||
color:#104fd9;
|
||||
font-weight: normal;
|
||||
}
|
||||
.handpickProjects{
|
||||
flex-wrap: wrap;
|
||||
padding-bottom: 50px;
|
||||
.project{
|
||||
width: 48%;
|
||||
height: 160px;
|
||||
margin-top: 25px;
|
||||
padding: 16px 30px 12px 16px;
|
||||
background-size: 100% 100%;
|
||||
background-image: url('../Images/organizationBg2.png');
|
||||
.projectDesc, .projectName{
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1;
|
||||
word-break: break-all;
|
||||
}
|
||||
.projectDesc{
|
||||
-webkit-line-clamp: 2;
|
||||
height: 60px;
|
||||
}
|
||||
}
|
||||
.labelBox{
|
||||
width: 102px;
|
||||
height: 28px;
|
||||
border-radius: 4px;
|
||||
display: inline-block;
|
||||
background-color: rgba(116, 160, 255, 0.13);
|
||||
color:#223c77;
|
||||
text-align: center;
|
||||
margin-right: 22px
|
||||
}
|
||||
.spanBox{
|
||||
flex-grow: 1;
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
.organizationDetailContent{
|
||||
padding: 0 16px;
|
||||
}
|
||||
}
|
||||
.navBox{
|
||||
display: inline-block;
|
||||
padding-bottom: 25px;
|
||||
.oneItemNav{
|
||||
color: #333;
|
||||
width: 73px;
|
||||
height:32px;
|
||||
display: inline-block;
|
||||
text-align: center;
|
||||
border:1px solid #d0d0d0;
|
||||
cursor: pointer;
|
||||
&.active{
|
||||
color:#ffffff;
|
||||
width: 83px;
|
||||
background-color:#104fd9;
|
||||
border-color: #104fd9;
|
||||
}
|
||||
&.left{
|
||||
border-radius:4px 0px 0px 4px;
|
||||
border-right-style: none;
|
||||
}
|
||||
&.right{
|
||||
border-radius:0px 4px 4px 0px;
|
||||
border-left-style: none;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,6 +7,9 @@ import Item from './ListItem';
|
|||
import Right from './RightBox';
|
||||
import NoData from '../Nodata';
|
||||
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
import RenderHtml from 'src/components/render-html';
|
||||
import img from '../Images/organizationImg.png';
|
||||
import Box from '../users/GeneralView/ConcentrateBox';
|
||||
|
||||
import { Menu , Pagination , Dropdown , Spin } from 'antd';
|
||||
import axios from 'axios';
|
||||
|
@ -19,10 +22,18 @@ function List(props){
|
|||
const [ search , setSearch ] = useState(undefined);
|
||||
const [ page , setPage ] = useState(1);
|
||||
const [ sortBy , setSortBy ] = useState("updated_on");
|
||||
|
||||
const [ active, setActive] = useState(0);
|
||||
const [ visible , setVisible ] = useState(false);
|
||||
const [ value , setValue ] = useState([]);
|
||||
const [ proList, setProList] = useState([]);
|
||||
const {showCompeleteDialog,completeProfile,history,mygetHelmetapi} = props;
|
||||
const OIdentifier = props.match.params.OIdentifier;
|
||||
const organizeDetail = props.organizeDetail;
|
||||
|
||||
useEffect(()=>{
|
||||
getList();
|
||||
},[])
|
||||
|
||||
useEffect(()=>{
|
||||
if(OIdentifier){
|
||||
setIsSpin(true);
|
||||
|
@ -51,6 +62,37 @@ function List(props){
|
|||
setSearch(value);
|
||||
}
|
||||
|
||||
function getList() {
|
||||
const url = `/organizations/${OIdentifier}/is_pinned_projects.json`;
|
||||
axios.get(url).then(result=>{
|
||||
if(result && result.data){
|
||||
let p = result.data.projects;
|
||||
setProList(p);
|
||||
if(p && p.length > 0){
|
||||
let array = p.map(i=>{
|
||||
return i.project_id
|
||||
})
|
||||
setValue(array);
|
||||
}
|
||||
}
|
||||
}).catch(erroer=>{})
|
||||
}
|
||||
|
||||
function onSure(is_pinned_project_ids) {
|
||||
if(is_pinned_project_ids && is_pinned_project_ids.length===0){
|
||||
setValue([]);
|
||||
}
|
||||
const url = `/organizations/${OIdentifier}/is_pinned_projects/pin.json`;
|
||||
axios.post(url,{
|
||||
is_pinned_project_ids
|
||||
}).then(result=>{
|
||||
if(result && result.data){
|
||||
setVisible(false);
|
||||
getList();
|
||||
}
|
||||
}).catch(error=>{})
|
||||
}
|
||||
|
||||
const menu=(
|
||||
<Menu onClick={(e)=>setSortBy(e.key)}>
|
||||
<Menu.Item key="updated_on">更新时间排序</Menu.Item>
|
||||
|
@ -69,10 +111,42 @@ function List(props){
|
|||
</li>
|
||||
</ul>
|
||||
)
|
||||
|
||||
|
||||
return(
|
||||
<div className="list">
|
||||
<div className="list-l">
|
||||
<div className='bottomOrgBox'>
|
||||
<Box
|
||||
visible={visible}
|
||||
onCancel={()=>setVisible(false)}
|
||||
onSure={onSure}
|
||||
getProjectListUrl={`/organizations/${OIdentifier}/projects.json`}
|
||||
choosed={value}
|
||||
completeProfile={completeProfile}
|
||||
showCompeleteDialog={showCompeleteDialog}
|
||||
history={history}
|
||||
createProjectUrl={`/projects/deposit/new/${OIdentifier}`}
|
||||
/>
|
||||
{/* 新闻动态 */}
|
||||
{organizeDetail && (organizeDetail.news_banner_id || organizeDetail.news_content) && <div className='newsAndTrends'>
|
||||
{(organizeDetail.news_banner_id || organizeDetail.news_content) && <div className='titleHead font-16'>
|
||||
<img src={img} alt='' width='26px'/>
|
||||
新闻动态
|
||||
<div className='borTop'></div>
|
||||
</div>}
|
||||
<div className='contentNews'>
|
||||
{organizeDetail.news_banner_id && <div className='newImg'><img src={`${mygetHelmetapi && mygetHelmetapi.current_main_site_url}/api/attachments/${organizeDetail.news_banner_id}`} alt=''/></div>}
|
||||
{organizeDetail.news_content && <div style={{flexGrow: 1}} className='pr10 font-15'>
|
||||
{organizeDetail.news_url ? <a className='font-16 newTil' href={organizeDetail.news_url}>{organizeDetail.news_title}</a> : <p className='font-16 newTil'>{organizeDetail.news_title}</p>}
|
||||
<div>{organizeDetail.news_content}</div>
|
||||
</div>}
|
||||
</div>
|
||||
</div>}
|
||||
{/* 概览or仓库 */}
|
||||
<div className='navBox'>
|
||||
<span className={`oneItemNav left ${active === 0 ? 'active' : ''}`} onClick={()=>{setActive(0)}}>概览</span>
|
||||
<span className={`oneItemNav right ${active === 1 ? 'active' : ''}`} onClick={()=>{setActive(1)}}>仓库</span>
|
||||
</div>
|
||||
<div className="list">
|
||||
{active === 1 && <div className="list-l">
|
||||
<div>
|
||||
<div className="head">
|
||||
<div style={{width:"370px"}}>
|
||||
|
@ -109,14 +183,43 @@ function List(props){
|
|||
<Pagination simple current={page} total={totalCount} onChange={(page)=>setPage(page)}/>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<Right
|
||||
admin={organizeDetail && organizeDetail.is_admin}
|
||||
OIdentifier={OIdentifier}
|
||||
showCompeleteDialog={props.showCompeleteDialog}
|
||||
completeProfile={props.completeProfile}
|
||||
history={props.history}
|
||||
/>
|
||||
</div>}
|
||||
{active === 0 && <div className='overviewBox list-l'>
|
||||
{proList && organizeDetail && (proList.length > 0 || (proList.length === 0 && organizeDetail.is_admin)) && <div className='handpickProjectsBox'>
|
||||
<div className='headCont flexBox font-16'>
|
||||
精选项目
|
||||
{organizeDetail.is_admin && <a className='linkOrg font-15' onClick={()=>setVisible(true)}><icon className="iconfont icon-bianji1 font-15 mr5"></icon>自定义精选项目</a>}
|
||||
</div>
|
||||
<div className='handpickProjects flexBox' style={{justifyContent: proList && proList.length !== 0 ? 'space-between' : 'center'}}>
|
||||
{proList && proList.length > 0 ? proList.map(item =>{
|
||||
return <div className='project' key={item.id}>
|
||||
<Link to={`/${OIdentifier}/${item.identifier}`} className="font-16 linkOrg projectName">{item.name}</Link>
|
||||
<div className='font-15 mt5 projectDesc' style={{color:'#26314d'}}>{item.description}</div>
|
||||
<div className='flexBox'>
|
||||
{item.category && item.category.name && <span className='labelBox'>{item.category.name}</span>}
|
||||
<div className='spanBox'>
|
||||
<span style={{color:'#333', marginRight: '15px'}}><i className='iconfont icon-shixing' style={{color:'#666'}}></i>{item.watchers_count}</span>
|
||||
<span style={{color:'#333'}}><i className='iconfont icon-fork' style={{color:'#666'}}></i>{item.forked_count}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}): <NoData _html="暂无数据" small={organizeDetail && organizeDetail.memo}/>}
|
||||
</div>
|
||||
</div>}
|
||||
{organizeDetail && organizeDetail.memo && <div className='organizationIntroduceBox'>
|
||||
<div className='headCont font-16 flexBox mb20'>组织介绍</div>
|
||||
<RenderHtml className="organizationDetailContent" value={organizeDetail && organizeDetail.memo} url={props.history.location}/>
|
||||
</div>}
|
||||
{organizeDetail && proList && !organizeDetail.memo && proList.length === 0 && !organizeDetail.is_admin && <NoData _html="暂无数据"/>}
|
||||
</div>}
|
||||
<Right
|
||||
admin={organizeDetail && organizeDetail.is_admin}
|
||||
OIdentifier={OIdentifier}
|
||||
showCompeleteDialog={props.showCompeleteDialog}
|
||||
completeProfile={props.completeProfile}
|
||||
history={props.history}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import { Link } from 'react-router-dom';
|
|||
import Nodata from '../Nodata';
|
||||
|
||||
import CheckProfile from '../Component/ProfileModal/Profile';
|
||||
import { Progress } from 'antd';
|
||||
|
||||
const Span = styled.span`{
|
||||
color:#888;
|
||||
|
@ -40,11 +41,13 @@ const Img = styled.img`{
|
|||
function RightBox({ OIdentifier , history , admin , showCompeleteDialog ,completeProfile }) {
|
||||
const [ memberData, setMemberData ] = useState(undefined);
|
||||
const [ groupData, setGroupData ] = useState(undefined);
|
||||
const [ languages, setLanguages ] = useState(undefined);
|
||||
|
||||
useEffect(()=>{
|
||||
if(OIdentifier){
|
||||
getMember(OIdentifier);
|
||||
getGroup(OIdentifier);
|
||||
getLanguage(OIdentifier);
|
||||
}
|
||||
},[OIdentifier])
|
||||
|
||||
|
@ -64,8 +67,40 @@ function RightBox({ OIdentifier , history , admin , showCompeleteDialog ,complet
|
|||
}
|
||||
}).catch(error=>{})
|
||||
}
|
||||
function getLanguage(iden){
|
||||
const url = `/organizations/${iden}/languages.json`;
|
||||
axios.get(url).then(result=>{
|
||||
if(result && result.data){
|
||||
let data = [];
|
||||
Object.keys(result.data).map(item=>{
|
||||
data.push({name:item,percent:result.data[item].substring(0, result.data[item].length-1),color:getColor()});
|
||||
})
|
||||
setLanguages(data);
|
||||
}
|
||||
}).catch(error=>{})
|
||||
}
|
||||
|
||||
function getColor(){
|
||||
let str = "#";
|
||||
let arr = ["1","2","3","4","4","5","6","7","8","9","a","b","c","d","e","f"];
|
||||
for(var i=0;i<6;i++){
|
||||
let num = parseInt(Math.random() * 16);
|
||||
str+=arr[num];
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
return(
|
||||
<div className="list-r">
|
||||
{/* 仓库语言 */}
|
||||
{languages && languages.length>0 && <div className="box">
|
||||
<div className="head">
|
||||
<span className="font-16">仓库语言</span>
|
||||
</div>
|
||||
<div className="content">
|
||||
{languages.map(item=>{return <div className='proYu'><span className='font-15' style={{width: '110px'}}>{item.name}</span><Progress percent={item.percent} strokeColor={item.color}/></div>})}
|
||||
</div>
|
||||
</div>}
|
||||
{
|
||||
memberData && memberData.organization_users && memberData.organization_users.length>0 ?
|
||||
<Box name="组织成员" count={memberData && memberData.total_count} url={`/${OIdentifier}/members`}>
|
||||
|
|
|
@ -62,7 +62,6 @@ export default Form.create()(
|
|||
if(result && result.data){
|
||||
showNotification("组织信息更新成功!");
|
||||
if(values.name !== organizeDetail.name){
|
||||
console.log("false111");
|
||||
history.push(`/${values.name}/setting`);
|
||||
}
|
||||
updateFunc && updateFunc(values.name,values.description);
|
||||
|
@ -74,7 +73,6 @@ export default Form.create()(
|
|||
function getImage(image){
|
||||
setImageFlag(true);
|
||||
setImage(image);
|
||||
console.log(image);
|
||||
}
|
||||
|
||||
// 删除组织
|
||||
|
@ -108,7 +106,7 @@ export default Form.create()(
|
|||
}
|
||||
callback();
|
||||
}
|
||||
|
||||
|
||||
return(
|
||||
<div>
|
||||
<WhiteBack>
|
||||
|
@ -137,12 +135,13 @@ export default Form.create()(
|
|||
{helper(
|
||||
"组织描述:",
|
||||
"description",
|
||||
[],
|
||||
<TextArea
|
||||
[{ required: true, message: "请输入组织描述" }],
|
||||
<TextArea
|
||||
placeholder="请输入组织名称"
|
||||
maxLength={200}
|
||||
onChange={(e)=>{setDescNum(e.target.value ? e.target.value.length :0)}}
|
||||
/>
|
||||
autoSize
|
||||
/>,true
|
||||
)}
|
||||
</div>
|
||||
{helper(
|
||||
|
@ -160,12 +159,12 @@ export default Form.create()(
|
|||
{helper(
|
||||
'可见性:',
|
||||
"visibility",
|
||||
[],
|
||||
[{ required: true, message: "请选择可见性" }],
|
||||
<Radio.Group>
|
||||
<Radio value="common" style={radioStyle}>公开</Radio>
|
||||
<Radio value="limited" style={radioStyle}>受限<span>(仅对登录用户可见)</span></Radio>
|
||||
<Radio value="privacy" style={radioStyle}>私有<span>(仅对组织成员可见)</span></Radio>
|
||||
</Radio.Group>
|
||||
</Radio.Group>,true
|
||||
)}
|
||||
{helper(
|
||||
'权限:',
|
||||
|
@ -181,7 +180,7 @@ export default Form.create()(
|
|||
<InputNumber value="-1" max={1000} style={{width:"350px"}}/>,false,false,
|
||||
"当输入栏为空时,默认数量无限制"
|
||||
)}
|
||||
<p>选择头像:</p>
|
||||
<p className='required'>选择头像:</p>
|
||||
<UploadImage url={image&&image.startsWith('images/avatars/Organization')?getImageUrl(`/${image}`):image} getImage={getImage}/>
|
||||
<Button type={"primary"} onClick={updateDetail}>更新组织设置</Button>
|
||||
</Form>
|
||||
|
|
|
@ -0,0 +1,149 @@
|
|||
import React, { forwardRef , useCallback , useEffect, useState } from 'react';
|
||||
import { Form , Input , Button } from 'antd';
|
||||
import { WhiteBack } from '../../Component/layout';
|
||||
import Title from '../../Component/Title';
|
||||
import styled from 'styled-components';
|
||||
import UploadImg from '../../../components/uploadImg';
|
||||
import axios from 'axios';
|
||||
import MDEditor from '../../../modules/tpm/challengesnew/tpm-md-editor';
|
||||
|
||||
const TextArea = Input.TextArea;
|
||||
|
||||
const Div = styled.div`{
|
||||
padding:20px 30px;
|
||||
}`
|
||||
export default Form.create()(
|
||||
forwardRef((props)=>{
|
||||
const { form , organizeDetail , showNotification} = props;
|
||||
const [ descNum , setDescNum ] = useState(0);
|
||||
const [ description, setDescription] = useState(undefined);
|
||||
const [ imageId , setImageId ] = useState(undefined);
|
||||
const { getFieldDecorator , validateFields , setFieldsValue } = form;
|
||||
|
||||
useEffect(()=>{
|
||||
if(organizeDetail){
|
||||
setFieldsValue({
|
||||
...organizeDetail,
|
||||
max_repo_creation:organizeDetail.max_repo_creation===-1 ? "":organizeDetail.max_repo_creation
|
||||
})
|
||||
setImageId(organizeDetail.news_banner_id);
|
||||
setDescNum(organizeDetail.news_content ? organizeDetail.news_content.length : 0);
|
||||
setDescription(organizeDetail.memo);
|
||||
}
|
||||
},[organizeDetail])
|
||||
|
||||
const helper = useCallback(
|
||||
(label, name, rules, widget , isRequired , flag , help ) => (
|
||||
<div>
|
||||
<span className={isRequired?"required":""}>{label}</span>
|
||||
<Form.Item help={help}>
|
||||
{getFieldDecorator(name, { rules, validateFirst: true , valuePropName:flag ? "checked":"value" })(widget)}
|
||||
</Form.Item>
|
||||
</div>
|
||||
),
|
||||
[]
|
||||
);
|
||||
// 更新
|
||||
function updateDetail(){
|
||||
validateFields((error,values)=>{
|
||||
if(!error){
|
||||
const {news_url, news_title, news_content} = values;
|
||||
console.log('news_title', news_title, news_content);
|
||||
if((!news_title && news_content) || (!news_content && news_title)){
|
||||
console.log('cuo');
|
||||
const cont = !news_title ? 'news_title' : 'news_content';
|
||||
console.log(cont);
|
||||
form.setFields({[cont]: {value:form.getFieldValue(cont),errors:[new Error('新闻动态标题和内容必须同时输入')]}});
|
||||
}else{
|
||||
const params = {
|
||||
news_url,
|
||||
news_title,
|
||||
news_content,
|
||||
news_banner_id: imageId,
|
||||
memo: description
|
||||
}
|
||||
console.log('成功', params);
|
||||
const url = `/organizations/${organizeDetail.id}/update_other.json`;
|
||||
axios.post(url,params).then(result=>{
|
||||
if(result && result.data){
|
||||
showNotification("组织信息更新成功!");
|
||||
// form.resetFields();
|
||||
setFieldsValue({
|
||||
...params
|
||||
})
|
||||
}
|
||||
}).catch(error=>{})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function getImageId(imageId){
|
||||
setImageId(imageId);
|
||||
}
|
||||
|
||||
function deleteImg(){
|
||||
setImageId(undefined);
|
||||
}
|
||||
|
||||
return(
|
||||
<div>
|
||||
<WhiteBack>
|
||||
<Title>组织首页管理</Title>
|
||||
<Div>
|
||||
<Form className='homePageManage'>
|
||||
{/* 新闻动态编辑 */}
|
||||
{helper('新闻动态图片',
|
||||
'news_banner_id',
|
||||
[],
|
||||
<UploadImg getImageId={getImageId} imageId={imageId}/>
|
||||
)}
|
||||
<div style={{marginTop: '-30px', position: 'relative', zIndex: '1'}} className='mb20 ml30'><a onClick={()=>{deleteImg()}}>删除</a></div>
|
||||
{helper(
|
||||
"新闻动态原文链接",
|
||||
"news_url",
|
||||
[],
|
||||
<Input
|
||||
placeholder="请输入新闻动态原文链接"
|
||||
maxLength={50}
|
||||
/>
|
||||
)}
|
||||
{helper(
|
||||
"新闻动态标题",
|
||||
"news_title",
|
||||
[],
|
||||
<Input
|
||||
placeholder="请输入新闻动态"
|
||||
maxLength={45}
|
||||
/>
|
||||
)}
|
||||
<div className="pr">
|
||||
<span className="toprightNum">{descNum}/200</span>
|
||||
{helper(
|
||||
"新闻动态内容",
|
||||
"news_content",
|
||||
[],
|
||||
<TextArea
|
||||
placeholder="请输入新闻内容"
|
||||
maxLength={200}
|
||||
onChange={(e)=>{setDescNum(e.target.value ? e.target.value.length :0)}}
|
||||
autoSize
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
<p className='mt30'>组织介绍</p>
|
||||
<MDEditor
|
||||
placeholder={"请输入组织介绍"}
|
||||
height={500}
|
||||
mdID={"order-new-description"}
|
||||
initValue={description}
|
||||
onChange={setDescription}
|
||||
></MDEditor>
|
||||
<Button type={"primary"} onClick={updateDetail}>确定</Button>
|
||||
</Form>
|
||||
</Div>
|
||||
</WhiteBack>
|
||||
</div>
|
||||
)
|
||||
})
|
||||
)
|
|
@ -24,24 +24,31 @@ const Hooks = Loadable({
|
|||
loader: () => import("./TeamSettingHooks"),
|
||||
loading: Loading,
|
||||
});
|
||||
const HomePageSet = Loadable({
|
||||
loader: () => import("./TeamSettingHomePage"),
|
||||
loading: Loading,
|
||||
});
|
||||
export default (( props )=>{
|
||||
const pathname = props.location.pathname;
|
||||
const OIdentifier = props.match.params.OIdentifier;
|
||||
|
||||
function returnActive (pathname){
|
||||
let a = 0;
|
||||
if(pathname === `/${OIdentifier}/setting/member`){
|
||||
if(pathname === `/${OIdentifier}/setting/home`){
|
||||
a = 1;
|
||||
}else if(pathname === `/${OIdentifier}/setting/group`){
|
||||
}else if(pathname === `/${OIdentifier}/setting/member`){
|
||||
a = 2;
|
||||
}else if(pathname === `/${OIdentifier}/setting/hooks`){
|
||||
}else if(pathname === `/${OIdentifier}/setting/group`){
|
||||
a = 3;
|
||||
}else if(pathname === `/${OIdentifier}/setting/hooks`){
|
||||
a = 4;
|
||||
}
|
||||
return a;
|
||||
}
|
||||
const active = returnActive(pathname);
|
||||
const array = {list:[
|
||||
{name:'基本设置',icon:"icon-base",href:`/${OIdentifier}/setting`},
|
||||
{name:'组织首页管理',href:`/${OIdentifier}/setting/home`},
|
||||
{name:'组织成员管理',icon:"icon-zuzhichengyuan",href:`/${OIdentifier}/setting/member`},
|
||||
{name:'组织团队管理',icon:"icon-zuzhixiangmu",href:`/${OIdentifier}/setting/group`},
|
||||
// {name:'管理web钩子',icon:"icon-zhongqingdianxinicon10",href:`/${OIdentifier}/setting/hooks`}
|
||||
|
@ -49,7 +56,7 @@ export default (( props )=>{
|
|||
active
|
||||
}
|
||||
return(
|
||||
<Box>
|
||||
<Box className="mt20">
|
||||
<Short>
|
||||
<Setnav header={<Title>组织设置</Title>} nav={array}></Setnav>
|
||||
</Short>
|
||||
|
@ -75,6 +82,12 @@ export default (( props )=>{
|
|||
<Member {...props} />
|
||||
)}
|
||||
></Route>
|
||||
<Route
|
||||
path="/:OIdentifier/setting/home"
|
||||
render={() => (
|
||||
<HomePageSet {...props} />
|
||||
)}
|
||||
></Route>
|
||||
<Route
|
||||
path="/:OIdentifier/setting"
|
||||
render={() => (
|
||||
|
|
|
@ -2,7 +2,6 @@ import React , { useEffect , useState } from 'react';
|
|||
import { Route, Switch , Link } from "react-router-dom";
|
||||
import Loadable from "react-loadable";
|
||||
import Loading from "../../../Loading";
|
||||
import {AlignCenter} from '../../Component/layout';
|
||||
import Cards from '../../Component/Cards';
|
||||
import axios from 'axios';
|
||||
import '../Index.scss';
|
||||
|
@ -83,10 +82,10 @@ function Detail(props){
|
|||
img={detail.avatar_url}
|
||||
rightBtn={
|
||||
<React.Fragment>
|
||||
{flag && !buttonflag && detail.is_admin ?
|
||||
<Link to={`/${OIdentifier}/setting`} className="color-blue ml10 font-14">设置<i className="iconfont icon-shezhi2 ml3 fr"></i></Link>
|
||||
{flag && !buttonflag && detail.is_admin ?
|
||||
<Link to={`/${OIdentifier}/setting`} className="font-15 settingsLink"><i className="iconfont icon-shezhi2 mr5"></i><span>设置</span></Link>
|
||||
:""}
|
||||
{buttonflag &&
|
||||
{buttonflag &&
|
||||
<span className="subNavs">
|
||||
<Link to={`/${OIdentifier}/members`} className={pathname ===`/${OIdentifier}/members` ? "active":""}><span>组织成员</span>{detail.num_users && <lable>{detail.num_users}</lable>}</Link>
|
||||
<Link to={`/${OIdentifier}/teams`} className={pathname ===`/${OIdentifier}/teams` ? "active":""}><span>组织团队</span>{detail.num_teams &&<lable>{detail.num_teams}</lable>}</Link>
|
||||
|
@ -95,14 +94,14 @@ function Detail(props){
|
|||
</React.Fragment>
|
||||
}
|
||||
bottomInfos={
|
||||
!buttonflag && <div>
|
||||
!buttonflag && <div className='mt5'>
|
||||
{
|
||||
detail.location &&
|
||||
<span className="color-grey-6"><i className="iconfont icon-weizhi mr3 font-16 color-grey-6"></i>{detail.location}</span>
|
||||
detail.location &&
|
||||
<span className="bottomInfos"><i className="iconfont icon-weizhi mr3 font-16"></i>{detail.location}</span>
|
||||
}
|
||||
{
|
||||
detail.website &&
|
||||
<a href={detail.website} target="_blank" className="ml20 color-grey-6"><i className="iconfont icon-lianjie mr3 font-14"></i>{detail.website}</a>
|
||||
detail.website &&
|
||||
<a href={detail.website} target="_blank" className="ml20 bottomInfos"><i className="iconfont icon-lianjie mr3 font-14"></i>{detail.website}</a>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
|
|
@ -234,7 +234,7 @@ form{
|
|||
box-shadow: 0px 0px 2px rgba(0,0,0,0.2);
|
||||
.list-affix{
|
||||
min-height: 20px;
|
||||
max-height: 248px;
|
||||
max-height: 308px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
li{
|
||||
|
|
|
@ -2,10 +2,11 @@ import React, { useEffect, useState } from 'react';
|
|||
import { Modal , Checkbox , Spin , Input } from 'antd';
|
||||
import Axios from 'axios';
|
||||
import CheckProfile from '../../Component/ProfileModal/Profile';
|
||||
import './Index.scss';
|
||||
|
||||
const { Search } = Input;
|
||||
const limit = 20;
|
||||
function ConcentrateBox({ visible , onCancel , onSure , username , choosed , history , showCompeleteDialog , completeProfile }) {
|
||||
function ConcentrateBox({ visible , onCancel , onSure , getProjectListUrl , choosed , history , showCompeleteDialog , completeProfile, createProjectUrl }) {
|
||||
const [ page , setPage ]= useState(1);
|
||||
const [ total , setTotal ]= useState(0);
|
||||
const [ pageSize , setPageSize ] = useState(false);
|
||||
|
@ -18,7 +19,7 @@ function ConcentrateBox({ visible , onCancel , onSure , username , choosed , his
|
|||
|
||||
const [ copyList , setCopyList ] = useState([]);
|
||||
const [ copyAllList , setCopyAllList ] = useState([]);
|
||||
|
||||
|
||||
useEffect(()=>{
|
||||
if(visible){
|
||||
setIsSpin(true);
|
||||
|
@ -54,7 +55,7 @@ function ConcentrateBox({ visible , onCancel , onSure , username , choosed , his
|
|||
},[value])
|
||||
|
||||
function getProjectList(p,s) {
|
||||
const url = `/users/${username}/projects.json`;
|
||||
const url = getProjectListUrl;
|
||||
Axios.get(url,{
|
||||
params:{
|
||||
page:p,limit,is_public: "public",search:s,choosed
|
||||
|
@ -137,7 +138,7 @@ function ConcentrateBox({ visible , onCancel , onSure , username , choosed , his
|
|||
>
|
||||
<Spin spinning={isSpin}>
|
||||
<div className="operateDiv">
|
||||
<p>最多可选取6个公开仓库</p>
|
||||
<div className='mb5'>最多可选取6个公开仓库</div>
|
||||
<Search
|
||||
placeholder="请输入项目名称进行搜索"
|
||||
onSearch={onSearch}
|
||||
|
@ -173,7 +174,7 @@ function ConcentrateBox({ visible , onCancel , onSure , username , choosed , his
|
|||
<CheckProfile
|
||||
showCompeleteDialog={showCompeleteDialog}
|
||||
completeProfile={completeProfile}
|
||||
sureFunc={()=>{history.push(`/projects/deposit/new`)}}
|
||||
sureFunc={()=>{history.push(createProjectUrl)}}
|
||||
className="color-blue">新建项目</CheckProfile>
|
||||
</div>
|
||||
}
|
||||
|
|
|
@ -49,11 +49,12 @@ function ConcentrateProject({userLogin,current,showCompeleteDialog,completeProfi
|
|||
visible={visible}
|
||||
onCancel={()=>setVisible(false)}
|
||||
onSure={onSure}
|
||||
username={userLogin}
|
||||
getProjectListUrl={`/users/${userLogin}/projects.json`}
|
||||
choosed={value}
|
||||
completeProfile={completeProfile}
|
||||
showCompeleteDialog={showCompeleteDialog}
|
||||
history={history}
|
||||
createProjectUrl={`/projects/deposit/new`}
|
||||
/>
|
||||
{
|
||||
list && list.length>0 &&
|
||||
|
|
|
@ -17,8 +17,9 @@
|
|||
margin-right: 0px;
|
||||
}
|
||||
.name{
|
||||
word-break: break-all;
|
||||
font-size: 16px;
|
||||
color: #4CACFF;
|
||||
color: #4154f1;
|
||||
}
|
||||
.desc{
|
||||
color: #999;
|
||||
|
@ -71,6 +72,9 @@
|
|||
max-height: 210px;
|
||||
overflow-y: auto;
|
||||
padding-left: 30px;
|
||||
.ant-checkbox-wrapper + .ant-checkbox-wrapper{
|
||||
margin-left: 0px;
|
||||
}
|
||||
}
|
||||
.operateDiv{
|
||||
padding:20px 30px
|
||||
|
@ -87,8 +91,9 @@
|
|||
width: 50%;
|
||||
margin-left: 0px!important;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.ant-checkbox{
|
||||
padding-top: 3px;
|
||||
height: 16px;
|
||||
}
|
||||
span:last-child{
|
||||
flex:1;
|
||||
|
|
|
@ -261,7 +261,7 @@ ul.ant-menu.menuStyle{
|
|||
bottom: -1px;
|
||||
height: 2px;
|
||||
left: 0px;
|
||||
background-color: #1890ff;
|
||||
background-color: #4154f1;
|
||||
content:"";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -153,6 +153,8 @@ const Competition = (props) => {
|
|||
props.showNotification("您还未报名竞赛!");
|
||||
} else if (enrollStatus && enrollStatus.status === 0) {
|
||||
props.showNotification("报名信息被管理员驳回!");
|
||||
} else if ( competitionId === 'zstp2022' && enrollStatus && !enrollStatus.second_round) {
|
||||
props.showNotification("很遗憾,您未进入复赛!");
|
||||
} else if (['ccks', 'zstp2022'].includes(competitionId) && enrollStatus && enrollStatus.status === 1) {
|
||||
props.showNotification("您的报名信息未通过审核!");
|
||||
} else if(['ccks', 'zstp2022'].includes(competitionId) && applyStatus ){
|
||||
|
@ -199,7 +201,7 @@ const Competition = (props) => {
|
|||
<Link to={{ pathname: referStatus && !referEnd && current_user && current_user.login && enrollStatus && enrollStatus.enroll_status ? `/competition/${competitionId}/refer` : '' }} onClick={goToRefer}>提案提交</Link>
|
||||
</li> :
|
||||
<li className={active === "refer" ? "active" : ""}>
|
||||
<Link to={{ pathname: !referEnd && current_user && current_user.login && enrollStatus && enrollStatus.status>1 ? `/competition/${competitionId}/refer` : '' }} onClick={goToRefer}>提案提交</Link>
|
||||
<Link to={{ pathname: !referEnd && current_user && current_user.login && enrollStatus && enrollStatus.status>1 && enrollStatus.second_round ? `/competition/${competitionId}/refer` : '' }} onClick={goToRefer}>提案提交</Link>
|
||||
</li>}
|
||||
|
||||
{
|
||||
|
|
|
@ -262,7 +262,7 @@ export default Form.create()((props) => {
|
|||
您的报名信息正在审核中,请耐心等待
|
||||
</div>
|
||||
)}
|
||||
{enrollStatus && enrollStatus.status === 2 && (
|
||||
{enrollStatus && (enrollStatus.enroll_info.status === 2 || enrollStatus.enroll_info.status === 3) && (
|
||||
<div className="ccks_info info_success">
|
||||
<i className="iconfont icon-xiaoxilingdang mr10"></i>
|
||||
您已报名成功,请通过链接下载数据集
|
||||
|
@ -471,7 +471,7 @@ export default Form.create()((props) => {
|
|||
</div> : ''}
|
||||
</div>
|
||||
|
||||
{enrollStatus && enrollStatus.enroll_info.status == 2 && qzDetail && qzDetail.enroll_template && (
|
||||
{enrollStatus && (enrollStatus.enroll_info.status == 2 || enrollStatus.enroll_info.status == 3) && qzDetail && qzDetail.enroll_template && (
|
||||
<div className="download_box">
|
||||
<a
|
||||
href={
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 20 KiB |
|
@ -1,7 +1,7 @@
|
|||
import React, { useEffect, useState } from "react";
|
||||
import { Tabs, Input, Pagination, Table, Tooltip } from 'antd';
|
||||
import { rankingList } from '../api';
|
||||
import rank_start from "../image/rank_start.png";
|
||||
import rank_start from "../image/rank_second1.png";
|
||||
import PaginationTable from "../../components/paginationTable";
|
||||
|
||||
import './index.scss';
|
||||
|
|
|
@ -16,7 +16,6 @@ import '../apply/index.scss';
|
|||
function Introduce({ form, showNotification, match, history, enrollStatus, current_user, qzDetail, setReload }) {
|
||||
const { competitionId } = match.params;
|
||||
|
||||
console.log(enrollStatus);
|
||||
// 是否允许用户上传作品
|
||||
// const upload = enrollStatus && (!enrollStatus.upload_status || enrollStatus.upload_status === 1);
|
||||
|
||||
|
@ -46,7 +45,7 @@ function Introduce({ form, showNotification, match, history, enrollStatus, curre
|
|||
if (qzDetail && enrollStatus && current_user) {
|
||||
const referStatus = qzDetail && !(Date.parse(new Date()) < Date.parse(new Date(qzDetail.upload_date)));
|
||||
// 当前时间不处于提案提交时间 或者用户未登录情况下 或者用户未报名 通过URL访问此页面,跳转到大赛介绍页面 或者用户报名信息被驳回未处理(enrollStatus.status = 0)
|
||||
if (referStatus || (current_user && !current_user.login) || (enrollStatus && (!enrollStatus.enroll_status || enrollStatus.status <2))) {
|
||||
if (referStatus || (current_user && !current_user.login) || (enrollStatus && (!enrollStatus.enroll_status || enrollStatus.status <2)) || (!enrollStatus.second_round)) {
|
||||
history.push(`/competition/${competitionId}`);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -112,7 +112,8 @@ export default Form.create()((props) => {
|
|||
}
|
||||
|
||||
function goUser(login) {
|
||||
window.location.href = `/users/${login}`;
|
||||
var chromesettingArray = JSON.parse(localStorage.getItem('chromesetting'));
|
||||
window.location.href = `${chromesettingArray.main_web_site_url}/accounts/${login}`;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -19,7 +19,8 @@ export default (props) => {
|
|||
|
||||
|
||||
function goUser(login) {
|
||||
window.location.href = `/users/${login}`;
|
||||
var chromesettingArray = JSON.parse(localStorage.getItem('chromesetting'));
|
||||
window.location.href = `${chromesettingArray.main_web_site_url}/accounts/${login}`;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -366,7 +366,7 @@ export default Form.create()(
|
|||
}, [signAgreement, isPaper, current_user, detailData, dataList]);
|
||||
|
||||
function goUser(login) {
|
||||
window.location.href = `/users/${login}`;
|
||||
window.location.href = mygetHelmetapi && mygetHelmetapi.main_web_site_url + `/accounts/${login}`;
|
||||
}
|
||||
|
||||
function goUserProfiles() {
|
||||
|
|
Loading…
Reference in New Issue