IVUS & OCT标准更改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
4057f1893f
commit
4ec0a178b4
|
|
@ -49,15 +49,6 @@
|
|||
</div>
|
||||
<el-table v-if="item.Type === 'basicTable' && item.TableQuestions" :ref="item.Id"
|
||||
:data="item.TableQuestions.Answers">
|
||||
<!-- <el-table-column :label="$t('CustomizeQuestionFormItem:label:OrderMark')" width="60px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ getLesionName(item.OrderMark,scope.row.RowIndex) }}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column
|
||||
type="index"
|
||||
width="40px"
|
||||
/> -->
|
||||
<el-table-column v-for="q of item.TableQuestions.Questions" :key="q.Id" :prop="q.Id"
|
||||
:label="q.QuestionName" show-overflow-tooltip :render-header="renderHeader">
|
||||
<template slot-scope="scope">
|
||||
|
|
@ -98,8 +89,10 @@
|
|||
required: (item.IsRequired === 0 || (item.IsRequired === 1 && item.RelevanceId && (item.RelevanceValue.includes(questionForm[item.RelevanceId])))) && item.Type !== 'group' && item.Type !== 'summary',
|
||||
message: ['radio', 'select', 'checkbox'].includes(item.Type) ? $t('common:ruleMessage:select') : $t('common:ruleMessage:specify'), trigger: ['blur', 'change']
|
||||
},
|
||||
{
|
||||
validator: item.Type === 'number' && !item.TypeValue && (item.QuestionType === 1010 || item.QuestionType === 1011) ? validatorNumberOrNEInput : (rule, value, callback) => { callback() }, trigger: ['blur', 'change']
|
||||
}
|
||||
]">
|
||||
<!-- 数值类型 -->
|
||||
<template v-if="item.Type === 'textarea'">
|
||||
<el-input v-model="questionForm[item.Id]" type="textarea" :autosize="{ minRows: 2, maxRows: 4 }"
|
||||
:disabled="!isCurrentTask || readingTaskState >= 2"
|
||||
|
|
@ -107,9 +100,29 @@
|
|||
</template>
|
||||
<template v-if="item.Type === 'number'">
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<el-input-number v-model="questionForm[item.Id]"
|
||||
<el-input
|
||||
v-if="item.QuestionType === 1010 || item.QuestionType === 1011"
|
||||
type="text"
|
||||
@change="(val) => { formItemChange(val, item) }"
|
||||
@input="numberOrNEInput(item.Id)"
|
||||
@blur="handleNumberOrNEBlur(item)"
|
||||
v-model.trim="questionForm[item.Id]" :disabled="readingTaskState === 2">
|
||||
<template slot="append" v-if="item.Unit !== 0">{{ item.Unit !== 4 ? $fd('ValueUnit', item.Unit) : item.CustomUnit }}</template>
|
||||
<template slot="append" v-else-if="item.ValueType === 2">%</template>
|
||||
</el-input>
|
||||
<el-input
|
||||
v-else
|
||||
type="text"
|
||||
@change="(val) => { formItemChange(val, item) }"
|
||||
@input="(val) => questionForm[item.Id] = val.replace(/[^\d.]/g, '')"
|
||||
@blur="handleBlur(questionForm[item.Id], questionForm, item)"
|
||||
v-model.trim="questionForm[item.Id]" :disabled="readingTaskState === 2">
|
||||
<template slot="append" v-if="item.Unit !== 0">{{ item.Unit !== 4 ? $fd('ValueUnit', item.Unit) : item.CustomUnit }}</template>
|
||||
<template slot="append" v-else-if="item.ValueType === 2">%</template>
|
||||
</el-input>
|
||||
<!-- <el-input-number v-model="questionForm[item.Id]"
|
||||
:disabled="!isCurrentTask || readingTaskState >= 2" :precision="0"
|
||||
@change="((val) => { formItemChange(val, item) })" />
|
||||
@change="((val) => { formItemChange(val, item) })" /> -->
|
||||
<svg-icon v-if="item.ShowChartTypeEnum > 0" icon-class="readingChart"
|
||||
class="svg-icon svg-readingChart" @click.stop="(e) => handleReadingChart({
|
||||
e,
|
||||
|
|
@ -120,6 +133,15 @@
|
|||
})" />
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="item.Type === 'calculation'">
|
||||
<el-input v-model="questionForm[item.Id]"
|
||||
disabled type="number" @change="((val) => { formItemChange(val, item) })">
|
||||
<template slot="append" v-if="item.Unit !== 0">
|
||||
{{ item.Unit !== 4 ? $fd('ValueUnit', item.Unit) : item.CustomUnit }}
|
||||
</template>
|
||||
<template slot="append" v-else-if="item.ValueType === 2">%</template>
|
||||
</el-input>
|
||||
</template>
|
||||
<template v-if="item.Type === 'select'">
|
||||
<el-select v-model="questionForm[item.Id]" :disabled="!isCurrentTask || readingTaskState >= 2"
|
||||
:multiple="item.OptionTypeEnum === 1" @change="((val) => { formItemChange(val, item) })">
|
||||
|
|
@ -256,7 +278,10 @@ export default {
|
|||
qsForm: {},
|
||||
diffId: '',
|
||||
eemId: '',
|
||||
lumenId: ''
|
||||
lumenId: '',
|
||||
sRoiStartDistanceId: '',
|
||||
sRoiEndDistanceId: '',
|
||||
sRoiDistanceId: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -346,6 +371,18 @@ export default {
|
|||
const answer = item.Type === 'select' && item.OptionTypeEnum === 1 && item.Answer ? JSON.parse(item.Answer) : item.Type === 'number' || item.Type === 'calculation' ? isNaN(parseFloat(item.Answer)) ? null : parseFloat(item.Answer) : item.Answer
|
||||
this.$set(this.questionForm, item.Id, answer)
|
||||
}
|
||||
if (item.QuestionType === 1013) {
|
||||
// ROI起始回撤距离
|
||||
this.sRoiStartDistanceId = item.Id
|
||||
}
|
||||
if (item.QuestionType === 1014) {
|
||||
// ROI终止回撤距离
|
||||
this.sRoiEndDistanceId = item.Id
|
||||
}
|
||||
if (item.QuestionType === 1015) {
|
||||
// ROI段落总长度
|
||||
this.sRoiDistanceId = item.Id
|
||||
}
|
||||
if (item.Childrens.length > 0) {
|
||||
this.setQuestionForm(item.Childrens)
|
||||
}
|
||||
|
|
@ -369,6 +406,7 @@ export default {
|
|||
item.TableQuestions.Answers[idx][i] = String(obj.anwsers[i])
|
||||
}
|
||||
}
|
||||
|
||||
if (item.Childrens.length > 0) {
|
||||
this.setQuestions(item.Childrens, obj)
|
||||
}
|
||||
|
|
@ -460,12 +498,16 @@ export default {
|
|||
},
|
||||
formItemChange(val, item) {
|
||||
this.formChanged = true
|
||||
if (item.Type === 'number') {
|
||||
this.limitBlur(item.Id, item.ValueType)
|
||||
}
|
||||
// if (item.Type === 'number') {
|
||||
// this.limitBlur(item.Id, item.ValueType)
|
||||
// }
|
||||
if (item.Childrens && item.Childrens.length > 0) {
|
||||
this.resetChild(item.Childrens)
|
||||
}
|
||||
if ((item.QuestionType === 1013 || item.QuestionType === 1014) && !isNaN(parseFloat(this.questionForm[this.sRoiStartDistanceId])) && !isNaN(parseFloat(this.questionForm[this.sRoiEndDistanceId]))) {
|
||||
let num = parseFloat(this.questionForm[this.sRoiEndDistanceId]) - parseFloat(this.questionForm[this.sRoiStartDistanceId])
|
||||
this.$set(this.questionForm, this.sRoiDistanceId, parseFloat(num).toFixed(this.digitPlaces))
|
||||
}
|
||||
},
|
||||
resetChild(obj) {
|
||||
obj.forEach(i => {
|
||||
|
|
@ -483,12 +525,78 @@ export default {
|
|||
if (valueType === 0) {
|
||||
this.$set(this.questionForm, qId, parseInt(value))
|
||||
} else if (valueType === 3) {
|
||||
this.$set(this.questionForm, qId, parseFloat(value))
|
||||
this.$set(this.questionForm, qId, value)
|
||||
} else {
|
||||
this.$set(this.questionForm, qId, this.numberToFixed(value))
|
||||
}
|
||||
}
|
||||
},
|
||||
validatorNumberOrNEInput(rule, value, callback) {
|
||||
let reg = new RegExp(/^(?:-?(?:(?:0|[1-9]\d*)(?:\.\d+)?|\.\d+)|NE)$/, 'g')
|
||||
if (value === '') {
|
||||
callback();
|
||||
} else {
|
||||
if (!reg.test(value)) {
|
||||
callback(new Error(this.$t('trials:reading:ruleMessage:validatorNumberInput')));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
},
|
||||
numberOrNEInput(id) {
|
||||
// this.questionForm[id] = this.questionForm[id].toUpperCase();
|
||||
if (!this.questionForm[id]) {
|
||||
return
|
||||
}
|
||||
let value = this.questionForm[id].toUpperCase().replace(/[^0-9.NE]/g, '')
|
||||
if (value.startsWith('N')) {
|
||||
if (value.length > 2) {
|
||||
value = value.substring(0, 2)
|
||||
}
|
||||
if (value.length === 2 && value[1] !== 'E') {
|
||||
value = 'N'
|
||||
}
|
||||
} else {
|
||||
value = value.replace(/[NE]/g, '')
|
||||
}
|
||||
this.questionForm[id] = value
|
||||
this.$set(this.questionForm, id, value)
|
||||
},
|
||||
handleNumberOrNEBlur(item) {
|
||||
if (this.questionForm[item.Id] && !this.questionForm[item.Id].startsWith('N')) {
|
||||
if (item.ValueType === 3) {
|
||||
// 文本
|
||||
this.$set(this.questionForm, item.Id, value)
|
||||
} else {
|
||||
const num = parseFloat(this.questionForm[item.Id])
|
||||
if (!isNaN(num)) {
|
||||
this.$set(this.questionForm, item.Id, parseFloat(num).toFixed(this.digitPlaces))
|
||||
if (item.ValueType === 0) {
|
||||
// 整型
|
||||
this.$set(this.questionForm, item.Id, parseInt(num))
|
||||
} else if (item.ValueType === 1 || item.ValueType === 2){
|
||||
// 小数、百分比
|
||||
this.$set(this.questionForm, item.Id, parseFloat(num).toFixed(this.digitPlaces))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
handleBlur(value, a, item) {
|
||||
if (!value || item.ValueType === 3) return false
|
||||
const num = parseFloat(this.questionForm[item.Id])
|
||||
if (!isNaN(num)) {
|
||||
this.$set(this.questionForm, item.Id, parseFloat(num).toFixed(this.digitPlaces))
|
||||
if (item.ValueType === 0) {
|
||||
// 整型
|
||||
this.$set(this.questionForm, item.Id, parseInt(num))
|
||||
} else if (item.ValueType === 1 || item.ValueType === 2){
|
||||
// 小数、百分比
|
||||
this.$set(this.questionForm, item.Id, parseFloat(num).toFixed(this.digitPlaces))
|
||||
}
|
||||
}
|
||||
},
|
||||
numberToFixed(v) {
|
||||
if (this.digitPlaces > -1) {
|
||||
return isNaN(parseFloat(v)) ? null : `${parseFloat(v).toFixed(this.digitPlaces)}`
|
||||
|
|
@ -573,16 +681,16 @@ export default {
|
|||
},
|
||||
setFormItemData(obj) {
|
||||
this.qsForm[obj.key] = obj.val
|
||||
if (obj.key === this.eemId || obj.key === this.lumenId) {
|
||||
const eem = this.qsForm[this.eemId]
|
||||
const lumen = this.qsForm[this.lumenId]
|
||||
if (isNaN(parseFloat(eem)) || isNaN(parseFloat(lumen))) {
|
||||
this.$set(this.qsForm, this.diffId, null)
|
||||
} else {
|
||||
const diff = parseFloat(eem) - parseFloat(lumen)
|
||||
this.$set(this.qsForm, this.diffId, this.numberToFixed(diff))
|
||||
}
|
||||
}
|
||||
// if (obj.key === this.eemId || obj.key === this.lumenId) {
|
||||
// const eem = this.qsForm[this.eemId]
|
||||
// const lumen = this.qsForm[this.lumenId]
|
||||
// if (isNaN(parseFloat(eem)) || isNaN(parseFloat(lumen))) {
|
||||
// this.$set(this.qsForm, this.diffId, null)
|
||||
// } else {
|
||||
// const diff = parseFloat(eem) - parseFloat(lumen)
|
||||
// this.$set(this.qsForm, this.diffId, this.numberToFixed(diff))
|
||||
// }
|
||||
// }
|
||||
},
|
||||
handleAddOrEdit(type, row, index) {
|
||||
this.addOrEdit.title = row.QuestionName
|
||||
|
|
@ -645,11 +753,7 @@ export default {
|
|||
}
|
||||
const res = await submitTableQuestion(params)
|
||||
if (res.IsSuccess) {
|
||||
// this.refreshQuestions()
|
||||
await this.getReadingQuestionAndAnswer(this.visitTaskId)
|
||||
this.$refs['ecrf'].getQuestions(this.visitTaskId, true)
|
||||
this.$refs['ecrf2'].getQuestions(this.visitTaskId, true)
|
||||
this.$refs['ecrf3'].getQuestions(this.visitTaskId, true)
|
||||
this.refreshQuestions()
|
||||
DicomEvent.$emit('getReportInfo', true)
|
||||
// 保存成功!
|
||||
this.addOrEdit.visible = false
|
||||
|
|
@ -709,7 +813,7 @@ export default {
|
|||
}
|
||||
},
|
||||
async uploadDlgClose() {
|
||||
await this.getReadingQuestionAndAnswer(this.visitTaskId)
|
||||
this.refreshQuestions()
|
||||
DicomEvent.$emit('getReportInfo', true)
|
||||
this.upload.visible = false
|
||||
},
|
||||
|
|
@ -891,6 +995,10 @@ export default {
|
|||
::v-deep.el-table--scrollable-x .el-table__body-wrapper {
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
}
|
||||
::v-deep.el-tag.el-tag--info {
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -49,15 +49,6 @@
|
|||
</div>
|
||||
<el-table v-if="item.Type === 'basicTable' && item.TableQuestions" :ref="item.Id"
|
||||
:data="item.TableQuestions.Answers" max-height="600">
|
||||
<!-- <el-table-column :label="$t('CustomizeQuestionFormItem:label:OrderMark')" width="60px" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
{{ getLesionName(item.OrderMark,scope.row.RowIndex) }}
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<!-- <el-table-column
|
||||
type="index"
|
||||
width="40px"
|
||||
/> -->
|
||||
<el-table-column v-for="q of item.TableQuestions.Questions" :key="q.Id" :prop="q.Id"
|
||||
:label="q.QuestionName" show-overflow-tooltip :render-header="renderHeader">
|
||||
<template slot-scope="scope">
|
||||
|
|
@ -98,6 +89,9 @@
|
|||
required: (item.IsRequired === 0 || (item.IsRequired === 1 && item.RelevanceId && (item.RelevanceValue.includes(questionForm[item.RelevanceId])))) && item.Type !== 'group' && item.Type !== 'summary',
|
||||
message: ['radio', 'select', 'checkbox'].includes(item.Type) ? $t('common:ruleMessage:select') : $t('common:ruleMessage:specify'), trigger: ['blur', 'change']
|
||||
},
|
||||
{
|
||||
validator: item.Type === 'number' && !item.TypeValue && (item.QuestionType === 1010 || item.QuestionType === 1011) ? validatorNumberOrNEInput : (rule, value, callback) => { callback() }, trigger: ['blur', 'change']
|
||||
}
|
||||
]">
|
||||
<!-- 数值类型 -->
|
||||
<template v-if="item.Type === 'textarea'">
|
||||
|
|
@ -112,6 +106,50 @@
|
|||
:label="dict.label" />
|
||||
</el-select>
|
||||
</template>
|
||||
<template v-if="item.Type === 'number'">
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
<el-input
|
||||
v-if="item.QuestionType === 1010 || item.QuestionType === 1011"
|
||||
type="text"
|
||||
@change="(val) => { formItemChange(val, item) }"
|
||||
@input="numberOrNEInput(item.Id)"
|
||||
@blur="handleNumberOrNEBlur(item)"
|
||||
v-model.trim="questionForm[item.Id]" :disabled="readingTaskState === 2">
|
||||
<template slot="append" v-if="item.Unit !== 0">{{ item.Unit !== 4 ? $fd('ValueUnit', item.Unit) : item.CustomUnit }}</template>
|
||||
<template slot="append" v-else-if="item.ValueType === 2">%</template>
|
||||
</el-input>
|
||||
<el-input
|
||||
v-else
|
||||
type="text"
|
||||
@change="(val) => { formItemChange(val, item) }"
|
||||
@input="(val) => questionForm[item.Id] = val.replace(/[^\d.]/g, '')"
|
||||
@blur="handleBlur(questionForm[item.Id], questionForm, item)"
|
||||
v-model.trim="questionForm[item.Id]" :disabled="readingTaskState === 2">
|
||||
<template slot="append" v-if="item.Unit !== 0">{{ item.Unit !== 4 ? $fd('ValueUnit', item.Unit) : item.CustomUnit }}</template>
|
||||
<template slot="append" v-else-if="item.ValueType === 2">%</template>
|
||||
</el-input>
|
||||
<!-- <el-input-number v-model="questionForm[item.Id]"
|
||||
:disabled="!isCurrentTask || readingTaskState >= 2" :precision="0"
|
||||
@change="((val) => { formItemChange(val, item) })" /> -->
|
||||
<svg-icon v-if="item.ShowChartTypeEnum > 0" icon-class="readingChart"
|
||||
class="svg-icon svg-readingChart" @click.stop="(e) => handleReadingChart({
|
||||
e,
|
||||
data: {
|
||||
QuestionId: item.Id,
|
||||
QuestionName: item.QuestionName
|
||||
}
|
||||
})" />
|
||||
</div>
|
||||
</template>
|
||||
<template v-if="item.Type === 'calculation'">
|
||||
<el-input v-model="questionForm[item.Id]"
|
||||
disabled type="number" @change="((val) => { formItemChange(val, item) })">
|
||||
<template slot="append" v-if="item.Unit !== 0">
|
||||
{{ item.Unit !== 4 ? $fd('ValueUnit', item.Unit) : item.CustomUnit }}
|
||||
</template>
|
||||
<template slot="append" v-else-if="item.ValueType === 2">%</template>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-form-item>
|
||||
<template v-if="item.Childrens && item.Childrens.length > 0">
|
||||
<template v-for="child in item.Childrens">
|
||||
|
|
@ -241,7 +279,10 @@ export default {
|
|||
m1Id: '',
|
||||
m2Id: '',
|
||||
m3Id: '',
|
||||
avgId: ''
|
||||
avgId: '',
|
||||
sRoiStartDistanceId: '',
|
||||
sRoiEndDistanceId: '',
|
||||
sRoiDistanceId: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -331,6 +372,18 @@ export default {
|
|||
const answer = item.Type === 'select' && item.OptionTypeEnum === 1 && item.Answer ? JSON.parse(item.Answer) : item.Type === 'number' || item.Type === 'calculation' ? isNaN(parseFloat(item.Answer)) ? null : parseFloat(item.Answer) : item.Answer
|
||||
this.$set(this.questionForm, item.Id, answer)
|
||||
}
|
||||
if (item.QuestionType === 1013) {
|
||||
// ROI起始回撤距离
|
||||
this.sRoiStartDistanceId = item.Id
|
||||
}
|
||||
if (item.QuestionType === 1014) {
|
||||
// ROI终止回撤距离
|
||||
this.sRoiEndDistanceId = item.Id
|
||||
}
|
||||
if (item.QuestionType === 1015) {
|
||||
// ROI段落总长度
|
||||
this.sRoiDistanceId = item.Id
|
||||
}
|
||||
if (item.Childrens.length > 0) {
|
||||
this.setQuestionForm(item.Childrens)
|
||||
}
|
||||
|
|
@ -443,13 +496,17 @@ export default {
|
|||
setMeasuredData(measureData) {
|
||||
|
||||
},
|
||||
formItemChange(val, question) {
|
||||
formItemChange(val, item) {
|
||||
this.formChanged = true
|
||||
if (question.Type === 'number') {
|
||||
this.limitBlur(question.Id, question.ValueType)
|
||||
// if (item.Type === 'number') {
|
||||
// this.limitBlur(item.Id, item.ValueType)
|
||||
// }
|
||||
if (item.Childrens && item.Childrens.length > 0) {
|
||||
this.resetChild(item.Childrens)
|
||||
}
|
||||
if (question.Childrens && question.Childrens.length > 0) {
|
||||
this.resetChild(question.Childrens)
|
||||
if ((item.QuestionType === 1013 || item.QuestionType === 1014) && !isNaN(parseFloat(this.questionForm[this.sRoiStartDistanceId])) && !isNaN(parseFloat(this.questionForm[this.sRoiEndDistanceId]))) {
|
||||
let num = parseFloat(this.questionForm[this.sRoiEndDistanceId]) - parseFloat(this.questionForm[this.sRoiStartDistanceId])
|
||||
this.$set(this.questionForm, this.sRoiDistanceId, parseFloat(num).toFixed(this.digitPlaces))
|
||||
}
|
||||
},
|
||||
resetChild(obj) {
|
||||
|
|
@ -471,6 +528,72 @@ export default {
|
|||
this.$set(this.questionForm, qId, this.numberToFixed(value))
|
||||
}
|
||||
},
|
||||
validatorNumberOrNEInput(rule, value, callback) {
|
||||
let reg = new RegExp(/^(?:-?(?:(?:0|[1-9]\d*)(?:\.\d+)?|\.\d+)|NE)$/, 'g')
|
||||
if (value === '') {
|
||||
callback();
|
||||
} else {
|
||||
if (!reg.test(value)) {
|
||||
callback(new Error(this.$t('trials:reading:ruleMessage:validatorNumberInput')));
|
||||
} else {
|
||||
callback();
|
||||
}
|
||||
}
|
||||
},
|
||||
numberOrNEInput(id) {
|
||||
// this.questionForm[id] = this.questionForm[id].toUpperCase();
|
||||
if (!this.questionForm[id]) {
|
||||
return
|
||||
}
|
||||
let value = this.questionForm[id].toUpperCase().replace(/[^0-9.NE]/g, '')
|
||||
if (value.startsWith('N')) {
|
||||
if (value.length > 2) {
|
||||
value = value.substring(0, 2)
|
||||
}
|
||||
if (value.length === 2 && value[1] !== 'E') {
|
||||
value = 'N'
|
||||
}
|
||||
} else {
|
||||
value = value.replace(/[NE]/g, '')
|
||||
}
|
||||
this.questionForm[id] = value
|
||||
this.$set(this.questionForm, id, value)
|
||||
},
|
||||
handleNumberOrNEBlur(item) {
|
||||
if (this.questionForm[item.Id] && !this.questionForm[item.Id].startsWith('N')) {
|
||||
if (item.ValueType === 3) {
|
||||
// 文本
|
||||
this.$set(this.questionForm, item.Id, value)
|
||||
} else {
|
||||
const num = parseFloat(this.questionForm[item.Id])
|
||||
if (!isNaN(num)) {
|
||||
this.$set(this.questionForm, item.Id, parseFloat(num).toFixed(this.digitPlaces))
|
||||
if (item.ValueType === 0) {
|
||||
// 整型
|
||||
this.$set(this.questionForm, item.Id, parseInt(num))
|
||||
} else if (item.ValueType === 1 || item.ValueType === 2){
|
||||
// 小数、百分比
|
||||
this.$set(this.questionForm, item.Id, parseFloat(num).toFixed(this.digitPlaces))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
handleBlur(value, a, item) {
|
||||
if (!value || item.ValueType === 3) return false
|
||||
const num = parseFloat(this.questionForm[item.Id])
|
||||
if (!isNaN(num)) {
|
||||
this.$set(this.questionForm, item.Id, parseFloat(num).toFixed(this.digitPlaces))
|
||||
if (item.ValueType === 0) {
|
||||
// 整型
|
||||
this.$set(this.questionForm, item.Id, parseInt(num))
|
||||
} else if (item.ValueType === 1 || item.ValueType === 2){
|
||||
// 小数、百分比
|
||||
this.$set(this.questionForm, item.Id, parseFloat(num).toFixed(this.digitPlaces))
|
||||
}
|
||||
}
|
||||
},
|
||||
numberToFixed(v) {
|
||||
if (this.digitPlaces > -1) {
|
||||
return isNaN(parseFloat(v)) ? null : `${parseFloat(v).toFixed(this.digitPlaces)}`
|
||||
|
|
@ -631,11 +754,11 @@ export default {
|
|||
}
|
||||
const res = await submitTableQuestion(params)
|
||||
if (res.IsSuccess) {
|
||||
// this.refreshQuestions()
|
||||
await this.getReadingQuestionAndAnswer(this.visitTaskId)
|
||||
this.$refs['ecrf'].getQuestions(this.visitTaskId, true)
|
||||
this.$refs['ecrf2'].getQuestions(this.visitTaskId, true)
|
||||
this.$refs['ecrf3'].getQuestions(this.visitTaskId, true)
|
||||
this.refreshQuestions()
|
||||
// await this.getReadingQuestionAndAnswer(this.visitTaskId)
|
||||
// this.$refs['ecrf'].getQuestions(this.visitTaskId, true)
|
||||
// this.$refs['ecrf2'].getQuestions(this.visitTaskId, true)
|
||||
// this.$refs['ecrf3'].getQuestions(this.visitTaskId, true)
|
||||
DicomEvent.$emit('getReportInfo', true)
|
||||
// 保存成功!
|
||||
this.addOrEdit.visible = false
|
||||
|
|
@ -699,7 +822,7 @@ export default {
|
|||
}
|
||||
},
|
||||
async uploadDlgClose() {
|
||||
await this.getReadingQuestionAndAnswer(this.visitTaskId)
|
||||
this.refreshQuestions()
|
||||
DicomEvent.$emit('getReportInfo', true)
|
||||
this.upload.visible = false
|
||||
},
|
||||
|
|
@ -883,5 +1006,8 @@ export default {
|
|||
z-index: 2;
|
||||
}
|
||||
}
|
||||
::v-deep.el-tag.el-tag--info {
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -210,6 +210,7 @@ export default {
|
|||
// 脾底位置
|
||||
this.spleenBottomId = v.Id
|
||||
}
|
||||
|
||||
}
|
||||
if (v.Childrens.length > 0) {
|
||||
this.setChild(v.Childrens)
|
||||
|
|
@ -685,7 +686,6 @@ export default {
|
|||
this.setQuestionStatus(this.questions, this.measurements[idx].QuestionType)
|
||||
},
|
||||
setQuestionStatus(obj, questionType) {
|
||||
console.log(obj, questionType)
|
||||
for (let i = 0; i < obj.length; i++) {
|
||||
if (obj[i].QuestionType === questionType) {
|
||||
this.$set(obj[i], 'SaveEnum', 1)
|
||||
|
|
@ -785,6 +785,7 @@ export default {
|
|||
if (obj.key === this.spleenStatusId) {
|
||||
this.setSpleenCommentDisplay()
|
||||
}
|
||||
|
||||
this.formChanged = true
|
||||
},
|
||||
setQuestions() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue