1
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
fbb23065e5
commit
ae808679a0
|
@ -590,6 +590,7 @@ export default {
|
||||||
// 如果不是当前窗口绑定的标记如何处理?
|
// 如果不是当前窗口绑定的标记如何处理?
|
||||||
this.setAnswerToQuestion(v)
|
this.setAnswerToQuestion(v)
|
||||||
} else {
|
} else {
|
||||||
|
console.log(v)
|
||||||
if (v.length === 1) {
|
if (v.length === 1) {
|
||||||
const { parentQsId, rowId } = v[0]
|
const { parentQsId, rowId } = v[0]
|
||||||
if (!parentQsId && !rowId) return
|
if (!parentQsId && !rowId) return
|
||||||
|
|
|
@ -129,6 +129,7 @@ export default {
|
||||||
imageToolAttribute: '',
|
imageToolAttribute: '',
|
||||||
questionsMarkStatus: {},
|
questionsMarkStatus: {},
|
||||||
digitPlaces: 2,
|
digitPlaces: 2,
|
||||||
|
questionImageToolAttributeInfo: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -165,6 +166,9 @@ export default {
|
||||||
}
|
}
|
||||||
if (v.Type === 'number') {
|
if (v.Type === 'number') {
|
||||||
this.$set(this.questionForm, v.Id, v.Answer === '' ? '' : parseFloat(v.Answer).toFixed(this.digitPlaces))
|
this.$set(this.questionForm, v.Id, v.Answer === '' ? '' : parseFloat(v.Answer).toFixed(this.digitPlaces))
|
||||||
|
if (v.ImageToolAttribute) {
|
||||||
|
this.$set(this.questionImageToolAttributeInfo, v.Id, v.ImageToolAttribute)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (v.Childrens.length > 0) {
|
if (v.Childrens.length > 0) {
|
||||||
this.setChild(v.Childrens)
|
this.setChild(v.Childrens)
|
||||||
|
@ -213,6 +217,9 @@ export default {
|
||||||
}
|
}
|
||||||
if (i.Type === 'number') {
|
if (i.Type === 'number') {
|
||||||
this.$set(this.questionForm, i.Id, i.Answer === '' ? '' : parseFloat(i.Answer).toFixed(this.digitPlaces))
|
this.$set(this.questionForm, i.Id, i.Answer === '' ? '' : parseFloat(i.Answer).toFixed(this.digitPlaces))
|
||||||
|
if (i.ImageToolAttribute) {
|
||||||
|
this.$set(this.questionImageToolAttributeInfo, i.Id, i.ImageToolAttribute)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (i.Childrens && i.Childrens.length > 0) {
|
if (i.Childrens && i.Childrens.length > 0) {
|
||||||
this.setChild(i.Childrens)
|
this.setChild(i.Childrens)
|
||||||
|
@ -627,11 +634,10 @@ export default {
|
||||||
try {
|
try {
|
||||||
let annotation = null
|
let annotation = null
|
||||||
if (!this.operateRowId && obj.rowId && obj.question.ParentQsId) {
|
if (!this.operateRowId && obj.rowId && obj.question.ParentQsId) {
|
||||||
|
this.operateRowId = obj.rowId
|
||||||
this.updateQuestionsMarkStatus(obj)
|
this.updateQuestionsMarkStatus(obj)
|
||||||
annotation = this.getAnnotationByRow(obj.rowId)
|
|
||||||
} else if (this.operateRowId && this.operateQuestionId) {
|
|
||||||
annotation = this.getAnnotationByRow(this.operateRowId)
|
|
||||||
}
|
}
|
||||||
|
annotation = this.getAnnotationByRow(this.operateRowId)
|
||||||
// 截图上传
|
// 截图上传
|
||||||
let picturePath = ''
|
let picturePath = ''
|
||||||
if (annotation) {
|
if (annotation) {
|
||||||
|
@ -684,7 +690,6 @@ export default {
|
||||||
return this.questionMarkInfoList.findIndex(i => i.QuestionId === Id)
|
return this.questionMarkInfoList.findIndex(i => i.QuestionId === Id)
|
||||||
},
|
},
|
||||||
updateQuestionsMarkStatus(obj) {
|
updateQuestionsMarkStatus(obj) {
|
||||||
this.operateRowId = obj.rowId
|
|
||||||
this.questionMarkInfoList.forEach(item => {
|
this.questionMarkInfoList.forEach(item => {
|
||||||
if (item.QuestionId === obj.question.ParentQsId && !item.RowId) {
|
if (item.QuestionId === obj.question.ParentQsId && !item.RowId) {
|
||||||
item.RowId = obj.rowId
|
item.RowId = obj.rowId
|
||||||
|
@ -872,11 +877,17 @@ export default {
|
||||||
},
|
},
|
||||||
setAnswerToQuestion(annotation, questionId) {
|
setAnswerToQuestion(annotation, questionId) {
|
||||||
if (!questionId || !annotation) return
|
if (!questionId || !annotation) return
|
||||||
let val = this.getAnnotationProp(annotation, this.imageToolAttribute)
|
let prop = ''
|
||||||
|
if (!this.imageToolAttribute) {
|
||||||
|
prop = this.questionImageToolAttributeInfo[questionId]
|
||||||
|
} else {
|
||||||
|
prop = this.imageToolAttribute
|
||||||
|
}
|
||||||
|
let val = this.getAnnotationProp(annotation, prop)
|
||||||
this.$set(this.questionForm, questionId, val)
|
this.$set(this.questionForm, questionId, val)
|
||||||
},
|
},
|
||||||
getAnnotationProp(annotation, prop) {
|
getAnnotationProp(annotation, prop) {
|
||||||
if (!annotation) return
|
if (!annotation || !prop) return
|
||||||
const referencedImageId = annotation?.metadata?.referencedImageId
|
const referencedImageId = annotation?.metadata?.referencedImageId
|
||||||
if (!referencedImageId) return null
|
if (!referencedImageId) return null
|
||||||
const cacheKey = `imageId:${referencedImageId}`
|
const cacheKey = `imageId:${referencedImageId}`
|
||||||
|
|
Loading…
Reference in New Issue