Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
a0ec36ac28
|
@ -4,36 +4,94 @@
|
||||||
<template>
|
<template>
|
||||||
<el-form v-loading="loading">
|
<el-form v-loading="loading">
|
||||||
<!-- 仲裁对象 -->
|
<!-- 仲裁对象 -->
|
||||||
<el-form-item :label="$t('trials:adRules:title:arbitrationRule')" :label-width="'180px'">
|
<el-form-item
|
||||||
<el-radio-group v-model="JudgyInfo.ArbitrationRule" :disabled="OtherInfo.IsSign">
|
:label="$t('trials:adRules:title:arbitrationRule')"
|
||||||
|
:label-width="'180px'"
|
||||||
|
>
|
||||||
|
<el-radio-group
|
||||||
|
v-model="JudgyInfo.ArbitrationRule"
|
||||||
|
:disabled="OtherInfo.IsSign"
|
||||||
|
>
|
||||||
<el-radio
|
<el-radio
|
||||||
v-for="item of $d.ArbitrationRule"
|
v-for="item of $d.ArbitrationRule"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:disabled="!JudgyInfo.IsReadingTaskViewInOrder || true"
|
:disabled="!JudgyInfo.IsReadingTaskViewInOrder || true"
|
||||||
:label="item.value"
|
: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">
|
<el-collapse v-model="activeNames">
|
||||||
<el-collapse-item v-for="(item, index) of QuestionList" :key="item.ReadingQuestionTrialId" style="position: relative" :name="item.ReadingQuestionTrialId">
|
<el-collapse-item
|
||||||
|
v-for="(item, index) of QuestionList"
|
||||||
|
:key="item.ReadingQuestionTrialId"
|
||||||
|
style="position: relative"
|
||||||
|
:name="item.ReadingQuestionTrialId"
|
||||||
|
>
|
||||||
<div slot="title">
|
<div slot="title">
|
||||||
{{ item.PageName }}Q{{ index + 1 }}:{{ item.QuestionName }}
|
{{ item.PageName }}Q{{ index + 1 }}:{{ item.QuestionName }}
|
||||||
</div>
|
</div>
|
||||||
<div style="position: relative">
|
<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="OtherInfo.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']" 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') }}</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="OtherInfo.IsSign"
|
||||||
|
@click="apply(item.ReadingQuestionTrialId, index)"
|
||||||
|
>{{ $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="OtherInfo.IsSign"
|
||||||
|
@click="reset(item.ReadingQuestionTrialId, index)"
|
||||||
|
>{{ $t("common:button:reset") }}</el-button
|
||||||
|
>
|
||||||
<!-- 产生裁判阅片的条件 -->
|
<!-- 产生裁判阅片的条件 -->
|
||||||
<el-form-item :label-width="'280px'" :label="$t('trials:adRules:title:judgeTypeEnum')">
|
<el-form-item
|
||||||
<el-radio-group v-model="QuestionList[index].JudgeType" @input="(val)=>JudgeTypeChange(val,index)">
|
:label-width="'280px'"
|
||||||
<el-radio v-for="item of $d.JudgeTypeEnum" :key="item.id" :disabled="OtherInfo.IsSign || !hasPermi(['trials:trials-panel:setting:reading-unit:edit'])" :label="item.value">{{ item.label }}</el-radio>
|
:label="$t('trials:adRules:title:judgeTypeEnum')"
|
||||||
|
>
|
||||||
|
<el-radio-group
|
||||||
|
v-model="QuestionList[index].JudgeType"
|
||||||
|
@input="(val) => JudgeTypeChange(val, index)"
|
||||||
|
>
|
||||||
|
<template v-for="item of $d.JudgeTypeEnum">
|
||||||
|
<el-radio
|
||||||
|
:key="item.id"
|
||||||
|
:disabled="
|
||||||
|
OtherInfo.IsSign ||
|
||||||
|
!hasPermi(['trials:trials-panel:setting:reading-unit:edit'])
|
||||||
|
"
|
||||||
|
:label="item.value"
|
||||||
|
v-if="
|
||||||
|
JudgyInfo.ArbitrationRule === 1 ||
|
||||||
|
(item.value !== 4 && item.value !== 5)
|
||||||
|
"
|
||||||
|
>{{ item.label }}</el-radio
|
||||||
|
>
|
||||||
|
</template>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<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" :disabled="OtherInfo.IsSign" @click="addGroup(index, null)">{{ $t('trials:adRules:button:addRule') }}</el-button>
|
<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") }}</el-button
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<el-table
|
<el-table
|
||||||
v-if="QuestionList[index].JudgeType === 3"
|
v-if="QuestionList[index].JudgeType === 3"
|
||||||
|
@ -59,7 +117,13 @@
|
||||||
min-width="100"
|
min-width="100"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ QuestionList[index].QuestionGenre === 3 ? scope.row.AnswerGroupA.map(v => $fd(QuestionList[index].DictionaryCode, parseInt(v))).toString() : scope.row.AnswerGroupA.toString() }}
|
{{
|
||||||
|
QuestionList[index].QuestionGenre === 3
|
||||||
|
? scope.row.AnswerGroupA.map((v) =>
|
||||||
|
$fd(QuestionList[index].DictionaryCode, parseInt(v))
|
||||||
|
).toString()
|
||||||
|
: scope.row.AnswerGroupA.toString()
|
||||||
|
}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<!-- 阅片人B -->
|
<!-- 阅片人B -->
|
||||||
|
@ -69,7 +133,13 @@
|
||||||
min-width="100"
|
min-width="100"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ QuestionList[index].QuestionGenre === 3 ? scope.row.AnswerGroupB.map(v => $fd(QuestionList[index].DictionaryCode, parseInt(v))).toString() : scope.row.AnswerGroupB.toString() }}
|
{{
|
||||||
|
QuestionList[index].QuestionGenre === 3
|
||||||
|
? scope.row.AnswerGroupB.map((v) =>
|
||||||
|
$fd(QuestionList[index].DictionaryCode, parseInt(v))
|
||||||
|
).toString()
|
||||||
|
: scope.row.AnswerGroupB.toString()
|
||||||
|
}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
|
@ -100,39 +170,151 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<div v-if="QuestionList[index].JudgeType === 2">
|
<div v-if="QuestionList[index].JudgeType === 2">
|
||||||
<div style="background: #f6f6f6;border-radius: 20px;padding: 15px 20px;margin-top: 10px;">
|
<div
|
||||||
<el-checkbox-group v-if="QuestionList[index].QuestionGenre === 3" v-model="QuestionList[index].grouping">
|
style="
|
||||||
|
background: #f6f6f6;
|
||||||
|
border-radius: 20px;
|
||||||
|
padding: 15px 20px;
|
||||||
|
margin-top: 10px;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<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">{{ item.label }}</el-checkbox>
|
<el-checkbox
|
||||||
|
v-if="item.value !== -1"
|
||||||
|
:key="item.id"
|
||||||
|
:disabled="OtherInfo.IsSign"
|
||||||
|
:label="item.value"
|
||||||
|
>{{ 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" :label="item">{{ item }}</el-checkbox>
|
<el-checkbox
|
||||||
|
v-for="item of item.TypeValue.split('|')"
|
||||||
|
:key="item"
|
||||||
|
:disabled="OtherInfo.IsSign"
|
||||||
|
:label="item"
|
||||||
|
>{{ item }}</el-checkbox
|
||||||
|
>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
<div style="margin-top: 20px;">
|
<div style="margin-top: 20px">
|
||||||
<!-- 当前选择答案分组: -->
|
<!-- 当前选择答案分组: -->
|
||||||
{{ $t('trials:adRules:title:selectAnswerGroup') }}
|
{{ $t("trials:adRules:title:selectAnswerGroup") }}
|
||||||
<el-tag v-if="QuestionList[index].grouping.length > 0 && QuestionList[index].QuestionGenre !== 3">{{ QuestionList[index].grouping.toString().replaceAll(',', '|') }}</el-tag>
|
<el-tag
|
||||||
<el-tag v-if="QuestionList[index].grouping.length > 0 && QuestionList[index].QuestionGenre === 3">{{ QuestionList[index].grouping.map(v => $d[QuestionList[index].DictionaryCode].find(v1 => v1.value === v).label).toString().replaceAll(',', '|') }}</el-tag>
|
v-if="
|
||||||
<el-button size="mini" type="primary" :disabled="OtherInfo.IsSign" @click="addGroup2(index)">
|
QuestionList[index].grouping.length > 0 &&
|
||||||
|
QuestionList[index].QuestionGenre !== 3
|
||||||
|
"
|
||||||
|
>{{
|
||||||
|
QuestionList[index].grouping.toString().replaceAll(",", "|")
|
||||||
|
}}</el-tag
|
||||||
|
>
|
||||||
|
<el-tag
|
||||||
|
v-if="
|
||||||
|
QuestionList[index].grouping.length > 0 &&
|
||||||
|
QuestionList[index].QuestionGenre === 3
|
||||||
|
"
|
||||||
|
>{{
|
||||||
|
QuestionList[index].grouping
|
||||||
|
.map(
|
||||||
|
(v) =>
|
||||||
|
$d[QuestionList[index].DictionaryCode].find(
|
||||||
|
(v1) => v1.value === v
|
||||||
|
).label
|
||||||
|
)
|
||||||
|
.toString()
|
||||||
|
.replaceAll(",", "|")
|
||||||
|
}}</el-tag
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
:disabled="OtherInfo.IsSign"
|
||||||
|
@click="addGroup2(index)"
|
||||||
|
>
|
||||||
<!-- 添加分组 -->
|
<!-- 添加分组 -->
|
||||||
{{ $t('trials:adRules:title:addGroup') }}
|
{{ $t("trials:adRules:title:addGroup") }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="QuestionList[index].QuestionGenre !== 3" style="margin-top: 20px;">分组: <el-tag v-for="itemA of QuestionList[index].AnswerGroup2List" :key="itemA" closable style="margin-right:10px;" @close="() => {return tagClose2(index, indexA)}">{{ itemA }}</el-tag></div>
|
<div
|
||||||
<div v-if="QuestionList[index].QuestionGenre === 3" style="margin-top: 20px;">
|
v-if="QuestionList[index].QuestionGenre !== 3"
|
||||||
|
style="margin-top: 20px"
|
||||||
|
>
|
||||||
|
分组:
|
||||||
|
<el-tag
|
||||||
|
v-for="itemA of QuestionList[index].AnswerGroup2List"
|
||||||
|
:key="itemA"
|
||||||
|
closable
|
||||||
|
style="margin-right: 10px"
|
||||||
|
@close="
|
||||||
|
() => {
|
||||||
|
return tagClose2(index, indexA);
|
||||||
|
}
|
||||||
|
"
|
||||||
|
>{{ itemA }}</el-tag
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
v-if="QuestionList[index].QuestionGenre === 3"
|
||||||
|
style="margin-top: 20px"
|
||||||
|
>
|
||||||
<!-- 分组: -->
|
<!-- 分组: -->
|
||||||
{{ $t('trials:adRules:title:group') }}
|
{{ $t("trials:adRules:title:group") }}
|
||||||
<el-tag v-for="itemA of QuestionList[index].AnswerGroup2List" :key="itemA" closable style="margin-right:10px;" @close="() => {return tagClose2(index, indexA)}">
|
<el-tag
|
||||||
{{ itemA.split('|').map(v => $fd(QuestionList[index].DictionaryCode, parseInt(v))).join('|') }}
|
v-for="itemA of QuestionList[index].AnswerGroup2List"
|
||||||
|
:key="itemA"
|
||||||
|
closable
|
||||||
|
style="margin-right: 10px"
|
||||||
|
@close="
|
||||||
|
() => {
|
||||||
|
return tagClose2(index, indexA);
|
||||||
|
}
|
||||||
|
"
|
||||||
|
>
|
||||||
|
{{
|
||||||
|
itemA
|
||||||
|
.split("|")
|
||||||
|
.map((v) =>
|
||||||
|
$fd(QuestionList[index].DictionaryCode, parseInt(v))
|
||||||
|
)
|
||||||
|
.join("|")
|
||||||
|
}}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="QuestionList[index].JudgeType === 4 || QuestionList[index].JudgeType === 5">
|
<div
|
||||||
<el-form :inline="true" :model="QuestionList[index]" class="demo-form-inline" :ref="'JudgeDifferenceValue'+ QuestionList[index].JudgeType + index" :rules="JudgeDifferenceValueQRules">
|
v-if="
|
||||||
<el-form-item :label="$t(`trials:trials-panel:setting:reading-unit:JudgeDifferenceValue${QuestionList[index].JudgeType}`)" prop="JudgeDifferenceValue">
|
QuestionList[index].JudgeType === 4 ||
|
||||||
<el-input v-model="QuestionList[index].JudgeDifferenceValue" clearable :disabled="OtherInfo.IsSign"></el-input>
|
QuestionList[index].JudgeType === 5
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
:inline="true"
|
||||||
|
:model="QuestionList[index]"
|
||||||
|
class="demo-form-inline"
|
||||||
|
:ref="
|
||||||
|
'JudgeDifferenceValue' + QuestionList[index].JudgeType + index
|
||||||
|
"
|
||||||
|
:rules="JudgeDifferenceValueQRules"
|
||||||
|
>
|
||||||
|
<el-form-item
|
||||||
|
:label="
|
||||||
|
$t(
|
||||||
|
`trials:trials-panel:setting:reading-unit:JudgeDifferenceValue${QuestionList[index].JudgeType}`
|
||||||
|
)
|
||||||
|
"
|
||||||
|
prop="JudgeDifferenceValue"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="QuestionList[index].JudgeDifferenceValue"
|
||||||
|
clearable
|
||||||
|
:disabled="OtherInfo.IsSign"
|
||||||
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
@ -152,38 +334,105 @@
|
||||||
>
|
>
|
||||||
<div class="base-dialog-body">
|
<div class="base-dialog-body">
|
||||||
<!-- 阅片人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
|
||||||
<el-checkbox v-if="QuestionList[selectIndex].QuestionGenre !== 3" :key="item" :label="item" :disabled="QuestionList[selectIndex].groupingB.length ? ~QuestionList[selectIndex].groupingB.indexOf(item) : false">{{ item }}</el-checkbox>
|
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
|
||||||
|
? ~QuestionList[selectIndex].groupingB.indexOf(item)
|
||||||
|
: false
|
||||||
|
"
|
||||||
|
>{{ item }}</el-checkbox
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
<template v-for="(item) of $d[QuestionList[selectIndex].DictionaryCode]">
|
<template
|
||||||
<el-checkbox v-if="QuestionList[selectIndex].QuestionGenre === 3 && item.value !== -1" :key="item.id" :label="item.value" :disabled="QuestionList[selectIndex].groupingB.length ? ~QuestionList[selectIndex].groupingB.indexOf(item.value) : false">{{ item.label }}</el-checkbox>
|
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.length
|
||||||
|
? ~QuestionList[selectIndex].groupingB.indexOf(item.value)
|
||||||
|
: false
|
||||||
|
"
|
||||||
|
>{{ 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
|
||||||
<el-checkbox v-if="QuestionList[selectIndex].QuestionGenre !== 3" :key="item" :label="item" :disabled="QuestionList[selectIndex].groupingA.length ? ~QuestionList[selectIndex].groupingA.indexOf(item) : false">{{ item }}</el-checkbox>
|
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
|
||||||
|
? ~QuestionList[selectIndex].groupingA.indexOf(item)
|
||||||
|
: false
|
||||||
|
"
|
||||||
|
>{{ item }}</el-checkbox
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
<template v-for="(item) of $d[QuestionList[selectIndex].DictionaryCode]">
|
<template
|
||||||
<el-checkbox v-if="QuestionList[selectIndex].QuestionGenre === 3 && item.value !== -1" :key="item.id" :label="item.value" :disabled="QuestionList[selectIndex].groupingA.length ? ~QuestionList[selectIndex].groupingA.indexOf(item.value) : false">{{ item.label }}</el-checkbox>
|
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.length
|
||||||
|
? ~QuestionList[selectIndex].groupingA.indexOf(item.value)
|
||||||
|
: false
|
||||||
|
"
|
||||||
|
>{{ item.label }}</el-checkbox
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<div class="base-dialog-footer" style="text-align:right;margin-top:10px;">
|
<div
|
||||||
|
class="base-dialog-footer"
|
||||||
|
style="text-align: right; margin-top: 10px"
|
||||||
|
>
|
||||||
<!-- 取消 -->
|
<!-- 取消 -->
|
||||||
<el-button
|
<el-button
|
||||||
v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']"
|
v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']"
|
||||||
:disabled="btnLoading"
|
:disabled="btnLoading"
|
||||||
size="small"
|
size="small"
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="QuestionVisible = false;$set(QuestionList[selectIndex], 'groupingA', []);$set(QuestionList[selectIndex], 'groupingB', [])"
|
@click="
|
||||||
|
QuestionVisible = false;
|
||||||
|
$set(QuestionList[selectIndex], 'groupingA', []);
|
||||||
|
$set(QuestionList[selectIndex], 'groupingB', []);
|
||||||
|
"
|
||||||
>
|
>
|
||||||
{{ $t('common:button:cancel') }}
|
{{ $t("common:button:cancel") }}
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']"
|
v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']"
|
||||||
|
@ -192,21 +441,25 @@
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="save"
|
@click="save"
|
||||||
>
|
>
|
||||||
{{ $t('common:button:save') }}
|
{{ $t("common:button:save") }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</el-form>
|
</el-form>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getTrialConfirmCriterionList, getTrialCriterionJudgeQuestionList, setTrialCriterionJudgeQuestionAnswerGroup } from '@/api/trials/reading'
|
import {
|
||||||
import { setTrialJudgyInfo, getTrialJudgyInfo } from '@/api/trials/setting'
|
getTrialConfirmCriterionList,
|
||||||
|
getTrialCriterionJudgeQuestionList,
|
||||||
|
setTrialCriterionJudgeQuestionAnswerGroup,
|
||||||
|
} from "@/api/trials/reading";
|
||||||
|
import { setTrialJudgyInfo, getTrialJudgyInfo } from "@/api/trials/setting";
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
trialReadingCriterionId: {
|
trialReadingCriterionId: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: "",
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -221,7 +474,7 @@ export default {
|
||||||
indexA: null,
|
indexA: null,
|
||||||
type: null,
|
type: null,
|
||||||
OtherInfo: {
|
OtherInfo: {
|
||||||
IsSign: true
|
IsSign: true,
|
||||||
},
|
},
|
||||||
JudgyInfo: {},
|
JudgyInfo: {},
|
||||||
JudgeDifferenceValueQRules: {
|
JudgeDifferenceValueQRules: {
|
||||||
|
@ -235,283 +488,361 @@ export default {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
pattern: /^[0-9]+(.[0-9]{2})?$/,
|
pattern: /^[0-9]+(.[0-9]{2})?$/,
|
||||||
message: this.$t(
|
message: this.$t("trials:trials-list:setitng:JudgeDifferenceValue"),
|
||||||
"trials:trials-list:setitng:JudgeDifferenceValue"
|
|
||||||
),
|
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
validator: (rule, value, callback) => {
|
validator: (rule, value, callback) => {
|
||||||
if (value <= 0) {
|
if (value <= 0) {
|
||||||
callback(new Error(this.$t("trials:trials-list:setitng:JudgeDifferenceValueMin")));
|
callback(
|
||||||
|
new Error(
|
||||||
|
this.$t(
|
||||||
|
"trials:trials-list:setitng:JudgeDifferenceValueMin"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
callback();
|
callback();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
},
|
},
|
||||||
]
|
],
|
||||||
},
|
},
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
TrialReadingCriterionId(v) {
|
TrialReadingCriterionId(v) {
|
||||||
if (v === null) return
|
if (v === null) return;
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
getTrialCriterionJudgeQuestionList({
|
getTrialCriterionJudgeQuestionList({
|
||||||
TrialId: this.$route.query.trialId,
|
TrialId: this.$route.query.trialId,
|
||||||
// ReadingQuestionCriterionTrialId: v,
|
// ReadingQuestionCriterionTrialId: v,
|
||||||
TrialReadingCriterionId: this.trialReadingCriterionId
|
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(() => {
|
.then((res) => {
|
||||||
this.btnLoading = false
|
this.loading = false;
|
||||||
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() {
|
mounted() {
|
||||||
this.getList()
|
this.getList();
|
||||||
this.getTrialJudgyInfo()
|
this.getTrialJudgyInfo();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 修改仲裁规则
|
||||||
|
changeArbitrationRule(value) {
|
||||||
|
if (value !== 1) {
|
||||||
|
this.QuestionList.forEach((item) => {
|
||||||
|
item.JudgeDifferenceValue = 0;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
JudgeTypeChange(value, index) {
|
JudgeTypeChange(value, index) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (value === 4 || value === 5) {
|
if (value === 4 || value === 5) {
|
||||||
if(this.$refs['JudgeDifferenceValue'+value+index][0]){
|
if (this.$refs["JudgeDifferenceValue" + value + index][0]) {
|
||||||
this.$refs['JudgeDifferenceValue'+value+index][0].resetFields();
|
this.$refs["JudgeDifferenceValue" + value + index][0].resetFields();
|
||||||
// this.QuestionList[index].JudgeDifferenceValue = 0;
|
// this.QuestionList[index].JudgeDifferenceValue = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
saveAllSync() {
|
saveAllSync() {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
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).then((res) => {
|
Promise.all(arr)
|
||||||
console.log(res)
|
.then((res) => {
|
||||||
resolve(true)
|
console.log(res);
|
||||||
}).catch((res) => {
|
resolve(true);
|
||||||
console.log('进入catch')
|
|
||||||
resolve(false)
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
.catch((res) => {
|
||||||
|
console.log("进入catch");
|
||||||
|
resolve(false);
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
applySync(ReadingQuestionTrialId, index) {
|
applySync(ReadingQuestionTrialId, index) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
console.log(this.QuestionList[index].JudgeType)
|
console.log(this.QuestionList[index].JudgeType);
|
||||||
if (this.QuestionList[index].JudgeType === 0) {
|
if (this.QuestionList[index].JudgeType === 0) {
|
||||||
reject(false)
|
reject(false);
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
if (this.QuestionList[index].JudgeType === 2 && this.QuestionList[index].AnswerGroup2List.length === 0) {
|
if (
|
||||||
reject(false)
|
this.QuestionList[index].JudgeType === 2 &&
|
||||||
return
|
this.QuestionList[index].AnswerGroup2List.length === 0
|
||||||
|
) {
|
||||||
|
reject(false);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if (this.QuestionList[index].JudgeType === 3 && this.QuestionList[index].AnswerGroupList.length === 0) {
|
if (
|
||||||
reject(false)
|
this.QuestionList[index].JudgeType === 3 &&
|
||||||
return
|
this.QuestionList[index].AnswerGroupList.length === 0
|
||||||
|
) {
|
||||||
|
reject(false);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
this.btnLoading = true
|
this.btnLoading = true;
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
setTrialCriterionJudgeQuestionAnswerGroup({
|
setTrialCriterionJudgeQuestionAnswerGroup({
|
||||||
ReadingQuestionTrialId: ReadingQuestionTrialId,
|
ReadingQuestionTrialId: ReadingQuestionTrialId,
|
||||||
AnswerGroup: this.QuestionList[index].AnswerGroup2List,
|
AnswerGroup: this.QuestionList[index].AnswerGroup2List,
|
||||||
AnswerCombination: this.QuestionList[index].AnswerGroupList,
|
AnswerCombination: this.QuestionList[index].AnswerGroupList,
|
||||||
JudgeType: this.QuestionList[index].JudgeType
|
JudgeType: this.QuestionList[index].JudgeType,
|
||||||
}).then(res => {
|
|
||||||
resolve()
|
|
||||||
this.btnLoading = false
|
|
||||||
this.loading = false
|
|
||||||
}).catch(() => {
|
|
||||||
reject(false)
|
|
||||||
this.btnLoading = false
|
|
||||||
this.loading = false
|
|
||||||
})
|
})
|
||||||
|
.then((res) => {
|
||||||
|
resolve();
|
||||||
|
this.btnLoading = false;
|
||||||
|
this.loading = false;
|
||||||
})
|
})
|
||||||
|
.catch(() => {
|
||||||
|
reject(false);
|
||||||
|
this.btnLoading = false;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
setTrialJudgyInfo() {
|
setTrialJudgyInfo() {
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
setTrialJudgyInfo({
|
setTrialJudgyInfo({
|
||||||
TrialId: this.$route.query.trialId,
|
TrialId: this.$route.query.trialId,
|
||||||
ArbitrationRule: this.JudgyInfo.ArbitrationRule,
|
ArbitrationRule: this.JudgyInfo.ArbitrationRule,
|
||||||
TrialReadingCriterionId: this.trialReadingCriterionId
|
TrialReadingCriterionId: this.trialReadingCriterionId,
|
||||||
}).then(res => {
|
|
||||||
this.loading = false
|
|
||||||
this.$message.success(this.$t('common:message:savedSuccessfully'))// '保存成功'
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false
|
|
||||||
})
|
})
|
||||||
|
.then((res) => {
|
||||||
|
this.loading = false;
|
||||||
|
this.$message.success(this.$t("common:message:savedSuccessfully")); // '保存成功'
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
getTrialJudgyInfo() {
|
getTrialJudgyInfo() {
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
getTrialJudgyInfo({
|
getTrialJudgyInfo({
|
||||||
TrialId: this.$route.query.trialId,
|
TrialId: this.$route.query.trialId,
|
||||||
TrialReadingCriterionId: this.trialReadingCriterionId
|
TrialReadingCriterionId: this.trialReadingCriterionId,
|
||||||
}).then(res => {
|
|
||||||
this.JudgyInfo = res.Result
|
|
||||||
this.loading = false
|
|
||||||
}).catch(v => {
|
|
||||||
this.loading = false
|
|
||||||
})
|
})
|
||||||
|
.then((res) => {
|
||||||
|
this.JudgyInfo = res.Result;
|
||||||
|
this.loading = false;
|
||||||
|
})
|
||||||
|
.catch((v) => {
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
tagClose2(index, indexA) {
|
tagClose2(index, indexA) {
|
||||||
// '删除该规则组?'
|
// '删除该规则组?'
|
||||||
this.$confirm(this.$t('trials:adRules:message:msg1')).then(() => {
|
this.$confirm(this.$t("trials:adRules:message:msg1")).then(() => {
|
||||||
this.QuestionList[index].AnswerGroup2List.splice(indexA, 1)
|
this.QuestionList[index].AnswerGroup2List.splice(indexA, 1);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
tagClose(index, indexA) {
|
tagClose(index, indexA) {
|
||||||
// '删除该规则组?'
|
// '删除该规则组?'
|
||||||
this.$confirm(this.$t('trials:adRules:message:msg1')).then(() => {
|
this.$confirm(this.$t("trials:adRules:message:msg1")).then(() => {
|
||||||
this.QuestionList[index].AnswerGroupList.splice(indexA, 1)
|
this.QuestionList[index].AnswerGroupList.splice(indexA, 1);
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
save() {
|
save() {
|
||||||
var index = this.selectIndex
|
var index = this.selectIndex;
|
||||||
var indexA = this.indexA
|
var indexA = this.indexA;
|
||||||
if (this.QuestionList[index].groupingA.length === 0) {
|
if (this.QuestionList[index].groupingA.length === 0) {
|
||||||
this.$alert(this.$t('trials:adRules:message:msg2'))// '请先选择答案A'
|
this.$alert(this.$t("trials:adRules:message:msg2")); // '请先选择答案A'
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
if (this.QuestionList[index].groupingB.length === 0) {
|
if (this.QuestionList[index].groupingB.length === 0) {
|
||||||
this.$alert(this.$t('trials:adRules:message:msg3'))// '请先选择答案B'
|
this.$alert(this.$t("trials:adRules:message:msg3")); // '请先选择答案B'
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
if (this.type === 'add') {
|
if (this.type === "add") {
|
||||||
this.QuestionList[index].AnswerGroupList.push({
|
this.QuestionList[index].AnswerGroupList.push({
|
||||||
AnswerGroupA: this.QuestionList[index].groupingA,
|
AnswerGroupA: this.QuestionList[index].groupingA,
|
||||||
AnswerGroupB: this.QuestionList[index].groupingB
|
AnswerGroupB: this.QuestionList[index].groupingB,
|
||||||
})
|
});
|
||||||
} else {
|
} else {
|
||||||
this.$set(this.QuestionList[index].AnswerGroupList[indexA], 'AnswerGroupA', this.QuestionList[index].groupingA)
|
this.$set(
|
||||||
this.$set(this.QuestionList[index].AnswerGroupList[indexA], 'AnswerGroupB', this.QuestionList[index].groupingB)
|
this.QuestionList[index].AnswerGroupList[indexA],
|
||||||
|
"AnswerGroupA",
|
||||||
|
this.QuestionList[index].groupingA
|
||||||
|
);
|
||||||
|
this.$set(
|
||||||
|
this.QuestionList[index].AnswerGroupList[indexA],
|
||||||
|
"AnswerGroupB",
|
||||||
|
this.QuestionList[index].groupingB
|
||||||
|
);
|
||||||
}
|
}
|
||||||
this.$set(this.QuestionList[index], 'groupingA', [])
|
this.$set(this.QuestionList[index], "groupingA", []);
|
||||||
this.$set(this.QuestionList[index], 'groupingB', [])
|
this.$set(this.QuestionList[index], "groupingB", []);
|
||||||
this.$message.success(this.$t('trials:adRules:message:msg4'))// '成功新增答案规则'
|
this.$message.success(this.$t("trials:adRules:message:msg4")); // '成功新增答案规则'
|
||||||
this.QuestionVisible = false
|
this.QuestionVisible = false;
|
||||||
},
|
},
|
||||||
addGroup2(index) {
|
addGroup2(index) {
|
||||||
if (this.QuestionList[index].grouping.length === 0) {
|
if (this.QuestionList[index].grouping.length === 0) {
|
||||||
this.$alert(this.$t('trials:adRules:message:msg5'))// '请先选择答案,再添加分组'
|
this.$alert(this.$t("trials:adRules:message:msg5")); // '请先选择答案,再添加分组'
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
var grouping = this.QuestionList[index].grouping.toString().replaceAll(',', '|')
|
var grouping = this.QuestionList[index].grouping
|
||||||
this.QuestionList[index].AnswerGroup2List.push(`|${grouping}|`)
|
.toString()
|
||||||
this.$set(this.QuestionList[index], 'grouping', [])
|
.replaceAll(",", "|");
|
||||||
|
this.QuestionList[index].AnswerGroup2List.push(`|${grouping}|`);
|
||||||
|
this.$set(this.QuestionList[index], "grouping", []);
|
||||||
},
|
},
|
||||||
addGroup(index, indexA) {
|
addGroup(index, indexA) {
|
||||||
this.selectIndex = index
|
this.selectIndex = index;
|
||||||
this.type = 'add'
|
this.type = "add";
|
||||||
if (indexA !== null) {
|
if (indexA !== null) {
|
||||||
this.indexA = indexA
|
this.indexA = indexA;
|
||||||
this.type = 'edit'
|
this.type = "edit";
|
||||||
this.$set(this.QuestionList[index], 'groupingA', this.QuestionList[index].AnswerGroupList[indexA].AnswerGroupA)
|
this.$set(
|
||||||
this.$set(this.QuestionList[index], 'groupingB', this.QuestionList[index].AnswerGroupList[indexA].AnswerGroupB)
|
this.QuestionList[index],
|
||||||
|
"groupingA",
|
||||||
|
this.QuestionList[index].AnswerGroupList[indexA].AnswerGroupA
|
||||||
|
);
|
||||||
|
this.$set(
|
||||||
|
this.QuestionList[index],
|
||||||
|
"groupingB",
|
||||||
|
this.QuestionList[index].AnswerGroupList[indexA].AnswerGroupB
|
||||||
|
);
|
||||||
}
|
}
|
||||||
this.QuestionVisible = true
|
this.QuestionVisible = true;
|
||||||
},
|
},
|
||||||
reset(ReadingQuestionTrialId, index) {
|
reset(ReadingQuestionTrialId, index) {
|
||||||
// '确定重置当前设置的裁判任务生成规则吗?'
|
// '确定重置当前设置的裁判任务生成规则吗?'
|
||||||
this.$confirm(this.$t('trials:adRules:message:msg6')).then(() => {
|
this.$confirm(this.$t("trials:adRules:message:msg6")).then(() => {
|
||||||
this.btnLoading = true
|
this.btnLoading = true;
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
setTrialCriterionJudgeQuestionAnswerGroup({
|
setTrialCriterionJudgeQuestionAnswerGroup({
|
||||||
ReadingQuestionTrialId: ReadingQuestionTrialId,
|
ReadingQuestionTrialId: ReadingQuestionTrialId,
|
||||||
AnswerGroup: [],
|
AnswerGroup: [],
|
||||||
AnswerCombination: [],
|
AnswerCombination: [],
|
||||||
JudgeType: 0,
|
JudgeType: 0,
|
||||||
JudgeDifferenceValue: 0,
|
JudgeDifferenceValue: 0,
|
||||||
}).then(res => {
|
|
||||||
this.$set(this.QuestionList[index], 'AnswerGroup2List', [])
|
|
||||||
this.$set(this.QuestionList[index], 'AnswerGroupList', [])
|
|
||||||
this.$set(this.QuestionList[index], 'JudgeType', 0)
|
|
||||||
this.$message.success(this.$t('trials:adRules:message:msg7'))// '重置成功'
|
|
||||||
this.btnLoading = false
|
|
||||||
this.loading = false
|
|
||||||
}).catch(() => {
|
|
||||||
this.btnLoading = false
|
|
||||||
this.loading = false
|
|
||||||
})
|
})
|
||||||
|
.then((res) => {
|
||||||
|
this.$set(this.QuestionList[index], "AnswerGroup2List", []);
|
||||||
|
this.$set(this.QuestionList[index], "AnswerGroupList", []);
|
||||||
|
this.$set(this.QuestionList[index], "JudgeType", 0);
|
||||||
|
this.$message.success(this.$t("trials:adRules:message:msg7")); // '重置成功'
|
||||||
|
this.btnLoading = false;
|
||||||
|
this.loading = false;
|
||||||
})
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.btnLoading = false;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
});
|
||||||
},
|
},
|
||||||
async apply(ReadingQuestionTrialId, index) {
|
async apply(ReadingQuestionTrialId, index) {
|
||||||
if (this.QuestionList[index].JudgeType === 0) {
|
if (this.QuestionList[index].JudgeType === 0) {
|
||||||
this.$alert(this.$t('trials:adRules:message:msg8'))// '请先配置规则才能应用'
|
this.$alert(this.$t("trials:adRules:message:msg8")); // '请先配置规则才能应用'
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
if (this.QuestionList[index].JudgeType === 2 && this.QuestionList[index].AnswerGroup2List.length === 0) {
|
if (
|
||||||
this.$alert(this.$t('trials:adRules:message:msg8'))// '请先配置规则才能应用'
|
this.QuestionList[index].JudgeType === 2 &&
|
||||||
return
|
this.QuestionList[index].AnswerGroup2List.length === 0
|
||||||
|
) {
|
||||||
|
this.$alert(this.$t("trials:adRules:message:msg8")); // '请先配置规则才能应用'
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if (this.QuestionList[index].JudgeType === 3 && this.QuestionList[index].AnswerGroupList.length === 0) {
|
if (
|
||||||
this.$alert(this.$t('trials:adRules:message:msg8'))
|
this.QuestionList[index].JudgeType === 3 &&
|
||||||
return
|
this.QuestionList[index].AnswerGroupList.length === 0
|
||||||
|
) {
|
||||||
|
this.$alert(this.$t("trials:adRules:message:msg8"));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if (this.QuestionList[index].JudgeType === 4||this.QuestionList[index].JudgeType === 5) {
|
if (
|
||||||
|
this.QuestionList[index].JudgeType === 4 ||
|
||||||
|
this.QuestionList[index].JudgeType === 5
|
||||||
|
) {
|
||||||
try {
|
try {
|
||||||
let validate = await this.$refs['JudgeDifferenceValue'+this.QuestionList[index].JudgeType+index][0].validate();
|
let validate = await this.$refs[
|
||||||
|
"JudgeDifferenceValue" + this.QuestionList[index].JudgeType + index
|
||||||
|
][0].validate();
|
||||||
if (!validate) return;
|
if (!validate) return;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.btnLoading = true
|
this.btnLoading = true;
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
setTrialCriterionJudgeQuestionAnswerGroup({
|
setTrialCriterionJudgeQuestionAnswerGroup({
|
||||||
ReadingQuestionTrialId: ReadingQuestionTrialId,
|
ReadingQuestionTrialId: ReadingQuestionTrialId,
|
||||||
AnswerGroup: this.QuestionList[index].AnswerGroup2List,
|
AnswerGroup: this.QuestionList[index].AnswerGroup2List,
|
||||||
AnswerCombination: this.QuestionList[index].AnswerGroupList,
|
AnswerCombination: this.QuestionList[index].AnswerGroupList,
|
||||||
JudgeType: this.QuestionList[index].JudgeType,
|
JudgeType: this.QuestionList[index].JudgeType,
|
||||||
JudgeDifferenceValue:Number(this.QuestionList[index].JudgeDifferenceValue),
|
JudgeDifferenceValue: Number(
|
||||||
}).then(res => {
|
this.QuestionList[index].JudgeDifferenceValue
|
||||||
this.$message.success(this.$t('trials:adRules:message:msg9'))// '应用成功'
|
),
|
||||||
this.btnLoading = false
|
|
||||||
this.loading = false
|
|
||||||
}).catch(() => {
|
|
||||||
this.btnLoading = false
|
|
||||||
this.loading = false
|
|
||||||
})
|
})
|
||||||
|
.then((res) => {
|
||||||
|
this.$message.success(this.$t("trials:adRules:message:msg9")); // '应用成功'
|
||||||
|
this.btnLoading = false;
|
||||||
|
this.loading = false;
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.btnLoading = false;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
tabClick(v) {
|
tabClick(v) {
|
||||||
this.ReadingQuestionCriterionTrialId = this.CriterionList[this.index].ReadingQuestionCriterionTrialId
|
this.ReadingQuestionCriterionTrialId =
|
||||||
|
this.CriterionList[this.index].ReadingQuestionCriterionTrialId;
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true
|
this.loading = true;
|
||||||
getTrialCriterionJudgeQuestionList({
|
getTrialCriterionJudgeQuestionList({
|
||||||
TrialId: this.$route.query.trialId,
|
TrialId: this.$route.query.trialId,
|
||||||
TrialReadingCriterionId: this.trialReadingCriterionId
|
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(() => {
|
.then((res) => {
|
||||||
this.btnLoading = false
|
this.loading = false;
|
||||||
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;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue