修改bug

This commit is contained in:
曹辉 2022-08-23 17:44:36 +08:00
parent bf5c229238
commit 7f79a54ad3
18 changed files with 788 additions and 606 deletions

View File

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

View File

@ -3,7 +3,7 @@ import request from '@/utils/request'
//查询用户权限 //查询用户权限
export function getRoleInfo() { export function getRoleInfo() {
return request({ return request({
url: 'common/getRoleInfo', url: '/common/getRoleInfo',
method: 'get' method: 'get'
}) })
} }

View File

@ -7,7 +7,7 @@
v-show="showSearch" v-show="showSearch"
label-width="90px" label-width="90px"
> >
<el-form-item label="所属幼儿园" prop="categoryName"> <el-form-item label="所属幼儿园" prop="categoryName" v-if="showyey">
<el-button <el-button
@click="kindergartenshow = true" @click="kindergartenshow = true"
v-if="kindergartenName == '请选择幼儿园'" v-if="kindergartenName == '请选择幼儿园'"
@ -22,7 +22,12 @@
> >
</el-form-item> </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 <el-button
@click="classshowclick" @click="classshowclick"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc" style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
@ -459,6 +464,8 @@ export default {
return { return {
itemshow: false, itemshow: false,
itemshow2: false, itemshow2: false,
showyey: true,
showbj: true,
total1: 0, total1: 0,
total2: 0, total2: 0,
total3: 0, total3: 0,
@ -763,6 +770,20 @@ export default {
// //
getRoleInfo().then((res) => { getRoleInfo().then((res) => {
console.log(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 //list
listKindergartenInfo(this.kqueryParams).then((response) => { listKindergartenInfo(this.kqueryParams).then((response) => {

View File

@ -7,7 +7,7 @@
v-show="showSearch" v-show="showSearch"
label-width="90px" label-width="90px"
> >
<el-form-item label="所属幼儿园" prop="categoryName"> <el-form-item label="所属幼儿园" prop="categoryName" v-if="showyey">
<el-button <el-button
@click="kindergartenshow = true" @click="kindergartenshow = true"
v-if="kindergartenName == '请选择幼儿园'" v-if="kindergartenName == '请选择幼儿园'"
@ -22,7 +22,12 @@
> >
</el-form-item> </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 <el-button
@click="classshowclick" @click="classshowclick"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc" style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
@ -393,6 +398,8 @@ export default {
return { return {
itemshow: false, itemshow: false,
itemshow2: false, itemshow2: false,
showyey: true,
showbj: true,
total1: 0, total1: 0,
total2: 0, total2: 0,
total4: 0, total4: 0,
@ -672,6 +679,8 @@ export default {
}; };
option && myChart.setOption(option); option && myChart.setOption(option);
this.itemshow2 = false;
this.itemshow = true;
} }
}); });
}, },
@ -759,6 +768,22 @@ export default {
// //
getRoleInfo().then((res) => { getRoleInfo().then((res) => {
console.log(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 //list
listKindergartenInfo(this.kqueryParams).then((response) => { listKindergartenInfo(this.kqueryParams).then((response) => {

View File

@ -212,7 +212,7 @@
</el-form-item> </el-form-item>
<el-form-item label="联系电话" prop="phone"> <el-form-item label="联系电话" prop="phone">
<el-input <el-input
v-model.number="form.phone" v-model="form.phone"
placeholder="请输入联系电话" placeholder="请输入联系电话"
maxlength="13" maxlength="13"
/> />
@ -359,6 +359,8 @@ export default {
data() { data() {
// //
var checkMobile = (rule, value, cb) => { var checkMobile = (rule, value, cb) => {
console.log(value);
console.log(value.length);
// //
const regMobile = const regMobile =
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/; /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57])[0-9]{8}$/;

View File

@ -7,7 +7,7 @@
v-show="showSearch" v-show="showSearch"
label-width="90px" label-width="90px"
> >
<el-form-item label="所属幼儿园" prop="categoryName"> <el-form-item label="所属幼儿园" prop="categoryName" v-if="showyey">
<el-button <el-button
@click="kindergartenshow = true" @click="kindergartenshow = true"
v-if="kindergartenName == '请选择幼儿园'" v-if="kindergartenName == '请选择幼儿园'"
@ -22,7 +22,12 @@
> >
</el-form-item> </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 <el-button
@click="classshowclick" @click="classshowclick"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc" style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
@ -511,6 +516,8 @@ export default {
return { return {
itemshow: false, itemshow: false,
itemshow2: false, itemshow2: false,
showyey: true,
showbj: true,
total1: 0, total1: 0,
total2: 0, total2: 0,
total3: 0, total3: 0,
@ -624,8 +631,8 @@ export default {
res.data.physiqueCategoryList.forEach((el) => { res.data.physiqueCategoryList.forEach((el) => {
// console.log(el.categoryScore); // console.log(el.categoryScore);
seriesData.push(el.categoryScore); seriesData.push(el.categoryScore);
if(el.levelName==null){ if (el.levelName == null) {
el.levelName='暂无' el.levelName = "暂无";
} }
yindicator.push({ yindicator.push({
name: el.categoryName + " " + "(" + el.levelName + "" + ")", name: el.categoryName + " " + "(" + el.levelName + "" + ")",
@ -881,7 +888,20 @@ export default {
getList() { getList() {
// //
getRoleInfo().then((res) => { 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 //list
listKindergartenInfo(this.kqueryParams).then((response) => { listKindergartenInfo(this.kqueryParams).then((response) => {

View File

@ -7,7 +7,7 @@
v-show="showSearch" v-show="showSearch"
label-width="90px" label-width="90px"
> >
<el-form-item label="所属幼儿园" prop="categoryName"> <el-form-item label="所属幼儿园" prop="categoryName" v-if="showyey">
<el-button <el-button
@click="kindergartenshow = true" @click="kindergartenshow = true"
v-if="kindergartenName == '请选择幼儿园'" v-if="kindergartenName == '请选择幼儿园'"
@ -22,7 +22,12 @@
> >
</el-form-item> </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 <el-button
@click="classshowclick" @click="classshowclick"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc" style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
@ -404,6 +409,8 @@ export default {
return { return {
itemshow: false, itemshow: false,
itemshow2: false, itemshow2: false,
showyey: true,
showbj: true,
total1: 0, total1: 0,
total2: 0, total2: 0,
total3: 0, total3: 0,
@ -731,6 +738,20 @@ export default {
// //
getRoleInfo().then((res) => { getRoleInfo().then((res) => {
console.log(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 //list
listKindergartenInfo(this.kqueryParams).then((response) => { listKindergartenInfo(this.kqueryParams).then((response) => {

View File

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

View File

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

View File

@ -7,7 +7,7 @@
v-show="showSearch" v-show="showSearch"
label-width="90px" label-width="90px"
> >
<el-form-item label="所属幼儿园" prop="categoryName"> <el-form-item label="所属幼儿园" prop="categoryName" v-if="showyey">
<el-button <el-button
@click="kindergartenshow = true" @click="kindergartenshow = true"
v-if="kindergartenName == '请选择幼儿园'" v-if="kindergartenName == '请选择幼儿园'"
@ -366,6 +366,7 @@ export default {
], ],
itemshow: false, itemshow: false,
itemshow2: false, itemshow2: false,
showyey: true,
total1: 0, total1: 0,
total4: 0, total4: 0,
// //
@ -576,6 +577,19 @@ export default {
// //
getRoleInfo().then((res) => { getRoleInfo().then((res) => {
console.log(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 //list
listKindergartenInfo(this.kqueryParams).then((response) => { listKindergartenInfo(this.kqueryParams).then((response) => {

View File

@ -7,7 +7,7 @@
v-show="showSearch" v-show="showSearch"
label-width="90px" label-width="90px"
> >
<el-form-item label="所属幼儿园" prop="categoryName"> <el-form-item label="所属幼儿园" prop="categoryName" v-if="showyey">
<el-button <el-button
@click="kindergartenshow = true" @click="kindergartenshow = true"
v-if="kindergartenName == '请选择幼儿园'" v-if="kindergartenName == '请选择幼儿园'"
@ -22,7 +22,12 @@
> >
</el-form-item> </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 <el-button
@click="classshowclick" @click="classshowclick"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc" style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
@ -216,7 +221,6 @@
></el-button> ></el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="kindergartenName" property="kindergartenName"
label="幼儿园名字" label="幼儿园名字"
@ -434,16 +438,18 @@
item.measureUnit == "s" || item.measureUnit == "h" ? "时间" : "" item.measureUnit == "s" || item.measureUnit == "h" ? "时间" : ""
}}{{ }}{{
item.measureUnit == "cm" || item.measureUnit == "m" ? "距离" : "" item.measureUnit == "cm" || item.measureUnit == "m" ? "距离" : ""
}}({{ item.measureUnit }})</span }}
> {{ item.measureUnit == "kg" ? "千克" : "" }}
{{ item.measureUnit == "g" ? "克" : "" }}({{ item.measureUnit }})
</span>
<span style="position: absolute; left: 6%; top: 70%">评价</span> <span style="position: absolute; left: 6%; top: 70%">评价</span>
<div <div
style=" style="
width: 70%; width: 65%;
margin: 0 auto; margin: 0 auto;
margin-top: 10px; margin-top: 10px;
margin-left: 20%; margin-left: 25%;
position: relative; position: relative;
" "
> >
@ -457,13 +463,7 @@
width: 32px; width: 32px;
" "
> >
{{ {{ ((item.maxScore - item.minScore) / 5) * 4 + item.minScore }}
((((item.maxScore - item.minScore) / item.minScore) *
item.minScore) /
5) *
4 +
item.minScore
}}
</div> </div>
<div <div
style=" style="
@ -485,13 +485,7 @@
width: 32px; width: 32px;
" "
> >
{{ {{ ((item.maxScore - item.minScore) / 5) * 3 + item.minScore }}
((((item.maxScore - item.minScore) / item.minScore) *
item.minScore) /
5) *
3 +
item.minScore
}}
</div> </div>
<div <div
style=" style="
@ -513,13 +507,7 @@
width: 32px; width: 32px;
" "
> >
{{ {{ ((item.maxScore - item.minScore) / 5) * 2 + item.minScore }}
((((item.maxScore - item.minScore) / item.minScore) *
item.minScore) /
5) *
2 +
item.minScore
}}
</div> </div>
<div <div
style=" style="
@ -542,13 +530,7 @@
width: 32px; width: 32px;
" "
> >
{{ {{ ((item.maxScore - item.minScore) / 5) * 1 + item.minScore }}
((((item.maxScore - item.minScore) / item.minScore) *
item.minScore) /
5) *
1 +
item.minScore
}}
</div> </div>
<div <div
style=" style="
@ -690,6 +672,8 @@ export default {
return { return {
itemshow: false, itemshow: false,
itemshow2: false, itemshow2: false,
showyey: true,
showbj: true,
total1: 0, total1: 0,
total2: 0, total2: 0,
total3: 0, total3: 0,
@ -774,8 +758,8 @@ export default {
pageSize: 10, pageSize: 10,
studentId: "", studentId: "",
batchCode: "", batchCode: "",
// studentId: "12", studentId: "27",
// batchCode: "PC202208030005", batchCode: "PC202208230011",
// studentId: "14", // studentId: "14",
// batchCode: "PC202208030005", // batchCode: "PC202208030005",
// studentId: "9", // studentId: "9",
@ -792,7 +776,7 @@ export default {
created() { created() {
this.getList(); this.getList();
this.class(); this.class();
// this.studenttext(); this.studenttext();
}, },
methods: { methods: {
// //
@ -925,6 +909,20 @@ export default {
// //
getRoleInfo().then((res) => { getRoleInfo().then((res) => {
console.log(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 //list
listKindergartenInfo(this.kqueryParams).then((response) => { listKindergartenInfo(this.kqueryParams).then((response) => {

View File

@ -7,7 +7,7 @@
v-show="showSearch" v-show="showSearch"
label-width="90px" label-width="90px"
> >
<el-form-item label="所属幼儿园" prop="categoryName"> <el-form-item label="所属幼儿园" prop="categoryName" v-if="showyey">
<el-button <el-button
@click="kindergartenshow = true" @click="kindergartenshow = true"
v-if="kindergartenName == '请选择幼儿园'" v-if="kindergartenName == '请选择幼儿园'"
@ -22,7 +22,12 @@
> >
</el-form-item> </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 <el-button
@click="classshowclick" @click="classshowclick"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc" style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
@ -798,7 +803,7 @@
<div <div
ref="chart" ref="chart"
id="chart" id="chart"
style="width: 450px; height: 320px;margin:0 auto" style="width: 450px; height: 320px; margin: 0 auto"
></div> ></div>
<div <div
@ -951,6 +956,8 @@ export default {
return { return {
itemshow: false, itemshow: false,
itemshow2: false, itemshow2: false,
showyey: true,
showbj: true,
total1: 0, total1: 0,
total2: 0, total2: 0,
total3: 0, total3: 0,
@ -1239,6 +1246,20 @@ export default {
// //
getRoleInfo().then((res) => { getRoleInfo().then((res) => {
console.log(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 //list
listKindergartenInfo(this.kqueryParams).then((response) => { listKindergartenInfo(this.kqueryParams).then((response) => {

View File

@ -7,7 +7,7 @@
v-show="showSearch" v-show="showSearch"
label-width="90px" label-width="90px"
> >
<el-form-item label="所属幼儿园" prop="categoryName"> <el-form-item label="所属幼儿园" prop="categoryName" v-if="showyey">
<el-button <el-button
@click="kindergartenshow = true" @click="kindergartenshow = true"
v-if="kindergartenName == '请选择幼儿园'" v-if="kindergartenName == '请选择幼儿园'"
@ -225,7 +225,7 @@
<div slot="header" style="text-align: center"> <div slot="header" style="text-align: center">
<img style="width: 40px" src="@/icons/笑脸.png" alt="" /> <img style="width: 40px" src="@/icons/笑脸.png" alt="" />
<div><!-- card title -->学生此批次暂没数据</div> <div><!-- card title -->批次暂无数据</div>
</div> </div>
<!-- card body --> <!-- card body -->
</el-card> </el-card>
@ -249,6 +249,7 @@ export default {
return { return {
itemshow: false, itemshow: false,
itemshow2: false, itemshow2: false,
showyey: true,
total1: 0, total1: 0,
total4: 0, total4: 0,
@ -294,20 +295,20 @@ export default {
studentlist: [], studentlist: [],
// //
classqueryParams: { classqueryParams: {
// kindergartenId: "", kindergartenId: "",
// batchCode: "", batchCode: "",
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
kindergartenId: "12", // kindergartenId: "12",
batchCode: "PC202208030005", // batchCode: "PC202208030005",
}, },
studentlistqueryParams: { studentlistqueryParams: {
// kindergartenId: "", kindergartenId: "",
// batchCode: "", batchCode: "",
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
kindergartenId: "1", // kindergartenId: "1",
batchCode: "PC202208030005", // batchCode: "PC202208030005",
}, },
LARGECLASS: "LARGE_CLASS", LARGECLASS: "LARGE_CLASS",
MIDDLECLASS: "MIDDLE_CLASS", MIDDLECLASS: "MIDDLE_CLASS",
@ -320,258 +321,270 @@ export default {
mounted() {}, mounted() {},
created() { created() {
this.getList(); this.getList();
this.StudentListinfo(); // this.StudentListinfo();
this.ClassListinfo(); // this.ClassListinfo();
}, },
methods: { methods: {
ClassListinfo() { ClassListinfo() {
ClassList(this.classqueryParams).then((res) => { ClassList(this.classqueryParams).then((res) => {
var classscore1 = []; if (res.rows == [] || !res.rows) {
var classscore2 = []; this.itemshow2 = true;
var classscore3 = []; this.itemshow = false;
res.rows.forEach((e) => { } else {
if (e.classType == this.LARGECLASS) { var classscore1 = [];
this.yclassname1.push(e.className); var classscore2 = [];
if ( var classscore3 = [];
e.itemScoreAll == "" || res.rows.forEach((e) => {
!e.itemScoreAll || if (e.classType == this.LARGECLASS) {
e.itemScoreAll == null this.yclassname1.push(e.className);
) { if (
classscore1.push(0); e.itemScoreAll == "" ||
} else { !e.itemScoreAll ||
classscore1.push(e.itemScoreAll); e.itemScoreAll == null
) {
classscore1.push(0);
} else {
classscore1.push(e.itemScoreAll);
}
} else if (e.classType == this.MIDDLECLASS) {
this.yclassname2.push(e.className);
if (
e.itemScoreAll == "" ||
!e.itemScoreAll ||
e.itemScoreAll == null
) {
classscore2.push(0);
} else {
classscore2.push(e.itemScoreAll);
}
} else if (e.classType == this.SMALLCLASS) {
this.yclassname3.push(e.className);
if (
e.itemScoreAll == "" ||
!e.itemScoreAll ||
e.itemScoreAll == null
) {
classscore3.push(0);
} else {
classscore3.push(e.itemScoreAll);
}
} }
} else if (e.classType == this.MIDDLECLASS) { });
this.yclassname2.push(e.className); var app = {};
if ( var myChart = echarts.init(document.getElementById("main"));
e.itemScoreAll == "" || var myChart2 = echarts.init(document.getElementById("main2"));
!e.itemScoreAll || var myChart3 = echarts.init(document.getElementById("main3"));
e.itemScoreAll == null var option;
) { var option2;
classscore2.push(0); var option3;
} else { const posList = [
classscore2.push(e.itemScoreAll); "left",
} "right",
} else if (e.classType == this.SMALLCLASS) { "top",
this.yclassname3.push(e.className); "bottom",
if ( "inside",
e.itemScoreAll == "" || "insideTop",
!e.itemScoreAll || "insideLeft",
e.itemScoreAll == null "insideRight",
) { "insideBottom",
classscore3.push(0); "insideTopLeft",
} else { "insideTopRight",
classscore3.push(e.itemScoreAll); "insideBottomLeft",
} "insideBottomRight",
} ];
}); app.configParameters = {
var app = {}; rotate: {
var myChart = echarts.init(document.getElementById("main")); min: 0,
var myChart2 = echarts.init(document.getElementById("main2")); max: 90,
var myChart3 = echarts.init(document.getElementById("main3"));
var option;
var option2;
var option3;
const posList = [
"left",
"right",
"top",
"bottom",
"inside",
"insideTop",
"insideLeft",
"insideRight",
"insideBottom",
"insideTopLeft",
"insideTopRight",
"insideBottomLeft",
"insideBottomRight",
];
app.configParameters = {
rotate: {
min: 0,
max: 90,
},
align: {
options: {
left: "left",
center: "center",
right: "right",
}, },
}, align: {
verticalAlign: { options: {
options: { left: "left",
top: "top", center: "center",
middle: "middle", right: "right",
bottom: "bottom",
},
},
position: {
options: posList.reduce(function (map, pos) {
map[pos] = pos;
return map;
}, {}),
},
distance: {
min: 0,
max: 100,
},
};
app.config = {
rotate: 0,
align: "center",
verticalAlign: "middle",
position: "top",
distance: 15,
onChange: function () {
const labelOption = {
rotate: app.config.rotate,
align: app.config.align,
verticalAlign: app.config.verticalAlign,
position: app.config.position,
distance: app.config.distance,
};
myChart.setOption({
series: [
{
label: labelOption,
},
{
label: labelOption,
},
{
label: labelOption,
},
{
label: labelOption,
},
],
});
},
};
const labelOption = {
show: true,
position: app.config.position,
distance: app.config.distance,
align: app.config.align,
verticalAlign: app.config.verticalAlign,
rotate: app.config.rotate,
formatter: "{c}",
fontSize: 16,
rich: {
name: {},
},
};
option = {
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow",
},
},
legend: {},
xAxis: [
{
type: "category",
axisTick: { show: false },
data: this.yclassname1,
},
],
yAxis: [
{
type: "value",
},
],
series: [
{
type: "bar",
barGap: 0,
color: "#00B050",
label: labelOption,
emphasis: {
focus: "series",
}, },
data: classscore1,
}, },
], verticalAlign: {
}; options: {
option2 = { top: "top",
tooltip: { middle: "middle",
trigger: "axis", bottom: "bottom",
axisPointer: {
type: "shadow",
},
},
legend: {},
xAxis: [
{
type: "category",
axisTick: { show: false },
data: this.yclassname2,
},
],
yAxis: [
{
type: "value",
},
],
series: [
{
type: "bar",
barGap: 0,
color: "#00B050",
label: labelOption,
emphasis: {
focus: "series",
}, },
data: classscore2,
}, },
], position: {
}; options: posList.reduce(function (map, pos) {
option3 = { map[pos] = pos;
tooltip: { return map;
trigger: "axis", }, {}),
axisPointer: {
type: "shadow",
}, },
}, distance: {
legend: {}, min: 0,
xAxis: [ max: 100,
{
type: "category",
axisTick: { show: false },
data: this.yclassname3,
}, },
], };
yAxis: [ app.config = {
{ rotate: 0,
type: "value", align: "center",
verticalAlign: "middle",
position: "top",
distance: 15,
onChange: function () {
const labelOption = {
rotate: app.config.rotate,
align: app.config.align,
verticalAlign: app.config.verticalAlign,
position: app.config.position,
distance: app.config.distance,
};
myChart.setOption({
series: [
{
label: labelOption,
},
{
label: labelOption,
},
{
label: labelOption,
},
{
label: labelOption,
},
],
});
}, },
], };
series: [ const labelOption = {
{ show: true,
type: "bar", position: app.config.position,
barGap: 0, distance: app.config.distance,
color: "#00B050", align: app.config.align,
label: labelOption, verticalAlign: app.config.verticalAlign,
emphasis: { rotate: app.config.rotate,
focus: "series", formatter: "{c}",
fontSize: 16,
rich: {
name: {},
},
};
option = {
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow",
}, },
data: classscore3,
}, },
], legend: {},
}; xAxis: [
{
type: "category",
axisTick: { show: false },
data: this.yclassname1,
},
],
yAxis: [
{
type: "value",
},
],
series: [
{
type: "bar",
barGap: 0,
color: "#00B050",
label: labelOption,
emphasis: {
focus: "series",
},
data: classscore1,
},
],
};
option2 = {
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow",
},
},
legend: {},
xAxis: [
{
type: "category",
axisTick: { show: false },
data: this.yclassname2,
},
],
yAxis: [
{
type: "value",
},
],
series: [
{
type: "bar",
barGap: 0,
color: "#00B050",
label: labelOption,
emphasis: {
focus: "series",
},
data: classscore2,
},
],
};
option3 = {
tooltip: {
trigger: "axis",
axisPointer: {
type: "shadow",
},
},
legend: {},
xAxis: [
{
type: "category",
axisTick: { show: false },
data: this.yclassname3,
},
],
yAxis: [
{
type: "value",
},
],
series: [
{
type: "bar",
barGap: 0,
color: "#00B050",
label: labelOption,
emphasis: {
focus: "series",
},
data: classscore3,
},
],
};
option && myChart.setOption(option); option && myChart.setOption(option);
option2 && myChart2.setOption(option2); option2 && myChart2.setOption(option2);
option3 && myChart3.setOption(option3); option3 && myChart3.setOption(option3);
this.itemshow = true; this.itemshow = true;
this.itemshow2 = false; this.itemshow2 = false;
}
}); });
}, },
StudentListinfo() { StudentListinfo() {
StudentList(this.studentlistqueryParams).then((res) => { StudentList(this.studentlistqueryParams).then((res) => {
this.studentlist = res.rows; if (res.rows == [] || !res.rows) {
this.itemshow2 = true;
this.itemshow = false;
} else {
this.studentlist = res.rows;
this.itemshow2 = false;
this.itemshow = true;
}
}); });
}, },
// //
@ -579,7 +592,9 @@ export default {
this.batchCodeName = row.batchName; this.batchCodeName = row.batchName;
this.batchCodeId = row.id; this.batchCodeId = row.id;
this.classqueryParams.batchCode = row.batchCode; this.classqueryParams.batchCode = row.batchCode;
this.studentlistqueryParams.batchCode = row.batchCode;
this.batchCodeshow = false; this.batchCodeshow = false;
this.StudentListinfo();
this.ClassListinfo(); this.ClassListinfo();
}, },
// //
@ -609,6 +624,7 @@ export default {
// //
kindergartenNameclick(row) { kindergartenNameclick(row) {
this.classqueryParams.kindergartenId = row.id; this.classqueryParams.kindergartenId = row.id;
this.studentlistqueryParams.kindergartenId = row.id;
this.kindergartenName = row.kindergartenName; this.kindergartenName = row.kindergartenName;
this.kindergartenId = row.id; this.kindergartenId = row.id;
this.kindergartenshow = false; this.kindergartenshow = false;
@ -622,6 +638,21 @@ export default {
// //
getRoleInfo().then((res) => { getRoleInfo().then((res) => {
console.log(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 //list
listKindergartenInfo(this.kqueryParams).then((response) => { listKindergartenInfo(this.kqueryParams).then((response) => {

View File

@ -26,7 +26,7 @@
style="width: 228px" style="width: 228px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="平均得分" prop="itemAvgScore"> <el-form-item label="平均得分" prop="itemAvgScore">
<el-input <el-input
v-model="queryParams.itemAvgScore" v-model="queryParams.itemAvgScore"
@ -110,12 +110,12 @@
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="所属区域" align="center" prop="name" /> <el-table-column label="所属区域" align="center" prop="name" />
<el-table-column label="所属项目" align="center" prop="itemName" /> <el-table-column label="所属项目" align="center" prop="itemName" />
<el-table-column label="性别" align="center" prop="sex" > <el-table-column label="性别" align="center" prop="sex">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.sex == "MALE" ? "男":"" }} {{ scope.row.sex == "MALE" ? "男" : "" }}
{{ scope.row.sex == "FEMALE" ? "女" :"" }} {{ scope.row.sex == "FEMALE" ? "女" : "" }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="平均得分" align="center" prop="itemAvgScore"> <el-table-column label="平均得分" align="center" prop="itemAvgScore">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.dictValue == "number" ? scope.row.itemAvgScore : "" }} {{ scope.row.dictValue == "number" ? scope.row.itemAvgScore : "" }}
@ -195,7 +195,7 @@
:required="true" :required="true"
v-if="form.resultDictType == ''" v-if="form.resultDictType == ''"
> >
<el-input placeholder="请输入平均得分" /> <el-input v-model="value" placeholder="请输入平均得分" />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
@ -204,11 +204,7 @@
key="itemAvgScore" key="itemAvgScore"
prop="itemAvgScore" prop="itemAvgScore"
> >
<el-input <el-input v-model="form.itemAvgScore" placeholder="请输入平均得分" />
v-model="form.itemAvgScore"
@input="NumberCheck()"
placeholder="请输入平均得分"
/>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
@ -227,7 +223,7 @@
> >
<el-input v-model="form.itemAvgText" placeholder="请输入平均得分" /> <el-input v-model="form.itemAvgText" placeholder="请输入平均得分" />
</el-form-item> </el-form-item>
<el-form-item label="学生性别" prop="sex"> <el-form-item label="学生性别" prop="sex">
<el-radio-group v-model="form.sex"> <el-radio-group v-model="form.sex">
<el-radio :label="male"></el-radio> <el-radio :label="male"></el-radio>
<el-radio :label="female"></el-radio> <el-radio :label="female"></el-radio>
@ -280,11 +276,7 @@
prop="itemAvgScore" prop="itemAvgScore"
v-if="form.dictValue == 'number'" v-if="form.dictValue == 'number'"
> >
<el-input <el-input v-model="form.itemAvgScore" placeholder="请输入平均得分" />
v-model="form.itemAvgScore"
@input="NumberCheck()"
placeholder="请输入平均得分"
/>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="平均得分" label="平均得分"
@ -292,9 +284,9 @@
v-if="form.dictValue == 'text'" v-if="form.dictValue == 'text'"
> >
<el-input v-model="form.itemAvgText" placeholder="请输入平均得分" /> <el-input v-model="form.itemAvgText" placeholder="请输入平均得分" />
</el-form-item> </el-form-item>
<el-form-item label="学生性别" prop="sex"> <el-form-item label="学生性别" prop="sex">
<el-radio-group v-model="form.sex"> <el-radio-group v-model="form.sex">
<el-radio :label="male"></el-radio> <el-radio :label="male"></el-radio>
<el-radio :label="female"></el-radio> <el-radio :label="female"></el-radio>
@ -477,21 +469,53 @@ import { listArea } from "@/api/system/area.js";
import Treeselect from "@riophae/vue-treeselect"; import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default { export default {
name: "TestItemCityScore", name: "TestItemCityScore",
components: { Treeselect }, components: { Treeselect },
data() { data() {
var roleMoeny = (rule, value, callback) => { var roleMoeny = (rule, value, callback) => {
if (Number.isNaN(Number.parseFloat(value))) { var str = this.form.itemAvgScore;
callback(new Error("请输入数字")); console.log(str);
} else if (!this.form.itemAvgScore) { var str_ = "";
callback(new Error("不能为空")); var str2 = "";
} else if (this.form.itemAvgScore * 1 > 99999999) { str_ = str.substr(str.indexOf(".")).length;
callback(new Error("最大99999999")); // if (value.includes(".")) {
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 { } else {
callback(); str2 = str.length;
console.log(str2);
if (Number.isNaN(Number.parseFloat(value))) {
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 { return {
value: "",
// //
loading: true, loading: true,
innerVisible: false, innerVisible: false,
@ -505,7 +529,7 @@ export default {
ResultType2: "", ResultType2: "",
// //
single: true, single: true,
// //
male: "MALE", male: "MALE",
female: "FEMALE", female: "FEMALE",
// //
@ -553,16 +577,7 @@ export default {
form: {}, form: {},
// //
rules: { rules: {
// itemAvgScore: [ itemAvgScore: [{ required: true, validator: roleMoeny, message: "" }],
// {
// required: true,
// type: "number",
// message: "",
// trigger: "blur",
// },
itemAvgScore: [
{ required: true, validator: roleMoeny, message: "" },
],
itemAvgText: [ itemAvgText: [
{ required: true, message: "请输入全市平均成绩", trigger: "blur" }, { required: true, message: "请输入全市平均成绩", trigger: "blur" },
], ],
@ -573,35 +588,12 @@ export default {
{ required: true, message: "请选择所属项目", trigger: "blur" }, { required: true, message: "请选择所属项目", trigger: "blur" },
], ],
}, },
realVal:'',
}; };
}, },
created() { created() {
this.getList(); this.getList();
}, },
methods: { methods: {
NumberCheck(num) {
let str = this.form.itemAvgScore;
// console.log(str)
if (Number.isNaN(Number.parseFloat(str))) {
} else {
//
if (str.indexOf(".") != -1) {
var str_ = str.substr(str.indexOf(".") + 1);
if (str_.indexOf(".") != -1) {
str = str.substr(0, str.indexOf(".") + str_.indexOf(".") + 1);
}
}
//
// str = str.replace(/[^\d^\.]+/g, "");
// console.log(str)
// this.form2.itemAvgScore = str;
str = parseFloat(str).toFixed(3)
this.realVal = str.substring(0, str.length - 1)
}
},
normalizer3(node) { normalizer3(node) {
if (node.children && !node.children.length) { if (node.children && !node.children.length) {
delete node.children; delete node.children;
@ -762,7 +754,6 @@ export default {
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.form.itemAvgScore = this.realVal;
if (this.form.resultDictType == this.ResultType1.dictValue) { if (this.form.resultDictType == this.ResultType1.dictValue) {
console.log(this.ResultType1.dictValue); console.log(this.ResultType1.dictValue);
this.form.itemAvgText = ""; this.form.itemAvgText = "";

View File

@ -99,7 +99,6 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="平均得分" align="center" prop="itemAvgScore"> <el-table-column label="平均得分" align="center" prop="itemAvgScore">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.dictValue == "number" ? scope.row.itemAvgScore : "" }} {{ scope.row.dictValue == "number" ? scope.row.itemAvgScore : "" }}
{{ scope.row.dictValue == "text" ? scope.row.itemAvgText : "" }} {{ scope.row.dictValue == "text" ? scope.row.itemAvgText : "" }}
@ -190,7 +189,6 @@
> >
<el-input <el-input
v-model="form.itemAvgScore" v-model="form.itemAvgScore"
@input="NumberCheck2()"
style="width: 360px" style="width: 360px"
placeholder="请输入平均得分" placeholder="请输入平均得分"
/> />
@ -268,8 +266,11 @@
prop="itemAvgScore" prop="itemAvgScore"
v-if="form2.resultDictType == ''" v-if="form2.resultDictType == ''"
> >
<el-input placeholder="请输入平均得分" style="width: 360px" /> <el-input
v-model="value"
placeholder="请输入平均得分"
style="width: 360px"
/>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
@ -279,13 +280,10 @@
> >
<el-input <el-input
v-model="form2.itemAvgScore" v-model="form2.itemAvgScore"
@input="NumberCheck()"
placeholder="请输入平均得分" placeholder="请输入平均得分"
style="width: 360px" style="width: 360px"
/> />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="平均得分" label="平均得分"
@ -509,37 +507,102 @@ import { tKindergartenInfo } from "@/api/system/kindergartenInfo";
export default { export default {
name: "TestItemCountryScore", name: "TestItemCountryScore",
data() { data() {
var roleMoeny = (rule, value, callback) => { var roleMoeny = (rule, value, callback) => {
// value=String(value).split(".")[0] + "." + value.split(".")[1].slice(0, 2) var str = value;
// console.log(arr) var str_ = "";
if (Number.isNaN(Number.parseFloat(value))) { var str2 = "";
callback(new Error("请输入数字")); str_ = str.substr(str.indexOf(".")).length;
} else if (!this.form2.itemAvgScore) { if (value.includes(".")) {
callback(new Error("不能为空")); str2 = str.substr(0, str.indexOf(".")).length;
} else if (this.form2.itemAvgScore * 1 > 99999999) { console.log(str2);
callback(new Error("最大99999999")); // if (Number.isNaN(Number.parseFloat(value))) {
} else if (this.form2.itemAvgScore == "0") { callback(new Error("请输入数字"));
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 { } else {
callback(); str2 = str.length;
console.log(str2);
if (Number.isNaN(Number.parseFloat(value))) {
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 roleMoeny2 = (rule, value, callback) => {
console.log(value); var str = this.form.itemAvgScore;
if (Number.isNaN(Number.parseFloat(value))) { console.log(str);
callback(new Error("请输入数字")); var str_ = "";
} else if (!this.form.itemAvgScore) { var str2 = "";
callback(new Error("不能为空")); str_ = str.substr(str.indexOf(".")).length;
} else if (this.form.itemAvgScore * 1 > 99999999) { if (value.includes(".")) {
callback(new Error("最大99999999")); // 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 { } else {
callback(); str2 = str.length;
console.log(str2);
if (Number.isNaN(Number.parseFloat(value))) {
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();
}
} }
// if (Number.isNaN(Number.parseFloat(value))) {
// callback(new Error(""));
// } else if (!this.form.itemAvgScore) {
// callback(new Error(""));
// } else if (this.form.itemAvgScore * 1 > 99999999) {
// callback(new Error("99999999")); //
// } else {
// callback();
// }
}; };
return { return {
value: "",
// //
itemResultType: "item_result_type", itemResultType: "item_result_type",
// //
@ -575,7 +638,6 @@ export default {
// //
open: false, open: false,
open2: false, open2: false,
// //
itemId2: "", itemId2: "",
itemId: "", itemId: "",
@ -629,61 +691,13 @@ export default {
{ required: true, message: "请输入平均得分", trigger: "blur" }, { required: true, message: "请输入平均得分", trigger: "blur" },
], ],
}, },
realVal:'', realVal: "",
}; };
}, },
created() { created() {
this.getList(); this.getList();
}, },
methods: methods: {
{
//
NumberCheck(num) {
let str = this.form2.itemAvgScore;
// console.log(str)
if (Number.isNaN(Number.parseFloat(str))) {
} else {
//
if (str.indexOf(".") != -1) {
var str_ = str.substr(str.indexOf(".") + 1);
if (str_.indexOf(".") != -1) {
str = str.substr(0, str.indexOf(".") + str_.indexOf(".") + 1);
}
}
//
// str = str.replace(/[^\d^\.]+/g, "");
// console.log(str)
// this.form2.itemAvgScore = str;
str = parseFloat(str).toFixed(3)
this.realVal = str.substring(0, str.length - 1)
}
},
NumberCheck2(num) {
let str = this.form.itemAvgScore;
if (Number.isNaN(Number.parseFloat(str))) {
} else {
//
if (str.indexOf(".") != -1) {
var str_ = str.substr(str.indexOf(".") +1);
if (str_.indexOf(".") != -1) {
str = str.substr(0, str.indexOf(".") + str_.indexOf(".") + 1);
}
}
//
str = parseFloat(str).toFixed(3)
this.realVal = str.substring(0, str.length - 1)
// str = str.replace(/[^\d^\.]+/g, "");
// this.form.itemAvgScore = str;
console.log(this.realVal)
}
},
// // fun(val) {
// // return Number(val).toFixed(2);
// },
xmclick(row) { xmclick(row) {
console.log(row); console.log(row);
this.xmname = row.itemName; this.xmname = row.itemName;
@ -814,9 +828,6 @@ export default {
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.form.itemAvgScore = this.realVal;
this.form2.itemAvgScore = this.realVal;
if (this.form.dictValue == this.ResultType1.dictValue) { if (this.form.dictValue == this.ResultType1.dictValue) {
console.log(this.ResultType1.dictValue); console.log(this.ResultType1.dictValue);
this.form.itemAvgText = ""; this.form.itemAvgText = "";
@ -835,7 +846,7 @@ export default {
updateTestItemCountryScore(this.form).then((response) => { updateTestItemCountryScore(this.form).then((response) => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open2 = false; this.open2 = false;
this.getList(); this.getList();
}); });
this.itemId2 = ""; this.itemId2 = "";
@ -846,15 +857,14 @@ export default {
} else { } else {
this.$refs["form2"].validate((valid) => { this.$refs["form2"].validate((valid) => {
if (valid) { if (valid) {
this.form2.itemAvgScore = Number(this.form2.itemAvgScore) this.form2.itemAvgScore = Number(this.form2.itemAvgScore);
addTestItemCountryScore(this.form2).then((response) => { addTestItemCountryScore(this.form2).then((response) => {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open = false; this.open = false;
// console.log(this.form2) // console.log(this.form2)
this.getList(); this.getList();
// this.form.itemId = ""; // this.form.itemId = "";
this.itemId2 = ""; this.itemId2 = "";
this.xmname = ""; this.xmname = "";
this.xmname = "请选择所属项目"; this.xmname = "请选择所属项目";

View File

@ -250,7 +250,6 @@
" "
/> />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
label="个人成绩" label="个人成绩"
prop="itemScore" prop="itemScore"
@ -258,7 +257,6 @@
> >
<el-input <el-input
v-model="form.itemScore" v-model="form.itemScore"
@input="NumberCheck3()"
placeholder="请输入个人成绩" placeholder="请输入个人成绩"
style="width: 360px" style="width: 360px"
/> />
@ -274,29 +272,13 @@
style="width: 360px" style="width: 360px"
/> />
</el-form-item> </el-form-item>
<el-form-item label="个人成绩得分" prop="itemFraction"> <el-form-item label="个人成绩得分" prop="itemFraction">
<el-input <el-input
v-model="form.itemFraction" v-model="form.itemFraction"
@input="NumberCheck4()"
placeholder="请输入个人成绩得分" placeholder="请输入个人成绩得分"
style="width: 360px" style="width: 360px"
/> />
</el-form-item> </el-form-item>
<!--
<el-form-item label="测试成绩" prop="itemScore">
<el-input
v-model="form.itemScore"
placeholder="请输入测试成绩"
style="
width: 360px;
text-align: left;
height: 36px;
padding-left: -10px;
"
/>
</el-form-item> -->
<el-form-item label="综合评价" prop="syntheticalAssess"> <el-form-item label="综合评价" prop="syntheticalAssess">
<el-input <el-input
v-model="form.syntheticalAssess" v-model="form.syntheticalAssess"
@ -475,10 +457,14 @@
<el-form-item <el-form-item
label="个人成绩" label="个人成绩"
prop="itemScore" prop="scoreDictValue"
v-if="form2.scoreDictId == '' || form2.scoreDictId == null" v-if="form2.scoreDictId == '' || form2.scoreDictId == null"
> >
<el-input placeholder="请输入个人成绩" style="width: 360px" /> <el-input
v-model="value"
placeholder="请输入个人成绩"
style="width: 360px"
/>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
@ -500,24 +486,13 @@
> >
<el-input <el-input
v-model="form2.itemScore" v-model="form2.itemScore"
@input="NumberCheck()"
placeholder="请输入个人成绩" placeholder="请输入个人成绩"
style="width: 360px" style="width: 360px"
/> />
</el-form-item> </el-form-item>
<!-- <el-form-item
label="个人成绩得分"
prop="itemFraction"
v-if="form3.scoreDictId == '' || form3.scoreDictId == null"
>
<el-input placeholder="请输入个人成绩得分" style="width: 360px" />
</el-form-item> -->
<el-form-item label="个人成绩得分" prop="itemFraction"> <el-form-item label="个人成绩得分" prop="itemFraction">
<el-input <el-input
v-model="form2.itemFraction" v-model="form2.itemFraction"
@input="NumberCheck2()"
placeholder="请输入个人成绩得分" placeholder="请输入个人成绩得分"
style="width: 360px" style="width: 360px"
/> />
@ -689,6 +664,7 @@
{{ scope.row.classType == "LARGE_CLASS" ? "大班" : "" }} {{ scope.row.classType == "LARGE_CLASS" ? "大班" : "" }}
{{ scope.row.classType == "MIDDLE_CLASS" ? "中班" : "" }} {{ scope.row.classType == "MIDDLE_CLASS" ? "中班" : "" }}
{{ scope.row.classType == "SMALL_CLASS" ? "小班" : "" }} {{ scope.row.classType == "SMALL_CLASS" ? "小班" : "" }}
{{ scope.row.classType == "GRADUATE" ? "毕业" : "" }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -1235,52 +1211,176 @@ export default {
components: { Treeselect }, components: { Treeselect },
data() { data() {
var roleMoeny = (rule, value, callback) => { var roleMoeny = (rule, value, callback) => {
if (Number.isNaN(Number.parseFloat(value))) { var str = value;
callback(new Error("请输入数字")); var str_ = "";
} else if (!this.form2.itemScore) { var str2 = "";
callback(new Error("不能为空")); str_ = str.substr(str.indexOf(".")).length;
} else if (this.form2.itemScore * 1 > 99999999) { if (value.includes(".")) {
callback(new Error("最大99999999")); // str2 = str.substr(0, str.indexOf(".")).length;
console.log(str2);
if (Number.isNaN(Number.parseFloat(value))) {
callback(new Error("请输入数字"));
} else if (!this.form2.itemScore) {
callback(new Error("不能为空"));
} else if (this.form2.itemScore * 1 > 99999999) {
callback(new Error("最大99999999")); //
} else if (this.form2.itemScore == "0") {
callback(new Error("请输入成绩")); //
} else if (str_ > 3) {
callback(new Error("小数点后两位")); //
} else if (str2 > 3) {
callback(new Error("整数为三位")); //
} else {
callback();
}
} else { } else {
callback(); str2 = str.length;
console.log(str2);
if (Number.isNaN(Number.parseFloat(value))) {
callback(new Error("请输入数字"));
} else if (!this.form2.itemScore) {
callback(new Error("不能为空"));
} else if (this.form2.itemScore * 1 > 99999999) {
callback(new Error("最大99999999")); //
} else if (this.form2.itemScore == "0") {
callback(new Error("请输入成绩")); //
} else if (str2 > 3) {
callback(new Error("整数为三位")); //
} else {
callback();
}
} }
}; };
var roleMoeny2 = (rule, value, callback) => { var roleMoeny2 = (rule, value, callback) => {
if (Number.isNaN(Number.parseFloat(value))) { var str = value;
callback(new Error("请输入数字")); console.log(str);
} else if (!this.form2.itemFraction) { var str_ = "";
callback(new Error("不能为空")); var str2 = "";
} else if (this.form2.itemFraction * 1 > 99999999) { str_ = str.substr(str.indexOf(".")).length;
callback(new Error("最大99999999")); // if (value.includes(".")) {
str2 = str.substr(0, str.indexOf(".")).length;
console.log(str2);
if (Number.isNaN(Number.parseFloat(value))) {
callback(new Error("请输入数字"));
} else if (!this.form2.itemFraction) {
callback(new Error("不能为空"));
} else if (this.form2.itemFraction * 1 > 99999999) {
callback(new Error("最大99999999")); //
} else if (this.form2.itemFraction == "0") {
callback(new Error("请输入成绩")); //
} else if (str_ > 3) {
callback(new Error("小数点后两位")); //
} else if (str2 > 3) {
callback(new Error("整数为三位")); //
} else {
callback();
}
} else { } else {
callback(); str2 = str.length;
console.log(str2);
if (Number.isNaN(Number.parseFloat(value))) {
callback(new Error("请输入数字"));
} else if (!this.form2.itemFraction) {
callback(new Error("不能为空"));
} else if (this.form2.itemFraction * 1 > 99999999) {
callback(new Error("最大99999999")); //
} else if (this.form2.itemFraction == "0") {
callback(new Error("请输入成绩")); //
} else if (str2 > 3) {
callback(new Error("整数为三位")); //
} else {
callback();
}
} }
}; };
var roleMoeny3 = (rule, value, callback) => { var roleMoeny3 = (rule, value, callback) => {
if (Number.isNaN(Number.parseFloat(value))) { var str = this.form.itemScore;
callback(new Error("请输入数字")); console.log(str);
} else if (!this.form.itemFraction) { var str_ = "";
callback(new Error("不能为空")); var str2 = "";
} else if (this.form.itemFraction * 1 > 99999999) { str_ = str.substr(str.indexOf(".")).length;
callback(new Error("最大99999999")); // if (value.includes(".")) {
str2 = str.substr(0, str.indexOf(".")).length;
console.log(str2);
if (Number.isNaN(Number.parseFloat(value))) {
callback(new Error("请输入数字"));
} else if (!this.form.itemScore) {
callback(new Error("不能为空"));
} else if (this.form.itemScore * 1 > 99999999) {
callback(new Error("最大99999999")); //
} else if (this.form.itemScore == "0") {
callback(new Error("请输入成绩")); //
} else if (str_ > 3) {
callback(new Error("小数点后两位")); //
} else if (str2 > 3) {
callback(new Error("整数为三位")); //
} else {
callback();
}
} else { } else {
callback(); str2 = str.length;
console.log(str2);
if (Number.isNaN(Number.parseFloat(value))) {
callback(new Error("请输入数字"));
} else if (!this.form.itemScore) {
callback(new Error("不能为空"));
} else if (this.form.itemScore * 1 > 99999999) {
callback(new Error("最大99999999")); //
} else if (this.form.itemScore == "0") {
callback(new Error("请输入成绩")); //
} else if (str2 > 3) {
callback(new Error("整数为三位")); //
} else {
callback();
}
} }
}; };
var roleMoeny4 = (rule, value, callback) => { var roleMoeny4 = (rule, value, callback) => {
if (Number.isNaN(Number.parseFloat(value))) { var str = this.form.itemFraction;
callback(new Error("请输入数字")); console.log(str);
} else if (!this.form.itemFraction) { var str_ = "";
callback(new Error("不能为空")); var str2 = "";
} else if (this.form.itemFraction * 1 > 99999999) { str_ = str.substr(str.indexOf(".")).length;
callback(new Error("最大99999999")); // if (value.includes(".")) {
str2 = str.substr(0, str.indexOf(".")).length;
console.log(str2);
if (Number.isNaN(Number.parseFloat(value))) {
callback(new Error("请输入数字"));
} else if (!this.form.itemFraction) {
callback(new Error("不能为空"));
} else if (this.form.itemFraction * 1 > 99999999) {
callback(new Error("最大99999999")); //
} else if (this.form.itemFraction == "0") {
callback(new Error("请输入成绩")); //
} else if (str_ > 3) {
callback(new Error("小数点后两位")); //
} else if (str2 > 3) {
callback(new Error("整数为三位")); //
} else {
callback();
}
} else { } else {
callback(); str2 = str.length;
console.log(str2);
if (Number.isNaN(Number.parseFloat(value))) {
callback(new Error("请输入数字"));
} else if (!this.form.itemFraction) {
callback(new Error("不能为空"));
} else if (this.form.itemFraction * 1 > 99999999) {
callback(new Error("最大99999999")); //
} else if (this.form.itemFraction == "0") {
callback(new Error("请输入成绩")); //
} else if (str2 > 3) {
callback(new Error("整数为三位")); //
} else {
callback();
}
} }
}; };
return { return {
value: "",
// //
itemResultType: "item_result_type", itemResultType: "item_result_type",
// //
@ -1294,16 +1394,13 @@ export default {
yryinnerVisible: false, yryinnerVisible: false,
testItemScoreLists: [], testItemScoreLists: [],
xmname: "请选择所属班级", xmname: "请选择所属班级",
studentInfos: [], studentInfos: [],
innerVisible: false, innerVisible: false,
stname: "请选择学生姓名", stname: "请选择学生姓名",
innerVisible2: false, innerVisible2: false,
testItemss: [], testItemss: [],
innerVisible3: false, innerVisible3: false,
testname: "请选择测试项目名称", testname: "请选择测试项目名称",
testScoreBatchs: [], testScoreBatchs: [],
innerVisible4: false, innerVisible4: false,
itemNumbername: "请选择批次编号", itemNumbername: "请选择批次编号",
@ -1326,7 +1423,6 @@ export default {
kindergartenId: "", kindergartenId: "",
// //
ids: [], ids: [],
// //
single: true, single: true,
// //
@ -1353,7 +1449,6 @@ export default {
itemId3: "", itemId3: "",
itemId4: "", itemId4: "",
itemId5: "", itemId5: "",
// //
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
@ -1474,12 +1569,12 @@ export default {
trigger: "blur", trigger: "blur",
}, },
], ],
syntheticalAssess: [ syntheticalAssess: [
{ required: true, message: "综合评价不能为空", trigger: "blur" }, { required: true, message: "综合评价不能为空", trigger: "blur" },
], ],
}, },
realVal: "", realVal: "",
realVal2: "",
}; };
}, },
created() { created() {
@ -1499,83 +1594,6 @@ export default {
kindergartencancel() { kindergartencancel() {
this.yryinnerVisible = false; this.yryinnerVisible = false;
}, },
//
NumberCheck(num) {
let str = this.form2.itemScore;
//
if (Number.isNaN(Number.parseFloat(str))) {
} else {
//
if (str.indexOf(".") != -1) {
var str_ = str.substr(str.indexOf(".") + 1);
if (str_.indexOf(".") != -1) {
str = str.substr(0, str.indexOf(".") + str_.indexOf(".") + 1);
}
}
str = parseFloat(str).toFixed(3);
this.realVal = str.substring(0, str.length - 1);
}
},
//
NumberCheck2(num) {
let str = this.form2.itemFraction;
//
if (Number.isNaN(Number.parseFloat(str))) {
} else {
//
if (str.indexOf(".") != -1) {
var str_ = str.substr(str.indexOf(".") + 1);
if (str_.indexOf(".") != -1) {
str = str.substr(0, str.indexOf(".") + str_.indexOf(".") + 1);
}
}
str = parseFloat(str).toFixed(3);
this.realVal = str.substring(0, str.length - 1);
}
},
NumberCheck3(num) {
let str = this.form.itemScore;
//
if (Number.isNaN(Number.parseFloat(str))) {
} else {
//
if (str.indexOf(".") != -1) {
var str_ = str.substr(str.indexOf(".") + 1);
if (str_.indexOf(".") != -1) {
str = str.substr(0, str.indexOf(".") + str_.indexOf(".") + 1);
}
}
//
str = parseFloat(str).toFixed(3);
this.realVal = str.substring(0, str.length - 1);
// str = str.replace(/[^\d^\.]+/g, "");
// this.form.itemAvgScore = str;
console.log(this.realVal);
}
},
NumberCheck4(num) {
let str = this.form.itemFraction;
//
if (Number.isNaN(Number.parseFloat(str))) {
} else {
//
if (str.indexOf(".") != -1) {
var str_ = str.substr(str.indexOf(".") + 1);
if (str_.indexOf(".") != -1) {
str = str.substr(0, str.indexOf(".") + str_.indexOf(".") + 1);
}
}
//
str = parseFloat(str).toFixed(3);
this.realVal = str.substring(0, str.length - 1);
// str = str.replace(/[^\d^\.]+/g, "");
// this.form.itemAvgScore = str;
}
},
// //
xmclick(row) { xmclick(row) {
console.log(row); console.log(row);
@ -1858,10 +1876,6 @@ export default {
}, },
/** 提交按钮 */ /** 提交按钮 */
submitForm() { submitForm() {
this.form2.itemScore = this.realVal;
this.form.itemFraction = this.realVal;
this.form.itemScore = this.realVal;
this.form2.itemFraction = this.realVal;
console.log(this.form2); console.log(this.form2);
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
if (valid) { if (valid) {
@ -1884,6 +1898,9 @@ export default {
this.itemId3 = ""; this.itemId3 = "";
this.itemId4 = ""; this.itemId4 = "";
this.itemId5 = ""; this.itemId5 = "";
this.kindergartenName = "请选择幼儿园";
this.kindergartenId = "";
this.queryParams2.kindergartenId = "";
}); });
} }
} }

View File

@ -372,23 +372,23 @@
<el-input <el-input
v-model="item.levelName" v-model="item.levelName"
placeholder="级别名" placeholder="级别名"
style="width: 75px; margin-right: 20px" style="width: 75px; margin-right: 10px"
/> />
<el-input <el-input
v-model.number="item.levelMinScore" v-model.number="item.levelMinScore"
placeholder="最低分" placeholder="最低分"
style="width: 75px; margin-right: 10px" style="width: 75px; margin-right: 5px"
/><el-input /><el-input
v-model.number="item.levelMaxScore" v-model.number="item.levelMaxScore"
placeholder="最高分" placeholder="最高分"
style="width: 75px; margin-right: 9px" style="width: 75px; margin-right: 5px"
/> />
<el-select <el-select
v-model="item.standardFlag" v-model="item.standardFlag"
clearable clearable
placeholder="请选择是否达标" placeholder="请选择是否达标"
style="width: 150px" style="width: 145px; margin-right: 8px"
> >
<el-option <el-option
v-for="item in list" v-for="item in list"

View File

@ -114,7 +114,7 @@
<el-input v-model.number="form.batchCode" placeholder="请输入批次编号" /> <el-input v-model.number="form.batchCode" placeholder="请输入批次编号" />
</el-form-item> --> </el-form-item> -->
<el-form-item label="批次名称" prop="batchName"> <el-form-item label="批次名称" prop="batchName">
<el-input v-model="form.batchName" placeholder="请输入批次名称" /> <el-input v-model="form.batchName" placeholder="请输入批次名称" maxlength="30" />
</el-form-item> </el-form-item>
<el-form-item label="备注信息" prop="remark"> <el-form-item label="备注信息" prop="remark">
<el-input v-model="form.remark" placeholder="请输入备注信息" /> <el-input v-model="form.remark" placeholder="请输入备注信息" />