|
@@ -403,7 +403,7 @@
|
|
<!-- 修改场次弹出框 -->
|
|
<!-- 修改场次弹出框 -->
|
|
<el-dialog
|
|
<el-dialog
|
|
title="编辑场次"
|
|
title="编辑场次"
|
|
- width="650px"
|
|
|
|
|
|
+ width="700px"
|
|
:visible.sync="editStageVisible"
|
|
:visible.sync="editStageVisible"
|
|
>
|
|
>
|
|
<el-form
|
|
<el-form
|
|
@@ -473,8 +473,13 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-row>
|
|
</el-row>
|
|
<el-row v-if="editStageForm.submitType == 'TIMING_END'">
|
|
<el-row v-if="editStageForm.submitType == 'TIMING_END'">
|
|
- <el-form-item label="统一交卷时间">
|
|
|
|
- <el-input v-model="editStageForm.submitDuration">
|
|
|
|
|
|
+ <el-form-item label="统一交卷时间" prop="submitDuration">
|
|
|
|
+ <el-input
|
|
|
|
+ class="input_width_lg"
|
|
|
|
+ v-model="editStageForm.submitDuration"
|
|
|
|
+ maxlength="10"
|
|
|
|
+ @keyup.native="handleSubmitDuration4editStage"
|
|
|
|
+ >
|
|
<template slot="prepend">开考后</template>
|
|
<template slot="prepend">开考后</template>
|
|
<template slot="append">分钟</template>
|
|
<template slot="append">分钟</template>
|
|
</el-input>
|
|
</el-input>
|
|
@@ -491,13 +496,14 @@
|
|
<!-- 通用设置弹出框 -->
|
|
<!-- 通用设置弹出框 -->
|
|
<el-dialog
|
|
<el-dialog
|
|
title="收卷设置"
|
|
title="收卷设置"
|
|
- width="650px"
|
|
|
|
|
|
+ width="700px"
|
|
:visible.sync="editStageCommonSettingVisible"
|
|
:visible.sync="editStageCommonSettingVisible"
|
|
>
|
|
>
|
|
<el-form
|
|
<el-form
|
|
:inline="true"
|
|
:inline="true"
|
|
inline-message
|
|
inline-message
|
|
:model="editStageCommonSettingForm"
|
|
:model="editStageCommonSettingForm"
|
|
|
|
+ :rules="commonSettingRules"
|
|
ref="editStageCommonSettingForm"
|
|
ref="editStageCommonSettingForm"
|
|
label-position="right"
|
|
label-position="right"
|
|
label-width="120px"
|
|
label-width="120px"
|
|
@@ -512,7 +518,16 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-row>
|
|
</el-row>
|
|
<el-row>
|
|
<el-row>
|
|
- <el-form-item label="收卷设置">
|
|
|
|
|
|
+ <el-form-item label="考试名称">
|
|
|
|
+ <el-input
|
|
|
|
+ class="input_width_lg"
|
|
|
|
+ v-model="editStageCommonSettingForm.examName"
|
|
|
|
+ :disabled="true"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-form-item label="收卷设置" prop="submitType">
|
|
<el-radio-group
|
|
<el-radio-group
|
|
class="pull_right_sm"
|
|
class="pull_right_sm"
|
|
v-model="editStageCommonSettingForm.submitType"
|
|
v-model="editStageCommonSettingForm.submitType"
|
|
@@ -525,8 +540,13 @@
|
|
<el-row
|
|
<el-row
|
|
v-if="editStageCommonSettingForm.submitType == 'TIMING_END'"
|
|
v-if="editStageCommonSettingForm.submitType == 'TIMING_END'"
|
|
>
|
|
>
|
|
- <el-form-item label="统一交卷时间">
|
|
|
|
- <el-input v-model="editStageCommonSettingForm.submitDuration">
|
|
|
|
|
|
+ <el-form-item label="统一交卷时间" prop="submitDuration">
|
|
|
|
+ <el-input
|
|
|
|
+ class="input_width_lg"
|
|
|
|
+ v-model="editStageCommonSettingForm.submitDuration"
|
|
|
|
+ maxlength="10"
|
|
|
|
+ @keyup.native="handleSubmitDuration"
|
|
|
|
+ >
|
|
<template slot="prepend">开考后</template>
|
|
<template slot="prepend">开考后</template>
|
|
<template slot="append">分钟</template>
|
|
<template slot="append">分钟</template>
|
|
</el-input>
|
|
</el-input>
|
|
@@ -566,6 +586,7 @@ export default {
|
|
callback();
|
|
callback();
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
+
|
|
return {
|
|
return {
|
|
loading: false,
|
|
loading: false,
|
|
startExamDatetimeRange: [],
|
|
startExamDatetimeRange: [],
|
|
@@ -608,6 +629,7 @@ export default {
|
|
editStageCommonSettingForm: {
|
|
editStageCommonSettingForm: {
|
|
id: null,
|
|
id: null,
|
|
examId: null,
|
|
examId: null,
|
|
|
|
+ examName: "",
|
|
submitType: "NORMAL",
|
|
submitType: "NORMAL",
|
|
submitDuration: 0
|
|
submitDuration: 0
|
|
},
|
|
},
|
|
@@ -634,6 +656,29 @@ export default {
|
|
validator: validateExamDatetimeRange,
|
|
validator: validateExamDatetimeRange,
|
|
trigger: "blur"
|
|
trigger: "blur"
|
|
}
|
|
}
|
|
|
|
+ ],
|
|
|
|
+ submitDuration: [
|
|
|
|
+ {
|
|
|
|
+ required: true,
|
|
|
|
+ trigger: "blur",
|
|
|
|
+ message: "定点交卷时长不允许为空"
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ },
|
|
|
|
+ commonSettingRules: {
|
|
|
|
+ submitType: [
|
|
|
|
+ {
|
|
|
|
+ required: true,
|
|
|
|
+ trigger: "change",
|
|
|
|
+ message: "请选择交卷类型"
|
|
|
|
+ }
|
|
|
|
+ ],
|
|
|
|
+ submitDuration: [
|
|
|
|
+ {
|
|
|
|
+ required: true,
|
|
|
|
+ trigger: "blur",
|
|
|
|
+ message: "定点交卷时长不允许为空"
|
|
|
|
+ }
|
|
]
|
|
]
|
|
},
|
|
},
|
|
tableData: [],
|
|
tableData: [],
|
|
@@ -652,6 +697,18 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ handleSubmitDuration() {
|
|
|
|
+ this.editStageCommonSettingForm.submitDuration = this.editStageCommonSettingForm.submitDuration.replace(
|
|
|
|
+ /[^\d]/g,
|
|
|
|
+ ""
|
|
|
|
+ );
|
|
|
|
+ },
|
|
|
|
+ handleSubmitDuration4editStage() {
|
|
|
|
+ this.editStageForm.submitDuration = this.editStageForm.submitDuration.replace(
|
|
|
|
+ /[^\d]/g,
|
|
|
|
+ ""
|
|
|
|
+ );
|
|
|
|
+ },
|
|
handleAddStage() {
|
|
handleAddStage() {
|
|
this.resetAddStageForm();
|
|
this.resetAddStageForm();
|
|
this.addStageVisible = true;
|
|
this.addStageVisible = true;
|
|
@@ -672,13 +729,13 @@ export default {
|
|
},
|
|
},
|
|
handleCommonSetting() {
|
|
handleCommonSetting() {
|
|
this.editStageCommonSettingForm.examId = this.formSearch.examId;
|
|
this.editStageCommonSettingForm.examId = this.formSearch.examId;
|
|
|
|
+ this.editStageCommonSettingForm.examName = this.examName;
|
|
this.editStageCommonSettingForm.submitType = "NORMAL";
|
|
this.editStageCommonSettingForm.submitType = "NORMAL";
|
|
this.editStageCommonSettingForm.submitDuration = 0;
|
|
this.editStageCommonSettingForm.submitDuration = 0;
|
|
var url = EXAM_WORK_API + "/examStage/getExamStageSetting";
|
|
var url = EXAM_WORK_API + "/examStage/getExamStageSetting";
|
|
this.$httpWithMsg
|
|
this.$httpWithMsg
|
|
.get(url, { params: this.formSearch })
|
|
.get(url, { params: this.formSearch })
|
|
.then(response => {
|
|
.then(response => {
|
|
- debugger;
|
|
|
|
if (response.data) {
|
|
if (response.data) {
|
|
this.editStageCommonSettingForm.id = response.data.id;
|
|
this.editStageCommonSettingForm.id = response.data.id;
|
|
this.editStageCommonSettingForm.submitType =
|
|
this.editStageCommonSettingForm.submitType =
|
|
@@ -979,13 +1036,21 @@ export default {
|
|
},
|
|
},
|
|
saveEditStageCommonSetting() {
|
|
saveEditStageCommonSetting() {
|
|
var url = EXAM_WORK_API + "/examStage/saveStageSetting";
|
|
var url = EXAM_WORK_API + "/examStage/saveStageSetting";
|
|
- this.$httpWithMsg.post(url, this.editStageCommonSettingForm).then(() => {
|
|
|
|
- this.$notify({
|
|
|
|
- type: "success",
|
|
|
|
- message: "保存成功"
|
|
|
|
- });
|
|
|
|
- this.searchForm();
|
|
|
|
- this.editStageCommonSettingVisible = false;
|
|
|
|
|
|
+ this.$refs.editStageCommonSettingForm.validate(valid => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ this.$httpWithMsg
|
|
|
|
+ .post(url, this.editStageCommonSettingForm)
|
|
|
|
+ .then(() => {
|
|
|
|
+ this.$notify({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: "保存成功"
|
|
|
|
+ });
|
|
|
|
+ this.searchForm();
|
|
|
|
+ this.editStageCommonSettingVisible = false;
|
|
|
|
+ });
|
|
|
|
+ } else {
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
|
|
@@ -1073,4 +1138,8 @@ export default {
|
|
.editForm .el-form-item {
|
|
.editForm .el-form-item {
|
|
margin-bottom: 12px;
|
|
margin-bottom: 12px;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+.input_width_lg {
|
|
|
|
+ width: 300px;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|