This commit is contained in:
caishi 2022-03-23 16:14:00 +08:00
parent 4b3e62b907
commit 25a3e10c27
3 changed files with 15 additions and 7 deletions

View File

@ -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,

View File

@ -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) {

View File

@ -138,6 +138,7 @@ class Attachment extends Component {
to={`${item.url}`}
target="_blank"
className="attachment-list-a"
download
>
<i className="iconfont icon-fujian mr8 paper-clip-color font-12"></i>
<span>{item.title}</span>