仲裁规则添加配置项
continuous-integration/drone/push Build is passing Details

uat_us
wangxiaoshuang 2024-05-10 14:54:24 +08:00
parent bd1ee8a520
commit e416429087
1 changed files with 75 additions and 10 deletions

View File

@ -26,7 +26,7 @@
<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: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 :label-width="'280px'" :label="$t('trials:adRules:title:judgeTypeEnum')">
<el-radio-group v-model="QuestionList[index].JudgeType"> <el-radio-group v-model="QuestionList[index].JudgeType" @input="(val)=>JudgeTypeChange(val,index)">
<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> <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>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
@ -102,7 +102,9 @@
<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 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">
<el-checkbox v-for="item of $d[QuestionList[index].DictionaryCode]" v-if="item.value !== -1" :key="item.id" :disabled="OtherInfo.IsSign" :label="item.value">{{ item.label }}</el-checkbox> <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>
</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>
@ -127,6 +129,13 @@
</el-tag> </el-tag>
</div> </div>
</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:JudgeDifferenceValue${QuestionList[index].JudgeType}`)" prop="JudgeDifferenceValue">
<el-input v-model="QuestionList[index].JudgeDifferenceValue" clearable :disabled="OtherInfo.IsSign"></el-input>
</el-form-item>
</el-form>
</div>
</el-collapse-item> </el-collapse-item>
</el-collapse> </el-collapse>
<!-- </el-tab-pane>--> <!-- </el-tab-pane>-->
@ -145,15 +154,23 @@
<!-- 阅片人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">
<el-checkbox v-for="(item, index) of QuestionList[selectIndex].TypeValue.split('|')" 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-for="(item, index) of $d[QuestionList[selectIndex].DictionaryCode]" 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> <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 ? ~QuestionList[selectIndex].groupingB.indexOf(item.value) : false">{{ item.label }}</el-checkbox>
</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">
<el-checkbox v-for="(item, index) of QuestionList[selectIndex].TypeValue.split('|')" 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-for="(item, index) of $d[QuestionList[selectIndex].DictionaryCode]" 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> <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 ? ~QuestionList[selectIndex].groupingA.indexOf(item.value) : false">{{ item.label }}</el-checkbox>
</template>
</el-checkbox-group> </el-checkbox-group>
</el-form-item> </el-form-item>
</div> </div>
@ -206,7 +223,35 @@ export default {
OtherInfo: { OtherInfo: {
IsSign: true IsSign: true
}, },
JudgyInfo: {} JudgyInfo: {},
JudgeDifferenceValueQRules:{
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",
},
]
},
} }
}, },
watch: { watch: {
@ -240,6 +285,16 @@ export default {
this.getTrialJudgyInfo() this.getTrialJudgyInfo()
}, },
methods: { methods: {
JudgeTypeChange(value,index){
this.$nextTick(()=>{
if(value===4||value===5){
if(this.$refs['JudgeDifferenceValue'+value+index][0]){
this.$refs['JudgeDifferenceValue'+value+index][0].resetFields();
// this.QuestionList[index].JudgeDifferenceValue = 0;
}
}
})
},
saveAllSync() { saveAllSync() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
var arr = [] var arr = []
@ -379,7 +434,8 @@ export default {
ReadingQuestionTrialId: ReadingQuestionTrialId, ReadingQuestionTrialId: ReadingQuestionTrialId,
AnswerGroup: [], AnswerGroup: [],
AnswerCombination: [], AnswerCombination: [],
JudgeType: 0 JudgeType: 0,
JudgeDifferenceValue:0,
}).then(res => { }).then(res => {
this.$set(this.QuestionList[index], 'AnswerGroup2List', []) this.$set(this.QuestionList[index], 'AnswerGroup2List', [])
this.$set(this.QuestionList[index], 'AnswerGroupList', []) this.$set(this.QuestionList[index], 'AnswerGroupList', [])
@ -393,7 +449,7 @@ export default {
}) })
}) })
}, },
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
@ -406,13 +462,22 @@ export default {
this.$alert(this.$t('trials:adRules:message:msg8')) this.$alert(this.$t('trials:adRules:message:msg8'))
return return
} }
if (this.QuestionList[index].JudgeType === 4||this.QuestionList[index].JudgeType === 5) {
try{
let validate = await this.$refs['JudgeDifferenceValue'+this.QuestionList[index].JudgeType+index][0].validate();
if(!validate) return;
}catch(err){
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),
}).then(res => { }).then(res => {
this.$message.success(this.$t('trials:adRules:message:msg9'))// '' this.$message.success(this.$t('trials:adRules:message:msg9'))// ''
this.btnLoading = false this.btnLoading = false