自定义标准更改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
b5b5830b1f
commit
067162e1d7
|
@ -227,8 +227,7 @@
|
||||||
type="number"
|
type="number"
|
||||||
v-if="question.Type === 'number' && question.DataSource !== 1"
|
v-if="question.Type === 'number' && question.DataSource !== 1"
|
||||||
@change="(val) => { formItemNumberChange(val, question) }"
|
@change="(val) => { formItemNumberChange(val, question) }"
|
||||||
onblur="value=parseFloat(value).toFixed(parseInt(localStorage.getItem('digitPlaces')));"
|
@blur="handleBlur(questionForm[question.Id], questionForm, question.Id)"
|
||||||
@input="limitInput($event, questionForm, question.Id)"
|
|
||||||
v-model="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>
|
<template slot="append" v-if="question.Unit !== 0">{{question.Unit !== 4 ? $fd('ValueUnit', question.Unit) : question.CustomUnit}}</template>
|
||||||
|
@ -237,8 +236,7 @@
|
||||||
<el-input
|
<el-input
|
||||||
type="number"
|
type="number"
|
||||||
v-if="question.Type === 'number' && question.DataSource === 1"
|
v-if="question.Type === 'number' && question.DataSource === 1"
|
||||||
onblur="value=parseFloat(value).toFixed(parseInt(localStorage.getItem('digitPlaces')));"
|
@blur="handleBlur(questionForm[question.Id], questionForm, question.Id)"
|
||||||
@input="limitInput($event, questionForm, question.Id)"
|
|
||||||
:disabled="question.DataSource === 1"
|
:disabled="question.DataSource === 1"
|
||||||
v-model="questionForm[question.Id]"
|
v-model="questionForm[question.Id]"
|
||||||
>
|
>
|
||||||
|
@ -396,7 +394,7 @@ export default {
|
||||||
loading: false,
|
loading: false,
|
||||||
RowIndex: 0,
|
RowIndex: 0,
|
||||||
RowId: null,
|
RowId: null,
|
||||||
digitPlaces: 0,
|
digitPlaces: 2,
|
||||||
CalculationTabelList: [],
|
CalculationTabelList: [],
|
||||||
classArr: []
|
classArr: []
|
||||||
}
|
}
|
||||||
|
@ -424,7 +422,8 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.digitPlaces = localStorage.getItem('digitPlaces') ? parseInt(localStorage.getItem('digitPlaces')) : 0
|
var digitPlaces = Number(localStorage.getItem('digitPlaces'))
|
||||||
|
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
|
||||||
// if (this.question.Type === 'class') {
|
// if (this.question.Type === 'class') {
|
||||||
// this.ClassifyAlgorithmsList = JSON.parse(this.question.ClassifyAlgorithms)
|
// this.ClassifyAlgorithmsList = JSON.parse(this.question.ClassifyAlgorithms)
|
||||||
// }
|
// }
|
||||||
|
@ -471,6 +470,9 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handleBlur(value, a, b) {
|
||||||
|
this.$set(a, b, parseFloat(value).toFixed(this.digitPlaces))
|
||||||
|
},
|
||||||
deleteTableCol(row, index) {
|
deleteTableCol(row, index) {
|
||||||
this.$confirm(this.$t('trials:uploadNonDicoms:message:msg1')).then(() => {
|
this.$confirm(this.$t('trials:uploadNonDicoms:message:msg1')).then(() => {
|
||||||
const loading = this.$loading({ fullscreen: true })
|
const loading = this.$loading({ fullscreen: true })
|
||||||
|
@ -728,14 +730,13 @@ export default {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
var digitPlaces = parseInt(localStorage.getItem('digitPlaces'))
|
|
||||||
if (rules.ValueType === 2) {
|
if (rules.ValueType === 2) {
|
||||||
num = num * 100
|
num = num * 100
|
||||||
}
|
}
|
||||||
if (rules.CustomCalculateMark === 13 || rules.CustomCalculateMark === 14) {
|
if (rules.CustomCalculateMark === 13 || rules.CustomCalculateMark === 14) {
|
||||||
return num
|
return num
|
||||||
} else {
|
} else {
|
||||||
return num.toFixed(digitPlaces)
|
return num.toFixed(this.digitPlaces)
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
|
@ -148,8 +148,7 @@
|
||||||
v-if="question.Type === 'number' && question.DataSource !== 1"
|
v-if="question.Type === 'number' && question.DataSource !== 1"
|
||||||
:disabled="question.TableQuestionType === 2 || (question.IsCopy && type === 'edit' && !IsBaseline && questionForm.IsCurrentTaskAdd === 'False')"
|
:disabled="question.TableQuestionType === 2 || (question.IsCopy && type === 'edit' && !IsBaseline && questionForm.IsCurrentTaskAdd === 'False')"
|
||||||
@change="((val)=>{formItemNumberChange(val, question)})"
|
@change="((val)=>{formItemNumberChange(val, question)})"
|
||||||
onblur="value=parseFloat(value).toFixed(parseInt(localStorage.getItem('digitPlaces')))"
|
@blur="handleBlur(questionForm[question.Id], questionForm, question.Id)"
|
||||||
@input="limitInput($event, question)"
|
|
||||||
v-model="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>
|
<template slot="append" v-if="question.Unit !== 0">{{question.Unit !== 4 ? $fd('ValueUnit', question.Unit) : question.CustomUnit}}</template>
|
||||||
|
@ -158,8 +157,7 @@
|
||||||
type="number"
|
type="number"
|
||||||
v-if="question.Type === 'number' && question.DataSource === 1"
|
v-if="question.Type === 'number' && question.DataSource === 1"
|
||||||
:disabled="question.DataSource === 1"
|
:disabled="question.DataSource === 1"
|
||||||
onblur="value=parseFloat(value).toFixed(parseInt(localStorage.getItem('digitPlaces')))"
|
@blur="handleCalculationBlur(calculationValue)"
|
||||||
@input="limitInput($event, question)"
|
|
||||||
v-model="calculationValue"
|
v-model="calculationValue"
|
||||||
>
|
>
|
||||||
<template slot="append" v-if="question.Unit !== 0">{{question.Unit !== 4 ? $fd('ValueUnit', question.Unit) : question.CustomUnit}}</template>
|
<template slot="append" v-if="question.Unit !== 0">{{question.Unit !== 4 ? $fd('ValueUnit', question.Unit) : question.CustomUnit}}</template>
|
||||||
|
@ -297,7 +295,7 @@ export default {
|
||||||
organList: [],
|
organList: [],
|
||||||
QuestionsList: [],
|
QuestionsList: [],
|
||||||
QuestionsForm: {},
|
QuestionsForm: {},
|
||||||
digitPlaces: 0
|
digitPlaces: 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// watch: {
|
// watch: {
|
||||||
|
@ -323,7 +321,8 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.digitPlaces = localStorage.getItem('digitPlaces') ? parseInt(localStorage.getItem('digitPlaces')) : 0
|
var digitPlaces = Number(localStorage.getItem('digitPlaces'))
|
||||||
|
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
|
||||||
if (this.question.Type === 'upload') {
|
if (this.question.Type === 'upload') {
|
||||||
if (this.questionForm[this.question.Id]) {
|
if (this.questionForm[this.question.Id]) {
|
||||||
this.urls = this.questionForm[this.question.Id].split('|')
|
this.urls = this.questionForm[this.question.Id].split('|')
|
||||||
|
@ -382,6 +381,12 @@ export default {
|
||||||
this.$emit('setFormItemData', { key: question.Id, val: v, question: question })
|
this.$emit('setFormItemData', { key: question.Id, val: v, question: question })
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handleBlur(value, a, b) {
|
||||||
|
this.$set(a, b, parseFloat(value).toFixed(this.digitPlaces))
|
||||||
|
},
|
||||||
|
handleCalculationBlur(v) {
|
||||||
|
this.calculationValue = parseFloat(v).toFixed(this.digitPlaces)
|
||||||
|
},
|
||||||
limitInput(value, q) {
|
limitInput(value, q) {
|
||||||
console.log(value)
|
console.log(value)
|
||||||
if (value.indexOf('.') > -1) {
|
if (value.indexOf('.') > -1) {
|
||||||
|
@ -477,11 +482,10 @@ export default {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
var digitPlaces = parseInt(localStorage.getItem('digitPlaces'))
|
|
||||||
if (rules.ValueType === 2) {
|
if (rules.ValueType === 2) {
|
||||||
num = num * 100
|
num = num * 100
|
||||||
}
|
}
|
||||||
return num.toFixed(digitPlaces)
|
return num.toFixed(this.digitPlaces)
|
||||||
},
|
},
|
||||||
formItemNumberChange(v, question) {
|
formItemNumberChange(v, question) {
|
||||||
this.$emit('formItemTableNumberChange', v, question)
|
this.$emit('formItemTableNumberChange', v, question)
|
||||||
|
|
|
@ -58,10 +58,13 @@ export default {
|
||||||
activeName: 0,
|
activeName: 0,
|
||||||
CalculationList: [],
|
CalculationList: [],
|
||||||
IsBaseline: true,
|
IsBaseline: true,
|
||||||
classArr: []
|
classArr: [],
|
||||||
|
digitPlaces: 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
var digitPlaces = Number(localStorage.getItem('digitPlaces'))
|
||||||
|
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
|
||||||
this.getQuestionCalculateRelation()
|
this.getQuestionCalculateRelation()
|
||||||
// this.getCustomTableQuestionAnswer()
|
// this.getCustomTableQuestionAnswer()
|
||||||
DicomEvent.$on('reGetQuestionAnswer', () => {
|
DicomEvent.$on('reGetQuestionAnswer', () => {
|
||||||
|
@ -133,7 +136,7 @@ export default {
|
||||||
this.classArr.push({triggerId: v.ClassifyQuestionId, classId: v.Id, classifyAlgorithms: v.ClassifyAlgorithms, classifyType: v.ClassifyType})
|
this.classArr.push({triggerId: v.ClassifyQuestionId, classId: v.Id, classifyAlgorithms: v.ClassifyAlgorithms, classifyType: v.ClassifyType})
|
||||||
}
|
}
|
||||||
if (v.Type === 'number') {
|
if (v.Type === 'number') {
|
||||||
this.$set(this.questionForm, v.Id, v.Answer === '' ? '' : parseFloat(v.Answer).toFixed(localStorage.getItem('digitPlaces')))
|
this.$set(this.questionForm, v.Id, v.Answer === '' ? '' : parseFloat(v.Answer).toFixed(this.digitPlaces))
|
||||||
}
|
}
|
||||||
if (v.Childrens.length > 0) {
|
if (v.Childrens.length > 0) {
|
||||||
this.setChild(v.Childrens)
|
this.setChild(v.Childrens)
|
||||||
|
@ -187,7 +190,7 @@ export default {
|
||||||
this.$set(this.questionForm, v.Id, v.TableQuestions.Answers)
|
this.$set(this.questionForm, v.Id, v.TableQuestions.Answers)
|
||||||
}
|
}
|
||||||
if (v.Type === 'number') {
|
if (v.Type === 'number') {
|
||||||
this.$set(this.questionForm, v.Id, v.Answer === '' ? '' : parseFloat(v.Answer).toFixed(localStorage.getItem('digitPlaces')))
|
this.$set(this.questionForm, v.Id, v.Answer === '' ? '' : parseFloat(v.Answer).toFixed(this.digitPlaces))
|
||||||
}
|
}
|
||||||
if (v.Childrens.length > 0) {
|
if (v.Childrens.length > 0) {
|
||||||
this.setChild(v.Childrens)
|
this.setChild(v.Childrens)
|
||||||
|
@ -208,7 +211,7 @@ export default {
|
||||||
i.TableQuestions.Questions.forEach(o => {
|
i.TableQuestions.Questions.forEach(o => {
|
||||||
if (o.Type === 'number') {
|
if (o.Type === 'number') {
|
||||||
i.TableQuestions.Answers.forEach((ite, index) => {
|
i.TableQuestions.Answers.forEach((ite, index) => {
|
||||||
this.$set(i.TableQuestions.Answers[index], o.Id, i.TableQuestions.Answers[index][o.Id] ? parseFloat(i.TableQuestions.Answers[index][o.Id]).toFixed(localStorage.getItem('digitPlaces')) : null)
|
this.$set(i.TableQuestions.Answers[index], o.Id, i.TableQuestions.Answers[index][o.Id] ? parseFloat(i.TableQuestions.Answers[index][o.Id]).toFixed(this.digitPlaces) : null)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -218,7 +221,7 @@ export default {
|
||||||
this.classArr.push({triggerId: i.ClassifyQuestionId, classId: i.Id, classifyAlgorithms: i.ClassifyAlgorithms, classifyType: i.ClassifyType})
|
this.classArr.push({triggerId: i.ClassifyQuestionId, classId: i.Id, classifyAlgorithms: i.ClassifyAlgorithms, classifyType: i.ClassifyType})
|
||||||
}
|
}
|
||||||
if (i.Type === 'number') {
|
if (i.Type === 'number') {
|
||||||
this.$set(this.questionForm, i.Id, i.Answer === '' ? '' : parseFloat(i.Answer).toFixed(localStorage.getItem('digitPlaces')))
|
this.$set(this.questionForm, i.Id, i.Answer === '' ? '' : parseFloat(i.Answer).toFixed(this.digitPlaces))
|
||||||
}
|
}
|
||||||
if (i.Childrens && i.Childrens.length > 0) {
|
if (i.Childrens && i.Childrens.length > 0) {
|
||||||
this.setChild(i.Childrens)
|
this.setChild(i.Childrens)
|
||||||
|
|
|
@ -148,7 +148,7 @@
|
||||||
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-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]"
|
v-model="questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]"
|
||||||
:disabled="scope.row.DataSource === 1"
|
:disabled="scope.row.DataSource === 1"
|
||||||
onblur="value=parseFloat(value).toFixed(parseInt(localStorage.getItem('digitPlaces')))"
|
@blur="value=parseFloat(value).toFixed(digitPlaces)"
|
||||||
@input="limitInput($event, questionForm[scope.row.QuestionId][scope.row.xfIndex], scope.row.TableQuestionId)"
|
@input="limitInput($event, questionForm[scope.row.QuestionId][scope.row.xfIndex], scope.row.TableQuestionId)"
|
||||||
size="mini"
|
size="mini"
|
||||||
@focus="() => {questionId = scope.row.QuestionId}"
|
@focus="() => {questionId = scope.row.QuestionId}"
|
||||||
|
@ -171,7 +171,7 @@
|
||||||
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-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]"
|
v-model="questionForm[scope.row.QuestionId]"
|
||||||
:disabled="scope.row.DataSource === 1"
|
:disabled="scope.row.DataSource === 1"
|
||||||
onblur="value=parseFloat(value).toFixed(parseInt(localStorage.getItem('digitPlaces')))"
|
@blur="value=parseFloat(value).toFixed(digitPlaces)"
|
||||||
@input="limitInput($event, questionForm, scope.row.QuestionId)"
|
@input="limitInput($event, questionForm, scope.row.QuestionId)"
|
||||||
size="mini"
|
size="mini"
|
||||||
@focus="() => {questionId = scope.row.QuestionId}"
|
@focus="() => {questionId = scope.row.QuestionId}"
|
||||||
|
@ -314,7 +314,8 @@ export default {
|
||||||
TrialReadingCriterionId: null,
|
TrialReadingCriterionId: null,
|
||||||
tableAnswers: {},
|
tableAnswers: {},
|
||||||
questionForm: {},
|
questionForm: {},
|
||||||
questionId: null
|
questionId: null,
|
||||||
|
digitPlaces: 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
@ -337,7 +338,8 @@ export default {
|
||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
this.CriterionType = parseInt(localStorage.getItem('CriterionType'))
|
this.CriterionType = parseInt(localStorage.getItem('CriterionType'))
|
||||||
this.digitPlaces = parseInt(localStorage.getItem('digitPlaces'))
|
let digitPlaces = Number(localStorage.getItem('digitPlaces'))
|
||||||
|
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
|
||||||
this.TrialReadingCriterionId = this.$route.query.TrialReadingCriterionId
|
this.TrialReadingCriterionId = this.$route.query.TrialReadingCriterionId
|
||||||
window.addEventListener('resize', () => {
|
window.addEventListener('resize', () => {
|
||||||
this.handleResize()
|
this.handleResize()
|
||||||
|
@ -359,7 +361,6 @@ export default {
|
||||||
if (value.split('.')[1].length >= this.digitPlaces) {
|
if (value.split('.')[1].length >= this.digitPlaces) {
|
||||||
this.$set(a, b, parseFloat(value).toFixed(this.digitPlaces))
|
this.$set(a, b, parseFloat(value).toFixed(this.digitPlaces))
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setImageUrl(qid, index, tqid, url, RowId) {
|
setImageUrl(qid, index, tqid, url, RowId) {
|
||||||
|
@ -552,11 +553,10 @@ export default {
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e)
|
console.log(e)
|
||||||
}
|
}
|
||||||
var digitPlaces = parseInt(localStorage.getItem('digitPlaces'))
|
|
||||||
if (rules.ValueType === 2) {
|
if (rules.ValueType === 2) {
|
||||||
num = num * 100
|
num = num * 100
|
||||||
}
|
}
|
||||||
return isNaN(num) ? '' : isFinite(num) ? num.toFixed(digitPlaces) : '∞'
|
return isNaN(num) ? '' : isFinite(num) ? num.toFixed(this.digitPlaces) : '∞'
|
||||||
},
|
},
|
||||||
getReportInfo() {
|
getReportInfo() {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
@ -647,14 +647,13 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var digitPlaces = parseInt(localStorage.getItem('digitPlaces')) || 0
|
|
||||||
item.Answer.forEach(i => {
|
item.Answer.forEach(i => {
|
||||||
if (item.DictionaryCode) {
|
if (item.DictionaryCode) {
|
||||||
this.$set(obj.Answers, i.VisitTaskId, i.Answer ? parseInt(i.Answer) : null)
|
this.$set(obj.Answers, i.VisitTaskId, i.Answer ? parseInt(i.Answer) : null)
|
||||||
// obj.Answers[i.VisitTaskId] = i.Answer ? parseInt(i.Answer) : null
|
// obj.Answers[i.VisitTaskId] = i.Answer ? parseInt(i.Answer) : null
|
||||||
} else {
|
} else {
|
||||||
if (item.Type === 'number') {
|
if (item.Type === 'number') {
|
||||||
this.$set(obj.Answers, i.VisitTaskId, isNaN(parseFloat(i.Answer)) ? i.Answer : parseFloat(i.Answer).toFixed(digitPlaces))
|
this.$set(obj.Answers, i.VisitTaskId, isNaN(parseFloat(i.Answer)) ? i.Answer : parseFloat(i.Answer).toFixed(this.digitPlaces))
|
||||||
} else {
|
} else {
|
||||||
this.$set(obj.Answers, i.VisitTaskId, i.Answer)
|
this.$set(obj.Answers, i.VisitTaskId, i.Answer)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue