修改bug
This commit is contained in:
parent
41fe30c3d9
commit
c50fdb27b6
@ -214,7 +214,7 @@
|
|||||||
<el-input
|
<el-input
|
||||||
v-model.number="form.phone"
|
v-model.number="form.phone"
|
||||||
placeholder="请输入联系电话"
|
placeholder="请输入联系电话"
|
||||||
maxlength="11"
|
maxlength="13"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -362,12 +362,19 @@ export default {
|
|||||||
// 验证手机号的正则表达式
|
// 验证手机号的正则表达式
|
||||||
const regMobile =
|
const regMobile =
|
||||||
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/;
|
/^(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)) {
|
if (value.length == 11) {
|
||||||
return cb();
|
if (regMobile.test(value)) {
|
||||||
|
return cb();
|
||||||
|
}
|
||||||
|
} else if (11 < value.length <= 13) {
|
||||||
|
if (isTel) {
|
||||||
|
return cb();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
cb(new Error("请输入正确的联系电话"));
|
||||||
cb(new Error("请输入合法的手机号"));
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@ -431,7 +438,7 @@ export default {
|
|||||||
required: true,
|
required: true,
|
||||||
validator: checkMobile,
|
validator: checkMobile,
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
message: "请输入正确的手机号",
|
message: "",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
@ -193,7 +193,7 @@
|
|||||||
<el-form-item label="联系人电话" prop="phone">
|
<el-form-item label="联系人电话" prop="phone">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.phone"
|
v-model="form.phone"
|
||||||
maxlength="11"
|
maxlength="13"
|
||||||
placeholder="请输入联系人电话"
|
placeholder="请输入联系人电话"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -221,10 +221,19 @@ export default {
|
|||||||
// 验证手机号的正则表达式
|
// 验证手机号的正则表达式
|
||||||
const regMobile =
|
const regMobile =
|
||||||
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/;
|
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/;
|
||||||
if (regMobile.test(value)) {
|
const reg = /^(0[0-9]{2,3}\-)([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$/;
|
||||||
return cb();
|
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 {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
@ -276,7 +285,7 @@ export default {
|
|||||||
required: true,
|
required: true,
|
||||||
validator: checkMobile,
|
validator: checkMobile,
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
message: "请输入正确的手机号",
|
message: "",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
code: [
|
code: [
|
||||||
@ -448,28 +457,23 @@ export default {
|
|||||||
if (this.List.length == 0) {
|
if (this.List.length == 0) {
|
||||||
this.form.parentId = 0;
|
this.form.parentId = 0;
|
||||||
}
|
}
|
||||||
|
this.$refs["form"].validate((valid) => {
|
||||||
if (this.form.phone == "" || this.form.phone.toString().length == 11) {
|
if (valid) {
|
||||||
this.$refs["form"].validate((valid) => {
|
if (this.form.id != null) {
|
||||||
if (valid) {
|
edit(this.form).then((response) => {
|
||||||
if (this.form.id != null) {
|
this.$modal.msgSuccess("修改成功");
|
||||||
edit(this.form).then((response) => {
|
this.open = false;
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.getList();
|
||||||
this.open = false;
|
});
|
||||||
this.getList();
|
} else {
|
||||||
});
|
add(this.form).then((response) => {
|
||||||
} else {
|
this.$modal.msgSuccess("新增成功");
|
||||||
add(this.form).then((response) => {
|
this.open = false;
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.getList();
|
||||||
this.open = false;
|
});
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
} else {
|
});
|
||||||
this.$message.error("请输入正确的手机号码");
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
handleDelete(row) {
|
handleDelete(row) {
|
||||||
|
|||||||
@ -8,14 +8,6 @@
|
|||||||
v-show="showSearch"
|
v-show="showSearch"
|
||||||
label-width="68px"
|
label-width="68px"
|
||||||
>
|
>
|
||||||
<!-- <el-form-item label="父级id" prop="parentId">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.parentId"
|
|
||||||
placeholder="请输入父级id"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item> -->
|
|
||||||
<el-form-item label="分类名称" prop="categoryName">
|
<el-form-item label="分类名称" prop="categoryName">
|
||||||
<el-input
|
<el-input
|
||||||
clearable
|
clearable
|
||||||
@ -36,14 +28,6 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-form-item label="分类排序" prop="sorting">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.sorting"
|
|
||||||
placeholder="请输入分类排序"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item> -->
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@ -202,7 +186,7 @@
|
|||||||
<!-- 添加或修改测试项目分类对话框 -->
|
<!-- 添加或修改测试项目分类对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
||||||
<el-form-item label="所属上级分类" prop="parentId" v-if="form.id != 2">
|
<el-form-item label="所属上级分类" prop="parentId" v-if="itemCategoryList.length != 0 && form.parentId != 0">
|
||||||
<treeselect
|
<treeselect
|
||||||
:normalizer="normalizer"
|
:normalizer="normalizer"
|
||||||
:options="itemCategoryList"
|
:options="itemCategoryList"
|
||||||
@ -298,20 +282,22 @@ export default {
|
|||||||
components: { Treeselect },
|
components: { Treeselect },
|
||||||
data() {
|
data() {
|
||||||
let testItemLevelList = (rule, value, callback) => {
|
let testItemLevelList = (rule, value, callback) => {
|
||||||
let min = value.map((e) => {
|
let min = value
|
||||||
return e.levelMinScore;
|
.map((e) => {
|
||||||
}).toString();
|
return e.levelMinScore;
|
||||||
let max = value.map((e) => {
|
})
|
||||||
return e.levelMaxScore;
|
.toString();
|
||||||
}).toString();
|
let max = value
|
||||||
|
.map((e) => {
|
||||||
|
return e.levelMaxScore;
|
||||||
|
})
|
||||||
|
.toString();
|
||||||
console.log(min, max);
|
console.log(min, max);
|
||||||
|
|
||||||
if (Number(max) < Number(min)) {
|
if (Number(max) < Number(min)) {
|
||||||
console.log(min,max);
|
console.log(min, max);
|
||||||
callback(new Error("最高分必须大于最低分,请重新填写!"));
|
callback(new Error("最高分必须大于最低分,请重新填写!"));
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
value.map((e) => {
|
value.map((e) => {
|
||||||
return e.levelName;
|
return e.levelName;
|
||||||
|
|||||||
@ -253,7 +253,7 @@
|
|||||||
<el-form-item label="联系电话" prop="phone">
|
<el-form-item label="联系电话" prop="phone">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.phone"
|
v-model="form.phone"
|
||||||
maxlength="11"
|
maxlength="13"
|
||||||
placeholder="请输入联系电话"
|
placeholder="请输入联系电话"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -288,12 +288,19 @@ export default {
|
|||||||
// 验证手机号的正则表达式
|
// 验证手机号的正则表达式
|
||||||
const regMobile =
|
const regMobile =
|
||||||
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/;
|
/^(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)) {
|
if (value.length == 11) {
|
||||||
return cb();
|
if (regMobile.test(value)) {
|
||||||
|
return cb();
|
||||||
|
}
|
||||||
|
} else if (11 < value.length <= 13) {
|
||||||
|
if (isTel) {
|
||||||
|
return cb();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
cb(new Error("请输入正确的联系电话"));
|
||||||
cb(new Error("请输入合法的手机号"));
|
|
||||||
};
|
};
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
@ -363,7 +370,7 @@ export default {
|
|||||||
required: true,
|
required: true,
|
||||||
validator: checkMobile,
|
validator: checkMobile,
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
message: "请输入正确的手机号",
|
message: "",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
principalId: [
|
principalId: [
|
||||||
|
|||||||
@ -82,7 +82,7 @@
|
|||||||
@click="handleQuery"
|
@click="handleQuery"
|
||||||
>搜索</el-button
|
>搜索</el-button
|
||||||
>
|
>
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery1"
|
||||||
>重置</el-button
|
>重置</el-button
|
||||||
>
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -284,7 +284,7 @@
|
|||||||
<el-input v-model="form.studentName" placeholder="请输入学生姓名" />
|
<el-input v-model="form.studentName" placeholder="请输入学生姓名" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="学生编号" prop="studentNumber">
|
<el-form-item label="学生编号" prop="studentNumber">
|
||||||
<el-input v-model="form.studentNumber" placeholder="请输入学生编号" />
|
<el-input v-model="form.studentNumber" placeholder="请输入学生编号" maxlength="20" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="学生性别" prop="studentSex">
|
<el-form-item label="学生性别" prop="studentSex">
|
||||||
<el-radio-group v-model="form.studentSex">
|
<el-radio-group v-model="form.studentSex">
|
||||||
@ -360,7 +360,7 @@
|
|||||||
@click="handleQuery3"
|
@click="handleQuery3"
|
||||||
>搜索</el-button
|
>搜索</el-button
|
||||||
>
|
>
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery3"
|
||||||
>重置</el-button
|
>重置</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
@ -496,7 +496,7 @@
|
|||||||
@click="handleQuery2"
|
@click="handleQuery2"
|
||||||
>搜索</el-button
|
>搜索</el-button
|
||||||
>
|
>
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery2"
|
||||||
>重置</el-button
|
>重置</el-button
|
||||||
>
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -597,7 +597,7 @@
|
|||||||
|
|
||||||
<el-form-item label="联系电话" prop="phone">
|
<el-form-item label="联系电话" prop="phone">
|
||||||
<el-input
|
<el-input
|
||||||
maxlength="11"
|
maxlength="13"
|
||||||
v-model="addparentlist.phone"
|
v-model="addparentlist.phone"
|
||||||
placeholder="请输入联系电话"
|
placeholder="请输入联系电话"
|
||||||
/>
|
/>
|
||||||
@ -679,12 +679,19 @@ export default {
|
|||||||
// 验证手机号的正则表达式
|
// 验证手机号的正则表达式
|
||||||
const regMobile =
|
const regMobile =
|
||||||
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/;
|
/^(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)) {
|
if (value.length == 11) {
|
||||||
return cb();
|
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) => {
|
var isCardId = (rule, value, callback) => {
|
||||||
@ -815,12 +822,15 @@ export default {
|
|||||||
form2: {},
|
form2: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
|
studentNumber: [
|
||||||
|
{ required: true, message: "请输入学生编号", trigger: "blur" },
|
||||||
|
],
|
||||||
phone: [
|
phone: [
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
validator: checkMobile,
|
validator: checkMobile,
|
||||||
trigger: "blur",
|
trigger: "blur",
|
||||||
message: "请输入正确的手机号",
|
message: "",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
birthDate: [
|
birthDate: [
|
||||||
@ -952,7 +962,6 @@ export default {
|
|||||||
handleQuery3() {
|
handleQuery3() {
|
||||||
listParentInfo(this.parentInfoList2).then((response) => {
|
listParentInfo(this.parentInfoList2).then((response) => {
|
||||||
this.parentInfoList = response.rows;
|
this.parentInfoList = response.rows;
|
||||||
console.log(this.parentInfoList);
|
|
||||||
this.total3 = response.total;
|
this.total3 = response.total;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -965,6 +974,17 @@ export default {
|
|||||||
// console.log(this.classinfoList);
|
// console.log(this.classinfoList);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery2() {
|
||||||
|
this.classinfoList2 = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
kindergartenId: null,
|
||||||
|
className: null,
|
||||||
|
classType: null,
|
||||||
|
};
|
||||||
|
this.handleQuery2();
|
||||||
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
@ -1166,7 +1186,7 @@ export default {
|
|||||||
console.log(this.form);
|
console.log(this.form);
|
||||||
console.log(this.form2);
|
console.log(this.form2);
|
||||||
console.log(this.parentlist);
|
console.log(this.parentlist);
|
||||||
console.log(this.parent1, this.parent2);
|
// console.log(this.parent1, this.parent2);
|
||||||
console.log(this.tags);
|
console.log(this.tags);
|
||||||
},
|
},
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
@ -1291,17 +1311,32 @@ export default {
|
|||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
this.getList();
|
listStudentInfo(this.queryParams).then((res) => {
|
||||||
|
this.studentInfoList = res.rows;
|
||||||
|
this.total = res.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
cancel3() {
|
cancel3() {
|
||||||
this.resetQuery();
|
this.resetQuery2();
|
||||||
this.innerVisible = false;
|
this.innerVisible = false;
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery1() {
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery3() {
|
||||||
|
this.parentInfoList2 = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
parentName: null,
|
||||||
|
parentSex: null,
|
||||||
|
phone: null,
|
||||||
|
};
|
||||||
|
this.handleQuery3();
|
||||||
|
},
|
||||||
|
|
||||||
/** 查询学生信息列表 */
|
/** 查询学生信息列表 */
|
||||||
getList() {
|
getList() {
|
||||||
@ -1313,7 +1348,7 @@ export default {
|
|||||||
});
|
});
|
||||||
tKindergartenInfo(this.nationType).then((res) => {
|
tKindergartenInfo(this.nationType).then((res) => {
|
||||||
this.nactionlist = res.data;
|
this.nactionlist = res.data;
|
||||||
console.log(this.nactionlist);
|
// console.log(this.nactionlist);
|
||||||
});
|
});
|
||||||
tKindergartenInfo(this.ClassType).then((res) => {
|
tKindergartenInfo(this.ClassType).then((res) => {
|
||||||
// console.log(res.data);
|
// console.log(res.data);
|
||||||
@ -1329,18 +1364,12 @@ export default {
|
|||||||
});
|
});
|
||||||
listParentInfo(this.parentInfoList2).then((response) => {
|
listParentInfo(this.parentInfoList2).then((response) => {
|
||||||
this.parentInfoList = response.rows;
|
this.parentInfoList = response.rows;
|
||||||
console.log(this.parentInfoList);
|
// console.log(this.parentInfoList);
|
||||||
this.total3 = response.total;
|
this.total3 = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
listStudentInfo(this.queryParams).then((res) => {
|
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;
|
this.studentInfoList = res.rows;
|
||||||
// console.log(this.studentInfoList);
|
|
||||||
this.total = res.total;
|
this.total = res.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
@ -1370,6 +1399,10 @@ export default {
|
|||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.parent1 = "";
|
||||||
|
this.parent2 = "";
|
||||||
|
this.parentlist = [];
|
||||||
|
this.tags = [];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -56,7 +56,7 @@
|
|||||||
@click="handleQuery"
|
@click="handleQuery"
|
||||||
>搜索</el-button
|
>搜索</el-button
|
||||||
>
|
>
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery1"
|
||||||
>重置</el-button
|
>重置</el-button
|
||||||
>
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -126,7 +126,7 @@
|
|||||||
align="center"
|
align="center"
|
||||||
prop="kindergartenName"
|
prop="kindergartenName"
|
||||||
/>
|
/>
|
||||||
<el-table-column label="所属班级" align="center" prop="teacherClassId">
|
<el-table-column label="所属班级" align="center" prop="classInfoList">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="text" @click="teacherInfo(scope.row)"
|
<el-button size="mini" type="text" @click="teacherInfo(scope.row)"
|
||||||
>查看</el-button
|
>查看</el-button
|
||||||
@ -200,7 +200,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<el-form-item
|
||||||
label="所属班级"
|
label="所属班级"
|
||||||
prop="teacherClassId"
|
prop="classInfoList"
|
||||||
class="is-required"
|
class="is-required"
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
@ -244,7 +244,11 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="联系电话" prop="teacherPhone">
|
<el-form-item label="联系电话" prop="teacherPhone">
|
||||||
<el-input v-model="form.teacherPhone" placeholder="请输入联系电话" />
|
<el-input
|
||||||
|
v-model="form.teacherPhone"
|
||||||
|
placeholder="请输入联系电话"
|
||||||
|
maxlength="13"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
@ -292,7 +296,7 @@
|
|||||||
@click="handleQuery3"
|
@click="handleQuery3"
|
||||||
>搜索</el-button
|
>搜索</el-button
|
||||||
>
|
>
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery2"
|
||||||
>重置</el-button
|
>重置</el-button
|
||||||
>
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -421,7 +425,7 @@
|
|||||||
@click="handleQuery2"
|
@click="handleQuery2"
|
||||||
>搜索</el-button
|
>搜索</el-button
|
||||||
>
|
>
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery3"
|
||||||
>重置</el-button
|
>重置</el-button
|
||||||
>
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -587,13 +591,22 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
const regMobile =
|
const regMobile =
|
||||||
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/;
|
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/;
|
||||||
if (regMobile.test(value)) {
|
const reg = /^(0[0-9]{2,3}\-)([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$/;
|
||||||
return cb();
|
const isTel = reg.test(value);
|
||||||
}
|
|
||||||
|
|
||||||
cb(new Error("请输入合法的手机号"));
|
if (value.length == 11) {
|
||||||
|
if (regMobile.test(value)) {
|
||||||
|
return cb();
|
||||||
|
}
|
||||||
|
} else if (11 < value.length <= 13) {
|
||||||
|
if (isTel) {
|
||||||
|
return cb();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
cb(new Error("请输入正确的联系电话"));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
//验证身份证
|
//验证身份证
|
||||||
var isCardId = (rule, value, callback) => {
|
var isCardId = (rule, value, callback) => {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
@ -723,19 +736,12 @@ export default {
|
|||||||
{ required: true, message: "请输入证件号", trigger: "blur" },
|
{ required: true, message: "请输入证件号", trigger: "blur" },
|
||||||
{ validator: isCardId, trigger: "blur" },
|
{ validator: isCardId, trigger: "blur" },
|
||||||
],
|
],
|
||||||
teacherClassId: [
|
classInfoList: [
|
||||||
{ required: true, message: "所属班级不能为空", trigger: "blur" },
|
{ required: true, message: "所属班级不能为空", trigger: "blur" },
|
||||||
],
|
],
|
||||||
kindergartenId: [
|
kindergartenId: [
|
||||||
{ required: true, message: "所属幼儿园不能为空", trigger: "blur" },
|
{ required: true, message: "所属幼儿园不能为空", trigger: "blur" },
|
||||||
],
|
],
|
||||||
teacherClassId: [
|
|
||||||
// {
|
|
||||||
// required: true,
|
|
||||||
// message: "班级老师关系表id不能为空",
|
|
||||||
// trigger: "blur",
|
|
||||||
// },
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@ -811,6 +817,8 @@ export default {
|
|||||||
this.teacherrclassinfo = res.data;
|
this.teacherrclassinfo = res.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
kindergartenNameclick(row) {
|
kindergartenNameclick(row) {
|
||||||
this.form.kindergartenId = row.id;
|
this.form.kindergartenId = row.id;
|
||||||
this.kindergartenid = row.id;
|
this.kindergartenid = row.id;
|
||||||
@ -820,6 +828,16 @@ export default {
|
|||||||
// this.getclassinfo();
|
// this.getclassinfo();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
resetQuery3() {
|
||||||
|
this.classinfoList2 = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
kindergartenId: null,
|
||||||
|
className: null,
|
||||||
|
classType: null,
|
||||||
|
};
|
||||||
|
this.handleQuery2();
|
||||||
|
},
|
||||||
//banjisousuo
|
//banjisousuo
|
||||||
handleQuery2() {
|
handleQuery2() {
|
||||||
listClassinfo(this.classinfoList2).then((response) => {
|
listClassinfo(this.classinfoList2).then((response) => {
|
||||||
@ -827,34 +845,12 @@ export default {
|
|||||||
this.total2 = response.total;
|
this.total2 = response.total;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 查询教师信息管理列表 */
|
|
||||||
getList() {
|
|
||||||
this.loading = true;
|
|
||||||
listKindergartenInfo(this.queryParams2).then((response) => {
|
|
||||||
this.kindergartenInfoList = response.rows;
|
|
||||||
this.total3 = response.total;
|
|
||||||
});
|
|
||||||
listTeacherInfo(this.queryParams).then((response) => {
|
|
||||||
this.teacherInfoList = response.rows;
|
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
tKindergartenInfo(this.ClassType).then((res) => {
|
|
||||||
this.options[0].classType = res.data[0].dictValue;
|
|
||||||
this.options[1].classType = res.data[1].dictValue;
|
|
||||||
this.options[2].classType = res.data[2].dictValue;
|
|
||||||
this.options[3].classType = res.data[3].dictValue;
|
|
||||||
this.dictValue1 = res.data[0].dictValue;
|
|
||||||
this.dictValue2 = res.data[1].dictValue;
|
|
||||||
this.dictValue3 = res.data[2].dictValue;
|
|
||||||
this.dictValue4 = res.data[3].dictValue;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.reset();
|
this.reset();
|
||||||
this.resetQuery();
|
// this.resetQuery();
|
||||||
this.kindergartenid = "";
|
this.kindergartenid = "";
|
||||||
this.kindergartenName = "请选择所在幼儿园";
|
this.kindergartenName = "请选择所在幼儿园";
|
||||||
this.classinfoName = [];
|
this.classinfoName = [];
|
||||||
@ -873,7 +869,7 @@ export default {
|
|||||||
className: null,
|
className: null,
|
||||||
classType: null,
|
classType: null,
|
||||||
};
|
};
|
||||||
this.getList();
|
this.handleQuery3();
|
||||||
this.innerVisible = false;
|
this.innerVisible = false;
|
||||||
this.innerVisible2 = false;
|
this.innerVisible2 = false;
|
||||||
},
|
},
|
||||||
@ -917,7 +913,25 @@ export default {
|
|||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
this.getList();
|
listTeacherInfo(this.queryParams).then((response) => {
|
||||||
|
this.teacherInfoList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
resetQuery1() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
|
||||||
|
resetQuery2() {
|
||||||
|
this.queryParams2 = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
kindergartenId: null,
|
||||||
|
className: null,
|
||||||
|
classType: null,
|
||||||
|
};
|
||||||
|
this.handleQuery3();
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery3() {
|
handleQuery3() {
|
||||||
@ -928,26 +942,39 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
// resetQuery() {
|
||||||
this.resetForm("queryForm");
|
// this.resetForm("queryForm");
|
||||||
this.queryParams2 = {
|
// this.queryParams2 = {
|
||||||
pageNum: 1,
|
// pageNum: 1,
|
||||||
pageSize: 10,
|
// pageSize: 10,
|
||||||
kindergartenId: null,
|
// kindergartenId: null,
|
||||||
className: null,
|
// className: null,
|
||||||
classType: null,
|
// classType: null,
|
||||||
};
|
// };
|
||||||
this.classinfoList2 = {
|
// this.classinfoList2 = {
|
||||||
pageNum: 1,
|
// pageNum: 1,
|
||||||
pageSize: 10,
|
// pageSize: 10,
|
||||||
kindergartenId: null,
|
// kindergartenId: null,
|
||||||
className: null,
|
// className: null,
|
||||||
classType: null,
|
// classType: null,
|
||||||
};
|
// };
|
||||||
listClassinfo(this.classinfoList2).then((response) => {
|
// listClassinfo(this.classinfoList2).then((response) => {
|
||||||
this.classinfoList = response.rows;
|
// this.classinfoList = response.rows;
|
||||||
this.total2 = response.total;
|
// this.total2 = response.total;
|
||||||
});
|
// });
|
||||||
|
// listKindergartenInfo(this.queryParams2).then((response) => {
|
||||||
|
// this.kindergartenInfoList = response.rows;
|
||||||
|
// this.total3 = response.total;
|
||||||
|
// });
|
||||||
|
// listTeacherInfo(this.queryParams).then((response) => {
|
||||||
|
// this.teacherInfoList = response.rows;
|
||||||
|
// this.total = response.total;
|
||||||
|
// this.loading = false;
|
||||||
|
// });
|
||||||
|
// },
|
||||||
|
/** 查询教师信息管理列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
listKindergartenInfo(this.queryParams2).then((response) => {
|
listKindergartenInfo(this.queryParams2).then((response) => {
|
||||||
this.kindergartenInfoList = response.rows;
|
this.kindergartenInfoList = response.rows;
|
||||||
this.total3 = response.total;
|
this.total3 = response.total;
|
||||||
@ -957,6 +984,16 @@ export default {
|
|||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
|
tKindergartenInfo(this.ClassType).then((res) => {
|
||||||
|
this.options[0].classType = res.data[0].dictValue;
|
||||||
|
this.options[1].classType = res.data[1].dictValue;
|
||||||
|
this.options[2].classType = res.data[2].dictValue;
|
||||||
|
this.options[3].classType = res.data[3].dictValue;
|
||||||
|
this.dictValue1 = res.data[0].dictValue;
|
||||||
|
this.dictValue2 = res.data[1].dictValue;
|
||||||
|
this.dictValue3 = res.data[2].dictValue;
|
||||||
|
this.dictValue4 = res.data[3].dictValue;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
@ -970,7 +1007,6 @@ export default {
|
|||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "添加教师信息管理";
|
this.title = "添加教师信息管理";
|
||||||
},
|
},
|
||||||
|
|
||||||
innerVisibletrue2() {
|
innerVisibletrue2() {
|
||||||
if (this.form.kindergartenId == "") {
|
if (this.form.kindergartenId == "") {
|
||||||
this.$message.error("请先选择幼儿园");
|
this.$message.error("请先选择幼儿园");
|
||||||
@ -1016,17 +1052,19 @@ export default {
|
|||||||
updateTeacherInfo(this.form).then((response) => {
|
updateTeacherInfo(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.kindergartenid = "";
|
||||||
this.reset();
|
this.kindergartenName = "请选择所在幼儿园";
|
||||||
this.resetQuery();
|
this.classinfoName = [];
|
||||||
|
this.resetQuery1();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addTeacherInfo(this.form).then((response) => {
|
addTeacherInfo(this.form).then((response) => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.resetQuery1();
|
||||||
this.reset();
|
this.kindergartenid = "";
|
||||||
this.resetQuery();
|
this.kindergartenName = "请选择所在幼儿园";
|
||||||
|
this.classinfoName = [];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -729,7 +729,7 @@ export default {
|
|||||||
getTreeselect() {
|
getTreeselect() {
|
||||||
treeselect().then((response) => {
|
treeselect().then((response) => {
|
||||||
this.deptOptions = response.data;
|
this.deptOptions = response.data;
|
||||||
console.log(this.deptOptions);
|
// console.log(this.deptOptions);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 筛选节点
|
// 筛选节点
|
||||||
@ -838,6 +838,8 @@ export default {
|
|||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = "修改用户";
|
this.title = "修改用户";
|
||||||
this.form.password = "";
|
this.form.password = "";
|
||||||
|
console.log(this.form)
|
||||||
|
console.log(this.areaList)
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 重置密码按钮操作 */
|
/** 重置密码按钮操作 */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user