|
@@ -37,7 +37,7 @@
|
|
学员总数:
|
|
学员总数:
|
|
</view>
|
|
</view>
|
|
<view class="value">
|
|
<view class="value">
|
|
- {{studentList.length}}人
|
|
|
|
|
|
+ {{studentList.length+stopStudentList.length}}人
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
@@ -117,14 +117,17 @@
|
|
</view>
|
|
</view>
|
|
<view class="result">
|
|
<view class="result">
|
|
<view class="itemClass leave" @click="qbStudent">
|
|
<view class="itemClass leave" @click="qbStudent">
|
|
- 全部<text>{{dkNum+qkNum}}</text>
|
|
|
|
|
|
+ 全部<text>{{dkNum+qjNum}}</text>
|
|
</view>
|
|
</view>
|
|
<view class="itemClass arrive" @click="dkStudent">
|
|
<view class="itemClass arrive" @click="dkStudent">
|
|
到课<text>{{dkNum}}</text>
|
|
到课<text>{{dkNum}}</text>
|
|
</view>
|
|
</view>
|
|
- <view class="itemClass leave" @click="qkStudent">
|
|
|
|
- 缺课<text>{{qkNum}}</text>
|
|
|
|
|
|
+ <view class="itemClass arrive" @click="qjStudent">
|
|
|
|
+ 请假<text>{{qjNum}}</text>
|
|
</view>
|
|
</view>
|
|
|
|
+ <!-- <view class="itemClass leave" @click="qkStudent">
|
|
|
|
+ 缺课<text>{{qkNum}}</text>
|
|
|
|
+ </view> -->
|
|
<!-- <view class="itemClass truant">
|
|
<!-- <view class="itemClass truant">
|
|
旷课<text>{{scheduleSheet.kkNum!=null?scheduleSheet.kkNum:'0'}}</text>
|
|
旷课<text>{{scheduleSheet.kkNum!=null?scheduleSheet.kkNum:'0'}}</text>
|
|
</view> -->
|
|
</view> -->
|
|
@@ -162,6 +165,7 @@
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ isCancel: false,
|
|
resultName: '到课',
|
|
resultName: '到课',
|
|
studentId: '',
|
|
studentId: '',
|
|
studentResult: '',
|
|
studentResult: '',
|
|
@@ -177,10 +181,18 @@
|
|
id: '1'
|
|
id: '1'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- cateName: '缺课',
|
|
|
|
- id: '6'
|
|
|
|
|
|
+ cateName: '请假',
|
|
|
|
+ id: '2'
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ cateName: '取消点名',
|
|
|
|
+ id: ''
|
|
},
|
|
},
|
|
// {
|
|
// {
|
|
|
|
+ // cateName: '缺课',
|
|
|
|
+ // id: '6'
|
|
|
|
+ // },
|
|
|
|
+ // {
|
|
// cateName: '旷课',
|
|
// cateName: '旷课',
|
|
// id: '3'
|
|
// id: '3'
|
|
// },
|
|
// },
|
|
@@ -224,15 +236,24 @@
|
|
}
|
|
}
|
|
this.rollCallList = list;
|
|
this.rollCallList = list;
|
|
},
|
|
},
|
|
- qkStudent() {
|
|
|
|
|
|
+ qjStudent() {
|
|
var list = [];
|
|
var list = [];
|
|
for (var i = 0; i < this.studentList.length; i++) {
|
|
for (var i = 0; i < this.studentList.length; i++) {
|
|
- if(this.studentList[i].rollCallResult == '6') {
|
|
|
|
|
|
+ if(this.studentList[i].rollCallResult == '2') {
|
|
list.push(this.studentList[i]);
|
|
list.push(this.studentList[i]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- this.rollCallList = list;
|
|
|
|
|
|
+ this.rollCallList = list;
|
|
},
|
|
},
|
|
|
|
+ // qkStudent() {
|
|
|
|
+ // var list = [];
|
|
|
|
+ // for (var i = 0; i < this.studentList.length; i++) {
|
|
|
|
+ // if(this.studentList[i].rollCallResult == '6') {
|
|
|
|
+ // list.push(this.studentList[i]);
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // this.rollCallList = list;
|
|
|
|
+ // },
|
|
getRollCallSignIn() {
|
|
getRollCallSignIn() {
|
|
uni.showLoading({
|
|
uni.showLoading({
|
|
title: "加载中",
|
|
title: "加载中",
|
|
@@ -240,6 +261,7 @@
|
|
})
|
|
})
|
|
callNamesApi.rollCallSignIn(this.sheetId, this.rollCallListAll).then((response) => {
|
|
callNamesApi.rollCallSignIn(this.sheetId, this.rollCallListAll).then((response) => {
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
|
|
+ this.isCancel = true;
|
|
this.getRollCallDetail();
|
|
this.getRollCallDetail();
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
@@ -276,15 +298,19 @@
|
|
this.list[1].name = '停课' + this.stopStudentList.length;
|
|
this.list[1].name = '停课' + this.stopStudentList.length;
|
|
|
|
|
|
this.dkNum = 0;
|
|
this.dkNum = 0;
|
|
- this.qkNum = 0;
|
|
|
|
|
|
+ this.qjNum = 0;
|
|
|
|
+ // this.qkNum = 0;
|
|
this.tkNum = this.stopStudentList.length;
|
|
this.tkNum = this.stopStudentList.length;
|
|
for (var i = 0; i < this.studentList.length; i++) {
|
|
for (var i = 0; i < this.studentList.length; i++) {
|
|
if(this.studentList[i].rollCallResult == '1') {
|
|
if(this.studentList[i].rollCallResult == '1') {
|
|
this.dkNum += 1;
|
|
this.dkNum += 1;
|
|
}
|
|
}
|
|
- if(this.studentList[i].rollCallResult == '6') {
|
|
|
|
- this.qkNum += 1;
|
|
|
|
|
|
+ if(this.studentList[i].rollCallResult == '2') {
|
|
|
|
+ this.qjNum += 1;
|
|
}
|
|
}
|
|
|
|
+ // if(this.studentList[i].rollCallResult == '6') {
|
|
|
|
+ // this.qkNum += 1;
|
|
|
|
+ // }
|
|
}
|
|
}
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
uni.showToast({
|
|
uni.showToast({
|
|
@@ -296,11 +322,11 @@
|
|
save() {
|
|
save() {
|
|
if(this.current == 0) {
|
|
if(this.current == 0) {
|
|
for (var i = 0; i < this.rollCallList.length; i++) {
|
|
for (var i = 0; i < this.rollCallList.length; i++) {
|
|
- if(this.rollCallList[i].rollCallResult == null) {
|
|
|
|
|
|
+ if(this.rollCallList[i].rollCallResult == null && !this.isCancel) {
|
|
this.rollCallList[i].rollCallResult = '1';
|
|
this.rollCallList[i].rollCallResult = '1';
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- console.log(this.rollCallList)
|
|
|
|
|
|
+ // console.log(this.rollCallList)
|
|
|
|
|
|
this.rollCallListAll = this.rollCallList.concat(this.stopStudentList);
|
|
this.rollCallListAll = this.rollCallList.concat(this.stopStudentList);
|
|
}
|
|
}
|
|
@@ -314,7 +340,7 @@
|
|
// }
|
|
// }
|
|
if(this.current == 1) {
|
|
if(this.current == 1) {
|
|
for (var i = 0; i < this.studentList.length; i++) {
|
|
for (var i = 0; i < this.studentList.length; i++) {
|
|
- if(this.studentList[i].rollCallResult == null) {
|
|
|
|
|
|
+ if(this.studentList[i].rollCallResult == null && !this.isCancel) {
|
|
this.studentList[i].rollCallResult = '1';
|
|
this.studentList[i].rollCallResult = '1';
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -332,12 +358,14 @@
|
|
for (var i = 0; i < this.rollCallList.length; i++) {
|
|
for (var i = 0; i < this.rollCallList.length; i++) {
|
|
this.rollCallList[i].rollCallResult = this.selectorObj[obj[0]].id;
|
|
this.rollCallList[i].rollCallResult = this.selectorObj[obj[0]].id;
|
|
}
|
|
}
|
|
|
|
+ console.log(this.rollCallList)
|
|
} else {
|
|
} else {
|
|
for (var i = 0; i < this.rollCallList.length; i++) {
|
|
for (var i = 0; i < this.rollCallList.length; i++) {
|
|
if (this.studentId == this.rollCallList[i].studentId) {
|
|
if (this.studentId == this.rollCallList[i].studentId) {
|
|
this.rollCallList[i].rollCallResult = this.selectorObj[obj[0]].id;
|
|
this.rollCallList[i].rollCallResult = this.selectorObj[obj[0]].id;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ console.log(this.rollCallList)
|
|
this.studentId = '';
|
|
this.studentId = '';
|
|
}
|
|
}
|
|
},
|
|
},
|