Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
K
Kindergarten
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张杰
Kindergarten
Commits
ea75c4da
Commit
ea75c4da
authored
Dec 29, 2018
by
张杰
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://dev.gomoretech.com/gitlab/zhangjie/kindergarten
parents
3ee6f818
3fdca63e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
156 additions
and
51 deletions
+156
-51
teacher.js
api/teacher.js
+16
-2
index.js
pages/home/reviewer/index.js
+1
-1
index.js
pages/review_student/index.js
+100
-9
index.wxml
pages/review_student/index.wxml
+39
-39
No files found.
api/teacher.js
View file @
ea75c4da
...
@@ -26,14 +26,28 @@ module.exports = {
...
@@ -26,14 +26,28 @@ module.exports = {
}
}
return
request
.
post
(
'/preschool/wxsite/teacher/signin.do'
,
params
)
return
request
.
post
(
'/preschool/wxsite/teacher/signin.do'
,
params
)
},
},
//根据签到表Id获取记录明细
getRecordDetailForSignId
(
signSummaryId
)
{
var
params
=
{
signSummaryId
:
signSummaryId
}
return
request
.
get
(
'/preschool/wxsite/teacher/getRecordDetailForSignId.do'
,
params
)
},
//根据记录类型查询记录流水, 在记录的时候是否需要先查询下当天的之前的记录
queryRecordList
(
recordCategory
,
recordType
,
signSummaryIds
)
{
queryRecordList
(
recordCategory
,
recordType
,
signSummaryIds
)
{
var
params
=
{
var
params
=
{
recordCategory
:
recordCategory
,
recordCategory
:
recordCategory
,
recordType
:
recordType
,
recordType
:
recordType
,
signSummaryIds
:
signSummaryIds
signSummaryIds
:
signSummaryIds
}
}
return
request
.
post
(
'/preschool/wxsite/teacher/queryRecordList.do'
,
params
)
return
request
.
post
(
'/preschool/wxsite/teacher/queryRecordList.do'
,
params
)
}
}
,
//审核签到汇总表
auditSignSummary
(
signSummaryId
)
{
return
request
.
post
(
'/preschool/wxsite/teacher/auditSignSummary.do?signSummaryId='
+
signSummaryId
)
},
}
}
\ No newline at end of file
pages/home/reviewer/index.js
View file @
ea75c4da
...
@@ -49,7 +49,7 @@ Page({
...
@@ -49,7 +49,7 @@ Page({
tapStudent
:
function
(
e
)
{
tapStudent
:
function
(
e
)
{
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
'/pages/review_student/index
'
,
url
:
'/pages/review_student/index
?signSummaryId='
+
e
.
currentTarget
.
id
})
})
},
},
...
...
pages/review_student/index.js
View file @
ea75c4da
// pages/review_student/index.js
// pages/review_student/index.js
const
request
=
require
(
'../../api/teacher.js'
)
Page
({
Page
({
/**
/**
* 页面的初始数据
* 页面的初始数据
*/
*/
data
:
{
data
:
{
signSummaryId
:
""
,
recordDetail
:
{},
recordTypes
:
{
"diet_morning"
:
'早餐'
,
"diet_afternoon"
:
"午餐"
,
"diet_milk"
:
"牛奶"
,
"diet_evening"
:
"晚餐"
,
"diet_morning_more"
:
"上午加餐"
,
"diet_afternoon_more"
:
"下午加餐"
,
"diet_water"
:
"喝水"
,
"diet_milk"
:
"饮用牛奶"
,
"sleep_time"
:
"睡觉时间"
,
"wc_pee"
:
"小便"
,
"wc_poo"
:
"便"
,
"wc_diaper"
:
"换尿布"
},
eatStates
:
{
"less"
:
"少"
,
"normal"
:
"正常"
,
"more"
:
"多"
}
},
//加载详情
getRecordDetailForSignId
:
function
()
{
request
.
getRecordDetailForSignId
(
this
.
data
.
signSummaryId
).
then
(
res
=>
{
if
(
res
)
{
var
dateStr
=
res
.
recordDate
.
substr
(
0
,
10
)
let
show_day
=
new
Array
(
'周日'
,
'周一'
,
'周二'
,
'周三'
,
'周四'
,
'周五'
,
'周六'
);
let
date
=
new
Date
(
dateStr
);
var
num
=
date
.
getDay
()
res
.
recordDate
=
dateStr
+
" "
+
show_day
[
date
.
getDay
()]
// 饮食
var
dietRecords
=
res
[
'dietRecord'
]
for
(
var
j
=
0
;
j
<
dietRecords
.
length
;
j
++
)
{
var
diet
=
dietRecords
[
j
]
diet
.
z_recordType
=
this
.
data
.
recordTypes
[
diet
.
recordType
]
diet
.
z_eatState
=
this
.
data
.
eatStates
[
diet
.
eatState
]
}
// 睡觉
var
sleepRecord
=
res
.
sleepRecord
for
(
var
j
=
0
;
j
<
sleepRecord
.
length
;
j
++
)
{
var
r
=
sleepRecord
[
j
]
r
.
z_recordType
=
this
.
data
.
recordTypes
[
r
.
recordType
]
}
// wc
var
wcRecord
=
res
.
wcRecord
for
(
var
j
=
0
;
j
<
wcRecord
.
length
;
j
++
)
{
var
r
=
wcRecord
[
j
]
r
.
z_recordType
=
this
.
data
.
recordTypes
[
r
.
recordType
]
}
this
.
setData
({
recordDetail
:
res
,
})
}
}).
catch
(
err
=>
{
wx
.
showToast
({
title
:
err
.
message
,
icon
:
'none'
,
duration
:
2000
})
})
},
auditSignSummary
:
function
(
signSummaryId
){
console
.
log
(
signSummaryId
)
request
.
auditSignSummary
(
signSummaryId
).
then
(
res
=>
{
wx
.
showToast
({
title
:
'审核成功!'
,
icon
:
'none'
,
duration
:
2000
})
}).
catch
(
err
=>
{
wx
.
showToast
({
title
:
err
.
message
,
icon
:
'none'
,
duration
:
2000
})
})
},
operateTap
:
function
(
e
)
{
this
.
auditSignSummary
(
this
.
data
.
signSummaryId
)
},
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
this
.
data
.
signSummaryId
=
options
.
signSummaryId
;
this
.
getRecordDetailForSignId
()
},
},
/**
/**
* 生命周期函数--监听页面初次渲染完成
* 生命周期函数--监听页面初次渲染完成
*/
*/
onReady
:
function
()
{
onReady
:
function
()
{
},
},
/**
/**
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
:
function
()
{
onShow
:
function
()
{
},
},
/**
/**
* 生命周期函数--监听页面隐藏
* 生命周期函数--监听页面隐藏
*/
*/
onHide
:
function
()
{
onHide
:
function
()
{
},
},
/**
/**
* 生命周期函数--监听页面卸载
* 生命周期函数--监听页面卸载
*/
*/
onUnload
:
function
()
{
onUnload
:
function
()
{
},
},
/**
/**
* 页面相关事件处理函数--监听用户下拉动作
* 页面相关事件处理函数--监听用户下拉动作
*/
*/
onPullDownRefresh
:
function
()
{
onPullDownRefresh
:
function
()
{
},
},
/**
/**
* 页面上拉触底事件的处理函数
* 页面上拉触底事件的处理函数
*/
*/
onReachBottom
:
function
()
{
onReachBottom
:
function
()
{
},
},
/**
/**
* 用户点击右上角分享
* 用户点击右上角分享
*/
*/
onShareAppMessage
:
function
()
{
onShareAppMessage
:
function
()
{
}
}
})
})
\ No newline at end of file
pages/review_student/index.wxml
View file @
ea75c4da
...
@@ -3,60 +3,60 @@
...
@@ -3,60 +3,60 @@
<view class='kg-separater' style='height:2rpx;'></view>
<view class='kg-separater' style='height:2rpx;'></view>
<view class='kg-home-header kg-flex-row'>
<view class='kg-home-header kg-flex-row'>
<template is='userInfo' data="{{userImg:'/src/img/defaut_teacher_icon.png',title:'
张小华',subTitle:'向日葵小班
',sex:'m'}}"></template>
<template is='userInfo' data="{{userImg:'/src/img/defaut_teacher_icon.png',title:'
审核老师',subTitle:'向日葵幼儿园
',sex:'m'}}"></template>
<view></view>
<view></view>
</view>
</view>
<view class='kg-separater'></view>
<view class='kg-separater'></view>
<scroll-view style='height:calc(100vh - 200rpx - 140rpx)' scroll-y='true'>
<scroll-view style='height:calc(100vh - 200rpx - 140rpx)' scroll-y='true'>
<view class='kg-quantity-cell timeline-content' style='margin-left:20rpx;margin-bottom:30rpx;'>
<view class='kg-quantity-cell timeline-content' style='margin-left:20rpx;margin-bottom:30rpx;'>
<view class='kg-flex-row' style='margin-bottom:20rpx;'>
<view class='kg-flex-row' style='margin-bottom:20rpx;'>
<text class='kg-text-title'>2018-09-11 星期二</text>
<text class='kg-text-title'>{{recordDetail.recordDate}}</text>
<text class='kg-text-normal-gray'>王xx老师记录</text>
<text class='kg-text-normal-gray'>{{recordDetail.teacher ? recordDetail.teacher.name : ""}}记录</text>
</view>
</view>
<template is='imgTextView' data="{{img:'eat',text:'饮食'}}"> </template>
<view class='kg-flex-row timeline-content-detail'>
<!-- 饮食 -->
<text class='kg-text-normal-gray'>早餐</text>
<view wx:for="{{recordDetail.dietRecord}}" wx:for-item="dietItem" wx:for-index="dietIndex">
<text class='kg-text-normal-gray'>正常</text>
<view wx:if="{{dietIndex == 0}}">
</view>
<template is='imgTextView' data="{{img:'eat',text:'饮食'}}"> </template>
<view class='kg-flex-row timeline-content-detail'>
<text class='kg-text-normal-gray'>早餐</text>
<text class='kg-text-normal-gray'>正常</text>
</view>
</view>
<view class='kg-flex-row timeline-content-detail'>
<view class='kg-flex-row timeline-content-detail'>
<text class='kg-text-normal-gray'>
早餐
</text>
<text class='kg-text-normal-gray'>
{{dietItem.z_recordType}}
</text>
<text class='kg-text-normal-gray'>
正常
</text>
<text class='kg-text-normal-gray'>
{{dietItem.z_eatState}}
</text>
</view>
</view>
<view class='kg-separater' style='height:2rpx;margin-left:100rpx;margin-right:0rpx;'></view>
</view>
<!-- 睡觉 -->
<template is='imgTextView' data="{{img:'sleep',text:'睡觉'}}"> </template>
<!-- 睡觉 -->
<view class='kg-flex-row timeline-content-detail'>
<view wx:for="{{recordDetail.sleepRecord}}" wx:for-item="sleepItem" wx:for-index="sleepIndex">
<text class='kg-text-normal-gray'>午睡</text>
<view wx:if="{{sleepIndex == 0}}">
<text class='kg-text-normal-gray'>50分钟</text>
<view class='kg-separater' style='height:2rpx;margin-left:80rpx;margin-right:0rpx;'></view>
<template is='imgTextView' data="{{img:'sleep',text:'睡觉'}}"> </template>
</view>
</view>
<view class='kg-separater' style='height:2rpx;margin-left:100rpx;margin-right:0rpx;'></view>
<!-- wc -->
<template is='imgTextView' data="{{img:'wc',text:'WC'}}"> </template>
<view class='kg-flex-row timeline-content-detail'>
<view class='kg-flex-row timeline-content-detail'>
<text class='kg-text-normal-gray'>
pee
</text>
<text class='kg-text-normal-gray'>
{{sleepItem.z_recordType}}
</text>
<text class='kg-text-normal-gray'>
4次
</text>
<text class='kg-text-normal-gray'>
{{sleepItem.value}}分钟
</text>
</view>
</view>
<view class='kg-flex-row timeline-content-detail'>
</view>
<text class='kg-text-normal-gray'>poo</text>
<text class='kg-text-normal-gray'>4次</text>
<!-- wc -->
<view wx:for="{{recordDetail.wcRecord}}" wx:for-item="wcItem" wx:for-index="wcIndex">
<view wx:if="{{wcIndex == 0}}">
<view class='kg-separater' style='height:2rpx;margin-left:80rpx;margin-right:0rpx;'></view>
<template is='imgTextView' data="{{img:'wc',text:'WC'}}"> </template>
</view>
</view>
<view class='kg-flex-row timeline-content-detail'>
<view class='kg-flex-row timeline-content-detail'>
<text class='kg-text-normal-gray'>diaper</text>
<text class='kg-text-normal-gray'>{{wcItem.z_recordType}}</text>
<text class='kg-text-normal-gray'>4次</text>
<text class='kg-text-normal-gray'>{{wcItem.value}}次</text>
</view>
<view class='kg-separater' style='height:2rpx;margin-left:100rpx;margin-right:0rpx;'></view>
<!-- 今日照片 -->
<template is='imgTextView' data="{{img:'today',text:'今日照片'}}"> </template>
<view class='home-student-picture-item' style='margin-left:40rpx;'>
<image src='/src/img/student_picture.png' class='home-student-picture' mode='aspectFill'></image>
<image src='/src/img/student_picture.png' class='home-student-picture' mode='aspectFill'></image>
<image src='/src/img/student_picture.png' class='home-student-picture' mode='aspectFill'></image>
</view>
</view>
</view>
</view>
<!-- 今日照片 -->
<template is='imgTextView' data="{{img:'today',text:'今日照片'}}"> </template>
<view class='home-student-picture-item' style='margin-left:40rpx;'>
<image src='/src/img/student_picture.png' class='home-student-picture' mode='aspectFill'></image>
<image src='/src/img/student_picture.png' class='home-student-picture' mode='aspectFill'></image>
<image src='/src/img/student_picture.png' class='home-student-picture' mode='aspectFill'></image>
</view>
</view>
</scroll-view>
</scroll-view>
<template is="operate_btn" data="{{title:'通过'}}"></template>
<template is="operate_btn" data="{{title:'通过'}}"></template>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment