|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
<el-row>
|
|
|
- <!--用户数据-->
|
|
|
+ <!--考试数据-->
|
|
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
|
|
|
<el-form-item label="考试名称" prop="userName">
|
|
|
<el-input
|
|
@@ -98,16 +98,16 @@
|
|
|
|
|
|
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="50" align="center" />
|
|
|
- <el-table-column label="考试名称" align="center" key="userName" prop="userName" v-if="columns[0].visible" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="考试时间" align="center" key="kaoshiTime" prop="kaoshiTime" v-if="columns[1].visible" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="模拟器型号" align="center" key="simType" prop="simType" v-if="columns[2].visible" :show-overflow-tooltip="true" >
|
|
|
+ <el-table-column label="编号" align="center" key="examId" prop="examId" v-if="columns[0].visible" width="80"/>
|
|
|
+ <el-table-column label="考试名称" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column label="考试时间" align="center" key="kaoshiTime" prop="kaoshiTime" v-if="columns[2].visible" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column label="模拟器型号" align="center" key="simType" prop="simType" v-if="columns[3].visible" :show-overflow-tooltip="true" >
|
|
|
<template slot-scope="scope">
|
|
|
<dict-tag class="text-navy" :options="dict.type.sim_sim_type" :value="scope.row.simType"/>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
-
|
|
|
- <el-table-column label="创建老师" align="center" key="creater" prop="creater" v-if="columns[3].visible" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="考试状态" align="center" key="status" v-if="columns[4].visible">
|
|
|
+ <el-table-column label="创建老师" align="center" key="creater" prop="creater" v-if="columns[4].visible" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column label="考试状态" align="center" key="status" v-if="columns[5].visible">
|
|
|
<template slot-scope="scope">
|
|
|
<el-switch
|
|
|
v-model="scope.row.status"
|
|
@@ -221,7 +221,7 @@
|
|
|
</style>
|
|
|
<script>
|
|
|
import { listUser,getUserProfile} from "@/api/system/user";
|
|
|
-import { examStudentList,examStudentGet} from "@/api/sim/exam";
|
|
|
+import { examStudentList,examStudentGet,examStudentEnter} from "@/api/sim/exam";
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
|
|
|
export default {
|
|
@@ -282,11 +282,12 @@ export default {
|
|
|
},
|
|
|
// 列信息
|
|
|
columns: [
|
|
|
- { key: 0, label: `考试名称`, visible: true },
|
|
|
- { key: 1, label: `考试时间`, visible: true },
|
|
|
- { key: 2, label: `模拟器类型`, visible: true },
|
|
|
- { key: 3, label: `考试状态`, visible: true },
|
|
|
- { key: 4, label: `创建老师`, visible: true },
|
|
|
+ { key: 0, label: `编号`, visible: true },
|
|
|
+ { key: 1, label: `考试名称`, visible: true },
|
|
|
+ { key: 2, label: `考试时间`, visible: true },
|
|
|
+ { key: 3, label: `模拟器类型`, visible: true },
|
|
|
+ { key: 4, label: `考试状态`, visible: true },
|
|
|
+ { key: 5, label: `创建老师`, visible: true },
|
|
|
],
|
|
|
// 表单校验
|
|
|
rules: {
|
|
@@ -427,16 +428,17 @@ export default {
|
|
|
getUserProfile().then(response => {
|
|
|
this.user = response.data;
|
|
|
console.log(response.data.userId)
|
|
|
+ console.log(this.user.userId);
|
|
|
+ console.log('this.user.userId');
|
|
|
+ examStudentList(this.user.userId).then(response => {
|
|
|
+ //将返回值注释
|
|
|
+ this.userList = response.rows;
|
|
|
+ this.total = response.total;
|
|
|
+ this.loading = false;
|
|
|
+ }
|
|
|
+ );
|
|
|
});
|
|
|
- console.log(this.user.userId);
|
|
|
- console.log('this.user.userId');
|
|
|
- examStudentList(this.user.userId).then(response => {
|
|
|
- //将返回值注释
|
|
|
- this.userList = response.rows;
|
|
|
- this.total = response.total;
|
|
|
- this.loading = false;
|
|
|
- }
|
|
|
- );
|
|
|
+
|
|
|
},
|
|
|
/** 查询部门下拉树结构 */
|
|
|
getDeptTree() {
|
|
@@ -599,9 +601,18 @@ export default {
|
|
|
|
|
|
/** 进入操作 */
|
|
|
handleInto: function(row) {
|
|
|
- const userId = row.userId;
|
|
|
- console.log(userId)
|
|
|
- this.$router.push("/people/exam-exam1/examid/" + userId);
|
|
|
+ const examId = row.examId;
|
|
|
+ console.log(examId)
|
|
|
+ examStudentEnter(examId).then(response => {
|
|
|
+ //将返回值注释
|
|
|
+ // this.userList = response.rows;
|
|
|
+ // this.total = response.total;
|
|
|
+ // this.loading = false;
|
|
|
+ this.$router.push("/people/exam-exam1/examid/" + examId);
|
|
|
+ }
|
|
|
+ );
|
|
|
+
|
|
|
+ // this.$router.push("/people/exam-exam1/examid/" + userId);
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitForm: function() {
|