diff --git a/package.json b/package.json index 332bb0e..52dd699 100644 --- a/package.json +++ b/package.json @@ -62,6 +62,7 @@ "vuex": "3.6.0" }, "devDependencies": { + "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@vue/cli-plugin-babel": "4.4.6", "@vue/cli-plugin-eslint": "4.4.6", "@vue/cli-service": "4.4.6", diff --git a/src/api/system/KindergartenPhysicalTest.js b/src/api/system/KindergartenPhysicalTest.js new file mode 100644 index 0000000..fb203e6 --- /dev/null +++ b/src/api/system/KindergartenPhysicalTest.js @@ -0,0 +1,10 @@ +import request from '@/utils/request' + +// 查询 +export function analysis(query) { + return request({ + url: '/kindergarten/side/analysis', + method: 'get', + params: query + }) +} diff --git a/src/api/system/action.js b/src/api/system/action.js new file mode 100644 index 0000000..397b985 --- /dev/null +++ b/src/api/system/action.js @@ -0,0 +1,10 @@ +import request from '@/utils/request' + +// 查询 +export function listAction(query) { + return request({ + url: '/system/testActionDevelopment/listAction', + method: 'get', + params: query + }) +} diff --git a/src/api/system/classconstitution.js b/src/api/system/classconstitution.js new file mode 100644 index 0000000..140a1b2 --- /dev/null +++ b/src/api/system/classconstitution.js @@ -0,0 +1,10 @@ +import request from '@/utils/request' + +// 查询 +export function ClassList(query) { + return request({ + url: '/system/testItemAvgScore/ClassList', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/src/api/system/constitution.js b/src/api/system/constitution.js new file mode 100644 index 0000000..8a9f365 --- /dev/null +++ b/src/api/system/constitution.js @@ -0,0 +1,10 @@ +import request from '@/utils/request' + +// 查询 +export function analysis(query) { + return request({ + url: '/children/ranking/analysis', + method: 'get', + params: query + }) +} diff --git a/src/api/system/development.js b/src/api/system/development.js new file mode 100644 index 0000000..a04293c --- /dev/null +++ b/src/api/system/development.js @@ -0,0 +1,10 @@ +import request from '@/utils/request' + +// 查询 +export function analysis(query) { + return request({ + url: '/physical/action/analysis', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/src/api/system/heightAndWeight.js b/src/api/system/heightAndWeight.js new file mode 100644 index 0000000..c7b847b --- /dev/null +++ b/src/api/system/heightAndWeight.js @@ -0,0 +1,10 @@ +import request from '@/utils/request' + +// 查询 +export function analysis(query) { + return request({ + url: '/average/heightAndWeight/analysis', + method: 'get', + params: query + }) +} diff --git a/src/api/system/physique.js b/src/api/system/physique.js new file mode 100644 index 0000000..19f78e4 --- /dev/null +++ b/src/api/system/physique.js @@ -0,0 +1,10 @@ +import request from '@/utils/request' + +// 查询 +export function analysis(query) { + return request({ + url: '/kindergarten/physique/analysis', + method: 'get', + params: query + }) +} diff --git a/src/api/system/quality.js b/src/api/system/quality.js index b8250e6..44ac476 100644 --- a/src/api/system/quality.js +++ b/src/api/system/quality.js @@ -3,14 +3,14 @@ import request from '@/utils/request' //查询用户权限 export function getRoleInfo() { return request({ - url: 'common/getRoleInfo', + url: '/common/getRoleInfo', method: 'get' }) } // 查询身体素质 export function testBodyScoreInfo(query) { return request({ - url: 'system/testBodyScoreInfo/listBody', + url: '/system/testBodyScoreInfo/listBody', method: 'get', params: query }) diff --git a/src/api/system/survey.js b/src/api/system/survey.js new file mode 100644 index 0000000..26cca87 --- /dev/null +++ b/src/api/system/survey.js @@ -0,0 +1,21 @@ +import request from '@/utils/request' + +// 查询 +export function StudentList(query) { + return request({ + url: '/system/testAll/StudentList', + method: 'get', + params: query + }) +} + + + +// 查询 +export function ClassList(query) { + return request({ + url: '/system/testAll/ClassList', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/src/api/system/testItemCityScore.js b/src/api/system/testItemCityScore.js index b98d2ee..a139272 100644 --- a/src/api/system/testItemCityScore.js +++ b/src/api/system/testItemCityScore.js @@ -9,6 +9,15 @@ export function listTestItemCityScore(query) { }) } +// 回显 +export function getItemCityScoreInfo(query) { + return request({ + url: '/system/testItemCityScore/getItemCityScoreInfo', + method: 'get', + params: query + }) +} + // 查询全市平均成绩详细 export function getTestItemCityScore(id) { return request({ diff --git a/src/api/system/testItemCountryScore.js b/src/api/system/testItemCountryScore.js index aefbc16..849120c 100644 --- a/src/api/system/testItemCountryScore.js +++ b/src/api/system/testItemCountryScore.js @@ -11,6 +11,15 @@ export function listTestItemCountryScore(query) { +// 回显 +export function getItemCountryScoreInfo(query) { + return request({ + url: '/system/testItemCountryScore/getItemCountryScoreInfo', + method: 'get', + params: query + }) +} + // 查询项目列表 export function testItemslist(query) { return request({ @@ -51,4 +60,4 @@ export function delTestItemCountryScore(id) { url: '/system/testItemCountryScore/' + id, method: 'delete' }) -} +} \ No newline at end of file diff --git a/src/api/system/testItemScore.js b/src/api/system/testItemScore.js index 385a22e..39e1041 100644 --- a/src/api/system/testItemScore.js +++ b/src/api/system/testItemScore.js @@ -45,10 +45,12 @@ export function testScoreBatch(query) { } // 查询个人成绩录入管理详细 -export function getTestItemScore(id) { +export function getTestItemScore(query) { return request({ - url: '/system/testItemScore/' + id, - method: 'get' + url: '/system/testItemScore/getInfo', + method: 'get', + params: query + }) } @@ -71,9 +73,17 @@ export function updateTestItemScore(data) { } // 删除个人成绩录入管理 -export function delTestItemScore(id) { +export function delTestItemScore(studentId, batchCode) { return request({ - url: '/system/testItemScore/' + id, - method: 'delete' + url: '/system/testItemScore/deleteItemScore?studentId=' + studentId + '&batchCode=' + batchCode, + method: 'post', }) } +// 反显 +export function getAllTestItemScoreInfo(query) { + return request({ + url: '/system/testItemScore/getAllTestItemScoreInfo', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/src/api/system/testScoreBatch.js b/src/api/system/testScoreBatch.js index 0181579..47905e2 100644 --- a/src/api/system/testScoreBatch.js +++ b/src/api/system/testScoreBatch.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 查询测试成绩批次列表 +// 查询测试批次列表 export function listTestScoreBatch(query) { return request({ url: '/system/testScoreBatch/list', @@ -9,6 +9,15 @@ export function listTestScoreBatch(query) { }) } +// 查询绑定的测试项目名称 +export function temBatchInfoList(query) { + return request({ + url: '/system/testScoreBatch/temBatchInfoList', + method: 'get', + params: query + }) +} + // 查询测试成绩批次详细 export function getTestScoreBatch(id) { return request({ @@ -41,4 +50,4 @@ export function delTestScoreBatch(id) { url: '/system/testScoreBatch/' + id, method: 'delete' }) -} +} \ No newline at end of file diff --git a/src/components/Editor/index.vue b/src/components/Editor/index.vue index 6bb5a18..cc3f32e 100644 --- a/src/components/Editor/index.vue +++ b/src/components/Editor/index.vue @@ -82,7 +82,7 @@ export default { [{ color: [] }, { background: [] }], // 字体颜色、字体背景颜色 [{ align: [] }], // 对齐方式 ["clean"], // 清除文本格式 - ["link", "image", "video"] // 链接、图片、视频 + // ["link", "image", "video"] // 链接、图片、视频 ], }, placeholder: "请输入内容", diff --git a/src/layout/components/Sidebar/Logo.vue b/src/layout/components/Sidebar/Logo.vue index 8be99f2..4e2edaa 100644 --- a/src/layout/components/Sidebar/Logo.vue +++ b/src/layout/components/Sidebar/Logo.vue @@ -35,7 +35,7 @@ export default { }, data() { return { - title: '幼儿园体质检测管理系统', + title: '智慧幼儿体质评估与促进系统', logo: logoImg } } @@ -66,10 +66,11 @@ export default { width: 100%; & .sidebar-logo { - width: 32px; + width: 18px; height: 32px; vertical-align: middle; - margin-right: 12px; + + } & .sidebar-title { @@ -81,6 +82,7 @@ export default { font-size: 14px; font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif; vertical-align: middle; + } } diff --git a/src/views/system/KindergartenPhysicalTest/index.vue b/src/views/system/KindergartenPhysicalTest/index.vue new file mode 100644 index 0000000..7f21b13 --- /dev/null +++ b/src/views/system/KindergartenPhysicalTest/index.vue @@ -0,0 +1,648 @@ + + + diff --git a/src/views/system/action/index.vue b/src/views/system/action/index.vue new file mode 100644 index 0000000..4422a0d --- /dev/null +++ b/src/views/system/action/index.vue @@ -0,0 +1,821 @@ + + + diff --git a/src/views/system/area/index.vue b/src/views/system/area/index.vue index ac0f28c..05de262 100644 --- a/src/views/system/area/index.vue +++ b/src/views/system/area/index.vue @@ -119,7 +119,7 @@ icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:area:remove']" - v-if="scope.row.id != 1" + v-if="scope.row.parentId != 0" >删除 @@ -129,7 +129,11 @@ - + { if (valid) { if (this.form.id != null) { diff --git a/src/views/system/classconstitution/index.vue b/src/views/system/classconstitution/index.vue new file mode 100644 index 0000000..605a681 --- /dev/null +++ b/src/views/system/classconstitution/index.vue @@ -0,0 +1,810 @@ + + + diff --git a/src/views/system/classinfo/index.vue b/src/views/system/classinfo/index.vue index 21cd4c8..7e7f822 100644 --- a/src/views/system/classinfo/index.vue +++ b/src/views/system/classinfo/index.vue @@ -33,6 +33,7 @@ @keyup.enter.native="handleQuery" /> + + + + + + + + + + @@ -359,15 +383,25 @@ export default { data() { // 验证手机号的规则 var checkMobile = (rule, value, cb) => { + console.log(value); + var str = String(value); + console.log(str); // 验证手机号的正则表达式 const regMobile = - /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/; + /^(?:(?:\+|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 reg = /^(0[0-9]{2,3}\-)([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$/; + const isTel = reg.test(str); - if (regMobile.test(value)) { - return cb(); + if (str.length == 11) { + if (regMobile.test(str)) { + return cb(); + } + } else if (11 < str.length <= 13) { + if (isTel) { + return cb(); + } } - - cb(new Error("请输入合法的手机号")); + cb(new Error("请输入正确的联系电话")); }; return { @@ -406,6 +440,7 @@ export default { kindergartenId: null, className: null, classType: null, + entranceDateStr: null, }, queryParams2: { pageNum: 1, @@ -414,26 +449,31 @@ export default { className: null, classType: null, }, + time: "", // 表单参数 form: {}, // 表单校验 rules: { - kindergartenId: [{ required: true, message: "请选择所属幼儿园" }], - className: [ - { required: true, message: "请输入班级名称", trigger: "blur" }, - ], - classType: [{ required: true, message: "请选择幼儿园类型" }], - classTeacher: [ - { required: true, message: "请输入班主任姓名", trigger: "blur" }, - ], phone: [ { required: true, validator: checkMobile, trigger: "blur", - message: "请输入正确的手机号", + message: "", }, ], + kindergartenId: [{ required: true, message: "请选择所属幼儿园" }], + className: [ + { required: true, message: "请输入班级名称", trigger: "blur" }, + ], + classType: [{ required: true, message: "请选择幼儿园类型" }], + + classTeacher: [ + { required: true, message: "请输入班主任姓名", trigger: "blur" }, + ], + entranceDateStr: [ + { required: true, message: "请选择日期", trigger: "change" }, + ], }, }; }, @@ -468,6 +508,7 @@ export default { this.total2 = response.total; }); listClassinfo(this.queryParams).then((response) => { + console.log(response); this.classinfoList = response.rows; this.total = response.total; this.loading = false; @@ -493,6 +534,7 @@ export default { className: null, classType: null, classTeacher: null, + entranceDateStr: "", phone: undefined, kindergartenName: null, }; @@ -554,6 +596,7 @@ export default { getClassinfo(id).then((response) => { response.data.phone = Number(response.data.phone); this.form = response.data; + console.log(this.form); this.kindergartenName = this.form.kindergartenName; this.open = true; this.title = "修改班级信息"; diff --git a/src/views/system/comprehensive/index.vue b/src/views/system/comprehensive/index.vue index dbf3dff..f564746 100644 --- a/src/views/system/comprehensive/index.vue +++ b/src/views/system/comprehensive/index.vue @@ -7,7 +7,7 @@ v-show="showSearch" label-width="90px" > - + - + - + @@ -163,37 +156,19 @@ - - - - - - - @@ -246,12 +221,19 @@ export default { // 验证手机号的正则表达式 const regMobile = /^(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)) { - return cb(); + 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 { // 遮罩层 @@ -303,7 +285,7 @@ export default { required: true, validator: checkMobile, trigger: "blur", - message: "请输入正确的手机号", + message: "", }, ], code: [ @@ -380,11 +362,13 @@ export default { getList() { listArea(this.queryParams).then((response) => { this.areaList = this.handleTree(response.data); + console.log(this.areaList); }); this.loading = true; list(this.queryParams).then((response) => { this.List = this.handleTree(response.data); this.List2 = this.List; + console.log(this.List); this.loading = false; }); }, @@ -470,27 +454,26 @@ export default { /** 提交按钮 */ submitForm() { - if (this.form.phone == "" || this.form.phone.toString().length == 11) { - this.$refs["form"].validate((valid) => { - if (valid) { - if (this.form.id != null) { - edit(this.form).then((response) => { - this.$modal.msgSuccess("修改成功"); - this.open = false; - this.getList(); - }); - } else { - add(this.form).then((response) => { - this.$modal.msgSuccess("新增成功"); - this.open = false; - this.getList(); - }); - } - } - }); - } else { - this.$message.error("请输入正确的手机号码"); + if (this.List.length == 0) { + this.form.parentId = 0; } + this.$refs["form"].validate((valid) => { + if (valid) { + if (this.form.id != null) { + edit(this.form).then((response) => { + this.$modal.msgSuccess("修改成功"); + this.open = false; + this.getList(); + }); + } else { + add(this.form).then((response) => { + this.$modal.msgSuccess("新增成功"); + this.open = false; + this.getList(); + }); + } + } + }); }, /** 删除按钮操作 */ handleDelete(row) { diff --git a/src/views/system/itemCategory/index.vue b/src/views/system/itemCategory/index.vue index acbedcb..5ab9e6d 100644 --- a/src/views/system/itemCategory/index.vue +++ b/src/views/system/itemCategory/index.vue @@ -8,14 +8,6 @@ v-show="showSearch" label-width="68px" > - - 新增 - - + - +
{ - let min = value.map((e) => { - return e.levelMinScore; - }).toString(); - let max = value.map((e) => { - return e.levelMaxScore; - }).toString(); + let min = value + .map((e) => { + return e.levelMinScore; + }) + .toString(); + let max = value + .map((e) => { + return e.levelMaxScore; + }) + .toString(); console.log(min, max); - if (Number(max) < Number(min)) { - console.log(min,max); - callback(new Error("最高分必须大于最低分,请重新填写!")); - - } - + if (Number(max) < Number(min)) { + if(max && min && max < min){ + callback(new Error("最高分必须大于最低分,请重新填写!")); + }else{ + console.log(min, max); + } + + + } if ( value.map((e) => { return e.levelName; diff --git a/src/views/system/kindergartenInfo/index.vue b/src/views/system/kindergartenInfo/index.vue index 2268470..cee1858 100644 --- a/src/views/system/kindergartenInfo/index.vue +++ b/src/views/system/kindergartenInfo/index.vue @@ -253,7 +253,7 @@ @@ -288,12 +288,19 @@ export default { // 验证手机号的正则表达式 const regMobile = /^(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)) { - return cb(); + 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 { // 遮罩层 @@ -363,7 +370,7 @@ export default { required: true, validator: checkMobile, trigger: "blur", - message: "请输入正确的手机号", + message: "", }, ], principalId: [ diff --git a/src/views/system/motionInfo/index.vue b/src/views/system/motionInfo/index.vue index 0c9a85a..418ca2d 100644 --- a/src/views/system/motionInfo/index.vue +++ b/src/views/system/motionInfo/index.vue @@ -16,7 +16,7 @@ @keyup.enter.native="handleQuery" /> - + @@ -167,8 +168,8 @@ label-width="230px" > - 普通 - 会员 + 普通 + 会员 @@ -211,13 +212,15 @@ export default { title: "", // 是否显示弹出层 open: false, + applyCrowd1: 0, + applyCrowd2: 1, options: [ { - applyCrowd: "0", + applyCrowd: 0, label: "普通", }, { - applyCrowd: "1", + applyCrowd: 1, label: "会员", }, ], @@ -242,7 +245,7 @@ export default { methods: { /** 查询运动处方字典列表 */ getList() { - console.log(this.queryParams) + console.log(this.queryParams); this.loading = true; listMotionInfo(this.queryParams).then((response) => { this.motionInfoList = response.rows; diff --git a/src/views/system/parentInfo/index.vue b/src/views/system/parentInfo/index.vue index d5b5ba3..7d005b1 100644 --- a/src/views/system/parentInfo/index.vue +++ b/src/views/system/parentInfo/index.vue @@ -235,6 +235,14 @@ export default { created() { this.getList(); }, + watch: { + $route(to, from) { + console.log(to.path, from.path); + if (to.path == "/baseInfo/parentInfo") { + this.getList(); + } + }, + }, methods: { /** 查询家长信息列表 */ getList() { diff --git a/src/views/system/physique/index.vue b/src/views/system/physique/index.vue new file mode 100644 index 0000000..f6b29ec --- /dev/null +++ b/src/views/system/physique/index.vue @@ -0,0 +1,664 @@ + + + diff --git a/src/views/system/quality/index.vue b/src/views/system/quality/index.vue index 4e24053..94d9f21 100644 --- a/src/views/system/quality/index.vue +++ b/src/views/system/quality/index.vue @@ -7,7 +7,7 @@ v-show="showSearch" label-width="90px" > - + - + - + - + }} + {{ item.measureUnit == "kg" ? "千克" : "" }} + {{ item.measureUnit == "g" ? "克" : "" }}({{ item.measureUnit }}) + - 评价 + 评价
- {{ - ((((item.maxScore - item.minScore) / item.minScore) * - item.minScore) / - 5) * - 4 + - item.minScore - }} + {{ ((item.maxScore - item.minScore) / 5) * 4 + item.minScore }}
- {{ - ((((item.maxScore - item.minScore) / item.minScore) * - item.minScore) / - 5) * - 3 + - item.minScore - }} + {{ ((item.maxScore - item.minScore) / 5) * 3 + item.minScore }}
- {{ - ((((item.maxScore - item.minScore) / item.minScore) * - item.minScore) / - 5) * - 2 + - item.minScore - }} + {{ ((item.maxScore - item.minScore) / 5) * 2 + item.minScore }}
- {{ - ((((item.maxScore - item.minScore) / item.minScore) * - item.minScore) / - 5) * - 1 + - item.minScore - }} + {{ ((item.maxScore - item.minScore) / 5) * 1 + item.minScore }}
{{ item.minScore == null ? 0 : item.minScore }}
@@ -561,6 +571,8 @@ top: 1px; right: -1%; line-height: 20px; + overflow: hidden; + width: 32px; " > {{ item.maxScore == null ? 100 : item.maxScore }} @@ -660,6 +672,8 @@ export default { return { itemshow: false, itemshow2: false, + showyey: true, + showbj: true, total1: 0, total2: 0, total3: 0, @@ -744,6 +758,8 @@ export default { pageSize: 10, studentId: "", batchCode: "", + // studentId: "27", + // batchCode: "PC202208230011", // studentId: "14", // batchCode: "PC202208030005", // studentId: "9", @@ -773,6 +789,8 @@ export default { this.itemshow2 = true; this.itemshow = false; } else { + this.itemshow = true; + this.itemshow2 = false; this.studentscorelist = res.rows; console.log(this.studentscorelist); } @@ -817,6 +835,9 @@ export default { this.studentId = row.id; this.studentshow = false; this.studentscore.studentId = row.id; + if (this.studentscore.batchCode != "") { + this.studenttext(); + } }, //获取学生 @@ -860,6 +881,9 @@ export default { this.className = row.className; this.classId = row.id; this.studentqueryParams.classId = row.id; + this.studentname = "请选择学生"; + this.studentId = ""; + this.studentscore.studentId = ""; this.classshow = false; }, //幼儿园左侧点击 @@ -867,6 +891,11 @@ export default { this.classqueryParams.kindergartenId = row.id; this.kindergartenName = row.kindergartenName; this.kindergartenId = row.id; + this.className = "请选择班级"; + this.classId = ""; + this.studentname = "请选择学生"; + this.studentId = ""; + this.studentscore.studentId = ""; this.kindergartenshow = false; }, //班级类型 @@ -883,7 +912,6 @@ export default { listClassinfo(this.classqueryParams).then((response) => { this.classinfoList = response.rows; this.total2 = response.total; - // console.log(this.classinfoList); }); }, @@ -892,6 +920,20 @@ export default { //用户权限 getRoleInfo().then((res) => { console.log(res); + this.classqueryParams.kindergartenId = res.data.kindergartenId; + var user = res.data.roleKeys; + console.log(user); + if (user.includes("enchou")) { + this.showyey = false; + return; + } else if (user.includes("teacher")) { + this.showyey = false; + return; + } else if (user.includes("parent")) { + this.showyey = false; + this.showbj = false; + return; + } }); //获取幼儿园list listKindergartenInfo(this.kqueryParams).then((response) => { diff --git a/src/views/system/shape/index.vue b/src/views/system/shape/index.vue index e31ce36..fec0a6c 100644 --- a/src/views/system/shape/index.vue +++ b/src/views/system/shape/index.vue @@ -7,7 +7,7 @@ v-show="showSearch" label-width="90px" > - + - + - +