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="app">
<view class="health" v-if="healthdata"> <view class="health" v-if="healthdata">
<view class="health_top"> <view class="health_top">
<image v-if="healthdata.hiEva<650" :src="require('../images/red.png')" /> <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 >= 650&&healthdata.hiEva<850"
<image v-else-if="healthdata.hiEva>=850" :src="require('../images/green.png')" /> :src="require('../images/yellow.png')" />
<image v-else-if="healthdata.hiEva >=850" :src="require('../images/green.png')" />
<view class="count"> <view class="count">
<view class="numbers">{{healthdata.hiEva}}</view> <view class="numbers">{{healthdata.hiEva}}</view>
<view class="healths">健康指数</view> <view class="healths">健康指数</view>

View File

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

View File

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

View File

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