diff --git a/src/views/system/testItemScore/index.vue b/src/views/system/testItemScore/index.vue
index 5c4d9cb..4c69c8c 100644
--- a/src/views/system/testItemScore/index.vue
+++ b/src/views/system/testItemScore/index.vue
@@ -6,45 +6,9 @@
size="small"
:inline="true"
v-show="showSearch"
- label-width="90px"
+ label-width="68px"
>
-
-
-
-
-
+
+
+
+
+
+
+
删除
+
+ 查看
修改
@@ -162,6 +163,7 @@
+
+
+ {{ kindergartenName }}
+
+ {{ kindergartenName }}
+
+
+
+ {{ xmname }}
+
+ {{ xmname }}
+
-
+
@@ -370,7 +426,8 @@
append-to-body
:before-close="kindergartencancel"
>
-
+
+
@@ -466,12 +524,12 @@
@click="handleQuery2"
>搜索
- 重置
-
+
-
- {{ kindergartenName }}
-
- {{ kindergartenName }}
-
-
-
- {{ xmname }}
-
- {{ xmname }}
-
-
搜索
- 重置
-
+
@@ -698,7 +695,7 @@
@@ -738,7 +735,7 @@
@@ -750,7 +747,7 @@
>
-
+
@@ -904,6 +901,101 @@
@pagination="getList"
/>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -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 = "修改个人成绩录入管理";
- // });
- // },
},
};