作者 liaolinfeng

add

... ... @@ -8,7 +8,7 @@ Page({
* 页面的初始数据
*/
data: {
showdoctor: true, //是否显示首页医生信息
showdoctor: false, //是否显示首页医生信息
show_notest: false, //显示有记录和无记录之间的切换
showfilesLog: false, //是否显示最新记录(没有记录不显示)
showdoc_adv:true,
... ...
... ... @@ -21,8 +21,17 @@ Page({
per_page: 2, //每页病情记录的条数
last_page:null,//最后一页
line_rows: 10, //每页趋势图的个数
tab:1,//1表示白细胞计数,2表示中粒细胞计数,3血红蛋白,4血小板
FilesLogList: []
},
settab(e){
console.log(e);
let that=this;
that.setData({
tab:e.currentTarget.dataset.tab
})
that.getFilesLogLine();
},
//切换显示记录于趋势图
setshowrecord() {
let that=this;
... ...
... ... @@ -5,92 +5,108 @@
<cover-view class="record_left {{showrecord?'':'active'}}" bindtap='setshowrecord'>病情记录</cover-view>
</cover-view>
<view class='container_box' wx:if='{{showrecord}}'>
<view class="container">
<view class='container_txt'>白细胞</view>
<view class='container_box' wx:if='{{showrecord}}'>
<view class="container">
<view class='container_top'>
<view class='top_left' style=" background-image:url('../../img/pre.png')"></view>
<view>6月7日-6月13日</view>
<view class='top_rigth' style=" background-image:url('../../img/next.png')"></view>
</view>
<view class='container_contertab'>
<view class="contertab {{tab==1?'contertab_active':''}}" data-tab='1' bindtap='settab'>白细胞计数</view>
<view class="contertab {{tab==2?'contertab_active':''}}" data-tab='2' bindtap='settab'>中性粒细胞</view>
<view class="contertab {{tab==3?'contertab_active':''}}" data-tab='3' bindtap='settab'>血红蛋白</view>
<view class="contertab {{tab==4?'contertab_active':''}}" data-tab='4' bindtap='settab'>血小板</view>
</view>
<view class='tab_content'>
<!-- 白细胞 -->
<view wx:if='{{tab==1}}'>
<canvas class="canvas" canvas-id="lineCanvaswhite" disable-scroll="true" class="canvas" bindtouchstart="touchHandlerwhite"></canvas>
</view>
<view class="container">
<view class='container_txt'>中性粒细胞</view>
<!-- 中性粒细胞 -->
<view wx:if='{{tab==2}}'>
<canvas class="canvas" canvas-id="lineCanvasneutrophils" disable-scroll="true" class="canvas" bindtouchstart="touchHandlerneutrophils"></canvas>
</view>
<view class="container">
<view class='container_txt'>血红蛋白</view>
<!-- 血红蛋白 -->
<view wx:if='{{tab==3}}'>
<canvas class="canvas" canvas-id="lineCanvashemoglobin" disable-scroll="true" class="canvas" bindtouchstart="touchHandlerhemoglobin"></canvas>
</view>
<view class="container">
<view class='container_txt'>血小板</view>
<!-- 血小板 -->
<view wx:if='{{tab==4}}'>
<canvas class="canvas" canvas-id="lineCanvasplatelet" disable-scroll="true" class="canvas" bindtouchstart="touchHandlerplatelet"></canvas>
</view>
</view>
<!-- 病情记录 -->
<scroll-view class='file_plan' wx:else scroll-y bindscrolltolower='scrollbottom'>
<view class='plan_item1' wx:for='{{FilesLogList}}' wx:key>
<view class='title_box'>
<view>{{item.create_time}}</view>
<view class='title_img' bindtap='goeditfile' data-id='{{item.id}}'>
<image src='../../img/edit.png'></image>
</view>
</view>
<view class="two_item two_items {{item.more.white_blood_cell_result=='正常'?'':'danger'}}">
<view class='two_items_left'>
<view class='two_txt'>白细胞计数</view>
<view class='two_state' bindtap='gonormal'>
<view class='iconbox'>
<view class='iconfont icon-jinggao'></view>
</view>
{{item.more.white_blood_cell_result}}
</view>
</view>
</view>
<!-- 病情记录 -->
<scroll-view class='file_plan' wx:else scroll-y bindscrolltolower='scrollbottom'>
<view class='plan_item1' wx:for='{{FilesLogList}}' wx:key>
<view class='title_box'>
<view>{{item.create_time}}</view>
<view class='title_img' bindtap='goeditfile' data-id='{{item.id}}'>
<image src='../../img/edit.png'></image>
</view>
</view>
<view class="two_item two_items {{item.more.white_blood_cell_result=='正常'?'':'danger'}}">
<view class='two_items_left'>
<view class='two_txt'>白细胞计数</view>
<view class='two_state' bindtap='gonormal'>
<view class='iconbox'>
<view class='iconfont icon-jinggao'></view>
</view>
<view class="two_item_rigth">
<text class='two_num'> {{item.more.white_blood_cell}}</text>*10^9/L</view>
{{item.more.white_blood_cell_result}}
</view>
<view class="two_item two_items {{item.more.neutrophils_result=='正常'?'':'danger'}}">
<view class='two_items_left'>
<view class='two_txt'>中性粒细胞计数</view>
<view class='two_state' bindtap='gonormal'>
<view class='iconbox'>
<view class='iconfont icon-jinggao'></view>
</view>
{{item.more.neutrophils_result}}
</view>
</view>
<view class="two_item_rigth">
<text class='two_num'> {{item.more.white_blood_cell}}</text>*10^9/L</view>
</view>
<view class="two_item two_items {{item.more.neutrophils_result=='正常'?'':'danger'}}">
<view class='two_items_left'>
<view class='two_txt'>中性粒细胞计数</view>
<view class='two_state' bindtap='gonormal'>
<view class='iconbox'>
<view class='iconfont icon-jinggao'></view>
</view>
<view class="two_item_rigth">
<text class='two_num'>{{item.more.neutrophils}}</text>*10^9/L</view>
{{item.more.neutrophils_result}}
</view>
<view class="two_item two_items {{item.more.hemoglobin_result=='正常'?'':'danger'}}">
<view class='two_items_left'>
<view class='two_txt'>血红蛋白</view>
<view class='two_state' bindtap='gonormal'>
<view class='iconbox'>
<view class='iconfont icon-jinggao'></view>
</view>
{{item.more.hemoglobin_result}}
</view>
</view>
<view class="two_item_rigth">
<text class='two_num'>{{item.more.neutrophils}}</text>*10^9/L</view>
</view>
<view class="two_item two_items {{item.more.hemoglobin_result=='正常'?'':'danger'}}">
<view class='two_items_left'>
<view class='two_txt'>血红蛋白</view>
<view class='two_state' bindtap='gonormal'>
<view class='iconbox'>
<view class='iconfont icon-jinggao'></view>
</view>
<view class="two_item_rigth">
<text class='two_num'> {{item.more.hemoglobin}}</text>g/L</view>
{{item.more.hemoglobin_result}}
</view>
<view class="two_item two_items {{item.more.platelet_result=='正常'?'':'danger'}}">
<view class='two_items_left'>
<view class='two_txt'>血小板计数</view>
<view class='two_state' bindtap='gonormal'>
<view class='iconbox'>
<view class='iconfont icon-jinggao'></view>
</view>
{{item.more.platelet_result}}
</view>
</view>
<view class="two_item_rigth">
<text class='two_num'> {{item.more.hemoglobin}}</text>g/L</view>
</view>
<view class="two_item two_items {{item.more.platelet_result=='正常'?'':'danger'}}">
<view class='two_items_left'>
<view class='two_txt'>血小板计数</view>
<view class='two_state' bindtap='gonormal'>
<view class='iconbox'>
<view class='iconfont icon-jinggao'></view>
</view>
<view class="two_item_rigth">
<text class='two_num'>{{item.more.platelet}}</text>*10^9/L</view>
</view>
<view class='two_item' wx:if='{{item.doctor_reply != null}}'>
<view>医生建议:</view>
<view class='two_item_content'>{{item.doctor_reply == null ? '等待医生回复':item.doctor_reply}}</view>
{{item.more.platelet_result}}
</view>
</view>
<view class='addnomore' wx:if='{{shownomore}}'>——没有更多数据了——</view>
</scroll-view>
<view class="two_item_rigth">
<text class='two_num'>{{item.more.platelet}}</text>*10^9/L</view>
</view>
<view class='two_item' wx:if='{{item.doctor_reply != null}}'>
<view>医生建议:</view>
<view class='two_item_content'>{{item.doctor_reply == null ? '等待医生回复':item.doctor_reply}}</view>
</view>
</view>
<view class='addnomore' wx:if='{{shownomore}}'>——没有更多数据了——</view>
</scroll-view>
<!-- 趋势图 -->
<!-- <view class="container" wx:if='{{showrecord}}'>
... ...
... ... @@ -11,7 +11,7 @@ ec-canvas {
height: 100%;
}
.container{
height:530rpx;
height:620rpx;
margin:30rpx 30rpx 0 30rpx;
box-sizing:border-box;
background:#fff;
... ... @@ -21,7 +21,8 @@ border-radius:20rpx;
box-shadow:0 0 100rpx #DADADA;
}
.container canvas{
height: 500rpx;
width:100%;
height: 400rpx;
}
.container_txt{
color:#999;
... ... @@ -142,4 +143,72 @@ z-index:100;
}
.page_body{
flex: 1;
}
.container_top{
margin: 0 30rpx;
color:#333;
font-size:26rpx;
padding:28rpx 0 30rpx 0;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1rpx solid #d8d8d8;
}
.top_left{
width:120rpx;
height: 44rpx;
border-radius: 5rpx;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.top_rigth{
width:120rpx;
height: 44rpx;
border-radius: 5rpx;
background-position: center;
background-repeat: no-repeat;
background-size: cover;
}
.container_contertab{
margin: 30rpx 30rpx;
box-sizing: border-box;
border-bottom: 1rpx solid #d8d8d8;
height: 60rpx;
border: 2rpx solid #3AA0EA;
border-radius: 30rpx;
display: flex;
align-items: center;
overflow: hidden;
justify-content: space-around;
}
.contertab{
width:25%;
height: 100%;
position: relative;
color:#3AA0EA;
font-size:24rpx;
display: flex;
justify-content: center;
align-items: center;
}
.contertab.contertab_active{
background: #3AA0EA;
color:#fff;
}
.contertab::after{
content: '';
position: absolute;
top:14rpx;
right: 0rpx;
width:3rpx;
height: 34rpx;
background: #3AA0EA;
}
.contertab:last-child::after{
content: '';
background: #fff;
opacity: 0;
}
\ No newline at end of file
... ...
... ... @@ -13,7 +13,7 @@
"compileType": "miniprogram",
"libVersion": "2.4.0",
"appid": "wx0a0da51e3b931fad",
"projectname": "%E6%9C%AF%E5%90%8E%E5%B0%8F%E7%A8%8B%E5%BA%8F(%E6%8F%90%E4%BA%A4%E7%BB%99%E5%AE%A2%E6%88%B7)",
"projectname": "%E6%9C%AF%E5%90%8E%EF%BC%8820181119%EF%BC%89",
"debugOptions": {
"hidedInDevtools": []
},
... ... @@ -36,8 +36,15 @@
"list": []
},
"miniprogram": {
"current": -1,
"list": []
"current": 0,
"list": [
{
"id": -1,
"name": "record",
"pathName": "pages/record/record",
"query": "showrecord=1&files_id=84"
}
]
}
}
}
\ No newline at end of file
... ...