Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web
continuous-integration/drone/push Build is running Details

uat_us
DESKTOP-6C3NK6N\WXS 2024-09-09 15:15:12 +08:00
commit 59c342ccd1
4 changed files with 1 additions and 169 deletions

View File

@ -207,7 +207,6 @@ export default {
lesionName: '', lesionName: '',
isCurrentTaskAdd: 'False', isCurrentTaskAdd: 'False',
lesionMark: '', lesionMark: '',
deleteInfo: null,
pictureBaseStr: '', pictureBaseStr: '',
digitPlaces: 2 digitPlaces: 2
} }
@ -291,27 +290,6 @@ export default {
return '' return ''
} }
}, },
deleteLesionInfo() {
return new Promise((resolve, reject) => {
const loading = this.$loading({ fullscreen: true })
var param = {
visitTaskId: this.visitTaskId,
questionId: this.parentQsId,
rowId: this.questionForm.RowId
}
deleteReadingRowAnswer(param)
.then(async res => {
if (res.IsSuccess) {
DicomEvent.$emit('getReportInfo', true)
}
loading.close()
resolve()
}).catch(() => {
loading.close()
reject()
})
})
},
async formItemChange(v, question) { async formItemChange(v, question) {
if (this.questionForm.RowId) { if (this.questionForm.RowId) {
this.$set(this.questionForm, 'saveTypeEnum', 1) this.$set(this.questionForm, 'saveTypeEnum', 1)
@ -387,23 +365,6 @@ export default {
return '' return ''
} }
}, },
setDeleteInfo(deleteInfo) {
this.deleteInfo = deleteInfo
},
deleteOldLesion(questionId, rowId) {
return new Promise((resolve, reject) => {
var param = {
visitTaskId: this.visitTaskId,
questionId: questionId,
rowId: rowId
}
deleteReadingRowAnswer(param)
.then(async res => {
resolve()
}).catch(() => {
})
})
},
async handleSave() { async handleSave() {
const valid = await this.$refs.measurementForm.validate() const valid = await this.$refs.measurementForm.validate()
if (!valid) return if (!valid) return
@ -427,11 +388,6 @@ export default {
trialId: this.trialId, trialId: this.trialId,
answerList: answers answerList: answers
} }
if (this.deleteInfo) {
await this.deleteOldLesion(this.deleteInfo.questionId, this.deleteInfo.rowId)
this.deleteInfo = null
params.rowId = ''
}
const res = await submitTableQuestion(params) const res = await submitTableQuestion(params)
if (res.IsSuccess) { if (res.IsSuccess) {
// //

View File

@ -104,7 +104,6 @@
:reading-task-state="readingTaskState" :reading-task-state="readingTaskState"
:is-base-line-task="isBaseLineTask" :is-base-line-task="isBaseLineTask"
@getReadingQuestionAndAnswer="getReadingQuestionAndAnswer" @getReadingQuestionAndAnswer="getReadingQuestionAndAnswer"
@determineExistsUnsavedLession="determineExistsUnsavedLession"
@resetQuestions="resetQuestions" @resetQuestions="resetQuestions"
@close="close" @close="close"
/> />
@ -276,10 +275,6 @@ export default {
this.setCollapseActive(measureData) this.setCollapseActive(measureData)
console.log('setCollapseActive') console.log('setCollapseActive')
}) })
DicomEvent.$on('changeLesionType', (questionsObj) => {
this.changeLesionType(questionsObj)
console.log('changeLesionType')
})
DicomEvent.$on('getAllUnSaveLesions', (callback) => { DicomEvent.$on('getAllUnSaveLesions', (callback) => {
callback([]) callback([])
}) })
@ -291,7 +286,6 @@ export default {
}, },
beforeDestroy() { beforeDestroy() {
DicomEvent.$off('setCollapseActive') DicomEvent.$off('setCollapseActive')
DicomEvent.$off('changeLesionType')
DicomEvent.$off('getUnSaveTarget') DicomEvent.$off('getUnSaveTarget')
DicomEvent.$off('refreshQuestions') DicomEvent.$off('refreshQuestions')
}, },
@ -512,10 +506,6 @@ export default {
return 0 return 0
} }
}, },
determineExistsUnsavedLession(callback) {
callback(true)
return
},
getLesionName(orderMark, rowIndex) { getLesionName(orderMark, rowIndex) {
var lessionName = '' var lessionName = ''
var rowIndexArr = rowIndex.split('.') var rowIndexArr = rowIndex.split('.')
@ -545,49 +535,6 @@ export default {
e.stopPropagation() e.stopPropagation()
e.preventDefault() e.preventDefault()
}, },
//
async changeLesionType(questionsObj) {
await store.dispatch('reading/removeReadingQuestionAndAnswer', { lesionType: questionsObj.oldLesionType, rowIndex: questionsObj.rowIndex, visitTaskId: this.visitTaskId })
// saveTypeEnum: 0
var lesionObj = { }
var questionObj = questionsObj.questionForm
//
var targetObj = this.tableQuestions.find(item => item.LesionType === questionsObj.newLesionType)
var maxIndex = this.getMaxRowIndex(targetObj.TableQuestions.Answers)
lesionObj.RowIndex = `${maxIndex + 1}.00`
targetObj.TableQuestions.Questions.forEach(i => {
var obj = questionObj.find(v => v.QuestionMark === i.QuestionMark)
if (obj) {
lesionObj[i.Id] = obj.Answer
}
})
var deleteInfo = null
if (questionsObj.rowId) {
deleteInfo = { rowId: questionsObj.rowId, questionId: questionsObj.questionId }
lesionObj.RowId = questionsObj.rowId
}
await store.dispatch('reading/addReadingQuestionAndAnswer', { lesionType: questionsObj.newLesionType, visitTaskId: this.visitTaskId, lesionObj: lesionObj })
this.activeItem.activeRowIndex = String(lesionObj.RowIndex)
this.activeItem.activeCollapseId = targetObj.Id
this.activeName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
this.$nextTick(() => {
if (deleteInfo) {
this.$refs[refName][0].setDeleteInfo(deleteInfo)
}
})
},
removeQuestionAnswer(questionsObj) {
//
var currentObj = this.tableQuestions.find(item => item.LesionType === questionsObj.oldLesionType)
if (currentObj) {
var i = currentObj.TableQuestions.Answers.findIndex(i => String(i.RowIndex) === String(questionsObj.rowIndex))
if (i === -1) return
currentObj.TableQuestions.Answers.splice(i, 1)
}
},
setCollapseActive(measureData) { setCollapseActive(measureData) {
}, },

View File

@ -207,7 +207,6 @@ export default {
lesionName: '', lesionName: '',
isCurrentTaskAdd: 'False', isCurrentTaskAdd: 'False',
lesionMark: '', lesionMark: '',
deleteInfo: null,
pictureBaseStr: '', pictureBaseStr: '',
digitPlaces: 2 digitPlaces: 2
} }
@ -387,23 +386,6 @@ export default {
return '' return ''
} }
}, },
setDeleteInfo(deleteInfo) {
this.deleteInfo = deleteInfo
},
deleteOldLesion(questionId, rowId) {
return new Promise((resolve, reject) => {
var param = {
visitTaskId: this.visitTaskId,
questionId: questionId,
rowId: rowId
}
deleteReadingRowAnswer(param)
.then(async res => {
resolve()
}).catch(() => {
})
})
},
async handleSave() { async handleSave() {
const valid = await this.$refs.measurementForm.validate() const valid = await this.$refs.measurementForm.validate()
if (!valid) return if (!valid) return
@ -427,11 +409,6 @@ export default {
trialId: this.trialId, trialId: this.trialId,
answerList: answers answerList: answers
} }
if (this.deleteInfo) {
await this.deleteOldLesion(this.deleteInfo.questionId, this.deleteInfo.rowId)
this.deleteInfo = null
params.rowId = ''
}
const res = await submitTableQuestion(params) const res = await submitTableQuestion(params)
if (res.IsSuccess) { if (res.IsSuccess) {
// //

View File

@ -275,10 +275,6 @@ export default {
this.setCollapseActive(measureData) this.setCollapseActive(measureData)
console.log('setCollapseActive') console.log('setCollapseActive')
}) })
DicomEvent.$on('changeLesionType', (questionsObj) => {
this.changeLesionType(questionsObj)
console.log('changeLesionType')
})
DicomEvent.$on('getAllUnSaveLesions', (callback) => { DicomEvent.$on('getAllUnSaveLesions', (callback) => {
callback([]) callback([])
}) })
@ -290,7 +286,6 @@ export default {
}, },
beforeDestroy() { beforeDestroy() {
DicomEvent.$off('setCollapseActive') DicomEvent.$off('setCollapseActive')
DicomEvent.$off('changeLesionType')
DicomEvent.$off('getUnSaveTarget') DicomEvent.$off('getUnSaveTarget')
DicomEvent.$off('refreshQuestions') DicomEvent.$off('refreshQuestions')
}, },
@ -552,49 +547,6 @@ export default {
e.stopPropagation() e.stopPropagation()
e.preventDefault() e.preventDefault()
}, },
//
async changeLesionType(questionsObj) {
await store.dispatch('reading/removeReadingQuestionAndAnswer', { lesionType: questionsObj.oldLesionType, rowIndex: questionsObj.rowIndex, visitTaskId: this.visitTaskId })
// saveTypeEnum: 0
var lesionObj = { }
var questionObj = questionsObj.questionForm
//
var targetObj = this.tableQuestions.find(item => item.LesionType === questionsObj.newLesionType)
var maxIndex = this.getMaxRowIndex(targetObj.TableQuestions.Answers)
lesionObj.RowIndex = `${maxIndex + 1}.00`
targetObj.TableQuestions.Questions.forEach(i => {
var obj = questionObj.find(v => v.QuestionMark === i.QuestionMark)
if (obj) {
lesionObj[i.Id] = obj.Answer
}
})
var deleteInfo = null
if (questionsObj.rowId) {
deleteInfo = { rowId: questionsObj.rowId, questionId: questionsObj.questionId }
lesionObj.RowId = questionsObj.rowId
}
await store.dispatch('reading/addReadingQuestionAndAnswer', { lesionType: questionsObj.newLesionType, visitTaskId: this.visitTaskId, lesionObj: lesionObj })
this.activeItem.activeRowIndex = String(lesionObj.RowIndex)
this.activeItem.activeCollapseId = targetObj.Id
this.activeName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
const refName = `${this.activeItem.activeCollapseId}_${this.activeItem.activeRowIndex}`
this.$nextTick(() => {
if (deleteInfo) {
this.$refs[refName][0].setDeleteInfo(deleteInfo)
}
})
},
removeQuestionAnswer(questionsObj) {
//
var currentObj = this.tableQuestions.find(item => item.LesionType === questionsObj.oldLesionType)
if (currentObj) {
var i = currentObj.TableQuestions.Answers.findIndex(i => String(i.RowIndex) === String(questionsObj.rowIndex))
if (i === -1) return
currentObj.TableQuestions.Answers.splice(i, 1)
}
},
setCollapseActive(measureData) { setCollapseActive(measureData) {
}, },
@ -634,7 +586,7 @@ export default {
answers: answers answers: answers
} }
try { try {
await saveTaskQuestion(8, params) // await saveTaskQuestion(8, params)
this.$message.success(this.$t('common:message:savedSuccessfully')) this.$message.success(this.$t('common:message:savedSuccessfully'))
loading.close() loading.close()
DicomEvent.$emit('getReportInfo', true) DicomEvent.$emit('getReportInfo', true)