学生信息管理 查看

This commit is contained in:
shidongli 2022-08-31 17:48:32 +08:00
parent e4c9be4e2f
commit 66e39af9bd

View File

@ -6,45 +6,9 @@
size="small"
:inline="true"
v-show="showSearch"
label-width="90px"
label-width="68px"
>
<!-- <el-form-item label="所属幼儿园" prop="classId">
<el-button
type=""
@click="yryinnerVisible = true"
v-if="kindergartenName == '请选择幼儿园'"
style="
width: 208.33px;
text-align: left;
height: 36px;
color: #c0c4cc;
padding-left: -10px;
"
>{{ kindergartenName }}</el-button
>
<el-button
type=""
@click="yryinnerVisible = true"
v-else
style="
width: 208.33px;
text-align: left;
height: 36px;
padding-left: -10px;
"
>{{ kindergartenName }}</el-button
>
</el-form-item> -->
<el-form-item label="批次编号" prop="batchCode">
<el-input
v-model="queryParams.batchCode"
placeholder="请输入批次编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="班级名称" prop="className">
<el-form-item label="所属班级" prop="className">
<el-input
v-model="queryParams.className"
placeholder="请输入所属班级"
@ -60,6 +24,22 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="项目名称" prop="itemName">
<el-input
v-model="queryParams.itemName"
placeholder="请输入项目名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="批次编号" prop="batchCode">
<el-input
v-model="queryParams.batchCode"
placeholder="请输入批次编号"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button
@ -111,6 +91,17 @@
>删除</el-button
>
</el-col>
<!-- <el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:testItemScore:export']"
>导出</el-button
>
</el-col> -->
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
@ -121,6 +112,8 @@
v-loading="loading"
:data="testItemScoreList"
@selection-change="handleSelectionChange"
@row-dblclick="seepraent"
ref="table"
>
<el-table-column type="selection" width="50" align="center" />
<el-table-column
@ -143,11 +136,19 @@
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-search"
@click="seepraent(scope.row)"
v-hasPermi="['system:testItemScore:edit']"
>查看</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate2(scope.row)"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:testItemScore:edit']"
>修改</el-button
>
@ -162,6 +163,7 @@
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:total="total"
@ -182,9 +184,66 @@
ref="form"
:model="form"
:rules="rules"
label-width="100px"
label-width="110px"
:inline="true"
>
<el-form-item label="所属幼儿园" prop="classId" v-if="form.id == ''">
<el-button
type=""
@click="yryinnerVisible = true"
v-if="kindergartenName == '请选择幼儿园'"
style="
width: 240px;
text-align: left;
height: 36px;
color: #c0c4cc;
padding-left: -10px;
"
>{{ kindergartenName }}</el-button
>
<el-button
type=""
@click="yryinnerVisible = true"
v-else
style="
width: 240px;
text-align: left;
height: 36px;
padding-left: -10px;
"
>{{ kindergartenName }}</el-button
>
</el-form-item>
<el-form-item label="所属班级" prop="classId" v-if="form.id == ''">
<el-button
type=""
@click="handleQuery2"
v-if="xmname == '请选择所属班级'"
style="
width: 200px;
text-align: left;
height: 36px;
color: #c0c4cc;
padding-left: -10px;
"
>{{ xmname }}</el-button
>
<el-button
type=""
@click="handleQuery2"
v-else
style="
width: 200px;
text-align: left;
height: 36px;
padding-left: -10px;
"
>{{ xmname }}</el-button
>
</el-form-item>
<el-form-item label="学生姓名" prop="studentId" v-if="form.id == null">
<el-button
disabled
@ -348,10 +407,7 @@
align="center"
>
<template slot-scope="scope">
<el-input
v-model="scope.row.syntheticalAssess"
maxlength="200"
></el-input>
<el-input v-model="scope.row.syntheticalAssess"></el-input>
</template>
</el-table-column>
</el-table>
@ -370,7 +426,8 @@
append-to-body
:before-close="kindergartencancel"
>
<el-table :data="kindergartenList" @cell-dblclick="kindergartenNameclick">
<el-table :data="kindergartenList"
@cell-dblclick="kindergartenNameclick">
<el-table-column label="请选择" width="70" align="center">
<template slot-scope="scope">
<el-button
@ -436,6 +493,7 @@
</el-dialog>
<!--所属班级 弹窗 -->
<el-dialog
width="850px"
title="选择所属班级"
@ -453,7 +511,7 @@
<el-form-item label="班级名称" prop="className">
<el-input
v-model="queryParams2.className"
placeholder="请输入班级名称"
placeholder="请输入项目名称"
clearable
@keyup.enter.native="handleQuery"
/>
@ -466,12 +524,12 @@
@click="handleQuery2"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="classresetQuery"
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table :data="classInfos" @cell-dblclick="xmclick">
<el-table :data="classInfos">
<el-table-column label="请选择" width="70" align="center">
<template slot-scope="scope">
<el-button
@ -567,13 +625,13 @@
:total="total2"
:page.sync="queryParams2.pageNum"
:limit.sync="queryParams2.pageSize"
@pagination="classresetQuery"
@pagination="getList"
/>
</el-dialog>
<!-- 学生姓名弹窗 -->
<el-dialog
width="1050px"
width="850px"
title="选择学生姓名"
:visible.sync="innerVisible2"
append-to-body
@ -586,64 +644,6 @@
v-show="showSearch"
label-width="90px"
>
<el-form-item label="所属幼儿园" prop="classId" v-if="form.id == ''">
<el-button
type=""
@click="yryinnerVisible = true"
v-if="kindergartenName == '请选择幼儿园'"
style="
width: 200px;
text-align: left;
height: 36px;
color: #c0c4cc;
padding-left: -10px;
"
>{{ kindergartenName }}</el-button
>
<el-button
type=""
@click="yryinnerVisible = true"
v-else
style="
width: 200px;
text-align: left;
height: 36px;
padding-left: -10px;
"
>{{ kindergartenName }}</el-button
>
</el-form-item>
<el-form-item label="所属班级" prop="classId" v-if="form.id == ''">
<el-button
type=""
@click="handleQuery2"
v-if="xmname == '请选择所属班级'"
style="
width: 200px;
text-align: left;
height: 36px;
color: #c0c4cc;
padding-left: -10px;
"
>{{ xmname }}</el-button
>
<el-button
type=""
@click="handleQuery2"
v-else
style="
width: 200px;
text-align: left;
height: 36px;
padding-left: -10px;
"
>{{ xmname }}</el-button
>
</el-form-item>
<el-form-item label="学生姓名" prop="studentName">
<el-input
v-model="queryParams3.studentName"
@ -660,15 +660,12 @@
@click="handleQuery3"
>搜索</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="studentresetQuery"
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table :data="studentInfos" @cell-dblclick="studentclick">
<el-table :data="studentInfos">
<el-table-column label="请选择" width="70" align="center">
<template slot-scope="scope">
<el-button
@ -690,7 +687,7 @@
<el-table-column
property="studentName"
label="学生姓名"
width="120"
width="150"
align="center"
>
</el-table-column>
@ -698,7 +695,7 @@
<el-table-column
property="studentSex"
label="学生性别"
width="100"
width="150"
align="center"
>
<template slot-scope="scope">
@ -738,7 +735,7 @@
<el-table-column
property="onceName"
label="曾用名"
width="100"
width="150"
align="center"
>
</el-table-column>
@ -750,7 +747,7 @@
>
</el-table-column>
<!-- <el-table-column
<el-table-column
property="creatBy"
label="创建人"
width="150"
@ -777,14 +774,14 @@
width="150"
align="center"
>
</el-table-column> -->
</el-table-column>
</el-table>
<pagination
v-show="total3 > 0"
:total="total3"
:page.sync="queryParams3.pageNum"
:limit.sync="queryParams3.pageSize"
@pagination="studentinfoclick"
@pagination="getList"
/>
</el-dialog>
@ -904,6 +901,101 @@
@pagination="getList"
/>
</el-dialog>
<!-- // -->
<el-dialog
title="查看个人成绩"
:visible.sync="innerVisible5"
append-to-body
style="margin-top: 5%"
width="1000px"
>
<el-table
ref="singleTable"
:data="getAllTestItemScore"
style="width: 95%; margin: 20px auto"
>
<el-table-column
property="itemCode"
label="项目编号"
width="185"
align="center"
>
</el-table-column>
<el-table-column
property="itemName"
label="项目名称"
width="185"
align="center"
>
</el-table-column>
<!-- <el-table-column
property="scoreDictId"
label="字典类型"
align="center"
width="120"
>
<template slot-scope="scope">
{{
scope.row.scoreDictId == ResultType1.dictCode
? ResultType1.dictLabel
: ""
}}{{
scope.row.scoreDictId == ResultType2.dictCode
? ResultType2.dictLabel
: ""
}}</template
>
</el-table-column> -->
<el-table-column
property="itemScore"
label="个人成绩"
width="180"
align="center"
>
<!-- <template slot-scope="scope">
<el-input
readonly
type="number"
v-model="scope.row.itemScore"
v-if="
scope.row.itemScore != null ||
scope.row.scoreDictId == ResultType1.dictCode
"
></el-input>
<el-input
readonly
v-model="scope.row.scoreDictValue"
v-if="
scope.row.scoreDictValue != null ||
scope.row.scoreDictId == ResultType2.dictCode
"
></el-input>
</template> -->
</el-table-column>
<el-table-column
property="itemFraction"
label="个人成绩得分"
width="180"
align="center"
>
<!-- <template slot-scope="scope">
<el-input type="number" v-model="scope.row.itemFraction" readonly></el-input>
</template> -->
</el-table-column>
<el-table-column
property="syntheticalAssess"
label="综合评价"
width="180"
align="center"
>
<!-- <template slot-scope="scope">
<el-input v-model="scope.row.syntheticalAssess" readonly></el-input>
</template> -->
</el-table-column>
</el-table>
</el-dialog>
</div>
</template>
@ -926,6 +1018,7 @@ import {
import Treeselect from "@riophae/vue-treeselect";
export default {
name: "TestItemScore",
components: { Treeselect },
data() {
return {
value: "",
@ -949,6 +1042,7 @@ export default {
testItemss: [],
testScoreBatchs: [],
innerVisible4: false,
innerVisible5: false,
itemNumbername: "请选择批次编号",
//
kqueryParams: {
@ -986,6 +1080,8 @@ export default {
classInfos: [],
//
testItemScoreList: [],
//
getAllTestItemScore: [],
//
title: "",
//
@ -1027,9 +1123,6 @@ export default {
batchId: "",
batchCode: "",
},
studentId: "",
batchCode: "",
//
form: {},
//
@ -1057,9 +1150,44 @@ export default {
created() {
this.getList();
},
methods: {
handledbClick(row, event, column) {
// alert("");
this.$refs.table.toggleRowSelection(row);
console.log(row, event, column);
},
//
seepraent(row) {
this.reset();
// const row = row.id || this.ids;
getAllTestItemScoreInfo(row).then((res) => {
this.getAllTestItemScore = res.data;
// console.log(this.getAllTestItemScore);
this.innerVisible5 = true;
});
},
// seepraent(row) {
// getAllTestItemScoreInfo(row).then((res) => {
// console.log(res)
// this.form.getAllTestItemScore = [];
// // // console.log(this.addqueryParams);
// this.getAllTestItemScore = res.data.getAllTestItemScore;
// // console.log(this.form);
// // this.form.itemScoreList = res.data;
// // console.log(this.getAllTestItemScore);
// this.innerVisible5 = true;
// });
// },
testclick() {
this.innerVisible4 = true;
if (this.addqueryParams.studentId == "") {
this.$message.error("请先选择学生");
} else {
this.innerVisible4 = true;
}
},
delitem(item) {
console.log(item);
@ -1067,24 +1195,26 @@ export default {
return e.id != item.id;
});
},
getAllTestItemScore() {
this.form.itemScoreList = [];
console.log(this.addqueryParams);
getAllTestItemScoreInfo(this.addqueryParams).then((res) => {
console.log(this.form);
this.form.itemScoreList = res.data;
});
},
// getAllTestItemScore() {
// this.form.itemScoreList = [];
// console.log(this.addqueryParams);
// getAllTestItemScoreInfo(this.addqueryParams).then((res) => {
// console.log(this.form);
// this.form.itemScoreList = res.data;
// });
// },
//
kindergartenNameclick(row) {
this.queryParams2.kindergartenId = row.id;
this.queryParams.kindergartenId = row.id;
this.kindergartenName = row.kindergartenName;
this.kindergartenId = row.id;
this.queryParams3.kindergartenId = row.id;
this.yryinnerVisible = false;
this.xmname = "请选择所属班级";
this.stname = "请选择学生姓名";
this.itemId2 = "";
this.itemId3 = "";
this.form.classId = null;
this.form.studentId = null;
},
//
kindergartencancel() {
@ -1092,30 +1222,38 @@ export default {
},
//
xmclick(row) {
console.log(row);
this.xmname = row.className;
this.itemId2 = row.id;
this.form.classId = row.id;
console.log(this.form);
this.innerVisible = false;
this.form.className = row.className;
this.queryParams3.classId = row.id;
this.stname = "请选择学生姓名";
this.itemId3 = "";
this.form.studentId = null;
},
//
studentinfoclick() {
//
studentInfo(this.queryParams3).then((res) => {
this.studentInfos = res.rows;
this.total3 = res.total;
this.innerVisible2 = true;
this.itemId2 = this.queryParams3.classId;
});
if (this.queryParams3.classId == "" || !this.queryParams3.classId) {
this.$message.error("请先选择班级");
} else {
//
studentInfo(this.queryParams3).then((res) => {
this.studentInfos = res.rows;
this.total3 = res.total;
this.innerVisible2 = true;
this.itemId2 = this.queryParams3.classId;
});
}
},
//
studentclick(row) {
console.log(row);
this.stname = row.studentName;
this.itemId3 = row.id;
this.form.studentId = row.id;
this.form.className = row.className;
this.addqueryParams.studentId = row.id;
this.form.classId = row.classId;
this.innerVisible2 = false;
this.form.studentName = row.studentName;
if (this.form.batchCode != null) {
@ -1132,17 +1270,13 @@ export default {
console.log(this.addqueryParams);
this.innerVisible4 = false;
this.form.batchCode = row.batchCode;
if (this.addqueryParams.studentId != "") {
this.getAllTestItemScore();
}
this.getAllTestItemScore();
},
/** 查询个人成绩录入管理列表 */
getList() {
//
this.loading = true;
console.log(this.queryParams);
//list
listKindergartenInfo(this.kqueryParams).then((response) => {
this.kindergartenList = response.rows;
@ -1191,6 +1325,8 @@ export default {
studentId: null,
batchCode: null,
itemScoreList: [],
batchId:null,
batchCode:null,
};
this.resetForm("form");
},
@ -1203,7 +1339,7 @@ export default {
} else {
classInfo(this.queryParams2).then((response) => {
this.classInfos = response.rows;
this.total2 = response.total;
this.total = response.total;
this.loading = false;
this.innerVisible = true;
});
@ -1212,7 +1348,12 @@ export default {
//
handleQuery3() {
this.queryParams3.pageNum = 1;
this.studentinfoclick();
studentInfo(this.queryParams).then((response) => {
this.studentInfo = response.rows;
this.total = response.total;
this.loading = false;
this.getList();
});
},
//
handleQuery5() {
@ -1231,86 +1372,14 @@ export default {
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.kindergartenName = "请选择幼儿园";
//ID
this.kindergartenId = "";
this.queryParams = {
pageNum: 1,
pageSize: 10,
className: null,
studentName: null,
itemName: null,
kindergartenId: null,
batchCode: null,
};
this.queryParams.className = "";
this.handleQuery();
},
classresetQuery() {
this.queryParams2.className = null;
classInfo(this.queryParams2).then((response) => {
this.classInfos = response.rows;
this.total2 = response.total;
this.loading = false;
this.innerVisible = true;
});
},
studentresetQuery() {
this.queryParams3 = {
pageNum: 1,
pageSize: 10,
studentName: null,
classId: "",
};
this.kindergartenName = "请选择幼儿园";
this.kindergartenId = "";
this.xmname = "请选择所属班级";
this.itemId2 = "";
this.studentinfoclick();
this.handleQuery();
this.queryParams.className = "";
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.kindergartenName = "请选择幼儿园";
//ID
this.kindergartenId = "";
this.queryParams = {
pageNum: 1,
pageSize: 10,
className: null,
studentName: null,
itemName: null,
kindergartenId: null,
batchCode: null,
};
this.queryParams.className = "";
this.handleQuery();
},
classresetQuery() {
this.queryParams2.className = null;
classInfo(this.queryParams2).then((response) => {
this.classInfos = response.rows;
this.total2 = response.total;
this.loading = false;
this.innerVisible = true;
});
},
studentresetQuery() {
this.queryParams3 = {
pageNum: 1,
pageSize: 10,
studentName: null,
classId: "",
};
this.kindergartenName = "请选择幼儿园";
this.kindergartenId = "";
this.xmname = "请选择所属班级";
this.itemId2 = "";
this.studentinfoclick();
this.queryParams.className = "";
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
/** 新增按钮操作 */
handleAdd() {
@ -1322,28 +1391,8 @@ export default {
},
/** 修改按钮操作 */
handleUpdate(row) {
console.log(row);
// this.reset();
var list = {
studentId: this.studentId[0],
batchCode: this.batchCode[0],
};
this.form.itemScoreList = [];
getTestItemScore(list).then((response) => {
console.log();
this.form = response.data;
this.open = true;
this.queryParams3.classId = response.data.classId;
this.stname = response.data.studentName;
this.itemId3 = response.data.studentId;
this.addqueryParams.studentId = response.data.studentId;
this.itemNumbername = response.data.batchCode;
console.log(this.form);
});
},
handleUpdate2(row) {
console.log(row);
// this.reset();
this.reset();
const id = row.id || this.ids;
var list = {
studentId: row.studentId,
batchCode: row.batchCode,
@ -1363,13 +1412,13 @@ export default {
},
/** 提交按钮 */
submitForm() {
console.log(this.form);
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id == null) {
updateTestItemScore(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
this.xmname = "请选择所属班级";
this.stname = "请选择学生姓名";
this.itemNumbername = "请选择批次编号";
@ -1378,8 +1427,6 @@ export default {
this.kindergartenName = "请选择幼儿园";
this.kindergartenId = "";
this.queryParams2.kindergartenId = "";
this.queryParams.kindergartenId = "";
this.getList();
});
} else {
this.form.itemScoreList.forEach((e) => {
@ -1388,6 +1435,7 @@ export default {
addTestItemScore(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
this.xmname = "请选择所属班级";
this.stname = "请选择学生姓名";
this.itemNumbername = "请选择批次编号";
@ -1396,8 +1444,6 @@ export default {
this.kindergartenName = "请选择幼儿园";
this.kindergartenId = "";
this.queryParams2.kindergartenId = "";
this.queryParams.kindergartenId = "";
this.getList();
});
}
}
@ -1407,6 +1453,7 @@ export default {
handleDelete(row) {
const studentId = row.studentId;
const batchCode = row.batchCode;
this.$modal
.confirm("是否确认删除个人成绩的数据项?")
.then(function () {
@ -1418,27 +1465,16 @@ export default {
})
.catch(() => {});
},
//
handleSelectionChange(selection) {
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
this.studentId = selection.map((item) => item.studentId);
this.batchCode = selection.map((item) => item.batchCode);
console.log(this.studentId, this.batchCode);
/** 导出按钮操作 */
handleExport() {
this.download(
"system/testItemScore/export",
{
...this.queryParams,
},
`testItemScore_${new Date().getTime()}.xlsx`
);
},
// /** */
// handleUpdate(row) {
// console.log(row.id);
// this.reset();
// const id = row.id || this.ids;
// getTestItemScore(id).then((response) => {
// this.form = response.data;
// this.open = true;
// this.title = "";
// });
// },
},
};
</script>