|
@@ -166,7 +166,7 @@
|
|
@close="closeAddingStudentDialog"
|
|
@close="closeAddingStudentDialog"
|
|
title="考生信息页面"
|
|
title="考生信息页面"
|
|
:visible.sync="addingStudentDialog"
|
|
:visible.sync="addingStudentDialog"
|
|
- width="60%"
|
|
|
|
|
|
+ width="650px"
|
|
>
|
|
>
|
|
<el-form
|
|
<el-form
|
|
:model="examStudentForm"
|
|
:model="examStudentForm"
|
|
@@ -322,7 +322,7 @@
|
|
|
|
|
|
<!-- 修改弹出窗口 -->
|
|
<!-- 修改弹出窗口 -->
|
|
<el-dialog
|
|
<el-dialog
|
|
- width="60%"
|
|
|
|
|
|
+ width="650px"
|
|
@close="closeUpdateStudentDialog"
|
|
@close="closeUpdateStudentDialog"
|
|
title="考生信息页面"
|
|
title="考生信息页面"
|
|
:visible.sync="updateStudentDialog"
|
|
:visible.sync="updateStudentDialog"
|
|
@@ -796,31 +796,38 @@ import {
|
|
} from "@/constants/constants.js";
|
|
} from "@/constants/constants.js";
|
|
import { mapState } from "vuex";
|
|
import { mapState } from "vuex";
|
|
|
|
|
|
|
|
+let _this = null;
|
|
|
|
+
|
|
|
|
+let validateStuCode = (rule, value, callback) => {
|
|
|
|
+ if (
|
|
|
|
+ _this.examStudentForm.studentCode &&
|
|
|
|
+ _this.examStudentForm.studentCode.length < 6
|
|
|
|
+ ) {
|
|
|
|
+ callback(new Error("学号至少6位"));
|
|
|
|
+ } else {
|
|
|
|
+ callback();
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+
|
|
|
|
+let validateIdentityNumber = (rule, value, callback) => {
|
|
|
|
+ if (
|
|
|
|
+ !_this.examStudentForm.identityNumber ||
|
|
|
|
+ _this.examStudentForm.identityNumber === ""
|
|
|
|
+ ) {
|
|
|
|
+ return callback(new Error("请输入身份证"));
|
|
|
|
+ }
|
|
|
|
+ if (
|
|
|
|
+ _this.examStudentForm.identityNumber &&
|
|
|
|
+ _this.examStudentForm.identityNumber.length < 6
|
|
|
|
+ ) {
|
|
|
|
+ callback(new Error("身份证至少6位"));
|
|
|
|
+ } else {
|
|
|
|
+ callback();
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
+
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
- var validateStuCode = (rule, value, callback) => {
|
|
|
|
- if (
|
|
|
|
- this.examStudentForm.studentCode &&
|
|
|
|
- this.examStudentForm.studentCode.length < 6
|
|
|
|
- ) {
|
|
|
|
- callback(new Error("学号至少6位"));
|
|
|
|
- } else {
|
|
|
|
- callback();
|
|
|
|
- }
|
|
|
|
- };
|
|
|
|
- var validateIdenNum = (rule, value, callback) => {
|
|
|
|
- if (this.examStudentForm.identityNumber === "") {
|
|
|
|
- return callback(new Error("请输入身份证"));
|
|
|
|
- }
|
|
|
|
- if (
|
|
|
|
- this.examStudentForm.identityNumber &&
|
|
|
|
- this.examStudentForm.identityNumber.length < 6
|
|
|
|
- ) {
|
|
|
|
- callback(new Error("身份证至少6位"));
|
|
|
|
- } else {
|
|
|
|
- callback();
|
|
|
|
- }
|
|
|
|
- };
|
|
|
|
return {
|
|
return {
|
|
rolePrivileges: {
|
|
rolePrivileges: {
|
|
search_examStudent: false,
|
|
search_examStudent: false,
|
|
@@ -942,7 +949,7 @@ export default {
|
|
],
|
|
],
|
|
studentCode: [{ validator: validateStuCode, trigger: "blur" }],
|
|
studentCode: [{ validator: validateStuCode, trigger: "blur" }],
|
|
identityNumber: [
|
|
identityNumber: [
|
|
- { required: true, validator: validateIdenNum, trigger: "blur" }
|
|
|
|
|
|
+ { validator: validateIdentityNumber, trigger: "blur" }
|
|
],
|
|
],
|
|
courseId: [
|
|
courseId: [
|
|
{
|
|
{
|
|
@@ -1677,6 +1684,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
|
|
+ _this = this;
|
|
this.initPrivileges();
|
|
this.initPrivileges();
|
|
this.init();
|
|
this.init();
|
|
this.uploadHeaders = {
|
|
this.uploadHeaders = {
|