儿科医生端
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,
|
carLength: 0,
|
||||||
userInfo: {},
|
userInfo: {},
|
||||||
totalBilirubin: [],
|
totalBilirubin: [],
|
||||||
directBilirubin: []
|
directBilirubin: [],
|
||||||
|
xAxis:[]
|
||||||
},
|
},
|
||||||
standardHeight: [],
|
standardHeight: [],
|
||||||
standardWeight: [],
|
standardWeight: [],
|
||||||
@ -72,12 +73,14 @@ Page({
|
|||||||
const weightData = []
|
const weightData = []
|
||||||
const totalBilirubin = []
|
const totalBilirubin = []
|
||||||
const directBilirubin = []
|
const directBilirubin = []
|
||||||
|
const xAxis = []
|
||||||
if(res.list.length > 0){
|
if(res.list.length > 0){
|
||||||
res.list.forEach(item => {
|
res.list.forEach(item => {
|
||||||
heightData.push(item.height)
|
heightData.push(item.height)
|
||||||
weightData.push(item.weight)
|
weightData.push(item.weight)
|
||||||
totalBilirubin.push(item.total_bilirubin)
|
totalBilirubin.push(item.total_bilirubin)
|
||||||
directBilirubin.push(item.directBilirubin)
|
directBilirubin.push(item.directBilirubin)
|
||||||
|
xAxis.push(item.age)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,7 +88,8 @@ Page({
|
|||||||
heightData,
|
heightData,
|
||||||
weightData,
|
weightData,
|
||||||
totalBilirubin,
|
totalBilirubin,
|
||||||
directBilirubin
|
directBilirubin,
|
||||||
|
xAxis
|
||||||
});
|
});
|
||||||
this.initHeightChart()
|
this.initHeightChart()
|
||||||
this.initDirectChart()
|
this.initDirectChart()
|
||||||
@ -146,8 +150,20 @@ Page({
|
|||||||
// 初始化身高图表
|
// 初始化身高图表
|
||||||
initHeightChart() {
|
initHeightChart() {
|
||||||
const standardHeight = this.standardHeight;
|
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 standardRange = standardUpper.map((up, i) => up - standardLower[i]);
|
||||||
|
|
||||||
const chartComp = this.selectComponent('#mychart-dom-height');
|
const chartComp = this.selectComponent('#mychart-dom-height');
|
||||||
@ -166,7 +182,7 @@ Page({
|
|||||||
return `${param.axisValue}\n${param.seriesName}: ${param.value} cm`;
|
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' } } },
|
yAxis: { x: 'center', type: 'value', splitLine: { lineStyle: { type: 'dashed' } } },
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
@ -205,9 +221,19 @@ Page({
|
|||||||
// 初始化体重图表
|
// 初始化体重图表
|
||||||
initWeightChart() {
|
initWeightChart() {
|
||||||
const standardWeight = this.standardWeight;
|
const standardWeight = this.standardWeight;
|
||||||
const standardLower = standardWeight.map(item => item[0]);
|
|
||||||
const standardUpper = standardWeight.map(item => item[1]);
|
let totalList = []
|
||||||
const standardRange = standardUpper.map((up, i) => up - standardLower[i]);
|
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');
|
const chartComp = this.selectComponent('#mychart-dom-weight');
|
||||||
if (chartComp) {
|
if (chartComp) {
|
||||||
@ -225,7 +251,7 @@ Page({
|
|||||||
return `${param.axisValue}\n${param.seriesName}: ${param.value} cm`;
|
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' } } },
|
yAxis: { x: 'center', type: 'value', splitLine: { lineStyle: { type: 'dashed' } } },
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
@ -280,7 +306,7 @@ Page({
|
|||||||
return `${param.axisValue}\n${param.seriesName}: ${param.value} μmol/L`;
|
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' } } },
|
yAxis: { x: 'center', type: 'value', splitLine: { lineStyle: { type: 'dashed' } } },
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
@ -316,7 +342,7 @@ Page({
|
|||||||
return `${param.axisValue}\n${param.seriesName}: ${param.value} μmol/L`;
|
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' } } },
|
yAxis: { x: 'center', type: 'value', splitLine: { lineStyle: { type: 'dashed' } } },
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user