实训录制 评分 代码调整

This commit is contained in:
joylink_cuiweidong 2022-09-15 10:55:23 +08:00
parent 507e01ebe8
commit 0ccc33e64e
4 changed files with 16 additions and 4 deletions

View File

@ -112,6 +112,14 @@ export function getTrainingMmembers(trainingId) {
});
}
/** 获取实训所有参与者 */
export function getTrainingPlayers(trainingId) {
return request({
url: `/api/v2/draft/training/${trainingId}/player/list`,
method: 'get'
});
}
/** 更新所有评分规则*/
export function updateTrainingGradeRules(trainingId, data) {
return request({

View File

@ -8,7 +8,7 @@
</el-button-group>
</div>
<TrainingList ref="trainingList" @updateDetails="updateDetails" @gradeRules="gradeRules" @closeAllDialog="closeAllDialog" />
<EditDetails ref="editDetails" :edit-data="editData" @openEditOperate="openEditOperate" @handleCondition="handleCondition" @publish="publish" @preview="preview" />
<EditDetails ref="editDetails" :edit-data="editData" @openEditOperate="openEditOperate" @handleCondition="handleCondition" @publish="publish" @preview="preview" @gradeRules="gradeRules" />
<EditCondition ref="editCondition" v-dialogDrag :materials-list="materialsList" @editConditionFn="editConditionFn" @backStep="backStep" />
<edit-operate ref="editOperate" v-dialogDrag @backStepList="backStepList" />
<grade-rules ref="gradeRules" />

View File

@ -10,6 +10,7 @@
<span>实训名称{{ editData.name || '' }}</span>
</div>
<div>
<el-button size="small" type="success" @click="gradeRules">评分</el-button>
<el-button size="small" type="primary" @click="previewTraining">预览</el-button>
<el-button size="small" type="primary" @click="publishTraining">发布</el-button>
<el-button size="small" type="danger" @click="clearStep">清空步骤</el-button>
@ -252,6 +253,9 @@ export default {
this.tableData[data.index].tipPosition = data.tipPosition;
}
},
gradeRules() {
this.$emit('gradeRules', this.editData);
},
handleDelete(index, row) {
console.log('删除', index, row);
this.$confirm('确定删除该条步骤数据?', '警告', {

View File

@ -39,7 +39,7 @@
/>
<el-table-column
prop="score"
label="扣分分值"
label="分值"
width="200"
>
<template v-if="addModel.memberId==scope.row.memberId" slot-scope="scope">
@ -59,7 +59,7 @@
</template>
<script>
import {covertMemberData} from '@/views/newMap/displayNew/utils';
import { getTrainingStepList, getTrainingMmembers, updateTrainingGradeRules, getTrainingGradeRules } from '@/api/trainingManage';
import { getTrainingStepList, getTrainingPlayers, updateTrainingGradeRules, getTrainingGradeRules } from '@/api/trainingManage';
export default {
name: 'GradeRules',
props: {},
@ -106,7 +106,7 @@ export default {
this.gradeRulesMap[gradeRule.memberId] = gradeRule;
});
//
getTrainingMmembers(row.id).then(res=>{
getTrainingPlayers(row.id).then(res=>{
let activeTrainList = [];
if (this.$store.state.training.started) {
activeTrainList = this.$store.state.map.activeTrainList;