Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web
continuous-integration/drone/push Build is running
Details
continuous-integration/drone/push Build is running
Details
commit
59c342ccd1
|
@ -207,7 +207,6 @@ export default {
|
|||
lesionName: '',
|
||||
isCurrentTaskAdd: 'False',
|
||||
lesionMark: '',
|
||||
deleteInfo: null,
|
||||
pictureBaseStr: '',
|
||||
digitPlaces: 2
|
||||
}
|
||||
|
@ -291,27 +290,6 @@ export default {
|
|||
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) {
|
||||
if (this.questionForm.RowId) {
|
||||
this.$set(this.questionForm, 'saveTypeEnum', 1)
|
||||
|
@ -387,23 +365,6 @@ export default {
|
|||
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() {
|
||||
const valid = await this.$refs.measurementForm.validate()
|
||||
if (!valid) return
|
||||
|
@ -427,11 +388,6 @@ export default {
|
|||
trialId: this.trialId,
|
||||
answerList: answers
|
||||
}
|
||||
if (this.deleteInfo) {
|
||||
await this.deleteOldLesion(this.deleteInfo.questionId, this.deleteInfo.rowId)
|
||||
this.deleteInfo = null
|
||||
params.rowId = ''
|
||||
}
|
||||
const res = await submitTableQuestion(params)
|
||||
if (res.IsSuccess) {
|
||||
// 保存成功!
|
||||
|
|
|
@ -104,7 +104,6 @@
|
|||
:reading-task-state="readingTaskState"
|
||||
:is-base-line-task="isBaseLineTask"
|
||||
@getReadingQuestionAndAnswer="getReadingQuestionAndAnswer"
|
||||
@determineExistsUnsavedLession="determineExistsUnsavedLession"
|
||||
@resetQuestions="resetQuestions"
|
||||
@close="close"
|
||||
/>
|
||||
|
@ -276,10 +275,6 @@ export default {
|
|||
this.setCollapseActive(measureData)
|
||||
console.log('setCollapseActive')
|
||||
})
|
||||
DicomEvent.$on('changeLesionType', (questionsObj) => {
|
||||
this.changeLesionType(questionsObj)
|
||||
console.log('changeLesionType')
|
||||
})
|
||||
DicomEvent.$on('getAllUnSaveLesions', (callback) => {
|
||||
callback([])
|
||||
})
|
||||
|
@ -291,7 +286,6 @@ export default {
|
|||
},
|
||||
beforeDestroy() {
|
||||
DicomEvent.$off('setCollapseActive')
|
||||
DicomEvent.$off('changeLesionType')
|
||||
DicomEvent.$off('getUnSaveTarget')
|
||||
DicomEvent.$off('refreshQuestions')
|
||||
},
|
||||
|
@ -512,10 +506,6 @@ export default {
|
|||
return 0
|
||||
}
|
||||
},
|
||||
determineExistsUnsavedLession(callback) {
|
||||
callback(true)
|
||||
return
|
||||
},
|
||||
getLesionName(orderMark, rowIndex) {
|
||||
var lessionName = ''
|
||||
var rowIndexArr = rowIndex.split('.')
|
||||
|
@ -545,49 +535,6 @@ export default {
|
|||
e.stopPropagation()
|
||||
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) {
|
||||
|
||||
},
|
||||
|
|
|
@ -207,7 +207,6 @@ export default {
|
|||
lesionName: '',
|
||||
isCurrentTaskAdd: 'False',
|
||||
lesionMark: '',
|
||||
deleteInfo: null,
|
||||
pictureBaseStr: '',
|
||||
digitPlaces: 2
|
||||
}
|
||||
|
@ -387,23 +386,6 @@ export default {
|
|||
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() {
|
||||
const valid = await this.$refs.measurementForm.validate()
|
||||
if (!valid) return
|
||||
|
@ -427,11 +409,6 @@ export default {
|
|||
trialId: this.trialId,
|
||||
answerList: answers
|
||||
}
|
||||
if (this.deleteInfo) {
|
||||
await this.deleteOldLesion(this.deleteInfo.questionId, this.deleteInfo.rowId)
|
||||
this.deleteInfo = null
|
||||
params.rowId = ''
|
||||
}
|
||||
const res = await submitTableQuestion(params)
|
||||
if (res.IsSuccess) {
|
||||
// 保存成功!
|
||||
|
|
|
@ -275,10 +275,6 @@ export default {
|
|||
this.setCollapseActive(measureData)
|
||||
console.log('setCollapseActive')
|
||||
})
|
||||
DicomEvent.$on('changeLesionType', (questionsObj) => {
|
||||
this.changeLesionType(questionsObj)
|
||||
console.log('changeLesionType')
|
||||
})
|
||||
DicomEvent.$on('getAllUnSaveLesions', (callback) => {
|
||||
callback([])
|
||||
})
|
||||
|
@ -290,7 +286,6 @@ export default {
|
|||
},
|
||||
beforeDestroy() {
|
||||
DicomEvent.$off('setCollapseActive')
|
||||
DicomEvent.$off('changeLesionType')
|
||||
DicomEvent.$off('getUnSaveTarget')
|
||||
DicomEvent.$off('refreshQuestions')
|
||||
},
|
||||
|
@ -552,49 +547,6 @@ export default {
|
|||
e.stopPropagation()
|
||||
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) {
|
||||
|
||||
},
|
||||
|
@ -634,7 +586,7 @@ export default {
|
|||
answers: answers
|
||||
}
|
||||
try {
|
||||
await saveTaskQuestion(8, params)
|
||||
// await saveTaskQuestion(8, params)
|
||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||
loading.close()
|
||||
DicomEvent.$emit('getReportInfo', true)
|
||||
|
|
Loading…
Reference in New Issue