|
@@ -8,16 +8,16 @@
|
|
|
v-model="queryParams.examCollectionName"
|
|
|
placeholder="请输入考试名称"
|
|
|
clearable
|
|
|
- style="width: 150px"
|
|
|
+ style="width: 240px"
|
|
|
@keyup.enter.native="handleQuery"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
- <!-- <el-form-item label="状态" prop="status">
|
|
|
+ <!-- <el-form-item label="考试状态" prop="examCollectionState">
|
|
|
<el-select
|
|
|
v-model="queryParams.status"
|
|
|
- placeholder="用户状态"
|
|
|
+ placeholder="考试状态"
|
|
|
clearable
|
|
|
- style="width: 240px"
|
|
|
+ style="width: 200px"
|
|
|
>
|
|
|
<el-option
|
|
|
v-for="dict in dict.type.sys_normal_disable"
|
|
@@ -30,7 +30,7 @@
|
|
|
<el-form-item label="考试时间">
|
|
|
<el-date-picker
|
|
|
v-model="dateRange"
|
|
|
- style="width: 240px"
|
|
|
+ style="width: 260px"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
type="daterange"
|
|
|
range-separator="-"
|
|
@@ -55,7 +55,7 @@
|
|
|
</el-form-item>
|
|
|
<el-form-item label="创建时间">
|
|
|
<el-date-picker
|
|
|
- style="width: 240px"
|
|
|
+ style="width: 260px"
|
|
|
value-format="yyyy-MM-dd"
|
|
|
type="daterange"
|
|
|
range-separator="-"
|
|
@@ -114,9 +114,9 @@
|
|
|
|
|
|
<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="examCollectionId" prop="examCollectionId" v-if="columns[0].visible" />
|
|
|
+ <el-table-column label="编号" align="center" key="examCollectionId" prop="examCollectionId" v-if="columns[0].visible" width="80"/>
|
|
|
<el-table-column label="考试名称" align="center" key="examCollectionName" prop="examCollectionName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
|
|
|
- <el-table-column label="考试时长" align="center" key="limitDuration" prop="limitDuration" v-if="columns[2].visible" :show-overflow-tooltip="true" />
|
|
|
+ <el-table-column label="考试时长" align="center" key="limitDuration" prop="limitDuration" v-if="columns[2].visible" :show-overflow-tooltip="true" width="100"/>
|
|
|
<el-table-column label="考试时间" align="center" key="kaoshiTime" prop="kaoshiTime" v-if="columns[3].visible" :show-overflow-tooltip="true" >
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{scope.row.startTime}}</span> ~ <span>{{scope.row.endTime}}</span>
|
|
@@ -127,17 +127,17 @@
|
|
|
<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="createBy" prop="createBy" v-if="columns[5].visible" :show-overflow-tooltip="true" />
|
|
|
- <!-- <el-table-column label="考试状态" align="center" key="status" v-if="columns[6].visible">
|
|
|
+ <el-table-column label="创建老师" align="center" key="createBy" prop="createBy" v-if="columns[5].visible" :show-overflow-tooltip="true" width="100" />
|
|
|
+ <el-table-column label="考试状态" align="center" key="examCollectionState" v-if="columns[6].visible" width="100">
|
|
|
<template slot-scope="scope">
|
|
|
<el-switch
|
|
|
- v-model="scope.row.status"
|
|
|
- active-value="0"
|
|
|
- inactive-value="1"
|
|
|
+ v-model="scope.row.examCollectionState"
|
|
|
+ active-value="2"
|
|
|
+ inactive-value="3"
|
|
|
@change="handleStatusChange(scope.row)"
|
|
|
></el-switch>
|
|
|
</template>
|
|
|
- </el-table-column> -->
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="创建时间" align="center" prop="createTime" v-if="columns[7].visible" width="160">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
|
@@ -181,14 +181,22 @@
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="考试名称" prop="examCollectionName">
|
|
|
- <el-input placeholder="请输入考试名称" maxlength="30" v-model="form.examCollectionName"/>
|
|
|
+ <el-input placeholder="请输入考试名称" maxlength="30" v-model="form.examCollectionName" style="width: 65%;"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="8">
|
|
|
- <el-form-item label="考试时长" prop="limitDuration">
|
|
|
- <el-input placeholder="请输入考试时长" maxlength="30" v-model="form.limitDuration"/>
|
|
|
+ <el-col :span="8" >
|
|
|
+ <el-form-item label="型号" prop="simType">
|
|
|
+ <el-select v-model="form.simType" placeholder="请选择模拟器类型" style="width: 65%;">
|
|
|
+ <el-option
|
|
|
+ v-for="dict in dict.type.sim_sim_type"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="dict.label"
|
|
|
+ :value="dict.value"
|
|
|
+ ></el-option>
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="考试时间" prop="examTime">
|
|
|
<el-date-picker type="daterange" v-model="form.examTime" format="yyyy-MM-dd"
|
|
@@ -197,34 +205,35 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
|
- <el-col :span="8" >
|
|
|
- <el-form-item label="型号" prop="simType">
|
|
|
- <el-select v-model="form.simType" placeholder="请选择模拟器类型" style="width: 100%;">
|
|
|
- <el-option
|
|
|
- v-for="dict in dict.type.sim_sim_type"
|
|
|
- :key="dict.value"
|
|
|
- :label="dict.label"
|
|
|
- :value="dict.value"
|
|
|
- ></el-option>
|
|
|
- </el-select>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="考试时长" prop="limitDuration">
|
|
|
+ <el-input v-model="form.limitDuration" placeholder="请输入考试时长" style="width: 65%;">
|
|
|
+ <template slot="append">
|
|
|
+ <el-button type="primary">
|
|
|
+ 单位(分)
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="出题方式" prop="questionSettingMethod">
|
|
|
- <el-select v-model="form.questionSettingMethod" placeholder="请选择出题方式" style="width: 100%;" @change="selectmethod">
|
|
|
+ <el-select v-model="form.questionSettingMethod" placeholder="请选择出题方式" style="width: 65%;" @change="selectmethod">
|
|
|
<el-option
|
|
|
value="请选择"
|
|
|
>请选择</el-option>
|
|
|
<el-option
|
|
|
- v-for="dict in dict.type.sys_topic_way"
|
|
|
+ v-for="dict in dict.type.sim_question_setting_method"
|
|
|
:key="dict.value"
|
|
|
:label="dict.label"
|
|
|
:value="dict.value"
|
|
|
></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
</el-col>
|
|
|
<el-button type="primary" round @click="handleSelectType" v-show="isShow" style="margin-left: 15px;">自选考题编辑</el-button>
|
|
|
+
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
|
|
@@ -398,13 +407,12 @@
|
|
|
}
|
|
|
</style>
|
|
|
<script>
|
|
|
-import { examTearcherList,examTearcherdel,examTearcheradd,examTearcherupdate,examTearcherGet} from "@/api/sim/exam";
|
|
|
-import { listMajor } from "@/api/sim/major";
|
|
|
+import { examTearcherList,examTearcherdel,examTearcheradd,examTearcherupdate,examTearcherGet,examTearcheropen,examTearcherclose} from "@/api/sim/exam";
|
|
|
|
|
|
|
|
|
export default {
|
|
|
name: "Exam",
|
|
|
- dicts: ['sim_sim_type','sys_topic_way','sys_normal_disable',],
|
|
|
+ dicts: ['sim_sim_type','sim_question_setting_method','sys_normal_disable',],
|
|
|
data() {
|
|
|
return {
|
|
|
multipleSelection: [],
|
|
@@ -633,7 +641,7 @@ export default {
|
|
|
{ key: 2, label: `考试时长`, visible: true },
|
|
|
{ key: 3, label: `考试时间`, visible: true },
|
|
|
{ key: 4, label: `模拟器类型`, visible: true },
|
|
|
- { key: 5, label: `考试状态`, visible: false },
|
|
|
+ { key: 5, label: `考试状态`, visible: true },
|
|
|
{ key: 6, label: `创建老师`, visible: true },
|
|
|
{ key: 7, label: `创建时间`, visible: true }
|
|
|
],
|
|
@@ -847,7 +855,7 @@ export default {
|
|
|
methods: {
|
|
|
selectmethod(value){
|
|
|
console.log('出题方式:'+value)
|
|
|
- if(value==2){
|
|
|
+ if(value==2 || value==3){
|
|
|
this.isShow = true;
|
|
|
}else{
|
|
|
this.isShow = false;
|
|
@@ -987,17 +995,22 @@ export default {
|
|
|
this.queryParams.deptId = data.id;
|
|
|
this.handleQuery();
|
|
|
},
|
|
|
- // 用户状态修改
|
|
|
- // handleStatusChange(row) {
|
|
|
- // let text = row.status === "0" ? "启用" : "停用";
|
|
|
- // this.$modal.confirm('确认要"' + text + '""' + row.userName + '"用户吗?').then(function() {
|
|
|
- // return changeUserStatus(row.userId, row.status);
|
|
|
- // }).then(() => {
|
|
|
- // this.$modal.msgSuccess(text + "成功");
|
|
|
- // }).catch(function() {
|
|
|
- // row.status = row.status === "0" ? "1" : "0";
|
|
|
- // });
|
|
|
- // },
|
|
|
+ // 状态修改
|
|
|
+ handleStatusChange(row) {
|
|
|
+ console.log(row.examCollectionState);
|
|
|
+ let text = row.examCollectionState === "2" ? "开启" : "关闭";
|
|
|
+ this.$modal.confirm('确认要"' + text + '""' + row.examCollectionName + '"吗?').then(function() {
|
|
|
+ if(row.examCollectionState==2){
|
|
|
+ return examTearcherclose(row.examCollectionId,row.examCollectionState);
|
|
|
+ }else{
|
|
|
+ return examTearcheropen(row.examCollectionId,row.examCollectionState);
|
|
|
+ }
|
|
|
+ }).then(() => {
|
|
|
+ this.$modal.msgSuccess(text + "成功");
|
|
|
+ }).catch(function() {
|
|
|
+ row.status = row.status === "0" ? "1" : "0";
|
|
|
+ });
|
|
|
+ },
|
|
|
// 取消按钮
|
|
|
cancel() {
|
|
|
this.open = false;
|