修改
This commit is contained in:
parent
601e17e255
commit
4ebfcdd6d2
@ -68,6 +68,7 @@
|
||||
<el-radio-group v-model="postForm.examType">
|
||||
<el-radio :label="1">模拟考试</el-radio>
|
||||
<el-radio :label="2">正式考试</el-radio>
|
||||
<el-radio :label="3">补考</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="总分数" prop="totalScore">
|
||||
@ -87,7 +88,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item v-if="postForm.timeLimit" label="考试日期" required>
|
||||
<el-date-picker v-model="dateValues" format="yyyy-MM-dd" value-format="yyyy-MM-dd" type="daterange"
|
||||
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
|
||||
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="postForm.timeLimit" label="考试时间" required>
|
||||
<el-time-picker is-range v-model="timeValues" range-separator="至" start-placeholder="开始时间"
|
||||
@ -127,14 +128,20 @@ export default {
|
||||
components: { RepoSelect },
|
||||
data() {
|
||||
return {
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return time.getTime() < Date.now() - 8.64e7; //只能选择今天及今天之后的日期
|
||||
//return time.getTime() < Date.now() - 8.64e6; //只能选择今天之后的日期,今天的日期也不能选
|
||||
}
|
||||
},
|
||||
treeData: [],
|
||||
defaultProps: {
|
||||
label: 'deptName'
|
||||
},
|
||||
filterText: '',
|
||||
treeLoading: false,
|
||||
dateValues: [],
|
||||
timeValues: [],
|
||||
dateValues: ["", ""],
|
||||
timeValues: ["", ""],
|
||||
// 题库
|
||||
repoList: [],
|
||||
// 已选择的题库
|
||||
@ -195,6 +202,14 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
timeValues(newVal) {
|
||||
if (newVal && newVal.length === 2 && newVal[0] === '00:00' && newVal[1] === '00:00') {
|
||||
// 如果检测到抖动到00:00,则重置为空
|
||||
this.$nextTick(() => {
|
||||
this.timeValues = [];
|
||||
});
|
||||
}
|
||||
},
|
||||
filterText(val) {
|
||||
this.$refs.tree.filter(val)
|
||||
},
|
||||
@ -237,9 +252,8 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const id = this.$route.params.id
|
||||
if (typeof id !== undefined) {
|
||||
this.fetchData(id)
|
||||
if (this.$route.params.id) {
|
||||
this.fetchData(this.$route.params.id)
|
||||
}
|
||||
fetchTree({}).then(response => {
|
||||
this.treeData = response.data
|
||||
|
||||
@ -17,8 +17,9 @@
|
||||
<el-table-column label="考试名称" prop="title" />
|
||||
<el-table-column label="考试类型" align="center">
|
||||
<template v-slot="scope">
|
||||
{{ scope.row.examType == 1 ? '模拟考试' : '' }}
|
||||
{{ scope.row.examType == 2 ? '正式考试' : '' }}
|
||||
<el-tag v-if="scope.row.examType == 1" type="info">模拟考试</el-tag>
|
||||
<el-tag v-if="scope.row.examType == 2">正式考试</el-tag>
|
||||
<el-tag v-if="scope.row.examType == 3" type="warning">补考</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="开放类型" align="center">
|
||||
|
||||
@ -16,9 +16,9 @@
|
||||
@click.native.prevent="accountLogin">登录</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div style="display: flex; align-items: center; justify-content: flex-end">
|
||||
<!-- <div style="display: flex; align-items: center; justify-content: flex-end">
|
||||
<el-link type="primary" href="/#/register">立即注册</el-link>
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@ -33,13 +33,13 @@
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="是否通过"
|
||||
label="是否及格"
|
||||
align="center"
|
||||
>
|
||||
|
||||
<template v-slot="scope">
|
||||
<span v-if="scope.row.passed" style="color: #00ff00;">通过</span>
|
||||
<span v-else style="color: #ff0000;">未通过</span>
|
||||
<span v-if="scope.row.passed" style="color: #00ff00;">及格</span>
|
||||
<span v-else style="color: #ff0000;">不及格</span>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
@ -1,80 +1,43 @@
|
||||
<template>
|
||||
|
||||
<div>
|
||||
<data-table
|
||||
ref="pagingTable"
|
||||
:options="options"
|
||||
:list-query="listQuery"
|
||||
>
|
||||
<data-table ref="pagingTable" :options="options" :list-query="listQuery">
|
||||
<template #filter-content>
|
||||
|
||||
<el-input v-model="listQuery.params.title" placeholder="搜索考试名称" style="width: 200px;" class="filter-item" />
|
||||
|
||||
</template>
|
||||
|
||||
<template #data-columns>
|
||||
|
||||
<el-table-column
|
||||
label="考试名称"
|
||||
prop="title"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="考试次数"
|
||||
prop="tryCount"
|
||||
align="center"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="最高分"
|
||||
prop="maxScore"
|
||||
align="center"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="是否通过"
|
||||
align="center"
|
||||
>
|
||||
|
||||
<el-table-column label="考试名称" prop="title" show-overflow-tooltip />
|
||||
<el-table-column label="考试次数" prop="tryCount" align="center" />
|
||||
<el-table-column label="考试类型" prop="examType" align="center">
|
||||
<template v-slot="scope">
|
||||
<span v-if="scope.row.passed" style="color: #00ff00;">通过</span>
|
||||
<span v-else style="color: #ff0000;">未通过</span>
|
||||
<el-tag v-if="scope.row.examType == 1" type="info">模拟考试</el-tag>
|
||||
<el-tag v-if="scope.row.examType == 2">正式考试</el-tag>
|
||||
<el-tag v-if="scope.row.examType == 3" type="warning">补考</el-tag>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="最后考试时间"
|
||||
prop="updateTime"
|
||||
align="center"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
>
|
||||
<el-table-column label="最高分" prop="maxScore" align="center" />
|
||||
<el-table-column label="是否及格" align="center">
|
||||
<template v-slot="scope">
|
||||
<el-button type="primary" size="mini" icon="el-icon-view" @click="handleExamDetail(scope.row.examId)">详情</el-button>
|
||||
<el-button type="warning" size="mini" icon="el-icon-close" @click="handlerExamBook(scope.row.examId)">错题</el-button>
|
||||
<el-tag v-if="scope.row.passed" type="success">及格</el-tag>
|
||||
<el-tag v-else type="danger">不及格</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="最后考试时间" prop="updateTime" align="center" />
|
||||
<el-table-column label="操作" align="center">
|
||||
<template v-slot="scope">
|
||||
<el-button type="primary" size="mini" icon="el-icon-view"
|
||||
@click="handleExamDetail(scope.row.examId)">详情</el-button>
|
||||
<el-button type="warning" size="mini" icon="el-icon-close"
|
||||
@click="handlerExamBook(scope.row.examId)">错题</el-button>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
|
||||
</template>
|
||||
|
||||
</data-table>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible" title="考试明细" width="60%">
|
||||
|
||||
<div class="el-dialog-div">
|
||||
<my-paper-list :exam-id="examId" :user-id="userId" />
|
||||
</div>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -121,18 +84,16 @@ export default {
|
||||
},
|
||||
|
||||
handlerExamBook(examId) {
|
||||
this.$router.push({ name: 'BookList', params: { examId: examId }})
|
||||
this.$router.push({ name: 'BookList', params: { examId: examId } })
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.el-dialog-div{
|
||||
height: 60vh;
|
||||
overflow: auto;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.el-dialog-div {
|
||||
height: 60vh;
|
||||
overflow: auto;
|
||||
padding: 10px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user