From 25a3e10c27fa23706baf28b759595c391fdb352d Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Wed, 23 Mar 2022 16:14:00 +0800 Subject: [PATCH 1/5] issues --- src/forge/Order/order_form.js | 6 +++--- src/forge/Upload/Index.js | 15 +++++++++++---- src/forge/Upload/attachment.js | 1 + 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/forge/Order/order_form.js b/src/forge/Order/order_form.js index e1ae9a67..e3a2eb91 100644 --- a/src/forge/Order/order_form.js +++ b/src/forge/Order/order_form.js @@ -81,10 +81,10 @@ class order_form extends Component { if (result) { let data ={ branch_name: result.data.branch_name, - issue_tag_ids: [ + issue_tag_ids: result.data.issue_tags && result.data.issue_tags[0].id ? - String(result.data.issue_tags[0].id) : "", - ], + String(result.data.issue_tags[0].id) : "" + , fixed_version_id: result.data.fixed_version_id ? String(result.data.fixed_version_id) : "", tracker_id: result.data.tracker_id ? String(result.data.tracker_id) : "", issue_type: result.data.issue_type, diff --git a/src/forge/Upload/Index.js b/src/forge/Upload/Index.js index 713803aa..f34888bb 100644 --- a/src/forge/Upload/Index.js +++ b/src/forge/Upload/Index.js @@ -61,10 +61,13 @@ class Index extends Component { handleChange = (info) => { const { changeIsComplete } = this.props; changeIsComplete && changeIsComplete(true); - if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') { - let fileList = info.fileList; - this.setState({ fileList: appendFileSizeToUploadFileAll(fileList) }); - this.fileIdList(fileList); + const file = info.file; + if(file && file.type){ + if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') { + let fileList = info.fileList; + this.setState({ fileList: appendFileSizeToUploadFileAll(fileList) }); + this.fileIdList(fileList); + } } } @@ -77,6 +80,10 @@ class Index extends Component { } beforeUpload = (file) => { + if(file && !file.type){ + this.props.showNotification(`不能上传文件夹!`); + return; + } const { size } = this.props; const isLt100M = file.size / 1024 / 1024 < size; if (!isLt100M) { diff --git a/src/forge/Upload/attachment.js b/src/forge/Upload/attachment.js index 9918363d..677b48ee 100644 --- a/src/forge/Upload/attachment.js +++ b/src/forge/Upload/attachment.js @@ -138,6 +138,7 @@ class Attachment extends Component { to={`${item.url}`} target="_blank" className="attachment-list-a" + download > {item.title} From cb87a9d075be288a3a22b86d4b37617a181c48fb Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Tue, 29 Mar 2022 09:47:38 +0800 Subject: [PATCH 2/5] 403,404 --- src/AppConfig.js | 2 +- src/modules/403/Shixunauthority.js | 7 +++---- src/modules/404/Shixunnopage.js | 7 +++---- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/AppConfig.js b/src/AppConfig.js index faef3bd2..3216f00f 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -25,7 +25,7 @@ if (isDev) { } debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' : window.location.search.indexOf('debug=s') !== -1 ? 'student' : - window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin' + window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || '' } window._debugType = debugType; export function initAxiosInterceptors(props) { diff --git a/src/modules/403/Shixunauthority.js b/src/modules/403/Shixunauthority.js index 00509cb8..99b8c4a2 100644 --- a/src/modules/403/Shixunauthority.js +++ b/src/modules/403/Shixunauthority.js @@ -4,7 +4,7 @@ import { SnackbarHOC, getImageUrl } from 'educoder'; class Shixunauthority extends Component { render() { - const { current_user } = this.props; + const { current_user , mygetHelmetapi } = this.props; return (
您尚未被授权访问此页面,请先获取相关权限
您可尝试 {(!current_user || !current_user.login) && ( -您可尝试登录或
+您可尝试登录或
)} - 返回首页,也可以通过 + 返回首页,也可以通过 QQ向我们反馈 diff --git a/src/modules/404/Shixunnopage.js b/src/modules/404/Shixunnopage.js index 47aa850c..a7e24a2d 100644 --- a/src/modules/404/Shixunnopage.js +++ b/src/modules/404/Shixunnopage.js @@ -4,7 +4,7 @@ import { SnackbarHOC, getImageUrl } from 'educoder'; class http500 extends Component { render() { - const { current_user } = this.props; + const { current_user , mygetHelmetapi } = this.props; return (你访问的页面不存在
您可尝试 {(!current_user || !current_user.login) && ( -您可尝试登录或
+您可尝试登录或
)} - 返回首页 + 返回首页 ,也可通过 Date: Tue, 29 Mar 2022 09:51:20 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=90=8C=E4=B8=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/modules/403/Shixunauthority.js | 2 +- src/modules/404/Shixunnopage.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/403/Shixunauthority.js b/src/modules/403/Shixunauthority.js index 99b8c4a2..ede7d099 100644 --- a/src/modules/403/Shixunauthority.js +++ b/src/modules/403/Shixunauthority.js @@ -14,7 +14,7 @@ class Shixunauthority extends Component {您尚未被授权访问此页面,请先获取相关权限
您可尝试 {(!current_user || !current_user.login) && ( -您可尝试登录或
+您可尝试登录或
)} 返回首页,也可以通过 你访问的页面不存在 您可尝试 {(!current_user || !current_user.login) && ( -您可尝试登录或
+您可尝试登录或
)} 返回首页 ,也可通过 From 335e484167912d5f48f34dc823758a11f3a50f96 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Wed, 30 Mar 2022 16:13:42 +0800 Subject: [PATCH 4/5] style --- src/AppConfig.js | 2 +- src/forge/Order/order.css | 3 +++ src/forge/Upload/Index.js | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/AppConfig.js b/src/AppConfig.js index 3216f00f..faef3bd2 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -25,7 +25,7 @@ if (isDev) { } debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' : window.location.search.indexOf('debug=s') !== -1 ? 'student' : - window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || '' + window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin' } window._debugType = debugType; export function initAxiosInterceptors(props) { diff --git a/src/forge/Order/order.css b/src/forge/Order/order.css index c35a1827..40adc855 100644 --- a/src/forge/Order/order.css +++ b/src/forge/Order/order.css @@ -573,6 +573,9 @@ a.issue-type-button.active:hover { .attachment-list-a { color: rgba(0, 0, 0, 0.65) !important; } +.attachment-list-a>span{ + word-break: break-all; +} .btp1 { border-top: 1px solid #f4f4f4; } diff --git a/src/forge/Upload/Index.js b/src/forge/Upload/Index.js index f34888bb..20324211 100644 --- a/src/forge/Upload/Index.js +++ b/src/forge/Upload/Index.js @@ -80,8 +80,9 @@ class Index extends Component { } beforeUpload = (file) => { + console.log(file); if(file && !file.type){ - this.props.showNotification(`不能上传文件夹!`); + this.props.showNotification(`暂不支持此格式文件的上传!`); return; } const { size } = this.props; From fc3a1e40885c6959e1774c83d8ba2809dbd28b6a Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Thu, 31 Mar 2022 14:51:10 +0800 Subject: [PATCH 5/5] =?UTF-8?q?issue=E8=AF=A6=E6=83=85-word?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Order/Detail.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/forge/Order/Detail.js b/src/forge/Order/Detail.js index 61964f21..4453a7b5 100644 --- a/src/forge/Order/Detail.js +++ b/src/forge/Order/Detail.js @@ -345,7 +345,7 @@ class Detail extends Component {- 分类: + 类型: {data && data.tracker ? data.tracker : "--"}