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
5620a6f3
Commit
5620a6f3
authored
Jan 28, 2019
by
张杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化
parent
51a7791d
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
104 additions
and
50 deletions
+104
-50
teacher.js
api/teacher.js
+5
-0
app.js
app.js
+1
-1
app.wxss
app.wxss
+1
-1
index.js
pages/add_record/index.js
+10
-1
index.wxml
pages/add_record/index.wxml
+8
-6
index.wxss
pages/add_record/index.wxss
+3
-3
index.wxml
pages/home/parents/index.wxml
+13
-13
index.js
pages/home/sign/index.js
+5
-1
index.wxml
pages/home/sign/index.wxml
+1
-1
index.js
pages/review_student/index.js
+30
-10
index.wxml
pages/review_student/index.wxml
+18
-11
index.wxss
pages/review_student/index.wxss
+8
-1
index.wxml
template/operate_btn/index.wxml
+1
-1
No files found.
api/teacher.js
View file @
5620a6f3
...
...
@@ -58,6 +58,11 @@ module.exports = {
auditSignSummary
(
signSummaryId
)
{
return
request
.
post
(
'/wxsite/teacher/auditSignSummary.do?signSummaryId='
+
signSummaryId
)
},
// 重置单据状态到未审核状态
resetSignSummary
(
signSummaryId
)
{
return
request
.
get
(
'/wxsite/teacher/editRecord.do?signSummaryId='
+
signSummaryId
)
},
// 添加、修改记录明细
setRecord
(
signSummaryId
,
recordList
,
pictureIds
,
remark
,
picRemark
)
{
var
params
=
{
...
...
app.js
View file @
5620a6f3
...
...
@@ -45,7 +45,7 @@ App({
"diet_afternoon_more"
:
"下午加餐"
,
"diet_water"
:
"喝水"
,
"diet_milk"
:
"饮用牛奶"
,
"sleep_time"
:
"睡
觉
时间"
,
"sleep_time"
:
"睡
眠
时间"
,
"wc_pee"
:
"小便"
,
"wc_poo"
:
"大便"
,
"wc_diaper"
:
"尿不湿"
...
...
app.wxss
View file @
5620a6f3
...
...
@@ -41,7 +41,7 @@
bottom: 0rpx;
/* background-color: red; */
height: 136rpx;
width: 100v
h
;
width: 100v
w
;
display: flex;
align-items: center;
}
...
...
pages/add_record/index.js
View file @
5620a6f3
...
...
@@ -56,7 +56,8 @@ Page({
//学生备注
remark
:
''
,
//图片备注
picRemark
:
''
picRemark
:
''
,
isHideBtn
:
false
,
},
...
...
@@ -355,6 +356,13 @@ Page({
this
.
setData
({
wcRecord
:
res
})
}
if
(
this
.
data
.
studentIds
.
length
==
1
)
{
let
std
=
res
[
0
]
this
.
setData
({
isHideBtn
:
std
.
state
==
'finish'
})
}
})
...
...
@@ -486,6 +494,7 @@ Page({
signSummaryId
=
arrRecord
[
0
].
signSummaryId
remark
=
this
.
data
.
remark
picRemark
=
this
.
data
.
picRemark
}
...
...
pages/add_record/index.wxml
View file @
5620a6f3
...
...
@@ -11,7 +11,7 @@
<view class='kg-separater'></view>
<view hidden='{{controlIndex != 0}}'>
<!-- 滑动区域 -->
<scroll-view style='height:calc(100vh - 50px - 2rpx - 20rpx
- 140rpx
)' scroll-y='true'>
<scroll-view style='height:calc(100vh - 50px - 2rpx - 20rpx)' scroll-y='true'>
<template is="section_header" data="{{title:'分类',rightTitle:!hidePhoto ? '清除' : ''}}"></template>
<!-- 分类选项 -->
<view class="category">
...
...
@@ -36,7 +36,7 @@
<view wx:if="{{!hidePhoto}}">
<textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{remark}}' bindinput='remarkInput'></textarea>
<view class='kg-separater'></view>
<button class='img_title' open-type='getUserInfo'>
今日
拍照</button>
<button class='img_title' open-type='getUserInfo'>拍照</button>
<view class='kg-separater ' style='height:2rpx;'></view>
<view class='home-student-picture-item' style='padding-left:20rpx;padding-bottom:40rpx;'>
<!-- 选择的图片 -->
...
...
@@ -55,7 +55,7 @@
</view>
<textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{picRemark}}' bindinput='picRemarkInput'></textarea>
</view>
<view style='width:100vw;height:140rpx;'></view>
</scroll-view>
</view>
...
...
@@ -75,7 +75,7 @@
<view wx:if="{{!hidePhoto}}">
<textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{remark}}' bindinput='remarkInput'></textarea>
<view class='kg-separater'></view>
<button class='img_title' open-type='getUserInfo'>
今日
拍照</button>
<button class='img_title' open-type='getUserInfo'>拍照</button>
<view class='kg-separater ' style='height:2rpx;'></view>
<view class='home-student-picture-item' style='padding-left:20rpx;padding-bottom:40rpx;'>
<!-- 选择的图片 -->
...
...
@@ -94,6 +94,7 @@
</view>
<textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{picRemark}}' bindinput='picRemarkInput'></textarea>
</view>
<view style='width:100vw;height:140rpx;'></view>
</scroll-view>
</view>
...
...
@@ -134,7 +135,7 @@
<view wx:if="{{!hidePhoto}}">
<textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{remark}}' bindinput='remarkInput'></textarea>
<view class='kg-separater'></view>
<button class='img_title' open-type='getUserInfo'>
今日
拍照</button>
<button class='img_title' open-type='getUserInfo'>拍照</button>
<view class='kg-separater ' style='height:2rpx;'></view>
<view class='home-student-picture-item' style='padding-left:20rpx;padding-bottom:40rpx;'>
<!-- 选择的图片 -->
...
...
@@ -153,8 +154,9 @@
</view>
<textarea placeholder=' 请输入您要备注的信息...' class='add_remark' value='{{picRemark}}' bindinput='picRemarkInput'></textarea>
</view>
<view style='width:100vw;height:140rpx;'></view>
</scroll-view>
</view>
<template is="operate_btn" data="{{title:'保存'}}"></template>
\ No newline at end of file
<template wx:if="{{isHideBtn == false}}" is="operate_btn" data="{{title:'保存'}}"></template>
\ No newline at end of file
pages/add_record/index.wxss
View file @
5620a6f3
...
...
@@ -74,7 +74,7 @@
position: absolute;
left: 0rpx;
bottom: 0rpx;
width: calc(100vw / 2.
5
);
width: calc(100vw / 2.
3
);
height: calc(100vw / 2.5);
}
...
...
@@ -82,8 +82,8 @@
position: absolute;
/* background:#ccc; */
opacity: 1;
top: 0rpx;
right: 0rpx;
top:
-1
0rpx;
right:
-3
0rpx;
width: 60rpx;
height: 60rpx;
}
...
...
pages/home/parents/index.wxml
View file @
5620a6f3
...
...
@@ -27,17 +27,17 @@
<view class='kg-quantity-cell timeline-content'>
<view class='kg-flex-row'>
<text class='kg-text-title'>{{item.recordDate}}</text>
<text class='kg-text-light-gray'>
{{item.teacher ? item.teacher.name : ""}}记录
</text>
<text class='kg-text-light-gray'>
</text>
</view>
<!--
今日
照片 -->
<template is='imgTextView' data="{{img:'today',text:'
今日
照片'}}"> </template>
<!-- 照片 -->
<template is='imgTextView' data="{{img:'today',text:'照片'}}"> </template>
<view class='home-student-picture-item' style='margin-left:40rpx;'>
<view wx:for="{{item.arrPic}}" wx:for-item="picItem" wx:for-index="picIndex" wx:key="picItem">
<image src='{{picItem}}' class='home-student-picture' catchtap='previewPic' data-index='{{index}}' data-picIndex='{{picIndex}}' mode='aspectFill'></image>
</view>
</view>
<text class='kg-text-
normal-gray' style='margin-left:60
rpx;'>{{item.pictureRemark ? item.pictureRemark : ''}}</text>
<text class='kg-text-
light-gray' style='margin-left:60rpx;margin-right:45
rpx;'>{{item.pictureRemark ? item.pictureRemark : ''}}</text>
<view class='kg-separater' style='height:2rpx;margin-left:80rpx;margin-right:0rpx;'></view>
...
...
@@ -48,8 +48,8 @@
<template is='imgTextView' data="{{img:'eat',text:'饮食'}}"> </template>
</view>
<view class='kg-flex-row timeline-content-detail'>
<text class='kg-text-normal-gray'
style='width:160rpx;'
>{{dietItem.z_recordType}}</text>
<text class='kg-text-normal-gray'
style='width:130rpx;'
>{{dietItem.z_eatState}}</text>
<text class='kg-text-normal-gray' >{{dietItem.z_recordType}}</text>
<text class='kg-text-normal-gray' >{{dietItem.z_eatState}}</text>
</view>
</view>
...
...
@@ -58,11 +58,11 @@
<view wx:for="{{item.sleepRecord}}" wx:for-item="sleepItem" wx:for-index="sleepIndex" wx:key="sleepItem.id">
<view wx:if="{{sleepIndex == 0}}">
<view class='kg-separater' style='height:2rpx;margin-left:80rpx;margin-right:0rpx;'></view>
<template is='imgTextView' data="{{img:'sleep',text:'睡
觉
'}}"> </template>
<template is='imgTextView' data="{{img:'sleep',text:'睡
眠
'}}"> </template>
</view>
<view class='kg-flex-row timeline-content-detail'>
<text class='kg-text-normal-gray'
style='width:130rpx;'
>午睡</text>
<text class='kg-text-normal-gray'
style='width:130rpx;'>{{sleepItem.value
}}分钟</text>
<text class='kg-text-normal-gray' >午睡</text>
<text class='kg-text-normal-gray'
>{{sleepItem.value ? sleepItem.value : '0'
}}分钟</text>
</view>
</view>
...
...
@@ -71,14 +71,14 @@
<view wx:for="{{item.wcRecord}}" wx:for-item="wcItem" wx:for-index="wcIndex" wx:key="wcItem.id">
<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>
<template is='imgTextView' data="{{img:'wc',text:'
大小便
'}}"> </template>
</view>
<view class='kg-flex-row timeline-content-detail'>
<text class='kg-text-normal-gray'
style='width:130rpx;'
>{{wcItem.z_recordType}}</text>
<text class='kg-text-normal-gray'
style='width:130rpx;'>{{wcItem.value
}}次</text>
<text class='kg-text-normal-gray' >{{wcItem.z_recordType}}</text>
<text class='kg-text-normal-gray'
>{{wcItem.value ? wcItem.value : '0'
}}次</text>
</view>
</view>
<text class='kg-text-
normal-gray' style='margin-left:60
rpx;'>{{item.remark ? item.remark : ''}}</text>
<text class='kg-text-
light-gray' style='margin-left:60rpx;margin-right:45
rpx;'>{{item.remark ? item.remark : ''}}</text>
</view>
</view>
...
...
pages/home/sign/index.js
View file @
5620a6f3
...
...
@@ -9,7 +9,8 @@ Page({
*/
data
:
{
selectTags
:
{},
classId
:
""
classId
:
""
,
className
:
""
},
/**
...
...
@@ -17,6 +18,9 @@ Page({
*/
onLoad
:
function
(
options
)
{
let
classId
=
options
.
classId
this
.
setData
({
className
:
app
.
globalData
.
login
.
classes
[
0
].
departname
})
this
.
getAllStudent
(
classId
)
},
...
...
pages/home/sign/index.wxml
View file @
5620a6f3
<!--pages/home/sign/index.wxml-->
<import src='/template/operate_btn/index.wxml'></import>
<view></view>
<view class='kg-text-title kg-flex-row' style="margin-left:40rpx;height:100rpx;">
向日葵小班
</view>
<view class='kg-text-title kg-flex-row' style="margin-left:40rpx;height:100rpx;">
{{className}}
</view>
<view class='kg-separater'></view>
...
...
pages/review_student/index.js
View file @
5620a6f3
...
...
@@ -82,11 +82,11 @@ Page({
var
r
=
wcRecord
[
j
]
r
.
z_recordType
=
this
.
data
.
recordTypes
[
r
.
recordType
]
}
if
(
res
.
state
==
"finish"
)
{
this
.
setData
({
showAuditBtn
:
false
})
}
this
.
setData
({
showAuditBtn
:
res
.
state
!=
"finish"
})
this
.
setData
({
recordDetail
:
res
})
...
...
@@ -148,17 +148,37 @@ Page({
// if (!this.data.showAuditBtn) {
// return;
// }
console
.
log
(
e
)
let
student
=
this
.
data
.
recordDetail
wx
.
navigateTo
({
url
:
'/pages/add_record/index?studentIds='
+
JSON
.
stringify
([
this
.
data
.
signSummaryId
])
+
'&pictureIds='
+
JSON
.
stringify
(
this
.
data
.
pictureIds
)
+
'&remark='
+
(
this
.
data
.
remark
?
this
.
data
.
remark
:
''
)
+
'&picRemark='
+
(
this
.
data
.
picRemark
?
this
.
data
.
picRemark
:
''
),
})
},
operateTap
:
function
(
e
)
{
this
.
auditSignSummary
(
this
.
data
.
signSummaryId
)
},
operateEdit
:
function
(
e
)
{
console
.
log
(
e
)
let
student
=
this
.
data
.
recordDetail
request
.
resetSignSummary
(
this
.
data
.
signSummaryId
).
then
(
res
=>
{
wx
.
showToast
({
title
:
'开始修改'
,
icon
:
'none'
,
duration
:
2000
})
wx
.
navigateTo
({
url
:
'/pages/add_record/index?studentIds='
+
JSON
.
stringify
([
this
.
data
.
signSummaryId
])
+
'&pictureIds='
+
JSON
.
stringify
(
this
.
data
.
pictureIds
)
+
'&remark='
+
(
this
.
data
.
remark
?
this
.
data
.
remark
:
''
)
+
'&picRemark='
+
(
this
.
data
.
picRemark
?
this
.
data
.
picRemark
:
''
),
})
}).
catch
(
err
=>
{
wx
.
showToast
({
title
:
err
.
message
,
icon
:
'none'
,
duration
:
2000
})
})
},
/**
* 生命周期函数--监听页面加载
*/
...
...
pages/review_student/index.wxml
View file @
5620a6f3
...
...
@@ -12,17 +12,17 @@
<view class='kg-quantity-cell timeline-content' style='margin-left:20rpx;margin-bottom:30rpx;' bindtap='tapCell'>
<view class='kg-flex-row' style='margin-bottom:20rpx;'>
<text class='kg-text-title'>{{recordDetail.recordDate}}</text>
<text class='kg-text-normal-gray'>
{{recordDetail.teacher ? recordDetail.teacher.name : ""}}记录
</text>
<text class='kg-text-normal-gray'>
</text>
</view>
<!--
今日
照片 -->
<template is='imgTextView' data="{{img:'today',text:'
今日
照片'}}"> </template>
<!-- 照片 -->
<template is='imgTextView' data="{{img:'today',text:'照片'}}"> </template>
<view class='home-student-picture-item' style='margin-left:40rpx;'>
<view wx:for="{{arrPic}}" wx:for-item="picItem" wx:for-index="picIndex" wx:key="item.id">
<image src='{{picItem}}' class='home-student-picture' catchtap='previewPic' data-picIndex='{{picIndex}}' mode='aspectFill'></image>
<image src='{{picItem}}' class='home-student-picture'
style='width:calc(100vw / 3 + 10rpx);'
catchtap='previewPic' data-picIndex='{{picIndex}}' mode='aspectFill'></image>
</view>
</view>
<text class='kg-text-light-gray' style='margin-left:60rpx;'>{{picRemark ? picRemark : ''}}</text>
<text class='kg-text-light-gray' style='margin-left:60rpx;
margin-right:45rpx;
'>{{picRemark ? picRemark : ''}}</text>
<!-- 饮食 -->
<view wx:for="{{recordDetail.dietRecord}}" wx:for-item="dietItem" wx:for-index="dietIndex" wx:key="item.id">
...
...
@@ -39,11 +39,11 @@
<view wx:for="{{recordDetail.sleepRecord}}" wx:for-item="sleepItem" wx:for-index="sleepIndex" wx:key="item.id">
<view wx:if="{{sleepIndex == 0}}">
<view class='kg-separater' style='height:2rpx;margin-left:80rpx;margin-right:0rpx;'></view>
<template is='imgTextView' data="{{img:'sleep',text:'睡
觉
'}}"> </template>
<template is='imgTextView' data="{{img:'sleep',text:'睡
眠
'}}"> </template>
</view>
<view class='kg-flex-row timeline-content-detail'>
<text class='kg-text-normal-gray'>午睡</text>
<text class='kg-text-normal-gray'>{{sleepItem.value ? sleepItem.value : ''}}分钟</text>
<text class='kg-text-normal-gray'>{{sleepItem.value ? sleepItem.value : '
0
'}}分钟</text>
</view>
</view>
...
...
@@ -51,18 +51,25 @@
<view wx:for="{{recordDetail.wcRecord}}" wx:for-item="wcItem" wx:for-index="wcIndex" wx:key="item.id">
<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>
<template is='imgTextView' data="{{img:'wc',text:'
大小便
'}}"> </template>
</view>
<view class='kg-flex-row timeline-content-detail'>
<text class='kg-text-normal-gray'>{{wcItem.z_recordType}}</text>
<text class='kg-text-normal-gray'>{{wcItem.value ? wcItem.value : ''}}次</text>
<text class='kg-text-normal-gray'>{{wcItem.value ? wcItem.value : '
0
'}}次</text>
</view>
</view>
<text class='kg-text-light-gray' style='margin-left:60rpx;'>{{remark ? remark : ''}}</text>
<text class='kg-text-light-gray' style='margin-left:60rpx;
margin-right:45rpx;
'>{{remark ? remark : ''}}</text>
</view>
<view style='height:140rpx;'></view>
</scroll-view>
<template is="operate_btn" data="{{title:'通过'}}" wx:if="{{showAuditBtn}}"></template>
\ No newline at end of file
<view style='position:fixed;bottom: 0rpx;height:140rpx;background-color:white;width:100vw;'>
<view class='kg-separater' style='height:4rpx;'></view>
<view class='kg-operate-btn-bg'>
<button class='kg-operate-btn kg-btn-no-border btn' bindtap='operateTap' disabled="{{!showAuditBtn}}">通过</button>
<button class='kg-operate-btn kg-btn-no-border btn' bindtap='operateEdit'>修改</button>
</view>
</view>
<!-- <template is="operate_btn" data="{{title:'通过'}}" wx:if="{{showAuditBtn}}"></template> -->
\ No newline at end of file
pages/review_student/index.wxss
View file @
5620a6f3
/* pages/review_student/index.wxss */
@import '../home/parents/index.wxss'
\ No newline at end of file
@import '../home/parents/index.wxss'
.btn {
margin-left: 50rpx;
margin-right: 0rpx;
width: calc((100vw - 150rpx)/2);
}
\ No newline at end of file
template/operate_btn/index.wxml
View file @
5620a6f3
...
...
@@ -90,6 +90,6 @@ sex:性别 f/m (女性/男性)
<template name='imgTextView'>
<view class='kg-flex-row' style='justify-content: flex-start;height:80rpx;'>
<image src='/src/img/{{img}}.png' style='width: 44rpx;height: 44rpx;'></image>
<text class='kg-text-normal-dark' style='margin-left:1
0
rpx;font-weight:bold;'>{{text != null ? text : ""}}</text>
<text class='kg-text-normal-dark' style='margin-left:1
6
rpx;font-weight:bold;'>{{text != null ? text : ""}}</text>
</view>
</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