This commit is contained in:
2024-05-12 11:31:23 +08:00
parent ceec734c7e
commit 92d01fb329
4 changed files with 54 additions and 39 deletions

View File

@ -2,9 +2,10 @@
<view class="app">
<view class="health" v-if="healthdata">
<view class="health_top">
<image v-if="healthdata.hiEva<650" :src="require('../images/red.png')" />
<image v-else-if="850>healthdata.hiEva >= 650" :src="require('../images/yellow.png')" />
<image v-else-if="healthdata.hiEva>=850" :src="require('../images/green.png')" />
<image v-if="healthdata.hiEva < 650" :src="require('../images/red.png')" />
<image v-else-if="healthdata.hiEva >= 650&&healthdata.hiEva<850"
:src="require('../images/yellow.png')" />
<image v-else-if="healthdata.hiEva >=850" :src="require('../images/green.png')" />
<view class="count">
<view class="numbers">{{healthdata.hiEva}}</view>
<view class="healths">健康指数</view>

View File

@ -1,9 +1,9 @@
<template>
<view class="app">
<view class="prescription" v-if="lastrecodedata.ptList">
<!-- <view class="record" @tap="recorddata()">
<view class="record" @tap="recorddata()">
处方记录
</view> -->
</view>
<view class="recorditem">
<u-collapse :item-style="itemStyle" :accordion='false' :arrow="false">
<u-collapse-item :title="item.tempName" :open="item.open"

View File

