阅片完成状态下radio样式更改;阅片中提交和保存优化;
continuous-integration/drone/push Build is passing Details

rj
caiyiling 2026-06-30 16:00:52 +08:00
parent e184b5255d
commit bb00ac10f8
48 changed files with 955 additions and 447 deletions

View File

@ -208,11 +208,11 @@
{{ $t("trials:readingReport:button:skip") }} {{ $t("trials:readingReport:button:skip") }}
</el-button> </el-button>
<!-- 保存 --> <!-- 保存 -->
<el-button type="primary" @click="handleSave">{{ <el-button type="primary" :loading="submitLockAction === 'save'" :disabled="!!submitLockAction" @click="handleSave">{{
$t("common:button:save") $t("common:button:save")
}}</el-button> }}</el-button>
<!-- 提交 --> <!-- 提交 -->
<el-button type="primary" @click="handleSubmit">{{ <el-button type="primary" :loading="submitLockAction === 'submit'" :disabled="!!submitLockAction" @click="handleSubmit">{{
$t("common:button:submit") $t("common:button:submit")
}}</el-button> }}</el-button>
</div> </div>
@ -347,7 +347,8 @@ export default {
openWindow: null, openWindow: null,
isFixed: false, isFixed: false,
images: [], images: [],
remark: '' remark: '',
submitLockAction: ''
} }
}, },
// watch: { // watch: {
@ -494,31 +495,43 @@ export default {
window.open(routeData.href, '_blank') window.open(routeData.href, '_blank')
}, },
async handleSave() { async handleSave() {
const valid = await this.$refs['adForm'].validate() if (this.submitLockAction) return false
if (!valid) return this.submitLockAction = 'save'
this.loading = true this.loading = true
var paths = []
this.fileList.map((file) => {
if (file.url) {
paths.push(file.url)
}
})
this.adForm.judgeResultImagePathList = paths
this.adForm.visitTaskId = this.visitTaskId
try { try {
const valid = await this.$refs['adForm'].validate()
if (!valid) return false
var paths = []
this.fileList.map((file) => {
if (file.url) {
paths.push(file.url)
}
})
this.adForm.judgeResultImagePathList = paths
this.adForm.visitTaskId = this.visitTaskId
await saveJudgeVisitTaskResult(this.adForm) await saveJudgeVisitTaskResult(this.adForm)
this.$message.success(this.$t('common:message:savedSuccessfully')) this.$message.success(this.$t('common:message:savedSuccessfully'))
this.loading = false return true
} catch (e) { } catch (e) {
return false
} finally {
this.loading = false this.loading = false
this.submitLockAction = ''
} }
}, },
async handleSubmit() { async handleSubmit() {
const valid = await this.$refs['adForm'].validate() if (this.submitLockAction) return false
if (!valid) return this.submitLockAction = 'submit'
const { ImageAssessmentReportConfirmation } = const_.processSignature try {
this.signCode = ImageAssessmentReportConfirmation const valid = await this.$refs['adForm'].validate()
this.signVisible = true if (!valid) return false
const { ImageAssessmentReportConfirmation } = const_.processSignature
this.signCode = ImageAssessmentReportConfirmation
this.signVisible = true
return true
} finally {
this.submitLockAction = ''
}
}, },
// //
closeSignDialog(isSign, signInfo) { closeSignDialog(isSign, signInfo) {

View File

@ -47,7 +47,8 @@
<el-button size="small" @click="handleCancel"> <el-button size="small" @click="handleCancel">
{{ $t('common:button:cancel') }} {{ $t('common:button:cancel') }}
</el-button> </el-button>
<el-button size="small" type="primary" v-if="readingTaskState < 2" @click="handleSave"> <el-button size="small" type="primary" v-if="readingTaskState < 2" :loading="saveLoading"
:disabled="saveLoading" @click="handleSave">
{{ $t('common:button:save') }} {{ $t('common:button:save') }}
</el-button> </el-button>
</el-form-item> </el-form-item>
@ -84,7 +85,8 @@ export default {
data() { data() {
return { return {
form: {}, form: {},
isRender: false isRender: false,
saveLoading: false
} }
}, },
computed: { computed: {
@ -106,10 +108,13 @@ export default {
}, },
methods: { methods: {
async handleSave() { async handleSave() {
const valid = await this.$refs.assessmentForm.validate() if (this.saveLoading) return
if (!valid) return this.saveLoading = true
const loading = this.$loading({ fullscreen: true }) let loading = null
try { try {
const valid = await this.$refs.assessmentForm.validate()
if (!valid) return
loading = this.$loading({ fullscreen: true })
var answers = [] var answers = []
for (const k in this.form) { for (const k in this.form) {
answers.push({ questionId: k, answer: this.form[k] }) answers.push({ questionId: k, answer: this.form[k] })
@ -125,7 +130,9 @@ export default {
loading.close() loading.close()
} catch (e) { } catch (e) {
console.log(e) console.log(e)
loading.close() } finally {
if (loading) loading.close()
this.saveLoading = false
} }
}, },
handleCancel() { handleCancel() {

View File

@ -113,4 +113,9 @@ export default {
.mb { .mb {
margin-bottom: 0px; margin-bottom: 0px;
} }
::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner {
background-color: #428bca;
border-color: #428bca;
}
</style> </style>

View File

@ -556,7 +556,8 @@
<!-- 跳过 --> <!-- 跳过 -->
{{ $t('trials:readingReport:button:skip') }} {{ $t('trials:readingReport:button:skip') }}
</el-button> </el-button>
<el-button type="primary" size="small" @click="submit"> <el-button type="primary" size="small" :loading="submitLoading" :disabled="submitLoading"
@click="submit">
<!-- 提交 --> <!-- 提交 -->
{{ $t('common:button:submit') }} {{ $t('common:button:submit') }}
</el-button> </el-button>
@ -617,7 +618,8 @@
<Manuals :trial-id="trialId" :justKeyDoc="manualsDialog.justKeyDoc" /> <Manuals :trial-id="trialId" :justKeyDoc="manualsDialog.justKeyDoc" />
<div slot="footer" style="text-align:right;" v-if="openManuals && !ManualsClose"> <div slot="footer" style="text-align:right;" v-if="openManuals && !ManualsClose">
<!-- 确认 --> <!-- 确认 -->
<el-button type="primary" size="mini" @click="handleSubmitKeyDoc"> <el-button type="primary" size="mini" :loading="keyDocSubmitting" :disabled="keyDocSubmitting"
@click="handleSubmitKeyDoc">
{{ $t('common:button:confirm') }}</el-button> {{ $t('common:button:confirm') }}</el-button>
</div> </div>
</div> </div>
@ -698,7 +700,8 @@
<!-- 取消 --> <!-- 取消 -->
<el-button size="mini" @click="fusionSeries.visible = false">{{ $t('common:button:cancel') }}</el-button> <el-button size="mini" @click="fusionSeries.visible = false">{{ $t('common:button:cancel') }}</el-button>
<!-- 确认 --> <!-- 确认 -->
<el-button type="primary" size="mini" @click="handleSubmitFusionSeries"> <el-button type="primary" size="mini" :loading="fusionSubmitLoading" :disabled="fusionSubmitLoading"
@click="handleSubmitFusionSeries">
{{ $t('common:button:confirm') }}</el-button> {{ $t('common:button:confirm') }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -964,6 +967,9 @@ export default {
signCode: null, signCode: null,
currentUser: zzSessionStorage.getItem('userName'), currentUser: zzSessionStorage.getItem('userName'),
tmpData: null, tmpData: null,
submitLoading: false,
fusionSubmitLoading: false,
keyDocSubmitting: false,
AspectRatio: 1, AspectRatio: 1,
listShow: true, listShow: true,
@ -1234,6 +1240,8 @@ export default {
this.$emit('handleReadingChart', e) this.$emit('handleReadingChart', e)
}, },
async handleSubmitKeyDoc() { async handleSubmitKeyDoc() {
if (this.keyDocSubmitting) return
this.keyDocSubmitting = true
try { try {
let data = { let data = {
TrialCriterionId: this.$router.currentRoute.query.TrialReadingCriterionId, TrialCriterionId: this.$router.currentRoute.query.TrialReadingCriterionId,
@ -1245,6 +1253,8 @@ export default {
} }
} catch (err) { } catch (err) {
console.log(err) console.log(err)
} finally {
this.keyDocSubmitting = false
} }
}, },
showPanel(e, toolName) { showPanel(e, toolName) {
@ -2435,6 +2445,8 @@ export default {
} }
}, },
async submit() { async submit() {
if (this.submitLoading) return
this.submitLoading = true
const loading = this.$loading({ fullscreen: true }) const loading = this.$loading({ fullscreen: true })
try { try {
const idx = this.visitTaskList.findIndex(i => i.IsCurrentTask) const idx = this.visitTaskList.findIndex(i => i.IsCurrentTask)
@ -2449,6 +2461,8 @@ export default {
loading.close() loading.close()
} catch (e) { } catch (e) {
loading.close() loading.close()
} finally {
this.submitLoading = false
} }
}, },
// //
@ -2584,15 +2598,18 @@ export default {
this.petSeriesInfo = {} this.petSeriesInfo = {}
} }
}, },
handleSubmitFusionSeries() { async handleSubmitFusionSeries() {
this.$refs['fusionForm'].validate(async (valid) => { if (this.fusionSubmitLoading) return
this.fusionSubmitLoading = true
try {
const valid = await this.$refs['fusionForm'].validate()
if (!valid) return if (!valid) return
if (Object.keys(this.ctSeriesInfo).length === 0 || Object.keys(this.petSeriesInfo).length === 0) { if (Object.keys(this.ctSeriesInfo).length === 0 || Object.keys(this.petSeriesInfo).length === 0) {
// '' // ''
this.$confirm(this.$t('trials:lugano:fusionDialog:message:checkSeries'), this.$t('trials:lugano:fusionDialog:warning'), { await this.$confirm(this.$t('trials:lugano:fusionDialog:message:checkSeries'), this.$t('trials:lugano:fusionDialog:warning'), {
showCancelButton: false, showCancelButton: false,
type: 'warning' type: 'warning'
}).then(() => { }).catch(() => { }) }).catch(() => {})
return return
} }
if (this.ctSeriesInfo.instanceCount > 400) { if (this.ctSeriesInfo.instanceCount > 400) {
@ -2602,15 +2619,15 @@ export default {
var count = Math.abs(this.ctSeriesInfo.instanceCount - this.petSeriesInfo.instanceCount) var count = Math.abs(this.ctSeriesInfo.instanceCount - this.petSeriesInfo.instanceCount)
if (count > 10) { if (count > 10) {
// ', ?' // ', ?'
this.$confirm(this.$t('trials:lugano:fusionDialog:message:validSeries'), this.$t('trials:lugano:fusionDialog:warning'), { const confirm = await this.$confirm(this.$t('trials:lugano:fusionDialog:message:validSeries'), this.$t('trials:lugano:fusionDialog:warning'), {
type: 'warning' type: 'warning'
}).then(() => { }).catch(() => false)
this.fusion() if (confirm !== 'confirm') return
}).catch(() => { })
} else {
this.fusion()
} }
}) this.fusion()
} finally {
this.fusionSubmitLoading = false
}
}, },
fusion() { fusion() {
// sessionStorage.setItem('ctSeriesInfo', JSON.stringify(this.ctSeriesInfo)) // sessionStorage.setItem('ctSeriesInfo', JSON.stringify(this.ctSeriesInfo))

View File

@ -141,6 +141,8 @@
<el-button <el-button
type="primary" type="primary"
size="mini" size="mini"
:loading="submitLoading"
:disabled="submitLoading"
@click="handleSubmitFusionSeries" @click="handleSubmitFusionSeries"
> >
{{ $t('common:button:confirm') }}</el-button> {{ $t('common:button:confirm') }}</el-button>
@ -171,7 +173,8 @@ export default {
ctSeries: [], ctSeries: [],
petSeries: [], petSeries: [],
petctWindow: null, petctWindow: null,
digitPlaces: 2 digitPlaces: 2,
submitLoading: false
} }
}, },
mounted() { mounted() {
@ -216,29 +219,32 @@ export default {
this.$refs.petSeries.toggleRowSelection(this.petSeries[ptSexiesIdx]) this.$refs.petSeries.toggleRowSelection(this.petSeries[ptSexiesIdx])
}) })
}, },
handleSubmitFusionSeries() { async handleSubmitFusionSeries() {
this.$refs['fusionForm'].validate((valid) => { if (this.submitLoading) return
this.submitLoading = true
try {
const valid = await this.$refs['fusionForm'].validate()
if (!valid) return if (!valid) return
if (Object.keys(this.fusionForm.ctSeriesInfo).length === 0 || Object.keys(this.fusionForm.petSeriesInfo).length === 0) { if (Object.keys(this.fusionForm.ctSeriesInfo).length === 0 || Object.keys(this.fusionForm.petSeriesInfo).length === 0) {
// '' // ''
this.$confirm(this.$t('trials:lugano:fusionDialog:message:checkSeries'), this.$t('trials:lugano:fusionDialog:warning'), { await this.$confirm(this.$t('trials:lugano:fusionDialog:message:checkSeries'), this.$t('trials:lugano:fusionDialog:warning'), {
showCancelButton: false, showCancelButton: false,
type: 'warning' type: 'warning'
}).then(() => {}).catch(() => {}) }).catch(() => {})
return return
} }
var count = Math.abs(this.fusionForm.ctSeriesInfo.instanceCount - this.fusionForm.petSeriesInfo.instanceCount) var count = Math.abs(this.fusionForm.ctSeriesInfo.instanceCount - this.fusionForm.petSeriesInfo.instanceCount)
if (count > 10) { if (count > 10) {
// ', ?' // ', ?'
this.$confirm(this.$t('trials:lugano:fusionDialog:message:validSeries'), this.$t('trials:lugano:fusionDialog:warning'), { const confirm = await this.$confirm(this.$t('trials:lugano:fusionDialog:message:validSeries'), this.$t('trials:lugano:fusionDialog:warning'), {
type: 'warning' type: 'warning'
}).then(() => { }).catch(() => false)
this.fusion() if (confirm !== 'confirm') return
}).catch(() => {})
} else {
this.fusion()
} }
}) this.fusion()
} finally {
this.submitLoading = false
}
}, },
fusion() { fusion() {
const token = getToken() const token = getToken()

View File

@ -440,4 +440,9 @@ export default {
::v-deep .el-select.is-disabled .el-input__inner { ::v-deep .el-select.is-disabled .el-input__inner {
background-color: #646464a1; background-color: #646464a1;
} }
::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner {
background-color: #428bca;
border-color: #428bca;
}
</style> </style>

View File

@ -10,7 +10,7 @@
</template> </template>
<el-form-item v-if="readingTaskState < 2"> <el-form-item v-if="readingTaskState < 2">
<div style="text-align:right"> <div style="text-align:right">
<el-button :disabled="!questionFormChangeState" :type="questionFormChangeState ? 'primary' : null" size="mini" <el-button :loading="saveLoading" :disabled="saveLoading || !questionFormChangeState" :type="questionFormChangeState ? 'primary' : null" size="mini"
@click="handleSave">{{ $t('common:button:save') }}</el-button> @click="handleSave">{{ $t('common:button:save') }}</el-button>
</div> </div>
</el-form-item> </el-form-item>
@ -56,7 +56,8 @@ export default {
focalFDGId: '', focalFDGId: '',
baseLinePET5PS: null, baseLinePET5PS: null,
liverRender: true, liverRender: true,
lungRender: true lungRender: true,
saveLoading: false
} }
}, },
computed: { computed: {
@ -242,12 +243,18 @@ export default {
}) })
}, },
handleSave() { handleSave() {
if (this.saveLoading) return
this.saveLoading = true
this.$refs['questions'].validate((valid) => { this.$refs['questions'].validate((valid) => {
if (!valid) return if (!valid) {
this.saveLoading = false
return
}
// //
var existUnSave = this.checkAnnotationStatus(this.questions) var existUnSave = this.checkAnnotationStatus(this.questions)
if (existUnSave) { if (existUnSave) {
this.$alert(this.$t('trials:lugano:message:saveWarning1'), this.$t('trials:lugano:fusionDialog:warning')) this.$alert(this.$t('trials:lugano:message:saveWarning1'), this.$t('trials:lugano:fusionDialog:warning'))
this.saveLoading = false
return return
} }
this.saveQuestionsForm() this.saveQuestionsForm()
@ -277,11 +284,13 @@ export default {
window.opener.postMessage({ type: 'petctLesionUpdate' }, window.location) window.opener.postMessage({ type: 'petctLesionUpdate' }, window.location)
this.loading = false this.loading = false
this.questionFormChangeState = false this.questionFormChangeState = false
this.saveLoading = false
this.$message({ message: this.$t('common:message:savedSuccessfully'), type: 'success', duration: 2000 }) this.$message({ message: this.$t('common:message:savedSuccessfully'), type: 'success', duration: 2000 })
} }
} catch (e) { } catch (e) {
console.log(e) console.log(e)
this.loading = false this.loading = false
this.saveLoading = false
} }
}, },
checkAnnotationStatus(obj) { checkAnnotationStatus(obj) {

View File

@ -157,7 +157,7 @@
{{ $t('common:button:delete') }} {{ $t('common:button:delete') }}
</el-button> </el-button>
<!-- 保存 --> <!-- 保存 -->
<el-button size="mini" @click="handleSave"> <el-button size="mini" :loading="saveLoading" :disabled="saveLoading" @click="handleSave">
{{ $t('common:button:save') }} {{ $t('common:button:save') }}
</el-button> </el-button>
</div> </div>
@ -238,7 +238,8 @@ export default {
pictureBaseStr: '', pictureBaseStr: '',
currentMarkTool: '', currentMarkTool: '',
firstRenderAnnotation: true, firstRenderAnnotation: true,
isInsideVolume: true isInsideVolume: true,
saveLoading: false
} }
}, },
mounted() { mounted() {
@ -738,8 +739,13 @@ export default {
return new Blob([bytesCode], { type: imgtype }) return new Blob([bytesCode], { type: imgtype })
}, },
handleSave() { handleSave() {
if (this.saveLoading) return
this.saveLoading = true
this.$refs.measurementForm.validate(async valid => { this.$refs.measurementForm.validate(async valid => {
if (!valid) return if (!valid) {
this.saveLoading = false
return
}
const loading = this.$loading({ fullscreen: true }) const loading = this.$loading({ fullscreen: true })
if (!this.isInsideVolume) { if (!this.isInsideVolume) {
// this.$alert('', '', { // this.$alert('', '', {
@ -753,6 +759,7 @@ export default {
callback: action => { } callback: action => { }
}) })
this.saveLoading = false
return return
} }
// SUV // SUV
@ -766,6 +773,7 @@ export default {
showCancelButton: false, showCancelButton: false,
callback: action => { } callback: action => { }
}) })
this.saveLoading = false
return return
} }
// suv0 // suv0
@ -779,6 +787,7 @@ export default {
showCancelButton: false, showCancelButton: false,
callback: action => { } callback: action => { }
}) })
this.saveLoading = false
return return
} }
} }
@ -856,9 +865,11 @@ export default {
this.$message({ message: this.$t('common:message:savedSuccessfully'), type: 'success', duration: 2000 }) this.$message({ message: this.$t('common:message:savedSuccessfully'), type: 'success', duration: 2000 })
} }
loading.close() loading.close()
this.saveLoading = false
} catch (e) { } catch (e) {
console.log(e) console.log(e)
loading.close() loading.close()
this.saveLoading = false
} }
}) })
}) })
@ -1054,6 +1065,11 @@ export default {
background-color: #646464a1; background-color: #646464a1;
} }
::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner {
background-color: #428bca;
border-color: #428bca;
}
::v-deep .el-button--mini, ::v-deep .el-button--mini,
.el-button--mini.is-round { .el-button--mini.is-round {
padding: 7px 10px; padding: 7px 10px;

View File

@ -148,7 +148,7 @@
</el-button> </el-button>
<!-- 保存 --> <!-- 保存 -->
<el-button v-if="(isFirstChangeTask && (lesionType === 5 || lesionType === 6)) || !isFirstChangeTask" size="mini" <el-button v-if="(isFirstChangeTask && (lesionType === 5 || lesionType === 6)) || !isFirstChangeTask" size="mini"
@click="handleSave"> :loading="saveLoading" :disabled="saveLoading" @click="handleSave">
{{ $t('common:button:save') }} {{ $t('common:button:save') }}
</el-button> </el-button>
</div> </div>
@ -239,7 +239,8 @@ export default {
lesionMark: '', lesionMark: '',
deleteInfo: null, deleteInfo: null,
pictureBaseStr: '', pictureBaseStr: '',
currentMarkTool: '' currentMarkTool: '',
saveLoading: false
} }
}, },
mounted() { mounted() {
@ -258,6 +259,11 @@ export default {
}, },
async initForm() { async initForm() {
const loading = this.$loading({ fullscreen: true }) const loading = this.$loading({ fullscreen: true })
const closeLoading = loading.close.bind(loading)
loading.close = () => {
closeLoading()
this.saveLoading = false
}
this.questions.forEach(item => { this.questions.forEach(item => {
var val = this.answers[item.Id] var val = this.answers[item.Id]
if (item.DictionaryCode) { if (item.DictionaryCode) {
@ -833,8 +839,20 @@ export default {
return new Blob([bytesCode], { type: imgtype }) return new Blob([bytesCode], { type: imgtype })
}, },
async handleSave() { async handleSave() {
const valid = await this.$refs.measurementForm.validate() if (this.saveLoading) return
if (!valid) return this.saveLoading = true
let valid = false
try {
valid = await this.$refs.measurementForm.validate()
} catch (e) {
this.saveLoading = false
console.log(e)
return
}
if (!valid) {
this.saveLoading = false
return
}
const loading = this.$loading({ fullscreen: true }) const loading = this.$loading({ fullscreen: true })
var measureData = this.questionForm.MeasureData var measureData = this.questionForm.MeasureData
var lesionState = this.getQuestionVal(7) var lesionState = this.getQuestionVal(7)
@ -1931,9 +1949,11 @@ export default {
DicomEvent.$emit('setMeasuredToolsPassive') DicomEvent.$emit('setMeasuredToolsPassive')
} }
loading.close() loading.close()
this.saveLoading = false
} catch (e) { } catch (e) {
console.log(e) console.log(e)
loading.close() loading.close()
this.saveLoading = false
} }
}) })
}, },
@ -2122,6 +2142,11 @@ export default {
background-color: #646464a1; background-color: #646464a1;
} }
::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner {
background-color: #428bca;
border-color: #428bca;
}
::v-deep .el-button--mini, ::v-deep .el-button--mini,
.el-button--mini.is-round { .el-button--mini.is-round {
padding: 7px 10px; padding: 7px 10px;

View File

@ -173,7 +173,8 @@
<div v-if="isCurrentTask && readingTaskState < 2 && (qs.GroupClassify === 5 || qs.GroupClassify === 6)" <div v-if="isCurrentTask && readingTaskState < 2 && (qs.GroupClassify === 5 || qs.GroupClassify === 6)"
class="base-dialog-footer" style="text-align:right;margin-top:10px;"> class="base-dialog-footer" style="text-align:right;margin-top:10px;">
<!-- 保存 --> <!-- 保存 -->
<el-button type="primary" size="mini" :disabled="!formChanged" @click="handleSave(index)"> <el-button type="primary" size="mini" :loading="!!rowSaveLoadingMap[index]"
:disabled="!!rowSaveLoadingMap[index] || !formChanged" @click="handleSave(index)">
{{ $t('common:button:save') }} {{ $t('common:button:save') }}
</el-button> </el-button>
</div> </div>
@ -202,7 +203,8 @@
{{ $t('common:button:cancel') }} {{ $t('common:button:cancel') }}
</el-button> </el-button>
<!-- 保存 --> <!-- 保存 -->
<el-button size="small" class="my_upload_btn" @click="saveFormData"> <el-button size="small" class="my_upload_btn" :loading="dialogSaveLoading"
:disabled="dialogSaveLoading" @click="saveFormData">
{{ $t('common:button:save') }} {{ $t('common:button:save') }}
</el-button> </el-button>
</el-form-item> </el-form-item>
@ -280,7 +282,9 @@ export default {
lumenId: '', lumenId: '',
sRoiStartDistanceId: '', sRoiStartDistanceId: '',
sRoiEndDistanceId: '', sRoiEndDistanceId: '',
sRoiDistanceId: '' sRoiDistanceId: '',
rowSaveLoadingMap: {},
dialogSaveLoading: false
} }
}, },
computed: { computed: {
@ -611,28 +615,32 @@ export default {
} }
}, },
async handleSave(index) { async handleSave(index) {
if (this.rowSaveLoadingMap[index]) return
const refName = `questions${index}` const refName = `questions${index}`
const valid = await this.$refs[refName][0].validate() this.$set(this.rowSaveLoadingMap, index, true)
if (!valid) return let loading = null
const loading = this.$loading({ fullscreen: true })
var answers = []
for (const k in this.questionForm) {
answers.push({ id: k, answer: Array.isArray(this.questionForm[k]) ? JSON.stringify(this.questionForm[k]) : this.questionForm[k] })
}
var params = {
visitTaskId: this.visitTaskId,
answers: answers
}
try { try {
const valid = await this.$refs[refName][0].validate()
if (!valid) return
loading = this.$loading({ fullscreen: true })
var answers = []
for (const k in this.questionForm) {
answers.push({ id: k, answer: Array.isArray(this.questionForm[k]) ? JSON.stringify(this.questionForm[k]) : this.questionForm[k] })
}
var params = {
visitTaskId: this.visitTaskId,
answers: answers
}
await saveTaskQuestion(12, params) await saveTaskQuestion(12, params)
this.$message.success(this.$t('common:message:savedSuccessfully')) this.$message.success(this.$t('common:message:savedSuccessfully'))
loading.close()
DicomEvent.$emit('getReportInfo', true) DicomEvent.$emit('getReportInfo', true)
this.refreshQuestions() this.refreshQuestions()
this.formChanged = false this.formChanged = false
} catch (e) { } catch (e) {
console.log(e) console.log(e)
loading.close() } finally {
if (loading) loading.close()
this.$set(this.rowSaveLoadingMap, index, false)
} }
}, },
getECRFQuestions(obj) { getECRFQuestions(obj) {
@ -732,10 +740,13 @@ export default {
this.addOrEdit.lesionType = row.LesionType this.addOrEdit.lesionType = row.LesionType
}, },
async saveFormData() { async saveFormData() {
const valid = await this.$refs.tableQsForm.validate() if (this.dialogSaveLoading) return
if (!valid) return this.dialogSaveLoading = true
const loading = this.$loading({ fullscreen: true }) let loading = null
try { try {
const valid = await this.$refs.tableQsForm.validate()
if (!valid) return
loading = this.$loading({ fullscreen: true })
var answers = [] var answers = []
var reg = new RegExp(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/) var reg = new RegExp(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/)
for (const k in this.qsForm) { for (const k in this.qsForm) {
@ -765,10 +776,11 @@ export default {
this.addOrEdit.visible = false this.addOrEdit.visible = false
this.$message.success(this.$t('common:message:savedSuccessfully')) this.$message.success(this.$t('common:message:savedSuccessfully'))
} }
loading.close()
} catch (e) { } catch (e) {
console.log(e) console.log(e)
loading.close() } finally {
if (loading) loading.close()
this.dialogSaveLoading = false
} }
}, },
async handleDelete(row, index) { async handleDelete(row, index) {

View File

@ -249,4 +249,9 @@ export default {
::v-deep .el-select.is-disabled .el-input__inner { ::v-deep .el-select.is-disabled .el-input__inner {
background-color: #646464a1; background-color: #646464a1;
} }
::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner {
background-color: #428bca;
border-color: #428bca;
}
</style> </style>

View File

@ -192,7 +192,7 @@
{{ $t('common:button:delete') }} {{ $t('common:button:delete') }}
</el-button> </el-button>
<!-- 保存 --> <!-- 保存 -->
<el-button size="mini" @click="handleSave"> <el-button size="mini" :loading="saveLoading" :disabled="saveLoading" @click="handleSave">
{{ $t('common:button:save') }} {{ $t('common:button:save') }}
</el-button> </el-button>
</div> </div>
@ -276,7 +276,8 @@ export default {
stateDisabled: false, stateDisabled: false,
splitLesionTargetPPD: null, splitLesionTargetPPD: null,
splitLesionTargetLDi: null, splitLesionTargetLDi: null,
splitLesionTargetSDi: null splitLesionTargetSDi: null,
saveLoading: false
} }
}, },
mounted() { mounted() {
@ -1039,21 +1040,25 @@ export default {
return new Blob([bytesCode], { type: imgtype }) return new Blob([bytesCode], { type: imgtype })
}, },
async handleSave() { async handleSave() {
const valid = await this.$refs.measurementForm.validate() if (this.saveLoading) return
if (!valid) { this.saveLoading = true
if (this.lesionType === 0) { let loading = null
this.$refs['scrollPanel'].scrollTo({ top: 0, behavior: 'smooth' }) try {
const valid = await this.$refs.measurementForm.validate()
if (!valid) {
if (this.lesionType === 0) {
this.$refs['scrollPanel'].scrollTo({ top: 0, behavior: 'smooth' })
}
return
} }
return loading = this.$loading({ fullscreen: true })
} var measureData = this.questionForm.MeasureData
const loading = this.$loading({ fullscreen: true }) var lesionState = this.getQuestionVal(7)
var measureData = this.questionForm.MeasureData var lesionLength = this.getQuestionVal(0)
var lesionState = this.getQuestionVal(7) var lesionShort = this.getQuestionVal(1)
var lesionLength = this.getQuestionVal(0) var lymphNodes = this.getQuestionVal(2)
var lesionShort = this.getQuestionVal(1) lymphNodes = (lymphNodes !== null && lymphNodes !== undefined) ? parseInt(lymphNodes) : null
var lymphNodes = this.getQuestionVal(2) if (this.isBaseLineTask) {
lymphNodes = (lymphNodes !== null && lymphNodes !== undefined) ? parseInt(lymphNodes) : null
if (this.isBaseLineTask) {
// 线 // 线
// 0 // 0
if (this.lesionType === 0 && lesionState === 0) { if (this.lesionType === 0 && lesionState === 0) {
@ -1529,6 +1534,10 @@ export default {
} }
} }
} }
}
} finally {
if (loading) loading.close()
this.saveLoading = false
} }
DicomEvent.$emit('getScreenshots', { questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, visitTaskId: this.visitTaskId, lesionName: this.lesionMark, lesionType: this.lesionType, isMarked: !!measureData }, async val => { DicomEvent.$emit('getScreenshots', { questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, visitTaskId: this.visitTaskId, lesionName: this.lesionMark, lesionType: this.lesionType, isMarked: !!measureData }, async val => {
// 0线 // 0线
@ -1803,6 +1812,11 @@ export default {
background-color: #646464a1; background-color: #646464a1;
} }
::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner {
background-color: #428bca;
border-color: #428bca;
}
::v-deep .el-button--mini, ::v-deep .el-button--mini,
.el-button--mini.is-round { .el-button--mini.is-round {
padding: 7px 10px; padding: 7px 10px;

View File

@ -192,7 +192,7 @@
{{ $t('common:button:delete') }} {{ $t('common:button:delete') }}
</el-button> </el-button>
<!-- 保存 --> <!-- 保存 -->
<el-button size="mini" @click="handleSave"> <el-button size="mini" :loading="saveLoading" :disabled="saveLoading" @click="handleSave">
{{ $t('common:button:save') }} {{ $t('common:button:save') }}
</el-button> </el-button>
</div> </div>
@ -276,7 +276,8 @@ export default {
stateDisabled: false, stateDisabled: false,
splitLesionTargetPPD: null, splitLesionTargetPPD: null,
splitLesionTargetLDi: null, splitLesionTargetLDi: null,
splitLesionTargetSDi: null splitLesionTargetSDi: null,
saveLoading: false
} }
}, },
mounted() { mounted() {
@ -1039,21 +1040,25 @@ export default {
return new Blob([bytesCode], { type: imgtype }) return new Blob([bytesCode], { type: imgtype })
}, },
async handleSave() { async handleSave() {
const valid = await this.$refs.measurementForm.validate() if (this.saveLoading) return
if (!valid) { this.saveLoading = true
if (this.lesionType === 0) { let loading = null
this.$refs['scrollPanel'].scrollTo({ top: 0, behavior: 'smooth' }) try {
const valid = await this.$refs.measurementForm.validate()
if (!valid) {
if (this.lesionType === 0) {
this.$refs['scrollPanel'].scrollTo({ top: 0, behavior: 'smooth' })
}
return
} }
return loading = this.$loading({ fullscreen: true })
} var measureData = this.questionForm.MeasureData
const loading = this.$loading({ fullscreen: true }) var lesionState = this.getQuestionVal(7)
var measureData = this.questionForm.MeasureData var lesionLength = this.getQuestionVal(0)
var lesionState = this.getQuestionVal(7) var lesionShort = this.getQuestionVal(1)
var lesionLength = this.getQuestionVal(0) var lymphNodes = this.getQuestionVal(2)
var lesionShort = this.getQuestionVal(1) lymphNodes = (lymphNodes !== null && lymphNodes !== undefined) ? parseInt(lymphNodes) : null
var lymphNodes = this.getQuestionVal(2) if (this.isBaseLineTask) {
lymphNodes = (lymphNodes !== null && lymphNodes !== undefined) ? parseInt(lymphNodes) : null
if (this.isBaseLineTask) {
// 线 // 线
// 0 // 0
if (this.lesionType === 0 && lesionState === 0) { if (this.lesionType === 0 && lesionState === 0) {
@ -1529,6 +1534,10 @@ export default {
} }
} }
} }
}
} finally {
if (loading) loading.close()
this.saveLoading = false
} }
DicomEvent.$emit('getScreenshots', { questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, visitTaskId: this.visitTaskId, lesionName: this.lesionMark, lesionType: this.lesionType, isMarked: !!measureData }, async val => { DicomEvent.$emit('getScreenshots', { questionId: this.parentQsId, rowIndex: this.questionForm.RowIndex, visitTaskId: this.visitTaskId, lesionName: this.lesionMark, lesionType: this.lesionType, isMarked: !!measureData }, async val => {
// 0线 // 0线
@ -1803,6 +1812,11 @@ export default {
background-color: #646464a1; background-color: #646464a1;
} }
::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner {
background-color: #428bca;
border-color: #428bca;
}
::v-deep .el-button--mini, ::v-deep .el-button--mini,
.el-button--mini.is-round { .el-button--mini.is-round {
padding: 7px 10px; padding: 7px 10px;

View File

@ -139,7 +139,7 @@
<div v-if="isCurrentTask && readingTaskState < 2" class="base-dialog-footer" <div v-if="isCurrentTask && readingTaskState < 2" class="base-dialog-footer"
style="text-align:right;margin-top:10px;"> style="text-align:right;margin-top:10px;">
<!-- 保存 --> <!-- 保存 -->
<el-button size="mini" @click="handleSave"> <el-button size="mini" :loading="saveLoading" :disabled="saveLoading" @click="handleSave">
{{ $t('common:button:save') }} {{ $t('common:button:save') }}
</el-button> </el-button>
</div> </div>
@ -219,7 +219,8 @@ export default {
isMeasurableId: '', isMeasurableId: '',
isExitsMarks: false, isExitsMarks: false,
isDisabledMeasurableRadio: false, isDisabledMeasurableRadio: false,
liverSeg: '' liverSeg: '',
saveLoading: false
} }
}, },
mounted() { mounted() {
@ -698,9 +699,14 @@ export default {
return new Blob([bytesCode], { type: imgtype }) return new Blob([bytesCode], { type: imgtype })
}, },
async handleSave() { async handleSave() {
if (this.saveLoading) return
this.saveLoading = true
try { try {
const valid = await this.$refs.measurementForm.validate() const valid = await this.$refs.measurementForm.validate()
if (!valid) return if (!valid) {
this.saveLoading = false
return
}
if (parseInt(this.questionForm[this.isMeasurableId]) === 1) { if (parseInt(this.questionForm[this.isMeasurableId]) === 1) {
// //
const i = this.markList.findIndex(i => i.saveEnum === 0) const i = this.markList.findIndex(i => i.saveEnum === 0)
@ -708,6 +714,7 @@ export default {
// //
this.$alert(this.$t('trials:MRIPDFF:message:message1')) this.$alert(this.$t('trials:MRIPDFF:message:message1'))
// this.$message.warning(this.$t('trials:MRIPDFF:message:message1')) // this.$message.warning(this.$t('trials:MRIPDFF:message:message1'))
this.saveLoading = false
return return
} }
} else { } else {
@ -720,7 +727,10 @@ export default {
distinguishCancelAndClose: true distinguishCancelAndClose: true
} }
) )
if (confirm !== 'confirm') return if (confirm !== 'confirm') {
this.saveLoading = false
return
}
const l1Id = this.getQuestionId(1101) const l1Id = this.getQuestionId(1101)
this.$set(this.questionForm, l1Id, '') this.$set(this.questionForm, l1Id, '')
const l2Id = this.getQuestionId(1102) const l2Id = this.getQuestionId(1102)
@ -779,12 +789,15 @@ export default {
this.$emit('getReadingQuestionAndAnswer') this.$emit('getReadingQuestionAndAnswer')
} }
loading.close() loading.close()
this.saveLoading = false
} catch (e) { } catch (e) {
console.log(e) console.log(e)
loading.close() loading.close()
this.saveLoading = false
} }
} catch (e) { } catch (e) {
console.log(e) console.log(e)
this.saveLoading = false
} }
}, },
async handleClose() { async handleClose() {
@ -830,6 +843,11 @@ export default {
background-color: #646464a1; background-color: #646464a1;
} }
::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner {
background-color: #428bca;
border-color: #428bca;
}
::v-deep .el-button--mini, ::v-deep .el-button--mini,
.el-button--mini.is-round { .el-button--mini.is-round {
padding: 7px 7px; padding: 7px 7px;

View File

@ -145,7 +145,7 @@
{{ $t('trials:reading:button:removeMark') }} {{ $t('trials:reading:button:removeMark') }}
</el-button> --> </el-button> -->
<!-- 保存 --> <!-- 保存 -->
<el-button size="mini" @click="handleSave"> <el-button size="mini" :loading="saveLoading" :disabled="saveLoading" @click="handleSave">
{{ $t('common:button:save') }} {{ $t('common:button:save') }}
</el-button> </el-button>
</div> </div>
@ -223,7 +223,8 @@ export default {
digitPlaces: 2, digitPlaces: 2,
isMeasurableId: '', isMeasurableId: '',
isDisabledMeasurableRadio: false, isDisabledMeasurableRadio: false,
liverSeg: '' liverSeg: '',
saveLoading: false
} }
}, },
mounted() { mounted() {
@ -555,9 +556,14 @@ export default {
DicomEvent.$emit('refreshStudyListMeasureData') DicomEvent.$emit('refreshStudyListMeasureData')
}, },
async handleSave() { async handleSave() {
if (this.saveLoading) return
this.saveLoading = true
try { try {
const valid = await this.$refs.measurementForm.validate() const valid = await this.$refs.measurementForm.validate()
if (!valid) return if (!valid) {
this.saveLoading = false
return
}
const loading = this.$loading({ fullscreen: true }) const loading = this.$loading({ fullscreen: true })
let measureData = this.questionForm.MeasureData let measureData = this.questionForm.MeasureData
if (parseInt(this.questionForm[this.isMeasurableId]) === 0 && measureData) { if (parseInt(this.questionForm[this.isMeasurableId]) === 0 && measureData) {
@ -613,12 +619,15 @@ export default {
this.$emit('getReadingQuestionAndAnswer') this.$emit('getReadingQuestionAndAnswer')
} }
loading.close() loading.close()
this.saveLoading = false
} catch(e) { } catch(e) {
loading.close() loading.close()
this.saveLoading = false
} }
}) })
} catch (e) { } catch (e) {
console.log(e) console.log(e)
this.saveLoading = false
} }
}, },
async handleClose() { async handleClose() {
@ -664,6 +673,11 @@ export default {
background-color: #646464a1; background-color: #646464a1;
} }
::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner {
background-color: #428bca;
border-color: #428bca;
}
::v-deep .el-button--mini, ::v-deep .el-button--mini,
.el-button--mini.is-round { .el-button--mini.is-round {
padding: 7px 7px; padding: 7px 7px;

View File

@ -174,7 +174,8 @@
<div v-if="isCurrentTask && readingTaskState < 2 && (qs.GroupClassify === 5 || qs.GroupClassify === 6)" <div v-if="isCurrentTask && readingTaskState < 2 && (qs.GroupClassify === 5 || qs.GroupClassify === 6)"
class="base-dialog-footer" style="text-align:right;margin-top:10px;"> class="base-dialog-footer" style="text-align:right;margin-top:10px;">
<!-- 保存 --> <!-- 保存 -->
<el-button type="primary" size="mini" :disabled="!formChanged" @click="handleSave(index)"> <el-button type="primary" size="mini" :loading="!!rowSaveLoadingMap[index]"
:disabled="!!rowSaveLoadingMap[index] || !formChanged" @click="handleSave(index)">
{{ $t('common:button:save') }} {{ $t('common:button:save') }}
</el-button> </el-button>
</div> </div>
@ -202,7 +203,8 @@
{{ $t('common:button:cancel') }} {{ $t('common:button:cancel') }}
</el-button> </el-button>
<!-- 保存 --> <!-- 保存 -->
<el-button size="small" class="my_upload_btn" @click="saveFormData"> <el-button size="small" class="my_upload_btn" :loading="dialogSaveLoading"
:disabled="dialogSaveLoading" @click="saveFormData">
{{ $t('common:button:save') }} {{ $t('common:button:save') }}
</el-button> </el-button>
</el-form-item> </el-form-item>
@ -281,7 +283,9 @@ export default {
avgId: '', avgId: '',
sRoiStartDistanceId: '', sRoiStartDistanceId: '',
sRoiEndDistanceId: '', sRoiEndDistanceId: '',
sRoiDistanceId: '' sRoiDistanceId: '',
rowSaveLoadingMap: {},
dialogSaveLoading: false
} }
}, },
computed: { computed: {
@ -607,28 +611,32 @@ export default {
} }
}, },
async handleSave(index) { async handleSave(index) {
if (this.rowSaveLoadingMap[index]) return
const refName = `questions${index}` const refName = `questions${index}`
const valid = await this.$refs[refName][0].validate() this.$set(this.rowSaveLoadingMap, index, true)
if (!valid) return let loading = null
const loading = this.$loading({ fullscreen: true })
var answers = []
for (const k in this.questionForm) {
answers.push({ id: k, answer: Array.isArray(this.questionForm[k]) ? JSON.stringify(this.questionForm[k]) : this.questionForm[k] })
}
var params = {
visitTaskId: this.visitTaskId,
answers: answers
}
try { try {
const valid = await this.$refs[refName][0].validate()
if (!valid) return
loading = this.$loading({ fullscreen: true })
var answers = []
for (const k in this.questionForm) {
answers.push({ id: k, answer: Array.isArray(this.questionForm[k]) ? JSON.stringify(this.questionForm[k]) : this.questionForm[k] })
}
var params = {
visitTaskId: this.visitTaskId,
answers: answers
}
await saveTaskQuestion(12, params) await saveTaskQuestion(12, params)
this.$message.success(this.$t('common:message:savedSuccessfully')) this.$message.success(this.$t('common:message:savedSuccessfully'))
loading.close()
DicomEvent.$emit('getReportInfo', true) DicomEvent.$emit('getReportInfo', true)
this.refreshQuestions() this.refreshQuestions()
this.formChanged = false this.formChanged = false
} catch (e) { } catch (e) {
console.log(e) console.log(e)
loading.close() } finally {
if (loading) loading.close()
this.$set(this.rowSaveLoadingMap, index, false)
} }
}, },
getECRFQuestions(obj) { getECRFQuestions(obj) {
@ -748,10 +756,13 @@ export default {
this.addOrEdit.lesionType = row.LesionType this.addOrEdit.lesionType = row.LesionType
}, },
async saveFormData() { async saveFormData() {
const valid = await this.$refs.tableQsForm.validate() if (this.dialogSaveLoading) return
if (!valid) return this.dialogSaveLoading = true
const loading = this.$loading({ fullscreen: true }) let loading = null
try { try {
const valid = await this.$refs.tableQsForm.validate()
if (!valid) return
loading = this.$loading({ fullscreen: true })
var answers = [] var answers = []
var reg = new RegExp(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/) var reg = new RegExp(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/)
for (const k in this.qsForm) { for (const k in this.qsForm) {
@ -785,10 +796,11 @@ export default {
this.addOrEdit.visible = false this.addOrEdit.visible = false
this.$message.success(this.$t('common:message:savedSuccessfully')) this.$message.success(this.$t('common:message:savedSuccessfully'))
} }
loading.close()
} catch (e) { } catch (e) {
console.log(e) console.log(e)
loading.close() } finally {
if (loading) loading.close()
this.dialogSaveLoading = false
} }
}, },
async handleDelete(row, index) { async handleDelete(row, index) {

View File

@ -267,4 +267,9 @@ export default {
::v-deep .el-select.is-disabled .el-input__inner { ::v-deep .el-select.is-disabled .el-input__inner {
background-color: #646464a1; background-color: #646464a1;
} }
::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner {
background-color: #428bca;
border-color: #428bca;
}
</style> </style>

View File

@ -22,7 +22,7 @@
</el-form> </el-form>
</div> </div>
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;"> <div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
<el-button size="small" type="primary" @click="handleSave"> {{ $t('common:button:save') }}</el-button> <el-button size="small" type="primary" :loading="loading" :disabled="loading" @click="handleSave"> {{ $t('common:button:save') }}</el-button>
</div> </div>
</div> </div>
@ -64,17 +64,18 @@ export default {
} }
}, },
async handleSave() { async handleSave() {
const valid = await this.$refs.otherForm.validate() if (this.loading) return
if (!valid) return
this.loading = true this.loading = true
try { try {
const valid = await this.$refs.otherForm.validate()
if (!valid) return
let params = Object.assign(this.form, {imageToolType: this.imageToolType}) let params = Object.assign(this.form, {imageToolType: this.imageToolType})
const res = await setAutoCutNextTask(params) const res = await setAutoCutNextTask(params)
if (res.IsSuccess) { if (res.IsSuccess) {
this.$message.success(this.$t('common:message:savedSuccessfully')) this.$message.success(this.$t('common:message:savedSuccessfully'))
} }
this.loading = false
} catch (e) { } catch (e) {
} finally {
this.loading = false this.loading = false
} }
} }

View File

@ -116,7 +116,7 @@
{{ $t('common:button:delete') }} {{ $t('common:button:delete') }}
</el-button> </el-button>
<!-- 保存 --> <!-- 保存 -->
<el-button size="mini" style="margin-left: 5px;padding:7px 10px" @click="handleSave"> <el-button size="mini" style="margin-left: 5px;padding:7px 10px" :loading="saveLoading" :disabled="saveLoading" @click="handleSave">
{{ $t('common:button:save') }} {{ $t('common:button:save') }}
</el-button> </el-button>
</div> </div>
@ -198,7 +198,8 @@ export default {
pictureBaseStr: '', pictureBaseStr: '',
digitPlaces: 0, digitPlaces: 0,
focusQs: null, focusQs: null,
currentMarkTool: '' currentMarkTool: '',
saveLoading: false
} }
}, },
@ -563,8 +564,20 @@ export default {
return new Blob([bytesCode], { type: imgtype }) return new Blob([bytesCode], { type: imgtype })
}, },
async handleSave() { async handleSave() {
const valid = await this.$refs.measurementForm.validate() if (this.saveLoading) return
if (!valid) return this.saveLoading = true
let valid = false
try {
valid = await this.$refs.measurementForm.validate()
} catch (e) {
this.saveLoading = false
console.log(e)
return
}
if (!valid) {
this.saveLoading = false
return
}
var lesionState = this.getQuestionVal(7) var lesionState = this.getQuestionVal(7)
var measureData = this.questionForm.MeasureData var measureData = this.questionForm.MeasureData
// 线 // 线
@ -578,7 +591,7 @@ export default {
showCancelButton: false, showCancelButton: false,
callback: action => { } callback: action => { }
}) })
loading.close() this.saveLoading = false
return return
} }
} }
@ -591,7 +604,7 @@ export default {
showCancelButton: false, showCancelButton: false,
callback: action => { } callback: action => { }
}) })
loading.close() this.saveLoading = false
return return
} }
} }
@ -603,7 +616,7 @@ export default {
showCancelButton: false, showCancelButton: false,
callback: action => { } callback: action => { }
}) })
loading.close() this.saveLoading = false
return return
} }
} }
@ -615,7 +628,7 @@ export default {
showCancelButton: false, showCancelButton: false,
callback: action => { } callback: action => { }
}) })
loading.close() this.saveLoading = false
return return
} }
} }
@ -627,7 +640,7 @@ export default {
showCancelButton: false, showCancelButton: false,
callback: action => { } callback: action => { }
}) })
loading.close() this.saveLoading = false
return return
} }
} }
@ -690,10 +703,12 @@ export default {
DicomEvent.$emit('getReportInfo', true) DicomEvent.$emit('getReportInfo', true)
DicomEvent.$emit('setMeasuredToolsPassive') DicomEvent.$emit('setMeasuredToolsPassive')
loading.close() loading.close()
this.saveLoading = false
} }
} catch (e) { } catch (e) {
console.log(e) console.log(e)
loading.close() loading.close()
this.saveLoading = false
} }
}) })
}, },
@ -858,6 +873,11 @@ export default {
background-color: #646464a1; background-color: #646464a1;
} }
::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner {
background-color: #428bca;
border-color: #428bca;
}
.el-form-item__content .el-select { .el-form-item__content .el-select {
width: 100%; width: 100%;
} }

