Przeglądaj źródła

优化中医调养第一版

张田田 10 miesięcy temu
rodzic
commit
9ffcac33b4
25 zmienionych plików z 55 dodań i 46 usunięć
  1. 1 3
      miniprogram/module/care/pages/careDetail/careDetail.ts
  2. 0 1
      miniprogram/module/charts/record-care/record-care.ts
  3. 2 1
      miniprogram/module/charts/record-index/health-index.ts
  4. 5 7
      miniprogram/module/charts/record-index/record-index.ts
  5. 0 3
      miniprogram/module/charts/record-index/record-index.wxml
  6. 1 1
      miniprogram/module/chats/components/guide/guide.wxml
  7. 2 2
      miniprogram/module/chats/components/message-select/message-select.wxml
  8. 1 0
      miniprogram/module/chats/components/questionnaire/questionnaire.ts
  9. 1 0
      miniprogram/module/chats/pages/index/index.ts
  10. BIN
      miniprogram/module/health/assets/image/health-report.png
  11. 1 1
      miniprogram/module/health/components/card-analysis/card-analysis-content.scss
  12. 8 1
      miniprogram/module/health/components/card-analysis/card-analysis-content.ts
  13. 4 3
      miniprogram/module/health/components/card-analysis/card-analysis-content.wxml
  14. 1 1
      miniprogram/module/health/components/care-record/care-record.ts
  15. 1 1
      miniprogram/module/health/components/care-record/care-record.wxml
  16. 1 1
      miniprogram/module/health/components/report-health-patient/report-health-patient.scss
  17. 1 0
      miniprogram/module/health/components/report-health-status/report-health-status.scss
  18. 0 4
      miniprogram/module/health/components/report-health-status/report-health-status.ts
  19. 4 1
      miniprogram/module/health/pages/home/home.ts
  20. 9 6
      miniprogram/module/health/pages/report/report.scss
  21. 3 2
      miniprogram/module/health/pages/report/report.wxml
  22. 2 2
      miniprogram/module/health/request.ts
  23. 4 2
      miniprogram/module/user/pages/user-record/user-record.scss
  24. 1 1
      miniprogram/pages/home/home.wxml
  25. 2 2
      miniprogram/themes/page.scss

+ 1 - 3
miniprogram/module/care/pages/careDetail/careDetail.ts

@@ -58,7 +58,7 @@ Page({
           statusText,
         });
         let isShowDelivery = false;
