This commit is contained in:
shidongli 2024-05-07 11:11:48 +08:00
parent b633603389
commit e1f691ff1e

View File

@ -1,6 +1,51 @@
<template>
<view class="app">
功能开发中
<!-- 功能开发中 -->
<view class="top">
<u-tabs ref="tabs" :scrollable="false" :list="tabslist" bar-height="6" bar-width="60" active-color="#fff"
inactive-color="#A09F9F" :active-item-style="activebgk" :is-scroll="false" :current="tabscurrent"
gutter="50" @change="tabschange"></u-tabs>
</view>
<!-- 健康指数 -->
<view class="health">
<view class="health_top">
<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">
腰围cm5.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>
</template>
@ -8,9 +53,164 @@
export default {
data() {
return {
chartData: {},
opts: {
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, //x5
scrollShow: true, //false
scrollAlign: 'left', //
},
yAxis: {
gridType: "dash",
dashLength: 2
},
extra: {
line: {
type: "straight",
width: 2,
activeType: "hollow"
}
}
},
tabscurrent: 0,
tabslist: [{
name: '健康指数',
orderStatus: '',
}, {
name: '疾病预警',
orderStatus: 'WAIT_PAY',
}, {
name: '健康处方',
orderStatus: 'WAIT_RECEIVED_GOODS',
}],
activebgk: {
background: "#00B4CC"
},
background: {
backgroundColor: '#26A888',
},
datalist: null,
};
},
onReady() {
this.getServerData();
},
mounted() {
// if (this.current == 0) {
// this.scoket()
// }
// this.getServerData()
},
// watch: {
// echartData: {
// handler() {
// this.getServerData()
// },
// deep: true
// },
// },
methods: {
getServerData() {
//
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);
},
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
tabschange(index) {
this.tabscurrent = index;
// this.orderTypeList.orderStatus = this.tabslist[index].orderStatus
// this.goodsOrderinfo();
},
},
}
</script>
@ -18,8 +218,98 @@
.app {
height: 100vh;
background-color: #fff;
padding: 100rpx 40rpx;
// padding: 100rpx 40rpx;
text-align: center;
font-size: 36rpx;
.top {
width: 100%;
height: 100rpx;
::v-deep .u-tabs {
width: 100%;
position: fixed;
z-index: 999;
}
::v-deep .u-tabs-scroll-flex {
background: #fff;
}
::v-deep .u-tabs__wrapper__nav__item {
background: #FFFFFF;
}
}
//
.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;
// padding-bottom: 40rpx;
// position: relative;
// left: -53rpx;
}
}
.zx{
width: 100%;
height: 300rpx;
// background: red;
}
}
.disease{
}
}
</style>