Explorar el Código

page
- 健康档案 module/health/pages/home/home
- 健康分析报告 module/health/pages/report/report
- 调理方案 module/health/pages/scheme/scheme
- 舌面分析报告 module/health/pages/analysis/analysis
- 健康状况更新记录 module/health/pages/status-record/status-record
- 指标信息 module/health/pages/status/status

component
- 健康状况 module/health/components/report-health-status/report-health-status
- 指标信息 module/health/components/report-health-index/report-health-index
- 调养方案 module/health/components/care-scheme/care-scheme
- 舌象/面象 module/health/components/card-analysis/card-analysis-content
- 异常舌象/面象 module/health/components/card-analysis/card-analysis-exception

cc12458 hace 3 meses
padre
commit
fd14c19be7
Se han modificado 23 ficheros con 190 adiciones y 92 borrados
  1. 18 3
      miniprogram/module/health/components/card-analysis/card-analysis-content.ts
  2. 26 28
      miniprogram/module/health/components/card-analysis/card-analysis-content.wxml
  3. 7 0
      miniprogram/module/health/components/card-analysis/card-analysis-exception.ts
  4. 17 15
      miniprogram/module/health/components/card-analysis/card-analysis-exception.wxml
  5. 3 1
      miniprogram/module/health/components/care-scheme/care-scheme.ts
  6. 1 1
      miniprogram/module/health/components/care-scheme/care-scheme.wxml
  7. 7 0
      miniprogram/module/health/components/report-health-index/report-health-index.ts
  8. 2 2
      miniprogram/module/health/components/report-health-index/report-health-index.wxml
  9. 11 0
      miniprogram/module/health/components/report-health-status/report-health-status.ts
  10. 5 5
      miniprogram/module/health/components/report-health-status/report-health-status.wxml
  11. 3 3
      miniprogram/module/health/model/health.model.ts
  12. 5 0
      miniprogram/module/health/pages/analysis/analysis.ts
  13. 2 2
      miniprogram/module/health/pages/analysis/analysis.wxml
  14. 13 0
      miniprogram/module/health/pages/home/home.ts
  15. 8 8
      miniprogram/module/health/pages/home/home.wxml
  16. 13 1
      miniprogram/module/health/pages/report/report.ts
  17. 15 13
      miniprogram/module/health/pages/report/report.wxml
  18. 6 1
      miniprogram/module/health/pages/scheme/scheme.ts
  19. 3 3
      miniprogram/module/health/pages/scheme/scheme.wxml
  20. 14 0
      miniprogram/module/health/pages/status-record/status-record.ts
  21. 4 2
      miniprogram/module/health/pages/status-record/status-record.wxml
  22. 3 1
      miniprogram/module/health/pages/status/status.ts
  23. 4 3
      miniprogram/module/health/pages/status/status.wxml

+ 18 - 3
miniprogram/module/health/components/card-analysis/card-analysis-content.ts

@@ -1,11 +1,12 @@
+import I18nBehavior from "../../../../i18n/behavior";
 import { groupBy } from "../../../../utils/util";
 import { AnalysisException, AnalysisModel } from "../../model/health.model";
