diff --git a/.env.development b/.env.development index ad3a0a8..c3c549b 100644 --- a/.env.development +++ b/.env.development @@ -5,7 +5,7 @@ VUE_APP_TITLE = 智慧幼儿体质评估与促进系统 ENV = 'development' # 智慧幼儿体质评估与促进系统/开发环境 -VUE_APP_BASE_API = 'http://192.168.16.64:8080' +VUE_APP_BASE_API = 'http://192.168.16.81:8099' #'/dev-api' # 路由懒加载 diff --git a/public/student.xlsx b/public/student.xlsx new file mode 100644 index 0000000..6fa8fb2 Binary files /dev/null and b/public/student.xlsx differ diff --git a/src/api/system/kindergartenCheckReport.js b/src/api/system/kindergartenCheckReport.js new file mode 100644 index 0000000..3b6e778 --- /dev/null +++ b/src/api/system/kindergartenCheckReport.js @@ -0,0 +1,36 @@ +import request from '@/utils/request' + +// 查询幼儿园检测报告列表 +export function listKindergartenCheckReport(query) { + return request({ + url: '/system/kindergartenCheckReport/list', + method: 'get', + params: query + }) +} + +// 查询幼儿园检测报告详细 +export function getKindergartenCheckReport(id) { + return request({ + url: '/system/kindergartenCheckReport/' + id, + method: 'get' + }) +} + +// 修改幼儿园检测报告 +export function updateKindergartenCheckReport(data) { + return request({ + url: '/system/kindergartenCheckReport/edit', + method: 'POST', + data: data + }) +} + +// 幼儿园报告下载/预览 +export function report(id) { + return request({ + url: `/system/kindergartenCheckReport/download/report?id=${id}`, + method: 'POST', + responseType: 'blob' + }) +} \ No newline at end of file diff --git a/src/api/system/personalCheckReport.js b/src/api/system/personalCheckReport.js new file mode 100644 index 0000000..18bed38 --- /dev/null +++ b/src/api/system/personalCheckReport.js @@ -0,0 +1,54 @@ +import request from '@/utils/request' + +// 查询个人体质检测报告列表 +export function listPersonalCheckReport(query) { + return request({ + url: '/system/personalCheckReport/list', + method: 'get', + params: query + }) +} + +// 查询个人体质检测报告详细 +export function getPersonalCheckReport(id) { + return request({ + url: '/system/personalCheckReport/' + id, + method: 'get' + }) +} + +// 新增个人体质检测报告 +export function addPersonalCheckReport(data) { + return request({ + url: '/system/personalCheckReport', + method: 'post', + data: data + }) +} + +// 修改个人体质检测报告 +export function updatePersonalCheckReport(data) { + return request({ + url: '/system/personalCheckReport', + method: 'put', + data: data + }) +} + +// 删除个人体质检测报告 +export function delPersonalCheckReport(id) { + return request({ + url: '/system/personalCheckReport/' + id, + method: 'delete' + }) +} + + +// 幼儿报告下载/预览 +export function report(id) { + return request({ + url: `/system/personalCheckReport/download/report?id=${id}`, + method: 'POST', + responseType: 'blob' + }) +} \ No newline at end of file diff --git a/src/api/system/survey.js b/src/api/system/survey.js index 26cca87..bea9f6f 100644 --- a/src/api/system/survey.js +++ b/src/api/system/survey.js @@ -9,13 +9,20 @@ export function StudentList(query) { }) } +// // 查询 +// export function ClassList(query) { +// return request({ +// url: '/system/testAll/ClassList', +// method: 'get', +// params: query +// }) +// } - -// 查询 -export function ClassList(query) { - return request({ - url: '/system/testAll/ClassList', - method: 'get', - params: query - }) -} \ No newline at end of file +// // 查询 +// export function selectAllClassById(query) { +// return request({ +// url: '/system/testAll/selectAllClassById', +// method: 'get', +// params: query +// }) +// } \ No newline at end of file diff --git a/src/api/system/testItemScore.js b/src/api/system/testItemScore.js index d932d80..d540986 100644 --- a/src/api/system/testItemScore.js +++ b/src/api/system/testItemScore.js @@ -96,4 +96,13 @@ export function getAllTestItemScoreInfo(query) { method: 'get', params: query, }) +} + + +// 获取个人成绩得分 +export function getStudentFraction(studentId, itemId, itemScore) { + return request({ + url: `system/testItemScore/getStudentFraction?studentId=${studentId}&itemId=${itemId}&itemScore=${itemScore}`, + method: 'get' + }) } \ No newline at end of file diff --git a/src/views/assembly/kindergarten.vue b/src/views/assembly/kindergarten.vue index e602334..c1b2f45 100644 --- a/src/views/assembly/kindergarten.vue +++ b/src/views/assembly/kindergarten.vue @@ -11,12 +11,20 @@ {{ kindergartenName }} {{ kindergartenName }} @@ -25,13 +33,13 @@ {{ batchName }} {{ batchName }} @@ -341,8 +349,8 @@ export default { this.testqueryParams = { pageNum: 1, pageSize: 10, - batchCode:'', - batchName:'', + batchCode: "", + batchName: "", }; this.testScore(); }, diff --git a/src/views/assembly/student.vue b/src/views/assembly/student.vue index ff668d6..7628cb1 100644 --- a/src/views/assembly/student.vue +++ b/src/views/assembly/student.vue @@ -7,30 +7,30 @@ v-show="showSearch" label-width="90px" > - + {{ studentname }} {{ studentname }} - + {{ batchName }} {{ batchName }} @@ -635,18 +635,17 @@ export default { this.batchCode = localStorage.getItem("batchCode"); this.studentId = localStorage.getItem("studentId"); this.batchName = localStorage.getItem("batchName"); - console.log(localStorage.getItem("studentname")); - 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 && @@ -790,7 +789,6 @@ export default { getList() { //用户权限 getRoleInfo().then((res) => { - console.log(res); var user = res.data.roleKeys; if (user.includes("enchou")) { this.classqueryParams.kindergartenId = res.data.kindergartenId; diff --git a/src/views/system/action/index.vue b/src/views/system/action/index.vue index bb17384..cc1bbb0 100644 --- a/src/views/system/action/index.vue +++ b/src/views/system/action/index.vue @@ -29,7 +29,7 @@ > -
+
{{ analysislist.schoolRank }}名 + >名 区域排名:{{ + analysislist.areaRank + }}区域成绩占比:{{ + analysislist.areaProportion + }}
+
体测项目分值与全校、全市对比
diff --git a/src/views/system/kindergartenCheckReport/index.vue b/src/views/system/kindergartenCheckReport/index.vue new file mode 100644 index 0000000..557a7d7 --- /dev/null +++ b/src/views/system/kindergartenCheckReport/index.vue @@ -0,0 +1,355 @@ + + + + diff --git a/src/views/system/personalCheckReport/index.vue b/src/views/system/personalCheckReport/index.vue new file mode 100644 index 0000000..4893d93 --- /dev/null +++ b/src/views/system/personalCheckReport/index.vue @@ -0,0 +1,372 @@ + + + + \ No newline at end of file diff --git a/src/views/system/physique/index.vue b/src/views/system/physique/index.vue index 67e5158..60346c0 100644 --- a/src/views/system/physique/index.vue +++ b/src/views/system/physique/index.vue @@ -330,7 +330,6 @@ export default { }); el.list = list1; }); - let seriesData = []; let yindicator = []; this.categoryScoreList.forEach((el) => { @@ -371,9 +370,7 @@ export default { }); } }); - var myChart = echarts.init(document.getElementById("chart")); - let option = { //配置维度的最大值 color: "#D9A508", diff --git a/src/views/system/studentInfo/index.vue b/src/views/system/studentInfo/index.vue index 62cb017..5d9e32f 100644 --- a/src/views/system/studentInfo/index.vue +++ b/src/views/system/studentInfo/index.vue @@ -6,7 +6,7 @@ size="small" :inline="true" v-show="showSearch" - label-width="68px" + label-width="90px" > - 删除 + + 导入 + - + @@ -532,7 +539,6 @@ @pagination="kininfolist" /> - 选择完成 - - + + + + + {{ upload.data.kindergartenName }} + {{ kindergartenName }} + + + {{ upload.data.className }} + {{ classinfoName }} + + + + +
+ 将文件拖到此处,或点击上传 +
+
+ 仅允许导入xls、xlsx格式文件。 + 下载模板 +
+
+
+
+ + +
@@ -896,6 +981,7 @@ import { tKindergartenInfo, listKindergartenInfo, } from "@/api/system/kindergartenInfo"; +import { getToken } from "@/utils/auth"; import { listClassinfo } from "@/api/system/classinfo"; @@ -929,18 +1015,28 @@ export default { //验证身份证 var isCardId = (rule, value, callback) => { if (!value) { - return new Error("请输入身份证号)"); + callback(); } else { - const reg = - /^\d{6}(18|19|20)?\d{2}(0[1-9]|1[0-2])(([0-2][1-9])|10|20|30|31)\d{3}(\d|X|x)$/; - const card = reg.test(value); - if (!card) { - callback(new Error("身份证号格式有误!")); - } else { - callback(); + if (!this.checkSpecialKey(value)) { + callback(new Error("不能含有特殊字符!!")); } } }; + + // var isCardId = (rule, value, callback) => { + // if (!value) { + // callback(); + // } else { + // const reg = + // /^\d{6}(18|19|20)?\d{2}(0[1-9]|1[0-2])(([0-2][1-9])|10|20|30|31)\d{3}(\d|X|x)$/; + // const card = reg.test(value); + // if (!card) { + // callback(new Error("身份证号格式有误!")); + // } else { + // callback(); + // } + // } + // }; return { pickerOptions: { disabledDate(time) { @@ -952,9 +1048,26 @@ export default { return time.getTime() > Date.now(); }, }, - Data: "", - + // 用户导入参数 + upload: { + // 是否显示弹出层(用户导入) + open: false, + // 弹出层标题(用户导入) + title: "", + // 是否禁用上传 + isUploading: false, + // 设置上传的请求头部 + headers: { Authorization: "Bearer " + getToken() }, + // 上传的地址 + url: process.env.VUE_APP_BASE_API + "/system/studentInfo/importData", + data: { + kindergartenId: null, + classId: null, + kindergartenName: "请选择所属幼儿园", + className: "请选择所属班级", + }, + }, //查看家长 parentStudentInfoList: [], //民族 @@ -1076,6 +1189,12 @@ export default { form2: {}, // 表单校验 rules: { + "upload.data.kindergartenId": [ + { required: true, message: "所属幼儿园不能为空", trigger: "blur" }, + ], + "upload.data.classId": [ + { required: true, message: "所属班级不能为空", trigger: "blur" }, + ], kindergartenId: [ { required: true, message: "所属幼儿园不能为空", trigger: "blur" }, ], @@ -1101,7 +1220,7 @@ export default { { required: true, message: "请选择日期", trigger: "change" }, ], cardNumber: [ - { required: true, message: "请输入证件号", trigger: "blur" }, + { message: "请输入证件号", trigger: "blur" }, { validator: isCardId, trigger: "blur" }, ], parentIdList: [ @@ -1143,6 +1262,8 @@ export default { this.form.kindergartenId = row.id; this.kindergartenid = row.id; this.kindergartenName = row.kindergartenName; + this.upload.data.kindergartenName = row.kindergartenName; + this.upload.data.kindergartenId = row.id; this.classinfoList2.kindergartenId = row.id; this.kininnerVisible = false; this.classinfoName = "请选择所属班级"; @@ -1549,6 +1670,8 @@ export default { classinfoclick(item) { console.log(item); this.classinfoName = item.className; + this.upload.data.className = item.className; + this.upload.data.classId = item.id; this.classinfoId = item.id; this.form.classId = item.id; this.form2.classId = item.id; @@ -1764,6 +1887,78 @@ export default { `studentInfo_${new Date().getTime()}.xlsx` ); }, + checkSpecialKey(str) { + let specialKey = + "[`~!#$^&*()=|{}':;'\\[\\].<>/?~!#¥……&*()——|{}【】‘;:”“'。,、?]‘'"; + for (let i = 0; i < str.length; i++) { + if (specialKey.indexOf(str.substr(i, 1)) != -1) { + return false; + } + } + return true; + }, + /** 导入按钮操作 */ + handledata() { + this.upload.title = "用户导入"; + this.upload.open = true; + }, + // 提交上传文件 + submitFileForm() { + if (this.upload.data.kindergartenId == null) { + this.$message.error("所属幼儿园不能为空"); + } else if (this.upload.data.classId == null) { + this.$message.error("所属班级不能为空"); + } else { + this.$refs.upload.submit(); + } + }, + // 文件上传成功处理 + handleFileSuccess(response, file, fileList) { + this.upload.open = false; + this.upload.isUploading = false; + this.upload.data = { + kindergartenId: null, + classId: null, + kindergartenName: "请选择所属幼儿园", + className: "请选择所属班级", + }; + this.form.kindergartenId = null; + this.classinfoId = null; + this.$refs.upload.clearFiles(); + this.$alert( + "
" + + response.msg + + "
", + "导入结果", + { dangerouslyUseHTMLString: true } + ); + this.getList(); + }, + // 文件上传中处理 + handleFileUploadProgress(event, file, fileList) { + this.upload.isUploading = true; + }, + uploadopen() { + this.upload.open = false; + this.form.kindergartenId = null; + this.classinfoId = null; + this.upload.data = { + kindergartenId: null, + classId: null, + kindergartenName: "请选择所属幼儿园", + className: "请选择所属班级", + }; + }, + /** 下载模板操作 */ + downloadExcel() { + let a = document.createElement("a"); + a.href = "/student.xlsx"; + a.download = "学生信息模板表.xlsx"; + a.style.display = "none"; + document.body.appendChild(a); + a.click(); + a.remove(); + }, }, }; diff --git a/src/views/system/survey/index.vue b/src/views/system/survey/index.vue index ee4b47d..352c141 100644 --- a/src/views/system/survey/index.vue +++ b/src/views/system/survey/index.vue @@ -38,30 +38,30 @@
大班
中班
小班
-
- 全国优秀幼儿榜(TOP10) +
+ 全园优秀幼儿榜(TOP10)
+ +
+ 班级优秀幼儿榜 +
+ + + + + + + + + +
@@ -116,7 +159,11 @@