1
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
0d85f138a5
commit
fbb23065e5
|
@ -545,18 +545,18 @@ export default {
|
||||||
const stateHandlers = {
|
const stateHandlers = {
|
||||||
[STATE.BIND]: () => this.$emit('setReadingToolPassive'),
|
[STATE.BIND]: () => this.$emit('setReadingToolPassive'),
|
||||||
[STATE.ADD]: () => this.$emit('setReadingToolActive', ImageTool),
|
[STATE.ADD]: () => this.$emit('setReadingToolActive', ImageTool),
|
||||||
[STATE.VIEW]: this.handleViewState,
|
[STATE.VIEW]: this.handleViewAnnotation,
|
||||||
[STATE.CHANGE]: () => this.$emit('setReadingToolPassive'),
|
[STATE.CHANGE]: () => this.$emit('setReadingToolPassive'),
|
||||||
[STATE.REMOVE]: this.handleRemoveState,
|
[STATE.REMOVE]: this.handleRemoveAnnotation,
|
||||||
[STATE.SAVE_OUTER]: this.handleSaveOuterState,
|
[STATE.SAVE_OUTER]: this.handleSaveOuterQuestions,
|
||||||
[STATE.UPDATE]: this.handleUpdateState,
|
[STATE.UPDATE]: this.handleUpdateValue,
|
||||||
[STATE.SAVE_TABLE]: this.handleSaveTableState
|
[STATE.SAVE_TABLE]: this.handleSaveTableQuestions
|
||||||
}
|
}
|
||||||
|
|
||||||
const handler = stateHandlers[operateStateEnum]
|
const handler = stateHandlers[operateStateEnum]
|
||||||
handler && await handler.call(this, obj)
|
handler && await handler.call(this, obj)
|
||||||
},
|
},
|
||||||
async handleViewState(obj) {
|
async handleViewAnnotation(obj) {
|
||||||
const index = this.findMarkIndex(obj.question)
|
const index = this.findMarkIndex(obj.question)
|
||||||
if (index === -1) return
|
if (index === -1) return
|
||||||
const annotation = this.questionMarkInfoList[index].MeasureData
|
const annotation = this.questionMarkInfoList[index].MeasureData
|
||||||
|
@ -565,7 +565,7 @@ export default {
|
||||||
annotation
|
annotation
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleRemoveState(obj) {
|
handleRemoveAnnotation(obj) {
|
||||||
const index = this.findMarkIndex(obj.question)
|
const index = this.findMarkIndex(obj.question)
|
||||||
if (index === -1) return
|
if (index === -1) return
|
||||||
Object.assign(this.questionMarkInfoList[index], {
|
Object.assign(this.questionMarkInfoList[index], {
|
||||||
|
@ -582,7 +582,7 @@ export default {
|
||||||
isSaved: false
|
isSaved: false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async handleSaveOuterState(obj) {
|
async handleSaveOuterQuestions(obj) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
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] }]
|
||||||
|
@ -613,7 +613,7 @@ export default {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleUpdateState(obj) {
|
handleUpdateValue(obj) {
|
||||||
const key = this.operateRowId
|
const key = this.operateRowId
|
||||||
? `${this.operateRowId}_${obj.question.Id}`
|
? `${this.operateRowId}_${obj.question.Id}`
|
||||||
: obj.question.Id
|
: obj.question.Id
|
||||||
|
@ -622,7 +622,7 @@ export default {
|
||||||
isSaved: false
|
isSaved: false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async handleSaveTableState(obj) {
|
async handleSaveTableQuestions(obj) {
|
||||||
const loading = this.$loading({ fullscreen: true })
|
const loading = this.$loading({ fullscreen: true })
|
||||||
try {
|
try {
|
||||||
let annotation = null
|
let annotation = null
|
||||||
|
|
Loading…
Reference in New Issue