feat:新增考试增加穿梭框
This commit is contained in:
parent
5005dac357
commit
e32ee16d05
File diff suppressed because one or more lines are too long
|
@ -55,8 +55,11 @@
|
|||
@sort-change="changeSort"
|
||||
>
|
||||
<el-table-column type="index" width="50"></el-table-column>
|
||||
<el-table-column align="left" label="类型">
|
||||
<!-- <el-table-column align="left" label="类型">
|
||||
<template slot-scope="scope">{{ scope.row.type }}</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column align="left" label="考试名称">
|
||||
<template slot-scope="scope">{{ scope.row.exam_name }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="left" label="用户">
|
||||
<template slot-scope="scope">{{ scope.row.create_by_name}}</template>
|
||||
|
@ -82,6 +85,15 @@
|
|||
<el-table-column align="left" label="答题时间">
|
||||
<template slot-scope="scope">{{ scope.row.start_time }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="left" label="证书路径" prop="cert_path">
|
||||
<template slot-scope="scope">
|
||||
<img v-if="scope.row.cert_path" :src="scope.row.cert_path" @click="handlePictureCardPreview(scope.row.cert_path)" alt="图片" height="30" width="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="left" label="考试时间">
|
||||
<template slot-scope="scope">{{ scope.row.create_time }}</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="操作" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<!-- <el-button
|
||||
|
@ -123,7 +135,6 @@
|
|||
const listQuery = {
|
||||
page: 1,
|
||||
limit: 20,
|
||||
type:'正式考试',
|
||||
search:''
|
||||
};
|
||||
export default {
|
||||
|
@ -193,13 +204,13 @@
|
|||
methods: {
|
||||
checkPermission,
|
||||
getQuery() {
|
||||
if(this.$route.params.exam){
|
||||
this.listQuery.exam = this.$route.params.exam;
|
||||
this.getList()
|
||||
}else{
|
||||
this.getList()
|
||||
if(this.$route.query.exam){
|
||||
this.listQuery.exam = this.$route.query.exam;
|
||||
}
|
||||
|
||||
this.getList()
|
||||
},
|
||||
handlePictureCardPreview(url){
|
||||
window.open(url);
|
||||
},
|
||||
getList() {
|
||||
this.listLoading = true;
|
||||
|
@ -216,11 +227,10 @@
|
|||
this.listQuery = {
|
||||
page: 1,
|
||||
limit: 20,
|
||||
type:'正式考试',
|
||||
search:'',
|
||||
};
|
||||
this.value = []
|
||||
this.getList();
|
||||
// this.getList();
|
||||
},
|
||||
handleExport(scope) {
|
||||
const loading = this.$loading({text: '正在生成word...',});
|
||||
|
@ -256,8 +266,6 @@
|
|||
},
|
||||
exportTest() {
|
||||
const loading = this.$loading();
|
||||
this.listQuery.page = Number.MAX_SAFE_INTEGER;
|
||||
this.listQuery.limit = Number.MAX_SAFE_INTEGER;
|
||||
exportRecord(this.listQuery).then(res=>{
|
||||
loading.close()
|
||||
window.open(res.data.path, "_blank");
|
||||
|
|
|
@ -39,9 +39,9 @@
|
|||
<el-table-column label="考试地点">
|
||||
<template slot-scope="scope">{{ scope.row.place }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="参考机会">
|
||||
<!-- <el-table-column label="参考机会">
|
||||
<template slot-scope="scope">{{ scope.row.chance }}</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
<el-table-column label="开启时间">
|
||||
<template slot-scope="scope">{{ scope.row.open_time }}</template>
|
||||
</el-table-column>
|
||||
|
@ -96,9 +96,9 @@
|
|||
<el-form-item label="考试地点" prop="place">
|
||||
<el-input v-model="exam.place" placeholder="考试地点" />
|
||||
</el-form-item>
|
||||
<el-form-item label="参考机会" prop="chance">
|
||||
<!-- <el-form-item label="参考机会" prop="chance">
|
||||
<el-input-number v-model="exam.chance" placeholder="参考机会" :min="1"/>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="开启时间" prop="open_time">
|
||||
<el-date-picker
|
||||
v-model="exam.open_time"
|
||||
|
@ -154,17 +154,27 @@
|
|||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="考试部门" prop="participant_dep" style="width:100%" clearable collapse-tags filterable >
|
||||
<el-button @click="selectAll">全选部门</el-button>
|
||||
<el-select v-model="exam.participant_dep" multiple collapse-tags filterable placeholder = "选择部门" >
|
||||
<!-- <el-button @click="selectAll">全选部门</el-button> -->
|
||||
<!-- <el-select v-model="exam.participant_dep" multiple collapse-tags filterable placeholder = "选择部门" >
|
||||
<el-option
|
||||
v-for="item in depOptions"
|
||||
:key = "item.id"
|
||||
:label = "item.name"
|
||||
:value = "item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-select> -->
|
||||
<div>
|
||||
<el-transfer
|
||||
:props="{key: 'id',label: 'name'}"
|
||||
:data="depOptions"
|
||||
v-model="exam.participant_dep"
|
||||
:titles="['未选部门','考试部门']"
|
||||
@change="handleChange"
|
||||
@on-change="handleOnChange"
|
||||
></el-transfer>
|
||||
</div>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<!-- <el-form-item label="考试人员" prop="participant_user" style="width:100%" clearable>
|
||||
<el-select v-model="exam.participant_user" multiple filterable placeholder = "请选择人员">
|
||||
<el-option
|
||||
|
@ -184,6 +194,7 @@
|
|||
:total="total"
|
||||
></el-pagination>
|
||||
</el-form-item> -->
|
||||
|
||||
</el-form>
|
||||
<div style="text-align:right;">
|
||||
<el-button type="danger" @click="dialogVisible=false">取消</el-button>
|
||||
|
@ -197,7 +208,11 @@
|
|||
import {getUserList} from "@/api/user";
|
||||
import checkPermission from "@/utils/permission";
|
||||
import Pagination from "@/components/Pagination"
|
||||
import Vue from 'vue'
|
||||
// import ElementUI from 'element-ui'
|
||||
// import 'element-ui/lib/theme-chalk/index.css'
|
||||
|
||||
// Vue.use(ElementUI)
|
||||
|
||||
const defaultexam = {
|
||||
id: "",
|
||||
|
@ -207,7 +222,7 @@
|
|||
close_time: null,
|
||||
proctor_name:'',
|
||||
proctor_phone:'',
|
||||
chance:3,
|
||||
chance:1,
|
||||
paper:'',
|
||||
certificate:'',
|
||||
course_name:[],
|
||||
|
@ -270,9 +285,9 @@
|
|||
this.paperOptions = res.data
|
||||
})
|
||||
},
|
||||
selectAll(){
|
||||
this.exam.participant_dep = this.depOptions.map(option => option.id);
|
||||
},
|
||||
// selectAll(){
|
||||
// this.exam.participant_dep = this.depOptions.map(option => option.id);
|
||||
// },
|
||||
getList() {
|
||||
this.listLoading = true;
|
||||
debugger;
|
||||
|
@ -281,6 +296,12 @@
|
|||
this.listLoading = false;
|
||||
});
|
||||
},
|
||||
handleChange(value, direction, movedKeys) {
|
||||
console.log(value, direction, movedKeys)
|
||||
},
|
||||
handleOnChange(value, direction, movedKeys) {
|
||||
console.log(value, direction, movedKeys)
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
// 改变每页显示的条数
|
||||
this.pageSize = val;
|
||||
|
@ -353,7 +374,7 @@
|
|||
});
|
||||
})
|
||||
.catch(err => {
|
||||
// console.error(err);
|
||||
console.error(err);
|
||||
});
|
||||
},
|
||||
handleView(scope){
|
||||
|
|
|
@ -240,8 +240,6 @@ export default {
|
|||
const loading = this.$loading({
|
||||
text: '正在准备..'
|
||||
});
|
||||
this.listQuery.page = Number.MAX_SAFE_INTEGER;
|
||||
this.listQuery.limit = Number.MAX_SAFE_INTEGER;
|
||||
exportQuestion(this.listQuery).then(response => {
|
||||
loading.close()
|
||||
window.open(response.data.path, "_blank");
|
||||
|
|
Loading…
Reference in New Issue