记录列表,页面记录,首页调整

This commit is contained in:
唐明明
2022-07-15 14:33:32 +08:00
parent 9b5cd140dd
commit 68f2e5967f
10 changed files with 93 additions and 28 deletions

View File

@@ -41,9 +41,12 @@ const goutCover = (case_id, data) => {
}
// 查看尿酸
const lastLog = () => {
const lastLog = type => {
return request({
url: 'gout/result/last_log'
url: 'gout/result/last_log',
data: {
type
}
})
}

View File

@@ -40,7 +40,7 @@
"aliasPath": "/purine/index",
"name": "purineIndex",
"style":{
"navigationBarTitleText":"嘌呤列表"
"navigationBarTitleText":"健康饮食"
}
}, {
"path": "pages/purine/details",
@@ -55,7 +55,7 @@
"name": "uricacidIndex",
"auth": true,
"style":{
"navigationBarTitleText":"尿酸值"
"navigationBarTitleText":"记录"
}
}, {
"path": "pages/uricacid/list",
@@ -63,7 +63,7 @@
"name": "uricacidList",
"auth": true,
"style":{
"navigationBarTitleText":"尿酸列表"
"navigationBarTitleText":"记录列表"
}
}, {
"path": "pages/attestation/index",
@@ -137,7 +137,7 @@
}],
"borderStyle": "white",
"backgroundColor": "#FFFFFF",
"selectedColor": "#6a7df3",
"selectedColor": "#4490ff",
"color": "#9d9d9d",
"iconWidth": "26px",
"spacing": "0",

View File

@@ -7,8 +7,8 @@
<view class="tools-box tools-flex">
<view class="item item-sm" @click="$Router.push({name: 'purineIndex'})">
<view class="item-content">
<view class="title">嘌呤查询</view>
<view class="submit">知识小科普</view>
<view class="title">健康饮食</view>
<view class="submit">食品知识小科普</view>
</view>
<image class="item-icon" src="@/static/icons/tool_icon_00.png" mode="widthFix"></image>
</view>

View File

@@ -1,9 +1,14 @@
<template>
<view class="content">
<view class="tabs">
<view class="tabs-item" :class="tabType == 'hyperglycemia' ? 'active': ''" @click="onTab('hyperglycemia')">血糖记录</view>
<view class="tabs-item" :class="tabType == 'hyperlipidemia' ? 'active': ''" @click="onTab('hyperlipidemia')">血脂记录</view>
<view class="tabs-item" :class="tabType == 'hypertension' ? 'active': ''" @click="onTab('hypertension')">血压记录</view>
</view>
<view class="While">
<view class="top">
<view class="top-time">
{{ lastData.log ? lastData.log.created_at : '您还没有上传过尿酸值' }}
{{ lastData.log ? lastData.log.created_at : '您还没有上传过血糖值' }}
</view>
<view v-if="lastData.log" class="top-record" @click="$Router.push({name: 'uricacidList', params: {id: lastData.caseId}})">
所有记录
@@ -19,17 +24,17 @@
</block>
</view>
<view class="uricacid-tips">
<text>男性尿酸指标 {{ lastData.Newscope.man }}</text>
<text>女性尿酸指标 {{ lastData.Newscope.woman }}</text>
<text>男性血糖指标 {{ lastData.Newscope.man }}</text>
<text>女性血糖指标 {{ lastData.Newscope.woman }}</text>
</view>
</view>
</view>
<view class="While analyse">
<view class="analyse-title">
尿酸趋势分析
血糖趋势分析
</view>
<view class="analyse-text" v-if="lastData.log">
当前尿酸值为{{ lastData.log.quantity }}umol,
当前血糖值为{{ lastData.log.quantity }}umol,
<block v-if="lastData.Newscope.scope">
{{ lastData.log.quantity > lastData.Newscope.scope.max ? '高于' : '低于' }}{{ lastData.Newscope.scope.max }}umol
{{ lastData.log.quantity > lastData.Newscope.scope.max ? '您的尿酸水平偏高,根据治疗指南需要进行治疗干预。需要生活控制(多喝水,饮食控制、并发症危险因素的控制、碱化尿液),配合药物治疗。具体情况请遵循医嘱。' : '您的尿酸水平控制很棒,请继续保持' }}
@@ -104,7 +109,8 @@
cover : {
showpath: '',
path : ''
}
},
tabType : 'hyperglycemia'
}
},
onShow() {
@@ -112,9 +118,14 @@
this.lastInfo();
},
methods: {
// 切换数据
onTab(e){
this.tabType = e;
this.lastInfo()
},
// 尿酸数据
lastInfo() {
lastLog().then(res => {
lastLog(this.tabType).then(res => {
this.lastData.Newscope = res.scope
this.lastData.log = res.log
this.lastData.caseId = res.case.gout_case_id
@@ -189,8 +200,27 @@
.content{
overflow: hidden;
background: #f3f4f6;
min-height: 100vh;
}
.tabs{
background-color: white;
border-radius: 0 0 10rpx 10rpx;
box-shadow: 0 0 10rpx rgba($color: #000000, $alpha: .05);
margin-bottom: 30rpx;
padding: 0 30rpx;
display: flex;
justify-content: space-around;
.tabs-item{
line-height: 100rpx;
color: #888;
&.active{
font-weight: bold;
color: $mian-color;
}
}
}
.While {
border-radius: 10rpx;
margin-bottom: 30rpx;
@@ -246,7 +276,7 @@
font-size: 26rpx;
}
.analyse-btn {
background-color: #6e79ec;
background-color: #4490ff;
color: #FFFFFF;
text-align: center;
border-radius: 80rpx;

View File

@@ -1,5 +1,10 @@
<template>
<view class="content">
<view class="tabs">
<view class="tabs-item" :class="tabType == 'hyperglycemia' ? 'active': ''" @click="onTab('hyperglycemia')">血糖记录</view>
<view class="tabs-item" :class="tabType == 'hyperlipidemia' ? 'active': ''" @click="onTab('hyperlipidemia')">血脂记录</view>
<view class="tabs-item" :class="tabType == 'hypertension' ? 'active': ''" @click="onTab('hypertension')">血压记录</view>
</view>
<block v-if="LogArr.length > 0">
<view class="While list">
<view class="list-label" v-for="(item, index) in LogArr" :key="index" @click="showSee(item.gout_case_log_id)">
@@ -84,7 +89,8 @@
LogId : '', //记录id
recordShow : false,
page : {}, //分页信息
lodingStats : false //加载状态
lodingStats : false ,//加载状态
tabType : 'hyperglycemia'
}
},
onLoad() {
@@ -92,10 +98,17 @@
this.lastInfo();
},
methods: {
// 切换数据
onTab(e){
this.tabType = e;
this.page = {};
this.lastInfo()
},
// 尿酸数据
lastInfo(page) {
ListLog(this.$Route.query.id,{
page : page || ''
page : page || 1,
type : this.tabType
}).then(res => {
let listArr = this.LogArr,
newData = []
@@ -185,8 +198,27 @@
.content{
overflow: hidden;
background: #f3f4f6;
min-height: 100vh;
}
.tabs{
background-color: white;
border-radius: 0 0 10rpx 10rpx;
box-shadow: 0 0 10rpx rgba($color: #000000, $alpha: .05);
margin-bottom: 30rpx;
padding: 0 30rpx;
display: flex;
justify-content: space-around;
.tabs-item{
line-height: 100rpx;
color: #888;
&.active{
font-weight: bold;
color: $mian-color;
}
}
}
.While {
border-radius: 10rpx;
margin-bottom: 30rpx;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB