修改bug

This commit is contained in:
曹辉 2022-08-25 14:24:37 +08:00
parent 26bb3f4ab6
commit 3e999a38e6
16 changed files with 673 additions and 254 deletions

View File

@ -5,7 +5,7 @@ VUE_APP_TITLE = 幼儿园体质检测管理系统
ENV = 'development'
# 若依管理系统/开发环境
VUE_APP_BASE_API = 'http://192.168.16.81:8080'
VUE_APP_BASE_API = 'http://192.168.16.81:8081'
#'/dev-api'
# 路由懒加载

View File

@ -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({

View File

@ -176,8 +176,7 @@
<span>幼儿园名称:</span
><span style="margin-left: 20px; margin-right: 10px">{{
analysislist.kindergartenName
}}</span
>
}}</span>
<span style="margin-left: 50px">幼儿园性质:</span
><span style="margin-left: 20px; margin-right: 20px">{{
@ -530,6 +529,7 @@ export default {
label: {
show: true,
formatter: "{d}%", //
position: "inside",
},
labelLine: { show: true },
color: function (colors) {
@ -611,6 +611,9 @@ export default {
this.analysisqueryParams.kindergartenId = row.id;
this.kindergartenName = row.kindergartenName;
this.kindergartenId = row.id;
if (this.analysisqueryParams.batchCode != "") {
this.analysisinfo();
}
this.kindergartenshow = false;
},

View File

@ -372,7 +372,7 @@
>
</el-table-column>
<el-table-column
prop="itemFraction"
prop="itemFraction"
label="动作技能总分"
width="120"
align="center"
@ -559,8 +559,8 @@ export default {
pageSize: 10,
// studentId: "10",
// batchCode: "PC202208030005",
// studentId: "",
// batchCode: "",
studentId: "",
batchCode: "",
},
};
},
@ -634,23 +634,21 @@ export default {
}
},
//
listActioninfo() {
listAction(this.queryParams).then((res) => {
if (!res.rows || res.rows == "") {
this.itemshow2 = true;
this.itemshow = false;
this.batchCodeName = "请选择批次";
this.batchCodeId = "";
} else {
// res.rows.itemCategoryList.forEach((e) => {
// e.push(res.rows.categoryName);
// });
this.actionlist = res.rows;
this.actionforeach();
this.itemshow = true;
this.itemshow2 = false;
this.actionlist = res.rows;
console.log(this.actionlist);
this.actionforeach();
}
});
},
@ -665,10 +663,6 @@ export default {
},
//
batchCodeshowclick() {
this.spanArr = [];
this.position = 0; //
this.spanArr2 = [];
this.position2 = 0; //
if (this.queryParams.studentId == "") {
this.$message.error("请先选择学生");
} else {
@ -678,6 +672,11 @@ export default {
},
//
batchCodeclick(row) {
this.spanArr = [];
this.position = 0; //
this.spanArr2 = [];
this.position2 = 0; //
console.log(row);
this.batchCodeName = row.batchName;
this.batchCodeId = row.id;
this.queryParams.batchCode = row.batchCode;
@ -691,13 +690,6 @@ export default {
this.total4 = res.total;
});
},
//
studentclick(row) {
this.studentname = row.studentName;
this.studentId = row.id;
this.studentshow = false;
this.queryParams.studentId = row.id;
},
//
studentlist() {
listStudentInfo(this.studentqueryParams).then((res) => {
@ -731,6 +723,19 @@ export default {
//
classcancel() {
this.classshow = false;
}, //
studentclick(row) {
this.spanArr = [];
this.position = 0; //
this.spanArr2 = [];
this.position2 = 0; //
this.studentname = row.studentName;
this.studentId = row.id;
this.studentshow = false;
this.queryParams.studentId = row.id;
if (this.queryParams.batchCode != "") {
this.listActioninfo();
}
},
//
classclick(row) {
@ -738,6 +743,9 @@ export default {
this.className = row.className;
this.classId = row.id;
this.studentqueryParams.classId = row.id;
this.studentname = "请选择学生";
this.studentId = "";
this.queryParams.studentId = "";
this.classshow = false;
},
//
@ -745,6 +753,12 @@ export default {
this.classqueryParams.kindergartenId = row.id;
this.kindergartenName = row.kindergartenName;
this.kindergartenId = row.id;
this.kindergartenId = row.id;
this.className = "请选择班级";
this.classId = "";
this.studentname = "请选择学生";
this.studentId = "";
this.queryParams.studentId = "";
this.kindergartenshow = false;
},
//

View File

@ -498,7 +498,6 @@ export default {
this.itemshow2 = true;
this.itemshow = false;
} else {
this.listname = [];
this.totalAvgFraction = res.data.totalAvgFraction;
this.categoryTableNameList = res.data.categoryTableNameList;
@ -681,7 +680,7 @@ export default {
series: yseries,
};
option && myChart.setOption(option,true);
option && myChart.setOption(option, true);
this.itemshow2 = false;
this.itemshow = true;
}
@ -740,6 +739,9 @@ export default {
this.classId = row.id;
this.ClassListlist.classId = row.id;
this.classshow = false;
if (this.ClassListlist.batchCode != "") {
this.ClassListinfo();
}
},
//
kindergartenNameclick(row) {
@ -747,6 +749,9 @@ export default {
this.ClassListlist.kindergartenId = row.id;
this.kindergartenName = row.kindergartenName;
this.kindergartenId = row.id;
this.className = "请选择班级";
this.classId = "";
this.ClassListlist.classId = "";
this.kindergartenshow = false;
},
//

View File

@ -816,6 +816,9 @@ export default {
this.studentId = row.id;
this.studentshow = false;
this.synthesizelist.studentId = row.id;
if (this.synthesizelist.batchCode != "") {
this.synthesizeinfo();
}
},
//
studentlist() {
@ -858,10 +861,18 @@ export default {
this.classId = row.id;
this.studentqueryParams.classId = row.id;
this.classshow = false;
this.studentname = "请选择学生";
this.studentId = "";
this.synthesizelist.studentId = "";
},
//
kindergartenNameclick(row) {
this.classqueryParams.kindergartenId = row.id;
this.className = "请选择班级";
this.classId = "";
this.studentname = "请选择学生";
this.studentId = "";
this.synthesizelist.studentId = "";
this.kindergartenName = row.kindergartenName;
this.kindergartenId = row.id;
this.kindergartenshow = false;

View File

@ -513,7 +513,7 @@ export default {
options() {
var myEchart = document.getElementsByClassName("bar");
// var myEchart = document.querySelectorAll(".bar");
for (var i = 0; i <= this.analysislist.itemScoreList.length; i++) {
for (var i = 0; i < this.analysislist.itemScoreList.length; i++) {
var ydata = [
this.analysislist.itemScoreList[i].itemScore,
this.analysislist.itemScoreList[i].schoolAvgScore,
@ -659,13 +659,7 @@ export default {
this.total4 = res.total;
});
},
//
studentclick(row) {
this.studentname = row.studentName;
this.studentId = row.id;
this.studentshow = false;
this.analysisqueryParams.studentId = row.id;
},
//
studentlist() {
listStudentInfo(this.studentqueryParams).then((res) => {
@ -700,12 +694,25 @@ export default {
classcancel() {
this.classshow = false;
},
//
studentclick(row) {
this.studentname = row.studentName;
this.studentId = row.id;
this.studentshow = false;
this.analysisqueryParams.studentId = row.id;
if (this.analysisqueryParams.batchCode != "") {
this.analysislists();
}
},
//
classclick(row) {
// console.log(row);
this.className = row.className;
this.classId = row.id;
this.studentqueryParams.classId = row.id;
this.studentname = "请选择学生";
this.studentId = "";
this.analysisqueryParams.studentId = "";
this.classshow = false;
},
//
@ -713,6 +720,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.analysisqueryParams.studentId = "";
this.kindergartenshow = false;
},
//

View File

@ -43,6 +43,7 @@
:key="item.name"
:label="item.name"
:value="item.type"
@click.native="classTypeclick"
>
</el-option>
</el-select>
@ -281,7 +282,7 @@
<div slot="header" style="text-align: center">
<img style="width: 40px" src="@/icons/笑脸.png" alt="" />
<div><!-- card title -->此批次暂无结果分析</div>
<div><!-- card title -->此批次暂无数据</div>
</div>
<!-- card body -->
</el-card>
@ -419,11 +420,18 @@ export default {
kindergartencancel() {
this.kindergartenshow = false;
},
//classTypeclick
classTypeclick() {
if (this.analysislist.batchCode != "") {
this.analysisinfo();
}
},
//
kindergartenNameclick(row) {
this.analysislist.kindergartenId = row.id;
this.kindergartenName = row.kindergartenName;
this.kindergartenId = row.id;
this.analysislist.classType = "";
this.kindergartenshow = false;
},
//

View File

@ -279,10 +279,10 @@ export default {
analysislist: [],
//
analysisqueryParams: {
// kindergartenId: "",
// batchCode: "",
kindergartenId: "18",
batchCode: "PC202208030005",
kindergartenId: "",
batchCode: "",
// kindergartenId: "18",
// batchCode: "PC202208030005",
},
// weightAndHeightAvgScoreList: [
@ -322,8 +322,8 @@ export default {
analysisinfo() {
analysis(this.analysisqueryParams).then((res) => {
if (!res.data) {
this.itemshow2=true;
this.itemshow=false;
this.itemshow2 = true;
this.itemshow = false;
} else {
this.analysislist = res.data;
console.log(this.analysislist);
@ -597,6 +597,9 @@ export default {
this.kindergartenName = row.kindergartenName;
this.kindergartenId = row.id;
this.kindergartenshow = false;
if (this.analysisqueryParams.batchCode != "") {
this.analysisinfo();
}
},
getList() {

View File

@ -32,6 +32,7 @@
:key="item.value"
:label="item.label"
:value="item.value"
@click.native="sexclick"
>
</el-option>
</el-select>
@ -192,7 +193,7 @@
style="
position: relative;
display: inline-block;
width: 80px;
width: 120px;
text-align: center;
"
v-for="(item, index) in firstCategoryScoreList"
@ -206,22 +207,25 @@
</span>
<span
:style="index != 0 ? 'left:18px' : ''"
style="position: absolute; left: 0px; top: 20px; width: 80px"
style="position: absolute; left: 0px; top: 20px; width: 120px"
>{{ item.categoryName }}</span
>
</span>
</div>
<div style="display: inline-block; position: relative">
<span style="margin: 0 20px">= </span>
<span>{{ totalAvgFraction }}</span>
<span style="display: inline-block; width: 100px">{{
totalAvgFraction
}}</span>
<span
style="
display: inline-block;
position: absolute;
top: 20px;
width: 80px;
width: 100px;
left: 40px;
margin: 0 20px;
"
>(综合得分)</span
>
@ -252,7 +256,8 @@
width: 120px;
line-height: 60px;
border: 1px solid #f0f0f0;
background: #f0f0f0;
background: #27848b;
color: #fff;
"
>
年龄
@ -262,7 +267,8 @@
width: 120px;
line-height: 60px;
border: 1px solid #f0f0f0;
background: #f0f0f0;
background: #27848b;
color: #fff;
"
>
平均总分
@ -273,7 +279,8 @@
text-align: center;
line-height: 30px;
border: 1px solid #f0f0f0;
background: #f0f0f0;
background: #27848b;
color: #fff;
"
>
{{ item.parentName }}
@ -283,7 +290,8 @@
display: flex;
line-height: 30px;
border: 1px solid #f0f0f0;
background: #f0f0f0;
background: #27848b;
color: #fff;
"
>
<div
@ -539,9 +547,13 @@ export default {
},
//
batchCodeshowclick() {
if (this.analysisqueryParams.kindergartenId == "") {
if (
this.analysisqueryParams.kindergartenId == "" ||
this.analysisqueryParams.kindergartenId == null
) {
this.$message.error("请先选择幼儿园");
} else {
console.log(1);
this.testScore();
this.batchCodeshow = true;
}
@ -561,12 +573,28 @@ export default {
kindergartencancel() {
this.kindergartenshow = false;
},
//
sexclick() {
console.log(this.analysisqueryParams);
if (
this.analysisqueryParams.kindergartenId != "" &&
this.analysisqueryParams.batchCode != ""
) {
this.analysisinfo();
}
},
//
kindergartenNameclick(row) {
this.analysisqueryParams.kindergartenId = row.id;
this.kindergartenName = row.kindergartenName;
this.kindergartenId = row.id;
this.kindergartenshow = false;
if (
this.analysisqueryParams.batchCode != "" &&
this.analysisqueryParams.studentSex != ""
) {
this.analysisinfo();
}
},
getList() {

View File

@ -835,6 +835,9 @@ export default {
this.studentId = row.id;
this.studentshow = false;
this.studentscore.studentId = row.id;
if (this.studentscore.batchCode != "") {
this.studenttext();
}
},
//
@ -878,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;
},
//
@ -885,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;
},
//

View File

@ -387,8 +387,11 @@
style="text-align: center"
>
<div class="cell">
{{ analysislist.heightName }}:
{{ analysislist.heightScore
{{
analysislist.heightName
? analysislist.heightName
: "身高"
}}: {{ analysislist.heightScore
}}{{ analysislist.heightMeasureUnit }}
</div>
</td>
@ -397,8 +400,11 @@
style="text-align: center"
>
<div class="cell">
{{ analysislist.weightName }}:
{{ analysislist.weightScore
{{
analysislist.weightName
? analysislist.weightName
: "体重"
}}: {{ analysislist.weightScore
}}{{ analysislist.weightMeasureUnit }}
</div>
</td>
@ -435,6 +441,7 @@
style="height: 310px"
>
<div
v-show="heightshow"
slot="header"
style="text-align: center; font-size: 12px; padding-top: 20px"
>
@ -610,6 +617,7 @@
<div
slot="header"
v-show="weightshow"
style="
text-align: center;
margin-top: 20px;
@ -961,7 +969,9 @@ export default {
return {
itemshow: false,
itemshow2: false,
itemshow3: false,
itemshow3: true,
weightshow: true,
heightshow: true,
showyey: true,
showbj: true,
total1: 0,
@ -973,7 +983,7 @@ export default {
weightMin: 10,
itemheight: "",
heightMax: 150,
heightMin: 50,
heightMin: 30,
//
kindergartenshow: false,
classshow: false,
@ -1075,6 +1085,27 @@ export default {
studentanalysis() {
analysis(this.analysisstudent).then((res) => {
if (!res.data || res.data == "") {
this.itemshow2 = true;
this.itemshow3 = false;
this.itemshow = false;
} else if (res.data.weightScore == 0 || res.data.weightScore == null) {
this.weightshow = false;
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 if (res.data.heightScore == 0 || res.data.heightScore == null) {
this.heightshow = false;
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 if (res.data.bmiItemLevel == null) {
this.analysislist = res.data;
this.itemheight = res.data.heightScore;
@ -1186,6 +1217,9 @@ export default {
this.studentId = row.id;
this.studentshow = false;
this.analysisstudent.studentId = row.id;
if (this.analysisstudent.batchCode != "") {
this.studentanalysis();
}
},
//
studentlist() {
@ -1227,6 +1261,9 @@ export default {
this.className = row.className;
this.classId = row.id;
this.studentqueryParams.classId = row.id;
this.studentname = "请选择学生";
this.studentId = "";
this.analysisstudent.studentId = "";
this.classshow = false;
},
//
@ -1234,6 +1271,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.analysisstudent.studentId = "";
this.kindergartenshow = false;
},
//

View File

@ -211,7 +211,7 @@
>
</el-table-column>
<el-table-column
property="sum"
property="itemFraction"
label="分数"
width="140"
align="center"
@ -621,7 +621,7 @@ export default {
},
StudentListinfo() {
StudentList(this.studentlistqueryParams).then((res) => {
if (res.rows == [] || !res.rows) {
if (res.rows.length == 0) {
this.itemshow2 = true;
this.itemshow = false;
} else {
@ -643,7 +643,10 @@ export default {
},
//
batchCodeshowclick() {
if (this.classqueryParams.kindergartenId == "") {
if (
this.classqueryParams.kindergartenId == "" ||
this.classqueryParams.kindergartenId == null
) {
this.$message.error("请先选择幼儿园");
} else {
this.testScore();
@ -671,6 +674,13 @@ export default {
this.studentlistqueryParams.kindergartenId = row.id;
this.kindergartenName = row.kindergartenName;
this.kindergartenId = row.id;
if (
this.studentlistqueryParams.batchCode != "" &&
this.classqueryParams.batchCode != ""
) {
this.StudentListinfo();
this.ClassListinfo();
}
this.kindergartenshow = false;
},

View File

@ -302,18 +302,24 @@
<el-dialog
:title="title"
:visible.sync="open"
width="550px"
width="1000px"
append-to-body
:before-close="cancel"
>
<el-form ref="form" :model="form2" :rules="rules" label-width="130px">
<el-form
ref="form"
:model="form2"
:rules="rules"
label-width="110px"
:inline="true"
>
<el-form-item label="所属幼儿园" prop="classId">
<el-button
type=""
@click="yryinnerVisible = true"
v-if="kindergartenName == '请选择幼儿园'"
style="
width: 360px;
width: 200px;
text-align: left;
height: 36px;
color: #c0c4cc;
@ -327,7 +333,7 @@
@click="yryinnerVisible = true"
v-else
style="
width: 360px;
width: 200px;
text-align: left;
height: 36px;
padding-left: -10px;
@ -342,7 +348,7 @@
@click="handleQuery2"
v-if="xmname == '请选择所属班级'"
style="
width: 360px;
width: 200px;
text-align: left;
height: 36px;
color: #c0c4cc;
@ -356,7 +362,7 @@
@click="handleQuery2"
v-else
style="
width: 360px;
width: 200px;
text-align: left;
height: 36px;
padding-left: -10px;
@ -372,7 +378,7 @@
@click="studentinfoclick"
v-if="stname == '请选择学生姓名'"
style="
width: 360px;
width: 200px;
text-align: left;
height: 36px;
color: #c0c4cc;
@ -386,7 +392,7 @@
@click="studentinfoclick"
v-else
style="
width: 360px;
width: 200px;
text-align: left;
height: 36px;
padding-left: -10px;
@ -395,6 +401,68 @@
>
</el-form-item>
<el-form-item label="批次编号" prop="batchCode">
<el-button
this.itemNumbername="row.batchCode;"
type=""
@click="innerVisible4 = true"
v-if="itemNumbername == '请选择批次编号'"
style="
width: 360px;
text-align: left;
height: 36px;
color: #c0c4cc;
padding-left: -10px;
"
>{{ itemNumbername }}</el-button
>
<el-button
type=""
@click="innerVisible4 = true"
v-else
style="
width: 360px;
text-align: left;
height: 36px;
padding-left: -10px;
"
>{{ itemNumbername }}</el-button
>
</el-form-item>
<el-form-item label="测试项目名称" prop="testItemId">
<div
style="margin-bottom: 10px"
>项目名称:
<el-input
placeholder="级别名"
style="width: 75px; margin-right: 10px"
/>
<el-input
placeholder="最低分"
style="width: 75px; margin-right: 5px"
/><el-input
placeholder="最高分"
style="width: 75px; margin-right: 5px"
/>
<el-button
type="info"
circle
plain
icon="el-icon-circle-plus-outline"
></el-button>
<el-button
type="danger"
icon="el-icon-delete"
circle
plain
></el-button>
</div>
</el-form-item>
<el-form-item label="测试项目名称" prop="testItemId">
<el-button
this.testname="row.itemName;"
@ -426,34 +494,6 @@
>
</el-form-item>
<el-form-item label="批次编号" prop="batchCode">
<el-button
this.itemNumbername="row.batchCode;"
type=""
@click="innerVisible4 = true"
v-if="itemNumbername == '请选择批次编号'"
style="
width: 360px;
text-align: left;
height: 36px;
color: #c0c4cc;
padding-left: -10px;
"
>{{ itemNumbername }}</el-button
>
<el-button
type=""
@click="innerVisible4 = true"
v-else
style="
width: 360px;
text-align: left;
height: 36px;
padding-left: -10px;
"
>{{ itemNumbername }}</el-button
>
</el-form-item>
<el-form-item
label="个人成绩"

View File

@ -948,112 +948,6 @@ 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);

View File

@ -1,6 +1,13 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
>
<el-form-item label="批次编号" prop="batchCode">
<el-input
v-model="queryParams.batchCode"
@ -18,8 +25,16 @@
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
@ -32,7 +47,8 @@
size="mini"
@click="handleAdd"
v-hasPermi="['system:testScoreBatch:add']"
>新增</el-button>
>新增</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
@ -43,7 +59,8 @@
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:testScoreBatch:edit']"
>修改</el-button>
>修改</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
@ -54,7 +71,8 @@
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:testScoreBatch:remove']"
>删除</el-button>
>删除</el-button
>
</el-col>
<!-- <el-col :span="1.5">
<el-button
@ -66,10 +84,17 @@
v-hasPermi="['system:testScoreBatch:export']"
>导出</el-button>
</el-col> -->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="testScoreBatchList" @selection-change="handleSelectionChange">
<el-table
v-loading="loading"
:data="testScoreBatchList"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="主键id" align="center" prop="id" /> -->
<el-table-column label="批次编号" align="center" prop="batchCode" />
@ -79,65 +104,312 @@
<el-table-column label="创建时间" align="center" prop="createTime" />
<el-table-column label="修改人" align="center" prop="updateBy" />
<el-table-column label="修改时间" align="center" prop="updateTime" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-search"
@click="seeitem(scope.row)"
v-hasPermi="['system:studentInfo:edit']"
>查看</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:testScoreBatch:edit']"
>修改</el-button>
>修改</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:testScoreBatch:remove']"
>删除</el-button>
>删除</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改测试成绩批次对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<!-- 添加或修改测试批次对话框 -->
<el-dialog
:title="title"
:visible.sync="open"
width="1000px"
append-to-body
>
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="80px"
:inline="true"
>
<!-- <el-form-item label="批次编号" prop="batchCode">
<el-input v-model.number="form.batchCode" placeholder="请输入批次编号" />
</el-form-item> -->
<el-form-item label="批次名称" prop="batchName">
<el-input v-model="form.batchName" placeholder="请输入批次名称" maxlength="30" />
<el-input
v-model="form.batchName"
placeholder="请输入批次名称"
maxlength="30"
/>
</el-form-item>
<el-form-item label="备注信息" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注信息" />
</el-form-item>
<!-- <el-form-item label="是否删除01是" prop="delFlag">
<el-input v-model="form.delFlag" placeholder="请输入是否删除01是" />
</el-form-item> -->
<el-form-item label="测试项目名称" prop="itemName" label-width="110px">
<el-button
this.testname="row.itemName;"
type=""
v-if="testname == '请添加测试项目'"
@click="innerVisible3 = true"
style="
width: 209px;
text-align: left;
height: 36px;
color: #c0c4cc;
padding-left: -10px;
"
>{{ testname }}</el-button
>
<el-button
this.testname="row.itemName;"
type=""
@click="innerVisible3 = true"
v-else
style="
width: 209px;
text-align: left;
height: 36px;
padding-left: -10px;
"
>继续添加测试项目</el-button
>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 测试项目弹窗 -->
<el-dialog
width="1000px"
title="选择测试项目名称"
:visible.sync="innerVisible3"
append-to-body
>
<el-form
:model="queryParams4"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="90px"
>
<el-form-item label="项目名称" prop="itemName">
<el-input
v-model="queryParams4.itemName"
placeholder="请输入项目名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery4"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table :data="testItemss">
<el-table-column label="请选择" width="70" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 15px; height: 15px"
circle
v-if="items.find((e) => e.itemId == scope.row.id)"
@click="deltestitem(scope.row)"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="addtestitem(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
property="itemName"
label="项目名称"
width="150"
align="center"
>
</el-table-column>
<el-table-column label="字典类型" align="center" prop="resultDictType">
<template slot-scope="scope">
{{
scope.row.resultDictType == ResultType1.dictCode
? ResultType1.dictLabel
: ""
}}{{
scope.row.resultDictType == ResultType2.dictCode
? ResultType2.dictLabel
: ""
}}</template
>
</el-table-column>
<el-table-column
property="itemCode"
label="测试项目编号"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="itemContent"
label="项目内容"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="measureUnit"
label="项目度量单位"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="largeStandardScore"
label="大班标准最高得分"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="middleStandardScore"
label="中班标准最高得分"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="smallStandardScore"
label="小班标准最高得分"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="unifiedStandardScore"
label="统一标准最高得分"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="sorting"
label="排序"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="remark"
label="项目概述"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="creatBy"
label="创建人"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="createTime"
label="创建时间"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="updateBy"
label="修改人"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="updateTime"
label="修改时间"
width="150"
align="center"
>
</el-table-column>
</el-table>
<pagination
v-show="total4 > 0"
:total="total4"
:page.sync="queryParams4.pageNum"
:limit.sync="queryParams4.pageSize"
@pagination="getList"
/>
</el-dialog>
</div>
</template>
<script>
import { listTestScoreBatch, getTestScoreBatch, delTestScoreBatch, addTestScoreBatch, updateTestScoreBatch } from "@/api/system/testScoreBatch";
import {
listTestScoreBatch,
getTestScoreBatch,
delTestScoreBatch,
addTestScoreBatch,
updateTestScoreBatch,
temBatchInfoList,
} from "@/api/system/testScoreBatch";
import { testItems } from "@/api/system/testItemScore";
import { tKindergartenInfo } from "@/api/system/kindergartenInfo";
export default {
name: "TestScoreBatch",
data() {
return {
itemResultType: "item_result_type",
ResultType1: "", //numberLeixing
ResultType2: "", //textleixing
innerVisible3: false,
//
loading: true,
//
@ -150,6 +422,9 @@ export default {
showSearch: true,
//
total: 0,
testItemss: [],
testname: "请添加测试项目",
total4: 0,
//
testScoreBatchList: [],
//
@ -163,6 +438,12 @@ export default {
batchCode: null,
batchName: null,
},
//
queryParams4: {
pageNum: 1,
pageSize: 10,
itemName: null,
},
//
form: {},
//
@ -171,26 +452,63 @@ export default {
// { required: true, message: "" },
// { type: "number", message: "", trigger: "blur" },
// ],
batchName:[
{ required: true, message: "批次名称不能为空" },
],
batchName:[
{ required: true, message: "批次名称不能为空" },
],
remark:[
{ required: true, message: "备注信息不能为空" },
],
}
itemName: [{ required: true, message: "请添加测试项目" }],
batchName: [{ required: true, message: "批次名称不能为空" }],
remark: [{ required: true, message: "备注信息不能为空" }],
},
items: [],
};
},
created() {
this.getList();
},
methods: {
deltestitem(item) {
this.items = this.items.filter((e) => {
return e.itemId != item.id;
});
},
addtestitem(item) {
var id = {
itemId: item.id,
};
this.items.push(id);
this.form.ItemBatchInfoIdList.push(id);
console.log(this.items);
},
seeitem(item) {
var id = {
batchId: item.id,
};
temBatchInfoList(id).then((res) => {
console.log(res);
});
},
handleQuery4() {
this.queryParams4.pageNum = 1;
testItems(this.queryParams4).then((response) => {
this.testItems = response.rows;
this.total = response.total;
this.loading = false;
this.getList();
});
},
/** 查询测试成绩批次列表 */
getList() {
tKindergartenInfo(this.itemResultType).then((res) => {
// console.log(res);
this.ResultType1 = res.data[0];
this.ResultType2 = res.data[1];
console.log(this.ResultType1, this.ResultType2);
});
//
testItems(this.queryParams4).then((res) => {
this.testItemss = res.rows;
this.total4 = res.total;
this.loading = false;
});
this.loading = true;
listTestScoreBatch(this.queryParams).then(response => {
listTestScoreBatch(this.queryParams).then((response) => {
this.testScoreBatchList = response.rows;
this.total = response.total;
this.loading = false;
@ -212,7 +530,8 @@ export default {
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
updateTime: null,
ItemBatchInfoIdList: [],
};
this.resetForm("form");
},
@ -225,12 +544,14 @@ export default {
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
this.queryParams.className = "";
this.queryParams4.itemName = null;
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
@ -241,8 +562,8 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getTestScoreBatch(id).then(response => {
const id = row.id || this.ids;
getTestScoreBatch(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改测试成绩批次";
@ -250,16 +571,16 @@ export default {
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateTestScoreBatch(this.form).then(response => {
updateTestScoreBatch(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addTestScoreBatch(this.form).then(response => {
addTestScoreBatch(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
@ -271,19 +592,27 @@ export default {
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除测试成绩批次的数据项?').then(function() {
return delTestScoreBatch(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
this.$modal
.confirm("是否确认删除测试成绩批次的数据项?")
.then(function () {
return delTestScoreBatch(ids);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/testScoreBatch/export', {
...this.queryParams
}, `testScoreBatch_${new Date().getTime()}.xlsx`)
}
}
this.download(
"system/testScoreBatch/export",
{
...this.queryParams,
},
`testScoreBatch_${new Date().getTime()}.xlsx`
);
},
},
};
</script>