@ -4,32 +4,34 @@
<view class="left">
<u-collapse :accordion='false'>
<u-collapse-item :title="item.year" v-for="(item, index) in itemlistleft" :key="index"
:class="item.check?'headcollapse':''" @change='tapcollapseleft(item)'>
:class="item.check?'headcollapse':''" @change='tapcollapseleft(item)' :open="item.open">
<view class="itemtext" v-for="aitem in item.list" @tap="dataies(aitem)">
<view class="left">
<view class="left" :style="recordCode == aitem.recordCode ? 'color:#26A888' : ''">
{{aitem.recordDate}}
</view>
</view>
</u-collapse-item>
</u-collapse>
</view>
<view class="right">
<u-collapse :item-style="itemStyle" :arrow="false" :accordion='false'>
<u-collapse-item :title="item.tempName" v-for="(item, index) in itemList.ptList" :key="index"
@change='tapcollapse(item)' :class="item.check?'headcollapse':''">
<u-collapse-item :title="item.tempName" v-for="(item, index) in itemList.ptList" :open="item.open"
:key="index" @change='tapcollapse(item)' :class="item.check?'headcollapse':''">
<view class="itemtext">
<view class="collapse_top" v-for="uitem in item.ptValList">
<u-icon name="star-fill" color="#000" size="28" v-if="uitem.itemType=='1' || uitem.itemType=='2' ||uitem.itemType=='3'"></u-icon>
<u-icon name="star-fill" color="#000" size="28"
v-if="uitem.itemType=='1' || uitem.itemType=='2' ||uitem.itemType=='3'"></u-icon>
<span style="margin-left: 10rpx;" v-if="uitem.itemType=='1'">健康生活方式 </span>
<span style="margin-left: 10rpx;" v-if="uitem.itemType=='2'">治疗与康复</span>
<span style="margin-left: 10rpx;" v-if="uitem.itemType=='3'">急症处理</span>
<view class="itemsdata">
<view class="itemword" v-if="uitem.val=='true'">
<u-checkbox active-color="#26A888" v-model="checked"> {{uitem.content}}</u-checkbox>
<u-checkbox active-color="#26A888" v-model="checked" disabled>
{{uitem.content}}</u-checkbox>
</view>
<view class="itemword" v-if="uitem.val==null || uitem.val=='false'">
<u-checkbox active-color="#26A888" v-model="checkedfalse">{{uitem.content}}</u-checkbox>
<u-checkbox active-color="#26A888" disabled
v-model="checkedfalse">{{uitem.content}}</u-checkbox>
</view>
</view>
</view>
@ -44,18 +46,21 @@
</template>
<script>
import {dayList,detail} from "@/api/pagesB/threeHundredAndSixty/threeHundredAndSixty.js"
import {
dayList,
detail
} from "@/api/pagesB/threeHundredAndSixty/threeHundredAndSixty.js"
export default {
data() {
return {
show:true,
checked:true,
checkedfalse:false,
lastrecodedata:null,
cardNo:'',
show: true,
checked: true,
checkedfalse: false,
lastrecodedata: null,
cardNo: '',
itemlistleft: [],
itemList: [],
recordCode:'',
recordCode: '',
}
},
mounted() {
@ -63,16 +68,18 @@
},
methods: {
lastrecodelist() {
if (uni.getStorageSync("userinfo").cardNo) {
this.cardNo=uni.getStorageSync("userinfo").cardNo
// this.cardNo = '370522196411282177'
if (uni.getStorageSync("userinfo")) {
this.cardNo = uni.getStorageSync("userinfo").cardNo
dayList(this.cardNo).then(res => {
this.itemlistleft = res.data
this.recordCode=res.data[0].list[0].recordCode
console.log(this.recordCode)
this.itemlistleft.length > 0 ? this.itemlistleft[0].open = true : ''
res.data && res.data[0].list.length > 0 ? this.recordCode = res.data[0].list[0]
.recordCode : ''
detail(this.recordCode).then(res => {
this.itemList = res.data
this.show=false
this.itemList && this.itemList.ptList.length > 0 ? this.itemList.ptList[0]
.open = true : ''
this.show = false
})
})
}
@ -80,28 +87,29 @@
tapcollapse(item) {
item.check = !item.check
},
dataies(aitem){
console.log(aitem,'aitem')
this.recordCode=aitem.recordCode
dataies(aitem) {
this.recordCode = aitem.recordCode
detail(this.recordCode).then(res => {
this.itemList = res.data
})
},
tapcollapseleft(item){
console.log(item)
tapcollapseleft(item) {
item.check = !item.check
}
}
}
</script>
<style lang="scss">
::v-deep .u-checkbox__icon-wrap--disabled--checked {
background-color: #2979ff !important;
border-color: #2979ff !important;
}
page {
background-color: #fff;
}
.app {
// height: 100vh;
padding: 32rpx 10rpx;
@ -112,6 +120,7 @@
width: 100%;
// height: 100vh;
display: flex;
.left {
// height: 100vh;
@ -124,6 +133,7 @@
padding-left: 10rpx;
font-weight: 600;
}
::v-deep .u-collapse-head {
width: 96%;
margin: 0 auto;
@ -172,14 +182,17 @@
.right {
// height: 100vh;
width: 77%;
::v-deep .u-collapse-title {
font-size: 30rpx;
font-weight: 600;
padding-left: 10rpx;
}
::v-deep .u-icon--right {
color: #26A888 !important;
}
.headcollapse {
::v-deep .u-collapse-head {
border-bottom: 2rpx solid #E6E6E6;

View File

@ -10,7 +10,7 @@
</view>
<!-- 健康处方 -->
<view class="" v-if="tabscurrent==2">
<Precords></Precords>
<Prescriptionrecords></Prescriptionrecords>
</view>
<!-- 疾病预警 -->
<view class="disease" v-if="tabscurrent==1">
@ -311,12 +311,12 @@
import {
riskWarning,
} from '@/api/pagesB/threeHundredAndSixty/threeHundredAndSixty.js'
import Precords from '../Precords/Precords.vue'
import Prescriptionrecords from '../Prescriptionrecords/Prescriptionrecords.vue'
import Healthindex from '../Healthindex/Healthindex.vue'
import baseurl from '@/api/baseurl.js'
export default {
components: {
Precords,
Prescriptionrecords,
Healthindex
},
data() {
@ -441,6 +441,7 @@
background-repeat: no-repeat;
text-align: center;
font-size: 36rpx;
padding-top: 0;
.top {
width: 100%;