dev_static
杨树明 5 years ago
parent 50b7c9e757
commit 5b4194b553

@ -138,13 +138,14 @@ class CommonWorkPost extends Component{
let {fileList,selectmemberslist,workslist, memberNumMin, memberNumMax}=this.state; let {fileList,selectmemberslist,workslist, memberNumMin, memberNumMax}=this.state;
let userids=[]; let userids=[];
if(selectmemberslist!=undefined&&selectmemberslist.length>0) {
for (var list of selectmemberslist) {
for(var list of selectmemberslist){ if (list.user_id != undefined && list.user_id != null) {
userids.push(list.user_id)
}
if(list.user_id!=undefined&&list.user_id!=null){
userids.push(list.user_id)
} }
} }
const isGroup = this.props.isGroup() const isGroup = this.props.isGroup()
if(!isGroup){ if(!isGroup){
@ -152,11 +153,11 @@ class CommonWorkPost extends Component{
} }
let listid=[]; let listid=[];
if(fileList!=undefined&&fileList.length>0) {
for(var list of fileList){ for (var list of fileList) {
listid.push(list.id || list.response.id) listid.push(list.id || list.response.id)
}
} }
e.preventDefault(); e.preventDefault();
if( true ){ if( true ){
this.props.form.validateFields((err, values) => { this.props.form.validateFields((err, values) => {

@ -125,10 +125,11 @@ class AccessoryModal extends Component{
let {fileList,description} =this.state; let {fileList,description} =this.state;
let newfileList=[]; let newfileList=[];
for(var list of fileList){ if(fileList!=undefined&&fileList.length>0) {
for (var list of fileList) {
newfileList.push(list.response.id) newfileList.push(list.response.id)
} }
}
if (newfileList.length == 0) { if (newfileList.length == 0) {
// this.props.showNotification('请先上传附件') // this.props.showNotification('请先上传附件')
if(this.props.modalname === "补交附件"){ if(this.props.modalname === "补交附件"){
@ -194,8 +195,10 @@ class AccessoryModal extends Component{
let {fileList,description} =this.state; let {fileList,description} =this.state;
let newfileList=[]; let newfileList=[];
for(var list of fileList){ if(fileList!=undefined&&fileList.length>0) {
newfileList.push(list.response.id) for (var list of fileList) {
newfileList.push(list.response.id)
}
} }
let url= this.props.reviseAttachmentUrl || "/graduation_works/"+id+"/revise_attachment.json" let url= this.props.reviseAttachmentUrl || "/graduation_works/"+id+"/revise_attachment.json"
axios.post(url,{ axios.post(url,{

@ -127,8 +127,10 @@ class AccessoryModal2 extends Component{
// debugger // debugger
let {fileList,description} =this.state; let {fileList,description} =this.state;
let newfileList=[]; let newfileList=[];
for(var list of fileList){ if(fileList!=undefined&&fileList.length>0) {
newfileList.push(list.response.id) for (var list of fileList) {
newfileList.push(list.response.id)
}
} }
this.props.Saves && this.props.Saves(newfileList, description) this.props.Saves && this.props.Saves(newfileList, description)
return; return;

@ -205,13 +205,15 @@ class GraduationTasksedit extends Component{
Commoninterface=(fileList)=>{ Commoninterface=(fileList)=>{
let listid=[] let listid=[]
let graduation_id=this.state.data.graduation_id; let graduation_id=this.state.data.graduation_id;
for(var list of fileList){ if(fileList!=undefined&&fileList.length>0) {
if(list.response!=undefined){ for (var list of fileList) {
listid.push(list.response.id) if (list.response != undefined) {
}else{ listid.push(list.response.id)
listid.push(list.uid) } else {
} listid.push(list.uid)
}
}
} }
// console.log(listid) // console.log(listid)

@ -35,10 +35,11 @@ class CreateGroupByImportModal extends Component{
return; return;
} }
let newfileList=[]; let newfileList=[];
for(var list of fileList){ if(fileList!=undefined&&fileList.length>0) {
for (var list of fileList) {
newfileList.push(list.response.id) newfileList.push(list.response.id)
}
} }
axios.post(url, { axios.post(url, {
attachment_ids: newfileList attachment_ids: newfileList
}) })

Loading…
Cancel
Save