-
 // module/health/components/card-analysis/card-analysis-content.ts
 Component({
+  behaviors: [I18nBehavior],
   lifetimes: {
     attached() {
-      if(this.properties.type==='files'){ 
+      if (this.properties.type === 'files') {
         this.setData({ isShowType: true });
       }
     }
@@ -38,6 +39,17 @@ Component({
     tongueException: [],
     faceException: [],
     isShowType: '',
+    i18n: [
+      'analysis._',
+      'analysis.tongue',
+      'analysis.face',
+      'analysis.tongue_1',
+      'analysis.tongue_2',
+      'analysis.face_1',
+      'analysis.__show__',
+      'analysis.__showContent__',
+      'analysis.__showException__',
+    ],
   },
   methods: {
     async preview(event: WechatMiniprogram.TouchEvent) {
@@ -46,10 +58,13 @@ Component({
       const data = (this.data as any)[type]?.[operation];
       if (!data) return;
 
+      const t2 = this.data.i18n?.analysis?.[type] ?? '';
+      const t3 = this.data.i18n?.analysis?.['_'] ?? '';
+
       const { eventChannel } = await wx.navigateTo({ url: `/module/health/pages/tongue-analysis/tongue-analysis` });
       eventChannel.emit('load', {
         dataset: this._getException(data, dataType),
-        title: { tongue: '异常舌象分析', face: '异常面象分析' }[type]
+        title: `异常${t2}${t3}`,
       });
     },
 

+ 26 - 28
miniprogram/module/health/components/card-analysis/card-analysis-content.wxml

@@ -1,18 +1,15 @@
 <!--module/health/components/card-analysis/card-analysis-content.wxml-->
-<view class="card-wrapper tongue-container" wx:if="{{tongue.result}}" 
-mark:type="tongue" bind:tap="preview">
-
-<view wx:if="{{isShowType}}">
-<view class="togue-title"> 舌象</view>
-</view>
-
+<view class="card-wrapper tongue-container" wx:if="{{tongue.result && i18n.analysis.__show__}}" mark:type="tongue" bind:tap="preview">
 
+  <view wx:if="{{isShowType}}">
+    <view class="togue-title">{{i18n.analysis.tongue}}</view>
+  </view>
   <view class="card-title" wx:else>
     <view class="tongue-right">
       <view>
         <image src="../../assets/icon/icon_tongue@2x.png" class="icon-title" />
       </view>
-      <view class="text-title">舌象分析</view>
+      <view class="text-title">{{i18n.analysis.tongue}}{{i18n.analysis._}}</view>
     </view>
     <block wx:if="{{exception.tongue === false && tongue.exception.length}}">
       <view class="extra-warapper" slot="right-icon" mark:operation="exception-list">
@@ -27,40 +24,42 @@ mark:type="tongue" bind:tap="preview">
     <view class="picture-container">
       <view style="position: relative;">
         <image src="../../assets/image/pic_tongue@2x.png" class="body-image" mode="widthFix" />
-        <text class="tongue-label tongue-top">舌面</text>
-        <text class="tongue-label tongue-bottom">舌下</text>
+        <text class="tongue-label tongue-top">{{i18n.analysis.tongue_1}}</text>
+        <text class="tongue-label tongue-bottom">{{i18n.analysis.tongue_2}}</text>
       </view>
       <view wx:if="{{tongue.cover.length}}" class="picture-wrapper">
         <image wx:for="{{tongue.cover}}" wx:key="*this" src="{{item}}" mode="aspectFill" />
       </view>
     </view>
 
-    <view wx:if="{{simple.tongue === false}}" class="talbel-wrapper">
-      <view class="tr">
-        <view wx:for="{{tongue.table.columns}}" wx:key="*this" class="th">{{item}}</view>
-      </view>
-      <view wx:for="{{tongue.table.data}}" wx:key="0" wx:for-item="data" class="tr {{data.exception ? 'exception': ''}} {{data.invalid ? 'invalid' : ''}}">
-        <view wx:for="{{tongue.table.columns}}" wx:key="*this" wx:for-index="index" class="td">
-          <rich-text nodes="{{data[index]}}"></rich-text>
+    <block wx:if="{{i18n.analysis.__showContent__}}">
+      <view wx:if="{{simple.tongue === false}}" class="talbel-wrapper">
+        <view class="tr">
+          <view wx:for="{{tongue.table.columns}}" wx:key="*this" class="th">{{item}}</view>
+        </view>
+        <view wx:for="{{tongue.table.data}}" wx:key="0" wx:for-item="data" class="tr {{data.exception ? 'exception': ''}} {{data.invalid ? 'invalid' : ''}}">
+          <view wx:for="{{tongue.table.columns}}" wx:key="*this" wx:for-index="index" class="td">
+            <rich-text nodes="{{data[index]}}"></rich-text>
+          </view>
         </view>
       </view>
-    </view>
-    <view wx:else>&emsp;&emsp;{{tongue.result}}</view>
+      <view wx:else>&emsp;&emsp;{{tongue.result}}</view>
+    </block>
   </view>
 </view>
 
-<exception wx:if="{{tongueException.length}}" dataset="{{tongueException}}"></exception>
+<exception wx:if="{{tongueException.length && i18n.analysis.__showException__}}" dataset="{{tongueException}}"></exception>
 
-<view class="card-wrapper tongue-container" wx:if="{{face.result}}" mark:type="face" bind:tap="preview">
-<view wx:if="{{isShowType}}">
-<view class="togue-title"> 面象</view>
-</view>
+<view class="card-wrapper tongue-container" wx:if="{{face.result && i18n.analysis.__show__}}" mark:type="face" bind:tap="preview">
+  <view wx:if="{{isShowType}}">
+    <view class="togue-title">{{i18n.analysis.face}}</view>
+  </view>
   <view class="card-title" wx:else>
     <view class="tongue-right">
       <view>
         <image src="../../assets/icon/icon_face@2x.png" class="icon-title" />
       </view>
-      <view class="text-title">面象分析</view>
+      <view class="text-title">{{i18n.analysis.face}}{{i18n.analysis._}}</view>
     </view>
     <block wx:if="{{exception.face === false && face.exception.length}}">
       <view class="extra-warapper" slot="right-icon" mark:operation="exception-group">
@@ -70,8 +69,7 @@ mark:type="tongue" bind:tap="preview">
     </block>
   </view>
 
-  <view class="card-body constitution-container">
-  
+  <view wx:if="{{i18n.analysis.__showContent__}}" class="card-body constitution-container">
     <view wx:if="{{simple.face === false}}" class="talbel-wrapper">
       <view class="tr">
         <view wx:for="{{face.table.columns}}" wx:key="*this" class="th">{{item}}</view>
@@ -90,4 +88,4 @@ mark:type="tongue" bind:tap="preview">
   </view>
 </view>
 
-<exception wx:if="{{faceException.length}}" dataset="{{faceException}}"></exception>
+<exception wx:if="{{faceException.length && i18n.analysis.__showException__}}" dataset="{{faceException}}"></exception>

+ 7 - 0
miniprogram/module/health/components/card-analysis/card-analysis-exception.ts

@@ -1,6 +1,13 @@
+import I18nBehavior from "../../../../i18n/behavior";
 // module/health/components/card-analysis/card-analysis-exception.ts
 Component({
+  behaviors: [I18nBehavior],
   properties: {
     dataset: { type: Array, value: [] },
   },
+  data: {
+    i18n: {
+      analysis: { __showException__: false },
+    },
+  },
 })

+ 17 - 15
miniprogram/module/health/components/card-analysis/card-analysis-exception.wxml

@@ -1,21 +1,23 @@
 <!--module/health/components/card-analysis/card-analysis-exception.wxml-->
-<view class="card-wrapper" wx:for="{{dataset}}" wx:key="key">
-  <t-cell wx:if="{{item.title}}" t-class="card-header cell-border-gradient" title="{{item.title}}" />
-  <view class="card-body">
-    <view class="picture-wrapper">
-      <image wx:if="{{item.cover}}" src="{{item.cover}}" mode="aspectFit" class="{{item.tags.length ? 'min' : ''}}" />
-      <view style="display: flex;flex-direction: column;">
-        <t-tag style="margin: 4px 0;" wx:for="{{item.tags}}" wx:key="*this" theme="danger">{{item}}</t-tag>
+<block wx:if="{{i18n.analysis.__showException__}}">
+  <view class="card-wrapper" wx:for="{{dataset}}" wx:key="key">
+    <t-cell wx:if="{{item.title}}" t-class="card-header cell-border-gradient" title="{{item.title}}" />
+    <view class="card-body">
+      <view class="picture-wrapper">
+        <image wx:if="{{item.cover}}" src="{{item.cover}}" mode="aspectFit" class="{{item.tags.length ? 'min' : ''}}" />
+        <view style="display: flex;flex-direction: column;">
+          <t-tag style="margin: 4px 0;" wx:for="{{item.tags}}" wx:key="*this" theme="danger">{{item}}</t-tag>
+        </view>
       </view>
-    </view>
-    <view wx:for="{{item.exception}}" wx:key="key">
-      <t-cell wx:if="{{item.title}}" t-class="card-header cell-border-gradient" title="{{item.title}}" />
-      <view class="card-body">
-        <view class="row" wx:for="{{item.descriptions}}" wx:key="label">
-          <text class="label primary">{{item.label}}</text>
-          <rich-text class="value" nodes="{{item.value}}"></rich-text>
+      <view wx:for="{{item.exception}}" wx:key="key">
+        <t-cell wx:if="{{item.title}}" t-class="card-header cell-border-gradient" title="{{item.title}}" />
+        <view class="card-body">
+          <view class="row" wx:for="{{item.descriptions}}" wx:key="label">
+            <text class="label primary">{{item.label}}</text>
+            <rich-text class="value" nodes="{{item.value}}"></rich-text>
+          </view>
         </view>
       </view>
     </view>
   </view>
-</view>
+</block>

+ 3 - 1
miniprogram/module/health/components/care-scheme/care-scheme.ts

@@ -1,7 +1,8 @@
 // module/health/components/field-ruler/field-ruler.ts
+import I18nBehavior from "../../../../i18n/behavior";
 import {  getCareRecordMethod } from "../../request";
 Component({
-  behaviors: ["wx://form-field-group"],
+  behaviors: ["wx://form-field-group", I18nBehavior],
   lifetimes: {
     attached() {
       this.getCareRecordList();
@@ -11,6 +12,7 @@ Component({
    * 组件的初始数据
    */
    data: {
+    i18n: { health: { condition: '方案' } },
     loading: false,
     careRecordList: [],
   },

+ 1 - 1
miniprogram/module/health/components/care-scheme/care-scheme.wxml

@@ -10,7 +10,7 @@
         <view>
           <image src="../../assets/icon/icon_record@2x.png" class="icon-title" />
         </view>
-        <view class="text-title">我的调养方案</view>
+        <view class="text-title">我的{{i18n.health.condition}}</view>
       </view>
       <slot name="extra"></slot>
     </view>

+ 7 - 0
miniprogram/module/health/components/report-health-index/report-health-index.ts

@@ -1,5 +1,7 @@
 // module/health/components/report-health-index/report-health-index.ts
+import I18nBehavior from "../../../../i18n/behavior";
 Component({
+  behaviors: [I18nBehavior],
   options: {
     multipleSlots: true,
   },
@@ -8,4 +10,9 @@ Component({
     loading: { type: Boolean, value: false },
     message: { type: String, value: '' },
   },
+  data: {
+    i18n: {
+      healthIndex: { title: '', __show__: false },
+    },
+  }
 })

+ 2 - 2
miniprogram/module/health/components/report-health-index/report-health-index.wxml

@@ -1,5 +1,5 @@
 <!--module/health/components/report-health-index/report-health-index.wxml-->
-<view>
+<view wx:if="{{i18n.healthIndex.__show__}}">
   <view class="card-wrapper constitution-container">
     <view class="card-header constitution-box">
       <block slot="title">
@@ -8,7 +8,7 @@
           <view>
             <image src="../../assets/icon/icon_index@2x.png" class="icon-title" />
           </view>
-          <view class="text-title">指标信息</view>
+          <view class="text-title">{{i18n.healthIndex.title}}</view>
         </view>
       </block>
 

+ 11 - 0
miniprogram/module/health/components/report-health-status/report-health-status.ts

@@ -1,4 +1,5 @@
 import PageContainerBehavior from "../../../../core/behavior/page-container.behavior";
+import I18nBehavior from "../../../../i18n/behavior";
 import {
   DraggableSheetBehavior,
   getDraggableSheetContext,
@@ -23,6 +24,7 @@ interface PanelProps {
 
 Component({
   behaviors: [
+    I18nBehavior,
     PageContainerBehavior,
     DraggableSheetBehavior(".health-report-list"),
   ],
@@ -37,6 +39,15 @@ Component({
     },
   },
   data: {
+    i18n: {
+      home: { __showRecord__: false },
+      health: {
+        status: '结果概况',
+        statusTable: ['', '', '', '', '', '', ''],
+        statusNext: '概况'
+      },
+      report: { title: '测评结果' },
+    },
     dataset: {},
     tongue: null as unknown as AnalysisModel,
     face: null as unknown as AnalysisModel,

+ 5 - 5
miniprogram/module/health/components/report-health-status/report-health-status.wxml

@@ -5,7 +5,7 @@
       <block slot="title">
         <t-loading wx:if="{{loading}}" theme="spinner" size="20px" class="loading" />
         <image wx:else class="icon" src="../../assets/icon/icon_health@2x.png" mode="heightFix" />
-        <text class="title-box">健康状况</text>
+        <text class="title-box">{{i18n.health.status}}</text>
       </block>
     </view>
 
@@ -25,7 +25,7 @@
     <view class="card-body report-wrapper" mark:id="{{dataset.reportId}}" style="padding-top:0px;border-radius: 0 0 10px 10px;">
       <view class="content-wrapper" style="border-top: 1px solid #E7E7E7;padding-top:10px">
         <span class="row" wx:for="{{dataset.report}}" wx:key="value">
-          <text wx:if="{{item.label}}" style="color:#8C8C8C;font-size:14px">{{item.label}}:</text>
+          <text wx:if="{{item.label}}" style="color:#8C8C8C;font-size:14px">{{i18n.health.statusTable[index]}}</text>
           <text style="font-size:14px"> {{item.value}}</text>
         </span>
       </view>
@@ -34,7 +34,7 @@
   </view>
   <!-- 症状 -->
   <view class="card-container">
-    <view class="status-title">症状</view>
+    <view class="status-title">{{i18n.health.statusNext}}</view>
     <view class="card-body status-data-wrapper" wx:if="{{dataset.condition.length}}" style="border-top: 1px solid #E7E7E7;padding-top:10px">
       <span class="row" wx:for="{{dataset.condition}}" wx:key="value">
 
@@ -78,14 +78,14 @@
   </draggable-sheet>
 </root-portal>
 
-<view class="card-wrapper report-data-wrapper" mark:type="report" bind:tap="toPreviewPage">
+<view wx:if="{{i18n.home.__showRecord__}}" class="card-wrapper report-data-wrapper" mark:type="report" bind:tap="toPreviewPage">
   <view>
     <view class="report-box">
       <view class="health-title">
         <block slot="title">
           <t-loading wx:if="{{loading}}" theme="spinner" size="20px" class="loading" />
           <image wx:else class="icon" src="../../assets/icon/icon_scheme@2x.png" mode="heightFix"></image>
-          <text class="title-box">健康分析报告</text>
+          <text class="title-box">{{i18n.report.title}}</text>
         </block>
       </view>
       <block slot="right-icon">

+ 3 - 3
miniprogram/module/health/model/health.model.ts

@@ -40,9 +40,9 @@ export function healthReportModel(data: AnyObject) {
 
     report: [
       fn('结果显示您是', data?.willillStateName, true),
-      fn('程度', data?.willillDegreeName),
-      fn('类型', data?.willillSocialName),
-      fn('表现', data?.willillFunctionName),
+      fn('程度', data?.willillDegreeName, true),
+      fn('类型', data?.willillSocialName, true),
+      fn('表现', data?.willillFunctionName, true),
       fn('体质', data?.constitutionGroupName, true),
       fn('证素', data?.factorItemSummary, true),
       fn('证型', data?.diagnoseSyndromeSummary, true),

+ 5 - 0
miniprogram/module/health/pages/analysis/analysis.ts

@@ -1,4 +1,5 @@
 import PageContainerBehavior from "../../../../core/behavior/page-container.behavior";
+import I18nBehavior from "../../../../i18n/behavior";
 import TickleBehavior, { getTickleContext } from "../../../../core/behavior/tickle.behavior";
 
 // module/health/pages/analysis/analysis.ts
@@ -9,10 +10,14 @@ import { AnalysisModel } from "../../model/health.model";
 
 Page({
   behaviors: [
+    I18nBehavior,
     PageContainerBehavior,
     TickleBehavior
   ],
   data: {
+    i18n: {
+      analysis: { title: '图片结果', date: '' },
+    },
     id: '',
     tongue: null as unknown as AnalysisModel,
     face: null as unknown as AnalysisModel,

+ 2 - 2
miniprogram/module/health/pages/analysis/analysis.wxml

@@ -1,11 +1,11 @@
 <!--module/health/pages/analysis/analysis.wxml-->
 <view class="tongue-container">
-<t-navbar title="舌面分析报告" left-arrow bind:fail="toHomePage" />
+<t-navbar title="{{i18n.analysis.title}}" left-arrow bind:fail="toHomePage" />
 
 <scroll-view class="page-scroll__container" type="list" scroll-y style="{{containerStyle}}">
   <view class="card-wrapper header-box">
     <t-cell t-class="card-header no-body" bordered="{{false}}">
-      <view slot="title" style="display:flex"><text style="color:#8C8C8C">报告日期:</text><text style="color:black">{{dataset.reportTime}}</text></view>
+      <view slot="title" style="display:flex"><text style="color:#8C8C8C">{{i18n.analysis.date}}</text><text style="color:black">{{dataset.reportTime}}</text></view>
     </t-cell>
   </view>
 

+ 13 - 0
miniprogram/module/health/pages/home/home.ts

@@ -1,4 +1,5 @@
 import PageContainerBehavior from "../../../../core/behavior/page-container.behavior";
+import I18nBehavior from "../../../../i18n/behavior";
 
 // module/health/pages/home/home.ts
 import { toPatientPage } from "../../router";
@@ -7,6 +8,7 @@ import { healthIndex2Progress } from "../../tools/health-index";
 
 Component({
   behaviors: [
+    I18nBehavior,
     PageContainerBehavior,
   ],
   lifetimes: {
@@ -18,6 +20,17 @@ Component({
   },
   properties: {},
   data: {
+    i18n: {
+      health: { 
+        title: '档案',
+        __showScheme__: false,
+        __showFollowRecord__: false,
+        __showFollowEvaluation__: false,
+        __showRecord__: false,
+        __showNodrugTherapy__: false,
+        __showChatRecord__: false,
+      }
+    },
     // healthId: '',
     healthPatient: { data: null, loading: false, message: '' },
     healthIndex: { data: [], loading: false, message: '' },

+ 8 - 8
miniprogram/module/health/pages/home/home.wxml

@@ -1,6 +1,6 @@
 <!--module/health/pages/home/home.wxml-->
 <view class="health-container">
-  <t-navbar title="健康档案" left-arrow />
+  <t-navbar title="{{i18n.health.title}}" left-arrow />
   <scroll-view class="page-scroll__container" type="list" scroll-y>
     <report-health-patient dataset="{{healthPatient.data}}" loading="{{healthPatient.loading}}" message="{{healthPatient.message}}">
       <view class="extra-warapper" slot="extra" catch:tap="toPatientPage">
@@ -16,17 +16,17 @@
       </view>
     </report-health-index>
     <!--我的调养方案-->
-    <care-scheme></care-scheme>
+    <care-scheme wx:if="{{i18n.health.__showScheme__}}"></care-scheme>
     <!--随访记录-->
-    <follow-record></follow-record>
+    <follow-record wx:if="{{i18n.health.__showFollowRecord__}}"></follow-record>
     <!--随访评估-->
-    <follow-evaluation></follow-evaluation>
+    <follow-evaluation wx:if="{{i18n.health.__showFollowEvaluation__}}"></follow-evaluation>
     <!--调养记录-->
-    <care-record></care-record>
+    <care-record wx:if="{{i18n.health.__showRecord__}}"></care-record>
     <!--线下非药物治疗-->
-    <nodrug-therapy></nodrug-therapy>
-     <!--咨询记录-->
-<chat-record></chat-record>
+    <nodrug-therapy wx:if="{{i18n.health.__showNodrugTherapy__}}"></nodrug-therapy>
+    <!--咨询记录-->
+    <chat-record wx:if="{{i18n.health.__showChatRecord__}}"></chat-record>
   </scroll-view>
 </view>
 <t-message id="{{$messageId}}"></t-message>

+ 13 - 1
miniprogram/module/health/pages/report/report.ts

@@ -1,4 +1,5 @@
 import PageContainerBehavior from "../../../../core/behavior/page-container.behavior";
+import I18nBehavior from "../../../../i18n/behavior";
 import TickleBehavior, {
   getTickleContext,
 } from "../../../../core/behavior/tickle.behavior";
@@ -9,8 +10,19 @@ import { healthIndexMethod, healthReportMethod } from "../../request";
 import { healthIndex2Progress } from "../../tools/health-index";
 
 Page({
-  behaviors: [PageContainerBehavior, TickleBehavior],
+  behaviors: [I18nBehavior, PageContainerBehavior, TickleBehavior],
   data: {
+    i18n: {
+      common: { doctor: '', zy: '' },
+      health: { statusTable: ['', '', '', '', '', '', ''] },
+      scheme: { title: '方案' },
+      report: {
+        title: '报告',
+        date: '',
+        physique: '',
+        physiqueTable: ['特征1', '特征2', '特征3', '特征4', '特征5', '特征6'],
+      }
+    },
     id: "",
     dataset: null as unknown as AnyObject,
     showScheme: false,

+ 15 - 13
miniprogram/module/health/pages/report/report.wxml

@@ -1,17 +1,17 @@
 <!--module/health/pages/report/report.wxml-->
 <view class="report-container">
-  <t-navbar title="健康分析报告" left-arrow bind:fail="toHomePage" />
+  <t-navbar title="{{i18n.report.title}}" left-arrow bind:fail="toHomePage" />
 
   <scroll-view class="page-scroll__container" type="list" scroll-y style="{{containerStyle}}">
     <view class="card-wrapper">
       <t-cell t-class="card-header no-body {{schemeId ? '' : 'cell-border-gradient'}}" bordered="{{!schemeId}}" style="background:transparent">
         <view slot="title" class="header-row">
-          <view class="date-text"><text style="color:#8C8C8C">报告日期:</text><text style="color:black">{{dataset.reportTime}}</text></view>
-          <view bind:tap="toSchemePage" class="recuperate-btn" wx:if="{{!!schemeId}}">调理方案</view>
+          <view class="date-text"><text style="color:#8C8C8C">{{i18n.report.date}}</text><text style="color:black">{{dataset.reportTime}}</text></view>
+          <view bind:tap="toSchemePage" class="recuperate-btn" wx:if="{{!!schemeId}}">{{i18n.scheme.title}}</view>
         </view>
       </t-cell>
       <view class="card-body notification-wrapper" wx:if="{{!schemeId && showScheme}}">
-        <text style="padding-right: 10px;font-size:16px">请找医生</text> <text style="font-size:20px">获取中医调理方案</text>
+        <text style="padding-right: 10px;font-size:16px">请找{{i18n.common.doctor}}</text> <text style="font-size:20px">获取{{i18n.common.zy}}{{i18n.report.scheme}}</text>
       </view>
     </view>
 
@@ -19,10 +19,12 @@
       <view class="card-body report-wrapper">
         <view class="content-wrapper">
           <block wx:if="dataset">
-            <span class="row" wx:for="{{dataset.report}}" wx:key="value">
-              <text wx:if="{{item.label}}" class="{{item.label==='结果显示您是'?'label-text':'label-title'}}">{{item.label}}:</text>
-              <text class="{{item.label==='结果显示您是'?'value-text':'value-title'}}">{{item.value}}</text>
-            </span>
+            <block wx:for="{{dataset.report}}" wx:key="value">
+              <span class="row" wx:if="{{item.value}}">
+                <text wx:if="{{item.label}}" class="{{index ? 'label-title' : 'label-text'}}">{{i18n.health.statusTable[index]}}</text>
+                <text class="{{index ? 'value-title' : 'value-text'}}">{{item.value}}</text>
+              </span>
+            </block>
           </block>
         </view>
         <image class="image-wrapper" src="../../assets/image/health-report.png" mode="aspectFill" />
@@ -35,7 +37,7 @@
           <view>
             <image src="../../assets/icon/icon_physique@2x.png" class="icon-title" />
           </view>
-          <view class="text-title">体质</view>
+          <view class="text-title">{{i18n.report.physique}}</view>
         </view>
         <view class="content-wrapper">
           <block wx:if="dataset">
@@ -47,8 +49,8 @@
             </view>
           </block>
           <view class="talbel-wrapper">
-            <view class="talbel-row {{index % 2 === 0 ? 'odd-row' : ''}}" wx:for="{{dataset.physique}}" wx:key="value" wx:for-index="index">
-              <view class="label">{{item.label}}</view>
+            <view class="talbel-row {{index % 2 === 0 ? 'odd-row' : ''}}" wx:for="{{dataset.physique}}" wx:key="value">
+              <view class="label">{{i18n.report.physiqueTable[index]}}</view>
               <view class="value">{{item.value}}</view>
             </view>
           </view>
@@ -65,7 +67,7 @@
           <view> 
             <image src="../../assets/icon/icon_zhengsu@2x.png" class="icon-title" />
           </view>
-          <view class="text-title">中医证素</view>
+          <view class="text-title">{{i18n.common.zy}}{{i18n.report.resultTable[5]}}</view>
         </view>
         <view class="rows" wx:for="{{dataset.factorItems}}" wx:key="*this">
           <view class="primary">{{item.factorItemName}}</view>
@@ -79,7 +81,7 @@
           <view>
             <image src="../../assets/icon/icon_zhengxing@2x.png" class="icon-title" />
           </view>
-          <view class="text-title">中医证型</view>
+          <view class="text-title">{{i18n.common.zy}}{{i18n.report.resultTable[6]}}</view>
         </view>
         <view class="rows" wx:for="{{dataset.diagnoseSyndromes}}" wx:key="*this">
           <view class="primary">{{item.diagnoseSyndromeName}}</view>

+ 6 - 1
miniprogram/module/health/pages/scheme/scheme.ts

@@ -1,4 +1,5 @@
 import PageContainerBehavior from "../../../../core/behavior/page-container.behavior";
+import I18nBehavior from "../../../../i18n/behavior";
 import TickleBehavior, {
   getTickleContext,
 } from "../../../../core/behavior/tickle.behavior";
@@ -7,7 +8,7 @@ import TickleBehavior, {
 import { healthSchemeMethod } from "../../request";
 import { toReportPage } from "../../router";
 Component({
-  behaviors: [PageContainerBehavior, TickleBehavior],
+  behaviors: [I18nBehavior, PageContainerBehavior, TickleBehavior],
   lifetimes: {
     attached() {
       this.getHealthScheme(this.data.id);
@@ -17,6 +18,10 @@ Component({
     id: { type: String, value: "" },
   },
   data: {
+    i18n: {
+      report: { title: '报告' },
+      scheme: { title: '方案', date: '' },
+    },
     dataset: null,
     schemeId: "",
     healthIndex: { data: [], loading: false, message: "" },

+ 3 - 3
miniprogram/module/health/pages/scheme/scheme.wxml

@@ -1,13 +1,13 @@
 <!--module/health/pages/scheme/scheme.wxml-->
 <view class="scheme-container">
-  <t-navbar title="调理方案" left-arrow />
+  <t-navbar title="{{i18n.scheme.title}}" left-arrow />
 
   <scroll-view class="page-scroll__container" type="list" scroll-y style="{{containerStyle}}">
     <view class="card-wrapper">
       <view class="card-header no-body" bordered="{{false}}" style="background:transparent;padding-right: 6px;padding-left: 6px;">
         <view slot="title" class="header-row">
-          <view class="date-text"><text style="color:#8C8C8C">方案日期:</text><text style="color:black">{{dataset.reportTime}}</text></view>
-          <view class="recuperate-btn" bind:tap="toReportPage">健康分析报告</view>
+          <view class="date-text"><text style="color:#8C8C8C">{{i18n.scheme.date}}</text><text style="color:black">{{dataset.reportTime}}</text></view>
+          <view class="recuperate-btn" bind:tap="toReportPage">{{i18n.report.title}}</view>
         </view>
       </view>
     </view>

+ 14 - 0
miniprogram/module/health/pages/status-record/status-record.ts

@@ -1,3 +1,4 @@
+import I18nBehavior from "../../../../i18n/behavior";
 import tickleBehavior, { getTickleContext } from "../../../../core/behavior/tickle.behavior";
 // module/health/pages/status-record/status-record.ts
 import { getStatusRecordMethod } from "../../request";
@@ -21,6 +22,7 @@ const defaultColumns: Column[] = [
 
 Component({
   behaviors: [
+    I18nBehavior,
     tickleBehavior,
   ],
   lifetimes: {
@@ -28,6 +30,18 @@ Component({
   },
   properties: {},
   data: {
+    i18n: {
+      health: { 
+        status: '',
+        statusRecord: {
+          "症状": "结果1",
+          "联想症状": "结果2",
+          "舌面": "图片1",
+          "舌底": "图片2",
+          "面部": "图片3"
+        }
+      },
+    },
     orientation: '' as 'portrait' | 'landscape',
     containerStyle: '',
     columns: [] as Column[],

+ 4 - 2
miniprogram/module/health/pages/status-record/status-record.wxml

@@ -5,11 +5,13 @@
   }
 </wxs>
 <!--module/health/pages/status-record/status-record.wxml-->
-<t-navbar title="健康状况更新记录" left-arrow />
+<t-navbar title="{{i18n.health.status}}更新记录" left-arrow />
 <view class="wrapper {{orientation}}" style="{{containerStyle}}">
   <view class="header">
     <block wx:for="{{columns}}" wx:key="value" wx:for-index="i" wx:for-item="r">
-      <view class="row {{i === 0 ? 'title' : i % 2 ? 'odd' : 'even'}}" style="height: {{r.height}}px;">{{r.label}}</view>
+      <view class="row {{i === 0 ? 'title' : i % 2 ? 'odd' : 'even'}}" style="height: {{r.height}}px;">
+        {{i18n.health.statusRecord[r.label] || r.label}}
+      </view>
     </block>
   </view>
   <scroll-view class="scrollable" type="list" scroll-x enable-flex style="flex-direction: row;" bind:scrolltolower="loadMore">

+ 3 - 1
miniprogram/module/health/pages/status/status.ts

@@ -1,3 +1,4 @@
+import I18nBehavior from "../../../../i18n/behavior";
 import PageContainerBehavior from "../../../../core/behavior/page-container.behavior";
 import TickleBehavior, { getTickleContext } from "../../../../core/behavior/tickle.behavior";
 
@@ -8,7 +9,7 @@ import { transformHealthIndex2Ruler } from "../../tools/health-index";
 type ResponseData = { id: string, name: string, options: App.Health.Index.Ruler[] }[];
 
 Component({
-  behaviors: [PageContainerBehavior, TickleBehavior],
+  behaviors: [I18nBehavior, PageContainerBehavior, TickleBehavior],
   lifetimes: {
     attached() {
       this.getData()
@@ -16,6 +17,7 @@ Component({
   },
   properties: {},
   data: {
+    i18n: { healthIndex: { title: '数据信息', tips: '', __show__: false } },
     health: [] as ResponseData,
   },
   methods: {

+ 4 - 3
miniprogram/module/health/pages/status/status.wxml

@@ -1,15 +1,16 @@
 <!--module/health/pages/status/status.wxml-->
-<t-navbar title="指标信息" left-arrow />
-<scroll-view class="page-scroll__container" type="list" scroll-y style="{{containerStyle}}">
+<t-navbar title="{{i18n.healthIndex.title}}" left-arrow />
+<scroll-view wx:if="{{i18n.healthIndex.__show__}}" class="page-scroll__container" type="list" scroll-y style="{{containerStyle}}">
   <form bind:submit="onSubmit">
     <t-cell wx:for="{{health}}" wx:key="{{item.id}}" t-class="cell-border-gradient cell-field" t-class-note="cell-field__wrapper" title="{{item.name}}" bind:tap="onPicker">
       <field-ruler class="cell-field__inner full" slot="note" title="{{item.name}}" options="{{item.options}}"></field-ruler>
     </t-cell>
     <block wx:if="{{health.length}}">
-      <view class="tips">温馨提示:指标信息越完善,我们分析的越精确</view>
+      <view class="tips">{{i18n.healthIndex.tips}}</view>
       <form-button block index="1" id="submitBtn"></form-button>
     </block>
   </form>
 </scroll-view>
+<view wx:else style="text-align: center;margin: 100px;">暂无数据</view>
 
 <t-message id="{{$messageId}}"></t-message>