|
@ -41,15 +41,14 @@
|
|
|
lastXY = '';
|
|
|
bodyRecordApis.getBodyRecoredLast({data: dataLast}).then(function(res){
|
|
|
if(res.status == 200){
|
|
|
if(!res.data.xt || !res.data.xy) {
|
|
|
showWarningMsg("该居民无体征记录");
|
|
|
return;
|
|
|
}
|
|
|
lastXT = res.data.xt.recordDate;
|
|
|
lastXY = res.data.xy.recordDate;
|
|
|
if(lastXT || lastXY) {
|
|
|
// 初始化执行
|
|
|
getBodyRecord(tabIndex, dayIndex);
|
|
|
} else {
|
|
|
showWarningMsg("没有可查阅的体征记录");
|
|
|
}
|
|
|
|
|
|
// 初始化执行
|
|
|
getBodyRecord(tabIndex, dayIndex);
|
|
|
}else{
|
|
|
showWarningMsg(res.msg)
|
|
|
}
|
|
@ -89,6 +88,10 @@
|
|
|
|
|
|
// 获取数据
|
|
|
function getBodyRecord(tab, day) {
|
|
|
if(!lastXT || !lastXY) {
|
|
|
showWarningMsg("该居民无体征记录");
|
|
|
return;
|
|
|
}
|
|
|
$('.danwei').html(tab == 0 ? '单位(mmol/L)' : '单位(mmHg)');
|
|
|
var dayNum = 0;
|
|
|
switch(day) {
|
|
@ -119,9 +122,6 @@
|
|
|
var list = res.list,
|
|
|
len = list.length;
|
|
|
list.reverse();
|
|
|
if(len < 1) {
|
|
|
showWarningMsg("该居民无体征记录");return;
|
|
|
}
|
|
|
for(var i = 0; i < len; i++) {
|
|
|
if(len == 1) {
|
|
|
dataCanvas.labels = [enddate.substr(5, 5), list[i].date.substr(5, 5)];
|