una 4 jaren geleden
bovenliggende
commit
2734aa9120

BIN
client/image/report-01.jpg


BIN
client/image/report-02.jpg


BIN
client/image/report-03.jpg


BIN
client/image/report-04.jpg


BIN
client/image/report-05.jpg


BIN
client/image/report-06.jpg


BIN
client/image/report-07.jpg


BIN
client/image/report-08.png


+ 2 - 0
client/pages/common/index/index.js

@@ -233,6 +233,8 @@ let emReNoStorage = my.getStorageSync({ key: 'employRelationNo' });
       
         }).catch(e=>{
            console.log(e);
+          //  获取用户信息失败,重新授权
+            this.authInit();
            
         })
 

+ 45 - 0
client/pages/customer/monthReport/monthReport.acss

@@ -1,4 +1,49 @@
 .f2-chart {
   width: 100%;
   height: 500rpx;
+}
+.report-wrapper{
+  font-size: 0;
+  background: #5C4CEA;
+  padding:0  0 10rpx;
+}
+.report-img{
+  width:100%;
+}
+.block-data-wrapper{
+  position: relative;
+  font-size: 30rpx;
+}
+.common-data{
+  position:absolute;
+  top:0;
+  left:0;
+  right:0;
+  bottom:0;
+  z-index:100;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  color:#5C4CEA;
+  flex-direction: column;
+}
+.report-date{
+  margin:36rpx 0;
+  font-size: 90rpx;
+  font-weight:bold;
+}
+.service-day{
+  margin:0 0 36rpx 0;
+}
+.service-day text{
+  font-size:48rpx;
+  color:#E95E4A;
+  font-weight: bolder;
+}
+.percent-top text{
+  color:#E95E4A;
+  font-weight: bolder;
+}
+.shape-chart{
+  padding:40rpx;
 }

+ 39 - 3
client/pages/customer/monthReport/monthReport.axml

@@ -1,8 +1,44 @@
-<view>
-      <view class="f2-chart">
+<view class="report-wrapper">
+      <!-- <view class="f2-chart">
       <f2 onInit="onInitChart"></f2>
     </view>
      <view class="f2-chart">
       <f2 onInit="onInitChart2"></f2>
-    </view>
+    </view> -->
+        <image mode="widthFix" class="report-img" src="/image/report-01.jpg"/>
+         <view class="common-data-wrapper block-data-wrapper">
+             <image mode="widthFix" class="report-img" src="/image/report-02.jpg"/>
+             <view class="common-data">
+                <view>——保姆服务月度回顾——</view>
+                <view class="report-date">{{reportDate}}</view>
+                <view class="service-day">[{{servantName}}]已服务您<text>{{serviceDay}}</text>天啦!</view>
+                <view class="percent-top">您的保姆服务质量超过全国<text>{{percentTop}}</text>的家庭</view>
+             </view>
+         </view>
+        <image mode="widthFix" class="report-img" src="/image/report-03.jpg"/>
+         <view class="common-data-wrapper block-data-wrapper">
+              <image mode="widthFix" class="report-img" src="/image/report-07.jpg"/>
+             <view class="common-data shape-chart">
+        <f2 onInit="onInitChart"></f2>
+             </view>
+
+         </view>
+
+           <view class="common-data-wrapper block-data-wrapper">
+              <image mode="widthFix" class="report-img" src="/image/report-07.jpg"/>
+             <view class="common-data shape-chart">
+        <f2 onInit="onInitChart1"></f2>
+             </view>
+
+         </view>
+
+
+
+
+
+        <image mode="widthFix" class="report-img" src="/image/report-04.jpg"/>
+        <image mode="widthFix" class="report-img" src="/image/report-05.jpg"/>
+        <image mode="widthFix" class="report-img" src="/image/report-06.jpg"/>
+        <image mode="widthFix" class="report-img" src="/image/report-07.jpg"/>
+        <image mode="widthFix" class="report-img" src="/image/report-08.png"/>
 </view>

+ 75 - 2
client/pages/customer/monthReport/monthReport.js