View File

@ -447,4 +447,9 @@ export default {
::v-deep .el-select.is-disabled .el-input__inner { ::v-deep .el-select.is-disabled .el-input__inner {
background-color: #646464a1; background-color: #646464a1;
} }
::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner {
background-color: #428bca;
border-color: #428bca;
}
</style> </style>

View File

@ -10,7 +10,8 @@
<div class="ecrf-footer"> <div class="ecrf-footer">
<i v-if="groupClassify === null || groupClassify === 1" class="el-icon-warning feedback-icon" <i v-if="groupClassify === null || groupClassify === 1" class="el-icon-warning feedback-icon"
@click="openFeedBackTable" :style="{ color: isExistUnprocessedFeedback ? '#ffeb3b' : '#fff' }" /> @click="openFeedBackTable" :style="{ color: isExistUnprocessedFeedback ? '#ffeb3b' : '#fff' }" />
<el-button size="mini" :disabled="!questionFormChangeState || (!formChanged && groupClassify > 0)" <el-button size="mini" :loading="saveLoading"
:disabled="saveLoading || !questionFormChangeState || (!formChanged && groupClassify > 0)"
:type="questionFormChangeState || (!formChanged && groupClassify > 0) ? 'primary' : null" :type="questionFormChangeState || (!formChanged && groupClassify > 0) ? 'primary' : null"
@click="handleSave">{{ $t('common:button:save') }}</el-button> @click="handleSave">{{ $t('common:button:save') }}</el-button>
</div> </div>
@ -80,7 +81,8 @@ export default {
calculateSpleenStatus: '', calculateSpleenStatus: '',
formChanged: false, formChanged: false,
digitPlaces: 2, digitPlaces: 2,
isExistUnprocessedFeedback: false isExistUnprocessedFeedback: false,
saveLoading: false
} }
}, },
computed: { computed: {
@ -278,14 +280,20 @@ export default {
}, },
handleSave() { handleSave() {
if (this.saveLoading) return
this.saveLoading = true
this.$refs['questions'].validate(async (valid) => { this.$refs['questions'].validate(async (valid) => {
if (!valid) return if (!valid) {
this.saveLoading = 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) {
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
return return
} }
@ -300,15 +308,18 @@ export default {
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
} 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))) {
// //
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
} 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) {
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
} else { } else {
this.saveQuestionsList() this.saveQuestionsList()
} }
@ -327,6 +338,7 @@ export default {
showCancelButton: false, showCancelButton: false,
callback: action => { } callback: action => { }
}) })
this.saveLoading = false
return return
} else { } else {
// PET-CTFDG-PETNE // PET-CTFDG-PETNE
@ -404,8 +416,10 @@ export default {
} }
} }
this.formChanged = false this.formChanged = false
this.saveLoading = false
}).catch(() => { }).catch(() => {
this.loading = false this.loading = false
this.saveLoading = false
}) })
}, },
checkAnnotationStatus(obj) { checkAnnotationStatus(obj) {

View File

@ -139,7 +139,7 @@
{{ $t('common:button:delete') }} {{ $t('common:button:delete') }}
</el-button> </el-button>
<!-- 保存 --> <!-- 保存 -->
<el-button size="mini" @click="handleSave"> <el-button size="mini" :loading="saveLoading" :disabled="saveLoading" @click="handleSave">
{{ $t('common:button:save') }} {{ $t('common:button:save') }}
</el-button> </el-button>
</div> </div>
@ -217,7 +217,8 @@ export default {
lesionMark: '', lesionMark: '',
deleteInfo: null, deleteInfo: null,
pictureBaseStr: '', pictureBaseStr: '',
currentMarkTool: '' currentMarkTool: '',
saveLoading: false
} }
}, },
mounted() { mounted() {
@ -236,6 +237,11 @@ export default {
}, },
async initForm() { async initForm() {
const loading = this.$loading({ fullscreen: true }) const loading = this.$loading({ fullscreen: true })
const closeLoading = loading.close.bind(loading)
loading.close = () => {
closeLoading()
this.saveLoading = false
}
this.questions.forEach(item => { this.questions.forEach(item => {
var val = this.answers[item.Id] var val = this.answers[item.Id]
if (item.DictionaryCode) { if (item.DictionaryCode) {
@ -763,8 +769,20 @@ export default {
return new Blob([bytesCode], { type: imgtype }) return new Blob([bytesCode], { type: imgtype })
}, },
async handleSave() { async handleSave() {
const valid = await this.$refs.measurementForm.validate() if (this.saveLoading) return
if (!valid) return this.saveLoading = true
let valid = false
try {
valid = await this.$refs.measurementForm.validate()
} catch (e) {
this.saveLoading = false
console.log(e)
return
}
if (!valid) {
this.saveLoading = false
return
}
const loading = this.$loading({ fullscreen: true }) const loading = this.$loading({ fullscreen: true })
var measureData = this.questionForm.MeasureData var measureData = this.questionForm.MeasureData
var lesionState = this.getQuestionVal(7) var lesionState = this.getQuestionVal(7)
@ -1277,9 +1295,11 @@ export default {
DicomEvent.$emit('setMeasuredToolsPassive') DicomEvent.$emit('setMeasuredToolsPassive')
} }
loading.close() loading.close()
this.saveLoading = false
} catch (e) { } catch (e) {
console.log(e) console.log(e)
loading.close() loading.close()
this.saveLoading = false
} }
}) })
}, },
@ -1456,6 +1476,11 @@ export default {
background-color: #646464a1; background-color: #646464a1;
} }
::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner {
background-color: #428bca;
border-color: #428bca;
}
::v-deep .el-button--mini, ::v-deep .el-button--mini,
.el-button--mini.is-round { .el-button--mini.is-round {
padding: 7px 10px; padding: 7px 10px;

View File

@ -130,7 +130,7 @@
{{ $t('common:button:delete') }} {{ $t('common:button:delete') }}
</el-button> </el-button>
<!-- 保存 --> <!-- 保存 -->
<el-button size="mini" @click="handleSave"> <el-button size="mini" :loading="saveLoading" :disabled="saveLoading" @click="handleSave">
{{ $t('common:button:save') }} {{ $t('common:button:save') }}
</el-button> </el-button>
</div> </div>
@ -208,7 +208,8 @@ export default {
lesionMark: '', lesionMark: '',
deleteInfo: null, deleteInfo: null,
pictureBaseStr: '', pictureBaseStr: '',
currentMarkTool: '' currentMarkTool: '',
saveLoading: false
} }
}, },
mounted() { mounted() {
@ -227,6 +228,11 @@ export default {
}, },
async initForm() { async initForm() {
const loading = this.$loading({ fullscreen: true }) const loading = this.$loading({ fullscreen: true })
const closeLoading = loading.close.bind(loading)
loading.close = () => {
closeLoading()
this.saveLoading = false
}
this.questions.forEach(item => { this.questions.forEach(item => {
var val = this.answers[item.Id] var val = this.answers[item.Id]
if (item.DictionaryCode) { if (item.DictionaryCode) {
@ -690,8 +696,20 @@ export default {
return new Blob([bytesCode], { type: imgtype }) return new Blob([bytesCode], { type: imgtype })
}, },
async handleSave() { async handleSave() {
const valid = await this.$refs.measurementForm.validate() if (this.saveLoading) return
if (!valid) return this.saveLoading = true
let valid = false
try {
valid = await this.$refs.measurementForm.validate()
} catch (e) {
this.saveLoading = false
console.log(e)
return
}
if (!valid) {
this.saveLoading = false
return
}
const loading = this.$loading({ fullscreen: true }) const loading = this.$loading({ fullscreen: true })
var measureData = this.questionForm.MeasureData var measureData = this.questionForm.MeasureData
var lesionState = this.getQuestionVal(7) var lesionState = this.getQuestionVal(7)
@ -966,9 +984,11 @@ export default {
DicomEvent.$emit('setMeasuredToolsPassive') DicomEvent.$emit('setMeasuredToolsPassive')
} }
loading.close() loading.close()
this.saveLoading = false
} catch (e) { } catch (e) {
console.log(e) console.log(e)
loading.close() loading.close()
this.saveLoading = false
} }
}) })
}, },
@ -1139,6 +1159,11 @@ export default {
background-color: #646464a1; background-color: #646464a1;
} }
::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner {
background-color: #428bca;
border-color: #428bca;
}
::v-deep .el-button--mini, ::v-deep .el-button--mini,
.el-button--mini.is-round { .el-button--mini.is-round {
padding: 7px 10px; padding: 7px 10px;

View File

@ -22,11 +22,13 @@
{{ $t('trials:readingReport:button:refresh') }} {{ $t('trials:readingReport:button:refresh') }}
</el-button> </el-button>
<el-button v-if="readingTaskState < 2 && CriterionType !== 10" type="primary" size="small" <el-button v-if="readingTaskState < 2 && CriterionType !== 10" type="primary" size="small"
:loading="submitLockAction === 'save'" :disabled="!!submitLockAction"
@click="handleSave(true)"> @click="handleSave(true)">
<!-- 保存 --> <!-- 保存 -->
{{ $t('common:button:save') }} {{ $t('common:button:save') }}
</el-button> </el-button>
<el-button v-if="readingTaskState < 2" type="primary" size="small" @click="beforeLeave"> <el-button v-if="readingTaskState < 2" type="primary" size="small"
:loading="submitLockAction === 'submit'" :disabled="!!submitLockAction" @click="beforeLeave">
<!-- 提交 --> <!-- 提交 -->
{{ $t('common:button:submit') }} {{ $t('common:button:submit') }}
</el-button> </el-button>
@ -126,7 +128,7 @@
:autosize="{ minRows: 2, maxRows: 4 }" size="mini" maxlength="500" :autosize="{ minRows: 2, maxRows: 4 }" size="mini" maxlength="500"
@change="evaluateReasonChange" /> @change="evaluateReasonChange" />
<!-- 系统评估结果为xxx,与当前调整的结果不一致请填写调整原因 --> <!-- 系统评估结果为xxx,与当前调整的结果不一致请填写调整原因 -->
<p v-if="currentEvaluateResult !== tumorEvaluate" <p v-if="currentEvaluateResult !== null && currentEvaluateResult !== undefined && currentEvaluateResult !== tumorEvaluate"
style="width: 140px;padding:0 2px;white-space: normal;word-break: break-all;word-wrap: break-word;" style="width: 140px;padding:0 2px;white-space: normal;word-break: break-all;word-wrap: break-word;"
v-html="getWarningText()" /> v-html="getWarningText()" />
<p v-else-if="currentExistDisease !== isExistDisease" <p v-else-if="currentExistDisease !== isExistDisease"
@ -279,7 +281,9 @@ export default {
tLesionCount: null, tLesionCount: null,
ntLesionCount: null, ntLesionCount: null,
openWindow: null, openWindow: null,
expandedRows: [] expandedRows: [],
submitLockAction: '',
validationDialogVisible: false
} }
}, },
computed: { computed: {
@ -353,6 +357,24 @@ export default {
}) })
}) })
}, },
async showValidationDialog(msg) {
if (this.validationDialogVisible) {
return false
}
this.validationDialogVisible = true
try {
await this.$confirm(msg, {
type: 'warning',
showCancelButton: false,
closeOnClickModal: false,
closeOnPressEscape: false
})
} catch (e) {
} finally {
this.validationDialogVisible = false
}
return false
},
async beforeLeave() { async beforeLeave() {
// if (this.questionFormChangeState && this.CriterionType !== 2) { // if (this.questionFormChangeState && this.CriterionType !== 2) {
// var msg = this.$t('trials:readingReport:message:msg5') // var msg = this.$t('trials:readingReport:message:msg5')
@ -655,11 +677,12 @@ export default {
} }
}, },
async handleConfirm() { async handleConfirm() {
if (this.submitLockAction) return false
this.submitLockAction = 'submit'
this.loading = true this.loading = true
try { try {
// await this.handleSave(false) const r = await this.handleSave(false, true)
let r = await this.handleSave(false) if (!r) return false
if (!r) return
await verifyVisitTaskQuestions({ visitTaskId: this.visitTaskId }) await verifyVisitTaskQuestions({ visitTaskId: this.visitTaskId })
var i = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId) var i = this.visitTaskList.findIndex(i => i.VisitTaskId === this.visitTaskId)
var isBaseline = this.visitTaskList[i].IsBaseLine var isBaseline = this.visitTaskList[i].IsBaseLine
@ -680,9 +703,13 @@ export default {
this.signCode = ImageAssessmentReportConfirmation this.signCode = ImageAssessmentReportConfirmation
this.signVisible = true this.signVisible = true
} }
this.loading = false return true
} catch (e) { } catch (e) {
console.log(e)
return false
} finally {
this.loading = false this.loading = false
this.submitLockAction = ''
} }
}, },
sign(type = 'sign') { sign(type = 'sign') {
@ -800,15 +827,26 @@ export default {
} }
// this.openWindow = window.open(routeData.href, '_blank') // this.openWindow = window.open(routeData.href, '_blank')
}, },
handleSave(isPrompt) { async handleSave(isPrompt, fromSubmit = false) {
return new Promise(async (resolve, reject) => { if (this.submitLockAction && !fromSubmit) return false
if (!fromSubmit) {
this.submitLockAction = 'save'
}
const hasValue = (value) => value !== null && value !== undefined && `${value}`.trim() !== ''
const resetSaveState = () => {
this.loading = false
if (!fromSubmit) {
this.submitLockAction = ''
}
}
try {
var isBeill var isBeill
var evaluateResult = '' var evaluateResult = ''
var evaluateAjustReason = '' var evaluateAjustReason = ''
this.answers = [] this.answers = []
var isExistEvaluateResult = false var isExistEvaluateResult = false
this.answerArr.map(item => { this.answerArr.map(item => {
if (item.questionType === 13 || item.questionType === 42) { if (item.questionType === 13 || item.questionType === 42 || (item.questionType === 39 && this.CriterionType === 18)) {
evaluateResult = item.answer evaluateResult = item.answer
isExistEvaluateResult = true isExistEvaluateResult = true
} }
@ -820,53 +858,36 @@ export default {
} }
this.answers.push({ id: item.id, answer: item.answer }) this.answers.push({ id: item.id, answer: item.answer })
}) })
console.log(this.currentExistDisease, this.isExistDisease, evaluateAjustReason, isBeill) if (this.currentExistDisease !== this.isExistDisease && !hasValue(evaluateAjustReason)) {
if (this.currentExistDisease !== this.isExistDisease && !evaluateAjustReason) { await this.showValidationDialog(this.$t('trials:readingReport:message:msg2'))
this.$confirm(this.$t('trials:readingReport:message:msg2'), { return false
type: 'warning',
showCancelButton: false,
callback: action => { }
})
reject()
return
} }
if (isExistEvaluateResult && evaluateResult === null) { if (isExistEvaluateResult && !hasValue(evaluateResult) && !this.isBaseline) {
// //
this.$confirm(this.$t('trials:readingReport:message:msg2'), { await this.showValidationDialog(this.$t('trials:readingReport:message:msg2'))
type: 'warning', return false
showCancelButton: false,
callback: action => { }
})
reject()
return
} }
if (isExistEvaluateResult && (evaluateResult !== this.tumorEvaluate) && !evaluateAjustReason) { if (isExistEvaluateResult && hasValue(evaluateResult) && (evaluateResult !== this.tumorEvaluate) && !hasValue(evaluateAjustReason)) {
// //
this.$confirm(this.$t('trials:readingReport:message:msg3'), { await this.showValidationDialog(this.$t('trials:readingReport:message:msg3'))
type: 'warning', return false
showCancelButton: false,
callback: action => { }
})
reject()
return
} }
this.loading = true this.loading = true
try { var params = {
var params = { visitTaskId: this.visitTaskId,
visitTaskId: this.visitTaskId, answers: this.answers
answers: this.answers
}
const res = await changeDicomReadingQuestionAnswer(params)
if (res.IsSuccess && isPrompt) {
this.$message.success(this.$t('common:message:savedSuccessfully'))
}
this.loading = false
resolve(true)
} catch (e) {
this.loading = false
reject()
} }
}) const res = await changeDicomReadingQuestionAnswer(params)
if (res.IsSuccess && isPrompt) {
this.$message.success(this.$t('common:message:savedSuccessfully'))
}
return !!res.IsSuccess
} catch (e) {
console.log(e)
return false
} finally {
resetSaveState()
}
}, },
getWarningText() { getWarningText() {
var sysRes = '' var sysRes = ''
@ -881,6 +902,9 @@ export default {
sysRes = this.$fd('OverallAssessment', this.tumorEvaluate) sysRes = this.$fd('OverallAssessment', this.tumorEvaluate)
curRes = this.$fd('OverallAssessment', this.currentEvaluateResult) curRes = this.$fd('OverallAssessment', this.currentEvaluateResult)
} }
if (!curRes) {
return ''
}
const msg = this.$t('trials:readingReport:message:msg9').replace('xxx', '<font color="red">' + sysRes + '</font>').replace('yyy', '<font color="red">' + curRes + '</font>') const msg = this.$t('trials:readingReport:message:msg9').replace('xxx', '<font color="red">' + sysRes + '</font>').replace('yyy', '<font color="red">' + curRes + '</font>')
return msg return msg
}, },

