This commit is contained in:
fan 2024-02-28 10:04:38 +08:00
commit fc554ce855
4 changed files with 47 additions and 24 deletions

View File

@ -7,6 +7,16 @@
<el-form-item label="试卷描述:" prop="desc">
<el-input v-model="formModel.desc" type="textarea" style="width:350px;" />
</el-form-item>
<el-form-item label="组别:" prop="group">
<el-select v-model="formModel.group" placeholder="请选择" style="width:350px;">
<el-option
v-for="item in groupOption"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="所属赛季:" prop="seasonId">
<el-select v-model="formModel.seasonId" placeholder="请选择" style="width:350px;">
<el-option
@ -17,9 +27,6 @@
/>
</el-select>
</el-form-item>
<el-form-item label="支持拷贝:" prop="supportCopy">
<el-checkbox v-model="formModel.supportCopy" />
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button v-loading="loading" type="primary" @click="doSave">{{ $t('global.confirm') }}</el-button>
@ -39,9 +46,16 @@ export default {
name: '', //
desc: '', //
seasonId: '', // id
supportCopy:false //
group:'' //
},
seasonOptions:[],
groupOption:[{
value: 'ZZ',
label: '中职'
}, {
value: 'GZ',
label: '高职'
}],
loading: false
};
},
@ -54,6 +68,9 @@ export default {
desc: [
{ required: true, message: '请输入试卷描述', trigger: 'blur' }
],
group: [
{ required: true, message: '请选择试卷所属赛季', trigger: 'blur' }
],
seasonId: [
{ required: true, message: '请选择试卷所属赛季', trigger: 'blur' }
]
@ -75,12 +92,13 @@ export default {
this.formModel.name = row.name;
this.formModel.desc = row.desc;
this.formModel.seasonId = row.seasonId;
this.formModel.supportCopy = row.supportCopy;
this.formModel.group = row.group;
} else {
this.formModel = {
id: '',
name: '',
desc: '',
group:'',
seasonId: ''
};
}
@ -90,8 +108,7 @@ export default {
id: '',
name: '',
desc: '',
seasonId: '',
supportCopy:false
seasonId: ''
};
this.dialogVisible = false;
this.loading = false;

View File

@ -37,6 +37,17 @@ export default {
name: {
type: 'text',
label: '试卷名称:'
},
seasonName: {
type: 'text',
label: '赛季名称:'
},
group: {
type: 'select',
label: '组 别',
config: {
data: [{label: '高职', value: 'GZ'}, {label: '中职', value: 'ZZ'}]
}
}
}
},
@ -53,6 +64,13 @@ export default {
title: '试卷描述',
prop: 'desc'
},
{
title: '组别',
prop: 'group',
type: 'tag',
columnValue: (row) => { return row.group === 'GZ' ? '高职' : '中职'; },
tagType: (row) => { return ''; }
},
{
title: '所属赛季',
prop: 'seasonName'
@ -94,10 +112,7 @@ export default {
{
name: '拷贝试卷',
handleClick: this.copyContestPaper,
type: 'warning',
showControl: row => {
return row.supportCopy;
}
type: 'warning'
}
]
}

View File

@ -1,10 +1,10 @@
<template>
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="500px" :before-close="handleClose" center :close-on-click-modal="false" append-to-body>
<el-form ref="ruleForm" :model="formModel" :rules="rules" label-width="100px">
<el-dialog v-dialogDrag :title="title" :visible.sync="dialogVisible" width="540px" :before-close="handleClose" center :close-on-click-modal="false" append-to-body @keydown.enter.native.prevent>
<el-form ref="ruleForm" :model="formModel" :rules="rules" label-width="120px">
<el-form-item v-if="editType == 'module'" label="模块名称:" prop="moduleName">
<el-input v-model="formModel.moduleName" style="width: 350px;" />
</el-form-item>
<el-form-item v-if="editType == 'module'" label="考试时间:" prop="duration">
<el-form-item v-if="editType == 'module'" label="考试时间(分钟):" prop="duration">
<el-input v-model="formModel.duration" style="width:350px;" />
</el-form-item>
<el-form-item v-if="editType == 'module'" label="评分规则:" prop="moduleScoreRuleId">
@ -71,9 +71,6 @@ export default {
duration: [
{ required: true, message: '请输入考试时间', trigger: 'blur' }
],
moduleScoreRuleId: [
{ required: true, message: '请选择任务', trigger: 'blur' }
],
taskCatalogName: [
{ required: true, message: '请输入任务名称', trigger: 'blur' }
],
@ -152,7 +149,7 @@ export default {
}
this.$emit('changeTreeData', 'taskCatalog', data, this.isAdd);
} else {
const data = this.formModel.tasks.map(task=>{ return {label:task, type:'tasks', parentId:this.parentId}; });
const data = this.formModel.tasks.reverse().map(task=>{ return {label:task, type:'tasks', parentId:this.parentId}; });
this.$emit('changeTreeData', 'task', data);
}
this.handleClose();

View File

@ -47,12 +47,6 @@ export default {
],
desc: [
{ required: true, message: '请输入任务描述', trigger: 'blur' }
],
content: [
{ required: true, message: '请输入考核内容', trigger: 'blur' }
],
standards: [
{ required: true, message: '请输入评价标准', trigger: 'blur' }
]
};
return crules;