试卷调整

This commit is contained in:
fan 2024-04-11 11:10:03 +08:00
parent 6c3b06c4a0
commit 27129e8b21

View File

@ -7,6 +7,21 @@
:close-on-click-modal="false"
@open="onOpen"
>
<el-form :inline="true" :model="form" size="small" style="display: flex; justify-content: space-between;">
<el-form-item label="创建人">
<el-select v-model="form.creatorId" :clearable="true">
<el-option
v-for="(option,index) in creatorList"
:key="id"
:label="option.id"
:value="option.name"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit">查询</el-button>
</el-form-item>
</el-form>
<el-table :data="paperList" border>
<el-table-column prop="name" label="试卷名称" width="150px">
<template slot-scope="scope">
@ -58,14 +73,18 @@
</template>
<script>
import { getPapaerListOfOrg, generateExam, getUserExamInfo } from '@/api/management/exam';
import { getPapaerListOfOrg, generateExam, getUserExamInfo, queryPaperCreatorList } from '@/api/management/exam';
export default {
name: 'SelectExam',
emits: ['examStart'],
data() {
return {
show: false,
paperList: []
paperList: [],
creatorList: [],
form: {
creatorId: ''
}
};
},
methods: {
@ -76,14 +95,22 @@ export default {
this.show = false;
},
onOpen() {
getPapaerListOfOrg({
this.creatorList = [];
queryPaperCreatorList().then(response => {
this.creatorList = response.data;
});
this.onSubmit();
},
onSubmit() {
getPapaerListOfOrg({
orgId: this.$store.state.user.companyId,
mapId: this.$route.query.mapId,
creatorId: this.form.creatorId,
findState: 3
}).then(resp => {
this.paperList = resp.data.list;
});
},
},
start(row) {
if (this.$store.state.trainingNew.trainingSwitch) {
this.$message.error('请先结束当前实训后再加载新的考试!');