View File

@ -30,6 +30,8 @@
<!-- Save --> <!-- Save -->
<el-button <el-button
type="primary" type="primary"
:loading="loading"
:disabled="loading"
@click="handleSave" @click="handleSave"
> >
{{ $t('common:button:save') }} {{ $t('common:button:save') }}
@ -84,12 +86,12 @@ export default {
}, },
methods: { methods: {
async handleSave() { async handleSave() {
const valid = await this.$refs.wlForm.validate() if (this.loading) return
if (!valid) return
this.loading = true this.loading = true
try { try {
const valid = await this.$refs.wlForm.validate()
if (!valid) return
await addOrUpdateUserWLTemplate(this.form) await addOrUpdateUserWLTemplate(this.form)
this.loading = false
this.$emit('getWL') this.$emit('getWL')
this.$emit('close') this.$emit('close')
if (this.form.Id) { if (this.form.Id) {
@ -98,6 +100,7 @@ export default {
this.$message.success(this.$t('common:message:addedSuccessfully')) this.$message.success(this.$t('common:message:addedSuccessfully'))
} }
} catch (e) { } catch (e) {
} finally {
this.loading = false this.loading = false
} }
}, },

View File

@ -240,7 +240,8 @@ export default {
background-color: #646464a1; background-color: #646464a1;
} }
// ::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner { ::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner {
// background-color: #428bca; background-color: #428bca;
// border-color: #428bca; border-color: #428bca;
// }</style> }
</style>

View File

@ -27,7 +27,7 @@
<i class="el-icon-warning feedback-icon" <i class="el-icon-warning feedback-icon"
:style="{ color: taskInfo && taskInfo.IsExistUnprocessedFeedback ? '#ffeb3b' : '#fff' }" :style="{ color: taskInfo && taskInfo.IsExistUnprocessedFeedback ? '#ffeb3b' : '#fff' }"
@click="openFeedBackTable" /> @click="openFeedBackTable" />
<el-button size="mini" @click="saveOuterForm">{{ $t('common:button:save') }}</el-button> <el-button size="mini" :loading="outerSaveLoading" :disabled="outerSaveLoading" @click="saveOuterForm">{{ $t('common:button:save') }}</el-button>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -182,7 +182,8 @@
{{ $t('common:button:delete') }} {{ $t('common:button:delete') }}
</el-button> </el-button>
<!-- 保存 --> <!-- 保存 -->
<el-button size="mini" @click="saveLesion(table, answer.RowIndex)"> <el-button size="mini" :loading="!!rowSaveLoadingMap[`${table.Id}_${answer.RowIndex}`]"
:disabled="!!rowSaveLoadingMap[`${table.Id}_${answer.RowIndex}`]" @click="saveLesion(table, answer.RowIndex)">
{{ $t('common:button:save') }} {{ $t('common:button:save') }}
</el-button> </el-button>
</div> </div>
@ -280,6 +281,8 @@ export default {
digitPlaces: 2, digitPlaces: 2,
imageQualityId: '', imageQualityId: '',
imageQualityIssuesId: '', imageQualityIssuesId: '',
outerSaveLoading: false,
rowSaveLoadingMap: {},
merge: { visible: false, loading: false }, merge: { visible: false, loading: false },
@ -526,10 +529,13 @@ export default {
}, },
// //
async saveOuterForm() { async saveOuterForm() {
const valid = await this.$refs['outerForm'].validate() if (this.outerSaveLoading) return
if (!valid) return this.outerSaveLoading = true
const loading = this.$loading({ fullscreen: true }) let loading = null
try { try {
const valid = await this.$refs['outerForm'].validate()
if (!valid) return
loading = this.$loading({ fullscreen: true })
const answers = [] const answers = []
let imageQuality = null let imageQuality = null
for (const k in this.outerForm) { for (const k in this.outerForm) {
@ -561,7 +567,9 @@ export default {
loading.close() loading.close()
} catch (e) { } catch (e) {
console.log(e) console.log(e)
loading.close() } finally {
if (loading) loading.close()
this.outerSaveLoading = false
} }
}, },
setAnnotation(obj) { setAnnotation(obj) {
@ -956,10 +964,20 @@ export default {
}, },
// //
async saveLesion(table, rowIndex) { async saveLesion(table, rowIndex) {
const valid = await this.$refs[`${table.Id}_${rowIndex}`][0].validate() const rowKey = `${table.Id}_${rowIndex}`
if (!valid) return if (this.rowSaveLoadingMap[rowKey]) return
const loading = this.$loading({ fullscreen: true }) this.$set(this.rowSaveLoadingMap, rowKey, true)
await this.$nextTick()
let loading = null
try { try {
const valid = await this.$refs[`${table.Id}_${rowIndex}`][0].validate()
if (!valid) return
loading = this.$loading({ fullscreen: true })
const closeLoading = loading.close.bind(loading)
loading.close = () => {
closeLoading()
loading = null
}
const innerForm = this.innerFormData[`${table.Id}_${rowIndex}`] const innerForm = this.innerFormData[`${table.Id}_${rowIndex}`]
const measureData = innerForm.MeasureData const measureData = innerForm.MeasureData
const lesionState = innerForm.LesionState const lesionState = innerForm.LesionState
@ -1452,7 +1470,14 @@ export default {
loading.close() loading.close()
} catch (e) { } catch (e) {
console.log(e) console.log(e)
loading.close() if (loading) {
loading.close()
}
} finally {
this.$set(this.rowSaveLoadingMap, rowKey, false)
if (loading) {
loading.close()
}
} }
}, },
// //
@ -1605,6 +1630,8 @@ export default {
} catch (e) { } catch (e) {
loading.close() loading.close()
console.log(e) console.log(e)
} finally {
this.$set(this.rowSaveLoadingMap, rowKey, false)
} }
}, },
// //

View File

@ -290,6 +290,11 @@ export default {
background-color: #646464a1; background-color: #646464a1;
} }
::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner {
background-color: #428bca;
border-color: #428bca;
}
::v-deep .el-button--mini, ::v-deep .el-button--mini,
.el-button--mini.is-round { .el-button--mini.is-round {
padding: 7px 10px; padding: 7px 10px;

View File

@ -38,12 +38,21 @@
v-if="readingTaskState < 2 && criterionType !== 10" v-if="readingTaskState < 2 && criterionType !== 10"
type="primary" type="primary"
size="small" size="small"
:loading="submitLockAction === 'save'"
:disabled="!!submitLockAction"
@click="handleSave(true)" @click="handleSave(true)"
> >
<!-- 保存 --> <!-- 保存 -->
{{ $t('common:button:save') }} {{ $t('common:button:save') }}
</el-button> </el-button>
<el-button v-if="readingTaskState < 2" type="primary" size="small" @click="beforeLeave"> <el-button
v-if="readingTaskState < 2"
type="primary"
size="small"
:loading="submitLockAction === 'submit'"
:disabled="!!submitLockAction"
@click="beforeLeave"
>
<!-- 提交 --> <!-- 提交 -->
{{ $t('common:button:submit') }} {{ $t('common:button:submit') }}
</el-button> </el-button>
@ -398,6 +407,8 @@ export default {
taskInfo: {}, taskInfo: {},
visitTaskId: '', visitTaskId: '',
isBaselineTask: false, isBaselineTask: false,
submitLockAction: '',
validationConfirmVisible: false,
} }
}, },
computed: { computed: {
@ -838,9 +849,11 @@ export default {
} }
}, },
async handleConfirm() { async handleConfirm() {
if (this.submitLockAction) return false
this.submitLockAction = 'submit'
this.loading = true this.loading = true
try { try {
let r = await this.handleSave(false) let r = await this.handleSave(false, true)
if (!r) return if (!r) return
await verifyVisitTaskQuestions({ visitTaskId: this.visitTaskId }) await verifyVisitTaskQuestions({ visitTaskId: this.visitTaskId })
var i = this.visitTaskList.findIndex( var i = this.visitTaskList.findIndex(
@ -867,9 +880,10 @@ export default {
this.signCode = ImageAssessmentReportConfirmation this.signCode = ImageAssessmentReportConfirmation
this.signVisible = true this.signVisible = true
} }
this.loading = false
} catch (e) { } catch (e) {
} finally {
this.loading = false this.loading = false
this.submitLockAction = ''
} }
}, },
sign(type = 'sign') { sign(type = 'sign') {
@ -992,89 +1006,96 @@ export default {
) )
} }
}, },
handleSave(isPrompt) { async handleSave(isPrompt, fromSubmit = false) {
return new Promise(async (resolve, reject) => { if (this.validationConfirmVisible) return false
var isBeill if (this.submitLockAction && !fromSubmit) return false
var evaluateResult = '' if (!fromSubmit) {
var evaluateAjustReason = '' this.submitLockAction = 'save'
this.answers = [] }
var isExistEvaluateResult = false const showValidationConfirm = async (message) => {
this.answerArr.map((item) => { if (this.validationConfirmVisible) return false
if (item.questionType === 13 || item.questionType === 42) { this.validationConfirmVisible = true
evaluateResult = item.answer
isExistEvaluateResult = true
}
if (item.questionType === 14) {
evaluateAjustReason = item.answer
}
if (item.questionType === 15) {
isBeill = item.answer
}
this.answers.push({ id: item.id, answer: item.answer })
})
console.log(
this.currentExistDisease,
this.isExistDisease,
evaluateAjustReason,
isBeill
)
if (
this.currentExistDisease !== this.isExistDisease &&
!evaluateAjustReason
) {
this.$confirm(this.$t('trials:readingReport:message:msg2'), {
type: 'warning',
showCancelButton: false,
callback: (action) => {},
})
resolve(false)
return
}
if (
isExistEvaluateResult &&
evaluateResult === null &&
!this.isBaselineTask
) {
//
this.$confirm(this.$t('trials:readingReport:message:msg2'), {
type: 'warning',
showCancelButton: false,
callback: (action) => {},
})
resolve(false)
return
}
if (
isExistEvaluateResult &&
evaluateResult !== this.tumorEvaluate &&
!evaluateAjustReason
) {
//
this.$confirm(this.$t('trials:readingReport:message:msg3'), {
type: 'warning',
showCancelButton: false,
callback: (action) => {},
})
resolve(false)
return
}
this.loading = true
try { try {
var params = { await this.$confirm(message, {
visitTaskId: this.visitTaskId, type: 'warning',
answers: this.answers, showCancelButton: false,
} closeOnClickModal: false,
const res = await changeDicomReadingQuestionAnswer(params) closeOnPressEscape: false,
if (res.IsSuccess && isPrompt) { })
this.$message.success(this.$t('common:message:savedSuccessfully'))
}
this.loading = false
resolve(true)
} catch (e) { } catch (e) {
this.loading = false // Ignore close actions and always restore the save button state.
reject() } finally {
this.validationConfirmVisible = false
resetSubmitLock()
} }
return false
}
const resetSubmitLock = () => {
if (!fromSubmit) {
this.submitLockAction = ''
}
}
var isBeill
var evaluateResult = ''
var evaluateAjustReason = ''
this.answers = []
var isExistEvaluateResult = false
this.answerArr.map((item) => {
if (item.questionType === 13 || item.questionType === 42) {
evaluateResult = item.answer
isExistEvaluateResult = true
}
if (item.questionType === 14) {
evaluateAjustReason = item.answer
}
if (item.questionType === 15) {
isBeill = item.answer
}
this.answers.push({ id: item.id, answer: item.answer })
}) })
if (
this.currentExistDisease !== this.isExistDisease &&
!evaluateAjustReason
) {
return showValidationConfirm(
this.$t('trials:readingReport:message:msg2')
)
}
if (
isExistEvaluateResult &&
evaluateResult === null &&
!this.isBaselineTask
) {
//
return showValidationConfirm(
this.$t('trials:readingReport:message:msg2')
)
}
if (
isExistEvaluateResult &&
evaluateResult !== this.tumorEvaluate &&
!evaluateAjustReason
) {
//
return showValidationConfirm(
this.$t('trials:readingReport:message:msg3')
)
}
this.loading = true
try {
var params = {
visitTaskId: this.visitTaskId,
answers: this.answers,
}
const res = await changeDicomReadingQuestionAnswer(params)
if (res.IsSuccess && isPrompt) {
this.$message.success(this.$t('common:message:savedSuccessfully'))
}
return true
} finally {
this.loading = false
resetSubmitLock()
}
}, },
getWarningText() { getWarningText() {
var sysRes = '' var sysRes = ''

View File

@ -81,7 +81,7 @@
</div> </div>
<template v-else> <template v-else>
<el-form-item <el-form-item
v-if="(question.ShowQuestion === 1 && question.ParentTriggerValueList.includes(questionForm[question.ParentId])) || question.ShowQuestion === 0" v-if="(question.ShowQuestion === 1 && question.ParentTriggerValueList.includes(String(questionForm[question.ParentId]))) || question.ShowQuestion === 0"
:title="question.Remark" :label="`${question.QuestionName}`" :prop="question.Id" :rules="[ :title="question.Remark" :label="`${question.QuestionName}`" :prop="question.Id" :rules="[
{ {
required: (question.IsRequired === 0 || (question.IsRequired === 1 && question.RelevanceId && (question.RelevanceValueList.includes(isNaN(parseFloat(questionForm[question.RelevanceId])) ? questionForm[question.RelevanceId] : questionForm[question.RelevanceId].toString())))) && question.Type !== 'group' && question.Type !== 'summary', required: (question.IsRequired === 0 || (question.IsRequired === 1 && question.RelevanceId && (question.RelevanceValueList.includes(isNaN(parseFloat(questionForm[question.RelevanceId])) ? questionForm[question.RelevanceId] : questionForm[question.RelevanceId].toString())))) && question.Type !== 'group' && question.Type !== 'summary',
@ -109,12 +109,12 @@
:value="item[question.DataTableColumn]" /> :value="item[question.DataTableColumn]" />
</template> </template>
<template v-else-if="question.TableQuestionType === 3 || question.QuestionGenre === 3"> <template v-else-if="question.TableQuestionType === 3 || question.QuestionGenre === 3">
<el-option v-for="item of $d[question.DictionaryCode]" :key="item.id" :value="item.value" <el-option v-for="item of $d[question.DictionaryCode]" :key="item.id" :value="String(item.value)"
:label="item.label" /> :label="item.label" />
</template> </template>
<template <template
v-else-if="(question.TableQuestionType === 2 || question.QuestionGenre === 2) && question.DictionaryCode"> v-else-if="(question.TableQuestionType === 2 || question.QuestionGenre === 2) && question.DictionaryCode">
<el-option v-for="item of $d[question.DictionaryCode]" :key="item.id" :value="item.value" <el-option v-for="item of $d[question.DictionaryCode]" :key="item.id" :value="String(item.value)"
:label="item.label" /> :label="item.label" />
</template> </template>
<template v-else> <template v-else>
@ -127,7 +127,7 @@
<el-radio-group v-if="question.Type === 'radio'" v-model="questionForm[question.Id]" <el-radio-group v-if="question.Type === 'radio'" v-model="questionForm[question.Id]"
@change="((val) => { formItemChange(val, question) })" :disabled="readingTaskState === 2"> @change="((val) => { formItemChange(val, question) })" :disabled="readingTaskState === 2">
<template v-if="question.DictionaryCode"> <template v-if="question.DictionaryCode">
<el-radio v-for="val in $d[question.DictionaryCode]" :key="val.id" :label="val.value"> <el-radio v-for="val in $d[question.DictionaryCode]" :key="val.id" :label="String(val.value)">
{{ val.label }} {{ val.label }}
</el-radio> </el-radio>
</template> </template>
@ -156,7 +156,7 @@
v-model="questionForm[question.Id]" :disabled="!question.ClassifyEditType || readingTaskState === 2" v-model="questionForm[question.Id]" :disabled="!question.ClassifyEditType || readingTaskState === 2"
@change="(val) => { formItemChange(val, question) }"> @change="(val) => { formItemChange(val, question) }">
<template v-if="question.DictionaryCode"> <template v-if="question.DictionaryCode">
<el-radio v-for="val in $d[question.DictionaryCode]" :key="val.id" :label="val.value"> <el-radio v-for="val in $d[question.DictionaryCode]" :key="val.id" :label="String(val.value)">
{{ val.label }} {{ val.label }}
</el-radio> </el-radio>
</template> </template>
@ -1710,6 +1710,11 @@ export default {
color: #c3c3c3; color: #c3c3c3;
} }
::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner {
background-color: #428bca;
border-color: #428bca;
}
::v-deep .el-input-group__append { ::v-deep .el-input-group__append {
background: #000; background: #000;
color: #ddd; color: #ddd;

View File

@ -33,10 +33,12 @@
type="primary" @click="skipTask"> type="primary" @click="skipTask">
{{ $t('trials:readingReport:button:skip') }} {{ $t('trials:readingReport:button:skip') }}
</el-button> </el-button>
<el-button type="primary" :disabled="isTableVisible || isSaved" @click="handleSave"> <el-button type="primary" :loading="submitLockAction === 'save'"
:disabled="isTableVisible || isSaved || !!submitLockAction" @click="handleSave">
{{ $t('common:button:save') }} {{ $t('common:button:save') }}
</el-button> </el-button>
<el-button v-if="taskInfo && taskInfo.IseCRFShowInDicomReading" :disabled="isTableVisible" <el-button v-if="taskInfo && taskInfo.IseCRFShowInDicomReading" :loading="submitLockAction === 'submit'"
:disabled="isTableVisible || !!submitLockAction"
type="primary" @click="handleSubmit"> type="primary" @click="handleSubmit">
{{ $t('common:button:submit') }} {{ $t('common:button:submit') }}
</el-button> </el-button>
@ -124,7 +126,8 @@ export default {
questionImageToolAttributeInfo: {}, questionImageToolAttributeInfo: {},
unSaveTargets: [], unSaveTargets: [],
isTableVisible: false, isTableVisible: false,
isSaved: false isSaved: false,
submitLockAction: ''
} }
}, },
mounted() { mounted() {
@ -150,6 +153,17 @@ export default {
}, },
}, },
methods: { methods: {
normalizeQuestionAnswer(question, answer) {
if (answer === null || answer === undefined || answer === '') return answer
if (question.Type === 'select' && question.OptionTypeEnum === 1) return answer
if (question.DictionaryCode && ['radio', 'select'].includes(question.Type)) {
return String(answer)
}
if (question.Type === 'class' && question.ClassifyShowType === 3 && question.DictionaryCode) {
return String(answer)
}
return answer
},
handleReadingChart(e) { handleReadingChart(e) {
this.$emit('handleReadingChart', e) this.$emit('handleReadingChart', e)
}, },
@ -166,7 +180,7 @@ export default {
res.Result.SinglePage.map((v) => { res.Result.SinglePage.map((v) => {
if (v.Type === 'group' && v.Childrens.length === 0) return if (v.Type === 'group' && v.Childrens.length === 0) return
if (!v.IsPage && v.Type !== 'group' && v.Type !== 'summary' && v.Type !== 'table' && v.Type !== 'basicTable' && v.Type !== 'number') { if (!v.IsPage && v.Type !== 'group' && v.Type !== 'summary' && v.Type !== 'table' && v.Type !== 'basicTable' && v.Type !== 'number') {
this.$set(this.questionForm, v.Id, v.Answer) this.$set(this.questionForm, v.Id, this.normalizeQuestionAnswer(v, v.Answer))
} }
if (v.Type === 'table' || v.Type === 'basicTable') { if (v.Type === 'table' || v.Type === 'basicTable') {
this.$set(this.questionForm, v.Id, v.TableQuestions.Answers) this.$set(this.questionForm, v.Id, v.TableQuestions.Answers)
@ -214,7 +228,7 @@ export default {
setChild(obj) { setChild(obj) {
obj.forEach(i => { obj.forEach(i => {
if (i.Type !== 'group' && i.Type !== 'summary' && i.Id && i.Type !== 'table' && i.Type !== 'basicTable') { if (i.Type !== 'group' && i.Type !== 'summary' && i.Id && i.Type !== 'table' && i.Type !== 'basicTable') {
this.$set(this.questionForm, i.Id, i.Answer) this.$set(this.questionForm, i.Id, this.normalizeQuestionAnswer(i, i.Answer))
} }
if (i.Type === 'select' && i.OptionTypeEnum === 1) { if (i.Type === 'select' && i.OptionTypeEnum === 1) {
this.$set(this.questionForm, i.Id, i.Answer ? JSON.parse(i.Answer) : []) this.$set(this.questionForm, i.Id, i.Answer ? JSON.parse(i.Answer) : [])
@ -232,6 +246,11 @@ export default {
this.$set(i.TableQuestions.Answers[index], o.Id, i.TableQuestions.Answers[index][o.Id] ? JSON.parse(i.TableQuestions.Answers[index][o.Id]) : []) this.$set(i.TableQuestions.Answers[index], o.Id, i.TableQuestions.Answers[index][o.Id] ? JSON.parse(i.TableQuestions.Answers[index][o.Id]) : [])
}) })
} }
if ((o.DictionaryCode && ['radio', 'select'].includes(o.Type) && o.OptionTypeEnum !== 1) || (o.Type === 'class' && o.ClassifyShowType === 3 && o.DictionaryCode)) {
i.TableQuestions.Answers.forEach((ite, index) => {
this.$set(i.TableQuestions.Answers[index], o.Id, this.normalizeQuestionAnswer(o, i.TableQuestions.Answers[index][o.Id]))
})
}
}) })
this.$set(this.questionForm, i.Id, i.TableQuestions.Answers) this.$set(this.questionForm, i.Id, i.TableQuestions.Answers)
} }
@ -257,16 +276,17 @@ export default {
console.log(e) console.log(e)
} }
}, },
async handleSave(isMsg) { async validateBeforeSave() {
const valid = await this.$refs['questions'].validate() const valid = await this.$refs['questions'].validate()
if (!valid) return if (!valid) return false
let isSaved = this.verifyAnnotationIsSave() const hasUnsavedAnnotation = this.verifyAnnotationIsSave()
if (isSaved) { if (!hasUnsavedAnnotation) return true
let confirm = this.$confirm(this.$t('trials:reading:confirm:AnnotationNotSave'), this.$t('system:menu:confirm:title:warning'), { const confirm = await this.$confirm(this.$t('trials:reading:confirm:AnnotationNotSave'), this.$t('system:menu:confirm:title:warning'), {
type: 'warning' type: 'warning'
}) }).catch(() => false)
if (!confirm) return false return confirm === 'confirm'
} },
async saveQuestions(isMsg) {
this.loading = true this.loading = true
try { try {
var answers = [] var answers = []
@ -289,27 +309,42 @@ export default {
this.isSaved = true this.isSaved = true
this.$message.success(this.$t('common:message:savedSuccessfully')) this.$message.success(this.$t('common:message:savedSuccessfully'))
} }
this.loading = false return true
} }
return false
} catch (e) { } catch (e) {
return false
} finally {
this.loading = false this.loading = false
} }
}, },
async handleSubmit() { async handleSave(isMsg = true) {
const valid = await this.$refs['questions'].validate() if (this.submitLockAction) return false
if (!valid) return this.submitLockAction = 'save'
let isSaved = this.verifyAnnotationIsSave() try {
if (isSaved) { const isValid = await this.validateBeforeSave()
let confirm = this.$confirm(this.$t('trials:reading:confirm:AnnotationNotSave'), this.$t('system:menu:confirm:title:warning'), { if (!isValid) return false
type: 'warning' return await this.saveQuestions(isMsg)
}) } finally {
if (!confirm) return false this.submitLockAction = ''
}
},
async handleSubmit() {
if (this.submitLockAction) return false
this.submitLockAction = 'submit'
try {
const isValid = await this.validateBeforeSave()
if (!isValid) return false
const isSaveSuccess = await this.saveQuestions(false)
if (!isSaveSuccess) return false
await verifyVisitTaskQuestions({ visitTaskId: this.visitTaskId })
const { ImageAssessmentReportConfirmation } = const_.processSignature
this.signCode = ImageAssessmentReportConfirmation
this.signVisible = true
return true
} finally {
this.submitLockAction = ''
} }
await this.handleSave(false)
await verifyVisitTaskQuestions({ visitTaskId: this.visitTaskId })
const { ImageAssessmentReportConfirmation } = const_.processSignature
this.signCode = ImageAssessmentReportConfirmation
this.signVisible = true
}, },
// //
closeSignDialog(isSign, signInfo) { closeSignDialog(isSign, signInfo) {

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="criterion-table-form-item"> <div class="criterion-table-form-item">
<el-form-item <el-form-item
v-if="(question.ShowQuestion === 1 && !!~question.ParentTriggerValueList.indexOf(questionForm[question.ParentId])) || question.ShowQuestion === 0" v-if="(question.ShowQuestion === 1 && !!~question.ParentTriggerValueList.indexOf(String(questionForm[question.ParentId]))) || question.ShowQuestion === 0"
:title="question.Remark" :label="`${question.QuestionName}`" :prop="question.Id" :rules="[ :title="question.Remark" :label="`${question.QuestionName}`" :prop="question.Id" :rules="[
{ {
required: (question.IsRequired === 0 || (question.IsRequired === 1 && question.RelevanceId && !!~question.RelevanceValueList.indexOf(questionForm[question.RelevanceId]))) && question.Type !== 'group' && question.Type !== 'summary', required: (question.IsRequired === 0 || (question.IsRequired === 1 && question.RelevanceId && !!~question.RelevanceValueList.indexOf(questionForm[question.RelevanceId]))) && question.Type !== 'group' && question.Type !== 'summary',
@ -30,12 +30,12 @@
:value="item[question.DataTableColumn]" /> :value="item[question.DataTableColumn]" />
</template> </template>
<template v-else-if="question.TableQuestionType === 3 || question.QuestionGenre === 3"> <template v-else-if="question.TableQuestionType === 3 || question.QuestionGenre === 3">
<el-option v-for="item of $d[question.DictionaryCode]" :key="item.id" :value="item.value" <el-option v-for="item of $d[question.DictionaryCode]" :key="item.id" :value="String(item.value)"
:label="item.label" /> :label="item.label" />
</template> </template>
<template <template
v-else-if="(question.TableQuestionType === 2 || question.QuestionGenre === 2) && question.DictionaryCode"> v-else-if="(question.TableQuestionType === 2 || question.QuestionGenre === 2) && question.DictionaryCode">
<el-option v-for="item of $d[question.DictionaryCode]" :key="item.id" :value="item.value" <el-option v-for="item of $d[question.DictionaryCode]" :key="item.id" :value="String(item.value)"
:label="item.label" /> :label="item.label" />
</template> </template>
<template v-else> <template v-else>
@ -48,7 +48,7 @@
:disabled="question.TableQuestionType === 2 || question.IsPreinstall || (question.IsCopy && type === 'edit' && !isBaseline && questionForm.IsCurrentTaskAdd === 'False') || readingTaskState >= 2" :disabled="question.TableQuestionType === 2 || question.IsPreinstall || (question.IsCopy && type === 'edit' && !isBaseline && questionForm.IsCurrentTaskAdd === 'False') || readingTaskState >= 2"
@change="((val) => { formItemChange(val, question) })"> @change="((val) => { formItemChange(val, question) })">
<template v-if="question.DictionaryCode"> <template v-if="question.DictionaryCode">
<el-radio v-for="val in $d[question.DictionaryCode]" :key="val.id" :label="val.value"> <el-radio v-for="val in $d[question.DictionaryCode]" :key="val.id" :label="String(val.value)">
{{ val.label }} {{ val.label }}
</el-radio> </el-radio>
</template> </template>
@ -79,7 +79,7 @@
:disabled="!question.ClassifyEditType || question.IsPreinstall || readingTaskState >= 2" :disabled="!question.ClassifyEditType || question.IsPreinstall || readingTaskState >= 2"
@change="(val) => { formItemChange(val, question) }"> @change="(val) => { formItemChange(val, question) }">
<template v-if="question.DictionaryCode"> <template v-if="question.DictionaryCode">
<el-radio v-for="val in $d[question.DictionaryCode]" :key="val.id" :label="val.value"> <el-radio v-for="val in $d[question.DictionaryCode]" :key="val.id" :label="String(val.value)">
{{ val.label }} {{ val.label }}
</el-radio> </el-radio>
</template> </template>
@ -794,5 +794,10 @@ export default {
flex-direction: column; flex-direction: column;
align-items: flex-start; align-items: flex-start;
} }
::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner {
background-color: #428bca;
border-color: #428bca;
}
} }
</style> </style>

View File

@ -12,11 +12,13 @@
{{ {{
$t('trials:readingReport:button:refresh') }} $t('trials:readingReport:button:refresh') }}
</el-button> </el-button>
<el-button v-if="readingTaskState < 2" type="primary" size="small" @click="handleSave(true)"> <el-button v-if="readingTaskState < 2" type="primary" size="small" :loading="submitLockAction === 'save'"
:disabled="!!submitLockAction" @click="handleSave(true)">
{{ {{
$t('common:button:save') }} $t('common:button:save') }}
</el-button> </el-button>
<el-button v-if="readingTaskState < 2" type="primary" size="small" @click="handleConfirm"> <el-button v-if="readingTaskState < 2" type="primary" size="small" :loading="submitLockAction === 'submit'"
:disabled="!!submitLockAction" @click="handleConfirm">
{{ {{
$t('common:button:submit') }} $t('common:button:submit') }}
</el-button> </el-button>
@ -281,6 +283,7 @@ export default {
taskInfo: null, taskInfo: null,
currentPath: '', currentPath: '',
currentType: '', currentType: '',
submitLockAction: '',
viewerOptions: { viewerOptions: {
toolbar: { toolbar: {
@ -850,11 +853,17 @@ export default {
// this.taskQuestions = this.getQuestions(res.Result.TaskQuestions, !this.isShowDetail, null) // this.taskQuestions = this.getQuestions(res.Result.TaskQuestions, !this.isShowDetail, null)
}, },
async handleConfirm() { async handleConfirm() {
await this.handleSave(false) if (this.submitLockAction) return false
await this.verifyVisitTaskQuestions() this.submitLockAction = 'submit'
const { ImageAssessmentReportConfirmation } = const_.processSignature try {
this.signCode = ImageAssessmentReportConfirmation await this.handleSave(false, true)
this.signVisible = true await this.verifyVisitTaskQuestions()
const { ImageAssessmentReportConfirmation } = const_.processSignature
this.signCode = ImageAssessmentReportConfirmation
this.signVisible = true
} finally {
this.submitLockAction = ''
}
}, },
verifyVisitTaskQuestions() { verifyVisitTaskQuestions() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
@ -980,7 +989,11 @@ export default {
} }
localStorage.setItem('closePage', Date.now()); localStorage.setItem('closePage', Date.now());
}, },
handleSave(isPrompt) { handleSave(isPrompt, fromSubmit = false) {
if (this.submitLockAction && !fromSubmit) return Promise.resolve(false)
if (!fromSubmit) {
this.submitLockAction = 'save'
}
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.loading = true this.loading = true
var answers = [] var answers = []
@ -1022,6 +1035,11 @@ export default {
this.loading = false this.loading = false
reject() reject()
}) })
.finally(() => {
if (!fromSubmit) {
this.submitLockAction = ''
}
})
}) })
}, },
async skipTask() { async skipTask() {

View File

@ -240,7 +240,8 @@ export default {
background-color: #646464a1; background-color: #646464a1;
} }
// ::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner { ::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner {
// background-color: #428bca; background-color: #428bca;
// border-color: #428bca; border-color: #428bca;
// }</style> }
</style>

View File

@ -27,7 +27,7 @@
<i class="el-icon-warning feedback-icon" <i class="el-icon-warning feedback-icon"
:style="{ color: taskInfo && taskInfo.IsExistUnprocessedFeedback ? '#ffeb3b' : '#fff' }" :style="{ color: taskInfo && taskInfo.IsExistUnprocessedFeedback ? '#ffeb3b' : '#fff' }"
@click="openFeedBackTable" /> @click="openFeedBackTable" />
<el-button size="mini" @click="saveOuterForm">{{ $t('common:button:save') }}</el-button> <el-button size="mini" :loading="outerSaveLoading" :disabled="outerSaveLoading" @click="saveOuterForm">{{ $t('common:button:save') }}</el-button>
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -180,7 +180,8 @@
{{ $t('common:button:delete') }} {{ $t('common:button:delete') }}
</el-button> </el-button>
<!-- 保存 --> <!-- 保存 -->
<el-button size="mini" @click="saveLesion(table, answer.RowIndex)"> <el-button size="mini" :loading="!!rowSaveLoadingMap[`${table.Id}_${answer.RowIndex}`]"
:disabled="!!rowSaveLoadingMap[`${table.Id}_${answer.RowIndex}`]" @click="saveLesion(table, answer.RowIndex)">
{{ $t('common:button:save') }} {{ $t('common:button:save') }}
</el-button> </el-button>
</div> </div>
@ -278,6 +279,8 @@ export default {
digitPlaces: 2, digitPlaces: 2,
imageQualityId: '', imageQualityId: '',
imageQualityIssuesId: '', imageQualityIssuesId: '',
outerSaveLoading: false,
rowSaveLoadingMap: {},
merge: { visible: false, loading: false }, merge: { visible: false, loading: false },
lesionData: [], lesionData: [],
@ -527,10 +530,13 @@ export default {
}, },
// //
async saveOuterForm() { async saveOuterForm() {
const valid = await this.$refs['outerForm'].validate() if (this.outerSaveLoading) return
if (!valid) return this.outerSaveLoading = true
const loading = this.$loading({ fullscreen: true }) let loading = null
try { try {
const valid = await this.$refs['outerForm'].validate()
if (!valid) return
loading = this.$loading({ fullscreen: true })
const answers = [] const answers = []
let imageQuality = null let imageQuality = null
for (const k in this.outerForm) { for (const k in this.outerForm) {
@ -562,7 +568,9 @@ export default {
loading.close() loading.close()
} catch (e) { } catch (e) {
console.log(e) console.log(e)
loading.close() } finally {
if (loading) loading.close()
this.outerSaveLoading = false
} }
}, },
setAnnotation(obj) { setAnnotation(obj) {
@ -946,10 +954,15 @@ export default {
}, },
// //
async saveLesion(table, rowIndex) { async saveLesion(table, rowIndex) {
const valid = await this.$refs[`${table.Id}_${rowIndex}`][0].validate() const rowKey = `${table.Id}_${rowIndex}`
if (!valid) return if (this.rowSaveLoadingMap[rowKey]) return
this.$set(this.rowSaveLoadingMap, rowKey, true)
await this.$nextTick()
await new Promise(resolve => requestAnimationFrame(resolve))
let loading = null let loading = null
try { try {
const valid = await this.$refs[`${table.Id}_${rowIndex}`][0].validate()
if (!valid) return
const innerForm = this.innerFormData[`${table.Id}_${rowIndex}`] const innerForm = this.innerFormData[`${table.Id}_${rowIndex}`]
if (table.LesionType === 0 && this.isBaseLineTask && !innerForm.IntrahepaticLesion) { if (table.LesionType === 0 && this.isBaseLineTask && !innerForm.IntrahepaticLesion) {
const arr = Object.values(this.innerFormData).filter( const arr = Object.values(this.innerFormData).filter(
@ -968,6 +981,11 @@ export default {
} }
loading = this.$loading({ fullscreen: true }) loading = this.$loading({ fullscreen: true })
const closeLoading = loading.close.bind(loading)
loading.close = () => {
closeLoading()
loading = null
}
const measureData = innerForm.MeasureData const measureData = innerForm.MeasureData
const lesionState = innerForm.LesionState const lesionState = innerForm.LesionState
let lesionLength = innerForm.LesionLength let lesionLength = innerForm.LesionLength
@ -1513,6 +1531,8 @@ export default {
if (loading) { if (loading) {
loading.close() loading.close()
} }
} finally {
this.$set(this.rowSaveLoadingMap, rowKey, false)
} }
}, },
// //

View File

@ -301,6 +301,11 @@ export default {
background-color: #646464a1; background-color: #646464a1;
} }
::v-deep .el-radio__input.is-disabled.is-checked .el-radio__inner {
background-color: #428bca;
border-color: #428bca;
}
::v-deep .el-button--mini, ::v-deep .el-button--mini,
.el-button--mini.is-round { .el-button--mini.is-round {
padding: 7px 10px; padding: 7px 10px;

View File

@ -316,11 +316,12 @@ export default {
return lesion ? lesion.Count : 0 return lesion ? lesion.Count : 0
}, },
handleSave(isPrompt = true) { handleSave(isPrompt = true) {
if (this.loading) return Promise.resolve(false)
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
try { try {
this.loading = true
let valid = await this.$refs['globalRuleForm'].validate() let valid = await this.$refs['globalRuleForm'].validate()
if (valid) { if (valid) {
this.loading = true
var visitTaskAnswerList = [] var visitTaskAnswerList = []
this.globalForm.taskList.forEach((item, index) => { this.globalForm.taskList.forEach((item, index) => {
var answerList = [] var answerList = []
@ -358,6 +359,7 @@ export default {
resolve(true) resolve(true)
} else { } else {
this.loading = false
reject(false) reject(false)
} }
} catch(e) { } catch(e) {

View File

@ -215,9 +215,13 @@ export default {
}, },
methods: { methods: {
handleSave() { handleSave() {
if (this.loading) return
this.loading = true
this.$refs.globalReviewForm.validate(valid => { this.$refs.globalReviewForm.validate(valid => {
if (!valid) return if (!valid) {
this.loading = true this.loading = false
return
}
var questionList = [] var questionList = []
var reg = new RegExp(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/) var reg = new RegExp(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/)
for (const i in this.form) { for (const i in this.form) {

View File

@ -372,11 +372,12 @@ export default {
return lesion ? lesion.Count : 0 return lesion ? lesion.Count : 0
}, },
handleSave(isPrompt = true) { handleSave(isPrompt = true) {
if (this.loading) return Promise.resolve(false)
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
try { try {
this.loading = true
let valid = await this.$refs['globalRuleForm'].validate() let valid = await this.$refs['globalRuleForm'].validate()
if (valid) { if (valid) {
this.loading = true
var visitTaskAnswerList = [] var visitTaskAnswerList = []
this.globalForm.taskList.forEach((item, index) => { this.globalForm.taskList.forEach((item, index) => {
var answerList = [] var answerList = []
@ -413,6 +414,7 @@ export default {
resolve(true) resolve(true)
} else { } else {
this.loading = false
resolve(false) resolve(false)
} }
} catch(e) { } catch(e) {

View File

@ -290,11 +290,12 @@ export default {
return lesion ? lesion.Count : 0 return lesion ? lesion.Count : 0
}, },
handleSave(isPrompt = true) { handleSave(isPrompt = true) {
if (this.loading) return Promise.resolve(false)
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
try { try {
this.loading = true
let valid = await this.$refs['globalRuleForm'].validate() let valid = await this.$refs['globalRuleForm'].validate()
if (valid) { if (valid) {
this.loading = true
var visitTaskAnswerList = [] var visitTaskAnswerList = []
this.globalForm.taskList.forEach((item, index) => { this.globalForm.taskList.forEach((item, index) => {
var answerList = [] var answerList = []
@ -333,6 +334,7 @@ export default {
resolve(true) resolve(true)
} else { } else {
this.loading = false
resolve(false) resolve(false)
} }
} catch (e) { } catch (e) {

View File

@ -304,11 +304,12 @@ export default {
return lesion ? lesion.Count : 0 return lesion ? lesion.Count : 0
}, },
handleSave(isPrompt = true) { handleSave(isPrompt = true) {
if (this.loading) return Promise.resolve(false)
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
try { try {
this.loading = true
let valid = await this.$refs['globalRuleForm'].validate() let valid = await this.$refs['globalRuleForm'].validate()
if (valid) { if (valid) {
this.loading = true
var visitTaskAnswerList = [] var visitTaskAnswerList = []
this.globalForm.taskList.forEach((item, index) => { this.globalForm.taskList.forEach((item, index) => {
var answerList = [] var answerList = []
@ -347,6 +348,7 @@ export default {
resolve(true) resolve(true)
} else { } else {
this.loading = false
resolve(false) resolve(false)
} }
} catch (e) { } catch (e) {

View File

@ -278,11 +278,12 @@ export default {
return lesion ? lesion.Count : 0 return lesion ? lesion.Count : 0
}, },
handleSave(isPrompt = true) { handleSave(isPrompt = true) {
if (this.loading) return Promise.resolve(false)
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
try { try {
this.loading = true
let valid = await this.$refs['globalRuleForm'].validate() let valid = await this.$refs['globalRuleForm'].validate()
if (valid) { if (valid) {
this.loading = true
var visitTaskAnswerList = [] var visitTaskAnswerList = []
this.globalForm.taskList.forEach((item, index) => { this.globalForm.taskList.forEach((item, index) => {
var answerList = [] var answerList = []
@ -321,6 +322,7 @@ export default {
resolve(true) resolve(true)
} else { } else {
this.loading = false
resolve(false) resolve(false)
} }
} catch (e) { } catch (e) {

View File

@ -178,11 +178,12 @@ export default {
this.$emit('handleView', row) this.$emit('handleView', row)
}, },
handleSave(isPrompt = true) { handleSave(isPrompt = true) {
if (this.loading) return Promise.resolve(false)
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
try { try {
this.loading = true
let valid = await this.$refs['globalRuleForm'].validate() let valid = await this.$refs['globalRuleForm'].validate()
if (valid) { if (valid) {
this.loading = true
var visitTaskAnswerList = [] var visitTaskAnswerList = []
this.globalForm.taskList.forEach((item, index) => { this.globalForm.taskList.forEach((item, index) => {
var answerList = [] var answerList = []
@ -216,6 +217,7 @@ export default {
resolve(true) resolve(true)
} else { } else {
this.loading = false
resolve(false) resolve(false)
} }
} catch (e) { } catch (e) {

View File

@ -213,9 +213,13 @@ export default {
}, },
methods: { methods: {
handleSave() { handleSave() {
if (this.loading) return
this.loading = true
this.$refs.globalReviewForm.validate(valid => { this.$refs.globalReviewForm.validate(valid => {
if (!valid) return if (!valid) {
this.loading = true this.loading = false
return
}
var questionList = [] var questionList = []
var reg = new RegExp(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/) var reg = new RegExp(/^[0-9a-zA-Z]{8}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{4}-[0-9a-zA-Z]{12}$/)
for (const i in this.form) { for (const i in this.form) {

View File

@ -369,11 +369,12 @@ export default {
return lesion ? lesion.Count : 0 return lesion ? lesion.Count : 0
}, },
handleSave(isPrompt = true) { handleSave(isPrompt = true) {
if (this.loading) return Promise.resolve(false)
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
try { try {
this.loading = true
let valid = await this.$refs['globalRuleForm'].validate() let valid = await this.$refs['globalRuleForm'].validate()
if (valid) { if (valid) {
this.loading = true
var visitTaskAnswerList = [] var visitTaskAnswerList = []
this.globalForm.taskList.forEach((item, index) => { this.globalForm.taskList.forEach((item, index) => {
var answerList = [] var answerList = []
@ -410,6 +411,7 @@ export default {
resolve(true) resolve(true)
} else { } else {
this.loading = false
resolve(false) resolve(false)
} }
} catch(e) { } catch(e) {

View File

@ -363,11 +363,12 @@ export default {
return lesion ? lesion.Count : 0 return lesion ? lesion.Count : 0
}, },
handleSave(isPrompt = true) { handleSave(isPrompt = true) {
if (this.loading) return Promise.resolve(false)
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
try { try {
this.loading = true
let valid = await this.$refs['globalRuleForm'].validate() let valid = await this.$refs['globalRuleForm'].validate()
if (valid) { if (valid) {
this.loading = true
var visitTaskAnswerList = [] var visitTaskAnswerList = []
this.globalForm.taskList.forEach((item, index) => { this.globalForm.taskList.forEach((item, index) => {
var answerList = [] var answerList = []
@ -404,6 +405,7 @@ export default {
resolve(true) resolve(true)
} else { } else {
this.loading = false
resolve(false) resolve(false)
} }
} catch(e) { } catch(e) {

View File

@ -29,11 +29,11 @@
<!-- 跳过 --> <!-- 跳过 -->
{{ $t('trials:readingReport:button:skip') }} {{ $t('trials:readingReport:button:skip') }}
</el-button> </el-button>
<el-button size="small" type="primary" @click="handleSave"> <el-button size="small" type="primary" :loading="submitLockAction === 'save'" :disabled="!!submitLockAction" @click="handleSave">
{{ $t('common:button:save') }} {{ $t('common:button:save') }}
</el-button> </el-button>
<!-- 提交 --> <!-- 提交 -->
<el-button size="small" type="primary" @click="handleConfirm"> <el-button size="small" type="primary" :loading="submitLockAction === 'submit'" :disabled="!!submitLockAction" @click="handleConfirm">
{{ $t('trials:globalReview:button:submit') }} {{ $t('trials:globalReview:button:submit') }}
</el-button> </el-button>
</div> </div>
@ -178,7 +178,8 @@ export default {
assessTypeList: [], assessTypeList: [],
CriterionType: 0, CriterionType: 0,
globalInfo: {}, globalInfo: {},
openWindow: null openWindow: null,
submitLockAction: ''
} }
}, },
// watch: { // watch: {
@ -293,8 +294,14 @@ export default {
this.historyLoading = false this.historyLoading = false
} }
}, },
handleSave() { async handleSave() {
this.$refs['globalTbl'].handleSave(true) if (this.submitLockAction) return false
this.submitLockAction = 'save'
try {
return await this.$refs['globalTbl'].handleSave(true)
} finally {
this.submitLockAction = ''
}
}, },
async skipTask() { async skipTask() {
try { try {
@ -319,6 +326,7 @@ export default {
} }
}, },
async handleConfirm() { async handleConfirm() {
if (this.submitLockAction) return false
// 访 // 访
var idx = this.taskList.findIndex(i => !i.AgreeOrNotAnswer) var idx = this.taskList.findIndex(i => !i.AgreeOrNotAnswer)
if (idx > -1) { if (idx > -1) {
@ -330,14 +338,18 @@ export default {
.then(() => { }) .then(() => { })
.catch(() => { }) .catch(() => { })
} else { } else {
// this.submitLockAction = 'submit'
let res = await this.$refs['globalTbl'].handleSave(false) try {
if (res) { //
const { ImageAssessmentReportConfirmation } = const_.processSignature let res = await this.$refs['globalTbl'].handleSave(false)
this.signCode = ImageAssessmentReportConfirmation if (res) {
this.signVisible = true const { ImageAssessmentReportConfirmation } = const_.processSignature
this.signCode = ImageAssessmentReportConfirmation
this.signVisible = true
}
} finally {
this.submitLockAction = ''
} }
} }
}, },
// //

View File

@ -27,11 +27,13 @@
{{ $t('trials:readingReport:button:skip') }} {{ $t('trials:readingReport:button:skip') }}
</el-button> </el-button>
<!-- 保存 --> <!-- 保存 -->
<el-button v-if="oncologyInfo.ReadingTaskState < 2" size="small" type="primary" @click="handleSave(true)"> <el-button v-if="oncologyInfo.ReadingTaskState < 2" size="small" type="primary"
:loading="submitLockAction === 'save'" :disabled="!!submitLockAction" @click="handleSave(true)">
{{ $t('common:button:save') }} {{ $t('common:button:save') }}
</el-button> </el-button>
<!-- 提交 --> <!-- 提交 -->
<el-button v-if="oncologyInfo.ReadingTaskState < 2" size="small" type="primary" @click="handleConfirm"> <el-button v-if="oncologyInfo.ReadingTaskState < 2" size="small" type="primary"
:loading="submitLockAction === 'submit'" :disabled="!!submitLockAction" @click="handleConfirm">
{{ $t('common:button:submit') }} {{ $t('common:button:submit') }}
</el-button> </el-button>
</div> </div>
@ -222,7 +224,8 @@ export default {
questionCols: [], questionCols: [],
oncologyInfo: {}, oncologyInfo: {},
assessTypeList: [], assessTypeList: [],
openWindow: null openWindow: null,
submitLockAction: ''
} }
}, },
// watch: { // watch: {
@ -289,41 +292,48 @@ export default {
} }
}, },
handleSave(isPrompt) { handleSave(isPrompt) {
if (this.submitLockAction && this.submitLockAction !== 'submit') return Promise.resolve(false)
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
this.loading = true if (!this.submitLockAction) {
// var index = this.oncologyInfo.OncologyVisits.findIndex(item => !item.EvaluationResult && !item.IsBaseLine) this.submitLockAction = 'save'
var isDiffer = this.checkDifferResult() }
if (isDiffer) { try {
this.loading = false
const confirm = await this.$confirm(
this.$t('trials:oncologyReview:message:msg2'),
{
type: 'warning',
distinguishCancelAndClose: true
}
)
if (confirm === 'confirm') reject(false)
} else {
this.loading = true this.loading = true
var oncologyQuestionList = [] // var index = this.oncologyInfo.OncologyVisits.findIndex(item => !item.EvaluationResult && !item.IsBaseLine)
this.oncologyInfo.OncologyVisits.map(item => { var isDiffer = this.checkDifferResult()
if (item.EvaluationResult && !item.IsBaseLine) { if (isDiffer) {
oncologyQuestionList.push( this.loading = false
{ const confirm = await this.$confirm(
visitTaskId: item.VisitTaskId, this.$t('trials:oncologyReview:message:msg2'),
evaluationResult: item.EvaluationResult, {
evaluationReason: item.EvaluationReason type: 'warning',
} distinguishCancelAndClose: true
) }
).catch(() => false)
if (confirm === 'confirm') {
resolve(false)
return
}
} else {
this.loading = true
var oncologyQuestionList = []
this.oncologyInfo.OncologyVisits.map(item => {
if (item.EvaluationResult && !item.IsBaseLine) {
oncologyQuestionList.push(
{
visitTaskId: item.VisitTaskId,
evaluationResult: item.EvaluationResult,
evaluationReason: item.EvaluationReason
}
)
}
})
var params = {
oncologyTaskId: this.visitTaskId,
oncologyQuestionList: oncologyQuestionList,
globalTaskId: this.oncologyInfo.GlobalTaskId,
relatedTaskId: this.oncologyInfo.RelatedTaskId
} }
})
var params = {
oncologyTaskId: this.visitTaskId,
oncologyQuestionList: oncologyQuestionList,
globalTaskId: this.oncologyInfo.GlobalTaskId,
relatedTaskId: this.oncologyInfo.RelatedTaskId
}
try {
await setOncologyReadingInfo(params) await setOncologyReadingInfo(params)
this.loading = false this.loading = false
this.getList() this.getList()
@ -331,10 +341,12 @@ export default {
this.$message.success(this.$t('common:message:savedSuccessfully')) this.$message.success(this.$t('common:message:savedSuccessfully'))
} }
resolve(true) resolve(true)
} catch (e) {
this.loading = false
reject(false)
} }
} catch (e) {
this.loading = false
reject(false)
} finally {
this.submitLockAction = this.submitLockAction === 'save' ? '' : this.submitLockAction
} }
}) })
}, },
@ -373,12 +385,15 @@ export default {
} }
}, },
async handleConfirm() { async handleConfirm() {
if (this.submitLockAction) return false
this.submitLockAction = 'submit'
const res = await this.handleSave(false) const res = await this.handleSave(false)
if (res) { if (res) {
const { ImageAssessmentReportConfirmation } = const_.processSignature const { ImageAssessmentReportConfirmation } = const_.processSignature
this.signCode = ImageAssessmentReportConfirmation this.signCode = ImageAssessmentReportConfirmation
this.signVisible = true this.signVisible = true
} }
this.submitLockAction = ''
}, },
// //
async signConfirm(signInfo) { async signConfirm(signInfo) {