修改页面

This commit is contained in:
曹辉 2022-08-31 13:50:42 +08:00
parent 7fef5daa21
commit 9ee7fad99b
2 changed files with 40 additions and 25 deletions

View File

@ -1243,11 +1243,11 @@ export default {
},
//
handleSelectionChange2(val) {
// console.log(val);
this.parentlist = this.parentlist.filter((e) => e.id != val.id);
console.log(this.parentlist);
if (this.parentlist.length == 2) {
this.$message.error("最多选择两位");
return this.$message.error("最多选择两位");
} else {
this.parentlist = this.parentlist.filter((e) => e.id != val.id);
this.parentlist.push(val);
}
if (this.parent1 == "") {

View File

@ -198,11 +198,7 @@
>{{ kindergartenName }}</el-button
>
</el-form-item>
<el-form-item
label="所属班级"
prop="classInfoList"
class="is-required"
>
<el-form-item label="所属班级" prop="classInfoList" class="is-required">
<el-button
@click="innerVisibleclick"
style="width: 360px; text-align: left; height: 36px; color: #c0c4cc"
@ -232,7 +228,11 @@
>
</el-form-item>
<el-form-item label="教师名称" prop="teacherName">
<el-input v-model="form.teacherName" placeholder="请输入教师名称" maxlength="10"/>
<el-input
v-model="form.teacherName"
placeholder="请输入教师名称"
maxlength="10"
/>
</el-form-item>
<el-form-item label="身份证号" prop="cardNo">
<el-input v-model="form.cardNo" placeholder="请输入身份证号" />
@ -302,8 +302,11 @@
</el-form-item>
</el-form>
<el-table :data="kindergartenInfoList" @cell-dblclick="kindergartenNameclick">
<el-table-column label="请选择" width="70" align="center" >
<el-table
:data="kindergartenInfoList"
@cell-dblclick="kindergartenNameclick"
>
<el-table-column label="请选择" width="70" align="center">
<template slot-scope="scope">
<el-button
type="primary"
@ -431,7 +434,12 @@
</el-form-item>
</el-form>
<el-table :data="classinfoList" align="center" style="margin-top: 10px" @cell-dblclick="classinfoclick">
<el-table
:data="classinfoList"
align="center"
style="margin-top: 10px"
@cell-dblclick="classinfoclick"
>
<!-- <el-table-column type="selection" width="50" align="center" /> -->
<el-table-column label="请选择" width="70" align="center">
<template slot-scope="scope">
@ -494,20 +502,26 @@
>
</el-table-column>
</el-table>
<pagination
<pagination
v-show="total2 > 0"
:total="total2"
:page.sync="classinfoList2.pageNum"
:limit.sync="classinfoList2.pageSize"
@pagination="getList"
@pagination="getclassinfo"
/>
<el-button
type="primary"
size="mini"
@click="cancel3"
style="margin-top: 30px; margin-left: 85%;width: 100px; height: 50px;font-size:15px"
>选择完成</el-button>
style="
margin-top: 30px;
margin-left: 85%;
width: 100px;
height: 50px;
font-size: 15px;
"
>选择完成</el-button
>
</el-dialog>
<el-dialog
@ -580,7 +594,7 @@ import {
export default {
name: "TeacherInfo",
data() {
// const checkMobile =/^(?:(?:\+|00)86)?1(?:(?:3[\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\d])|(?:9[189]))\d{8}$/;
// const checkMobile =/^(?:(?:\+|00)86)?1(?:(?:3[\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\d])|(?:9[189]))\d{8}$/;
//
var checkMobile = (rule, value, cb) => {
//
@ -794,18 +808,20 @@ export default {
this.classinfoName = this.classinfoName.filter((e) => e.id != item.id);
},
classinfoclick(item) {
this.form.classInfoList = this.form.classInfoList.filter(
(e) => e != item.id
);
this.classinfoName = this.classinfoName.filter((e) => e.id != item.id);
this.form.classInfoList.push(item.id);
// if (res.data.length > 1) {
// this.classinfoName = res.data.map((e) => e.className).join(",");
// } else if (res.data.length == 1) {
// this.classinfoName = JSON.parse(res.data.map((e) => e.className));
// }
if (Array.isArray(this.classinfoName)) {
this.classinfoName.push(item);
} else {
this.classinfoName = this.classinfoName.split(",");
this.classinfoName.push(item);
}
console.log(this.classinfoName);
console.log(this.form.classInfoList);
},
//
@ -818,7 +834,6 @@ export default {
});
},
kindergartenNameclick(row) {
this.form.kindergartenId = row.id;
this.kindergartenid = row.id;
@ -979,7 +994,7 @@ export default {
this.kindergartenInfoList = response.rows;
this.total3 = response.total;
});
listTeacherInfo(this.queryParams).then((response) => {
listTeacherInfo(this.queryParams2).then((response) => {
this.teacherInfoList = response.rows;
this.total = response.total;
this.loading = false;