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) { if (result) {
let data ={ let data ={
branch_name: result.data.branch_name, branch_name: result.data.branch_name,
issue_tag_ids: [ issue_tag_ids:
result.data.issue_tags && result.data.issue_tags[0].id ? 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) : "", 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) : "", tracker_id: result.data.tracker_id ? String(result.data.tracker_id) : "",
issue_type: result.data.issue_type, issue_type: result.data.issue_type,

View File

@ -61,12 +61,15 @@ class Index extends Component {
handleChange = (info) => { handleChange = (info) => {
const { changeIsComplete } = this.props; const { changeIsComplete } = this.props;
changeIsComplete && changeIsComplete(true); changeIsComplete && changeIsComplete(true);
const file = info.file;
if(file && file.type){
if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') { if (info.file.status === 'uploading' || info.file.status === 'done' || info.file.status === 'removed') {
let fileList = info.fileList; let fileList = info.fileList;
this.setState({ fileList: appendFileSizeToUploadFileAll(fileList) }); this.setState({ fileList: appendFileSizeToUploadFileAll(fileList) });
this.fileIdList(fileList); this.fileIdList(fileList);
} }
} }
}
fileIdList = (fileList) => { fileIdList = (fileList) => {
let array = []; let array = [];
@ -77,6 +80,10 @@ class Index extends Component {
} }
beforeUpload = (file) => { beforeUpload = (file) => {
if(file && !file.type){
this.props.showNotification(`不能上传文件夹!`);
return;
}
const { size } = this.props; const { size } = this.props;
const isLt100M = file.size / 1024 / 1024 < size; const isLt100M = file.size / 1024 / 1024 < size;
if (!isLt100M) { if (!isLt100M) {

View File

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