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>
<el-form v-loading="loading">
<!-- 仲裁对象 -->
<el-form-item
:label="$t('trials:adRules:title:arbitrationRule')"
:label-width="'180px'"
>
<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"
>
<el-form-item :label="$t('trials:adRules:title:arbitrationRule')" :label-width="'180px'">
<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 }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-collapse v-model="activeNames" style="border-top:none;">
<el-collapse-item
v-for="(item, index) of QuestionList"
:key="item.ReadingQuestionTrialId"
style="position: relative;padding:0 10px;"
:name="item.ReadingQuestionTrialId"
>
<el-collapse-item v-for="(item, index) of QuestionList" :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="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-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')"
style="width: 95%"
>
<el-radio-group
v-model="QuestionList[index].JudgeType"
@input="(val) => JudgeTypeChange(val, index)"
>
<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)">
<template v-for="item of $d.JudgeTypeEnum">
<el-radio
style="margin-bottom: 5px"
:key="item.id"
:disabled="
OtherInfo.IsSign ||
!hasPermi(['trials:trials-panel:setting:reading-unit:edit'])
"
:label="item.value"
v-if="
<el-radio style="margin-bottom: 5px" :key="item.id" :disabled="OtherInfo.IsSign ||
!hasPermi(['trials:trials-panel:setting:reading-unit:edit'])
" :label="item.value" v-if="
item.value < 4 ||
(item.value > 3 &&
(QuestionList[index].Type === 'number' ||
QuestionList[index].Type === 'calculation'))
"
>
">
{{ item.label }}
</el-radio>
</template>
</el-radio-group>
</el-form-item>
</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>
<el-table
v-if="QuestionList[index].JudgeType === 3"
v-loading="loading"
:data="QuestionList[index].AnswerGroupList"
border
stripe
>
<el-table v-if="QuestionList[index].JudgeType === 3" v-loading="loading"
:data="QuestionList[index].AnswerGroupList" border stripe>
<!-- 序号 -->
<el-table-column
prop="AnswerGroupA"
:label="$t('trials:adRules:title:order')"
width="160"
>
<el-table-column prop="AnswerGroupA" :label="$t('trials:adRules:title:order')" width="160">
<template slot-scope="scope">
{{ scope.$index + 1 }}
</template>
</el-table-column>
<!-- 阅片人A -->
<el-table-column
prop="AnswerGroupA"
:label="$t('trials:adRules:title:answerGroupA')"
min-width="100"
>
<el-table-column prop="AnswerGroupA" :label="$t('trials:adRules:title:answerGroupA')" min-width="100">
<template slot-scope="scope">
{{
QuestionList[index].QuestionGenre === 3
? scope.row.AnswerGroupA.map((v) =>
$fd(QuestionList[index].DictionaryCode, parseInt(v))
).toString()
$fd(QuestionList[index].DictionaryCode, parseInt(v))
).toString()
: scope.row.AnswerGroupA.toString()
}}
</template>
</el-table-column>
<!-- 阅片人B -->
<el-table-column
prop="AnswerGroupB"
:label="$t('trials:adRules:title:answerGroupB')"
min-width="100"
>
<el-table-column prop="AnswerGroupB" :label="$t('trials:adRules:title:answerGroupB')" min-width="100">
<template slot-scope="scope">
{{
QuestionList[index].QuestionGenre === 3
? scope.row.AnswerGroupB.map((v) =>
$fd(QuestionList[index].DictionaryCode, parseInt(v))
).toString()
$fd(QuestionList[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"
>
<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="OtherInfo.IsSign"
@click="addGroup(index, scope.$index)"
/>
<el-button icon="el-icon-edit" circle :title="$t('common:button:edit')" size="mini"
:disabled="OtherInfo.IsSign" @click="addGroup(index, scope.$index)" />
<!-- 删除 -->
<el-button
icon="el-icon-delete"
circle
:title="$t('common:button:delete')"
size="mini"
:disabled="OtherInfo.IsSign"
@click="tagClose(index, scope.$index)"
/>
<el-button icon="el-icon-delete" circle :title="$t('common:button:delete')" size="mini"
:disabled="OtherInfo.IsSign" @click="tagClose(index, scope.$index)" />
</template>
</el-table-column>
</el-table>
<div v-if="QuestionList[index].JudgeType === 2">
<div
style="
<div 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"
>
">
<el-checkbox-group v-if="QuestionList[index].QuestionGenre === 3" v-model="QuestionList[index].grouping">
<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>
</el-checkbox-group>
<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>
<div style="margin-top: 20px">
<!-- 当前选择答案分组: -->
{{ $t('trials:adRules:title:selectAnswerGroup') }}
<el-tag
v-if="
QuestionList[index].grouping.length > 0 &&
QuestionList[index].QuestionGenre !== 3
"
>{{
<el-tag v-if="
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
"
>{{
}}</el-tag>
<el-tag v-if="
QuestionList[index].grouping.length > 0 &&
QuestionList[index].QuestionGenre === 3
">{{
QuestionList[index].grouping
.map(
(v) =>
@ -233,54 +134,31 @@
)
.toString()
.replaceAll(',', '|')
}}</el-tag
>
<el-button
size="mini"
type="primary"
:disabled="OtherInfo.IsSign"
@click="addGroup2(index)"
>
}}</el-tag>
<el-button size="mini" type="primary" :disabled="OtherInfo.IsSign" @click="addGroup2(index)">
<!-- 添加分组 -->
{{ $t('trials:adRules:title:addGroup') }}
</el-button>
</div>
</div>
<div
v-if="QuestionList[index].QuestionGenre !== 3"
style="margin-top: 20px"
>
<div v-if="QuestionList[index].QuestionGenre !== 3" style="margin-top: 20px">
{{ $t('trials:adRules:title:group') }}
<el-tag
v-for="itemA of QuestionList[index].AnswerGroup2List"
:key="itemA"
closable
style="margin-right: 10px"
@close="
<el-tag v-for="itemA of QuestionList[index].AnswerGroup2List" :key="itemA" closable
style="margin-right: 10px" @close="
() => {
return tagClose2(index, indexA)
}
"
>{{ itemA }}</el-tag
>
">{{ itemA }}</el-tag>
</div>
<div
v-if="QuestionList[index].QuestionGenre === 3"
style="margin-top: 20px"
>
<div v-if="QuestionList[index].QuestionGenre === 3" style="margin-top: 20px">
<!-- 分组: -->
{{ $t('trials:adRules:title:group') }}
<el-tag
v-for="itemA of QuestionList[index].AnswerGroup2List"
:key="itemA"
closable
style="margin-right: 10px"
@close="
<el-tag v-for="itemA of QuestionList[index].AnswerGroup2List" :key="itemA" closable
style="margin-right: 10px" @close="
() => {
return tagClose2(index, indexA)
}
"
>
">
{{
itemA
.split('|')
@ -292,58 +170,31 @@
</el-tag>
</div>
</div>
<div
v-if="
QuestionList[index].JudgeType === 4 ||
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: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"
>
<div v-if="
QuestionList[index].JudgeType === 4 ||
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: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-select>
</el-form-item>
<el-form-item
:label="
$t(
`trials:trials-panel:setting:reading-unit:JudgeDifferenceValue${QuestionList[index].JudgeType}`
)
"
prop="JudgeDifferenceValue"
>
<el-form-item :label="$t(
`trials:trials-panel:setting:reading-unit:JudgeDifferenceValue${QuestionList[index].JudgeType}`
)
" prop="JudgeDifferenceValue">
<div style="display: flex">
<el-input
v-model="QuestionList[index].JudgeDifferenceValue"
clearable
:disabled="OtherInfo.IsSign"
></el-input>
<span style="margin-left: 10px">{{
<el-input v-model="QuestionList[index].JudgeDifferenceValue" clearable
:disabled="OtherInfo.IsSign"></el-input>
<span style="margin-left: 10px" v-if="QuestionList[index].JudgeType !== 5">{{
$fd('ValueUnit', QuestionList[index].Unit)
}}</span>
</div>
@ -355,124 +206,62 @@
<!-- </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
>
<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">
<!-- 阅片人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">
<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
? ~QuestionList[selectIndex].groupingB.indexOf(item)
: false
"
>{{ item }}</el-checkbox
>
<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
? ~QuestionList[selectIndex].groupingB.indexOf(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.length
<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.length
? ~QuestionList[selectIndex].groupingB.indexOf(item.value)
: false
"
>{{ item.label }}</el-checkbox
>
">{{ item.label }}</el-checkbox>
</template>
</el-checkbox-group>
</el-form-item>
<!-- 阅片人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">
<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
? ~QuestionList[selectIndex].groupingA.indexOf(item)
: false
"
>{{ item }}</el-checkbox
>
<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
? ~QuestionList[selectIndex].groupingA.indexOf(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.length
<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.length
? ~QuestionList[selectIndex].groupingA.indexOf(item.value)
: false
"
>{{ item.label }}</el-checkbox
>
">{{ item.label }}</el-checkbox>
</template>
</el-checkbox-group>
</el-form-item>
</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
v-hasPermi="['trials:trials-panel:setting:reading-unit:edit']"
:disabled="btnLoading"
size="small"
type="primary"
@click="
<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', [])
"
>
$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"
>
<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>
@ -655,8 +444,8 @@ export default {
try {
let validate = await this.$refs[
'JudgeDifferenceValue' +
this.QuestionList[index].JudgeType +
index
this.QuestionList[index].JudgeType +
index
][0].validate()
if (!validate) return reject(false)
} catch (err) {