sunran 3 years ago
parent
commit
b5bc8360d1

+ 6 - 5
src/views/zhulao/components/Tabbar.vue

@@ -61,7 +61,8 @@ export default {
     beforeChange(e) {
     beforeChange(e) {
       if (e == 3) {
       if (e == 3) {
         if (!sessionStorage.getItem('userInfo')) {
         if (!sessionStorage.getItem('userInfo')) {
-          this.getUserInfo()
+          //   this.getUserInfo()
+          this.userApi()
         } else {
         } else {
           return true
           return true
         }
         }
@@ -70,12 +71,12 @@ export default {
       }
       }
     },
     },
     async userApi() {
     async userApi() {
-      var userInfo = JSON.parse(sessionStorage.getItem('userInfo'))
-      //   var mobile = '13895651855'
+      //   var userInfo = JSON.parse(sessionStorage.getItem('userInfo'))
+      var mobile = '13811330231'
       const res = await userApi({
       const res = await userApi({
         command: 'reguserbyweixinphone',
         command: 'reguserbyweixinphone',
-        contactsPhone: userInfo.mobile,
-        // contactsPhone: mobile,
+        // contactsPhone: userInfo.mobile,
+        contactsPhone: mobile,
         terminalType: 5,
         terminalType: 5,
       })
       })
       sessionStorage.setItem('healthUser', JSON.stringify(res))
       sessionStorage.setItem('healthUser', JSON.stringify(res))

+ 1 - 1
src/views/zhulao/views/healthAssessmen/index.vue

@@ -7,7 +7,7 @@
       </div>
       </div>
       <div class="right">
       <div class="right">
         <div class="name">
         <div class="name">
-          <span>{{userInfo.name}}</span>
+          <!-- <span>{{userInfo.name}}</span> -->
           <!-- <div class="btn" @click="$router.push({path:'/estimate'})">健康评估</div> -->
           <!-- <div class="btn" @click="$router.push({path:'/estimate'})">健康评估</div> -->
         </div>
         </div>
         <div class="testing">
         <div class="testing">

+ 5 - 20
src/views/zhulao/views/healthAssessmen/typeDetails/typemain.vue

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