From 2d0c93d7f482d9a75e6971963f7b48d560523003 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com> Date: Tue, 16 Aug 2022 11:05:58 +0800 Subject: [PATCH 01/31] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E6=88=90=E7=BB=A9?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=B0=8F=E6=95=B0=E7=82=B9=E5=90=8E=E4=B8=A4?= =?UTF-8?q?=E4=BD=8D=EF=BC=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/testItemCityScore/index.vue | 81 +++++-- .../system/testItemCountryScore/index.vue | 133 +++++++--- src/views/system/testItemScore/index.vue | 229 +++++++++++++++--- 3 files changed, 351 insertions(+), 92 deletions(-) diff --git a/src/views/system/testItemCityScore/index.vue b/src/views/system/testItemCityScore/index.vue index c9c911e..9c8b678 100644 --- a/src/views/system/testItemCityScore/index.vue +++ b/src/views/system/testItemCityScore/index.vue @@ -26,10 +26,10 @@ style="width: 228px" /> - + @@ -109,7 +109,7 @@ - + @@ -129,7 +129,11 @@ - + + @@ -252,6 +263,7 @@ export default { // e.code = Number(e.code); // }); this.areaList = this.handleTree(response.data); + console.log(this.areaList); this.loading = false; }); }, @@ -319,6 +331,9 @@ export default { this.form2.code = this.form.code; this.form2.sort = this.form.sort; this.form2.parentId = this.form.parentId; + if (this.areaList.length == 0) { + this.form.parentId = 0; + } this.$refs["form"].validate((valid) => { if (valid) { if (this.form.id != null) { From 41fe30c3d9dc352eba099ea4b3c1c6bcd05283f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com> Date: Mon, 22 Aug 2022 14:31:49 +0800 Subject: [PATCH 06/31] =?UTF-8?q?=E5=8C=BA=E5=9F=9F=E7=BB=84=E7=BB=87?= =?UTF-8?q?=E7=BB=B4=E6=8A=A4=EF=BC=8C=E5=8A=A8=E4=BD=9C=E5=8F=91=E5=B1=95?= =?UTF-8?q?=E5=88=86=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/development.js | 10 + src/views/system/area/index.vue | 12 +- src/views/system/development/index.vue | 460 +++++++++++++++++++++++++ src/views/system/info/index.vue | 26 +- 4 files changed, 487 insertions(+), 21 deletions(-) create mode 100644 src/api/system/development.js create mode 100644 src/views/system/development/index.vue 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/views/system/area/index.vue b/src/views/system/area/index.vue index 6adfa2c..05de262 100644 --- a/src/views/system/area/index.vue +++ b/src/views/system/area/index.vue @@ -119,9 +119,9 @@ icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['system:area:remove']" + v-if="scope.row.parentId != 0" >删除 - @@ -132,7 +132,7 @@ - @@ -323,6 +316,7 @@ export default { this.form = response.data; this.open = true; this.title = "修改区域管理"; + console.log(this.form); }); }, /** 提交按钮 */ diff --git a/src/views/system/development/index.vue b/src/views/system/development/index.vue new file mode 100644 index 0000000..31565f4 --- /dev/null +++ b/src/views/system/development/index.vue @@ -0,0 +1,460 @@ + + + diff --git a/src/views/system/info/index.vue b/src/views/system/info/index.vue index 0e2163c..26d13b3 100644 --- a/src/views/system/info/index.vue +++ b/src/views/system/info/index.vue @@ -17,14 +17,6 @@ style="width: 300px" /> - - - 删除 + >删除 + @@ -165,7 +157,11 @@ - + { 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; }); }, @@ -447,6 +445,10 @@ export default { /** 提交按钮 */ submitForm() { + if (this.List.length == 0) { + this.form.parentId = 0; + } + if (this.form.phone == "" || this.form.phone.toString().length == 11) { this.$refs["form"].validate((valid) => { if (valid) { From c50fdb27b659f79ca2c5576a3a86f5b9b3f58afd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com> Date: Mon, 22 Aug 2022 17:44:09 +0800 Subject: [PATCH 07/31] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/classinfo/index.vue | 19 ++- src/views/system/info/index.vue | 56 +++--- src/views/system/itemCategory/index.vue | 42 ++--- src/views/system/kindergartenInfo/index.vue | 19 ++- src/views/system/studentInfo/index.vue | 79 ++++++--- src/views/system/teacherInfo/index.vue | 180 ++++++++++++-------- src/views/system/user/index.vue | 4 +- 7 files changed, 238 insertions(+), 161 deletions(-) diff --git a/src/views/system/classinfo/index.vue b/src/views/system/classinfo/index.vue index 21cd4c8..441e39f 100644 --- a/src/views/system/classinfo/index.vue +++ b/src/views/system/classinfo/index.vue @@ -214,7 +214,7 @@ @@ -362,12 +362,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 { @@ -431,7 +438,7 @@ export default { required: true, validator: checkMobile, trigger: "blur", - message: "请输入正确的手机号", + message: "", }, ], }, diff --git a/src/views/system/info/index.vue b/src/views/system/info/index.vue index 26d13b3..316d024 100644 --- a/src/views/system/info/index.vue +++ b/src/views/system/info/index.vue @@ -193,7 +193,7 @@ @@ -221,10 +221,19 @@ export default { // 验证手机号的正则表达式 const regMobile = /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/; - if (regMobile.test(value)) { - return cb(); + const reg = /^(0[0-9]{2,3}\-)([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$/; + const isTel = reg.test(value); + + 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 { // 遮罩层 @@ -276,7 +285,7 @@ export default { required: true, validator: checkMobile, trigger: "blur", - message: "请输入正确的手机号", + message: "", }, ], code: [ @@ -448,28 +457,23 @@ export default { if (this.List.length == 0) { this.form.parentId = 0; } - - 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(); - }); - } + 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("请输入正确的手机号码"); - } + } + }); }, /** 删除按钮操作 */ handleDelete(row) { diff --git a/src/views/system/itemCategory/index.vue b/src/views/system/itemCategory/index.vue index 0b37407..a7d05c9 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); + if (Number(max) < Number(min)) { + console.log(min, max); callback(new Error("最高分必须大于最低分,请重新填写!")); - - } - + } 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/studentInfo/index.vue b/src/views/system/studentInfo/index.vue index 348342d..25a9c88 100644 --- a/src/views/system/studentInfo/index.vue +++ b/src/views/system/studentInfo/index.vue @@ -82,7 +82,7 @@ @click="handleQuery" >搜索 - 重置 @@ -284,7 +284,7 @@ - + @@ -360,7 +360,7 @@ @click="handleQuery3" >搜索 - 重置 搜索 - 重置 @@ -597,7 +597,7 @@ @@ -679,12 +679,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("请输入正确的联系电话")); }; //验证身份证 var isCardId = (rule, value, callback) => { @@ -815,12 +822,15 @@ export default { form2: {}, // 表单校验 rules: { + studentNumber: [ + { required: true, message: "请输入学生编号", trigger: "blur" }, + ], phone: [ { required: true, validator: checkMobile, trigger: "blur", - message: "请输入正确的手机号", + message: "", }, ], birthDate: [ @@ -952,7 +962,6 @@ export default { handleQuery3() { listParentInfo(this.parentInfoList2).then((response) => { this.parentInfoList = response.rows; - console.log(this.parentInfoList); this.total3 = response.total; }); }, @@ -965,6 +974,17 @@ export default { // console.log(this.classinfoList); }); }, + /** 重置按钮操作 */ + resetQuery2() { + this.classinfoList2 = { + pageNum: 1, + pageSize: 10, + kindergartenId: null, + className: null, + classType: null, + }; + this.handleQuery2(); + }, /** 新增按钮操作 */ handleAdd() { this.reset(); @@ -1166,7 +1186,7 @@ export default { console.log(this.form); console.log(this.form2); console.log(this.parentlist); - console.log(this.parent1, this.parent2); + // console.log(this.parent1, this.parent2); console.log(this.tags); }, handleSelectionChange(selection) { @@ -1291,17 +1311,32 @@ export default { /** 搜索按钮操作 */ handleQuery() { this.queryParams.pageNum = 1; - this.getList(); + listStudentInfo(this.queryParams).then((res) => { + this.studentInfoList = res.rows; + this.total = res.total; + this.loading = false; + }); }, cancel3() { - this.resetQuery(); + this.resetQuery2(); this.innerVisible = false; }, /** 重置按钮操作 */ - resetQuery() { + resetQuery1() { this.resetForm("queryForm"); this.handleQuery(); }, + /** 重置按钮操作 */ + resetQuery3() { + this.parentInfoList2 = { + pageNum: 1, + pageSize: 10, + parentName: null, + parentSex: null, + phone: null, + }; + this.handleQuery3(); + }, /** 查询学生信息列表 */ getList() { @@ -1313,7 +1348,7 @@ export default { }); tKindergartenInfo(this.nationType).then((res) => { this.nactionlist = res.data; - console.log(this.nactionlist); + // console.log(this.nactionlist); }); tKindergartenInfo(this.ClassType).then((res) => { // console.log(res.data); @@ -1329,18 +1364,12 @@ export default { }); listParentInfo(this.parentInfoList2).then((response) => { this.parentInfoList = response.rows; - console.log(this.parentInfoList); + // console.log(this.parentInfoList); this.total3 = response.total; this.loading = false; }); listStudentInfo(this.queryParams).then((res) => { - // res.rows.forEach((el) => { - // el.className = this.classinfoList.filter( - // (e) => e.id == el.classId - // )[0].className; - // }); this.studentInfoList = res.rows; - // console.log(this.studentInfoList); this.total = res.total; this.loading = false; }); @@ -1370,6 +1399,10 @@ export default { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); + this.parent1 = ""; + this.parent2 = ""; + this.parentlist = []; + this.tags = []; }); } } diff --git a/src/views/system/teacherInfo/index.vue b/src/views/system/teacherInfo/index.vue index 30093fd..d4455ed 100644 --- a/src/views/system/teacherInfo/index.vue +++ b/src/views/system/teacherInfo/index.vue @@ -56,7 +56,7 @@ @click="handleQuery" >搜索 - 重置 @@ -126,7 +126,7 @@ align="center" prop="kindergartenName" /> - + - + }} + {{ item.measureUnit == "kg" ? "千克" : "" }} + {{ item.measureUnit == "g" ? "克" : "" }}({{ item.measureUnit }}) + 评价
@@ -457,13 +463,7 @@ width: 32px; " > - {{ - ((((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 }}
{ 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 ea511bf..c6be1f4 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" > - + - +
{ 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/survey/index.vue b/src/views/system/survey/index.vue index 425d6f1..2c73a53 100644 --- a/src/views/system/survey/index.vue +++ b/src/views/system/survey/index.vue @@ -7,7 +7,7 @@ v-show="showSearch" label-width="90px" > - + -
该学生此批次暂没数据
+
该批次暂无数据
@@ -249,6 +249,7 @@ export default { return { itemshow: false, itemshow2: false, + showyey: true, total1: 0, total4: 0, @@ -294,20 +295,20 @@ export default { studentlist: [], //查询传值 classqueryParams: { - // kindergartenId: "", - // batchCode: "", + kindergartenId: "", + batchCode: "", pageNum: 1, pageSize: 10, - kindergartenId: "12", - batchCode: "PC202208030005", + // kindergartenId: "12", + // batchCode: "PC202208030005", }, studentlistqueryParams: { - // kindergartenId: "", - // batchCode: "", + kindergartenId: "", + batchCode: "", pageNum: 1, pageSize: 10, - kindergartenId: "1", - batchCode: "PC202208030005", + // kindergartenId: "1", + // batchCode: "PC202208030005", }, LARGECLASS: "LARGE_CLASS", MIDDLECLASS: "MIDDLE_CLASS", @@ -320,258 +321,270 @@ export default { mounted() {}, created() { this.getList(); - this.StudentListinfo(); - this.ClassListinfo(); + // this.StudentListinfo(); + // this.ClassListinfo(); }, methods: { ClassListinfo() { ClassList(this.classqueryParams).then((res) => { - var classscore1 = []; - var classscore2 = []; - var classscore3 = []; - res.rows.forEach((e) => { - if (e.classType == this.LARGECLASS) { - this.yclassname1.push(e.className); - if ( - e.itemScoreAll == "" || - !e.itemScoreAll || - e.itemScoreAll == null - ) { - classscore1.push(0); - } else { - classscore1.push(e.itemScoreAll); + if (res.rows == [] || !res.rows) { + this.itemshow2 = true; + this.itemshow = false; + } else { + var classscore1 = []; + var classscore2 = []; + var classscore3 = []; + res.rows.forEach((e) => { + if (e.classType == this.LARGECLASS) { + this.yclassname1.push(e.className); + if ( + e.itemScoreAll == "" || + !e.itemScoreAll || + e.itemScoreAll == null + ) { + classscore1.push(0); + } else { + classscore1.push(e.itemScoreAll); + } + } else if (e.classType == this.MIDDLECLASS) { + this.yclassname2.push(e.className); + if ( + e.itemScoreAll == "" || + !e.itemScoreAll || + e.itemScoreAll == null + ) { + classscore2.push(0); + } else { + classscore2.push(e.itemScoreAll); + } + } else if (e.classType == this.SMALLCLASS) { + this.yclassname3.push(e.className); + if ( + e.itemScoreAll == "" || + !e.itemScoreAll || + e.itemScoreAll == null + ) { + classscore3.push(0); + } else { + classscore3.push(e.itemScoreAll); + } } - } else if (e.classType == this.MIDDLECLASS) { - this.yclassname2.push(e.className); - if ( - e.itemScoreAll == "" || - !e.itemScoreAll || - e.itemScoreAll == null - ) { - classscore2.push(0); - } else { - classscore2.push(e.itemScoreAll); - } - } else if (e.classType == this.SMALLCLASS) { - this.yclassname3.push(e.className); - if ( - e.itemScoreAll == "" || - !e.itemScoreAll || - e.itemScoreAll == null - ) { - classscore3.push(0); - } else { - classscore3.push(e.itemScoreAll); - } - } - }); - var app = {}; - var myChart = echarts.init(document.getElementById("main")); - var myChart2 = echarts.init(document.getElementById("main2")); - var myChart3 = echarts.init(document.getElementById("main3")); - var option; - var option2; - var option3; - const posList = [ - "left", - "right", - "top", - "bottom", - "inside", - "insideTop", - "insideLeft", - "insideRight", - "insideBottom", - "insideTopLeft", - "insideTopRight", - "insideBottomLeft", - "insideBottomRight", - ]; - app.configParameters = { - rotate: { - min: 0, - max: 90, - }, - align: { - options: { - left: "left", - center: "center", - right: "right", + }); + var app = {}; + var myChart = echarts.init(document.getElementById("main")); + var myChart2 = echarts.init(document.getElementById("main2")); + var myChart3 = echarts.init(document.getElementById("main3")); + var option; + var option2; + var option3; + const posList = [ + "left", + "right", + "top", + "bottom", + "inside", + "insideTop", + "insideLeft", + "insideRight", + "insideBottom", + "insideTopLeft", + "insideTopRight", + "insideBottomLeft", + "insideBottomRight", + ]; + app.configParameters = { + rotate: { + min: 0, + max: 90, }, - }, - verticalAlign: { - options: { - top: "top", - middle: "middle", - bottom: "bottom", - }, - }, - position: { - options: posList.reduce(function (map, pos) { - map[pos] = pos; - return map; - }, {}), - }, - distance: { - min: 0, - max: 100, - }, - }; - app.config = { - rotate: 0, - align: "center", - verticalAlign: "middle", - position: "top", - distance: 15, - onChange: function () { - const labelOption = { - rotate: app.config.rotate, - align: app.config.align, - verticalAlign: app.config.verticalAlign, - position: app.config.position, - distance: app.config.distance, - }; - myChart.setOption({ - series: [ - { - label: labelOption, - }, - { - label: labelOption, - }, - { - label: labelOption, - }, - { - label: labelOption, - }, - ], - }); - }, - }; - const labelOption = { - show: true, - position: app.config.position, - distance: app.config.distance, - align: app.config.align, - verticalAlign: app.config.verticalAlign, - rotate: app.config.rotate, - formatter: "{c}", - fontSize: 16, - rich: { - name: {}, - }, - }; - option = { - tooltip: { - trigger: "axis", - axisPointer: { - type: "shadow", - }, - }, - legend: {}, - xAxis: [ - { - type: "category", - axisTick: { show: false }, - data: this.yclassname1, - }, - ], - yAxis: [ - { - type: "value", - }, - ], - series: [ - { - type: "bar", - barGap: 0, - color: "#00B050", - label: labelOption, - emphasis: { - focus: "series", + align: { + options: { + left: "left", + center: "center", + right: "right", }, - data: classscore1, }, - ], - }; - option2 = { - tooltip: { - trigger: "axis", - axisPointer: { - type: "shadow", - }, - }, - legend: {}, - xAxis: [ - { - type: "category", - axisTick: { show: false }, - data: this.yclassname2, - }, - ], - yAxis: [ - { - type: "value", - }, - ], - series: [ - { - type: "bar", - barGap: 0, - color: "#00B050", - label: labelOption, - emphasis: { - focus: "series", + verticalAlign: { + options: { + top: "top", + middle: "middle", + bottom: "bottom", }, - data: classscore2, }, - ], - }; - option3 = { - tooltip: { - trigger: "axis", - axisPointer: { - type: "shadow", + position: { + options: posList.reduce(function (map, pos) { + map[pos] = pos; + return map; + }, {}), }, - }, - legend: {}, - xAxis: [ - { - type: "category", - axisTick: { show: false }, - data: this.yclassname3, + distance: { + min: 0, + max: 100, }, - ], - yAxis: [ - { - type: "value", + }; + app.config = { + rotate: 0, + align: "center", + verticalAlign: "middle", + position: "top", + distance: 15, + onChange: function () { + const labelOption = { + rotate: app.config.rotate, + align: app.config.align, + verticalAlign: app.config.verticalAlign, + position: app.config.position, + distance: app.config.distance, + }; + myChart.setOption({ + series: [ + { + label: labelOption, + }, + { + label: labelOption, + }, + { + label: labelOption, + }, + { + label: labelOption, + }, + ], + }); }, - ], - series: [ - { - type: "bar", - barGap: 0, - color: "#00B050", - label: labelOption, - emphasis: { - focus: "series", + }; + const labelOption = { + show: true, + position: app.config.position, + distance: app.config.distance, + align: app.config.align, + verticalAlign: app.config.verticalAlign, + rotate: app.config.rotate, + formatter: "{c}", + fontSize: 16, + rich: { + name: {}, + }, + }; + option = { + tooltip: { + trigger: "axis", + axisPointer: { + type: "shadow", }, - data: classscore3, }, - ], - }; + legend: {}, + xAxis: [ + { + type: "category", + axisTick: { show: false }, + data: this.yclassname1, + }, + ], + yAxis: [ + { + type: "value", + }, + ], + series: [ + { + type: "bar", + barGap: 0, + color: "#00B050", + label: labelOption, + emphasis: { + focus: "series", + }, + data: classscore1, + }, + ], + }; + option2 = { + tooltip: { + trigger: "axis", + axisPointer: { + type: "shadow", + }, + }, + legend: {}, + xAxis: [ + { + type: "category", + axisTick: { show: false }, + data: this.yclassname2, + }, + ], + yAxis: [ + { + type: "value", + }, + ], + series: [ + { + type: "bar", + barGap: 0, + color: "#00B050", + label: labelOption, + emphasis: { + focus: "series", + }, + data: classscore2, + }, + ], + }; + option3 = { + tooltip: { + trigger: "axis", + axisPointer: { + type: "shadow", + }, + }, + legend: {}, + xAxis: [ + { + type: "category", + axisTick: { show: false }, + data: this.yclassname3, + }, + ], + yAxis: [ + { + type: "value", + }, + ], + series: [ + { + type: "bar", + barGap: 0, + color: "#00B050", + label: labelOption, + emphasis: { + focus: "series", + }, + data: classscore3, + }, + ], + }; - option && myChart.setOption(option); - option2 && myChart2.setOption(option2); - option3 && myChart3.setOption(option3); - this.itemshow = true; - this.itemshow2 = false; + option && myChart.setOption(option); + option2 && myChart2.setOption(option2); + option3 && myChart3.setOption(option3); + this.itemshow = true; + this.itemshow2 = false; + } }); }, StudentListinfo() { StudentList(this.studentlistqueryParams).then((res) => { - this.studentlist = res.rows; + if (res.rows == [] || !res.rows) { + this.itemshow2 = true; + this.itemshow = false; + } else { + this.studentlist = res.rows; + this.itemshow2 = false; + this.itemshow = true; + } }); }, //点击批次左边 @@ -579,7 +592,9 @@ export default { this.batchCodeName = row.batchName; this.batchCodeId = row.id; this.classqueryParams.batchCode = row.batchCode; + this.studentlistqueryParams.batchCode = row.batchCode; this.batchCodeshow = false; + this.StudentListinfo(); this.ClassListinfo(); }, //点击批次 @@ -609,6 +624,7 @@ export default { //幼儿园左侧点击 kindergartenNameclick(row) { this.classqueryParams.kindergartenId = row.id; + this.studentlistqueryParams.kindergartenId = row.id; this.kindergartenName = row.kindergartenName; this.kindergartenId = row.id; this.kindergartenshow = false; @@ -622,6 +638,21 @@ export default { //用户权限 getRoleInfo().then((res) => { console.log(res); + this.studentlistqueryParams.kindergartenId = res.data.kindergartenId; + 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; + return; + } }); //获取幼儿园list listKindergartenInfo(this.kqueryParams).then((response) => { diff --git a/src/views/system/testItemCityScore/index.vue b/src/views/system/testItemCityScore/index.vue index 1978ac7..30ca91b 100644 --- a/src/views/system/testItemCityScore/index.vue +++ b/src/views/system/testItemCityScore/index.vue @@ -26,7 +26,7 @@ style="width: 228px" />
- + - + - + - { - if (Number.isNaN(Number.parseFloat(value))) { - callback(new Error("请输入数字")); - } else if (!this.form2.itemScore) { - callback(new Error("不能为空")); - } else if (this.form2.itemScore * 1 > 99999999) { - callback(new Error("最大99999999")); // 限制最大额度 + var str = value; + var str_ = ""; + var str2 = ""; + str_ = str.substr(str.indexOf(".")).length; + if (value.includes(".")) { + str2 = str.substr(0, str.indexOf(".")).length; + console.log(str2); + if (Number.isNaN(Number.parseFloat(value))) { + callback(new Error("请输入数字")); + } else if (!this.form2.itemScore) { + callback(new Error("不能为空")); + } else if (this.form2.itemScore * 1 > 99999999) { + callback(new Error("最大99999999")); // 限制最大额度 + } else if (this.form2.itemScore == "0") { + callback(new Error("请输入成绩")); // 限制最大额度 + } else if (str_ > 3) { + callback(new Error("小数点后两位")); // 限制最大额度 + } else if (str2 > 3) { + callback(new Error("整数为三位")); // 限制最大额度 + } else { + callback(); + } } else { - callback(); + str2 = str.length; + console.log(str2); + if (Number.isNaN(Number.parseFloat(value))) { + callback(new Error("请输入数字")); + } else if (!this.form2.itemScore) { + callback(new Error("不能为空")); + } else if (this.form2.itemScore * 1 > 99999999) { + callback(new Error("最大99999999")); // 限制最大额度 + } else if (this.form2.itemScore == "0") { + callback(new Error("请输入成绩")); // 限制最大额度 + } else if (str2 > 3) { + callback(new Error("整数为三位")); // 限制最大额度 + } else { + callback(); + } } }; var roleMoeny2 = (rule, value, callback) => { - if (Number.isNaN(Number.parseFloat(value))) { - callback(new Error("请输入数字")); - } else if (!this.form2.itemFraction) { - callback(new Error("不能为空")); - } else if (this.form2.itemFraction * 1 > 99999999) { - callback(new Error("最大99999999")); // 限制最大额度 + var str = value; + console.log(str); + var str_ = ""; + var str2 = ""; + str_ = str.substr(str.indexOf(".")).length; + if (value.includes(".")) { + str2 = str.substr(0, str.indexOf(".")).length; + console.log(str2); + if (Number.isNaN(Number.parseFloat(value))) { + callback(new Error("请输入数字")); + } else if (!this.form2.itemFraction) { + callback(new Error("不能为空")); + } else if (this.form2.itemFraction * 1 > 99999999) { + callback(new Error("最大99999999")); // 限制最大额度 + } else if (this.form2.itemFraction == "0") { + callback(new Error("请输入成绩")); // 限制最大额度 + } else if (str_ > 3) { + callback(new Error("小数点后两位")); // 限制最大额度 + } else if (str2 > 3) { + callback(new Error("整数为三位")); // 限制最大额度 + } else { + callback(); + } } else { - callback(); + str2 = str.length; + console.log(str2); + if (Number.isNaN(Number.parseFloat(value))) { + callback(new Error("请输入数字")); + } else if (!this.form2.itemFraction) { + callback(new Error("不能为空")); + } else if (this.form2.itemFraction * 1 > 99999999) { + callback(new Error("最大99999999")); // 限制最大额度 + } else if (this.form2.itemFraction == "0") { + callback(new Error("请输入成绩")); // 限制最大额度 + } else if (str2 > 3) { + callback(new Error("整数为三位")); // 限制最大额度 + } else { + callback(); + } } }; var roleMoeny3 = (rule, value, callback) => { - if (Number.isNaN(Number.parseFloat(value))) { - callback(new Error("请输入数字")); - } else if (!this.form.itemFraction) { - callback(new Error("不能为空")); - } else if (this.form.itemFraction * 1 > 99999999) { - callback(new Error("最大99999999")); // 限制最大额度 + var str = this.form.itemScore; + console.log(str); + var str_ = ""; + var str2 = ""; + str_ = str.substr(str.indexOf(".")).length; + if (value.includes(".")) { + str2 = str.substr(0, str.indexOf(".")).length; + console.log(str2); + if (Number.isNaN(Number.parseFloat(value))) { + callback(new Error("请输入数字")); + } else if (!this.form.itemScore) { + callback(new Error("不能为空")); + } else if (this.form.itemScore * 1 > 99999999) { + callback(new Error("最大99999999")); // 限制最大额度 + } else if (this.form.itemScore == "0") { + callback(new Error("请输入成绩")); // 限制最大额度 + } else if (str_ > 3) { + callback(new Error("小数点后两位")); // 限制最大额度 + } else if (str2 > 3) { + callback(new Error("整数为三位")); // 限制最大额度 + } else { + callback(); + } } else { - callback(); + str2 = str.length; + console.log(str2); + if (Number.isNaN(Number.parseFloat(value))) { + callback(new Error("请输入数字")); + } else if (!this.form.itemScore) { + callback(new Error("不能为空")); + } else if (this.form.itemScore * 1 > 99999999) { + callback(new Error("最大99999999")); // 限制最大额度 + } else if (this.form.itemScore == "0") { + callback(new Error("请输入成绩")); // 限制最大额度 + } else if (str2 > 3) { + callback(new Error("整数为三位")); // 限制最大额度 + } else { + callback(); + } } }; var roleMoeny4 = (rule, value, callback) => { - if (Number.isNaN(Number.parseFloat(value))) { - callback(new Error("请输入数字")); - } else if (!this.form.itemFraction) { - callback(new Error("不能为空")); - } else if (this.form.itemFraction * 1 > 99999999) { - callback(new Error("最大99999999")); // 限制最大额度 + var str = this.form.itemFraction; + console.log(str); + var str_ = ""; + var str2 = ""; + str_ = str.substr(str.indexOf(".")).length; + if (value.includes(".")) { + str2 = str.substr(0, str.indexOf(".")).length; + console.log(str2); + if (Number.isNaN(Number.parseFloat(value))) { + callback(new Error("请输入数字")); + } else if (!this.form.itemFraction) { + callback(new Error("不能为空")); + } else if (this.form.itemFraction * 1 > 99999999) { + callback(new Error("最大99999999")); // 限制最大额度 + } else if (this.form.itemFraction == "0") { + callback(new Error("请输入成绩")); // 限制最大额度 + } else if (str_ > 3) { + callback(new Error("小数点后两位")); // 限制最大额度 + } else if (str2 > 3) { + callback(new Error("整数为三位")); // 限制最大额度 + } else { + callback(); + } } else { - callback(); + str2 = str.length; + console.log(str2); + if (Number.isNaN(Number.parseFloat(value))) { + callback(new Error("请输入数字")); + } else if (!this.form.itemFraction) { + callback(new Error("不能为空")); + } else if (this.form.itemFraction * 1 > 99999999) { + callback(new Error("最大99999999")); // 限制最大额度 + } else if (this.form.itemFraction == "0") { + callback(new Error("请输入成绩")); // 限制最大额度 + } else if (str2 > 3) { + callback(new Error("整数为三位")); // 限制最大额度 + } else { + callback(); + } } }; return { + value: "", //项目测试类型 itemResultType: "item_result_type", //字典类型 @@ -1294,16 +1394,13 @@ export default { yryinnerVisible: false, testItemScoreLists: [], xmname: "请选择所属班级", - studentInfos: [], innerVisible: false, stname: "请选择学生姓名", innerVisible2: false, - testItemss: [], innerVisible3: false, testname: "请选择测试项目名称", - testScoreBatchs: [], innerVisible4: false, itemNumbername: "请选择批次编号", @@ -1326,7 +1423,6 @@ export default { kindergartenId: "", // 选中数组 ids: [], - // 非单个禁用 single: true, // 非多个禁用 @@ -1353,7 +1449,6 @@ export default { itemId3: "", itemId4: "", itemId5: "", - // 查询参数 queryParams: { pageNum: 1, @@ -1474,12 +1569,12 @@ export default { trigger: "blur", }, ], - syntheticalAssess: [ { required: true, message: "综合评价不能为空", trigger: "blur" }, ], }, realVal: "", + realVal2: "", }; }, created() { @@ -1499,83 +1594,6 @@ export default { kindergartencancel() { this.yryinnerVisible = false; }, - //只能输入一位小数点 - NumberCheck(num) { - let str = this.form2.itemScore; - //限制只能输入一个小数点 - if (Number.isNaN(Number.parseFloat(str))) { - } else { - //限制只能输入一个小数点 - if (str.indexOf(".") != -1) { - var str_ = str.substr(str.indexOf(".") + 1); - if (str_.indexOf(".") != -1) { - str = str.substr(0, str.indexOf(".") + str_.indexOf(".") + 1); - } - } - - str = parseFloat(str).toFixed(3); - this.realVal = str.substring(0, str.length - 1); - } - }, - //个人成绩得分只能输入一个小数点 - NumberCheck2(num) { - let str = this.form2.itemFraction; - //限制只能输入一个小数点 - if (Number.isNaN(Number.parseFloat(str))) { - } else { - //限制只能输入一个小数点 - if (str.indexOf(".") != -1) { - var str_ = str.substr(str.indexOf(".") + 1); - if (str_.indexOf(".") != -1) { - str = str.substr(0, str.indexOf(".") + str_.indexOf(".") + 1); - } - } - - str = parseFloat(str).toFixed(3); - this.realVal = str.substring(0, str.length - 1); - } - }, - NumberCheck3(num) { - let str = this.form.itemScore; - //限制只能输入一个小数点 - if (Number.isNaN(Number.parseFloat(str))) { - } else { - //限制只能输入一个小数点 - if (str.indexOf(".") != -1) { - var str_ = str.substr(str.indexOf(".") + 1); - if (str_.indexOf(".") != -1) { - str = str.substr(0, str.indexOf(".") + str_.indexOf(".") + 1); - } - } - //正则替换,保留数字和小数点 - str = parseFloat(str).toFixed(3); - this.realVal = str.substring(0, str.length - 1); - - // str = str.replace(/[^\d^\.]+/g, ""); - // this.form.itemAvgScore = str; - console.log(this.realVal); - } - }, - NumberCheck4(num) { - let str = this.form.itemFraction; - //限制只能输入一个小数点 - if (Number.isNaN(Number.parseFloat(str))) { - } else { - //限制只能输入一个小数点 - if (str.indexOf(".") != -1) { - var str_ = str.substr(str.indexOf(".") + 1); - if (str_.indexOf(".") != -1) { - str = str.substr(0, str.indexOf(".") + str_.indexOf(".") + 1); - } - } - //正则替换,保留数字和小数点 - str = parseFloat(str).toFixed(3); - this.realVal = str.substring(0, str.length - 1); - - // str = str.replace(/[^\d^\.]+/g, ""); - // this.form.itemAvgScore = str; - } - }, // 班级信息 xmclick(row) { console.log(row); @@ -1858,10 +1876,6 @@ export default { }, /** 提交按钮 */ submitForm() { - this.form2.itemScore = this.realVal; - this.form.itemFraction = this.realVal; - this.form.itemScore = this.realVal; - this.form2.itemFraction = this.realVal; console.log(this.form2); this.$refs["form"].validate((valid) => { if (valid) { @@ -1884,6 +1898,9 @@ export default { this.itemId3 = ""; this.itemId4 = ""; this.itemId5 = ""; + this.kindergartenName = "请选择幼儿园"; + this.kindergartenId = ""; + this.queryParams2.kindergartenId = ""; }); } } diff --git a/src/views/system/testItems/index.vue b/src/views/system/testItems/index.vue index 6ea01c8..d2dd1c8 100644 --- a/src/views/system/testItems/index.vue +++ b/src/views/system/testItems/index.vue @@ -372,23 +372,23 @@ --> - + From 7e7dcfed8624f1ce35be8dd87ea1ae3d06820e58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com> Date: Tue, 23 Aug 2022 18:03:37 +0800 Subject: [PATCH 11/31] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=AF=8C=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E6=A1=86=E5=9B=BE=E7=89=87=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Editor/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: "请输入内容", From 6030ddc6652e0180228e6416b1f200b97f915409 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BA=AA=E5=AF=92?= <2533659732@qq.com> Date: Tue, 23 Aug 2022 18:54:17 +0800 Subject: [PATCH 12/31] =?UTF-8?q?=E6=96=B0=E5=A2=9Enode=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=E4=BE=9D=E8=B5=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + 1 file changed, 1 insertion(+) 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", From 8e12022981d1c6276a3245373ea4f398c9b01a00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com> Date: Wed, 24 Aug 2022 14:13:09 +0800 Subject: [PATCH 13/31] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=86=E6=95=B0?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=EF=BC=8C=E5=88=A0=E9=99=A4=E5=B9=BC=E5=84=BF?= =?UTF-8?q?=E5=9B=AD=E5=A4=9A=E4=BD=99=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/KindergartenPhysicalTest/index.vue | 2 +- src/views/system/action/index.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/system/KindergartenPhysicalTest/index.vue b/src/views/system/KindergartenPhysicalTest/index.vue index f3cfb40..669e3da 100644 --- a/src/views/system/KindergartenPhysicalTest/index.vue +++ b/src/views/system/KindergartenPhysicalTest/index.vue @@ -177,7 +177,7 @@ >{{ analysislist.kindergartenName }}幼儿园 + > 幼儿园性质:{{ diff --git a/src/views/system/action/index.vue b/src/views/system/action/index.vue index dff9634..dea67b7 100644 --- a/src/views/system/action/index.vue +++ b/src/views/system/action/index.vue @@ -372,7 +372,7 @@ > Date: Wed, 24 Aug 2022 15:16:50 +0800 Subject: [PATCH 14/31] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E5=8F=AA?= =?UTF-8?q?=E8=83=BD=E5=86=99=E4=B8=89=E4=BD=8D=E6=95=B4=E6=95=B0=EF=BC=8C?= =?UTF-8?q?=E4=BF=9D=E7=95=99=E4=B8=A4=E4=BD=8D=E5=B0=8F=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/testItems/index.vue | 429 +++++++++++++++++++++++++-- 1 file changed, 397 insertions(+), 32 deletions(-) diff --git a/src/views/system/testItems/index.vue b/src/views/system/testItems/index.vue index d2dd1c8..1f59500 100644 --- a/src/views/system/testItems/index.vue +++ b/src/views/system/testItems/index.vue @@ -275,14 +275,18 @@ @@ -310,7 +314,9 @@ v-if="form.standardType == fty" > @@ -321,7 +327,10 @@ v-if="form.standardType == fty" > @@ -332,7 +341,9 @@ v-if="form.standardType == fty" > @@ -344,7 +355,9 @@ > @@ -450,6 +463,252 @@ export default { components: { Treeselect }, name: "TestItems", data() { + var roleMoeny = (rule, value, callback) => { + var str = value; + var str_ = ""; + var str2 = ""; + str_ = str.substr(str.indexOf(".")).length; + if (value.includes(".")) { + str2 = str.substr(0, str.indexOf(".")).length; + console.log(str2); + if (Number.isNaN(Number.parseFloat(value))) { + callback(new Error("请输入数字")); + } else if (!this.form.largeStandardScore) { + callback(new Error("不能为空")); + } else if (this.form.largeStandardScore * 1 > 99999999) { + callback(new Error("最大99999999")); // 限制最大额度 + } else if (this.form.largeStandardScore == "0") { + callback(new Error("请输入成绩")); // 限制最大额度 + } else if (str_ > 3) { + callback(new Error("小数点后两位")); // 限制最大额度 + } else if (str2 > 3) { + callback(new Error("整数为三位")); // 限制最大额度 + } else { + callback(); + } + } else { + str2 = str.length; + console.log(str2); + if (Number.isNaN(Number.parseFloat(value))) { + callback(new Error("请输入数字")); + } else if (!this.form.largeStandardScore) { + callback(new Error("不能为空")); + } else if (this.form.largeStandardScore * 1 > 99999999) { + callback(new Error("最大99999999")); // 限制最大额度 + } else if (this.form.largeStandardScore == "0") { + callback(new Error("请输入成绩")); // 限制最大额度 + } else if (str2 > 3) { + callback(new Error("整数为三位")); // 限制最大额度 + } else { + callback(); + } + } + }; + var roleMoeny1 = (rule, value, callback) => { + var str = value; + var str_ = ""; + var str2 = ""; + str_ = str.substr(str.indexOf(".")).length; + if (value.includes(".")) { + str2 = str.substr(0, str.indexOf(".")).length; + console.log(str2); + if (Number.isNaN(Number.parseFloat(value))) { + callback(new Error("请输入数字")); + } else if (!this.form.middleStandardScore) { + callback(new Error("不能为空")); + } else if (this.form.middleStandardScore * 1 > 99999999) { + callback(new Error("最大99999999")); // 限制最大额度 + } else if (this.form.middleStandardScore == "0") { + callback(new Error("请输入成绩")); // 限制最大额度 + } else if (str_ > 3) { + callback(new Error("小数点后两位")); // 限制最大额度 + } else if (str2 > 3) { + callback(new Error("整数为三位")); // 限制最大额度 + } else { + callback(); + } + } else { + str2 = str.length; + console.log(str2); + if (Number.isNaN(Number.parseFloat(value))) { + callback(new Error("请输入数字")); + } else if (!this.form.unifiedStandardScore) { + callback(new Error("不能为空")); + } else if (this.form.unifiedStandardScore * 1 > 99999999) { + callback(new Error("最大99999999")); // 限制最大额度 + } else if (this.form.unifiedStandardScore == "0") { + callback(new Error("请输入成绩")); // 限制最大额度 + } else if (str2 > 3) { + callback(new Error("整数为三位")); // 限制最大额度 + } else { + callback(); + } + } + }; + var roleMoeny2 = (rule, value, callback) => { + var str = value; + var str_ = ""; + var str2 = ""; + str_ = str.substr(str.indexOf(".")).length; + if (value.includes(".")) { + str2 = str.substr(0, str.indexOf(".")).length; + console.log(str2); + if (Number.isNaN(Number.parseFloat(value))) { + callback(new Error("请输入数字")); + } else if (!this.form.middleStandardScore) { + callback(new Error("不能为空")); + } else if (this.form.middleStandardScore * 1 > 99999999) { + callback(new Error("最大99999999")); // 限制最大额度 + } else if (this.form.middleStandardScore == "0") { + callback(new Error("请输入成绩")); // 限制最大额度 + } else if (str_ > 3) { + callback(new Error("小数点后两位")); // 限制最大额度 + } else if (str2 > 3) { + callback(new Error("整数为三位")); // 限制最大额度 + } else { + callback(); + } + } else { + str2 = str.length; + console.log(str2); + if (Number.isNaN(Number.parseFloat(value))) { + callback(new Error("请输入数字")); + } else if (!this.form.middleStandardScore) { + callback(new Error("不能为空")); + } else if (this.form.middleStandardScore * 1 > 99999999) { + callback(new Error("最大99999999")); // 限制最大额度 + } else if (this.form.middleStandardScore == "0") { + callback(new Error("请输入成绩")); // 限制最大额度 + } else if (str2 > 3) { + callback(new Error("整数为三位")); // 限制最大额度 + } else { + callback(); + } + } + }; + var roleMoeny3 = (rule, value, callback) => { + var str = value; + var str_ = ""; + var str2 = ""; + str_ = str.substr(str.indexOf(".")).length; + if (value.includes(".")) { + str2 = str.substr(0, str.indexOf(".")).length; + console.log(str2); + if (Number.isNaN(Number.parseFloat(value))) { + callback(new Error("请输入数字")); + } else if (!this.form.smallStandardScore) { + callback(new Error("不能为空")); + } else if (this.form.smallStandardScore * 1 > 99999999) { + callback(new Error("最大99999999")); // 限制最大额度 + } else if (this.form.smallStandardScore == "0") { + callback(new Error("请输入成绩")); // 限制最大额度 + } else if (str_ > 3) { + callback(new Error("小数点后两位")); // 限制最大额度 + } else if (str2 > 3) { + callback(new Error("整数为三位")); // 限制最大额度 + } else { + callback(); + } + } else { + str2 = str.length; + console.log(str2); + if (Number.isNaN(Number.parseFloat(value))) { + callback(new Error("请输入数字")); + } else if (!this.form.smallStandardScore) { + callback(new Error("不能为空")); + } else if (this.form.smallStandardScore * 1 > 99999999) { + callback(new Error("最大99999999")); // 限制最大额度 + } else if (this.form.smallStandardScore == "0") { + callback(new Error("请输入成绩")); // 限制最大额度 + } else if (str2 > 3) { + callback(new Error("整数为三位")); // 限制最大额度 + } else { + callback(); + } + } + }; + var roleMoeny4 = (rule, value, callback) => { + var str = value; + var str_ = ""; + var str2 = ""; + str_ = str.substr(str.indexOf(".")).length; + if (value.includes(".")) { + str2 = str.substr(0, str.indexOf(".")).length; + console.log(str2); + if (Number.isNaN(Number.parseFloat(value))) { + callback(new Error("请输入数字")); + } else if (!this.form.minScore) { + callback(new Error("不能为空")); + } else if (this.form.minScore * 1 > 99999999) { + callback(new Error("最大99999999")); // 限制最大额度 + } else if (this.form.minScore == "0") { + callback(new Error("请输入成绩")); // 限制最大额度 + } else if (str_ > 3) { + callback(new Error("小数点后两位")); // 限制最大额度 + } else if (str2 > 3) { + callback(new Error("整数为三位")); // 限制最大额度 + } else { + callback(); + } + } else { + str2 = str.length; + console.log(str2); + if (Number.isNaN(Number.parseFloat(value))) { + callback(new Error("请输入数字")); + } else if (!this.form.minScore) { + callback(new Error("不能为空")); + } else if (this.form.minScore * 1 > 99999999) { + callback(new Error("最大99999999")); // 限制最大额度 + } else if (this.form.minScore == "0") { + callback(new Error("请输入成绩")); // 限制最大额度 + } else if (str2 > 3) { + callback(new Error("整数为三位")); // 限制最大额度 + } else { + callback(); + } + } + }; + var roleMoeny5 = (rule, value, callback) => { + var str = value; + var str_ = ""; + var str2 = ""; + str_ = str.substr(str.indexOf(".")).length; + if (value.includes(".")) { + str2 = str.substr(0, str.indexOf(".")).length; + console.log(str2); + if (Number.isNaN(Number.parseFloat(value))) { + callback(new Error("请输入数字")); + } else if (!this.form.maxScore) { + callback(new Error("不能为空")); + } else if (this.form.maxScore * 1 > 99999999) { + callback(new Error("最大99999999")); // 限制最大额度 + } else if (this.form.maxScore == "0") { + callback(new Error("请输入成绩")); // 限制最大额度 + } else if (str_ > 3) { + callback(new Error("小数点后两位")); // 限制最大额度 + } else if (str2 > 3) { + callback(new Error("整数为三位")); // 限制最大额度 + } else { + callback(); + } + } else { + str2 = str.length; + console.log(str2); + if (Number.isNaN(Number.parseFloat(value))) { + callback(new Error("请输入数字")); + } else if (!this.form.maxScore) { + callback(new Error("不能为空")); + } else if (this.form.maxScore * 1 > 99999999) { + callback(new Error("最大99999999")); // 限制最大额度 + } else if (this.form.maxScore == "0") { + callback(new Error("请输入成绩")); // 限制最大额度 + } else if (str2 > 3) { + callback(new Error("整数为三位")); // 限制最大额度 + } else { + callback(); + } + } + }; let itemLevelList = (rule, value, callback) => { let min = value .map((e) => { @@ -575,6 +834,7 @@ export default { // 是否显示弹出层 open: false, // 查询参数 + queryParams: { pageNum: 1, pageSize: 10, @@ -586,60 +846,59 @@ export default { form: {}, // 表单校验 rules: { + unifiedStandardScore: [ { - // required: true, - type: "number", - message: `必须填入数字`, + required: true, + validator: roleMoeny1, + message: "", trigger: "blur", - // transform: (value) => Number(value) }, ], - largeStandardScore: [ + largeStandardScore: [ { - // required: true, - type: "number", - message: `必须填入数字`, + required: true, + validator: roleMoeny, + message: "", trigger: "blur", - // transform: (value) => Number(value) }, ], - middleStandardScore: [ + middleStandardScore: [ { - // required: true, - type: "number", - message: `必须填入数字`, + required: true, + validator: roleMoeny2, + message: "", trigger: "blur", - // transform: (value) => Number(value) }, ], - smallStandardScore: [ + smallStandardScore: [ { - // required: true, - type: "number", - message: `必须填入数字`, + required: true, + validator: roleMoeny3, + message: "", trigger: "blur", - // transform: (value) => Number(value) }, ], itemLevelList: [ { - // required: true, + required: true, validator: itemLevelList, trigger: "blur", }, ], - minScore: [ + minScore: [ { - // required: true, - validator: minScore, + required: true, + validator: roleMoeny4, + message: "", trigger: "blur", }, ], - maxScore: [ + maxScore: [ { - // required: true, - validator: maxScore, + required: true, + validator: roleMoeny5, + message: "", trigger: "blur", }, ], @@ -689,6 +948,112 @@ export default { this.getList(); }, methods: { + // checkInput() { + // this.form.minScore = this.dealInputVal(this.form.minScore); + // }, + // dealInputVal(value) { + // value = value.replace(/^0*(0\.|[1-9])/, "$1"); + // value = value.replace(/[^\d.]/g, ""); //清除"数字"和"."以外的字符 + // value = value.replace(/^\./g, ""); //验证第一个字符是数字而不是字符 + // value = value.replace(/\.{1,}/g, "."); //只保留第一个.清除多余的 + // value = value.replace(".", "$#$").replace(/\./g, "").replace("$#$", "."); + // value = value.replace(/^(\-)*(\d*)\.(\d\d).*$/, "$1$2.$3"); //只能输入两个小数 + // value = + // value.indexOf(".") > 0 + // ? value.split(".")[0].substring(0, 10) + "." + value.split(".")[1] + // : value.substring(0, 10); + // return value; + // }, + // checkInput1() { + // this.form.maxScore = this.dealInputVal(this.form.maxScore); + // }, + // dealInputVal(value) { + // value = value.replace(/^0*(0\.|[1-9])/, "$1"); + // value = value.replace(/[^\d.]/g, ""); //清除"数字"和"."以外的字符 + // value = value.replace(/^\./g, ""); //验证第一个字符是数字而不是字符 + // value = value.replace(/\.{1,}/g, "."); //只保留第一个.清除多余的 + // value = value.replace(".", "$#$").replace(/\./g, "").replace("$#$", "."); + // value = value.replace(/^(\-)*(\d*)\.(\d\d).*$/, "$1$2.$3"); //只能输入两个小数 + // value = + // value.indexOf(".") > 0 + // ? value.split(".")[0].substring(0, 10) + "." + value.split(".")[1] + // : value.substring(0, 10); + // return value; + // }, + // checkInput2() { + // this.form.largeStandardScore = this.dealInputVal( + // this.form.largeStandardScore + // ); + // }, + // dealInputVal(value) { + // value = value.replace(/^0*(0\.|[1-9])/, "$1"); + // value = value.replace(/[^\d.]/g, ""); //清除"数字"和"."以外的字符 + // value = value.replace(/^\./g, ""); //验证第一个字符是数字而不是字符 + // value = value.replace(/\.{1,}/g, "."); //只保留第一个.清除多余的 + // value = value.replace(".", "$#$").replace(/\./g, "").replace("$#$", "."); + // value = value.replace(/^(\-)*(\d*)\.(\d\d).*$/, "$1$2.$3"); //只能输入两个小数 + // value = + // value.indexOf(".") > 0 + // ? value.split(".")[0].substring(0, 10) + "." + value.split(".")[1] + // : value.substring(0, 10); + // return value; + // }, + // checkInput3() { + // this.form.middleStandardScore = this.dealInputVal( + // this.form.middleStandardScore + // ); + // }, + // dealInputVal(value) { + // value = value.replace(/^0*(0\.|[1-9])/, "$1"); + // value = value.replace(/[^\d.]/g, ""); //清除"数字"和"."以外的字符 + // value = value.replace(/^\./g, ""); //验证第一个字符是数字而不是字符 + // value = value.replace(/\.{1,}/g, "."); //只保留第一个.清除多余的 + // value = value.replace(".", "$#$").replace(/\./g, "").replace("$#$", "."); + // value = value.replace(/^(\-)*(\d*)\.(\d\d).*$/, "$1$2.$3"); //只能输入两个小数 + // value = + // value.indexOf(".") > 0 + // ? value.split(".")[0].substring(0, 10) + "." + value.split(".")[1] + // : value.substring(0, 10); + // return value; + // }, + // checkInput4() { + // this.form.smallStandardScore = this.dealInputVal( + // this.form.smallStandardScore + // ); + // }, + // dealInputVal(value) { + // value = value.replace(/^0*(0\.|[1-9])/, "$1"); + // value = value.replace(/[^\d.]/g, ""); //清除"数字"和"."以外的字符 + // value = value.replace(/^\./g, ""); //验证第一个字符是数字而不是字符 + // value = value.replace(/\.{1,}/g, "."); //只保留第一个.清除多余的 + // value = value.replace(".", "$#$").replace(/\./g, "").replace("$#$", "."); + // value = value.replace(/^(\-)*(\d*)\.(\d\d).*$/, "$1$2.$3"); //只能输入两个小数 + // value = + // value.indexOf(".") > 0 + // ? value.split(".")[0].substring(0, 10) + "." + value.split(".")[1] + // : value.substring(0, 10); + // return value; + // }, + + // checkInput5() { + // this.form.unifiedStandardScore = this.dealInputVal( + // this.form.unifiedStandardScore + // ); + // }, + // dealInputVal(value) { + // value = value.replace(/^0*(0\.|[1-9])/, "$1"); + // value = value.replace(/[^\d.]/g, ""); //清除"数字"和"."以外的字符 + // value = value.replace(/^\./g, ""); //验证第一个字符是数字而不是字符 + // value = value.replace(/\.{1,}/g, "."); //只保留第一个.清除多余的 + // value = value.replace(".", "$#$").replace(/\./g, "").replace("$#$", "."); + // value = value.replace(/^(\-)*(\d*)\.(\d\d).*$/, "$1$2.$3"); //只能输入两个小数 + // value = + // value.indexOf(".") > 0 + // ? value.split(".")[0].substring(0, 10) + "." + value.split(".")[1] + // : value.substring(0, 10); + // return value; + // }, + delInput(index) { this.form.itemLevelList.splice(index, 1); console.log(this.form.itemLevelList); From 26bb3f4ab610ef6f177c6c00b8d7862fe939887d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E8=BE=89?= <814457906@qq.com> Date: Wed, 24 Aug 2022 17:38:47 +0800 Subject: [PATCH 15/31] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- src/api/system/testItemCityScore.js | 9 + src/api/system/testItemCountryScore.js | 11 +- src/api/system/testItemScore.js | 8 + src/views/system/classconstitution/index.vue | 55 +- src/views/system/quality/index.vue | 6 +- src/views/system/shape/index.vue | 21 +- src/views/system/survey/index.vue | 626 ++++++++++-------- src/views/system/testItemCityScore/index.vue | 152 ++++- .../system/testItemCountryScore/index.vue | 132 +++- src/views/system/testItemScore/index.vue | 92 ++- 11 files changed, 690 insertions(+), 424 deletions(-) diff --git a/.env.development b/.env.development index 9cd36f7..dd5ac82 100644 --- a/.env.development +++ b/.env.development @@ -5,7 +5,7 @@ VUE_APP_TITLE = 幼儿园体质检测管理系统 ENV = 'development' # 若依管理系统/开发环境 -VUE_APP_BASE_API = 'http://192.168.16.62:8089' +VUE_APP_BASE_API = 'http://192.168.16.81:8080' #'/dev-api' # 路由懒加载 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..e9be007 100644 --- a/src/api/system/testItemScore.js +++ b/src/api/system/testItemScore.js @@ -77,3 +77,11 @@ export function delTestItemScore(id) { method: 'delete' }) } +// 反显 +export function getAllTestItemScoreInfo(query) { + return request({ + url: '/system/testItemScore/getAllTestItemScoreInfo', + method: 'get', + params: query + }) +} \ No newline at end of file diff --git a/src/views/system/classconstitution/index.vue b/src/views/system/classconstitution/index.vue index 9f40d0d..31ac081 100644 --- a/src/views/system/classconstitution/index.vue +++ b/src/views/system/classconstitution/index.vue @@ -489,11 +489,17 @@ export default { ClassListinfo() { ClassList(this.ClassListlist).then((res) => { console.log(res); + var yseries = []; + var name = ""; + var names = []; + var ydata = []; if (res.data == [] || !res.data) { this.itemshow2 = true; this.itemshow = false; } else { + + this.listname = []; this.totalAvgFraction = res.data.totalAvgFraction; this.categoryTableNameList = res.data.categoryTableNameList; this.categoryAgeFractionList = res.data.categoryAgeFractionList; @@ -505,7 +511,6 @@ export default { }); }); let yname = []; - this.categoryScoreList.forEach((el) => { yname.push(el.className); var listname = list.map((e) => { @@ -533,6 +538,28 @@ export default { el.list = list1; }); console.log(this.categoryScoreList); + console.log(this.listname); + for (var i = 0; i < this.listname.length; i++) { + name = this.categoryScoreList[0].categoryScoreList[i].categoryName; + ydata = [ + this.categoryScoreList[0].list[i], + this.categoryScoreList[1].list[i], + this.categoryScoreList[2].list[i], + ]; + var obj = { + name: name, + type: "bar", + label: labelOption, + emphasis: { + focus: "series", + }, + data: ydata, + }; + console.log(ydata); + yseries.push(obj); + names.push(name); + } + console.log(yseries); var myChart = echarts.init(document.getElementById("chart")); @@ -628,30 +655,6 @@ export default { name: {}, }, }; - var yseries = []; - var name = ""; - var names = []; - - for (var i = 0; i < this.listname.length; i++) { - name = this.categoryScoreList[0].categoryScoreList[i].categoryName; - var ydata = [ - this.categoryScoreList[0].list[i], - this.categoryScoreList[1].list[i], - this.categoryScoreList[2].list[i], - ]; - var obj = { - name: name, - type: "bar", - label: labelOption, - emphasis: { - focus: "series", - }, - data: ydata, - }; - yseries.push(obj); - names.push(name); - } - console.log(yseries); option = { tooltip: { @@ -678,7 +681,7 @@ export default { series: yseries, }; - option && myChart.setOption(option); + option && myChart.setOption(option,true); this.itemshow2 = false; this.itemshow = true; } diff --git a/src/views/system/quality/index.vue b/src/views/system/quality/index.vue index d56830d..8912f29 100644 --- a/src/views/system/quality/index.vue +++ b/src/views/system/quality/index.vue @@ -758,8 +758,8 @@ export default { pageSize: 10, studentId: "", batchCode: "", - studentId: "27", - batchCode: "PC202208230011", + // studentId: "27", + // batchCode: "PC202208230011", // studentId: "14", // batchCode: "PC202208030005", // studentId: "9", @@ -776,7 +776,7 @@ export default { created() { this.getList(); this.class(); - this.studenttext(); + // this.studenttext(); }, methods: { //学生身体素质 diff --git a/src/views/system/shape/index.vue b/src/views/system/shape/index.vue index c6be1f4..937fb47 100644 --- a/src/views/system/shape/index.vue +++ b/src/views/system/shape/index.vue @@ -790,7 +790,12 @@ - +
BMI @@ -956,6 +961,7 @@ export default { return { itemshow: false, itemshow2: false, + itemshow3: false, showyey: true, showbj: true, total1: 0, @@ -963,7 +969,7 @@ export default { total3: 0, total4: 0, itemweight: "", - weightMax: 50, + weightMax: 70, weightMin: 10, itemheight: "", heightMax: 150, @@ -1069,8 +1075,14 @@ export default { studentanalysis() { analysis(this.analysisstudent).then((res) => { if (!res.data || res.data == "") { - this.itemshow2 = true; - this.itemshow = false; + } else if (res.data.bmiItemLevel == null) { + this.analysislist = res.data; + this.itemheight = res.data.heightScore; + this.bmiItemLevel = res.data.bmiItemLevel; + this.itemweight = res.data.weightScore; + this.itemshow2 = false; + this.itemshow3 = false; + this.itemshow = true; } else { this.analysislist = res.data; this.itemheight = res.data.heightScore; @@ -1131,6 +1143,7 @@ export default { option && myChart.setOption(option); this.itemshow2 = false; this.itemshow = true; + this.itemshow3 = true; } }); }, diff --git a/src/views/system/survey/index.vue b/src/views/system/survey/index.vue index 2c73a53..e0c7109 100644 --- a/src/views/system/survey/index.vue +++ b/src/views/system/survey/index.vue @@ -167,58 +167,60 @@ -
-
-
-
-
-
- - - - - +
+
+
+
+
+
+ - - - - - - - + + + + + + + + + +
+
- @@ -316,6 +318,9 @@ export default { yclassname1: [], yclassname2: [], yclassname3: [], + classscore1: [], + classscore2: [], + classscore3: [], }; }, mounted() {}, @@ -327,251 +332,290 @@ export default { methods: { ClassListinfo() { ClassList(this.classqueryParams).then((res) => { - if (res.rows == [] || !res.rows) { + console.log(res.rows.length); + if (res.rows.length == 0) { this.itemshow2 = true; this.itemshow = false; + console.log( + this.yclassname1, + this.yclassname2, + this.yclassname3, + this.classscore1, + this.classscore2, + this.classscore3 + ); + console.log(this.itemshow2); } else { - var classscore1 = []; - var classscore2 = []; - var classscore3 = []; - res.rows.forEach((e) => { - if (e.classType == this.LARGECLASS) { - this.yclassname1.push(e.className); - if ( - e.itemScoreAll == "" || - !e.itemScoreAll || - e.itemScoreAll == null - ) { - classscore1.push(0); - } else { - classscore1.push(e.itemScoreAll); - } - } else if (e.classType == this.MIDDLECLASS) { - this.yclassname2.push(e.className); - if ( - e.itemScoreAll == "" || - !e.itemScoreAll || - e.itemScoreAll == null - ) { - classscore2.push(0); - } else { - classscore2.push(e.itemScoreAll); - } - } else if (e.classType == this.SMALLCLASS) { - this.yclassname3.push(e.className); - if ( - e.itemScoreAll == "" || - !e.itemScoreAll || - e.itemScoreAll == null - ) { - classscore3.push(0); - } else { - classscore3.push(e.itemScoreAll); - } - } - }); - var app = {}; - var myChart = echarts.init(document.getElementById("main")); - var myChart2 = echarts.init(document.getElementById("main2")); - var myChart3 = echarts.init(document.getElementById("main3")); - var option; - var option2; - var option3; - const posList = [ - "left", - "right", - "top", - "bottom", - "inside", - "insideTop", - "insideLeft", - "insideRight", - "insideBottom", - "insideTopLeft", - "insideTopRight", - "insideBottomLeft", - "insideBottomRight", - ]; - app.configParameters = { - rotate: { - min: 0, - max: 90, - }, - align: { - options: { - left: "left", - center: "center", - right: "right", - }, - }, - verticalAlign: { - options: { - top: "top", - middle: "middle", - bottom: "bottom", - }, - }, - position: { - options: posList.reduce(function (map, pos) { - map[pos] = pos; - return map; - }, {}), - }, - distance: { - min: 0, - max: 100, - }, - }; - app.config = { - rotate: 0, - align: "center", - verticalAlign: "middle", - position: "top", - distance: 15, - onChange: function () { - const labelOption = { - rotate: app.config.rotate, - align: app.config.align, - verticalAlign: app.config.verticalAlign, - position: app.config.position, - distance: app.config.distance, - }; - myChart.setOption({ - series: [ - { - label: labelOption, - }, - { - label: labelOption, - }, - { - label: labelOption, - }, - { - label: labelOption, - }, - ], - }); - }, - }; - const labelOption = { - show: true, - position: app.config.position, - distance: app.config.distance, - align: app.config.align, - verticalAlign: app.config.verticalAlign, - rotate: app.config.rotate, - formatter: "{c}", - fontSize: 16, - rich: { - name: {}, - }, - }; - option = { - tooltip: { - trigger: "axis", - axisPointer: { - type: "shadow", - }, - }, - legend: {}, - xAxis: [ - { - type: "category", - axisTick: { show: false }, - data: this.yclassname1, - }, - ], - yAxis: [ - { - type: "value", - }, - ], - series: [ - { - type: "bar", - barGap: 0, - color: "#00B050", - label: labelOption, - emphasis: { - focus: "series", - }, - data: classscore1, - }, - ], - }; - option2 = { - tooltip: { - trigger: "axis", - axisPointer: { - type: "shadow", - }, - }, - legend: {}, - xAxis: [ - { - type: "category", - axisTick: { show: false }, - data: this.yclassname2, - }, - ], - yAxis: [ - { - type: "value", - }, - ], - series: [ - { - type: "bar", - barGap: 0, - color: "#00B050", - label: labelOption, - emphasis: { - focus: "series", - }, - data: classscore2, - }, - ], - }; - option3 = { - tooltip: { - trigger: "axis", - axisPointer: { - type: "shadow", - }, - }, - legend: {}, - xAxis: [ - { - type: "category", - axisTick: { show: false }, - data: this.yclassname3, - }, - ], - yAxis: [ - { - type: "value", - }, - ], - series: [ - { - type: "bar", - barGap: 0, - color: "#00B050", - label: labelOption, - emphasis: { - focus: "series", - }, - data: classscore3, - }, - ], - }; + this.$nextTick((e) => { + this.yclassname1 = []; + this.yclassname2 = []; + this.yclassname3 = []; + this.classscore1 = []; + this.classscore2 = []; + this.classscore3 = []; - option && myChart.setOption(option); - option2 && myChart2.setOption(option2); - option3 && myChart3.setOption(option3); - this.itemshow = true; - this.itemshow2 = false; + console.log(2); + res.rows.forEach((e) => { + if (e.classType == this.LARGECLASS) { + this.yclassname1.push(e.className); + if ( + e.itemScoreAll == "" || + !e.itemScoreAll || + e.itemScoreAll == null + ) { + this.classscore1.push(0); + } else { + this.classscore1.push(e.itemScoreAll); + } + } else if (e.classType == this.MIDDLECLASS) { + this.yclassname2.push(e.className); + if ( + e.itemScoreAll == "" || + !e.itemScoreAll || + e.itemScoreAll == null + ) { + this.classscore2.push(0); + } else { + this.classscore2.push(e.itemScoreAll); + } + } else if (e.classType == this.SMALLCLASS) { + s; + this.yclassname3.push(e.className); + if ( + e.itemScoreAll == "" || + !e.itemScoreAll || + e.itemScoreAll == null + ) { + this.classscore3.push(0); + } else { + this.classscore3.push(e.itemScoreAll); + } + } + }); + console.log(this.yclassname3, this.yclassname2); + if (this.yclassname1.length != 0) { + var myChart = echarts.init(document.getElementById("main")); + } + if (this.yclassname2.length != 0) { + var myChart2 = echarts.init(document.getElementById("main2")); + } + if (this.yclassname3.length != 0) { + var myChart3 = echarts.init(document.getElementById("main3")); + } + var myChart = echarts.init(document.getElementById("main")); + var myChart2 = echarts.init(document.getElementById("main2")); + var myChart3 = echarts.init(document.getElementById("main3")); + var app = {}; + + var option; + var option2; + var option3; + const posList = [ + "left", + "right", + "top", + "bottom", + "inside", + "insideTop", + "insideLeft", + "insideRight", + "insideBottom", + "insideTopLeft", + "insideTopRight", + "insideBottomLeft", + "insideBottomRight", + ]; + app.configParameters = { + rotate: { + min: 0, + max: 90, + }, + align: { + options: { + left: "left", + center: "center", + right: "right", + }, + }, + verticalAlign: { + options: { + top: "top", + middle: "middle", + bottom: "bottom", + }, + }, + position: { + options: posList.reduce(function (map, pos) { + map[pos] = pos; + return map; + }, {}), + }, + distance: { + min: 0, + max: 100, + }, + }; + app.config = { + rotate: 0, + align: "center", + verticalAlign: "middle", + position: "top", + distance: 15, + onChange: function () { + const labelOption = { + rotate: app.config.rotate, + align: app.config.align, + verticalAlign: app.config.verticalAlign, + position: app.config.position, + distance: app.config.distance, + }; + myChart.setOption({ + series: [ + { + label: labelOption, + }, + { + label: labelOption, + }, + { + label: labelOption, + }, + { + label: labelOption, + }, + ], + }); + }, + }; + const labelOption = { + show: true, + position: app.config.position, + distance: app.config.distance, + align: app.config.align, + verticalAlign: app.config.verticalAlign, + rotate: app.config.rotate, + formatter: "{c}", + fontSize: 16, + rich: { + name: {}, + }, + }; + option = { + tooltip: { + trigger: "axis", + axisPointer: { + type: "shadow", + }, + }, + legend: {}, + xAxis: [ + { + type: "category", + axisTick: { show: false }, + data: this.yclassname1, + }, + ], + yAxis: [ + { + type: "value", + }, + ], + series: [ + { + type: "bar", + barGap: 0, + color: "#00B050", + label: labelOption, + emphasis: { + focus: "series", + }, + data: this.classscore1, + }, + ], + }; + option2 = { + tooltip: { + trigger: "axis", + axisPointer: { + type: "shadow", + }, + }, + legend: {}, + xAxis: [ + { + type: "category", + axisTick: { show: false }, + data: this.yclassname2, + }, + ], + yAxis: [ + { + type: "value", + }, + ], + series: [ + { + type: "bar", + barGap: 0, + color: "#00B050", + label: labelOption, + emphasis: { + focus: "series", + }, + data: this.classscore2, + }, + ], + }; + option3 = { + tooltip: { + trigger: "axis", + axisPointer: { + type: "shadow", + }, + }, + legend: {}, + xAxis: [ + { + type: "category", + axisTick: { show: false }, + data: this.yclassname3, + }, + ], + yAxis: [ + { + type: "value", + }, + ], + series: [ + { + type: "bar", + barGap: 0, + color: "#00B050", + label: labelOption, + emphasis: { + focus: "series", + }, + data: this.classscore3, + }, + ], + }; + + if (this.yclassname1.length != 0) { + option && myChart.setOption(option); + } + if (this.yclassname2.length != 0) { + option2 && myChart2.setOption(option2); + } + if (this.yclassname3.length != 0) { + option3 && myChart3.setOption(option3); + } + + // option && myChart.setOption(option); + // option2 && myChart2.setOption(option2); + // option3 && myChart3.setOption(option3); + this.itemshow = true; + this.itemshow2 = false; + }); } }); }, diff --git a/src/views/system/testItemCityScore/index.vue b/src/views/system/testItemCityScore/index.vue index 30ca91b..3e3ed16 100644 --- a/src/views/system/testItemCityScore/index.vue +++ b/src/views/system/testItemCityScore/index.vue @@ -171,25 +171,42 @@ :options="areaList" placeholder="请选择所属区域" v-model="form.areaId" + @input="inputChange" /> {{ xmname }} {{ xmname }} - + + + + + + - - - - - - - - -