This commit is contained in:
曹辉 2023-04-19 15:00:55 +08:00
parent 5290b46ef4
commit a947b590e5
8 changed files with 105 additions and 142 deletions

View File

@ -58,7 +58,7 @@
},
"usingComponents" : true,
"unipush" : {
"enable" : true
"enable" : false
},
"uniStatistics" : {
"enable" : false

View File

@ -126,7 +126,7 @@
if (this.checked == false) {
this.$refs.uToast.show({
type: 'error',
message: "请先阅读《隐私保护协议!",
title: "请先阅读《隐私保护协议!",
})
setTimeout(() => {
this.maskshow = true
@ -143,7 +143,7 @@
data: res.msg
});
this.$refs.uToast.show({
message: "添加成功",
title: "添加成功",
type: 'success'
})
// uni.showToast({
@ -157,9 +157,8 @@
}, 500)
} else if (res.code == 500) {
console.log(res.msg)
this.$refs.uToast.show({
message: res.msg,
title: res.msg,
type: 'error'
})
// uni.showToast({

View File

@ -215,7 +215,7 @@
uni.removeStorageSync('studentId');
this.mask = false
that.$refs.uToast.show({
message: "退出成功",
title: "退出成功",
type: 'success',
duration: '1500'
})

View File

@ -17,11 +17,11 @@
{{item.totalFraction}}
<span></span>
</view>
<view class="baogao">
<view class="baogao" @tap='lookbook(item)'>
<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 class="look" v-if="item.existFlag==false">暂无报告</view>
<view class="lookreport" v-else>查看报告</view>
</view>
</view>
<view class="prescription" v-if="list==0">
@ -39,7 +39,6 @@
<view class="sports">
{{item.motionType}}
</view>
</view>
<view class="exerciseitem">
<view class="exercise">
@ -81,7 +80,6 @@
<view class="Advancedtime">
<span>进阶方案</span>
{{item.advancedScheme}}
</view>
<view class="videoitem">
<video v-for="uitem in item.motionPrescriptionVideoInfoVOList" :src="uitem.prescriptionVideoUrl"
@ -111,8 +109,6 @@
list: [],
getchildlist: [],
bgColor: '#37A97B',
}
},
onLoad(options) {
@ -122,20 +118,16 @@
this.studentId = options.studentId
getMotionPrescription(options.studentId, options.batchCode).then(res => {
this.list = res.data
this.list?.forEach(e => {
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();
@ -143,10 +135,7 @@
methods: {
infolist() {
const items = uni.getStorageSync("this.DATAList");
console.log(items, 'list111111111111111111')
prescriptionLogging(items).then(res => {
console.log(res, '999999999999')
})
prescriptionLogging(items).then(res => {})
},
look(uitem) {
const items = JSON.parse(uni.getStorageSync("this.DATAList"));
@ -155,43 +144,49 @@
},
showToast() {
this.$refs.uToast.show({
message: "暂无报告",
title: "暂无报告",
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'
})
}
});
if (item.existFlag == false) {
this.$refs.uToast.show({
title: "暂无报告",
type: 'error',
duration: 1000
})
} else {
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>
@ -200,8 +195,6 @@
// background: {
// backgroundColor: 'red' //
// }
.top {
background-image: linear-gradient(#D7EEE8, #fff);
width: 100%;

View File

@ -65,7 +65,6 @@
}
getStudentScore(arr).then(res => {
this.StudentScore = res.data
console.log(this.StudentScore)
})
}
},
@ -80,7 +79,6 @@
},
lookbook(item) {
console.log(item)
uni.showLoading({
title: '获取报告中'
});
@ -88,7 +86,6 @@
wx.downloadFile({
url: baseurl + item.downloadAddress,
success: function(res) {
console.log(res)
var filePath = res.tempFilePath;
wx.openDocument({
filePath: filePath,
@ -113,9 +110,7 @@
getPhoneNumberp(val) {
wx.login({
provider: 'weixin',
success: function(loginRes) {
console.log(loginRes)
}
success: function(loginRes) {}
});
},
wxGetUserInfo() {
@ -124,7 +119,6 @@
desc: "获取用户信息",
lang: "zh_CN",
success(res) {
console.log(res)
that.yonghuwx = res.userInfo
},
fail(res) {
@ -227,13 +221,14 @@
top: 65%;
position: absolute;
}
.lookreport{
.lookreport {
left: 75%;
top: 65%;
position: absolute;
color: green;
}
}
.baogao:hover {
@ -253,7 +248,8 @@
.look {
color: #9B9A9A;
}
.lookreport{
.lookreport {
color: green;
}
}

View File

@ -48,7 +48,6 @@
}
},
onLoad(options) {
console.log(options)
this.studentId = options.studentId
this.getStudentScore()
},
@ -61,7 +60,6 @@
},
lookbook(item) {
console.log(item)
uni.showLoading({
title: '获取报告中'
});
@ -69,7 +67,6 @@
wx.downloadFile({
url: baseurl + item.downloadAddress,
success: function(res) {
console.log(res)
var filePath = res.tempFilePath;
wx.openDocument({
filePath: filePath,
@ -90,26 +87,20 @@
})
}
});
// getReportDownAddress(this.studentId, item.batchCode).then(res => {
// console.log(res)
// if (res.data.downloadAddress != null) {
// }
// })
},
getStudentScore() {
getStudentScore(this.studentId).then(res => {
console.log((res))
this.StudentScore = res.data;
})
},
getPhoneNumberp(val) {
wx.login({
provider: 'weixin',
success: function(loginRes) {
console.log(loginRes)
}
success: function(loginRes) {}
});
},
wxGetUserInfo() {
@ -118,7 +109,6 @@
desc: "获取用户信息",
lang: "zh_CN",
success(res) {
console.log(res)
that.yonghuwx = res.userInfo
},
fail(res) {

View File

@ -105,8 +105,6 @@
</view>
<u-toast ref="uToast" />
</view>
<!-- <u-toast ref="uToast" /> -->
</view>
</template>
<script>
import {
@ -180,7 +178,7 @@
this.getInfoByPhoneinfo()
}
this.$refs.uToast.show({
message: "登录成功",
title: "登录成功",
type: 'success',
duration: '5000'
})
@ -189,7 +187,6 @@
url: '/pages/homepage/homepage'
})
}, 500)
this.login = true
this.stuinfos = true
this.tip = false

View File

@ -26,11 +26,11 @@
{{item.totalFraction}}
<span></span>
</view>
<view class="baogao">
<view class="baogao" @tap='lookbook(item)'>
<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 class="look" v-if="item.existFlag==false">暂无报告</view>
<view class="lookreport" v-else>查看报告</view>
</view>
</view>
<view class="prescription" v-if="studentInfoList==0">
@ -87,9 +87,7 @@
<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>
@ -114,10 +112,10 @@
{{item.totalFraction}}
<span></span>
</view>
<view class="baogao">
<view class="baogao" @tap='lookbooklist(item)'>
<view class="image">
</view>
<view class="lookreport" @tap='lookbooklist(item)'>查看处方</view>
<view class="lookreport">查看处方</view>
</view>
</view>
</view>
@ -132,7 +130,6 @@
getMotionPrescription,
getInfoByPhone,
prescriptionVideoLogging,
prescriptionLogging
} from '@/api/index/index.js'
import baseurl from '@/api/baseurl.js'
@ -151,7 +148,6 @@
batchCode: "",
phone: "",
studentList: [],
}
},
onShow() {
@ -162,9 +158,7 @@
success: function(res) {
that.phone = res.data
},
fail: function(err) {
}
fail: function(err) {}
});
uni.getStorage({
key: 'user',
@ -179,24 +173,23 @@
url: "/pages/index/index"
})
} else {
var arr = {
"studentIdList": obj
}
getChildrenResultScore(arr).then(res => {
this.StudentScore = res.data
if(this.StudentScore.length==1){
if (this.StudentScore.length == 1) {
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
el.prescriptionVideoUrl = baseurl + el
.prescriptionVideoUrl
})
})
})
this.infolist();
}
})
}
},
@ -206,55 +199,50 @@
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'
})
}
});
if (item.existFlag == false) {
this.$refs.uToast.show({
title: "暂无报告",
type: 'error',
duration: 1000
})
} else {
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')
})
prescriptionLogging(items).then(res => {})
},
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}`
@ -344,9 +332,9 @@
flex-wrap: wrap;
video {
width: 47%;
margin-left: 3%;
height: 194rpx;
width: 47%;
margin-left: 3%;
height: 194rpx;
}
@ -455,7 +443,7 @@
background: #fff;
box-shadow: 0px 3px 18px 0px rgba(182, 218, 213, 0.43);
width: 90%;
margin: 0 auto;
margin: 0 auto;
height: 268rpx;
border-radius: 10rpx;
position: relative;