From 8b398ec874117f1de256d9bdf364d32b5367a1e9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=BE=89?= <814457906@qq.com>
Date: Fri, 1 Sep 2023 16:23:23 +0800
Subject: [PATCH] xg
---
src/views/assembly/classe.vue | 4 +-
src/views/assembly/kindergarten.vue | 261 +++++++----------
src/views/assembly/parent.vue | 11 +-
src/views/assembly/student.vue | 417 ++++++++--------------------
4 files changed, 222 insertions(+), 471 deletions(-)
diff --git a/src/views/assembly/classe.vue b/src/views/assembly/classe.vue
index 1b5f7fa..566e1e0 100644
--- a/src/views/assembly/classe.vue
+++ b/src/views/assembly/classe.vue
@@ -4,11 +4,9 @@
{{ className }}
- {{ className }}
diff --git a/src/views/assembly/kindergarten.vue b/src/views/assembly/kindergarten.vue
index 079a9ba..91e0107 100644
--- a/src/views/assembly/kindergarten.vue
+++ b/src/views/assembly/kindergarten.vue
@@ -1,48 +1,32 @@
-
+
+
{{ kindergartenName }}
- {{ kindergartenName }}
+ >{{ kindergartenName }}
-
+
{{ batchName }}
- {{ batchName }}
+ :style="batchName == '请选择批次'?'color: #c0c4cc;':''"
+ style="width: 230px; text-align: left; height: 32px;"
+ >{{ batchName }}
@@ -64,30 +48,14 @@
label-width="90px"
>
-
+
-
+
- 搜索
- 重置
+ 搜索
+ 重置
@@ -114,18 +82,8 @@
>
-
-
+
+
-
+
- 搜索
- 重置
+ 搜索
+ 重置
@@ -191,42 +135,11 @@
>
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
import {
listKindergartenInfo,
- tKindergartenInfo,
+ tKindergartenInfo
} from "@/api/system/kindergartenInfo";
import { getRoleInfo, testScoreBatch } from "@/api/system/quality";
export default {
name: "",
components: {},
+ props: ["nameicon", "batchnameicon"],
data() {
return {
total1: 0,
@@ -268,7 +182,7 @@ export default {
kindergartenAddress: null,
kindergartenType: null,
phone: null,
- contacts: null,
+ contacts: null
},
//幼儿园list
kindergartenList: [],
@@ -284,8 +198,10 @@ export default {
//批次编号
testqueryParams: {
pageNum: 1,
- pageSize: 10,
+ pageSize: 10
},
+ nameicons: "",
+ batchnameicons: ""
};
},
mounted() {},
@@ -294,22 +210,42 @@ export default {
this.onshow();
},
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() {
- this.batchCode = localStorage.getItem("batchCode2");
- this.batchName = localStorage.getItem("batchName2");
- this.kindergartenId = localStorage.getItem("kindergartenId");
- if (localStorage.getItem("kindergartenName") == null) {
- this.kindergartenName = "请选择幼儿园";
- this.batchCode = "请选择批次";
- } else {
- this.kindergartenName = localStorage.getItem("kindergartenName");
- }
- if (localStorage.getItem("batchCode2") == null) {
- this.batchCode = "请选择批次";
- } else {
- this.batchCode = localStorage.getItem("batchCode2");
- }
- this.$emit("kinbatlist", this.kindergartenId, this.batchCode);
+ // this.batchCode = localStorage.getItem("batchCode2");
+ // this.batchName = localStorage.getItem("batchName2");
+ // this.kindergartenId = localStorage.getItem("kindergartenId");
+ // if (localStorage.getItem("kindergartenName") == null) {
+ this.kindergartenName = "请选择幼儿园";
+ this.batchCode = "请选择批次";
+ // } else {
+ // this.kindergartenName = localStorage.getItem("kindergartenName");
+ // }
+ // if (localStorage.getItem("batchCode2") == null) {
+ // this.batchCode = "请选择批次";
+ // } else {
+ // this.batchCode = localStorage.getItem("batchCode2");
+ // }
+ // this.$emit("kinbatlist", this.kindergartenId, this.batchCode);
},
//幼儿园左侧点击
@@ -317,8 +253,9 @@ export default {
this.kindergartenName = row.kindergartenName;
this.kindergartenId = row.id;
this.kindergartenshow = false;
- localStorage.setItem("kindergartenName", this.kindergartenName);
- localStorage.setItem("kindergartenId", this.kindergartenId);
+ this.nameicons = true;
+ // localStorage.setItem("kindergartenName", this.kindergartenName);
+ // localStorage.setItem("kindergartenId", this.kindergartenId);
this.$emit("kinbatlist", this.kindergartenId, this.batchCode, 1);
},
@@ -327,9 +264,10 @@ export default {
this.batchCode = row.batchCode;
this.batchName = row.batchName;
this.batchCodeshow = false;
- localStorage.setItem("batchCode2", this.batchCode);
- localStorage.setItem("batchName2", this.batchName);
- if (this.kindergartenId != "") {
+ this.batchnameicons = true;
+ // localStorage.setItem("batchCode2", this.batchCode);
+ // localStorage.setItem("batchName2", this.batchName);
+ if (this.kindergartenId != "" || !this.kindergartenId) {
this.$emit("kinbatlist", this.kindergartenId, this.batchCode, 2);
}
},
@@ -340,7 +278,7 @@ export default {
},
//批次
testScore() {
- testScoreBatch(this.testqueryParams).then((res) => {
+ testScoreBatch(this.testqueryParams).then(res => {
this.testScorelist = res.rows;
this.total4 = res.total;
});
@@ -350,7 +288,7 @@ export default {
pageNum: 1,
pageSize: 10,
batchCode: "",
- batchName: "",
+ batchName: ""
};
this.testScore();
},
@@ -366,7 +304,7 @@ export default {
},
kinhandleQuery() {
//获取幼儿园list
- listKindergartenInfo(this.kqueryParams).then((response) => {
+ listKindergartenInfo(this.kqueryParams).then(response => {
this.kindergartenList = response.rows;
this.total1 = response.total;
});
@@ -380,36 +318,35 @@ export default {
kindergartenAddress: null,
kindergartenType: null,
phone: null,
- contacts: null,
+ contacts: null
};
this.kinhandleQuery();
},
getList() {
//用户权限
- getRoleInfo().then((res) => {
+ getRoleInfo().then(res => {
var user = res.data.roleKeys;
- if (user.includes("enchou")) {
- return;
- } else if (user.includes("teacher")) {
- if (res.data != 999999) {
- this.kindergartenId = res.data.kindergartenId;
- this.kindergartenName = res.data.kindergartenName;
- this.$emit("kinbatlist", this.kindergartenId, this.batchCode, 0);
- localStorage.setItem("kindergartenName", res.data.kindergartenName);
- localStorage.setItem("kindergartenId", res.data.kindergartenId);
- }
- return;
- } else if (user.includes("parent")) {
- return;
+ if (user.includes("teacher")) {
+ // if (res.code != 999999) {
+ res.data.kindergartenId
+ ? (this.kindergartenId = res.data.kindergartenId)
+ : "";
+ res.data.kindergartenName
+ ? (this.kindergartenName = res.data.kindergartenName)
+ : "";
+ this.$emit("kinbatlist", this.kindergartenId, this.batchCode, 0);
+ // res.data.kindergartenName? localStorage.setItem("kindergartenName", res.data.kindergartenName):'';
+ // res.data.kindergartenId? localStorage.setItem("kindergartenId", res.data.kindergartenId):'';
+ // }
}
});
- tKindergartenInfo(this.kindergartenType).then((res) => {
+ tKindergartenInfo(this.kindergartenType).then(res => {
this.type = res.data[0];
this.type2 = res.data[1];
});
//获取幼儿园list
- listKindergartenInfo(this.kqueryParams).then((response) => {
+ listKindergartenInfo(this.kqueryParams).then(response => {
this.kindergartenList = response.rows;
this.total1 = response.total;
});
@@ -418,12 +355,18 @@ export default {
reset() {
this.form = {};
this.resetForm("form");
- },
- },
+ }
+ }
};
diff --git a/src/views/assembly/parent.vue b/src/views/assembly/parent.vue
index 6f0bfaa..134f9dd 100644
--- a/src/views/assembly/parent.vue
+++ b/src/views/assembly/parent.vue
@@ -4,11 +4,9 @@
{{ parentName }}
- {{ parentName }}
@@ -51,7 +49,12 @@
-
+
+
+ {{scope.row.studentSex=='MALE'?'男':''}}
+ {{scope.row.studentSex=='FEMALE'?'女':''}}
+
+
-
+
{{ studentname }}
- {{ studentname }}
+ :style="studentname == '请选择学生'?'color: #c0c4cc;':''"
+ style="width: 230px; text-align: left; height: 32px; "
+ >{{ studentname }}
{{ batchName }}
- {{ batchName }}
+ style="width: 230px; text-align: left; height: 32px;"
+ :style="batchName == '请选择批次'?'color: #c0c4cc;':''"
+ >{{ batchName }}
@@ -45,30 +25,11 @@
append-to-body
:before-close="studentcancel"
>
-
+
{{ kindergartenName }}
- {{ kindergartenName }}
+ >{{ kindergartenName }}
-
{{ className }}
-
- {{ className }}
+ :style="className == '请选择班级'?'color: #c0c4cc;':''"
+ >{{ className }}
@@ -122,16 +64,8 @@
- 搜索
- 重置
+ 搜索
+ 重置
-
-
-
-
- {{ scope.row.studentSex == "MALE" ? "男" : "女" }}
-
+
+
+
+ {{ scope.row.studentSex == "MALE" ? "男" : "女" }}
-
+
-
+
- 搜索
- 重置
+ 搜索
+ 重置
@@ -251,41 +149,11 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
-
+
-
+
- 搜索
- 重置
+ 搜索
+ 重置
-
-
-
-
+
+
+
{{ scope.row.classType == dictValue1 ? "大班" : "" }}
{{ scope.row.classType == dictValue2 ? "中班" : "" }}
@@ -382,20 +216,8 @@
-
-
-
-
+
+
-
+
-
+
- 搜索
- 重置
+ 搜索
+ 重置
@@ -474,18 +280,8 @@
>
-
-
+
+
import {
listKindergartenInfo,
- tKindergartenInfo,
+ tKindergartenInfo
} from "@/api/system/kindergartenInfo";
import { listStudentInfo } from "@/api/system/studentInfo";
import { listClassinfo } from "@/api/system/classinfo";
@@ -544,7 +340,7 @@ export default {
cardNumber: null,
onceName: null,
homeAddress: null,
- kindergartenId: null,
+ kindergartenId: null
},
//班级查询
classqueryParams: {
@@ -552,7 +348,7 @@ export default {
pageSize: 10,
kindergartenId: "",
className: null,
- classType: null,
+ classType: null
},
//幼儿园查询参数
kqueryParams: {
@@ -563,7 +359,7 @@ export default {
kindergartenAddress: null,
kindergartenType: null,
phone: null,
- contacts: null,
+ contacts: null
},
//幼儿园list
kindergartenList: [],
@@ -593,8 +389,8 @@ export default {
//批次编号
testqueryParams: {
pageNum: 1,
- pageSize: 10,
- },
+ pageSize: 10
+ }
};
},
created() {
@@ -622,12 +418,12 @@ export default {
kindergartenAddress: null,
kindergartenType: null,
phone: null,
- contacts: null,
+ contacts: null
};
this.kinhandleQuery();
},
kinhandleQuery() {
- listKindergartenInfo(this.kqueryParams).then((response) => {
+ listKindergartenInfo(this.kqueryParams).then(response => {
this.kindergartenList = response.rows;
this.total1 = response.total;
});
@@ -652,7 +448,7 @@ export default {
cardNumber: null,
onceName: null,
homeAddress: null,
- kindergartenId: null,
+ kindergartenId: null
};
this.studentlist();
},
@@ -661,27 +457,27 @@ export default {
this.studentlist();
},
onshow() {
- this.batchCode = localStorage.getItem("batchCode");
- this.studentId = localStorage.getItem("studentId");
- this.batchName = localStorage.getItem("batchName");
- if (localStorage.getItem("batchCode") == null) {
- this.batchName = "请选择批次";
- } else {
- this.batchCode = localStorage.getItem("batchCode");
- this.$emit("itemlist", this.studentId, this.batchCode);
- }
- if (localStorage.getItem("studentname") == null) {
- this.studentname = "请选择学生";
- } else {
- this.studentname = localStorage.getItem("studentname");
- this.$emit("itemlist", this.studentId, this.batchCode);
- }
- if (
- localStorage.getItem("batchCode") != null &&
- localStorage.getItem("studentId") != null
- ) {
- this.$emit("itemlist", this.studentId, this.batchCode);
- }
+ // this.batchCode = localStorage.getItem("batchCode");
+ // this.studentId = localStorage.getItem("studentId");
+ // this.batchName = localStorage.getItem("batchName");
+ // if (localStorage.getItem("batchCode") == null) {
+ this.batchName = "请选择批次";
+ // } else {
+ // this.batchCode = localStorage.getItem("batchCode");
+ // this.$emit("itemlist", this.studentId, this.batchCode);
+ // }
+ // if (localStorage.getItem("studentname") == null) {
+ this.studentname = "请选择学生";
+ // } else {
+ // this.studentname = localStorage.getItem("studentname");
+ // this.$emit("itemlist", this.studentId, this.batchCode);
+ // }
+ // if (
+ // localStorage.getItem("batchCode") != null &&
+ // localStorage.getItem("studentId") != null
+ // ) {
+ // this.$emit("itemlist", this.studentId, this.batchCode);
+ // }
},
//点击批次
batchCodeshowclick() {
@@ -693,15 +489,15 @@ export default {
this.batchCode = row.batchCode;
this.batchName = row.batchName;
this.batchCodeshow = false;
- localStorage.setItem("batchCode", this.batchCode);
- localStorage.setItem("batchName", this.batchName);
- if (this.studentId != "") {
+ // localStorage.setItem("batchCode", this.batchCode);
+ // localStorage.setItem("batchName", this.batchName);
+ // if (this.studentId != "") {
this.$emit("itemlist", this.studentId, this.batchCode);
- }
+ // }
},
//批次
testScore() {
- testScoreBatch(this.testqueryParams).then((res) => {
+ testScoreBatch(this.testqueryParams).then(res => {
this.testScorelist = res.rows;
this.total4 = res.total;
});
@@ -711,7 +507,7 @@ export default {
pageNum: 1,
pageSize: 10,
batchCode: "",
- batchName: "",
+ batchName: ""
};
this.testScore();
},
@@ -730,15 +526,15 @@ export default {
this.studentname = row.studentName;
this.studentId = row.id;
this.studentshow = false;
- localStorage.setItem("studentId", this.studentId);
- localStorage.setItem("studentname", this.studentname);
- if (this.batchCode != "") {
+ // localStorage.setItem("studentId", this.studentId);
+ // localStorage.setItem("studentname", this.studentname);
+ // if (this.batchCode != "") {
this.$emit("itemlist", this.studentId, this.batchCode);
- }
+ // }
},
//获取学生
studentlist() {
- listStudentInfo(this.studentqueryParams).then((res) => {
+ listStudentInfo(this.studentqueryParams).then(res => {
this.studentInfoList = res.rows;
this.total3 = res.total;
});
@@ -758,6 +554,10 @@ export default {
//学生关闭
studentcancel() {
this.studentshow = false;
+ this.studentqueryParams = {
+ pageNum: 1,
+ pageSize: 10
+ };
this.kindergartenName = "请选择幼儿园";
this.kindergartenId = "";
this.className = "请选择班级";
@@ -779,10 +579,12 @@ export default {
this.classshow = false;
this.studentname = "请选择学生";
this.studentId = "";
+ this.handleQuery();
},
//幼儿园左侧点击
kindergartenNameclick(row) {
this.classqueryParams.kindergartenId = row.id;
+ this.studentqueryParams.kindergartenId = row.id;
this.className = "请选择班级";
this.classId = "";
this.studentname = "请选择学生";
@@ -793,7 +595,7 @@ export default {
},
//班级类型
class() {
- tKindergartenInfo(this.ClassType).then((res) => {
+ tKindergartenInfo(this.ClassType).then(res => {
this.dictValue1 = res.data[0].dictValue;
this.dictValue2 = res.data[1].dictValue;
this.dictValue3 = res.data[2].dictValue;
@@ -802,7 +604,7 @@ export default {
},
//班级list
classinfo() {
- listClassinfo(this.classqueryParams).then((response) => {
+ listClassinfo(this.classqueryParams).then(response => {
this.classinfoList = response.rows;
this.total2 = response.total;
});
@@ -810,36 +612,41 @@ export default {
getList() {
//用户权限
- getRoleInfo().then((res) => {
+ getRoleInfo().then(res => {
var user = res.data.roleKeys;
if (user.includes("enchou")) {
- this.classqueryParams.kindergartenId = res.data.kindergartenId;
- this.studentqueryParams.kindergartenId = res.data.kindergartenId;
+ res.data.kindergartenId
+ ? (this.classqueryParams.kindergartenId = res.data.kindergartenId)
+ : "";
+ res.data.kindergartenId
+ ? (this.studentqueryParams.kindergartenId = res.data.kindergartenId)
+ : "";
return;
- } else if (user.includes("teacher")) {
- this.kindergartenId = res.data.kindergartenId;
- this.classqueryParams.kindergartenId = res.data.kindergartenId;
- this.kindergartenName = String(res.data.kindergartenName);
- return;
- } else if (user.includes("parent")) {
+ }
+ if (user.includes("teacher")) {
+ res.data.kindergartenId
+ ? (this.kindergartenId = res.data.kindergartenId)
+ : "";
+ res.data.kindergartenId
+ ? (this.classqueryParams.kindergartenId = res.data.kindergartenId)
+ : "";
+ res.data.kindergartenName
+ ? (this.kindergartenName = String(res.data.kindergartenName))
+ : "";
return;
}
});
//获取幼儿园list
- listKindergartenInfo(this.kqueryParams).then((response) => {
+ listKindergartenInfo(this.kqueryParams).then(response => {
this.kindergartenList = response.rows;
this.total1 = response.total;
});
},
- //批次关闭
- batchCodecancel() {
- this.batchCodeshow = false;
- },
// 表单重置
reset() {
this.form = {};
this.resetForm("form");
- },
- },
+ }
+ }
};