1
continuous-integration/drone/push Build is passing Details

main
wangxiaoshuang 2026-04-09 17:28:59 +08:00
parent a68c27fd43
commit 5289c156c0
1 changed files with 122 additions and 333 deletions

View File

@ -4,226 +4,127 @@
<template> <template>
<el-form v-loading="loading"> <el-form v-loading="loading">
<!-- 仲裁对象 --> <!-- 仲裁对象 -->
<el-form-item <el-form-item :label="$t('trials:adRules:title:arbitrationRule')" :label-width="'180px'">
:label="$t('trials:adRules:title:arbitrationRule')" <el-radio-group v-model="JudgyInfo.ArbitrationRule" :disabled="OtherInfo.IsSign">
:label-width="'180px'" <el-radio v-for="item of $d.ArbitrationRule" :key="item.id"
> :disabled="!JudgyInfo.IsReadingTaskViewInOrder || true" :label="item.value" @change="changeArbitrationRule">
<el-radio-group
v-model="JudgyInfo.ArbitrationRule"
:disabled="OtherInfo.IsSign"
>
<el-radio
v-for="item of $d.ArbitrationRule"
:key="item.id"
: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;"> <el-collapse v-model="activeNames" style="border-top:none;">
<el-collapse-item <el-collapse-item v-for="(item, index) of QuestionList" :key="item.ReadingQuestionTrialId"
v-for="(item, index) of QuestionList" style="position: relative;padding:0 10px;" :name="item.ReadingQuestionTrialId">
:key="item.ReadingQuestionTrialId"
style="position: relative;padding:0 10px;"
: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 <el-button v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']"
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" :disabled="OtherInfo.IsSign" @click="apply(item.ReadingQuestionTrialId, index)">{{ $t('common:button:save')
size="mini" }}</el-button>
type="primary" <el-button v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']"
:disabled="OtherInfo.IsSign" style="position: absolute; right: 60px; top: 0; z-index: 10" size="mini" type="primary"
@click="apply(item.ReadingQuestionTrialId, index)" :disabled="OtherInfo.IsSign" @click="reset(item.ReadingQuestionTrialId, index)">{{ $t('common:button:reset')
>{{ $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
>
<!-- 产生裁判阅片的条件 --> <!-- 产生裁判阅片的条件 -->
<el-form-item <el-form-item :label-width="'280px'" :label="$t('trials:adRules:title:judgeTypeEnum')" style="width: 95%">
:label-width="'280px'" <el-radio-group v-model="QuestionList[index].JudgeType" @input="(val) => JudgeTypeChange(val, index)">
:label="$t('trials:adRules:title:judgeTypeEnum')"
style="width: 95%"
>
<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 <el-radio style="margin-bottom: 5px" :key="item.id" :disabled="OtherInfo.IsSign ||
style="margin-bottom: 5px" !hasPermi(['trials:trials-panel:setting:reading-unit:edit'])
:key="item.id" " :label="item.value" v-if="
:disabled="
OtherInfo.IsSign ||
!hasPermi(['trials:trials-panel:setting:reading-unit:edit'])
"
:label="item.value"
v-if="
item.value < 4 || item.value < 4 ||
(item.value > 3 && (item.value > 3 &&
(QuestionList[index].Type === 'number' || (QuestionList[index].Type === 'number' ||
QuestionList[index].Type === 'calculation')) QuestionList[index].Type === 'calculation'))
" ">
>
{{ item.label }} {{ item.label }}
</el-radio> </el-radio>
</template> </template>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</div> </div>
<div <div v-if="QuestionList[index].JudgeType === 3" style="text-align: right; margin: 10px 0">
v-if="QuestionList[index].JudgeType === 3"
style="text-align: right; margin: 10px 0"
>
<!-- 添加规则 --> <!-- 添加规则 -->
<el-button <el-button v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']" size="mini" type="primary"
v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']" :disabled="OtherInfo.IsSign" @click="addGroup(index, null)">{{ $t('trials:adRules:button:addRule')
size="mini" }}</el-button>
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-loading="loading"
v-if="QuestionList[index].JudgeType === 3" :data="QuestionList[index].AnswerGroupList" border stripe>
v-loading="loading"
:data="QuestionList[index].AnswerGroupList"
border
stripe
>
<!-- 序号 --> <!-- 序号 -->
<el-table-column <el-table-column prop="AnswerGroupA" :label="$t('trials:adRules:title:order')" width="160">
prop="AnswerGroupA"
:label="$t('trials:adRules:title:order')"
width="160"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.$index + 1 }} {{ scope.$index + 1 }}
</template> </template>
</el-table-column> </el-table-column>
<!-- 阅片人A --> <!-- 阅片人A -->
<el-table-column <el-table-column prop="AnswerGroupA" :label="$t('trials:adRules:title:answerGroupA')" min-width="100">
prop="AnswerGroupA"
:label="$t('trials:adRules:title:answerGroupA')"
min-width="100"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ {{
QuestionList[index].QuestionGenre === 3 QuestionList[index].QuestionGenre === 3
? scope.row.AnswerGroupA.map((v) => ? scope.row.AnswerGroupA.map((v) =>
$fd(QuestionList[index].DictionaryCode, parseInt(v)) $fd(QuestionList[index].DictionaryCode, parseInt(v))
).toString() ).toString()
: scope.row.AnswerGroupA.toString() : scope.row.AnswerGroupA.toString()
}} }}
</template> </template>
</el-table-column> </el-table-column>
<!-- 阅片人B --> <!-- 阅片人B -->
<el-table-column <el-table-column prop="AnswerGroupB" :label="$t('trials:adRules:title:answerGroupB')" min-width="100">
prop="AnswerGroupB"
:label="$t('trials:adRules:title:answerGroupB')"
min-width="100"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ {{
QuestionList[index].QuestionGenre === 3 QuestionList[index].QuestionGenre === 3
? scope.row.AnswerGroupB.map((v) => ? scope.row.AnswerGroupB.map((v) =>
$fd(QuestionList[index].DictionaryCode, parseInt(v)) $fd(QuestionList[index].DictionaryCode, parseInt(v))
).toString() ).toString()
: scope.row.AnswerGroupB.toString() : scope.row.AnswerGroupB.toString()
}} }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column prop="AnswerGroupB" :label="$t('common:action:action')" min-width="80">
prop="AnswerGroupB"
:label="$t('common:action:action')"
min-width="80"
>
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 编辑 --> <!-- 编辑 -->
<el-button <el-button icon="el-icon-edit" circle :title="$t('common:button:edit')" size="mini"
icon="el-icon-edit" :disabled="OtherInfo.IsSign" @click="addGroup(index, scope.$index)" />
circle
:title="$t('common:button:edit')"
size="mini"
:disabled="OtherInfo.IsSign"
@click="addGroup(index, scope.$index)"
/>
<!-- 删除 --> <!-- 删除 -->
<el-button <el-button icon="el-icon-delete" circle :title="$t('common:button:delete')" size="mini"
icon="el-icon-delete" :disabled="OtherInfo.IsSign" @click="tagClose(index, scope.$index)" />
circle
:title="$t('common:button:delete')"
size="mini"
:disabled="OtherInfo.IsSign"
@click="tagClose(index, scope.$index)"
/>
</template> </template>
</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 <div style="
style="
background: #f6f6f6; background: #f6f6f6;
border-radius: 20px; border-radius: 20px;
padding: 15px 20px; padding: 15px 20px;
margin-top: 10px; margin-top: 10px;
" ">
> <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 <el-checkbox v-if="item.value !== -1" :key="item.id" :disabled="OtherInfo.IsSign" :label="item.value">{{
v-if="item.value !== -1" item.label }}</el-checkbox>
: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 <el-checkbox v-for="item of item.TypeValue.split('|')" :key="item" :disabled="OtherInfo.IsSign"
v-for="item of item.TypeValue.split('|')" :label="item">{{
:key="item" item }}</el-checkbox>
: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 <el-tag v-if="
v-if=" QuestionList[index].grouping.length > 0 &&
QuestionList[index].grouping.length > 0 && QuestionList[index].QuestionGenre !== 3
QuestionList[index].QuestionGenre !== 3 ">{{
"
>{{
QuestionList[index].grouping.toString().replaceAll(',', '|') QuestionList[index].grouping.toString().replaceAll(',', '|')
}}</el-tag }}</el-tag>
> <el-tag v-if="
<el-tag QuestionList[index].grouping.length > 0 &&
v-if=" QuestionList[index].QuestionGenre === 3
QuestionList[index].grouping.length > 0 && ">{{
QuestionList[index].QuestionGenre === 3
"
>{{
QuestionList[index].grouping QuestionList[index].grouping
.map( .map(
(v) => (v) =>
@ -233,54 +134,31 @@
) )
.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="OtherInfo.IsSign"
@click="addGroup2(index)"
>
<!-- 添加分组 --> <!-- 添加分组 -->
{{ $t('trials:adRules:title:addGroup') }} {{ $t('trials:adRules:title:addGroup') }}
</el-button> </el-button>
</div> </div>
</div> </div>
<div <div v-if="QuestionList[index].QuestionGenre !== 3" style="margin-top: 20px">
v-if="QuestionList[index].QuestionGenre !== 3"
style="margin-top: 20px"
>
{{ $t('trials:adRules:title:group') }} {{ $t('trials:adRules:title:group') }}
<el-tag <el-tag v-for="itemA of QuestionList[index].AnswerGroup2List" :key="itemA" closable
v-for="itemA of QuestionList[index].AnswerGroup2List" style="margin-right: 10px" @close="
:key="itemA"
closable
style="margin-right: 10px"
@close="
() => { () => {
return tagClose2(index, indexA) return tagClose2(index, indexA)
} }
" ">{{ itemA }}</el-tag>
>{{ itemA }}</el-tag
>
</div> </div>
<div <div v-if="QuestionList[index].QuestionGenre === 3" style="margin-top: 20px">
v-if="QuestionList[index].QuestionGenre === 3"
style="margin-top: 20px"
>
<!-- 分组: --> <!-- 分组: -->
{{ $t('trials:adRules:title:group') }} {{ $t('trials:adRules:title:group') }}
<el-tag <el-tag v-for="itemA of QuestionList[index].AnswerGroup2List" :key="itemA" closable
v-for="itemA of QuestionList[index].AnswerGroup2List" style="margin-right: 10px" @close="
:key="itemA"
closable
style="margin-right: 10px"
@close="
() => { () => {
return tagClose2(index, indexA) return tagClose2(index, indexA)
} }
" ">
>
{{ {{
itemA itemA
.split('|') .split('|')
@ -292,58 +170,31 @@
</el-tag> </el-tag>
</div> </div>
</div> </div>
<div <div v-if="
v-if=" QuestionList[index].JudgeType === 4 ||
QuestionList[index].JudgeType === 4 || QuestionList[index].JudgeType === 5
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 <el-form-item :label="$t(
:inline="true" `trials:trials-panel:setting:reading-unit:JudgeDifferenceType`
:model="QuestionList[index]" )
class="demo-form-inline" " prop="JudgeDifferenceType">
:ref=" <el-select v-model="QuestionList[index].JudgeDifferenceType" placeholder="请选择"
'JudgeDifferenceValue' + QuestionList[index].JudgeType + index :disabled="OtherInfo.IsSign">
" <el-option v-for="item of $d.JudgeDifferenceType" :key="item.id" :label="item.label"
:rules="JudgeDifferenceValueQRules" :value="item.value">
>
<el-form-item
:label="
$t(
`trials:trials-panel:setting:reading-unit:JudgeDifferenceType`
)
"
prop="JudgeDifferenceType"
>
<el-select
v-model="QuestionList[index].JudgeDifferenceType"
placeholder="请选择"
:disabled="OtherInfo.IsSign"
>
<el-option
v-for="item of $d.JudgeDifferenceType"
:key="item.id"
:label="item.label"
:value="item.value"
>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item <el-form-item :label="$t(
:label=" `trials:trials-panel:setting:reading-unit:JudgeDifferenceValue${QuestionList[index].JudgeType}`
$t( )
`trials:trials-panel:setting:reading-unit:JudgeDifferenceValue${QuestionList[index].JudgeType}` " prop="JudgeDifferenceValue">
)
"
prop="JudgeDifferenceValue"
>
<div style="display: flex"> <div style="display: flex">
<el-input <el-input v-model="QuestionList[index].JudgeDifferenceValue" clearable
v-model="QuestionList[index].JudgeDifferenceValue" :disabled="OtherInfo.IsSign"></el-input>
clearable <span style="margin-left: 10px" v-if="QuestionList[index].JudgeType !== 5">{{
:disabled="OtherInfo.IsSign"
></el-input>
<span style="margin-left: 10px">{{
$fd('ValueUnit', QuestionList[index].Unit) $fd('ValueUnit', QuestionList[index].Unit)
}}</span> }}</span>
</div> </div>
@ -355,124 +206,62 @@
<!-- </el-tab-pane>--> <!-- </el-tab-pane>-->
<!-- </el-tabs>--> <!-- </el-tabs>-->
<!-- 选择答案 --> <!-- 选择答案 -->
<el-dialog <el-dialog v-if="QuestionVisible" :title="$t('trials:adRules:title:selectAnswer')" :visible.sync="QuestionVisible"
v-if="QuestionVisible" width="800px" :close-on-click-modal="false" custom-class="base-dialog-wrapper" append-to-body>
: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"> <div class="base-dialog-body">
<!-- 阅片人A --> <!-- 阅片人A -->
<el-form-item <el-form-item label-width="110px" :label="$t('trials:adRules:title:answerGroupA')">
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 <template v-for="item of QuestionList[selectIndex].TypeValue.split('|')">
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)
<el-checkbox : false
v-if="QuestionList[selectIndex].QuestionGenre !== 3" ">{{ item }}</el-checkbox>
:key="item"
:label="item"
:disabled="
QuestionList[selectIndex].groupingB.length
? ~QuestionList[selectIndex].groupingB.indexOf(item)
: false
"
>{{ item }}</el-checkbox
>
</template> </template>
<template <template v-for="item of $d[QuestionList[selectIndex].DictionaryCode]">
v-for="item of $d[QuestionList[selectIndex].DictionaryCode]" <el-checkbox v-if="
> QuestionList[selectIndex].QuestionGenre === 3 &&
<el-checkbox item.value !== -1
v-if=" " :key="item.id" :label="item.value" :disabled="QuestionList[selectIndex].groupingB.length
QuestionList[selectIndex].QuestionGenre === 3 &&
item.value !== -1
"
:key="item.id"
:label="item.value"
:disabled="
QuestionList[selectIndex].groupingB.length
? ~QuestionList[selectIndex].groupingB.indexOf(item.value) ? ~QuestionList[selectIndex].groupingB.indexOf(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 <el-form-item label-width="110px" :label="$t('trials:adRules:title:answerGroupB')">
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 <template v-for="item of QuestionList[selectIndex].TypeValue.split('|')">
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)
<el-checkbox : false
v-if="QuestionList[selectIndex].QuestionGenre !== 3" ">{{ item }}</el-checkbox>
:key="item"
:label="item"
:disabled="
QuestionList[selectIndex].groupingA.length
? ~QuestionList[selectIndex].groupingA.indexOf(item)
: false
"
>{{ item }}</el-checkbox
>
</template> </template>
<template <template v-for="item of $d[QuestionList[selectIndex].DictionaryCode]">
v-for="item of $d[QuestionList[selectIndex].DictionaryCode]" <el-checkbox v-if="
> QuestionList[selectIndex].QuestionGenre === 3 &&
<el-checkbox item.value !== -1
v-if=" " :key="item.id" :label="item.value" :disabled="QuestionList[selectIndex].groupingA.length
QuestionList[selectIndex].QuestionGenre === 3 &&
item.value !== -1
"
:key="item.id"
:label="item.value"
:disabled="
QuestionList[selectIndex].groupingA.length
? ~QuestionList[selectIndex].groupingA.indexOf(item.value) ? ~QuestionList[selectIndex].groupingA.indexOf(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>
</div> </div>
<div <div class="base-dialog-footer" style="text-align: right; margin-top: 10px">
class="base-dialog-footer"
style="text-align: right; margin-top: 10px"
>
<!-- 取消 --> <!-- 取消 -->
<el-button <el-button v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']" :disabled="btnLoading" size="small"
v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']" type="primary" @click="
:disabled="btnLoading"
size="small"
type="primary"
@click="
QuestionVisible = false QuestionVisible = false
$set(QuestionList[selectIndex], 'groupingA', []) $set(QuestionList[selectIndex], 'groupingA', [])
$set(QuestionList[selectIndex], 'groupingB', []) $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']" :disabled="btnLoading" size="small"
v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']" type="primary" @click="save">
:disabled="btnLoading"
size="small"
type="primary"
@click="save"
>
{{ $t('common:button:save') }} {{ $t('common:button:save') }}
</el-button> </el-button>
</div> </div>
@ -655,8 +444,8 @@ export default {
try { try {
let validate = await this.$refs[ let validate = await this.$refs[
'JudgeDifferenceValue' + 'JudgeDifferenceValue' +
this.QuestionList[index].JudgeType + this.QuestionList[index].JudgeType +
index index
][0].validate() ][0].validate()
if (!validate) return reject(false) if (!validate) return reject(false)
} catch (err) { } catch (err) {