|
@@ -11,7 +11,7 @@
|
|
|
<van-button round type="info" icon="smile" @click="onClickRight()">添加分数</van-button>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="leaveList">
|
|
|
- <pingfenList :groupList="groupList" :stuList="groupList" @clickShow="clickShow"></pingfenList>
|
|
|
+ <pingfenList :groupList="groupList" :leaveList="leaveList" :stuList="groupList" @clickShow="clickShow"></pingfenList>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
@@ -37,6 +37,7 @@ export default {
|
|
|
},
|
|
|
data: () => ({
|
|
|
groupList: [],
|
|
|
+ leaveList: [],
|
|
|
stuList: [],
|
|
|
title: '',
|
|
|
isleftarrow: '',
|
|
@@ -72,31 +73,30 @@ export default {
|
|
|
let num = eval(nes.join('+'));
|
|
|
leaveList.data.num = num;
|
|
|
console.log(leaveList.data);
|
|
|
- let resgroup = await this.groupinfo();
|
|
|
- this.$set(this, `groupList`, resgroup.data);
|
|
|
- for (const acc of resgroup.data) {
|
|
|
- for (const stu of acc.students) {
|
|
|
- console.log(stu);
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
+ this.$set(this, `leaveList`, leaveList.data);
|
|
|
+ const resq = await this.groupinfo();
|
|
|
|
|
|
- async clickShow(acc) {
|
|
|
- for (const id of acc) {
|
|
|
- var result = this.groupList.filter(item => item.id === id);
|
|
|
- const stu = await this.query();
|
|
|
- for (const acc of result) {
|
|
|
- for (const val of acc.students) {
|
|
|
- var ref = stu.data.filter(item => item.id === val.stuid);
|
|
|
- console.log(ref);
|
|
|
- let sum = ref.map(i => i.selfscore);
|
|
|
- if (sum.length == 0) {
|
|
|
- let score = 0;
|
|
|
- }
|
|
|
+ for (const val of resq.data) {
|
|
|
+ for (const acc of val.students) {
|
|
|
+ var ref = res.data.filter(item => item.id === acc.stuid);
|
|
|
+ for (const aaa of ref) {
|
|
|
+ acc.stores = aaa.selfscore;
|
|
|
}
|
|
|
+
|
|
|
+ let asd = val.students.map(i => i.stores);
|
|
|
+ console.log(asd);
|
|
|
+ let nes = asd.filter(d => d);
|
|
|
+ let snewcore = eval(nes.join('+'));
|
|
|
+
|
|
|
+ val.score = snewcore;
|
|
|
}
|
|
|
}
|
|
|
+ console.log(resq.data);
|
|
|
+
|
|
|
+ this.$set(this, `groupList`, resq.data);
|
|
|
},
|
|
|
+
|
|
|
+ async clickShow(acc) {},
|
|
|
// 跳转到请假
|
|
|
onClickRight() {
|
|
|
this.$router.push({ path: '/user/socre' });
|