diff --git a/src/views/system/classinfo/index.vue b/src/views/system/classinfo/index.vue
index 21cd4c8..441e39f 100644
--- a/src/views/system/classinfo/index.vue
+++ b/src/views/system/classinfo/index.vue
@@ -214,7 +214,7 @@
@@ -362,12 +362,19 @@ export default {
// 验证手机号的正则表达式
const regMobile =
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/;
+ const reg = /^(0[0-9]{2,3}\-)([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$/;
+ const isTel = reg.test(value);
- if (regMobile.test(value)) {
- return cb();
+ if (value.length == 11) {
+ if (regMobile.test(value)) {
+ return cb();
+ }
+ } else if (11 < value.length <= 13) {
+ if (isTel) {
+ return cb();
+ }
}
-
- cb(new Error("请输入合法的手机号"));
+ cb(new Error("请输入正确的联系电话"));
};
return {
@@ -431,7 +438,7 @@ export default {
required: true,
validator: checkMobile,
trigger: "blur",
- message: "请输入正确的手机号",
+ message: "",
},
],
},
diff --git a/src/views/system/info/index.vue b/src/views/system/info/index.vue
index 26d13b3..316d024 100644
--- a/src/views/system/info/index.vue
+++ b/src/views/system/info/index.vue
@@ -193,7 +193,7 @@
@@ -221,10 +221,19 @@ export default {
// 验证手机号的正则表达式
const regMobile =
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/;
- if (regMobile.test(value)) {
- return cb();
+ const reg = /^(0[0-9]{2,3}\-)([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$/;
+ const isTel = reg.test(value);
+
+ if (value.length == 11) {
+ if (regMobile.test(value)) {
+ return cb();
+ }
+ } else if (11 < value.length <= 13) {
+ if (isTel) {
+ return cb();
+ }
}
- cb(new Error("请输入合法的手机号"));
+ cb(new Error("请输入正确的联系电话"));
};
return {
// 遮罩层
@@ -276,7 +285,7 @@ export default {
required: true,
validator: checkMobile,
trigger: "blur",
- message: "请输入正确的手机号",
+ message: "",
},
],
code: [
@@ -448,28 +457,23 @@ export default {
if (this.List.length == 0) {
this.form.parentId = 0;
}
-
- if (this.form.phone == "" || this.form.phone.toString().length == 11) {
- this.$refs["form"].validate((valid) => {
- if (valid) {
- if (this.form.id != null) {
- edit(this.form).then((response) => {
- this.$modal.msgSuccess("修改成功");
- this.open = false;
- this.getList();
- });
- } else {
- add(this.form).then((response) => {
- this.$modal.msgSuccess("新增成功");
- this.open = false;
- this.getList();
- });
- }
+ this.$refs["form"].validate((valid) => {
+ if (valid) {
+ if (this.form.id != null) {
+ edit(this.form).then((response) => {
+ this.$modal.msgSuccess("修改成功");
+ this.open = false;
+ this.getList();
+ });
+ } else {
+ add(this.form).then((response) => {
+ this.$modal.msgSuccess("新增成功");
+ this.open = false;
+ this.getList();
+ });
}
- });
- } else {
- this.$message.error("请输入正确的手机号码");
- }
+ }
+ });
},
/** 删除按钮操作 */
handleDelete(row) {
diff --git a/src/views/system/itemCategory/index.vue b/src/views/system/itemCategory/index.vue
index 0b37407..a7d05c9 100644
--- a/src/views/system/itemCategory/index.vue
+++ b/src/views/system/itemCategory/index.vue
@@ -8,14 +8,6 @@
v-show="showSearch"
label-width="68px"
>
-
-
-
+
{
- let min = value.map((e) => {
- return e.levelMinScore;
- }).toString();
- let max = value.map((e) => {
- return e.levelMaxScore;
- }).toString();
+ let min = value
+ .map((e) => {
+ return e.levelMinScore;
+ })
+ .toString();
+ let max = value
+ .map((e) => {
+ return e.levelMaxScore;
+ })
+ .toString();
console.log(min, max);
- if (Number(max) < Number(min)) {
- console.log(min,max);
+ if (Number(max) < Number(min)) {
+ console.log(min, max);
callback(new Error("最高分必须大于最低分,请重新填写!"));
-
- }
-
+ }
if (
value.map((e) => {
return e.levelName;
diff --git a/src/views/system/kindergartenInfo/index.vue b/src/views/system/kindergartenInfo/index.vue
index 2268470..cee1858 100644
--- a/src/views/system/kindergartenInfo/index.vue
+++ b/src/views/system/kindergartenInfo/index.vue
@@ -253,7 +253,7 @@
@@ -288,12 +288,19 @@ export default {
// 验证手机号的正则表达式
const regMobile =
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/;
+ const reg = /^(0[0-9]{2,3}\-)([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$/;
+ const isTel = reg.test(value);
- if (regMobile.test(value)) {
- return cb();
+ if (value.length == 11) {
+ if (regMobile.test(value)) {
+ return cb();
+ }
+ } else if (11 < value.length <= 13) {
+ if (isTel) {
+ return cb();
+ }
}
-
- cb(new Error("请输入合法的手机号"));
+ cb(new Error("请输入正确的联系电话"));
};
return {
// 遮罩层
@@ -363,7 +370,7 @@ export default {
required: true,
validator: checkMobile,
trigger: "blur",
- message: "请输入正确的手机号",
+ message: "",
},
],
principalId: [
diff --git a/src/views/system/studentInfo/index.vue b/src/views/system/studentInfo/index.vue
index 348342d..25a9c88 100644
--- a/src/views/system/studentInfo/index.vue
+++ b/src/views/system/studentInfo/index.vue
@@ -82,7 +82,7 @@
@click="handleQuery"
>搜索
- 重置
@@ -284,7 +284,7 @@
-
+
@@ -360,7 +360,7 @@
@click="handleQuery3"
>搜索
- 重置
搜索
- 重置
@@ -597,7 +597,7 @@
@@ -679,12 +679,19 @@ export default {
// 验证手机号的正则表达式
const regMobile =
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/;
+ const reg = /^(0[0-9]{2,3}\-)([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$/;
+ const isTel = reg.test(value);
- if (regMobile.test(value)) {
- return cb();
+ if (value.length == 11) {
+ if (regMobile.test(value)) {
+ return cb();
+ }
+ } else if (11 < value.length <= 13) {
+ if (isTel) {
+ return cb();
+ }
}
-
- cb(new Error("请输入合法的手机号"));
+ cb(new Error("请输入正确的联系电话"));
};
//验证身份证
var isCardId = (rule, value, callback) => {
@@ -815,12 +822,15 @@ export default {
form2: {},
// 表单校验
rules: {
+ studentNumber: [
+ { required: true, message: "请输入学生编号", trigger: "blur" },
+ ],
phone: [
{
required: true,
validator: checkMobile,
trigger: "blur",
- message: "请输入正确的手机号",
+ message: "",
},
],
birthDate: [
@@ -952,7 +962,6 @@ export default {
handleQuery3() {
listParentInfo(this.parentInfoList2).then((response) => {
this.parentInfoList = response.rows;
- console.log(this.parentInfoList);
this.total3 = response.total;
});
},
@@ -965,6 +974,17 @@ export default {
// console.log(this.classinfoList);
});
},
+ /** 重置按钮操作 */
+ resetQuery2() {
+ this.classinfoList2 = {
+ pageNum: 1,
+ pageSize: 10,
+ kindergartenId: null,
+ className: null,
+ classType: null,
+ };
+ this.handleQuery2();
+ },
/** 新增按钮操作 */
handleAdd() {
this.reset();
@@ -1166,7 +1186,7 @@ export default {
console.log(this.form);
console.log(this.form2);
console.log(this.parentlist);
- console.log(this.parent1, this.parent2);
+ // console.log(this.parent1, this.parent2);
console.log(this.tags);
},
handleSelectionChange(selection) {
@@ -1291,17 +1311,32 @@ export default {
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
- this.getList();
+ listStudentInfo(this.queryParams).then((res) => {
+ this.studentInfoList = res.rows;
+ this.total = res.total;
+ this.loading = false;
+ });
},
cancel3() {
- this.resetQuery();
+ this.resetQuery2();
this.innerVisible = false;
},
/** 重置按钮操作 */
- resetQuery() {
+ resetQuery1() {
this.resetForm("queryForm");
this.handleQuery();
},
+ /** 重置按钮操作 */
+ resetQuery3() {
+ this.parentInfoList2 = {
+ pageNum: 1,
+ pageSize: 10,
+ parentName: null,
+ parentSex: null,
+ phone: null,
+ };
+ this.handleQuery3();
+ },
/** 查询学生信息列表 */
getList() {
@@ -1313,7 +1348,7 @@ export default {
});
tKindergartenInfo(this.nationType).then((res) => {
this.nactionlist = res.data;
- console.log(this.nactionlist);
+ // console.log(this.nactionlist);
});
tKindergartenInfo(this.ClassType).then((res) => {
// console.log(res.data);
@@ -1329,18 +1364,12 @@ export default {
});
listParentInfo(this.parentInfoList2).then((response) => {
this.parentInfoList = response.rows;
- console.log(this.parentInfoList);
+ // console.log(this.parentInfoList);
this.total3 = response.total;
this.loading = false;
});
listStudentInfo(this.queryParams).then((res) => {
- // res.rows.forEach((el) => {
- // el.className = this.classinfoList.filter(
- // (e) => e.id == el.classId
- // )[0].className;
- // });
this.studentInfoList = res.rows;
- // console.log(this.studentInfoList);
this.total = res.total;
this.loading = false;
});
@@ -1370,6 +1399,10 @@ export default {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
+ this.parent1 = "";
+ this.parent2 = "";
+ this.parentlist = [];
+ this.tags = [];
});
}
}
diff --git a/src/views/system/teacherInfo/index.vue b/src/views/system/teacherInfo/index.vue
index 30093fd..d4455ed 100644
--- a/src/views/system/teacherInfo/index.vue
+++ b/src/views/system/teacherInfo/index.vue
@@ -56,7 +56,7 @@
@click="handleQuery"
>搜索
- 重置
@@ -126,7 +126,7 @@
align="center"
prop="kindergartenName"
/>
-
+
查看
-
+