裁判阅片及规则配置更改
parent
38ef9c9d58
commit
2b04301d1c
|
|
@ -488,3 +488,51 @@ export function setRandomTaskOrder(data) {
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getJudgeForm(data) {
|
||||||
|
return request({
|
||||||
|
url: `/ReadingImageTask/getJudgeForm`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function setJudgeForm(data) {
|
||||||
|
return request({
|
||||||
|
url: `/ReadingImageTask/setJudgeForm`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getSingleVisitJudgeAnswer(data) {
|
||||||
|
return request({
|
||||||
|
url: `/ReadingImageTask/getSingleVisitJudgeAnswer`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function submitJudgeForm(data) {
|
||||||
|
return request({
|
||||||
|
url: `/Inspection/ReadingImageTask/SubmitJudgeForm`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getTrialQuestionVisitJudgeRule(data) {
|
||||||
|
return request({
|
||||||
|
url: `/ReadingQuestion/getTrialQuestionVisitJudgeRule`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function setTrialQuestionVisitJudgeRule(data) {
|
||||||
|
return request({
|
||||||
|
url: `/ReadingQuestion/setTrialQuestionVisitJudgeRule`,
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,14 @@ export function getTrialJudgyInfo(params) {
|
||||||
data: params
|
data: params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function setTrialJudgeRuleInfo(params) {
|
||||||
|
return request({
|
||||||
|
url: `/ReadingQuestion/setTrialJudgeRuleInfo`,
|
||||||
|
method: 'post',
|
||||||
|
data: params
|
||||||
|
})
|
||||||
|
}
|
||||||
// 获取检查部位列表
|
// 获取检查部位列表
|
||||||
export function getTrialBodyPartList(params) {
|
export function getTrialBodyPartList(params) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,11 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="adReview_wrapper">
|
<div class="adReview_wrapper">
|
||||||
<el-card v-if="isReadingShowSubjectInfo" shadow="never" :body-style="{ padding: '10px' }"
|
<el-card
|
||||||
style="margin-bottom: 10px">
|
v-if="isReadingShowSubjectInfo"
|
||||||
|
shadow="never"
|
||||||
|
:body-style="{ padding: '10px' }"
|
||||||
|
style="margin-bottom: 10px"
|
||||||
|
>
|
||||||
<h4>
|
<h4>
|
||||||
<!-- 受试者: -->
|
<!-- 受试者: -->
|
||||||
{{ $t("trials:adReview:title:subject") }}
|
{{ $t("trials:adReview:title:subject") }}
|
||||||
|
|
@ -10,14 +14,14 @@
|
||||||
</h4>
|
</h4>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card :body-style="{ padding: '10px' }" shadow="never">
|
<el-card :body-style="{ padding: '10px' }" shadow="never">
|
||||||
<!-- <div slot="header" class="clearfix">
|
<div
|
||||||
<span style="font-weight: bold;">评估结果</span>
|
slot="header"
|
||||||
</div> -->
|
style="
|
||||||
<div slot="header" style="
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
">
|
"
|
||||||
|
>
|
||||||
<!-- 评估结果 -->
|
<!-- 评估结果 -->
|
||||||
<div style="font-weight: bold">
|
<div style="font-weight: bold">
|
||||||
{{ $t("trials:adReview:title:result") }}
|
{{ $t("trials:adReview:title:result") }}
|
||||||
|
|
@ -30,21 +34,37 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-table :data="adInfo.VisitInfoList" style="width: 100%">
|
<el-table v-if="taskInfo.ArbitrationRule !== 1" :data="adInfo.VisitInfoList" style="width: 100%">
|
||||||
<!-- 访视名称 -->
|
<!-- 访视名称 -->
|
||||||
<el-table-column prop="VisitName" :label="$t('trials:adReview:table:visitName')" show-overflow-tooltip
|
<el-table-column
|
||||||
width="150" />
|
prop="VisitName"
|
||||||
|
:label="$t('trials:adReview:table:visitName')"
|
||||||
|
show-overflow-tooltip
|
||||||
|
width="150"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- 评估结果 -->
|
<!-- 评估结果 -->
|
||||||
<el-table-column v-for="j in judgeQuestion" :key="j.armEnum" :label="j.armEnum === 1
|
<el-table-column
|
||||||
|
v-for="j in judgeQuestion"
|
||||||
|
:key="j.armEnum"
|
||||||
|
:label="j.armEnum === 1
|
||||||
? $t('trials:adReview:table:viewR1')
|
? $t('trials:adReview:table:viewR1')
|
||||||
: j.armEnum === 2
|
: j.armEnum === 2
|
||||||
? $t('trials:adReview:table:viewR2')
|
? $t('trials:adReview:table:viewR2')
|
||||||
: $fd('ArmEnum', j.armEnum)
|
: $fd('ArmEnum', j.armEnum)
|
||||||
" align="center" prop="">
|
"
|
||||||
|
align="center"
|
||||||
|
prop=""
|
||||||
|
>
|
||||||
<template>
|
<template>
|
||||||
<el-table-column v-for="(qs, i) in j.judgeQuestionList" :key="i" prop="" :label="qs" show-overflow-tooltip
|
<el-table-column
|
||||||
width="150">
|
v-for="(qs, i) in j.judgeQuestionList"
|
||||||
|
:key="i"
|
||||||
|
prop=""
|
||||||
|
:label="qs"
|
||||||
|
show-overflow-tooltip
|
||||||
|
width="150"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<div v-if="scope.row.VisitTaskInfoList[j.index].JudgeQuestionList[i].QuestionType === 1">
|
<div v-if="scope.row.VisitTaskInfoList[j.index].JudgeQuestionList[i].QuestionType === 1">
|
||||||
<span v-if="scope.row.VisitTaskInfoList[j.index].JudgeQuestionList[i].DictionaryCode">
|
<span v-if="scope.row.VisitTaskInfoList[j.index].JudgeQuestionList[i].DictionaryCode">
|
||||||
|
|
@ -57,8 +77,11 @@
|
||||||
{{ scope.row.VisitTaskInfoList[j.index].JudgeQuestionList[i].Answer }}
|
{{ scope.row.VisitTaskInfoList[j.index].JudgeQuestionList[i].Answer }}
|
||||||
</span>
|
</span>
|
||||||
<span
|
<span
|
||||||
v-if="scope.row.VisitTaskInfoList[j.index].JudgeQuestionList[i].Unit && !isNaN(parseFloat(scope.row.VisitTaskInfoList[j.index].JudgeQuestionList[i].Answer))">{{
|
v-if="scope.row.VisitTaskInfoList[j.index].JudgeQuestionList[i].Unit && !isNaN(parseFloat(scope.row.VisitTaskInfoList[j.index].JudgeQuestionList[i].Answer))"
|
||||||
$fd('ValueUnit', parseInt(scope.row.VisitTaskInfoList[j.index].JudgeQuestionList[i].Unit)) }}</span>
|
>
|
||||||
|
{{ scope.row.VisitTaskInfoList[j.index].JudgeQuestionList[i].Unit !== 4 ? $fd('ValueUnit',
|
||||||
|
scope.row.VisitTaskInfoList[j.index].JudgeQuestionList[i].Unit) : scope.row.VisitTaskInfoList[j.index].JudgeQuestionList[i].CustomUnit }}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="scope.row.VisitTaskInfoList[j.index].JudgeQuestionList[i].QuestionType === 2">
|
<div v-else-if="scope.row.VisitTaskInfoList[j.index].JudgeQuestionList[i].QuestionType === 2">
|
||||||
<div v-if="scope.row.VisitTaskInfoList[j.index].JudgeQuestionList[i].Answer">
|
<div v-if="scope.row.VisitTaskInfoList[j.index].JudgeQuestionList[i].Answer">
|
||||||
|
|
@ -66,11 +89,15 @@
|
||||||
{{ $fd("YesOrNo", scope.row.VisitTaskInfoList[j.index].JudgeQuestionList[i].Answer) }}
|
{{ $fd("YesOrNo", scope.row.VisitTaskInfoList[j.index].JudgeQuestionList[i].Answer) }}
|
||||||
</span>
|
</span>
|
||||||
<!-- 查看详情 -->
|
<!-- 查看详情 -->
|
||||||
<el-button type="text" style="margin-left: 5px" @click="
|
<el-button
|
||||||
|
type="text"
|
||||||
|
style="margin-left: 5px"
|
||||||
|
@click="
|
||||||
handleViewDetail(
|
handleViewDetail(
|
||||||
scope.row.VisitTaskInfoList[j.index].GlobalVisitTaskId
|
scope.row.VisitTaskInfoList[j.index].GlobalVisitTaskId
|
||||||
)
|
)
|
||||||
">
|
"
|
||||||
|
>
|
||||||
{{ $t("trials:adReview:table:view") }}
|
{{ $t("trials:adReview:table:view") }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -95,10 +122,14 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<!-- 查看详情 -->
|
<!-- 查看详情 -->
|
||||||
<el-table-column :label="criterionType === 10
|
<el-table-column
|
||||||
|
:label="criterionType === 10
|
||||||
? $t('trials:adReview:table:visitInfoview')
|
? $t('trials:adReview:table:visitInfoview')
|
||||||
: $t('trials:adReview:table:view')
|
: $t('trials:adReview:table:view')
|
||||||
" width="200" :fixed="isFixed ? 'right' : false">
|
"
|
||||||
|
width="200"
|
||||||
|
:fixed="isFixed ? 'right' : false"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<!-- 查看R1详情 -->
|
<!-- 查看R1详情 -->
|
||||||
<el-button type="text" :title="$t('trials:adReview:table:viewR1')" @click="handleView(scope.row, 1)">
|
<el-button type="text" :title="$t('trials:adReview:table:viewR1')" @click="handleView(scope.row, 1)">
|
||||||
|
|
@ -112,88 +143,205 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
<!-- 全局详情 PCWG -->
|
<!-- 全局详情 PCWG -->
|
||||||
<el-table-column v-if="criterionType === 10" prop="VisitName" :label="$t('trials:adReview:table:glInfo')"
|
<el-table-column
|
||||||
show-overflow-tooltip width="150">
|
v-if="criterionType === 10"
|
||||||
|
prop="VisitName"
|
||||||
|
:label="$t('trials:adReview:table:glInfo')"
|
||||||
|
show-overflow-tooltip
|
||||||
|
width="150"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<!-- 查看R1详情 -->
|
<!-- 查看R1详情 -->
|
||||||
<el-button v-if="scope.$index === adInfo.VisitInfoList.length - 1" type="text"
|
<el-button
|
||||||
:title="$t('trials:adReview:table:viewR1')" @click="handleViewGl(scope.row, 1)">
|
v-if="scope.$index === adInfo.VisitInfoList.length - 1"
|
||||||
|
type="text"
|
||||||
|
:title="$t('trials:adReview:table:viewR1')"
|
||||||
|
@click="handleViewGl(scope.row, 1)"
|
||||||
|
>
|
||||||
R1
|
R1
|
||||||
</el-button>
|
</el-button>
|
||||||
<!-- 查看R2详情 -->
|
<!-- 查看R2详情 -->
|
||||||
<el-button v-if="scope.$index === adInfo.VisitInfoList.length - 1" type="text"
|
<el-button
|
||||||
:title="$t('trials:adReview:table:viewR2')" @click="handleViewGl(scope.row, 2)">
|
v-if="scope.$index === adInfo.VisitInfoList.length - 1"
|
||||||
|
type="text"
|
||||||
|
:title="$t('trials:adReview:table:viewR2')"
|
||||||
|
@click="handleViewGl(scope.row, 2)"
|
||||||
|
>
|
||||||
R2
|
R2
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<el-table v-else :data="judgeAnswers" border style="width: 100%">
|
||||||
|
<!-- 问题名称 -->
|
||||||
|
<el-table-column
|
||||||
|
prop="QuestionName"
|
||||||
|
:label="$t('trials:readingTracking:config:questionName')"
|
||||||
|
show-overflow-tooltip
|
||||||
|
width="500"
|
||||||
|
/>
|
||||||
|
<!-- R1 -->
|
||||||
|
<el-table-column
|
||||||
|
prop="R1Answer"
|
||||||
|
show-overflow-tooltip
|
||||||
|
width="150"
|
||||||
|
>
|
||||||
|
<template slot="header">
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
class="judge-answer-header-btn"
|
||||||
|
@click.stop="handleViewDetail(r1VisitTaskId)"
|
||||||
|
>
|
||||||
|
R1
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.DictionaryCode">
|
||||||
|
{{ $fd(scope.row.DictionaryCode, parseInt(scope.row.R1Answer)) }}
|
||||||
|
</span>
|
||||||
|
<span v-else>
|
||||||
|
{{ scope.row.R1Answer }}
|
||||||
|
</span>
|
||||||
|
<span v-if="scope.row.Unit">
|
||||||
|
{{ scope.row.Unit !== 4 ? $fd('ValueUnit', scope.row.Unit) : scope.row.CustomUnit }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<!-- R2 -->
|
||||||
|
<el-table-column
|
||||||
|
prop="R2Answer"
|
||||||
|
show-overflow-tooltip
|
||||||
|
width="150"
|
||||||
|
>
|
||||||
|
<template slot="header">
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
class="judge-answer-header-btn"
|
||||||
|
@click.stop="handleViewDetail(r2VisitTaskId)"
|
||||||
|
>
|
||||||
|
R2
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="scope.row.DictionaryCode">
|
||||||
|
{{ $fd(scope.row.DictionaryCode, parseInt(scope.row.R2Answer)) }}
|
||||||
|
</span>
|
||||||
|
<span v-else>
|
||||||
|
{{ scope.row.R2Answer }}
|
||||||
|
</span>
|
||||||
|
<span v-if="scope.row.Unit">
|
||||||
|
{{ scope.row.Unit !== 4 ? $fd('ValueUnit', scope.row.Unit) : scope.row.CustomUnit }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
<el-card :body-style="{ padding: '10px' }" class="box-mr">
|
<el-card
|
||||||
|
v-if="taskInfo.JudgeModeEnum === 0"
|
||||||
|
:key="'judge-mode-0'"
|
||||||
|
:body-style="{ padding: '10px' }"
|
||||||
|
class="box-mr"
|
||||||
|
>
|
||||||
<div slot="header" class="clearfix">
|
<div slot="header" class="clearfix">
|
||||||
<!-- 裁判结果 -->
|
<!-- 裁判结果 -->
|
||||||
<span style="font-weight: bold">{{
|
<span style="font-weight: bold">{{
|
||||||
$t("trials:adReview:title:adResult")
|
$t("trials:adReview:title:adResult")
|
||||||
}}</span>
|
}}</span>
|
||||||
</div>
|
</div>
|
||||||
<el-form ref="adForm" v-loading="loading" :model="adForm" style="width: 800px" label-width="100">
|
<el-form
|
||||||
|
ref="adForm"
|
||||||
|
v-loading="loading"
|
||||||
|
:model="adForm"
|
||||||
|
style="width: 800px"
|
||||||
|
label-width="300px"
|
||||||
|
>
|
||||||
<!-- 选择阅片人 -->
|
<!-- 选择阅片人 -->
|
||||||
<el-form-item :label="$t('trials:adReview:title:choseReader')" prop="judgeResultTaskId" :rules="[
|
<el-form-item
|
||||||
{ required: true, message: this.$t('common:ruleMessage:select') },
|
:label="$t('trials:adReview:title:choseReader')"
|
||||||
]">
|
prop="judgeResultTaskId"
|
||||||
|
:rules="[
|
||||||
|
{ required: true, message: $t('common:ruleMessage:select') },
|
||||||
|
]"
|
||||||
|
>
|
||||||
<el-radio-group v-model="adForm.judgeResultTaskId" :disabled="adInfo.ReadingTaskState >= 2">
|
<el-radio-group v-model="adForm.judgeResultTaskId" :disabled="adInfo.ReadingTaskState >= 2">
|
||||||
<el-radio v-for="t in visitTaskArmList" :key="t.VisitTaskId" :label="t.VisitTaskId"
|
<el-radio
|
||||||
@change="handleVisitTaskArmChange">
|
v-for="t in visitTaskArmList"
|
||||||
|
:key="t.VisitTaskId"
|
||||||
|
:label="t.VisitTaskId"
|
||||||
|
@change="handleVisitTaskArmChange"
|
||||||
|
>
|
||||||
{{ $fd("ArmEnum", t.ArmEnum) }}
|
{{ $fd("ArmEnum", t.ArmEnum) }}
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 裁判原因 -->
|
<!-- 裁判原因 -->
|
||||||
<el-form-item :label="$t('trials:adReview:title:adReason')" prop="judgeResultRemark" :rules="[
|
<el-form-item
|
||||||
{ required: true, message: this.$t('common:ruleMessage:specify') },
|
:label="$t('trials:adReview:title:adReason')"
|
||||||
|
prop="judgeResultRemark"
|
||||||
|
:rules="[
|
||||||
|
{ required: true, message: $t('common:ruleMessage:specify') },
|
||||||
{
|
{
|
||||||
max: 500,
|
max: 500,
|
||||||
message: `${this.$t('common:ruleMessage:maxLength')} 500`,
|
message: `${$t('common:ruleMessage:maxLength')} 500`,
|
||||||
trigger: ['blur', 'change'],
|
trigger: ['blur', 'change'],
|
||||||
},
|
},
|
||||||
]">
|
]"
|
||||||
<div style="position: relative">
|
>
|
||||||
<div style="
|
<div class="judge-remark-tip">
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
top: 30px;
|
|
||||||
color: #606266;
|
|
||||||
font-size: 13px;
|
|
||||||
">
|
|
||||||
{{ remark }}
|
{{ remark }}
|
||||||
</div>
|
</div>
|
||||||
<el-input v-model="adForm.judgeResultRemark" type="textarea" :autosize="{ minRows: 4, maxRows: 6 }"
|
<el-input
|
||||||
:disabled="adInfo.ReadingTaskState >= 2" style="margin-top: 25px" />
|
v-model="adForm.judgeResultRemark"
|
||||||
</div>
|
type="textarea"
|
||||||
|
:autosize="{ minRows: 4, maxRows: 6 }"
|
||||||
|
:disabled="adInfo.ReadingTaskState >= 2"
|
||||||
|
class="judge-remark-input"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 截图说明 -->
|
<!-- 截图说明 -->
|
||||||
<el-form-item :label="$t('trials:adReview:title:screenShot')">
|
<el-form-item :label="$t('trials:adReview:title:screenShot')">
|
||||||
<el-upload action :accept="accept" :on-preview="handlePictureCardPreview" :before-upload="handleBeforeUpload"
|
<el-upload
|
||||||
:http-request="uploadScreenshot" list-type="picture-card" :on-remove="handleRemove" :file-list="fileList"
|
action
|
||||||
:class="{ disabled: adInfo.ReadingTaskState >= 2 }" :disabled="adInfo.ReadingTaskState >= 2">
|
:accept="accept"
|
||||||
|
:on-preview="handlePictureCardPreview"
|
||||||
|
:before-upload="handleBeforeUpload"
|
||||||
|
:http-request="uploadScreenshot"
|
||||||
|
list-type="picture-card"
|
||||||
|
:on-remove="handleRemove"
|
||||||
|
:file-list="fileList"
|
||||||
|
:class="{ disabled: adInfo.ReadingTaskState >= 2 }"
|
||||||
|
:disabled="adInfo.ReadingTaskState >= 2"
|
||||||
|
>
|
||||||
<i slot="default" class="el-icon-plus" />
|
<i slot="default" class="el-icon-plus" />
|
||||||
<div slot="file" slot-scope="{ file }" style="width: 100%; height: 100%">
|
<div slot="file" slot-scope="{ file }" style="width: 100%; height: 100%">
|
||||||
<viewer :ref="file.url" :images="images" style="
|
<viewer
|
||||||
|
:ref="file.url"
|
||||||
|
:images="images"
|
||||||
|
style="
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
">
|
"
|
||||||
<img class="el-upload-list__item-thumbnail" :src="OSSclientConfig.basePath + file.url" alt=""
|
>
|
||||||
crossorigin="anonymous" style="max-width: 100%; max-height: 100%">
|
<img
|
||||||
|
class="el-upload-list__item-thumbnail"
|
||||||
|
:src="OSSclientConfig.basePath + file.url"
|
||||||
|
alt=""
|
||||||
|
crossorigin="anonymous"
|
||||||
|
style="max-width: 100%; max-height: 100%"
|
||||||
|
>
|
||||||
<span class="el-upload-list__item-actions">
|
<span class="el-upload-list__item-actions">
|
||||||
<span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
|
<span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
|
||||||
<i class="el-icon-zoom-in" />
|
<i class="el-icon-zoom-in" />
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span v-if="adInfo.ReadingTaskState < 2" class="el-upload-list__item-delete"
|
<span
|
||||||
@click="handleRemove(file)">
|
v-if="adInfo.ReadingTaskState < 2"
|
||||||
|
class="el-upload-list__item-delete"
|
||||||
|
@click="handleRemove(file)"
|
||||||
|
>
|
||||||
<i class="el-icon-delete" />
|
<i class="el-icon-delete" />
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -201,8 +349,7 @@
|
||||||
</div>
|
</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
<el-form-item v-if="adInfo.ReadingTaskState < 2">
|
||||||
<div style="text-align: center;width:100%" v-if="adInfo.ReadingTaskState < 2">
|
|
||||||
<el-button type="primary" @click="skipTask">
|
<el-button type="primary" @click="skipTask">
|
||||||
<!-- 跳过 -->
|
<!-- 跳过 -->
|
||||||
{{ $t("trials:readingReport:button:skip") }}
|
{{ $t("trials:readingReport:button:skip") }}
|
||||||
|
|
@ -215,7 +362,203 @@
|
||||||
<el-button type="primary" :loading="submitLockAction === 'submit'" :disabled="!!submitLockAction" @click="handleSubmit">{{
|
<el-button type="primary" :loading="submitLockAction === 'submit'" :disabled="!!submitLockAction" @click="handleSubmit">{{
|
||||||
$t("common:button:submit")
|
$t("common:button:submit")
|
||||||
}}</el-button>
|
}}</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
</el-card>
|
||||||
|
<el-card
|
||||||
|
v-else
|
||||||
|
:key="'judge-mode-1'"
|
||||||
|
:body-style="{ padding: '10px' }"
|
||||||
|
class="box-mr"
|
||||||
|
>
|
||||||
|
<div slot="header" class="clearfix">
|
||||||
|
<!-- 裁判结果 -->
|
||||||
|
<span style="font-weight: bold">
|
||||||
|
{{ $t("trials:adReview:title:adResult") }}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<el-form
|
||||||
|
ref="adForm2"
|
||||||
|
v-loading="loading"
|
||||||
|
:model="judgeForm"
|
||||||
|
style="width: 800px"
|
||||||
|
label-width="300px"
|
||||||
|
>
|
||||||
|
<el-form-item
|
||||||
|
v-for="question in judgeQs"
|
||||||
|
:key="question.ReadingQuestionId"
|
||||||
|
:label="`${question.QuestionName}`"
|
||||||
|
:prop="question.ReadingQuestionId"
|
||||||
|
:rules="[{
|
||||||
|
required: true,
|
||||||
|
message: ['radio', 'select', 'checkbox'].includes(question.Type) ? $t('common:ruleMessage:select') : $t('common:ruleMessage:specify'), trigger: ['blur', 'change']
|
||||||
|
}]"
|
||||||
|
>
|
||||||
|
<div class="judge-form-row">
|
||||||
|
<div class="judge-form-control">
|
||||||
|
<el-input
|
||||||
|
v-if="question.Type === 'number'"
|
||||||
|
v-model="judgeForm[question.ReadingQuestionId]"
|
||||||
|
type="text"
|
||||||
|
:disabled="readingTaskState >= 2"
|
||||||
|
style="width: 200px;"
|
||||||
|
>
|
||||||
|
<template v-if="question.Unit !== 0" slot="append">
|
||||||
|
{{ question.Unit !== 4 ? $fd('ValueUnit', question.Unit) : question.CustomUnit }}
|
||||||
|
</template>
|
||||||
|
</el-input>
|
||||||
|
<el-radio-group
|
||||||
|
v-else-if="question.Type === 'radio'"
|
||||||
|
v-model="judgeForm[question.ReadingQuestionId]"
|
||||||
|
:disabled="readingTaskState >= 2"
|
||||||
|
>
|
||||||
|
<template v-if="question.DictionaryCode">
|
||||||
|
<el-radio v-for="val in $d[question.DictionaryCode]" :key="val.id" :label="String(val.value)">
|
||||||
|
{{ val.label }}
|
||||||
|
</el-radio>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<el-radio v-for="val in question.TypeValue.split('|')" :key="val.trim()" :label="val.trim()">
|
||||||
|
{{ val.trim() }}
|
||||||
|
</el-radio>
|
||||||
|
</template>
|
||||||
|
</el-radio-group>
|
||||||
|
<el-select
|
||||||
|
v-else-if="question.Type === 'select'"
|
||||||
|
v-model="judgeForm[question.ReadingQuestionId]"
|
||||||
|
:disabled="readingTaskState >= 2"
|
||||||
|
>
|
||||||
|
<template
|
||||||
|
v-if="question.QuestionGenre === 2 && question.DictionaryCode"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item of $d[question.DictionaryCode]"
|
||||||
|
:key="item.id"
|
||||||
|
:value="String(item.value)"
|
||||||
|
:label="item.label"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<el-option
|
||||||
|
v-for="val in question.TypeValue.split('|')"
|
||||||
|
:key="val.trim()"
|
||||||
|
:label="val.trim()"
|
||||||
|
:value="val.trim()"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-select>
|
||||||
|
<el-checkbox-group
|
||||||
|
v-else-if="question.Type === 'checkbox'"
|
||||||
|
v-model="judgeForm[question.ReadingQuestionId]"
|
||||||
|
:disabled="readingTaskState >= 2"
|
||||||
|
>
|
||||||
|
<template v-if="question.DictionaryCode">
|
||||||
|
<el-checkbox v-for="item of $d[question.DictionaryCode]" :key="item.id" :label="String(item.value)">
|
||||||
|
{{ item.label }}
|
||||||
|
</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<el-checkbox v-for="val in question.TypeValue.split('|')" :key="val.trim()" :label="val.trim()">
|
||||||
|
{{ val.trim() }}
|
||||||
|
</el-checkbox>
|
||||||
|
</template>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</div>
|
||||||
|
<div v-if="readingTaskState < 2" class="judge-form-actions">
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
@click="applyJudgeAnswer(question, 1)"
|
||||||
|
>
|
||||||
|
R1
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="text"
|
||||||
|
@click="applyJudgeAnswer(question, 2)"
|
||||||
|
>
|
||||||
|
R2
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item :label="$t('trials:adReview:title:adReason1')">
|
||||||
|
<el-input
|
||||||
|
v-model="judgeForm.judgeResultRemark"
|
||||||
|
type="textarea"
|
||||||
|
:autosize="{ minRows: 4, maxRows: 6 }"
|
||||||
|
:disabled="readingTaskState >= 2"
|
||||||
|
style="width: 360px"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<!-- 截图说明 -->
|
||||||
|
<el-form-item :label="$t('trials:adReview:title:screenShot')">
|
||||||
|
<el-upload
|
||||||
|
action
|
||||||
|
:accept="accept"
|
||||||
|
:on-preview="handlePictureCardPreview"
|
||||||
|
:before-upload="handleBeforeUpload"
|
||||||
|
:http-request="uploadScreenshot"
|
||||||
|
list-type="picture-card"
|
||||||
|
:on-remove="handleRemove"
|
||||||
|
:file-list="fileList"
|
||||||
|
:class="{ disabled: readingTaskState >= 2 }"
|
||||||
|
:disabled="readingTaskState >= 2"
|
||||||
|
>
|
||||||
|
<i slot="default" class="el-icon-plus" />
|
||||||
|
<div slot="file" slot-scope="{ file }" style="width: 100%; height: 100%">
|
||||||
|
<viewer
|
||||||
|
:ref="file.url"
|
||||||
|
:images="images"
|
||||||
|
style="
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
class="el-upload-list__item-thumbnail"
|
||||||
|
:src="OSSclientConfig.basePath + file.url"
|
||||||
|
alt=""
|
||||||
|
crossorigin="anonymous"
|
||||||
|
style="max-width: 100%; max-height: 100%"
|
||||||
|
>
|
||||||
|
<span class="el-upload-list__item-actions">
|
||||||
|
<span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
|
||||||
|
<i class="el-icon-zoom-in" />
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<span
|
||||||
|
v-if="readingTaskState < 2"
|
||||||
|
class="el-upload-list__item-delete"
|
||||||
|
@click="handleRemove(file)"
|
||||||
|
>
|
||||||
|
<i class="el-icon-delete" />
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</viewer>
|
||||||
|
</div>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
<div v-if="readingTaskState < 2" style="text-align: center;width:100%">
|
||||||
|
<el-button type="primary" @click="skipTask">
|
||||||
|
<!-- 跳过 -->
|
||||||
|
{{ $t("trials:readingReport:button:skip") }}
|
||||||
|
</el-button>
|
||||||
|
<!-- 保存 -->
|
||||||
|
<el-button type="primary" :loading="submitLockAction === 'save'" :disabled="!!submitLockAction" @click="handleSaveJudgeForm">{{
|
||||||
|
$t("common:button:save")
|
||||||
|
}}</el-button>
|
||||||
|
<!-- 提交 -->
|
||||||
|
<el-button type="primary" :loading="submitLockAction === 'submit'" :disabled="!!submitLockAction" @click="handleSubmitJudgeForm">{{
|
||||||
|
$t("common:button:submit")
|
||||||
|
}}</el-button>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
</el-card>
|
</el-card>
|
||||||
|
|
||||||
<el-card v-if="isReadingShowPreviousResults" :body-style="{ padding: '10px' }">
|
<el-card v-if="isReadingShowPreviousResults" :body-style="{ padding: '10px' }">
|
||||||
|
|
@ -228,10 +571,18 @@
|
||||||
|
|
||||||
<el-table v-loading="priorLoading" :data="priorADList" style="width: 100%">
|
<el-table v-loading="priorLoading" :data="priorADList" style="width: 100%">
|
||||||
<!-- 裁判阅片 -->
|
<!-- 裁判阅片 -->
|
||||||
<el-table-column prop="TaskBlindName" :label="$t('trials:adReview:table:adReading')" show-overflow-tooltip
|
<el-table-column
|
||||||
width="200" />
|
prop="TaskBlindName"
|
||||||
<el-table-column prop="JudgeResultArm" :label="$t('trials:adReview:table:adResult')" show-overflow-tooltip
|
:label="$t('trials:adReview:table:adReading')"
|
||||||
width="200">
|
show-overflow-tooltip
|
||||||
|
width="200"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="JudgeResultArm"
|
||||||
|
:label="$t('trials:adReview:table:adResult')"
|
||||||
|
show-overflow-tooltip
|
||||||
|
width="200"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ $fd("ArmEnum", scope.row.JudgeResultArm) }}
|
{{ $fd("ArmEnum", scope.row.JudgeResultArm) }}
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -239,15 +590,24 @@
|
||||||
<el-table-column :label="$t('common:action:action')" width="200">
|
<el-table-column :label="$t('common:action:action')" width="200">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<!-- 查看详情 -->
|
<!-- 查看详情 -->
|
||||||
<el-button circle :title="$t('trials:adReview:table:view')" icon="el-icon-view"
|
<el-button
|
||||||
@click="handleViewDetail(scope.row.VisitTaskId)" />
|
circle
|
||||||
|
:title="$t('trials:adReview:table:view')"
|
||||||
|
icon="el-icon-view"
|
||||||
|
@click="handleViewDetail(scope.row.VisitTaskId)"
|
||||||
|
/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-card>
|
</el-card>
|
||||||
<!-- 签名框 -->
|
<!-- 签名框 -->
|
||||||
<el-dialog v-if="signVisible" :visible.sync="signVisible" :close-on-click-modal="false" width="600px"
|
<el-dialog
|
||||||
custom-class="base-dialog-wrapper">
|
v-if="signVisible"
|
||||||
|
:visible.sync="signVisible"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
width="600px"
|
||||||
|
custom-class="base-dialog-wrapper"
|
||||||
|
>
|
||||||
<div slot="title">
|
<div slot="title">
|
||||||
<span style="font-size: 18px">{{ $t("common:dialogTitle:sign") }}</span>
|
<span style="font-size: 18px">{{ $t("common:dialogTitle:sign") }}</span>
|
||||||
<span style="font-size: 12px; margin-left: 5px">{{
|
<span style="font-size: 12px; margin-left: 5px">{{
|
||||||
|
|
@ -266,6 +626,12 @@ import {
|
||||||
submitJudgeVisitTaskResult,
|
submitJudgeVisitTaskResult,
|
||||||
getReadingPastResultList
|
getReadingPastResultList
|
||||||
} from '@/api/trials'
|
} from '@/api/trials'
|
||||||
|
import {
|
||||||
|
getSingleVisitJudgeAnswer,
|
||||||
|
getJudgeForm,
|
||||||
|
setJudgeForm,
|
||||||
|
submitJudgeForm
|
||||||
|
} from '@/api/trials/reading'
|
||||||
import { getAutoCutNextTask } from '@/api/user'
|
import { getAutoCutNextTask } from '@/api/user'
|
||||||
import { setSkipReadingCache } from '@/api/reading'
|
import { setSkipReadingCache } from '@/api/reading'
|
||||||
import const_ from '@/const/sign-code'
|
import const_ from '@/const/sign-code'
|
||||||
|
|
@ -320,6 +686,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
const taskInfo = JSON.parse(localStorage.getItem('taskInfo') || '{}')
|
||||||
return {
|
return {
|
||||||
adInfo: {},
|
adInfo: {},
|
||||||
judgeQuestion: [],
|
judgeQuestion: [],
|
||||||
|
|
@ -348,25 +715,26 @@ export default {
|
||||||
isFixed: false,
|
isFixed: false,
|
||||||
images: [],
|
images: [],
|
||||||
remark: '',
|
remark: '',
|
||||||
submitLockAction: ''
|
submitLockAction: '',
|
||||||
|
taskInfo,
|
||||||
|
judgeAnswers: [],
|
||||||
|
r1VisitTaskId: '',
|
||||||
|
r2VisitTaskId: '',
|
||||||
|
judgeQs: [],
|
||||||
|
judgeForm: {
|
||||||
|
judgeResultRemark: ''
|
||||||
|
},
|
||||||
|
readingTaskState: taskInfo.ReadingTaskState || 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// watch: {
|
|
||||||
// visitTaskId: {
|
|
||||||
// immediate: true,
|
|
||||||
// handler(val) {
|
|
||||||
// this.$nextTick(() => {
|
|
||||||
// this.getAdInfo()
|
|
||||||
// if (this.isReadingShowPreviousResults) {
|
|
||||||
// this.getPriorAdList()
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.criterionType = parseInt(this.$route.query.criterionType)
|
this.criterionType = parseInt(this.$route.query.criterionType)
|
||||||
|
if (this.taskInfo.JudgeModeEnum === 1) {
|
||||||
|
this.getVisitJudgeAnswer()
|
||||||
|
} else {
|
||||||
this.getAdInfo()
|
this.getAdInfo()
|
||||||
|
}
|
||||||
|
|
||||||
if (this.isReadingShowPreviousResults) {
|
if (this.isReadingShowPreviousResults) {
|
||||||
this.getPriorAdList()
|
this.getPriorAdList()
|
||||||
}
|
}
|
||||||
|
|
@ -453,6 +821,81 @@ export default {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async getVisitJudgeAnswer() {
|
||||||
|
try {
|
||||||
|
this.loading = true
|
||||||
|
const res = await getSingleVisitJudgeAnswer({ visitTaskId: this.visitTaskId })
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.judgeAnswers = res.Result.QuestionList
|
||||||
|
this.r1VisitTaskId = res.Result.R1VisitTaskId
|
||||||
|
this.r2VisitTaskId = res.Result.R2VisitTaskId
|
||||||
|
this.getJudgeForm()
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e)
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async getJudgeForm() {
|
||||||
|
try {
|
||||||
|
this.loading = true
|
||||||
|
const res = await getJudgeForm({ visitTaskId: this.visitTaskId })
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
const { QuestionList, JudgeResultImagePathList } = res.Result
|
||||||
|
this.fileList = []
|
||||||
|
if (JudgeResultImagePathList.length > 0) {
|
||||||
|
JudgeResultImagePathList.map((url) => {
|
||||||
|
if (url) {
|
||||||
|
this.fileList.push({ name: '', url: url })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.judgeQs = QuestionList
|
||||||
|
this.$set(this.judgeForm, 'judgeResultRemark', res.Result.JudgeResultRemark || '')
|
||||||
|
QuestionList.map((item) => {
|
||||||
|
this.$set(
|
||||||
|
this.judgeForm,
|
||||||
|
item.ReadingQuestionId,
|
||||||
|
item.Answer
|
||||||
|
)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e)
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getJudgeAnswerValue(question, armEnum) {
|
||||||
|
const row = this.judgeAnswers.find((item) => {
|
||||||
|
return item.ReadingQuestionId === question.ReadingQuestionId
|
||||||
|
})
|
||||||
|
if (!row) return null
|
||||||
|
return armEnum === 1 ? row.R1Answer : row.R2Answer
|
||||||
|
},
|
||||||
|
applyJudgeAnswer(question, armEnum) {
|
||||||
|
const answer = this.getJudgeAnswerValue(question, armEnum)
|
||||||
|
this.$set(
|
||||||
|
this.judgeForm,
|
||||||
|
question.ReadingQuestionId,
|
||||||
|
answer
|
||||||
|
)
|
||||||
|
if (this.$refs.adForm2) {
|
||||||
|
this.$refs.adForm2.clearValidate(question.ReadingQuestionId)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
applyAllJudgeAnswers(armEnum) {
|
||||||
|
const props = []
|
||||||
|
this.judgeQs.forEach((question) => {
|
||||||
|
const answer = this.getJudgeAnswerValue(question, armEnum)
|
||||||
|
this.$set(this.judgeForm, question.ReadingQuestionId, answer)
|
||||||
|
props.push(question.ReadingQuestionId)
|
||||||
|
})
|
||||||
|
if (this.$refs.adForm2 && props.length > 0) {
|
||||||
|
this.$refs.adForm2.clearValidate(props)
|
||||||
|
}
|
||||||
|
},
|
||||||
async getPriorAdList() {
|
async getPriorAdList() {
|
||||||
this.priorLoading = true
|
this.priorLoading = true
|
||||||
try {
|
try {
|
||||||
|
|
@ -499,9 +942,9 @@ export default {
|
||||||
this.submitLockAction = 'save'
|
this.submitLockAction = 'save'
|
||||||
this.loading = true
|
this.loading = true
|
||||||
try {
|
try {
|
||||||
const valid = await this.$refs['adForm'].validate()
|
const valid = await this.$refs.adForm.validate()
|
||||||
if (!valid) return false
|
if (!valid) return false
|
||||||
var paths = []
|
const paths = []
|
||||||
this.fileList.map((file) => {
|
this.fileList.map((file) => {
|
||||||
if (file.url) {
|
if (file.url) {
|
||||||
paths.push(file.url)
|
paths.push(file.url)
|
||||||
|
|
@ -523,7 +966,7 @@ export default {
|
||||||
if (this.submitLockAction) return false
|
if (this.submitLockAction) return false
|
||||||
this.submitLockAction = 'submit'
|
this.submitLockAction = 'submit'
|
||||||
try {
|
try {
|
||||||
const valid = await this.$refs['adForm'].validate()
|
const valid = await this.$refs.adForm.validate()
|
||||||
if (!valid) return false
|
if (!valid) return false
|
||||||
const { ImageAssessmentReportConfirmation } = const_.processSignature
|
const { ImageAssessmentReportConfirmation } = const_.processSignature
|
||||||
this.signCode = ImageAssessmentReportConfirmation
|
this.signCode = ImageAssessmentReportConfirmation
|
||||||
|
|
@ -543,35 +986,39 @@ export default {
|
||||||
},
|
},
|
||||||
// 签名并确认
|
// 签名并确认
|
||||||
async signConfirm(signInfo) {
|
async signConfirm(signInfo) {
|
||||||
|
try {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
var paths = []
|
const paths = this.fileList.reduce((acc, file) => {
|
||||||
this.fileList.map((file) => {
|
if (file.url) acc.push(file.url)
|
||||||
paths.push(file.url)
|
return acc
|
||||||
})
|
}, [])
|
||||||
var params = {
|
|
||||||
|
if (this.taskInfo.JudgeModeEnum === 1) {
|
||||||
|
// 访视点
|
||||||
|
const qsList = this.judgeQs.map((question) => ({
|
||||||
|
readingQuestionId: question.ReadingQuestionId,
|
||||||
|
answer: this.judgeForm[question.ReadingQuestionId]
|
||||||
|
}))
|
||||||
|
const params = {
|
||||||
data: {
|
data: {
|
||||||
visitTaskId: this.visitTaskId,
|
visitTaskId: this.visitTaskId,
|
||||||
judgeResultTaskId: this.adForm.judgeResultTaskId,
|
judgeResultRemark: this.judgeForm.judgeResultRemark,
|
||||||
judgeResultRemark: this.adForm.judgeResultRemark,
|
judgeResultImagePathList: paths,
|
||||||
judgeResultImagePathList: paths
|
questionList: qsList
|
||||||
},
|
},
|
||||||
signInfo: signInfo
|
signInfo: signInfo
|
||||||
}
|
}
|
||||||
try {
|
const res = await submitJudgeForm(params)
|
||||||
const res = await submitJudgeVisitTaskResult(params)
|
|
||||||
if (res.IsSuccess) {
|
if (res.IsSuccess) {
|
||||||
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||||
this.isEdit = false
|
this.isEdit = false
|
||||||
this.$refs['signForm'].btnLoading = false
|
this.$refs['signForm'].btnLoading = false
|
||||||
this.signVisible = false
|
this.signVisible = false
|
||||||
// window.location.reload()
|
|
||||||
// window.opener.postMessage('refreshTaskList', window.location)
|
|
||||||
// 设置当前任务阅片状态为已读
|
// 设置当前任务阅片状态为已读
|
||||||
this.adInfo.ReadingTaskState = 2
|
this.readingTaskState = 2
|
||||||
const res = await getAutoCutNextTask({ imageToolType: this.imageToolType })
|
const res = await getAutoCutNextTask({ imageToolType: this.imageToolType })
|
||||||
var isAutoTask = res.Result.AutoCutNextTask
|
const isAutoTask = res.Result.AutoCutNextTask
|
||||||
if (isAutoTask) {
|
if (isAutoTask) {
|
||||||
// store.dispatch('reading/resetVisitTasks')
|
|
||||||
window.location.reload()
|
window.location.reload()
|
||||||
} else {
|
} else {
|
||||||
// '当前阅片任务已完成,是否进入下一个阅片任务?'
|
// '当前阅片任务已完成,是否进入下一个阅片任务?'
|
||||||
|
|
@ -583,8 +1030,6 @@ export default {
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
if (confirm === 'confirm') {
|
if (confirm === 'confirm') {
|
||||||
// store.dispatch('reading/resetVisitTasks')
|
|
||||||
// DicomEvent.$emit('getNextTask')
|
|
||||||
window.location.reload()
|
window.location.reload()
|
||||||
} else {
|
} else {
|
||||||
changeURLStatic('visitTaskId', this.visitTaskId)
|
changeURLStatic('visitTaskId', this.visitTaskId)
|
||||||
|
|
@ -593,11 +1038,99 @@ export default {
|
||||||
window.opener.postMessage('refreshTaskList', window.location)
|
window.opener.postMessage('refreshTaskList', window.location)
|
||||||
}
|
}
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
} else {
|
||||||
|
const params = {
|
||||||
|
data: {
|
||||||
|
visitTaskId: this.visitTaskId,
|
||||||
|
judgeResultTaskId: this.adForm.judgeResultTaskId,
|
||||||
|
judgeResultRemark: this.adForm.judgeResultRemark,
|
||||||
|
judgeResultImagePathList: paths
|
||||||
|
},
|
||||||
|
signInfo: signInfo
|
||||||
|
}
|
||||||
|
const res = await submitJudgeVisitTaskResult(params)
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||||
|
this.isEdit = false
|
||||||
|
this.$refs['signForm'].btnLoading = false
|
||||||
|
this.signVisible = false
|
||||||
|
// 设置当前任务阅片状态为已读
|
||||||
|
this.adInfo.ReadingTaskState = 2
|
||||||
|
const res = await getAutoCutNextTask({ imageToolType: this.imageToolType })
|
||||||
|
const isAutoTask = res.Result.AutoCutNextTask
|
||||||
|
if (isAutoTask) {
|
||||||
|
window.location.reload()
|
||||||
|
} else {
|
||||||
|
// '当前阅片任务已完成,是否进入下一个阅片任务?'
|
||||||
|
const confirm = await this.$confirm(
|
||||||
|
this.$t('trials:adReview:title:msg2'),
|
||||||
|
{
|
||||||
|
type: 'warning',
|
||||||
|
distinguishCancelAndClose: true
|
||||||
|
}
|
||||||
|
)
|
||||||
|
if (confirm === 'confirm') {
|
||||||
|
window.location.reload()
|
||||||
|
} else {
|
||||||
|
changeURLStatic('visitTaskId', this.visitTaskId)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
window.opener.postMessage('refreshTaskList', window.location)
|
||||||
|
}
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
console.log(e)
|
||||||
|
} finally {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.$refs['signForm'] ? this.$refs['signForm'].btnLoading = false : ''
|
this.$refs['signForm'] ? this.$refs['signForm'].btnLoading = false : ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
async handleSaveJudgeForm() {
|
||||||
|
if (this.submitLockAction) return false
|
||||||
|
this.submitLockAction = 'save'
|
||||||
|
this.loading = true
|
||||||
|
try {
|
||||||
|
const valid = await this.$refs.adForm2.validate()
|
||||||
|
if (!valid) return false
|
||||||
|
const qsList = this.judgeQs.map((question) => ({
|
||||||
|
readingQuestionId: question.ReadingQuestionId,
|
||||||
|
answer: this.judgeForm[question.ReadingQuestionId]
|
||||||
|
}))
|
||||||
|
const paths = this.fileList.reduce((acc, file) => {
|
||||||
|
if (file.url) acc.push(file.url)
|
||||||
|
return acc
|
||||||
|
}, [])
|
||||||
|
await setJudgeForm({
|
||||||
|
visitTaskId: this.visitTaskId,
|
||||||
|
judgeResultRemark: this.judgeForm.judgeResultRemark,
|
||||||
|
judgeResultImagePathList: paths,
|
||||||
|
questionList: qsList
|
||||||
|
})
|
||||||
|
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||||
|
return true
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e)
|
||||||
|
return false
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
this.submitLockAction = ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async handleSubmitJudgeForm() {
|
||||||
|
if (this.submitLockAction) return false
|
||||||
|
this.submitLockAction = 'submit'
|
||||||
|
try {
|
||||||
|
const valid = await this.$refs['adForm2'].validate()
|
||||||
|
if (!valid) return false
|
||||||
|
const { ImageAssessmentReportConfirmation } = const_.processSignature
|
||||||
|
this.signCode = ImageAssessmentReportConfirmation
|
||||||
|
this.signVisible = true
|
||||||
|
return true
|
||||||
|
} finally {
|
||||||
|
this.submitLockAction = ''
|
||||||
|
}
|
||||||
|
},
|
||||||
handleViewDetail(visitTaskId) {
|
handleViewDetail(visitTaskId) {
|
||||||
if (this.openWindow) {
|
if (this.openWindow) {
|
||||||
this.openWindow.close()
|
this.openWindow.close()
|
||||||
|
|
@ -804,6 +1337,43 @@ export default {
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.judge-form-row {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 250px 72px;
|
||||||
|
column-gap: 12px;
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.judge-form-control {
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.judge-remark-tip {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
color: #606266;
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 20px;
|
||||||
|
word-break: break-word;
|
||||||
|
width: 500px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.judge-remark-input {
|
||||||
|
width: 500px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.judge-form-actions {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
gap: 12px;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.judge-answer-header-btn {
|
||||||
|
padding: 0;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
.disabled {
|
.disabled {
|
||||||
::v-deep .el-upload--picture-card {
|
::v-deep .el-upload--picture-card {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
|
||||||
|
|
@ -30,12 +30,12 @@
|
||||||
<div class="image-viewer__actions__inner">
|
<div class="image-viewer__actions__inner">
|
||||||
<i class="el-icon-zoom-out" @click="handleActions('zoomOut')" />
|
<i class="el-icon-zoom-out" @click="handleActions('zoomOut')" />
|
||||||
<i class="el-icon-zoom-in" @click="handleActions('zoomIn')" />
|
<i class="el-icon-zoom-in" @click="handleActions('zoomIn')" />
|
||||||
<i class="el-image-viewer__actions__divider" />
|
<!-- <i class="el-image-viewer__actions__divider" /> -->
|
||||||
<i class="el-icon-c-scale-to-original" @click="toggleMode" />
|
<i class="el-icon-c-scale-to-original" @click="toggleMode" />
|
||||||
<i class="el-image-viewer__actions__divider" />
|
<!-- <i class="el-image-viewer__actions__divider" /> -->
|
||||||
<i class="el-icon-refresh-left" @click="handleActions('anticlocelise')" />
|
<i class="el-icon-refresh-left" @click="handleActions('anticlocelise')" />
|
||||||
<i class="el-icon-refresh-right" @click="handleActions('clocelise')" />
|
<i class="el-icon-refresh-right" @click="handleActions('clocelise')" />
|
||||||
<i v-if="readingTaskState < 2" class="el-icon-bottom-right"
|
<i v-if="readingTaskState < 2 && taskInfo.CriterionType !== 19 && taskInfo.CriterionType !== 20" class="el-icon-bottom-right"
|
||||||
:style="{ cursor: isToolDisabled || readingTaskState >= 2 ? 'not-allowed' : 'pointer' }"
|
:style="{ cursor: isToolDisabled || readingTaskState >= 2 ? 'not-allowed' : 'pointer' }"
|
||||||
@click="handleDrawArrow" />
|
@click="handleDrawArrow" />
|
||||||
|
|
||||||
|
|
@ -44,7 +44,7 @@
|
||||||
:style="{cursor:isToolDisabled || readingTaskState >=2 ?'not-allowed':'pointer'}"
|
:style="{cursor:isToolDisabled || readingTaskState >=2 ?'not-allowed':'pointer'}"
|
||||||
@click="handleDrawRectangle"
|
@click="handleDrawRectangle"
|
||||||
/> -->
|
/> -->
|
||||||
<svg-icon v-if="readingTaskState < 2" icon-class="rectangle" class="svg-icon"
|
<svg-icon v-if="readingTaskState < 2 && taskInfo.CriterionType !== 19 && taskInfo.CriterionType !== 20" icon-class="rectangle" class="svg-icon"
|
||||||
:style="{ cursor: isToolDisabled || readingTaskState >= 2 ? 'not-allowed' : 'pointer' }"
|
:style="{ cursor: isToolDisabled || readingTaskState >= 2 ? 'not-allowed' : 'pointer' }"
|
||||||
@click="handleDrawRectangle" />
|
@click="handleDrawRectangle" />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -109,6 +109,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
const taskInfo = JSON.parse(localStorage.getItem('taskInfo') || '{}')
|
||||||
return {
|
return {
|
||||||
loading: false,
|
loading: false,
|
||||||
index: this.initialIndex,
|
index: this.initialIndex,
|
||||||
|
|
@ -137,11 +138,13 @@ export default {
|
||||||
currentDrawData: {},
|
currentDrawData: {},
|
||||||
canvasData: [],
|
canvasData: [],
|
||||||
imgZoom: 1,
|
imgZoom: 1,
|
||||||
|
isDragging: false,
|
||||||
isToolDisabled: false,
|
isToolDisabled: false,
|
||||||
lesionName: '',
|
lesionName: '',
|
||||||
visitTaskId: '',
|
visitTaskId: '',
|
||||||
isInit: false,
|
isInit: false,
|
||||||
imgSize: { height: '', width: '' } // 图片原始尺寸
|
imgSize: { height: '', width: '' }, // 图片原始尺寸
|
||||||
|
taskInfo
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -209,6 +212,10 @@ export default {
|
||||||
}
|
}
|
||||||
this.deviceSupportInstall()
|
this.deviceSupportInstall()
|
||||||
},
|
},
|
||||||
|
beforeDestroy() {
|
||||||
|
window.removeEventListener('message', this.receiveMsg)
|
||||||
|
this.stopDragging()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getCanvasData() {
|
getCanvasData() {
|
||||||
return new Promise(async resolve => {
|
return new Promise(async resolve => {
|
||||||
|
|
@ -337,25 +344,55 @@ export default {
|
||||||
// 初始化画布
|
// 初始化画布
|
||||||
initCanvas(img) {
|
initCanvas(img) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.canvasSize.height = img.height
|
|
||||||
this.canvasSize.width = img.width
|
|
||||||
|
|
||||||
this.imgSize.height = img.height
|
this.imgSize.height = img.height
|
||||||
this.imgSize.width = img.width
|
this.imgSize.width = img.width
|
||||||
|
|
||||||
const canvasDiv = document.getElementsByClassName('image-viewer__canvas')[0]
|
const canvasDiv = document.getElementsByClassName('image-viewer__canvas')[0]
|
||||||
|
const widthRatio = canvasDiv && canvasDiv.offsetWidth ? canvasDiv.offsetWidth / img.width : 1
|
||||||
|
const heightRatio = canvasDiv && canvasDiv.offsetHeight ? canvasDiv.offsetHeight / img.height : 1
|
||||||
|
this.imgZoom = Math.min(widthRatio, heightRatio, 1)
|
||||||
|
this.canvasSize.height = Math.round(img.height * this.imgZoom)
|
||||||
|
this.canvasSize.width = Math.round(img.width * this.imgZoom)
|
||||||
this.canvasPosition = {
|
this.canvasPosition = {
|
||||||
x: canvasDiv.offsetWidth / 2 - img.width / 2,
|
x: canvasDiv.offsetWidth / 2 - this.canvasSize.width / 2,
|
||||||
y: canvasDiv.offsetHeight / 2 - img.height / 2 - 25
|
y: canvasDiv.offsetHeight / 2 - this.canvasSize.height / 2 - 25
|
||||||
} // 背景居中
|
} // 背景居中
|
||||||
|
|
||||||
this.$nextTick(async () => {
|
this.$nextTick(async () => {
|
||||||
ctx = document.getElementById('canvas').getContext('2d') // 获取上下文
|
ctx = document.getElementById('canvas').getContext('2d') // 获取上下文
|
||||||
await ctx.drawImage(img, 0, 0, img.width, img.height) // 在canvas中绘制图片(图片、起始位置、绘图尺寸)
|
await ctx.drawImage(img, 0, 0, this.canvasSize.width, this.canvasSize.height) // 在canvas中绘制图片(图片、起始位置、绘图尺寸)
|
||||||
this.drawToArr()
|
this.drawToArr()
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
scalePoint(point) {
|
||||||
|
return {
|
||||||
|
x: point.x * this.imgZoom,
|
||||||
|
y: point.y * this.imgZoom
|
||||||
|
}
|
||||||
|
},
|
||||||
|
startDragging(e) {
|
||||||
|
const { offsetX, offsetY } = this.transform
|
||||||
|
const startX = e.pageX
|
||||||
|
const startY = e.pageY
|
||||||
|
this.isDragging = true
|
||||||
|
this._dragHandler = rafThrottle((ev) => {
|
||||||
|
this.transform.offsetX = offsetX + ev.pageX - startX
|
||||||
|
this.transform.offsetY = offsetY + ev.pageY - startY
|
||||||
|
})
|
||||||
|
this._dragEndHandler = () => {
|
||||||
|
this.stopDragging()
|
||||||
|
}
|
||||||
|
on(document, 'mousemove', this._dragHandler)
|
||||||
|
on(document, 'mouseup', this._dragEndHandler)
|
||||||
|
},
|
||||||
|
stopDragging() {
|
||||||
|
off(document, 'mousemove', this._dragHandler)
|
||||||
|
off(document, 'mouseup', this._dragEndHandler)
|
||||||
|
this._dragHandler = null
|
||||||
|
this._dragEndHandler = null
|
||||||
|
this.isDragging = false
|
||||||
|
},
|
||||||
|
|
||||||
// 清空画布
|
// 清空画布
|
||||||
clearCanvas() {
|
clearCanvas() {
|
||||||
|
|
@ -381,6 +418,11 @@ export default {
|
||||||
if (e.button !== 0) {
|
if (e.button !== 0) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (!this.model) {
|
||||||
|
this.startDragging(e)
|
||||||
|
e.preventDefault()
|
||||||
|
return
|
||||||
|
}
|
||||||
this.isMouseDown = true // 打开鼠标状态
|
this.isMouseDown = true // 打开鼠标状态
|
||||||
// 获取画布中鼠标开始点击位置
|
// 获取画布中鼠标开始点击位置
|
||||||
this.canvasMouseStart = {
|
this.canvasMouseStart = {
|
||||||
|
|
@ -391,6 +433,9 @@ export default {
|
||||||
|
|
||||||
// 鼠标移动事件
|
// 鼠标移动事件
|
||||||
async handleMouseMove(e) {
|
async handleMouseMove(e) {
|
||||||
|
if (!this.model || this.isDragging) {
|
||||||
|
return
|
||||||
|
}
|
||||||
// 获取屏幕中鼠标位置(显示实时坐标)
|
// 获取屏幕中鼠标位置(显示实时坐标)
|
||||||
this.mousePosition = {
|
this.mousePosition = {
|
||||||
x: e.pageX,
|
x: e.pageX,
|
||||||
|
|
@ -437,10 +482,12 @@ export default {
|
||||||
var headlen = 10// 自定义箭头线的长度
|
var headlen = 10// 自定义箭头线的长度
|
||||||
var theta = 45// 自定义箭头线与直线的夹角
|
var theta = 45// 自定义箭头线与直线的夹角
|
||||||
var arrowX, arrowY// 箭头线终点坐标
|
var arrowX, arrowY// 箭头线终点坐标
|
||||||
var fromX = e.data.handles.start.x
|
var start = this.scalePoint(e.data.handles.start)
|
||||||
var fromY = e.data.handles.start.y
|
var end = this.scalePoint(e.data.handles.end)
|
||||||
var toX = e.data.handles.end.x
|
var fromX = start.x
|
||||||
var toY = e.data.handles.end.y
|
var fromY = start.y
|
||||||
|
var toX = end.x
|
||||||
|
var toY = end.y
|
||||||
// 计算各角度和对应的箭头终点坐标
|
// 计算各角度和对应的箭头终点坐标
|
||||||
var angle = Math.atan2(fromY - toY, fromX - toX) * 180 / Math.PI
|
var angle = Math.atan2(fromY - toY, fromX - toX) * 180 / Math.PI
|
||||||
var angle1 = (angle + theta) * Math.PI / 180
|
var angle1 = (angle + theta) * Math.PI / 180
|
||||||
|
|
@ -453,8 +500,8 @@ export default {
|
||||||
// 画直线
|
// 画直线
|
||||||
ctx.lineWidth = this.lineWidth
|
ctx.lineWidth = this.lineWidth
|
||||||
ctx.beginPath()
|
ctx.beginPath()
|
||||||
ctx.moveTo(fromX * this.imgZoom, fromY * this.imgZoom)
|
ctx.moveTo(fromX, fromY)
|
||||||
ctx.lineTo(toX * this.imgZoom, toY * this.imgZoom)
|
ctx.lineTo(toX, toY)
|
||||||
|
|
||||||
arrowX = toX + topX
|
arrowX = toX + topX
|
||||||
arrowY = toY + topY
|
arrowY = toY + topY
|
||||||
|
|
@ -473,18 +520,16 @@ export default {
|
||||||
ctx.lineWidth = this.lineWidth
|
ctx.lineWidth = this.lineWidth
|
||||||
ctx.beginPath()
|
ctx.beginPath()
|
||||||
ctx.strokeStyle = this.color
|
ctx.strokeStyle = this.color
|
||||||
|
const start = this.scalePoint(e.data.handles.start)
|
||||||
|
const end = this.scalePoint(e.data.handles.end)
|
||||||
// 绘制矩形边框
|
// 绘制矩形边框
|
||||||
ctx.strokeRect(
|
ctx.strokeRect(
|
||||||
// this.canvasMouseStart.x,
|
start.x,
|
||||||
// this.canvasMouseStart.y,
|
start.y,
|
||||||
// e.offsetX - this.canvasMouseStart.x,
|
end.x - start.x,
|
||||||
// e.offsetY - this.canvasMouseStart.y
|
end.y - start.y
|
||||||
e.data.handles.start.x,
|
|
||||||
e.data.handles.start.y,
|
|
||||||
e.data.handles.end.x - e.data.handles.start.x,
|
|
||||||
e.data.handles.end.y - e.data.handles.start.y
|
|
||||||
)
|
)
|
||||||
this.drawText(ctx, { x: e.data.handles.start.x, y: e.data.handles.start.y }, { x: e.data.handles.end.x, y: e.data.handles.end.y }, e.data.remark, this.color)
|
this.drawText(ctx, start, end, e.data.remark, this.color)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -495,6 +540,10 @@ export default {
|
||||||
if (e.button !== 0) {
|
if (e.button !== 0) {
|
||||||
return // 非左键松开
|
return // 非左键松开
|
||||||
}
|
}
|
||||||
|
if (this.isDragging) {
|
||||||
|
this.stopDragging()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// 左键松开
|
// 左键松开
|
||||||
if (this.model === 'ArrowAnnotate' || this.model === 'RectangleRoi') {
|
if (this.model === 'ArrowAnnotate' || this.model === 'RectangleRoi') {
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,60 @@
|
||||||
|
<!-- eslint-disable -->
|
||||||
<!-- eslint-disable vue/no-unused-vars -->
|
<!-- eslint-disable vue/no-unused-vars -->
|
||||||
<!-- eslint-disable vue/no-template-shadow -->
|
<!-- eslint-disable vue/no-template-shadow -->
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
<template>
|
<template>
|
||||||
<el-form v-loading="loading">
|
<el-form v-loading="loading" :label-width="'100px'">
|
||||||
<!-- 仲裁对象 -->
|
<!-- 仲裁对象 -->
|
||||||
<el-form-item :label="$t('trials:adRules:title:arbitrationRule')" :label-width="'180px'">
|
<el-form-item :label="$t('trials:adRules:title:arbitrationRule')">
|
||||||
<el-radio-group v-model="JudgyInfo.ArbitrationRule" :disabled="OtherInfo.IsSign">
|
<el-radio-group v-model="JudgyInfo.ArbitrationRule" :disabled="isSign">
|
||||||
<el-radio v-for="item of $d.ArbitrationRule" :key="item.id"
|
<el-radio v-for="item of $d.ArbitrationRule" :key="item.id"
|
||||||
:disabled="!JudgyInfo.IsReadingTaskViewInOrder || true" :label="item.value" @change="changeArbitrationRule">
|
:disabled="!JudgyInfo.IsReadingTaskViewInOrder || true" :label="item.value" @change="changeArbitrationRule">
|
||||||
{{ item.label }}
|
{{ item.label }}
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-collapse v-model="activeNames" style="border-top:none;">
|
<!-- 仲裁模式JudgeModeEnum 整体结果择一判定;指标组合判定-->
|
||||||
|
<el-form-item :label="$t('trials:adRules:title:judgeMode')">
|
||||||
|
<el-radio-group v-model="JudgyInfo.JudgeModeEnum" :disabled="isSign">
|
||||||
|
<el-radio
|
||||||
|
v-for="item of $d.JudgeMode"
|
||||||
|
:key="item.id"
|
||||||
|
:disabled="JudgyInfo.ArbitrationRule !== 1"
|
||||||
|
:label="item.value"
|
||||||
|
>
|
||||||
|
{{ item.label }}
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- 裁判规则JudgeRuleEnum 访视一致规则;访视差异规则-->
|
||||||
|
<el-form-item :label="$t('trials:adRules:title:judgeRule')">
|
||||||
|
<el-radio-group v-model="JudgyInfo.JudgeRuleEnum" :disabled="isSign">
|
||||||
|
<el-radio
|
||||||
|
v-for="item of $d.JudgeRule"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.value"
|
||||||
|
>
|
||||||
|
{{ item.label }}
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']"
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="saveJugeRule"
|
||||||
|
v-show="!isSign">
|
||||||
|
{{ $t('common:button:save') }}
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
<ArbitrationRulesByVisit
|
||||||
|
v-if="judgeRuleEnum === 1"
|
||||||
|
ref="visitRules"
|
||||||
|
:trial-reading-criterion-id="trialReadingCriterionId"
|
||||||
|
:isSign="isSign"
|
||||||
|
/>
|
||||||
|
<el-collapse v-else-if="judgeRuleEnum === 0" v-model="activeNames" style="border-top:none;">
|
||||||
<el-collapse-item v-for="(item, index) of QuestionList" :key="item.ReadingQuestionTrialId"
|
<el-collapse-item v-for="(item, index) of QuestionList" :key="item.ReadingQuestionTrialId"
|
||||||
style="position: relative;padding:0 10px;" :name="item.ReadingQuestionTrialId">
|
style="position: relative;padding:0 10px;" :name="item.ReadingQuestionTrialId">
|
||||||
<div slot="title">
|
<div slot="title">
|
||||||
|
|
@ -21,24 +63,28 @@
|
||||||
<div style="position: relative">
|
<div style="position: relative">
|
||||||
<el-button v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']"
|
<el-button v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']"
|
||||||
style="position: absolute; right: 0; top: 0; z-index: 10" size="mini" type="primary"
|
style="position: absolute; right: 0; top: 0; z-index: 10" size="mini" type="primary"
|
||||||
:disabled="OtherInfo.IsSign" @click="apply(item.ReadingQuestionTrialId, index)">{{ $t('common:button:save')
|
:disabled="isSign" @click="apply(item.ReadingQuestionTrialId, index)">{{ $t('common:button:save')
|
||||||
}}</el-button>
|
}}</el-button>
|
||||||
<el-button v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']"
|
<el-button v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']"
|
||||||
style="position: absolute; right: 60px; top: 0; z-index: 10" size="mini" type="primary"
|
style="position: absolute; right: 60px; top: 0; z-index: 10" size="mini" type="primary"
|
||||||
:disabled="OtherInfo.IsSign" @click="reset(item.ReadingQuestionTrialId, index)">{{ $t('common:button:reset')
|
:disabled="isSign" @click="reset(item.ReadingQuestionTrialId, index)">{{ $t('common:button:reset')
|
||||||
}}</el-button>
|
}}</el-button>
|
||||||
<!-- 产生裁判阅片的条件 -->
|
<!-- 产生裁判阅片的条件 -->
|
||||||
<el-form-item :label-width="'280px'" :label="$t('trials:adRules:title:judgeTypeEnum')" style="width: 95%">
|
<el-form-item :label-width="'280px'" :label="$t('trials:adRules:title:judgeTypeEnum')" style="width: 95%">
|
||||||
<el-radio-group v-model="QuestionList[index].JudgeType" @input="(val) => JudgeTypeChange(val, index)">
|
<el-radio-group v-model="QuestionList[index].JudgeType" @input="(val) => JudgeTypeChange(val, index)">
|
||||||
<template v-for="item of $d.JudgeTypeEnum">
|
<template v-for="item of $d.JudgeTypeEnum">
|
||||||
<el-radio style="margin-bottom: 5px" :key="item.id" :disabled="OtherInfo.IsSign ||
|
<el-radio
|
||||||
!hasPermi(['trials:trials-panel:setting:reading-unit:edit'])
|
style="margin-bottom: 5px"
|
||||||
" :label="item.value" v-if="
|
:key="item.id"
|
||||||
item.value < 4 ||
|
:disabled="isSign || !hasPermi(['trials:trials-panel:setting:reading-unit:edit'])"
|
||||||
(item.value > 3 &&
|
:label="item.value"
|
||||||
(QuestionList[index].Type === 'number' ||
|
v-if="
|
||||||
QuestionList[index].Type === 'calculation'))
|
(['number', 'calculation'].includes(QuestionList[index].Type)
|
||||||
">
|
? [1, 4, 5]
|
||||||
|
: [1, 2, 3]
|
||||||
|
).includes(item.value)
|
||||||
|
"
|
||||||
|
>
|
||||||
{{ item.label }}
|
{{ item.label }}
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -48,7 +94,7 @@
|
||||||
<div v-if="QuestionList[index].JudgeType === 3" style="text-align: right; margin: 10px 0">
|
<div v-if="QuestionList[index].JudgeType === 3" style="text-align: right; margin: 10px 0">
|
||||||
<!-- 添加规则 -->
|
<!-- 添加规则 -->
|
||||||
<el-button v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']" size="mini" type="primary"
|
<el-button v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']" size="mini" type="primary"
|
||||||
:disabled="OtherInfo.IsSign" @click="addGroup(index, null)">{{ $t('trials:adRules:button:addRule')
|
:disabled="isSign" @click="addGroup(index, null)">{{ $t('trials:adRules:button:addRule')
|
||||||
}}</el-button>
|
}}</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-table v-if="QuestionList[index].JudgeType === 3" v-loading="loading"
|
<el-table v-if="QuestionList[index].JudgeType === 3" v-loading="loading"
|
||||||
|
|
@ -87,10 +133,10 @@
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<!-- 编辑 -->
|
<!-- 编辑 -->
|
||||||
<el-button icon="el-icon-edit" circle :title="$t('common:button:edit')" size="mini"
|
<el-button icon="el-icon-edit" circle :title="$t('common:button:edit')" size="mini"
|
||||||
:disabled="OtherInfo.IsSign" @click="addGroup(index, scope.$index)" />
|
:disabled="isSign" @click="addGroup(index, scope.$index)" />
|
||||||
<!-- 删除 -->
|
<!-- 删除 -->
|
||||||
<el-button icon="el-icon-delete" circle :title="$t('common:button:delete')" size="mini"
|
<el-button icon="el-icon-delete" circle :title="$t('common:button:delete')" size="mini"
|
||||||
:disabled="OtherInfo.IsSign" @click="tagClose(index, scope.$index)" />
|
:disabled="isSign" @click="tagClose(index, scope.$index)" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
|
@ -103,12 +149,12 @@
|
||||||
">
|
">
|
||||||
<el-checkbox-group v-if="QuestionList[index].QuestionGenre === 3" v-model="QuestionList[index].grouping">
|
<el-checkbox-group v-if="QuestionList[index].QuestionGenre === 3" v-model="QuestionList[index].grouping">
|
||||||
<template v-for="item of $d[QuestionList[index].DictionaryCode]">
|
<template v-for="item of $d[QuestionList[index].DictionaryCode]">
|
||||||
<el-checkbox v-if="item.value !== -1" :key="item.id" :disabled="OtherInfo.IsSign" :label="item.value">{{
|
<el-checkbox v-if="item.value !== -1" :key="item.id" :disabled="isSign" :label="item.value">{{
|
||||||
item.label }}</el-checkbox>
|
item.label }}</el-checkbox>
|
||||||
</template>
|
</template>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
<el-checkbox-group v-else v-model="QuestionList[index].grouping">
|
<el-checkbox-group v-else v-model="QuestionList[index].grouping">
|
||||||
<el-checkbox v-for="item of item.TypeValue.split('|')" :key="item" :disabled="OtherInfo.IsSign"
|
<el-checkbox v-for="item of item.TypeValue.split('|')" :key="item" :disabled="isSign"
|
||||||
:label="item">{{
|
:label="item">{{
|
||||||
item }}</el-checkbox>
|
item }}</el-checkbox>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
|
|
@ -135,7 +181,7 @@
|
||||||
.toString()
|
.toString()
|
||||||
.replaceAll(',', '|')
|
.replaceAll(',', '|')
|
||||||
}}</el-tag>
|
}}</el-tag>
|
||||||
<el-button size="mini" type="primary" :disabled="OtherInfo.IsSign" @click="addGroup2(index)">
|
<el-button size="mini" type="primary" :disabled="isSign" @click="addGroup2(index)">
|
||||||
<!-- 添加分组 -->
|
<!-- 添加分组 -->
|
||||||
{{ $t('trials:adRules:title:addGroup') }}
|
{{ $t('trials:adRules:title:addGroup') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
@ -181,7 +227,7 @@
|
||||||
)
|
)
|
||||||
" prop="JudgeDifferenceType">
|
" prop="JudgeDifferenceType">
|
||||||
<el-select v-model="QuestionList[index].JudgeDifferenceType" placeholder="请选择"
|
<el-select v-model="QuestionList[index].JudgeDifferenceType" placeholder="请选择"
|
||||||
:disabled="OtherInfo.IsSign">
|
:disabled="isSign">
|
||||||
<el-option v-for="item of $d.JudgeDifferenceType" :key="item.id" :label="item.label"
|
<el-option v-for="item of $d.JudgeDifferenceType" :key="item.id" :label="item.label"
|
||||||
:value="item.value">
|
:value="item.value">
|
||||||
</el-option>
|
</el-option>
|
||||||
|
|
@ -193,7 +239,7 @@
|
||||||
" prop="JudgeDifferenceValue">
|
" prop="JudgeDifferenceValue">
|
||||||
<div style="display: flex">
|
<div style="display: flex">
|
||||||
<el-input v-model="QuestionList[index].JudgeDifferenceValue" clearable
|
<el-input v-model="QuestionList[index].JudgeDifferenceValue" clearable
|
||||||
:disabled="OtherInfo.IsSign"></el-input>
|
:disabled="isSign"></el-input>
|
||||||
<span style="margin-left: 10px" v-if="QuestionList[index].JudgeType !== 5 && QuestionList[index].Unit !== 0">
|
<span style="margin-left: 10px" v-if="QuestionList[index].JudgeType !== 5 && QuestionList[index].Unit !== 0">
|
||||||
{{ `${QuestionList[index].Unit === 4 ? QuestionList[index].CustomUnit : $fd('ValueUnit', QuestionList[index].Unit)}`}}
|
{{ `${QuestionList[index].Unit === 4 ? QuestionList[index].CustomUnit : $fd('ValueUnit', QuestionList[index].Unit)}`}}
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -203,8 +249,6 @@
|
||||||
</div>
|
</div>
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
</el-collapse>
|
</el-collapse>
|
||||||
<!-- </el-tab-pane>-->
|
|
||||||
<!-- </el-tabs>-->
|
|
||||||
<!-- 选择答案 -->
|
<!-- 选择答案 -->
|
||||||
<el-dialog v-if="QuestionVisible" :title="$t('trials:adRules:title:selectAnswer')" :visible.sync="QuestionVisible"
|
<el-dialog v-if="QuestionVisible" :title="$t('trials:adRules:title:selectAnswer')" :visible.sync="QuestionVisible"
|
||||||
width="800px" :close-on-click-modal="false" custom-class="base-dialog-wrapper" append-to-body>
|
width="800px" :close-on-click-modal="false" custom-class="base-dialog-wrapper" append-to-body>
|
||||||
|
|
@ -212,40 +256,50 @@
|
||||||
<!-- 阅片人A -->
|
<!-- 阅片人A -->
|
||||||
<el-form-item label-width="110px" :label="$t('trials:adRules:title:answerGroupA')">
|
<el-form-item label-width="110px" :label="$t('trials:adRules:title:answerGroupA')">
|
||||||
<el-checkbox-group v-model="QuestionList[selectIndex].groupingA">
|
<el-checkbox-group v-model="QuestionList[selectIndex].groupingA">
|
||||||
<template v-for="item of QuestionList[selectIndex].TypeValue.split('|')">
|
<template v-for="item of QuestionList[selectIndex].TypeValue.split('|') || []">
|
||||||
<el-checkbox v-if="QuestionList[selectIndex].QuestionGenre !== 3" :key="item" :label="item" :disabled="QuestionList[selectIndex].groupingB.length
|
<el-checkbox
|
||||||
? ~QuestionList[selectIndex].groupingB.indexOf(item)
|
v-if="QuestionList[selectIndex].QuestionGenre !== 3"
|
||||||
: false
|
:key="item"
|
||||||
">{{ item }}</el-checkbox>
|
:label="item"
|
||||||
|
:disabled="QuestionList[selectIndex]?.groupingB?.includes(item) ?? false"
|
||||||
|
>
|
||||||
|
{{ item }}
|
||||||
|
</el-checkbox>
|
||||||
</template>
|
</template>
|
||||||
<template v-for="item of $d[QuestionList[selectIndex].DictionaryCode]">
|
<template v-for="item of $d[QuestionList[selectIndex].DictionaryCode]">
|
||||||
<el-checkbox v-if="
|
<el-checkbox
|
||||||
QuestionList[selectIndex].QuestionGenre === 3 &&
|
v-if="QuestionList[selectIndex].QuestionGenre === 3 && item.value !== -1"
|
||||||
item.value !== -1
|
:key="item.id"
|
||||||
" :key="item.id" :label="item.value" :disabled="QuestionList[selectIndex].groupingB.length
|
:label="item.value"
|
||||||
? ~QuestionList[selectIndex].groupingB.indexOf(item.value)
|
:disabled="QuestionList[selectIndex]?.groupingB?.includes(item.value) ?? false"
|
||||||
: false
|
>
|
||||||
">{{ item.label }}</el-checkbox>
|
{{ item.label }}
|
||||||
|
</el-checkbox>
|
||||||
</template>
|
</template>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- 阅片人B -->
|
<!-- 阅片人B -->
|
||||||
<el-form-item label-width="110px" :label="$t('trials:adRules:title:answerGroupB')">
|
<el-form-item label-width="110px" :label="$t('trials:adRules:title:answerGroupB')">
|
||||||
<el-checkbox-group v-model="QuestionList[selectIndex].groupingB">
|
<el-checkbox-group v-model="QuestionList[selectIndex].groupingB">
|
||||||
<template v-for="item of QuestionList[selectIndex].TypeValue.split('|')">
|
<template v-for="item of QuestionList[selectIndex].TypeValue.split('|') || []">
|
||||||
<el-checkbox v-if="QuestionList[selectIndex].QuestionGenre !== 3" :key="item" :label="item" :disabled="QuestionList[selectIndex].groupingA.length
|
<el-checkbox
|
||||||
? ~QuestionList[selectIndex].groupingA.indexOf(item)
|
v-if="QuestionList[selectIndex].QuestionGenre !== 3"
|
||||||
: false
|
:key="item"
|
||||||
">{{ item }}</el-checkbox>
|
:label="item"
|
||||||
|
:disabled="QuestionList[selectIndex]?.groupingA?.includes(item) ?? false"
|
||||||
|
>
|
||||||
|
{{ item }}
|
||||||
|
</el-checkbox>
|
||||||
</template>
|
</template>
|
||||||
<template v-for="item of $d[QuestionList[selectIndex].DictionaryCode]">
|
<template v-for="item of $d[QuestionList[selectIndex].DictionaryCode]">
|
||||||
<el-checkbox v-if="
|
<el-checkbox
|
||||||
QuestionList[selectIndex].QuestionGenre === 3 &&
|
v-if="QuestionList[selectIndex].QuestionGenre === 3 && item.value !== -1"
|
||||||
item.value !== -1
|
:key="item.id"
|
||||||
" :key="item.id" :label="item.value" :disabled="QuestionList[selectIndex].groupingA.length
|
:label="item.value"
|
||||||
? ~QuestionList[selectIndex].groupingA.indexOf(item.value)
|
:disabled="QuestionList[selectIndex]?.groupingA?.includes(item.value) ?? false"
|
||||||
: false
|
>
|
||||||
">{{ item.label }}</el-checkbox>
|
{{ item.label }}
|
||||||
|
</el-checkbox>
|
||||||
</template>
|
</template>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
@ -269,13 +323,17 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
/* eslint-disable */
|
||||||
import {
|
import {
|
||||||
getTrialConfirmCriterionList,
|
|
||||||
getTrialCriterionJudgeQuestionList,
|
getTrialCriterionJudgeQuestionList,
|
||||||
setTrialCriterionJudgeQuestionAnswerGroup,
|
setTrialCriterionJudgeQuestionAnswerGroup,
|
||||||
} from '@/api/trials/reading'
|
} from '@/api/trials/reading'
|
||||||
import { setTrialJudgyInfo, getTrialJudgyInfo } from '@/api/trials/setting'
|
import { setTrialJudgyInfo, getTrialJudgyInfo, setTrialJudgeRuleInfo } from '@/api/trials/setting'
|
||||||
|
import ArbitrationRulesByVisit from './ArbitrationRulesByVisit'
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
ArbitrationRulesByVisit,
|
||||||
|
},
|
||||||
props: {
|
props: {
|
||||||
trialReadingCriterionId: {
|
trialReadingCriterionId: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|
@ -294,9 +352,7 @@ export default {
|
||||||
activeNames: null,
|
activeNames: null,
|
||||||
indexA: null,
|
indexA: null,
|
||||||
type: null,
|
type: null,
|
||||||
OtherInfo: {
|
isSign: true,
|
||||||
IsSign: true,
|
|
||||||
},
|
|
||||||
JudgyInfo: {},
|
JudgyInfo: {},
|
||||||
JudgeDifferenceValueQRules: {
|
JudgeDifferenceValueQRules: {
|
||||||
JudgeDifferenceType: [
|
JudgeDifferenceType: [
|
||||||
|
|
@ -339,47 +395,25 @@ export default {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
judgeRuleEnum: -1,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
TrialReadingCriterionId(v) {
|
async trialReadingCriterionId(v) {
|
||||||
if (v === null) return
|
if (v === null) return
|
||||||
this.loading = true
|
await this.initData()
|
||||||
getTrialCriterionJudgeQuestionList({
|
|
||||||
TrialId: this.$route.query.trialId,
|
|
||||||
// ReadingQuestionCriterionTrialId: v,
|
|
||||||
TrialReadingCriterionId: this.trialReadingCriterionId,
|
|
||||||
})
|
|
||||||
.then((res) => {
|
|
||||||
this.loading = false
|
|
||||||
this.QuestionList = res.Result
|
|
||||||
this.OtherInfo = res.OtherInfo
|
|
||||||
this.activeNames = this.QuestionList.map(
|
|
||||||
(v) => v.ReadingQuestionTrialId
|
|
||||||
)
|
|
||||||
this.QuestionList.forEach((v) => {
|
|
||||||
this.$set(v, 'grouping', [])
|
|
||||||
this.$set(v, 'groupingA', [])
|
|
||||||
this.$set(v, 'groupingB', [])
|
|
||||||
this.$set(
|
|
||||||
v,
|
|
||||||
'AnswerGroupList',
|
|
||||||
Object.assign([], v.AnswerCombination)
|
|
||||||
)
|
|
||||||
this.$set(v, 'AnswerGroup2List', Object.assign([], v.AnswerGroup))
|
|
||||||
})
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
this.btnLoading = false
|
|
||||||
this.loading = false
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
async mounted() {
|
||||||
this.getList()
|
await this.initData()
|
||||||
this.getTrialJudgyInfo()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
async initData() {
|
||||||
|
await this.getTrialJudgyInfo()
|
||||||
|
if (this.judgeRuleEnum !== 1) {
|
||||||
|
await this.getList()
|
||||||
|
}
|
||||||
|
},
|
||||||
// 修改仲裁规则
|
// 修改仲裁规则
|
||||||
changeArbitrationRule(value) {
|
changeArbitrationRule(value) {
|
||||||
if (value !== 1) {
|
if (value !== 1) {
|
||||||
|
|
@ -387,6 +421,9 @@ export default {
|
||||||
item.JudgeDifferenceValue = 0
|
item.JudgeDifferenceValue = 0
|
||||||
item.JudgeDifferenceType = 0
|
item.JudgeDifferenceType = 0
|
||||||
})
|
})
|
||||||
|
if (this.$refs.visitRules) {
|
||||||
|
this.$refs.visitRules.changeArbitrationRule(value)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
JudgeTypeChange(value, index) {
|
JudgeTypeChange(value, index) {
|
||||||
|
|
@ -400,25 +437,25 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
saveAllSync() {
|
saveAllSync() {
|
||||||
return new Promise((resolve, reject) => {
|
if (this.judgeRuleEnum === 1 && this.$refs.visitRules) {
|
||||||
|
return this.$refs.visitRules.saveAllSync()
|
||||||
|
}
|
||||||
|
return new Promise((resolve) => {
|
||||||
var arr = []
|
var arr = []
|
||||||
this.QuestionList.forEach((v, i) => {
|
this.QuestionList.forEach((v, i) => {
|
||||||
arr.push(this.applySync(v.ReadingQuestionTrialId, i))
|
arr.push(this.applySync(v.ReadingQuestionTrialId, i))
|
||||||
})
|
})
|
||||||
Promise.all(arr)
|
Promise.all(arr)
|
||||||
.then((res) => {
|
.then(() => {
|
||||||
console.log(res)
|
|
||||||
resolve(true)
|
resolve(true)
|
||||||
})
|
})
|
||||||
.catch((res) => {
|
.catch(() => {
|
||||||
console.log('进入catch')
|
|
||||||
resolve(false)
|
resolve(false)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
applySync(ReadingQuestionTrialId, index) {
|
applySync(ReadingQuestionTrialId, index) {
|
||||||
return new Promise(async (resolve, reject) => {
|
return new Promise(async (resolve, reject) => {
|
||||||
console.log(this.QuestionList[index].JudgeType)
|
|
||||||
if (this.QuestionList[index].JudgeType === 0) {
|
if (this.QuestionList[index].JudgeType === 0) {
|
||||||
reject(false)
|
reject(false)
|
||||||
return
|
return
|
||||||
|
|
@ -442,7 +479,7 @@ export default {
|
||||||
this.QuestionList[index].JudgeType === 5
|
this.QuestionList[index].JudgeType === 5
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
let validate = await this.$refs[
|
const validate = await this.$refs[
|
||||||
'JudgeDifferenceValue' +
|
'JudgeDifferenceValue' +
|
||||||
this.QuestionList[index].JudgeType +
|
this.QuestionList[index].JudgeType +
|
||||||
index
|
index
|
||||||
|
|
@ -493,19 +530,55 @@ export default {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getTrialJudgyInfo() {
|
async getTrialJudgyInfo() {
|
||||||
|
try {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getTrialJudgyInfo({
|
const res = await getTrialJudgyInfo({
|
||||||
TrialId: this.$route.query.trialId,
|
TrialId: this.$route.query.trialId,
|
||||||
TrialReadingCriterionId: this.trialReadingCriterionId,
|
TrialReadingCriterionId: this.trialReadingCriterionId,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
|
||||||
this.JudgyInfo = res.Result
|
this.JudgyInfo = res.Result
|
||||||
|
this.judgeRuleEnum = this.JudgyInfo.JudgeRuleEnum
|
||||||
|
this.isSign = res.Result.IsSigned
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e)
|
||||||
|
} finally {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
}
|
||||||
.catch((v) => {
|
},
|
||||||
|
async saveJugeRule(showMessage = true) {
|
||||||
|
try {
|
||||||
|
this.loading = true
|
||||||
|
const prevJudgeRuleEnum = this.judgeRuleEnum
|
||||||
|
const params = {
|
||||||
|
trialReadingCriterionId: this.trialReadingCriterionId,
|
||||||
|
judgeModeEnum: this.JudgyInfo.JudgeModeEnum,
|
||||||
|
judgeRuleEnum: this.JudgyInfo.JudgeRuleEnum,
|
||||||
|
}
|
||||||
|
const res = await setTrialJudgeRuleInfo(params)
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
if (showMessage) {
|
||||||
|
this.$message.success(this.$t('common:message:savedSuccessfully'))
|
||||||
|
}
|
||||||
|
this.judgeRuleEnum = this.JudgyInfo.JudgeRuleEnum
|
||||||
|
if (prevJudgeRuleEnum !== this.judgeRuleEnum) {
|
||||||
|
if (this.judgeRuleEnum === 1) {
|
||||||
|
await this.$nextTick()
|
||||||
|
if (this.$refs.visitRules) {
|
||||||
|
await this.$refs.visitRules.initData()
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
await this.getList()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e)
|
||||||
|
return false
|
||||||
|
} finally {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
}
|
||||||
},
|
},
|
||||||
tagClose2(index, indexA) {
|
tagClose2(index, indexA) {
|
||||||
// '删除该规则组?'
|
// '删除该规则组?'
|
||||||
|
|
@ -593,7 +666,7 @@ export default {
|
||||||
AnswerCombination: [],
|
AnswerCombination: [],
|
||||||
JudgeType: 0,
|
JudgeType: 0,
|
||||||
JudgeDifferenceValue: 0,
|
JudgeDifferenceValue: 0,
|
||||||
JudgeDifferenceType: 0,
|
JudgeDifferenceType: 0
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.$set(this.QuestionList[index], 'AnswerGroup2List', [])
|
this.$set(this.QuestionList[index], 'AnswerGroup2List', [])
|
||||||
|
|
@ -635,7 +708,7 @@ export default {
|
||||||
this.QuestionList[index].JudgeType === 5
|
this.QuestionList[index].JudgeType === 5
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
let validate = await this.$refs[
|
const validate = await this.$refs[
|
||||||
'JudgeDifferenceValue' + this.QuestionList[index].JudgeType + index
|
'JudgeDifferenceValue' + this.QuestionList[index].JudgeType + index
|
||||||
][0].validate()
|
][0].validate()
|
||||||
if (!validate) return
|
if (!validate) return
|
||||||
|
|
@ -655,7 +728,7 @@ export default {
|
||||||
),
|
),
|
||||||
JudgeDifferenceType: Number(
|
JudgeDifferenceType: Number(
|
||||||
this.QuestionList[index].JudgeDifferenceType
|
this.QuestionList[index].JudgeDifferenceType
|
||||||
),
|
)
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.$message.success(this.$t('trials:adRules:message:msg9')) // '应用成功'
|
this.$message.success(this.$t('trials:adRules:message:msg9')) // '应用成功'
|
||||||
|
|
@ -672,17 +745,19 @@ export default {
|
||||||
this.CriterionList[this.index].ReadingQuestionCriterionTrialId
|
this.CriterionList[this.index].ReadingQuestionCriterionTrialId
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
|
if (this.judgeRuleEnum === 1 && this.$refs.visitRules) {
|
||||||
|
return this.$refs.visitRules.getList()
|
||||||
|
}
|
||||||
this.loading = true
|
this.loading = true
|
||||||
getTrialCriterionJudgeQuestionList({
|
return getTrialCriterionJudgeQuestionList({
|
||||||
TrialId: this.$route.query.trialId,
|
TrialId: this.$route.query.trialId,
|
||||||
TrialReadingCriterionId: this.trialReadingCriterionId,
|
TrialReadingCriterionId: this.trialReadingCriterionId,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.QuestionList = res.Result
|
this.QuestionList = res.Result
|
||||||
this.OtherInfo = res.OtherInfo
|
|
||||||
this.activeNames = this.QuestionList.map(
|
this.activeNames = this.QuestionList.map(
|
||||||
(v) => v.ReadingQuestionTrialId
|
(item) => item.ReadingQuestionTrialId
|
||||||
)
|
)
|
||||||
this.QuestionList.forEach((v) => {
|
this.QuestionList.forEach((v) => {
|
||||||
this.$set(v, 'grouping', [])
|
this.$set(v, 'grouping', [])
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,632 @@
|
||||||
|
<template>
|
||||||
|
<div v-loading="loading">
|
||||||
|
<el-tabs v-model="activeVisitTab" class="visit-tabs" type="border-card">
|
||||||
|
<el-tab-pane v-for="visit in visitPlanOptions" :key="visit.Id"
|
||||||
|
:label="visit.VisitName" :name="visit.Id">
|
||||||
|
<el-collapse v-if="questionListMap[visit.Id]" v-model="visitActiveNamesMap[visit.Id]" style="border-top:none;">
|
||||||
|
<el-collapse-item v-for="(item, index) of questionListMap[visit.Id]"
|
||||||
|
:key="item.ReadingQuestionTrialId"
|
||||||
|
style="position: relative;padding:0 10px;" :name="item.ReadingQuestionTrialId">
|
||||||
|
<div slot="title">
|
||||||
|
{{ item.PageName }}Q{{ index + 1 }}:{{ item.QuestionName }}
|
||||||
|
</div>
|
||||||
|
<div style="position: relative">
|
||||||
|
<el-button v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']"
|
||||||
|
style="position: absolute; right: 0; top: 0; z-index: 10" size="mini" type="primary"
|
||||||
|
:disabled="isSign"
|
||||||
|
@click="visitApply(item.ReadingQuestionTrialId, index, visit.Id, visit.VisitNum)">{{ $t('common:button:save')
|
||||||
|
}}</el-button>
|
||||||
|
<el-button v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']"
|
||||||
|
style="position: absolute; right: 60px; top: 0; z-index: 10" size="mini" type="primary"
|
||||||
|
:disabled="isSign"
|
||||||
|
@click="visitReset(item.ReadingQuestionTrialId, index, visit.Id, visit.VisitNum)">{{ $t('common:button:reset')
|
||||||
|
}}</el-button>
|
||||||
|
<el-form-item :label-width="'280px'" :label="$t('trials:adRules:title:judgeTypeEnum')" style="width: 95%">
|
||||||
|
<el-radio-group
|
||||||
|
v-model="questionListMap[visit.Id][index].JudgeType"
|
||||||
|
@input="(val) => visitJudgeTypeChange(val, index, visit.Id)"
|
||||||
|
>
|
||||||
|
<template v-for="judgeTypeItem of $d.JudgeTypeEnum">
|
||||||
|
<el-radio
|
||||||
|
style="margin-bottom: 5px"
|
||||||
|
:key="judgeTypeItem.id"
|
||||||
|
:disabled="isSign || !hasPermi(['trials:trials-panel:setting:reading-unit:edit'])"
|
||||||
|
:label="judgeTypeItem.value"
|
||||||
|
v-if="
|
||||||
|
(['number', 'calculation'].includes(questionListMap[visit.Id][index].Type)
|
||||||
|
? [1, 4, 5, 6]
|
||||||
|
: [1, 2, 3, 6]
|
||||||
|
).includes(judgeTypeItem.value)
|
||||||
|
"
|
||||||
|
>
|
||||||
|
{{ judgeTypeItem.label }}
|
||||||
|
</el-radio>
|
||||||
|
</template>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div v-if="questionListMap[visit.Id][index].JudgeType === 3" style="text-align: right; margin: 10px 0">
|
||||||
|
<el-button v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']" size="mini" type="primary"
|
||||||
|
:disabled="isSign"
|
||||||
|
@click="visitAddGroup(index, null, visit.Id)">{{ $t('trials:adRules:button:addRule')
|
||||||
|
}}</el-button>
|
||||||
|
</div>
|
||||||
|
<el-table v-if="questionListMap[visit.Id][index].JudgeType === 3" v-loading="loading"
|
||||||
|
:data="questionListMap[visit.Id][index].AnswerGroupList" border stripe>
|
||||||
|
<el-table-column prop="AnswerGroupA" :label="$t('trials:adRules:title:order')" width="160">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.$index + 1 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="AnswerGroupA" :label="$t('trials:adRules:title:answerGroupA')" min-width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{
|
||||||
|
questionListMap[visit.Id][index].QuestionGenre === 3
|
||||||
|
? scope.row.AnswerGroupA.map((v) =>
|
||||||
|
$fd(questionListMap[visit.Id][index].DictionaryCode, parseInt(v))
|
||||||
|
).toString()
|
||||||
|
: scope.row.AnswerGroupA.toString()
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="AnswerGroupB" :label="$t('trials:adRules:title:answerGroupB')" min-width="100">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{
|
||||||
|
questionListMap[visit.Id][index].QuestionGenre === 3
|
||||||
|
? scope.row.AnswerGroupB.map((v) =>
|
||||||
|
$fd(questionListMap[visit.Id][index].DictionaryCode, parseInt(v))
|
||||||
|
).toString()
|
||||||
|
: scope.row.AnswerGroupB.toString()
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="AnswerGroupB" :label="$t('common:action:action')" min-width="80">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button icon="el-icon-edit" circle :title="$t('common:button:edit')" size="mini"
|
||||||
|
:disabled="isSign"
|
||||||
|
@click="visitAddGroup(index, scope.$index, visit.Id)" />
|
||||||
|
<el-button icon="el-icon-delete" circle :title="$t('common:button:delete')" size="mini"
|
||||||
|
:disabled="isSign"
|
||||||
|
@click="visitTagClose(index, scope.$index, visit.Id)" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div v-if="questionListMap[visit.Id][index].JudgeType === 2">
|
||||||
|
<div style="
|
||||||
|
background: #f6f6f6;
|
||||||
|
border-radius: 20px;
|
||||||
|
padding: 15px 20px;
|
||||||
|
margin-top: 10px;
|
||||||
|
">
|
||||||
|
<el-checkbox-group v-if="questionListMap[visit.Id][index].QuestionGenre === 3"
|
||||||
|
v-model="questionListMap[visit.Id][index].grouping"
|
||||||
|
>
|
||||||
|
<template v-for="dictItem of $d[questionListMap[visit.Id][index].DictionaryCode]">
|
||||||
|
<el-checkbox v-if="dictItem.value !== -1" :key="dictItem.id" :disabled="isSign"
|
||||||
|
:label="dictItem.value">{{ dictItem.label }}</el-checkbox>
|
||||||
|
</template>
|
||||||
|
</el-checkbox-group>
|
||||||
|
<el-checkbox-group v-else v-model="questionListMap[visit.Id][index].grouping">
|
||||||
|
<el-checkbox v-for="answerItem of item.TypeValue.split('|')" :key="answerItem"
|
||||||
|
:disabled="isSign" :label="answerItem">{{ answerItem }}</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
|
<div style="margin-top: 20px">
|
||||||
|
{{ $t('trials:adRules:title:selectAnswerGroup') }}
|
||||||
|
<el-tag v-if="
|
||||||
|
questionListMap[visit.Id][index].grouping.length > 0 &&
|
||||||
|
questionListMap[visit.Id][index].QuestionGenre !== 3
|
||||||
|
">{{
|
||||||
|
questionListMap[visit.Id][index].grouping.toString().replaceAll(',', '|')
|
||||||
|
}}</el-tag>
|
||||||
|
<el-tag v-if="
|
||||||
|
questionListMap[visit.Id][index].grouping.length > 0 &&
|
||||||
|
questionListMap[visit.Id][index].QuestionGenre === 3
|
||||||
|
">{{
|
||||||
|
questionListMap[visit.Id][index].grouping
|
||||||
|
.map(
|
||||||
|
(v) =>
|
||||||
|
$d[questionListMap[visit.Id][index].DictionaryCode].find(
|
||||||
|
(v1) => v1.value === v
|
||||||
|
).label
|
||||||
|
)
|
||||||
|
.toString()
|
||||||
|
.replaceAll(',', '|')
|
||||||
|
}}</el-tag>
|
||||||
|
<el-button size="mini" type="primary" :disabled="isSign"
|
||||||
|
@click="visitAddGroup2(index, visit.Id)">
|
||||||
|
{{ $t('trials:adRules:title:addGroup') }}</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="questionListMap[visit.Id][index].QuestionGenre !== 3" style="margin-top: 20px">
|
||||||
|
{{ $t('trials:adRules:title:group') }}
|
||||||
|
<el-tag v-for="(itemA, indexA) of questionListMap[visit.Id][index].AnswerGroup2List"
|
||||||
|
:key="itemA" closable
|
||||||
|
style="margin-right: 10px" @close="() => visitTagClose2(index, indexA, visit.Id)">{{ itemA }}</el-tag>
|
||||||
|
</div>
|
||||||
|
<div v-if="questionListMap[visit.Id][index].QuestionGenre === 3" style="margin-top: 20px">
|
||||||
|
{{ $t('trials:adRules:title:group') }}
|
||||||
|
<el-tag v-for="(itemA, indexA) of questionListMap[visit.Id][index].AnswerGroup2List"
|
||||||
|
:key="itemA" closable
|
||||||
|
style="margin-right: 10px" @close="() => visitTagClose2(index, indexA, visit.Id)">
|
||||||
|
{{
|
||||||
|
itemA
|
||||||
|
.split('|')
|
||||||
|
.map((v) =>
|
||||||
|
$fd(questionListMap[visit.Id][index].DictionaryCode, parseInt(v))
|
||||||
|
)
|
||||||
|
.join('|')
|
||||||
|
}}
|
||||||
|
</el-tag>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="
|
||||||
|
questionListMap[visit.Id][index].JudgeType === 4 ||
|
||||||
|
questionListMap[visit.Id][index].JudgeType === 5
|
||||||
|
">
|
||||||
|
<el-form :inline="true" :model="questionListMap[visit.Id][index]" class="demo-form-inline"
|
||||||
|
:ref="`JudgeDifferenceValue${questionListMap[visit.Id][index].JudgeType}_${visit.Id}_${index}`"
|
||||||
|
:rules="JudgeDifferenceValueQRules">
|
||||||
|
<el-form-item :label="$t(
|
||||||
|
`trials:trials-panel:setting:reading-unit:JudgeDifferenceType`
|
||||||
|
)
|
||||||
|
" prop="JudgeDifferenceType">
|
||||||
|
<el-select
|
||||||
|
v-model="questionListMap[visit.Id][index].JudgeDifferenceType"
|
||||||
|
:disabled="isSign">
|
||||||
|
<el-option v-for="judgeDiffItem of $d.JudgeDifferenceType" :key="judgeDiffItem.id"
|
||||||
|
:label="judgeDiffItem.label" :value="judgeDiffItem.value">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item :label="$t(
|
||||||
|
`trials:trials-panel:setting:reading-unit:JudgeDifferenceValue${questionListMap[visit.Id][index].JudgeType}`
|
||||||
|
)
|
||||||
|
" prop="JudgeDifferenceValue">
|
||||||
|
<div style="display: flex">
|
||||||
|
<el-input v-model="questionListMap[visit.Id][index].JudgeDifferenceValue" clearable
|
||||||
|
:disabled="isSign"></el-input>
|
||||||
|
<span style="margin-left: 10px"
|
||||||
|
v-if="questionListMap[visit.Id][index].JudgeType !== 5 && questionListMap[visit.Id][index].Unit !== 0">
|
||||||
|
{{ `${questionListMap[visit.Id][index].Unit === 4 ? questionListMap[visit.Id][index].CustomUnit : $fd('ValueUnit', questionListMap[visit.Id][index].Unit)}` }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</el-collapse-item>
|
||||||
|
</el-collapse>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
<el-dialog v-if="questionVisible" :title="$t('trials:adRules:title:selectAnswer')" :visible.sync="questionVisible"
|
||||||
|
width="800px" :close-on-click-modal="false" custom-class="base-dialog-wrapper" append-to-body>
|
||||||
|
<div class="base-dialog-body">
|
||||||
|
<el-form-item label-width="110px" :label="$t('trials:adRules:title:answerGroupA')">
|
||||||
|
<el-checkbox-group v-model="questionList[selectIndex].groupingA">
|
||||||
|
<template v-for="item of questionList[selectIndex].TypeValue.split('|') || []">
|
||||||
|
<el-checkbox
|
||||||
|
v-if="questionList[selectIndex].QuestionGenre !== 3"
|
||||||
|
:key="item"
|
||||||
|
:label="item"
|
||||||
|
:disabled="questionList[selectIndex]?.groupingB?.includes(item) ?? false"
|
||||||
|
>
|
||||||
|
{{ item }}
|
||||||
|
</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<template v-for="item of $d[questionList[selectIndex].DictionaryCode]">
|
||||||
|
<el-checkbox
|
||||||
|
v-if="questionList[selectIndex].QuestionGenre === 3 && item.value !== -1"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.value"
|
||||||
|
:disabled="questionList[selectIndex]?.groupingB?.includes(item.value) ?? false"
|
||||||
|
>{{ item.label }}</el-checkbox>
|
||||||
|
</template>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label-width="110px" :label="$t('trials:adRules:title:answerGroupB')">
|
||||||
|
<el-checkbox-group v-model="questionList[selectIndex].groupingB">
|
||||||
|
<template v-for="item of questionList[selectIndex].TypeValue.split('|') || []">
|
||||||
|
<el-checkbox
|
||||||
|
v-if="questionList[selectIndex].QuestionGenre !== 3"
|
||||||
|
:key="item"
|
||||||
|
:label="item"
|
||||||
|
:disabled="questionList[selectIndex]?.groupingA?.includes(item) ?? false"
|
||||||
|
>
|
||||||
|
{{ item }}
|
||||||
|
</el-checkbox>
|
||||||
|
</template>
|
||||||
|
<template v-for="item of $d[questionList[selectIndex].DictionaryCode]">
|
||||||
|
<el-checkbox
|
||||||
|
v-if="questionList[selectIndex].QuestionGenre === 3 && item.value !== -1"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.value"
|
||||||
|
:disabled="questionList[selectIndex]?.groupingA?.includes(item.value) ?? false"
|
||||||
|
>
|
||||||
|
{{ item.label }}
|
||||||
|
</el-checkbox>
|
||||||
|
</template>
|
||||||
|
</el-checkbox-group>
|
||||||
|
</el-form-item>
|
||||||
|
</div>
|
||||||
|
<div class="base-dialog-footer" style="text-align: right; margin-top: 10px">
|
||||||
|
<el-button v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']" :disabled="btnLoading" size="small"
|
||||||
|
type="primary" @click="
|
||||||
|
questionVisible = false
|
||||||
|
$set(questionList[selectIndex], 'groupingA', [])
|
||||||
|
$set(questionList[selectIndex], 'groupingB', [])
|
||||||
|
">
|
||||||
|
{{ $t('common:button:cancel') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']" :disabled="btnLoading" size="small"
|
||||||
|
type="primary" @click="save">
|
||||||
|
{{ $t('common:button:save') }}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
/* eslint-disable */
|
||||||
|
import {
|
||||||
|
getTrialQuestionVisitJudgeRule,
|
||||||
|
setTrialQuestionVisitJudgeRule,
|
||||||
|
} from '@/api/trials/reading'
|
||||||
|
import { getTrialVisitStageSelect } from '@/api/trials'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
trialReadingCriterionId: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
isSign: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
btnLoading: false,
|
||||||
|
loading: false,
|
||||||
|
activeVisitTab: '',
|
||||||
|
visitActiveNamesMap: {},
|
||||||
|
questionListMap: {},
|
||||||
|
visitPlanOptions: [],
|
||||||
|
questionVisible: false,
|
||||||
|
selectIndex: 0,
|
||||||
|
indexA: null,
|
||||||
|
selectVisitKey: '',
|
||||||
|
type: null,
|
||||||
|
OtherInfo: {
|
||||||
|
IsSign: true,
|
||||||
|
},
|
||||||
|
JudgeDifferenceValueQRules: {
|
||||||
|
JudgeDifferenceType: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t(
|
||||||
|
'trials:trials-list:setitng:JudgeDifferenceTypeRequired'
|
||||||
|
),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
JudgeDifferenceValue: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: this.$t(
|
||||||
|
'trials:trials-list:setitng:JudgeDifferenceValueRequired'
|
||||||
|
),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
pattern: /^[0-9]+(.[0-9]{2})?$/,
|
||||||
|
message: this.$t('trials:trials-list:setitng:JudgeDifferenceValue'),
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
validator: (rule, value, callback) => {
|
||||||
|
if (value <= 0) {
|
||||||
|
callback(
|
||||||
|
new Error(
|
||||||
|
this.$t(
|
||||||
|
'trials:trials-list:setitng:JudgeDifferenceValueMin'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
callback()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
trigger: 'blur',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
questionList() {
|
||||||
|
return this.questionListMap[this.selectVisitKey]
|
||||||
|
},
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
async activeVisitTab(v) {
|
||||||
|
if (!v) return
|
||||||
|
if (this.questionListMap[v]) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
await this.getList(v)
|
||||||
|
},
|
||||||
|
},
|
||||||
|
async mounted() {
|
||||||
|
await this.initData()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async initData() {
|
||||||
|
this.questionListMap = {}
|
||||||
|
this.visitActiveNamesMap = {}
|
||||||
|
this.activeVisitTab = ''
|
||||||
|
await this.getVisitPlanOptions()
|
||||||
|
},
|
||||||
|
normalizeQuestionList(questionList = []) {
|
||||||
|
return questionList.map((item) => ({
|
||||||
|
...item,
|
||||||
|
grouping: [],
|
||||||
|
groupingA: [],
|
||||||
|
groupingB: [],
|
||||||
|
AnswerGroupList: Array.isArray(item.AnswerCombination)
|
||||||
|
? item.AnswerCombination.map((group) => ({
|
||||||
|
...group,
|
||||||
|
AnswerGroupA: Array.isArray(group.AnswerGroupA)
|
||||||
|
? [...group.AnswerGroupA]
|
||||||
|
: group.AnswerGroupA,
|
||||||
|
AnswerGroupB: Array.isArray(group.AnswerGroupB)
|
||||||
|
? [...group.AnswerGroupB]
|
||||||
|
: group.AnswerGroupB
|
||||||
|
}))
|
||||||
|
: [],
|
||||||
|
AnswerGroup2List: Array.isArray(item.AnswerGroup)
|
||||||
|
? [...item.AnswerGroup]
|
||||||
|
: []
|
||||||
|
}))
|
||||||
|
},
|
||||||
|
async getVisitPlanOptions() {
|
||||||
|
try {
|
||||||
|
const trialId = this.$route.query.trialId
|
||||||
|
const res = await getTrialVisitStageSelect(trialId)
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.visitPlanOptions = res.Result || []
|
||||||
|
if (!this.activeVisitTab && this.visitPlanOptions.length > 0) {
|
||||||
|
this.activeVisitTab = this.visitPlanOptions[0].Id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getVisitById(visitKey) {
|
||||||
|
return this.visitPlanOptions.find((visit) => visit.Id === visitKey)
|
||||||
|
},
|
||||||
|
async getList(visitKey = this.activeVisitTab) {
|
||||||
|
const visit = this.getVisitById(visitKey)
|
||||||
|
if (!visit) return
|
||||||
|
try {
|
||||||
|
this.loading = true
|
||||||
|
let params = {
|
||||||
|
trialId: this.$route.query.trialId,
|
||||||
|
trialReadingCriterionId: this.trialReadingCriterionId,
|
||||||
|
visitNum: visit.VisitNum
|
||||||
|
}
|
||||||
|
const res = await getTrialQuestionVisitJudgeRule(params)
|
||||||
|
const questionList = this.normalizeQuestionList(res.Result)
|
||||||
|
this.$set(this.questionListMap, visitKey, questionList)
|
||||||
|
this.$set(
|
||||||
|
this.visitActiveNamesMap,
|
||||||
|
visitKey,
|
||||||
|
questionList.map((item) => item.ReadingQuestionTrialId)
|
||||||
|
)
|
||||||
|
} catch (e) {
|
||||||
|
console.log(e)
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
changeArbitrationRule(value) {
|
||||||
|
if (value !== 1) {
|
||||||
|
Object.values(this.questionListMap).forEach((questionList) => {
|
||||||
|
questionList.forEach((item) => {
|
||||||
|
item.JudgeDifferenceValue = 0
|
||||||
|
item.JudgeDifferenceType = 0
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
visitJudgeTypeChange(value, index, visitKey) {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
if (value === 4 || value === 5) {
|
||||||
|
const refName = `JudgeDifferenceValue${value}_${visitKey}_${index}`
|
||||||
|
if (this.$refs[refName] && this.$refs[refName][0]) {
|
||||||
|
this.$refs[refName][0].resetFields()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
saveAllSync() {
|
||||||
|
return Promise.resolve(true)
|
||||||
|
},
|
||||||
|
save() {
|
||||||
|
const questionList = this.questionList
|
||||||
|
let index = this.selectIndex
|
||||||
|
let indexA = this.indexA
|
||||||
|
if (questionList[index].groupingA.length === 0) {
|
||||||
|
this.$alert(this.$t('trials:adRules:message:msg2'))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (questionList[index].groupingB.length === 0) {
|
||||||
|
this.$alert(this.$t('trials:adRules:message:msg3'))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (this.type === 'add') {
|
||||||
|
questionList[index].AnswerGroupList.push({
|
||||||
|
AnswerGroupA: questionList[index].groupingA,
|
||||||
|
AnswerGroupB: questionList[index].groupingB
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
this.$set(
|
||||||
|
questionList[index].AnswerGroupList[indexA],
|
||||||
|
'AnswerGroupA',
|
||||||
|
questionList[index].groupingA
|
||||||
|
)
|
||||||
|
this.$set(
|
||||||
|
questionList[index].AnswerGroupList[indexA],
|
||||||
|
'AnswerGroupB',
|
||||||
|
questionList[index].groupingB
|
||||||
|
)
|
||||||
|
}
|
||||||
|
this.$set(questionList[index], 'groupingA', [])
|
||||||
|
this.$set(questionList[index], 'groupingB', [])
|
||||||
|
this.$message.success(this.$t('trials:adRules:message:msg4'))
|
||||||
|
this.questionVisible = false
|
||||||
|
},
|
||||||
|
visitTagClose2(index, indexA, visitKey) {
|
||||||
|
this.$confirm(this.$t('trials:adRules:message:msg1')).then(() => {
|
||||||
|
this.questionListMap[visitKey][index].AnswerGroup2List.splice(indexA, 1)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
visitTagClose(index, indexA, visitKey) {
|
||||||
|
this.$confirm(this.$t('trials:adRules:message:msg1')).then(() => {
|
||||||
|
this.questionListMap[visitKey][index].AnswerGroupList.splice(indexA, 1)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
visitAddGroup2(index, visitKey) {
|
||||||
|
const questionList = this.questionListMap[visitKey]
|
||||||
|
if (questionList[index].grouping.length === 0) {
|
||||||
|
this.$alert(this.$t('trials:adRules:message:msg5'))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
let grouping = questionList[index].grouping
|
||||||
|
.toString()
|
||||||
|
.replaceAll(',', '|')
|
||||||
|
questionList[index].AnswerGroup2List.push(`|${grouping}|`)
|
||||||
|
this.$set(questionList[index], 'grouping', [])
|
||||||
|
},
|
||||||
|
visitAddGroup(index, indexA, visitKey) {
|
||||||
|
const questionList = this.questionListMap[visitKey]
|
||||||
|
this.selectIndex = index
|
||||||
|
this.selectVisitKey = visitKey
|
||||||
|
this.type = 'add'
|
||||||
|
if (indexA !== null) {
|
||||||
|
this.indexA = indexA
|
||||||
|
this.type = 'edit'
|
||||||
|
this.$set(
|
||||||
|
questionList[index],
|
||||||
|
'groupingA',
|
||||||
|
questionList[index].AnswerGroupList[indexA].AnswerGroupA
|
||||||
|
)
|
||||||
|
this.$set(
|
||||||
|
questionList[index],
|
||||||
|
'groupingB',
|
||||||
|
questionList[index].AnswerGroupList[indexA].AnswerGroupB
|
||||||
|
)
|
||||||
|
}
|
||||||
|
this.questionVisible = true
|
||||||
|
},
|
||||||
|
async visitReset(ReadingQuestionTrialId, index, visitKey, visitNum) {
|
||||||
|
const questionList = this.questionListMap[visitKey]
|
||||||
|
this.btnLoading = true
|
||||||
|
this.loading = true
|
||||||
|
try {
|
||||||
|
await this.$confirm(this.$t('trials:adRules:message:msg6'))
|
||||||
|
const params = {
|
||||||
|
TrialReadingCriterionId: this.trialReadingCriterionId,
|
||||||
|
VisitNum: visitNum,
|
||||||
|
QuestionList: [
|
||||||
|
{
|
||||||
|
ReadingQuestionTrialId: ReadingQuestionTrialId,
|
||||||
|
AnswerGroup: [],
|
||||||
|
AnswerCombination: [],
|
||||||
|
JudgeType: 0,
|
||||||
|
JudgeDifferenceValue: 0,
|
||||||
|
JudgeDifferenceType: 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
await setTrialQuestionVisitJudgeRule(params)
|
||||||
|
this.$set(questionList[index], 'AnswerGroup2List', [])
|
||||||
|
this.$set(questionList[index], 'AnswerGroupList', [])
|
||||||
|
this.$set(questionList[index], 'JudgeType', 0)
|
||||||
|
this.$set(questionList[index], 'JudgeDifferenceValue', 0)
|
||||||
|
this.$set(questionList[index], 'JudgeDifferenceType', 0)
|
||||||
|
|
||||||
|
this.$message.success(this.$t('trials:adRules:message:msg7'))
|
||||||
|
} catch(e) {
|
||||||
|
console.log(e)
|
||||||
|
} finally {
|
||||||
|
this.btnLoading = false
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async visitApply(ReadingQuestionTrialId, index, visitKey, visitNum) {
|
||||||
|
try {
|
||||||
|
const questionList = this.questionListMap[visitKey]
|
||||||
|
if (questionList[index].JudgeType === 0) {
|
||||||
|
this.$alert(this.$t('trials:adRules:message:msg8'))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
questionList[index].JudgeType === 2 &&
|
||||||
|
questionList[index].AnswerGroup2List.length === 0
|
||||||
|
) {
|
||||||
|
this.$alert(this.$t('trials:adRules:message:msg8'))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
questionList[index].JudgeType === 3 &&
|
||||||
|
questionList[index].AnswerGroupList.length === 0
|
||||||
|
) {
|
||||||
|
this.$alert(this.$t('trials:adRules:message:msg8'))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (
|
||||||
|
questionList[index].JudgeType === 4 ||
|
||||||
|
questionList[index].JudgeType === 5
|
||||||
|
) {
|
||||||
|
const refName = `JudgeDifferenceValue${questionList[index].JudgeType}_${visitKey}_${index}`
|
||||||
|
const validate = await this.$refs[refName][0].validate()
|
||||||
|
if (!validate) return
|
||||||
|
}
|
||||||
|
this.btnLoading = true
|
||||||
|
this.loading = true
|
||||||
|
let params = {
|
||||||
|
TrialReadingCriterionId: this.trialReadingCriterionId,
|
||||||
|
VisitNum: visitNum,
|
||||||
|
QuestionList: [
|
||||||
|
{
|
||||||
|
ReadingQuestionTrialId: ReadingQuestionTrialId,
|
||||||
|
AnswerGroup: questionList[index].AnswerGroup2List,
|
||||||
|
AnswerCombination: questionList[index].AnswerGroupList,
|
||||||
|
JudgeType: questionList[index].JudgeType,
|
||||||
|
JudgeDifferenceValue: questionList[index].JudgeDifferenceValue,
|
||||||
|
JudgeDifferenceType: questionList[index].JudgeDifferenceType
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
let res = await setTrialQuestionVisitJudgeRule(params)
|
||||||
|
if (res.IsSuccess) {
|
||||||
|
this.$message.success(this.$t('trials:adRules:message:msg9'))
|
||||||
|
}
|
||||||
|
} catch(e) {
|
||||||
|
console.log(e)
|
||||||
|
} finally {
|
||||||
|
this.btnLoading = false
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.visit-tabs ::v-deep .el-tabs__content {
|
||||||
|
min-height: 520px;
|
||||||
|
padding-top: 20px !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -240,7 +240,6 @@ export default {
|
||||||
if (ReadingTool === 3) {
|
if (ReadingTool === 3) {
|
||||||
this.readingSegmentTools = getCustomizeStandardsSegmentDicomTools(readingSegmentTools)
|
this.readingSegmentTools = getCustomizeStandardsSegmentDicomTools(readingSegmentTools)
|
||||||
}
|
}
|
||||||
console.log(this.readingSegmentTools, 'this.readingSegmentTools')
|
|
||||||
},
|
},
|
||||||
setIsClinicalReading(isClinicalReading) {
|
setIsClinicalReading(isClinicalReading) {
|
||||||
this.isClinicalReading = isClinicalReading;
|
this.isClinicalReading = isClinicalReading;
|
||||||
|
|
@ -300,11 +299,15 @@ export default {
|
||||||
this.$refs["arbitrationRules" + this.TrialReadingCriterionId]
|
this.$refs["arbitrationRules" + this.TrialReadingCriterionId]
|
||||||
.length
|
.length
|
||||||
) {
|
) {
|
||||||
var arbitrationRules = await this.$refs[
|
const arbitrationRulesRef = this.$refs[
|
||||||
"arbitrationRules" + this.TrialReadingCriterionId
|
"arbitrationRules" + this.TrialReadingCriterionId
|
||||||
][0].saveAllSync();
|
][0];
|
||||||
|
var judgeRuleSaved = await arbitrationRulesRef.saveJugeRule(false);
|
||||||
|
var arbitrationRules = judgeRuleSaved
|
||||||
|
? await arbitrationRulesRef.saveAllSync()
|
||||||
|
: false;
|
||||||
isCheckList.push({
|
isCheckList.push({
|
||||||
isCheck: arbitrationRules,
|
isCheck: judgeRuleSaved && arbitrationRules,
|
||||||
msg: this.$t("trials:readingUnit:adRules"), // '仲裁规则'
|
msg: this.$t("trials:readingUnit:adRules"), // '仲裁规则'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue