|
@@ -231,13 +231,14 @@
|
|
|
:title="examCopyTitle"
|
|
|
width="500px"
|
|
|
:visible.sync="copyExamDialog"
|
|
|
+ @close="doBeforedialogClose"
|
|
|
>
|
|
|
<el-form
|
|
|
+ :inline="true"
|
|
|
+ inline-message
|
|
|
:model="examCopyForm"
|
|
|
:rules="examCopyFormRules"
|
|
|
ref="examCopyForm"
|
|
|
- class="editForm"
|
|
|
- :inline="true"
|
|
|
label-width="120px"
|
|
|
>
|
|
|
<el-row>
|
|
@@ -282,7 +283,7 @@ let _this = null;
|
|
|
|
|
|
let validateDestExamName = (rule, value, callback) => {
|
|
|
let name = _this.examCopyForm.destExamName;
|
|
|
- if (name == "") {
|
|
|
+ if (null == name || name.trim() == "") {
|
|
|
callback(new Error("请输入考试名称"));
|
|
|
} else {
|
|
|
callback();
|
|
@@ -322,8 +323,8 @@ export default {
|
|
|
examCopyTitle: null,
|
|
|
examCopyForm: {
|
|
|
srcExamId: null,
|
|
|
- destExamCode: null,
|
|
|
- destExamName: null,
|
|
|
+ destExamCode: "",
|
|
|
+ destExamName: "",
|
|
|
copyOrgSettings: false
|
|
|
},
|
|
|
examCopyFormRules: {
|
|
@@ -356,6 +357,9 @@ export default {
|
|
|
this.examCopyForm.destExamName = null;
|
|
|
this.copyExamDialog = true;
|
|
|
},
|
|
|
+ doBeforedialogClose() {
|
|
|
+ this.$refs.examCopyForm.clearValidate();
|
|
|
+ },
|
|
|
copyExam() {
|
|
|
this.examCopyForm.destExamCode = this.examCopyForm.destExamName;
|
|
|
var url = EXAM_WORK_API + "/exam/copyExam";
|