Merge branch 'uat'
continuous-integration/drone/push Build is failing

# Conflicts:
#	src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionFormItem.vue
#	src/views/trials/trials-panel/reading/dicoms/customize/CustomizeQuestionTableFormItem.vue
#	src/views/trials/trials-panel/reading/dicoms3D/components/customize/QuestionList.vue
#	src/views/trials/trials-panel/reading/dicoms3D/components/customize/ReportPage.vue
#	src/views/trials/trials-panel/reading/visit-review/components/ReportPage.vue
#	src/views/trials/trials-panel/setting/reading-unit/components/QuestionFormItem.vue
#	src/views/trials/trials-panel/setting/reading-unit/components/QuestionTableFormItem.vue
This commit is contained in:
2025-07-10 11:16:38 +08:00
6668 changed files with 968 additions and 4400999 deletions
+1 -1
View File
@@ -474,7 +474,7 @@ async function VueInit() {
var my_password = zzSessionStorage.getItem('my_password')
let my_userid = zzSessionStorage.getItem('userId')
let my_EMail = zzSessionStorage.getItem('my_EMail') || ''
if (md5(_vm.unlock.my_password) === my_password && (my_username === _vm.unlock.my_username || my_EMail.toUpperCase() === vm.unlock.my_username.toUpperCase())) {
if (md5(_vm.unlock.my_password) === my_password && (my_username === _vm.unlock.my_username || my_EMail.toUpperCase() === _vm.unlock.my_username.toUpperCase())) {
resetReadingRestTime().then(() => {
})
const closeLock = (_vm) => {
@@ -25,7 +25,7 @@
{{ scope.row[item.Id] === '' ? '' : scope.row[item.Id] ? scope.row[item.Id].split('|').length : '' }}
</span>
<span v-else-if="item.Type === 'number'">
{{ scope.row[item.Id] ? parseFloat(scope.row[item.Id]).toFixed(digitPlaces) : null }}
{{!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] }}
@@ -281,6 +281,7 @@ export default {
// if (!v[this.question.Id] || !oldv[this.question.Id]) return
// } catch (e) {
// }
this.formItemNumberChange(this.question.Id, false)
try {
if (!v || !v[this.question.Id] || !oldv || !oldv[this.question.Id])
return
@@ -290,7 +291,6 @@ export default {
if (this.question.Type === 'class') {
this.$emit("setFormItemData", { key: this.question.Id, val: v[this.question.Id], question: v })
}
this.formItemNumberChange(this.question.Id, false)
}
},
readingTaskState: {
@@ -374,6 +374,7 @@ export default {
deleteTableCol(row, index) {
this.$confirm(this.$t('trials:uploadNonDicoms:message:msg1')).then(() => {
const loading = this.$loading({ fullscreen: true })
let RowId = this.questionForm[row.Id][index].RowId
var param = {
visitTaskId: this.visitTaskId,
questionId: row.Id,
@@ -384,6 +385,11 @@ export default {
if (res.IsSuccess) {
this.$message.success(this.$t('common:message:deletedSuccessfully'))
DicomEvent.$emit('reGetQuestionAnswer')
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.formItemNumberChange(this.question.Id, true)
}
loading.close()
}).catch(() => {
@@ -523,15 +529,23 @@ export default {
}
let dataArr = []
rules.CalculateQuestionList.forEach((o, i) => {
if (this.questionForm[o.TableQuestionId] === 'NE') {
isNE = true
}
if (i === 0) {
if (rules.CustomCalculateMark > 4 && rules.CustomCalculateMark < 10) {
switch (rules.CustomCalculateMark) {
case 5:
this.questionForm[o.QuestionId].forEach((q, qi) => {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId])
} else {
num *= parseFloat(q[o.TableQuestionId])
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId])
} else {
num *= parseFloat(q[o.TableQuestionId])
}
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
@@ -540,10 +554,15 @@ export default {
break;
case 6:
this.questionForm[o.QuestionId].forEach((q, qi) => {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId])
} else {
num += parseFloat(q[o.TableQuestionId])
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId])
} else {
num += parseFloat(q[o.TableQuestionId])
}
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
@@ -552,10 +571,15 @@ export default {
break;
case 7:
this.questionForm[o.QuestionId].forEach((q, qi) => {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId])
} else {
num += parseFloat(q[o.TableQuestionId])
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId])
} else {
num += parseFloat(q[o.TableQuestionId])
}
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
@@ -566,7 +590,9 @@ export default {
case 8:
var arr = []
this.questionForm[o.QuestionId].forEach(q => {
arr.push(q[o.TableQuestionId])
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
arr.push(q[o.TableQuestionId])
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
}
@@ -576,7 +602,9 @@ export default {
case 9:
var arr = []
this.questionForm[o.QuestionId].forEach(q => {
arr.push(q[o.TableQuestionId])
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
arr.push(q[o.TableQuestionId])
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
}
@@ -585,9 +613,8 @@ export default {
break;
}
} else {
num = parseFloat(this.questionForm[o.TableQuestionId])
if (this.questionForm[o.TableQuestionId] === 'NE') {
isNE = true
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num = parseFloat(this.questionForm[o.TableQuestionId])
}
if (!isNaN(num)) {
dataArr.push(num)
@@ -599,19 +626,27 @@ export default {
}
switch (rules.CustomCalculateMark) {
case 1:
num += parseFloat(this.questionForm[o.TableQuestionId])
if (isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num += parseFloat(this.questionForm[o.TableQuestionId])
}
break;
case 2:
num -= parseFloat(this.questionForm[o.TableQuestionId])
if (isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num -= parseFloat(this.questionForm[o.TableQuestionId])
}
break;
case 3:
num *= parseFloat(this.questionForm[o.TableQuestionId])
if (isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num *= parseFloat(this.questionForm[o.TableQuestionId])
}
break;
case 4:
if (parseFloat(this.questionForm[o.TableQuestionId]) === 0) {
num = 0
} else {
num /= parseFloat(this.questionForm[o.TableQuestionId])
if (isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
if (parseFloat(this.questionForm[o.TableQuestionId]) === 0) {
num = 0
} else {
num /= parseFloat(this.questionForm[o.TableQuestionId])
}
}
break;
case 10:
@@ -653,7 +688,7 @@ export default {
console.log(e)
}
if (isNE) {
return 'NE'
return 'NE'
}
if (rules.ValueType === 2) {
num = num * 100
@@ -746,19 +781,29 @@ export default {
} else {
switch (v.CustomCalculateMark) {
case 1:
num += parseFloat(this.QuestionsForm[o.TableQuestionId]);
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
num += parseFloat(this.QuestionsForm[o.TableQuestionId]);
}
break;
case 2:
num -= parseFloat(this.QuestionsForm[o.TableQuestionId]);
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
num -= parseFloat(this.QuestionsForm[o.TableQuestionId]);
}
break;
case 3:
num *= parseFloat(this.QuestionsForm[o.TableQuestionId]);
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
num *= parseFloat(this.QuestionsForm[o.TableQuestionId]);
}
break;
case 4:
num /= parseFloat(this.QuestionsForm[o.TableQuestionId]);
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
num /= parseFloat(this.QuestionsForm[o.TableQuestionId]);
}
break;
case 7:
arr.push(parseFloat(this.QuestionsForm[o.TableQuestionId]));
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
arr.push(parseFloat(this.QuestionsForm[o.TableQuestionId]));
}
num =
arr.length === 0
? 0
@@ -767,11 +812,15 @@ export default {
}, 0) / arr.length;
break;
case 8:
arr.push(parseFloat(this.QuestionsForm[o.TableQuestionId]));
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
arr.push(parseFloat(this.QuestionsForm[o.TableQuestionId]));
}
num = arr.length === 0 ? 0 : Math.max(...arr);
break;
case 9:
arr.push(parseFloat(this.QuestionsForm[o.TableQuestionId]));
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
arr.push(parseFloat(this.QuestionsForm[o.TableQuestionId]));
}
num = arr.length === 0 ? 0 : Math.min(...arr);
// console.log('min', this.questionForm[o.QuestionId], arr, num)
break;
@@ -780,6 +829,8 @@ export default {
});
if (isNE) {
num = 'NE'
} else {
num = num.toFixed(this.digitPlaces)
}
this.$set(this.QuestionsForm, v.Id, num.toString());
}
@@ -79,7 +79,12 @@
<el-input v-if="question.Type === 'increment'" v-model="questionForm[question.Id]" disabled />
<!-- 数值 -->
<!-- :precision="2" :step="0.1" :max="10" -->
<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) => { 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()" />
</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)"
@@ -87,7 +92,7 @@
<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.trim="calculationValue">
<template slot="append" v-if="question.Unit !== 0">{{ question.Unit !== 4 ? $fd('ValueUnit', question.Unit) :
@@ -333,7 +338,6 @@ export default {
var count = 0
var maxList = [], minList = []
rules.CalculateQuestionList.forEach((o, i) => {
if (this.questionForm[o.TableQuestionId] === 'NE') {
isNE = true
}
@@ -341,49 +345,72 @@ export default {
if (i !== 0) {
switch (rules.CustomCalculateMark) {
case 7:
count += parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
count += parseFloat(this.questionForm[o.TableQuestionId])
}
if (i === rules.CalculateQuestionList.length - 1) {
num = count / rules.CalculateQuestionList.length
}
break;
case 8:
maxList.push(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
maxList.push(this.questionForm[o.TableQuestionId])
}
if (i === rules.CalculateQuestionList.length - 1) {
num = Math.max(...maxList)
}
break;
case 9:
minList.push(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
minList.push(this.questionForm[o.TableQuestionId])
}
if (i === rules.CalculateQuestionList.length - 1) {
num = Math.min(...minList)
}
break;
}
} else {
maxList.push(this.questionForm[o.TableQuestionId])
minList.push(this.questionForm[o.TableQuestionId])
count = parseFloat(this.questionForm[o.TableQuestionId])
num = parseFloat(this.questionForm[o.TableQuestionId])
dataArr.push(num)
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
maxList.push(this.questionForm[o.TableQuestionId])
minList.push(this.questionForm[o.TableQuestionId])
count = parseFloat(this.questionForm[o.TableQuestionId])
num = parseFloat(this.questionForm[o.TableQuestionId])
dataArr.push(num)
}
}
} else {
if (i !== 0) {
switch (rules.CustomCalculateMark) {
case 1:
num += parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num += parseFloat(this.questionForm[o.TableQuestionId])
}
break;
case 2:
num -= parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num -= parseFloat(this.questionForm[o.TableQuestionId])
}
break;
case 3:
num *= parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num *= parseFloat(this.questionForm[o.TableQuestionId])
}
break;
case 4:
if (parseFloat(this.questionForm[o.TableQuestionId]) === 0) {
num = 0
} else {
num /= parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
if (parseFloat(this.questionForm[o.TableQuestionId]) === 0) {
num = 0
} else {
num /= parseFloat(this.questionForm[o.TableQuestionId])
}
}
break;
case 10:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
@@ -4,63 +4,36 @@
<div slot="header" class="clearfix report-header">
<h3 style="margin:0;padding:0;">{{ $t('trials:readingReport:title:eicrf') }}</h3>
<div style="margin-left:auto">
<el-switch
v-model="isShowDetail"
:active-text="$t('trials:readingReport:title:expandDetails')"
:inactive-text="$t('trials:readingReport:title:collapseDetails')"
style="margin-right:5px"
@change="handleShowDetail"
/>
<el-button
v-if="readingTaskState<2"
type="primary"
size="small"
@click="skipTask"
>
<el-switch v-model="isShowDetail" :active-text="$t('trials:readingReport:title:expandDetails')"
:inactive-text="$t('trials:readingReport:title:collapseDetails')" style="margin-right:5px"
@change="handleShowDetail" />
<el-button v-if="readingTaskState < 2" type="primary" size="small" @click="skipTask">
<!-- 跳过 -->
{{ $t('trials:readingReport:button:skip') }}
</el-button>
<el-button v-if="readingTaskState<2" type="primary" size="small" @click="getReportInfo">{{$t('trials:readingReport:button:refresh')}}</el-button>
<el-button v-if="readingTaskState<2" type="primary" size="small" @click="handleSave(true)">{{$t('common:button:save')}}</el-button>
<el-button v-if="readingTaskState<2" type="primary" size="small" @click="handleConfirm">{{$t('common:button:submit')}}</el-button>
<el-button v-if="readingTaskState < 2" type="primary" size="small" @click="getReportInfo">{{
$t('trials:readingReport:button:refresh') }}</el-button>
<el-button v-if="readingTaskState < 2" type="primary" size="small" @click="handleSave(true)">{{
$t('common:button:save') }}</el-button>
<el-button v-if="readingTaskState < 2" type="primary" size="small" @click="handleConfirm">{{
$t('common:button:submit') }}</el-button>
</div>
</div>
<div style="flex: 1">
<el-table
ref="reportList"
v-adaptive="{bottomOffset:0}"
:data="taskQuestions"
v-if="taskQuestions.length > 0"
row-key="Id"
border
default-expand-all
height="100"
:tree-props="{children: 'Childrens', hasChildren: 'hasChildren'}"
size="mini"
>
<el-table-column
prop=""
label=""
show-overflow-tooltip
width="350px"
>
<el-table ref="reportList" v-adaptive="{ bottomOffset: 0 }" :data="taskQuestions"
v-if="taskQuestions.length > 0" row-key="Id" border default-expand-all height="100"
:tree-props="{ children: 'Childrens', hasChildren: 'hasChildren' }" size="mini">
<el-table-column prop="" label="" show-overflow-tooltip width="350px">
<template slot-scope="scope">
<span v-if="scope.row.QuestionName">{{ scope.row.BlindName ? scope.row.QuestionName : scope.row.QuestionName }}</span>
<span
v-else
style="font-weight: bold;font-size: 16px;color: #f44336;"
>
<span v-if="scope.row.QuestionName">{{ scope.row.BlindName ? scope.row.QuestionName :
scope.row.QuestionName }}</span>
<span v-else style="font-weight: bold;font-size: 16px;color: #f44336;">
{{ scope.row.GroupName }}
</span>
</template>
</el-table-column>
<el-table-column
v-for="task in visitTaskList"
:key="task.VisitTaskId"
prop="date"
show-overflow-tooltip
width="200px"
>
<el-table-column v-for="task in visitTaskList" :key="task.VisitTaskId" prop="date" show-overflow-tooltip
width="200px">
<template slot="header">
<div v-if="task.IsCurrentTask">
{{ task.BlindName }}
@@ -72,181 +45,177 @@
<span class="el-icon-view"></span>
</el-button>
</div>
<!-- <div v-if="task.LatestScanDate">-->
<!-- {{ task.LatestScanDate.split(' ')[0] }}-->
<!-- </div>-->
<!-- <div v-if="task.LatestScanDate">-->
<!-- {{ task.LatestScanDate.split(' ')[0] }}-->
<!-- </div>-->
<!-- {{ `(影像点击跳转)` }} -->
<!-- {{ $t('trials:readingReport:button:jump') }}-->
</div>
</template>
<template slot-scope="scope">
<template v-if="readingTaskState<2 && task.VisitTaskId === visitTaskId && (scope.row.Type==='input' || scope.row.Type==='number' || scope.row.Type==='select' || scope.row.Type==='textarea' || scope.row.Type==='radio' || scope.row.Type === 'class')">
<template
v-if="readingTaskState < 2 && task.VisitTaskId === visitTaskId && (scope.row.Type === 'input' || scope.row.Type === 'number' || scope.row.Type === 'select' || scope.row.Type === 'textarea' || scope.row.Type === 'radio' || scope.row.Type === 'class')">
<template>
<!-- 输入框 -->
<div>
<template v-if="!((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)">
<template
v-if="!((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)">
</template>
<el-input
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && (scope.row.Type==='input' || scope.row.Type==='textarea') && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && (scope.row.Type === 'input' || scope.row.Type === 'textarea') && !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]"
size="mini"
/>
<span v-else-if="questionForm[scope.row.QuestionId] instanceof Array && (scope.row.Type==='input' || scope.row.Type==='textarea')">
{{questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]}}
size="mini" />
<span
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && (scope.row.Type === 'input' || scope.row.Type === 'textarea')">
{{ questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId] }}
</span>
<el-input
v-else-if="(scope.row.Type==='input' || scope.row.Type==='textarea') && !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]"
size="mini"
/>
<span v-else-if="scope.row.Type==='input' || scope.row.Type==='textarea'">
{{questionForm[scope.row.QuestionId]}}
v-else-if="(scope.row.Type === 'input' || scope.row.Type === 'textarea') && !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]" size="mini" />
<span v-else-if="scope.row.Type === 'input' || scope.row.Type === 'textarea'">
{{ questionForm[scope.row.QuestionId] }}
</span>
<el-select
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && (scope.row.Type==='select' || scope.row.Type==='radio') && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && (scope.row.Type === 'select' || scope.row.Type === 'radio') && !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]"
size="mini"
clearable
>
size="mini" clearable>
<template>
<el-option
v-for="val in scope.row.TypeValue.split('|')"
:key="val"
:label="val.trim()"
:value="val.trim()"
/>
<el-option v-for="val in scope.row.TypeValue.split('|')" :key="val" :label="val.trim()"
:value="val.trim()" />
</template>
</el-select>
<span v-else-if="questionForm[scope.row.QuestionId] instanceof Array && scope.row.Type==='select' || scope.row.Type==='radio'">
{{questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]}}
<span
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && scope.row.Type === 'select' || scope.row.Type === 'radio'">
{{ questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId] }}
</span>
<el-select
v-else-if="(scope.row.Type==='select' || scope.row.Type==='radio') && !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]"
size="mini"
clearable
>
v-else-if="(scope.row.Type === 'select' || scope.row.Type === 'radio' || (scope.row.Type === 'number' && scope.row.TypeValue)) && !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]" size="mini" clearable
@focus="() => { questionId = scope.row.QuestionId }">
<template>
<el-option
v-for="val in scope.row.TypeValue.split('|')"
:key="val"
:label="val.trim()"
:value="val.trim()"
/>
<el-option v-for="val in scope.row.TypeValue.split('|')" :key="val" :label="val.trim()"
:value="val.trim()" />
</template>
</el-select>
<span v-else-if="scope.row.Type==='select' || scope.row.Type==='radio'">
{{questionForm[scope.row.QuestionId]}}
<span v-else-if="scope.row.Type === 'select' || scope.row.Type === 'radio'">
{{ questionForm[scope.row.QuestionId] }}
</span>
<span v-else-if="questionForm[scope.row.QuestionId] instanceof Array && scope.row.Type==='class'">
{{questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]}}
<span v-else-if="questionForm[scope.row.QuestionId] instanceof Array && scope.row.Type === 'class'">
{{ questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId] }}
</span>
<span v-else-if="scope.row.Type==='class'">
{{questionForm[scope.row.QuestionId]}}
<span v-else-if="scope.row.Type === 'class'">
{{ questionForm[scope.row.QuestionId] }}
</span>
<el-input
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]"
:disabled="scope.row.DataSource === 1"
@blur="value=parseFloat(value).toFixed(digitPlaces)"
:disabled="scope.row.DataSource === 1" @blur="value = parseFloat(value).toFixed(digitPlaces)"
@input="limitInput($event, questionForm[scope.row.QuestionId][scope.row.xfIndex], scope.row.TableQuestionId)"
size="mini"
@focus="() => {questionId = scope.row.QuestionId}"
>
<template slot="append" v-if="scope.row.Unit !== 0">{{scope.row.Unit !== 4 ? $fd('ValueUnit', scope.row.Unit) : scope.row.CustomUnit}}</template>
size="mini" @focus="() => { questionId = scope.row.QuestionId }">
<template slot="append" v-if="scope.row.Unit !== 0">{{ scope.row.Unit !== 4 ? $fd('ValueUnit',
scope.row.Unit) : scope.row.CustomUnit }}</template>
<template slot="append" v-else-if="scope.row.ValueType === 2">%</template>
</el-input>
<span v-else-if="questionForm[scope.row.QuestionId] instanceof Array && scope.row.Type==='number' && (scope.row.xfIndex || scope.row.xfIndex === 0)">
<span
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && scope.row.Type === 'number' && (scope.row.xfIndex || scope.row.xfIndex === 0)">
<template v-if="(scope.row.ValueType === 0 || scope.row.ValueType === 1) && scope.row.Unit">
{{ isNaN(parseInt(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]))? questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]:`${questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]} ${scope.row.Unit !== 4 ? $fd('ValueUnit',scope.row.Unit) : scope.row.CustomUnit}` }}
{{
isNaN(parseInt(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]))
?
questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId] :
`${questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]}
${scope.row.Unit !== 4 ? $fd('ValueUnit', scope.row.Unit) : scope.row.CustomUnit}` }}
</template>
<template v-else-if="scope.row.ValueType === 2">
{{ isNaN(parseInt(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId])) ? questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]:`${questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]} %` }}
{{
isNaN(parseInt(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]))
?
questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId] :
`${questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]}
%` }}
</template>
<template v-else>
{{ isNaN(parseInt(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId])) ? questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]:`${questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]}` }}
{{
isNaN(parseInt(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]))
?
questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId] :
`${questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]}`
}}
</template>
</span>
<el-input
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"
@blur="value=parseFloat(value).toFixed(digitPlaces)"
@input="limitInput($event, questionForm, scope.row.QuestionId)"
size="mini"
@focus="() => {questionId = scope.row.QuestionId}"
>
<template slot="append" v-if="scope.row.Unit !== 0">{{scope.row.Unit !== 4 ? $fd('ValueUnit', scope.row.Unit) : scope.row.CustomUnit}}</template>
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"
@blur="value = parseFloat(value).toFixed(digitPlaces)"
@input="limitInput($event, questionForm, scope.row.QuestionId)" size="mini"
@focus="() => { questionId = scope.row.QuestionId }">
<template slot="append" v-if="scope.row.Unit !== 0">{{ scope.row.Unit !== 4 ? $fd('ValueUnit',
scope.row.Unit) : scope.row.CustomUnit }}</template>
<template slot="append" v-else-if="scope.row.ValueType === 2">%</template>
</el-input>
<span v-else-if="scope.row.Type==='number'">
<span v-else-if="scope.row.Type === 'number'">
<template v-if="(scope.row.ValueType === 0 || scope.row.ValueType === 1) && scope.row.Unit">
{{ isNaN(parseInt(questionForm[scope.row.QuestionId]))? questionForm[scope.row.QuestionId]:`${questionForm[scope.row.QuestionId]} ${scope.row.Unit !== 4 ? $fd('ValueUnit',scope.row.Unit) : scope.row.CustomUnit}` }}
{{ isNaN(parseInt(questionForm[scope.row.QuestionId])) ?
questionForm[scope.row.QuestionId] : `${questionForm[scope.row.QuestionId]} ${scope.row.Unit !==
4
? $fd('ValueUnit', scope.row.Unit) : scope.row.CustomUnit}` }}
</template>
<template v-else-if="scope.row.ValueType === 2">
{{ isNaN(parseInt(questionForm[scope.row.QuestionId])) ? questionForm[scope.row.QuestionId]:`${questionForm[scope.row.QuestionId]} %` }}
{{ isNaN(parseInt(questionForm[scope.row.QuestionId])) ?
questionForm[scope.row.QuestionId] : `${questionForm[scope.row.QuestionId]} %` }}
</template>
<template v-else>
{{ isNaN(parseInt(questionForm[scope.row.QuestionId])) ? questionForm[scope.row.QuestionId] : questionForm[scope.row.QuestionId]}}
{{ isNaN(parseInt(questionForm[scope.row.QuestionId])) ? questionForm[scope.row.QuestionId] :
questionForm[scope.row.QuestionId] }}
</template>
</span>
</div>
</template>
</template>
<template v-else-if="task.VisitTaskId === visitTaskId && scope.row.Type === 'upload'">
<customize-report-page-upload
v-if="scope.row.Type==='upload' && (scope.row.xfIndex || scope.row.xfIndex === 0)"
:visitTaskId="visitTaskId"
:question="scope.row"
:task="task"
:readingTaskState="readingTaskState"
:initUrl="questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]"
@setImageUrl="(url) => {setImageUrl(scope.row.QuestionId, scope.row.xfIndex, scope.row.TableQuestionId, url, scope.row.RowId)}"
></customize-report-page-upload>
<customize-report-page-upload
v-else-if="scope.row.Type==='upload'"
:visitTaskId="visitTaskId"
:question="scope.row"
:task="task"
:readingTaskState="readingTaskState"
:initUrl="questionForm[scope.row.QuestionId]"
@setImageUrl="(url) => {setImageUrl(scope.row.QuestionId, scope.row.xfIndex, scope.row.TableQuestionId, url)}"
></customize-report-page-upload>
<customize-report-page-upload
v-if="scope.row.Type === 'upload' && (scope.row.xfIndex || scope.row.xfIndex === 0)"
:visitTaskId="visitTaskId" :question="scope.row" :task="task" :readingTaskState="readingTaskState"
:initUrl="questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]"
@setImageUrl="(url) => { setImageUrl(scope.row.QuestionId, scope.row.xfIndex, scope.row.TableQuestionId, url, scope.row.RowId) }"></customize-report-page-upload>
<customize-report-page-upload v-else-if="scope.row.Type === 'upload'" :visitTaskId="visitTaskId"
:question="scope.row" :task="task" :readingTaskState="readingTaskState"
:initUrl="questionForm[scope.row.QuestionId]"
@setImageUrl="(url) => { setImageUrl(scope.row.QuestionId, scope.row.xfIndex, scope.row.TableQuestionId, url) }"></customize-report-page-upload>
</template>
<template v-else-if="scope.row.Type === 'upload'">
<customize-report-page-upload
v-if="scope.row.Type==='upload' && (scope.row.xfIndex || scope.row.xfIndex === 0)"
:visitTaskId="visitTaskId"
:question="scope.row"
:task="task"
:readingTaskState="readingTaskState"
:initUrl="scope.row.Answers[task.VisitTaskId]"
></customize-report-page-upload>
<customize-report-page-upload
v-else-if="scope.row.Type==='upload'"
:visitTaskId="visitTaskId"
:question="scope.row"
:task="task"
:readingTaskState="readingTaskState"
:initUrl="scope.row.Answers[task.VisitTaskId]"
></customize-report-page-upload>
v-if="scope.row.Type === 'upload' && (scope.row.xfIndex || scope.row.xfIndex === 0)"
:visitTaskId="visitTaskId" :question="scope.row" :task="task" :readingTaskState="readingTaskState"
:initUrl="scope.row.Answers[task.VisitTaskId]"></customize-report-page-upload>
<customize-report-page-upload v-else-if="scope.row.Type === 'upload'" :visitTaskId="visitTaskId"
:question="scope.row" :task="task" :readingTaskState="readingTaskState"
:initUrl="scope.row.Answers[task.VisitTaskId]"></customize-report-page-upload>
</template>
<template v-else-if="scope.row.QuestionType=== 22">
<template v-else-if="scope.row.QuestionType === 22">
{{ scope.row.Answers[task.VisitTaskId] === '-1' ? '未知' : scope.row.Answers[task.VisitTaskId] }}
</template>
<template v-else-if="scope.row.DictionaryCode">
{{ $fd(scope.row.DictionaryCode, scope.row.Answers[task.VisitTaskId]) }}
</template>
<template v-else-if="CriterionType === 10">
{{ isNaN(parseInt(scope.row.Answers[task.VisitTaskId]))?scope.row.Answers[task.VisitTaskId]:`${scope.row.Answers[task.VisitTaskId]}` }}
{{
isNaN(parseInt(scope.row.Answers[task.VisitTaskId])) ? scope.row.Answers[task.VisitTaskId] :
`${scope.row.Answers[task.VisitTaskId]}`
}}
</template>
<template v-else-if="!((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)">
<template
v-else-if="!((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)">
</template>
<template v-else-if="(scope.row.ValueType === 0 || scope.row.ValueType === 1) && scope.row.Unit">
{{ isNaN(parseInt(scope.row.Answers[task.VisitTaskId]))?scope.row.Answers[task.VisitTaskId]:`${scope.row.Answers[task.VisitTaskId]} ${scope.row.Unit !== 4 ? $fd('ValueUnit',scope.row.Unit) : scope.row.CustomUnit}` }}
{{
isNaN(parseInt(scope.row.Answers[task.VisitTaskId])) ? scope.row.Answers[task.VisitTaskId] :
`${scope.row.Answers[task.VisitTaskId]}
${scope.row.Unit !== 4 ? $fd('ValueUnit', scope.row.Unit) : scope.row.CustomUnit}` }}
</template>
<template v-else-if="scope.row.ValueType === 2">
{{ isNaN(parseInt(scope.row.Answers[task.VisitTaskId])) ? scope.row.Answers[task.VisitTaskId]:`${scope.row.Answers[task.VisitTaskId]} %` }}
{{ isNaN(parseInt(scope.row.Answers[task.VisitTaskId])) ?
scope.row.Answers[task.VisitTaskId] : `${scope.row.Answers[task.VisitTaskId]} %` }}
</template>
<template v-else-if="scope.row.Answers && scope.row.Answers.hasOwnProperty(task.VisitTaskId)">
{{ scope.row.Answers[task.VisitTaskId] }}
@@ -258,16 +227,11 @@
</el-card>
<!-- 签名框 -->
<el-dialog
v-if="signVisible"
:visible.sync="signVisible"
:close-on-click-modal="false"
width="600px"
custom-class="base-dialog-wrapper"
>
<el-dialog v-if="signVisible" :visible.sync="signVisible" :close-on-click-modal="false" width="600px"
custom-class="base-dialog-wrapper">
<div slot="title">
<span style="font-size:18px;">{{ $t('common:dialogTitle:sign') }}</span>
<span style="font-size:12px;margin-left:5px">{{ `(${$t('common:label:sign')}${ currentUser })` }}</span>
<span style="font-size:12px;margin-left:5px">{{ `(${$t('common:label:sign')}${currentUser})` }}</span>
</div>
<SignForm ref="signForm" :sign-code-enum="signCode" @closeDialog="closeSignDialog" />
</el-dialog>
@@ -380,7 +344,7 @@ export default {
list.forEach(v => {
if (v.QuestionId === questionId) {
return Object.assign({}, v.Answers)
} else if (v.Childrens.length > 0){
} else if (v.Childrens.length > 0) {
return this.getTagterAnswers(v.Childrens, questionId)
}
})
@@ -453,7 +417,7 @@ export default {
},
setChild(obj) {
obj.forEach((i, index) => {
if (i.Type !== 'group' && i.Type !== 'summary' && i.Id && i.Type !== 'table' && i.Type !== 'basicTable') {
if (i.Type !== 'group' && i.Type !== 'summary' && i.Id && i.Type !== 'table' && i.Type !== 'basicTable') {
this.$set(this.questionForm, i.QuestionId, i.Answers[this.visitTaskId])
}
if (i.Type === 'table' || i.Type === 'basicTable') {
@@ -463,7 +427,7 @@ export default {
if (i.Type === 'number') {
this.$set(this.questionForm, i.QuestionId, i.Answers[this.visitTaskId] === '' ? parseFloat(0).toFixed(this.digitPlaces) : i.Answers[this.visitTaskId])
}
if (i.Childrens && i.Childrens.length > 0 && i.Type !== 'table' && i.Type !== 'basicTable') {
if (i.Childrens && i.Childrens.length > 0 && i.Type !== 'table' && i.Type !== 'basicTable') {
this.setChild(i.Childrens)
}
})
@@ -479,38 +443,58 @@ export default {
})
},
logic(rules, num = 0) {
let isNE = false
try {
if (rules.CalculateQuestionList.length === 0) {
return false
}
let dataArr = []
rules.CalculateQuestionList.forEach((o, i) => {
if (this.questionForm[o.TableQuestionId] === 'NE') {
isNE = true
}
if (i === 0) {
if (rules.CustomCalculateMark > 4) {
switch (rules.CustomCalculateMark) {
case 5:
this.questionForm[o.QuestionId].forEach((q, qi) => {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId])
} else {
num *= parseFloat(q[o.TableQuestionId])
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId])
} else {
num *= parseFloat(q[o.TableQuestionId])
}
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
}
})
break;
case 6:
this.questionForm[o.QuestionId].forEach((q, qi) => {
if (qi === 0) {
num = isNaN(parseFloat(q[o.TableQuestionId])) ? null : parseFloat(q[o.TableQuestionId])
} else {
num += isNaN(parseFloat(q[o.TableQuestionId])) ? null : parseFloat(q[o.TableQuestionId])
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
if (qi === 0) {
num = isNaN(parseFloat(q[o.TableQuestionId])) ? null : parseFloat(q[o.TableQuestionId])
} else {
num += isNaN(parseFloat(q[o.TableQuestionId])) ? null : parseFloat(q[o.TableQuestionId])
}
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
}
})
break;
case 7:
this.questionForm[o.QuestionId].forEach((q, qi) => {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId])
} else {
num += parseFloat(q[o.TableQuestionId])
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId])
} else {
num += parseFloat(q[o.TableQuestionId])
}
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
}
})
num = this.questionForm[o.QuestionId].length === 0 ? 0 : num / this.questionForm[o.QuestionId].length
@@ -518,42 +502,97 @@ export default {
case 8:
var arr = []
this.questionForm[o.QuestionId].forEach(q => {
arr.push(q[o.TableQuestionId])
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
arr.push(q[o.TableQuestionId])
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
}
})
num = arr.length === 0 ? 0 : Math.max(...arr)
break;
case 9:
var arr = []
this.questionForm[o.QuestionId].forEach(q => {
arr.push(q[o.TableQuestionId])
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
arr.push(q[o.TableQuestionId])
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
}
})
num = arr.length === 0 ? 0 : Math.min(...arr)
break;
}
} else {
num = parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num = parseFloat(this.questionForm[o.TableQuestionId])
}
}
} else {
switch (rules.CustomCalculateMark) {
case 1:
num += parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num += parseFloat(this.questionForm[o.TableQuestionId])
}
break;
case 2:
num -= parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num -= parseFloat(this.questionForm[o.TableQuestionId])
}
break;
case 3:
num *= parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num *= parseFloat(this.questionForm[o.TableQuestionId])
}
break;
case 4:
num /= parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num /= parseFloat(this.questionForm[o.TableQuestionId])
}
// num /= parseFloat(this.questionForm[o.TableQuestionId])
break;
case 10:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
}
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => {
return acc + (typeof curr === "number" ? curr : 0);
}, 0) / dataArr.length;
break;
case 11:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
}
num = Math.max(...dataArr);
break;
case 12:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
}
num = Math.min(...dataArr);
break;
case 13:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
}
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => acc && curr) ? 1 : 0
break;
case 14:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
}
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => acc || curr, 0) ? 1 : 0;
break;
}
}
})
} catch (e) {
console.log(e)
}
if (isNE) {
return 'NE'
}
if (rules.ValueType === 2) {
num = num * 100
}
@@ -586,12 +625,12 @@ export default {
setScrollTop(a) {
setTimeout(() => {
this.$nextTick(() => {
if(this.$refs.reportList){
if (this.$refs.reportList) {
this.$refs.reportList.bodyWrapper.scrollTop = this.$refs.reportList.bodyWrapper.scrollHeight
this.$refs.reportList.bodyWrapper.scrollTop = this.$refs.reportList.bodyWrapper.scrollHeight
}
})
},50)
}, 50)
},
getQuestions(questions, isNTFilterLength, lesionType, isLymphNodes) {
const arr = []
@@ -769,16 +808,16 @@ export default {
type: 'warning',
distinguishCancelAndClose: true
})
.then(() => {
window.location.reload()
})
.catch(action => {
.then(() => {
window.location.reload()
})
.catch(action => {
})
})
}
}
this.loading = false
} catch(e) {
} catch (e) {
this.loading = false
if (this.$refs['signForm'] && this.$refs['signForm'].btnLoading) {
this.$refs['signForm'].btnLoading = false
@@ -813,7 +852,7 @@ export default {
questionId: k,
answer: v[o],
tableQuestionId: o,
rowId: v[o+'_RowId']
rowId: v[o + '_RowId']
})
}
})
@@ -867,27 +906,32 @@ export default {
}
</script>
<style lang="scss" scoped>
.report-wrapper{
.report-wrapper {
height: 100%;
// background-color: #fff;
background-color: #000;
::-webkit-scrollbar {
width: 7px;
height: 7px;
}
::-webkit-scrollbar-thumb {
border-radius: 10px;
background: #d0d0d0;
}
.report-header{
.report-header {
display: flex;
}
.el-card{
.el-card {
background-color: #000;
color: #ffffff;
border:none;
border: none;
}
// ::v-deep .el-table__cell{
// background-color: #000;
// color: #ffffff;
@@ -901,51 +945,62 @@ export default {
// color: #ffffff;
// }
::v-deep .el-table, .el-table__expanded-cell {
::v-deep .el-table,
.el-table__expanded-cell {
background-color: #000;
color: #fff;
border-color:#444444;
border-color: #444444;
}
::v-deep .el-table th, .el-table tr {
::v-deep .el-table th,
.el-table tr {
background-color: #000;
color: #fff;
border-color:#444444;
border-color: #444444;
}
::v-deep .el-table__body tr > td{
background-color:#000 !important;
::v-deep .el-table__body tr>td {
background-color: #000 !important;
color: #fff;
border-color:#444444;
border-color: #444444;
}
::v-deep .el-table__body tr:hover > td{
background-color:#858282 !important;
::v-deep .el-table__body tr:hover>td {
background-color: #858282 !important;
color: #fff;
border-color:#444444;
border-color: #444444;
}
::v-deep .el-table--border th.gutter:last-of-type{
::v-deep .el-table--border th.gutter:last-of-type {
border: none;
}
::v-deep .el-card__header{
::v-deep .el-card__header {
border: none;
padding: 10px;
}
::v-deep .el-upload-list--picture-card .el-upload-list__item{
::v-deep .el-upload-list--picture-card .el-upload-list__item {
width: 30px;
height: 30px;
}
::v-deep .el-upload--picture-card{
::v-deep .el-upload--picture-card {
width: 30px;
height: 30px;
line-height: 40px;
}
}
::v-deep .el-switch__label{
color:#fff;
::v-deep .el-switch__label {
color: #fff;
}
::v-deep .el-switch__label.is-active{
::v-deep .el-switch__label.is-active {
color: #428bca;
}
.uploadWrapper{
.uploadWrapper {
display: flex;
flex-direction: column;
align-items: flex-start;
@@ -15,6 +15,7 @@
</div>
<el-form v-if="taskInfo && rerender" ref="questions" size="small" :model="questionForm" class="ecrf-form">
<template v-if="rerender">
<<<<<<< HEAD
<QuestionFormItem v-for="question of questions" :key="question.Id" :visit-task-id="visitTaskId"
:question="question" :question-form="questionForm" :reading-task-state="readingTaskState"
:criterion-id="criterionId" :calculation-list="calculationList"
@@ -22,6 +23,22 @@
:is-baseline="isBaseLineTask" @resetFormItemData="resetFormItemData" @setFormItemData="setFormItemData"
@getQuestions="getQuestions" @operateImageMarker="operateImageMarker"
@unBindAnnotationToQuestion="unBindAnnotationToQuestion" />
=======
<QuestionFormItem
v-for="question of questions"
:key="question.Id"
:visit-task-id="visitTaskId"
:question="question"
:question-form="questionForm"
:reading-task-state="readingTaskState"
:criterion-id="criterionId"
:calculation-list="calculationList"
:is-baseline="isBaseLineTask"
@resetFormItemData="resetFormItemData"
@setFormItemData="setFormItemData"
@getQuestions="getQuestions"
/>
>>>>>>> uat
</template>
<el-form-item v-if="readingTaskState < 2">
@@ -116,8 +133,14 @@ export default {
this.visitTaskId = this.visitInfo.VisitTaskId
this.taskInfo = JSON.parse(localStorage.getItem('taskInfo'))
this.isBaseLineTask = this.taskInfo.IsBaseLine
<<<<<<< HEAD
this.criterionId = this.taskInfo.TrialReadingCriterionId
const digitPlaces = Number(localStorage.getItem('digitPlaces'))
=======
this.criterionType = this.taskInfo.CriterionType
this.criterionId = this.taskInfo.TrialReadingCriterionId
var digitPlaces = Number(localStorage.getItem('digitPlaces'))
>>>>>>> uat
this.digitPlaces = digitPlaces === -1 ? this.digitPlaces : digitPlaces
this.getQuestionCalculateRelation()
this.getQuestions(true)
@@ -430,38 +430,59 @@ export default {
})
},
logic(rules, num = 0) {
let isNE = false
try {
if (rules.CalculateQuestionList.length === 0) {
return false
}
let dataArr = []
rules.CalculateQuestionList.forEach((o, i) => {
if (this.questionForm[o.TableQuestionId] === 'NE') {
isNE = true
}
if (i === 0) {
if (rules.CustomCalculateMark > 4) {
switch (rules.CustomCalculateMark) {
case 5:
this.questionForm[o.QuestionId].forEach((q, qi) => {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId])
} else {
num *= parseFloat(q[o.TableQuestionId])
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId])
} else {
num *= parseFloat(q[o.TableQuestionId])
}
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
}
})
break
case 6:
this.questionForm[o.QuestionId].forEach((q, qi) => {
if (qi === 0) {
num = isNaN(parseFloat(q[o.TableQuestionId])) ? null : parseFloat(q[o.TableQuestionId])
} else {
num += isNaN(parseFloat(q[o.TableQuestionId])) ? null : parseFloat(q[o.TableQuestionId])
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
if (qi === 0) {
num = isNaN(parseFloat(q[o.TableQuestionId])) ? null : parseFloat(q[o.TableQuestionId])
} else {
num += isNaN(parseFloat(q[o.TableQuestionId])) ? null : parseFloat(q[o.TableQuestionId])
}
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
}
})
break
case 7:
this.questionForm[o.QuestionId].forEach((q, qi) => {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId])
} else {
num += parseFloat(q[o.TableQuestionId])
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId])
} else {
num += parseFloat(q[o.TableQuestionId])
}
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
}
})
num = this.questionForm[o.QuestionId].length === 0 ? 0 : num / this.questionForm[o.QuestionId].length
@@ -469,42 +490,103 @@ export default {
case 8:
const arr = []
this.questionForm[o.QuestionId].forEach(q => {
arr.push(q[o.TableQuestionId])
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
arr.push(q[o.TableQuestionId])
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
}
})
num = arr.length === 0 ? 0 : Math.max(...arr)
break
case 9:
const arr1 = []
this.questionForm[o.QuestionId].forEach(q => {
arr1.push(q[o.TableQuestionId])
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
arr.push(q[o.TableQuestionId])
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
}
})
num = arr1.length === 0 ? 0 : Math.min(...arr1)
break
}
} else {
num = parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num = parseFloat(this.questionForm[o.TableQuestionId])
}
}
} else {
switch (rules.CustomCalculateMark) {
case 1:
num += parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num += parseFloat(this.questionForm[o.TableQuestionId])
}
break
case 2:
num -= parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num -= parseFloat(this.questionForm[o.TableQuestionId])
}
break
case 3:
num *= parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num *= parseFloat(this.questionForm[o.TableQuestionId])
}
break
case 4:
num /= parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num /= parseFloat(this.questionForm[o.TableQuestionId])
}
// num /= parseFloat(this.questionForm[o.TableQuestionId])
break
case 10:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
}
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => {
return acc + (typeof curr === "number" ? curr : 0);
}, 0) / dataArr.length;
break;
case 11:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
}
num = Math.max(...dataArr);
break;
case 12:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
}
num = Math.min(...dataArr);
break;
case 13:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
}
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => acc && curr) ? 1 : 0
break;
case 14:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
}
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => acc || curr, 0) ? 1 : 0;
break;
}
}
})
} catch (e) {
console.log(e)
}
if (isNE) {
return 'NE'
}
if (rules.ValueType === 2) {
num = num * 100
}
@@ -161,7 +161,7 @@ export default {
this.classArr.push({ triggerId: v.ClassifyQuestionId, classId: v.Id, classifyAlgorithms: v.ClassifyAlgorithms, classifyType: v.ClassifyType })
}
if (v.Type === 'number') {
this.$set(this.questionForm, v.Id, v.Answer === '' ? '' : parseFloat(v.Answer).toFixed(this.digitPlaces))
this.$set(this.questionForm, v.Id, isNaN(parseFloat(v.Answer)) ? v.Answer : parseFloat(v.Answer).toFixed(this.digitPlaces))
}
if (v.Childrens.length > 0) {
this.setChild(v.Childrens)
@@ -184,7 +184,7 @@ export default {
i.TableQuestions.Questions.forEach(o => {
if (o.Type === 'number') {
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(this.digitPlaces) : null)
this.$set(i.TableQuestions.Answers[index], o.Id, !isNaN(parseFloat(i.TableQuestions.Answers[index][o.Id])) ? parseFloat(i.TableQuestions.Answers[index][o.Id]).toFixed(this.digitPlaces) : i.TableQuestions.Answers[index][o.Id])
})
}
})
@@ -194,7 +194,7 @@ export default {
this.classArr.push({ triggerId: i.ClassifyQuestionId, classId: i.Id, classifyAlgorithms: i.ClassifyAlgorithms, classifyType: i.ClassifyType })
}
if (i.Type === 'number') {
this.$set(this.questionForm, i.Id, i.Answer === '' ? '' : parseFloat(i.Answer).toFixed(this.digitPlaces))
this.$set(this.questionForm, i.Id, isNaN(parseFloat(i.Answer)) ? i.Answer : parseFloat(i.Answer).toFixed(this.digitPlaces))
}
if (i.Childrens && i.Childrens.length > 0) {
this.setChild(i.Childrens)
@@ -4,56 +4,33 @@
<div slot="header" class="clearfix report-header">
<h3 style="margin:0;padding:0;">{{ $t('trials:readingReport:title:eicrf') }}</h3>
<div style="margin-left:auto">
<el-button
v-if="readingTaskState<2"
type="primary"
size="small"
@click="skipTask"
>
<el-button v-if="readingTaskState < 2" type="primary" size="small" @click="skipTask">
<!-- 跳过 -->
{{ $t('trials:readingReport:button:skip') }}
</el-button>
<el-button v-if="readingTaskState<2" type="primary" size="small" @click="getReportInfo">{{ $t('trials:readingReport:button:refresh') }}</el-button>
<el-button v-if="readingTaskState<2" type="primary" size="small" @click="handleSave(true)">{{ $t('common:button:save') }}</el-button>
<el-button v-if="readingTaskState<2" type="primary" size="small" @click="handleConfirm">{{ $t('common:button:submit') }}</el-button>
<el-button v-if="readingTaskState < 2" type="primary" size="small" @click="getReportInfo">{{
$t('trials:readingReport:button:refresh') }}</el-button>
<el-button v-if="readingTaskState < 2" type="primary" size="small" @click="handleSave(true)">{{
$t('common:button:save') }}</el-button>
<el-button v-if="readingTaskState < 2" type="primary" size="small" @click="handleConfirm">{{
$t('common:button:submit') }}</el-button>
</div>
</div>
<div style="flex: 1">
<el-table
v-if="taskQuestions.length > 0"
ref="reportList"
v-adaptive="{bottomOffset:0}"
:data="taskQuestions"
row-key="Id"
border
default-expand-all
height="100"
:tree-props="{children: 'Childrens', hasChildren: 'hasChildren'}"
size="mini"
>
<el-table-column
prop=""
label=""
show-overflow-tooltip
width="350px"
>
<el-table v-if="taskQuestions.length > 0" ref="reportList" v-adaptive="{ bottomOffset: 0 }"
:data="taskQuestions" row-key="Id" border default-expand-all height="100"
:tree-props="{ children: 'Childrens', hasChildren: 'hasChildren' }" size="mini">
<el-table-column prop="" label="" show-overflow-tooltip width="350px">
<template slot-scope="scope">
<span v-if="scope.row.QuestionName">{{ scope.row.BlindName ? scope.row.QuestionName : scope.row.QuestionName }}</span>
<span
v-else
style="font-weight: bold;font-size: 16px;color: #f44336;"
>
<span v-if="scope.row.QuestionName">{{ scope.row.BlindName ? scope.row.QuestionName :
scope.row.QuestionName }}</span>
<span v-else style="font-weight: bold;font-size: 16px;color: #f44336;">
{{ scope.row.GroupName }}
</span>
</template>
</el-table-column>
<el-table-column
v-for="task in visitTaskList"
:key="task.VisitTaskId"
prop="date"
show-overflow-tooltip
width="200px"
>
<el-table-column v-for="task in visitTaskList" :key="task.VisitTaskId" prop="date" show-overflow-tooltip
width="200px">
<template slot="header">
<div v-if="task.IsCurrentTask">
{{ task.BlindName }}
@@ -68,111 +45,115 @@
</div>
</template>
<template slot-scope="scope">
<template v-if="readingTaskState<2 && task.VisitTaskId === visitTaskId && (scope.row.Type==='input' || scope.row.Type==='number' || scope.row.Type==='select' || scope.row.Type==='textarea' || scope.row.Type==='radio')">
<template
v-if="readingTaskState < 2 && task.VisitTaskId === visitTaskId && (scope.row.Type === 'input' || scope.row.Type === 'number' || scope.row.Type === 'select' || scope.row.Type === 'textarea' || scope.row.Type === 'radio')">
<!-- 输入框 -->
<div>
<template v-if="!((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)" />
<template
v-if="!((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)" />
<el-input
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && (scope.row.Type==='input' || scope.row.Type==='textarea') && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && (scope.row.Type === 'input' || scope.row.Type === 'textarea') && !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]"
size="mini"
/>
<span v-else-if="questionForm[scope.row.QuestionId] instanceof Array && (scope.row.Type==='input' || scope.row.Type==='textarea')">
size="mini" />
<span
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && (scope.row.Type === 'input' || scope.row.Type === 'textarea')">
{{ questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId] }}
</span>
<el-input
v-else-if="(scope.row.Type==='input' || scope.row.Type==='textarea') && !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]"
size="mini"
/>
<span v-else-if="scope.row.Type==='input' || scope.row.Type==='textarea'">
v-else-if="(scope.row.Type === 'input' || scope.row.Type === 'textarea') && !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]" size="mini" />
<span v-else-if="scope.row.Type === 'input' || scope.row.Type === 'textarea'">
{{ questionForm[scope.row.QuestionId] }}
</span>
<el-select
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && (scope.row.Type==='select' || scope.row.Type==='radio') && !scope.row.IsShowInDicom && ((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)"
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && (scope.row.Type === 'select' || scope.row.Type === 'radio') && !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]"
size="mini"
clearable
>
size="mini" clearable>
<template>
<el-option
v-for="val in scope.row.TypeValue.split('|')"
:key="val"
:label="val"
:value="val"
/>
<el-option v-for="val in scope.row.TypeValue.split('|')" :key="val" :label="val" :value="val" />
</template>
</el-select>
<span v-else-if="questionForm[scope.row.QuestionId] instanceof Array && scope.row.Type==='select'">
<span v-else-if="questionForm[scope.row.QuestionId] instanceof Array && scope.row.Type === 'select'">
{{ questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId] }}
</span>
<el-select
v-else-if="(scope.row.Type==='select' || scope.row.Type==='radio' || (scope.row.Type==='number' && scope.row.TypeValue)) && !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]"
size="mini"
:clearable="scope.row.Type!=='number'"
@focus="() => {questionId = scope.row.QuestionId}"
>
v-else-if="(scope.row.Type === 'select' || scope.row.Type === 'radio' || (scope.row.Type === 'number' && scope.row.TypeValue)) && !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]" size="mini" clearable
@focus="() => { questionId = scope.row.QuestionId }">
<template>
<el-option
v-for="val in scope.row.TypeValue.split('|')"
:key="val"
:label="val"
:value="val"
/>
<el-option v-for="val in scope.row.TypeValue.split('|')" :key="val" :label="val" :value="val" />
</template>
</el-select>
<span v-else-if="scope.row.Type==='select' || scope.row.Type==='radio'">
<span v-else-if="scope.row.Type === 'select' || scope.row.Type === 'radio'">
{{ questionForm[scope.row.QuestionId] }}
</span>
<el-input
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]"
:disabled="scope.row.DataSource === 1"
size="mini"
:disabled="scope.row.DataSource === 1" size="mini"
@blur="limitBlur(questionForm[scope.row.QuestionId][scope.row.xfIndex], scope.row.TableQuestionId, scope.row.ValueType)"
@focus="() => {questionId = scope.row.QuestionId}"
>
<template v-if="scope.row.Unit !== 0" slot="append">{{ scope.row.Unit !== 4 ? $fd('ValueUnit', scope.row.Unit) : scope.row.CustomUnit }}</template>
@focus="() => { questionId = scope.row.QuestionId }">
<template v-if="scope.row.Unit !== 0" slot="append">{{ scope.row.Unit !== 4 ? $fd('ValueUnit',
scope.row.Unit) : scope.row.CustomUnit }}</template>
<template v-else-if="scope.row.ValueType === 2" slot="append">%</template>
</el-input>
<span v-else-if="questionForm[scope.row.QuestionId] instanceof Array && scope.row.Type==='number' && (scope.row.xfIndex || scope.row.xfIndex === 0)">
<span
v-else-if="questionForm[scope.row.QuestionId] instanceof Array && scope.row.Type === 'number' && (scope.row.xfIndex || scope.row.xfIndex === 0)">
<template v-if="(scope.row.ValueType === 0 || scope.row.ValueType === 1) && scope.row.Unit">
{{ isNaN(parseInt(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]))? questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]:`${questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]} ${scope.row.Unit !== 4 ? $fd('ValueUnit',scope.row.Unit) : scope.row.CustomUnit}` }}
{{
isNaN(parseInt(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]))
?
questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId] :
`${questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]}
${scope.row.Unit !== 4 ? $fd('ValueUnit', scope.row.Unit) : scope.row.CustomUnit}` }}
</template>
<template v-else-if="scope.row.ValueType === 2">
{{ isNaN(parseInt(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId])) ? questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]:`${questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]} %` }}
{{
isNaN(parseInt(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]))
?
questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId] :
`${questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]}
%` }}
</template>
<template v-else>
{{ isNaN(parseInt(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId])) ? questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]:`${questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]}` }}
{{
isNaN(parseInt(questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]))
?
questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId] :
`${questionForm[scope.row.QuestionId][scope.row.xfIndex][scope.row.TableQuestionId]}`
}}
</template>
</span>
<el-input
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"
size="mini"
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" size="mini"
@blur="limitBlur(questionForm, scope.row.QuestionId, scope.row.ValueType)"
@focus="() => {questionId = scope.row.QuestionId}"
>
<template v-if="scope.row.Unit !== 0" slot="append">{{ scope.row.Unit !== 4 ? $fd('ValueUnit', scope.row.Unit) : scope.row.CustomUnit }}</template>
@focus="() => { questionId = scope.row.QuestionId }">
<template v-if="scope.row.Unit !== 0" slot="append">{{ scope.row.Unit !== 4 ? $fd('ValueUnit',
scope.row.Unit) : scope.row.CustomUnit }}</template>
<template v-else-if="scope.row.ValueType === 2" slot="append">%</template>
</el-input>
<span v-else-if="scope.row.Type==='number'">
<span v-else-if="scope.row.Type === 'number'">
<template v-if="(scope.row.ValueType === 0 || scope.row.ValueType === 1) && scope.row.Unit">
{{ isNaN(parseInt(questionForm[scope.row.QuestionId]))? questionForm[scope.row.QuestionId]:`${questionForm[scope.row.QuestionId]} ${scope.row.Unit !== 4 ? $fd('ValueUnit',scope.row.Unit) : scope.row.CustomUnit}` }}
{{ isNaN(parseInt(questionForm[scope.row.QuestionId])) ?
questionForm[scope.row.QuestionId] : `${questionForm[scope.row.QuestionId]} ${scope.row.Unit !== 4
?
$fd('ValueUnit', scope.row.Unit) : scope.row.CustomUnit}` }}
</template>
<template v-else-if="scope.row.ValueType === 2">
{{ isNaN(parseInt(questionForm[scope.row.QuestionId])) ? questionForm[scope.row.QuestionId]:`${questionForm[scope.row.QuestionId]} %` }}
{{ isNaN(parseInt(questionForm[scope.row.QuestionId])) ?
questionForm[scope.row.QuestionId] : `${questionForm[scope.row.QuestionId]} %` }}
</template>
<template v-else>
{{ isNaN(parseInt(questionForm[scope.row.QuestionId])) ? questionForm[scope.row.QuestionId] : questionForm[scope.row.QuestionId] }}
{{ isNaN(parseInt(questionForm[scope.row.QuestionId])) ? questionForm[scope.row.QuestionId] :
questionForm[scope.row.QuestionId] }}
</template>
</span>
</div>
</template>
<template v-else-if="scope.row.Type==='upload' && scope.row.Answers[task.VisitTaskId]">
<span v-for="(url,index) in scope.row.Answers[task.VisitTaskId].split('|')" :key="url" style="margin-left: 5px;">
<template v-else-if="scope.row.Type === 'upload' && scope.row.Answers[task.VisitTaskId]">
<span v-for="(url, index) in scope.row.Answers[task.VisitTaskId].split('|')" :key="url"
style="margin-left: 5px;">
<el-button v-if="scope.row.Answers[task.VisitTaskId]" type="text" @click="preview(url)">
{{ `${$t('trials:noneDicom:title:attachment')}${index + 1}` }}
</el-button>
@@ -182,14 +163,22 @@
{{ $fd(scope.row.DictionaryCode, scope.row.Answers[task.VisitTaskId]) }}
</template>
<template v-else-if="criterionType === 10">
{{ isNaN(parseInt(scope.row.Answers[task.VisitTaskId]))?scope.row.Answers[task.VisitTaskId]:`${scope.row.Answers[task.VisitTaskId]}` }}
{{
isNaN(parseInt(scope.row.Answers[task.VisitTaskId])) ? scope.row.Answers[task.VisitTaskId] :
`${scope.row.Answers[task.VisitTaskId]}`
}}
</template>
<template v-else-if="!((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)" />
<template
v-else-if="!((task.IsBaseLine && scope.row.LimitEdit === 1) || (!task.IsBaseLine && scope.row.LimitEdit === 2) || scope.row.LimitEdit === 0)" />
<template v-else-if="(scope.row.ValueType === 0 || scope.row.ValueType === 1) && scope.row.Unit">
{{ isNaN(parseInt(scope.row.Answers[task.VisitTaskId]))?scope.row.Answers[task.VisitTaskId]:`${scope.row.Answers[task.VisitTaskId]} ${scope.row.Unit !== 4 ? $fd('ValueUnit',scope.row.Unit) : scope.row.CustomUnit}` }}
{{
isNaN(parseInt(scope.row.Answers[task.VisitTaskId])) ? scope.row.Answers[task.VisitTaskId] :
`${scope.row.Answers[task.VisitTaskId]}
${scope.row.Unit !== 4 ? $fd('ValueUnit', scope.row.Unit) : scope.row.CustomUnit}` }}
</template>
<template v-else-if="scope.row.ValueType === 2">
{{ isNaN(parseInt(scope.row.Answers[task.VisitTaskId])) ? scope.row.Answers[task.VisitTaskId]:`${scope.row.Answers[task.VisitTaskId]} %` }}
{{ isNaN(parseInt(scope.row.Answers[task.VisitTaskId])) ?
scope.row.Answers[task.VisitTaskId] : `${scope.row.Answers[task.VisitTaskId]} %` }}
</template>
<template v-else-if="scope.row.Answers && scope.row.Answers.hasOwnProperty(task.VisitTaskId)">
{{ scope.row.Answers[task.VisitTaskId] }}
@@ -201,38 +190,20 @@
</el-card>
<!-- 签名框 -->
<el-dialog
v-if="signVisible"
:visible.sync="signVisible"
:close-on-click-modal="false"
width="600px"
custom-class="base-dialog-wrapper"
>
<el-dialog v-if="signVisible" :visible.sync="signVisible" :close-on-click-modal="false" width="600px"
custom-class="base-dialog-wrapper">
<div slot="title">
<span style="font-size:18px;">{{ $t('common:dialogTitle:sign') }}</span>
<span style="font-size:12px;margin-left:5px">{{ `(${$t('common:label:sign')}${ currentUser })` }}</span>
<span style="font-size:12px;margin-left:5px">{{ `(${$t('common:label:sign')}${currentUser})` }}</span>
</div>
<SignForm ref="signForm" :sign-code-enum="signCode" @closeDialog="closeSignDialog" />
</el-dialog>
<!-- 预览文件 -->
<el-dialog
v-if="previewVisible"
:visible.sync="previewVisible"
:title="$t('common:button:preview')"
:fullscreen="true"
append-to-body
custom-class="base-dialog-wrapper"
>
<div
class="base-modal-body"
style="border: 2px solid #ccc; padding: 10px"
>
<PreviewFile
v-if="previewVisible"
:file-path="currentPath"
:file-type="currentType"
/>
<el-dialog v-if="previewVisible" :visible.sync="previewVisible" :title="$t('common:button:preview')"
:fullscreen="true" append-to-body custom-class="base-dialog-wrapper">
<div class="base-modal-body" style="border: 2px solid #ccc; padding: 10px">
<PreviewFile v-if="previewVisible" :file-path="currentPath" :file-type="currentType" />
</div>
</el-dialog>
</div>
@@ -397,7 +368,7 @@ export default {
if (v.Type === 'number') {
let val = null
if (v.ValueType === 0) {
val = v.Answers[this.visitTaskId] ? parseInt(v.Answers[this.visitTaskId]) : ''
val = !isNaN(parseFloat(v.Answers[this.visitTaskId])) ? parseInt(v.Answers[this.visitTaskId]) : v.Answers[this.visitTaskId]
} else if (v.ValueType === 3) {
val = v.Answers[this.visitTaskId]
} else {
@@ -423,7 +394,7 @@ export default {
if (i.Type === 'number') {
let val = null
if (i.ValueType === 0) {
val = i.Answers[this.visitTaskId] ? parseInt(i.Answers[this.visitTaskId]) : ''
val = !isNaN(parseFloat(i.Answers[this.visitTaskId])) ? parseInt(i.Answers[this.visitTaskId]) : i.Answers[this.visitTaskId]
} else if (i.ValueType === 3) {
val = i.Answers[this.visitTaskId]
} else {
@@ -454,15 +425,24 @@ export default {
}
let dataArr = []
rules.CalculateQuestionList.forEach((o, i) => {
if (this.questionForm[o.TableQuestionId] === 'NE') {
isNE = true
}
if (i === 0) {
if (rules.CustomCalculateMark > 4) {
switch (rules.CustomCalculateMark) {
case 5:
this.questionForm[o.QuestionId].forEach((q, qi) => {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId])
} else {
num *= parseFloat(q[o.TableQuestionId])
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId])
} else {
num *= parseFloat(q[o.TableQuestionId])
}
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
@@ -471,10 +451,16 @@ export default {
break
case 6:
this.questionForm[o.QuestionId].forEach((q, qi) => {
if (qi === 0) {
num = isNaN(parseFloat(q[o.TableQuestionId])) ? null : parseFloat(q[o.TableQuestionId])
} else {
num += isNaN(parseFloat(q[o.TableQuestionId])) ? null : parseFloat(q[o.TableQuestionId])
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
if (qi === 0) {
num = isNaN(parseFloat(q[o.TableQuestionId])) ? null : parseFloat(q[o.TableQuestionId])
} else {
num += isNaN(parseFloat(q[o.TableQuestionId])) ? null : parseFloat(q[o.TableQuestionId])
}
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
@@ -483,10 +469,16 @@ export default {
break
case 7:
this.questionForm[o.QuestionId].forEach((q, qi) => {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId])
} else {
num += parseFloat(q[o.TableQuestionId])
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId])
} else {
num += parseFloat(q[o.TableQuestionId])
}
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
@@ -497,7 +489,10 @@ export default {
case 8:
const arr = []
this.questionForm[o.QuestionId].forEach(q => {
arr.push(q[o.TableQuestionId])
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
arr.push(q[o.TableQuestionId])
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
}
@@ -507,28 +502,53 @@ export default {
case 9:
const arr1 = []
this.questionForm[o.QuestionId].forEach(q => {
arr1.push(q[o.TableQuestionId])
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
arr1.push(q[o.TableQuestionId])
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
}
})
num = arr1.length === 0 ? 0 : Math.min(...arr1)
break
case 12:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
}
if (this.questionForm[o.TableQuestionId] === 'NE') {
isNE = true
}
num = Math.min(...dataArr);
break;
case 10:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
}
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => {
return acc + (typeof curr === "number" ? curr : 0);
}, 0) / dataArr.length;
break;
case 11:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
}
num = dataArr.length > 0 ? Math.max(...dataArr) : 0;
break;
case 12:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
}
num = dataArr.length > 0 ? Math.min(...dataArr) : 0;
break;
case 13:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
}
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => acc && curr) ? 1 : 0
break;
case 14:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
}
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => acc || curr, 0) ? 1 : 0;
break;
}
} else {
num = parseFloat(this.questionForm[o.TableQuestionId])
if (this.questionForm[o.TableQuestionId] === 'NE') {
isNE = true
}
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num = parseFloat(this.questionForm[o.TableQuestionId])
}
}
} else {
if (this.questionForm[o.TableQuestionId] === 'NE') {
@@ -536,23 +556,61 @@ export default {
}
switch (rules.CustomCalculateMark) {
case 1:
num += parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num += parseFloat(this.questionForm[o.TableQuestionId])
}
break
case 2:
num -= parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num -= parseFloat(this.questionForm[o.TableQuestionId])
}
break
case 3:
num *= parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num *= parseFloat(this.questionForm[o.TableQuestionId])
}
break
case 4:
num /= parseFloat(this.questionForm[o.TableQuestionId])
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num /= parseFloat(this.questionForm[o.TableQuestionId])
}
// num /= parseFloat(this.questionForm[o.TableQuestionId])
break
case 10:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
}
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => {
return acc + (typeof curr === "number" ? curr : 0);
}, 0) / dataArr.length;
break;
case 11:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
}
num = dataArr.length > 0 ? Math.max(...dataArr) : 0;
break;
case 12:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
}
num = Math.min(...dataArr);
num = dataArr.length > 0 ? Math.min(...dataArr) : 0;
break;
case 13:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
}
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => acc && curr) ? 1 : 0
break;
case 14:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
dataArr.push(parseFloat(this.questionForm[o.TableQuestionId]))
}
num = dataArr.length === 0 ? 0 : dataArr.reduce((acc, curr) => acc || curr, 0) ? 1 : 0;
break;
}
}
@@ -603,7 +661,7 @@ export default {
if (item.Type === 'number') {
let val = null
if (item.ValueType === 0) {
val = parseInt(i.Answer)
val = !isNaN(parseFloat(i.Answer)) ? parseInt(i.Answer) : i.Answer
} else if (item.ValueType === 3) {
val = i.Answer
} else {
@@ -699,7 +757,7 @@ export default {
window.location.reload()
})
.catch(action => {
// changeURLStatic('visitTaskId', this.visitTaskId)
// changeURLStatic('visitTaskId', this.visitTaskId)
})
}
}
@@ -801,94 +859,116 @@ export default {
}
</script>
<style lang="scss" scoped>
.report-wrapper{
.report-wrapper {
height: 100%;
// background-color: #fff;
background-color: #000;
::-webkit-scrollbar {
width: 7px;
height: 7px;
}
::-webkit-scrollbar-thumb {
border-radius: 10px;
// background: #d0d0d0;
}
.report-header{
.report-header {
display: flex;
}
.el-card{
.el-card {
background-color: #000;
color: #ffffff;
border:none;
}
::v-deep .el-table--border th.gutter:last-of-type{
border: none;
}
::v-deep .el-table, .el-table__expanded-cell {
background-color: #000;
color: #fff;
border-color:#444444;
}
::v-deep .el-table th, .el-table tr {
background-color: #000;
color: #fff;
border-color:#444444;
}
::v-deep .el-table__body tr > td{
background-color:#000 !important;
color: #fff;
border-color:#444444;
}
::v-deep .el-table__body tr:hover > td{
background-color:#858282 !important;
color: #fff;
border-color:#444444;
}
::v-deep .el-table--border th.gutter:last-of-type{
::v-deep .el-table--border th.gutter:last-of-type {
border: none;
}
::v-deep .el-card__header{
::v-deep .el-table,
.el-table__expanded-cell {
background-color: #000;
color: #fff;
border-color: #444444;
}
::v-deep .el-table th,
.el-table tr {
background-color: #000;
color: #fff;
border-color: #444444;
}
::v-deep .el-table__body tr>td {
background-color: #000 !important;
color: #fff;
border-color: #444444;
}
::v-deep .el-table__body tr:hover>td {
background-color: #858282 !important;
color: #fff;
border-color: #444444;
}
::v-deep .el-table--border th.gutter:last-of-type {
border: none;
}
::v-deep .el-card__header {
border: none;
padding: 10px;
}
::v-deep .el-upload-list--picture-card .el-upload-list__item{
::v-deep .el-upload-list--picture-card .el-upload-list__item {
width: 30px;
height: 30px;
}
::v-deep .el-upload--picture-card{
::v-deep .el-upload--picture-card {
width: 30px;
height: 30px;
line-height: 40px;
}
::v-deep .el-dialog{
::v-deep .el-dialog {
background: #1e1e1e;
border: 1px solid #ddd;
color: #ddd;
.el-dialog__title{
color:#fff;
.el-dialog__title {
color: #fff;
}
.el-input .el-input__inner{
.el-input .el-input__inner {
background-color: transparent;
color: #ddd;
border: 1px solid #5e5e5e;
}
.el-input.is-disabled .el-input__inner{
.el-input.is-disabled .el-input__inner {
background-color: #646464a1;
}
.el-form-item__label{
.el-form-item__label {
color: #dfdfdf
}
}
}
::v-deep .el-switch__label{
color:#fff;
::v-deep .el-switch__label {
color: #fff;
}
::v-deep .el-switch__label.is-active{
::v-deep .el-switch__label.is-active {
color: #428bca;
}
.uploadWrapper{
.uploadWrapper {
display: flex;
flex-direction: column;
align-items: flex-start;
@@ -21,6 +21,7 @@
</div>
<el-table :data="question.TableQuestions.Answers">
<el-table-column v-for="item of question.TableQuestions.Questions" :key="item.Id" :prop="item.Id"
<<<<<<< HEAD
:label="item.QuestionName" min-width="100" show-overflow-tooltip>
<template slot-scope="scope">
<span v-if="item.Unit">{{ scope.row[item.Id] }}{{ item.Unit !== 4 ? $fd('ValueUnit', item.Unit)
@@ -29,6 +30,9 @@
<span v-else>{{ scope.row[item.Id] }}</span>
</template>
</el-table-column>
=======
:label="item.QuestionName" min-width="100" show-overflow-tooltip />
>>>>>>> uat
</el-table>
</div>
<template v-else>
@@ -149,6 +153,7 @@
<el-select v-if="question.Type === 'number' && question.TypeValue" v-model="questionForm[question.Id]" clearable
@change="(val) => { formItemNumberChange(val, question) }">
<el-option v-for="val in question.TypeValue.split('|')" :key="val" :label="val.trim()" :value="val.trim()" />
<<<<<<< HEAD
<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>
@@ -165,6 +170,14 @@
question.CustomUnit }}</template>
<template v-else-if="question.ValueType === 2" slot="append">%</template>
</el-input>
=======
</el-select>
<el-input v-else-if="question.Type === 'number' && question.DataSource !== 1"
v-model="questionForm[question.Id]" type="number"
@change="(val) => { formItemNumberChange(val, question) }" />
<el-input v-else-if="question.Type === 'number' && question.DataSource === 1"
v-model="questionForm[question.Id]" :disabled="question.DataSource === 1" />
>>>>>>> uat
<!-- 上传图像 -->
<el-upload v-if="question.Type === 'upload'" action :accept="question.FileType"
:limit="question.ImageCount > 0 ? parseInt(question.ImageCount) : 100" :on-preview="handlePictureCardPreview"
@@ -387,15 +400,24 @@ export default {
}
let dataArr = []
rules.CalculateQuestionList.forEach((o, i) => {
if (this.questionForm[o.TableQuestionId] === 'NE') {
isNE = true
}
if (i === 0) {
if (rules.CustomCalculateMark > 4 && rules.CustomCalculateMark < 10) {
switch (rules.CustomCalculateMark) {
case 5:
this.questionForm[o.QuestionId].forEach((q, qi) => {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId]);
} else {
num *= parseFloat(q[o.TableQuestionId]);
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId]);
} else {
num *= parseFloat(q[o.TableQuestionId]);
}
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
@@ -404,10 +426,16 @@ export default {
break;
case 6:
this.questionForm[o.QuestionId].forEach((q, qi) => {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId]);
} else {
num += parseFloat(q[o.TableQuestionId]);
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId]);
} else {
num += parseFloat(q[o.TableQuestionId]);
}
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
@@ -416,10 +444,16 @@ export default {
break;
case 7:
this.questionForm[o.QuestionId].forEach((q, qi) => {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId]);
} else {
num += parseFloat(q[o.TableQuestionId]);
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
if (qi === 0) {
num = parseFloat(q[o.TableQuestionId]);
} else {
num += parseFloat(q[o.TableQuestionId]);
}
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
}
if (q[o.TableQuestionId] === 'NE') {
isNE = true
@@ -433,6 +467,10 @@ export default {
case 8:
var arr = [];
this.questionForm[o.QuestionId].forEach((q) => {
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
arr.push(q[o.TableQuestionId]);
}
arr.push(q[o.TableQuestionId]);
if (q[o.TableQuestionId] === 'NE') {
isNE = true
@@ -443,23 +481,37 @@ export default {
case 9:
var arr = [];
this.questionForm[o.QuestionId].forEach((q) => {
<<<<<<< HEAD
arr.push(q[o.TableQuestionId]);
=======
if (!isNaN(parseFloat(q[o.TableQuestionId]))) {
arr.push(q[o.TableQuestionId]);
}
>>>>>>> uat
if (q[o.TableQuestionId] === 'NE') {
isNE = true
}
});
num = arr.length === 0 ? 0 : Math.min(...arr);
console.log("min", this.questionForm[o.QuestionId], arr, num);
break;
}
} else {
<<<<<<< HEAD
num = parseFloat(this.questionForm[o.TableQuestionId]);
if (this.questionForm[o.TableQuestionId] === 'NE') {
isNE = true
}
if (!isNaN(num)) {
dataArr.push(num)
=======
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num = parseFloat(this.questionForm[o.TableQuestionId]);
if (!isNaN(num)) {
dataArr.push(num)
}
>>>>>>> uat
}
}
} else {
if (this.questionForm[o.TableQuestionId] === 'NE') {
@@ -467,16 +519,26 @@ export default {
}
switch (rules.CustomCalculateMark) {
case 1:
num += parseFloat(this.questionForm[o.TableQuestionId]);
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num += parseFloat(this.questionForm[o.TableQuestionId]);
}
break;
case 2:
num -= parseFloat(this.questionForm[o.TableQuestionId]);
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num -= parseFloat(this.questionForm[o.TableQuestionId]);
}
break;
case 3:
num *= parseFloat(this.questionForm[o.TableQuestionId]);
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num *= parseFloat(this.questionForm[o.TableQuestionId]);
}
break;
case 4:
num /= parseFloat(this.questionForm[o.TableQuestionId]);
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
num /= parseFloat(this.questionForm[o.TableQuestionId]);
}
break;
case 10:
if (!isNaN(parseFloat(this.questionForm[o.TableQuestionId]))) {
@@ -518,9 +580,18 @@ export default {
console.log(e);
}
if (isNE) {
<<<<<<< HEAD
num = 'NE'
}
return num;
=======
return 'NE'
}
if (rules.ValueType === 2) {
num = num * 100
}
return num.toFixed(this.digitPlaces)
>>>>>>> uat
},
formItemNumberChange(questionId, isTable) {
if (typeof isTable === 'object') {
@@ -565,28 +636,50 @@ export default {
arr = [];
let isNE = false
CalculateQuestions.forEach((o, i) => {
<<<<<<< HEAD
=======
console.log(this.QuestionsForm[o.TableQuestionId], 'this.QuestionsForm[o.TableQuestionId]')
>>>>>>> uat
if (this.QuestionsForm[o.TableQuestionId] === 'NE') {
isNE = true
}
if (i === 0) {
num = parseFloat(this.QuestionsForm[o.TableQuestionId]);
arr = [num];
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
num = parseFloat(this.QuestionsForm[o.TableQuestionId]);
arr = [num];
}
} else {
switch (v.CustomCalculateMark) {
case 1:
num += parseFloat(this.QuestionsForm[o.TableQuestionId]);
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
num += parseFloat(this.QuestionsForm[o.TableQuestionId]);
}
break;
case 2:
num -= parseFloat(this.QuestionsForm[o.TableQuestionId]);
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
num -= parseFloat(this.QuestionsForm[o.TableQuestionId]);
}
break;
case 3:
num *= parseFloat(this.QuestionsForm[o.TableQuestionId]);
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
num *= parseFloat(this.QuestionsForm[o.TableQuestionId]);
}
break;
case 4:
num /= parseFloat(this.QuestionsForm[o.TableQuestionId]);
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
num /= parseFloat(this.QuestionsForm[o.TableQuestionId]);
}
break;
case 7:
arr.push(parseFloat(this.QuestionsForm[o.TableQuestionId]));
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
arr.push(parseFloat(this.QuestionsForm[o.TableQuestionId]));
}
num =
arr.length === 0
? 0
@@ -595,11 +688,17 @@ export default {
}, 0) / arr.length;
break;
case 8:
arr.push(parseFloat(this.QuestionsForm[o.TableQuestionId]));
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
arr.push(parseFloat(this.QuestionsForm[o.TableQuestionId]));
}
num = arr.length === 0 ? 0 : Math.max(...arr);
break;
case 9:
arr.push(parseFloat(this.QuestionsForm[o.TableQuestionId]));
if (!isNaN(parseFloat(this.QuestionsForm[o.TableQuestionId]))) {
arr.push(parseFloat(this.QuestionsForm[o.TableQuestionId]));
}
num = arr.length === 0 ? 0 : Math.min(...arr);
// console.log('min', this.questionForm[o.QuestionId], arr, num)
break;
@@ -608,6 +707,11 @@ export default {
});
if (isNE) {
num = 'NE'
<<<<<<< HEAD
=======
} else {
num = num.toFixed(this.digitPlaces)
>>>>>>> uat
}
this.$set(this.QuestionsForm, v.Id, num.toString());
}
@@ -856,6 +960,7 @@ export default {
}
}
<<<<<<< HEAD
::v-deep .el-select .el-input__prefix {
left: calc(100% - 50px);
cursor: pointer;
@@ -866,6 +971,8 @@ export default {
padding-right: 50px;
}
=======
>>>>>>> uat
.criterion-form-item {
.el-form-item {
display: flex;
@@ -73,12 +73,27 @@
<el-input v-if="question.Type === 'increment'" v-model="questionForm[question.Id]" disabled />
<!-- 数值 -->
<!-- :precision="2" :step="0.1" :max="10" -->
<<<<<<< HEAD
<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
v-if="question.Type === 'number' && question.TypeValue"
v-model="questionForm[question.Id]"
clearable
@change="((val)=>{formItemNumberChange(val, question)})"
>
<el-option
v-for="val in question.TypeValue.split('|')"
:key="val"
:label="val"
:value="val"
/>
>>>>>>> uat
</el-select>
<el-input v-else-if="question.Type === 'number' && question.DataSource !== 1" v-model="questionForm[question.Id]"
type="number" @change="((val) => { formItemNumberChange(val, question) })">
@@ -86,10 +101,19 @@
question.CustomUnit }}</template>
<template v-else-if="question.ValueType === 2" slot="append">%</template>
</el-input>
<<<<<<< HEAD
<el-input v-else-if="question.Type === 'number' && question.DataSource === 1" v-model="questionForm[question.Id]"
type="number" :disabled="question.DataSource === 1">
<template v-if="question.Unit !== 0" slot="append">{{ question.Unit !== 4 ? $fd('ValueUnit', question.Unit) :
question.CustomUnit }}</template>
=======
<el-input
v-else-if="question.Type === 'number' && question.DataSource === 1"
v-model="questionForm[question.Id]"
:disabled="question.DataSource === 1"
>
<template v-if="question.Unit !== 0" slot="append">{{ question.Unit !== 4 ? $fd('ValueUnit', question.Unit) : question.CustomUnit }}</template>
>>>>>>> uat
<template v-else-if="question.ValueType === 2" slot="append">%</template>
</el-input>
<!-- 上传图像 -->
@@ -1250,7 +1250,7 @@ export default {
if (this.form.ClassifyTableQuestionId) {
this.classifyQuestionChange(this.form.ClassifyTableQuestionId)
}
if (!this.data.ShowOrder) {
if (!this.data.ShowOrder && this.data.ShowOrder !== 0) {
if (this.list.length > 0) {
var ShowOrderList = this.list.map(v => v.ShowOrder)
this.form.ShowOrder = Math.max(...ShowOrderList) + 1