Commit 20b4ab3b authored by sujie@126.com's avatar sujie@126.com

dd

parent 021cc85c
......@@ -42,7 +42,8 @@
"classlist",
"classdetail",
"tindex",
"todolist"
"todolist",
"record"
]
},
{
......
......@@ -47,7 +47,7 @@ Page({
my = dakarole ==2? 1:'';
this.setData({
sid,
my: my
my: 1
})
// this.getschoolList()
},
......@@ -204,5 +204,10 @@ Page({
wx.navigateTo({
url: `/business/pages/classservice/todolist?sid=${this.data.sid}`
})
}
},
goRecord(){
wx.navigateTo({
url: `/business/pages/classservice/record?sid=${this.data.sid}&my=${this.data.my}`,
})
},
})
\ No newline at end of file
......@@ -37,7 +37,7 @@
</view>
<view class="text" hover-class="none" hover-stop-propagation="false">作业点评</view>
</view>
<view class="nav-item" hover-class="none" hover-stop-propagation="false" bindtap="goPointsMgt">
<view class="nav-item" hover-class="none" hover-stop-propagation="false" bindtap="goRecord">
<view class="icon" hover-class="none" hover-stop-propagation="false">
<image class="" src="{{localImageRoot}}/2b/classservice/record.png?{{imageVersion}}"></image>
</view>
......
// business/pages/classservice/rollcall .js
import {
schedulesGet
} from '../../../service/business/classservice.js'
import {
LocalStorage
} from '../../../utilities/index.js';
var app = getApp();
function formatDate(date) {
var myyear = date.getFullYear();
var mymonth = date.getMonth()+1;
var myweekday = date.getDate();
if(mymonth < 10){
mymonth = "0" + mymonth;
}
if(myweekday < 10){
myweekday = "0" + myweekday;
}
return (myyear+"-"+mymonth + "-" + myweekday);
}
Page({
/**
* 页面的初始数据
*/
data: {
imageRoot: app.globalData.imageRoot,
imageVersion: app.globalData.imageVersion,
localImageRoot: "../../../images",
sid: 0,
rollcalllist:[],
page: 1,
perPage: 10,
hasmore: true,
rollcallTotal: 0,
emptyPage: false,
listLoading: false,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
const {sid} = options;
this.setData({
sid,
my: 1
})
this.schedulesGet('init')
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
this.setData({
page:1,
hasmore:true
},()=>{
this.schedulesGet('up')
})
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
this.schedulesGet('down')
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
},
schedulesGet(type) {
if (!this.data.hasmore) {
return;
}
if (this.data.listLoading) {
return
};
this.setData({
listLoading: true
})
schedulesGet({
page: this.data.page,
perPage: this.data.perPage,
my: this.data.my,
school_id: this.data.sid,
status:1
}).then((res) => {
const { code, data } = res;
this.setData({
listLoading: false
})
if (code != 200) { // 失败的处理
} else {
if (data.total) {
this.setData({
rollcallTotal: data.total,
})
}
switch (type) {
case 'init': //页面进来第一次加载
this.setData({
rollcallList: data.list || []
}, () => {
if (this.data.rollcallTotal > this.data.rollcallList.length) {
let page = this.data.page + 1;
this.setData({
page,
})
} else { // 没有更多了
this.setData({
hasmore: false
})
}
})
break;
case 'down': // 页面下拉刷新
this.setData({
rollcallList: data.list || []
}, () => {
if (this.data.rollcallTotal > this.data.rollcallList.length) {
let page = this.data.page + 1;
this.setData({
page,
})
} else { // 没有更多了
this.setData({
hasmore: false
})
}
})
wx.stopPullDownRefresh();
break;
case 'up': // 页面上拉刷新
let list = this.data.rollcallList;
let _list = list.concat(data.list);
this.setData({
rollcallList: _list
}, () => {
if (this.data.rollcallTotal > this.data.rollcallList.length) {
let page = this.data.page + 1;
this.setData({
page,
})
} else { // 没有更多了
this.setData({
hasmore: false
})
}
})
break;
default:
break;
}
if (this.data.rollcallList.length == 0) {
this.setData({
emptyPage: true
})
} else {
this.setData({
emptyPage: false
})
}
}
}).catch((e) => {
this.setData({
listLoading: false
})
})
},
gorollcallindex(e){
const {item} = e.currentTarget.dataset
wx.navigateTo({
url: `/business/pages/classservice/rollcalldetail?sid=${this.data.sid}&id=${item.id}&from=record`
})
}
})
\ No newline at end of file
{
"navigationBarTitleText": "上课记录",
"usingComponents": {
"empty-content": "../../../components/emptycontent",
"list-loading": "../../../components/listloading"
}
}
\ No newline at end of file
<!--business/pages/classservice/rollcall .wxml-->
<view class="container">
<view class="content-box" hover-class="none" hover-stop-propagation="false">
<view class="content-item" hover-class="none" hover-stop-propagation="false" wx:for="{{rollcallList}}" wx:key="{{key}}" data-item="{{item}}" bindtap="gorollcallindex">
<view class="top-box" hover-class="none" hover-stop-propagation="false">
<view class="time" hover-class="none" hover-stop-propagation="false">{{item.start_time}}-{{item.end_time}}</view>
<!-- <view class="status {{item.call_time?'done-status':''}}" hover-class="none" hover-stop-propagation="false">{{item.call_time?'已点名':'未点名'}}</view> -->
</view>
<view class="info-box" hover-class="none" hover-stop-propagation="false">
<view class="info-item" hover-class="none" hover-stop-propagation="false">
<image class="icon" src="{{localImageRoot}}/2b/classservice/class.png?{{imageVersion}}"></image>
<view class="text" hover-class="none" hover-stop-propagation="false">{{item.class.title}}</view>
</view>
<view class="info-item" hover-class="none" hover-stop-propagation="false">
<image class="icon" src="{{localImageRoot}}/2b/classservice/map.png?{{imageVersion}}"></image>
<view class="text" hover-class="none" hover-stop-propagation="false">{{item.class.title}}</view>
</view>
<view class="info-item" hover-class="none" hover-stop-propagation="false">
<image class="icon" src="{{localImageRoot}}/2b/classservice/adress.png?{{imageVersion}}"></image>
<view class="text" hover-class="none" hover-stop-propagation="false">海创科技中心校区余杭塘路北校区</view>
</view>
</view>
</view>
<list-loading loading="{{listLoading}}"></list-loading>
<view class="empty-content-box" wx:if="{{emptyPage}}">
<empty-content text="暂无数据"></empty-content>
</view>
</view>
</view>
/* business/pages/classservice/rollcall .wxss */
.container{
background:rgba(243,244,246,1);
min-height: 100vh;
overflow: hidden;
}
.content-box{
padding: 0 24rpx;
background:rgba(243,244,246,1);
padding-top: 30rpx;
}
.content-box .content-item{
background:rgba(255,255,255,1);
border-radius:20rpx;
margin-bottom: 30rpx;
padding-bottom: 40rpx;
}
.content-box .content-item .top-box{
display: flex;
height: 98rpx;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid rgba(0,0,0,.05);
padding: 0 24rpx;
}
.content-box .content-item .top-box .time{
font-size:30rpx;
font-family:PingFang-SC-Bold;
font-weight:bold;
color:rgba(84,84,84,1);
line-height:1;
}
.content-box .content-item .top-box .status{
width:102rpx;
height:40rpx;
background:rgba(255,107,107,.15);
border-radius:6rpx;
font-size:24rpx;
font-family:PingFang-SC-Regular;
font-weight:400;
color:rgba(255,76,76,1);
line-height:40rpx;
text-align: center;
}
.content-box .content-item .top-box .done-status{
width:102rpx;
height:40rpx;
background:rgba(255,107,107,.15);
border-radius:6rpx;
font-size:24rpx;
font-family:PingFang-SC-Regular;
font-weight:400;
color:rgba(255,76,76,1);
line-height:40rpx;
text-align: center;
}
.content-box .content-item .info-box{
}
.content-box .content-item .info-box .info-item{
padding: 32rpx 24rpx 0 24rpx;
display: flex;
align-items: center;
}
.content-box .content-item .info-box .info-item .icon{
width: 27rpx;
height: 27rpx;
}
.content-box .content-item .info-box .info-item .text{
font-size:28rpx;
font-family:PingFang-SC-Regular;
font-weight:400;
color:rgba(0,0,0,1);
line-height: 1;
padding-left: 35rpx;
}
\ No newline at end of file
......@@ -32,11 +32,13 @@ Page({
onLoad: function (options) {
const {
sid,
id
id,
from
} = options;
this.setData({
sid,
id
id,
from:from||''
})
this.schedulesDetailGet();
},
......@@ -117,17 +119,19 @@ Page({
this.setData({
schedulesDetail: data
})
this.callsListGet(data.class_id);
this.callsListGet(data.class_id,data.course_id);
this.erpClassDetailGet(data.class_id);
}).catch((res) => {
})
},
callsListGet(class_id) {
callsListGet(class_id,course_id) {
callsListGet({
school_id: this.data.sid,
class_id: class_id,
extra: 'time'
extra: 'time',
course_id:course_id,
schedule_id:this.data.id
}).then((res) => {
const {
code,
......@@ -170,9 +174,16 @@ Page({
})
},
addTheme() {
this.setData({
modalshow: true
})
const {from} = this.data
if(from&&from=="record"){
wx.navigateTo({
url: `/business/pages/classservice/rollcallindex?sid=${this.data.sid}&id=${this.data.schedulesDetail.id}&from=rollcalldetail`
})
}else{
this.setData({
modalshow: true
})
}
},
hidemodal() {
this.setData({
......
......@@ -23,7 +23,7 @@
</view>
</view>
<view class="footer-btn" hover-class="none" hover-stop-propagation="false" bindtap="addTheme">布置作业</view>
<view class="footer-btn" hover-class="none" hover-stop-propagation="false" bindtap="addTheme">{{from&&from=='record'?'编辑点名':'布置作业'}}</view>
</view>
<view class="themetypeselectmodal {{modelHideClass ? 'hide' : ''}}" hidden="{{!modalshow}}">
......
......@@ -3,6 +3,7 @@
import {
callsListPOST,
schedulesDetailGet,
callsListGet
} from '../../../service/business/classservice.js'
import {
studentsListGet
......@@ -46,11 +47,13 @@ Page({
onLoad: function (options) {
const {
sid,
id
id,
from
} = options;
this.setData({
sid,
id
id,
from:from || ''
})
this.schedulesDetailGet();
},
......@@ -168,7 +171,7 @@ Page({
this.getCountData()
})
},
callsListGet(class_id) {
studentsListGet(class_id) {
studentsListGet({
school_id: this.data.sid,
class_id: class_id,
......@@ -193,6 +196,37 @@ Page({
})
},
callsListGet(class_id,course_id) {
callsListGet({
school_id: this.data.sid,
class_id: class_id,
extra: 'time',
course_id:course_id
}).then((res) => {
const {
code,
data
} = res;
if (code == 200) {
data.list.forEach(element => {
element.statusType = element.type;
element.punishCount = this.data.classHour - element.expend;
element.name = element.formal_school_student.name;
element.total = element.student_course.total;
element.expend = element.student_course.expend;
element.id = element.formal_school_student.id;
});
this.setData({
callsList: data.list,
},()=>{
})
}
}).catch((res) => {
this.getCountData()
})
},
schedulesDetailGet() {
schedulesDetailGet({
id: this.data.id,
......@@ -221,8 +255,16 @@ Page({
this.setData({
schedulesDetail: data
})
this.callsListGet(data.class_id);
if(this.data.from&&this.data.from=="rollcalldetail"){
this.callsListGet(data.class_id,data.course_id);
this.setData({
classHour:data.expend
})
}else{
this.studentsListGet(data.class_id);
}
this.erpClassDetailGet(data.class_id);
}).catch((res) => {
})
......@@ -282,10 +324,17 @@ Page({
}).then((res)=>{
const {data,code} = res;
if(code == 200){
this.setData({
classDetail:data,
classHour:data.expend
})
if(!this.data.from){
this.setData({
classDetail:data,
classHour:data.expend
})
}else{
this.setData({
classDetail:data,
})
}
}
}).catch((res) => {
......@@ -303,7 +352,11 @@ Page({
})
const {schedulesDetail,id,sid,classHour,callsList} = this.data;
let call_students = callsList.map((item)=>{
return item.id+','+item.statusType+','+1+','+classHour+','+''
let count = classHour;
if(item.punishCount&&(item.statusType==3 || item.statusType==4)){
count+=item.punishCount
}
return item.id+','+item.statusType+','+1+','+count+','+''
}).join(';');
callsListPOST({
type:1,
......
......@@ -32,7 +32,7 @@ Page({
my = dakarole ==2? 1:'';
this.setData({
sid,
my: my
my: 1
})
this.getBetweenDateStr();
this.schedulesGet()
......
......@@ -27,7 +27,7 @@ Page({
localImageRoot: "../../../images",
submiting: false,
sid: 0,
my: '',
my: 1,
schoolShow: false,
schoolList:[],
schoolTotal:0,
......@@ -47,7 +47,7 @@ Page({
my = dakarole ==2? 1:'';
this.setData({
sid,
my: my
my: 1
})
this.getschoolList()
},
......@@ -128,6 +128,11 @@ Page({
url: `/business/pages/todotasks/index?sid=${this.data.sid}`
})
},
goRecord(){
wx.navigateTo({
url: `/business/pages/classservice/record?sid=${this.data.sid}&my=${this.data.my}`,
})
},
selectSchool () {
this.setData({
schoolShow: !this.data.schoolShow
......
......@@ -62,10 +62,16 @@
</view>
<view class="nav-item" hover-class="none" hover-stop-propagation="false" bindtap="goPointsMgt">
<view class="icon" hover-class="none" hover-stop-propagation="false">
<image class="" src="{{localImageRoot}}/2b/classservice/record.png?{{imageVersion}}"></image>
<image class="" src="{{localImageRoot}}/2b/classservice/data.png?{{imageVersion}}"></image>
</view>
<view class="text" hover-class="none" hover-stop-propagation="false">积分管理</view>
</view>
<view class="nav-item" hover-class="none" hover-stop-propagation="false" bindtap="goRecord">
<view class="icon" hover-class="none" hover-stop-propagation="false">
<image class="" src="{{localImageRoot}}/2b/classservice/record.png?{{imageVersion}}"></image>
</view>
<view class="text" hover-class="none" hover-stop-propagation="false">上课记录</view>
</view>
</view>
</view>
<view class="footer-btn" hover-class="none" hover-stop-propagation="false" bindtap="gorollcalllist">我要点名</view>
......
......@@ -36,12 +36,9 @@ Page({
*/
onLoad: function (options) {
const {sid} = options;
let my=''
let dakarole = LocalStorage.getItem('dakarole');
my = dakarole ==2? 1:'';
this.setData({
sid,
my: my
my: 1
})
this.schedulesGet()
},
......@@ -96,7 +93,7 @@ Page({
},
schedulesGet(){
let now = new Date();
let start = new Date(now.getTime()-7*24*3600)
let start = new Date(now.getTime()-7*24*3600*1000)
schedulesGet({
my: this.data.my,
start_time:formatDate(start),
......
......@@ -70,108 +70,108 @@ Page({
}
this.data.ringChart[1] = new wxCharts({
animation: true,
canvasId: 'ringCanvas1',
type: 'ring',
extra: {
ringWidth: 14,
pie: {
// this.data.ringChart[1] = new wxCharts({
// animation: true,
// canvasId: 'ringCanvas1',
// type: 'ring',
// extra: {
// ringWidth: 14,
// pie: {
}
},
title: {
name: `${(count1/allcount)*100}%`,
color: '#000000',
fontSize: 12
},
series: [{
name: '成交量1',
data: count1,
stroke: false,
color: '#FFB97A',
}, {
name: '成交量2',
data: allcount - count1,
stroke: false,
color: '#FFEBD9',
}],
disablePieStroke: true,
width: 140,
height: 140,
dataLabel: false,
legend: false,
background: '#f5f5f5',
padding: 0
});
ringChart2 = new wxCharts({
animation: true,
canvasId: 'ringCanvas2',
type: 'ring',
extra: {
ringWidth: 14,
pie: {
// }
// },
// title: {
// name: `${(count1/allcount)*100}%`,
// color: '#000000',
// fontSize: 12
// },
// series: [{
// name: '成交量1',
// data: count1,
// stroke: false,
// color: '#FFB97A',
// }, {
// name: '成交量2',
// data: allcount - count1,
// stroke: false,
// color: '#FFEBD9',
// }],
// disablePieStroke: true,
// width: 140,
// height: 140,
// dataLabel: false,
// legend: false,
// background: '#f5f5f5',
// padding: 0
// });
// ringChart2 = new wxCharts({
// animation: true,
// canvasId: 'ringCanvas2',
// type: 'ring',
// extra: {
// ringWidth: 14,
// pie: {
}
},
title: {
name: `${(count2/allcount)*100}%`,
color: '#000000',
fontSize: 12
},
series: [{
name: '成交量2',
data: count2,
stroke: false,
color: '#FFB97A',
}, {
name: '成交量2',
data: allcount - count2,
stroke: false,
color: '#FFEBD9',
}],
disablePieStroke: true,
width: 140,
height: 140,
dataLabel: false,
legend: false,
background: '#f5f5f5',
padding: 0
});
ringChart3 = new wxCharts({
animation: true,
canvasId: 'ringCanvas3',
type: 'ring',
extra: {
ringWidth: 14,
pie: {
// }
// },
// title: {
// name: `${(count2/allcount)*100}%`,
// color: '#000000',
// fontSize: 12
// },
// series: [{
// name: '成交量2',
// data: count2,
// stroke: false,
// color: '#FFB97A',
// }, {
// name: '成交量2',
// data: allcount - count2,
// stroke: false,
// color: '#FFEBD9',
// }],
// disablePieStroke: true,
// width: 140,
// height: 140,
// dataLabel: false,
// legend: false,
// background: '#f5f5f5',
// padding: 0
// });
// ringChart3 = new wxCharts({
// animation: true,
// canvasId: 'ringCanvas3',
// type: 'ring',
// extra: {
// ringWidth: 14,
// pie: {
}
},
title: {
name: `${(count3/allcount)*100}%`,
color: '#000000',
fontSize: 12
},
series: [{
name: '成交量2',
data: count3,
stroke: false,
color: '#FFB97A',
}, {
name: '成交量2',
data: allcount - count3,
stroke: false,
color: '#FFEBD9',
}],
disablePieStroke: true,
width: 140,
height: 140,
dataLabel: false,
legend: false,
background: '#ffffff',
padding: 0
});
// }
// },
// title: {
// name: `${(count3/allcount)*100}%`,
// color: '#000000',
// fontSize: 12
// },
// series: [{
// name: '成交量2',
// data: count3,
// stroke: false,
// color: '#FFB97A',
// }, {
// name: '成交量2',
// data: allcount - count3,
// stroke: false,
// color: '#FFEBD9',
// }],
// disablePieStroke: true,
// width: 140,
// height: 140,
// dataLabel: false,
// legend: false,
// background: '#ffffff',
// padding: 0
// });
},
/**
......@@ -303,6 +303,9 @@ Page({
const {code, data} = res;
if(code == 200){
console.log(data,'data')
this.setData({
classCours:data.list
})
data.list.forEach((ele,index) => {
this.initRingChart(ele,index+1)
});
......
......@@ -28,26 +28,26 @@
<text class="small" selectable="false" space="false" decode="false">(近6个月)</text>
</view>
<view class="chart-box" hover-class="none" hover-stop-propagation="false">
<view class="chart-item" hover-class="none" hover-stop-propagation="false">
<view class="chart-item" hover-class="none" hover-stop-propagation="false" wx:if="{{classCours[0]}}">
<view class="canvas-box" hover-class="none" hover-stop-propagation="false">
<canvas canvas-id="ringCanvas1" class="ringcanvas"></canvas>
</view>
<view class="name" hover-class="none" hover-stop-propagation="false">钢琴初级</view>
<view class="count" hover-class="none" hover-stop-propagation="false">125课时</view>
<view class="name" hover-class="none" hover-stop-propagation="false">{{classCours[0].title}}</view>
<view class="count" hover-class="none" hover-stop-propagation="false">{{classCours[0].course_time}}课时</view>
</view>
<view class="chart-item" hover-class="none" hover-stop-propagation="false">
<view class="chart-item" hover-class="none" hover-stop-propagation="false" wx:if="{{classCours[1]}}">
<view class="canvas-box" hover-class="none" hover-stop-propagation="false">
<canvas canvas-id="ringCanvas2" class="ringcanvas"></canvas>
</view>
<view class="name" hover-class="none" hover-stop-propagation="false">钢琴初级</view>
<view class="count" hover-class="none" hover-stop-propagation="false">125课时</view>
<view class="name" hover-class="none" hover-stop-propagation="false">{{classCours[1].title}}</view>
<view class="count" hover-class="none" hover-stop-propagation="false">{{classCours[1].course_time}}课时</view>
</view>
<view class="chart-item" hover-class="none" hover-stop-propagation="false">
<view class="chart-item" hover-class="none" hover-stop-propagation="false" wx:if="{{classCours[2]}}">
<view class="canvas-box" hover-class="none" hover-stop-propagation="false">
<canvas canvas-id="ringCanvas3" class="ringcanvas"></canvas>
</view>
<view class="name" hover-class="none" hover-stop-propagation="false">钢琴初级</view>
<view class="count" hover-class="none" hover-stop-propagation="false">125课时</view>
<view class="name" hover-class="none" hover-stop-propagation="false">{{classCours[2].title}}</view>
<view class="count" hover-class="none" hover-stop-propagation="false">{{classCours[2].course_time}}课时</view>
</view>
</view>
</view>
......
......@@ -165,6 +165,7 @@ Page({
if (_recordTabIndex === index) {
return
}
console.log(_studentcalls,'_studentcalls')
this.setData({
recordTabIndex: index,
actStudentcalls:_studentcalls[index+1]
......@@ -173,7 +174,8 @@ Page({
studentInfoGet() {
studentDetailGet({
id: this.data.studentId,
extra: 'honors'
extra: 'honors',
school_id: this.data.sid
}).then((res) => {
const {
data,
......@@ -198,7 +200,8 @@ Page({
studentclassesGet({
student_id: this.data.studentId,
extra: 'course',
type: this.data.coursetabsIndex == 0 ? 1 : 2
type: this.data.coursetabsIndex == 0 ? 1 : 2,
school_id: this.data.sid
}).then((res) => {
const {
data,
......@@ -217,6 +220,7 @@ Page({
studentcallsGet() {
studentcallsGet({
student_id: this.data.studentId,
school_id: this.data.sid
}).then((res) => {
const {
data,
......@@ -246,7 +250,6 @@ Page({
break;
}
})
console.log(_studentcalls[1],'_studentcalls[1]')
this.setData({
studentcalls: _studentcalls,
actStudentcalls: _studentcalls[1]
......@@ -305,7 +308,13 @@ Page({
},
clockListGet(type) {
const that = this;
const visitor = LocalStorage.getItem('visitor');
const consumer_id = this.data.studentInfo.consumer_id;
if(!consumer_id){
this.setData({
emptyClockPage:true
})
return;
}
if (!this.data.clockhasmore) {
return;
}
......@@ -316,7 +325,7 @@ Page({
clockListLoading: true
})
clockList({
now_consumer_id: visitor && visitor.id,
now_consumer_id: consumer_id,
page: this.data.page,
perPage: this.data.perPage,
school_id: this.data.sid,
......
......@@ -121,7 +121,7 @@
</view>
</view>
<view class="class-box" hover-class="none" hover-stop-propagation="false">
<view class="class-item" hover-class="none" hover-stop-propagation="false" wx:for="{{item.classes}}">
<view class="class-item" hover-class="none" hover-stop-propagation="false" wx:for="{{item.classes}}" wx:key="{{index}}">
<view class="blue-line" hover-class="none" hover-stop-propagation="false"></view>
<view class="class-name" hover-class="none" hover-stop-propagation="false">{{item.title}}</view>
<view class="btn" hover-class="none" hover-stop-propagation="false" bindtap="handeloperate">操作</view>
......@@ -152,28 +152,28 @@
<view class="icon {{recordTabIndex==1?'act-icon':''}}" hover-class="none" hover-stop-propagation="false">
<view class="inner-icon" hover-class="none" hover-stop-propagation="false" wx:if="{{recordTabIndex==1}}"></view>
</view>
<view class="name" hover-class="none" hover-stop-propagation="false">请假:</view>
<view class="num" hover-class="none" hover-stop-propagation="false">{{studentcalls[3].length}}</view>
<view class="name" hover-class="none" hover-stop-propagation="false">迟到:</view>
<view class="num" hover-class="none" hover-stop-propagation="false">{{studentcalls[2].length}}</view>
</view>
<view class="tabs-item" hover-class="none" hover-stop-propagation="false" bindtap="recordTabsChange" data-index="{{2}}">
<view class="icon {{recordTabIndex==2?'act-icon':''}}" hover-class="none" hover-stop-propagation="false">
<view class="inner-icon" hover-class="none" hover-stop-propagation="false" wx:if="{{recordTabIndex==2}}"></view>
</view>
<view class="name" hover-class="none" hover-stop-propagation="false">未到:</view>
<view class="num" hover-class="none" hover-stop-propagation="false">{{studentcalls[4].length}}</view>
<view class="name" hover-class="none" hover-stop-propagation="false">请假:</view>
<view class="num" hover-class="none" hover-stop-propagation="false">{{studentcalls[3].length}}</view>
</view>
<view class="tabs-item" hover-class="none" hover-stop-propagation="false" style="margin-right: 0" bindtap="recordTabsChange" data-index="{{3}}">
<view class="icon {{recordTabIndex==3?'act-icon':''}}" hover-class="none" hover-stop-propagation="false">
<view class="inner-icon" hover-class="none" hover-stop-propagation="false" wx:if="{{recordTabIndex==3}}"></view>
</view>
<view class="name" hover-class="none" hover-stop-propagation="false">到:</view>
<view class="num" hover-class="none" hover-stop-propagation="false">{{studentcalls[2].length}}</view>
<view class="name" hover-class="none" hover-stop-propagation="false">到:</view>
<view class="num" hover-class="none" hover-stop-propagation="false">{{studentcalls[4].length}}</view>
</view>
</view>
<view class="content" hover-class="none" hover-stop-propagation="false">
<view class="commonlist-bigwrap" wx:if="{{actStudentcalls&&actStudentcalls.length>0}}">
<block class="commonlist-partwrap" wx:for="{{actStudentcalls}}" wx:key="{{index}}">
<view class="commonlist-header">{{item.month}}月</view>
<view class="commonlist-header" wx:if="{{filter.monthIsShow(item.month)}}">{{item.month}}月</view>
<view class="commonlist-box">
<view class="commonlist-item">
<view class="item-titlebox">
......
var months=[];
function formatDate (date) {
var time = getDate(date * 1000);
var y = time.getFullYear();
......@@ -276,6 +278,13 @@ function matchTime(time,type){
}
}
function monthIsShow(month){
if(months.indexOf(month)>-1){
return false;
}
months.push(month);
return true;
}
module.exports = {
formatDate: formatDate,
timeCompare: timeCompare,
......@@ -298,5 +307,6 @@ module.exports = {
courseFilter: courseFilter,
checkSelect: checkSelect,
courseColor: courseColor,
matchTime: matchTime
matchTime: matchTime,
monthIsShow:monthIsShow
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment