dev_cs_new
杨树明 6 years ago
parent 54d8f9df06
commit 1c62a7e09d

@ -15,7 +15,7 @@ import axios from 'axios';
import './css/TPMsettings.css';
import { getImageUrl, toPath, getUrl } from 'educoder';
import { getImageUrl, toPath, getUrl ,appendFileSizeToUploadFileAll} from 'educoder';
let origin = getUrl();
@ -1338,9 +1338,13 @@ export default class TPMsettings extends Component {
}
handleChange = (info) => {
console.log("handleChange1");
let fileList = info.fileList;
this.setState({ fileList:fileList,
deleteisnot:false});
let {fileList}=this.state;
if(fileList.length===0){
let fileLists = info.fileList;
this.setState({ fileList:fileLists,
deleteisnot:false});
}
}
onAttachmentRemove = (file) => {
@ -1668,22 +1672,11 @@ export default class TPMsettings extends Component {
<div className="mt10" style={{
display: "inline-block"
}}>
{
this.state.deleteisnot=== true?
<Upload {...uploadProps} >
<Icon type="upload" className="fl mt3" > </Icon>
<span className="color-blue fl cdefault">上传附件</span>
<span className="color-grey-c fl ml10 ">(单个文件50M以内)</span>
</Upload>
:
<Upload {...uploadProps} disabled={true} >
<Icon type="upload" className="fl mt3" > </Icon>
<span className="color-grey-c fl">上传附件</span>
<span className="color-grey-c fl ml10 ">(单个文件50M以内)</span>
</Upload>
}
<Upload {...uploadProps} >
<Icon type="upload" className="fl mt3" > </Icon>
<span className="color-blue fl cdefault">上传附件</span>
<span className="color-grey-c fl ml10 ">(单个文件50M以内)</span>
</Upload>
</div>
</li>
<div className={"color-red shixunspanred"}>

@ -2,7 +2,7 @@ import React, {Component} from 'react';
import {TPMIndexHOC} from '../TPMIndexHOC';
import {SnackbarHOC} from 'educoder';
import {SnackbarHOC,appendFileSizeToUploadFileAll} from 'educoder';
import {Input, Select, Radio, Checkbox, Modal, Icon, DatePicker,Upload,Button,message,Form,notification} from 'antd';
@ -760,11 +760,16 @@ class Newshixuns extends Component {
// 附件相关 START
handleChange = (info) => {
let {fileList}=this.state;
console.log("handleChange1");
let fileList = info.fileList;
this.setState({
fileList:fileList,
deleteisnot:false});
if(fileList.length===0){
let fileLists = info.fileList;
this.setState({
// fileList:appendFileSizeToUploadFileAll(fileList),
fileList:fileLists,
deleteisnot:false});
}
}
onAttachmentRemove = (file) => {
confirm({
@ -1051,32 +1056,12 @@ class Newshixuns extends Component {
<div className="mt10" style={{
display: "inline-block"
}}>
{/*<Form.Item>*/}
{/* {*/}
{/* getFieldDecorator('file',{*/}
{/* rules:[{*/}
{/* }]*/}
{/* })(*/}
{
deleteisnot=== true?
<Upload {...uploadProps} >
<Icon type="upload" className="fl mt3" > </Icon>
<span className="color-blue fl cdefault">上传附件</span>
<span className="color-grey-c fl ml10 ">(单个文件50M以内)</span>
</Upload>
:
<Upload {...uploadProps} disabled={true} >
<Icon type="upload" className="fl mt3" > </Icon>
<span className="color-grey-c fl">上传附件</span>
<span className="color-grey-c fl ml10 ">(单个文件50M以内)</span>
</Upload>
}
{/* )*/}
{/* }*/}
{/*</Form.Item>*/}
<Upload {...uploadProps}>
<Icon type="upload" className="fl mt3" > </Icon>
<span className="color-blue fl cdefault">上传附件</span>
<span className="color-grey-c fl ml10 ">(单个文件50M以内)</span>
</Upload>
</div>
</li>

Loading…
Cancel
Save