瀏覽代碼

pref: report show scroll

wangyuan 2 年之前
父節點
當前提交
659358bc3a
共有 4 個文件被更改,包括 769 次插入187 次删除
  1. 1 1
      api/request.js
  2. 255 49
      pages/reportDetail/reportDetail.js
  3. 505 134
      pages/reportDetail/reportDetail.wxml
  4. 8 3
      pages/reportDetail/reportDetail.wxss

+ 1 - 1
api/request.js

@@ -1,6 +1,6 @@
 /* wx.request */
 //const BASE_API_URL = 'https://api.itthealth.com/api'
-const BASE_API_URL = 'https://itt.chl6zk.store/api'
+ const BASE_API_URL = 'https://itt.chl6zk.store/api'
 const BASE_API_VERSION = '/v1'
 import itt from '../utils/util'
 const app = getApp()

+ 255 - 49
pages/reportDetail/reportDetail.js

@@ -12,84 +12,136 @@ Page({
       {
         index: 0,
         viewName: '评估说明',
-        reqName: '评估说明'
+        reqName: '评估说明',
+        toview: 'shuoming',
+        response: []
       },
       {
         index: 1,
         viewName: '检测小结',
-        reqName: 'ReportTotal'
+        reqName: 'ReportTotal',
+        toview: 'xiaojie',
+        response: []
       },
       {
         index: 2,
         viewName: '循环系统',
-        reqName: '循环系统'
+        reqName: '循环系统',
+        toview: 'xunhuan',
+        response: []
       },
       {
         index: 3,
         viewName: '呼吸系统',
-        reqName: '呼吸系统'
+        reqName: '呼吸系统',
+        toview: 'huxi',
+        response: []
       },
       {
         index: 4,
         viewName: '消化系统',
-        reqName: '消化系统'
+        reqName: '消化系统',
+        toview: 'xiaohua',
+        response: []
       },
       {
         index: 5,
         viewName: '泌尿系统',
-        reqName: '泌尿与生殖系统'
+        reqName: '泌尿与生殖系统',
+        toview: 'miniao',
+        response: []
       },
       {
         index: 6,
         viewName: '血液系统',
-        reqName: '血液系统'
+        reqName: '血液系统',
+        toview: 'xuexie',
+        response: []
       },
       {
         index: 7,
         viewName: '内分泌系统',
-        reqName: '内分泌系统'
+        reqName: '内分泌系统',
+        toview: 'neifenmi',
+        response: []
       },
       {
         index: 8,
         viewName: '营养代谢',
-        reqName: '营养与代谢'
+        reqName: '营养与代谢',
+        toview: 'yinyangdaixie',
+        response: []
       },
       {
         index: 9,
         viewName: '神经系统',
-        reqName: '神经系统'
+        reqName: '神经系统',
+        toview: 'shenjin',
+        response: []
       },
       {
         index: 10,
         viewName: '免疫系统',
-        reqName: '免疫系统'
+        reqName: '免疫系统',
+        toview: 'mianyi',
+        response: []
       },
       {
         index: 11,
         viewName: '运动系统',
-        reqName: '运动系统'
+        reqName: '运动系统',
+        toview: 'yundong',
+        response: []
       },
       {
         index: 12,
         viewName: '感官系统',
-        reqName: '感官系统'
+        reqName: '感官系统',
+        toview: 'ganguan',
+        response: []
       },
       {
         index: 13,
         viewName: '理化因素',
-        reqName: '理化因素'
+        reqName: '理化因素',
+        toview: 'lihuayinshu',
+        response: []
       },
       {
         index: 14,
         viewName: '情绪压力',
-        reqName: '精神及心理'
+        reqName: '精神及心理',
+        toview: 'qinxuyali',
+        response: []
       }
     ],
+    systemNameList1Res:[],
+    systemNameList2Res:[],
+    systemNameList3Res:[],
+    systemNameList4Res:[],
+    systemNameList5Res:[],
+    systemNameList6Res:[],
+    systemNameList7Res:[],
+    systemNameList8Res:[],
+    systemNameList9Res:[],
+    systemNameList10Res:[],
+    systemNameList11Res:[],
+    systemNameList12Res:[],
+    systemNameList13Res:[],
+    systemNameList14Res:[],
     leftNavActive: 0, // 0 小结 1 系统
     summaryList: [],
     systemList: [],
     realName: '',
-    addTime: ''
+    addTime: '',
+    toView: 'shuoming',
+    scrollIntoViewIndex: 0
+  },
+
+  onUnload() {
+    this.setData({
+      scrollIntoViewIndex: 0
+    })
   },
 
   /**
@@ -101,54 +153,199 @@ Page({
       leftNavActive: 0,
       name: '评估说明'
     })
-    this.getReportUserInfoFn(options.reportid)
+    this.getAllReportInfo(options.reportid)
+    //this.getReportUserInfoFn(options.reportid)
+  },
+
+  bindscroll () {
+    this.returnTop()
+  },
+
+  returnTop () {
+    const query = wx.createSelectorQuery()
+    const that = this
+    query.select("#shuoming").boundingClientRect()
+    query.select("#xiaojie").boundingClientRect()
+    query.select("#xunhuan").boundingClientRect()
+    query.select("#huxi").boundingClientRect()
+    query.select("#xiaohua").boundingClientRect()
+    query.select("#miniao").boundingClientRect()
+    query.select("#xuexie").boundingClientRect()
+    query.select("#neifenmi").boundingClientRect()
+    query.select("#yinyangdaixie").boundingClientRect()
+    query.select("#shenjin").boundingClientRect()
+    query.select("#mianyi").boundingClientRect()
+    query.select("#yundong").boundingClientRect()
+    query.select("#ganguan").boundingClientRect()
+    query.select("#lihuayinshu").boundingClientRect()
+    query.select("#qinxuyali").boundingClientRect()
+    query.exec(function(res){
+      that.setLeftNavActive(res)
+    })
+  },
+
+  setLeftNavActive (TopArr) {
+    let res = []
+    TopArr.map((item, index) => {
+      res.push({
+        index: index,
+        id: item.id,
+        top: Math.abs(item.top)
+      })
+    })
+    const fItem = res.find(item => {
+      return item.top < 200
+    })
+    if (fItem && this.data.scrollIntoViewIndex != fItem.index) {
+      this.setData({
+        scrollIntoViewIndex: fItem.index,
+        leftNavActive: fItem.index
+      })
+    }
+
+  },
+
+  // 获取所有节点的返回信息
+  async getAllReportInfo (reportid) {
+    const that = this
+    // wx.showNavigationBarLoading()
+    wx.showLoading({
+      title: '加载中...',
+    })
+    await this.getReportUserInfoFn(reportid)
+    await this.getReportFn(this.data.systemNameList[1].reqName).then(response => {
+      that.setData({
+        systemNameList1Res: response || []
+      })
+    })
+    await this.getReportFn(this.data.systemNameList[2].reqName).then(response => {
+      const handleRespose = that.handleRespose(response)
+      that.setData({
+        systemNameList2Res: handleRespose
+      })
+    })
+    await this.getReportFn(this.data.systemNameList[3].reqName).then(response => {
+      const handleRespose = that.handleRespose(response)
+      that.setData({
+        systemNameList3Res: handleRespose
+      })
+    })
+    await this.getReportFn(this.data.systemNameList[4].reqName).then(response => {
+      const handleRespose = that.handleRespose(response)
+      that.setData({
+        systemNameList4Res: handleRespose
+      })
+    })
+    await this.getReportFn(this.data.systemNameList[5].reqName).then(response => {
+      const handleRespose = that.handleRespose(response)
+      that.setData({
+        systemNameList5Res: handleRespose
+      })
+    })
+    await this.getReportFn(this.data.systemNameList[6].reqName).then(response => {
+      const handleRespose = that.handleRespose(response)
+      that.setData({
+        systemNameList6Res: handleRespose
+      })
+    })
+    await this.getReportFn(this.data.systemNameList[7].reqName).then(response => {
+      const handleRespose = that.handleRespose(response)
+      that.setData({
+        systemNameList7Res: handleRespose
+      })
+    })
+    await this.getReportFn(this.data.systemNameList[8].reqName).then(response => {
+      const handleRespose = that.handleRespose(response)
+      that.setData({
+        systemNameList8Res: handleRespose
+      })
+    })
+    await this.getReportFn(this.data.systemNameList[9].reqName).then(response => {
+      const handleRespose = that.handleRespose(response)
+      that.setData({
+        systemNameList9Res: handleRespose
+      })
+    })
+    await this.getReportFn(this.data.systemNameList[10].reqName).then(response => {
+      const handleRespose = that.handleRespose(response)
+      that.setData({
+        systemNameList10Res: handleRespose
+      })
+    })
+    await this.getReportFn(this.data.systemNameList[11].reqName).then(response => {
+      const handleRespose = that.handleRespose(response)
+      that.setData({
+        systemNameList11Res: handleRespose
+      })
+    })
+    await this.getReportFn(this.data.systemNameList[12].reqName).then(response => {
+      const handleRespose = that.handleRespose(response)
+      that.setData({
+        systemNameList12Res: handleRespose
+      })
+    })
+    await this.getReportFn(this.data.systemNameList[13].reqName).then(response => {
+      const handleRespose = that.handleRespose(response)
+      that.setData({
+        systemNameList13Res: handleRespose
+      })
+    })
+    await this.getReportFn(this.data.systemNameList[14].reqName).then(response => {
+      that.setData({
+        systemNameList14Res: response
+      })
+    })
+    // wx.hideNavigationBarLoading()
+    wx.hideLoading()
   },
 
   // 获取当前报告人的信息
   getReportUserInfoFn (reportid) {
     var that = this
-    getReportUserInfo({
-      reportId: reportid
-    }).then(res => {
-      that.setData({
-        addTime: res.data.addTime,
-        realName: res.data.realName
+    return new Promise((reslove,reject) => {
+      getReportUserInfo({
+        reportId: reportid
+      }).then(res => {
+        wx.hideLoading()
+        that.setData({
+          addTime: res.data.addTime,
+          realName: res.data.realName
+        })
+        reslove(res)
       })
     })
   },
 
   // 获取具体的报告信息
-  getReportFn () {
+  getReportFn (name, index = 0) {
     var that = this
     var data = {
       reportId: this.data.reportId,
-      name: this.data.name
+      name: name
     }
-    wx.showLoading({
-      title: '加载中...',
-      mask: true
-    })
-    getReport(data).then(res => {
-      wx.hideLoading()
-      if (that.data.name == 'ReportTotal' || that.data.name == '精神及心理') {
-        that.setData({
-          summaryList: res.data || []
+    return new Promise((resolve, reject) => {
+      getReport(data).then(res => {
+        /* if (name == 'ReportTotal' || name == '精神及心理') {
+          that.setData({
+            summaryList: res.data || []
+          })
+        } else {
+          that.handleRespose(res.data, index)
+        } */
+        resolve(res.data)
+      }).catch(e => {
+        reject(e)
+        wx.showModal({
+          content: e,
+          confirmColor: '#333',
+          showCancel: false
         })
-      } else {
-        that.handleRespose(res.data)
-      }
-    }).catch(e => {
-      wx.hideLoading()
-      wx.showModal({
-        content: e,
-        confirmColor: '#333',
-        showCancel: false
       })
     })
   },
 
   // 处理系统返回的数据
