Compare commits

..

No commits in common. "fcd6efaa395312ab488f9afbdaac5da4f84352d2" and "b7de254b5f45a48ecc72834f3d473c3244bfcdf6" have entirely different histories.

4 changed files with 98 additions and 165 deletions

View File

@ -189,22 +189,11 @@
</template> </template>
<!-- 计算值 --> <!-- 计算值 -->
<Questions <Questions ref="ecrf2" :question-form-change-state="true" :question-form-change-num="0" :is-qulity-issues="false"
ref="ecrf2" :group-classify="4" style="margin-top:20px" />
:question-form-change-state="true"
:question-form-change-num="0"
:is-qulity-issues="false"
:group-classify="4"
:question-type="12"
style="margin-top:20px" />
<!-- 评估结果 --> <!-- 评估结果 -->
<Questions <Questions ref="ecrf3" :question-form-change-state="true" :question-form-change-num="0" :is-qulity-issues="false"
ref="ecrf3"
:question-form-change-state="true"
:question-form-change-num="0"
:is-qulity-issues="false"
:question-type="12"
:group-classify="5" /> :group-classify="5" />
<!-- 新增编辑弹窗 --> <!-- 新增编辑弹窗 -->
<el-dialog v-if="addOrEdit.visible" :visible.sync="addOrEdit.visible" :close-on-click-modal="false" <el-dialog v-if="addOrEdit.visible" :visible.sync="addOrEdit.visible" :close-on-click-modal="false"
@ -633,7 +622,7 @@ export default {
return v return v
} }
}, },
async handleSave(index, options = {}) { async handleSave(index) {
if (this.rowSaveLoadingMap[index]) return if (this.rowSaveLoadingMap[index]) return
const refName = `questions${index}` const refName = `questions${index}`
this.$set(this.rowSaveLoadingMap, index, true) this.$set(this.rowSaveLoadingMap, index, true)
@ -651,13 +640,9 @@ export default {
answers: answers answers: answers
} }
await saveTaskQuestion(12, params) await saveTaskQuestion(12, params)
if (!options.silentSuccess) {
this.$message.success(this.$t('common:message:savedSuccessfully')) this.$message.success(this.$t('common:message:savedSuccessfully'))
}
DicomEvent.$emit('getReportInfo', true) DicomEvent.$emit('getReportInfo', true)
if (!options.skipRefresh) { this.refreshQuestions()
await this.refreshQuestions()
}
this.formChanged = false this.formChanged = false
} catch (e) { } catch (e) {
console.log(e) console.log(e)
@ -873,23 +858,9 @@ export default {
} }
}, },
async uploadDlgClose() { async uploadDlgClose() {
try { this.refreshQuestions()
await this.refreshQuestions() DicomEvent.$emit('getReportInfo', true)
const saveTasks = []
for (let index = 0; index < this.questions.length; index++) {
const qs = this.questions[index]
if (qs.GroupClassify === 6) {
saveTasks.push(() => this.handleSave(index, { silentSuccess: true, skipRefresh: true }))
}
}
saveTasks.push(() => this.$refs['ecrf2'] && this.$refs['ecrf2'].handleSave({ silentSuccess: true, skipRefresh: true }))
saveTasks.push(() => this.$refs['ecrf3'] && this.$refs['ecrf3'].handleSave({ silentSuccess: true, skipRefresh: true }))
await Promise.allSettled(saveTasks.map(saveTask => saveTask()))
} catch (e) {
console.log(e)
} finally {
this.upload.visible = false this.upload.visible = false
}
}, },
renderHeader(h, { column, $index }) { renderHeader(h, { column, $index }) {
const span = document.createElement('span') const span = document.createElement('span')

View File

@ -189,22 +189,11 @@
</template> </template>
<!-- 计算值 --> <!-- 计算值 -->
<Questions <Questions ref="ecrf2" :question-form-change-state="true" :question-form-change-num="0" :is-qulity-issues="false"
ref="ecrf2" :group-classify="4" style="margin-top:20px" />
:question-form-change-state="true"
:question-form-change-num="0"
:is-qulity-issues="false"
:group-classify="4"
:question-type="12"
style="margin-top:20px" />
<!-- 评估结果 --> <!-- 评估结果 -->
<Questions <Questions ref="ecrf3" :question-form-change-state="true" :question-form-change-num="0" :is-qulity-issues="false"
ref="ecrf3"
:question-form-change-state="true"
:question-form-change-num="0"
:is-qulity-issues="false"
:question-type="12"
:group-classify="5" /> :group-classify="5" />
<el-dialog v-if="addOrEdit.visible" :visible.sync="addOrEdit.visible" :close-on-click-modal="false" <el-dialog v-if="addOrEdit.visible" :visible.sync="addOrEdit.visible" :close-on-click-modal="false"
:title="addOrEdit.title" width="500px"> :title="addOrEdit.title" width="500px">
@ -628,7 +617,7 @@ export default {
return v return v
} }
}, },
async handleSave(index, options = {}) { async handleSave(index) {
if (this.rowSaveLoadingMap[index]) return if (this.rowSaveLoadingMap[index]) return
const refName = `questions${index}` const refName = `questions${index}`
this.$set(this.rowSaveLoadingMap, index, true) this.$set(this.rowSaveLoadingMap, index, true)
@ -646,13 +635,9 @@ export default {
answers: answers answers: answers
} }
await saveTaskQuestion(12, params) await saveTaskQuestion(12, params)
if (!options.silentSuccess) {
this.$message.success(this.$t('common:message:savedSuccessfully')) this.$message.success(this.$t('common:message:savedSuccessfully'))
}
DicomEvent.$emit('getReportInfo', true) DicomEvent.$emit('getReportInfo', true)
if (!options.skipRefresh) { this.refreshQuestions()
await this.refreshQuestions()
}
this.formChanged = false this.formChanged = false
} catch (e) { } catch (e) {
console.log(e) console.log(e)
@ -899,23 +884,9 @@ export default {
} }
}, },
async uploadDlgClose() { async uploadDlgClose() {
try { this.refreshQuestions()
await this.refreshQuestions() DicomEvent.$emit('getReportInfo', true)
const saveTasks = []
for (let index = 0; index < this.questions.length; index++) {
const qs = this.questions[index]
if (qs.GroupClassify === 6) {
saveTasks.push(() => this.handleSave(index, { silentSuccess: true, skipRefresh: true }))
}
}
saveTasks.push(() => this.$refs['ecrf2'] && this.$refs['ecrf2'].handleSave({ silentSuccess: true, skipRefresh: true }))
saveTasks.push(() => this.$refs['ecrf3'] && this.$refs['ecrf3'].handleSave({ silentSuccess: true, skipRefresh: true }))
await Promise.allSettled(saveTasks.map(saveTask => saveTask()))
} catch (e) {
console.log(e)
} finally {
this.upload.visible = false this.upload.visible = false
}
}, },
renderHeader(h, { column, $index }) { renderHeader(h, { column, $index }) {
const span = document.createElement('span') const span = document.createElement('span')

View File

@ -279,24 +279,22 @@ export default {
}) })
}, },
async handleSave(options = {}) { handleSave() {
if (this.saveLoading) return false if (this.saveLoading) return
this.saveLoading = true this.saveLoading = true
const valid = await new Promise(resolve => { this.$refs['questions'].validate(async (valid) => {
this.$refs['questions'].validate(v => resolve(v))
})
if (!valid) { if (!valid) {
this.saveLoading = false this.saveLoading = false
return false return
} }
// lugano // lugano
if ((this.criterionType === 2 || this.criterionType === 18) && this.groupClassify === 3) { if ((this.criterionType === 2 || this.criterionType === 18) && this.groupClassify === 3) {
// //
var existUnSave = this.checkAnnotationStatus(this.questions) var existUnSave = this.checkAnnotationStatus(this.questions)
if (existUnSave) { if (existUnSave) {
await this.$alert(this.$t('trials:lugano:message:saveWarning'), this.$t('trials:lugano:fusionDialog:warning')) this.$alert(this.$t('trials:lugano:message:saveWarning'), this.$t('trials:lugano:fusionDialog:warning'))
this.saveLoading = false this.saveLoading = false
return false return
} }
var currentSpleenStatus = this.questionForm[this.spleenStatusId] var currentSpleenStatus = this.questionForm[this.spleenStatusId]
@ -307,26 +305,24 @@ export default {
if (currentSpleenLength && currentSpleenStatus === 5) { if (currentSpleenLength && currentSpleenStatus === 5) {
// '!' // '!'
await this.$alert(this.$t('trials:lugano:message:validSpleen1'), this.$t('trials:lugano:fusionDialog:warning'), { this.$alert(this.$t('trials:lugano:message:validSpleen1'), this.$t('trials:lugano:fusionDialog:warning'), {
callback: _ => { } callback: _ => { }
}) })
this.saveLoading = false this.saveLoading = false
return false
} else if (currentSpleenStatus === 5 && ((stIdx > -1 && this.measurements[stIdx].MeasureData) || (slIdx > -1 && this.measurements[slIdx].MeasureData))) { } else if (currentSpleenStatus === 5 && ((stIdx > -1 && this.measurements[stIdx].MeasureData) || (slIdx > -1 && this.measurements[slIdx].MeasureData))) {
// //
await this.$alert(this.$t('trials:lugano:message:validSpleen1'), this.$t('trials:lugano:fusionDialog:warning'), { this.$alert(this.$t('trials:lugano:message:validSpleen1'), this.$t('trials:lugano:fusionDialog:warning'), {
callback: _ => { } callback: _ => { }
}) })
this.saveLoading = false this.saveLoading = false
return false
} else if (((stIdx > -1 && this.measurements[stIdx].MeasureData) || (slIdx > -1 && this.measurements[slIdx].MeasureData)) && !currentSpleenLength) { } else if (((stIdx > -1 && this.measurements[stIdx].MeasureData) || (slIdx > -1 && this.measurements[slIdx].MeasureData)) && !currentSpleenLength) {
await this.$alert(this.$t('trials:lugano:message:validSpleen2'), this.$t('trials:lugano:fusionDialog:warning'), { this.$alert(this.$t('trials:lugano:message:validSpleen2'), this.$t('trials:lugano:fusionDialog:warning'), {
callback: _ => { } callback: _ => { }
}) })
this.saveLoading = false this.saveLoading = false
return false } else {
this.saveQuestionsList()
} }
return await this.saveQuestionsList(options)
} else if ((this.criterionType === 2 || this.criterionType === 18) && this.groupClassify === 1 && this.questionForm[this.imageQualityIssuesId] && parseInt(this.questionForm[this.imageQualityIssuesId]) === 6) { } else if ((this.criterionType === 2 || this.criterionType === 18) && this.groupClassify === 1 && this.questionForm[this.imageQualityIssuesId] && parseInt(this.questionForm[this.imageQualityIssuesId]) === 6) {
// PET-CT // PET-CT
let res = null let res = null
@ -337,28 +333,30 @@ export default {
} }
if (res.IsSuccess && !res.Result.IsCanChooseNotMerge) { if (res.IsSuccess && !res.Result.IsCanChooseNotMerge) {
await this.$alert(this.$t('trials:lugano:saveQuestions:warning1'), this.$t('trials:lugano:fusionDialog:warning'), { // this.$alert(this.$t('trials:lugano:saveQuestions:warning1'), this.$t('trials:lugano:fusionDialog:warning'), {showCancelButton: false})
this.$alert(this.$t('trials:lugano:saveQuestions:warning1'), this.$t('trials:lugano:fusionDialog:warning'), {
showCancelButton: false, showCancelButton: false,
callback: action => { } callback: action => { }
}) })
this.saveLoading = false this.saveLoading = false
return false return
} } else {
// PET-CTFDG-PETNE // PET-CTFDG-PETNE
const confirm = await this.$confirm(this.$t('trials:lugano:saveQuestions:warning2'), { this.$confirm(this.$t('trials:lugano:saveQuestions:warning2'), {
type: 'warning', type: 'warning',
distinguishCancelAndClose: true distinguishCancelAndClose: true
}).then(() => true).catch(() => false) })
if (!confirm) { .then(() => {
this.saveLoading = false this.saveQuestionsList()
return false })
} }
return await this.saveQuestionsList(options)
} else { } else {
return await this.saveQuestionsList(options) this.saveQuestionsList()
} }
// this.saveQuestionsList()
})
}, },
async saveQuestionsList(options = {}) { async saveQuestionsList() {
this.loading = true this.loading = true
var answers = [] var answers = []
var imageQuality = null var imageQuality = null
@ -384,22 +382,18 @@ export default {
// }) // })
// params.questionMarkInfoList = questionMarkInfoList // params.questionMarkInfoList = questionMarkInfoList
// } // }
try {
const res = await saveTaskQuestion(this.questionType, params) saveTaskQuestion(this.questionType, params).then(async res => {
if (this.imageQualityIssuesId) { if (this.imageQualityIssuesId) {
store.dispatch('reading/setImageQualityIssues', this.questionForm[this.imageQualityIssuesId]) store.dispatch('reading/setImageQualityIssues', this.questionForm[this.imageQualityIssuesId])
if (this.questionForm[this.imageQualityIssuesId] && parseInt(this.questionForm[this.imageQualityIssuesId]) === 6) { if (this.questionForm[this.imageQualityIssuesId] && parseInt(this.questionForm[this.imageQualityIssuesId]) === 6) {
DicomEvent.$emit('closePetct') DicomEvent.$emit('closePetct')
} }
} }
if (!options.silentSuccess) {
this.$message.success(this.$t('common:message:savedSuccessfully')) this.$message.success(this.$t('common:message:savedSuccessfully'))
}
if (!options.skipRefresh) {
var trialId = this.$route.query.trialId var trialId = this.$route.query.trialId
await store.dispatch('reading/refreshDicomReadingQuestionAnswer', { trialId: trialId, visitTaskId: this.visitTaskId }) await store.dispatch('reading/refreshDicomReadingQuestionAnswer', { trialId: trialId, visitTaskId: this.visitTaskId })
this.getQuestions(this.visitTaskId, true) this.getQuestions(this.visitTaskId, true)
}
this.loading = false this.loading = false
if (this.isQulityIssues) { if (this.isQulityIssues) {
DicomEvent.$emit('questionFormChange', false) DicomEvent.$emit('questionFormChange', false)
@ -423,12 +417,10 @@ export default {
} }
this.formChanged = false this.formChanged = false
this.saveLoading = false this.saveLoading = false
return res }).catch(() => {
} catch (e) {
this.loading = false this.loading = false
this.saveLoading = false this.saveLoading = false
throw e })
}
}, },
checkAnnotationStatus(obj) { checkAnnotationStatus(obj) {
for (let i = 0; i < obj.length; i++) { for (let i = 0; i < obj.length; i++) {

View File

@ -147,7 +147,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div style="text-align:right;margin-top: 10px;" v-if="!IsViewStudyPart"> <div style="text-align:right;margin-top: 10px;">
<!-- 确认 --> <!-- 确认 -->
<el-button type="primary" @click="handleConfirmBP">{{ $t('trials:reading:button:confirm') <el-button type="primary" @click="handleConfirmBP">{{ $t('trials:reading:button:confirm')
}}</el-button> }}</el-button>
@ -223,8 +223,7 @@ export default {
readingVersionEnum: null, readingVersionEnum: null,
dialogBodyPartVisible: false, dialogBodyPartVisible: false,
isReadKeyFile: true, isReadKeyFile: true,
isHaveKeyFile: false, isHaveKeyFile: false
IsViewStudyPart: true
} }
}, },
computed: { computed: {