Commit 51a7791d authored by 张杰's avatar 张杰

no message

parent ecd36884
...@@ -19,7 +19,7 @@ Page({ ...@@ -19,7 +19,7 @@ Page({
eatStates: app.globalData.eatStates, eatStates: app.globalData.eatStates,
rightIcon: '/src/img/xiugaimima.png', rightIcon: '/src/img/xiugaimima.png',
pictureId: "", pictureId: "",
userIcon: "", userIcon: "/src/img/defaut_teacher_icon.png",
selectPic: [], selectPic: [],
student: {}, student: {},
//顶部加载提示信息 //顶部加载提示信息
...@@ -147,14 +147,18 @@ Page({ ...@@ -147,14 +147,18 @@ Page({
} }
let student = app.globalData.login.students[0] let student = app.globalData.login.students[0]
var studentId = student.id var studentId = student.id
let pic = utils.handleImgShow(student.picture)
console.log(pic)
this.setData({ this.setData({
student: student, student: student,
userIcon: pic,
sex: student.sex sex: student.sex
}) })
if (student.picture != null) {
let pic = utils.handleImgShow(student.picture)
this.setData({
userIcon: pic
})
}
}, },
httpRequest: function() { httpRequest: function() {
......
...@@ -30,6 +30,17 @@ ...@@ -30,6 +30,17 @@
<text class='kg-text-light-gray'>{{item.teacher ? item.teacher.name : ""}}记录</text> <text class='kg-text-light-gray'>{{item.teacher ? item.teacher.name : ""}}记录</text>
</view> </view>
<!-- 今日照片 -->
<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:60rpx;'>{{item.pictureRemark ? item.pictureRemark : ''}}</text>
<view class='kg-separater' style='height:2rpx;margin-left:80rpx;margin-right:0rpx;'></view>
<!-- 饮食 --> <!-- 饮食 -->
<view wx:for="{{item.dietRecord}}" wx:for-item="dietItem" wx:for-index="dietIndex" wx:key="dietItem.id"> <view wx:for="{{item.dietRecord}}" wx:for-item="dietItem" wx:for-index="dietIndex" wx:key="dietItem.id">
...@@ -37,7 +48,7 @@ ...@@ -37,7 +48,7 @@
<template is='imgTextView' data="{{img:'eat',text:'饮食'}}"> </template> <template is='imgTextView' data="{{img:'eat',text:'饮食'}}"> </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' style='width:130rpx;'>{{dietItem.z_recordType}}</text> <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' style='width:130rpx;'>{{dietItem.z_eatState}}</text>
</view> </view>
</view> </view>
...@@ -68,16 +79,6 @@ ...@@ -68,16 +79,6 @@
</view> </view>
</view> </view>
<text class='kg-text-normal-gray' style='margin-left:60rpx;'>{{item.remark ? item.remark : ''}}</text> <text class='kg-text-normal-gray' style='margin-left:60rpx;'>{{item.remark ? item.remark : ''}}</text>
<view class='kg-separater' style='height:2rpx;margin-left:80rpx;margin-right:0rpx;'></view>
<!-- 今日照片 -->
<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:60rpx;'>{{item.pictureRemark ? item.pictureRemark : ''}}</text>
</view> </view>
</view> </view>
......
...@@ -101,7 +101,7 @@ Page({ ...@@ -101,7 +101,7 @@ Page({
if (this.data.classList.length > 0) { if (this.data.classList.length > 0) {
this.data.classId = this.data.classList[0].id this.data.classId = this.data.classList[0].id
} }
this.querySignSummary()
}, },
/** /**
...@@ -115,7 +115,7 @@ Page({ ...@@ -115,7 +115,7 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function() { onShow: function() {
this.querySignSummary()
}, },
/** /**
......
This diff is collapsed.
...@@ -41,6 +41,26 @@ Page({ ...@@ -41,6 +41,26 @@ Page({
var num = date.getDay() var num = date.getDay()
res.recordDate = dateStr + " " + show_day[date.getDay()] res.recordDate = dateStr + " " + show_day[date.getDay()]
this.setData({
remark: res.remark,
picRemark: res.pictureRemark
})
if (res.pictures != null) {
this.data.pictureIds = res.pictures.split(",")
var arrPic = []
for (var i = 0; i < this.data.pictureIds.length; i++) {
let id = this.data.pictureIds[i]
arrPic.push(utils.handleImgShow(id))
}
this.setData({
arrPic: arrPic
})
}
// 饮食 // 饮食
var dietRecords = res['dietRecord'] var dietRecords = res['dietRecord']
for (var j = 0; j < dietRecords.length; j++) { for (var j = 0; j < dietRecords.length; j++) {
...@@ -112,7 +132,7 @@ Page({ ...@@ -112,7 +132,7 @@ Page({
}, },
previewPic: function (e) { previewPic: function(e) {
let index = e.target.dataset.picindex let index = e.target.dataset.picindex
console.log(e) console.log(e)
var current = this.data.arrPic[index] var current = this.data.arrPic[index]
...@@ -123,7 +143,11 @@ Page({ ...@@ -123,7 +143,11 @@ Page({
}, },
tapCell: function (e) { tapCell: function(e) {
//审核通过不允许修改
// if (!this.data.showAuditBtn) {
// return;
// }
console.log(e) console.log(e)
let student = this.data.recordDetail let student = this.data.recordDetail
wx.navigateTo({ wx.navigateTo({
...@@ -149,25 +173,23 @@ Page({ ...@@ -149,25 +173,23 @@ Page({
}) })
} }
this.setData({ this.setData({
remark: remark,
picRemark: picRemark,
studentName: options.studentName, studentName: options.studentName,
sex: options.sex sex: options.sex
}) })
if (options.pictureIds != null) { // if (options.pictureIds != null) {
this.data.pictureIds = JSON.parse(options.pictureIds) // this.data.pictureIds = JSON.parse(options.pictureIds)
var arrPic = [] // var arrPic = []
for (var i = 0; i < this.data.pictureIds.length; i++) { // for (var i = 0; i < this.data.pictureIds.length; i++) {
let id = this.data.pictureIds[i] // let id = this.data.pictureIds[i]
arrPic.push(utils.handleImgShow(id)) // arrPic.push(utils.handleImgShow(id))
} // }
this.setData({ // this.setData({
arrPic: arrPic // arrPic: arrPic
}) // })
} // }
this.getRecordDetailForSignId()
}, },
/** /**
...@@ -181,7 +203,7 @@ Page({ ...@@ -181,7 +203,7 @@ Page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function() { onShow: function() {
this.getRecordDetailForSignId()
}, },
/** /**
......
{} {
\ No newline at end of file "navigationBarTitleText": "详情"
}
\ No newline at end of file
...@@ -15,6 +15,15 @@ ...@@ -15,6 +15,15 @@
<text class='kg-text-normal-gray'>{{recordDetail.teacher ? recordDetail.teacher.name : ""}}记录</text> <text class='kg-text-normal-gray'>{{recordDetail.teacher ? recordDetail.teacher.name : ""}}记录</text>
</view> </view>
<!-- 今日照片 -->
<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>
</view>
</view>
<text class='kg-text-light-gray' style='margin-left:60rpx;'>{{picRemark ? picRemark : ''}}</text>
<!-- 饮食 --> <!-- 饮食 -->
<view wx:for="{{recordDetail.dietRecord}}" wx:for-item="dietItem" wx:for-index="dietIndex" wx:key="item.id"> <view wx:for="{{recordDetail.dietRecord}}" wx:for-item="dietItem" wx:for-index="dietIndex" wx:key="item.id">
<view wx:if="{{dietIndex == 0}}"> <view wx:if="{{dietIndex == 0}}">
...@@ -34,7 +43,7 @@ ...@@ -34,7 +43,7 @@
</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'>午睡</text>
<text class='kg-text-normal-gray'>{{sleepItem.value}}分钟</text> <text class='kg-text-normal-gray'>{{sleepItem.value ? sleepItem.value : ''}}分钟</text>
</view> </view>
</view> </view>
...@@ -46,19 +55,12 @@ ...@@ -46,19 +55,12 @@
</view> </view>
<view class='kg-flex-row timeline-content-detail'> <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.z_recordType}}</text>
<text class='kg-text-normal-gray'>{{wcItem.value}}次</text> <text class='kg-text-normal-gray'>{{wcItem.value ? wcItem.value : ''}}次</text>
</view> </view>
</view> </view>
<text class='kg-text-normal-gray' style='margin-left:60rpx;'>{{remark}}</text> <text class='kg-text-light-gray' style='margin-left:60rpx;'>{{remark ? remark : ''}}</text>
<!-- 今日照片 -->
<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>
</view>
</view>
<text class='kg-text-normal-gray' style='margin-left:60rpx;'>{{picRemark}}</text>
</view> </view>
<view style='height:140rpx;'></view> <view style='height:140rpx;'></view>
......
src/img/eat.png

2.23 KB | W: | H:

src/img/eat.png

2.24 KB | W: | H:

src/img/eat.png
src/img/eat.png
src/img/eat.png
src/img/eat.png
  • 2-up
  • Swipe
  • Onion skin
src/img/sleep.png

2.34 KB | W: | H:

src/img/sleep.png

2.4 KB | W: | H:

src/img/sleep.png
src/img/sleep.png
src/img/sleep.png
src/img/sleep.png
  • 2-up
  • Swipe
  • Onion skin
src/img/today.png

1.81 KB | W: | H:

src/img/today.png

1.83 KB | W: | H:

src/img/today.png
src/img/today.png
src/img/today.png
src/img/today.png
  • 2-up
  • Swipe
  • Onion skin
src/img/wc.png

1.91 KB | W: | H:

src/img/wc.png

1.97 KB | W: | H:

src/img/wc.png
src/img/wc.png
src/img/wc.png
src/img/wc.png
  • 2-up
  • Swipe
  • Onion skin
src/img/xiugaimima.png

1.96 KB | W: | H:

src/img/xiugaimima.png

1.71 KB | W: | H:

src/img/xiugaimima.png
src/img/xiugaimima.png
src/img/xiugaimima.png
src/img/xiugaimima.png
  • 2-up
  • Swipe
  • Onion skin
...@@ -89,7 +89,7 @@ sex:性别 f/m (女性/男性) ...@@ -89,7 +89,7 @@ sex:性别 f/m (女性/男性)
<!-- 图片+文字 --> <!-- 图片+文字 -->
<template name='imgTextView'> <template name='imgTextView'>
<view class='kg-flex-row' style='justify-content: flex-start;height:80rpx;'> <view class='kg-flex-row' style='justify-content: flex-start;height:80rpx;'>
<image src='/src/img/{{img}}.png' style='width: 50rpx;height: 40rpx;'></image> <image src='/src/img/{{img}}.png' style='width: 44rpx;height: 44rpx;'></image>
<text class='kg-text-normal-dark' style='margin-left:10rpx;font-weight:bold;'>{{text != null ? text : ""}}</text> <text class='kg-text-normal-dark' style='margin-left:10rpx;font-weight:bold;'>{{text != null ? text : ""}}</text>
</view> </view>
</template> </template>
\ 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