Commit d2af4897f8d2f980fb9b2153e8de8a502911f49f
1 parent
2b32789900
Exists in
master
and in
2 other branches
身长体重曲线
Showing 3 changed files with 65 additions and 11 deletions
littleApp_child/packageA/pages/graph/graph.js
View file @
d2af489
| ... | ... | @@ -484,7 +484,8 @@ |
| 484 | 484 | hospitalId: "", |
| 485 | 485 | ec: { |
| 486 | 486 | onInit: initChart |
| 487 | - } | |
| 487 | + }, | |
| 488 | + tableList: [] | |
| 488 | 489 | }, |
| 489 | 490 | onLoad: function (options) { |
| 490 | 491 | if (options.id) { |
| 491 | 492 | |
| ... | ... | @@ -503,9 +504,22 @@ |
| 503 | 504 | let that = this |
| 504 | 505 | networkUtil._get('/baby/queryBabyCurve/'+this.data.id, {},function (res) { |
| 505 | 506 | const data = res.data.data |
| 507 | + that.setData({ | |
| 508 | + tableList: data.tables | |
| 509 | + }) | |
| 506 | 510 | const option = drawPrintChart(data); |
| 507 | 511 | chart.setOption(option); |
| 508 | 512 | }) |
| 513 | + }, | |
| 514 | + showImage(e) { | |
| 515 | + let imgUrl = e.currentTarget.dataset.src; | |
| 516 | + // wx.previewImage({ | |
| 517 | + // urls: [imgUrl], //需要预览的图片http链接列表,注意是数组 | |
| 518 | + // current: '', // 当前显示图片的http链接,默认是第一个 | |
| 519 | + // success: function (res) { }, | |
| 520 | + // fail: function (res) { }, | |
| 521 | + // complete: function (res) { }, | |
| 522 | + // }) | |
| 509 | 523 | } |
| 510 | 524 | }) |
littleApp_child/packageA/pages/graph/graph.wxml
View file @
d2af489
| ... | ... | @@ -4,12 +4,25 @@ |
| 4 | 4 | <view class="title">身长体重曲线图</view> |
| 5 | 5 | <ec-canvas force-use-old-canvas="true" id="mychart-dom-bar" canvas-id="mychart-bar" ec="{{ ec }}"></ec-canvas> |
| 6 | 6 | </view> |
| 7 | + <view class="table-box"> | |
| 8 | + <view class="table-line top-line"> | |
| 9 | + <view class="table-txt">时间(月龄)</view> | |
| 10 | + <view class="table-txt">身长(cm)</view> | |
| 11 | + <view class="table-txt">体重(kg)</view> | |
| 12 | + | |
| 13 | + </view> | |
| 14 | + <view class="table-line" wx:for="{{tableList}}"> | |
| 15 | + <view class="table-txt">{{item.time}}</view> | |
| 16 | + <view class="table-txt">{{item.height===null?'':item.height}}</view> | |
| 17 | + <view class="table-txt">{{item.weight===null?'':item.weight}}</view> | |
| 18 | + </view> | |
| 19 | + </view> | |
| 7 | 20 | <view class="images-box"> |
| 8 | - <image mode="widthFix" src="https://dev-talk-api.healthbaby.com.cn/art/showPic/1640243694213.png"></image> | |
| 9 | - <image mode="widthFix" src="https://dev-talk-api.healthbaby.com.cn/art/showPic/1640243729674.png"></image> | |
| 10 | - <image mode="widthFix" src="https://dev-talk-api.healthbaby.com.cn/art/showPic/1640243742632.png"></image> | |
| 11 | - <image mode="widthFix" src="https://dev-talk-api.healthbaby.com.cn/art/showPic/1640243752504.png"></image> | |
| 12 | - <image mode="widthFix" src="https://dev-talk-api.healthbaby.com.cn/art/showPic/1640243762975.png"></image> | |
| 21 | + <image mode="widthFix" src="https://dev-talk-api.healthbaby.com.cn/art/showPic/1640243694213.png" bind:tap="showImage" data-src="https://dev-talk-api.healthbaby.com.cn/art/showPic/1640243694213.png"></image> | |
| 22 | + <image mode="widthFix" src="https://dev-talk-api.healthbaby.com.cn/art/showPic/1640243729674.png" bind:tap="showImage" data-src="https://dev-talk-api.healthbaby.com.cn/art/showPic/1640243729674.png"></image> | |
| 23 | + <image mode="widthFix" src="https://dev-talk-api.healthbaby.com.cn/art/showPic/1640243742632.png" bind:tap="showImage" data-src="https://dev-talk-api.healthbaby.com.cn/art/showPic/1640243742632.png"></image> | |
| 24 | + <image mode="widthFix" src="https://dev-talk-api.healthbaby.com.cn/art/showPic/1640243752504.png" bind:tap="showImage" data-src="https://dev-talk-api.healthbaby.com.cn/art/showPic/1640243752504.png"></image> | |
| 25 | + <image mode="widthFix" src="https://dev-talk-api.healthbaby.com.cn/art/showPic/1640243762975.png" bind:tap="showImage" data-src="https://dev-talk-api.healthbaby.com.cn/art/showPic/1640243762975.png"></image> | |
| 13 | 26 | </view> |
| 14 | 27 | </view> |
littleApp_child/packageA/pages/graph/graph.wxss
View file @
d2af489
| ... | ... | @@ -4,24 +4,51 @@ |
| 4 | 4 | height: 100vh; |
| 5 | 5 | overflow-y: auto; |
| 6 | 6 | } |
| 7 | -.echarts-box{ | |
| 7 | + | |
| 8 | +.echarts-box { | |
| 8 | 9 | width: 100%; |
| 9 | 10 | height: 50vh; |
| 10 | 11 | } |
| 11 | -.echarts-box .title{ | |
| 12 | + | |
| 13 | +.echarts-box .title { | |
| 12 | 14 | width: 100%; |
| 13 | 15 | text-align: center; |
| 14 | 16 | } |
| 17 | + | |
| 15 | 18 | .echarts-box ec-canvas { |
| 16 | 19 | width: 100%; |
| 17 | 20 | height: 100%; |
| 18 | 21 | } |
| 19 | -.images-box{ | |
| 20 | - margin-top: 30px; | |
| 22 | + | |
| 23 | +.images-box { | |
| 24 | + margin-top: 5px; | |
| 21 | 25 | width: 100%; |
| 22 | 26 | height: auto; |
| 23 | 27 | } |
| 24 | -.images-box image{ | |
| 28 | + | |
| 29 | +.images-box image { | |
| 25 | 30 | width: 100%; |
| 31 | +} | |
| 32 | + | |
| 33 | +.table-box{ | |
| 34 | + margin-top: 30px; | |
| 35 | + width: 92%; | |
| 36 | + height: auto; | |
| 37 | + padding: 4%; | |
| 38 | + background: white; | |
| 39 | + text-align: center; | |
| 40 | +} | |
| 41 | +.table-line{ | |
| 42 | + width: 99%; | |
| 43 | + display: -webkit-box; | |
| 44 | + border-left: 1px solid #000000; | |
| 45 | +} | |
| 46 | +.table-line.top-line{ | |
| 47 | + border-top: 1px solid #000000; | |
| 48 | +} | |
| 49 | +.table-txt{ | |
| 50 | + width: 33.1%; | |
| 51 | + border-right: 1px solid #000000; | |
| 52 | + border-bottom: 1px solid #000000; | |
| 26 | 53 | } |