|
@@ -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="-"
|
|
@@ -133,7 +133,7 @@
|
|
|
<el-switch
|
|
|
v-model="scope.row.examCollectionState"
|
|
|
active-value="2"
|
|
|
- inactive-value="0"
|
|
|
+ inactive-value="3"
|
|
|
@change="handleStatusChange(scope.row)"
|
|
|
></el-switch>
|
|
|
</template>
|
|
@@ -181,22 +181,22 @@
|
|
|
<el-row>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="考试名称" prop="examCollectionName">
|
|
|
- <el-input placeholder="请输入考试名称" maxlength="30" v-model="form.examCollectionName" style="width: 85%;"/>
|
|
|
+ <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 v-model="form.limitDuration" placeholder="请输入考试时长" style="width: 85%;">
|
|
|
- <template slot="append">
|
|
|
- <el-button type="primary">
|
|
|
- 单位(分)
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- </el-input>
|
|
|
+ <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"
|
|
@@ -205,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: 85%;">
|
|
|
- <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>
|
|
|
|
|
@@ -407,12 +408,11 @@
|
|
|
</style>
|
|
|
<script>
|
|
|
import { examTearcherList,examTearcherdel,examTearcheradd,examTearcherupdate,examTearcherGet,examTearcheropen,examTearcherclose} from "@/api/sim/exam";
|
|
|
-import { listMajor } from "@/api/sim/major";
|
|
|
|
|
|
|
|
|
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: [],
|
|
@@ -855,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;
|
|
@@ -963,7 +963,7 @@ export default {
|
|
|
this.loading = true;
|
|
|
examTearcherList(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
|
|
//将返回值注释
|
|
|
- this.userList = response.data;
|
|
|
+ this.userList = response.rows;
|
|
|
this.total = response.total;
|
|
|
this.loading = false;
|
|
|
}
|
|
@@ -997,9 +997,14 @@ export default {
|
|
|
},
|
|
|
// 状态修改
|
|
|
handleStatusChange(row) {
|
|
|
- let text = row.examCollectionState === "0" ? "启用" : "停用";
|
|
|
+ console.log(row.examCollectionState);
|
|
|
+ let text = row.examCollectionState === "2" ? "开启" : "关闭";
|
|
|
this.$modal.confirm('确认要"' + text + '""' + row.examCollectionName + '"吗?').then(function() {
|
|
|
- return changeUserStatus(row.userId, row.status);
|
|
|
+ if(row.examCollectionState==2){
|
|
|
+ return examTearcherclose(row.examCollectionId,row.examCollectionState);
|
|
|
+ }else{
|
|
|
+ return examTearcheropen(row.examCollectionId,row.examCollectionState);
|
|
|
+ }
|
|
|
}).then(() => {
|
|
|
this.$modal.msgSuccess(text + "成功");
|
|
|
}).catch(function() {
|