Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web
continuous-integration/drone/push Build is passing Details

uat_us
DESKTOP-6C3NK6N\WXS 2024-09-04 09:10:05 +08:00
commit a7c0ae6d7a
4 changed files with 81 additions and 25 deletions

View File

@ -1,5 +1,5 @@
<template>
<div v-loading="loading" style="min-height:500px">
<div style="min-height:500px">
<h3 v-if="isReadingShowSubjectInfo" style="padding: 5px 0px;margin: 0;">
<span v-if="subjectCode">{{ subjectCode }} </span>
<span style="margin-left:5px;">{{ taskBlindName }}</span>

View File

@ -120,11 +120,27 @@
</el-checkbox-group>
<!-- 数值 -->
<!-- :precision="2" :step="0.1" :max="10" -->
<el-input-number
v-if="question.Type==='number'"
v-model="questionForm[question.Id]"
:disabled="readingTaskState >= 2"
/>
<template v-if="question.Type==='number'">
<el-input-number
v-if="question.ValueType === 0"
v-model="questionForm[question.Id]"
precision="0"
:disabled="readingTaskState >= 2"
/>
<el-input-number
v-else-if="question.ValueType === 3"
v-model="questionForm[question.Id]"
:disabled="readingTaskState >= 2"
/>
<el-input-number
v-else-if="question.ValueType === 1 || question.ValueType === 2"
v-model="questionForm[question.Id]"
:precision="digitPlaces"
:disabled="readingTaskState >= 2"
>
</el-input-number>
</template>
<!-- 上传图像 -->
<el-upload
v-if="question.Type==='upload'"
@ -222,7 +238,8 @@ export default {
accept: '.png,.jpg,.jpeg',
imgVisible: false,
imageUrl: '',
urls: []
urls: [],
digitPlaces: null
}
},
watch: {
@ -245,6 +262,7 @@ export default {
})
}
}
this.digitPlaces = parseInt(localStorage.getItem('digitPlaces'))
},
methods: {
formItemChange(v, question) {

View File

@ -142,8 +142,8 @@
v-else-if="scope.row.DataSource !== 1 && questionForm[scope.row.QuestionId] instanceof Array && scope.row.Type==='number' && (scope.row.xfIndex || scope.row.xfIndex === 0) && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
v-model="questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]"
:disabled="scope.row.DataSource === 1"
onblur="value=parseFloat(value).toFixed(parseInt(localStorage.getItem('digitPlaces')))"
@input="limitInput($event, questionForm[scope.row.QuestionId][scope.row.xfIndex], scope.row.TableQuestionId)"
@onblur="limitBlur($event, questionForm[scope.row.QuestionId][scope.row.xfIndex], scope.row.TableQuestionId, scope.row.ValueType)"
@input="limitInput($event, questionForm[scope.row.QuestionId][scope.row.xfIndex], scope.row.TableQuestionId, scope.row.ValueType)"
size="mini"
@focus="() => {questionId = scope.row.QuestionId}"
>
@ -165,8 +165,8 @@
v-else-if="scope.row.DataSource !== 1 && scope.row.Type==='number' && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
v-model="questionForm[scope.row.QuestionId]"
:disabled="scope.row.DataSource === 1"
onblur="value=parseFloat(value).toFixed(parseInt(localStorage.getItem('digitPlaces')))"
@input="limitInput($event, questionForm, scope.row.QuestionId)"
@onblur="limitBlur($event, questionForm, scope.row.QuestionId, scope.row.ValueType)"
@input="limitInput($event, questionForm, scope.row.QuestionId, scope.row.ValueType)"
size="mini"
@focus="() => {questionId = scope.row.QuestionId}"
>
@ -368,13 +368,27 @@ export default {
DicomEvent.$off('getReportInfo')
},
methods: {
limitInput(value, a, b) {
if (value.indexOf('.') > -1) {
if (value.split('.')[1].length >= this.digitPlaces) {
limitInput(value, a, b, valueType) {
if (valueType === 0) {
this.$set(a, b, parseInt(value))
} else if (valueType === 3) {
this.$set(a, b, parseFloat(value))
} else if (value.split('.')[1].length >= this.digitPlaces) {
this.$set(a, b, parseFloat(value).toFixed(this.digitPlaces))
} else {
this.$set(a, b, parseFloat(value))
}
},
limitBlur(value,a,b,valueType) {
if (valueType === 0) {
this.$set(a, b, parseInt(value))
} else if (valueType === 3) {
this.$set(a, b, parseFloat(value))
}else if (value.split('.')[1].length >= this.digitPlaces) {
this.$set(a, b, parseFloat(value).toFixed(this.digitPlaces))
} else {
this.$set(a, b, parseFloat(value))
}
} else {
}
},
setImageUrl(qid, index, tqid, url, RowId) {
if (index || index === 0) {
@ -455,7 +469,15 @@ export default {
// this.$set(v, 'xfIndex', i)
}
if (v.Type === 'number') {
this.$set(this.questionForm, v.QuestionId, v.Answers[this.visitTaskId] === '' ? parseFloat(0).toFixed(this.digitPlaces) : v.Answers[this.visitTaskId])
let val = null
if (v.ValueType === 0){
val = parseInt(v.Answers[this.visitTaskId])
} else if (v.ValueType === 3) {
val = v.Answers[this.visitTaskId]
} else {
val = v.Answers[this.visitTaskId] === '' ? parseFloat(0).toFixed(this.digitPlaces) : v.Answers[this.visitTaskId]
}
this.$set(this.questionForm, v.QuestionId, val)
}
if (v.Childrens.length > 0) {
this.setChild(v.Childrens)
@ -473,7 +495,15 @@ export default {
this.$set(this.questionForm, i.QuestionId, tableAnswers)
}
if (i.Type === 'number') {
this.$set(this.questionForm, i.QuestionId, i.Answers[this.visitTaskId] === '' ? parseFloat(0).toFixed(this.digitPlaces) : i.Answers[this.visitTaskId])
let val = null
if (i.ValueType === 0){
val = parseInt(i.Answers[this.visitTaskId])
} else if (i.ValueType === 3) {
val = i.Answers[this.visitTaskId]
} else {
val = i.Answers[this.visitTaskId] === '' ? parseFloat(0).toFixed(this.digitPlaces) : i.Answers[this.visitTaskId]
}
this.$set(this.questionForm, i.QuestionId, val)
}
if (i.Childrens && i.Childrens.length > 0 && i.Type !== 'table') {
this.setChild(i.Childrens)
@ -668,7 +698,15 @@ export default {
// obj.Answers[i.VisitTaskId] = i.Answer ? parseInt(i.Answer) : null
} else {
if (item.Type === 'number') {
this.$set(obj.Answers, i.VisitTaskId, isNaN(parseFloat(i.Answer)) ? i.Answer : parseFloat(i.Answer).toFixed(digitPlaces))
let val = null
if (item.ValueType === 0){
val = parseInt(i.Answer)
} else if (item.ValueType === 3) {
val = i.Answer
}else {
val = isNaN(parseFloat(i.Answer)) ? i.Answer : parseFloat(i.Answer).toFixed(digitPlaces)
}
this.$set(obj.Answers, i.VisitTaskId, val)
} else {
this.$set(obj.Answers, i.VisitTaskId, i.Answer)
}
@ -811,9 +849,9 @@ export default {
var trialId = this.trialId
var isReadingTaskViewInOrder = this.isReadingTaskViewInOrder
var criterionType = this.criterionType
var readingTool = this.readingTool
var readingTool = this.readingTool
var trialReadingCriterionId = this.$router.currentRoute.query.TrialReadingCriterionId
var path = `/readingDicoms?TrialReadingCriterionId=${trialReadingCriterionId}&trialId=${trialId}&subjectCode=${subjectCode}&subjectId=${subjectId}&visitTaskId=${task.VisitTaskId}&isReadingTaskViewInOrder=${isReadingTaskViewInOrder}&criterionType=${criterionType}&readingTool=${readingTool}&TokenKey=${token}`
var path = `/noneDicomReading?TrialReadingCriterionId=${trialReadingCriterionId}&trialId=${trialId}&subjectCode=${subjectCode}&subjectId=${subjectId}&visitTaskId=${task.VisitTaskId}&isReadingTaskViewInOrder=${isReadingTaskViewInOrder}&criterionType=${criterionType}&readingTool=${readingTool}&TokenKey=${token}`
const routeData = this.$router.resolve({ path })
window.open(routeData.href, '_blank')
},

View File

@ -1,6 +1,6 @@
<template>
<div v-loading="loading" class="img-container">
<el-card class="box-card left">
<div class="img-container">
<el-card class="box-card left" v-loading="loading">
<div v-if="isReadingShowSubjectInfo" class="title">
<h4>{{ subjectCode }} </h4>
<h4>{{ taskBlindName }}</h4>
@ -67,7 +67,7 @@
</el-card>
<!-- 预览图像 -->
<el-card class="box-card right">
<el-card class="box-card right" v-loading="loading">
<div style="width:100%;height: 100%;">
<Preview
v-if="previewImage.imgList.length > 0"
@ -406,7 +406,7 @@ export default {
display: inline-block;
box-sizing: border-box;
border-bottom: 2px solid #f3f3f3;
width: 180px;
width: 200px;
height: 50px;
line-height: 50px;
cursor: pointer;