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 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()
if(!isGroup){
@ -152,11 +153,11 @@ class CommonWorkPost extends Component{
}
let listid=[];
for(var list of fileList){
listid.push(list.id || list.response.id)
if(fileList!=undefined&&fileList.length>0) {
for (var list of fileList) {
listid.push(list.id || list.response.id)
}
}
e.preventDefault();
if( true ){
this.props.form.validateFields((err, values) => {

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

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

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

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

Loading…
Cancel
Save