-        console.log(res.items, "careDetail--watch");
+        console.log(res.items, "服务包详情数据");
         if (res.items.length > 0) {
           isShowDelivery = res.items.some((item: any) => {
             return item.conditioningProgramDetail?.isDelivery === "Y";
@@ -67,7 +67,6 @@ Page({
         this.setData({
           isShowDelivery,
         });
-        console.log(isShowDelivery, "isShowDelivery");
         var data = res.items.find(
           (item: any) =>
             Array.isArray(item.healthAnalysisReports) &&
@@ -118,7 +117,6 @@ Page({
 
   onRecord(e: any) {
     const id = e.currentTarget.dataset.id;
-    // console.log(id, "id");
     // 跳转核销记录
     wx.navigateTo({
       url: `/module/care/pages/care/verifyRecord?id=${id}`,

+ 0 - 1
miniprogram/module/charts/record-care/record-care.ts

@@ -40,7 +40,6 @@ Component({
       }
     },
     async _getData() {
-      console.log(this.data.careDetail.patientConditioningScores,"获取数据")
       if (this.data.careDetail.patientConditioningScores?.length > 0) {
         const option = {
           title: {

+ 2 - 1
miniprogram/module/charts/record-index/health-index.ts

@@ -84,10 +84,11 @@ export function healthIndex2Chart(model: App.Health.Index.Model, index = 0): Any
 
 export function transformHealthIndex2Chart(data: App.Health.Index.Data[]): AnyObject[] {
   const list = gather(data, healthIndex2Chart)
-  console.log(list, 'transformHealthIndex2Chart-->list');
+  // console.log(list, 'transformHealthIndex2Chart-->list');
 
   const charts = [];
   for (const item of list) {
+    // console.log(item, 'item111');
     const xAxis = { type: 'category', axisLabel: { overflow: 'breakAll' } }
     const yAxis = [], series = [], visualMap = [];
     for (const option of item.options) {

+ 5 - 7
miniprogram/module/charts/record-index/record-index.ts

@@ -8,13 +8,12 @@ echarts.registerTheme(...Theme);
 Component({
   lifetimes: {
     async attached() {
-      try {
+      // try {
         await this._initRect();
         await this._getData();
-        console.log(this.data.charts, 'charts')
-      } catch (error) {
-        console.error('record-index component error:', error);
-      }
+      // } catch (error) {
+      //   console.error('record-index component error:', error);
+      // }
     },
     detached() {
       // 清理图表实例
@@ -61,9 +60,8 @@ Component({
       try {
         this.setData({ loading: true, error: false });
         const charts = await healthIndexReportMethod();
-        
         if (!charts || charts.length === 0) {
-          this.setData({ loading: false, error: true });
+          this.setData({ loading: false, });
           return;
         }
 

+ 0 - 3
miniprogram/module/charts/record-index/record-index.wxml

@@ -3,9 +3,6 @@
   <block wx:if="{{loading}}">
     <view class="loading">加载中...</view>
   </block>
-  <block wx:elif="{{error}}">
-    <view class="error">加载失败,请重试</view>
-  </block>
   <block wx:else>
       <view wx:for="{{charts}}" wx:key="*this" style="width: {{rect.width}}px; height: {{rect.height}}px;">
         <ec-canvas 

+ 1 - 1
miniprogram/module/chats/components/guide/guide.wxml

@@ -18,7 +18,7 @@
       t-class="cell-border-gradient {{_.getClassName(active)}}" 
       t-class-hover="custom-cell-hover"
       t-class-title="health-analysis-title"
-      title="1、健康分析(剩余{{analysisCount<0?0:analysisCount}}次)" 
+      title="1、健康分析" 
       hover="{{active}}" 
       bind:tap="handleA"
       style="--td-cell-hover-color: #F5F5F5;"

+ 2 - 2
miniprogram/module/chats/components/message-select/message-select.wxml

@@ -38,10 +38,10 @@
     </scroll-view>
     <view wx:if="{{payload.multiple || !payload.required}}" class="chat-card__handle {{active ? '' : 'disabled'}}">
       <view wx:if="{{!payload.required}}" class="item {{hasSelected ? 'disabled': ''}}" bind:tap="onSkip">
-        <view class="not-change">无变化</view>
+        <view class="not-change">都没有</view>
       </view>
       <view wx:if="{{payload.multiple}}" class="item" bind:tap="onSubmit">
-        <view class="sub-btn">选好了</view>
+        <view class="sub-btn">提交</view>
       </view>
     </view>
   </view>

+ 1 - 0
miniprogram/module/chats/components/questionnaire/questionnaire.ts

@@ -112,6 +112,7 @@ Component({
           {},
           {
             transform({ data }: any) {
+              console.log(data, "剩余次数");
               return data?.residuedCou;
             },
           }

+ 1 - 0
miniprogram/module/chats/pages/index/index.ts

@@ -73,6 +73,7 @@ Component({
     },
     getCount(event: GetCountEvent) {
       this.setData({ analysisCount: event.detail.analysisCount });
+      console.log(this.data.analysisCount, "监听页面index高度getCount");
     },
     handle(event: HandleEvent) {
       const index = Object.keys(this.data.messages).length;

BIN
miniprogram/module/health/assets/image/health-report.png


+ 1 - 1
miniprogram/module/health/components/card-analysis/card-analysis-content.scss

@@ -79,7 +79,7 @@
   display: flex;
   align-items: center;
   justify-content: space-between;
-  margin-bottom: 10rpx;
+  margin-bottom: 20rpx;
 }
 .text-title{
   font-size: 16px;

+ 8 - 1
miniprogram/module/health/components/card-analysis/card-analysis-content.ts

@@ -3,7 +3,13 @@ import { AnalysisException, AnalysisModel } from "../../model/health.model";
 
 // module/health/components/card-analysis/card-analysis-content.ts
 Component({
-
+  lifetimes: {
+    attached() {
+      if(this.properties.type==='files'){ 
+        this.setData({ isShowType: true });
+      }
+    }
+  },
   /**
    * 组件的属性列表
    */
@@ -31,6 +37,7 @@ Component({
   data: {
     tongueException: [],
     faceException: [],
+    isShowType: '',
   },
   methods: {
     async preview(event: WechatMiniprogram.TouchEvent) {

+ 4 - 3
miniprogram/module/health/components/card-analysis/card-analysis-content.wxml

@@ -1,7 +1,8 @@
 <!--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 class="card-wrapper tongue-container" wx:if="{{tongue.result}}" 
+mark:type="tongue" bind:tap="preview">
 
-<view wx:if="type===files">
+<view wx:if="{{isShowType}}">
 <view class="togue-title"> 舌象</view>
 </view>
 
@@ -51,7 +52,7 @@
 <exception wx:if="{{tongueException.length}}" dataset="{{tongueException}}"></exception>
 
 <view class="card-wrapper tongue-container" wx:if="{{face.result}}" mark:type="face" bind:tap="preview">
-<view wx:if="type===files">
+<view wx:if="{{isShowType}}">
 <view class="togue-title"> 面象</view>
 </view>
   <view class="card-title" wx:else>

+ 1 - 1
miniprogram/module/health/components/care-record/care-record.ts

@@ -10,7 +10,7 @@ Component({
   methods: {
     async getCareRecordList() {
       // 0 进行中 1 已完成
-      const res = await getCareRecordListMethod();
+      const res = await getCareRecordListMethod("0");
       // console.log(res,"所有的调养记录列表");
       if(res && res.data && res.data.length > 0) {
         this.setData({

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

@@ -18,7 +18,7 @@
         <view class="table-cell">服务包名称</view>
       </view>
       <view class="table-row" wx:for="{{careRecordList}}" wx:key="id" bindtap="goDetail" data-id="{{item.id}}">
-        <view class="table-cell">{{item.estimatedStartDate}}</view>
+        <view class="table-cell">{{item.operateTime}}</view>
         <view class="table-cell">{{item.conditioningWrapName}}</view>
       </view>
     </view>

+ 1 - 1
miniprogram/module/health/components/report-health-patient/report-health-patient.scss

@@ -75,7 +75,7 @@
     .image-wrapper {
       flex: none;
       width: 100px;
-      height: 120px;
+      height: 100px;
       margin-right: 13px;
       border-radius: 10px;
     }

+ 1 - 0
miniprogram/module/health/components/report-health-status/report-health-status.scss

@@ -63,6 +63,7 @@
       width: 128px;
       height: 128px;
       margin-left: 10px;
+      border-radius: 10px;
     }
   }
 

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

@@ -52,12 +52,10 @@ Component({
   },
   methods: {
     async showReportList() {
-      console.log("showReportList",this.data._healthReportList);
       if (!this.data._healthReportList.loaded) {
         wx.showLoading({ title: "加载中" });
         try {
           const data = await healthReportListMethod();
-          console.log("data",data);
           this.setData({
             "_healthReportList.data": data,
             "_healthReportList.loaded": true,
@@ -123,10 +121,8 @@ Component({
           item.value = item.value.split(',')
           return item
         })
-        console.log("获取dataset数据", data.condition );
         const { tongue, face, ...analysisData } = await healthAnalysisMethod(params);
         this.setData({ tongue, face, analysisData });
-      console.log("analysisData", analysisData,tongue,face);
       } catch (error) {
         this.setData({
           dataset: null,

+ 4 - 1
miniprogram/module/health/pages/home/home.ts

@@ -2,7 +2,7 @@ import PageContainerBehavior from "../../../../core/behavior/page-container.beha
 
 // module/health/pages/home/home.ts
 import { toPatientPage } from "../../router";
-import { healthIndexMethod, healthPatientMethod,getCareRecordListMethod } from "../../request";
+import { healthIndexMethod, healthPatientMethod } from "../../request";
 import { healthIndex2Progress } from "../../tools/health-index";
 
 Component({
@@ -28,6 +28,7 @@ Component({
       this.setData({ 'healthPatient.loading': true, })
       try {
         const data = await healthPatientMethod();
+        console.log(data, "获取患者信息");
         this.setData({
           'healthPatient.data': data,
           'healthPatient.loading': false,
@@ -41,9 +42,11 @@ Component({
       }
     },
     async getHealthIndex(id?: string) {
+      console.log(id, "获取健康指数");
       this.setData({ 'healthIndex.loading': true, })
       try {
         const data = await healthIndexMethod(id);
+        console.log(data, "获取身体数据");
         this.setData({
           'healthIndex.data': healthIndex2Progress(data),
           'healthIndex.loading': false,

+ 9 - 6
miniprogram/module/health/pages/report/report.scss

@@ -10,7 +10,8 @@
 .content-wrapper{
   background: white;
     border-radius: 10px;
-    padding: 30px 20px 10px 20px;
+    // padding: 30px 20px 10px 20px;
+    padding: 15px 5px 15px 16px;
 }
 .body-image{
   width: 800px;
@@ -41,7 +42,8 @@
 
 .label-text {
   color: black;
-  font-size: 16px;
+  font-size: 18px;
+  font-weight: 500;
 }
 .label-title {
   color: #ccc;
@@ -49,7 +51,7 @@
 }
 .value-text {
   color: #1d6ff6;
-  font-size: 16px;
+  font-size: 18px;
 }
 .value-title {
   color: black;
@@ -99,10 +101,10 @@
 .card-body.report-wrapper {
   display: flex;
   flex-direction: row;
-  align-items: center;
+  align-items: flex-start;
   background-color: white !important;
   border-radius: 10px !important;
-  padding: 10px !important;
+  padding: 0px !important;
   .content-wrapper {
     flex: auto;
   }
@@ -111,7 +113,8 @@
     flex: none;
     width: 128px;
     height: 128px;
-    margin-left: 8px;
+    margin: 20px 10px 0 8px;
+    border-radius: 10px;
   }
 }
 .rows{

+ 3 - 2
miniprogram/module/health/pages/report/report.wxml

@@ -56,12 +56,13 @@
       </view>
     </view>
 
-    <card-analysis-content tongue="{{dataset.tongue}}" face="{{dataset.face}}" simple="{{ {tongue: false, face: true} }}"></card-analysis-content>
+    <card-analysis-content tongue="{{dataset.tongue}}" face="{{dataset.face}}" simple="{{ {tongue: false, face: true} }}"  :type="file">
+    </card-analysis-content>
 
     <view class="card-wrapper">
       <view class="card-body constitution-container">
         <view class="card-title">
-          <view>
+          <view> 
             <image src="../../assets/icon/icon_zhengsu@2x.png" class="icon-title" />
           </view>
           <view class="text-title">中医证素</view>

+ 2 - 2
miniprogram/module/health/request.ts

@@ -178,8 +178,8 @@ export function getFollowRecordListMethod() {
 }
 
 // 获取调养记录列表 
-export function getCareRecordListMethod(progress: string) {
-  return Post(`/patientCrManage/pagePcrs`, {progress}, {
+export function getCareRecordListMethod(status: string) {
+  return Post(`/patientCrManage/pagePcrs`, {status}, {
     transform({ data }: AnyObject) {
       return data;
     }

+ 4 - 2
miniprogram/module/user/pages/user-record/user-record.scss

@@ -3,7 +3,7 @@
 
 .wrapper {
   display: flex;
-  $border: 1px solid #34FFC6;
+  $border: 1px solid #EEEEEE;
 
 
   &.portrait {
@@ -12,6 +12,7 @@
     border-top: $border;
     border-bottom: $border;
 
+
     .header {
       flex: none;
       border-right: $border;
@@ -34,7 +35,8 @@
       box-sizing: border-box;
 
       &.odd {
-        background-color: #113B38;
+        // background-color: #113B38;
+        background-color: #EEEEEE;
       }
     }
     .col {

+ 1 - 1
miniprogram/pages/home/home.wxml

@@ -66,7 +66,7 @@ v<!--pages/home/home.wxml-->
         <view class="item-main" bindtap="toggleItem"data-index="{{index}}">
           <text class="dot"></text>
           <text class="item-title">{{item.conditioningProgramName}}</text>
-          <text class="item-next-time" wx:if="{{item.nextTime}}">下一次时间:{{item.arrangeDate}}</text>
+          <text class="item-next-time" wx:if="{{item.arrangeDate}}">下一次时间:{{item.arrangeDate}}</text>
           <t-icon name="{{item.expanded ? 'chevron-up' : 'chevron-down'}}" size="24rpx" class="item-arrow" color="#C0C4CC" />
         </view>
           <!-- 这里放详细内容 -->

+ 2 - 2
miniprogram/themes/page.scss

@@ -17,12 +17,12 @@ page {
 
 .page-scroll {
   &__container {
-    // height: var(--page-container-height, 100vh);
+    height: var(--page-container-height, 100vh);
     flex: 1;
     overflow-y: hidden;
     box-sizing: border-box;
 
-    height: 100vh;
+    // height: 100vh;
     // padding-bottom: 80px;
     // padding-bottom: calc(100rpx + env(safe-area-inset-bottom));
   }