Commit 855e80f017eced4ad1c2cc935b86bb30625e5f08
1 parent
b1c20e6d02
Exists in
master
and in
2 other branches
儿保检查信息录入
Showing 10 changed files with 353 additions and 4 deletions
- littleApp_child/app.json
- littleApp_child/pages/checkupInput/checkupInput.js
- littleApp_child/pages/checkupInput/checkupInput.json
- littleApp_child/pages/checkupInput/checkupInput.wxml
- littleApp_child/pages/checkupInput/checkupInput.wxss
- littleApp_child/pages/home/home.js
- littleApp_child/pages/home/home.wxml
- littleApp_child/source/jianchaluru.png
- littleApp_child/utils/apiFile.js
- littleApp_child/utils/network_util.js
littleApp_child/app.json
View file @
855e80f
| 1 | 1 | { |
| 2 | 2 | "pages": [ |
| 3 | - "pages/Guide/guide", | |
| 4 | 3 | "pages/home/home", |
| 5 | 4 | "pages/Setting/Setting", |
| 6 | 5 | "pages/PersonalInfo/PersonalInfo", |
| ... | ... | @@ -25,6 +24,8 @@ |
| 25 | 24 | "pages/vipService/vipService", |
| 26 | 25 | "pages/order_payment/order_payment", |
| 27 | 26 | "pages/Register/Register", |
| 27 | + "pages/Guide/guide", | |
| 28 | + "pages/checkupInput/checkupInput", | |
| 28 | 29 | |
| 29 | 30 | "pages/inspect/inspectList" |
| 30 | 31 |
littleApp_child/pages/checkupInput/checkupInput.js
View file @
855e80f
| 1 | + | |
| 2 | +var networkUtil = require('../../utils/network_util.js') | |
| 3 | +var api = require('../../utils/apiFile.js') | |
| 4 | +var networkUtil = require('../../utils/network_util.js') | |
| 5 | +var api = require('../../utils/apiFile.js') | |
| 6 | + | |
| 7 | +var page | |
| 8 | +var isRefresh = false; | |
| 9 | +// 是否有更多 | |
| 10 | +var app = getApp() | |
| 11 | +Page({ | |
| 12 | + data: { | |
| 13 | + array: [], | |
| 14 | + hospitalId: "", | |
| 15 | + pid:"", | |
| 16 | + toDay: "", | |
| 17 | + temperature: "", | |
| 18 | + height: "", | |
| 19 | + weight: "", | |
| 20 | + headWidth: "", | |
| 21 | + bust: "", | |
| 22 | + feedArray:["母乳喂养","混合喂养","人工喂养"], | |
| 23 | + feed: "0", | |
| 24 | + }, | |
| 25 | + // 下拉刷新回调接口 | |
| 26 | + onPullDownRefresh() {}, | |
| 27 | + onLoad(e) { | |
| 28 | + var d = new Date(); | |
| 29 | + var toDay = d.getFullYear() + "-" + ("00" + (d.getMonth() + 1)).substr(-2) + "-" + ("00" + d.getDate()).substr(-2); | |
| 30 | + this.setData({ | |
| 31 | + toDay: toDay, | |
| 32 | + }) | |
| 33 | + this.setData({ | |
| 34 | + hospitalId:app.globalData.userInfo.hospitalId, | |
| 35 | + }) | |
| 36 | + this.getList(); | |
| 37 | + networkUtil._get(api.checkList, | |
| 38 | + { patientId: getApp().globalData.currentId}, | |
| 39 | + function (res) { | |
| 40 | + console.log(res) | |
| 41 | + }) | |
| 42 | + }, | |
| 43 | + getList() { | |
| 44 | + networkUtil._post(api.getCheckUpHistory, { | |
| 45 | + pid: this.data.pid, | |
| 46 | + hospitalId: this.data.hospitalId, | |
| 47 | + }, res => { | |
| 48 | + console.log(res) | |
| 49 | + if (res.statusCode == 200 && res.data.errorcode == 0) { | |
| 50 | + var data = res.data.data; | |
| 51 | + for (let o of data) { | |
| 52 | + o.fhr = JSON.parse(o.fhr); | |
| 53 | + } | |
| 54 | + this.setData({ | |
| 55 | + array: res.data.data | |
| 56 | + }) | |
| 57 | + } | |
| 58 | + }, err => { | |
| 59 | + | |
| 60 | + }) | |
| 61 | + }, | |
| 62 | + | |
| 63 | + inputtemperature(e) { | |
| 64 | + var temperature = this.data.temperature; | |
| 65 | + var data = e.detail.value; | |
| 66 | + if (data <= 50 && data >= 0) { | |
| 67 | + this.setData({ | |
| 68 | + temperature: e.detail.value | |
| 69 | + }) | |
| 70 | + }else{ | |
| 71 | + this.setData({ | |
| 72 | + temperature:temperature | |
| 73 | + }) | |
| 74 | + } | |
| 75 | + }, | |
| 76 | + inputheight(e) { | |
| 77 | + var height = this.data.height; | |
| 78 | + var data = e.detail.value; | |
| 79 | + if (data <= 200 && data >= 0) { | |
| 80 | + this.setData({ | |
| 81 | + height: e.detail.value | |
| 82 | + }) | |
| 83 | + }else{ | |
| 84 | + this.setData({ | |
| 85 | + height:height | |
| 86 | + }) | |
| 87 | + } | |
| 88 | + }, | |
| 89 | + inputweight(e) { | |
| 90 | + var weight = this.data.weight; | |
| 91 | + var data = e.detail.value; | |
| 92 | + if (data <= 50 && data >= 0) { | |
| 93 | + this.setData({ | |
| 94 | + weight: e.detail.value | |
| 95 | + }) | |
| 96 | + }else{ | |
| 97 | + this.setData({ | |
| 98 | + weight:weight | |
| 99 | + }) | |
| 100 | + } | |
| 101 | + }, | |
| 102 | + inputheadWidth(e) { | |
| 103 | + var headWidth = this.data.headWidth; | |
| 104 | + var data = e.detail.value; | |
| 105 | + if (data <= 100 && data >= 0) { | |
| 106 | + this.setData({ | |
| 107 | + headWidth: e.detail.value | |
| 108 | + }) | |
| 109 | + }else{ | |
| 110 | + this.setData({ | |
| 111 | + headWidth:headWidth | |
| 112 | + }) | |
| 113 | + } | |
| 114 | + }, | |
| 115 | + inputbust(e) { | |
| 116 | + var bust = this.data.bust; | |
| 117 | + var data = e.detail.value; | |
| 118 | + if (data <= 100 && data >= 0) { | |
| 119 | + this.setData({ | |
| 120 | + bust: e.detail.value | |
| 121 | + }) | |
| 122 | + }else{ | |
| 123 | + this.setData({ | |
| 124 | + bust:bust | |
| 125 | + }) | |
| 126 | + } | |
| 127 | + }, | |
| 128 | + bindPickerChange: function (e) { | |
| 129 | + this.setData({ | |
| 130 | + fhrLength: e.detail.value, | |
| 131 | + }) | |
| 132 | + }, | |
| 133 | + toMyApport() { | |
| 134 | + if (isRefresh) { | |
| 135 | + return; | |
| 136 | + } | |
| 137 | + isRefresh = true; | |
| 138 | + networkUtil._post(api.setCheckUp, { | |
| 139 | + babyInfos: [ | |
| 140 | + { | |
| 141 | + temperature: this.data.temperature, | |
| 142 | + height: this.data.height, | |
| 143 | + weight: this.data.weight, | |
| 144 | + headWidth: this.data.headWidth, | |
| 145 | + bust: this.data.bust, | |
| 146 | + feed: this.data.feed, | |
| 147 | + } | |
| 148 | + ], | |
| 149 | + pid: this.data.pid, | |
| 150 | + hospitalId: this.data.hospitalId, | |
| 151 | + }, (res) => { | |
| 152 | + isRefresh = false | |
| 153 | + this.getList(); | |
| 154 | + wx.showToast({ | |
| 155 | + title: '产检信息已成功提交', | |
| 156 | + icon: 'success', | |
| 157 | + duration: 1000 | |
| 158 | + }); | |
| 159 | + }, (err) => { | |
| 160 | + isRefresh = false | |
| 161 | + }, 'application/json') | |
| 162 | + } | |
| 163 | +}) |
littleApp_child/pages/checkupInput/checkupInput.json
View file @
855e80f
littleApp_child/pages/checkupInput/checkupInput.wxml
View file @
855e80f
| 1 | +<view class="card"> | |
| 2 | + <view class="title"> | |
| 3 | + <text class="time">录入时间:{{toDay}}</text> | |
| 4 | + <text bindtap="toMyApport" class="my_apport">确认记录</text> | |
| 5 | + </view> | |
| 6 | + <view class="section"> | |
| 7 | + <text class="section__title">体温</text> | |
| 8 | + <view class="input-box"> | |
| 9 | + <input bindinput="inputtemperature" value="{{temperature}}" class="input" maxlength="2" type="number" /> | |
| 10 | + <text style="vertical-align:middle"> °C</text> | |
| 11 | + </view> | |
| 12 | + </view> | |
| 13 | + <view class="section"> | |
| 14 | + <text class="section__title">身高</text> | |
| 15 | + <view class="input-box"> | |
| 16 | + <input bindinput="inputheight" value="{{height}}" class="input" maxlength="3" type="number" /> | |
| 17 | + <text style="vertical-align:middle"> cm</text> | |
| 18 | + </view> | |
| 19 | + </view> | |
| 20 | + <view class="section"> | |
| 21 | + <text class="section__title">体重</text> | |
| 22 | + <view class="input-box"> | |
| 23 | + <input bindinput="inputweight" value="{{weight}}" class="input" maxlength="2" type="number" /> | |
| 24 | + <text style="vertical-align:middle"> kg</text> | |
| 25 | + </view> | |
| 26 | + </view> | |
| 27 | + <view class="section"> | |
| 28 | + <text class="section__title">头围</text> | |
| 29 | + <view class="input-box"> | |
| 30 | + <input bindinput="inputheadWidth" value="{{headWidth}}" class="input" maxlength="2" type="number" /> | |
| 31 | + <text style="vertical-align:middle"> cm</text> | |
| 32 | + </view> | |
| 33 | + </view> | |
| 34 | + <view class="section"> | |
| 35 | + <text class="section__title">胸围</text> | |
| 36 | + <view class="input-box"> | |
| 37 | + <input bindinput="inputbust" value="{{bust}}" class="input" maxlength="3" type="number" /> | |
| 38 | + <text style="vertical-align:middle"> cm</text> | |
| 39 | + </view> | |
| 40 | + </view> | |
| 41 | + <view class="section"> | |
| 42 | + <text class="section__title">喂养方式</text> | |
| 43 | + <view class="input-box"> | |
| 44 | + <picker class="input" bindchange="bindPickerChange" value="{{feed}}" range="{{feedArray}}"> | |
| 45 | + <view style="font-size:12px;line-height:30px;" class="picker">{{feedArray[feed]}}</view> | |
| 46 | + </picker> | |
| 47 | + </view> | |
| 48 | + </view> | |
| 49 | +</view> | |
| 50 | +<view class="split"> | |
| 51 | + | |
| 52 | +</view> | |
| 53 | +<scroll-view scroll-y="true"> | |
| 54 | + <view class="card" wx:for="{{array}}" wx:for-item="item"> | |
| 55 | + <view class="title"> | |
| 56 | + <text class="time">录入时间:{{item.inputTime}}</text> | |
| 57 | + </view> | |
| 58 | + <view class='center'> | |
| 59 | + <view class="line"> | |
| 60 | + <text class="key">体温:</text> | |
| 61 | + <text class="value">{{item.temperature}}</text> | |
| 62 | + </view> | |
| 63 | + <view class="line"> | |
| 64 | + <text class="key">身高:</text> | |
| 65 | + <text class="value">{{item.height}}</text> | |
| 66 | + </view> | |
| 67 | + <view class="line"> | |
| 68 | + <text class="key">体重:</text> | |
| 69 | + <text class="value">{{item.weight}}</text> | |
| 70 | + </view> | |
| 71 | + <view class="line"> | |
| 72 | + <text class="key">头围:</text> | |
| 73 | + <text class="value">{{item.headWidth}}</text> | |
| 74 | + </view> | |
| 75 | + <view class="line"> | |
| 76 | + <text class="key">胸围:</text> | |
| 77 | + <text class="value">{{item.bust}}</text> | |
| 78 | + </view> | |
| 79 | + <view class="line"> | |
| 80 | + <text class="key">喂养方式:</text> | |
| 81 | + <text class="value">{{item.feed}}</text> | |
| 82 | + </view> | |
| 83 | + </view> | |
| 84 | + </view> | |
| 85 | +</scroll-view> |
littleApp_child/pages/checkupInput/checkupInput.wxss
View file @
855e80f
| 1 | +page { | |
| 2 | + background: #f5f5f5; | |
| 3 | +} | |
| 4 | + | |
| 5 | +.card { | |
| 6 | + margin: 6px; | |
| 7 | + padding: 6px; | |
| 8 | + border-radius: 6px; | |
| 9 | + background: #fff; | |
| 10 | +} | |
| 11 | + | |
| 12 | +.title { | |
| 13 | + height: 40px; | |
| 14 | + width: 100%; | |
| 15 | + position: relative; | |
| 16 | +} | |
| 17 | + | |
| 18 | +.time { | |
| 19 | + margin-left:10px; | |
| 20 | + font-size: 15px; | |
| 21 | + height: 40px; | |
| 22 | + color: #48c17b; | |
| 23 | + line-height: 40px; | |
| 24 | +} | |
| 25 | + | |
| 26 | +.my_apport { | |
| 27 | + height: 30px; | |
| 28 | + width: 80px; | |
| 29 | + text-align: center; | |
| 30 | + line-height: 30px; | |
| 31 | + position: absolute; | |
| 32 | + font-size: 14px; | |
| 33 | + margin-top: 5px; | |
| 34 | + right: 10px; | |
| 35 | + background: #48c17b; | |
| 36 | + border-radius: 5px; | |
| 37 | + color: white; | |
| 38 | +} | |
| 39 | + | |
| 40 | +.center{ | |
| 41 | + border-top:1px solid #f0f0f0; | |
| 42 | + margin-bottom: 10px; | |
| 43 | +} | |
| 44 | +.line{ | |
| 45 | + display:flex; | |
| 46 | + border-bottom: 1px dotted #f0f0f0; | |
| 47 | +} | |
| 48 | +.key{ | |
| 49 | + flex:1; | |
| 50 | + width: 50%; | |
| 51 | + font-size: 15px; | |
| 52 | + color: #999; | |
| 53 | + text-align: right; | |
| 54 | + padding-right: 10px; | |
| 55 | +} | |
| 56 | +.value{ | |
| 57 | + flex:1; | |
| 58 | + width: 50%; | |
| 59 | + font-size: 15px; | |
| 60 | + color: #999; | |
| 61 | + text-align: left; | |
| 62 | +} | |
| 63 | + | |
| 64 | +.section{ | |
| 65 | + font-size: 15px; | |
| 66 | + display: flex; | |
| 67 | + margin:5px 0; | |
| 68 | +} | |
| 69 | +.section__title{ | |
| 70 | + flex:2; | |
| 71 | + padding-right:12px; | |
| 72 | + line-height: 30px; | |
| 73 | + height: 30px; | |
| 74 | + text-align: right; | |
| 75 | + font-size: 12px; | |
| 76 | +} | |
| 77 | +.input-box { | |
| 78 | + flex:3; | |
| 79 | +} | |
| 80 | +.input{ | |
| 81 | + vertical-align: middle; | |
| 82 | + width: 100px; | |
| 83 | + height: 30px; | |
| 84 | + display: inline-block; | |
| 85 | + border-bottom: 1px solid #e0e0e0; | |
| 86 | +} |
littleApp_child/pages/home/home.js
View file @
855e80f
| ... | ... | @@ -75,7 +75,6 @@ |
| 75 | 75 | content: '随时随地可查看因幼儿问诊检查、儿科检查、一般检查、辅助检查的各项指标,以及相关指标存在的异常情况。' |
| 76 | 76 | } |
| 77 | 77 | ], |
| 78 | - | |
| 79 | 78 | // 是否开通高危精准指导 |
| 80 | 79 | riskGuide: false, |
| 81 | 80 | riskBase: false, |
| ... | ... | @@ -107,6 +106,7 @@ |
| 107 | 106 | } |
| 108 | 107 | }) |
| 109 | 108 | } |
| 109 | + | |
| 110 | 110 | }, |
| 111 | 111 | onShow: function() { |
| 112 | 112 | // 生命周期函数--监听页面显示 |
littleApp_child/pages/home/home.wxml
View file @
855e80f
| ... | ... | @@ -76,6 +76,10 @@ |
| 76 | 76 | <image src="../../source/production_inspection.png" style="{{item_small}}" class="foundation_item_small_image"></image> |
| 77 | 77 | <view class="foundation_item_small_text">检查须知</view> |
| 78 | 78 | </navigator> |
| 79 | + <navigator class="foundation_item_small" url="../checkupInput/checkupInput" > | |
| 80 | + <image src="../../source/jianchaluru.png" style="{{item_small}}" class="foundation_item_small_image"></image> | |
| 81 | + <view class="foundation_item_small_text">检查录入</view> | |
| 82 | + </navigator> | |
| 79 | 83 | |
| 80 | 84 | |
| 81 | 85 |
littleApp_child/source/jianchaluru.png
View file @
855e80f
17.2 KB
littleApp_child/utils/apiFile.js
View file @
855e80f
littleApp_child/utils/network_util.js
View file @
855e80f
| ... | ... | @@ -2,7 +2,7 @@ |
| 2 | 2 | // 测试用户‘花雪莲’,手机号15928512992,验证码666666 |
| 3 | 3 | |
| 4 | 4 | // 0测试环境 1正式环境 2演示环境 3衡水 |
| 5 | -var Builing_Release_AppStore = 1 | |
| 5 | +var Builing_Release_AppStore = 0 | |
| 6 | 6 | // 获取服务器地址 |
| 7 | 7 | function kServerBaseUrl() { |
| 8 | 8 | switch (Builing_Release_AppStore) { |
| ... | ... | @@ -78,7 +78,7 @@ |
| 78 | 78 | }, |
| 79 | 79 | complete: function () { |
| 80 | 80 | // complete |
| 81 | - wx.hideToast() | |
| 81 | + // wx.hideToast() | |
| 82 | 82 | // 小程序提供的api,通知页面停止下拉刷新效果 |
| 83 | 83 | wx.stopPullDownRefresh; |
| 84 | 84 | } |