Compare commits
No commits in common. "1483a8c670dac5b2100d0ee0857df20661318d4d" and "45a54d69a42cd22db340ad9084e9c209b58e1ef7" have entirely different histories.
1483a8c670
...
45a54d69a4
|
@ -783,7 +783,6 @@ export default {
|
||||||
loadingText: null,
|
loadingText: null,
|
||||||
toolNames: ['Length', 'Bidirectional', 'RectangleROI', 'ArrowAnnotate', 'CircleROI', 'Eraser'],
|
toolNames: ['Length', 'Bidirectional', 'RectangleROI', 'ArrowAnnotate', 'CircleROI', 'Eraser'],
|
||||||
// resetAnnotation: false , // 是否初始化标记 (融合时使用)
|
// resetAnnotation: false , // 是否初始化标记 (融合时使用)
|
||||||
saveCustomAnnotationTimer: null,
|
|
||||||
|
|
||||||
// 上传
|
// 上传
|
||||||
downloadImageVisible: false,
|
downloadImageVisible: false,
|
||||||
|
@ -1541,11 +1540,7 @@ export default {
|
||||||
if (this.isNumber(operateStateEnum)) {
|
if (this.isNumber(operateStateEnum)) {
|
||||||
this.$refs[`ecrf_${series.TaskInfo.VisitTaskId}`][0].bindAnnotationToQuestion(annotation)
|
this.$refs[`ecrf_${series.TaskInfo.VisitTaskId}`][0].bindAnnotationToQuestion(annotation)
|
||||||
} else {
|
} else {
|
||||||
if (this.saveCustomAnnotationTimer) {
|
setTimeout(()=>{this.saveCustomAnnotation(annotation)},500)
|
||||||
clearTimeout(this.saveCustomAnnotationTimer)
|
|
||||||
this.saveCustomAnnotationTimer = null
|
|
||||||
}
|
|
||||||
this.saveCustomAnnotationTimer = setTimeout(()=>{this.saveCustomAnnotation(annotation)},500)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1577,7 +1572,6 @@ export default {
|
||||||
params.Id = annotation.id ? annotation.id : ''
|
params.Id = annotation.id ? annotation.id : ''
|
||||||
params.MeasureData = JSON.stringify(measureData)
|
params.MeasureData = JSON.stringify(measureData)
|
||||||
params.NumberOfFrames = annotation.numberOfFrames
|
params.NumberOfFrames = annotation.numberOfFrames
|
||||||
params.MarkId = annotation.annotationUID
|
|
||||||
const res = await submitCustomTag(params)
|
const res = await submitCustomTag(params)
|
||||||
annotation.id = res.Result
|
annotation.id = res.Result
|
||||||
})
|
})
|
||||||
|
@ -1606,11 +1600,7 @@ export default {
|
||||||
if (isBound || this.isNumber(operateStateEnum)) {
|
if (isBound || this.isNumber(operateStateEnum)) {
|
||||||
this.$refs[`ecrf_${series.TaskInfo.VisitTaskId}`][0].updateAnnotationToQuestion(annotation)
|
this.$refs[`ecrf_${series.TaskInfo.VisitTaskId}`][0].updateAnnotationToQuestion(annotation)
|
||||||
} else {
|
} else {
|
||||||
if (this.saveCustomAnnotationTimer) {
|
this.saveCustomAnnotation(annotation)
|
||||||
clearTimeout(this.saveCustomAnnotationTimer)
|
|
||||||
this.saveCustomAnnotationTimer = null
|
|
||||||
}
|
|
||||||
this.saveCustomAnnotationTimer = setTimeout(()=>{this.saveCustomAnnotation(annotation)},1000)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.setToolsPassive()
|
this.setToolsPassive()
|
||||||
|
@ -3226,10 +3216,6 @@ export default {
|
||||||
DicomEvent.$off('isCanActiveNoneDicomTool')
|
DicomEvent.$off('isCanActiveNoneDicomTool')
|
||||||
DicomEvent.$off('removeNoneDicomMeasureData')
|
DicomEvent.$off('removeNoneDicomMeasureData')
|
||||||
DicomEvent.$off('addNoneDicomMeasureData')
|
DicomEvent.$off('addNoneDicomMeasureData')
|
||||||
if (this.saveCustomAnnotationTimer) {
|
|
||||||
clearTimeout(this.saveCustomAnnotationTimer)
|
|
||||||
this.saveCustomAnnotationTimer = null
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -288,7 +288,6 @@ import QuestionTableFormItem from './QuestionTableFormItem'
|
||||||
import BaseModel from '@/components/BaseModel'
|
import BaseModel from '@/components/BaseModel'
|
||||||
import PreviewFile from '@/components/PreviewFile/index'
|
import PreviewFile from '@/components/PreviewFile/index'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import DicomEvent from '@/views/trials/trials-panel/reading/dicoms/components/DicomEvent'
|
|
||||||
export default {
|
export default {
|
||||||
name: 'QuestionFormItem',
|
name: 'QuestionFormItem',
|
||||||
components: { QuestionTableFormItem, BaseModel, PreviewFile },
|
components: { QuestionTableFormItem, BaseModel, PreviewFile },
|
||||||
|
@ -462,16 +461,6 @@ export default {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DicomEvent.$on('openAddTableCol', (data) => {
|
|
||||||
let { RowId } = data
|
|
||||||
if (this.questionForm[this.question.Id] && Array.isArray(this.questionForm[this.question.Id]) && this.questionForm[this.question.Id].length > 0) {
|
|
||||||
let index = this.questionForm[this.question.Id].findIndex(item => item.RowId === RowId)
|
|
||||||
if (!!~index) {
|
|
||||||
this.openAddTableCol(this.question, index)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
numberInput(id) {
|
numberInput(id) {
|
||||||
|
@ -705,7 +694,7 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isExistUnSaved) {
|
if (isExistUnSaved) {
|
||||||
if (this.addOrEdit.type === 'add') {
|
if (this.addOrEdit.type = 'add') {
|
||||||
// 标记未保存是否确认关闭?
|
// 标记未保存是否确认关闭?
|
||||||
const confirm = await this.$confirm(this.$t("dicom3D:CustomizeQuestionFormItem:confirm:markNoSaveAndclose"), {
|
const confirm = await this.$confirm(this.$t("dicom3D:CustomizeQuestionFormItem:confirm:markNoSaveAndclose"), {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
|
@ -1204,7 +1193,7 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isExistUnSaved) {
|
if (isExistUnSaved) {
|
||||||
if (this.addOrEdit.type === 'add') {
|
if (this.addOrEdit.type = 'add') {
|
||||||
//标记未保存是否确认关闭?
|
//标记未保存是否确认关闭?
|
||||||
const confirm = await this.$confirm(this.$t("dicom3D:CustomizeQuestionFormItem:confirm:markNoSaveAndclose"), {
|
const confirm = await this.$confirm(this.$t("dicom3D:CustomizeQuestionFormItem:confirm:markNoSaveAndclose"), {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
|
|
|
@ -577,7 +577,7 @@ export default {
|
||||||
try {
|
try {
|
||||||
const answers = [{ id: obj.question.Id, answer: this.questionForm[obj.question.Id] }]
|
const answers = [{ id: obj.question.Id, answer: this.questionForm[obj.question.Id] }]
|
||||||
const markInfo = []
|
const markInfo = []
|
||||||
console.log(this.questionMarkInfoList, 'this.questionMarkInfoList')
|
|
||||||
const index = this.questionMarkInfoList.findIndex(
|
const index = this.questionMarkInfoList.findIndex(
|
||||||
item => item.QuestionId === this.operateQuestionId
|
item => item.QuestionId === this.operateQuestionId
|
||||||
)
|
)
|
||||||
|
@ -604,7 +604,6 @@ export default {
|
||||||
picturePath = pictureObj.isSuccess ? this.$getObjectName(pictureObj.result.url) : ''
|
picturePath = pictureObj.isSuccess ? this.$getObjectName(pictureObj.result.url) : ''
|
||||||
markInfo[0].PicturePath = picturePath
|
markInfo[0].PicturePath = picturePath
|
||||||
}
|
}
|
||||||
markInfo[0].MarkId = annotation ? annotation.annotationUID : null
|
|
||||||
await saveTaskQuestion(-10, {
|
await saveTaskQuestion(-10, {
|
||||||
visitTaskId: this.visitTaskId,
|
visitTaskId: this.visitTaskId,
|
||||||
answers,
|
answers,
|
||||||
|
@ -666,12 +665,11 @@ export default {
|
||||||
QuestionType: 0,
|
QuestionType: 0,
|
||||||
RowId: this.operateRowId,
|
RowId: this.operateRowId,
|
||||||
TableQuestionId: this.operateQuestionId,
|
TableQuestionId: this.operateQuestionId,
|
||||||
RowIndex: obj.rowIndex,
|
RowIndex: obj.rowIndex
|
||||||
MarkId: annotation ? annotation.annotationUID : null
|
|
||||||
}, -10)
|
}, -10)
|
||||||
this.$set(this.questionsMarkStatus,
|
this.$set(this.questionsMarkStatus,
|
||||||
`${this.operateRowId}_${this.operateQuestionId}`,
|
`${this.operateRowId}_${this.operateQuestionId}`,
|
||||||
{ isMarked: !!annotation, isSaved: true, OrderMarkName: annotation ? annotation.data.label : '' }
|
{ isMarked: !!annotation, isSaved: true, OrderMarkName: annotation.data.label }
|
||||||
)
|
)
|
||||||
this.resetOperateState()
|
this.resetOperateState()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -721,7 +719,6 @@ export default {
|
||||||
return index > -1 ? this.questionMarkInfoList[index].MeasureData : null
|
return index > -1 ? this.questionMarkInfoList[index].MeasureData : null
|
||||||
},
|
},
|
||||||
async bindAnnotationToQuestion(annotation) {
|
async bindAnnotationToQuestion(annotation) {
|
||||||
console.log(this.operateStateEnum, 'bindAnnotationToQuestion')
|
|
||||||
try {
|
try {
|
||||||
const VALID_STATES = [null, 0, 1, 3]
|
const VALID_STATES = [null, 0, 1, 3]
|
||||||
const currentState = this.operateStateEnum
|
const currentState = this.operateStateEnum
|
||||||
|
@ -732,38 +729,26 @@ export default {
|
||||||
return this.handleNullState(annotation)
|
return this.handleNullState(annotation)
|
||||||
}
|
}
|
||||||
if (!this.operateQuestionId) return
|
if (!this.operateQuestionId) return
|
||||||
if ([0, 1, 3].includes(currentState)) {
|
if ([0, 3].includes(currentState)) {
|
||||||
// 该标记不能与问题绑定!
|
// 该标记不能与问题绑定!
|
||||||
if (!annotation.data.label || annotation.markTool !== this.imageTool) {
|
if (!annotation.data.label || annotation.markTool !== this.imageTool) {
|
||||||
let message = this.$t("dicom3D:CustomizeQuestionList:alert:markNoSaveToQuestion").replace("xxx", this.$t(`dicom3D:mark:${this.imageTool}`))
|
let message = this.$t("dicom3D:CustomizeQuestionList:alert:markNoSaveToQuestion").replace("xxx", this.$t(`dicom3D:mark:${this.imageTool}`))
|
||||||
this.$alert(message)
|
this.$alert(message)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// if (currentState === 3) {
|
if (currentState === 3) {
|
||||||
let conflictIndex = this.questionMarkInfoList.findIndex(
|
const conflictIndex = this.questionMarkInfoList.findIndex(
|
||||||
item => item.MeasureData.annotationUID === annotation.annotationUID
|
item => item.MeasureData.annotationUID === annotation.annotationUID
|
||||||
&& item.RowId !== this.operateRowId && item.RowId
|
&& item.RowId !== this.operateRowId && this.operateRowId
|
||||||
)
|
)
|
||||||
// && this.operateRowId
|
|
||||||
console.log(conflictIndex)
|
|
||||||
if (conflictIndex > -1) {
|
if (conflictIndex > -1) {
|
||||||
//该标记已绑定到其他行,不能更改绑定!
|
//该标记已绑定到其他行,不能更改绑定!
|
||||||
this.$alert(this.$t("dicom3D:CustomizeQuestionList:alert:markIsbind"))
|
this.$alert(this.$t("dicom3D:CustomizeQuestionList:alert:markIsbind"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
conflictIndex = this.questionMarkInfoList.findIndex(
|
|
||||||
item => item.MeasureData.annotationUID === annotation.annotationUID
|
|
||||||
&& !item.TableQuestionId && this.isTableQuestion
|
|
||||||
)
|
|
||||||
if (conflictIndex > -1) {
|
|
||||||
//该标记已绑定到外层问题,不能更改绑定!
|
|
||||||
this.$alert(this.$t("dicom3D:CustomizeQuestionList:alert:markIsbind2"))
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
// }
|
|
||||||
// 是否确认绑定? 是否确认更改?
|
// 是否确认绑定? 是否确认更改?
|
||||||
const message = currentState === 0 ? this.$t("dicom3D:CustomizeQuestionList:confirm:bindYesOrNo") : currentState === 3 ? this.$t("dicom3D:CustomizeQuestionList:confirm:updateYesOrNo") : null
|
const message = currentState === 0 ? this.$t("dicom3D:CustomizeQuestionList:confirm:bindYesOrNo") : this.$t("dicom3D:CustomizeQuestionList:confirm:updateYesOrNo")
|
||||||
if (message) {
|
|
||||||
const result = await this.$confirm(message, {
|
const result = await this.$confirm(message, {
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
distinguishCancelAndClose: true
|
distinguishCancelAndClose: true
|
||||||
|
@ -771,7 +756,6 @@ export default {
|
||||||
const isConfirmed = result === 'confirm'
|
const isConfirmed = result === 'confirm'
|
||||||
if (!isConfirmed) return
|
if (!isConfirmed) return
|
||||||
}
|
}
|
||||||
}
|
|
||||||
const targetIndex = this.findTargetIndex()
|
const targetIndex = this.findTargetIndex()
|
||||||
if (targetIndex === -1) {
|
if (targetIndex === -1) {
|
||||||
this.questionMarkInfoList.push({
|
this.questionMarkInfoList.push({
|
||||||
|
@ -901,9 +885,6 @@ export default {
|
||||||
qsArr.push({ ...item })
|
qsArr.push({ ...item })
|
||||||
const keyId = item.RowId ? `${item.RowId}_${item.TableQuestionId}` : item.TableQuestionId;
|
const keyId = item.RowId ? `${item.RowId}_${item.TableQuestionId}` : item.TableQuestionId;
|
||||||
this.$set(this.questionsMarkStatus, keyId, questionMarkInfo);
|
this.$set(this.questionsMarkStatus, keyId, questionMarkInfo);
|
||||||
if (item.RowId) {
|
|
||||||
DicomEvent.$emit('openAddTableCol', { RowId: item.RowId })
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (qsArr.length > 0) {
|
if (qsArr.length > 0) {
|
||||||
store.dispatch('dicom3d/setOperateInfo', qsArr);
|
store.dispatch('dicom3d/setOperateInfo', qsArr);
|
||||||
|
|
Loading…
Reference in New Issue