Compare commits

..

No commits in common. "72d0494baadf8c6f5b03ad75671bd6392e41ed71" and "76e6ef087fda8aefb0f201a898968cd14d4cc7e5" have entirely different histories.

3 changed files with 49 additions and 67 deletions

View File

@ -209,28 +209,24 @@ export default {
}, },
methods: { methods: {
// //
async getMessageList() { getMessageList() {
try { this.loading = true
this.loading = true var param = {
var param = { taskMedicalReviewId: this.taskMedicalReviewId
taskMedicalReviewId: this.taskMedicalReviewId }
} getMedicalReviewDialog(param).then(res => {
let res = await getMedicalReviewDialog(param)
this.otherInfo = res.OtherInfo this.otherInfo = res.OtherInfo
this.recordContent = res.Result this.recordContent = res.Result
this.setScrollHeight() this.setScrollHeight()
this.loading = false this.loading = false
} catch(e) { }).catch(() => {
console.log(e)
this.loading = false this.loading = false
} })
}, },
setScrollHeight() { setScrollHeight() {
setTimeout(() => { setTimeout(() => {
var container = document.querySelectorAll('.chat-content')[0] var container = document.querySelectorAll('.chat-content')[0]
if (container && container.scrollHeight) { container.scrollTop = container.scrollHeight
container.scrollTop = container.scrollHeight
}
}, 100) }, 100)
}, },
// //

View File

@ -80,32 +80,26 @@ export default {
handleClose() { handleClose() {
this.$emit('close') this.$emit('close')
}, },
async handleSave() { handleSave() {
let validate = await this.$refs['closeQCForm'].validate() this.$refs['closeQCForm'].validate((valid) => {
if (!validate) return if (!valid) return
this.form.TaskMedicalReviewId = this.taskMedicalReviewId this.loading = true
this.form.IsClosedDialog = true this.form.TaskMedicalReviewId = this.taskMedicalReviewId
this.$emit('closeAndSign', this.form) this.form.IsClosedDialog = true
}, closedMedicalReviewDialog(this.form)
// handleSave() { .then(res => {
// this.$refs['closeQCForm'].validate((valid) => { this.loading = false
// if (!valid) return if (res.IsSuccess) {
// this.loading = true // !
// this.form.TaskMedicalReviewId = this.taskMedicalReviewId this.$message.success(this.$t('trials:qcQuality:message:closedSuccessfully'))
// this.form.IsClosedDialog = true this.$emit('close')
// closedMedicalReviewDialog(this.form) this.$emit('refresh')
// .then(res => { }
// this.loading = false }).catch(() => {
// if (res.IsSuccess) { this.loading = false
// // ! })
// this.$message.success(this.$t('trials:qcQuality:message:closedSuccessfully')) })
// this.$emit('refresh') }
// }
// }).catch(() => {
// this.loading = false
// })
// })
// }
} }
} }
</script> </script>

View File

@ -553,8 +553,8 @@
> >
<CloseQC <CloseQC
:task-medical-review-id="currentRow.Id" :task-medical-review-id="currentRow.Id"
@closeAndSign="closeAndSign"
@close="closeQuestionVisible = false" @close="closeQuestionVisible = false"
@refresh="refresh"
/> />
</el-dialog> </el-dialog>
<!--签名框 --> <!--签名框 -->
@ -645,8 +645,7 @@ export default {
signCode: null, signCode: null,
currentUser: zzSessionStorage.getItem('userName'), currentUser: zzSessionStorage.getItem('userName'),
signVisible: false, signVisible: false,
timeList: [], timeList: []
closeObj: null
} }
}, },
watch: { watch: {
@ -698,12 +697,6 @@ export default {
this.TrialReadingCriterionId = this.trialCriterionList[0].TrialReadingCriterionId this.TrialReadingCriterionId = this.trialCriterionList[0].TrialReadingCriterionId
}).catch(() => {}) }).catch(() => {})
}, },
closeAndSign(obj) {
this.closeObj = Object.assign({}, obj)
const { MedicalAudit } = const_.processSignature
this.signCode = MedicalAudit
this.signVisible = true
},
// //
closeSignDialog(isSign, signInfo) { closeSignDialog(isSign, signInfo) {
if (isSign) { if (isSign) {
@ -713,39 +706,38 @@ export default {
} }
}, },
// //
async signConfirm(signInfo) { signConfirm(signInfo) {
try { this.loading = true
this.loading = true const params = {
const params = { data: {
data: { taskMedicalReviewId: this.currentRow.Id
taskMedicalReviewId: this.currentRow.Id, },
isClosedDialog: this.closeObj.IsClosedDialog, signInfo: signInfo
medicalDialogCloseEnum: this.closeObj.MedicalDialogCloseEnum, }
dialogCloseReason: this.closeObj.DialogCloseReason, FinishMedicalReview(params).then(res => {
},
signInfo: signInfo
}
let res = await FinishMedicalReview(params)
if (res.IsSuccess) { if (res.IsSuccess) {
await this.$refs['chatForm'].getMessageList()
this.$message.success(this.$t('common:message:savedSuccessfully')) this.$message.success(this.$t('common:message:savedSuccessfully'))
this.$refs['signForm'].btnLoading = false this.$refs['signForm'].btnLoading = false
this.signVisible = false this.signVisible = false
this.$nextTick(() => { this.$nextTick(() => {
this.closeQuestionVisible = false
this.chatForm.visible = false this.chatForm.visible = false
}) })
await this.getList()
this.$emit('nextTask', this.taskMedicalReviewId)
} }
this.loading = false this.loading = false
this.getList()
.then(() => {
this.loading = true
this.$emit('nextTask', this.taskMedicalReviewId)
})
.catch(action => {
} catch(e) { })
}).catch(_ => {
this.loading = false this.loading = false
if (this.$refs['signForm']) { if (this.$refs['signForm']) {
this.$refs['signForm'].btnLoading = false this.$refs['signForm'].btnLoading = false
} }
} })
}, },
changeTimeList() { changeTimeList() {
if (this.timeList) { if (this.timeList) {