From b8fefbbc2b73c09b8a7ef46e2c94ca6836e90188 Mon Sep 17 00:00:00 2001 From: xianghenggang Date: Sat, 12 Aug 2017 16:34:12 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9B=E9=A1=B9=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- littleApp_child/pages/checkTabList/checkTabList.js | 333 +++++++++++++++------ .../pages/checkTabList/checkTabList.wxml | 182 +++++------ littleApp_child/utils/apiFile.js | 2 + 3 files changed, 327 insertions(+), 190 deletions(-) diff --git a/littleApp_child/pages/checkTabList/checkTabList.js b/littleApp_child/pages/checkTabList/checkTabList.js index 01c7c46..c504352 100644 --- a/littleApp_child/pages/checkTabList/checkTabList.js +++ b/littleApp_child/pages/checkTabList/checkTabList.js @@ -10,104 +10,239 @@ var app = getApp() var patientId, checkTime Page({ - data: { - list: [ - // { likeCount: 12, title: "title1", introduction: "content1content1content1content1content1content1content1content1content1content1content1ds到场定损", image: "http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg" } - // , { likeCount: 12, title: "title2", introduction: "content2", image: "http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg" } - // , { likeCount: 12, title: "title2", introduction: "content2", image: "http://img06.tooopen.com/images/20160818/tooopen_sy_175833047715.jpg" } - // , { likeCount: 12, title: "title1", introduction: "content1", image: "http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg" } - // , { likeCount: 12, title: "title2", introduction: "content2", image: "http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg" } - // , { likeCount: 12, title: "title2", introduction: "content2", image: "http://img06.tooopen.com/images/20160818/tooopen_sy_175833047715.jpg" } - ], - - titles: ["问诊检查", "儿科检查", "一般检查", "辅助检查"], - current_index:0, - //问诊检查 - main_foster:"", - feed_type: "", - pee: "", - excrement: "", - sleep: "", - activity: "", - vitamin_d: "", - assist_food: "", - home_measure: "", - drug_gllergic: "", - morbidity: "", - other_text_wz: "", - - }, - onLoad: function (e) { - patientId = app.globalData.userId[0] - checkTime="2017-08-10" - // 数据初始化 - var self=this - this.setData({ - current_index: e.option.current_index - - }) - if (this.data.current_index==0){ - this.requestDataWZ() + data: { + list: [ + // { likeCount: 12, title: "title1", introduction: "content1content1content1content1content1content1content1content1content1content1content1ds到场定损", image: "http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg" } + // , { likeCount: 12, title: "title2", introduction: "content2", image: "http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg" } + // , { likeCount: 12, title: "title2", introduction: "content2", image: "http://img06.tooopen.com/images/20160818/tooopen_sy_175833047715.jpg" } + // , { likeCount: 12, title: "title1", introduction: "content1", image: "http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg" } + // , { likeCount: 12, title: "title2", introduction: "content2", image: "http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg" } + // , { likeCount: 12, title: "title2", introduction: "content2", image: "http://img06.tooopen.com/images/20160818/tooopen_sy_175833047715.jpg" } + ], + + titles: ["问诊检查", "儿科检查", "一般检查", "辅助检查"], + current_index: 0, + //问诊检查 + mainFoster: "", + feedType: "", + pee: "", + excrement: "", + sleep: "", + activity: "", + vitaminD: "", + assistFood: "", + homeMeasure: "", + drugGllergic: "", + morbidity: "", + otherTextWZ: "", + //儿科检查 + tooth: "", + facecolor: "", + skin: "", + eyesight: "", + hearing: "", + chest: "", + neck: "", + belly: "", + umbilical: "", + stepStatus: "", + eye: "", + ear: "", + spineFours: "", + portaGenitals: "", + otherTextWZ: "", + //一般检查 + temperature: "", + height: "", + weight: "", + head: "", + chestw: "", + temperature: "", + growthEvaluate: "", + //辅助检查 + bonez: "", + sportsEvaluation: "", + hipJoint: "", + heartAction: "", + hemoglobin: "", + whiteCell: "", + platelet: "", + otherBlood: "", + urineProtein: "", + urineSugar: "", + urineAcetone: "", + hematuria:"", + other_textFZ:"" + }, + onLoad: function (e) { + patientId = app.globalData.userId[0] + checkTime = e.checkTime + // 数据初始化 + var self = this + var index = parseInt(e.current_index + "") + this.setData({ + current_index: index + + }) + if (this.data.current_index == 0) { + this.requestDataWZ() + } else if (this.data.current_index == 1) { + this.requestDataEK() + } else if (this.data.current_index == 2) { + this.requestDataYB() + } else if (this.data.current_index == 3) { + this.requestDataFZ() + } + + + }, + onUnload: function () { + + }, + /*---------事件处理函数--------*/ + showMoreContent: function (e) { + var content = e.currentTarget.dataset.content + var title = e.currentTarget.dataset.title + wx.showModal({ + title: title, + content: content, + showCancel: false, + confirmText: '知道了', + confirmColor: '#48C17B' + }) + }, + + + titleClick: function (e) { + // console.log(e) + var self = this + var current_index = e.currentTarget.dataset.index + this.setData({ + current_index: current_index, + + }) + if (this.data.current_index == 0) { + this.requestDataWZ() + }else if (this.data.current_index == 1) { + this.requestDataEK() + } else if (this.data.current_index == 2){ + this.requestDataYB() + } else if (this.data.current_index == 3) { + this.requestDataFZ() + } + }, + + /*---------自定义函数--------*/ + requestDataWZ() { + var self = this + + networkUtil.showLoading() + var param = { page: 10, limit: 100, patientId: patientId, checkTime: checkTime } + // console.log(param) + networkUtil._get(api.wzXinxi, param, function (res) { + console.log(res) + var result = res.data.list[0] + self.setData({ + mainFoster: result.mainFoster, + feedType: result.feedType, + pee: result.pee, + excrement: result.excrement, + sleep: result.sleep, + activity: result.activity, + vitaminD: result.vitaminD, + assistFood: result.assistFood, + homeMeasure: result.homeMeasure, + drugGllergic: result.drugGllergic, + morbidity: result.morbidity, + otherTextWZ: result.otherText, + }) + + }, function (res) { + + }) + }, + requestDataFZ() { + var self = this + + networkUtil.showLoading() + var param = { page: 10, limit: 100, patientId: patientId, checkTime: checkTime } + // console.log(param) + networkUtil._get(api.checksub, param, function (res) { + console.log(res) + var result = res.data.list[0] + self.setData({ + + bonez: result.bonez, + sportsEvaluation: result.sportsEvaluation, + hipJoint: result.hipJoint, + heartAction: result.heartAction, + hemoglobin: result.hemoglobin, + whiteCell: result.whiteCell, + platelet: result.platelet, + otherBlood: result.otherBlood, + urineProtein: result.urineProtein, + urineSugar: result.urineSugar, + urineAcetone: result.urineAcetone, + hematuria: result.hematuria, + other_textFZ: result.otherText, + }) + + }, function (res) { + + }) + }, + requestDataEK() { + var self = this + + networkUtil.showLoading() + var param = { page: 10, limit: 100, patientId: patientId, checkTime: checkTime } + // console.log(param) + networkUtil._get(api.checkeb, param, function (res) { + console.log(res) + var result = res.data.list[0] + self.setData({ + tooth: result.tooth, + facecolor: result.facecolor, + skin: result.skin, + eyesight: result.eyesight, + hearing: result.hearing, + chest: result.chest, + neck: result.neck, + belly: result.belly, + umbilical: result.umbilical, + stepStatus: result.stepStatus, + eye: result.eye, + ear: result.ear, + spineFours: result.spineFours, + portaGenitals: result.portaGenitals, + otherTextEK: result.otherText, + }) + + }, function (res) { + + }) + }, + requestDataYB() { + var self = this + + networkUtil.showLoading() + var param = { page: 10, limit: 100, patientId: patientId, checkTime: checkTime } + // console.log(param) + networkUtil._get(api.checkcommon, param, function (res) { + console.log(res) + var result = res.data.list[0] + self.setData({ + temperature: result.temperature, + height: result.height, + weight: result.weight, + head: result.head, + chestw: result.chestw, + temperature: result.temperature, + growthEvaluate: result.growthEvaluate, + }) + + }, function (res) { + + }) } - - - - }, - onUnload: function() { - - }, - /*---------事件处理函数--------*/ - showMoreContent: function(e) { - var content = e.currentTarget.dataset.content - var title = e.currentTarget.dataset.title - wx.showModal({ - title: title, - content: content, - showCancel:false, - confirmText:'知道了', - confirmColor:'#48C17B' - }) - }, - - - titleClick:function(e){ - // console.log(e) - var self=this - var current_index = e.currentTarget.dataset.index - this.setData({ - current_index: current_index, - - }) - - // this.requestData() - }, - - /*---------自定义函数--------*/ - requestDataWZ(){ - var self = this - isRefresh = true - networkUtil.showLoading() - var param = { page: 10, limit: 100, patientId: patientId, checkTime: checkTime} - // console.log(param) - networkUtil._get(api.wzXinxi,param,function(res){ - console.log(res) - isRefresh = false - var arr = [] - if(page > 1) {// 加载更多模式 - arr = self.data.list - } - if (res.data.list.length < pageLimit){ - hasMore = false - }else{ - hasMore = true - } - arr = arr.concat(res.data.list) - self.setData({ - list:arr, - hasMore: hasMore - }) - },function(res){ - isRefresh = false - }) - }, }) diff --git a/littleApp_child/pages/checkTabList/checkTabList.wxml b/littleApp_child/pages/checkTabList/checkTabList.wxml index 852d20b..d6f5127 100644 --- a/littleApp_child/pages/checkTabList/checkTabList.wxml +++ b/littleApp_child/pages/checkTabList/checkTabList.wxml @@ -11,35 +11,35 @@ - + 主要抚养人: - 1111主要1111主要1111主要1111主要 + {{mainFoster}} - + - + - + - + - + - + - + - + - + - + @@ -47,36 +47,36 @@ - + - + - + - + - + - + - + - + - + - + - + @@ -85,35 +85,35 @@ - + 牙齿: - 1111主要1111主要1111主要1111主要 + {{tooth}} - + - + - + - + - + - + - + - + - + - + @@ -121,55 +121,55 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -178,41 +178,41 @@ - + 体温: - 1111主要1111主要1111主要1111主要 + {{temperature}} - + - + - + - + - + - + - + - + - + - - - + + + @@ -222,24 +222,24 @@ 发育检查 - + 骨密度Z值: - 1111主要1111主要1111主要1111主要 + {{bonez}} - + - + - + - + - + - + @@ -248,24 +248,24 @@ 血常规 - + 血红蛋白: - 1111主要1111主要1111主要1111主要 + {{hemoglobin}} - + - + - + - + - + - + @@ -274,24 +274,24 @@ 发育检查 - + 尿蛋白: - 1111主要1111主要1111主要1111主要 + {{urineProtein}} - + - + - + - + - + - + @@ -299,7 +299,7 @@ 其他 - 尿酮体尿酮体尿酮体尿酮体尿酮体尿酮体尿酮体尿酮体尿酮体尿酮体尿酮体尿酮体 + {{other_textFZ}} diff --git a/littleApp_child/utils/apiFile.js b/littleApp_child/utils/apiFile.js index f88165f..67c41d5 100644 --- a/littleApp_child/utils/apiFile.js +++ b/littleApp_child/utils/apiFile.js @@ -26,6 +26,8 @@ module.exports = { wzXinxi: '/baby/check/wz', //儿科检查 checkeb: '/baby/check/eb', + //一般检查 + checkcommon: '/baby/check/common', //辅助检查 checksub: '/baby/check/sub', } \ No newline at end of file -- 1.8.3.1