|
|
@@ -510,7 +510,6 @@ export default {
|
|
|
this.name = this.$route.query.name
|
|
|
this.unit = this.$route.query.unit
|
|
|
this.command = this.$route.query.command
|
|
|
- console.log(this.name)
|
|
|
this.queryaction()
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -546,39 +545,32 @@ export default {
|
|
|
})
|
|
|
|
|
|
if (this.name == '血脂' || this.name == '血红蛋白') {
|
|
|
- console.log(res.data, '222')
|
|
|
this.healths = res.data.list
|
|
|
} else {
|
|
|
this.healths = res.healths
|
|
|
}
|
|
|
|
|
|
- console.log(this.healths, 'this.healths')
|
|
|
var times = []
|
|
|
var values = []
|
|
|
var allValues = []
|
|
|
if (this.name == '血糖') {
|
|
|
this.healths.forEach((item) => {
|
|
|
- console.log(item, '1')
|
|
|
var x = item.dateTime.slice(5, 10)
|
|
|
times.push(x)
|
|
|
values.push(item.glu)
|
|
|
})
|
|
|
- console.log(values)
|
|
|
this.getEcharts(times, values, 'mmol/L', '血糖')
|
|
|
}
|
|
|
if (this.name == '尿酸') {
|
|
|
this.healths.forEach((item) => {
|
|
|
- console.log(item, '1')
|
|
|
var x = item.dateTime.slice(5, 10)
|
|
|
times.push(x)
|
|
|
values.push(item.ua)
|
|
|
})
|
|
|
- console.log(values)
|
|
|
this.getEcharts(times, values, 'umol/L', '尿酸')
|
|
|
}
|
|
|
if (this.name == '血氧') {
|
|
|
this.healths.forEach((item) => {
|
|
|
- console.log(item, '1')
|
|
|
var x = item.dateTime.slice(5, 10)
|
|
|
times.push(x)
|
|
|
values.push(item.spo)
|
|
|
@@ -589,21 +581,21 @@ export default {
|
|
|
this.gettrain(this.healths)
|
|
|
}
|
|
|
if (this.name == '血压') {
|
|
|
+ allValues[0] = []
|
|
|
+ allValues[1] = []
|
|
|
this.healths.forEach((item) => {
|
|
|
var x = item.dateTime.slice(5, 10)
|
|
|
times.push(x)
|
|
|
values.push(item.pr)
|
|
|
- allValues[0] = [item.nibpSys]
|
|
|
- allValues[1] = [item.nibpDia]
|
|
|
+
|
|
|
+ allValues[0].push(item.nibpSys)
|
|
|
+ allValues[1].push(item.nibpDia)
|
|
|
})
|
|
|
this.getEcharts(times, values, '次/分钟', '脉搏')
|
|
|
this.getEcharts2(times, allValues, 'mmHg', ['高压', '低压'])
|
|
|
}
|
|
|
},
|
|
|
onSerach(e) {
|
|
|
- console.log(e, '搜索')
|
|
|
- console.log(this.command, '搜索')
|
|
|
- console.log(e.command || this.command, '搜索')
|
|
|
this.command = e.command || this.command
|
|
|
this.name = e.healthTypeValue || this.name
|
|
|
this.selectValue = e.selectValue || this.selectValue
|
|
|
@@ -670,8 +662,6 @@ export default {
|
|
|
echarts.setOption(option)
|
|
|
},
|
|
|
getEcharts2(times, values, unit, legend) {
|
|
|
- console.log(values, 'values')
|
|
|
- console.log(legend, 'legend')
|
|
|
var option = {
|
|
|
tooltip: {
|
|
|
trigger: 'axis',
|
|
|
@@ -720,7 +710,6 @@ export default {
|
|
|
command: 'getDefaultHealthRange',
|
|
|
terminalType: 1,
|
|
|
})
|
|
|
- console.log(res, 'defaultHealthRange')
|
|
|
var defaultHealthRange = res.healthRangeList
|
|
|
// this.defaultHealthRange = res.healthRangeList
|
|
|
this.defaultHealthRange.normal_nibpSysMin = defaultHealthRange[1].min //收缩压
|
|
|
@@ -832,10 +821,6 @@ export default {
|
|
|
defaultHealthRange[i].min
|
|
|
}
|
|
|
}
|
|
|
- console.log(
|
|
|
- this.defaultHealthRange,
|
|
|
- 'defaultHealthRange.normal_nibpSysMax'
|
|
|
- )
|
|
|
},
|
|
|
gettrain(arr) {
|
|
|
arr.forEach((item) => {
|