-  handleRespose (response) {
+  handleRespose (response, index) {
     var outKey = Object.keys(response)
     var result = []
     for (var index = 0; index < outKey.length; index++) {
@@ -170,7 +367,17 @@ Page({
         }
       )
     }
-    this.handleSortFn(result)
+    var handleResult = [...result]
+    for (var index = 0; index < handleResult.length; index++) {
+      const element = handleResult[index];
+      hanldSort(element.childNode)
+    }
+    function hanldSort (childNode) {
+      childNode.sort(function(a,b){
+        return b.value - a.value
+      })
+    }
+    return handleResult
   },
 
   // 排序函数
@@ -195,11 +402,10 @@ Page({
    */
   handleSwitchNav(e) {
     var navIndex = e.currentTarget.dataset.index
-    var reqName = e.currentTarget.dataset.reqname
+    var toview = e.currentTarget.dataset.toview
     this.setData({
-      name: reqName,
-      leftNavActive: navIndex
+      leftNavActive: navIndex,
+      toView: toview
     })
-    this.getReportFn()
   }
 })

+ 505 - 134
pages/reportDetail/reportDetail.wxml

@@ -1,166 +1,537 @@
 <!--pages/reportDetail/reportDetail.wxml-->
 <view class="detail ittflex-jcs">
   <view class="left-nav">
-    <view class="left-nav-item ittflex {{leftNavActive == index ? 'left-nav-item-active': ''}} {{leftNavActive - 1 == index ? 'noborder' : ''}}" wx:for="{{systemNameList}}" wx:key="index" data-index="{{index}}" data-reqname="{{item.reqName}}" bindtap="handleSwitchNav">{{item.viewName}}</view>
+    <view class="left-nav-item ittflex {{leftNavActive == index ? 'left-nav-item-active': ''}} {{leftNavActive - 1 == index ? 'noborder' : ''}}" wx:for="{{systemNameList}}" wx:key="index" data-index="{{index}}" data-toview="{{item.toview}}" bindtap="handleSwitchNav">{{item.viewName}}</view>
   </view>
   <view class="right-value">
-    <!-- 评估说明 -->
-    <block wx:if="{{leftNavActive === 0}}">
-      <view class="appraise-title b-item">健康评估报告</view>
-      <view class="b-item b-item-username ittflex-jcb">
-        <text class="light-text">姓名</text>
-        <text class="deep-text">{{realName}}</text>
-      </view>
-      <view class="b-item b-item-date ittflex-jcb">
-        <text class="light-text">日期</text>
-        <text class="deep-text">{{addTime}}</text>
-      </view>
-      <view class="appraise-title b-item">目录</view>
-      <view class="sub-menu-item">1.疾病风险评估</view>
-      <view class="appraise-title b-item suppose-item">建议</view>
-      <view class="b-item b-item-xunhaun ittflex-jcb">
-        <text class="deep-text">循环系统</text>
-        <text class="deep-text">营养代谢</text>
-      </view>
-      <view class="b-item b-item-huxi ittflex-jcb">
-        <text class="deep-text">呼吸系统</text>
-        <text class="deep-text">神经系统</text>
-      </view>
-      <view class="b-item b-item-xiaohua ittflex-jcb">
-        <text class="deep-text">消化系统</text>
-        <text class="deep-text">免疫系统</text>
-      </view>
-      <view class="b-item b-item-miniao ittflex-jcb">
-        <text class="deep-text">泌尿系统</text>
-        <text class="deep-text">运动系统</text>
-      </view>
-      <view class="b-item b-item-xuexie ittflex-jcb">
-        <text class="deep-text">血液系统</text>
-        <text class="deep-text">感官系统</text>
-      </view>
-      <view class="b-item b-item-neifenmi ittflex-jcb">
-        <text class="deep-text">内分泌系统</text>
-        <text class="deep-text">理化因素</text>
+    <scroll-view class="scroll-view" style="height:1472rpx" scroll-y="true" bindscroll="bindscroll" scroll-into-view="{{toView}}" scroll-with-animation>
+      <view class="scroll-view-item scroll-view-item-0" id="shuoming">
+        <view class="appraise-title b-item">健康评估报告</view>
+          <view class="b-item b-item-username ittflex-jcb">
+            <text class="light-text">姓名</text>
+            <text class="deep-text">{{realName}}</text>
+          </view>
+          <view class="b-item b-item-date ittflex-jcb">
+            <text class="light-text">日期</text>
+            <text class="deep-text">{{addTime}}</text>
+          </view>
+          <view class="appraise-title b-item">目录</view>
+          <view class="sub-menu-item">1.疾病风险评估</view>
+          <view class="appraise-title b-item suppose-item">建议</view>
+          <view class="b-item b-item-xunhaun ittflex-jcb">
+            <text class="deep-text">循环系统</text>
+            <text class="deep-text">营养代谢</text>
+          </view>
+          <view class="b-item b-item-huxi ittflex-jcb">
+            <text class="deep-text">呼吸系统</text>
+            <text class="deep-text">神经系统</text>
+          </view>
+          <view class="b-item b-item-xiaohua ittflex-jcb">
+            <text class="deep-text">消化系统</text>
+            <text class="deep-text">免疫系统</text>
+          </view>
+          <view class="b-item b-item-miniao ittflex-jcb">
+            <text class="deep-text">泌尿系统</text>
+            <text class="deep-text">运动系统</text>
+          </view>
+          <view class="b-item b-item-xuexie ittflex-jcb">
+            <text class="deep-text">血液系统</text>
+            <text class="deep-text">感官系统</text>
+          </view>
+          <view class="b-item b-item-neifenmi ittflex-jcb">
+            <text class="deep-text">内分泌系统</text>
+            <text class="deep-text">理化因素</text>
+          </view>
+          <view class="sub-menu-item">2.情绪与心理</view>
+          <view class="standard">
+            <view class="one-red standard-item">
+              <view class="index-text">
+                <view class="flagitem red-flagitem flagitemrightnone"></view>
+                <view class="flagitem flagitemrightnone"></view>
+                <view class="flagitem"></view>
+                一格指标:健康指标轻度风险,多数因近期生活规律、饮食问题、情绪压力所影响。需注意指标相关的身心调理,不要造成长期病症风险。
+              </view>
+            </view>
+            <view class="two-red standard-item">
+              <view class="index-text">
+                <view class="flagitem red-flagitem flagitemrightnone"></view>
+                <view class="flagitem red-flagitem flagitemrightnone"></view>
+                <view class="flagitem"></view>
+                二格指标:健康指标中度风险,近期相关指标接近病症发生零界点或近期有过相关轻微病症发生史。需注意指标相关的身心调理,不要造成病症发生或加重。
+              </view>
+            </view>
+            <view class="three-red standard-item">
+              <view class="index-text">
+                <view class="flagitem red-flagitem flagitemrightnone"></view>
+                <view class="flagitem red-flagitem flagitemrightnone"></view>
+                <view class="flagitem red-flagitem"></view>
+                三格指标:健康指标重度风险,已到病症发生零界点或已有病症发生;部分健康系统,如果不知情,建议单向问诊。需注意指标相关的身心调理,不要造成病症加重。
+              </view>
+            </view>
+            <view class="annotation">
+              注:本设备检测身体对检测物的反应性来评估健康状况。反应性的值设定在一格指标到三个指标之间 ,用来评估目前身体的压力程度。本项仅做为健康筛查及风险提示,不做为诊断依据。
+            </view>
+          </view>
       </view>
-      <view class="sub-menu-item">2.情绪与心理</view>
-      <view class="standard">
-        <view class="one-red standard-item">
-          <view class="index-text">
-            <view class="flagitem red-flagitem flagitemrightnone"></view>
-            <view class="flagitem flagitemrightnone"></view>
-            <view class="flagitem"></view>
-            一格指标:健康指标轻度风险,多数因近期生活规律、饮食问题、情绪压力所影响。需注意指标相关的身心调理,不要造成长期病症风险。
+      <view class="scroll-view-item scroll-view-item-1" id="xiaojie">
+        <view class="summary" wx:if="{{systemNameList1Res.length != 0}}">
+          <view class="summary-title">尊敬的客户,您好!</view>
+          <view class="summary-tips">
+            非常高兴有机会用健康检测设备为您进行全面的身体健康检测及身体状况评估,让您对自己的身体有所了解并进行适当的健康维护。
           </view>
-        </view>
-        <view class="two-red standard-item">
-          <view class="index-text">
-            <view class="flagitem red-flagitem flagitemrightnone"></view>
-            <view class="flagitem red-flagitem flagitemrightnone"></view>
-            <view class="flagitem"></view>
-            二格指标:健康指标中度风险,近期相关指标接近病症发生零界点或近期有过相关轻微病症发生史。需注意指标相关的身心调理,不要造成病症发生或加重。
+          <view class="summary-tips no-padding">
+            通过检测不但能了解您所测脏器的功能疾病的趋势、营养的状况,还能够了解到身体疲劳度、免疫机能及过敏状态等。
           </view>
+          <view class="summary-tips ">
+            同时,可用做相关的调理。
+          </view>
+          <view class="summary-tips">
+            根据检测结果,您的健康风险最高的是:
+          </view>
+          <view class="s-main">
+            <view class="s-item {{index == 0 ? 's-item-nomargin' : ''}}" wx:for="{{summaryList}}" wx:key="index">
+              <view class="s-item-title">({{index + 1}}){{item.title}}</view>
+              <view class="s-item-value">{{item.value}}</view>
+            </view>
+          </view>
+        </view>
+        <view class="no-data" wx:if="{{systemNameList1Res.length == 0}}">
+          <van-empty description="暂无数据" />
         </view>
-        <view class="three-red standard-item">
-          <view class="index-text">
-            <view class="flagitem red-flagitem flagitemrightnone"></view>
-            <view class="flagitem red-flagitem flagitemrightnone"></view>
-            <view class="flagitem red-flagitem"></view>
-            三格指标:健康指标重度风险,已到病症发生零界点或已有病症发生;部分健康系统,如果不知情,建议单向问诊。需注意指标相关的身心调理,不要造成病症加重。
+      </view>
+      <view class="scroll-view-item scroll-view-item-2" id="xunhuan">
+        <view class="system" >
+          <view class="sys-item" wx:for="{{systemNameList2Res}}" wx:key="index">
+            <view class="sys-header ittflex">{{index + 1}}.{{item.name}}</view>
+            <view class="sys-content">
+              <view class="sys-content-item ittflex-jcs" wx:for="{{item.childNode}}" wx:for-item="subitem" wx:key="index">
+                <view class="sts-lanel">{{subitem.name}}</view>
+                <view class="risk-level ittflex-jcs">
+                  <block  wx:if="{{subitem.value < 2.5 }}">
+                    <view class="level level-a"></view>
+                    <view class="level level-b"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >=2.5 && subitem.value < 3.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >= 3.0 && subitem.value < 4.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b red"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >= 4.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b red"></view>
+                    <view class="level level-c red"></view>
+                  </block>
+                </view>
+              </view>
+            </view>
           </view>
         </view>
-        <view class="annotation">
-          注:本设备检测身体对检测物的反应性来评估健康状况。反应性的值设定在一格指标到三个指标之间 ,用来评估目前身体的压力程度。本项仅做为健康筛查及风险提示,不做为诊断依据。
+      </view>
+      <view class="scroll-view-item scroll-view-item-3" id="huxi">
+        <view class="system" >
+          <view class="sys-item" wx:for="{{systemNameList3Res}}" wx:key="index">
+            <view class="sys-header ittflex">{{index + 1}}.{{item.name}}</view>
+            <view class="sys-content">
+              <view class="sys-content-item ittflex-jcs" wx:for="{{item.childNode}}" wx:for-item="subitem" wx:key="index">
+                <view class="sts-lanel">{{subitem.name}}</view>
+                <view class="risk-level ittflex-jcs">
+                  <block  wx:if="{{subitem.value < 2.5 }}">
+                    <view class="level level-a"></view>
+                    <view class="level level-b"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >=2.5 && subitem.value < 3.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >= 3.0 && subitem.value < 4.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b red"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >= 4.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b red"></view>
+                    <view class="level level-c red"></view>
+                  </block>
+                </view>
+              </view>
+            </view>
+          </view>
         </view>
       </view>
-    </block>
-    <!-- 检测小结 -->
-    <block wx:if="{{leftNavActive === 1}}">
-      <view class="summary" wx:if="{{summaryList.length != 0}}">
-        <view class="summary-title">尊敬的客户,您好!</view>
-        <view class="summary-tips">
-          非常高兴有机会用健康检测设备为您进行全面的身体健康检测及身体状况评估,让您对自己的身体有所了解并进行适当的健康维护。
+      <view class="scroll-view-item scroll-view-item-4" id="xiaohua">
+        <view class="system" >
+          <view class="sys-item" wx:for="{{systemNameList4Res}}" wx:key="index">
+            <view class="sys-header ittflex">{{index + 1}}.{{item.name}}</view>
+            <view class="sys-content">
+              <view class="sys-content-item ittflex-jcs" wx:for="{{item.childNode}}" wx:for-item="subitem" wx:key="index">
+                <view class="sts-lanel">{{subitem.name}}</view>
+                <view class="risk-level ittflex-jcs">
+                  <block  wx:if="{{subitem.value < 2.5 }}">
+                    <view class="level level-a"></view>
+                    <view class="level level-b"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >=2.5 && subitem.value < 3.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >= 3.0 && subitem.value < 4.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b red"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >= 4.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b red"></view>
+                    <view class="level level-c red"></view>
+                  </block>
+                </view>
+              </view>
+            </view>
+          </view>
         </view>
-        <view class="summary-tips no-padding">
-          通过检测不但能了解您所测脏器的功能疾病的趋势、营养的状况,还能够了解到身体疲劳度、免疫机能及过敏状态等。
+      </view>
+      <view class="scroll-view-item scroll-view-item-5" id="miniao">
+        <view class="system" >
+          <view class="sys-item" wx:for="{{systemNameList5Res}}" wx:key="index">
+            <view class="sys-header ittflex">{{index + 1}}.{{item.name}}</view>
+            <view class="sys-content">
+              <view class="sys-content-item ittflex-jcs" wx:for="{{item.childNode}}" wx:for-item="subitem" wx:key="index">
+                <view class="sts-lanel">{{subitem.name}}</view>
+                <view class="risk-level ittflex-jcs">
+                  <block  wx:if="{{subitem.value < 2.5 }}">
+                    <view class="level level-a"></view>
+                    <view class="level level-b"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >=2.5 && subitem.value < 3.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >= 3.0 && subitem.value < 4.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b red"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >= 4.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b red"></view>
+                    <view class="level level-c red"></view>
+                  </block>
+                </view>
+              </view>
+            </view>
+          </view>
         </view>
-        <view class="summary-tips ">
-          同时,可用做相关的调理。
+      </view>
+      <view class="scroll-view-item scroll-view-item-6" id="xuexie">
+        <view class="system" >
+          <view class="sys-item" wx:for="{{systemNameList6Res}}" wx:key="index">
+            <view class="sys-header ittflex">{{index + 1}}.{{item.name}}</view>
+            <view class="sys-content">
+              <view class="sys-content-item ittflex-jcs" wx:for="{{item.childNode}}" wx:for-item="subitem" wx:key="index">
+                <view class="sts-lanel">{{subitem.name}}</view>
+                <view class="risk-level ittflex-jcs">
+                  <block  wx:if="{{subitem.value < 2.5 }}">
+                    <view class="level level-a"></view>
+                    <view class="level level-b"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >=2.5 && subitem.value < 3.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >= 3.0 && subitem.value < 4.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b red"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >= 4.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b red"></view>
+                    <view class="level level-c red"></view>
+                  </block>
+                </view>
+              </view>
+            </view>
+          </view>
         </view>
-        <view class="summary-tips">
-          根据检测结果,您的健康风险最高的是:
+      </view>
+      <view class="scroll-view-item scroll-view-item-7" id="neifenmi">
+        <view class="system" >
+          <view class="sys-item" wx:for="{{systemNameList7Res}}" wx:key="index">
+            <view class="sys-header ittflex">{{index + 1}}.{{item.name}}</view>
+            <view class="sys-content">
+              <view class="sys-content-item ittflex-jcs" wx:for="{{item.childNode}}" wx:for-item="subitem" wx:key="index">
+                <view class="sts-lanel">{{subitem.name}}</view>
+                <view class="risk-level ittflex-jcs">
+                  <block  wx:if="{{subitem.value < 2.5 }}">
+                    <view class="level level-a"></view>
+                    <view class="level level-b"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >=2.5 && subitem.value < 3.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >= 3.0 && subitem.value < 4.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b red"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >= 4.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b red"></view>
+                    <view class="level level-c red"></view>
+                  </block>
+                </view>
+              </view>
+            </view>
+          </view>
         </view>
-        <view class="s-main">
-          <view class="s-item {{index == 0 ? 's-item-nomargin' : ''}}" wx:for="{{summaryList}}" wx:key="index">
-            <view class="s-item-title">({{index + 1}}){{item.title}}</view>
-            <view class="s-item-value">{{item.value}}</view>
+      </view>
+      <view class="scroll-view-item scroll-view-item-8" id="yinyangdaixie">
+        <view class="system" >
+          <view class="sys-item" wx:for="{{systemNameList8Res}}" wx:key="index">
+            <view class="sys-header ittflex">{{index + 1}}.{{item.name}}</view>
+            <view class="sys-content">
+              <view class="sys-content-item ittflex-jcs" wx:for="{{item.childNode}}" wx:for-item="subitem" wx:key="index">
+                <view class="sts-lanel">{{subitem.name}}</view>
+                <view class="risk-level ittflex-jcs">
+                  <block  wx:if="{{subitem.value < 2.5 }}">
+                    <view class="level level-a"></view>
+                    <view class="level level-b"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >=2.5 && subitem.value < 3.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >= 3.0 && subitem.value < 4.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b red"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >= 4.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b red"></view>
+                    <view class="level level-c red"></view>
+                  </block>
+                </view>
+              </view>
+            </view>
           </view>
         </view>
       </view>
-      <view class="no-data" wx:if="{{summaryList.length == 0}}">
-        <van-empty description="暂无数据" />
+      <view class="scroll-view-item scroll-view-item-9" id="shenjin">
+        <view class="system" >
+          <view class="sys-item" wx:for="{{systemNameList9Res}}" wx:key="index">
+            <view class="sys-header ittflex">{{index + 1}}.{{item.name}}</view>
+            <view class="sys-content">
+              <view class="sys-content-item ittflex-jcs" wx:for="{{item.childNode}}" wx:for-item="subitem" wx:key="index">
+                <view class="sts-lanel">{{subitem.name}}</view>
+                <view class="risk-level ittflex-jcs">
+                  <block  wx:if="{{subitem.value < 2.5 }}">
+                    <view class="level level-a"></view>
+                    <view class="level level-b"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >=2.5 && subitem.value < 3.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >= 3.0 && subitem.value < 4.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b red"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >= 4.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b red"></view>
+                    <view class="level level-c red"></view>
+                  </block>
+                </view>
+              </view>
+            </view>
+          </view>
+        </view>
       </view>
-    </block>
-    <!-- 系统分类 -->
-    <block wx:if="{{leftNavActive !== 0 && leftNavActive !== 1 && leftNavActive !== 14}}">
-      <view class="system" >
-        <view class="sys-item" wx:for="{{systemList}}" wx:key="index">
-          <view class="sys-header ittflex">{{index + 1}}.{{item.name}}</view>
-          <view class="sys-content">
-            <view class="sys-content-item ittflex-jcs" wx:for="{{item.childNode}}" wx:for-item="subitem" wx:key="index">
-              <view class="sts-lanel">{{subitem.name}}</view>
-              <view class="risk-level ittflex-jcs">
-              <!-- 2.5 以下,格子都是白色, 2.5~3.0 页面的红色格子显示一格,3.0~4.0 显示2格 ,4.0 以上显示3格 -->
-                <block  wx:if="{{subitem.value < 2.5 }}">
-                  <view class="level level-a"></view>
-                  <view class="level level-b"></view>
-                  <view class="level level-c"></view>
-                </block>
-                <block  wx:if="{{subitem.value >=2.5 && subitem.value < 3.0}}">
-                  <view class="level level-a red"></view>
-                  <view class="level level-b"></view>
-                  <view class="level level-c"></view>
-                </block>
-                <block  wx:if="{{subitem.value >= 3.0 && subitem.value < 4.0}}">
-                  <view class="level level-a red"></view>
-                  <view class="level level-b red"></view>
-                  <view class="level level-c"></view>
-                </block>
-                <block  wx:if="{{subitem.value >= 4.0}}">
-                  <view class="level level-a red"></view>
-                  <view class="level level-b red"></view>
-                  <view class="level level-c red"></view>
-                </block>
+      <view class="scroll-view-item scroll-view-item-10" id="mianyi">
+        <view class="system" >
+          <view class="sys-item" wx:for="{{systemNameList10Res}}" wx:key="index">
+            <view class="sys-header ittflex">{{index + 1}}.{{item.name}}</view>
+            <view class="sys-content">
+              <view class="sys-content-item ittflex-jcs" wx:for="{{item.childNode}}" wx:for-item="subitem" wx:key="index">
+                <view class="sts-lanel">{{subitem.name}}</view>
+                <view class="risk-level ittflex-jcs">
+                  <block  wx:if="{{subitem.value < 2.5 }}">
+                    <view class="level level-a"></view>
+                    <view class="level level-b"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >=2.5 && subitem.value < 3.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >= 3.0 && subitem.value < 4.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b red"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >= 4.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b red"></view>
+                    <view class="level level-c red"></view>
+                  </block>
+                </view>
               </view>
             </view>
           </view>
         </view>
       </view>
-    </block>
-    <!-- 精神及心理 -->
-    <block wx:if="{{leftNavActive === 14}}">
-      <view class="sub-title">
-        情绪报告是基本情绪的检测结果,由于情绪和心理名词的独特内涵,以及从英文的直译结果,许多情绪的字面意思并无法涵盖许多的具体情况,并因个体的经历和诱发某种情绪的特异性,因而不能够单单从字面或独立的- - -个情绪来解读。
+      <view class="scroll-view-item scroll-view-item-11" id="yundong">
+        <view class="system" >
+          <view class="sys-item" wx:for="{{systemNameList11Res}}" wx:key="index">
+            <view class="sys-header ittflex">{{index + 1}}.{{item.name}}</view>
+            <view class="sys-content">
+              <view class="sys-content-item ittflex-jcs" wx:for="{{item.childNode}}" wx:for-item="subitem" wx:key="index">
+                <view class="sts-lanel">{{subitem.name}}</view>
+                <view class="risk-level ittflex-jcs">
+                  <block  wx:if="{{subitem.value < 2.5 }}">
+                    <view class="level level-a"></view>
+                    <view class="level level-b"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >=2.5 && subitem.value < 3.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >= 3.0 && subitem.value < 4.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b red"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >= 4.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b red"></view>
+                    <view class="level level-c red"></view>
+                  </block>
+                </view>
+              </view>
+            </view>
+          </view>
+        </view>
       </view>
-      <view class="sub-title">以下信息描述为您近期的情绪状况,此结果仅供基本参考。</view>
-      <view class="psic-title" >情绪心理反应性检测</view>
-      <block wx:for="{{summaryList}}" wx:key="index">
-        <view class="psic-item split-item ittflex-jcs" >
-          <view class="sys-e-name light-text">{{item.title}}</view>
-          <view class="index-value deep-text">指数:{{item.value}}</view>
-        </view>
-        <view class="text-item">
-          {{item.desc || '--'}}
-        </view>
-      </block>
-      <view class="sum-title">
-        情绪是身体的精神支柱,身体是情绪的物质基础。
+      <view class="scroll-view-item scroll-view-item-12" id="ganguan">
+        <view class="system" >
+          <view class="sys-item" wx:for="{{systemNameList12Res}}" wx:key="index">
+            <view class="sys-header ittflex">{{index + 1}}.{{item.name}}</view>
+            <view class="sys-content">
+              <view class="sys-content-item ittflex-jcs" wx:for="{{item.childNode}}" wx:for-item="subitem" wx:key="index">
+                <view class="sts-lanel">{{subitem.name}}</view>
+                <view class="risk-level ittflex-jcs">
+                  <block  wx:if="{{subitem.value < 2.5 }}">
+                    <view class="level level-a"></view>
+                    <view class="level level-b"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >=2.5 && subitem.value < 3.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >= 3.0 && subitem.value < 4.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b red"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >= 4.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b red"></view>
+                    <view class="level level-c red"></view>
+                  </block>
+                </view>
+              </view>
+            </view>
+          </view>
+        </view>
       </view>
-      <view class="sum-title">
-        如果您近期情绪压力过大,建议您选择一些比较放松的活动;
+      <view class="scroll-view-item scroll-view-item-13" id="lihuayinshu">
+        <view class="system" >
+          <view class="sys-item" wx:for="{{systemNameList13Res}}" wx:key="index">
+            <view class="sys-header ittflex">{{index + 1}}.{{item.name}}</view>
+            <view class="sys-content">
+              <view class="sys-content-item ittflex-jcs" wx:for="{{item.childNode}}" wx:for-item="subitem" wx:key="index">
+                <view class="sts-lanel">{{subitem.name}}</view>
+                <view class="risk-level ittflex-jcs">
+                  <block  wx:if="{{subitem.value < 2.5 }}">
+                    <view class="level level-a"></view>
+                    <view class="level level-b"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >=2.5 && subitem.value < 3.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >= 3.0 && subitem.value < 4.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b red"></view>
+                    <view class="level level-c"></view>
+                  </block>
+                  <block  wx:if="{{subitem.value >= 4.0}}">
+                    <view class="level level-a red"></view>
+                    <view class="level level-b red"></view>
+                    <view class="level level-c red"></view>
+                  </block>
+                </view>
+              </view>
+            </view>
+          </view>
+        </view>
       </view>
-      <view class="sum-title">
-        如果您近期心情愉悦,一定要继续保持。
+      <view class="scroll-view-item scroll-view-item-14" id="qinxuyali">
+        <view class="sub-title">
+          情绪报告是基本情绪的检测结果,由于情绪和心理名词的独特内涵,以及从英文的直译结果,许多情绪的字面意思并无法涵盖许多的具体情况,并因个体的经历和诱发某种情绪的特异性,因而不能够单单从字面或独立的一个情绪来解读。
+        </view>
+        <view class="sub-title">以下信息描述为您近期的情绪状况,此结果仅供基本参考。</view>
+        <view class="psic-title" >情绪心理反应性检测</view>
+        <block wx:for="{{systemNameList14Res}}" wx:key="index">
+          <view class="psic-item split-item ittflex-jcs" >
+            <view class="sys-e-name light-text">{{item.title}}</view>
+            <view class="index-value deep-text">指数:{{item.value}}</view>
+          </view>
+          <view class="text-item">
+            {{item.desc || '--'}}
+          </view>
+        </block>
+        <view class="sum-title">
+          情绪是身体的精神支柱,身体是情绪的物质基础。
+        </view>
+        <view class="sum-title">
+          如果您近期情绪压力过大,建议您选择一些比较放松的活动;
+        </view>
+        <view class="sum-title">
+          如果您近期心情愉悦,一定要继续保持。
+        </view>
       </view>
-    </block>
+    </scroll-view>
   </view>
 </view>

+ 8 - 3
pages/reportDetail/reportDetail.wxss

@@ -11,7 +11,10 @@
 .right-value {
   width: 530rpx;
   height: 100%;
-  overflow-y: scroll;
+}
+.scroll-view-item {
+  width: 100%;
+  min-height: 1472rpx;
 }
 .left-nav-item {
   width: 100%;
@@ -153,10 +156,12 @@
 
 .sys-e-name {
   width: calc(100% - 168rpx);
-  line-height: 90rpx;
-  text-indent: 30rpx;
+  height: 100%;
+  padding-left: 20rpx;
   border-right: 1rpx solid #ddd;
   box-sizing: border-box;
+  display: flex;
+  align-items: center;
 }
 .index-value {
   width: 168rpx;