修改
This commit is contained in:
parent
0e232f6324
commit
5b1ba2bf71
@ -12,3 +12,25 @@ export function riskWarning(identity) {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 健康指数
|
||||||
|
export function healthIndexdata(identity) {
|
||||||
|
return request({
|
||||||
|
url: '/applet/360/portrait/healthIndex/'+identity,
|
||||||
|
method: 'GET',
|
||||||
|
header: {
|
||||||
|
region: uni.getStorageSync('region'),
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 健康处方
|
||||||
|
|
||||||
|
export function lastrecode(identity) {
|
||||||
|
return request({
|
||||||
|
url: '/applet/360/portrait/record/detail/last/'+identity+'/0',
|
||||||
|
method: 'GET',
|
||||||
|
header: {
|
||||||
|
region: uni.getStorageSync('region'),
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
22
pages.json
22
pages.json
@ -468,6 +468,28 @@
|
|||||||
"navigationBarTitleText" : "申请记录",
|
"navigationBarTitleText" : "申请记录",
|
||||||
"enablePullDownRefresh" : false
|
"enablePullDownRefresh" : false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "Prescriptionrecords/Prescriptionrecords",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : "健康教育处方记录",
|
||||||
|
"enablePullDownRefresh": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "Precords/Precords",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path" : "Healthindex/Healthindex",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationBarTitleText" : ""
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}, {
|
}, {
|
||||||
|
|||||||
@ -697,7 +697,7 @@
|
|||||||
that.form.cityCode = 2
|
that.form.cityCode = 2
|
||||||
}
|
}
|
||||||
if (that.form.sexname == '男') {
|
if (that.form.sexname == '男') {
|
||||||
that.f orm.sex = 'MALE';
|
that.form.sex = 'MALE';
|
||||||
} else if (that.form.sexname == '女') {
|
} else if (that.form.sexname == '女') {
|
||||||
that.form.sex = 'FEMALE';
|
that.form.sex = 'FEMALE';
|
||||||
}
|
}
|
||||||
|
|||||||
266
pagesB/Healthindex/Healthindex.vue
Normal file
266
pagesB/Healthindex/Healthindex.vue
Normal file
@ -0,0 +1,266 @@
|
|||||||
|
<template>
|
||||||
|
<view class="app">
|
||||||
|
<view class="health">
|
||||||
|
<view class="health_top">
|
||||||
|
|
||||||
|
<!-- <view class="right" @tap="healthtap()">
|
||||||
|
1
|
||||||
|
</view> -->
|
||||||
|
<image image v-if="healthdata.hiEva<650" :src="require('../images/red.png')">
|
||||||
|
<image image v-if="healthdata.hiEva>850" :src="require('../images/green.png')" image>
|
||||||
|
<image v-if="healthdata.hiEva > 650" :src="require('../images/yellow.png')" image>
|
||||||
|
<view class="count">
|
||||||
|
<view class="numbers">{{healthdata.hiEva}}</view>
|
||||||
|
<view class="healths">健康指数</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="health_body">
|
||||||
|
<view class="healthitem">
|
||||||
|
血压(mmHg):{{healthdata.physicalSign.bp.sbp}}/{{healthdata.physicalSign.bp.dbp}}
|
||||||
|
</view>
|
||||||
|
<view class="healthitem">
|
||||||
|
空腹血糖(mmol/L):{{healthdata.physicalSign.bg.bg}}
|
||||||
|
</view>
|
||||||
|
<view class="healthitem">
|
||||||
|
血脂(TC/LDL-C):{{healthdata.physicalSign.bf.tc}}/{{healthdata.physicalSign.bf.ldlc}}
|
||||||
|
</view>
|
||||||
|
<view class="healthitem">
|
||||||
|
体质指数(BMI):{{healthdata.physicalSign.bmi.bmi}}
|
||||||
|
</view>
|
||||||
|
<view class="healthitem">
|
||||||
|
腰围(cm):{{healthdata.physicalSign.waist.waist}}
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- 折线图 -->
|
||||||
|
<view class="zx">
|
||||||
|
<qiun-data-charts type="line" loadingType="0" :opts="line_opts" :ontouch="true" :chartData="datalist" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
healthIndexdata
|
||||||
|
} from "@/api/pagesB/threeHundredAndSixty/threeHundredAndSixty.js"
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
datalist: null,
|
||||||
|
checked: true,
|
||||||
|
cardNo: '',
|
||||||
|
healthdata: {},
|
||||||
|
line_opts: {
|
||||||
|
color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
|
||||||
|
"#ea7ccc"
|
||||||
|
],
|
||||||
|
dataLabel: true,
|
||||||
|
enableScroll: true,
|
||||||
|
touchMoveLimit: 24,
|
||||||
|
padding: [15, 10, 0, 15],
|
||||||
|
xAxis: {
|
||||||
|
lineHeight: 40,
|
||||||
|
disableGrid: true,
|
||||||
|
boundaryGap: "center",
|
||||||
|
fontSize: 10,
|
||||||
|
type: 'grid',
|
||||||
|
gridType: 'dash',
|
||||||
|
itemCount: 3, //x轴单屏显示数据的数量,默认为5个
|
||||||
|
scrollShow: true, //新增是否显示滚动条,默认false
|
||||||
|
scrollAlign: 'left', //滚动条初始位置
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
gridType: "dash",
|
||||||
|
dashLength: 2
|
||||||
|
},
|
||||||
|
extra: {
|
||||||
|
line: {
|
||||||
|
type: "straight",
|
||||||
|
width: 2,
|
||||||
|
activeType: "hollow"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
// 健康指数
|
||||||
|
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.infohealths()
|
||||||
|
console.log('0000000000')
|
||||||
|
this.getServerData()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
infohealths() {
|
||||||
|
if (uni.getStorageSync("userinfo").cardNo) {
|
||||||
|
// this.cardNo=uni.getStorageSync("userinfo").cardNo
|
||||||
|
this.cardNo = '370522196411282177'
|
||||||
|
healthIndexdata(this.cardNo).then(res => {
|
||||||
|
this.healthdata = res.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
getServerData() {
|
||||||
|
// if (this.healthdata) {
|
||||||
|
setTimeout(() => {
|
||||||
|
let res = {
|
||||||
|
categories: [],
|
||||||
|
series: [{
|
||||||
|
name: "成交量A",
|
||||||
|
data: [35, 8, 25, 37, 4, 20]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "成交量B",
|
||||||
|
data: [70, 40, 65, 100, 44, 68]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "成交量C",
|
||||||
|
data: [100, 80, 95, 150, 112, 132]
|
||||||
|
}, {
|
||||||
|
name: "成交量C",
|
||||||
|
data: [100, 80, 95, 150, 112, 132]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
console.log(res, 'res111')
|
||||||
|
res.series[0].name = this.healthdata.evaAnalysis.bg.series[0].name
|
||||||
|
res.categories = this.healthdata.evaAnalysis.bg.xValue
|
||||||
|
this.datalist = res
|
||||||
|
// res.series[0].data = this.healthdata.physicalSign.bf.xValue
|
||||||
|
// res.series[0].name=this.healthdata.evaAnalysis.bp.name
|
||||||
|
|
||||||
|
// res.series[1].name=this.healthdata.evaAnalysis.bg.name
|
||||||
|
// res.series[2].name=this.healthdata.evaAnalysis.bf.name
|
||||||
|
// res.series[3].name=this.healthdata.evaAnalysis.bmi.name
|
||||||
|
console.log(res, 'res')
|
||||||
|
|
||||||
|
// res.series[0].data = this.healthdata.physicalSign.bf.series.map(e => e.bg)
|
||||||
|
// res.categories = this.healthdata.evaAnalysis.map(e => e.timename + e.measureTime)
|
||||||
|
// this.datalist = res
|
||||||
|
// let restwo = {
|
||||||
|
// series: [{
|
||||||
|
// data: [{
|
||||||
|
// "name": "偏低" + this.healthdata.calc.lowerNum + "次",
|
||||||
|
// "value": this.healthdata.calc.lowerNum
|
||||||
|
// }, {
|
||||||
|
// "name": "正常" + this.healthdata.calc.normalNum + "次",
|
||||||
|
// "value": this.healthdata.calc.normalNum
|
||||||
|
// }, {
|
||||||
|
// "name": "偏高" + this.healthdata.calc.higherNum + "次",
|
||||||
|
// "value": this.healthdata.calc.higherNum
|
||||||
|
// }]
|
||||||
|
// }]
|
||||||
|
// };
|
||||||
|
// this.datalisttwo = restwo
|
||||||
|
}, 500)
|
||||||
|
// }
|
||||||
|
// //模拟从服务器获取数据时的延时
|
||||||
|
// setTimeout(() => {
|
||||||
|
// //模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
|
||||||
|
// let res = {
|
||||||
|
// categories: ["2018", "2019", "2020", "2021", "2022", "2023"],
|
||||||
|
// series: [{
|
||||||
|
// name: "成交量A",
|
||||||
|
// data: [35, 8, 25, 37, 4, 20]
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: "成交量B",
|
||||||
|
// data: [70, 40, 65, 100, 44, 68]
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: "成交量C",
|
||||||
|
// data: [100, 80, 95, 150, 112, 132]
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// };
|
||||||
|
// this.chartData = JSON.parse(JSON.stringify(res));
|
||||||
|
// }, 500);
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.app {
|
||||||
|
height: 100vh;
|
||||||
|
background-color: #fff;
|
||||||
|
// padding: 100rpx 40rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 36rpx;
|
||||||
|
// 健康
|
||||||
|
.health {
|
||||||
|
width: 100%;
|
||||||
|
margin: 0 auto;
|
||||||
|
|
||||||
|
// background: red;
|
||||||
|
.health_top {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
// height: 100%;
|
||||||
|
// background: #FBDA81;
|
||||||
|
.right {
|
||||||
|
position: relative;
|
||||||
|
font-size: 20rpx;
|
||||||
|
width: 30rpx;
|
||||||
|
height: 30rpx;
|
||||||
|
background: red;
|
||||||
|
top: 30rpx;
|
||||||
|
line-height: 30rpx;
|
||||||
|
left: 471rpx;
|
||||||
|
// left: 288rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 230rpx;
|
||||||
|
height: 230rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.count {
|
||||||
|
position: relative;
|
||||||
|
top: -158rpx;
|
||||||
|
|
||||||
|
.numbers {
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 25rpx;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.healths {
|
||||||
|
font-size: 22rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.health_body {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.healthitem {
|
||||||
|
text-align: left;
|
||||||
|
padding: 0 0 40rpx 62rpx;
|
||||||
|
font-size: 29rpx;
|
||||||
|
|
||||||
|
// padding-bottom: 40rpx;
|
||||||
|
// position: relative;
|
||||||
|
// left: -53rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.zx {
|
||||||
|
width: 100%;
|
||||||
|
height: 300rpx;
|
||||||
|
// background: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
166
pagesB/Precords/Precords.vue
Normal file
166
pagesB/Precords/Precords.vue
Normal file
@ -0,0 +1,166 @@
|
|||||||
|
<template>
|
||||||
|
<view class="app">
|
||||||
|
<view class="prescription">
|
||||||
|
<view class="record" @tap="recorddata()">
|
||||||
|
处方记录
|
||||||
|
</view>
|
||||||
|
<view class="recorditem">
|
||||||
|
<u-collapse :item-style="itemStyle" :arrow="false" :accordion='false'>
|
||||||
|
<u-collapse-item :title="item.tempName" v-for="(item, index) in lastrecodedata.ptList" :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"></u-icon>
|
||||||
|
<span style="margin-left: 10rpx;">健康生活方式</span> -->
|
||||||
|
<view class="itemsdata">
|
||||||
|
<view class="itemword">
|
||||||
|
<u-checkbox v-model="checked" >{{uitem.formName}}</u-checkbox>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="itemword">
|
||||||
|
<u-checkbox v-model="checked" >测试345353535</u-checkbox>
|
||||||
|
</view><view class="itemword">
|
||||||
|
<u-checkbox v-model="checked" >测试345353535</u-checkbox>
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</u-collapse-item>
|
||||||
|
</u-collapse>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {lastrecode} from "@/api/pagesB/threeHundredAndSixty/threeHundredAndSixty.js"
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
lastrecodedata:null,
|
||||||
|
cardNo:'',
|
||||||
|
itemList: [{
|
||||||
|
head: "赏识在于角度的转换",
|
||||||
|
body: "只要我们正确择取一个合适的参照物乃至稍降一格去看待他人,值得赏识的东西便会扑面而来",
|
||||||
|
open: true,
|
||||||
|
disabled: true
|
||||||
|
}, {
|
||||||
|
head: "生活中不是缺少美,而是缺少发现美的眼睛",
|
||||||
|
body: "学会欣赏,实际是一种积极生活的态度,是生活的调味品,会在欣赏中发现生活的美",
|
||||||
|
open: false,
|
||||||
|
}, {
|
||||||
|
head: "周围一些不起眼的人、事、物,或许都隐藏着不同凡响的智慧",
|
||||||
|
body: "但是据说雕刻大卫像所用的这块大理石,曾被多位雕刻家批评得一无是处,有些人认为这块大理石采凿得不好,有些人嫌它的纹路不够美",
|
||||||
|
open: false,
|
||||||
|
}],
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.lastrecodelist()
|
||||||
|
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
tapcollapse(item) {
|
||||||
|
item.check = !item.check
|
||||||
|
},
|
||||||
|
lastrecodelist() {
|
||||||
|
if (uni.getStorageSync("userinfo").cardNo) {
|
||||||
|
// this.cardNo=uni.getStorageSync("userinfo").cardNo
|
||||||
|
this.cardNo = '370522196411282177'
|
||||||
|
lastrecode(this.cardNo).then(res => {
|
||||||
|
this.lastrecodedata = res.data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 处方记录
|
||||||
|
recorddata() {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: "/pagesB/Prescriptionrecords/Prescriptionrecords"
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.app {
|
||||||
|
height: 100vh;
|
||||||
|
background-color: #fff;
|
||||||
|
// padding: 100rpx 40rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 36rpx;
|
||||||
|
// 健康处方
|
||||||
|
.prescription {
|
||||||
|
::v-deep .u-collapse-title {
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
padding-left: 10rpx;
|
||||||
|
}
|
||||||
|
.headcollapse {
|
||||||
|
::v-deep .u-collapse-head {
|
||||||
|
border-bottom: 2rpx solid #E6E6E6;
|
||||||
|
text-align: center !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .u-collapse-title {
|
||||||
|
color: #26A888;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
::v-deep .u-collapse-head {
|
||||||
|
width: 96%;
|
||||||
|
margin: 0 auto;
|
||||||
|
background: #169BD5 !important;
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.record {
|
||||||
|
color: #fff;
|
||||||
|
width: 250rpx;
|
||||||
|
height: 70rpx;
|
||||||
|
line-height: 70rpx;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
text-align: center;
|
||||||
|
margin-left: auto;
|
||||||
|
background: #169BD5;
|
||||||
|
font-size: 27rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.recorditem {
|
||||||
|
margin-top: 39rpx;
|
||||||
|
|
||||||
|
.itemtext{
|
||||||
|
.collapse_top{
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #000;
|
||||||
|
width: 94%;
|
||||||
|
line-height: 40rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 20rpx 20rpx;
|
||||||
|
.itemsdata{
|
||||||
|
width: 100%;
|
||||||
|
.itemword{
|
||||||
|
margin: 15rpx;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
230
pagesB/Prescriptionrecords/Prescriptionrecords.vue
Normal file
230
pagesB/Prescriptionrecords/Prescriptionrecords.vue
Normal file
@ -0,0 +1,230 @@
|
|||||||
|
<template>
|
||||||
|
<view class="app">
|
||||||
|
<view class="body">
|
||||||
|
<view class="left">
|
||||||
|
<u-collapse :accordion='false' :arrow="false">
|
||||||
|
<u-collapse-item :title="item.head" v-for="(item, index) in itemlistleft" :key="index"
|
||||||
|
:class="item.check?'headcollapse':''" @change='tapcollapseleft(item)'>
|
||||||
|
<!-- {{item.body}} -->
|
||||||
|
<view class="itemtext">
|
||||||
|
<view class="left">
|
||||||
|
2222222222
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="itemtext" v-for="uitem in item.list">
|
||||||
|
<view class="left">
|
||||||
|
{{uitem.happentime}}
|
||||||
|
</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.head" v-for="(item, index) in itemList" :key="index"
|
||||||
|
@change='tapcollapse(item)' :class="item.check?'headcollapse':''">
|
||||||
|
<!-- {{item.body}} -->
|
||||||
|
<view class="itemtext">
|
||||||
|
<view class="collapse_top" v-for="uitem in item.ptValList">
|
||||||
|
<!-- <u-icon name="star-fill" color="#000" size="28"></u-icon>
|
||||||
|
<span style="margin-left: 10rpx;">健康生活方式</span> -->
|
||||||
|
<view class="itemsdata">
|
||||||
|
<view class="itemword">
|
||||||
|
<u-checkbox v-model="checked"> {{uitem.formName}}</u-checkbox>
|
||||||
|
</view>
|
||||||
|
<!-- <view class="itemword">
|
||||||
|
<u-checkbox v-model="checked">测试345353535</u-checkbox>
|
||||||
|
</view>
|
||||||
|
<view class="itemword">
|
||||||
|
<u-checkbox v-model="checked">测试345353535</u-checkbox>
|
||||||
|
</view> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</u-collapse-item>
|
||||||
|
</u-collapse>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
checked: true,
|
||||||
|
itemlistleft: [{
|
||||||
|
head: "赏识在于角度的转换",
|
||||||
|
body: "只要我们正确择取一个合适的参照物乃至稍降一格去看待他人,值得赏识的东西便会扑面而来",
|
||||||
|
open: true,
|
||||||
|
disabled: true
|
||||||
|
}, {
|
||||||
|
head: "生活中不是缺少美,而是缺少发现美的眼睛",
|
||||||
|
body: "学会欣赏,实际是一种积极生活的态度,是生活的调味品,会在欣赏中发现生活的美",
|
||||||
|
open: false,
|
||||||
|
}],
|
||||||
|
|
||||||
|
|
||||||
|
itemList: [{
|
||||||
|
head: "赏识在于角度的转换",
|
||||||
|
body: "只要我们正确择取一个合适的参照物乃至稍降一格去看待他人,值得赏识的东西便会扑面而来",
|
||||||
|
open: true,
|
||||||
|
disabled: true
|
||||||
|
}, {
|
||||||
|
head: "生活中不是缺少美,而是缺少发现美的眼睛",
|
||||||
|
body: "学会欣赏,实际是一种积极生活的态度,是生活的调味品,会在欣赏中发现生活的美",
|
||||||
|
open: false,
|
||||||
|
}, {
|
||||||
|
head: "周围一些不起眼的人、事、物,或许都隐藏着不同凡响的智慧",
|
||||||
|
body: "但是据说雕刻大卫像所用的这块大理石,曾被多位雕刻家批评得一无是处,有些人认为这块大理石采凿得不好,有些人嫌它的纹路不够美",
|
||||||
|
open: false,
|
||||||
|
}],
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
tapcollapse(item) {
|
||||||
|
item.check = !item.check
|
||||||
|
},
|
||||||
|
tapcollapseleft(item){
|
||||||
|
item.check = !item.check
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss">
|
||||||
|
.app {
|
||||||
|
height: 100vh;
|
||||||
|
background-color: #fff;
|
||||||
|
// padding: 100rpx 40rpx;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 36rpx;
|
||||||
|
|
||||||
|
.body {
|
||||||
|
width: 100%;
|
||||||
|
height: 100vh;
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.left {
|
||||||
|
height: 100vh;
|
||||||
|
width: 30%;
|
||||||
|
// background: aliceblue;
|
||||||
|
::v-deep .u-collapse-title {
|
||||||
|
font-size: 26rpx;
|
||||||
|
font-family: Source Han Sans CN;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #000;
|
||||||
|
padding-left: 10rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .u-collapse-head {
|
||||||
|
width: 96%;
|
||||||
|
margin: 0 auto;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.itemtext {
|
||||||
|
font-size: 28rpx;
|
||||||
|
background: #FFFFFF;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #333333;
|
||||||
|
height: 100rpx;
|
||||||
|
padding-left: 10rpx;
|
||||||
|
line-height: 100rpx;
|
||||||
|
border-bottom: 2rpx solid #E6E6E6;
|
||||||
|
margin: 0 auto;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.headcollapse {
|
||||||
|
::v-deep .u-collapse-head {
|
||||||
|
border-bottom: 2rpx solid #E6E6E6;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .u-collapse-item {
|
||||||
|
padding-bottom: 4rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .u-collapse-head {
|
||||||
|
width: 96%;
|
||||||
|
margin: 0 auto;
|
||||||
|
// background: #169BD5 !important;
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .u-collapse-item {
|
||||||
|
// background-color: #4271B9;
|
||||||
|
margin-bottom: 2rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.right {
|
||||||
|
height: 100vh;
|
||||||
|
width: 70%;
|
||||||
|
|
||||||
|
::v-deep .u-collapse-title {
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
padding-left: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.headcollapse {
|
||||||
|
::v-deep .u-collapse-head {
|
||||||
|
border-bottom: 2rpx solid #E6E6E6;
|
||||||
|
text-align: center !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .u-collapse-title {
|
||||||
|
color: #26A888;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep .u-collapse-head {
|
||||||
|
width: 96%;
|
||||||
|
margin: 0 auto;
|
||||||
|
background: #169BD5 !important;
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
// background-color: red;
|
||||||
|
.itemtext {
|
||||||
|
.collapse_top {
|
||||||
|
font-size: 30rpx;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #000;
|
||||||
|
width: 94%;
|
||||||
|
line-height: 40rpx;
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 20rpx 20rpx;
|
||||||
|
|
||||||
|
.itemsdata {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
.itemword {
|
||||||
|
margin: 15rpx;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -7,106 +7,57 @@
|
|||||||
gutter="50" @change="tabschange"></u-tabs>
|
gutter="50" @change="tabschange"></u-tabs>
|
||||||
</view>
|
</view>
|
||||||
<!-- 健康指数 -->
|
<!-- 健康指数 -->
|
||||||
<view class="health">
|
<view class="health" v-if="tabscurrent==0">
|
||||||
<view class="health_top">
|
<healthindex></healthindex>
|
||||||
<view class="right">
|
|
||||||
1
|
|
||||||
</view>
|
|
||||||
<image :src="require('../images/red.png')" image>
|
|
||||||
<view class="count">
|
|
||||||
<view class="numbers">680</view>
|
|
||||||
<view class="healths">健康指数</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="health_body">
|
|
||||||
<view class="healthitem">
|
|
||||||
血压(mmHg):收缩压/舒张压
|
|
||||||
</view>
|
|
||||||
<view class="healthitem">
|
|
||||||
空腹血糖(mmol/L):5.6
|
|
||||||
</view>
|
|
||||||
<view class="healthitem">
|
|
||||||
血脂(TC/LDL-C):5.6
|
|
||||||
</view>
|
|
||||||
<view class="healthitem">
|
|
||||||
体质指数(BMI):5.6
|
|
||||||
</view>
|
|
||||||
<view class="healthitem">
|
|
||||||
腰围(cm):5.6
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<!-- 折线图 -->
|
|
||||||
<view class="zx">
|
|
||||||
<qiun-data-charts type="line" loadingType="0" :opts="line_opts" :ontouch="true" :chartData="chartData" />
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<!-- 疾病预警 -->
|
|
||||||
<view class="disease">
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<!-- 疾病预警 -->
|
||||||
|
<view class="disease">
|
||||||
|
</view>
|
||||||
|
<!-- 健康处方 -->
|
||||||
|
<view class="" v-if="tabscurrent==2">
|
||||||
|
<Precords></Precords>
|
||||||
|
</view>
|
||||||
|
<!-- 健康指数弹出层 -->
|
||||||
|
<u-popup v-model="showhealth" mode="center" border-radius="14" closeable width="80%" height="550rpx">
|
||||||
|
<view class="toppopup">
|
||||||
|
<view class="rightpopup">
|
||||||
|
1
|
||||||
|
</view>
|
||||||
|
<view class="numbers">
|
||||||
|
680
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="text">
|
||||||
|
说明
|
||||||
|
</view>
|
||||||
|
<view class="words">
|
||||||
|
85分以上为绿色,
|
||||||
|
85分以上为绿色,
|
||||||
|
85分以上为绿色,85分以上为绿色,
|
||||||
|
85分以上为绿色,
|
||||||
|
85分以上为绿色,85分以上为绿色,
|
||||||
|
85分以上为绿色,
|
||||||
|
85分以上为绿色,85分以上为绿色,
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
import Precords from '../Precords/Precords.vue'
|
||||||
|
import Healthindex from '../Healthindex/Healthindex.vue'
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
Precords,
|
||||||
|
Healthindex
|
||||||
|
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
chartData: {},
|
showhealth: false, //健康指数弹框
|
||||||
opts: {
|
chartData: {},
|
||||||
color: ["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"],
|
|
||||||
padding: [15,10,0,15],
|
|
||||||
enableScroll: false,
|
|
||||||
legend: {},
|
|
||||||
xAxis: {
|
|
||||||
disableGrid: true
|
|
||||||
},
|
|
||||||
yAxis: {
|
|
||||||
gridType: "dash",
|
|
||||||
dashLength: 2
|
|
||||||
},
|
|
||||||
extra: {
|
|
||||||
line: {
|
|
||||||
type: "straight",
|
|
||||||
width: 2,
|
|
||||||
activeType: "hollow"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
line_opts: {
|
|
||||||
color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4",
|
|
||||||
"#ea7ccc"
|
|
||||||
],
|
|
||||||
dataLabel: true,
|
|
||||||
enableScroll: true,
|
|
||||||
touchMoveLimit: 24,
|
|
||||||
padding: [15, 10, 0, 15],
|
|
||||||
xAxis: {
|
|
||||||
lineHeight: 40,
|
|
||||||
disableGrid: true,
|
|
||||||
boundaryGap: "center",
|
|
||||||
fontSize: 10,
|
|
||||||
type: 'grid',
|
|
||||||
gridType: 'dash',
|
|
||||||
itemCount: 3, //x轴单屏显示数据的数量,默认为5个
|
|
||||||
scrollShow: true, //新增是否显示滚动条,默认false
|
|
||||||
scrollAlign: 'left', //滚动条初始位置
|
|
||||||
},
|
|
||||||
yAxis: {
|
|
||||||
gridType: "dash",
|
|
||||||
dashLength: 2
|
|
||||||
},
|
|
||||||
extra: {
|
|
||||||
line: {
|
|
||||||
type: "straight",
|
|
||||||
width: 2,
|
|
||||||
activeType: "hollow"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
tabscurrent: 0,
|
tabscurrent: 0,
|
||||||
tabslist: [{
|
tabslist: [{
|
||||||
name: '健康指数',
|
name: '健康指数',
|
||||||
@ -124,93 +75,36 @@
|
|||||||
background: {
|
background: {
|
||||||
backgroundColor: '#26A888',
|
backgroundColor: '#26A888',
|
||||||
},
|
},
|
||||||
datalist: null,
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
this.getServerData();
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
// if (this.current == 0) {
|
|
||||||
// this.scoket()
|
|
||||||
// }
|
|
||||||
// this.getServerData()
|
|
||||||
},
|
},
|
||||||
// watch: {
|
|
||||||
// echartData: {
|
|
||||||
// handler() {
|
|
||||||
// this.getServerData()
|
|
||||||
// },
|
|
||||||
// deep: true
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
methods: {
|
methods: {
|
||||||
getServerData() {
|
// 健康指数弹框
|
||||||
//模拟从服务器获取数据时的延时
|
healthtap() {
|
||||||
setTimeout(() => {
|
this.showhealth = true
|
||||||
//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
|
|
||||||
let res = {
|
|
||||||
categories: ["2018","2019","2020","2021","2022","2023"],
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
name: "成交量A",
|
|
||||||
data: [35,8,25,37,4,20]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "成交量B",
|
|
||||||
data: [70,40,65,100,44,68]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "成交量C",
|
|
||||||
data: [100,80,95,150,112,132]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
||||||
this.chartData = JSON.parse(JSON.stringify(res));
|
|
||||||
}, 500);
|
|
||||||
},
|
|
||||||
|
|
||||||
getServerData1() {
|
|
||||||
if (this.echartData) {
|
|
||||||
setTimeout(() => {
|
|
||||||
// let res = {
|
|
||||||
// categories: [],
|
|
||||||
// series: [{
|
|
||||||
// name: "血糖值",
|
|
||||||
// data: []
|
|
||||||
// }]
|
|
||||||
// }
|
|
||||||
res.series[0].data = this.echartData.list.map(e => e.bg)
|
|
||||||
res.categories = this.echartData.list.map(e => e.timename + e.measureTime)
|
|
||||||
this.datalist = res
|
|
||||||
// let restwo = {
|
|
||||||
// series: [{
|
|
||||||
// data: [{
|
|
||||||
// "name": "偏低" + this.echartData.calc.lowerNum + "次",
|
|
||||||
// "value": this.echartData.calc.lowerNum
|
|
||||||
// }, {
|
|
||||||
// "name": "正常" + this.echartData.calc.normalNum + "次",
|
|
||||||
// "value": this.echartData.calc.normalNum
|
|
||||||
// }, {
|
|
||||||
// "name": "偏高" + this.echartData.calc.higherNum + "次",
|
|
||||||
// "value": this.echartData.calc.higherNum
|
|
||||||
// }]
|
|
||||||
// }]
|
|
||||||
// };
|
|
||||||
this.datalisttwo = restwo
|
|
||||||
}, 500)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
//点击tabs
|
//点击tabs
|
||||||
tabschange(index) {
|
tabschange(index) {
|
||||||
this.tabscurrent = index;
|
this.tabscurrent = index;
|
||||||
|
console.log(this.tabscurrent, 'this.tabscurrent')
|
||||||
|
// if (this.tabscurrent == 0) {
|
||||||
|
// }
|
||||||
// this.orderTypeList.orderStatus = this.tabslist[index].orderStatus
|
// this.orderTypeList.orderStatus = this.tabslist[index].orderStatus
|
||||||
// this.goodsOrderinfo();
|
// this.goodsOrderinfo();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -222,6 +116,47 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
|
|
||||||
|
.toppopup {
|
||||||
|
justify-content: space-between;
|
||||||
|
padding-top: 75rpx;
|
||||||
|
line-height: 35px;
|
||||||
|
height: 70rpx;
|
||||||
|
display: flex;
|
||||||
|
/* margin-top: 49rpx; */
|
||||||
|
width: 87%;
|
||||||
|
margin: 0 auto;
|
||||||
|
|
||||||
|
.rightpopup {
|
||||||
|
margin-top: 17rpx;
|
||||||
|
background: red;
|
||||||
|
// position: relative;
|
||||||
|
font-size: 20rpx;
|
||||||
|
width: 30rpx;
|
||||||
|
height: 30rpx;
|
||||||
|
// background: red;
|
||||||
|
// top: 30rpx;
|
||||||
|
line-height: 30rpx;
|
||||||
|
left: 471rpx;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.text {
|
||||||
|
font-weight: 600;
|
||||||
|
text-align: left;
|
||||||
|
width: 87%;
|
||||||
|
margin: 66rpx auto auto auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.words {
|
||||||
|
// font-weight: 600;
|
||||||
|
text-align: left;
|
||||||
|
width: 87%;
|
||||||
|
margin: 26rpx auto auto auto;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
.top {
|
.top {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
@ -241,75 +176,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 健康
|
|
||||||
.health {
|
|
||||||
width: 100%;
|
|
||||||
margin: 0 auto;
|
|
||||||
|
|
||||||
// background: red;
|
|
||||||
.health_top {
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
// height: 100%;
|
.disease {}
|
||||||
// background: #FBDA81;
|
|
||||||
.right {
|
|
||||||
position: relative;
|
|
||||||
font-size: 20rpx;
|
|
||||||
width: 30rpx;
|
|
||||||
height: 30rpx;
|
|
||||||
background: red;
|
|
||||||
top: 30rpx;
|
|
||||||
line-height: 30rpx;
|
|
||||||
left: 471rpx;
|
|
||||||
// left: 288rpx;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
image {
|
|
||||||
width: 230rpx;
|
|
||||||
height: 230rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.count {
|
|
||||||
position: relative;
|
|
||||||
top: -158rpx;
|
|
||||||
|
|
||||||
.numbers {
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: 25rpx;
|
|
||||||
margin-bottom: 10rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.healths {
|
|
||||||
font-size: 22rpx;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.health_body {
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
.healthitem {
|
|
||||||
text-align: left;
|
|
||||||
padding: 0 0 40rpx 62rpx;
|
|
||||||
|
|
||||||
// padding-bottom: 40rpx;
|
|
||||||
// position: relative;
|
|
||||||
// left: -53rpx;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
.zx{
|
|
||||||
width: 100%;
|
|
||||||
height: 300rpx;
|
|
||||||
// background: red;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
.disease{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
Loading…
Reference in New Issue
Block a user