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"
|
@sort-change="changeSort"
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="50"></el-table-column>
|
<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>
|
<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>
|
||||||
<el-table-column align="left" label="用户">
|
<el-table-column align="left" label="用户">
|
||||||
<template slot-scope="scope">{{ scope.row.create_by_name}}</template>
|
<template slot-scope="scope">{{ scope.row.create_by_name}}</template>
|
||||||
|
@ -82,6 +85,15 @@
|
||||||
<el-table-column align="left" label="答题时间">
|
<el-table-column align="left" label="答题时间">
|
||||||
<template slot-scope="scope">{{ scope.row.start_time }}</template>
|
<template slot-scope="scope">{{ scope.row.start_time }}</template>
|
||||||
</el-table-column>
|
</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">
|
<el-table-column align="center" label="操作" fixed="right">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<!-- <el-button
|
<!-- <el-button
|
||||||
|
@ -123,7 +135,6 @@
|
||||||
const listQuery = {
|
const listQuery = {
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 20,
|
limit: 20,
|
||||||
type:'正式考试',
|
|
||||||
search:''
|
search:''
|
||||||
};
|
};
|
||||||
export default {
|
export default {
|
||||||
|
@ -193,13 +204,13 @@
|
||||||
methods: {
|
methods: {
|
||||||
checkPermission,
|
checkPermission,
|
||||||
getQuery() {
|
getQuery() {
|
||||||
if(this.$route.params.exam){
|
if(this.$route.query.exam){
|
||||||
this.listQuery.exam = this.$route.params.exam;
|
this.listQuery.exam = this.$route.query.exam;
|
||||||
this.getList()
|
|
||||||
}else{
|
|
||||||
this.getList()
|
|
||||||
}
|
}
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
handlePictureCardPreview(url){
|
||||||
|
window.open(url);
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
this.listLoading = true;
|
this.listLoading = true;
|
||||||
|
@ -216,11 +227,10 @@
|
||||||
this.listQuery = {
|
this.listQuery = {
|
||||||
page: 1,
|
page: 1,
|
||||||
limit: 20,
|
limit: 20,
|
||||||
type:'正式考试',
|
|
||||||
search:'',
|
search:'',
|
||||||
};
|
};
|
||||||
this.value = []
|
this.value = []
|
||||||
this.getList();
|
// this.getList();
|
||||||
},
|
},
|
||||||
handleExport(scope) {
|
handleExport(scope) {
|
||||||
const loading = this.$loading({text: '正在生成word...',});
|
const loading = this.$loading({text: '正在生成word...',});
|
||||||
|
@ -256,8 +266,6 @@
|
||||||
},
|
},
|
||||||
exportTest() {
|
exportTest() {
|
||||||
const loading = this.$loading();
|
const loading = this.$loading();
|
||||||
this.listQuery.page = Number.MAX_SAFE_INTEGER;
|
|
||||||
this.listQuery.limit = Number.MAX_SAFE_INTEGER;
|
|
||||||
exportRecord(this.listQuery).then(res=>{
|
exportRecord(this.listQuery).then(res=>{
|
||||||
loading.close()
|
loading.close()
|
||||||
window.open(res.data.path, "_blank");
|
window.open(res.data.path, "_blank");
|
||||||
|
|
|
@ -39,9 +39,9 @@
|
||||||
<el-table-column label="考试地点">
|
<el-table-column label="考试地点">
|
||||||
<template slot-scope="scope">{{ scope.row.place }}</template>
|
<template slot-scope="scope">{{ scope.row.place }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="参考机会">
|
<!-- <el-table-column label="参考机会">
|
||||||
<template slot-scope="scope">{{ scope.row.chance }}</template>
|
<template slot-scope="scope">{{ scope.row.chance }}</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column label="开启时间">
|
<el-table-column label="开启时间">
|
||||||
<template slot-scope="scope">{{ scope.row.open_time }}</template>
|
<template slot-scope="scope">{{ scope.row.open_time }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -96,9 +96,9 @@
|
||||||
<el-form-item label="考试地点" prop="place">
|
<el-form-item label="考试地点" prop="place">
|
||||||
<el-input v-model="exam.place" placeholder="考试地点" />
|
<el-input v-model="exam.place" placeholder="考试地点" />
|
||||||
</el-form-item>
|
</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-input-number v-model="exam.chance" placeholder="参考机会" :min="1"/>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<el-form-item label="开启时间" prop="open_time">
|
<el-form-item label="开启时间" prop="open_time">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="exam.open_time"
|
v-model="exam.open_time"
|
||||||
|
@ -154,15 +154,25 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="考试部门" prop="participant_dep" style="width:100%" clearable collapse-tags filterable >
|
<el-form-item label="考试部门" prop="participant_dep" style="width:100%" clearable collapse-tags filterable >
|
||||||
<el-button @click="selectAll">全选部门</el-button>
|
<!-- <el-button @click="selectAll">全选部门</el-button> -->
|
||||||
<el-select v-model="exam.participant_dep" multiple collapse-tags filterable placeholder = "选择部门" >
|
<!-- <el-select v-model="exam.participant_dep" multiple collapse-tags filterable placeholder = "选择部门" >
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in depOptions"
|
v-for="item in depOptions"
|
||||||
:key = "item.id"
|
:key = "item.id"
|
||||||
:label = "item.name"
|
:label = "item.name"
|
||||||
:value = "item.id">
|
:value = "item.id">
|
||||||
</el-option>
|
</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>
|
||||||
|
|
||||||
<!-- <el-form-item label="考试人员" prop="participant_user" style="width:100%" clearable>
|
<!-- <el-form-item label="考试人员" prop="participant_user" style="width:100%" clearable>
|
||||||
|
@ -184,6 +194,7 @@
|
||||||
:total="total"
|
:total="total"
|
||||||
></el-pagination>
|
></el-pagination>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div style="text-align:right;">
|
<div style="text-align:right;">
|
||||||
<el-button type="danger" @click="dialogVisible=false">取消</el-button>
|
<el-button type="danger" @click="dialogVisible=false">取消</el-button>
|
||||||
|
@ -197,7 +208,11 @@
|
||||||
import {getUserList} from "@/api/user";
|
import {getUserList} from "@/api/user";
|
||||||
import checkPermission from "@/utils/permission";
|
import checkPermission from "@/utils/permission";
|
||||||
import Pagination from "@/components/Pagination"
|
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 = {
|
const defaultexam = {
|
||||||
id: "",
|
id: "",
|
||||||
|
@ -207,7 +222,7 @@
|
||||||
close_time: null,
|
close_time: null,
|
||||||
proctor_name:'',
|
proctor_name:'',
|
||||||
proctor_phone:'',
|
proctor_phone:'',
|
||||||
chance:3,
|
chance:1,
|
||||||
paper:'',
|
paper:'',
|
||||||
certificate:'',
|
certificate:'',
|
||||||
course_name:[],
|
course_name:[],
|
||||||
|
@ -270,9 +285,9 @@
|
||||||
this.paperOptions = res.data
|
this.paperOptions = res.data
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
selectAll(){
|
// selectAll(){
|
||||||
this.exam.participant_dep = this.depOptions.map(option => option.id);
|
// this.exam.participant_dep = this.depOptions.map(option => option.id);
|
||||||
},
|
// },
|
||||||
getList() {
|
getList() {
|
||||||
this.listLoading = true;
|
this.listLoading = true;
|
||||||
debugger;
|
debugger;
|
||||||
|
@ -281,6 +296,12 @@
|
||||||
this.listLoading = false;
|
this.listLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
handleChange(value, direction, movedKeys) {
|
||||||
|
console.log(value, direction, movedKeys)
|
||||||
|
},
|
||||||
|
handleOnChange(value, direction, movedKeys) {
|
||||||
|
console.log(value, direction, movedKeys)
|
||||||
|
},
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
// 改变每页显示的条数
|
// 改变每页显示的条数
|
||||||
this.pageSize = val;
|
this.pageSize = val;
|
||||||
|
@ -353,7 +374,7 @@
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
// console.error(err);
|
console.error(err);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleView(scope){
|
handleView(scope){
|
||||||
|
|
|
@ -240,8 +240,6 @@ export default {
|
||||||
const loading = this.$loading({
|
const loading = this.$loading({
|
||||||
text: '正在准备..'
|
text: '正在准备..'
|
||||||
});
|
});
|
||||||
this.listQuery.page = Number.MAX_SAFE_INTEGER;
|
|
||||||
this.listQuery.limit = Number.MAX_SAFE_INTEGER;
|
|
||||||
exportQuestion(this.listQuery).then(response => {
|
exportQuestion(this.listQuery).then(response => {
|
||||||
loading.close()
|
loading.close()
|
||||||
window.open(response.data.path, "_blank");
|
window.open(response.data.path, "_blank");
|
||||||
|
|
Loading…
Reference in New Issue