儿科医生端
This commit is contained in:
parent
7a1d82652a
commit
40c46d5dcc
File diff suppressed because it is too large
Load Diff
@ -38,7 +38,8 @@ Page({
|
||||
carLength: 0,
|
||||
userInfo: {},
|
||||
totalBilirubin: [],
|
||||
directBilirubin: []
|
||||
directBilirubin: [],
|
||||
xAxis:[]
|
||||
},
|
||||
standardHeight: [],
|
||||
standardWeight: [],
|
||||
@ -72,12 +73,14 @@ Page({
|
||||
const weightData = []
|
||||
const totalBilirubin = []
|
||||
const directBilirubin = []
|
||||
const xAxis = []
|
||||
if(res.list.length > 0){
|
||||
res.list.forEach(item => {
|
||||
heightData.push(item.height)
|
||||
weightData.push(item.weight)
|
||||
totalBilirubin.push(item.total_bilirubin)
|
||||
directBilirubin.push(item.directBilirubin)
|
||||
xAxis.push(item.age)
|
||||
})
|
||||
}
|
||||
|
||||
@ -85,7 +88,8 @@ Page({
|
||||
heightData,
|
||||
weightData,
|
||||
totalBilirubin,
|
||||
directBilirubin
|
||||
directBilirubin,
|
||||
xAxis
|
||||
});
|
||||
this.initHeightChart()
|
||||
this.initDirectChart()
|
||||
@ -146,8 +150,20 @@ Page({
|
||||
// 初始化身高图表
|
||||
initHeightChart() {
|
||||
const standardHeight = this.standardHeight;
|
||||
const standardLower = standardHeight.map(item => item[0]);
|
||||
const standardUpper = standardHeight.map(item => item[1]);
|
||||
|
||||
let totalList = []
|
||||
standardHeight.forEach(item => {
|
||||
props.xAxis.forEach(item2 => {
|
||||
if(item.age == item2) {
|
||||
totalList.push(item.value)
|
||||
}
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
const standardLower = totalList.map(item => item[0]);
|
||||
const standardUpper = totalList.map(item => item[1]);
|
||||
const standardRange = standardUpper.map((up, i) => up - standardLower[i]);
|
||||
|
||||
const chartComp = this.selectComponent('#mychart-dom-height');
|
||||
@ -166,7 +182,7 @@ Page({
|
||||
return `${param.axisValue}\n${param.seriesName}: ${param.value} cm`;
|
||||
}
|
||||
},
|
||||
xAxis: { type: 'category', boundaryGap: false, data: ['出生', '1月', '2月', '3月', '4月', '5月', '6月'] },
|
||||
xAxis: { type: 'category', boundaryGap: false, data: this.data.xAxis },
|
||||
yAxis: { x: 'center', type: 'value', splitLine: { lineStyle: { type: 'dashed' } } },
|
||||
series: [
|
||||
{
|
||||
@ -205,9 +221,19 @@ Page({
|
||||
// 初始化体重图表
|
||||
initWeightChart() {
|
||||
const standardWeight = this.standardWeight;
|
||||
const standardLower = standardWeight.map(item => item[0]);
|
||||
const standardUpper = standardWeight.map(item => item[1]);
|
||||
const standardRange = standardUpper.map((up, i) => up - standardLower[i]);
|
||||
|
||||
let totalList = []
|
||||
standardWeight.forEach(item => {
|
||||
props.xAxis.forEach(item2 => {
|
||||
if(item.age == item2) {
|
||||
totalList.push(item.value)
|
||||
}
|
||||
|
||||
})
|
||||
})
|
||||
const standardLower = totalList.map(item => item[0]);
|
||||
const standardUpper = totalList.map(item => item[1]);
|
||||
const standardRange = totalList.map((up, i) => up - standardLower[i]);
|
||||
|
||||
const chartComp = this.selectComponent('#mychart-dom-weight');
|
||||
if (chartComp) {
|
||||
@ -225,7 +251,7 @@ Page({
|
||||
return `${param.axisValue}\n${param.seriesName}: ${param.value} cm`;
|
||||
}
|
||||
},
|
||||
xAxis: { type: 'category', boundaryGap: false, data: ['出生', '1月', '2月', '3月', '4月', '5月', '6月'] },
|
||||
xAxis: { type: 'category', boundaryGap: false, data: this.data.xAxis },
|
||||
yAxis: { x: 'center', type: 'value', splitLine: { lineStyle: { type: 'dashed' } } },
|
||||
series: [
|
||||
{
|
||||
@ -280,7 +306,7 @@ Page({
|
||||
return `${param.axisValue}\n${param.seriesName}: ${param.value} μmol/L`;
|
||||
}
|
||||
},
|
||||
xAxis: { type: 'category', boundaryGap: false, data: ['出生', '1月', '2月', '3月', '4月', '5月', '6月'] },
|
||||
xAxis: { type: 'category', boundaryGap: false, data: this.data.xAxis },
|
||||
yAxis: { x: 'center', type: 'value', splitLine: { lineStyle: { type: 'dashed' } } },
|
||||
series: [
|
||||
{
|
||||
@ -316,7 +342,7 @@ Page({
|
||||
return `${param.axisValue}\n${param.seriesName}: ${param.value} μmol/L`;
|
||||
}
|
||||
},
|
||||
xAxis: { type: 'category', boundaryGap: false, data: ['出生', '1月', '2月', '3月', '4月', '5月', '6月'] },
|
||||
xAxis: { type: 'category', boundaryGap: false, data: this.data.xAxis },
|
||||
yAxis: { x: 'center', type: 'value', splitLine: { lineStyle: { type: 'dashed' } } },
|
||||
series: [
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user