|
|
@ -113,13 +113,15 @@ export default { |
|
|
leaderNameEn:'', |
|
|
leaderNameEn:'', |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
saveList:[] |
|
|
|
|
|
|
|
|
saveList:[], |
|
|
|
|
|
oldList:[]//之前选择的,没修改就不用签名 |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
memberSubject:{}, |
|
|
memberSubject:{}, |
|
|
|
|
|
|
|
|
signType:'', |
|
|
signType:'', |
|
|
memberList:[] |
|
|
|
|
|
|
|
|
memberList:[], |
|
|
|
|
|
memberOldList:[]//之前选择的,没修改就不用签名 |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
created() {}, |
|
|
created() {}, |
|
|
@ -156,6 +158,8 @@ export default { |
|
|
studySubject_getAllListByStudyId({studyId:this.study.id}).then(response => { |
|
|
studySubject_getAllListByStudyId({studyId:this.study.id}).then(response => { |
|
|
this.infoDialog.list = response.data; |
|
|
this.infoDialog.list = response.data; |
|
|
this.infoDialog.visible = true; |
|
|
this.infoDialog.visible = true; |
|
|
|
|
|
|
|
|
|
|
|
this.infoDialog.oldList = _.cloneDeep(_.filter(this.infoDialog.list, (o)=> { return o.select })) |
|
|
}).finally(()=>{ |
|
|
}).finally(()=>{ |
|
|
this.infoDialog.loading = false; |
|
|
this.infoDialog.loading = false; |
|
|
}); |
|
|
}); |
|
|
@ -171,21 +175,48 @@ export default { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
this.infoDialog.saveList = postList |
|
|
|
|
|
|
|
|
//判断是否有修改 |
|
|
|
|
|
let isModify = false |
|
|
|
|
|
if(postList.length===this.infoDialog.oldList.length){ |
|
|
|
|
|
if(postList.length>0){ |
|
|
|
|
|
for(let i=0;i<postList.length;i++){ |
|
|
|
|
|
let item = postList[i] |
|
|
|
|
|
let find = false |
|
|
|
|
|
|
|
|
this.$modal.loading() |
|
|
|
|
|
studySubject_save({ |
|
|
|
|
|
studyId:this.study.id, |
|
|
|
|
|
subjectList:this.infoDialog.saveList, |
|
|
|
|
|
sign:{} |
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
this.signType = 'save' |
|
|
|
|
|
this.$refs.subjectSignRef.show(this.$t('page.business.study.study.rybg'),this.$t('page.business.study.study.rybg')) |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
}).finally(() => { |
|
|
|
|
|
this.$modal.closeLoading() |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(let j=0;j<this.infoDialog.oldList.length;j++){ |
|
|
|
|
|
let old = this.infoDialog.oldList[j] |
|
|
|
|
|
if(old.deptId==item.deptId && old.deptName==item.deptName && old.leader==item.leader && old.leaderName==item.leaderName){ |
|
|
|
|
|
find = true |
|
|
|
|
|
break |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if(!find){ |
|
|
|
|
|
isModify = true |
|
|
|
|
|
break |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}else{ |
|
|
|
|
|
isModify = true |
|
|
|
|
|
} |
|
|
|
|
|
if(!isModify){ |
|
|
|
|
|
this.infoDialog.visible = false |
|
|
|
|
|
}else{ |
|
|
|
|
|
this.infoDialog.saveList = postList |
|
|
|
|
|
|
|
|
|
|
|
this.$modal.loading() |
|
|
|
|
|
studySubject_save({ |
|
|
|
|
|
studyId:this.study.id, |
|
|
|
|
|
subjectList:this.infoDialog.saveList, |
|
|
|
|
|
sign:{} |
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
this.signType = 'save' |
|
|
|
|
|
this.$refs.subjectSignRef.show(this.$t('page.business.study.study.rybg'),this.$t('page.business.study.study.rybg')) |
|
|
|
|
|
}).catch(() => { |
|
|
|
|
|
}).finally(() => { |
|
|
|
|
|
this.$modal.closeLoading() |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
doSign(val){ |
|
|
doSign(val){ |
|
|
if(this.signType==='save'){ |
|
|
if(this.signType==='save'){ |
|
|
@ -237,6 +268,7 @@ export default { |
|
|
nameEn:response.data[i].userNameEn, |
|
|
nameEn:response.data[i].userNameEn, |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
|
|
|
this.memberOldList = _.cloneDeep(memberList) |
|
|
this.$refs.selectSubjectDeptUserMultipleDialog.show(memberList) |
|
|
this.$refs.selectSubjectDeptUserMultipleDialog.show(memberList) |
|
|
}).finally(()=>{ |
|
|
}).finally(()=>{ |
|
|
}); |
|
|
}); |
|
|
@ -253,19 +285,46 @@ export default { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
this.memberList = postList |
|
|
|
|
|
studySubjectUser_save({ |
|
|
|
|
|
studySubjectId:this.memberSubject.id, |
|
|
|
|
|
subjectUserList:this.memberList, |
|
|
|
|
|
sign:{} |
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
|
|
|
//对比是否有修改 |
|
|
|
|
|
let isModify = false |
|
|
|
|
|
if(postList.length===this.memberOldList.length){ |
|
|
|
|
|
if(postList.length>0){ |
|
|
|
|
|
for(let i=0;i<postList.length;i++){ |
|
|
|
|
|
let item = postList[i] |
|
|
|
|
|
let find = false |
|
|
|
|
|
|
|
|
|
|
|
for(let j=0;j<this.memberOldList.length;j++){ |
|
|
|
|
|
let old = this.memberOldList[j] |
|
|
|
|
|
if(old.id==item.userId && old.name==item.userName){ |
|
|
|
|
|
find = true |
|
|
|
|
|
break |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if(!find){ |
|
|
|
|
|
isModify = true |
|
|
|
|
|
break |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}else{ |
|
|
|
|
|
isModify = true |
|
|
|
|
|
} |
|
|
|
|
|
if(!isModify){ |
|
|
this.$refs.selectSubjectDeptUserMultipleDialog.close() |
|
|
this.$refs.selectSubjectDeptUserMultipleDialog.close() |
|
|
this.signType = 'member' |
|
|
|
|
|
this.$refs.subjectSignRef.show(this.$t('page.business.study.study.rybg'),this.$t('page.business.study.study.rybg')) |
|
|
|
|
|
}).catch((e) => { |
|
|
|
|
|
}).finally(() => { |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
this.memberList = postList |
|
|
|
|
|
studySubjectUser_save({ |
|
|
|
|
|
studySubjectId:this.memberSubject.id, |
|
|
|
|
|
subjectUserList:this.memberList, |
|
|
|
|
|
sign:{} |
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
this.$refs.selectSubjectDeptUserMultipleDialog.close() |
|
|
|
|
|
this.signType = 'member' |
|
|
|
|
|
this.$refs.subjectSignRef.show(this.$t('page.business.study.study.rybg'),this.$t('page.business.study.study.rybg')) |
|
|
|
|
|
}).catch((e) => { |
|
|
|
|
|
}).finally(() => { |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
doChangeMember(sign){ |
|
|
doChangeMember(sign){ |
|
|
|