@@ -1,6 +1,15 @@
+// const F2 = require('@antv/f2/lib/index-all');
+// import F2 from "@antv/f2/lib/index-all"
 Page({
-  data: {},
-  onLoad() {},
+  data: {
+    reportDate:'2020年11月',
+    servantName:'王阿姨',
+    serviceDay:'28',
+    percentTop:'88%'
+  },
+  onLoad() {
+
+  },
    onInitChart(F2, config) {
     //  饼状图
 const chart = new F2.Chart(config);
@@ -40,6 +49,70 @@ chart.render();
     // 注意:需要把chart return 出来
     return chart;
   },
+  onInitChart1(F2, config) {
+    //  饼状图
+const chart = new F2.Chart(config);
+    const data = [
+  { name: '打扫房间', proportion: 0.4, a: '1' },
+  { name: '打扫厨房', proportion: 0.2, a: '1' },
+  { name: '带孩子', proportion: 0.18, a: '1' },
+  { name: '照顾老人', proportion: 0.15, a: '1' },
+  { name: '清洁厨房', proportion: 0.05, a: '1' },
+  { name: '其他', proportion: 0.02, a: '1' },
+];
+
+chart.source(data);
+// chart.legend({
+//   position: 'right'
+// });
+chart.coord('polar', {
+  transposed: true,
+  innerRadius: 0.5,
+});
+chart.axis(false);
+chart
+  .interval()
+  .position('a*proportion')
+  .color('name', [
+    '#1890FF',
+    '#13C2C2',
+    '#2FC25B',
+    '#FACC14',
+    '#F04864',
+    '#8543E0',
+  ])
+  .adjust('stack');
+  chart.guide()
+  .text({
+    position: [ '50%', '50%' ],
+    content: "本月共60条任务"
+  });
+chart.pieLabel({
+  sidePadding: 30,
+  activeShape: true,
+  label1: function label1(data) {
+    return {
+      text: data.name,
+      fill: '#343434',
+      fontWeight: 'bold'
+    };
+  },
+  label2: function label2(data) {
+    return {
+      text: data.proportion,
+      fill: '#999'
+    };
+  },
+   onClick: function onClick(ev) {
+    console.log(ev.data) ;
+    
+  }
+  });
+chart.render();
+   
+    // 注意:需要把chart return 出来
+    return chart;
+  },
    onInitChart2(F2, config) {
 
   //折线图

+ 15 - 10
client/pages/servant/servantCenter/servantCenter.js

@@ -85,7 +85,7 @@ Page({
         "employRelationNo":app.globalData.employRelationNo
     }
      request.httpServiceGet(apiUrl.isChooseSerHobSubjectPath,params).then(data=>{
-        console.log(data);
+        console.log('是否设置服务偏好'+data);
         
 
         let noSetSerHobby=(data=='0'?true:false);
@@ -106,7 +106,7 @@ Page({
         "employRelationNo":app.globalData.employRelationNo
     }
      request.httpServiceGet(apiUrl.isChooseSerStanSubjectPath,params).then(data=>{
-        console.log(data);
+        console.log('是否设置服务标准'+data);
         
 
         let noSetSerStan=(data=='0'?true:false);
@@ -357,21 +357,26 @@ Page({
         //  通知不展示
        let type=e.target.dataset.noticeType;
        console.log(type);
-       if(type=='bmybgx'){
+      
+       if(type=='gzybgx'){
             this.setData({
-          bmybgxShow:false
+          gzybgxShow:false
+    })
+       }else if(type=='rwsz'){
+  this.setData({
+          rwszShow:false
     })
-       }else if(type=='rwwfwc'){
+       }else if(type=='rwgx'){
   this.setData({
-          rwwfwcShow:false
+          rwgxShow:false
     })
-       }else if(type=='phsz'){
+       }else if(type=='fwbzsz'){
   this.setData({
-          phszShow:false
+          fwbzszShow:false
     })
-       }else if(type=='phgx'){
+       }else if(type=='fwbzgx'){
   this.setData({
-          phgxShow:false
+          fwbzgxShow:false
     })
        }