diff --git a/src/views/business/archive/drugConfig/list.vue b/src/views/business/archive/drugConfig/list.vue index 58806e0..cc586c7 100644 --- a/src/views/business/archive/drugConfig/list.vue +++ b/src/views/business/archive/drugConfig/list.vue @@ -163,7 +163,7 @@ export default { }, gd(row,status) { this.operate = 'gd' - this.operateRow = _.clone(row) + this.operateRow = _.cloneDeep(row) this.operateRow.status = status this.$refs.signRef.show( status==9?this.$t('page.business.study.drug.tygd'):this.$t('page.business.study.drug.jjgd'), @@ -190,7 +190,7 @@ export default { }, jd(row,status) { this.operate = 'jd' - this.operateRow = _.clone(row) + this.operateRow = _.cloneDeep(row) this.operateRow.status = status this.$refs.signRef.show( status==5?this.$t('page.business.study.drug.tyjd'):this.$t('page.business.study.drug.jjjd'), @@ -218,7 +218,7 @@ export default { jy(row,status) { this.operate = 'jy' - this.operateRow = _.clone(row) + this.operateRow = _.cloneDeep(row) this.operateRow.borrowStatus = status this.$refs.signRef.show( status==10?this.$t('page.business.study.drug.tyjy'):this.$t('page.business.study.drug.jjjy'), diff --git a/src/views/business/archive/nonTrial/list.vue b/src/views/business/archive/nonTrial/list.vue index 15581d7..6c54502 100644 --- a/src/views/business/archive/nonTrial/list.vue +++ b/src/views/business/archive/nonTrial/list.vue @@ -163,7 +163,7 @@ export default { }, gd(row,status) { this.operate = 'gd' - this.operateRow = _.clone(row) + this.operateRow = _.cloneDeep(row) this.operateRow.status = status this.$refs.signRef.show( status==9?this.$t('page.business.study.nonTrial.tygd'):this.$t('page.business.study.nonTrial.jjgd'), @@ -190,7 +190,7 @@ export default { }, jd(row,status) { this.operate = 'jd' - this.operateRow = _.clone(row) + this.operateRow = _.cloneDeep(row) this.operateRow.status = status this.$refs.signRef.show( status==5?this.$t('page.business.study.nonTrial.tyjd'):this.$t('page.business.study.nonTrial.jjjd'), @@ -218,7 +218,7 @@ export default { jy(row,status) { this.operate = 'jy' - this.operateRow = _.clone(row) + this.operateRow = _.cloneDeep(row) this.operateRow.borrowStatus = status this.$refs.signRef.show( status==10?this.$t('page.business.study.nonTrial.tyjy'):this.$t('page.business.study.nonTrial.jjjy'), diff --git a/src/views/business/archive/trial/list.vue b/src/views/business/archive/trial/list.vue index db9ab42..2ad9c52 100644 --- a/src/views/business/archive/trial/list.vue +++ b/src/views/business/archive/trial/list.vue @@ -163,7 +163,7 @@ export default { }, gd(row,status) { this.operate = 'gd' - this.operateRow = _.clone(row) + this.operateRow = _.cloneDeep(row) this.operateRow.status = status this.$refs.signRef.show( status==9?this.$t('page.business.study.study.tygd'):this.$t('page.business.study.study.jjgd'), @@ -190,7 +190,7 @@ export default { }, jd(row,status) { this.operate = 'jd' - this.operateRow = _.clone(row) + this.operateRow = _.cloneDeep(row) this.operateRow.status = status this.$refs.signRef.show( status==5?this.$t('page.business.study.study.tyjd'):this.$t('page.business.study.study.jjjd'), @@ -218,7 +218,7 @@ export default { jy(row,status) { this.operate = 'jy' - this.operateRow = _.clone(row) + this.operateRow = _.cloneDeep(row) this.operateRow.borrowStatus = status this.$refs.signRef.show( status==10?this.$t('page.business.study.study.tyjy'):this.$t('page.business.study.study.jjjy'), diff --git a/src/views/business/stepGroup/list.vue b/src/views/business/stepGroup/list.vue index c8feb5b..edcb80a 100644 --- a/src/views/business/stepGroup/list.vue +++ b/src/views/business/stepGroup/list.vue @@ -189,7 +189,7 @@ export default { selectStep(row){ this.stepDialog.visible = true - this.stepDialog.data = _.clone(row) + this.stepDialog.data = _.cloneDeep(row) this.stepDialog.loading = true step_list({ pageNum: 1, pageSize:9999}).then(response => { this.stepDialog.stepList = response.rows diff --git a/src/views/business/study/comp/suject.vue b/src/views/business/study/comp/suject.vue index a8eaf24..3b04eef 100644 --- a/src/views/business/study/comp/suject.vue +++ b/src/views/business/study/comp/suject.vue @@ -113,13 +113,15 @@ export default { leaderNameEn:'', }, - saveList:[] + saveList:[], + oldList:[]//之前选择的,没修改就不用签名 }, memberSubject:{}, signType:'', - memberList:[] + memberList:[], + memberOldList:[]//之前选择的,没修改就不用签名 } }, created() {}, @@ -156,6 +158,8 @@ export default { studySubject_getAllListByStudyId({studyId:this.study.id}).then(response => { this.infoDialog.list = response.data; this.infoDialog.visible = true; + + this.infoDialog.oldList = _.cloneDeep(_.filter(this.infoDialog.list, (o)=> { return o.select })) }).finally(()=>{ 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 { - 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.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){ if(this.signType==='save'){ @@ -237,6 +268,7 @@ export default { nameEn:response.data[i].userNameEn, }) } + this.memberOldList = _.cloneDeep(memberList) this.$refs.selectSubjectDeptUserMultipleDialog.show(memberList) }).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 { - }).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){