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

@ -138,7 +138,7 @@ 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) { if (list.user_id != undefined && list.user_id != null) {
@ -146,17 +146,18 @@ class CommonWorkPost extends Component{
} }
} }
}
const isGroup = this.props.isGroup() const isGroup = this.props.isGroup()
if(!isGroup){ if(!isGroup){
userids=undefined userids=undefined
} }
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=[];
if(fileList!=undefined&&fileList.length>0) {
for (var list of fileList) { 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,9 +195,11 @@ class AccessoryModal extends Component{
let {fileList,description} =this.state; let {fileList,description} =this.state;
let newfileList=[]; let newfileList=[];
if(fileList!=undefined&&fileList.length>0) {
for (var list of fileList) { for (var list of fileList) {
newfileList.push(list.response.id) 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,{
description:description, description:description,

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

@ -205,6 +205,7 @@ 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;
if(fileList!=undefined&&fileList.length>0) {
for (var list of fileList) { for (var list of fileList) {
if (list.response != undefined) { if (list.response != undefined) {
listid.push(list.response.id) listid.push(list.response.id)
@ -213,6 +214,7 @@ class GraduationTasksedit extends Component{
} }
} }
}
// console.log(listid) // console.log(listid)
// if(GraduationTasksedittype===true){ // if(GraduationTasksedittype===true){

@ -35,10 +35,11 @@ class CreateGroupByImportModal extends Component{
return; return;
} }
let newfileList=[]; let newfileList=[];
if(fileList!=undefined&&fileList.length>0) {
for (var list of fileList) { 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