标记添加截图
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
941a0a7ddf
commit
187947177a
|
@ -25,7 +25,8 @@
|
|||
{{ scope.row[item.Id] === '' ? '' : scope.row[item.Id] ? scope.row[item.Id].split('|').length : '' }}
|
||||
</span>
|
||||
<span v-else-if="item.Type === 'number'">
|
||||
{{!isNaN(parseFloat(scope.row[item.Id])) ? parseFloat(scope.row[item.Id]).toFixed(digitPlaces) : scope.row[item.Id]}}
|
||||
{{ !isNaN(parseFloat(scope.row[item.Id])) ? parseFloat(scope.row[item.Id]).toFixed(digitPlaces) :
|
||||
scope.row[item.Id] }}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{ scope.row[item.Id] }}
|
||||
|
@ -132,6 +133,9 @@
|
|||
<el-select v-if="question.Type === 'number' && question.TypeValue" v-model="questionForm[question.Id]" clearable
|
||||
@change="(val) => { formItemNumberChange(val, question) }" :disabled="readingTaskState === 2">
|
||||
<el-option v-for="val in question.TypeValue.split('|')" :key="val" :label="val.trim()" :value="val.trim()" />
|
||||
<template v-if="question.Unit !== 0" slot="prefix">{{ question.Unit !== 4 ? $fd('ValueUnit', question.Unit) :
|
||||
question.CustomUnit }}</template>
|
||||
<template v-else-if="question.ValueType === 2" slot="prefix">%</template>
|
||||
</el-select>
|
||||
<el-input type="text" v-if="question.Type === 'number' && !question.TypeValue && question.DataSource !== 1"
|
||||
@change="(val) => { formItemNumberChange(val, question) }" @input="numberInput(question.Id)"
|
||||
|
@ -388,7 +392,7 @@ export default {
|
|||
this.AnswersList = row.TableQuestions.Answers
|
||||
var index = this.AnswersList.findIndex(v => v.RowId === RowId)
|
||||
this.AnswersList.splice(index, 1)
|
||||
this.$emit('setFormItemData', {key: this.question.Id, val: this.AnswersList, question: this.question})
|
||||
this.$emit('setFormItemData', { key: this.question.Id, val: this.AnswersList, question: this.question })
|
||||
this.formItemNumberChange(this.question.Id, true)
|
||||
}
|
||||
loading.close()
|
||||
|
@ -830,7 +834,7 @@ export default {
|
|||
if (isNE) {
|
||||
num = 'NE'
|
||||
} else {
|
||||
num = num.toFixed(this.digitPlaces)
|
||||
num = num.toFixed(this.digitPlaces)
|
||||
}
|
||||
this.$set(this.QuestionsForm, v.Id, num.toString());
|
||||
}
|
||||
|
@ -999,6 +1003,16 @@ export default {
|
|||
}
|
||||
}
|
||||
|
||||
::v-deep .el-select .el-input__prefix {
|
||||
left: calc(100% - 50px);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
::v-deep .el-select .el-input__inner {
|
||||
padding-left: 15px;
|
||||
padding-right: 50px;
|
||||
}
|
||||
|
||||
::v-deep .el-form-item__label {
|
||||
color: #c3c3c3;
|
||||
}
|
||||
|
|
|
@ -83,6 +83,9 @@
|
|||
@change="(val) => { formItemNumberChange(val, question) }"
|
||||
:disabled="question.TableQuestionType === 2 || (question.IsCopy && type === 'edit' && !IsBaseline && questionForm.IsCurrentTaskAdd === 'False')">
|
||||
<el-option v-for="val in question.TypeValue.split('|')" :key="val" :label="val.trim()" :value="val.trim()" />
|
||||
<template v-if="question.Unit !== 0" slot="prefix">{{ question.Unit !== 4 ? $fd('ValueUnit', question.Unit) :
|
||||
question.CustomUnit }}</template>
|
||||
<template v-else-if="question.ValueType === 2" slot="prefix">%</template>
|
||||
</el-select>
|
||||
<el-input type="text" v-else-if="question.Type === 'number' && question.DataSource !== 1"
|
||||
:disabled="question.TableQuestionType === 2 || (question.IsCopy && type === 'edit' && !IsBaseline && questionForm.IsCurrentTaskAdd === 'False')"
|
||||
|
@ -541,6 +544,16 @@ export default {
|
|||
}
|
||||
}
|
||||
|
||||
::v-deep .el-select .el-input__prefix {
|
||||
left: calc(100% - 50px);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
::v-deep .el-select .el-input__inner {
|
||||
padding-left: 15px;
|
||||
padding-right: 50px;
|
||||
}
|
||||
|
||||
.criterion-form-item {
|
||||
.el-form-item {
|
||||
display: flex;
|
||||
|
|
|
@ -1556,16 +1556,28 @@ export default {
|
|||
try {
|
||||
const measureData = Object.assign({}, annotation)
|
||||
const params = {}
|
||||
params.VisitTaskId = this.taskInfo.VisitTaskId
|
||||
params.StudyId = annotation.studyId
|
||||
params.SeriesId = annotation.seriesId
|
||||
params.InstanceId = annotation.instanceId
|
||||
params.Id = annotation.id ? annotation.id : ''
|
||||
params.MeasureData = JSON.stringify(measureData)
|
||||
params.NumberOfFrames = annotation.numberOfFrames
|
||||
const res = await submitCustomTag(params)
|
||||
annotation.id = res.Result
|
||||
await this.getScreenshots({
|
||||
visitTaskId: this.visitTaskId,
|
||||
annotation
|
||||
},async (base64Str) =>{
|
||||
const pictureObj = await this.uploadScreenshots(`${Date.now()}`, base64Str)
|
||||
let picturePath = pictureObj.isSuccess ? this.$getObjectName(pictureObj.result.url) : ''
|
||||
params.PicturePath = picturePath
|
||||
params.MarkTool = measureData.markTool
|
||||
params.OrderMarkName = measureData.data.label
|
||||
params.VisitTaskId = this.taskInfo.VisitTaskId
|
||||
params.StudyId = annotation.studyId
|
||||
params.SeriesId = annotation.seriesId
|
||||
params.InstanceId = annotation.instanceId
|
||||
params.Id = annotation.id ? annotation.id : ''
|
||||
params.MeasureData = JSON.stringify(measureData)
|
||||
params.NumberOfFrames = annotation.numberOfFrames
|
||||
const res = await submitCustomTag(params)
|
||||
annotation.id = res.Result
|
||||
})
|
||||
|
||||
} catch (e) {
|
||||
this.loading = false
|
||||
console.log(e)
|
||||
}
|
||||
},
|
||||
|
@ -3154,6 +3166,38 @@ export default {
|
|||
this.trialCriterion = res.Result
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
async uploadScreenshots(fileName, file) {
|
||||
try {
|
||||
file = this.convertBase64ToBlob(file)
|
||||
const trialId = this.$route.query.trialId
|
||||
const taskInfo = JSON.parse(localStorage.getItem('taskInfo'))
|
||||
const subjectId = taskInfo.SubjectId
|
||||
const result = await this.OSSclient.put(`/${trialId}/Read/${subjectId}/Visit/${fileName}.png`, file)
|
||||
return { isSuccess: true, result: result }
|
||||
} catch (e) {
|
||||
console.log(e)
|
||||
return { isSuccess: false, result: e }
|
||||
}
|
||||
},
|
||||
convertBase64ToBlob(imageEditorBase64) {
|
||||
const base64Arr = imageEditorBase64.split(',')
|
||||
let imgtype = ''
|
||||
let base64String = ''
|
||||
if (base64Arr.length > 1) {
|
||||
base64String = base64Arr[1]
|
||||
imgtype = base64Arr[0].substring(
|
||||
base64Arr[0].indexOf(':') + 1,
|
||||
base64Arr[0].indexOf(';')
|
||||
)
|
||||
}
|
||||
const bytes = atob(base64String)
|
||||
const bytesCode = new ArrayBuffer(bytes.length)
|
||||
const byteArray = new Uint8Array(bytesCode)
|
||||
for (let i = 0; i < bytes.length; i++) {
|
||||
byteArray[i] = bytes.charCodeAt(i)
|
||||
}
|
||||
return new Blob([bytesCode], { type: imgtype })
|
||||
},
|
||||
openUploadImage(status) {
|
||||
const idx = this.visitTaskList.findIndex(i => i.IsCurrentTask)
|
||||
|
|
|
@ -1723,7 +1723,6 @@ export default {
|
|||
obj => !obj.RowId
|
||||
)
|
||||
if (typeof obj === 'object') {
|
||||
console.log(111)
|
||||
if (this.activeName) {
|
||||
const tableId = this.activeName.split('_')[0]
|
||||
const rowIndex = this.activeName.split('_')[1]
|
||||
|
@ -1743,23 +1742,16 @@ export default {
|
|||
return { isCanActiveTool: false, reason: msg }
|
||||
}
|
||||
} else {
|
||||
console.log(222)
|
||||
if (this.activeName) {
|
||||
console.log(3333)
|
||||
return this.checkToolCanActive(toolName)
|
||||
} else {
|
||||
console.log(444, this.isBaseLineTask, toolName)
|
||||
if (this.isBaseLineTask && (toolName === 'Bidirectional' || toolName === 'Length' || toolName === 'RectangleRoi')) {
|
||||
console.log(555)
|
||||
return { isCanActiveTool: true, reason: '' }
|
||||
} else if (!this.isBaseLineTask && (toolName === 'ArrowAnnotate' || toolName === 'Bidirectional' || toolName === 'Length' || toolName === 'RectangleRoi')) {
|
||||
console.log(666)
|
||||
return { isCanActiveTool: true, reason: '' }
|
||||
} else if (this.isBaseLineTask && toolName === 'ArrowAnnotate') {
|
||||
console.log(777)
|
||||
return { isCanActiveTool: false, reason: this.$t('trials:reading:warnning:msg54') }
|
||||
} else {
|
||||
console.log(888)
|
||||
return { isCanActiveTool: false, reason: '' }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -155,6 +155,9 @@
|
|||
<el-select v-if="question.Type === 'number' && question.TypeValue" v-model="questionForm[question.Id]" clearable
|
||||
@change="(val) => { formItemNumberChange(val, question) }" :disabled="readingTaskState === 2">
|
||||
<el-option v-for="val in question.TypeValue.split('|')" :key="val" :label="val.trim()" :value="val.trim()" />
|
||||
<template v-if="question.Unit !== 0" slot="prefix">{{ question.Unit !== 4 ? $fd('ValueUnit', question.Unit) :
|
||||
question.CustomUnit }}</template>
|
||||
<template v-else-if="question.ValueType === 2" slot="prefix">%</template>
|
||||
</el-select>
|
||||
<template v-if="question.Type === 'number' && (question.ImageMarkEnum === 1 || question.ImageMarkEnum === 2)">
|
||||
<div style="display: flex;flex-direction: row;justify-content: flex-start;align-items: center;">
|
||||
|
@ -1295,6 +1298,16 @@ export default {
|
|||
margin-top: 30vh !important;
|
||||
}
|
||||
|
||||
::v-deep .el-select .el-input__prefix {
|
||||
left: calc(100% - 50px);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
::v-deep .el-select .el-input__inner {
|
||||
padding-left: 15px;
|
||||
padding-right: 50px;
|
||||
}
|
||||
|
||||
::v-deep .el-dialog__wrapper {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
|
|
@ -587,7 +587,23 @@ export default {
|
|||
item.MeasureData = item.MeasureData ? JSON.stringify(item.MeasureData) : ''
|
||||
markInfo.push(item)
|
||||
}
|
||||
|
||||
let annotation = null
|
||||
if (!this.operateRowId && obj.rowId) {
|
||||
this.operateRowId = obj.rowId
|
||||
// this.updateQuestionsMarkStatus(obj)
|
||||
}
|
||||
annotation = this.getAnnotationByRow(obj.question.Id, false)
|
||||
// 截图上传
|
||||
let picturePath = ''
|
||||
if (annotation) {
|
||||
const base64Str = await this.getScreenshots({
|
||||
visitTaskId: this.visitTaskId,
|
||||
annotation
|
||||
})
|
||||
const pictureObj = await this.uploadScreenshots(`${Date.now()}`, base64Str)
|
||||
picturePath = pictureObj.isSuccess ? this.$getObjectName(pictureObj.result.url) : ''
|
||||
markInfo[0].PicturePath = picturePath
|
||||
}
|
||||
await saveTaskQuestion(-10, {
|
||||
visitTaskId: this.visitTaskId,
|
||||
answers,
|
||||
|
@ -688,10 +704,18 @@ export default {
|
|||
}
|
||||
})
|
||||
},
|
||||
getAnnotationByRow(rowId) {
|
||||
const index = this.questionMarkInfoList.findIndex(
|
||||
i => i.RowId === rowId && i.TableQuestionId === this.operateQuestionId
|
||||
)
|
||||
getAnnotationByRow(rowId, isTable = true) {
|
||||
console.log(this.questionMarkInfoList, 'this.questionMarkInfoList')
|
||||
let index = -1;
|
||||
if (isTable) {
|
||||
index = this.questionMarkInfoList.findIndex(
|
||||
i => i.RowId === rowId && i.TableQuestionId === this.operateQuestionId
|
||||
)
|
||||
} else {
|
||||
index = this.questionMarkInfoList.findIndex(
|
||||
i => i.QuestionId === rowId
|
||||
)
|
||||
}
|
||||
return index > -1 ? this.questionMarkInfoList[index].MeasureData : null
|
||||
},
|
||||
async bindAnnotationToQuestion(annotation) {
|
||||
|
|
|
@ -134,14 +134,21 @@
|
|||
</div>
|
||||
</template>
|
||||
<template v-else-if="question.Type === 'number'">
|
||||
<el-input type="text" v-if="question.Type === 'number' && question.DataSource !== 1"
|
||||
<el-select v-if="question.Type === 'number' && question.TypeValue" v-model="questionForm[question.Id]" clearable
|
||||
@change="((val) => { formItemChange(val, question) })">
|
||||
<el-option v-for="val in question.TypeValue.split('|')" :key="val" :label="val" :value="val" />
|
||||
<template v-if="question.Unit !== 0" slot="prefix">{{ question.Unit !== 4 ? $fd('ValueUnit', question.Unit) :
|
||||
question.CustomUnit }}</template>
|
||||
<template v-else-if="question.ValueType === 2" slot="prefix">%</template>
|
||||
</el-select>
|
||||
<el-input type="text" v-else-if="question.Type === 'number' && question.DataSource !== 1"
|
||||
:disabled="question.TableQuestionType === 2 || (question.IsCopy && type === 'edit' && !isBaseline && questionForm.IsCurrentTaskAdd === 'False')"
|
||||
@change="((val) => { formItemNumberChange(val, question) })" @input="numberInput(question.Id)"
|
||||
@blur="handleBlur(questionForm[question.Id], questionForm, question.Id)" v-model="questionForm[question.Id]">
|
||||
<template slot="append" v-if="question.Unit !== 0">{{ question.Unit !== 4 ? $fd('ValueUnit', question.Unit) :
|
||||
question.CustomUnit }}</template>
|
||||
</el-input>
|
||||
<el-input type="text" v-if="question.Type === 'number' && question.DataSource === 1"
|
||||
<el-input type="text" v-else-if="question.Type === 'number' && question.DataSource === 1"
|
||||
:disabled="question.DataSource === 1" @input="numberInput(question.Id, true)"
|
||||
@blur="handleCalculationBlur(calculationValue)" v-model="calculationValue">
|
||||
<template slot="append" v-if="question.Unit !== 0">{{ question.Unit !== 4 ? $fd('ValueUnit', question.Unit) :
|
||||
|
@ -622,6 +629,16 @@ export default {
|
|||
align-items: flex-start;
|
||||
}
|
||||
|
||||
::v-deep .el-select .el-input__prefix {
|
||||
left: calc(100% - 50px);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
::v-deep .el-select .el-input__inner {
|
||||
padding-left: 15px;
|
||||
padding-right: 50px;
|
||||
}
|
||||
|
||||
.el-input {
|
||||
width: 100%;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue