报告、修改

This commit is contained in:
曹辉 2022-09-27 15:35:43 +08:00
parent 0473b482c2
commit 6d4c7bcd7f
16 changed files with 1219 additions and 80 deletions

View File

@ -5,7 +5,7 @@ VUE_APP_TITLE = 智慧幼儿体质评估与促进系统
ENV = 'development'
# 智慧幼儿体质评估与促进系统/开发环境
VUE_APP_BASE_API = 'http://192.168.16.64:8080'
VUE_APP_BASE_API = 'http://192.168.16.81:8099'
#'/dev-api'
# 路由懒加载

BIN
public/student.xlsx Normal file

Binary file not shown.

View File

@ -0,0 +1,36 @@
import request from '@/utils/request'
// 查询幼儿园检测报告列表
export function listKindergartenCheckReport(query) {
return request({
url: '/system/kindergartenCheckReport/list',
method: 'get',
params: query
})
}
// 查询幼儿园检测报告详细
export function getKindergartenCheckReport(id) {
return request({
url: '/system/kindergartenCheckReport/' + id,
method: 'get'
})
}
// 修改幼儿园检测报告
export function updateKindergartenCheckReport(data) {
return request({
url: '/system/kindergartenCheckReport/edit',
method: 'POST',
data: data
})
}
// 幼儿园报告下载/预览
export function report(id) {
return request({
url: `/system/kindergartenCheckReport/download/report?id=${id}`,
method: 'POST',
responseType: 'blob'
})
}

View File

@ -0,0 +1,54 @@
import request from '@/utils/request'
// 查询个人体质检测报告列表
export function listPersonalCheckReport(query) {
return request({
url: '/system/personalCheckReport/list',
method: 'get',
params: query
})
}
// 查询个人体质检测报告详细
export function getPersonalCheckReport(id) {
return request({
url: '/system/personalCheckReport/' + id,
method: 'get'
})
}
// 新增个人体质检测报告
export function addPersonalCheckReport(data) {
return request({
url: '/system/personalCheckReport',
method: 'post',
data: data
})
}
// 修改个人体质检测报告
export function updatePersonalCheckReport(data) {
return request({
url: '/system/personalCheckReport',
method: 'put',
data: data
})
}
// 删除个人体质检测报告
export function delPersonalCheckReport(id) {
return request({
url: '/system/personalCheckReport/' + id,
method: 'delete'
})
}
// 幼儿报告下载/预览
export function report(id) {
return request({
url: `/system/personalCheckReport/download/report?id=${id}`,
method: 'POST',
responseType: 'blob'
})
}

View File

@ -9,13 +9,20 @@ export function StudentList(query) {
})
}
// // 查询
// export function ClassList(query) {
// return request({
// url: '/system/testAll/ClassList',
// method: 'get',
// params: query
// })
// }
// 查询
export function ClassList(query) {
return request({
url: '/system/testAll/ClassList',
method: 'get',
params: query
})
}
// // 查询
// export function selectAllClassById(query) {
// return request({
// url: '/system/testAll/selectAllClassById',
// method: 'get',
// params: query
// })
// }

View File

@ -97,3 +97,12 @@ export function getAllTestItemScoreInfo(query) {
params: query,
})
}
// 获取个人成绩得分
export function getStudentFraction(studentId, itemId, itemScore) {
return request({
url: `system/testItemScore/getStudentFraction?studentId=${studentId}&itemId=${itemId}&itemScore=${itemScore}`,
method: 'get'
})
}

View File

@ -11,12 +11,20 @@
<el-button
@click="kindergartenshow = true"
v-if="kindergartenName == '请选择幼儿园'"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
style="
width: 230px;
text-align: left;
height: 32px;
color: #c0c4cc;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
"
>{{ kindergartenName }}</el-button
>
<el-button
@click="kindergartenshow = true"
style="width: 250px; text-align: left; height: 32px"
style="width: 230px; text-align: left; height: 32px"
v-else
>{{ kindergartenName }}</el-button
>
@ -25,13 +33,13 @@
<el-form-item label="所属批次" prop="categoryName">
<el-button
@click="batchCodeshowclick"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
style="width: 230px; text-align: left; height: 32px; color: #c0c4cc"
v-if="batchName == '请选择批次'"
>{{ batchName }}</el-button
>
<el-button
@click="batchCodeshowclick"
style="width: 250px; text-align: left; height: 32px"
style="width: 230px; text-align: left; height: 32px"
v-else
>{{ batchName }}</el-button
>
@ -341,8 +349,8 @@ export default {
this.testqueryParams = {
pageNum: 1,
pageSize: 10,
batchCode:'',
batchName:'',
batchCode: "",
batchName: "",
};
this.testScore();
},

View File

@ -7,30 +7,30 @@
v-show="showSearch"
label-width="90px"
>
<el-form-item label="学生" prop="categoryName" label-width="45px">
<el-form-item label="学生姓名" prop="categoryName">
<el-button
@click="studentshowclick"
v-if="studentname == '请选择学生'"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
style="width: 230px; text-align: left; height: 32px; color: #c0c4cc"
>{{ studentname }}</el-button
>
<el-button
@click="studentshowclick"
style="width: 250px; text-align: left; height: 32px"
style="width: 230px; text-align: left; height: 32px"
v-else
>{{ studentname }}</el-button
>
</el-form-item>
<el-form-item label="所属批次" prop="categoryName" label-width="70px">
<el-form-item label="所属批次" prop="categoryName">
<el-button
@click="batchCodeshowclick"
style="width: 250px; text-align: left; height: 32px; color: #c0c4cc"
style="width: 230px; text-align: left; height: 32px; color: #c0c4cc"
v-if="batchName == '请选择批次'"
>{{ batchName }}</el-button
>
<el-button
@click="batchCodeshowclick"
style="width: 250px; text-align: left; height: 32px"
style="width: 230px; text-align: left; height: 32px"
v-else
>{{ batchName }}</el-button
>
@ -635,18 +635,17 @@ export default {
this.batchCode = localStorage.getItem("batchCode");
this.studentId = localStorage.getItem("studentId");
this.batchName = localStorage.getItem("batchName");
console.log(localStorage.getItem("studentname"));
if (localStorage.getItem("batchCode") == null) {
this.batchName = "请选择批次";
} else {
this.batchCode = localStorage.getItem("batchCode");
this.$emit("itemlist", this.studentId, this.batchCode);
}
if (localStorage.getItem("studentname") == null) {
this.studentname = "请选择学生";
} else {
this.studentname = localStorage.getItem("studentname");
this.$emit("itemlist", this.studentId, this.batchCode);
}
if (
localStorage.getItem("batchCode") != null &&
@ -790,7 +789,6 @@ export default {
getList() {
//
getRoleInfo().then((res) => {
console.log(res);
var user = res.data.roleKeys;
if (user.includes("enchou")) {
this.classqueryParams.kindergartenId = res.data.kindergartenId;

View File

@ -120,7 +120,7 @@ export default {
//
queryParams: {
pageNum: 1,
pageSize: 10,
pageSize: 999,
// studentId: "10",
// batchCode: "PC202208030005",
studentId: "",
@ -168,7 +168,6 @@ export default {
});
// console.log(this.spanArr);
},
//
arraySpanMethod({ row, column, rowIndex, columnIndex }) {
// console.log(columnIndex);

View File

@ -36,8 +36,17 @@
><span style="margin-left: 20px; margin-right: 20px">{{
analysislist.schoolRank
}}</span
>
> <span style="margin-left: 50px">区域排名:</span
><span style="margin-left: 20px; margin-right: 20px">{{
analysislist.areaRank
}}</span
> <span style="margin-left: 50px">区域成绩占比:</span
><span style="margin-left: 20px; margin-right: 20px">{{
analysislist.areaProportion
}}</span
>
</div>
<div slot="header" style="text-align: center; font-size: 25px">
<span>体测项目分值与全校全市对比</span>
</div>

View File

@ -0,0 +1,355 @@
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="90px"
>
<kindergarten
@kinbatlist="kinbatlist"
style="display: inline; padding: 20px 0 20px 0"
></kindergarten>
<el-form-item label="报告名称" prop="reportName">
<el-input
v-model="queryParams.reportName"
placeholder="请输入报告名称"
style="width: 230px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="报告编号" prop="reportCode">
<el-input
v-model="queryParams.reportCode"
placeholder="请输入报告编号"
clearable
style="width: 230px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="审核状态" prop="checkTime">
<el-input
v-model="queryParams.reportName"
style="width: 230px"
placeholder="请输入报告名称"
clearable
@keyup.enter.native="handleQuery"
/>
</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-form-item>
</el-form>
<el-table v-loading="loading" :data="kindergartenCheckReportList">
<el-table-column
label="幼儿园名称"
align="center"
prop="kindergartenName"
/>
<el-table-column label="批次名称" align="center" prop="batchName" />
<el-table-column label="报告名称" align="center" prop="reportName" />
<el-table-column label="报告编号" align="center" prop="reportCode" />
<el-table-column label="审核人" align="center" prop="checkUserId" />
<el-table-column label="审核状态" align="center" prop="checkStatus">
<template slot-scope="scope">
{{ scope.row.checkStatus == 0 ? "未审核" : "" }}
{{ scope.row.checkStatus == 1 ? "已审核" : "" }}
</template>
</el-table-column>
<el-table-column
label="审核时间"
align="center"
prop="checkTime"
width="180"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.checkTime, "{y}-{m}-{d}") }}</span>
</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-search"
@click="lookhand(scope.row)"
>预览</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:kindergartenCheckReport:edit']"
>审核</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-download"
@click="handleExport(scope.row)"
v-hasPermi="['system:kindergartenCheckReport:export']"
>下载</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 修改幼儿园检测报告对话框 -->
<el-dialog
:title="title"
:visible.sync="open"
width="1200px"
append-to-body
>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="审批状态" prop="checkStatus">
<el-radio-group v-model="form.checkStatus">
<el-radio :label="0">未审批</el-radio>
<el-radio :label="1">已审批</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="报告内容" prop="reportName">
<iframe
ref="pdfCotainer"
:src="pdfurl"
width="1000px"
height="550px"
></iframe>
</el-form-item>
<!-- <el-form-item label="幼儿园名称" prop="kindergartenName">
<el-input v-model="form.kindergartenName" />
</el-form-item>
<el-form-item label="批次名称" prop="batchCode">
<el-input v-model="form.batchCode" />
</el-form-item>
<el-form-item label="报告编号" prop="reportCode">
<el-input v-model="form.reportCode" placeholder="请输入报告编号" />
</el-form-item>
<el-form-item label="报告名称" prop="reportName">
<el-input v-model="form.reportName" placeholder="请输入报告名称" />
</el-form-item> -->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<el-dialog
title="预览"
:visible.sync="openiframe"
width="1050px"
append-to-body
>
<div style="height: 600px">
<iframe
ref="pdfCotainer"
:src="pdfurl"
width="1000px"
height="600px"
></iframe>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="openiframe = false">关闭</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
listKindergartenCheckReport,
getKindergartenCheckReport,
addKindergartenCheckReport,
updateKindergartenCheckReport,
report,
} from "@/api/system/kindergartenCheckReport";
import kindergarten from "../../assembly/kindergarten.vue";
export default {
components: { kindergarten },
name: "KindergartenCheckReport",
data() {
return {
//
loading: true,
openiframe: false,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
kindergartenCheckReportList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
kindergartenId: null,
batchCode: null,
reportCode: null,
reportName: null,
physicalSynthAnalysis: null,
downloadAddress: null,
motionLibraryId: null,
checkUserId: null,
checkTime: null,
checkStatus: null,
},
//
form: {},
//
rules: {},
pdfurl: null,
};
},
created() {
this.getList();
},
methods: {
/** 查询幼儿园检测报告列表 */
getList() {
this.loading = true;
listKindergartenCheckReport(this.queryParams).then((response) => {
this.kindergartenCheckReportList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
kindergartenId: null,
batchCode: null,
reportCode: null,
reportName: null,
physicalSynthAnalysis: null,
downloadAddress: null,
motionLibraryId: null,
checkUserId: null,
checkTime: null,
checkStatus: 0,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
console.log(this.queryParams);
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
report(row.id).then((res) => {
this.pdfurl = window.URL.createObjectURL(res);
// window.open(this.pdfurl);
});
getKindergartenCheckReport(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改幼儿园检测报告审批状态";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateKindergartenCheckReport(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addKindergartenCheckReport(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
//
lookhand(item) {
report(item.id).then((res) => {
this.pdfurl = window.URL.createObjectURL(res);
this.openiframe = true;
// window.open(this.pdfurl);
});
},
/** 导出按钮操作 */
handleExport(row) {
// report(row.id).then((res) => {
// console.log(res);
// });
this.download(
`/system/kindergartenCheckReport/download/report?id=${row.id}`,
{},
`幼儿园检测报告.pdf`
);
},
kinbatlist(kindergartenId, batchCode) {
console.log(kindergartenId, batchCode);
},
},
};
</script>
<style scoped='scss'>
::v-deep .el-form {
display: inline;
}
</style>

View File

@ -0,0 +1,372 @@
<template>
<div class="app-container">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="90px"
>
<student
style="display: inline; padding: 20px 0 20px 0"
@itemlist="itemlists"
></student>
<el-form-item label="报告名称" prop="reportName">
<el-input
v-model="queryParams.reportName"
placeholder="请输入报告名称"
clearable
style="width: 230px"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="报告编号" prop="reportCode">
<el-input
v-model="queryParams.reportCode"
placeholder="请输入报告编号"
style="width: 230px"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="审核状态" prop="checkUserId">
<el-input
v-model="queryParams.checkUserId"
placeholder="请输入审核状态"
style="width: 230px"
clearable
@keyup.enter.native="handleQuery"
/>
</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-form-item>
</el-form>
<el-table v-loading="loading" :data="personalCheckReportList">
<el-table-column label="学生姓名" align="center" prop="studentName" />
<el-table-column label="批次名称" align="center" prop="batchName" />
<el-table-column label="报告名称" align="center" prop="reportName" />
<el-table-column label="报告编号" align="center" prop="reportCode" />
<el-table-column label="审核人" align="center" prop="checkUserId" />
<el-table-column
label="审核时间"
align="center"
prop="checkTime"
width="180"
>
<template slot-scope="scope">
<span>{{ parseTime(scope.row.checkTime, "{y}-{m}-{d}") }}</span>
</template>
</el-table-column>
<el-table-column label="审核状态" align="center" prop="checkStatus">
<template slot-scope="scope">
{{ scope.row.checkStatus == 0 ? "未审核" : "" }}
{{ scope.row.checkStatus == 1 ? "已审核" : "" }}
</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-search"
@click="lookhand(scope.row)"
>预览</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:personalCheckReport:edit']"
>审核</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-download"
@click="handleExport(scope.row)"
v-hasPermi="['system:personalCheckReport:export']"
>下载</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 修改个人体质检测报告对话框 -->
<el-dialog
:title="title"
:visible.sync="open"
width="1200px"
append-to-body
>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="审批状态" prop="checkStatus">
<el-radio-group v-model="form.checkStatus">
<el-radio :label="0">未审批</el-radio>
<el-radio :label="1">已审批</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="报告内容" prop="reportName">
<iframe
ref="pdfCotainer"
:src="pdfurl"
width="1000px"
height="550px"
></iframe>
</el-form-item>
<!-- <el-form-item label="学生姓名" prop="studentId">
<el-input v-model="form.studentId" placeholder="请输入学生姓名" />
</el-form-item>
<el-form-item label="批次编号" prop="batchCode">
<el-input v-model="form.batchCode" placeholder="请输入批次编号" />
</el-form-item>
<el-form-item label="报告编号" prop="reportCode">
<el-input v-model="form.reportCode" placeholder="请输入报告编号" />
</el-form-item>
<el-form-item label="报告名称" prop="reportName">
<el-input v-model="form.reportName" placeholder="请输入报告名称" />
</el-form-item> -->
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<el-dialog
title="预览"
:visible.sync="openiframe"
width="1050px"
append-to-body
>
<div style="height: 600px">
<iframe
ref="pdfCotainer"
:src="pdfurl"
width="1000px"
height="600px"
></iframe>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="openiframe = false">关闭</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
listPersonalCheckReport,
getPersonalCheckReport,
delPersonalCheckReport,
addPersonalCheckReport,
updatePersonalCheckReport,
report,
} from "@/api/system/personalCheckReport";
import student from "../../assembly/student.vue";
export default {
components: { student },
name: "PersonalCheckReport",
data() {
return {
//
loading: true,
openiframe: false,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
personalCheckReportList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
studentId: null,
batchCode: null,
reportCode: null,
reportName: null,
syntheticalAssess: null,
physicalAnalysisExplain: null,
unqualifyItemExplain: null,
downloadAddress: null,
prescriptionAdvice: null,
motionLibraryId: null,
checkUserId: null,
checkTime: null,
checkStatus: null,
},
//
form: {},
//
rules: {},
pdfurl: null,
};
},
created() {
this.getList();
},
methods: {
/** 查询个人体质检测报告列表 */
getList() {
this.loading = true;
listPersonalCheckReport(this.queryParams).then((response) => {
this.personalCheckReportList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
studentId: null,
batchCode: null,
reportCode: null,
reportName: null,
syntheticalAssess: null,
physicalAnalysisExplain: null,
unqualifyItemExplain: null,
downloadAddress: null,
prescriptionAdvice: null,
motionLibraryId: null,
checkUserId: null,
checkTime: null,
checkStatus: 0,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
console.log(this.queryParams);
this.queryParams.pageNum = 1;
this.getList();
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
report(row.id).then((res) => {
this.pdfurl = window.URL.createObjectURL(res);
// window.open(this.pdfurl);
});
getPersonalCheckReport(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改个人体质检测报告";
});
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updatePersonalCheckReport(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addPersonalCheckReport(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal
.confirm('是否确认删除个人体质检测报告编号为"' + ids + '"的数据项?')
.then(function () {
return delPersonalCheckReport(ids);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
},
//
lookhand(item) {
report(item.id).then((res) => {
this.pdfurl = window.URL.createObjectURL(res);
this.openiframe = true;
// window.open(this.pdfurl);
});
},
/** 导出按钮操作 */
handleExport(row) {
this.download(
`/system/personalCheckReport/download/report?id=${row.id}`,
{},
`幼儿检测报告.pdf`
);
},
itemlists(studentId, batchCode) {
console.log(studentId, batchCode);
this.queryParams.studentId = studentId;
this.queryParams.batchCode = batchCode;
},
},
};
</script>
<style scoped='scss'>
::v-deep .el-form {
display: inline;
}
</style>

View File

@ -330,7 +330,6 @@ export default {
});
el.list = list1;
});
let seriesData = [];
let yindicator = [];
this.categoryScoreList.forEach((el) => {
@ -371,9 +370,7 @@ export default {
});
}
});
var myChart = echarts.init(document.getElementById("chart"));
let option = {
//
color: "#D9A508",

View File

@ -6,7 +6,7 @@
size="small"
:inline="true"
v-show="showSearch"
label-width="68px"
label-width="90px"
>
<el-form-item label="学生姓名" prop="studentName">
<el-input
@ -94,7 +94,6 @@
>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
@ -131,6 +130,16 @@
>删除</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
type="info"
plain
icon="el-icon-upload2"
size="mini"
@click="handledata"
>导入</el-button
>
</el-col>
<!-- <el-col :span="1.5">
<el-button
type="warning"
@ -265,7 +274,6 @@
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
@ -273,7 +281,6 @@
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改学生信息对话框 -->
<el-dialog
:title="title"
@ -388,12 +395,12 @@
>
</el-date-picker>
</el-form-item>
<el-form-item label="身份证号" prop="cardNumber">
<el-form-item label="件编号" prop="cardNumber">
<el-input
style="width: 380px"
maxlength="18"
v-model="form.cardNumber"
placeholder="请输入身份证号"
placeholder="请输入件编号"
/>
</el-form-item>
<el-form-item label="曾用名" prop="onceName">
@ -532,7 +539,6 @@
@pagination="kininfolist"
/>
</el-dialog>
<!-- 学生家长 -->
<el-dialog
width="800px"
@ -665,7 +671,6 @@
>选择完成</el-button
>
</el-dialog>
<!-- // -->
<el-dialog
width="1000px"
@ -799,7 +804,6 @@
@pagination="getList"
/>
</el-dialog>
<!-- 修改家长信息对话框 -->
<el-dialog
title="新增家长"
@ -879,6 +883,87 @@
</el-table-column>
</el-table>
</el-dialog>
<!-- // -->
<el-dialog
:title="upload.title"
:visible.sync="upload.open"
width="550px"
append-to-body
:before-close="uploadopen"
>
<el-form
ref="form"
:model="upload.data"
:rules="rules"
label-width="100px"
>
<el-form-item label="所属幼儿园" prop="kindergartenId">
<el-button
@click="kininnerVisible = true"
style="width: 360px; text-align: left; height: 36px; color: #c0c4cc"
v-if="upload.data.kindergartenName == '请选择所属幼儿园'"
>{{ upload.data.kindergartenName }}</el-button
>
<el-button
@click="kininnerVisible = true"
style="width: 360px; text-align: left; height: 36px"
v-else
>{{ kindergartenName }}</el-button
>
</el-form-item>
<el-form-item label="所属班级" prop="classId">
<el-button
type=""
@click="classclick"
style="width: 360px; text-align: left; height: 36px; color: #c0c4cc"
v-if="upload.data.className == '请选择所属班级'"
>{{ upload.data.className }}</el-button
>
<el-button
type=""
@click="classclick"
style="width: 360px; text-align: left; height: 36px"
v-else
>{{ classinfoName }}</el-button
>
</el-form-item>
<el-form-item label="上传文档">
<el-upload
ref="upload"
:limit="1"
accept=".xlsx, .xls"
:data="upload.data"
:headers="upload.headers"
:action="upload.url"
:disabled="upload.isUploading"
:on-progress="handleFileUploadProgress"
:on-success="handleFileSuccess"
:auto-upload="false"
drag
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">
将文件拖到此处<em>点击上传</em>
</div>
<div class="el-upload__tip text-center" slot="tip">
<span>仅允许导入xlsxlsx格式文件</span>
<el-link
type="primary"
:underline="false"
style="font-size: 12px; vertical-align: baseline"
@click="downloadExcel"
>下载模板</el-link
>
</div>
</el-upload>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitFileForm"> </el-button>
<el-button @click="uploadopen"> </el-button>
</div>
</el-dialog>
</div>
</template>
@ -896,6 +981,7 @@ import {
tKindergartenInfo,
listKindergartenInfo,
} from "@/api/system/kindergartenInfo";
import { getToken } from "@/utils/auth";
import { listClassinfo } from "@/api/system/classinfo";
@ -929,18 +1015,28 @@ export default {
//
var isCardId = (rule, value, callback) => {
if (!value) {
return new Error("请输入身份证号)");
} else {
const reg =
/^\d{6}(18|19|20)?\d{2}(0[1-9]|1[0-2])(([0-2][1-9])|10|20|30|31)\d{3}(\d|X|x)$/;
const card = reg.test(value);
if (!card) {
callback(new Error("身份证号格式有误!"));
} else {
callback();
} else {
if (!this.checkSpecialKey(value)) {
callback(new Error("不能含有特殊字符!!"));
}
}
};
// var isCardId = (rule, value, callback) => {
// if (!value) {
// callback();
// } else {
// const reg =
// /^\d{6}(18|19|20)?\d{2}(0[1-9]|1[0-2])(([0-2][1-9])|10|20|30|31)\d{3}(\d|X|x)$/;
// const card = reg.test(value);
// if (!card) {
// callback(new Error(""));
// } else {
// callback();
// }
// }
// };
return {
pickerOptions: {
disabledDate(time) {
@ -952,9 +1048,26 @@ export default {
return time.getTime() > Date.now();
},
},
Data: "",
//
upload: {
//
open: false,
//
title: "",
//
isUploading: false,
//
headers: { Authorization: "Bearer " + getToken() },
//
url: process.env.VUE_APP_BASE_API + "/system/studentInfo/importData",
data: {
kindergartenId: null,
classId: null,
kindergartenName: "请选择所属幼儿园",
className: "请选择所属班级",
},
},
//
parentStudentInfoList: [],
//
@ -1076,6 +1189,12 @@ export default {
form2: {},
//
rules: {
"upload.data.kindergartenId": [
{ required: true, message: "所属幼儿园不能为空", trigger: "blur" },
],
"upload.data.classId": [
{ required: true, message: "所属班级不能为空", trigger: "blur" },
],
kindergartenId: [
{ required: true, message: "所属幼儿园不能为空", trigger: "blur" },
],
@ -1101,7 +1220,7 @@ export default {
{ required: true, message: "请选择日期", trigger: "change" },
],
cardNumber: [
{ required: true, message: "请输入证件号", trigger: "blur" },
{ message: "请输入证件号", trigger: "blur" },
{ validator: isCardId, trigger: "blur" },
],
parentIdList: [
@ -1143,6 +1262,8 @@ export default {
this.form.kindergartenId = row.id;
this.kindergartenid = row.id;
this.kindergartenName = row.kindergartenName;
this.upload.data.kindergartenName = row.kindergartenName;
this.upload.data.kindergartenId = row.id;
this.classinfoList2.kindergartenId = row.id;
this.kininnerVisible = false;
this.classinfoName = "请选择所属班级";
@ -1549,6 +1670,8 @@ export default {
classinfoclick(item) {
console.log(item);
this.classinfoName = item.className;
this.upload.data.className = item.className;
this.upload.data.classId = item.id;
this.classinfoId = item.id;
this.form.classId = item.id;
this.form2.classId = item.id;
@ -1764,6 +1887,78 @@ export default {
`studentInfo_${new Date().getTime()}.xlsx`
);
},
checkSpecialKey(str) {
let specialKey =
"[`~!#$^&*()=|{}':;'\\[\\].<>/?~#¥……&*()——|{}【】‘;:”“'。,、?]'";
for (let i = 0; i < str.length; i++) {
if (specialKey.indexOf(str.substr(i, 1)) != -1) {
return false;
}
}
return true;
},
/** 导入按钮操作 */
handledata() {
this.upload.title = "用户导入";
this.upload.open = true;
},
//
submitFileForm() {
if (this.upload.data.kindergartenId == null) {
this.$message.error("所属幼儿园不能为空");
} else if (this.upload.data.classId == null) {
this.$message.error("所属班级不能为空");
} else {
this.$refs.upload.submit();
}
},
//
handleFileSuccess(response, file, fileList) {
this.upload.open = false;
this.upload.isUploading = false;
this.upload.data = {
kindergartenId: null,
classId: null,
kindergartenName: "请选择所属幼儿园",
className: "请选择所属班级",
};
this.form.kindergartenId = null;
this.classinfoId = null;
this.$refs.upload.clearFiles();
this.$alert(
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
response.msg +
"</div>",
"导入结果",
{ dangerouslyUseHTMLString: true }
);
this.getList();
},
//
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
uploadopen() {
this.upload.open = false;
this.form.kindergartenId = null;
this.classinfoId = null;
this.upload.data = {
kindergartenId: null,
classId: null,
kindergartenName: "请选择所属幼儿园",
className: "请选择所属班级",
};
},
/** 下载模板操作 */
downloadExcel() {
let a = document.createElement("a");
a.href = "/student.xlsx";
a.download = "学生信息模板表.xlsx";
a.style.display = "none";
document.body.appendChild(a);
a.click();
a.remove();
},
},
};
</script>

View File

@ -38,30 +38,30 @@
<div class="title">大班</div>
<div
id="main"
style="width: 500px; height: 300px; margin: 0 auto"
style="width: 500px; height: 350px; margin: 0 auto"
></div>
</div>
<div v-if="yclassname2.length != 0" style="position: relative">
<div class="title">中班</div>
<div
id="main2"
style="width: 500px; height: 300px; margin: 0 auto"
style="width: 500px; height: 350px; margin: 0 auto"
></div>
</div>
<div v-if="yclassname3.length != 0" style="position: relative">
<div class="title">小班</div>
<div
id="main3"
style="width: 500px; height: 300px; margin: 0 auto"
style="width: 500px; height: 350px; margin: 0 auto"
></div>
</div>
</div>
<div style="width: 50%">
<div slot="header" class="header" style="margin-bottom: 40px">
<span>优秀幼儿榜(TOP10)</span>
<div slot="header" class="header" style="margin-bottom: 20px">
<span>优秀幼儿榜(TOP10)</span>
</div>
<el-table
ref="singleTable"
ref="studentlist"
:data="studentlist"
highlight-current-row
style="margin: 0 auto; width: 530px"
@ -95,6 +95,49 @@
>
</el-table-column>
</el-table>
<div
slot="header"
class="header"
style="margin-bottom: 20px; margin-top: 20px"
>
<span>班级优秀幼儿榜</span>
</div>
<el-table
ref="selectAllClassBylist"
:data="selectAllClassBylist"
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>
</div>
@ -116,7 +159,11 @@
<script>
import * as echarts from "echarts";
import { getRoleInfo } from "@/api/system/quality";
import { StudentList, ClassList } from "@/api/system/survey";
import {
StudentList,
ClassList,
selectAllClassById,
} from "@/api/system/survey";
import Kindergarten from "../../assembly/kindergarten.vue";
export default {
name: "KindergartenPhysicalTest",
@ -128,7 +175,12 @@ export default {
//
showSearch: true,
studentlist: [],
selectAllClassBylist: [],
//
selectAllClassByquery: {
kindergartenId: "",
batchCode: "",
},
classqueryParams: {
kindergartenId: "",
batchCode: "",
@ -164,28 +216,38 @@ export default {
methods: {
handleQuery() {
this.StudentListinfo();
this.ClassListinfo();
// this.ClassListinfo();
// this.selectAllClassByIdinfo();
},
kinbatlist(kindergartenId, batchCode) {
console.log(kindergartenId, batchCode);
this.studentlistqueryParams.kindergartenId = kindergartenId;
this.studentlistqueryParams.batchCode = batchCode;
this.classqueryParams.kindergartenId = kindergartenId;
this.classqueryParams.batchCode = batchCode;
this.selectAllClassByquery.kindergartenId = kindergartenId;
this.selectAllClassByquery.batchCode = batchCode;
},
ClassListinfo() {
ClassList(this.classqueryParams).then((res) => {
if (res.rows.length == 0) {
this.itemshow2 = true;
this.itemshow = false;
} else {
ClassList(this.classqueryParams).then((res) => {});
},
StudentListinfo() {
StudentList(this.studentlistqueryParams).then((res) => {
if (res.data.testAllStudentScoreVOList != null) {
this.studentlist = res.data.testAllStudentScoreVOList;
this.itemshow2 = false;
this.itemshow = true;
}
if (res.data.allStudentScoreVOList != null) {
console.log(1);
this.yclassname1 = [];
this.yclassname2 = [];
this.yclassname3 = [];
this.classscore1 = [];
this.classscore2 = [];
this.classscore3 = [];
res.rows.forEach((e) => {
res.data.allStudentScoreVOList.forEach((e) => {
if (e.classType == this.LARGECLASS) {
this.yclassname1.push(e.className);
if (
@ -236,7 +298,6 @@ export default {
// var myChart2 = echarts.init(document.getElementById("main2"));
// var myChart3 = echarts.init(document.getElementById("main3"));
var app = {};
var option;
var option2;
var option3;
@ -348,6 +409,9 @@ export default {
yAxis: [
{
type: "value",
// max: (value) => {
// return Math.ceil(value.max / 100) * 100;
// },
},
],
series: [
@ -443,7 +507,6 @@ export default {
if (this.yclassname3.length != 0) {
option3 && myChart3.setOption(option3);
}
// option && myChart.setOption(option);
// option2 && myChart2.setOption(option2);
// option3 && myChart3.setOption(option3);
@ -451,20 +514,24 @@ export default {
this.itemshow2 = false;
});
}
});
},
StudentListinfo() {
StudentList(this.studentlistqueryParams).then((res) => {
if (res.rows.length == 0) {
if (res.data.allClassByVOList != null) {
this.selectAllClassBylist = res.data.allClassByVOList;
}
if (
res.data.allStudentScoreVOList == null &&
res.data.testAllStudentScoreVOList == null &&
res.data.allClassByVOList == null
) {
this.itemshow2 = true;
this.itemshow = false;
} else {
this.studentlist = res.rows;
this.itemshow2 = false;
this.itemshow = true;
}
});
},
selectAllClassByIdinfo() {
selectAllClassById(this.selectAllClassByquery).then((res) => {
console.log(this.selectAllClassBylist);
});
},
getList() {
//
getRoleInfo().then((res) => {

View File

@ -408,6 +408,7 @@
<el-input
type="number"
v-model="scope.row.itemScore"
@input="oninputscore(scope.row)"
v-if="
scope.row.itemScore != null ||
scope.row.scoreDictId == ResultType1.dictCode
@ -429,7 +430,25 @@
align="center"
>
<template slot-scope="scope">
<el-input type="number" v-model="scope.row.itemFraction"></el-input>
<el-input
type="number"
v-model="scope.row.itemFraction"
@input="oninputscore(scope.row)"
placeholder="请先输入个人成绩"
:disabled="true"
v-if="
scope.row.itemScore != null ||
scope.row.scoreDictId == ResultType1.dictCode
"
></el-input>
<el-input
@input="oninputscore(scope.row)"
v-model="scope.row.itemFraction"
v-if="
scope.row.scoreDictValue != null ||
scope.row.scoreDictId == ResultType2.dictCode
"
></el-input>
</template>
</el-table-column>
@ -1118,7 +1137,7 @@
<el-table
ref="singleTable"
:data="getAllTestItemScore"
style="width: 95%; "
style="width: 95%"
>
<el-table-column
property="itemCode"
@ -1204,6 +1223,7 @@ import {
studentInfo,
testScoreBatch,
getAllTestItemScoreInfo,
getStudentFraction,
} from "@/api/system/testItemScore";
import {
tKindergartenInfo,
@ -1349,6 +1369,19 @@ export default {
},
methods: {
oninputscore(item) {
getStudentFraction(
this.addqueryParams.studentId,
item.itemId,
item.itemScore
).then((res) => {
this.form.itemScoreList.forEach((e) => {
if (e.itemId == res.data.itemId) {
e.itemFraction = res.data.fraction;
}
});
});
},
handledbClick(row, event, column) {
this.$refs.table.toggleRowSelection(row);
console.log(row, event, column);