|
@@ -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
|
|
@@ -39,7 +39,7 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="考试状态" prop="status">
|
|
|
+ <!-- <el-form-item label="考试状态" prop="status">
|
|
|
<el-select
|
|
|
v-model="queryParams.status"
|
|
|
placeholder="考试状态"
|
|
@@ -53,7 +53,7 @@
|
|
|
:value="dict.value"
|
|
|
/>
|
|
|
</el-select>
|
|
|
- </el-form-item>
|
|
|
+ </el-form-item> -->
|
|
|
|
|
|
<el-form-item>
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
@@ -98,22 +98,26 @@
|
|
|
|
|
|
<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="realExam.examId" prop="realExam.examId" v-if="columns[0].visible" width="80"/>
|
|
|
+ <el-table-column label="考试名称" align="center" key="realExamCollection.examCollectionName" prop="realExamCollection.examCollectionName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column label="考试时间" align="center" key="realExamCollection.kaoshiTime" prop="realExamCollection.kaoshiTime" 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"/>
|
|
|
+ <span>{{scope.row.realExamCollection.startTime}}</span> ~ <span>{{scope.row.realExamCollection.endTime}}</span>
|
|
|
</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="realExamCollection.simType" prop="realExamCollection.simType" v-if="columns[4].visible" :show-overflow-tooltip="true" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <dict-tag class="text-navy" :options="dict.type.sim_sim_type" :value="scope.row.realExamCollection.simType"/>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="创建老师" align="center" key="realExamCollection.createBy" prop="realExamCollection.createBy" v-if="columns[4].visible" :show-overflow-tooltip="true" width="100" />
|
|
|
+ <el-table-column label="考试状态" align="center" key="realExamCollection.examCollectionState" v-if="columns[5].visible" width="100">
|
|
|
<template slot-scope="scope">
|
|
|
<el-switch
|
|
|
- v-model="scope.row.status"
|
|
|
- active-value="0"
|
|
|
- inactive-value="1"
|
|
|
- @change="handleStatusChange(scope.row)"
|
|
|
+ v-model="scope.row.realExamCollection.examCollectionState"
|
|
|
+ active-value="2"
|
|
|
+ inactive-value="3"
|
|
|
+ disabled
|
|
|
></el-switch>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -178,7 +182,6 @@
|
|
|
|
|
|
<el-table
|
|
|
:data="tableData" border ref="multipleTable" @selection-change="handleSelectionRow"
|
|
|
- :span-method="objectSpanMethod"
|
|
|
style="width:100%;text-align:center;margin-left:10px; margin-top:10px">
|
|
|
<el-table-column
|
|
|
prop="xinghao"
|
|
@@ -221,7 +224,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 {
|
|
@@ -266,7 +269,10 @@ export default {
|
|
|
// 角色选项
|
|
|
roleOptions: [],
|
|
|
// 表单参数
|
|
|
- form: {},
|
|
|
+ form: {
|
|
|
+ startTime:'',
|
|
|
+ endTime:'',
|
|
|
+ },
|
|
|
defaultProps: {
|
|
|
children: "children",
|
|
|
label: "label"
|
|
@@ -282,11 +288,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: {
|
|
@@ -309,97 +316,6 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
- objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
- // console.log(this.selectedEquip+'@@@')
|
|
|
- //第一列型号
|
|
|
- if(columnIndex === 0) {
|
|
|
- if(this.selectedEquip==2){
|
|
|
- if(rowIndex==0){
|
|
|
- return { rowspan: 13, colspan: 1 };
|
|
|
- }
|
|
|
- return { rowspan: 0, colspan: 0 };
|
|
|
- }else if(this.selectedEquip==3){
|
|
|
- if(rowIndex==0){
|
|
|
- return { rowspan: 16, colspan: 1 };
|
|
|
- }
|
|
|
- return { rowspan: 0, colspan: 0};
|
|
|
- }else{
|
|
|
- if(rowIndex==0){
|
|
|
- return { rowspan: 11, colspan: 1 };
|
|
|
- }else if(rowIndex==11){
|
|
|
- return { rowspan: 13, colspan: 1 };
|
|
|
- }else if(rowIndex==24){
|
|
|
- return { rowspan: 16, colspan: 1 };
|
|
|
- }else{
|
|
|
- return { rowspan: 0, colspan: 0 };
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- //第二列故障现象
|
|
|
- if(columnIndex === 1) {
|
|
|
- if(this.selectedEquip==2){
|
|
|
- // console.log(rowIndex+'####')
|
|
|
- if(rowIndex<9 && rowIndex % 2 === 0){
|
|
|
- return { rowspan: 2, colspan: 1 };
|
|
|
- }else if((rowIndex>9&&rowIndex<13)){
|
|
|
- return { rowspan: 1, colspan: 1 };
|
|
|
- }else{
|
|
|
- return { rowspan: 0, colspan: 0 };
|
|
|
- }
|
|
|
- }else if(this.selectedEquip==3){
|
|
|
- if(rowIndex<7 && rowIndex % 2 === 0){
|
|
|
- return { rowspan: 2, colspan: 1 };
|
|
|
- }else if((rowIndex==8)){
|
|
|
- return { rowspan: 3, colspan: 1 };
|
|
|
- }else if(rowIndex==11){
|
|
|
- return { rowspan: 2, colspan: 1 };
|
|
|
- }else if(rowIndex>12 && rowIndex<16){
|
|
|
- return { rowspan: 1, colspan: 1 };
|
|
|
- }else{
|
|
|
- return { rowspan: 0, colspan: 0 };
|
|
|
- }
|
|
|
- }else{
|
|
|
- if(rowIndex<7 && rowIndex % 2 === 0){
|
|
|
- return { rowspan: 2, colspan: 1 };
|
|
|
- }else if((rowIndex>7&&rowIndex<11) || (rowIndex>20&&rowIndex<24) || (rowIndex>36)){
|
|
|
- return { rowspan: 1, colspan: 1 };
|
|
|
- }else if((rowIndex==35) || (rowIndex>10 && rowIndex<20) && rowIndex % 2 === 1){
|
|
|
- return { rowspan: 2, colspan: 1 };
|
|
|
- }else if(rowIndex>23 && rowIndex<32 && rowIndex % 2 === 0){
|
|
|
- return { rowspan: 2, colspan: 1 };
|
|
|
- }else if(rowIndex==32){
|
|
|
- return { rowspan: 3, colspan: 1 };
|
|
|
- }else{
|
|
|
- return { rowspan: 0, colspan: 0 };
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
- //故障部位 和 选择
|
|
|
- if(columnIndex === 2 || columnIndex === 3){
|
|
|
- //return { rowspan: 1, colspan: 1 };
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- objectSpanMethod1({ row, column, rowIndex, columnIndex }) {
|
|
|
- //第二列故障现象
|
|
|
- if(columnIndex === 0) {
|
|
|
- if(rowIndex<7 && rowIndex % 2 === 0){
|
|
|
- return { rowspan: 2, colspan: 1 };
|
|
|
- }else if((rowIndex>7&&rowIndex<11) || (rowIndex>20&&rowIndex<24) || (rowIndex>36)){
|
|
|
- return { rowspan: 1, colspan: 1 };
|
|
|
- }else if((rowIndex==35) || (rowIndex>10 && rowIndex<20) && rowIndex % 2 === 1){
|
|
|
- return { rowspan: 2, colspan: 1 };
|
|
|
- }else if(rowIndex>23 && rowIndex<32 && rowIndex % 2 === 0){
|
|
|
- return { rowspan: 2, colspan: 1 };
|
|
|
- }else if(rowIndex==32){
|
|
|
- return { rowspan: 3, colspan: 1 };
|
|
|
- }else{
|
|
|
- return { rowspan: 0, colspan: 0 };
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
// 根据选择的option获取新的数据
|
|
|
// getNewTableData(option) {
|
|
|
// // 逻辑处理返回新的数据数组
|
|
@@ -424,19 +340,30 @@ export default {
|
|
|
/** 查询用户列表 */
|
|
|
getList() {
|
|
|
this.loading = true;
|
|
|
- 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 => {
|
|
|
+ // 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;
|
|
|
+ // }
|
|
|
+ // );
|
|
|
+ // });
|
|
|
+ examStudentList().then(response => {
|
|
|
+ // console.log(response.rows[0]['realExa']);
|
|
|
+ // console.log(response.rows.realExamCollection);
|
|
|
+ // console.log('response.rows.realExamCollectio');
|
|
|
//将返回值注释
|
|
|
this.userList = response.rows;
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
|
}
|
|
|
);
|
|
|
+
|
|
|
},
|
|
|
/** 查询部门下拉树结构 */
|
|
|
getDeptTree() {
|
|
@@ -577,31 +504,26 @@ export default {
|
|
|
this.form.password = "";
|
|
|
});
|
|
|
},
|
|
|
- /** 重置密码按钮操作 */
|
|
|
- handleResetPwd(row) {
|
|
|
- this.$prompt('请输入"' + row.userName + '"的新密码', "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- closeOnClickModal: false,
|
|
|
- inputPattern: /^.{5,20}$/,
|
|
|
- inputErrorMessage: "用户密码长度必须介于 5 和 20 之间",
|
|
|
- inputValidator: (value) => {
|
|
|
- if (/<|>|"|'|\||\\/.test(value)) {
|
|
|
- return "不能包含非法字符:< > \" ' \\\ |"
|
|
|
- }
|
|
|
- },
|
|
|
- }).then(({ value }) => {
|
|
|
- resetUserPwd(row.userId, value).then(response => {
|
|
|
- this.$modal.msgSuccess("修改成功,新密码是:" + value);
|
|
|
- });
|
|
|
- }).catch(() => {});
|
|
|
- },
|
|
|
-
|
|
|
/** 进入操作 */
|
|
|
handleInto: function(row) {
|
|
|
- const userId = row.userId;
|
|
|
- console.log(userId)
|
|
|
- this.$router.push("/people/exam-exam1/examid/" + userId);
|
|
|
+ const examId = row.realExam.examId;
|
|
|
+ console.log(examId)
|
|
|
+ examStudentEnter(examId).then(response => {
|
|
|
+ if(response.code='200'){
|
|
|
+ this.$router.push("/people/exam-exam1/examid/" + examId);
|
|
|
+ }
|
|
|
+ // console.log(response);
|
|
|
+ // console.log('response');
|
|
|
+ // return;
|
|
|
+ //将返回值注释
|
|
|
+ // 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() {
|