更新检验报告页面、版本号2.1.0(5)、首页活动改为下拉刷新
diff --git a/pages/sub_medical/images/img.png b/pages/sub_medical/images/img.png
new file mode 100644
index 0000000..59c5ed1
--- /dev/null
+++ b/pages/sub_medical/images/img.png
Binary files differ
diff --git a/pages/sub_medical/reportDetail.vue b/pages/sub_medical/reportDetail.vue
index 9f14cf1..2147440 100644
--- a/pages/sub_medical/reportDetail.vue
+++ b/pages/sub_medical/reportDetail.vue
@@ -1,37 +1,273 @@
<template>
- <view class="reportDetail">
- <view class="reportDetail-title">
- <text>体测报告</text>
+ <view class="container">
+ <view class="detail">
+ <view class="detail-title">
+ <text class="detail-title-title">检验报告单</text>
+ <view class="detail-title-no">
+ <text class="bold">血细胞分析</text>
+ <view class="detail-title-no-no">
+ <text class="bold">门诊</text>
+ <view><text class="bold">编号:</text><text class="dash">{{no}}</text></view>
+ </view>
+ </view>
+ </view>
</view>
- <view class="reportDetail-content">
- <text>体测报告</text>
+ <view class="msg">
+ <view class="msg-item" v-for="(v,i) in list" :key='i'>
+ <text class="msg-item-text">{{v.text}}</text>
+ <text class="msg-item-value">{{v.value}}</text>
+ </view>
+ </view>
+ <view class="report">
+ <view class="report-item" v-for="(v,i) in report" :key='i'>
+ <view class="report-item-title">
+ <u-image src="./images/img.png" width="60" height="60" mode="aspectFit"></u-image>
+ <text class="report-item-title-text">{{v.title}}<text style="color: #6E6E6E;font-weight: 500;margin-left: 10rpx;">{{v.unit}}</text></text>
+ </view>
+ <view class="report-item-con">
+ <view class="report-item-con-line">
+ <view class="report-item-con-line-word" :style="{'color':v.color,'left':v.left}">{{v.value}}</view>
+ <view class="report-item-con-line-circle" :style="{'left':v.left}">
+ <view class="report-item-con-line-circle-circle" :style="{'background-color':v.color}"></view>
+ </view>
+ <view class="report-item-con-line-progress" :style="{'background-color':v.color}">
+ <view class="report-item-con-line-progress-con" >
+ <text>{{v.min}}</text>
+ <text>正常</text>
+ <text>{{v.max}}</text>
+ </view>
+ </view>
+ </view>
+ </view>
+ </view>
</view>
</view>
</template>
<script>
- export default{
- data(){
- return{
-
+ export default {
+ data() {
+ return {
+ color:'red',
+ no:'12-202020ei0002',
+ list: [{
+ text: '姓名:',
+ value: '里*在'
+ }, {
+ text: '性别:',
+ value: '男'
+ }, {
+ text: '年龄:',
+ value: '71'
+ },
+ {
+ text: '样本类型:',
+ value: '全血'
+ }, {
+ text: '门诊:',
+ value: '1010'
+ }, {
+ text: '科室:',
+ value: '全科门诊'
+ },
+ ],
+ report: [{
+ title: '红细胞分布宽度变异系数',
+ value: '0.32',
+ unit:'(10^9/升)',
+ max:'0.5',
+ min:'0',
+ color:'red',
+ left:'0'
+ }, {
+ title: '判断',
+ value: '0.70',
+ unit:'(10^9/升)',
+ max:'0.5',
+ min:'0.2',
+ color:'green',
+ left:'0'
+ }, {
+ title: '报告备注',
+ value: '0.07',
+ unit:'(10^9/升)',
+ max:'0.5',
+ min:'0',
+ color:'blue',
+ left:'0'
+ }, ]
}
+ },
+ methods:{
+ move(){
+ let list = this.report
+ list.forEach(item=>{
+ let progress = 350
+ let margin_left = 170
+ let total_length = Math.abs(Number(item.max) - Number(item.min)).toFixed(2)
+ let now_length = Math.abs(Number(item.value) - Number(item.min)).toFixed(2)
+ //console.log(now_length)
+ if(Number(item.value) < Number(item.max) && Number(item.value) > Number(item.min)){
+ let left = margin_left + (now_length / total_length) * progress
+ item.left = left + 'rpx'
+ }else if(Number(item.value) < Number(item.min)){
+ let left = margin_left - (now_length / total_length) * progress > 0 ? margin_left - (now_length / total_length) * progress : 30 + Math.random()*100
+ item.left = left + 'rpx'
+ }else{
+ //console.log(margin_left + (now_length / total_length) * progress)
+ let left = margin_left + (now_length / total_length) * progress < 750 ? margin_left + (now_length / total_length) * progress : 550 + Math.random()*100
+ item.left = left + 'rpx'
+ }
+ })
+ console.log(list)
+ }
+ },
+ onLoad(){
+ this.move()
}
}
</script>
<style lang="scss" scoped>
- .reportDetail{
- font-family: "PingFang-SC-Medium";
- padding: 30rpx;
- &-title{
- display: flex;
- justify-content: center;
- font-size: 32rpx;
- font-weight: bold;
+ .container {
+ .detail {
+ width: 100%;
+ margin-bottom: 10rpx;
+ background-color: #FFFFFF;
+ padding: 30rpx;
+
+ &-title {
+ display: flex;
+ justify-content: center;
+ flex-direction: column;
+ font-size: 36rpx;
+ color: #333333;
+
+ &-title {
+ text-align: center;
+ font-weight: bold;
+ margin-bottom: 20rpx;
+ }
+
+ &-no {
+ display: flex;
+ flex-direction: column;
+ font-size: 32rpx;
+ &-no{
+ display: flex;
+ justify-content: space-between;
+ margin-top: 20rpx;
+ }
+ }
+ }
}
- &-content{
- font-size: 28rpx;
+
+ .msg {
+ background-color: #FFFFFF;
+ padding: 30rpx;
+ display: flex;
+ justify-content: space-between;
+ flex-wrap: wrap;
+ margin-bottom: 20rpx;
+
+ &-item {
+ width: 33%;
+ padding: 10rpx 0;
+ font-size: 28rpx;
+
+ &-text {
+ color: #6E6E6E;
+ margin-right: 10rpx;
+ }
+
+ &-value {
+ color: #333333;
+ font-weight: bold;
+ }
+ }
+ }
+
+ .report {
+ &-item {
+ background: #FFFFFF;
+ padding: 30rpx;
+ margin-bottom: 20rpx;
+ &-title {
+ display: flex;
+ align-items: center;
+ font-weight: bold;
+
+ &-text {
+ margin-left: 20rpx;
+ font-size: 28rpx;
+ }
+ }
+ &-con {
+ padding: 150rpx 0 50rpx;
+ &-line{
+ height: 2px;
+ background-color: #6E6E6E;
+ opacity: .4;
+ position: relative;
+ width: 690rpx;
+ z-index: 1;
+ &-word{
+ position: absolute;
+ top: -80rpx;
+ font-size: 36rpx;
+ transform: translateX(-50%);
+ // color: red;
+ // margin-left: -10rpx;
+ }
+ &-circle{
+ position: absolute;
+ width: 20rpx;
+ height: 20rpx;
+ background-color: #FFFFFF;
+ border-radius: 50%;
+ top: 0;
+ transform: translateY(-50%);
+ left: 20rpx;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ box-shadow: 0rpx 0rpx 20rpx #000000;
+ z-index: 3;
+ &-circle{
+ width: 10rpx;
+ height: 10rpx;
+ border-radius: 50%;
+ // background-color: red;
+ }
+ }
+ &-progress{
+ width: 350rpx;
+ margin-left: 170rpx;
+ height: 2px;
+ // background-color: red;
+ position: relative;
+ z-index: 2;
+ &-con{
+ position: absolute;
+ display: flex;
+ justify-content: space-between;
+ width: 350rpx;
+ top: 10rpx;
+ }
+ }
+ }
+ }
+ }
}
}
-
+
+ .bold {
+ font-weight: bold;
+ }
+
+ .dash {
+ display: inline-block;
+ border-bottom: 1px dashed #333333;
+ margin-left: 10rpx;
+ }
</style>
diff --git a/pages/sub_medical/reportDetail1.vue b/pages/sub_medical/reportDetail1.vue
new file mode 100644
index 0000000..4bc614c
--- /dev/null
+++ b/pages/sub_medical/reportDetail1.vue
@@ -0,0 +1,166 @@
+<template>
+ <view class="container">
+ <view class="detail">
+ <view class="detail-title">
+ <text class="detail-title-title">检查报告单</text>
+ <view class="detail-title-no"><text class="bold">编号:</text><text class="dash">{{no}}</text></view>
+ </view>
+ </view>
+ <view class="msg">
+ <view class="msg-item" v-for="(v,i) in list" :key='i'>
+ <text class="msg-item-text">{{v.text}}</text>
+ <text class="msg-item-value">{{v.value}}</text>
+ </view>
+ </view>
+ <view class="report">
+ <view class="report-item" v-for="(v,i) in report" :key='i'>
+ <view class="report-item-title">
+ <u-image src="./images/img.png" width="60" height="60" mode="aspectFit"></u-image>
+ <text class="report-item-title-text">{{v.title}}</text>
+ </view>
+ <view class="report-item-con">
+ <text class="report-item-con-con">{{v.value}}</text>
+ </view>
+ </view>
+ </view>
+ </view>
+</template>
+
+<script>
+ export default {
+ data() {
+ return {
+ no:'3209',
+ list: [{
+ text: '姓名:',
+ value: '张三'
+ }, {
+ text: '性别:',
+ value: '男'
+ },
+ {
+ text: '年龄:',
+ value: '52'
+ }, {
+ text: '检查项目:',
+ value: '上腹部+泌尿系统'
+ },
+ {
+ text: '申请科室:',
+ value: '综合科'
+ }, {
+ text: '阴阳性:',
+ value: ''
+ },
+ {
+ text: '检查科室:',
+ value: '彩超室'
+ }, {
+ text: '检查部位:',
+ value: '上腹部+泌尿系统'
+ },
+ {
+ text: '检查日期:',
+ value: '2020-12-11 08:57:04'
+ }, {
+ text: '报告时间:',
+ value: '2020-12-13 08:57:04'
+ },
+ ],
+ report:[
+ {title:'检查所见',value:'无'},
+ {title:'判断',value:'无'},
+ {title:'报告备注',value:'无'},
+ ]
+ }
+ },
+ }
+</script>
+
+<style lang="scss" scoped>
+ .bold {
+ font-weight: bold;
+ }
+
+ .dash {
+ display: inline-block;
+ border-bottom: 1px dashed #333333;
+ }
+
+ .container {
+ font-family: "PingFang-SC-Medium";
+
+ .detail {
+ width: 100%;
+ margin-bottom: 10rpx;
+ background-color: #FFFFFF;
+ padding: 30rpx;
+
+ &-title {
+ display: flex;
+ justify-content: center;
+ flex-direction: column;
+ font-size: 32rpx;
+ color: #333333;
+ &-title {
+ text-align: center;
+ font-weight: bold;
+ margin-bottom: 20rpx;
+ }
+
+ &-no {
+ text-align: right;
+ font-size: 28rpx;
+ }
+ }
+ }
+
+ .msg {
+ background-color: #FFFFFF;
+ padding: 30rpx;
+ display: flex;
+ justify-content: space-between;
+ flex-wrap: wrap;
+ margin-bottom: 20rpx;
+
+ &-item {
+ width: 50%;
+ padding: 10rpx 0;
+ font-size: 24rpx;
+ &-text {
+ color: #6E6E6E;
+ margin-right: 10rpx;
+ }
+
+ &-value {
+ color: #333333;
+ font-weight: bold;
+ }
+ }
+ }
+
+ .report {
+ &-item {
+ background: #FFFFFF;
+ padding: 30rpx;
+ margin-bottom: 20rpx;
+ &-title {
+ display: flex;
+ align-items: center;
+ font-weight: bold;
+ &-text {
+ margin-left: 20rpx;
+ font-size: 28rpx;
+ }
+ }
+ &-con {
+ text-align: justify;
+ padding: 20rpx 0;
+ &-con {
+ color: #6E6E6E;
+ }
+ }
+ }
+ }
+ }
+</style>
diff --git a/pages/sub_tabbar/active.vue b/pages/sub_tabbar/active.vue
index 3dfd6b1..3f6b446 100644
--- a/pages/sub_tabbar/active.vue
+++ b/pages/sub_tabbar/active.vue
@@ -119,27 +119,32 @@
totalPageOff: ""
}
},
- onShow() {
+ async onPullDownRefresh(){
let that = this
- // #ifdef APP-PLUS
- let stopShowTwice = uni.getStorageSync("stopShowTwice")
- if (stopShowTwice) {
- return false
- }
- // #endif
+ // // #ifdef APP-PLUS
+ // let stopShowTwice = uni.getStorageSync("stopShowTwice")
+ // if (stopShowTwice) {
+ // return false
+ // }
+ // // #endif
let token = uni.getStorageSync('token')
that.pagenoOn = 1
that.list[0].list = []
that.pagenoOff = 1
that.list[1].list = []
- that.getActivity(1, "OnlineActivities")
- that.getActivity(1, "OfflineActivities")
- // #ifdef APP-PLUS
- uni.setStorageSync("stopShowTwice", true)
- // #endif
+ await that.getActivity(1, "OnlineActivities")
+ await that.getActivity(1, "OfflineActivities")
+ // // #ifdef APP-PLUS
+ // uni.setStorageSync("stopShowTwice", true)
+ // // #endif
if (token) {
that.getIntegralStatus()
}
+ uni.stopPullDownRefresh()
+ },
+ onLoad() {
+ this.getActivity(1, "OnlineActivities")
+ this.getActivity(1, "OfflineActivities")
},
methods: {
getActivity(no, code) {
diff --git a/pages/sub_tabbar/index.vue b/pages/sub_tabbar/index.vue
index b410b23..a2f261e 100644
--- a/pages/sub_tabbar/index.vue
+++ b/pages/sub_tabbar/index.vue
@@ -142,7 +142,6 @@
}
},
onShow() {
- this.getActivityList()
},
methods: {
search(e) {
@@ -158,27 +157,18 @@
// #ifndef H5
// 只允许通过相机扫码
uni.scanCode({
- // onlyFromCamera: true,
- // scanType: ['qrCode',"barCode","datamatrix","pdf417"],
success: function(res) {
- //uni.vibrate({})
- //console.log('条码类型:' + res.scanType);
- //console.log('条码内容:' + res.result);
let url = res.result
uni.showToast({
title: "扫描成功",
icon: "none",
duration: 800,
complete() {
- // setTimeout(() => {
- // uni.navigateTo({
- // url: "/pages/sub_index/scanView/index?url=" + url
- // })
- // }, 1500)
let param = {
url: url
}
that.$u.get('/v1/qrcode/auth', param).then(ret => {
+ //console.log(ret.data.url)
if (ret.data.permit) {
if (ret.data.action == 'water') {
setTimeout(() => {
@@ -285,6 +275,10 @@
// #endif
+ },
+ async onPullDownRefresh(){
+ await this.getActivityList()
+ uni.stopPullDownRefresh()
}
}
</script>