This commit is contained in:
闫晓茹 2023-04-19 11:28:12 +08:00
parent 5bdbf83194
commit 14ff788706
22 changed files with 1471 additions and 207 deletions

View File

@ -6,11 +6,42 @@ export function getPreOrderById(data, data2) {
method: 'POST'
})
}
//查看
export function loginLogging(data) {
return request({
url: '/kindergartenApplet/actionLogRecord/loginLogging',
method: 'POST',
data: data
})
}
export function prescriptionLogging(data) {
return request({
url: '/kindergartenApplet/actionLogRecord/prescriptionLogging',
method: 'POST',
data: data
})
}
export function prescriptionVideoLogging(data) {
return request({
url: '/kindergartenApplet/actionLogRecord/prescriptionVideoLogging',
method: 'POST',
data: data
})
}
export function getChildrenResultScore(data) {
return request({
url: '/kindergarten/applet/getChildrenResultScore',
method: 'POST',
data: data
})
}
//查看成绩
export function getStudentScore(data) {
return request({
url: `/kindergarten/applet/getStudentScoreInfo?studentId=${data}`,
method: 'GET'
url: '/kindergarten/applet/getStudentScoreInfo',
method: 'POST',
data: data
})
}
//绑定家长手机号
@ -23,7 +54,7 @@ export function bindParent(data) {
}
// 我的
export function getInfoByPhone(data) {
return request({
url: `/kindergarten/applet/getInfoByPhone?phone=${data}`,
@ -33,9 +64,9 @@ export function getInfoByPhone(data) {
export function getReportDownAddress(studentId, batchCode) {
export function getMotionPrescription(studentId, batchCode) {
return request({
url: `/kindergarten/applet/getReportDownAddress?studentId=${studentId}&batchCode=${batchCode}`,
url: `/kindergarten/applet/getMotionPrescription?studentId=${studentId}&batchCode=${batchCode}`,
method: 'GET'
})
}

View File

@ -4,22 +4,77 @@
},
"pages": [ //pageshttps://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": ""
}
}, {
"path": "pages/phone/phone",
"path": "pages/homepage/homepage",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"navigationBarBackgroundColor": "#D7EEE8"
}
}, {
"path": "pages/prescription/prescription",
"style": {
"navigationBarTitleText": "体质评估运动处方",
"navigationBarTextStyle": "white", //
"navigationBarBackgroundColor": "#37A97B"
}
}, {
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "",
"navigationBarBackgroundColor": "#D7EEE8"
}
}, {
"path": "pages/Parentinformation/Parentinformation",
"style": {
"navigationBarTitleText": "家长信息绑定",
"enablePullDownRefresh": false,
// "navigationStyle": "custom",
"navigationBarBackgroundColor": "#D7EEE8" //
}
},
{
"path": "pages/Personal/Personal",
"style": {
"navigationBarTitleText": "",
// "enablePullDownRefresh": false,
// "enablePullDownRefresh": false,
"navigationStyle": "custom",
"navigationBarBackgroundColor": "#D7EEE8" //
}
}, {
"path": "pages/grade/grade",
"style": {
"navigationBarTitleText": "幼儿体测成绩",
// "enablePullDownRefresh": false,
// "navigationStyle": "custom",
"navigationBarBackgroundColor": "#D7EEE8" //
}
}, {
"path": "pages/home/home",
"style": {
"navigationBarTitleText": ""
"navigationBarTitleText": "",
"navigationStyle": "custom"
// "navigationBarTextStyle": "white",
// "enablePullDownRefresh": false,
}
},
{
"path": "pages/Viewprescription/Viewprescription",
"style": {
"navigationBarTitleText": "体质评估运动处方",
"navigationBarBackgroundColor": "#37A97B",
"navigationBarTextStyle": "white" //
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
@ -29,11 +84,39 @@
},
"uniIdRouter": {},
"condition": { //
"current": 0, //(list )
"current": 0 //(list )
},
"tabBar": {
"color": "#7A7E83",
"selectedColor": "#435950",
"borderStyle": "black",
"backgroundColor": "#ffffff",
"list": [{
"name": "", //
"path": "", //
"query": "" //onLoad
}]
"pagePath": "pages/homepage/homepage",
"iconPath": "static/shouye.png",
"selectedIconPath": "static/homepage.png",
"text": "首页"
},
{
"pagePath": "pages/grade/grade",
"iconPath": "static/grade.png",
"selectedIconPath": "static/chengji.png",
"text": "成绩"
},
{
"pagePath": "pages/prescription/prescription",
"iconPath": "static/chufanghui.png",
"selectedIconPath": "static/chufang.png",
"text": "处方"
},
{
"pagePath": "pages/Personal/Personal",
"iconPath": "static/Personal.png",
"selectedIconPath": "static/wode.png",
"text": "我的"
}
]
}
}

View File

@ -222,7 +222,7 @@
padding: 0 30rpx 0 30rpx;
left: -5%;
background-color: #fff;
margin: 150rpx auto;
margin: 100rpx auto;
opacity: 1;
position: relative;
}

View File

