|
|
|
@ -51,6 +51,8 @@ |
|
|
|
|
|
|
|
<SelectDeptUserDialog ref="selectSubjectDeptUserDialog" @change="changeSubject" /> |
|
|
|
<SelectDeptUserMultipleDialog ref="selectSubjectDeptUserMultipleDialog" @change="changeMember" /> |
|
|
|
|
|
|
|
<Sign ref="subjectSignRef" @callback="doSign" /> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
@ -66,6 +68,7 @@ import { |
|
|
|
} from '@/api/business/study/studySubjectUser' |
|
|
|
import SelectDeptUserDialog from '../../comps/select/SelectDeptUserDialog.vue'; |
|
|
|
import SelectDeptUserMultipleDialog from '../../comps/select/SelectDeptUserMultipleDialog.vue'; |
|
|
|
import Sign from './sign.vue' |
|
|
|
export default { |
|
|
|
name: 'StudySubject', |
|
|
|
props: { |
|
|
|
@ -84,7 +87,7 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
components: {SelectDeptUserDialog,SelectDeptUserMultipleDialog}, |
|
|
|
components: {SelectDeptUserDialog,SelectDeptUserMultipleDialog,Sign}, |
|
|
|
computed: {}, |
|
|
|
filters: {}, |
|
|
|
data() { |
|
|
|
@ -100,10 +103,15 @@ export default { |
|
|
|
subject:{ |
|
|
|
leader:'', |
|
|
|
leaderName:'', |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
saveList:[] |
|
|
|
}, |
|
|
|
|
|
|
|
memberSubject:{} |
|
|
|
memberSubject:{}, |
|
|
|
|
|
|
|
signType:'', |
|
|
|
memberList:[] |
|
|
|
} |
|
|
|
}, |
|
|
|
created() {}, |
|
|
|
@ -140,12 +148,27 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.infoDialog.saveList = postList |
|
|
|
this.signType = 'save' |
|
|
|
this.$refs.subjectSignRef.show(this.$t('page.business.study.study.rybg'),this.$t('page.business.study.study.rybg')) |
|
|
|
}, |
|
|
|
doSign(val){ |
|
|
|
if(this.signType==='save'){ |
|
|
|
this.doSave(val) |
|
|
|
} |
|
|
|
if(this.signType==='member'){ |
|
|
|
this.doChangeMember(val) |
|
|
|
} |
|
|
|
}, |
|
|
|
doSave(sign){ |
|
|
|
this.$modal.loading() |
|
|
|
studySubject_save({ |
|
|
|
studyId:this.study.id, |
|
|
|
subjectList:postList |
|
|
|
subjectList:this.infoDialog.saveList, |
|
|
|
sign:sign |
|
|
|
}).then(() => { |
|
|
|
this.infoDialog.visible = false |
|
|
|
this.$refs.subjectSignRef.cancel() |
|
|
|
this.getList() |
|
|
|
}).finally(() => { |
|
|
|
this.$modal.closeLoading() |
|
|
|
@ -166,6 +189,7 @@ export default { |
|
|
|
this.infoDialog.list.splice(index,1,this.infoDialog.subject) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
yq(item){ |
|
|
|
this.memberSubject = item |
|
|
|
studySubjectUser_getListByStudySubjectId({studySubjectId:item.id}).then(response => { |
|
|
|
@ -191,11 +215,19 @@ export default { |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
this.memberList = postList |
|
|
|
this.signType = 'member' |
|
|
|
this.$refs.subjectSignRef.show(this.$t('page.business.study.study.rybg'),this.$t('page.business.study.study.rybg')) |
|
|
|
}, |
|
|
|
|
|
|
|
doChangeMember(sign){ |
|
|
|
this.$modal.loading() |
|
|
|
studySubjectUser_save({ |
|
|
|
studySubjectId:this.memberSubject.id, |
|
|
|
subjectUserList:postList |
|
|
|
subjectUserList:this.memberList, |
|
|
|
sign:sign |
|
|
|
}).then(() => { |
|
|
|
this.$refs.subjectSignRef.cancel() |
|
|
|
}).finally(() => { |
|
|
|
this.$modal.closeLoading() |
|
|
|
}) |
|
|
|
|