This commit is contained in:
2023-09-01 16:23:23 +08:00
parent ef1600bd82
commit 8b398ec874
4 changed files with 222 additions and 471 deletions

View File

@ -4,11 +4,9 @@
<el-form-item label="所属班级" prop="className"> <el-form-item label="所属班级" prop="className">
<el-button <el-button
@click="classshow = true" @click="classshow = true"
v-if="className == '请选择班级'"
class="btn" class="btn"
style="color: #c0c4cc;" :style="className == '请选择班级'?'color: #c0c4cc;':''"
>{{ className }}</el-button> >{{ className }}</el-button>
<el-button @click="classshow = true" class="btn" v-else>{{ className }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- // --> <!-- // -->

View File

@ -1,48 +1,32 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form <el-form ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="90px"
>
<el-form-item label="所属幼儿园" prop="categoryName"> <el-form-item label="所属幼儿园" prop="categoryName">
<i class="el-icon-circle-close" @click="kindergartenicon" v-if="nameicon && nameicons"></i>
<el-button <el-button
@click="kindergartenshow = true" @click.stop="kindergartenshow = true"
v-if="kindergartenName == '请选择幼儿园'" :style="kindergartenName == '请选择幼儿园'?'color: #c0c4cc;':''"
style=" style="
width: 230px; width: 230px;
text-align: left; text-align: left;
height: 32px; height: 32px;
color: #c0c4cc;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
" "
>{{ kindergartenName }}</el-button >{{ kindergartenName }}</el-button>
>
<el-button
@click="kindergartenshow = true"
style="width: 230px; text-align: left; height: 32px"
v-else
>{{ kindergartenName }}</el-button
>
</el-form-item> </el-form-item>
<el-form-item label="所属批次" prop="categoryName"> <el-form-item label="所属批次" prop="categoryName">
<i
class="el-icon-circle-close"
@click="batchNameicon"
v-if="batchnameicon && batchnameicons"
></i>
<el-button <el-button
@click="batchCodeshowclick" @click="batchCodeshowclick"
style="width: 230px; text-align: left; height: 32px; color: #c0c4cc" :style="batchName == '请选择批次'?'color: #c0c4cc;':''"
v-if="batchName == '请选择批次'" style="width: 230px; text-align: left; height: 32px;"
>{{ batchName }}</el-button >{{ batchName }}</el-button>
>
<el-button
@click="batchCodeshowclick"
style="width: 230px; text-align: left; height: 32px"
v-else
>{{ batchName }}</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -64,30 +48,14 @@
label-width="90px" label-width="90px"
> >
<el-form-item label="批次编号" prop="batchCode"> <el-form-item label="批次编号" prop="batchCode">
<el-input <el-input v-model="testqueryParams.batchCode" placeholder="请输入批次编号" clearable />
v-model="testqueryParams.batchCode"
placeholder="请输入批次编号"
clearable
/>
</el-form-item> </el-form-item>
<el-form-item label="批次名称" prop="batchCode"> <el-form-item label="批次名称" prop="batchCode">
<el-input <el-input v-model="testqueryParams.batchName" placeholder="请输入批次名称" clearable />
v-model="testqueryParams.batchName"
placeholder="请输入批次名称"
clearable
/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button type="primary" icon="el-icon-search" size="mini" @click="testScore">搜索</el-button>
type="primary" <el-button icon="el-icon-refresh" size="mini" @click="testresetQuery">重置</el-button>
icon="el-icon-search"
size="mini"
@click="testScore"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="testresetQuery"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -114,18 +82,8 @@
></el-button> ></el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column property="batchCode" label="批次编号" width="230" align="center" />
property="batchCode" <el-table-column property="batchName" label="批次名称" width="230" align="center" />
label="批次编号"
width="230"
align="center"
/>
<el-table-column
property="batchName"
label="批次名称"
width="230"
align="center"
/>
</el-table> </el-table>
<pagination <pagination
v-show="total4 > 0" v-show="total4 > 0"
@ -144,13 +102,7 @@
append-to-body append-to-body
:before-close="kindergartencancel" :before-close="kindergartencancel"
> >
<el-form <el-form ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="110px">
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="110px"
>
<el-form-item label="幼儿园名称" prop="kindergartenName"> <el-form-item label="幼儿园名称" prop="kindergartenName">
<el-input <el-input
style="width: 200px" style="width: 200px"
@ -160,16 +112,8 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button type="primary" icon="el-icon-search" size="mini" @click="kinhandleQuery">搜索</el-button>
type="primary" <el-button icon="el-icon-refresh" size="mini" @click="kinresetQuery">重置</el-button>
icon="el-icon-search"
size="mini"
@click="kinhandleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="kinresetQuery"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table :data="kindergartenList" @cell-dblclick="kindergartenNameclick"> <el-table :data="kindergartenList" @cell-dblclick="kindergartenNameclick">
@ -191,42 +135,11 @@
></el-button> ></el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column property="kindergartenName" label="幼儿园名字" width="150" align="center"></el-table-column>
<el-table-column <el-table-column property="kindergartenAddress" label="幼儿园地址" width="150" align="center"></el-table-column>
property="kindergartenName" <el-table-column label="幼儿园所在组织" align="center" prop="organizeName" width="150"></el-table-column>
label="幼儿园名字" <el-table-column property="contacts" label="联系人" width="150" align="center"></el-table-column>
width="150" <el-table-column property="phone" label="联系电话" width="150" align="center"></el-table-column>
align="center"
>
</el-table-column>
<el-table-column
property="kindergartenAddress"
label="幼儿园地址"
width="150"
align="center"
>
</el-table-column>
<el-table-column
label="幼儿园所在组织"
align="center"
prop="organizeName"
width="150"
>
</el-table-column>
<el-table-column
property="contacts"
label="联系人"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="phone"
label="联系电话"
width="150"
align="center"
>
</el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total1 > 0" v-show="total1 > 0"
@ -241,13 +154,14 @@
<script> <script>
import { import {
listKindergartenInfo, listKindergartenInfo,
tKindergartenInfo, tKindergartenInfo
} from "@/api/system/kindergartenInfo"; } from "@/api/system/kindergartenInfo";
import { getRoleInfo, testScoreBatch } from "@/api/system/quality"; import { getRoleInfo, testScoreBatch } from "@/api/system/quality";
export default { export default {
name: "", name: "",
components: {}, components: {},
props: ["nameicon", "batchnameicon"],
data() { data() {
return { return {
total1: 0, total1: 0,
@ -268,7 +182,7 @@ export default {
kindergartenAddress: null, kindergartenAddress: null,
kindergartenType: null, kindergartenType: null,
phone: null, phone: null,
contacts: null, contacts: null
}, },
//list //list
kindergartenList: [], kindergartenList: [],
@ -284,8 +198,10 @@ export default {
// //
testqueryParams: { testqueryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10
}, },
nameicons: "",
batchnameicons: ""
}; };
}, },
mounted() {}, mounted() {},
@ -294,22 +210,42 @@ export default {
this.onshow(); this.onshow();
}, },
methods: { methods: {
resetlist() {
this.kindergartenName = "请选择幼儿园";
this.kindergartenId = "";
this.batchCode = "";
this.batchName = "请选择批次";
this.nameicons = false;
this.batchnameicons = false;
},
kindergartenicon() {
this.kindergartenName = "请选择幼儿园";
this.kindergartenId = "";
this.nameicons = false;
this.$emit("kinbatlists", this.kindergartenId);
},
batchNameicon() {
this.batchCode = "";
this.batchName = "请选择批次";
this.$emit("kinbatlisticon", this.batchCode);
this.batchnameicons = false;
},
onshow() { onshow() {
this.batchCode = localStorage.getItem("batchCode2"); // this.batchCode = localStorage.getItem("batchCode2");
this.batchName = localStorage.getItem("batchName2"); // this.batchName = localStorage.getItem("batchName2");
this.kindergartenId = localStorage.getItem("kindergartenId"); // this.kindergartenId = localStorage.getItem("kindergartenId");
if (localStorage.getItem("kindergartenName") == null) { // if (localStorage.getItem("kindergartenName") == null) {
this.kindergartenName = "请选择幼儿园"; this.kindergartenName = "请选择幼儿园";
this.batchCode = "请选择批次"; this.batchCode = "请选择批次";
} else { // } else {
this.kindergartenName = localStorage.getItem("kindergartenName"); // this.kindergartenName = localStorage.getItem("kindergartenName");
} // }
if (localStorage.getItem("batchCode2") == null) { // if (localStorage.getItem("batchCode2") == null) {
this.batchCode = "请选择批次"; // this.batchCode = "";
} else { // } else {
this.batchCode = localStorage.getItem("batchCode2"); // this.batchCode = localStorage.getItem("batchCode2");
} // }
this.$emit("kinbatlist", this.kindergartenId, this.batchCode); // this.$emit("kinbatlist", this.kindergartenId, this.batchCode);
}, },
// //
@ -317,8 +253,9 @@ export default {
this.kindergartenName = row.kindergartenName; this.kindergartenName = row.kindergartenName;
this.kindergartenId = row.id; this.kindergartenId = row.id;
this.kindergartenshow = false; this.kindergartenshow = false;
localStorage.setItem("kindergartenName", this.kindergartenName); this.nameicons = true;
localStorage.setItem("kindergartenId", this.kindergartenId); // localStorage.setItem("kindergartenName", this.kindergartenName);
// localStorage.setItem("kindergartenId", this.kindergartenId);
this.$emit("kinbatlist", this.kindergartenId, this.batchCode, 1); this.$emit("kinbatlist", this.kindergartenId, this.batchCode, 1);
}, },
@ -327,9 +264,10 @@ export default {
this.batchCode = row.batchCode; this.batchCode = row.batchCode;
this.batchName = row.batchName; this.batchName = row.batchName;
this.batchCodeshow = false; this.batchCodeshow = false;
localStorage.setItem("batchCode2", this.batchCode); this.batchnameicons = true;
localStorage.setItem("batchName2", this.batchName); // localStorage.setItem("batchCode2", this.batchCode);
if (this.kindergartenId != "") { // localStorage.setItem("batchName2", this.batchName);
if (this.kindergartenId != "" || !this.kindergartenId) {
this.$emit("kinbatlist", this.kindergartenId, this.batchCode, 2); this.$emit("kinbatlist", this.kindergartenId, this.batchCode, 2);
} }
}, },
@ -340,7 +278,7 @@ export default {
}, },
// //
testScore() { testScore() {
testScoreBatch(this.testqueryParams).then((res) => { testScoreBatch(this.testqueryParams).then(res => {
this.testScorelist = res.rows; this.testScorelist = res.rows;
this.total4 = res.total; this.total4 = res.total;
}); });
@ -350,7 +288,7 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
batchCode: "", batchCode: "",
batchName: "", batchName: ""
}; };
this.testScore(); this.testScore();
}, },
@ -366,7 +304,7 @@ export default {
}, },
kinhandleQuery() { kinhandleQuery() {
//list //list
listKindergartenInfo(this.kqueryParams).then((response) => { listKindergartenInfo(this.kqueryParams).then(response => {
this.kindergartenList = response.rows; this.kindergartenList = response.rows;
this.total1 = response.total; this.total1 = response.total;
}); });
@ -380,36 +318,35 @@ export default {
kindergartenAddress: null, kindergartenAddress: null,
kindergartenType: null, kindergartenType: null,
phone: null, phone: null,
contacts: null, contacts: null
}; };
this.kinhandleQuery(); this.kinhandleQuery();
}, },
getList() { getList() {
// //
getRoleInfo().then((res) => { getRoleInfo().then(res => {
var user = res.data.roleKeys; var user = res.data.roleKeys;
if (user.includes("enchou")) { if (user.includes("teacher")) {
return; // if (res.code != 999999) {
} else if (user.includes("teacher")) { res.data.kindergartenId
if (res.data != 999999) { ? (this.kindergartenId = res.data.kindergartenId)
this.kindergartenId = res.data.kindergartenId; : "";
this.kindergartenName = res.data.kindergartenName; res.data.kindergartenName
? (this.kindergartenName = res.data.kindergartenName)
: "";
this.$emit("kinbatlist", this.kindergartenId, this.batchCode, 0); this.$emit("kinbatlist", this.kindergartenId, this.batchCode, 0);
localStorage.setItem("kindergartenName", res.data.kindergartenName); // res.data.kindergartenName? localStorage.setItem("kindergartenName", res.data.kindergartenName):'';
localStorage.setItem("kindergartenId", res.data.kindergartenId); // res.data.kindergartenId? localStorage.setItem("kindergartenId", res.data.kindergartenId):'';
} // }
return;
} else if (user.includes("parent")) {
return;
} }
}); });
tKindergartenInfo(this.kindergartenType).then((res) => { tKindergartenInfo(this.kindergartenType).then(res => {
this.type = res.data[0]; this.type = res.data[0];
this.type2 = res.data[1]; this.type2 = res.data[1];
}); });
//list //list
listKindergartenInfo(this.kqueryParams).then((response) => { listKindergartenInfo(this.kqueryParams).then(response => {
this.kindergartenList = response.rows; this.kindergartenList = response.rows;
this.total1 = response.total; this.total1 = response.total;
}); });
@ -418,12 +355,18 @@ export default {
reset() { reset() {
this.form = {}; this.form = {};
this.resetForm("form"); this.resetForm("form");
}, }
}, }
}; };
</script> </script>
<style scoped='scss'> <style scoped='scss'>
::v-deep .el-card__header { ::v-deep .el-card__header {
border: none; border: none;
} }
::v-deep .el-icon-circle-close:before {
position: absolute;
left: 90%;
top: 33%;
color: #c0c8d3;
}
</style> </style>

View File

@ -4,11 +4,9 @@
<el-form-item label="家长姓名" prop="parentName"> <el-form-item label="家长姓名" prop="parentName">
<el-button <el-button
@click="parentshow = true" @click="parentshow = true"
v-if="parentName == '请选择家长'"
class="btn" class="btn"
style="color: #c0c4cc;" :style="parentName == '请选择家长'?'color: #c0c4cc;':''"
>{{ parentName }}</el-button> >{{ parentName }}</el-button>
<el-button @click="parentshow = true" class="btn" v-else>{{ parentName }}</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- // --> <!-- // -->
@ -51,7 +49,12 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column property="parentName" label="家长姓名" align="center"></el-table-column> <el-table-column property="parentName" label="家长姓名" align="center"></el-table-column>
<el-table-column property="parentSex" label="性别" align="center"></el-table-column> <el-table-column property="parentSex" label="性别" align="center">
<template slot-scope="scope">
{{scope.row.studentSex=='MALE'?'男':''}}
{{scope.row.studentSex=='FEMALE'?'女':''}}
</template>
</el-table-column>
<el-table-column property="phone" label="联系电话" align="center"></el-table-column> <el-table-column property="phone" label="联系电话" align="center"></el-table-column>
</el-table> </el-table>
<pagination <pagination

View File

@ -1,39 +1,19 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form <el-form ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="90px"
>
<el-form-item label="学生姓名" prop="categoryName"> <el-form-item label="学生姓名" prop="categoryName">
<el-button <el-button
@click="studentshowclick" @click="studentshowclick"
v-if="studentname == '请选择学生'" :style="studentname == '请选择学生'?'color: #c0c4cc;':''"
style="width: 230px; text-align: left; height: 32px; color: #c0c4cc" style="width: 230px; text-align: left; height: 32px; "
>{{ studentname }}</el-button >{{ studentname }}</el-button>
>
<el-button
@click="studentshowclick"
style="width: 230px; text-align: left; height: 32px"
v-else
>{{ studentname }}</el-button
>
</el-form-item> </el-form-item>
<el-form-item label="所属批次" prop="categoryName"> <el-form-item label="所属批次" prop="categoryName">
<el-button <el-button
@click="batchCodeshowclick" @click="batchCodeshowclick"
style="width: 230px; text-align: left; height: 32px; color: #c0c4cc" style="width: 230px; text-align: left; height: 32px;"
v-if="batchName == '请选择批次'" :style="batchName == '请选择批次'?'color: #c0c4cc;':''"
>{{ batchName }}</el-button >{{ batchName }}</el-button>
>
<el-button
@click="batchCodeshowclick"
style="width: 230px; text-align: left; height: 32px"
v-else
>{{ batchName }}</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -45,30 +25,11 @@
append-to-body append-to-body
:before-close="studentcancel" :before-close="studentcancel"
> >
<el-form <el-form ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="90px">
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="90px"
>
<el-form-item label="所属幼儿园" prop="categoryName"> <el-form-item label="所属幼儿园" prop="categoryName">
<el-button <el-button
@click="kindergartenshow = true" @click="kindergartenshow = true"
v-if="kindergartenName == '请选择幼儿园'" :style="kindergartenName == '请选择幼儿园'?'color: #c0c4cc;':''"
style="
width: 200px;
text-align: left;
height: 32px;
color: #c0c4cc;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
"
>{{ kindergartenName }}</el-button
>
<el-button
@click="kindergartenshow = true"
style=" style="
width: 200px; width: 200px;
text-align: left; text-align: left;
@ -77,11 +38,8 @@
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
" "
v-else >{{ kindergartenName }}</el-button>
>{{ kindergartenName }}</el-button
>
</el-form-item> </el-form-item>
<el-form-item label="所属班级" prop="categoryName" label-width="80px"> <el-form-item label="所属班级" prop="categoryName" label-width="80px">
<el-button <el-button
@click="classshowclick" @click="classshowclick"
@ -89,28 +47,12 @@
width: 200px; width: 200px;
text-align: left; text-align: left;
height: 32px; height: 32px;
color: #c0c4cc;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
" "
v-if="className == '请选择班级'" :style="className == '请选择班级'?'color: #c0c4cc;':''"
>{{ className }}</el-button >{{ className }}</el-button>
>
<el-button
@click="classshowclick"
style="
width: 200px;
text-align: left;
height: 32px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
"
v-else
>{{ className }}</el-button
>
</el-form-item> </el-form-item>
<el-form-item label="学生姓名" prop="studentName" label-width="80px"> <el-form-item label="学生姓名" prop="studentName" label-width="80px">
@ -122,16 +64,8 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
type="primary" <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table <el-table
@ -157,34 +91,12 @@
></el-button> ></el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column property="className" label="班级名称" width="190" align="center" />
property="className" <el-table-column property="studentName" label="学生姓名" width="190" align="center" />
label="班级名称" <el-table-column property="studentName" label="性别" width="190" align="center">
width="190" <template slot-scope="scope">{{ scope.row.studentSex == "MALE" ? "男" : "女" }}</template>
align="center"
/>
<el-table-column
property="studentName"
label="学生姓名"
width="190"
align="center"
/>
<el-table-column
property="studentName"
label="性别"
width="190"
align="center"
>
<template slot-scope="scope">
{{ scope.row.studentSex == "MALE" ? "男" : "女" }}
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column property="homeAddress" label="住址" width="190" align="center" />
property="homeAddress"
label="住址"
width="190"
align="center"
/>
</el-table> </el-table>
<pagination <pagination
v-show="total3 > 0" v-show="total3 > 0"
@ -203,13 +115,7 @@
append-to-body append-to-body
:before-close="kindergartencancel" :before-close="kindergartencancel"
> >
<el-form <el-form ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="110px">
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="110px"
>
<el-form-item label="幼儿园名称" prop="kindergartenName"> <el-form-item label="幼儿园名称" prop="kindergartenName">
<el-input <el-input
style="width: 200px" style="width: 200px"
@ -219,16 +125,8 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button type="primary" icon="el-icon-search" size="mini" @click="kinhandleQuery">搜索</el-button>
type="primary" <el-button icon="el-icon-refresh" size="mini" @click="kinresetQuery">重置</el-button>
icon="el-icon-search"
size="mini"
@click="kinhandleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="kinresetQuery"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table :data="kindergartenList" @cell-dblclick="kindergartenNameclick"> <el-table :data="kindergartenList" @cell-dblclick="kindergartenNameclick">
@ -251,41 +149,11 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column property="kindergartenName" label="幼儿园名字" width="150" align="center"></el-table-column>
property="kindergartenName" <el-table-column property="kindergartenAddress" label="幼儿园地址" width="150" align="center"></el-table-column>
label="幼儿园名字" <el-table-column label="幼儿园所在组织" align="center" prop="organizeName" width="150"></el-table-column>
width="150" <el-table-column property="contacts" label="联系人" width="150" align="center"></el-table-column>
align="center" <el-table-column property="phone" label="联系电话" width="150" align="center"></el-table-column>
>
</el-table-column>
<el-table-column
property="kindergartenAddress"
label="幼儿园地址"
width="150"
align="center"
>
</el-table-column>
<el-table-column
label="幼儿园所在组织"
align="center"
prop="organizeName"
width="150"
>
</el-table-column>
<el-table-column
property="contacts"
label="联系人"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="phone"
label="联系电话"
width="150"
align="center"
>
</el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total1 > 0" v-show="total1 > 0"
@ -304,32 +172,14 @@
append-to-body append-to-body
:before-close="classcancel" :before-close="classcancel"
> >
<el-form <el-form ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="110px">
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="110px"
>
<el-form-item label="班级名称" prop="className"> <el-form-item label="班级名称" prop="className">
<el-input <el-input style="width: 200px" v-model="classqueryParams.className" placeholder="请输入班级名称"></el-input>
style="width: 200px"
v-model="classqueryParams.className"
placeholder="请输入班级名称"
></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button type="primary" icon="el-icon-search" size="mini" @click="classhandleQuery">搜索</el-button>
type="primary" <el-button icon="el-icon-refresh" size="mini" @click="classresetQuery">重置</el-button>
icon="el-icon-search"
size="mini"
@click="classhandleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="classresetQuery"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table <el-table
@ -355,25 +205,9 @@
></el-button> ></el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column property="kindergartenName" label="幼儿园名称" width="190" align="center" />
property="kindergartenName" <el-table-column property="className" label="班级名称" width="180" align="center"></el-table-column>
label="幼儿园名称" <el-table-column property="classType" label="班级类型" width="160" align="center">
width="190"
align="center"
/>
<el-table-column
property="className"
label="班级名称"
width="180"
align="center"
>
</el-table-column>
<el-table-column
property="classType"
label="班级类型"
width="160"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.classType == dictValue1 ? "大班" : "" }} {{ scope.row.classType == dictValue1 ? "大班" : "" }}
{{ scope.row.classType == dictValue2 ? "中班" : "" }} {{ scope.row.classType == dictValue2 ? "中班" : "" }}
@ -382,20 +216,8 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column property="classTeacher" label="班主任姓名" width="180" align="center"></el-table-column>
property="classTeacher" <el-table-column property="phone" label="联系电话" width="190" align="center"></el-table-column>
label="班主任姓名"
width="180"
align="center"
>
</el-table-column>
<el-table-column
property="phone"
label="联系电话"
width="190"
align="center"
>
</el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total2 > 0" v-show="total2 > 0"
@ -424,30 +246,14 @@
label-width="90px" label-width="90px"
> >
<el-form-item label="批次编号" prop="batchCode"> <el-form-item label="批次编号" prop="batchCode">
<el-input <el-input v-model="testqueryParams.batchCode" placeholder="请输入批次编号" clearable />
v-model="testqueryParams.batchCode"
placeholder="请输入批次编号"
clearable
/>
</el-form-item> </el-form-item>
<el-form-item label="批次名称" prop="batchCode"> <el-form-item label="批次名称" prop="batchCode">
<el-input <el-input v-model="testqueryParams.batchName" placeholder="请输入批次名称" clearable />
v-model="testqueryParams.batchName"
placeholder="请输入批次名称"
clearable
/>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button type="primary" icon="el-icon-search" size="mini" @click="testScore">搜索</el-button>
type="primary" <el-button icon="el-icon-refresh" size="mini" @click="testresetQuery">重置</el-button>
icon="el-icon-search"
size="mini"
@click="testScore"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="testresetQuery"
>重置</el-button
>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -474,18 +280,8 @@
></el-button> ></el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column property="batchCode" label="批次编号" width="230" align="center" />
property="batchCode" <el-table-column property="batchName" label="批次名称" width="230" align="center" />
label="批次编号"
width="230"
align="center"
/>
<el-table-column
property="batchName"
label="批次名称"
width="230"
align="center"
/>
</el-table> </el-table>
<pagination <pagination
v-show="total4 > 0" v-show="total4 > 0"
@ -501,7 +297,7 @@
<script> <script>
import { import {
listKindergartenInfo, listKindergartenInfo,
tKindergartenInfo, tKindergartenInfo
} from "@/api/system/kindergartenInfo"; } from "@/api/system/kindergartenInfo";
import { listStudentInfo } from "@/api/system/studentInfo"; import { listStudentInfo } from "@/api/system/studentInfo";
import { listClassinfo } from "@/api/system/classinfo"; import { listClassinfo } from "@/api/system/classinfo";
@ -544,7 +340,7 @@ export default {
cardNumber: null, cardNumber: null,
onceName: null, onceName: null,
homeAddress: null, homeAddress: null,
kindergartenId: null, kindergartenId: null
}, },
// //
classqueryParams: { classqueryParams: {
@ -552,7 +348,7 @@ export default {
pageSize: 10, pageSize: 10,
kindergartenId: "", kindergartenId: "",
className: null, className: null,
classType: null, classType: null
}, },
// //
kqueryParams: { kqueryParams: {
@ -563,7 +359,7 @@ export default {
kindergartenAddress: null, kindergartenAddress: null,
kindergartenType: null, kindergartenType: null,
phone: null, phone: null,
contacts: null, contacts: null
}, },
//list //list
kindergartenList: [], kindergartenList: [],
@ -593,8 +389,8 @@ export default {
// //
testqueryParams: { testqueryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10
}, }
}; };
}, },
created() { created() {
@ -622,12 +418,12 @@ export default {
kindergartenAddress: null, kindergartenAddress: null,
kindergartenType: null, kindergartenType: null,
phone: null, phone: null,
contacts: null, contacts: null
}; };
this.kinhandleQuery(); this.kinhandleQuery();
}, },
kinhandleQuery() { kinhandleQuery() {
listKindergartenInfo(this.kqueryParams).then((response) => { listKindergartenInfo(this.kqueryParams).then(response => {
this.kindergartenList = response.rows; this.kindergartenList = response.rows;
this.total1 = response.total; this.total1 = response.total;
}); });
@ -652,7 +448,7 @@ export default {
cardNumber: null, cardNumber: null,
onceName: null, onceName: null,
homeAddress: null, homeAddress: null,
kindergartenId: null, kindergartenId: null
}; };
this.studentlist(); this.studentlist();
}, },
@ -661,27 +457,27 @@ export default {
this.studentlist(); this.studentlist();
}, },
onshow() { onshow() {
this.batchCode = localStorage.getItem("batchCode"); // this.batchCode = localStorage.getItem("batchCode");
this.studentId = localStorage.getItem("studentId"); // this.studentId = localStorage.getItem("studentId");
this.batchName = localStorage.getItem("batchName"); // this.batchName = localStorage.getItem("batchName");
if (localStorage.getItem("batchCode") == null) { // if (localStorage.getItem("batchCode") == null) {
this.batchName = "请选择批次"; this.batchName = "请选择批次";
} else { // } else {
this.batchCode = localStorage.getItem("batchCode"); // this.batchCode = localStorage.getItem("batchCode");
this.$emit("itemlist", this.studentId, this.batchCode); // this.$emit("itemlist", this.studentId, this.batchCode);
} // }
if (localStorage.getItem("studentname") == null) { // if (localStorage.getItem("studentname") == null) {
this.studentname = "请选择学生"; this.studentname = "请选择学生";
} else { // } else {
this.studentname = localStorage.getItem("studentname"); // this.studentname = localStorage.getItem("studentname");
this.$emit("itemlist", this.studentId, this.batchCode); // this.$emit("itemlist", this.studentId, this.batchCode);
} // }
if ( // if (
localStorage.getItem("batchCode") != null && // localStorage.getItem("batchCode") != null &&
localStorage.getItem("studentId") != null // localStorage.getItem("studentId") != null
) { // ) {
this.$emit("itemlist", this.studentId, this.batchCode); // this.$emit("itemlist", this.studentId, this.batchCode);
} // }
}, },
// //
batchCodeshowclick() { batchCodeshowclick() {
@ -693,15 +489,15 @@ export default {
this.batchCode = row.batchCode; this.batchCode = row.batchCode;
this.batchName = row.batchName; this.batchName = row.batchName;
this.batchCodeshow = false; this.batchCodeshow = false;
localStorage.setItem("batchCode", this.batchCode); // localStorage.setItem("batchCode", this.batchCode);
localStorage.setItem("batchName", this.batchName); // localStorage.setItem("batchName", this.batchName);
if (this.studentId != "") { // if (this.studentId != "") {
this.$emit("itemlist", this.studentId, this.batchCode); this.$emit("itemlist", this.studentId, this.batchCode);
} // }
}, },
// //
testScore() { testScore() {
testScoreBatch(this.testqueryParams).then((res) => { testScoreBatch(this.testqueryParams).then(res => {
this.testScorelist = res.rows; this.testScorelist = res.rows;
this.total4 = res.total; this.total4 = res.total;
}); });
@ -711,7 +507,7 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
batchCode: "", batchCode: "",
batchName: "", batchName: ""
}; };
this.testScore(); this.testScore();
}, },
@ -730,15 +526,15 @@ export default {
this.studentname = row.studentName; this.studentname = row.studentName;
this.studentId = row.id; this.studentId = row.id;
this.studentshow = false; this.studentshow = false;
localStorage.setItem("studentId", this.studentId); // localStorage.setItem("studentId", this.studentId);
localStorage.setItem("studentname", this.studentname); // localStorage.setItem("studentname", this.studentname);
if (this.batchCode != "") { // if (this.batchCode != "") {
this.$emit("itemlist", this.studentId, this.batchCode); this.$emit("itemlist", this.studentId, this.batchCode);
} // }
}, },
// //
studentlist() { studentlist() {
listStudentInfo(this.studentqueryParams).then((res) => { listStudentInfo(this.studentqueryParams).then(res => {
this.studentInfoList = res.rows; this.studentInfoList = res.rows;
this.total3 = res.total; this.total3 = res.total;
}); });
@ -758,6 +554,10 @@ export default {
// //
studentcancel() { studentcancel() {
this.studentshow = false; this.studentshow = false;
this.studentqueryParams = {
pageNum: 1,
pageSize: 10
};
this.kindergartenName = "请选择幼儿园"; this.kindergartenName = "请选择幼儿园";
this.kindergartenId = ""; this.kindergartenId = "";
this.className = "请选择班级"; this.className = "请选择班级";
@ -779,10 +579,12 @@ export default {
this.classshow = false; this.classshow = false;
this.studentname = "请选择学生"; this.studentname = "请选择学生";
this.studentId = ""; this.studentId = "";
this.handleQuery();
}, },
// //
kindergartenNameclick(row) { kindergartenNameclick(row) {
this.classqueryParams.kindergartenId = row.id; this.classqueryParams.kindergartenId = row.id;
this.studentqueryParams.kindergartenId = row.id;
this.className = "请选择班级"; this.className = "请选择班级";
this.classId = ""; this.classId = "";
this.studentname = "请选择学生"; this.studentname = "请选择学生";
@ -793,7 +595,7 @@ export default {
}, },
// //
class() { class() {
tKindergartenInfo(this.ClassType).then((res) => { tKindergartenInfo(this.ClassType).then(res => {
this.dictValue1 = res.data[0].dictValue; this.dictValue1 = res.data[0].dictValue;
this.dictValue2 = res.data[1].dictValue; this.dictValue2 = res.data[1].dictValue;
this.dictValue3 = res.data[2].dictValue; this.dictValue3 = res.data[2].dictValue;
@ -802,7 +604,7 @@ export default {
}, },
//list //list
classinfo() { classinfo() {
listClassinfo(this.classqueryParams).then((response) => { listClassinfo(this.classqueryParams).then(response => {
this.classinfoList = response.rows; this.classinfoList = response.rows;
this.total2 = response.total; this.total2 = response.total;
}); });
@ -810,36 +612,41 @@ export default {
getList() { getList() {
// //
getRoleInfo().then((res) => { getRoleInfo().then(res => {
var user = res.data.roleKeys; var user = res.data.roleKeys;
if (user.includes("enchou")) { if (user.includes("enchou")) {
this.classqueryParams.kindergartenId = res.data.kindergartenId; res.data.kindergartenId
this.studentqueryParams.kindergartenId = res.data.kindergartenId; ? (this.classqueryParams.kindergartenId = res.data.kindergartenId)
: "";
res.data.kindergartenId
? (this.studentqueryParams.kindergartenId = res.data.kindergartenId)
: "";
return; return;
} else if (user.includes("teacher")) { }
this.kindergartenId = res.data.kindergartenId; if (user.includes("teacher")) {
this.classqueryParams.kindergartenId = res.data.kindergartenId; res.data.kindergartenId
this.kindergartenName = String(res.data.kindergartenName); ? (this.kindergartenId = res.data.kindergartenId)
return; : "";
} else if (user.includes("parent")) { res.data.kindergartenId
? (this.classqueryParams.kindergartenId = res.data.kindergartenId)
: "";
res.data.kindergartenName
? (this.kindergartenName = String(res.data.kindergartenName))
: "";
return; return;
} }
}); });
//list //list
listKindergartenInfo(this.kqueryParams).then((response) => { listKindergartenInfo(this.kqueryParams).then(response => {
this.kindergartenList = response.rows; this.kindergartenList = response.rows;
this.total1 = response.total; this.total1 = response.total;
}); });
}, },
//
batchCodecancel() {
this.batchCodeshow = false;
},
// //
reset() { reset() {
this.form = {}; this.form = {};
this.resetForm("form"); this.resetForm("form");
}, }
}, }
}; };
</script> </script>