@ -0,0 +1,486 @@
<template>
<view class="top">
<view class="content">
<view class="topitemm" v-for="item in getchildlist">
<view class="itemback">
<view class="bindtitle">
批次编号{{item.batchCode}}
</view>
<view class="time">
{{item.createTime}}
</view>
</view>
<view class="name">
{{item.studentName}}
</view>
<view class="grade">
{{item.itemFraction}}
<span></span>
</view>
<view class="baogao">
<view class="image">
</view>
<view class="look" @tap='showToast(item)' v-if="item.existFlag==false">查看报告</view>
<view class="lookreport" @tap='lookbook(item)' v-else>查看报告</view>
</view>
</view>
<view class="prescription" v-if="list==0">
<view class="exerciseitem">
<view class="zanwu">
<image src="../../static/zanwu.png" mode=""></image>
</view>
</view>
</view>
<view class="prescription" v-for="item in list" v-else>
<view class="sportsitem">
<!-- <view class="xuhao">
1
</view> -->
<view class="sports">
{{item.motionType}}
</view>
</view>
<view class="exerciseitem">
<view class="exercise">
运动程度
</view>
<view class="gradeitem">
{{item.degreeMovement}}
</view>
<view class="exercise">
测试分类
</view>
<view class="gradeitem">
{{item.physicalQualityName}}
</view>
</view>
<view class="Motion ">
<view class="sport">
<span>运动频率</span>
{{item.motionFrequency}}
</view>
<view class="sport">
<span>运动强度</span>
{{item.motionStrength}}
</view>
<view class="sport">
<span>运动时间</span>
{{item.motionTime}}
</view>
<view class="sport">
<span>运动量</span>
{{item.motionCapacity}}
</view>
</view>
<view class="Advanced">
<view class="Advancedtime">
<span>进阶时间可选择</span>
{{item.advancedTime}}
</view>
<view class="Advancedtime">
<span>进阶方案</span>
{{item.advancedScheme}}
</view>
<view class="videoitem">
<video v-for="uitem in item.motionPrescriptionVideoInfoVOList" :src="uitem.prescriptionVideoUrl"
:autoplay="false" @tap='look(uitem)'></video>
</view>
</view>
</view>
</view>
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
getMotionPrescription,
getChildrenResultScore,
prescriptionVideoLogging,
prescriptionLogging
} from '@/api/index/index.js'
import baseurl from '@/api/baseurl.js'
export default {
data() {
return {
motionPrescriptionVideoInfoVOList: [],
batchCode: "",
studentId: "",
list: [],
getchildlist: [],
bgColor: '#37A97B',
}
},
onLoad(options) {
console.log(options)
var that = this
this.batchCode = options.batchCode
this.studentId = options.studentId
getMotionPrescription(options.studentId, options.batchCode).then(res => {
this.list = res.data
this.list?.forEach(e => {
e.motionPrescriptionVideoInfoVOList.forEach(el => {
el.prescriptionVideoUrl = baseurl + el.prescriptionVideoUrl
})
})
})
var arr = {
"studentIdList": [this.studentId]
}
getChildrenResultScore(arr).then(res => {
// this.StudentScore = res.data
console.log(res)
this.getchildlist = res.data
})
this.infolist();
},
methods: {
infolist() {
const items = uni.getStorageSync("this.DATAList");
console.log(items, 'list111111111111111111')
prescriptionLogging(items).then(res => {
console.log(res, '999999999999')
})
},
look(uitem) {
const items = JSON.parse(uni.getStorageSync("this.DATAList"));
items["prescriptionVideoId"] = uitem?.motionPrescriptionVideoId
prescriptionVideoLogging(items).then(res => {})
},
showToast() {
this.$refs.uToast.show({
message: "暂无报告",
type: 'error',
duration: 1000
})
},
customBack() {
console.log("555555")
uni.switchTab({
//
url: '/pages/homepage/homepage'
})
// console.log('rightClick');
},
rightClick() {
console.log('rightClick', '555555');
uni.switchTab({
//
url: '/pages/homepage/homepage'
})
},
lookbook(item) {
console.log(item)
uni.showLoading({
title: '获取报告中'
});
var that = this
wx.downloadFile({
url: baseurl + item.downloadAddress,
success: function(res) {
console.log(res)
var filePath = res.tempFilePath;
wx.openDocument({
filePath: filePath,
showMenu: true,
success: function(res) {
uni.hideLoading();
},
fail: function(err) {
uni.hideLoading();
}
});
},
fail: function(err) {
uni.hideLoading();
that.$refs.uToast.show({
title: '请求报告失败',
type: 'error'
})
}
});
},
}
}
</script>
<style lang="scss">
// background: {
// backgroundColor: 'red' //
// }
.top {
background-image: linear-gradient(#D7EEE8, #fff);
width: 100%;
height: 600rpx;
.content {
width: 100%;
height: 376rpx;
background: #37A97B;
position: relative;
.prescription {
width: 90%;
height: 984rpx;
background: #FFFFFF;
box-shadow: 0rpx 3rpx 18rpx 0rpx rgba(161, 220, 211, 0.43);
border-radius: 10rpx;
margin: 0 auto;
margin-top: 3%;
.Advanced {
line-height: 48rpx;
padding: 3%;
margin: 15rpx auto;
width: 90%;
height: 500rpx;
// background-color: red;
background: #F9F9FA;
border-radius: 10rpx;
.videoitem {
display: flex;
width: 100%;
height: 200rpx;
video {
width: 50%;
margin-left: 3%;
height: 194rpx;
}
}
.Advancedtime {
font-size: 26rpx;
span {
font-family: Source Han Sans CN;
font-weight: 500;
color: #000000;
}
}
}
.Motion {
// width: 665rpx;
height: 227rpx;
background: #F9F9FA;
border-radius: 10rpx;
width: 90%;
padding: 2%;
margin: 0 auto;
.sport {
width: 585rpx;
font-size: 26rpx;
line-height: 48rpx;
span {
font-family: Source Han Sans CN;
font-weight: 500;
}
}
}
.exerciseitem {
display: flex;
margin: 3%;
.zanwu {
margin: 0 auto;
image {
width: 200rpx;
height: 200rpx;
}
}
.exercise {
width: 130rpx;
height: 41rpx;
margin-left: 5%;
background: #35A97A;
border-radius: 5rpx;
color: white;
font-size: 26rpx;
text-align: center;
}
.gradeitem {
margin-left: 2%;
font-size: 26rpx;
color: #000000;
font-family: Source Han Sans CN;
font-weight: 500;
}
}
.sportsitem {
width: 90%;
height: 56rpx;
margin: 0 auto;
display: flex;
padding: 2%;
border-bottom: 1rpx solid #E6E6E6;
.sports {
font-size: 30rpx;
font-family: Source Han Sans CN;
font-weight: 500;
color: #000000;
margin-top: 2%;
// width: 34rpx;
// height: 34rpx;
// background: #35A97A;
// border-radius: 50%;
// color: #FFFFFF;
// margin-left: 2%;
// line-height: 34rpx;
// text-align: center;
// margin-left: 3%;
}
.xuhao {
margin-top: 3%;
}
}
}
.topitemm {
background: #fff;
box-shadow: 0px 3px 18px 0px rgba(182, 218, 213, 0.43);
width: 90%;
margin: 0 auto; // text-align: center;
height: 268rpx;
border-radius: 10rpx;
position: relative;
.name {
width: 250rpx;
height: 50rpx;
font-size: 28rpx;
font-family: Source Han Sans CN;
font-weight: 500;
color: #000000;
line-height: 48rpx;
top: 50%;
left: 20rpx;
position: absolute;
}
.baogao {
font-size: 26rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #000;
.image {
width: 35rpx;
// background-size62rpx 50rpx;
height: 38rpx;
background: url(../../static/tijianbaogao.png) no-repeat center center;
background-size: 100% 100%;
left: 80%;
top: 50%;
position: absolute;
}
.look {
left: 75%;
top: 65%;
position: absolute;
}
.lookreport {
left: 75%;
top: 65%;
position: absolute;
color: green;
}
}
.baogao:hover {
font-size: 26rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #000;
.image {
width: 35rpx;
height: 38rpx;
background: url(../../static/baogao.png)no-repeat center center;
background-size: 100% 100%;
}
.look {
color: #9B9A9A;
}
.lookreport {
color: green;
}
}
.grade {
font-size: 70rpx;
font-family: Source Han Sans CN;
font-weight: 500;
color: #35A97A;
line-height: 67rpx;
top: 50%;
left: 40%;
position: absolute;
span {
font-size: 30rpx;
}
}
.itemback {
width: 95%;
height: 70rpx;
margin: 0 auto;
display: flex;
border-bottom: 1rpx solid #CDC9C9;
.time {
float: right;
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #9B9A9A;
line-height: 70rpx;
}
.bindtitle {
width: 500rpx;
height: 50rpx;
line-height: 70rpx;
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #9B9A9A;
}
}
}
}
}
</style>

View File

@ -1,138 +1,121 @@
<template>
<view class="content">
<view class="" style="width:100%">
<view class="top" v-show="top"></view>
<view class="nicheng" v-if="login" @tap='wxGetUserInfo'>
<view class="tx-w">
<view class="tx">
<image class="tx-img" src="/static/dl.png" v-if="yonghuwx.length==0"></image>
<image class="tx-img" src="/static/dl.png" v-else-if="yonghuwx.avatarUrl==''"></image>
<image class="tx-img" :src="yonghuwx.avatarUrl" v-else></image>
<view class="zx"></view>
</view>
<view class="infos">
<view class="studentName" v-if="parentList.parentName==''">姓名:{{yonghuwx.nickName}}</view>
<view class="studentName" v-else>姓名:{{parentList.parentName}}</view>
<view class="name" v-if="yonghuwx.length==0">昵称:{{parentList.parentName}} </view>
<view class="name" v-else-if="yonghuwx.nickName==''">昵称:{{parentList.parentName}} </view>
<view class="name" v-else>昵称:{{yonghuwx.nickName}} </view>
</view>
<view class="top" v-show="top"></view>
<!-- <view class="nicheng" @tap='wxGetUserInfo'> -->
<!-- <view class="tx-w">
<view class="tx">
<image class="tx-img" src="/static/dl.png" v-if="yonghuwx.length==0"></image>
<image class="tx-img" src="/static/dl.png" v-else-if="yonghuwx.avatarUrl==''"></image>
<image class="tx-img" :src="yonghuwx.avatarUrl" v-else></image>
<view class="zx"></view>
</view>
</view>
<view class="nicheng2" v-else>
<view class="tx-w">
<view class="tx" style="margin-left: 130rpx;">
<image class="tx-img" src="/static/dl.png"></image>
<view class="zx"></view>
</view>
<view class="login" style="margin-left:45% ;">
<view class="" :src="yonghuwx.avatarUrl">
暂未登录
</view>
</view>
</view>
</view>
<view class="top2" v-show="top2"></view>
<view class="tip" v-show="tip">
<!-- <button @tap='wxGetUserInfo'>授权登录</button> -->
<button open-type="getPhoneNumber" @getphonenumber="getPhoneNumberp">授权登录</button>
</view>
<view class="stuinfos" v-show="stuinfos">
<view class="student">
<view class="stinfo">
<img src="/static/student.png" alt="" sizes="" srcset="">
<view class="st">学生信息</view>
</view>
<view class="th">
<view class="stname">姓名</view>
<view class="sex">性别</view>
<view class="age">年龄</view>
<view class="class">班级</view>
<view class="score">成绩</view>
</view>
<view class="tr" v-for="item in studentList">
<view class="stname">{{item.studentName}}</view>
<view class="sex">{{item.studentSex | formatSex}} </view>
<view class="age">{{item.studentAge}}</view>
<view class="class">{{item.className}}</view>
<view class="read">
<navigator :url="`/pages/home/home?studentId=${item.studentId}`
">查看</navigator>
</view>
</view>
</view>
<view class="kindergarten">
<view class="stinfo">
<img src="/static/children.png" alt="" sizes="" srcset="">
<text>幼儿园信息</text>
</view>
<view class="th">
<view class="kinderclass" style="line-height: 100rpx;height: 100rpx;">幼儿园</view>
<view class="teacher" style="line-height: 100rpx;height: 100rpx;">班主任</view>
</view>
<view class="tr" v-for="item in classList">
<view class="kinderclass">{{item.kindergartenName}}</view>
<view class="teacher">
<span class='teachername'> {{item.classTeacher}}</span>
</view>
</view>
</view>
<view class="parentinfo">
<view class="stinfo">
<img src="/static/parent.png" alt="" sizes="" srcset="">
<text>家长信息</text>
</view>
<view class="th">
<view class="parent">家长</view>
<view class="phone">电话</view>
</view>
<view class="tr">
<view class="parent">{{parentList.parentName}}</view>
<view class="phone">{{parentList.phone}}</view>
</view>
</view>
</view>
<view class="masks" style="" v-if="mask">
<view class="mask">
<view class="title">
提示
</view>
<view class="text" style="margin-top:40rpx">
系统中没有该用户手机号, 请绑定信息!
</view>
<view class="btns">
<view class="btn1" @tap='mask=false'>取消</view>
<view class="btn2" @tap='gophone()'>确定</view>
</view>
</view>
</view>
<!-- <view class="masks" style="" v-if="mask2">
<view class="mask2">
<view class="title">
微信授权
</view>
<view class="sq">
<img src="/static/sq.png" alt="" sizes="" srcset="">
<img src="/static/sq1.png" alt="" sizes="" srcset="">
</view>
<view class="text">
授权绑定您的手机号码
</view>
<view class="btns">
<button class="btn1" @tap='mask2=false'>拒绝</button>
<button class="btn2" open-type="getPhoneNumber" @getphonenumber="getPhoneNumberp">允许</button>
</view>
<view class="infos">
<view class="studentName" v-if="parentList.parentName==''">姓名:{{yonghuwx.nickName}}</view>
<view class="studentName" v-else>姓名:{{parentList.parentName}}</view>
<view class="name" v-if="yonghuwx.length==0">昵称:{{parentList.parentName}} </view>
<view class="name" v-else-if="yonghuwx.nickName==''">昵称:{{parentList.parentName}} </view>
<view class="name" v-else>昵称:{{yonghuwx.nickName}} </view>
</view>
</view> -->
<!-- </view> -->
<!-- <view > -->
<view class="tucengstyle">
<image src="/static/tuceng.png"></image>
</view>
<view class="zhihui">智慧幼儿体质评估
与促进系统
</view>
<!-- <view class="" @tap='wxGetUserInfo'> -->
<button class="denglu" open-type="getPhoneNumber" @getphonenumber='getPhoneNumberp'>微信一键登录</button>
<!-- </view> -->
<!-- </view> -->
<!-- <view class="stuinfos" v-show="stuinfos">
<view class="student">
<view class="stinfo">
<img src="/static/student.png" alt="" sizes="" srcset="">
<view class="st">学生信息</view>
</view>
<view class="th">
<view class="stname">姓名</view>
<view class="sex">性别</view>
<view class="age">年龄</view>
<view class="class">班级</view>
<view class="score">成绩</view>
</view>
<view class="tr" v-for="item in studentList">
<view class="stname">{{item.studentName}}</view>
<view class="sex">{{item.studentSex | formatSex}} </view>
<view class="age">{{item.studentAge}}</view>
<view class="class">{{item.className}}</view>
<view class="read">
<navigator :url="`/pages/home/home?studentId=${item.studentId}`
">查看</navigator>
</view>
</view>
</view>
<view class="kindergarten">
<view class="stinfo">
<img src="/static/children.png" alt="" sizes="" srcset="">
<text>幼儿园信息</text>
</view>
<view class="th">
<view class="kinderclass" style="line-height: 100rpx;height: 100rpx;">幼儿园</view>
<view class="teacher" style="line-height: 100rpx;height: 100rpx;">班主任</view>
</view>
<view class="tr" v-for="item in classList">
<view class="kinderclass">{{item.kindergartenName}}</view>
<view class="teacher">
<span class='teachername'> {{item.classTeacher}}</span>
</view>
</view>
</view>
<view class="parentinfo">
<view class="stinfo">
<img src="/static/parent.png" alt="" sizes="" srcset="">
<text>家长信息</text>
</view>
<view class="th">
<view class="parent">家长</view>
<view class="phone">电话</view>
</view>
<view class="tr">
<view class="parent">{{parentList.parentName}}</view>
<view class="phone">{{parentList.phone}}</view>
</view>
</view>
</view> -->
<!-- </view> -->
<view class="masks" style="" v-if="mask">
<view class="mask">
<view class="imageitem">
<img src="/static/tishiimage.png" alt="" sizes="" srcset="">
</view>
<view class="title">
提示信息
</view>
<view class="text" style="margin-top:40rpx">
使用前请先绑定账号信息
</view>
<view class="btns">
<view class="btn1" @tap='mask=false'>拒绝</view>
<view class="btn2" @tap='gophone()'>同意</view>
</view>
</view>
</view>
<u-toast ref="uToast" />
</view>
<!-- <u-toast ref="uToast" /> -->
</view>
</template>
<script>
import {
getPreOrderById,
getInfoByPhone
getInfoByPhone,
loginLogging,
prescriptionLogging
} from '@/api/index/index.js'
import baseurl from '@/api/baseurl.js'
export default {
components: {},
data() {
@ -146,6 +129,7 @@
stuinfos: false,
tip: true,
yonghuwx: [],
DATAList: [],
logincode: '',
phonecode: '',
phone: '',
@ -176,7 +160,7 @@
gophone() {
const openid = this.openId
uni.navigateTo({
url: `/pages/phone/phone?openId=${openid}`
url: `/pages/Parentinformation/Parentinformation?openId=${openid}`
})
this.mask = false;
},
@ -187,7 +171,6 @@
this.mask = true;
this.openId = res.data.openId
} else {
// this.mask = true;
this.phone = res.data.phone
uni.setStorage({
key: 'phone',
@ -196,6 +179,17 @@
if (this.phone != '') {
this.getInfoByPhoneinfo()
}
this.$refs.uToast.show({
message: "登录成功",
type: 'success',
duration: '5000'
})
setTimeout(() => {
uni.switchTab({
url: '/pages/homepage/homepage'
})
}, 500)
this.login = true
this.stuinfos = true
this.tip = false
@ -211,6 +205,7 @@
wx.login({
provider: 'weixin',
success: function(loginRes) {
that.logincode = loginRes.code
that.getPreOrderById();
// that.mask2 = false;
@ -228,6 +223,7 @@
key: 'user',
data: res.userInfo
});
that.mask2 = true
},
fail(res) {
@ -235,18 +231,39 @@
},
});
},
info() {
const items = uni.getStorageSync("this.DATAList");
// const items = JSON.parse(this.DATAList);
console.log(items, 'list111111111111111111')
loginLogging(items).then(res => {
console.log(res, '999999999999')
})
},
getInfoByPhoneinfo() {
var that = this
getInfoByPhone(this.phone).then(res => {
if (res.code == 200) {
this.DATAList = res.data
console.log(this.DATAList, '123456')
let items = JSON.stringify(this.DATAList);
uni.setStorageSync("this.DATAList", items)
this.info();
this.studentList = res.data.studentInfoList;
this.classList = res.data.classInfoList;
this.parentList = res.data;
that.login = true
that.stuinfos = true
that.tip = false
that.top2 = true
that.top = false
var obj = []
res.data.studentInfoList.forEach(e => {
obj.push(e.studentId)
})
uni.setStorageSync("studentId", obj)
console.log(obj, '9898989898')
// that.login = true
// that.stuinfos = true
// that.tip = false
// that.top2 = true
// that.top = false
// this.mask = true;
} else {
@ -264,37 +281,39 @@
return sexEnum[str];
},
},
onLoad(options) {
onShow() {
let that = this;
uni.getStorage({
key: 'phone',
success: function(res) {
that.phone = res.data
// that.mask = true
that.getInfoByPhoneinfo();
},
fail: function(err) {
that.login = false
that.stuinfos = false
that.tip = true
that.top2 = false
that.top = true
}
});
uni.getStorage({
key: 'user',
success: function(res) {
that.yonghuwx = res.data
// that.mask = true
},
fail: function(err) {}
});
const studentId = uni.getStorageSync('studentId');
if (studentId) {
uni.switchTab({
url: '/pages/homepage/homepage'
})
} else {
uni.getStorage({
key: 'phone',
success: function(res) {
that.phone = res.data
// that.mask = true
that.getInfoByPhoneinfo();
},
fail: function(err) {
that.login = false
that.stuinfos = false
that.tip = true
that.top2 = false
that.top = true
}
});
uni.getStorage({
key: 'user',
success: function(res) {
that.yonghuwx = res.data
// that.mask = true
},
fail: function(err) {}
});
}
// this.yonghuwx = JSON.parse(options.userinfo)
// uni.request({
// url: '/kindergarten/applet/appletLogin', //
@ -316,12 +335,48 @@
</script>
<style>
.btns {}
button {
line-height: 97rpx;
width: 357rpx;
bottom: 30%;
height: 97rpx;
background: linear-gradient(90deg, #6ACAA3, #37A97B);
border-radius: 10rpx;
color: #fff;
top: 58%;
position: absolute;
}
.zhihui {
width: 381rpx;
font-size: 48rpx;
text-align: center;
color: #000000;
line-height: 72rpx;
top: 38%;
position: absolute;
}
.btns {
display: flex;
}
.imageitem {
width: 136rpx;
height: 136rpx;
margin: 0 auto;
/* position: relative; */
}
.btn1,
.btn2 {
width: 50%;
height: 80rpx;
top: 75%;
width: 254rpx;
height: 69rpx;
background: #F4F5F9;
border-radius: 10rpx;
/* width: 50%;
height: 80rpx; */
line-height: 80rpx;
text-align: center;
display: inline-block;
@ -330,20 +385,24 @@
}
.btn2 {
border-top: 1px solid #eeeeee;
/* background-color: #4486e8; */
right: 0;
/* border-top: 1px solid #eeeeee; */
background-color: #35A97A;
right: 3%;
font-size: 24rpx;
}
.btn1 {
border-top: 1px solid #eeeeee;
border-right: 1px solid #eeeeee;
background-color: #4486e8;
color: #fff;
left: 0;
background: #F4F5F9;
color: #000;
left: 3%;
font-size: 24rpx;
}
.masks {
/* width: 600rpx;
height: 434rpx;
background: #FFFFFF;
border-radius: 10rpx; */
background-color: #f0f0f0;
height: 100%;
width: 100%;
@ -351,6 +410,7 @@
opacity: 0.9;
top: 0;
z-index: 999;
}
.mask2 {
@ -371,8 +431,10 @@
}
.masks img {
width: 90rpx;
height: 90rpx;
width: 136rpx;
height: 136rpx;
top: -10%;
position: relative;
}
.text {
@ -385,9 +447,11 @@
}
.title {
height: 100rpx;
line-height: 100rpx;
border-bottom: 1px solid #eeeeee;
/* height: 80rpx; */
/* line-height: 100rpx; */
margin-top: 3%;
/* border-bottom: 1px solid #eeeeee; */
/* background-color: red; */
font-size: 36rpx;
margin: 0px auto;
@ -397,15 +461,14 @@
}
.mask {
width: 70%;
height: 300rpx;
width: 80%;
height: 400rpx;
background-color: #fff;
margin: 200rpx auto;
margin: 500rpx auto;
position: relative;
}
.content {
display: flex;
flex-direction: column;
align-items: center;
@ -417,7 +480,7 @@
.top {
/* background-color: #4486e8; */
/* background: url(@/static/bjt.png) no-repeat; */
background-image: linear-gradient(#55C5E3, #fff);
background-image: linear-gradient(#D7EEE8, #fff);
width: 100%;
height: 600rpx;
float: left;
@ -451,6 +514,22 @@
margin-left: 90rpx;
}
.tucengstyle image {
width: 50%;
height: 400rpx;
position: absolute;
left: 38%;
top: 15%;
/* background-color: red; */
width: 179rpx;
height: 189rpx;
text-align: center;
/* vertical-align:middle;
top:-50%;left:-50%; */
/* position:relative; */
/* margin-top: 10%; */
}
.tx image {
width: 140rpx;
height: 140rpx;
@ -523,18 +602,20 @@
}
.tip button {
background-color: #79E7E1;
/* background-color: #35A97A; */
/* background: linear-gradient(to right,#6ACAA3,#35A97A); */
color: #fff;
background: linear-gradient(90deg, #6ACAA3, #37A97B);
}
.tip {
width: 450rpx;
height: 70rpx;
/* width: 357rpx;
height: 97rpx; */
/* background-color:orchid; */
font-size: 50rpx;
/* font-size: 38rpx;
margin: 0 auto;
color: #515151;
margin-top: 100%;
color: #35A97A; */
/* margin-top: 100%; */
}
/* 学生信息 */
@ -544,7 +625,7 @@
margin-top: 360rpx;
box-shadow: 0rpx 2rpx 0rpx 0rpx #e6ebfe;
border-radius: 20rpx;
border-radius: 10rpx;
margin-bottom: 16rpx;
/* color: cornflowerblue; */
background-color: #eef9fc;

View File

@ -0,0 +1,583 @@
<template>
<view class="top" v-if="!phone||StudentScore==0">
<view class="zanwuchengji">
<image src="../../static/zanwuchengji.png" mode=""></image>
<view class="words">
暂无内容
</view>
</view>
</view>
<view class="top" v-else>
<view class="" v-if="StudentScore.length==1">
<view class="content">
<view class="topitemm" v-for="item in StudentScore">
<view class="itemback">
<view class="bindtitle">
批次编号{{item.batchCode}}
</view>
<view class="time">
{{item.createTime}}
</view>
</view>
<view class="name">
{{item.studentName}}
</view>
<view class="grade">
{{item.itemFraction}}
<span></span>
</view>
<view class="baogao">
<view class="image">
</view>
<view class="look" @tap='showToast(item)' v-if="item.existFlag==false">查看报告</view>
<view class="lookreport" @tap='lookbook(item)' v-else>查看报告</view>
</view>
</view>
<view class="prescription" v-if="studentInfoList==0">
<view class="exerciseitem">
<view class="zanwu">
<image src="../../static/zanwu.png" mode=""></image>
</view>
</view>
</view>
<view class="prescription" v-for="item in studentInfoList" v-else>
<view class="sportsitem">
<view class="sports">
{{item.motionType}}
</view>
</view>
<view class="exerciseitem">
<view class="exercise">
运动程度
</view>
<view class="gradeitem">
{{item.degreeMovement}}
</view>
<view class="exercise">
测试分类
</view>
<view class="gradeitem">
{{item.physicalQualityName}}
</view>
</view>
<view class="Motion ">
<view class="sport">
<span>运动频率</span>
{{item.motionFrequency}}
</view>
<view class="sport">
<span>运动强度</span>
{{item.motionStrength}}
</view>
<view class="sport">
<span>运动时间</span>
{{item.motionTime}}
</view>
<view class="sport">
<span>运动量</span>
{{item.motionCapacity}}
</view>
</view>
<view class="Advanced">
<view class="Advancedtime">
<span>进阶时间可选择</span>
{{item.advancedTime}}
</view>
<view class="Advancedtime">
<span>进阶方案</span>
{{item.advancedScheme}}
</view>
<view class="videoitem">
<video v-for="uitem in item.motionPrescriptionVideoInfoVOList"
:src="uitem.prescriptionVideoUrl" :autoplay="false" @tap='look(uitem)'></video>
</view>
</view>
</view>
</view>
</view>
<view class="content" v-else>
<view class="topitemm" v-for="item in StudentScore">
<view class="itemback">
<view class="bindtitle">
批次编号{{item.batchCode}}
</view>
<view class="time">
{{item.createTime}}
</view>
</view>
<view class="name">
{{item.studentName}}
</view>
<view class="grade">
{{item.itemFraction}}
<span></span>
</view>
<view class="baogao">
<view class="image">
</view>
<view class="lookreport" @tap='lookbooklist(item)'>查看处方</view>
</view>
</view>
</view>
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
getStudentScore,
getChildrenResultScore,
getMotionPrescription,
getInfoByPhone,
prescriptionVideoLogging,
prescriptionLogging
} from '@/api/index/index.js'
import baseurl from '@/api/baseurl.js'
export default {
data() {
return {
motionPrescriptionVideoInfoVOList: [],
list: [],
show: false,
StudentScore: [],
studentInfoList: [],
studentIditem: [],
yonghuwx: [],
getchildlist: [],
studentId: "",
batchCode: "",
phone: "",
studentList: [],
}
},
onShow() {
let that = this;
const obj = uni.getStorageSync('studentId');
uni.getStorage({
key: 'phone',
success: function(res) {
that.phone = res.data
},
fail: function(err) {
}
});
uni.getStorage({
key: 'user',
success: function(res) {
that.yonghuwx = res.data
// that.mask = true
},
fail: function(err) {}
});
if (!obj) {
uni.navigateTo({
url: "/pages/index/index"
})
} else {
var arr = {
"studentIdList": obj
}
getChildrenResultScore(arr).then(res => {
this.StudentScore = res.data
if(this.StudentScore.length>0){
getMotionPrescription(res.data[0].studentId, res.data[0].batchCode).then(res => {
this.studentInfoList = res.data
this.studentInfoList.forEach(e => {
e.motionPrescriptionVideoInfoVOList.forEach(el => {
el.prescriptionVideoUrl = baseurl + el.prescriptionVideoUrl
})
})
})
}
})
if(this.StudentScore.length==1){
this.infolist();
}
}
},
methods: {
look(uitem) {
const items = JSON.parse(uni.getStorageSync("this.DATAList"));
items["prescriptionVideoId"] = uitem.motionPrescriptionVideoId
prescriptionVideoLogging(items).then(res => {})
},
showToast() {
this.$refs.uToast.show({
message: "暂无报告",
type: 'error',
duration: 1000
})
},
lookbook(item) {
console.log(item)
uni.showLoading({
title: '获取报告中'
});
var that = this
wx.downloadFile({
url: baseurl + item.downloadAddress,
success: function(res) {
console.log(res)
var filePath = res.tempFilePath;
wx.openDocument({
filePath: filePath,
showMenu: true,
success: function(res) {
uni.hideLoading();
},
fail: function(err) {
uni.hideLoading();
}
});
},
fail: function(err) {
uni.hideLoading();
that.$refs.uToast.show({
title: '请求报告失败',
type: 'error'
})
}
});
},
infolist() {
const items = uni.getStorageSync("this.DATAList");
console.log(items, 'list111111111111111111')
prescriptionLogging(items).then(res => {
console.log(res, '999999999999')
})
},
lookbooklist(item) {
getMotionPrescription(item.studentId, item.batchCode).then(res => {
console.log(res)
this.studentInfoList = res.data
uni.navigateTo({
url: `/pages/Viewprescription/Viewprescription?studentId=${item.studentId}&batchCode=${item.batchCode}`
})
})
},
}
}
</script>
<style lang="scss">
.top {
background-image: linear-gradient(#D7EEE8, #fff);
width: 100%;
height: 600rpx;
position: relative;
.zanwuchengji {
width: 374rpx;
height: 391rpx;
// background-color: red;
// position: relative;
top: 50%;
// width: 374rpx;
// height: 391rpx;
line-height: 391rpx;
text-align: center;
left: 25%;
// top: -20%;
// margin: 0 auto;
.words {
position: absolute;
top: 100%;
left: 40%;
font-size: 32rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #666666;
line-height: 50rpx;
}
image {
// margin: 0 auto;
vertical-align: middle;
width: 374rpx;
height: 391rpx;
position: absolute;
left: 25%;
top: 50%;
}
}
}
.top {
background-image: linear-gradient(#D7EEE8, #fff);
width: 100%;
height: 600rpx;
.content {
width: 100%;
height: 376rpx;
background: #37A97B;
position: relative;
.prescription {
width: 90%;
height: 984rpx;
background: #FFFFFF;
box-shadow: 0rpx 3rpx 18rpx 0rpx rgba(161, 220, 211, 0.43);
border-radius: 10rpx;
margin: 0 auto;
margin-top: 3%;
.Advanced {
line-height: 48rpx;
padding: 3%;
margin: 15rpx auto;
width: 90%;
height: 450rpx;
// background-color: red;
background: #F9F9FA;
border-radius: 10rpx;
.videoitem {
display: flex;
width: 100%;
height: 200rpx;
video {
width: 50%;
margin-left: 3%;
height: 194rpx;
}
}
.Advancedtime {
font-size: 26rpx;
span {
font-family: Source Han Sans CN;
font-weight: 500;
color: #000000;
}
}
}
.Motion {
// width: 665rpx;
height: 227rpx;
background: #F9F9FA;
border-radius: 10rpx;
width: 90%;
padding: 2%;
margin: 0 auto;
.sport {
width: 585rpx;
font-size: 26rpx;
line-height: 48rpx;
span {
font-family: Source Han Sans CN;
font-weight: 500;
}
}
}
.exerciseitem {
display: flex;
margin: 3%;
.zanwu {
margin: 0 auto;
image {
width: 200rpx;
height: 200rpx;
}
}
.exercise {
width: 130rpx;
height: 41rpx;
margin-left: 5%;
background: #35A97A;
border-radius: 5rpx;
color: white;
font-size: 26rpx;
text-align: center;
}
.gradeitem {
margin-left: 2%;
font-size: 26rpx;
color: #000000;
font-family: Source Han Sans CN;
font-weight: 500;
}
}
.sportsitem {
width: 90%;
height: 56rpx;
margin: 0 auto;
display: flex;
padding: 2%;
border-bottom: 1rpx solid #E6E6E6;
.sports {
font-size: 30rpx;
font-family: Source Han Sans CN;
font-weight: 500;
color: #000000;
margin-top: 2%;
margin-left: 3%;
}
.xuhao {
margin-top: 3%;
width: 34rpx;
height: 34rpx;
background: #35A97A;
border-radius: 50%;
color: #FFFFFF;
margin-left: 2%;
line-height: 34rpx;
text-align: center;
}
}
}
.topitemm {
background: #fff;
box-shadow: 0px 3px 18px 0px rgba(182, 218, 213, 0.43);
width: 90%;
margin: 0 auto;
height: 268rpx;
border-radius: 10rpx;
position: relative;
.name {
width: 250rpx;
height: 50rpx;
font-size: 28rpx;
font-family: Source Han Sans CN;
font-weight: 500;
color: #000000;
line-height: 48rpx;
top: 50%;
left: 20rpx;
position: absolute;
}
.baogao {
font-size: 26rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #000;
.image {
width: 35rpx;
// background-size62rpx 50rpx;
height: 38rpx;
background: url(../../static/tijianbaogao.png) no-repeat center center;
background-size: 100% 100%;
left: 80%;
top: 50%;
position: absolute;
}
.look {
left: 75%;
top: 65%;
position: absolute;
}
.lookreport {
left: 75%;
top: 65%;
position: absolute;
color: green;
}
}
.baogao:hover {
font-size: 26rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #000;
.image {
width: 35rpx;
height: 38rpx;
background: url(../../static/baogao.png)no-repeat center center;
background-size: 100% 100%;
}
.look {
color: #9B9A9A;
}
.lookreport {
color: green;
}
}
.grade {
font-size: 70rpx;
font-family: Source Han Sans CN;
font-weight: 500;
color: #35A97A;
line-height: 67rpx;
top: 50%;
left: 40%;
position: absolute;
span {
font-size: 30rpx;
}
}
.itemback {
width: 95%;
height: 70rpx;
margin: 0 auto;
display: flex;
border-bottom: 1rpx solid #CDC9C9;
.time {
float: right;
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #9B9A9A;
line-height: 70rpx;
}
.bindtitle {
width: 500rpx;
height: 50rpx;
line-height: 70rpx;
font-size: 24rpx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #9B9A9A;
}
}
}
}
}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

BIN
static/chufang.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

BIN
static/chufanghui.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB