Merge remote-tracking branch 'origin/dev'

This commit is contained in:
纪寒 2022-08-26 18:14:22 +08:00
commit c6e6bad20e
42 changed files with 8194 additions and 1201 deletions

View File

@ -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",

View File

@ -0,0 +1,10 @@
import request from '@/utils/request'
// 查询
export function analysis(query) {
return request({
url: '/kindergarten/side/analysis',
method: 'get',
params: query
})
}

10
src/api/system/action.js Normal file
View File

@ -0,0 +1,10 @@
import request from '@/utils/request'
// 查询
export function listAction(query) {
return request({
url: '/system/testActionDevelopment/listAction',
method: 'get',
params: query
})
}

View File

@ -0,0 +1,10 @@
import request from '@/utils/request'
// 查询
export function ClassList(query) {
return request({
url: '/system/testItemAvgScore/ClassList',
method: 'get',
params: query
})
}

View File

@ -0,0 +1,10 @@
import request from '@/utils/request'
// 查询
export function analysis(query) {
return request({
url: '/children/ranking/analysis',
method: 'get',
params: query
})
}

View File

@ -0,0 +1,10 @@
import request from '@/utils/request'
// 查询
export function analysis(query) {
return request({
url: '/physical/action/analysis',
method: 'get',
params: query
})
}

View File

@ -0,0 +1,10 @@
import request from '@/utils/request'
// 查询
export function analysis(query) {
return request({
url: '/average/heightAndWeight/analysis',
method: 'get',
params: query
})
}

View File

@ -0,0 +1,10 @@
import request from '@/utils/request'
// 查询
export function analysis(query) {
return request({
url: '/kindergarten/physique/analysis',
method: 'get',
params: query
})
}

View File

@ -3,14 +3,14 @@ import request from '@/utils/request'
//查询用户权限
export function getRoleInfo() {
return request({
url: 'common/getRoleInfo',
url: '/common/getRoleInfo',
method: 'get'
})
}
// 查询身体素质
export function testBodyScoreInfo(query) {
return request({
url: 'system/testBodyScoreInfo/listBody',
url: '/system/testBodyScoreInfo/listBody',
method: 'get',
params: query
})

21
src/api/system/survey.js Normal file
View File

@ -0,0 +1,21 @@
import request from '@/utils/request'
// 查询
export function StudentList(query) {
return request({
url: '/system/testAll/StudentList',
method: 'get',
params: query
})
}
// 查询
export function ClassList(query) {
return request({
url: '/system/testAll/ClassList',
method: 'get',
params: query
})
}

View File

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

View File

@ -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'
})
}
}

View File

@ -45,10 +45,12 @@ export function testScoreBatch(query) {
}
// 查询个人成绩录入管理详细
export function getTestItemScore(id) {
export function getTestItemScore(query) {
return request({
url: '/system/testItemScore/' + id,
method: 'get'
url: '/system/testItemScore/getInfo',
method: 'get',
params: query
})
}
@ -71,9 +73,17 @@ export function updateTestItemScore(data) {
}
// 删除个人成绩录入管理
export function delTestItemScore(id) {
export function delTestItemScore(studentId, batchCode) {
return request({
url: '/system/testItemScore/' + id,
method: 'delete'
url: '/system/testItemScore/deleteItemScore?studentId=' + studentId + '&batchCode=' + batchCode,
method: 'post',
})
}
// 反显
export function getAllTestItemScoreInfo(query) {
return request({
url: '/system/testItemScore/getAllTestItemScoreInfo',
method: 'get',
params: query
})
}

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({
@ -41,4 +50,4 @@ export function delTestScoreBatch(id) {
url: '/system/testScoreBatch/' + id,
method: 'delete'
})
}
}

View File

@ -82,7 +82,7 @@ export default {
[{ color: [] }, { background: [] }], //
[{ align: [] }], //
["clean"], //
["link", "image", "video"] //
// ["link", "image", "video"] //
],
},
placeholder: "请输入内容",

View File

@ -35,7 +35,7 @@ export default {
},
data() {
return {
title: '幼儿园体质检测管理系统',
title: '智慧幼儿体质评估与促进系统',
logo: logoImg
}
}
@ -66,10 +66,11 @@ export default {
width: 100%;
& .sidebar-logo {
width: 32px;
width: 18px;
height: 32px;
vertical-align: middle;
margin-right: 12px;
}
& .sidebar-title {
@ -81,6 +82,7 @@ export default {
font-size: 14px;
font-family: Avenir, Helvetica Neue, Arial, Helvetica, sans-serif;
vertical-align: middle;
}
}

View File

@ -0,0 +1,648 @@
<template>
<div class="app-container">
<el-form
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="90px"
>
<el-form-item label="所属幼儿园" prop="categoryName">
<el-button
@click="kindergartenshow = true"
v-if="kindergartenName == '请选择幼儿园'"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
>{{ kindergartenName }}</el-button
>
<el-button
@click="kindergartenshow = true"
style="width: 250px; text-align: left; height: 32px"
v-else
>{{ kindergartenName }}</el-button
>
</el-form-item>
<el-form-item label="所属批次" prop="categoryName" label-width="70px">
<el-button
@click="batchCodeshowclick"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
v-if="batchCodeName == '请选择批次'"
>{{ batchCodeName }}</el-button
>
<el-button
@click="batchCodeshowclick"
style="width: 250px; text-align: left; height: 32px"
v-else
>{{ batchCodeName }}</el-button
>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<!-- // -->
<el-dialog
width="590px"
title="选择批次"
:visible.sync="batchCodeshow"
append-to-body
style="margin-top: 20px"
:before-close="batchCodecancel"
>
<el-table :data="testScorelist" align="center" style="margin-top: 0px">
<el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 20px; height: 20px"
v-if="batchCodeId == scope.row.id"
circle
@click="batchCodeclick(scope.row)"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="batchCodeclick(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
property="batchCode"
label="批次编号"
width="200"
align="center"
/>
<el-table-column
property="batchName"
label="批次名称"
width="200"
align="center"
/>
</el-table>
<pagination
v-show="total4 > 0"
:total="total4"
:page.sync="testqueryParams.pageNum"
:limit.sync="testqueryParams.pageSize"
@pagination="testScore"
/>
</el-dialog>
<!-- // -->
<el-dialog
width="850px"
title="选择所属幼儿园"
:visible.sync="kindergartenshow"
append-to-body
:before-close="kindergartencancel"
>
<el-table :data="kindergartenList">
<el-table-column label="请选择" width="70" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 15px; height: 15px"
circle
@click="kindergartenNameclick(scope.row)"
v-if="kindergartenId == scope.row.id"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="kindergartenNameclick(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
property="kindergartenName"
label="幼儿园名字"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="kindergartenAddress"
label="幼儿园地址"
width="150"
align="center"
>
</el-table-column>
<el-table-column
label="幼儿园所在组织"
align="center"
prop="organizeName"
width="150"
>
</el-table-column>
<el-table-column
property="contacts"
label="联系人"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="phone"
label="联系电话"
width="150"
align="center"
>
</el-table-column>
</el-table>
<pagination
v-show="total1 > 0"
:total="total1"
:page.sync="kqueryParams.pageNum"
:limit.sync="kqueryParams.pageSize"
@pagination="getList"
/>
</el-dialog>
<el-row v-show="itemshow">
<el-col :span="24" class="card-box" style="">
<el-card>
<div slot="header" style="text-align: center; font-size: 20px">
<span>基本信息</span>
</div>
<div style="margin-left: 50px; text-align: center; margin-top: 20px">
<span>幼儿园名称:</span
><span style="margin-left: 20px; margin-right: 10px">{{
analysislist.kindergartenName
}}</span>
<span style="margin-left: 50px">幼儿园性质:</span
><span style="margin-left: 20px; margin-right: 20px">{{
analysislist.kindergartenType == type.dictValue
? type.dictLabel
: type2.dictLabel
}}</span>
<span style="margin-left: 50px">参与体测人数:</span
><span style="margin-left: 20px">{{
analysislist.testItemStudentCount
}}</span
>
<div style="display: flex; margin-top: 40px">
<div
slot="header"
style="width: 50%; text-align: center; font-size: 18px"
>
<span>本园参加体测各年龄阶段人数分部</span>
<div
id="main"
style="
width: 500px;
height: 300px;
margin: 0 auto;
padding-top: 40px;
"
></div>
</div>
<div
slot="header"
style="
width: 50%;
text-align: center;
font-size: 18px;
position: relative;
"
>
<span>本园体测成绩达标率(%)</span>
<span>
<span
style="
position: absolute;
top: 58%;
left: 47.5%;
font-size: 25px;
"
>{{ analysislist.standardRate }}%</span
>
<span
style="
position: absolute;
top: 67%;
left: 46.5%;
font-size: 16px;
"
>达标率</span
>
</span>
<div
id="main2"
style="
width: 500px;
height: 300px;
margin: 0 auto;
padding-top: 20px;
"
></div>
</div>
</div>
</div>
</el-card>
</el-col>
</el-row>
<el-row :gutter="20" v-if="itemshow2">
<el-col :span="24" :offset="0">
<el-card>
<div slot="header" style="text-align: center">
<img style="width: 40px" src="@/icons/笑脸.png" alt="" />
<div><!-- card title -->该幼儿园此批次暂无数据</div>
</div>
<!-- card body -->
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import * as echarts from "echarts";
import {
listKindergartenInfo,
tKindergartenInfo,
} from "@/api/system/kindergartenInfo";
import { getRoleInfo, testScoreBatch } from "@/api/system/quality";
import { analysis } from "@/api/system/KindergartenPhysicalTest";
export default {
name: "KindergartenPhysicalTest",
components: {},
data() {
return {
itemshow: false,
itemshow2: false,
total1: 0,
total4: 0,
//
kindergartenshow: false,
batchCodeshow: false,
//
showSearch: true,
//
form: {},
//
kindergartenType: "kindergarten_type",
type: {},
type2: {},
//
kqueryParams: {
pageNum: 1,
pageSize: 10,
organizeId: null,
kindergartenName: null,
kindergartenAddress: null,
kindergartenType: null,
phone: null,
contacts: null,
},
//list
kindergartenList: [],
//
kindergartenName: "请选择幼儿园",
//ID
kindergartenId: "",
//
batchCodeName: "请选择批次",
//ID
batchCodeId: "",
//list
testScorelist: [],
//
testqueryParams: {
pageNum: 1,
pageSize: 10,
},
analysislist: [],
//
analysisqueryParams: {
kindergartenId: "",
batchCode: "",
// kindergartenId: "18",
// batchCode: "PC202208030005",
},
};
},
mounted() {},
created() {
this.getList();
// this.analysisinfo();
},
methods: {
analysisinfo() {
analysis(this.analysisqueryParams).then((res) => {
if (res.data == [] || !res.data) {
this.itemshow2 = true;
this.itemshow = false;
} else {
this.analysislist = res.data;
console.log(this.analysislist);
this.options();
var app = {};
var myChart = echarts.init(document.getElementById("main"));
var option;
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: {
data: ["男", "女"],
},
xAxis: [
{
type: "category",
axisTick: { show: false },
data: ["3-4岁", "4-5岁", "5-6岁", "6岁以上"],
},
],
yAxis: [
{
type: "value",
},
],
series: [
{
name: "男",
type: "bar",
barGap: 0,
color: "#60C5F1",
label: labelOption,
emphasis: {
focus: "series",
},
data: [
this.analysislist.threeAndFourMaleCount,
this.analysislist.fourAndFiveMaleCount,
this.analysislist.fiveAndSixMaleCount,
this.analysislist.sixAndMoreMaleCount,
],
},
{
name: "女",
type: "bar",
color: "#98E0AD",
label: labelOption,
emphasis: {
focus: "series",
},
data: [
this.analysislist.threeAndFourFeMaleCount,
this.analysislist.fourAndFiveFeMaleCount,
this.analysislist.fiveAndSixFeMaleCount,
this.analysislist.sixAndMoreFeMaleCount,
],
},
],
};
option && myChart.setOption(option);
this.itemshow = true;
this.itemshow2 = false;
}
});
},
options() {
var chartDom = document.getElementById("main2");
var myChart = echarts.init(chartDom);
var option2;
option2 = {
tooltip: {
trigger: "item",
},
legend: {
top: "5%",
left: "center",
},
series: [
{
center: ["50%", "60%"],
itemStyle: {
normal: {
label: {
show: true,
formatter: "{d}%", //
position: "inside",
},
labelLine: { show: true },
color: function (colors) {
var colorList = [
"#5470c6",
"#fc8251",
"#91cd77",
"#ef6567",
"#f9c956",
"#75bedc",
];
return colorList[colors.dataIndex];
},
},
},
name: "",
type: "pie",
radius: ["40%", "70%"],
avoidLabelOverlap: false,
label: {
show: false,
position: "center",
},
emphasis: {
label: {
show: false,
fontSize: "20",
fontWeight: "bold",
},
},
labelLine: {
show: false,
},
data: [
{ value: this.analysislist.excellentRate, name: ">80优秀" },
{ value: this.analysislist.qualifyRate, name: "60-80合格" },
{ value: this.analysislist.unQualifyRate, name: "<60不合格" },
],
},
],
};
option2 && myChart.setOption(option2);
},
//
batchCodeclick(row) {
this.batchCodeName = row.batchName;
this.batchCodeId = row.id;
this.analysisqueryParams.batchCode = row.batchCode;
this.batchCodeshow = false;
this.analysisinfo();
},
//
batchCodeshowclick() {
if (this.analysisqueryParams.kindergartenId == "") {
this.$message.error("请先选择幼儿园");
} else {
this.testScore();
this.batchCodeshow = true;
}
},
//
testScore() {
testScoreBatch(this.testqueryParams).then((res) => {
this.testScorelist = res.rows;
this.total4 = res.total;
});
},
//
batchCodecancel() {
this.batchCodeshow = false;
},
//
kindergartencancel() {
this.kindergartenshow = false;
},
//
kindergartenNameclick(row) {
this.analysisqueryParams.kindergartenId = row.id;
this.kindergartenName = row.kindergartenName;
this.kindergartenId = row.id;
if (this.analysisqueryParams.batchCode != "") {
this.analysisinfo();
}
this.kindergartenshow = false;
},
getList() {
tKindergartenInfo(this.kindergartenType).then((res) => {
this.type = res.data[0];
this.type2 = res.data[1];
});
//
getRoleInfo().then((res) => {
console.log(res);
});
//list
listKindergartenInfo(this.kqueryParams).then((response) => {
this.kindergartenList = response.rows;
this.total1 = response.total;
// console.log(this.kindergartenList);
});
},
//
reset() {
this.form = {};
this.resetForm("form");
},
},
};
</script>
<style scoped='scss'>
::v-deep .el-card__header {
border: none;
}
</style>

View File

@ -0,0 +1,821 @@
<template>
<div class="app-container">
<el-form
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="90px"
>
<el-form-item label="所属幼儿园" prop="categoryName" v-if="showyey">
<el-button
@click="kindergartenshow = true"
v-if="kindergartenName == '请选择幼儿园'"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
>{{ kindergartenName }}</el-button
>
<el-button
@click="kindergartenshow = true"
style="width: 250px; text-align: left; height: 32px"
v-else
>{{ kindergartenName }}</el-button
>
</el-form-item>
<el-form-item
label="所属班级"
prop="categoryName"
label-width="70px"
v-if="showbj"
>
<el-button
@click="classshowclick"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
v-if="className == '请选择班级'"
>{{ className }}</el-button
>
<el-button
@click="classshowclick"
style="width: 250px; text-align: left; height: 32px"
v-else
>{{ className }}</el-button
>
</el-form-item>
<el-form-item label="学生" prop="categoryName" label-width="45px">
<el-button
@click="studentshowclick"
v-if="studentname == '请选择学生'"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
>{{ studentname }}</el-button
>
<el-button
@click="studentshowclick"
style="width: 250px; text-align: left; height: 32px"
v-else
>{{ studentname }}</el-button
>
</el-form-item>
<el-form-item label="所属批次" prop="categoryName" label-width="70px">
<el-button
@click="batchCodeshowclick"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
v-if="batchCodeName == '请选择批次'"
>{{ batchCodeName }}</el-button
>
<el-button
@click="batchCodeshowclick"
style="width: 250px; text-align: left; height: 32px"
v-else
>{{ batchCodeName }}</el-button
>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<!-- // -->
<el-dialog
width="590px"
title="选择批次"
:visible.sync="batchCodeshow"
append-to-body
style="margin-top: 20px"
:before-close="batchCodecancel"
>
<el-table :data="testScorelist" align="center" style="margin-top: 0px">
<el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 20px; height: 20px"
v-if="batchCodeId == scope.row.id"
circle
@click="batchCodeclick(scope.row)"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="batchCodeclick(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
property="batchCode"
label="批次编号"
width="200"
align="center"
/>
<el-table-column
property="batchName"
label="批次名称"
width="200"
align="center"
/>
</el-table>
<pagination
v-show="total4 > 0"
:total="total4"
:page.sync="testqueryParams.pageNum"
:limit.sync="testqueryParams.pageSize"
@pagination="testScore"
/>
</el-dialog>
<!-- // -->
<el-dialog
width="850px"
title="选择学生"
:visible.sync="studentshow"
append-to-body
style="margin-top: 70px"
:before-close="studentcancel"
>
<el-table :data="studentInfoList" align="center" style="margin-top: 10px">
<el-table-column label="请选择" width="70" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 20px; height: 20px"
circle
v-if="studentId == scope.row.id"
@click="studentclick(scope.row)"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="studentclick(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
property="className"
label="班级名称"
width="190"
align="center"
/>
<el-table-column
property="studentName"
label="学生姓名"
width="190"
align="center"
/>
<el-table-column
property="studentName"
label="性别"
width="190"
align="center"
>
<template slot-scope="scope">
{{ scope.row.studentSex == "MALE" ? "男" : "女" }}
</template>
</el-table-column>
<el-table-column
property="homeAddress"
label="住址"
width="190"
align="center"
/>
</el-table>
<pagination
v-show="total3 > 0"
:total="total3"
:page.sync="studentqueryParams.pageNum"
:limit.sync="studentqueryParams.pageSize"
@pagination="studentlist"
/>
</el-dialog>
<!-- // -->
<el-dialog
width="850px"
title="选择所属幼儿园"
:visible.sync="kindergartenshow"
append-to-body
:before-close="kindergartencancel"
>
<el-table :data="kindergartenList">
<el-table-column label="请选择" width="70" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 15px; height: 15px"
circle
@click="kindergartenNameclick(scope.row)"
v-if="kindergartenId == scope.row.id"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="kindergartenNameclick(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
property="kindergartenName"
label="幼儿园名字"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="kindergartenAddress"
label="幼儿园地址"
width="150"
align="center"
>
</el-table-column>
<el-table-column
label="幼儿园所在组织"
align="center"
prop="organizeName"
width="150"
>
</el-table-column>
<el-table-column
property="contacts"
label="联系人"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="phone"
label="联系电话"
width="150"
align="center"
>
</el-table-column>
</el-table>
<pagination
v-show="total1 > 0"
:total="total1"
:page.sync="kqueryParams.pageNum"
:limit.sync="kqueryParams.pageSize"
@pagination="getList"
/>
</el-dialog>
<!-- // -->
<el-dialog
width="1000px"
title="选择所属班级"
:visible.sync="classshow"
append-to-body
:before-close="classcancel"
>
<el-table :data="classinfoList" align="center" style="margin-top: 10px">
<el-table-column label="请选择" width="70" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 20px; height: 20px"
circle
@click="classclick(scope.row)"
v-if="classId == scope.row.id"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="classclick(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
property="kindergartenName"
label="幼儿园名称"
width="190"
align="center"
/>
<el-table-column
property="className"
label="班级名称"
width="180"
align="center"
>
</el-table-column>
<el-table-column
property="classType"
label="班级类型"
width="160"
align="center"
>
<template slot-scope="scope">
{{ scope.row.classType == dictValue1 ? "大班" : "" }}
{{ scope.row.classType == dictValue2 ? "中班" : "" }}
{{ scope.row.classType == dictValue3 ? "小班" : "" }}
{{ scope.row.classType == dictValue4 ? "毕业" : "" }}
</template>
</el-table-column>
<el-table-column
property="classTeacher"
label="班主任姓名"
width="180"
align="center"
>
</el-table-column>
<el-table-column
property="phone"
label="联系电话"
width="190"
align="center"
>
</el-table-column>
</el-table>
<pagination
v-show="total2 > 0"
:total="total2"
:page.sync="classqueryParams.pageNum"
:limit.sync="classqueryParams.pageSize"
@pagination="classinfo"
/>
</el-dialog>
<el-row v-show="itemshow">
<el-col :span="24" class="card-box" style="">
<!-- <el-card> -->
<div slot="header" style="text-align: center; font-size: 25px">
<span></span>
</div>
<div style="width: 100%; display: flex; flex-wrap: wrap">
<el-table
:data="actionlist"
border
:span-method="arraySpanMethod"
style="width: 100%; margin-top: 20px"
>
<el-table-column
prop="categoryName"
label="测试分类"
width="150"
align="center"
>
</el-table-column>
<el-table-column
prop="itemName"
label="测试项目"
width="150"
align="center"
>
</el-table-column>
<el-table-column
prop="itemFraction"
label="动作技能总分"
width="120"
align="center"
>
</el-table-column>
<el-table-column
prop="unifiedStandardScore"
label="统一最高得分"
width="120"
align="center"
>
</el-table-column>
<el-table-column
prop="smallStandardScore"
label="小班最高得分"
width="120"
align="center"
>
</el-table-column>
<el-table-column
prop="middleStandardScore"
label="中班最高得分"
width="120"
align="center"
>
</el-table-column>
<el-table-column
prop="largeStandardScore"
label="大班最高得分"
width="120"
align="center"
>
</el-table-column>
<el-table-column
prop="itemScoreAll"
label="综合得分"
width="176"
align="center"
>
</el-table-column>
<el-table-column
prop="syntheticalAssess"
label="综合评价"
width="180"
align="center"
>
</el-table-column>
<el-table-column
prop="remark"
label="测试目的"
width="180"
align="center"
>
</el-table-column>
</el-table>
</div>
<!-- </el-card> -->
</el-col>
</el-row>
<el-row :gutter="20" v-if="itemshow2">
<el-col :span="24" :offset="0">
<el-card>
<div slot="header" style="text-align: center">
<img style="width: 40px" src="@/icons/笑脸.png" alt="" />
<div><!-- card title -->该学生此批次暂没数据</div>
</div>
<!-- card body -->
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import {
listKindergartenInfo,
tKindergartenInfo,
} from "@/api/system/kindergartenInfo";
import { listStudentInfo } from "@/api/system/studentInfo";
import { listClassinfo } from "@/api/system/classinfo";
import { getRoleInfo, testScoreBatch } from "@/api/system/quality";
import { listAction } from "@/api/system/action";
export default {
name: "action",
components: {},
data() {
return {
itemshow: false,
itemshow2: false,
showyey: true,
showbj: true,
total1: 0,
total2: 0,
total3: 0,
total4: 0,
//
kindergartenshow: false,
classshow: false,
studentshow: false,
batchCodeshow: false,
//
dictValue1: "",
dictValue2: "",
dictValue3: "",
dictValue4: "",
ClassType: "class_type",
//
showSearch: true,
//
form: {},
//
studentqueryParams: {
pageNum: 1,
pageSize: 10,
classId: "",
nationDictId: null,
studentName: null,
studentSex: null,
studentNumber: null,
birthDate: null,
cardNumber: null,
onceName: null,
homeAddress: null,
},
//
classqueryParams: {
pageNum: 1,
pageSize: 10,
kindergartenId: "",
className: null,
classType: null,
},
//
kqueryParams: {
pageNum: 1,
pageSize: 10,
organizeId: null,
kindergartenName: null,
kindergartenAddress: null,
kindergartenType: null,
phone: null,
contacts: null,
},
//list
kindergartenList: [],
//
kindergartenName: "请选择幼儿园",
//ID
kindergartenId: "",
//list
classinfoList: [],
//
className: "请选择班级",
//ID
classId: "",
//list
studentInfoList: [],
//
studentname: "请选择学生",
//ID
studentId: "",
//
batchCodeName: "请选择批次",
//ID
batchCodeId: "",
//list
testScorelist: [],
//
testqueryParams: {
pageNum: 1,
pageSize: 10,
},
//
actionlist: [],
spanArr: [],
position: 0, //
spanArr2: [],
position2: 0, //
//
queryParams: {
pageNum: 1,
pageSize: 10,
// studentId: "10",
// batchCode: "PC202208030005",
studentId: "",
batchCode: "",
},
};
},
created() {
this.getList();
this.class();
// this.listActioninfo();
},
mounted() {
//
// rowspancolspancolspan1
// aa
},
methods: {
actionforeach() {
this.actionlist.forEach((item, index) => {
if (index == 0) {
this.spanArr.push(1);
this.position = 0;
this.spanArr2.push(1);
this.position2 = 0;
} else {
// a
if (
this.actionlist[index].categoryName ==
this.actionlist[index - 1].categoryName
) {
// 1
this.spanArr[this.position] += 1;
this.spanArr.push(0); // 0
} else {
this.spanArr.push(1); // 1
this.position = index; //
}
if (
this.actionlist[index].itemScoreAll ==
this.actionlist[index - 1].itemScoreAll
) {
this.spanArr2[this.position] += 1;
this.spanArr2.push(0); // 0
} else {
this.spanArr2.push(1); // 1
this.position2 = index; //
}
}
});
// console.log(this.spanArr);
},
//
arraySpanMethod({ row, column, rowIndex, columnIndex }) {
// console.log(columnIndex);
// a
if (columnIndex == 0) {
// console.log(this.spanArr);
const _row = this.spanArr[rowIndex];
const _col = _row > 0 ? 1 : 0;
return {
rowspan: _row,
colspan: _col,
};
} else if (columnIndex == 7) {
// console.log(this.spanArr2);
const _row = this.spanArr2[rowIndex];
const _col = _row > 0 ? 1 : 0;
return {
rowspan: _row,
colspan: _col,
};
}
},
//
listActioninfo() {
listAction(this.queryParams).then((res) => {
if (!res.rows || res.rows == "") {
this.itemshow2 = true;
this.itemshow = false;
} else {
// res.rows.itemCategoryList.forEach((e) => {
// e.push(res.rows.categoryName);
// });
this.actionlist = res.rows;
this.actionforeach();
this.itemshow = true;
this.itemshow2 = false;
console.log(this.actionlist);
}
});
},
//
studentshowclick() {
if (this.studentqueryParams.classId == "") {
this.$message.error("请先选择班级");
} else {
this.studentshow = true;
this.studentlist();
}
},
//
batchCodeshowclick() {
if (this.queryParams.studentId == "") {
this.$message.error("请先选择学生");
} else {
this.testScore();
this.batchCodeshow = true;
}
},
//
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;
this.batchCodeshow = false;
this.listActioninfo();
},
//
testScore() {
testScoreBatch(this.testqueryParams).then((res) => {
this.testScorelist = res.rows;
this.total4 = res.total;
});
},
//
studentlist() {
listStudentInfo(this.studentqueryParams).then((res) => {
this.studentInfoList = res.rows;
this.total3 = res.total;
// console.log(this.studentInfoList);
});
},
//
classshowclick() {
if (this.classqueryParams.kindergartenId == "") {
this.$message.error("请先选择幼儿园");
} else {
this.classshow = true;
this.classinfo();
}
// console.log(this.classqueryParams);
},
//
batchCodecancel() {
this.batchCodeshow = false;
},
//
studentcancel() {
this.studentshow = false;
},
//
kindergartencancel() {
this.kindergartenshow = false;
},
//
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) {
// console.log(row);
this.className = row.className;
this.classId = row.id;
this.studentqueryParams.classId = row.id;
this.studentname = "请选择学生";
this.studentId = "";
this.queryParams.studentId = "";
this.classshow = false;
},
//
kindergartenNameclick(row) {
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;
},
//
class() {
tKindergartenInfo(this.ClassType).then((res) => {
this.dictValue1 = res.data[0].dictValue;
this.dictValue2 = res.data[1].dictValue;
this.dictValue3 = res.data[2].dictValue;
this.dictValue4 = res.data[3].dictValue;
});
},
//list
classinfo() {
listClassinfo(this.classqueryParams).then((response) => {
this.classinfoList = response.rows;
this.total2 = response.total;
// console.log(this.classinfoList);
});
},
getList() {
//
getRoleInfo().then((res) => {
console.log(res);
this.classqueryParams.kindergartenId = res.data.kindergartenId;
var user = res.data.roleKeys;
console.log(user);
if (user.includes("enchou")) {
this.showyey = false;
return;
} else if (user.includes("teacher")) {
this.showyey = false;
return;
} else if (user.includes("parent")) {
this.showyey = false;
this.showbj = false;
return;
}
});
//list
listKindergartenInfo(this.kqueryParams).then((response) => {
this.kindergartenList = response.rows;
this.total1 = response.total;
// console.log(this.kindergartenList);
});
},
//
reset() {
this.form = {};
this.resetForm("form");
},
},
};
</script>
<style scoped='scss'>
::v-deep .el-card__header {
border: none;
}
</style>

View File

@ -119,7 +119,7 @@
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:area:remove']"
v-if="scope.row.id != 1"
v-if="scope.row.parentId != 0"
>删除</el-button
>
</template>
@ -129,7 +129,11 @@
<!-- 添加或修改区域管理对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
<el-form-item label="所属上级区域" prop="parentId" v-if="form.id != 1">
<el-form-item
label="所属上级区域"
prop="parentId"
v-if="areaList.length != 0 && form.parentId != 0"
>
<treeselect
:normalizer="normalizer"
:options="areaList"
@ -252,6 +256,7 @@ export default {
// e.code = Number(e.code);
// });
this.areaList = this.handleTree(response.data);
console.log(this.areaList);
this.loading = false;
});
},
@ -311,6 +316,7 @@ export default {
this.form = response.data;
this.open = true;
this.title = "修改区域管理";
console.log(this.form);
});
},
/** 提交按钮 */
@ -319,6 +325,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) {

View File

@ -0,0 +1,810 @@
<template>
<div class="app-container">
<el-form
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="90px"
>
<el-form-item label="所属幼儿园" prop="categoryName" v-if="showyey">
<el-button
@click="kindergartenshow = true"
v-if="kindergartenName == '请选择幼儿园'"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
>{{ kindergartenName }}</el-button
>
<el-button
@click="kindergartenshow = true"
style="width: 250px; text-align: left; height: 32px"
v-else
>{{ kindergartenName }}</el-button
>
</el-form-item>
<el-form-item
label="所属班级"
prop="categoryName"
label-width="70px"
v-if="showbj"
>
<el-button
@click="classshowclick"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
v-if="className == '请选择班级'"
>{{ className }}</el-button
>
<el-button
@click="classshowclick"
style="width: 250px; text-align: left; height: 32px"
v-else
>{{ className }}</el-button
>
</el-form-item>
<el-form-item label="批次成绩" prop="categoryName" label-width="70px">
<el-button
@click="batchCodeshowclick"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
v-if="batchCodeName == '请选择批次'"
>{{ batchCodeName }}</el-button
>
<el-button
@click="batchCodeshowclick"
style="width: 250px; text-align: left; height: 32px"
v-else
>{{ batchCodeName }}</el-button
>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<!-- // -->
<el-dialog
width="590px"
title="选择批次"
:visible.sync="batchCodeshow"
append-to-body
style="margin-top: 20px"
:before-close="batchCodecancel"
>
<el-table :data="testScorelist" align="center" style="margin-top: 0px">
<el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 20px; height: 20px"
v-if="batchCodeId == scope.row.id"
circle
@click="batchCodeclick(scope.row)"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="batchCodeclick(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
property="batchCode"
label="批次编号"
width="200"
align="center"
/>
<el-table-column
property="batchName"
label="批次名称"
width="200"
align="center"
/>
</el-table>
<pagination
v-show="total4 > 0"
:total="total4"
:page.sync="testqueryParams.pageNum"
:limit.sync="testqueryParams.pageSize"
@pagination="testScore"
/>
</el-dialog>
<!-- // -->
<el-dialog
width="850px"
title="选择所属幼儿园"
:visible.sync="kindergartenshow"
append-to-body
:before-close="kindergartencancel"
>
<el-table :data="kindergartenList">
<el-table-column label="请选择" width="70" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 15px; height: 15px"
circle
@click="kindergartenNameclick(scope.row)"
v-if="kindergartenId == scope.row.id"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="kindergartenNameclick(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
property="kindergartenName"
label="幼儿园名字"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="kindergartenAddress"
label="幼儿园地址"
width="150"
align="center"
>
</el-table-column>
<el-table-column
label="幼儿园所在组织"
align="center"
prop="organizeName"
width="150"
>
</el-table-column>
<el-table-column
property="contacts"
label="联系人"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="phone"
label="联系电话"
width="150"
align="center"
>
</el-table-column>
</el-table>
<pagination
v-show="total1 > 0"
:total="total1"
:page.sync="kqueryParams.pageNum"
:limit.sync="kqueryParams.pageSize"
@pagination="getList"
/>
</el-dialog>
<!-- // -->
<el-dialog
width="1000px"
title="选择所属班级"
:visible.sync="classshow"
append-to-body
:before-close="classcancel"
>
<el-table :data="classinfoList" align="center" style="margin-top: 10px">
<el-table-column label="请选择" width="70" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 20px; height: 20px"
circle
@click="classclick(scope.row)"
v-if="classId == scope.row.id"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="classclick(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
property="kindergartenName"
label="幼儿园名称"
width="190"
align="center"
/>
<el-table-column
property="className"
label="班级名称"
width="180"
align="center"
>
</el-table-column>
<el-table-column
property="classType"
label="班级类型"
width="160"
align="center"
>
<template slot-scope="scope">
{{ scope.row.classType == dictValue1 ? "大班" : "" }}
{{ scope.row.classType == dictValue2 ? "中班" : "" }}
{{ scope.row.classType == dictValue3 ? "小班" : "" }}
{{ scope.row.classType == dictValue4 ? "毕业" : "" }}
</template>
</el-table-column>
<el-table-column
property="classTeacher"
label="班主任姓名"
width="180"
align="center"
>
</el-table-column>
<el-table-column
property="phone"
label="联系电话"
width="190"
align="center"
>
</el-table-column>
</el-table>
<pagination
v-show="total2 > 0"
:total="total2"
:page.sync="classqueryParams.pageNum"
:limit.sync="classqueryParams.pageSize"
@pagination="classinfo"
/>
</el-dialog>
<el-row v-show="itemshow">
<el-col :span="24" :offset="0">
<div style="margin: 0 auto">
<div
style="
display: flex;
text-align: center;
justify-content: center;
color: #fff;
"
>
<div
style="
width: 120px;
line-height: 60px;
border: 1px solid #f0f0f0;
background: #3c9299;
"
>
年龄
</div>
<div
style="
width: 120px;
line-height: 60px;
border: 1px solid #f0f0f0;
background: #3c9299;
"
>
平均总分
</div>
<div v-for="item in categoryTableNameList" :key="item.prentId">
<div
style="
text-align: center;
line-height: 30px;
border: 1px solid #f0f0f0;
background: #3c9299;
"
>
{{ item.parentName }}
</div>
<div
style="
display: flex;
line-height: 30px;
border: 1px solid #f0f0f0;
background: #3c9299;
font-size: 14px;
"
>
<div
v-for="uitem in item.childrenTableNameList"
:key="uitem.categoryId"
style="width: 120px"
>
{{ uitem.categoryName }}
</div>
</div>
</div>
</div>
<div>
<div
style="text-align: center; display: flex; justify-content: center"
v-for="item in categoryScoreList"
:key="item.prentId"
>
<div style="width: 120px; line-height: 60px">
{{ item.className }}
</div>
<div style="width: 120px; line-height: 60px">
{{ item.totalAvScore }}
</div>
<div>
<div style="display: flex; line-height: 60px">
<div
v-for="uitem in item.list"
:key="uitem.categoryId"
style="width: 120px"
>
{{ uitem }}
</div>
</div>
</div>
</div>
</div>
<div></div>
</div>
</el-col>
<el-col :span="24" :offset="0">
<div style="text-align: center">
<span></span>
</div>
<div class="">
<div
ref="chart"
id="chart"
style="width: 1300px; height: 600px; margin: 50px auto"
></div>
</div>
</el-col>
</el-row>
<el-row :gutter="20" v-if="itemshow2">
<el-col :span="24" :offset="0">
<el-card>
<div slot="header" style="text-align: center">
<img style="width: 40px" src="@/icons/笑脸.png" alt="" />
<div><!-- card title -->该班级此批次暂无成绩</div>
</div>
<!-- card body -->
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import * as echarts from "echarts";
import {
listKindergartenInfo,
tKindergartenInfo,
} from "@/api/system/kindergartenInfo";
import { listClassinfo } from "@/api/system/classinfo";
import { getRoleInfo, testScoreBatch } from "@/api/system/quality";
import { ClassList } from "@/api/system/classconstitution";
export default {
name: "classconstitution",
data() {
return {
itemshow: false,
itemshow2: false,
showyey: true,
showbj: true,
total1: 0,
total2: 0,
total4: 0,
//
kindergartenshow: false,
classshow: false,
studentshow: false,
batchCodeshow: false,
//
dictValue1: "",
dictValue2: "",
dictValue3: "",
dictValue4: "",
ClassType: "class_type",
//
showSearch: true,
//
form: {},
//
classqueryParams: {
pageNum: 1,
pageSize: 10,
kindergartenId: "",
className: null,
classType: null,
},
//
kqueryParams: {
pageNum: 1,
pageSize: 10,
organizeId: null,
kindergartenName: null,
kindergartenAddress: null,
kindergartenType: null,
phone: null,
contacts: null,
},
//list
kindergartenList: [],
//
kindergartenName: "请选择幼儿园",
//ID
kindergartenId: "",
//list
classinfoList: [],
//
className: "请选择班级",
//ID
classId: "",
//
batchCodeName: "请选择批次",
//ID
batchCodeId: "",
//list
testScorelist: [],
//
ClassListlist: {
batchCode: "",
kindergartenId: "",
classId: "",
// batchCode: "PC202208030005",
// kindergartenId: "18",
// classId: "2",
pageNum: 1,
pageSize: 10,
},
//
testqueryParams: {
pageNum: 1,
pageSize: 10,
},
categoryTableNameList: [],
categoryAgeFractionList: [],
categoryScoreList: [],
totalAvgFraction: "",
listname: [],
};
},
created() {
this.getList();
this.class();
// this.ClassListinfo();
},
methods: {
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;
this.categoryScoreList = res.data.categoryScoreList;
var list = [];
this.categoryTableNameList.forEach((e) => {
e.childrenTableNameList.forEach((el) => {
list.push(el.categoryId);
});
});
let yname = [];
this.categoryScoreList.forEach((el) => {
yname.push(el.className);
var listname = list.map((e) => {
var num = 0;
var number = el.categoryScoreList.findIndex(
(o) => o.categoryId == e
);
if (number != -1) {
num = el.categoryScoreList[number].categoryName;
}
return num;
});
this.listname = listname;
var list1 = list.map((e) => {
var num = 0;
var number = el.categoryScoreList.findIndex(
(o) => o.categoryId == e
);
if (number != -1) {
num = el.categoryScoreList[number].avgScore;
}
return num;
});
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"));
var option;
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: "",
},
},
legend: {
data: names,
},
xAxis: [
{
type: "category",
axisTick: { show: false },
data: yname,
},
],
yAxis: [
{
type: "value",
},
],
series: yseries,
};
option && myChart.setOption(option, true);
this.itemshow2 = false;
this.itemshow = true;
}
});
},
//
batchCodeshowclick() {
if (this.ClassListlist.classId == "") {
this.$message.error("请先选择班级");
} else {
this.testScore();
this.batchCodeshow = true;
}
},
//
batchCodeclick(row) {
this.batchCodeName = row.batchName;
this.batchCodeId = row.id;
this.ClassListlist.batchCode = row.batchCode;
this.batchCodeshow = false;
this.ClassListinfo();
},
//
testScore() {
testScoreBatch(this.testqueryParams).then((res) => {
this.testScorelist = res.rows;
this.total4 = res.total;
});
},
//
classshowclick() {
if (this.classqueryParams.kindergartenId == "") {
this.$message.error("请先选择幼儿园");
} else {
this.classshow = true;
this.classinfo();
}
// console.log(this.classqueryParams);
},
//
batchCodecancel() {
this.batchCodeshow = false;
},
//
kindergartencancel() {
this.kindergartenshow = false;
},
//
classcancel() {
this.classshow = false;
},
//
classclick(row) {
// console.log(row);
this.className = row.className;
this.classId = row.id;
this.ClassListlist.classId = row.id;
this.classshow = false;
if (this.ClassListlist.batchCode != "") {
this.ClassListinfo();
}
},
//
kindergartenNameclick(row) {
this.classqueryParams.kindergartenId = row.id;
this.ClassListlist.kindergartenId = row.id;
this.kindergartenName = row.kindergartenName;
this.kindergartenId = row.id;
this.className = "请选择班级";
this.classId = "";
this.ClassListlist.classId = "";
this.kindergartenshow = false;
},
//
class() {
tKindergartenInfo(this.ClassType).then((res) => {
this.dictValue1 = res.data[0].dictValue;
this.dictValue2 = res.data[1].dictValue;
this.dictValue3 = res.data[2].dictValue;
this.dictValue4 = res.data[3].dictValue;
});
},
//list
classinfo() {
listClassinfo(this.classqueryParams).then((response) => {
this.classinfoList = response.rows;
this.total2 = response.total;
// console.log(this.classinfoList);
});
},
getList() {
//
getRoleInfo().then((res) => {
console.log(res);
this.ClassListlist.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;
this.showbj = false;
return;
}
});
//list
listKindergartenInfo(this.kqueryParams).then((response) => {
this.kindergartenList = response.rows;
this.total1 = response.total;
// console.log(this.kindergartenList);
});
},
//
reset() {
this.form = {};
this.resetForm("form");
},
},
};
</script>

View File

@ -33,6 +33,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="联系电话" prop="phone">
<el-input
v-model="queryParams.phone"
@ -130,6 +131,18 @@
</template>
</el-table-column>
<el-table-column label="班主任姓名" align="center" prop="classTeacher" />
<el-table-column
label="入学日期"
clearable
align="center"
prop="entranceYear"
width="180"
>
<template slot-scope="scope">
<span>{{ scope.row.entranceYear }}</span>
</template>
</el-table-column>
<el-table-column label="联系电话" align="center" prop="phone" />
<el-table-column
label="操作"
@ -210,9 +223,20 @@
placeholder="请输入班主任姓名"
/>
</el-form-item>
<el-form-item label="入学日期" prop="entranceDateStr">
<el-date-picker
clearable
type="date"
v-model="form.entranceDateStr"
value-format="yyyy-MM-dd"
placeholder="请选择入学日期"
>
</el-date-picker>
</el-form-item>
<el-form-item label="联系电话" prop="phone">
<el-input
v-model.number="form.phone"
v-model="form.phone"
placeholder="请输入联系电话"
maxlength="11"
/>
@ -359,15 +383,25 @@ export default {
data() {
//
var checkMobile = (rule, value, cb) => {
console.log(value);
var str = String(value);
console.log(str);
//
const regMobile =
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/;
/^(?:(?:\+|00)86)?1(?:(?:3[\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\d])|(?:9[189]))\d{8}$/;
const reg = /^(0[0-9]{2,3}\-)([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$/;
const isTel = reg.test(str);
if (regMobile.test(value)) {
return cb();
if (str.length == 11) {
if (regMobile.test(str)) {
return cb();
}
} else if (11 < str.length <= 13) {
if (isTel) {
return cb();
}
}
cb(new Error("请输入合法的手机号"));
cb(new Error("请输入正确的联系电话"));
};
return {
@ -406,6 +440,7 @@ export default {
kindergartenId: null,
className: null,
classType: null,
entranceDateStr: null,
},
queryParams2: {
pageNum: 1,
@ -414,26 +449,31 @@ export default {
className: null,
classType: null,
},
time: "",
//
form: {},
//
rules: {
kindergartenId: [{ required: true, message: "请选择所属幼儿园" }],
className: [
{ required: true, message: "请输入班级名称", trigger: "blur" },
],
classType: [{ required: true, message: "请选择幼儿园类型" }],
classTeacher: [
{ required: true, message: "请输入班主任姓名", trigger: "blur" },
],
phone: [
{
required: true,
validator: checkMobile,
trigger: "blur",
message: "请输入正确的手机号",
message: "",
},
],
kindergartenId: [{ required: true, message: "请选择所属幼儿园" }],
className: [
{ required: true, message: "请输入班级名称", trigger: "blur" },
],
classType: [{ required: true, message: "请选择幼儿园类型" }],
classTeacher: [
{ required: true, message: "请输入班主任姓名", trigger: "blur" },
],
entranceDateStr: [
{ required: true, message: "请选择日期", trigger: "change" },
],
},
};
},
@ -468,6 +508,7 @@ export default {
this.total2 = response.total;
});
listClassinfo(this.queryParams).then((response) => {
console.log(response);
this.classinfoList = response.rows;
this.total = response.total;
this.loading = false;
@ -493,6 +534,7 @@ export default {
className: null,
classType: null,
classTeacher: null,
entranceDateStr: "",
phone: undefined,
kindergartenName: null,
};
@ -554,6 +596,7 @@ export default {
getClassinfo(id).then((response) => {
response.data.phone = Number(response.data.phone);
this.form = response.data;
console.log(this.form);
this.kindergartenName = this.form.kindergartenName;
this.open = true;
this.title = "修改班级信息";

View File

@ -7,7 +7,7 @@
v-show="showSearch"
label-width="90px"
>
<el-form-item label="所属幼儿园" prop="categoryName">
<el-form-item label="所属幼儿园" prop="categoryName" v-if="showyey">
<el-button
@click="kindergartenshow = true"
v-if="kindergartenName == '请选择幼儿园'"
@ -22,7 +22,12 @@
>
</el-form-item>
<el-form-item label="所属班级" prop="categoryName" label-width="70px">
<el-form-item
label="所属班级"
prop="categoryName"
label-width="70px"
v-if="showbj"
>
<el-button
@click="classshowclick"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
@ -77,7 +82,7 @@
<!-- // -->
<el-dialog
width="500px"
width="590px"
title="选择批次"
:visible.sync="batchCodeshow"
append-to-body
@ -85,7 +90,7 @@
:before-close="batchCodecancel"
>
<el-table :data="testScorelist" align="center" style="margin-top: 0px">
<el-table-column label="请选择" width="70" align="center">
<el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope">
<el-button
type="primary"
@ -105,13 +110,13 @@
<el-table-column
property="batchCode"
label="批次编号"
width="190"
width="200"
align="center"
/>
<el-table-column
property="batchName"
label="批次名称"
width="190"
width="200"
align="center"
/>
</el-table>
@ -511,6 +516,8 @@ export default {
return {
itemshow: false,
itemshow2: false,
showyey: true,
showbj: true,
total1: 0,
total2: 0,
total3: 0,
@ -624,12 +631,15 @@ export default {
res.data.physiqueCategoryList.forEach((el) => {
// console.log(el.categoryScore);
seriesData.push(el.categoryScore);
if (el.levelName == null) {
el.levelName = "暂无";
}
yindicator.push({
name: el.categoryName + " " + "(" + el.levelName + "" + ")",
max: el.maxScore,
});
});
console.log(seriesData, yindicator);
// console.log(seriesData, yindicator);
var myChart = echarts.init(document.getElementById("chart"));
@ -806,6 +816,9 @@ export default {
this.studentId = row.id;
this.studentshow = false;
this.synthesizelist.studentId = row.id;
if (this.synthesizelist.batchCode != "") {
this.synthesizeinfo();
}
},
//
studentlist() {
@ -848,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;
@ -878,7 +899,20 @@ export default {
getList() {
//
getRoleInfo().then((res) => {
console.log(res);
this.classqueryParams.kindergartenId = res.data.kindergartenId;
var user = res.data.roleKeys;
console.log(user);
if (user.includes("enchou")) {
this.showyey = false;
return;
} else if (user.includes("teacher")) {
this.showyey = false;
return;
} else if (user.includes("parent")) {
this.showyey = false;
this.showbj = false;
return;
}
});
//list
listKindergartenInfo(this.kqueryParams).then((response) => {

View File

@ -0,0 +1,787 @@
<template>
<div class="app-container">
<el-form
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="90px"
>
<el-form-item label="所属幼儿园" prop="categoryName" v-if="showyey">
<el-button
@click="kindergartenshow = true"
v-if="kindergartenName == '请选择幼儿园'"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
>{{ kindergartenName }}</el-button
>
<el-button
@click="kindergartenshow = true"
style="width: 250px; text-align: left; height: 32px"
v-else
>{{ kindergartenName }}</el-button
>
</el-form-item>
<el-form-item
label="所属班级"
prop="categoryName"
label-width="70px"
v-if="showbj"
>
<el-button
@click="classshowclick"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
v-if="className == '请选择班级'"
>{{ className }}</el-button
>
<el-button
@click="classshowclick"
style="width: 250px; text-align: left; height: 32px"
v-else
>{{ className }}</el-button
>
</el-form-item>
<el-form-item label="学生" prop="categoryName" label-width="45px">
<el-button
@click="studentshowclick"
v-if="studentname == '请选择学生'"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
>{{ studentname }}</el-button
>
<el-button
@click="studentshowclick"
style="width: 250px; text-align: left; height: 32px"
v-else
>{{ studentname }}</el-button
>
</el-form-item>
<el-form-item label="所属批次" prop="categoryName" label-width="70px">
<el-button
@click="batchCodeshowclick"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
v-if="batchCodeName == '请选择批次'"
>{{ batchCodeName }}</el-button
>
<el-button
@click="batchCodeshowclick"
style="width: 250px; text-align: left; height: 32px"
v-else
>{{ batchCodeName }}</el-button
>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<!-- // -->
<el-dialog
width="590px"
title="选择批次"
:visible.sync="batchCodeshow"
append-to-body
style="margin-top: 20px"
:before-close="batchCodecancel"
>
<el-table :data="testScorelist" align="center" style="margin-top: 0px">
<el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 20px; height: 20px"
v-if="batchCodeId == scope.row.id"
circle
@click="batchCodeclick(scope.row)"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="batchCodeclick(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
property="batchCode"
label="批次编号"
width="200"
align="center"
/>
<el-table-column
property="batchName"
label="批次名称"
width="200"
align="center"
/>
</el-table>
<pagination
v-show="total4 > 0"
:total="total4"
:page.sync="testqueryParams.pageNum"
:limit.sync="testqueryParams.pageSize"
@pagination="testScore"
/>
</el-dialog>
<!-- // -->
<el-dialog
width="850px"
title="选择学生"
:visible.sync="studentshow"
append-to-body
style="margin-top: 70px"
:before-close="studentcancel"
>
<el-table :data="studentInfoList" align="center" style="margin-top: 10px">
<el-table-column label="请选择" width="70" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 20px; height: 20px"
circle
v-if="studentId == scope.row.id"
@click="studentclick(scope.row)"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="studentclick(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
property="className"
label="班级名称"
width="190"
align="center"
/>
<el-table-column
property="studentName"
label="学生姓名"
width="190"
align="center"
/>
<el-table-column
property="studentName"
label="性别"
width="190"
align="center"
>
<template slot-scope="scope">
{{ scope.row.studentSex == "MALE" ? "男" : "女" }}
</template>
</el-table-column>
<el-table-column
property="homeAddress"
label="住址"
width="190"
align="center"
/>
</el-table>
<pagination
v-show="total3 > 0"
:total="total3"
:page.sync="studentqueryParams.pageNum"
:limit.sync="studentqueryParams.pageSize"
@pagination="studentlist"
/>
</el-dialog>
<!-- // -->
<el-dialog
width="850px"
title="选择所属幼儿园"
:visible.sync="kindergartenshow"
append-to-body
:before-close="kindergartencancel"
>
<el-table :data="kindergartenList">
<el-table-column label="请选择" width="70" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 15px; height: 15px"
circle
@click="kindergartenNameclick(scope.row)"
v-if="kindergartenId == scope.row.id"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="kindergartenNameclick(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
property="kindergartenName"
label="幼儿园名字"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="kindergartenAddress"
label="幼儿园地址"
width="150"
align="center"
>
</el-table-column>
<el-table-column
label="幼儿园所在组织"
align="center"
prop="organizeName"
width="150"
>
</el-table-column>
<el-table-column
property="contacts"
label="联系人"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="phone"
label="联系电话"
width="150"
align="center"
>
</el-table-column>
</el-table>
<pagination
v-show="total1 > 0"
:total="total1"
:page.sync="kqueryParams.pageNum"
:limit.sync="kqueryParams.pageSize"
@pagination="getList"
/>
</el-dialog>
<!-- // -->
<el-dialog
width="1000px"
title="选择所属班级"
:visible.sync="classshow"
append-to-body
:before-close="classcancel"
>
<el-table :data="classinfoList" align="center" style="margin-top: 10px">
<el-table-column label="请选择" width="70" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 20px; height: 20px"
circle
@click="classclick(scope.row)"
v-if="classId == scope.row.id"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="classclick(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
property="kindergartenName"
label="幼儿园名称"
width="190"
align="center"
/>
<el-table-column
property="className"
label="班级名称"
width="180"
align="center"
>
</el-table-column>
<el-table-column
property="classType"
label="班级类型"
width="160"
align="center"
>
<template slot-scope="scope">
{{ scope.row.classType == dictValue1 ? "大班" : "" }}
{{ scope.row.classType == dictValue2 ? "中班" : "" }}
{{ scope.row.classType == dictValue3 ? "小班" : "" }}
{{ scope.row.classType == dictValue4 ? "毕业" : "" }}
</template>
</el-table-column>
<el-table-column
property="classTeacher"
label="班主任姓名"
width="180"
align="center"
>
</el-table-column>
<el-table-column
property="phone"
label="联系电话"
width="190"
align="center"
>
</el-table-column>
</el-table>
<pagination
v-show="total2 > 0"
:total="total2"
:page.sync="classqueryParams.pageNum"
:limit.sync="classqueryParams.pageSize"
@pagination="classinfo"
/>
</el-dialog>
<el-row v-show="itemshow">
<el-col :span="24" class="card-box" style="">
<el-card>
<div style="margin-left: 50px">
<span>学校排名:</span
><span style="margin-left: 20px; margin-right: 20px">{{
analysislist.schoolRank
}}</span
>
</div>
<div slot="header" style="text-align: center; font-size: 25px">
<span>体测项目分值与全校全市对比</span>
</div>
<div style="width: 100%; display: flex; flex-wrap: wrap">
<div
v-for="(item, index) in analysislist.itemScoreList"
:key="index"
style="
width: 30%;
height: 300px;
margin-left: 3%;
margin-top: 20px;
"
>
<div
class="bar"
style="width: 400px; height: 300px; margin: 0 auto"
></div>
</div>
</div>
</el-card>
</el-col>
</el-row>
<el-row :gutter="20" v-if="itemshow2">
<el-col :span="24" :offset="0">
<el-card>
<div slot="header" style="text-align: center">
<img style="width: 40px" src="@/icons/笑脸.png" alt="" />
<div><!-- card title -->该学生此批次暂没数据</div>
</div>
<!-- card body -->
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import * as echarts from "echarts";
import {
listKindergartenInfo,
tKindergartenInfo,
} from "@/api/system/kindergartenInfo";
import { listStudentInfo } from "@/api/system/studentInfo";
import { listClassinfo } from "@/api/system/classinfo";
import { getRoleInfo, testScoreBatch } from "@/api/system/quality";
import { analysis } from "@/api/system/constitution";
export default {
name: "constitution",
components: {},
data() {
return {
itemshow: false,
itemshow2: false,
showyey: true,
showbj: true,
total1: 0,
total2: 0,
total3: 0,
total4: 0,
//
kindergartenshow: false,
classshow: false,
studentshow: false,
batchCodeshow: false,
//
dictValue1: "",
dictValue2: "",
dictValue3: "",
dictValue4: "",
ClassType: "class_type",
//
showSearch: true,
//
form: {},
//
studentqueryParams: {
pageNum: 1,
pageSize: 10,
classId: "",
nationDictId: null,
studentName: null,
studentSex: null,
studentNumber: null,
birthDate: null,
cardNumber: null,
onceName: null,
homeAddress: null,
},
//
classqueryParams: {
pageNum: 1,
pageSize: 10,
kindergartenId: "",
className: null,
classType: null,
},
//
kqueryParams: {
pageNum: 1,
pageSize: 10,
organizeId: null,
kindergartenName: null,
kindergartenAddress: null,
kindergartenType: null,
phone: null,
contacts: null,
},
//list
kindergartenList: [],
//
kindergartenName: "请选择幼儿园",
//ID
kindergartenId: "",
//list
classinfoList: [],
//
className: "请选择班级",
//ID
classId: "",
//list
studentInfoList: [],
//
studentname: "请选择学生",
//ID
studentId: "",
//
batchCodeName: "请选择批次",
//ID
batchCodeId: "",
//list
testScorelist: [],
//
testqueryParams: {
pageNum: 1,
pageSize: 10,
},
//analysislist
analysislist: [],
//
analysisqueryParams: {
// studentId: "10",
// batchCode: "PC202208030005",
studentId: "",
batchCode: "",
},
};
},
mounted() {},
created() {
this.getList();
this.class();
// this.analysislists();
},
methods: {
options() {
var myEchart = document.getElementsByClassName("bar");
// var myEchart = document.querySelectorAll(".bar");
for (var i = 0; i < this.analysislist.itemScoreList.length; i++) {
var ydata = [
this.analysislist.itemScoreList[i].itemScore,
this.analysislist.itemScoreList[i].schoolAvgScore,
this.analysislist.itemScoreList[i].cityAvgScore,
];
var textname = this.analysislist.itemScoreList[i].itemName;
// console.log(ydata);
var myChart = echarts.init(myEchart[i]);
var option = {
title: {
text: textname,
subtext: "",
left: "50%",
},
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow",
},
formatter: function (params) {
var tar = params[1];
return tar.name + "<br/>" + tar.seriesName + " : " + tar.value;
},
},
grid: {
left: "3%",
right: "4%",
bottom: "3%",
containLabel: true,
},
xAxis: {
type: "category",
splitLine: { show: false },
data: this.analysislist.itemStudentList,
},
yAxis: {
type: "value",
},
series: [
{
name: "Placeholder",
type: "bar",
stack: "Total",
itemStyle: {
borderColor: "blue",
color: "blue",
},
emphasis: {
itemStyle: {
borderColor: "transparent",
color: "transparent",
},
},
data: [0, 0, 0],
},
{
name: "分数",
type: "bar",
stack: "Total",
// center: ["50%", "50%"],
label: {
show: true,
position: "inside",
},
itemStyle: {
normal: {
color: function (colors) {
var colorList = [
"#91cd77",
"#5470c6",
"#fc8251",
"#ef6567",
"#f9c956",
"#75bedc",
];
return colorList[i];
},
},
},
// itemStyle: {
// borderColor: "#94D8F6",
// color: "#94D8F6",
// },
data: ydata,
},
],
};
myChart.setOption(option);
this.itemshow = true;
this.itemshow2 = false;
}
},
//
analysislists() {
analysis(this.analysisqueryParams).then((res) => {
console.log(res);
if (!res.data || res.data == "") {
this.itemshow2 = true;
this.itemshow = false;
this.batchCodeName = "请选择批次";
this.batchCodeId = "";
} else {
this.analysislist = res.data;
this.$nextTick(() => {
this.options();
});
}
});
},
//
studentshowclick() {
if (this.studentqueryParams.classId == "") {
this.$message.error("请先选择班级");
} else {
this.studentshow = true;
this.studentlist();
}
},
//
batchCodeshowclick() {
if (this.analysisqueryParams.studentId == "") {
this.$message.error("请先选择学生");
} else {
this.testScore();
this.batchCodeshow = true;
}
},
//
batchCodeclick(row) {
this.batchCodeName = row.batchName;
this.batchCodeId = row.id;
this.analysisqueryParams.batchCode = row.batchCode;
this.batchCodeshow = false;
this.analysislists();
},
//
testScore() {
testScoreBatch(this.testqueryParams).then((res) => {
this.testScorelist = res.rows;
this.total4 = res.total;
});
},
//
studentlist() {
listStudentInfo(this.studentqueryParams).then((res) => {
this.studentInfoList = res.rows;
this.total3 = res.total;
// console.log(this.studentInfoList);
});
},
//
classshowclick() {
if (this.classqueryParams.kindergartenId == "") {
this.$message.error("请先选择幼儿园");
} else {
this.classshow = true;
this.classinfo();
}
// console.log(this.classqueryParams);
},
//
batchCodecancel() {
this.batchCodeshow = false;
},
//
studentcancel() {
this.studentshow = false;
},
//
kindergartencancel() {
this.kindergartenshow = false;
},
//
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;
},
//
kindergartenNameclick(row) {
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;
},
//
class() {
tKindergartenInfo(this.ClassType).then((res) => {
this.dictValue1 = res.data[0].dictValue;
this.dictValue2 = res.data[1].dictValue;
this.dictValue3 = res.data[2].dictValue;
this.dictValue4 = res.data[3].dictValue;
});
},
//list
classinfo() {
listClassinfo(this.classqueryParams).then((response) => {
this.classinfoList = response.rows;
this.total2 = response.total;
// console.log(this.classinfoList);
});
},
getList() {
//
getRoleInfo().then((res) => {
console.log(res);
this.classqueryParams.kindergartenId = res.data.kindergartenId;
var user = res.data.roleKeys;
console.log(user);
if (user.includes("enchou")) {
this.showyey = false;
return;
} else if (user.includes("teacher")) {
this.showyey = false;
return;
} else if (user.includes("parent")) {
this.showyey = false;
this.showbj = false;
return;
}
});
//list
listKindergartenInfo(this.kqueryParams).then((response) => {
this.kindergartenList = response.rows;
this.total1 = response.total;
// console.log(this.kindergartenList);
});
},
//
reset() {
this.form = {};
this.resetForm("form");
},
},
};
</script>
<style scoped='scss'>
::v-deep .el-card__header {
border: none;
}
</style>

View File

@ -0,0 +1,468 @@
<template>
<div class="app-container">
<el-form
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="90px"
>
<el-form-item label="所属幼儿园" prop="categoryName">
<el-button
@click="kindergartenshow = true"
v-if="kindergartenName == '请选择幼儿园'"
style="width: 208px; text-align: left; height: 32px; color: #c0c4cc"
>{{ kindergartenName }}</el-button
>
<el-button
@click="kindergartenshow = true"
style="width: 208px; text-align: left; height: 32px"
v-else
>{{ kindergartenName }}</el-button
>
</el-form-item>
<el-form-item label="班级类型" prop="categoryName" label-width="70px">
<el-select
v-if="analysislist.kindergartenId == ''"
placeholder="请选择"
disabled
@click.native="selecetclick"
v-model="analysislist.classType"
>
</el-select>
<el-select
v-else
v-model="analysislist.classType"
clearable
placeholder="请选择"
>
<el-option
v-for="item in dictValues"
:key="item.name"
:label="item.name"
:value="item.type"
@click.native="classTypeclick"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="批次成绩" prop="categoryName" label-width="70px">
<el-button
@click="batchCodeshowclick"
style="width: 208px; text-align: left; height: 32px; color: #c0c4cc"
v-if="batchCodeName == '请选择批次'"
>{{ batchCodeName }}</el-button
>
<el-button
@click="batchCodeshowclick"
style="width: 208px; text-align: left; height: 32px"
v-else
>{{ batchCodeName }}</el-button
>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<!-- // -->
<el-dialog
width="590px"
title="选择批次"
:visible.sync="batchCodeshow"
append-to-body
style="margin-top: 20px"
:before-close="batchCodecancel"
>
<el-table :data="testScorelist" align="center" style="margin-top: 0px">
<el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 20px; height: 20px"
v-if="batchCodeId == scope.row.id"
circle
@click="batchCodeclick(scope.row)"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="batchCodeclick(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
property="batchCode"
label="批次编号"
width="200"
align="center"
/>
<el-table-column
property="batchName"
label="批次名称"
width="200"
align="center"
/>
</el-table>
<pagination
v-show="total4 > 0"
:total="total4"
:page.sync="testqueryParams.pageNum"
:limit.sync="testqueryParams.pageSize"
@pagination="testScore"
/>
</el-dialog>
<!-- // -->
<el-dialog
width="850px"
title="选择所属幼儿园"
:visible.sync="kindergartenshow"
append-to-body
:before-close="kindergartencancel"
>
<el-table :data="kindergartenList">
<el-table-column label="请选择" width="70" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 15px; height: 15px"
circle
@click="kindergartenNameclick(scope.row)"
v-if="kindergartenId == scope.row.id"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="kindergartenNameclick(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
property="kindergartenName"
label="幼儿园名字"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="kindergartenAddress"
label="幼儿园地址"
width="150"
align="center"
>
</el-table-column>
<el-table-column
label="幼儿园所在组织"
align="center"
prop="organizeName"
width="150"
>
</el-table-column>
<el-table-column
property="contacts"
label="联系人"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="phone"
label="联系电话"
width="150"
align="center"
>
</el-table-column>
</el-table>
<pagination
v-show="total1 > 0"
:total="total1"
:page.sync="kqueryParams.pageNum"
:limit.sync="kqueryParams.pageSize"
@pagination="getList"
/>
</el-dialog>
<el-row v-show="itemshow">
<el-table
:data="physicalActionList"
style="width: 1111px; margin: 20px auto"
>
<el-table-column :label="classTypeName" width="150" align="center">
<el-table-column
prop="itemName"
label="项目"
width="150"
align="center"
>
</el-table-column>
<el-table-column label="男孩" align="center">
<el-table-column
prop="maleAvgScore"
label="平均值"
width="120"
align="center"
>
</el-table-column>
<el-table-column
prop="maleCityAvgScore"
label="全市平均值"
width="120"
align="center"
>
</el-table-column>
<el-table-column
prop="malePassCount"
label="合格人数"
width="120"
align="center"
>
</el-table-column>
<el-table-column
prop="malePassRate"
label="合格率"
width="120"
align="center"
>
<template slot-scope="scope"
>{{ scope.row.malePassRate }}%</template
>
</el-table-column>
</el-table-column>
<el-table-column label="女孩" align="center">
<el-table-column
prop="feMaleAvgScore"
label="平均值"
width="120"
align="center"
>
</el-table-column>
<el-table-column
prop="feMaleCityAvgScore"
label="全市平均值"
width="120"
align="center"
>
</el-table-column>
<el-table-column
prop="feMalePassCount"
label="合格人数"
width="120"
align="center"
>
</el-table-column>
<el-table-column
prop="feMalePassRate"
label="合格率"
width="120"
align="center"
>
<template slot-scope="scope"
>{{ scope.row.feMalePassRate }}%</template
>
</el-table-column>
</el-table-column>
</el-table-column>
</el-table>
</el-row>
<el-row :gutter="20" v-if="itemshow2">
<el-col :span="24" :offset="0">
<el-card>
<div slot="header" style="text-align: center">
<img style="width: 40px" src="@/icons/笑脸.png" alt="" />
<div><!-- card title -->此批次暂无数据</div>
</div>
<!-- card body -->
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import * as echarts from "echarts";
import {
listKindergartenInfo,
tKindergartenInfo,
} from "@/api/system/kindergartenInfo";
import { getRoleInfo, testScoreBatch } from "@/api/system/quality";
import { analysis } from "@/api/system/development";
export default {
name: "classconstitution",
data() {
return {
itemshow: false,
itemshow2: false,
total1: 0,
total4: 0,
//
kindergartenshow: false,
batchCodeshow: false,
//
ClassType: "class_type",
//
showSearch: true,
//
form: {},
//
kqueryParams: {
pageNum: 1,
pageSize: 10,
organizeId: null,
kindergartenName: null,
kindergartenAddress: null,
kindergartenType: null,
phone: null,
contacts: null,
},
//list
kindergartenList: [],
//
kindergartenName: "请选择幼儿园",
//ID
kindergartenId: "",
//
batchCodeName: "请选择批次",
//ID
batchCodeId: "",
//list
testScorelist: [],
//
analysislist: {
kindergartenId: "",
classType: "",
batchCode: "",
// kindergartenId: "21",
// classType: "SMALL_CLASS",
// batchCode: "PC202208030005",
},
//
testqueryParams: {
pageNum: 1,
pageSize: 10,
},
dictValues: [],
classTypeName: "",
physicalActionList: [],
};
},
created() {
this.getList();
this.class();
// this.analysisinfo();
},
methods: {
selecetclick() {
if (this.analysislist.kindergartenId == "") {
this.$message.error("请先选择幼儿园");
} else {
}
},
//
analysisinfo() {
analysis(this.analysislist).then((res) => {
if (res.data) {
var obj = res.data;
this.physicalActionList = obj.physicalActionList;
this.classTypeName = res.data.classTypeName;
this.itemshow = true;
this.itemshow2 = false;
} else {
this.itemshow = false;
this.itemshow2 = true;
}
});
},
//
batchCodeclick(row) {
this.batchCodeName = row.batchName;
this.batchCodeId = row.id;
this.analysislist.batchCode = row.batchCode;
this.batchCodeshow = false;
this.physicalActionList = [];
this.analysisinfo();
},
//
batchCodeshowclick() {
if (this.analysislist.classType == "") {
this.$message.error("请先选择班级类型");
} else {
this.testScore();
this.batchCodeshow = true;
}
},
//
testScore() {
testScoreBatch(this.testqueryParams).then((res) => {
this.testScorelist = res.rows;
this.total4 = res.total;
});
},
//
batchCodecancel() {
this.batchCodeshow = false;
},
//
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;
},
//
class() {
tKindergartenInfo(this.ClassType).then((res) => {
res.data.forEach((e) => {
var obj = {
name: e.dictLabel,
type: e.dictValue,
};
this.dictValues.push(obj);
});
});
},
getList() {
//
getRoleInfo().then((res) => {
console.log(res);
});
//list
listKindergartenInfo(this.kqueryParams).then((response) => {
this.kindergartenList = response.rows;
this.total1 = response.total;
// console.log(this.kindergartenList);
});
},
//
reset() {
this.form = {};
this.resetForm("form");
},
},
};
</script>

View File

@ -0,0 +1,633 @@
<template>
<div class="app-container">
<el-form
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="90px"
>
<el-form-item label="所属幼儿园" prop="categoryName">
<el-button
@click="kindergartenshow = true"
v-if="kindergartenName == '请选择幼儿园'"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
>{{ kindergartenName }}</el-button
>
<el-button
@click="kindergartenshow = true"
style="width: 250px; text-align: left; height: 32px"
v-else
>{{ kindergartenName }}</el-button
>
</el-form-item>
<el-form-item label="所属批次" prop="categoryName" label-width="70px">
<el-button
@click="batchCodeshowclick"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
v-if="batchCodeName == '请选择批次'"
>{{ batchCodeName }}</el-button
>
<el-button
@click="batchCodeshowclick"
style="width: 250px; text-align: left; height: 32px"
v-else
>{{ batchCodeName }}</el-button
>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<!-- // -->
<el-dialog
width="590px"
title="选择批次"
:visible.sync="batchCodeshow"
append-to-body
style="margin-top: 20px"
:before-close="batchCodecancel"
>
<el-table :data="testScorelist" align="center" style="margin-top: 0px">
<el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 20px; height: 20px"
v-if="batchCodeId == scope.row.id"
circle
@click="batchCodeclick(scope.row)"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="batchCodeclick(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
property="batchCode"
label="批次编号"
width="200"
align="center"
/>
<el-table-column
property="batchName"
label="批次名称"
width="200"
align="center"
/>
</el-table>
<pagination
v-show="total4 > 0"
:total="total4"
:page.sync="testqueryParams.pageNum"
:limit.sync="testqueryParams.pageSize"
@pagination="testScore"
/>
</el-dialog>
<!-- // -->
<el-dialog
width="850px"
title="选择所属幼儿园"
:visible.sync="kindergartenshow"
append-to-body
:before-close="kindergartencancel"
>
<el-table :data="kindergartenList">
<el-table-column label="请选择" width="70" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 15px; height: 15px"
circle
@click="kindergartenNameclick(scope.row)"
v-if="kindergartenId == scope.row.id"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="kindergartenNameclick(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
property="kindergartenName"
label="幼儿园名字"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="kindergartenAddress"
label="幼儿园地址"
width="150"
align="center"
>
</el-table-column>
<el-table-column
label="幼儿园所在组织"
align="center"
prop="organizeName"
width="150"
>
</el-table-column>
<el-table-column
property="contacts"
label="联系人"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="phone"
label="联系电话"
width="150"
align="center"
>
</el-table-column>
</el-table>
<pagination
v-show="total1 > 0"
:total="total1"
:page.sync="kqueryParams.pageNum"
:limit.sync="kqueryParams.pageSize"
@pagination="getList"
/>
</el-dialog>
<el-row v-show="itemshow">
<el-col :span="24" class="card-box" style="">
<el-card>
<div style="display: flex; margin-top: 40px">
<div
slot="header"
style="width: 50%; text-align: center; font-size: 18px"
>
<span>各年级男/女平均身高(cm)</span>
<div
id="main"
style="
width: 500px;
height: 300px;
margin: 0 auto;
padding-top: 40px;
"
></div>
</div>
<div
slot="header"
style="width: 50%; text-align: center; font-size: 18px"
>
<span>各年级男/女平均体重(kg)</span>
<div
id="main2"
style="
width: 500px;
height: 300px;
margin: 0 auto;
padding-top: 40px;
"
></div>
</div>
</div>
</el-card>
</el-col>
</el-row>
<el-row :gutter="20" v-if="itemshow2">
<el-col :span="24" :offset="0">
<el-card>
<div slot="header" style="text-align: center">
<img style="width: 40px" src="@/icons/笑脸.png" alt="" />
<div><!-- card title -->该批次暂无数据</div>
</div>
<!-- card body -->
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import * as echarts from "echarts";
import {
listKindergartenInfo,
tKindergartenInfo,
} from "@/api/system/kindergartenInfo";
import { getRoleInfo, testScoreBatch } from "@/api/system/quality";
import { analysis } from "@/api/system/heightAndWeight";
export default {
name: "KindergartenPhysicalTest",
components: {},
data() {
return {
itemshow: false,
itemshow2: false,
total1: 0,
total4: 0,
//
kindergartenshow: false,
batchCodeshow: false,
//
showSearch: true,
//
form: {},
//
kindergartenType: "kindergarten_type",
type: {},
type2: {},
//
kqueryParams: {
pageNum: 1,
pageSize: 10,
organizeId: null,
kindergartenName: null,
kindergartenAddress: null,
kindergartenType: null,
phone: null,
contacts: null,
},
//list
kindergartenList: [],
//
kindergartenName: "请选择幼儿园",
//ID
kindergartenId: "",
//
batchCodeName: "请选择批次",
//ID
batchCodeId: "",
//list
testScorelist: [],
//
testqueryParams: {
pageNum: 1,
pageSize: 10,
},
analysislist: [],
//
analysisqueryParams: {
kindergartenId: "",
batchCode: "",
// kindergartenId: "18",
// batchCode: "PC202208030005",
},
// weightAndHeightAvgScoreList: [
// {
// studentSex: "FEMALE",
// measureUnit: "cm",
// itemCode: "H001",
// averageScore: 0,
// },
// {
// studentSex: "FEMALE",
// measureUnit: "kg",
// itemCode: "W001",
// averageScore: 0,
// },
// {
// studentSex: "MALE",
// measureUnit: "cm",
// itemCode: "H001",
// averageScore: 0,
// },
// {
// studentSex: "MALE",
// measureUnit: "kg",
// itemCode: "W001",
// averageScore: 0,
// },
// ],
};
},
mounted() {},
created() {
this.getList();
// this.analysisinfo();
},
methods: {
analysisinfo() {
analysis(this.analysisqueryParams).then((res) => {
if (!res.data) {
this.itemshow2 = true;
this.itemshow = false;
} else {
this.analysislist = res.data;
console.log(this.analysislist);
var yclassname = [];
var grilsheight = [];
var boyheight = [];
var boyweight = [];
var grilsweight = [];
for (var i = 0; i < this.analysislist.length; i++) {
this.analysislist[i].weightAndHeightAvgScoreList.forEach((el) => {
if (el.itemCode == "H001" && el.studentSex == "MALE") {
boyheight.push(el.averageScore);
} else if (el.itemCode == "H001" && el.studentSex == "FEMALE") {
grilsheight.push(el.averageScore);
} else if (el.itemCode == "W001" && el.studentSex == "FEMALE") {
grilsweight.push(el.averageScore);
} else if (el.itemCode == "W001" && el.studentSex == "MALE") {
boyweight.push(el.averageScore);
}
});
if (grilsheight.length == i) {
grilsheight.push(0);
}
if (boyheight.length == i) {
boyheight.push(0);
}
if (boyweight.length == i) {
boyweight.push(0);
}
if (grilsweight.length == i) {
grilsweight.push(0);
}
}
this.analysislist.forEach((e) => {
yclassname.push(e.className);
});
console.log(grilsheight, boyheight);
console.log(grilsweight, boyweight);
var app = {};
var myChart = echarts.init(document.getElementById("main"));
var myChart2 = echarts.init(document.getElementById("main2"));
var option;
var option2;
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: {
data: ["男", "女"],
},
xAxis: [
{
type: "category",
axisTick: { show: false },
data: yclassname,
},
],
yAxis: [
{
type: "value",
},
],
series: [
{
name: "男",
type: "bar",
barGap: 0,
color: "#00B050",
label: labelOption,
emphasis: {
focus: "series",
},
data: boyheight,
},
{
name: "女",
type: "bar",
color: "red",
label: labelOption,
emphasis: {
focus: "series",
},
data: grilsheight,
},
],
};
option2 = {
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow",
},
},
legend: {
data: ["男", "女"],
},
xAxis: [
{
type: "category",
axisTick: { show: false },
data: yclassname,
},
],
yAxis: [
{
type: "value",
},
],
series: [
{
name: "男",
type: "bar",
barGap: 0,
color: "#00B050",
label: labelOption,
emphasis: {
focus: "series",
},
data: boyweight,
},
{
name: "女",
type: "bar",
color: "red",
label: labelOption,
emphasis: {
focus: "series",
},
data: grilsweight,
},
],
};
option && myChart.setOption(option);
option2 && myChart2.setOption(option2);
this.itemshow = true;
this.itemshow2 = false;
}
});
},
//
batchCodeclick(row) {
this.batchCodeName = row.batchName;
this.batchCodeId = row.id;
this.analysisqueryParams.batchCode = row.batchCode;
this.batchCodeshow = false;
this.analysisinfo();
},
//
batchCodeshowclick() {
if (this.analysisqueryParams.kindergartenId == "") {
this.$message.error("请先选择幼儿园");
} else {
this.testScore();
this.batchCodeshow = true;
}
},
//
testScore() {
testScoreBatch(this.testqueryParams).then((res) => {
this.testScorelist = res.rows;
this.total4 = res.total;
});
},
//
batchCodecancel() {
this.batchCodeshow = false;
},
//
kindergartencancel() {
this.kindergartenshow = false;
},
//
kindergartenNameclick(row) {
this.analysisqueryParams.kindergartenId = row.id;
this.kindergartenName = row.kindergartenName;
this.kindergartenId = row.id;
this.kindergartenshow = false;
if (this.analysisqueryParams.batchCode != "") {
this.analysisinfo();
}
},
getList() {
tKindergartenInfo(this.kindergartenType).then((res) => {
this.type = res.data[0];
this.type2 = res.data[1];
});
//
getRoleInfo().then((res) => {
console.log(res);
});
//list
listKindergartenInfo(this.kqueryParams).then((response) => {
this.kindergartenList = response.rows;
this.total1 = response.total;
// console.log(this.kindergartenList);
});
},
//
reset() {
this.form = {};
this.resetForm("form");
},
},
};
</script>
<style scoped='scss'>
::v-deep .el-card__header {
border: none;
}
</style>

View File

@ -17,14 +17,6 @@
style="width: 300px"
/>
</el-form-item>
<!-- <el-input
v-model="queryParams.parentId"
placeholder="请输入组织名称"
clearable
@keyup.enter.native="handleQuery"
/> -->
<el-form-item label="区域名称" prop="">
<treeselect
:normalizer="normalizer4"
@ -153,9 +145,10 @@
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-if="scope.row.parentId != 0"
v-hasPermi="['system:area:remove']"
>删除</el-button
>
>删除
</el-button>
</template>
</el-table-column>
</el-table>
@ -163,37 +156,19 @@
<!-- 添加或修改区域管理对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<!-- <el-form ref="form" :model="form" :rules="rules" label-width="110px">
<el-form-item label="所属上级区域" prop="areaId">
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
<el-form-item
label="所属上级组织"
prop="parentId"
v-if="List.length != 0 && form.parentId != 0"
>
<treeselect
:normalizer="normalizer"
:options="areaList"
placeholder="请选择所属上级区域"
v-model="form.areaId"
:normalizer="normalizer2"
:options="List"
placeholder="请选择所属组织"
v-model="form.parentId"
/>
</el-form-item>
<el-form-item label="区域名称" prop="name">
<el-input v-model="form.name" placeholder="请输入区域名称" />
</el-form-item>
<el-form-item label="区域编码" prop="code">
<el-input v-model.number="form.code" placeholder="请输入区域编码" />
</el-form-item>
<el-form-item label="排序" prop="sort">
<el-input v-model.number="form.sort" placeholder="请输入排序" />
</el-form-item>
</el-form> -->
<el-form-item label="所属上级组织" prop="parentId" v-if="form.id != 1">
<treeselect
:normalizer="normalizer2"
:options="List"
placeholder="请选择所属组织"
v-model="form.parentId"
/>
</el-form-item>
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
<el-form-item label="所属区域" prop="areaId">
<treeselect
:normalizer="normalizer"
@ -218,7 +193,7 @@
<el-form-item label="联系人电话" prop="phone">
<el-input
v-model="form.phone"
maxlength="11"
maxlength="13"
placeholder="请输入联系人电话"
/>
</el-form-item>
@ -246,12 +221,19 @@ export default {
//
const regMobile =
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/;
const reg = /^(0[0-9]{2,3}\-)([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$/;
const isTel = reg.test(value);
if (regMobile.test(value)) {
return cb();
if (value.length == 11) {
if (regMobile.test(value)) {
return cb();
}
} else if (11 < value.length <= 13) {
if (isTel) {
return cb();
}
}
cb(new Error("请输入合法的手机号"));
cb(new Error("请输入正确的联系电话"));
};
return {
//
@ -303,7 +285,7 @@ export default {
required: true,
validator: checkMobile,
trigger: "blur",
message: "请输入正确的手机号",
message: "",
},
],
code: [
@ -380,11 +362,13 @@ export default {
getList() {
listArea(this.queryParams).then((response) => {
this.areaList = this.handleTree(response.data);
console.log(this.areaList);
});
this.loading = true;
list(this.queryParams).then((response) => {
this.List = this.handleTree(response.data);
this.List2 = this.List;
console.log(this.List);
this.loading = false;
});
},
@ -470,27 +454,26 @@ export default {
/** 提交按钮 */
submitForm() {
if (this.form.phone == "" || this.form.phone.toString().length == 11) {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
edit(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
add(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
} else {
this.$message.error("请输入正确的手机号码");
if (this.List.length == 0) {
this.form.parentId = 0;
}
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
edit(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
add(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {

View File

@ -8,14 +8,6 @@
v-show="showSearch"
label-width="68px"
>
<!-- <el-form-item label="父级id" prop="parentId">
<el-input
v-model="queryParams.parentId"
placeholder="请输入父级id"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> -->
<el-form-item label="分类名称" prop="categoryName">
<el-input
clearable
@ -36,14 +28,6 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="分类排序" prop="sorting">
<el-input
v-model="queryParams.sorting"
placeholder="请输入分类排序"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> -->
<el-form-item>
<el-button
type="primary"
@ -168,7 +152,7 @@
v-hasPermi="['system:itemCategory:add']"
>新增</el-button
>
<!--
<!--
<el-button
size="mini"
type="text"
@ -202,7 +186,7 @@
<!-- 添加或修改测试项目分类对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
<el-form-item label="所属上级分类" prop="parentId" v-if="form.id != 2">
<el-form-item label="所属上级分类" prop="parentId" v-if="itemCategoryList.length != 0 && form.parentId != 0">
<treeselect
:normalizer="normalizer"
:options="itemCategoryList"
@ -224,7 +208,7 @@
/>
</el-form-item>
<el-form-item label="项目成绩级别" prop="testItemLevelList">
<el-form-item label="测试分类得分" prop="testItemLevelList">
<div
v-for="(item, index) in form.testItemLevelList"
:key="item.id"
@ -232,8 +216,8 @@
>
<el-input
v-model="item.levelName"
placeholder="级别名"
style="width: 75px; margin-right: 20px"
placeholder="得分描述"
style="width: 90px; margin-right: 20px"
/>
<el-input
v-model.number="item.levelMinScore"
@ -298,20 +282,27 @@ export default {
components: { Treeselect },
data() {
let testItemLevelList = (rule, value, callback) => {
let min = value.map((e) => {
return e.levelMinScore;
}).toString();
let max = value.map((e) => {
return e.levelMaxScore;
}).toString();
let min = value
.map((e) => {
return e.levelMinScore;
})
.toString();
let max = value
.map((e) => {
return e.levelMaxScore;
})
.toString();
console.log(min, max);
if (Number(max) < Number(min)) {
console.log(min,max);
callback(new Error("最高分必须大于最低分,请重新填写!"));
}
if (Number(max) < Number(min)) {
if(max && min && max < min){
callback(new Error("最高分必须大于最低分,请重新填写!"));
}else{
console.log(min, max);
}
}
if (
value.map((e) => {
return e.levelName;

View File

@ -253,7 +253,7 @@
<el-form-item label="联系电话" prop="phone">
<el-input
v-model="form.phone"
maxlength="11"
maxlength="13"
placeholder="请输入联系电话"
/>
</el-form-item>
@ -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: [

View File

@ -16,7 +16,7 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="适用人群等级" prop="applyCrowd" label-width="240">
<el-select v-model="queryParams.applyCrowd" placeholder="请选择">
<el-option
@ -111,7 +111,8 @@
<el-table-column label="处方内容" align="center" prop="motionContent" />
<el-table-column label="适用人群" align="center" prop="applyCrowd">
<template slot-scope="scope">
{{ scope.row.applyCrowd == 0 ? "普通" : "会员" }}
{{ scope.row.applyCrowd == 0 ? "普通" : "" }}
{{ scope.row.applyCrowd == 1 ? "会员" : "" }}
</template>
</el-table-column>
<el-table-column label="创建人" align="center" prop="createBy" />
@ -167,8 +168,8 @@
label-width="230px"
>
<el-radio-group v-model="form.applyCrowd">
<el-radio label="0">普通</el-radio>
<el-radio label="1">会员</el-radio>
<el-radio :label="applyCrowd1">普通</el-radio>
<el-radio :label="applyCrowd2">会员</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
@ -211,13 +212,15 @@ export default {
title: "",
//
open: false,
applyCrowd1: 0,
applyCrowd2: 1,
options: [
{
applyCrowd: "0",
applyCrowd: 0,
label: "普通",
},
{
applyCrowd: "1",
applyCrowd: 1,
label: "会员",
},
],
@ -242,7 +245,7 @@ export default {
methods: {
/** 查询运动处方字典列表 */
getList() {
console.log(this.queryParams)
console.log(this.queryParams);
this.loading = true;
listMotionInfo(this.queryParams).then((response) => {
this.motionInfoList = response.rows;

View File

@ -235,6 +235,14 @@ export default {
created() {
this.getList();
},
watch: {
$route(to, from) {
console.log(to.path, from.path);
if (to.path == "/baseInfo/parentInfo") {
this.getList();
}
},
},
methods: {
/** 查询家长信息列表 */
getList() {

View File

@ -0,0 +1,664 @@
<template>
<div class="app-container">
<el-form
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="90px"
>
<el-form-item label="所属幼儿园" prop="categoryName" v-if="showyey">
<el-button
@click="kindergartenshow = true"
v-if="kindergartenName == '请选择幼儿园'"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
>{{ kindergartenName }}</el-button
>
<el-button
@click="kindergartenshow = true"
style="width: 250px; text-align: left; height: 32px"
v-else
>{{ kindergartenName }}</el-button
>
</el-form-item>
<el-form-item label="学生性别" prop="studentSex" label-width="70px">
<el-select
v-model="analysisqueryParams.studentSex"
clearable
placeholder="请选择"
>
<el-option
v-for="item in sexs"
:key="item.value"
:label="item.label"
:value="item.value"
@click.native="sexclick"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="所属批次" prop="batchCodeId" label-width="70px">
<el-button
@click="batchCodeshowclick"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
v-if="batchCodeName == '请选择批次'"
>{{ batchCodeName }}</el-button
>
<el-button
@click="batchCodeshowclick"
style="width: 250px; text-align: left; height: 32px"
v-else
>{{ batchCodeName }}</el-button
>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<!-- // -->
<el-dialog
width="590px"
title="选择批次"
:visible.sync="batchCodeshow"
append-to-body
style="margin-top: 20px"
:before-close="batchCodecancel"
>
<el-table :data="testScorelist" align="center" style="margin-top: 0px">
<el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 20px; height: 20px"
v-if="batchCodeId == scope.row.id"
circle
@click="batchCodeclick(scope.row)"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="batchCodeclick(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
property="batchCode"
label="批次编号"
width="200"
align="center"
/>
<el-table-column
property="batchName"
label="批次名称"
width="200"
align="center"
/>
</el-table>
<pagination
v-show="total4 > 0"
:total="total4"
:page.sync="testqueryParams.pageNum"
:limit.sync="testqueryParams.pageSize"
@pagination="testScore"
/>
</el-dialog>
<!-- // -->
<el-dialog
width="850px"
title="选择所属幼儿园"
:visible.sync="kindergartenshow"
append-to-body
:before-close="kindergartencancel"
>
<el-table :data="kindergartenList">
<el-table-column label="请选择" width="70" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 15px; height: 15px"
circle
@click="kindergartenNameclick(scope.row)"
v-if="kindergartenId == scope.row.id"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="kindergartenNameclick(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
property="kindergartenName"
label="幼儿园名字"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="kindergartenAddress"
label="幼儿园地址"
width="150"
align="center"
>
</el-table-column>
<el-table-column
label="幼儿园所在组织"
align="center"
prop="organizeName"
width="150"
>
</el-table-column>
<el-table-column
property="contacts"
label="联系人"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="phone"
label="联系电话"
width="150"
align="center"
>
</el-table-column>
</el-table>
<pagination
v-show="total1 > 0"
:total="total1"
:page.sync="kqueryParams.pageNum"
:limit.sync="kqueryParams.pageSize"
@pagination="getList"
/>
</el-dialog>
<el-row v-show="itemshow">
<el-col :span="24" :offset="0">
<div style="margin: 0 auto">
<div
style="display: flex; text-align: center; justify-content: center"
>
<div
style="
width: 120px;
line-height: 60px;
border: 1px solid #f0f0f0;
background: #27848b;
color: #fff;
"
>
年龄
</div>
<div
style="
width: 120px;
line-height: 60px;
border: 1px solid #f0f0f0;
background: #27848b;
color: #fff;
"
>
平均总分
</div>
<div v-for="item in categoryTableNameList" :key="item.prentId">
<div
style="
text-align: center;
line-height: 30px;
border: 1px solid #f0f0f0;
background: #27848b;
color: #fff;
"
>
{{ item.parentName }}
</div>
<div
style="
display: flex;
line-height: 30px;
border: 1px solid #f0f0f0;
background: #27848b;
color: #fff;
"
>
<div
v-for="uitem in item.childrenTableNameList"
:key="uitem.categoryId"
style="width: 120px"
>
{{ uitem.categoryName }}
</div>
</div>
</div>
</div>
<div>
<div
style="text-align: center; display: flex; justify-content: center"
v-for="item in categoryAgeFractionList"
:key="item.prentId"
>
<div style="width: 120px; line-height: 60px">
{{ item.studentAge }}
</div>
<div style="width: 120px; line-height: 60px">
{{ item.totalAvgFraction }}
</div>
<div>
<div style="display: flex; line-height: 60px">
<div
v-for="uitem in item.list"
:key="uitem.categoryId"
style="width: 120px"
>
{{ uitem }}
</div>
</div>
</div>
</div>
</div>
<div></div>
</div>
</el-col>
<el-col :span="24" :offset="0" style="margin-top: 30px">
<div style="text-align: center; height: 100px">
<div
class="el-table--enable-row-hover el-table--medium"
style="margin: 20px auto; height: 40px; text-align: center"
>
<div style="display: inline-block">
<span
style="
position: relative;
display: inline-block;
width: 120px;
text-align: center;
"
v-for="(item, index) in firstCategoryScoreList"
:key="index"
>
<span :style="index == 0 ? '' : 'margin-right:20px'">{{
index == 0 ? null : "+"
}}</span>
<span>
{{ item.avgCategoryFraction }}
</span>
<span
:style="index != 0 ? 'left:18px' : ''"
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 style="display: inline-block; width: 100px">{{
totalAvgFraction
}}</span>
<span
style="
display: inline-block;
position: absolute;
top: 20px;
width: 100px;
left: 40px;
margin: 0 20px;
"
>(综合得分)</span
>
</div>
</div>
</div>
</el-col>
<el-col :span="24" :offset="0">
<div style="text-align: center">
<span>园所幼儿综合体质分析图</span>
</div>
<div class="el-table el-table--enable-row-hover el-table--medium">
<div
ref="chart"
id="chart"
style="width: 1000px; height: 600px; margin: 0 auto"
></div>
</div>
</el-col>
</el-row>
<el-row :gutter="20" v-if="itemshow2">
<el-col :span="24" :offset="0">
<el-card>
<div slot="header" style="text-align: center">
<img style="width: 40px" src="@/icons/笑脸.png" alt="" />
<div><!-- card title -->该幼儿园此批次暂无数据</div>
</div>
<!-- card body -->
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import * as echarts from "echarts";
import {
listKindergartenInfo,
tKindergartenInfo,
} from "@/api/system/kindergartenInfo";
import { getRoleInfo, testScoreBatch } from "@/api/system/quality";
import { analysis } from "@/api/system/physique";
export default {
name: "KindergartenPhysicalTest",
components: {},
data() {
return {
sexs: [
{
value: "MALE",
label: "男",
},
{
value: "FEMALE",
label: "女",
},
],
itemshow: false,
itemshow2: false,
showyey: true,
total1: 0,
total4: 0,
//
kindergartenshow: false,
batchCodeshow: false,
//
showSearch: true,
//
form: {},
//
kqueryParams: {
pageNum: 1,
pageSize: 10,
organizeId: null,
kindergartenName: null,
kindergartenAddress: null,
kindergartenType: null,
phone: null,
contacts: null,
},
//list
kindergartenList: [],
//
kindergartenName: "请选择幼儿园",
//ID
kindergartenId: "",
//
batchCodeName: "请选择批次",
//ID
batchCodeId: "",
//list
testScorelist: [],
//
testqueryParams: {
pageNum: 1,
pageSize: 10,
},
//
analysisqueryParams: {
// kindergartenId: "18",
// batchCode: "PC202208030005",
// studentSex: "FEMALE",
kindergartenId: "",
batchCode: "",
studentSex: "",
},
categoryTableNameList: [],
categoryAgeFractionList: [],
categoryScoreList: [],
firstCategoryScoreList: [],
totalAvgFraction: "",
};
},
mounted() {},
created() {
this.getList();
// this.analysisinfo();
},
methods: {
analysisinfo() {
analysis(this.analysisqueryParams).then((res) => {
if (res.data == [] || !res.data) {
this.itemshow2 = true;
this.itemshow = false;
} else {
this.totalAvgFraction = res.data.totalAvgFraction;
this.categoryTableNameList = res.data.categoryTableNameList;
this.categoryAgeFractionList = res.data.categoryAgeFractionList;
this.categoryScoreList = res.data.categoryScoreList;
this.firstCategoryScoreList = res.data.firstCategoryScoreList;
console.log(this.firstCategoryScoreList);
if (res.data == [] || !res.data) {
this.itemshow2 = true;
this.itemshow = false;
} else {
var list = [];
this.categoryTableNameList.forEach((e) => {
e.childrenTableNameList.forEach((el) => {
list.push(el.categoryId);
});
});
this.categoryAgeFractionList.forEach((el) => {
var list1 = list.map((e) => {
var num = 0;
var number = el.categoryAvgFractionList.findIndex(
(o) => o.categoryId == e
);
if (number != -1) {
num = el.categoryAvgFractionList[number].avgCategoryFraction;
}
return num;
});
el.list = list1;
});
let seriesData = [];
let yindicator = [];
this.categoryScoreList.forEach((el) => {
console.log(el);
seriesData.push(el.itemFraction);
if (el.avgCategoryName == null) {
el.avgCategoryName = "暂无";
}
if (this.categoryScoreList.length == 1) {
yindicator.push({
name:
el.categoryName + " " + "(" + el.avgCategoryName + "" + ")",
max: el.maxFraction,
});
yindicator.push({
name: "暂无数据",
max: 100,
});
yindicator.push({
name: "暂无数据",
max: 100,
});
} else if (this.categoryScoreList.length == 2) {
yindicator.push({
name:
el.categoryName + " " + "(" + el.avgCategoryName + "" + ")",
max: el.maxFraction,
});
yindicator.push({
name: "暂无数据",
max: 100,
});
} else {
yindicator.push({
name:
el.categoryName + " " + "(" + el.avgCategoryName + "" + ")",
max: el.maxFraction,
});
}
});
var myChart = echarts.init(document.getElementById("chart"));
let option = {
//
color: "blue",
radar: {
name: {
show: true,
color: "black",
},
center: ["50%", "50%"],
//
indicator: yindicator,
shape: "polygon", //, circle:,polygon:()
},
series: [
{
type: "radar",
label: {
show: true,
color: "blue", //
},
areaStyle: {}, //
data: [
{
name: "成绩区域",
value: seriesData,
},
],
areaStyle: {
color: new echarts.graphic.RadialGradient(0.1, 0.6, 1, [
{
color: "rgba(50, 50, 255, 0.1)",
offset: 0,
},
{
color: "rgba(50, 50, 200, 0.9)",
offset: 1,
},
]),
},
},
],
};
//
myChart.setOption(option);
this.itemshow2 = false;
this.itemshow = true;
}
}
});
},
//
batchCodeclick(row) {
this.batchCodeName = row.batchName;
this.batchCodeId = row.id;
this.analysisqueryParams.batchCode = row.batchCode;
this.batchCodeshow = false;
this.analysisinfo();
},
//
batchCodeshowclick() {
if (
this.analysisqueryParams.kindergartenId == "" ||
this.analysisqueryParams.kindergartenId == null
) {
this.$message.error("请先选择幼儿园");
} else {
console.log(1);
this.testScore();
this.batchCodeshow = true;
}
},
//
testScore() {
testScoreBatch(this.testqueryParams).then((res) => {
this.testScorelist = res.rows;
this.total4 = res.total;
});
},
//
batchCodecancel() {
this.batchCodeshow = false;
},
//
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() {
tKindergartenInfo(this.kindergartenType).then((res) => {
this.type = res.data[0];
this.type2 = res.data[1];
});
//
getRoleInfo().then((res) => {
console.log(res);
this.analysisqueryParams.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) => {
this.kindergartenList = response.rows;
this.total1 = response.total;
// console.log(this.kindergartenList);
});
},
//
reset() {
this.form = {};
this.resetForm("form");
},
},
};
</script>
<style scoped='scss'>
</style>

View File

@ -7,7 +7,7 @@
v-show="showSearch"
label-width="90px"
>
<el-form-item label="所属幼儿园" prop="categoryName">
<el-form-item label="所属幼儿园" prop="categoryName" v-if="showyey">
<el-button
@click="kindergartenshow = true"
v-if="kindergartenName == '请选择幼儿园'"
@ -22,7 +22,12 @@
>
</el-form-item>
<el-form-item label="所属班级" prop="categoryName" label-width="70px">
<el-form-item
label="所属班级"
prop="categoryName"
label-width="70px"
v-if="showbj"
>
<el-button
@click="classshowclick"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
@ -77,7 +82,7 @@
<!-- // -->
<el-dialog
width="500px"
width="590px"
title="选择批次"
:visible.sync="batchCodeshow"
append-to-body
@ -85,7 +90,7 @@
:before-close="batchCodecancel"
>
<el-table :data="testScorelist" align="center" style="margin-top: 0px">
<el-table-column label="请选择" width="70" align="center">
<el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope">
<el-button
type="primary"
@ -105,13 +110,13 @@
<el-table-column
property="batchCode"
label="批次编号"
width="190"
width="200"
align="center"
/>
<el-table-column
property="batchName"
label="批次名称"
width="190"
width="200"
align="center"
/>
</el-table>
@ -216,7 +221,6 @@
></el-button>
</template>
</el-table-column>
<el-table-column
property="kindergartenName"
label="幼儿园名字"
@ -426,6 +430,7 @@
border-right: 1px solid #ededed;
border-bottom: 1px solid #ededed;
position: relative;
overflow: hidden;
"
>
<span style="position: absolute; left: 5%; top: 10px"
@ -433,37 +438,32 @@
item.measureUnit == "s" || item.measureUnit == "h" ? "时间" : ""
}}{{
item.measureUnit == "cm" || item.measureUnit == "m" ? "距离" : ""
}}({{ item.measureUnit }})</span
>
}}
{{ item.measureUnit == "kg" ? "千克" : "" }}
{{ item.measureUnit == "g" ? "克" : "" }}({{ item.measureUnit }})
</span>
<span
style="
margin-top: 20px;
float: left;
margin-left: 6%;
margin-top: 14%;
"
>评价</span
>
<span style="position: absolute; left: 6%; top: 70%">评价</span>
<div
style="
width: 70%;
width: 65%;
margin: 0 auto;
margin-top: 10px;
margin-left: 20%;
margin-left: 25%;
position: relative;
"
>
<div
style="position: absolute; top: 1px; left: 79%; line-height: 20px"
style="
position: absolute;
top: 1px;
left: 79%;
line-height: 20px;
overflow: hidden;
width: 32px;
"
>
{{
((((item.maxScore - item.minScore) / item.minScore) *
item.minScore) /
5) *
4 +
item.minScore
}}
{{ ((item.maxScore - item.minScore) / 5) * 4 + item.minScore }}
</div>
<div
style="
@ -476,15 +476,16 @@
"
></div>
<div
style="position: absolute; top: 1px; left: 59%; line-height: 20px"
style="
position: absolute;
top: 1px;
left: 59%;
overflow: hidden;
line-height: 20px;
width: 32px;
"
>
{{
((((item.maxScore - item.minScore) / item.minScore) *
item.minScore) /
5) *
3 +
item.minScore
}}
{{ ((item.maxScore - item.minScore) / 5) * 3 + item.minScore }}
</div>
<div
style="
@ -497,15 +498,16 @@
"
></div>
<div
style="position: absolute; top: 1px; left: 39%; line-height: 20px"
style="
position: absolute;
top: 1px;
left: 39%;
line-height: 20px;
overflow: hidden;
width: 32px;
"
>
{{
((((item.maxScore - item.minScore) / item.minScore) *
item.minScore) /
5) *
2 +
item.minScore
}}
{{ ((item.maxScore - item.minScore) / 5) * 2 + item.minScore }}
</div>
<div
style="
@ -519,15 +521,16 @@
></div>
<div
style="position: absolute; top: 1px; left: 19%; line-height: 20px"
style="
position: absolute;
top: 1px;
left: 19%;
line-height: 20px;
overflow: hidden;
width: 32px;
"
>
{{
((((item.maxScore - item.minScore) / item.minScore) *
item.minScore) /
5) *
1 +
item.minScore
}}
{{ ((item.maxScore - item.minScore) / 5) * 1 + item.minScore }}
</div>
<div
style="
@ -540,7 +543,14 @@
"
></div>
<div
style="position: absolute; top: 1px; left: -1%; line-height: 20px"
style="
position: absolute;
top: 1px;
left: -1%;
line-height: 20px;
overflow: hidden;
width: 32px;
"
>
{{ item.minScore == null ? 0 : item.minScore }}
</div>
@ -561,6 +571,8 @@
top: 1px;
right: -1%;
line-height: 20px;
overflow: hidden;
width: 32px;
"
>
{{ item.maxScore == null ? 100 : item.maxScore }}
@ -660,6 +672,8 @@ export default {
return {
itemshow: false,
itemshow2: false,
showyey: true,
showbj: true,
total1: 0,
total2: 0,
total3: 0,
@ -744,6 +758,8 @@ export default {
pageSize: 10,
studentId: "",
batchCode: "",
// studentId: "27",
// batchCode: "PC202208230011",
// studentId: "14",
// batchCode: "PC202208030005",
// studentId: "9",
@ -773,6 +789,8 @@ export default {
this.itemshow2 = true;
this.itemshow = false;
} else {
this.itemshow = true;
this.itemshow2 = false;
this.studentscorelist = res.rows;
console.log(this.studentscorelist);
}
@ -817,6 +835,9 @@ export default {
this.studentId = row.id;
this.studentshow = false;
this.studentscore.studentId = row.id;
if (this.studentscore.batchCode != "") {
this.studenttext();
}
},
//
@ -860,6 +881,9 @@ export default {
this.className = row.className;
this.classId = row.id;
this.studentqueryParams.classId = row.id;
this.studentname = "请选择学生";
this.studentId = "";
this.studentscore.studentId = "";
this.classshow = false;
},
//
@ -867,6 +891,11 @@ export default {
this.classqueryParams.kindergartenId = row.id;
this.kindergartenName = row.kindergartenName;
this.kindergartenId = row.id;
this.className = "请选择班级";
this.classId = "";
this.studentname = "请选择学生";
this.studentId = "";
this.studentscore.studentId = "";
this.kindergartenshow = false;
},
//
@ -883,7 +912,6 @@ export default {
listClassinfo(this.classqueryParams).then((response) => {
this.classinfoList = response.rows;
this.total2 = response.total;
// console.log(this.classinfoList);
});
},
@ -892,6 +920,20 @@ export default {
//
getRoleInfo().then((res) => {
console.log(res);
this.classqueryParams.kindergartenId = res.data.kindergartenId;
var user = res.data.roleKeys;
console.log(user);
if (user.includes("enchou")) {
this.showyey = false;
return;
} else if (user.includes("teacher")) {
this.showyey = false;
return;
} else if (user.includes("parent")) {
this.showyey = false;
this.showbj = false;
return;
}
});
//list
listKindergartenInfo(this.kqueryParams).then((response) => {

View File

@ -7,7 +7,7 @@
v-show="showSearch"
label-width="90px"
>
<el-form-item label="所属幼儿园" prop="categoryName">
<el-form-item label="所属幼儿园" prop="categoryName" v-if="showyey">
<el-button
@click="kindergartenshow = true"
v-if="kindergartenName == '请选择幼儿园'"
@ -22,7 +22,12 @@
>
</el-form-item>
<el-form-item label="所属班级" prop="categoryName" label-width="70px">
<el-form-item
label="所属班级"
prop="categoryName"
label-width="70px"
v-if="showbj"
>
<el-button
@click="classshowclick"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
@ -77,7 +82,7 @@
<!-- // -->
<el-dialog
width="500px"
width="590px"
title="选择批次"
:visible.sync="batchCodeshow"
append-to-body
@ -85,7 +90,7 @@
:before-close="batchCodecancel"
>
<el-table :data="testScorelist" align="center" style="margin-top: 0px">
<el-table-column label="请选择" width="70" align="center">
<el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope">
<el-button
type="primary"
@ -105,13 +110,13 @@
<el-table-column
property="batchCode"
label="批次编号"
width="190"
width="200"
align="center"
/>
<el-table-column
property="batchName"
label="批次名称"
width="190"
width="200"
align="center"
/>
</el-table>
@ -382,8 +387,11 @@
style="text-align: center"
>
<div class="cell">
{{ analysislist.heightName }}:
{{ analysislist.heightScore
{{
analysislist.heightName
? analysislist.heightName
: "身高"
}}: {{ analysislist.heightScore
}}{{ analysislist.heightMeasureUnit }}
</div>
</td>
@ -392,8 +400,11 @@
style="text-align: center"
>
<div class="cell">
{{ analysislist.weightName }}:
{{ analysislist.weightScore
{{
analysislist.weightName
? analysislist.weightName
: "体重"
}}: {{ analysislist.weightScore
}}{{ analysislist.weightMeasureUnit }}
</div>
</td>
@ -430,6 +441,7 @@
style="height: 310px"
>
<div
v-show="heightshow"
slot="header"
style="text-align: center; font-size: 12px; padding-top: 20px"
>
@ -605,6 +617,7 @@
<div
slot="header"
v-show="weightshow"
style="
text-align: center;
margin-top: 20px;
@ -785,7 +798,12 @@
</el-card>
</el-col>
<el-col :span="11" class="card-box" style="height: 370px">
<el-col
:span="11"
class="card-box"
style="height: 370px"
v-show="itemshow3"
>
<el-card>
<div slot="header" style="text-align: center">
<span>BMI</span>
@ -798,7 +816,7 @@
<div
ref="chart"
id="chart"
style="width: 100%; height: 320px"
style="width: 450px; height: 320px; margin: 0 auto"
></div>
<div
@ -912,7 +930,7 @@
<div style="text-align: center">
{{ item.levelMinScore }}~{{ item.levelMaxScore }}
</div>
</span>
</span>
</div> -->
<div></div>
</div>
@ -951,16 +969,21 @@ export default {
return {
itemshow: false,
itemshow2: false,
itemshow3: true,
weightshow: true,
heightshow: true,
showyey: true,
showbj: true,
total1: 0,
total2: 0,
total3: 0,
total4: 0,
itemweight: "",
weightMax: 50,
weightMax: 70,
weightMin: 10,
itemheight: "",
heightMax: 150,
heightMin: 50,
heightMin: 30,
//
kindergartenshow: false,
classshow: false,
@ -1061,9 +1084,36 @@ export default {
//
studentanalysis() {
analysis(this.analysisstudent).then((res) => {
if (!res.data || res.data == "" || res.data == []) {
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;
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;
@ -1094,6 +1144,7 @@ export default {
{
type: "pie",
radius: ["40%", "70%"],
// center: ["37%", "50%"],
itemStyle: {
normal: {
color: function (colors) {
@ -1123,6 +1174,7 @@ export default {
option && myChart.setOption(option);
this.itemshow2 = false;
this.itemshow = true;
this.itemshow3 = true;
}
});
},
@ -1165,6 +1217,9 @@ export default {
this.studentId = row.id;
this.studentshow = false;
this.analysisstudent.studentId = row.id;
if (this.analysisstudent.batchCode != "") {
this.studentanalysis();
}
},
//
studentlist() {
@ -1206,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;
},
//
@ -1213,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;
},
//
@ -1238,6 +1301,20 @@ export default {
//
getRoleInfo().then((res) => {
console.log(res);
this.classqueryParams.kindergartenId = res.data.kindergartenId;
var user = res.data.roleKeys;
console.log(user);
if (user.includes("enchou")) {
this.showyey = false;
return;
} else if (user.includes("teacher")) {
this.showyey = false;
return;
} else if (user.includes("parent")) {
this.showyey = false;
this.showbj = false;
return;
}
});
//list
listKindergartenInfo(this.kqueryParams).then((response) => {

View File

@ -82,7 +82,7 @@
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery1"
>重置</el-button
>
</el-form-item>
@ -284,7 +284,7 @@
<el-input v-model="form.studentName" placeholder="请输入学生姓名" />
</el-form-item>
<el-form-item label="学生编号" prop="studentNumber">
<el-input v-model="form.studentNumber" placeholder="请输入学生编号" />
<el-input v-model="form.studentNumber" placeholder="请输入学生编号" maxlength="20" />
</el-form-item>
<el-form-item label="学生性别" prop="studentSex">
<el-radio-group v-model="form.studentSex">
@ -299,6 +299,7 @@
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择出生日期"
:picker-options="pickerOptions"
>
</el-date-picker>
</el-form-item>
@ -359,7 +360,7 @@
@click="handleQuery3"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery3"
>重置</el-button
>
<el-button
@ -495,7 +496,7 @@
@click="handleQuery2"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery2"
>重置</el-button
>
</el-form-item>
@ -596,7 +597,7 @@
<el-form-item label="联系电话" prop="phone">
<el-input
maxlength="11"
maxlength="13"
v-model="addparentlist.phone"
placeholder="请输入联系电话"
/>
@ -678,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) => {
@ -701,6 +709,11 @@ export default {
}
};
return {
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now();
},
},
//
parentStudentInfoList: [],
//
@ -809,12 +822,15 @@ export default {
form2: {},
//
rules: {
studentNumber: [
{ required: true, message: "请输入学生编号", trigger: "blur" },
],
phone: [
{
required: true,
validator: checkMobile,
trigger: "blur",
message: "请输入正确的手机号",
message: "",
},
],
birthDate: [
@ -946,7 +962,6 @@ export default {
handleQuery3() {
listParentInfo(this.parentInfoList2).then((response) => {
this.parentInfoList = response.rows;
console.log(this.parentInfoList);
this.total3 = response.total;
});
},
@ -959,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();
@ -1160,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) {
@ -1285,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() {
@ -1307,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);
@ -1323,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;
});
@ -1364,6 +1399,10 @@ export default {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
this.parent1 = "";
this.parent2 = "";
this.parentlist = [];
this.tags = [];
});
}
}
@ -1373,7 +1412,7 @@ export default {
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal
.confirm('是否确认删除该学生信息吗?')
.confirm("是否确认删除该学生信息吗?")
.then(function () {
return delStudentInfo(ids);
})

View File

@ -0,0 +1,730 @@
<template>
<div class="app-container">
<el-form
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="90px"
>
<el-form-item label="所属幼儿园" prop="categoryName" v-if="showyey">
<el-button
@click="kindergartenshow = true"
v-if="kindergartenName == '请选择幼儿园'"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
>{{ kindergartenName }}</el-button
>
<el-button
@click="kindergartenshow = true"
style="width: 250px; text-align: left; height: 32px"
v-else
>{{ kindergartenName }}</el-button
>
</el-form-item>
<el-form-item label="所属批次" prop="categoryName" label-width="70px">
<el-button
@click="batchCodeshowclick"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
v-if="batchCodeName == '请选择批次'"
>{{ batchCodeName }}</el-button
>
<el-button
@click="batchCodeshowclick"
style="width: 250px; text-align: left; height: 32px"
v-else
>{{ batchCodeName }}</el-button
>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row>
<!-- // -->
<el-dialog
width="590px"
title="选择批次"
:visible.sync="batchCodeshow"
append-to-body
style="margin-top: 20px"
:before-close="batchCodecancel"
>
<el-table :data="testScorelist" align="center" style="margin-top: 0px">
<el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 20px; height: 20px"
v-if="batchCodeId == scope.row.id"
circle
@click="batchCodeclick(scope.row)"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="batchCodeclick(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
property="batchCode"
label="批次编号"
width="200"
align="center"
/>
<el-table-column
property="batchName"
label="批次名称"
width="200"
align="center"
/>
</el-table>
<pagination
v-show="total4 > 0"
:total="total4"
:page.sync="testqueryParams.pageNum"
:limit.sync="testqueryParams.pageSize"
@pagination="testScore"
/>
</el-dialog>
<!-- // -->
<el-dialog
width="850px"
title="选择所属幼儿园"
:visible.sync="kindergartenshow"
append-to-body
:before-close="kindergartencancel"
>
<el-table :data="kindergartenList">
<el-table-column label="请选择" width="70" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 15px; height: 15px"
circle
@click="kindergartenNameclick(scope.row)"
v-if="kindergartenId == scope.row.id"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="kindergartenNameclick(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
property="kindergartenName"
label="幼儿园名字"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="kindergartenAddress"
label="幼儿园地址"
width="150"
align="center"
>
</el-table-column>
<el-table-column
label="幼儿园所在组织"
align="center"
prop="organizeName"
width="150"
>
</el-table-column>
<el-table-column
property="contacts"
label="联系人"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="phone"
label="联系电话"
width="150"
align="center"
>
</el-table-column>
</el-table>
<pagination
v-show="total1 > 0"
:total="total1"
:page.sync="kqueryParams.pageNum"
:limit.sync="kqueryParams.pageSize"
@pagination="getList"
/>
</el-dialog>
<el-row v-show="itemshow">
<div style="display: flex">
<div style="width: 50%">
<div
id="main"
style="width: 500px; height: 300px; margin: 0 auto"
></div>
<div
id="main2"
style="width: 500px; height: 300px; margin: 0 auto"
></div>
<div
id="main3"
style="width: 500px; height: 300px; margin: 0 auto"
></div>
</div>
<div style="width: 50%; margin-top: 50px">
<el-table
ref="singleTable"
:data="studentlist"
highlight-current-row
style="margin: 0 auto; width: 530px"
>
<el-table-column
type="index"
width="130"
label="排名"
align="center"
>
</el-table-column>
<el-table-column
property="studentName"
label="姓名"
width="130"
align="center"
>
</el-table-column>
<el-table-column
property="className"
label="班级"
width="130"
align="center"
>
</el-table-column>
<el-table-column
property="itemFraction"
label="分数"
width="140"
align="center"
>
</el-table-column>
</el-table>
</div>
</div>
</el-row>
<el-row :gutter="20" v-if="itemshow2">
<el-col :span="24" :offset="0">
<el-card>
<div slot="header" style="text-align: center">
<img style="width: 40px" src="@/icons/笑脸.png" alt="" />
<div><!-- card title -->该幼儿园此批次暂无数据</div>
</div>
<!-- card body -->
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import * as echarts from "echarts";
import {
listKindergartenInfo,
tKindergartenInfo,
} from "@/api/system/kindergartenInfo";
import { getRoleInfo, testScoreBatch } from "@/api/system/quality";
import { StudentList, ClassList } from "@/api/system/survey";
export default {
name: "KindergartenPhysicalTest",
components: {},
data() {
return {
itemshow: false,
itemshow2: false,
showyey: true,
total1: 0,
total4: 0,
//
kindergartenshow: false,
batchCodeshow: false,
//
showSearch: true,
//
form: {},
//
kindergartenType: "kindergarten_type",
type: {},
type2: {},
//
kqueryParams: {
pageNum: 1,
pageSize: 10,
organizeId: null,
kindergartenName: null,
kindergartenAddress: null,
kindergartenType: null,
phone: null,
contacts: null,
},
//list
kindergartenList: [],
//
kindergartenName: "请选择幼儿园",
//ID
kindergartenId: "",
//
batchCodeName: "请选择批次",
//ID
batchCodeId: "",
//list
testScorelist: [],
//
testqueryParams: {
pageNum: 1,
pageSize: 10,
},
studentlist: [],
//
classqueryParams: {
kindergartenId: "",
batchCode: "",
pageNum: 1,
pageSize: 10,
// kindergartenId: "12",
// batchCode: "PC202208030005",
},
studentlistqueryParams: {
kindergartenId: "",
batchCode: "",
pageNum: 1,
pageSize: 10,
// kindergartenId: "1",
// batchCode: "PC202208030005",
},
LARGECLASS: "LARGE_CLASS",
MIDDLECLASS: "MIDDLE_CLASS",
SMALLCLASS: "SMALL_CLASS",
yclassname1: [],
yclassname2: [],
yclassname3: [],
classscore1: [],
classscore2: [],
classscore3: [],
};
},
mounted() {},
created() {
this.getList();
// this.StudentListinfo();
// this.ClassListinfo();
},
methods: {
ClassListinfo() {
ClassList(this.classqueryParams).then((res) => {
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 {
this.$nextTick((e) => {
this.yclassname1 = [];
this.yclassname2 = [];
this.yclassname3 = [];
this.classscore1 = [];
this.classscore2 = [];
this.classscore3 = [];
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;
});
}
});
},
StudentListinfo() {
StudentList(this.studentlistqueryParams).then((res) => {
if (res.rows.length == 0) {
this.itemshow2 = true;
this.itemshow = false;
} else {
this.studentlist = res.rows;
this.itemshow2 = false;
this.itemshow = true;
}
});
},
//
batchCodeclick(row) {
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();
},
//
batchCodeshowclick() {
if (
this.classqueryParams.kindergartenId == "" ||
this.classqueryParams.kindergartenId == null
) {
this.$message.error("请先选择幼儿园");
} else {
this.testScore();
this.batchCodeshow = true;
}
},
//
testScore() {
testScoreBatch(this.testqueryParams).then((res) => {
this.testScorelist = res.rows;
this.total4 = res.total;
});
},
//
batchCodecancel() {
this.batchCodeshow = false;
},
//
kindergartencancel() {
this.kindergartenshow = false;
},
//
kindergartenNameclick(row) {
this.classqueryParams.kindergartenId = row.id;
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;
},
getList() {
tKindergartenInfo(this.kindergartenType).then((res) => {
this.type = res.data[0];
this.type2 = res.data[1];
});
//
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) => {
this.kindergartenList = response.rows;
this.total1 = response.total;
// console.log(this.kindergartenList);
});
},
//
reset() {
this.form = {};
this.resetForm("form");
},
},
};
</script>
<style scoped='scss'>
::v-deep .el-card__header {
border: none;
}
</style>

View File

@ -56,7 +56,7 @@
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery1"
>重置</el-button
>
</el-form-item>
@ -126,7 +126,7 @@
align="center"
prop="kindergartenName"
/>
<el-table-column label="所属班级" align="center" prop="teacherClassId">
<el-table-column label="所属班级" align="center" prop="classInfoList">
<template slot-scope="scope">
<el-button size="mini" type="text" @click="teacherInfo(scope.row)"
>查看</el-button
@ -200,7 +200,7 @@
</el-form-item>
<el-form-item
label="所属班级"
prop="teacherClassId"
prop="classInfoList"
class="is-required"
>
<el-button
@ -244,7 +244,11 @@
</el-radio-group>
</el-form-item>
<el-form-item label="联系电话" prop="teacherPhone">
<el-input v-model="form.teacherPhone" placeholder="请输入联系电话" />
<el-input
v-model="form.teacherPhone"
placeholder="请输入联系电话"
maxlength="11"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -292,7 +296,7 @@
@click="handleQuery3"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery2"
>重置</el-button
>
</el-form-item>
@ -421,7 +425,7 @@
@click="handleQuery2"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery3"
>重置</el-button
>
</el-form-item>
@ -577,6 +581,7 @@ import {
export default {
name: "TeacherInfo",
data() {
// const checkMobile =/^(?:(?:\+|00)86)?1(?:(?:3[\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\d])|(?:9[189]))\d{8}$/;
//
var checkMobile = (rule, value, cb) => {
//
@ -586,14 +591,23 @@ export default {
cb();
} else {
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();
}
/^(?:(?:\+|00)86)?1(?:(?:3[\d])|(?:4[5-79])|(?:5[0-35-9])|(?:6[5-7])|(?:7[0-8])|(?:8[\d])|(?:9[189]))\d{8}$/;
const reg = /^(0[0-9]{2,3}\-)([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$/;
const isTel = reg.test(value);
cb(new Error("请输入合法的手机号"));
if (value.length == 11) {
if (regMobile.test(value)) {
return cb();
}
} else if (11 < value.length <= 13) {
if (isTel) {
return cb();
}
}
cb(new Error("请输入正确的联系电话"));
}
};
//
var isCardId = (rule, value, callback) => {
if (!value) {
@ -723,19 +737,12 @@ export default {
{ required: true, message: "请输入证件号", trigger: "blur" },
{ validator: isCardId, trigger: "blur" },
],
teacherClassId: [
classInfoList: [
{ required: true, message: "所属班级不能为空", trigger: "blur" },
],
kindergartenId: [
{ required: true, message: "所属幼儿园不能为空", trigger: "blur" },
],
teacherClassId: [
// {
// required: true,
// message: "id",
// trigger: "blur",
// },
],
},
};
},
@ -811,6 +818,8 @@ export default {
this.teacherrclassinfo = res.data;
});
},
kindergartenNameclick(row) {
this.form.kindergartenId = row.id;
this.kindergartenid = row.id;
@ -820,6 +829,16 @@ export default {
// this.getclassinfo();
},
resetQuery3() {
this.classinfoList2 = {
pageNum: 1,
pageSize: 10,
kindergartenId: null,
className: null,
classType: null,
};
this.handleQuery2();
},
//banjisousuo
handleQuery2() {
listClassinfo(this.classinfoList2).then((response) => {
@ -827,34 +846,12 @@ export default {
this.total2 = response.total;
});
},
/** 查询教师信息管理列表 */
getList() {
this.loading = true;
listKindergartenInfo(this.queryParams2).then((response) => {
this.kindergartenInfoList = response.rows;
this.total3 = response.total;
});
listTeacherInfo(this.queryParams).then((response) => {
this.teacherInfoList = response.rows;
this.total = response.total;
this.loading = false;
});
tKindergartenInfo(this.ClassType).then((res) => {
this.options[0].classType = res.data[0].dictValue;
this.options[1].classType = res.data[1].dictValue;
this.options[2].classType = res.data[2].dictValue;
this.options[3].classType = res.data[3].dictValue;
this.dictValue1 = res.data[0].dictValue;
this.dictValue2 = res.data[1].dictValue;
this.dictValue3 = res.data[2].dictValue;
this.dictValue4 = res.data[3].dictValue;
});
},
//
cancel() {
this.open = false;
this.reset();
this.resetQuery();
// this.resetQuery();
this.kindergartenid = "";
this.kindergartenName = "请选择所在幼儿园";
this.classinfoName = [];
@ -873,7 +870,7 @@ export default {
className: null,
classType: null,
};
this.getList();
this.handleQuery3();
this.innerVisible = false;
this.innerVisible2 = false;
},
@ -917,7 +914,25 @@ export default {
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
listTeacherInfo(this.queryParams).then((response) => {
this.teacherInfoList = response.rows;
this.total = response.total;
});
},
resetQuery1() {
this.resetForm("queryForm");
this.handleQuery();
},
resetQuery2() {
this.queryParams2 = {
pageNum: 1,
pageSize: 10,
kindergartenId: null,
className: null,
classType: null,
};
this.handleQuery3();
},
/** 搜索按钮操作 */
handleQuery3() {
@ -928,26 +943,39 @@ export default {
});
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.queryParams2 = {
pageNum: 1,
pageSize: 10,
kindergartenId: null,
className: null,
classType: null,
};
this.classinfoList2 = {
pageNum: 1,
pageSize: 10,
kindergartenId: null,
className: null,
classType: null,
};
listClassinfo(this.classinfoList2).then((response) => {
this.classinfoList = response.rows;
this.total2 = response.total;
});
// resetQuery() {
// this.resetForm("queryForm");
// this.queryParams2 = {
// pageNum: 1,
// pageSize: 10,
// kindergartenId: null,
// className: null,
// classType: null,
// };
// this.classinfoList2 = {
// pageNum: 1,
// pageSize: 10,
// kindergartenId: null,
// className: null,
// classType: null,
// };
// listClassinfo(this.classinfoList2).then((response) => {
// this.classinfoList = response.rows;
// this.total2 = response.total;
// });
// listKindergartenInfo(this.queryParams2).then((response) => {
// this.kindergartenInfoList = response.rows;
// this.total3 = response.total;
// });
// listTeacherInfo(this.queryParams).then((response) => {
// this.teacherInfoList = response.rows;
// this.total = response.total;
// this.loading = false;
// });
// },
/** 查询教师信息管理列表 */
getList() {
this.loading = true;
listKindergartenInfo(this.queryParams2).then((response) => {
this.kindergartenInfoList = response.rows;
this.total3 = response.total;
@ -957,6 +985,16 @@ export default {
this.total = response.total;
this.loading = false;
});
tKindergartenInfo(this.ClassType).then((res) => {
this.options[0].classType = res.data[0].dictValue;
this.options[1].classType = res.data[1].dictValue;
this.options[2].classType = res.data[2].dictValue;
this.options[3].classType = res.data[3].dictValue;
this.dictValue1 = res.data[0].dictValue;
this.dictValue2 = res.data[1].dictValue;
this.dictValue3 = res.data[2].dictValue;
this.dictValue4 = res.data[3].dictValue;
});
},
//
handleSelectionChange(selection) {
@ -970,7 +1008,6 @@ export default {
this.open = true;
this.title = "添加教师信息管理";
},
innerVisibletrue2() {
if (this.form.kindergartenId == "") {
this.$message.error("请先选择幼儿园");
@ -1016,17 +1053,19 @@ export default {
updateTeacherInfo(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
this.reset();
this.resetQuery();
this.kindergartenid = "";
this.kindergartenName = "请选择所在幼儿园";
this.classinfoName = [];
this.resetQuery1();
});
} else {
addTeacherInfo(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
this.reset();
this.resetQuery();
this.resetQuery1();
this.kindergartenid = "";
this.kindergartenName = "请选择所在幼儿园";
this.classinfoName = [];
});
}
}

View File

@ -26,10 +26,11 @@
style="width: 228px"
/>
</el-form-item>
<el-form-item label="平均成绩" prop="itemAvgScore">
<el-form-item label="平均得分" prop="itemAvgScore">
<el-input
v-model="queryParams.itemAvgScore"
placeholder="请输入平均成绩"
placeholder="请输入平均得分"
clearable
@keyup.enter.native="handleQuery2"
/>
@ -109,7 +110,13 @@
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="所属区域" align="center" prop="name" />
<el-table-column label="所属项目" align="center" prop="itemName" />
<el-table-column label="平均成绩" align="center" prop="itemAvgScore">
<el-table-column label="性别" align="center" prop="sex">
<template slot-scope="scope">
{{ scope.row.sex == "MALE" ? "男" : "" }}
{{ scope.row.sex == "FEMALE" ? "女" : "" }}
</template>
</el-table-column>
<el-table-column label="平均得分" align="center" prop="itemAvgScore">
<template slot-scope="scope">
{{ scope.row.dictValue == "number" ? scope.row.itemAvgScore : "" }}
{{ scope.row.dictValue == "text" ? scope.row.itemAvgText : "" }}
@ -164,60 +171,71 @@
:options="areaList"
placeholder="请选择所属区域"
v-model="form.areaId"
@input="inputChange"
/>
</el-form-item>
<el-form-item label="所属项目" prop="itemId">
<el-button
@click="innerVisible = true"
@click="innerVisiblexm"
style="width: 380px; text-align: left; height: 36px; color: #c0c4cc"
v-if="xmname == '请选择所属项目'"
>
{{ xmname }}
</el-button>
<el-button
@click="innerVisible = true"
@click="innerVisiblexm"
style="width: 380px; text-align: left; height: 36px"
v-else
>
{{ xmname }}
</el-button>
</el-form-item>
<el-form-item label="学生性别" prop="sex">
<el-select
v-model="form.sex"
clearable
placeholder="请选择"
style="width: 380px"
>
<el-option
v-for="item in sexs"
:key="item.value"
:label="item.label"
:value="item.value"
@click.native="sexclick(item)"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="平均成绩"
label="平均得分"
:required="true"
v-if="form.resultDictType == ''"
>
<el-input placeholder="请输入平均成绩" />
</el-form-item>
<el-form-item
label="平均成绩"
v-else-if="form.dictValue == ResultType1.dictValue"
key="itemAvgScore"
prop="itemAvgScore"
>
<el-input
v-model.number="form.itemAvgScore"
placeholder="请输入平均成绩"
<el-input
v-model="value"
placeholder="请输入平均得分"
/>
</el-form-item>
<el-form-item
label="平均成绩"
label="平均得分"
v-else-if="form.dictValue == ResultType1.dictValue"
key="itemAvgScore"
prop="itemAvgScore"
>
<el-input v-model="form.itemAvgScore" placeholder="请输入平均得分" />
</el-form-item>
<el-form-item
label="平均得分"
v-else-if="form.dictValue == ResultType2.dictValue"
key="itemAvgText"
prop="itemAvgText"
>
<el-input v-model="form.itemAvgText" placeholder="请输入平均成绩" />
</el-form-item>
<el-form-item
label="平均成绩"
v-else-if="form.dictValue == 'text'"
key="itemAvgText"
prop="itemAvgText"
>
<el-input v-model="form.itemAvgText" placeholder="请输入平均成绩" />
<el-input v-model="form.itemAvgText" placeholder="请输入平均得分"
@input="change($event)" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -237,6 +255,7 @@
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="所属区域" prop="areaId">
<treeselect
disabled
:normalizer="normalizer"
:options="areaList"
placeholder="请选择所属区域"
@ -246,6 +265,9 @@
<el-form-item label="所属项目" prop="itemId">
<el-button
type="info"
plain
disabled
@click="innerVisible = true"
style="width: 380px; text-align: left; height: 36px; color: #c0c4cc"
v-if="xmname == '请选择所属项目'"
@ -253,6 +275,9 @@
{{ xmname }}
</el-button>
<el-button
type="info"
plain
disabled
@click="innerVisible = true"
style="width: 380px; text-align: left; height: 36px"
v-else
@ -260,23 +285,36 @@
{{ xmname }}
</el-button>
</el-form-item>
<el-form-item label="学生性别" prop="sex">
<el-select
v-model="form.sex"
clearable
disabled
placeholder="请选择"
style="width: 380px"
>
<el-option
v-for="item in sexs"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="平均成绩"
label="平均得分"
prop="itemAvgScore"
v-if="form.dictValue == 'number'"
>
<el-input
v-model.number="form.itemAvgScore"
placeholder="请输入平均成绩"
/>
<el-input v-model="form.itemAvgScore" placeholder="请输入平均得分" />
</el-form-item>
<el-form-item
label="平均成绩"
label="平均得分"
prop="itemAvgText"
v-if="form.dictValue == 'text'"
>
<el-input v-model="form.itemAvgText" placeholder="请输入平均成绩" />
<el-input v-model="form.itemAvgText" placeholder="请输入平均得分" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
@ -447,6 +485,7 @@ import {
delTestItemCityScore,
addTestItemCityScore,
updateTestItemCityScore,
getItemCityScoreInfo,
} from "@/api/system/testItemCityScore";
import { tKindergartenInfo } from "@/api/system/kindergartenInfo";
import { listItemCategory } from "@/api/system/itemCategory";
@ -455,10 +494,98 @@ import { listArea } from "@/api/system/area.js";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
components: { Treeselect },
name: "TestItemCityScore",
components: { Treeselect },
data() {
var roleMoeny = (rule, value, callback) => {
var str = String(this.form.itemAvgScore);
console.log(str);
var str_ = "";
var str2 = "";
if (str.includes(".")) {
str_ = str.substr(str.indexOf(".")).length;
str2 = str.substr(0, str.indexOf(".")).length;
console.log(str2);
if (Number.isNaN(Number.parseFloat(str))) {
callback(new Error("请输入数字"));
} else if (!this.form.itemAvgScore) {
callback(new Error("不能为空"));
} else if (this.form.itemAvgScore * 1 > 99999999) {
callback(new Error("最大99999999")); //
} else if (this.form.itemAvgScore == "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(str))) {
callback(new Error("请输入数字"));
} else if (!this.form.itemAvgScore) {
callback(new Error("不能为空"));
} else if (this.form.itemAvgScore * 1 > 99999999) {
callback(new Error("最大99999999")); //
} else if (this.form.itemAvgScore == "0") {
callback(new Error("请输入成绩")); //
} else if (str2 > 3) {
callback(new Error("整数为三位")); //
} else {
callback();
}
}
};
var roleMoeny1 = (rule, value, callback) => {
var str = String(this.form.itemAvgText);
console.log(str);
var str_ = "";
var str2 = "";
if (str.includes(".")) {
str_ = str.substr(str.indexOf(".")).length;
str2 = str.substr(0, str.indexOf(".")).length;
console.log(str2);
if (!this.form.itemAvgText) {
callback(new Error("不能为空"));
} else if (this.form.itemAvgText * 1 > 99999999) {
callback(new Error("最大99999999")); //
} else if (this.form.itemAvgText == "0") {
callback(new Error("请输入成绩")); //
} else if (str_ > 3) {
callback(new Error("小数点后两位")); //
} else {
callback();
}
} else {
str2 = str.length;
console.log(str2);
if (!this.form.itemAvgText) {
callback(new Error("不能为空"));
} else if (this.form.itemAvgText * 1 > 99999999) {
callback(new Error("最大99999999")); //
} else if (this.form.itemAvgText == "0") {
callback(new Error("请输入成绩")); //
} else {
callback();
}
}
};
return {
//
sexs: [
{
label: "男",
value: "MALE",
},
{
label: "女",
value: "FEMALE",
},
],
value: "",
//
loading: true,
innerVisible: false,
@ -472,6 +599,9 @@ export default {
ResultType2: "",
//
single: true,
//
male: "MALE",
female: "FEMALE",
//
multiple: true,
//
@ -513,20 +643,19 @@ export default {
itemName: null,
itemCode: null,
},
getItemCityScorelist: {
areaId: null,
itemId: null,
sex: null,
},
//
form: {},
//
rules: {
itemAvgScore: [
{
required: true,
type: "number",
message: "必须填入数字",
trigger: "blur",
},
],
sex: [{ required: true, message: "请选择性别", trigger: "blur" }],
itemAvgScore: [{ required: true, validator: roleMoeny, message: "" }],
itemAvgText: [
{ required: true, message: "请输入全市平均成绩", trigger: "blur" },
{ required: true, validator: roleMoeny1,message: "", trigger: "blur" },
],
areaId: [
{ required: true, message: "请选择所属区域", trigger: "blur" },
@ -541,6 +670,47 @@ export default {
this.getList();
},
methods: {
change (e) {
this.$forceUpdate()
},
inputChange() {
this.getItemCityScorelist.areaId = this.form.areaId;
if (
this.getItemCityScorelist.sex != null &&
this.getItemCityScorelist.itemId != null &&
this.getItemCityScorelist.areaId != null
) {
this.getItemCityScore();
}
},
sexclick(item) {
this.getItemCityScorelist.sex = item.value;
if (
this.getItemCityScorelist.areaId != null &&
this.getItemCityScorelist.itemId != null
) {
this.getItemCityScore();
}
},
getItemCityScore() {
getItemCityScoreInfo(this.getItemCityScorelist).then((res) => {
if (res.data) {
this.form.itemAvgScore = res.data.itemAvgScore;
this.form.itemAvgText = res.data.itemAvgText;
} else {
this.form.itemAvgScore = "";
this.form.itemAvgText = "";
}
});
},
innerVisiblexm() {
if (this.form.areaId == null) {
return this.$message.error("请先选择所属区域");
} else {
this.innerVisible = true;
}
},
normalizer3(node) {
if (node.children && !node.children.length) {
delete node.children;
@ -567,11 +737,10 @@ export default {
this.form.itemId = "";
},
xmclick(item) {
console.log(item);
this.xmname = item.itemName;
this.getItemCityScorelist.itemId = item.id;
this.form.itemId = item.id;
this.xmid = item.id;
console.log(this.ResultType1, this.ResultType2);
if (item.resultDictType == this.ResultType1.dictCode) {
this.form.resultDictType = this.ResultType1.dictValue;
this.form.dictValue = this.ResultType1.dictValue;
@ -580,8 +749,15 @@ export default {
this.form.resultDictType = this.ResultType2.dictValue;
this.form.dictValue = this.ResultType2.dictValue;
}
console.log(this.form);
this.innerVisible = false;
if (
this.getItemCityScorelist.areaId != null &&
this.getItemCityScorelist.sex != null
) {
this.getItemCityScore();
}
console.log(this.form);
},
/** 查询全市平均成绩列表 */
getList() {
@ -613,7 +789,7 @@ export default {
this.itemResultTypelist = res.data;
this.ResultType1 = this.itemResultTypelist[0];
this.ResultType2 = this.itemResultTypelist[1];
// console.log(this.ResultType1);
console.log(this.ResultType1, this.ResultType2);
});
},
//
@ -683,6 +859,11 @@ export default {
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.getItemCityScorelist = {
areaId: null,
itemId: null,
sex: null,
};
this.open = true;
this.title = "添加全市平均成绩";
},

View File

@ -17,14 +17,6 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="测试项目平均成绩" label-width="200">
<el-input
v-model="queryParams.itemAvgScore"
placeholder="请输入测试项目平均成绩"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item> -->
<el-form-item>
<el-button
type="primary"
@ -100,7 +92,13 @@
<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="itemName" />
<el-table-column label="测试项目平均成绩" align="center">
<el-table-column label="性别" align="center" prop="sex">
<template slot-scope="scope">
{{ scope.row.sex == "MALE" ? "男" : "" }}
{{ scope.row.sex == "FEMALE" ? "女" : "" }}
</template>
</el-table-column>
<el-table-column label="平均得分" align="center" prop="itemAvgScore">
<template slot-scope="scope">
{{ scope.row.dictValue == "number" ? scope.row.itemAvgScore : "" }}
{{ scope.row.dictValue == "text" ? scope.row.itemAvgText : "" }}
@ -151,13 +149,15 @@
<el-form
ref="form"
:model="form"
:rules="rules"
:rules="rulesxg"
label-width="80px"
style=""
>
<el-form-item label="所属项目" prop="itemId">
<el-button
type=""
type="info"
plain
disabled
@click="innerVisible = true"
v-if="xmname == '请选择所属项目'"
style="
@ -171,7 +171,9 @@
>
<el-button
type=""
type="info"
plain
disabled
@click="innerVisible = true"
v-else
style="
@ -183,26 +185,44 @@
>{{ xmname }}</el-button
>
</el-form-item>
<el-form-item label="学生性别" prop="sex">
<el-select
v-model="form.sex"
clearable
disabled
placeholder="请选择"
style="width: 360px"
>
<el-option
v-for="item in sexs"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="测试项目平均成绩"
label="平均得分"
prop="itemAvgScore"
key="itemAvgScore"
v-if="form.dictValue == 'number'"
>
<el-input
v-model.number="form.itemAvgScore"
style="width:360px"
placeholder="请输入平均成绩"
v-model="form.itemAvgScore"
style="width: 360px"
placeholder="请输入平均得分"
/>
</el-form-item>
<el-form-item
label="测试项目平均成绩"
label="平均得分"
prop="itemAvgText"
key="itemAvgText"
v-if="form.dictValue == 'text'"
>
<el-input v-model="form.itemAvgText" placeholder="请输入平均成绩" style="width:360px"/>
<el-input
v-model="form.itemAvgText"
placeholder="请输入平均得分"
style="width: 360px"
/>
</el-form-item>
</el-form>
@ -213,14 +233,19 @@
</el-dialog>
<!-- 添加全国平均成绩对话框 -->
<el-dialog :title="title" :visible.sync="open" width="550px" append-to-body :before-close="cancel">
<el-dialog
:title="title"
:visible.sync="open"
width="550px"
append-to-body
:before-close="cancel"
>
<el-form
ref="form"
ref="form2"
:model="form2"
:rules="rules"
label-width="80px"
style=""
>
<el-form-item label="所属项目" prop="itemId">
<el-button
@ -250,34 +275,55 @@
>{{ xmname }}</el-button
>
</el-form-item>
<el-form-item label="学生性别" prop="sex">
<el-select
v-model="form2.sex"
clearable
placeholder="请选择"
style="width: 360px"
>
<el-option
v-for="item in sexs"
:key="item.value"
:label="item.label"
:value="item.value"
@click.native="sexclick(item)"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="测试项目平均成绩"
prop="itemAvgScore"
label="平均得分"
prop="itemAvgScore1"
v-if="form2.resultDictType == ''"
>
<el-input placeholder="请输入测试项目平均成绩" style="width: 360px" />
</el-form-item>
<el-form-item
label="测试项目平均成绩"
prop="itemAvgScore"
v-else-if="form2.resultDictType == 'number'"
>
<el-input
v-model.number="form2.itemAvgScore"
placeholder="请输入测试项目平均成绩"
v-model="value"
placeholder="请输入平均得分"
style="width: 360px"
/>
</el-form-item>
<el-form-item
label="测试项目平均成绩"
label="平均得分"
prop="itemAvgScore"
v-else-if="form2.resultDictType == 'number'"
>
<el-input
v-model="form2.itemAvgScore"
placeholder="请输入平均得分"
style="width: 360px"
/>
</el-form-item>
<el-form-item
label="平均得分"
prop="itemAvgText"
v-else-if="form2.resultDictType == 'text'"
>
<el-input
v-model="form2.itemAvgText"
placeholder="请输入测试项目平均成绩"
placeholder="请输入平均得分"
style="width: 360px"
/>
</el-form-item>
@ -336,7 +382,7 @@
></el-button>
<el-button
v-else
v-else
style="width: 15px; height: 15px"
circle
@click="xmclick(scope.row)"
@ -480,13 +526,110 @@ import {
addTestItemCountryScore,
updateTestItemCountryScore,
testItemslist,
getItemCountryScoreInfo,
} from "@/api/system/testItemCountryScore";
import { tKindergartenInfo } from "@/api/system/kindergartenInfo";
export default {
name: "TestItemCountryScore",
data() {
var roleMoeny = (rule, value, callback) => {
var str = value;
var str_ = "";
var str2 = "";
if (str.includes(".")) {
str_ = str.substr(str.indexOf(".")).length;
str2 = str.substr(0, str.indexOf(".")).length;
console.log(str2);
if (Number.isNaN(Number.parseFloat(str))) {
callback(new Error("请输入数字"));
} else if (!this.form2.itemAvgScore) {
callback(new Error("不能为空"));
} else if (this.form2.itemAvgScore * 1 > 99999999) {
callback(new Error("最大99999999")); //
} else if (this.form2.itemAvgScore == "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(str))) {
callback(new Error("请输入数字"));
} else if (!this.form2.itemAvgScore) {
callback(new Error("不能为空"));
} else if (this.form2.itemAvgScore * 1 > 99999999) {
callback(new Error("最大99999999")); //
} else if (this.form2.itemAvgScore == "0") {
callback(new Error("请输入成绩")); //
} else if (str2 > 3) {
callback(new Error("整数为三位")); //
} else {
callback();
}
}
};
var roleMoeny2 = (rule, value, callback) => {
var str = String(this.form.itemAvgScore);
console.log(str);
var str_ = "";
var str2 = "";
if (str.includes(".")) {
str_ = str.substr(str.indexOf(".")).length;
str2 = str.substr(0, str.indexOf(".")).length;
console.log(str2);
if (Number.isNaN(Number.parseFloat(str))) {
callback(new Error("请输入数字"));
} else if (!this.form.itemAvgScore) {
callback(new Error("不能为空"));
} else if (this.form.itemAvgScore * 1 > 99999999) {
callback(new Error("最大99999999")); //
} else if (this.form.itemAvgScore == "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(str))) {
callback(new Error("请输入数字"));
} else if (!this.form.itemAvgScore) {
callback(new Error("不能为空"));
} else if (this.form.itemAvgScore * 1 > 99999999) {
callback(new Error("最大99999999")); //
} else if (this.form.itemAvgScore == "0") {
callback(new Error("请输入成绩")); //
} else if (str2 > 3) {
callback(new Error("整数为三位")); //
} else {
callback();
}
}
};
return {
value: "",
//
sexs: [
{
label: "男",
value: "MALE",
},
{
label: "女",
value: "FEMALE",
},
],
//
itemResultType: "item_result_type",
//
@ -509,6 +652,9 @@ export default {
//
total: 0,
total2: 0,
//
male: "MALE",
female: "FEMALE",
//xiangmu
testItemslists: [],
//
@ -518,14 +664,14 @@ export default {
//
open: false,
open2: false,
//
itemId2:"",
itemId2: "",
itemId: "",
queryParams: {
pageNum: 1,
pageSize: 10,
itemName: null,
sex: null,
},
queryParams2: {
pageNum: 1,
@ -534,34 +680,86 @@ export default {
itemName: "",
itemCode: "",
},
queryParams3: {
itemId: null,
sex: null,
},
//
form: {},
form2: {},
//
rules: {
itemId: [{ required: true }],
rulesxg: {
itemId: [
{ required: true, message: "请选择所属项目", trigger: "blur" },
],
sex: [{ required: true, message: "请选择性别", trigger: "blur" }],
itemAvgScore: [
{
required: true,
type: "number",
message: "必须填入数字",
validator: roleMoeny2,
message: "",
trigger: "blur",
},
],
itemAvgText: [
{ required: true, message: "请输入全国平均成绩", trigger: "blur" },
{ required: true, message: "请输入平均得分", trigger: "blur" },
],
},
rules: {
itemId: [
{ required: true, message: "请选择所属项目", trigger: "blur" },
],
itemAvgScore1: [
{
required: true,
message: "请选择所属项目之后输入平均得分",
trigger: "blur",
},
],
itemAvgScore: [
{
required: true,
validator: roleMoeny,
message: "",
trigger: "blur",
},
],
sex: [{ required: true, message: "请选择性别", trigger: "blur" }],
itemAvgText: [
{ required: true, message: "请输入平均得分", trigger: "blur" },
],
},
realVal: "",
};
},
created() {
this.getList();
},
methods: {
getItemCountryScore() {
getItemCountryScoreInfo(this.queryParams3).then((res) => {
console.log(res);
if (res.data) {
this.form2.itemAvgScore = res.data.itemAvgScore;
this.form2.itemAvgText = res.data.itemAvgText;
} else {
this.form2.itemAvgScore = "";
this.form2.itemAvgText = "";
}
});
},
sexclick(item) {
this.queryParams3.sex = item.value;
console.log(this.queryParams3);
if (this.queryParams3.itemId != null) {
this.getItemCountryScore();
}
},
xmclick(row) {
console.log(row);
this.xmname = row.itemName;
this.queryParams3.itemId = row.id;
this.itemId2 = row.id;
this.form.itemId = row.id;
this.form2.itemId = row.id;
@ -581,6 +779,9 @@ export default {
}
console.log(this.form);
console.log(this.form2);
if (this.queryParams3.sex != null) {
this.getItemCountryScore();
}
},
/** 查询全国平均成绩列表 */
@ -615,21 +816,26 @@ export default {
this.xmname = "请选择所属项目";
this.itemId2 = "";
this.reset();
this.$nextTick(() => {
this.$refs.form2.clearValidate();
});
},
//
reset() {
this.form = {
id: null,
itemId: null,
itemId: "",
itemAvgScore: "",
itemAvgText: "",
resultDictType: "", //number text
sex: "",
};
this.form2 = {
itemId: null,
itemAvgScore: "",
itemId: "",
itemAvgScore: null,
itemAvgText: "",
resultDictType: "", //number text
sex: "",
};
this.resetForm("form");
},
@ -663,10 +869,13 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
this.queryParams3 = {
itemId: null,
sex: null,
};
this.reset();
this.open = true;
this.title = "添加全国平均成绩";
this.itemId2 = "";
},
/** 修改按钮操作 */
handleUpdate(row) {
@ -693,27 +902,46 @@ export default {
console.log(this.ResultType2.dictValue);
this.form.itemAvgScore = "";
}
console.log(this.form);
// console.log(this.form2);
// console.log(this.form);
// console.log(this.form2.itemAvgScore);
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
if (this.form.id != null) {
this.$refs["form"].validate((valid) => {
if (valid) {
updateTestItemCountryScore(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open2 = false;
this.getList();
});
} else {
this.itemId2 = "";
this.xmname = "";
this.xmname = "请选择所属项目";
}
});
} else {
this.$refs["form2"].validate((valid) => {
if (valid) {
this.form2.itemAvgScore = Number(this.form2.itemAvgScore);
addTestItemCountryScore(this.form2).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
// console.log(this.form2)
this.getList();
// this.form.itemId = "";
this.itemId2 = "";
this.xmname = "";
this.xmname = "请选择所属项目";
});
} else {
if (this.form2.itemAvgScore == "") {
this.form2.itemAvgScore == "";
}
}
}
});
this.itemId2 = "";
});
}
},
/** 删除按钮操作 */
handleDelete(row) {

File diff suppressed because it is too large Load Diff

View File

@ -275,14 +275,16 @@
</el-form-item>
<el-form-item label="最低得分" prop="minScore">
<el-input
v-model.number="form.minScore"
v-model="form.minScore"
type="text"
style="width: 300px"
placeholder="请输入最低得分"
/>
</el-form-item>
<el-form-item label="最高得分" prop="maxScore">
<el-input
v-model.number="form.maxScore"
v-model="form.maxScore"
type="text"
placeholder="请输入最高得分"
style="width: 300px"
/>
@ -310,7 +312,8 @@
v-if="form.standardType == fty"
>
<el-input
v-model.number="form.largeStandardScore"
v-model="form.largeStandardScore"
type="text"
placeholder="请输入大班标准最高得分"
style="width: 300px"
/>
@ -321,7 +324,8 @@
v-if="form.standardType == fty"
>
<el-input
v-model.number="form.middleStandardScore"
v-model="form.middleStandardScore"
type="text"
placeholder="请输入中班标准最高得分"
style="width: 300px"
/>
@ -332,7 +336,8 @@
v-if="form.standardType == fty"
>
<el-input
v-model.number="form.smallStandardScore"
v-model="form.smallStandardScore"
type="text"
style="width: 300px"
placeholder="请输入小班标准最高得分"
/>
@ -344,7 +349,8 @@
>
<el-input
style="width: 300px"
v-model.number="form.unifiedStandardScore"
v-model="form.unifiedStandardScore"
type="text"
placeholder="请输入统一标准最高得分"
/>
</el-form-item>
@ -372,17 +378,32 @@
<el-input
v-model="item.levelName"
placeholder="级别名"
style="width: 75px; margin-right: 20px"
style="width: 75px; margin-right: 10px"
/>
<el-input
v-model.number="item.levelMinScore"
placeholder="最低分"
style="width: 75px; margin-right: 10px"
style="width: 75px; margin-right: 5px"
/><el-input
v-model.number="item.levelMaxScore"
placeholder="最高分"
style="width: 75px; margin-right: 9px"
style="width: 75px; margin-right: 5px"
/>
<el-select
v-model="item.standardFlag"
clearable
placeholder="请选择是否达标"
style="width: 145px; margin-right: 8px"
>
<el-option
v-for="item in list"
:key="item.id"
:label="item.label"
:value="item.id"
>
</el-option>
</el-select>
<el-button
type="info"
circle
@ -435,6 +456,216 @@ 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 (str.includes(".")) {
str2 = str.substr(str.indexOf(".")).length;
console.log(str2);
if (Number.isNaN(Number.parseFloat(value))) {
callback(new Error("请输入数字"));
} else if (this.form.middleStandardScore * 1 > 99999999) {
callback(new Error("最大99999999")); //
} 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 * 1 > 99999999) {
callback(new Error("最大99999999")); //
} else if (str_ > 3) {
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 (str.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 * 1 > 99999999) {
callback(new Error("最大99999999")); //
} 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 * 1 > 99999999) {
callback(new Error("最大99999999")); //
} else if (str_ > 3) {
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 (str.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 * 1 > 99999999) {
callback(new Error("最大99999999")); //
} 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 * 1 > 99999999) {
callback(new Error("最大99999999")); //
} else if (str_ > 3) {
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 (str.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 * 1 > 99999999) {
callback(new Error("最大99999999")); //
} 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 * 1 > 99999999) {
callback(new Error("最大99999999")); //
} else if (str_ > 3) {
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 (str.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 * 1 > 99999999) {
callback(new Error("最大99999999")); //
} 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 * 1 > 99999999) {
callback(new Error("最大99999999")); //
} else if (str_ > 3) {
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 (str.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 * 1 > 99999999) {
callback(new Error("最大99999999")); //
} 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 * 1 > 99999999) {
callback(new Error("最大99999999")); //
} else if (str_ > 3) {
callback(new Error("小数点后两位")); //
} else if (str2 > 3) {
callback(new Error("整数为三位")); //
} else {
callback();
}
}
};
let itemLevelList = (rule, value, callback) => {
let min = value
.map((e) => {
@ -448,11 +679,11 @@ export default {
.toString();
console.log(min, max);
if (Number(max) < Number(min)) {
console.log(min, max);
if (max && min && max < min) {
callback(new Error("最高分必须大于最低分,请重新填写!"));
} else {
console.log(min, max);
}
if (
value.map((e) => {
return e.levelName;
@ -513,6 +744,7 @@ export default {
};
return {
str: [],
//
itemResultType: "item_result_type",
//
@ -536,6 +768,17 @@ export default {
total: 0,
//
measureUnitTypelist: [],
//shifouhege
list: [
{
label: "是",
id: 1,
},
{
label: "否",
id: 0,
},
],
//
itemResultTypelist: [],
ResultType1: "",
@ -549,6 +792,7 @@ export default {
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
@ -562,58 +806,56 @@ export default {
rules: {
unifiedStandardScore: [
{
// required: true,
type: "number",
message: `必须填入数字`,
required: true,
validator: roleMoeny1,
message: "",
trigger: "blur",
// transform: (value) => Number(value)
},
],
largeStandardScore: [
{
// required: true,
type: "number",
message: `必须填入数字`,
required: true,
validator: roleMoeny,
message: "",
trigger: "blur",
// transform: (value) => Number(value)
},
],
middleStandardScore: [
{
// required: true,
type: "number",
message: `必须填入数字`,
required: true,
validator: roleMoeny2,
message: "",
trigger: "blur",
// transform: (value) => Number(value)
},
],
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: [
{
// required: true,
validator: minScore,
required: true,
validator: roleMoeny4,
message: "",
trigger: "blur",
},
],
maxScore: [
{
// required: true,
validator: maxScore,
required: true,
validator: roleMoeny5,
message: "",
trigger: "blur",
},
],
@ -649,6 +891,13 @@ export default {
trigger: "change",
},
],
standardFlag: [
{
required: true,
message: "请选择是否达标",
trigger: "blur",
},
],
},
};
},
@ -656,6 +905,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.splilevelMinScoredatat(".")[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);
@ -666,6 +1021,7 @@ export default {
levelName: "",
levelMinScore: "",
levelMaxScore: "",
standardFlag: "",
});
},
/** 查询测试项目列表 */
@ -678,9 +1034,11 @@ export default {
tKindergartenInfo(this.itemResultType).then((res) => {
// console.log(res);
this.itemResultTypelist = res.data;
console.log(this.itemResultTypelist);
this.ResultType1 = this.itemResultTypelist[0];
this.ResultType2 = this.itemResultTypelist[1];
console.log(this.ResultType1);
// console.log(this.ResultType1);
});
tKindergartenInfo(this.measureUnitType).then((res) => {
// console.log(res);
@ -718,7 +1076,12 @@ export default {
levelDescription: "",
minScore: "",
itemLevelList: [
{ levelName: "", levelMinScore: "", levelMaxScore: "" },
{
levelName: "",
levelMinScore: "",
levelMaxScore: "",
standardFlag: "",
},
],
sorting: null,
remark: null,

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,407 @@
<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-form-item label="批次编号" prop="batchCode">
<el-input v-model.number="form.batchCode" placeholder="请输入批次编号" />
</el-form-item> -->
<!-- 添加或修改测试批次对话框 -->
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="80px"
:inline="true"
>
<el-form-item label="批次名称" prop="batchName">
<el-input v-model="form.batchName" placeholder="请输入批次名称" />
<el-input
style="width: 250px"
v-model="form.batchName"
placeholder="请输入批次名称"
maxlength="30"
/>
</el-form-item>
<el-form-item label="备注信息" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注信息" />
<el-input
v-model="form.remark"
placeholder="请输入备注信息"
style="width: 250px"
/>
</el-form-item>
<el-form-item label="测试项目" prop="itemBatchInfoIdList">
<el-button
size="small"
@click="innerVisible3 = true"
type="primary"
plain
>添加测试项目</el-button
>
</el-form-item>
<!-- <el-form-item label="是否删除01是" prop="delFlag">
<el-input v-model="form.delFlag" placeholder="请输入是否删除01是" />
</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>
<div>
<el-table
ref="singleTable"
:data="items"
style="width: 95%; margin: 20px auto"
>
<el-table-column type="index" width="80" align="center">
</el-table-column>
<el-table-column
property="itemCode"
label="项目编号"
width="230"
align="center"
>
</el-table-column>
<el-table-column
property="itemName"
label="项目名称"
width="230"
align="center"
>
</el-table-column>
<el-table-column
property="itemType"
label="字典类型"
align="center"
width="180"
>
<template slot-scope="scope">
{{
scope.row.itemType == ResultType1.dictCode
? ResultType1.dictLabel
: ""
}}{{
scope.row.itemType == ResultType2.dictCode
? ResultType2.dictLabel
: ""
}}</template
>
</el-table-column>
<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-delete"
@click="delitem(scope.row)"
>删除</el-button
>
</template>
</el-table-column>
</el-table>
</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="itemCode"
label="项目编号"
width="150"
align="center"
>
</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="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>
<el-button
type="success"
plain
size="mini"
@click="itemclick"
style="margin-top: 30px; margin-left: 20px"
>选择完成</el-button
>
<pagination
v-show="total4 > 0"
:total="total4"
:page.sync="queryParams4.pageNum"
:limit.sync="queryParams4.pageSize"
@pagination="getList"
/>
</el-dialog>
<el-dialog
width="680px"
title="查看测试项目"
:visible.sync="innerVisible"
append-to-body
style="margin-top: 100px"
>
<el-table ref="singleTable" :data="itemlist" style="width: 100%">
<el-table-column type="index" width="100" align="center">
</el-table-column>
<el-table-column
property="itemCode"
label="项目编号"
width="180"
align="center"
>
</el-table-column>
<el-table-column
property="itemName"
label="项目名称"
width="180"
align="center"
>
</el-table-column>
<el-table-column
property="resultDictType"
label="字典类型"
width="180"
align="center"
>
<template slot-scope="scope">
{{
scope.row.resultDictType == ResultType1.dictCode
? ResultType1.dictLabel
: ""
}}{{
scope.row.resultDictType == ResultType2.dictCode
? ResultType2.dictLabel
: ""
}}</template
>
</el-table-column>
</el-table>
</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() {
var itembatch = (rule, value, callback) => {
var str = this.form.itemBatchInfoIdList;
console.log(str);
if (str.length > 0) {
callback();
} else {
return callback(new Error("请添加测试项目"));
}
};
return {
itemResultType: "item_result_type",
ResultType1: "", //numberLeixing
ResultType2: "", //textleixing
innerVisible: false,
innerVisible3: false,
//
loading: true,
//
@ -150,6 +517,8 @@ export default {
showSearch: true,
//
total: 0,
testItemss: [],
total4: 0,
//
testScoreBatchList: [],
//
@ -163,6 +532,12 @@ export default {
batchCode: null,
batchName: null,
},
//
queryParams4: {
pageNum: 1,
pageSize: 10,
itemName: null,
},
//
form: {},
//
@ -170,27 +545,104 @@ export default {
// batchCode: [
// { required: true, message: "" },
// { type: "number", message: "", trigger: "blur" },
// ],
batchName:[
{ required: true, message: "批次名称不能为空" },
// ],type:
itemBatchInfoIdList: [
{
required: true,
validator: itembatch,
message: "",
trigger: "blur",
},
],
batchName:[
{ required: true, message: "批次名称不能为空" },
],
remark:[
{ required: true, message: "备注信息不能为空" },
],
}
batchName: [{ required: true, message: "批次名称不能为空" }],
remark: [{ required: true, message: "备注信息不能为空" }],
},
items: [],
itemlist: [],
};
},
created() {
this.getList();
},
methods: {
delitem(item) {
console.log(item);
this.items = this.items.filter((e) => {
return e.itemId != item.itemId;
});
},
deltestitem(item) {
console.log(item);
this.items = this.items.filter((e) => {
return e.itemId != item.id;
});
},
addtestitem(row) {
var item = {
itemId: row.id,
itemName: row.itemName,
itemType: row.resultDictType,
itemCode: row.itemCode,
};
this.items.push(item);
// this.form.itemBatchInfoIdList.push(row.id);
console.log(this.items);
},
itemclick() {
this.innerVisible3 = false;
},
lookitem(item) {
this.itemlist = [];
this.items = [];
var id = {
batchId: item.id,
};
temBatchInfoList(id).then((res) => {
console.log(res);
if (res.rows.length != 0) {
this.itemlist = res.rows;
this.items = res.rows;
this.items.forEach((e) => {
e.itemType = e.resultDictType;
e.itemId = e.id;
});
}
console.log(this.items);
});
},
seeitem(item) {
this.lookitem(item);
console.log(this.items);
if (this.items != []) {
this.innerVisible = true;
}
},
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;
@ -198,6 +650,7 @@ export default {
},
//
cancel() {
this.items = [];
this.open = false;
this.reset();
},
@ -212,7 +665,8 @@ export default {
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
updateTime: null,
itemBatchInfoIdList: [],
};
this.resetForm("form");
},
@ -225,24 +679,28 @@ 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() {
this.reset();
this.open = true;
this.items = [];
this.title = "添加测试成绩批次";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getTestScoreBatch(id).then(response => {
const id = row.id || this.ids;
this.lookitem(row);
getTestScoreBatch(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改测试成绩批次";
@ -250,16 +708,21 @@ export default {
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
this.form.itemBatchInfoIdList = [];
this.items.forEach((e) => {
this.form.itemBatchInfoIdList.push(e.itemId);
});
console.log(this.form);
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 +734,42 @@ 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>
<style scoped='scss'>
.title {
font-size: 600;
}
.text {
margin-left: 10px;
margin-right: 10px;
font-weight: 500;
display: inline-block;
width: 100px;
border: 1px solid #f0f0f0;
text-align: center;
border-radius: 4px;
}
</style>

View File

@ -729,7 +729,7 @@ export default {
getTreeselect() {
treeselect().then((response) => {
this.deptOptions = response.data;
console.log(this.deptOptions);
// console.log(this.deptOptions);
});
},
//
@ -838,6 +838,8 @@ export default {
this.open = true;
this.title = "修改用户";
this.form.password = "";
console.log(this.form)
console.log(this.areaList)
});
},
/** 重置密码按钮操作 */