347617796@qq.com 3 years ago
parent
commit
dacb2fd33f
74 changed files with 1171 additions and 147 deletions
  1. 18 0
      .mini-ide/compileMode.json
  2. 6 6
      app.js
  3. 7 3
      app.json
  4. BIN
      image/ch1.png
  5. BIN
      image/ch11.png
  6. BIN
      image/ch2.png
  7. BIN
      image/ch3.png
  8. BIN
      image/length_point.png
  9. 9 9
      package-lock.json
  10. 2 2
      pages/begin/begin.js
  11. 5 5
      pages/deploy/addMoney/addMoney.js
  12. 1 1
      pages/exchange/prizeDetail/prizeDetail.js
  13. 0 0
      pages/noJurisdiction/noJurisdiction.acss
  14. 0 0
      pages/noJurisdiction/noJurisdiction.axml
  15. 0 0
      pages/noJurisdiction/noJurisdiction.js
  16. 0 0
      pages/noJurisdiction/noJurisdiction.json
  17. 93 0
      pages/reportBox/moreE/moreE.acss
  18. 24 0
      pages/reportBox/moreE/moreE.axml
  19. 69 0
      pages/reportBox/moreE/moreE.js
  20. 6 0
      pages/reportBox/moreE/moreE.json
  21. 93 0
      pages/reportBox/newspaperTask/newspaperTask.acss
  22. 34 0
      pages/reportBox/newspaperTask/newspaperTask.axml
  23. 81 0
      pages/reportBox/newspaperTask/newspaperTask.js
  24. 6 0
      pages/reportBox/newspaperTask/newspaperTask.json
  25. 34 0
      pages/reportBox/noUser/noUser.acss
  26. 15 0
      pages/reportBox/noUser/noUser.axml
  27. 44 0
      pages/reportBox/noUser/noUser.js
  28. 6 0
      pages/reportBox/noUser/noUser.json
  29. 104 0
      pages/reportBox/report/report.acss
  30. 141 0
      pages/reportBox/report/report.axml
  31. 161 0
      pages/reportBox/report/report.js
  32. 3 0
      pages/reportBox/report/report.json
  33. 7 4
      pages/statistics/B_ranking/B_ranking.js
  34. 1 1
      pages/statistics/C_ranking/C_ranking.js
  35. 1 1
      pages/statistics/allTask/allTask.axml
  36. 1 1
      pages/statistics/allTask/allTask.js
  37. 9 8
      pages/statistics/check_top/check_top.axml
  38. 1 1
      pages/statistics/getTask/getTask.js
  39. 6 6
      pages/statistics/grant/grant.js
  40. 2 1
      pages/statistics/index/index.js
  41. 1 2
      pages/statistics/integralEvent/integralEvent.acss
  42. 2 2
      pages/statistics/integralEvent/integralEvent.axml
  43. 21 9
      pages/statistics/integralEvent/integralEvent.js
  44. 1 1
      pages/statistics/log_rank/log_rank.axml
  45. 2 2
      pages/statistics/my_PrizeBuckle/my_PrizeBuckle.axml
  46. 1 1
      pages/statistics/my_PrizeBuckle/my_PrizeBuckle.js
  47. 1 1
      pages/statistics/my_apply/my_apply.axml
  48. 3 3
      pages/statistics/my_issue/my_issue.axml
  49. 24 12
      pages/statistics/my_issue/my_issue.js
  50. 2 2
      pages/statistics/my_sp/my_sp.axml
  51. 1 1
      pages/statistics/my_sp/my_sp.js
  52. 1 1
      pages/statistics/my_task/my_task.axml
  53. 1 1
      pages/statistics/my_task/my_task.js
  54. 1 1
      pages/statistics/openPerform/openPerform.axml
  55. 2 2
      pages/statistics/sectionRanking/sectionRanking.axml
  56. 1 2
      pages/statistics/sectionRanking/sectionRanking.js
  57. 1 1
      pages/statistics/taskDetail/taskDetail.js
  58. 2 2
      pages/statistics/task_rank/task_rank.axml
  59. 31 26
      pages/statistics/workDetail/workDetail.axml
  60. 1 1
      pages/statistics/workDetail/workDetail.js
  61. 1 1
      pages/statistics/workpoints/workpoints.axml
  62. 1 1
      pages/workbench/apply/apply.js
  63. 2 1
      pages/workbench/approval_batch/approval_batch.acss
  64. 1 1
      pages/workbench/approval_batch/approval_batch.axml
  65. 1 1
      pages/workbench/approval_batch/approval_batch.js
  66. 2 2
      pages/workbench/approveDetail/approveDetail.js
  67. 55 3
      pages/workbench/index/index.js
  68. 1 1
      pages/workbench/jk_B/jk_B.js
  69. 1 0
      pages/workbench/my_approve/my_approve.acss
  70. 3 3
      pages/workbench/my_approve/my_approve.axml
  71. 1 1
      pages/workbench/my_approve/my_approve.js
  72. 1 1
      pages/workbench/noticeDetail/noticeDetail.js
  73. 1 1
      pages/workbench/prize_buckle/prize_buckle.js
  74. 10 8
      utils/websocket.js

+ 18 - 0
.mini-ide/compileMode.json

@@ -37,6 +37,24 @@
       "title": "悬赏任务详情",
       "page": "pages/statistics/taskDetail/taskDetail",
       "pageQuery": "id=2538"
+    },
+    {
+      "title": "审批详情",
+      "page": "pages/workbench/approveDetail/approveDetail",
+      "pageQuery": "id=7567"
+    },
+    {
+      "title": "我的任务",
+      "page": "pages/statistics/my_task/my_task"
+    },
+    {
+      "title": "本周任务",
+      "page": "pages/newspaperTask/newspaperTask"
+    },
+    {
+      "title": "周报",
+      "page": "pages/reportBox/report/report",
+      "pageQuery": "employee_id=181"
     }
   ]
 }

+ 6 - 6
app.js

@@ -232,8 +232,8 @@ App({
     return that.routerGet2(url, data, Accept);
     // }
   },
-  //免登
-  login(corpId, callBack, errBack=function(){}) {
+  //免登 isShowStart是否显示引导页
+  login(corpId, callBack, errBack=function(){},isShowStart=false) {
     if (that.globalData.token) {
       callBack(true)
     } else {
@@ -258,7 +258,7 @@ App({
                 var getIsStart = dd.getStorageSync({ key: 'isStart' });//判断是否需要打开引导页
                 // console.log(JSON.stringify(user));
                 that.getUserList();//缓存人员列表
-                if (isStart && !getIsStart.data) {//判断是否需要打开引导
+                if (isStart && !getIsStart.data&&isShowStart) {//判断是否需要打开引导
                   dd.reLaunch({
                     url: '../start/start'
                   })
@@ -312,10 +312,10 @@ App({
     const updateManager = dd.getUpdateManager()
     updateManager.onCheckForUpdate(function (res) {
       // 请求完新版本信息的回调
-      console.log(res.hasUpdate) // 是否有更新
+      // console.log(res.hasUpdate) // 是否有更新
     })
     updateManager.onUpdateReady(function (ret) {
-      console.log(ret.version) // 更新版本号
+      // console.log(ret.version) // 更新版本号
       dd.confirm({
         title: '更新提示',
         content: '新版本已经准备好,是否重启应用?',
@@ -334,7 +334,7 @@ App({
   onLaunch(options) {
     dd.globalData=this.globalData;
     that = this;
-    // that.updateApp();
+    that.updateApp();
     that.getTypes(function () { });
     that.getCorp(options.query.corpId);
     that.globalData.corpId = options.query.corpId;

+ 7 - 3
app.json

@@ -33,7 +33,7 @@
     "pages/deploy/integralRule/integralRule",
     "pages/workbench/approve/approve",
     "pages/statistics/C_ranking/C_ranking",
-    "pages/workbench/noJurisdiction/noJurisdiction",
+    "pages/noJurisdiction/noJurisdiction",
     "pages/init/init",
     "pages/deploy/sku/sku",
     "pages/start/start",
@@ -67,12 +67,16 @@
     "pages/exchange/gxdDetail/gxdDetail",
     "pages/exchange/prizeDetail/prizeDetail",
     "pages/exchange/commodityDetail/commodityDetail",
-    "pages/workbench/noticeDetail/noticeDetail"
+    "pages/workbench/noticeDetail/noticeDetail",
+    "pages/reportBox/report/report",
+    "pages/reportBox/noUser/noUser",
+    "pages/reportBox/newspaperTask/newspaperTask",
+    "pages/reportBox/moreE/moreE"
   ],
   "window": {
     "defaultTitle": "功道云",
     "titleBarColor": "#26A2FF",
-    "pullRefresh": "false",
+    "pullRefresh": false,
     "allowsBounceVertical": "NO"
   },
   "tabBar": {

BIN
image/ch1.png


BIN
image/ch11.png


BIN
image/ch2.png


BIN
image/ch3.png


BIN
image/length_point.png


+ 9 - 9
package-lock.json

@@ -87,9 +87,9 @@
       }
     },
     "axios": {
-      "version": "0.21.3",
-      "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.3.tgz",
-      "integrity": "sha512-JtoZ3Ndke/+Iwt5n+BgSli/3idTvpt5OjKyoCmz4LX5+lPiY5l7C1colYezhlxThjNa/NhngCUWZSZFypIFuaA==",
+      "version": "0.21.4",
+      "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz",
+      "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==",
       "requires": {
         "follow-redirects": "^1.14.0"
       }
@@ -119,9 +119,9 @@
       }
     },
     "eventemitter2": {
-      "version": "6.4.4",
-      "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.4.tgz",
-      "integrity": "sha512-HLU3NDY6wARrLCEwyGKRBvuWYyvW6mHYv72SJJAH3iJN3a6eVUvkjFkcxah1bcTgGVBBrFdIopBJPhCQFMLyXw=="
+      "version": "6.4.5",
+      "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-6.4.5.tgz",
+      "integrity": "sha512-bXE7Dyc1i6oQElDG0jMRZJrRAn9QR2xyyFGmBdZleNmyQX0FqGYmhZIrIrpPfm/w//LTo4tVQGOGQcGCb5q9uw=="
     },
     "fecha": {
       "version": "2.3.3",
@@ -129,9 +129,9 @@
       "integrity": "sha1-lI50FX3xoy/RsSw6PDzctuydls0="
     },
     "follow-redirects": {
-      "version": "1.14.3",
-      "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.3.tgz",
-      "integrity": "sha512-3MkHxknWMUtb23apkgz/83fDoe+y+qr0TdgacGIA7bew+QLBo3vdgEN2xEsuXNivpFy4CyDhBBZnNZOtalmenw=="
+      "version": "1.14.6",
+      "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.6.tgz",
+      "integrity": "sha512-fhUl5EwSJbbl8AR+uYL2KQDxLkdSjZGR36xy46AO7cOMTrCMON6Sa28FmAnC2tRTDbd/Uuzz3aJBv7EBN7JH8A=="
     },
     "hammerjs": {
       "version": "2.0.8",

+ 2 - 2
pages/begin/begin.js

@@ -17,7 +17,7 @@ Page({
           })
         } else {
           dd.reLaunch({
-            url: '../workbench/noJurisdiction/noJurisdiction'
+            url: '../noJurisdiction/noJurisdiction'
           })
         }
       },function(data){
@@ -34,6 +34,6 @@ Page({
               str:data.msg
             })
         }
-      })
+      },true)
   },
 });

+ 5 - 5
pages/deploy/addMoney/addMoney.js

@@ -9,12 +9,12 @@ Page({
     dd.setNavigationBar({ title: "续费升级" });
   },
   openUrl() {
-    app.$get("api/order/goods/sku", { callback: "pages/deploy/sku/sku", goods_code: 'DT_GOODS_881634105565156' }).then((res) => {
-      console.log(res.data.data.url)
+    // app.$get("api/order/goods/sku", { callback: "pages/deploy/sku/sku", goods_code: 'DT_GOODS_881634720824433' }).then((res) => {
+    //   console.log(res.data.data.url)
       openLink({
-          url: res.data.data.url
-        // url: 'https://h5.dingtalk.com/open-market/share.html?shareGoodsCode=D34E5A30A9AC7FC6327AB5E6D2D145418457E59F16C3FC969F1A50AEF2E5E320588012470F1AB045&token=d37751d45abad15178adf60f936d7c28&shareUid=C5EB7B5C85793F3D909B2AC4771E12D7'
+          // url: res.data.data.url
+        url: 'https://h5.dingtalk.com/open-market/share.html?shareGoodsCode=D34E5A30A9AC7FC6327AB5E6D2D145418457E59F16C3FC969F1A50AEF2E5E320588012470F1AB045&token=d37751d45abad15178adf60f936d7c28&shareUid=C5EB7B5C85793F3D909B2AC4771E12D7'
       })
-    })
+    // })
   },
 });

+ 1 - 1
pages/exchange/prizeDetail/prizeDetail.js

@@ -35,7 +35,7 @@ Page({
           that.getData();
         } else {
           dd.reLaunch({
-            url: '../noJurisdiction/noJurisdiction'
+            url: '../../noJurisdiction/noJurisdiction'
           })
         }
       }, function () { })

+ 0 - 0
pages/workbench/noJurisdiction/noJurisdiction.acss → pages/noJurisdiction/noJurisdiction.acss


+ 0 - 0
pages/workbench/noJurisdiction/noJurisdiction.axml → pages/noJurisdiction/noJurisdiction.axml


+ 0 - 0
pages/workbench/noJurisdiction/noJurisdiction.js → pages/noJurisdiction/noJurisdiction.js


+ 0 - 0
pages/workbench/noJurisdiction/noJurisdiction.json → pages/noJurisdiction/noJurisdiction.json


+ 93 - 0
pages/reportBox/moreE/moreE.acss

@@ -0,0 +1,93 @@
+.header {
+  background: #fff;
+  position: sticky;
+  top: 0;
+}
+
+.selectItems {
+  /* margin-top: 20rpx; */
+  text-align: center;
+}
+
+.selectItems .selectImg {
+  border-left: 1px solid #f1f1f1;
+  padding: 0 20rpx;
+}
+
+.selectImg image {
+  width: 30rpx;
+  height: 30rpx;
+}
+
+.selectItems .flex-2 {
+  padding: 24rpx 0;
+  text-align: center;
+  font-size: 32rpx;
+  position: relative;
+}
+
+.selectItems .active::before {
+  position: absolute;
+  content: " ";
+  height: 4rpx;
+  width: 100rpx;
+  background: #26A2FF;
+  bottom: 0rpx;
+  left: 50%;
+  margin-left: -50rpx;
+}
+
+.main {
+  background: #fff;
+}
+
+.li {
+  padding: 24rpx 28rpx;
+}
+
+.li-bottom text {
+  position: relative;
+  top: 10rpx;
+  font-size: 28rpx;
+}
+
+.scroll {
+  height: 100vh;
+}
+
+.sxImg {
+  width: 30rpx;
+  height: 30rpx;
+}
+
+.defBtn {
+  border-radius: 6rpx;
+  height: 50rpx;
+  text-align: center;
+  line-height: 50rpx;
+  width: 120rpx;
+  font-size: .24rem;
+}
+
+.li-top {
+  margin-bottom: 14rpx;
+}
+.task {
+  background: #f5f7fa;
+  color: #909399;
+  font-size: .28rem;
+  padding: .05rem .32rem .15rem;
+}
+.content{
+  padding-top: 16rpx;
+  font-size: 32rpx;
+}
+.sxBorder::after{
+  content: " ";
+  width: 2rpx;
+  height: 80rpx;
+  background: #f1f1f1;
+  left: 0;
+  top: 0;
+  position: absolute;
+}

+ 24 - 0
pages/reportBox/moreE/moreE.axml

@@ -0,0 +1,24 @@
+<view>
+  <view class="main scroll">
+    <scroll-view class="scroll" a:if="{{list.length>0}}" scroll-y="{{true}}">
+      <view class="li border-bottom" a:for="{{list}}" catchTap="openDetail" data-item="{{item}}" key="{{item.id}}">
+        <view class="flex-box li-top">
+          <img-box name="{{item.employee.name}}" a:key="{{index}}" imgUrl="{{item.employee.img_url}}" height="80rpx" width="80rpx" fSize="24rpx"></img-box>
+          <view class="flex-1" style="padding-left:16rpx;">
+            <view class="flex-box-ce" style="padding-top:16rpx;">
+              <text class="flex-1">{{item.employee.name}}</text>
+              <text class="red" a:if="{{item.point>0}}">+{{item.point}}  {{item.pt_name}}</text>
+              <text a:else class="green">{{item.point}}  {{item.pt_name}}</text>
+            </view>
+            <view class="content">{{item.remark.customize||item.remark.rule}}</view>
+            <view class="flex-box li-bottom">
+              <text class="flex-1 fontColorX">{{item.date}} 截止</text>
+            </view>
+          </view>
+        </view>
+      </view>
+      <view class="noDatas">没有更多咯</view>
+    </scroll-view>
+    <no-data a:if="{{list.length==0}}"></no-data>
+  </view>
+</view>

+ 69 - 0
pages/reportBox/moreE/moreE.js

@@ -0,0 +1,69 @@
+
+var app = getApp()
+var that;
+Page({
+  data: {
+    list: [],
+    minuteIndex: 0,//条件选择
+    minuteArray: [
+      { id: 0, name: '全部完成任务' },
+      { id: 1, name: '准时完成任务' },
+      { id: 2, name: '提前完成任务' },
+      { id: 3, name: '逾期完成任务' },
+    ],
+    parameter:{},
+  },
+  onLoad(e) {
+    that = this;
+    this.setData({
+      parameter: JSON.parse(e.data),
+    })
+    dd.setNavigationBar({ title: "积分事件" });
+  },
+  onShow() {
+    if (app.globalData.userData) {
+    } else {
+      app.login(app.globalData.corpId, function (is) {
+        if (is) {
+        } else {
+          dd.reLaunch({
+            url: '../../noJurisdiction/noJurisdiction'
+          })
+        }
+      }, function () { })
+    }
+     this.opneWebSocket();
+  },
+  opneWebSocket() {
+    app.globalData.socketApi.sendData(this.data.parameter, this.onmessageWS);
+  },
+  onmessageWS(e) {
+    // 因为作用域问题,这个函数不能使用this
+    if (e.type == 'week_statistics'&&e.msg=='ruleList') {
+      let result = e.result
+      result.map(item => {
+        item.date = that.timestampToTime(item.event_time);
+        item.pt_name=item.pt_id==3? 'B分':'A分'
+      })
+      that.setData({
+        list: result
+      })
+    }
+  },
+  timestampToTime(timestamp) {
+    var date = new Date(timestamp * 1000);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
+    var Y = date.getFullYear() + '-';
+    var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
+    var D = date.getDate() + ' ';
+    var h = date.getHours() + ':';
+    var m = date.getMinutes() + ':';
+    var s = date.getSeconds();
+    return Y + M + D;
+  },
+  openDetail(e) {
+    var id = e.target.dataset.item.id;
+    dd.navigateTo({
+      url: '../../statistics/prizeBuckleDetail/prizeBuckleDetail?id=' + id
+    })
+  },
+});

+ 6 - 0
pages/reportBox/moreE/moreE.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {
+    "img-box": "/Component/img-box/index",
+    "no-data":"/Component/noData/noData"
+  }
+}

+ 93 - 0
pages/reportBox/newspaperTask/newspaperTask.acss

@@ -0,0 +1,93 @@
+.header {
+  background: #fff;
+  position: sticky;
+  top: 0;
+}
+
+.selectItems {
+  /* margin-top: 20rpx; */
+  text-align: center;
+}
+
+.selectItems .selectImg {
+  border-left: 1px solid #f1f1f1;
+  padding: 0 20rpx;
+}
+
+.selectImg image {
+  width: 30rpx;
+  height: 30rpx;
+}
+
+.selectItems .flex-2 {
+  padding: 24rpx 0;
+  text-align: center;
+  font-size: 32rpx;
+  position: relative;
+}
+
+.selectItems .active::before {
+  position: absolute;
+  content: " ";
+  height: 4rpx;
+  width: 100rpx;
+  background: #26A2FF;
+  bottom: 0rpx;
+  left: 50%;
+  margin-left: -50rpx;
+}
+
+.main {
+  background: #fff;
+}
+
+.li {
+  padding: 24rpx 28rpx;
+}
+
+.li-bottom text {
+  position: relative;
+  top: 10rpx;
+  font-size: 28rpx;
+}
+
+.scroll {
+  height: calc(100vh - 120rpx);
+}
+
+.sxImg {
+  width: 30rpx;
+  height: 30rpx;
+}
+
+.defBtn {
+  border-radius: 6rpx;
+  height: 50rpx;
+  text-align: center;
+  line-height: 50rpx;
+  width: 120rpx;
+  font-size: .24rem;
+}
+
+.li-top {
+  margin-bottom: 14rpx;
+}
+.task {
+  background: #f5f7fa;
+  color: #909399;
+  font-size: .28rem;
+  padding: .05rem .32rem .15rem;
+}
+.content{
+  padding-top: 16rpx;
+  font-size: 32rpx;
+}
+.sxBorder::after{
+  content: " ";
+  width: 2rpx;
+  height: 80rpx;
+  background: #f1f1f1;
+  left: 0;
+  top: 0;
+  position: absolute;
+}

+ 34 - 0
pages/reportBox/newspaperTask/newspaperTask.axml

@@ -0,0 +1,34 @@
+<view>
+  <view class="header margin-bottom">
+    <view class="flex-box flex-v-ce tab border-bottom">
+      <view class="flex-1">
+        <picker onChange="activeItem" value="{{minuteIndex}}" range="{{minuteArray}}" range-key="name">
+          <text>{{minuteArray[minuteIndex].name}}</text>
+        </picker>
+      </view>
+    </view>
+  </view>
+  <view class="main scroll">
+    <scroll-view class="scroll" a:if="{{list.length>0}}" scroll-y="{{true}}">
+      <view class="li border-bottom" a:for="{{list}}" catchTap="openDetail" data-item="{{item}}" key="{{item.id}}">
+        <view class="flex-box li-top">
+          <img-box name="{{item.receiver.name}}" a:key="{{index}}" imgUrl="{{item.receiver.img_url}}" height="80rpx" width="80rpx" fSize="24rpx"></img-box>
+          <view class="flex-1" style="padding-left:16rpx;">
+            <view class="flex-box-ce" style="padding-top:16rpx;">
+              <text class="flex-1">{{item.receiver.name}}</text>
+              <text class="red" a:if="{{item.point_config.base_point>0}}">+{{item.point_config.base_point}}  {{item.pt_name}}</text>
+              <text a:else>{{item.point_config.base_point}}  {{item.pt_name}}</text>
+            </view>
+            <view class="content">{{item.task_name}}</view>
+            <view class="flex-box li-bottom">
+              <text class="flex-1 fontColorX">{{item.date}} 截止</text>
+              <button type="primary" class="defBtn" catchTap="openDetail" data-item="{{item}}">查看任务</button>
+            </view>
+          </view>
+        </view>
+      </view>
+      <view class="noDatas">没有更多咯</view>
+    </scroll-view>
+    <no-data a:if="{{list.length==0}}"></no-data>
+  </view>
+</view>

+ 81 - 0
pages/reportBox/newspaperTask/newspaperTask.js

@@ -0,0 +1,81 @@
+
+var app = getApp()
+var that;
+Page({
+  data: {
+    list: [],
+    minuteIndex: 0,//条件选择
+    minuteArray: [
+      { id: 0, name: '全部完成任务' },
+      { id: 1, name: '准时完成任务' },
+      { id: 2, name: '提前完成任务' },
+      { id: 3, name: '逾期完成任务' },
+    ],
+    parameter:{},
+  },
+  onLoad(e) {
+    that = this;
+    this.setData({
+      parameter: JSON.parse(e.data),
+    })
+    if(this.data.parameter.method!='taskList'){
+       dd.setNavigationBar({ title: "我完成的任务" });
+    }else{
+       dd.setNavigationBar({ title: "下属完成的任务" });
+    }
+  },
+  onShow() {
+    this.opneWebSocket();
+  },
+  opneWebSocket() {
+    app.globalData.socketApi.sendData(this.data.parameter, this.onmessageWS);
+  },
+  onmessageWS(e) {
+    // 因为作用域问题,这个函数不能使用this
+    if (e.type == 'week_statistics'&&(e.msg=='taskList'||e.msg=='myTaskList')) {
+      let result = e.result
+      result.map(item => {
+        item.date = that.timestampToTime(item.expire_time);
+        item.pt_name=item.pt_id==3? 'B分':'A分'
+      })
+      that.setData({
+        list: result
+      })
+    }
+  },
+  timestampToTime(timestamp) {
+    var date = new Date(timestamp * 1000);//时间戳为10位需*1000,时间戳为13位的话不需乘1000
+    var Y = date.getFullYear() + '-';
+    var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
+    var D = date.getDate() + ' ';
+    var h = date.getHours() + ':';
+    var m = date.getMinutes() + ':';
+    var s = date.getSeconds();
+    return Y + M + D + h + m + s;
+  },
+  activeItem(e) {
+    var index = Number(e.detail.value)+1;
+    var status = "";
+    if (index == 1) {
+      status = "all"
+    } else if (index == 2) {
+      status = "on_time"
+    } else if (index == 3) {
+      status = "before"
+    }else{
+      status = "over_due"
+    }
+    this.setData({
+      minuteIndex: e.detail.value,
+      [`parameter.range`]:status
+    })
+    // console.log(this.data.parameter)
+    this.opneWebSocket()
+  },
+  openDetail(e) {
+    var id = e.target.dataset.item.id;
+    dd.navigateTo({
+      url: '../../statistics/workDetail/workDetail?id=' + id
+    })
+  },
+});

+ 6 - 0
pages/reportBox/newspaperTask/newspaperTask.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {
+    "img-box": "/Component/img-box/index",
+    "no-data":"/Component/noData/noData"
+  }
+}

+ 34 - 0
pages/reportBox/noUser/noUser.acss

@@ -0,0 +1,34 @@
+.list{
+  /* min-height: 100vh; */
+}
+.li{
+   padding: 24rpx 32rpx;
+   border-bottom: 1px solid #f1f1f1; 
+   background-color: #fff;
+}
+.footer{
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  background-color: #fff;
+  border-top: 1px solid #f1f1f1;
+  padding: 14rpx 0;
+  position: fixed;
+  bottom: 0;
+  left: 0;
+  right: 0;
+}
+.footer view{
+  background-color: #1188F1;
+  color: #fff;
+  width: 45%;
+  padding: 24rpx 0;
+  text-align: center;
+  border-radius: 10rpx;
+}
+.footer view:nth-child(1){
+  margin-right: 20rpx;
+}
+.list-box{
+  overflow: scroll;
+}

+ 15 - 0
pages/reportBox/noUser/noUser.axml

@@ -0,0 +1,15 @@
+<view class="list">
+  <view a:if="{{list.length>0}}" class="list-box" style="margin-bottom:3rem;">
+    <view a:for="{{list}}" class="flex-box-ce li">
+      <img-box name="{{item.name}}" key="{{item.id}}" imgUrl="{{item.img_url}}" height="80rpx" width="80rpx" fSize="24rpx"></img-box>
+      <text style="margin-left:20rpx">{{item.name}}</text>
+    </view>
+    <view class="footer">
+        <view catchTap="openView" data-index="1">奖扣B分</view>
+        <view catchTap="openView" data-index="2">奖扣A分</view>
+    </view>
+  </view>
+  <view a:else>
+    <no-data></no-data>
+  </view>
+</view>

+ 44 - 0
pages/reportBox/noUser/noUser.js

@@ -0,0 +1,44 @@
+var app = getApp();
+var that;
+Page({
+  data: {
+    list: []
+  },
+  onLoad(e) {
+    that = this;
+    dd.setNavigationBar({ title: "未奖扣人员" });
+    if (e.list) {
+      this.setData({
+        list: JSON.parse(e.list)
+      })
+    }
+  },
+  onShow() {
+    if (app.globalData.userData) {
+
+    } else {
+      app.login(app.globalData.corpId, function (is) {
+        if (is) {
+
+        } else {
+          dd.reLaunch({
+            url: '../../noJurisdiction/noJurisdiction'
+          })
+        }
+      }, function () { })
+    }
+
+  },
+  openView(e) {
+    let index = e.target.dataset.index
+    if (index == 1) {
+      dd.navigateTo({
+        url: '../../workbench/jk_B/jk_B?type=B'
+      })
+    } else {
+      dd.navigateTo({
+        url: '../../workbench/jk_B/jk_B?type=A'
+      })
+    }
+  },
+});

+ 6 - 0
pages/reportBox/noUser/noUser.json

@@ -0,0 +1,6 @@
+{
+  "usingComponents": {
+    "img-box": "/Component/img-box/index",
+    "no-data": "/Component/noData/noData"
+  }
+}

+ 104 - 0
pages/reportBox/report/report.acss

@@ -0,0 +1,104 @@
+	page {
+     background-image: linear-gradient(to bottom, #F9FDFF 0%, #BEE8FF 100%);
+     color: #666;
+     font-size: 28rpx;
+     height: 100%;
+  }
+  .scroll{
+    height: 100vh;
+  }
+  .height{
+    padding:28rpx 32rpx;
+    background-color: #fff;
+    font-size: 28rpx;
+    color: #666;
+  }
+  .height image{
+    width: 80rpx;
+    height: 80rpx;
+    margin-right: 20rpx;
+  }
+  .task{
+     padding:28rpx 32rpx;
+     position: relative; 
+  }
+  .task image{
+     position: absolute; 
+     right: 32rpx;
+     top: 3rem;
+  }
+  .title{
+    font-size: 44rpx;
+    color: #222;
+    margin-bottom: 40rpx;
+  }
+  .num{
+    font-weight: 700;
+    color: #1188F1;
+    font-size: 46rpx;
+    padding: 0 20rpx;
+  }
+  .item view{
+    margin-bottom: 20rpx;
+  }
+  .openUrl{
+    color:#1188F1;
+    font-size:24rpx;
+  }
+  .text{
+    font-size: 32rpx;
+    color: #222;
+  }
+  .li .i{
+    width: 24rpx;
+    height: 24rpx;
+    background-color: #26A2FF;
+    border-radius: 50%;
+    margin-right: 20rpx;
+    position: relative;
+    top: 8rpx;
+}
+.ci{
+  color: #1188F1;
+}
+.li{
+  margin-bottom: 40rpx !important;;
+}
+.jt{
+  font-size: 36rpx;
+  position: relative;
+  top: -4rpx;
+}
+.cis{
+  padding-left: 32rpx;
+}
+.li .flex-1{
+  position: relative;
+  padding-left: 0.32rem;
+}
+.li .flex-1::after{
+  content: " ";
+  width: 24rpx;
+  height: 24rpx;
+  background-color: #26A2FF;
+  border-radius: 50%;
+  position: absolute;
+  left: 0;
+  top: 8rpx;
+}
+.footer{
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  padding: 14rpx 0;
+  background-color: #26A2FF;
+  color: #fff;
+}
+.footer image{
+  width: 40rpx;
+  height: 40rpx;
+  margin-right: 10rpx;
+}
+.margin-Top{
+  margin-top: 80rpx;
+}

+ 141 - 0
pages/reportBox/report/report.axml

@@ -0,0 +1,141 @@
+<view class="bg">
+  <scroll-view class="scroll" scroll-y="{{true}}">
+    <view class="flex-box height">
+      <image mode="scaleToFill" src="../../../image/logo.png"></image>
+      <view class="flex-1">
+        <view style="font-size:36rpx;color:#222;">{{result.date.start}}~{{result.date.end}}积分周报</view>
+        <view class="flex-box-ce">
+          <text style="padding-right:20rpx">{{result.employee.name}}</text>
+          <text class="font-flex-word flex-1" style="width:3rem">{{result.site.name}}</text></view>
+      </view>
+    </view>
+    <!-- 任务模块 -->
+    <view class="task" style="padding-bottom:0rpx;position:relative">
+      <view class="flex-box-end" style="color:#666;font-size:24rpx;position:absolute;top:30rpx;right:32rpx">该数据实时更新</view>
+      <image mode="widthFix" src="../../../image/ch2.png" style="width:360rpx" />
+      <view class="title">任务情况</view>
+      <view class="item" data-index="1" catchTap="openView">
+        <view class="text">你负责的任务中</view>
+        <view>目前有
+          <text class="num">{{result.my_tasks.doing_task_count}}</text>项任务待完成</view>
+        <view>其中逾期
+          <text class="num">{{result.my_tasks.overdue_task_count}}</text>项</view>
+      </view>
+      <view class="openUrl" a:if="{{isUrl}}" data-index="1" catchTap="openView">查看我的任务<text class="jt" style="top:2rpx">»</text></view>
+      <view class="item" data-index="7" catchTap="openView">
+        <view class="text margin-Top">本周任务</view>
+        <view>共完成
+          <text class="num">{{result.my_tasks.range_overdue_count+result.my_tasks.range_before_count+result.my_tasks.range_on_time_count}}</text>项任务</view>
+        <view>其中按时完成
+          <text class="num">{{result.my_tasks.range_on_time_count}}</text>项</view>
+        <view>其中提前
+          <text class="num">{{result.my_tasks.range_before_count}}</text>项</view>
+        <view>其中逾期
+          <text class="num">{{result.my_tasks.range_overdue_count}}</text>项</view>
+      </view>
+      <view class="openUrl" a:if="{{isUrl}}" data-index="7" catchTap="openView">查看任务详情<text class="jt" style="top:2rpx">»</text></view>
+    </view>
+    <view class="task" style="padding-top:0rpx;">
+      <image mode="widthFix" src="../../../image/ch3.png" style="width:360rpx" />
+      <view class="item" data-index="2" catchTap="openView">
+        <view class="text margin-Top">你发布的任务中</view>
+        <view>目前有
+          <text class="num">{{result.tasks.doing_task_count}}</text>项任务待完成</view>
+        <view>其中逾期
+          <text class="num">{{result.tasks.overdue_task_count}}</text>项</view>
+      </view>
+      <view class="openUrl" data-index="2" a:if="{{isUrl}}" catchTap="openView">查看相关任务
+        <text class="jt" style="top:2rpx">»</text></view>
+      <view class="item" data-index="8" catchTap="openView">
+        <view class="text margin-Top">本周任务</view>
+        <view>共完成
+          <text class="num">{{result.tasks.range_before_count+result.tasks.range_overdue_count+result.tasks.range_on_time_count}}</text>项任务</view>
+        <view>其中按时完成
+          <text class="num">{{result.tasks.range_on_time_count}}</text>项</view>
+        <view>其中提前
+          <text class="num">{{result.tasks.range_before_count}}</text>项</view>
+        <view>其中逾期
+          <text class="num">{{result.tasks.range_overdue_count}}</text>项</view>
+      </view>
+      <view class="openUrl" data-index="8" a:if="{{isUrl}}" catchTap="openView">查看相关任务
+        <text class="jt" style="top:1rpx">»</text></view>
+    </view>
+    <!-- 积分模块 -->
+    <view class="task" data-index="3" catchTap="openView" style="margin-top:40rpx">
+      <image mode="widthFix" src="../../../image/ch11.png" style="width:360rpx;top:3rem" />
+      <view class="title">积分执行情况</view>
+      <view class="item">
+        <view class="text">本周共完成
+          <text class="num">{{result.award.count_all}}</text>次积分奖扣</view>
+        <view>B分情况 人次
+          <text class="num">{{result.award.count_b}}</text>次</view>
+        <view>奖分
+          <text class="num">{{result.award.sum_add_b}}</text>分</view>
+        <view>扣分
+          <text class="num">{{result.award.sum_sub_b}}</text>分</view>
+        <view style="margin-top:40rpx">A分情况</view>
+        <view>奖分
+          <text class="num">{{result.award.sum_add_a}}</text>分</view>
+        <view>扣分
+          <text class="num">{{result.award.sum_sub_a}}</text>分</view>
+      </view>
+      <view class="openUrl" data-index="3" a:if="{{isUrl}}" catchTap="openView">查看奖扣统计
+        <text class="jt" style="top:2rpx">»</text></view>
+    </view>
+    <view class="task" style="margin-top:40rpx">
+      <view class="title" style="margin-bottom:20rpx"><text class="blue">{{result.rank.free_man.length}}</text>人在本周内未被奖扣</view>
+      <view data-index="5" catchTap="openView" a:if="{{isUrl}}" class="openUrl">查看名单<text class="jt" style="top:0rpx">»</text></view>
+    </view>
+    <view class="task">
+      <view class="title">出现最多的事项</view>
+      <view class="item">
+        <block a:if="{{result.rule.max_three_event.length>0}}">
+          <view class="li" a:for="{{result.rule.max_three_event}}" data-index="4" data-item="{{item}}" catchTap="openView">
+            <view class="flex-box" style="margin-bottom:0rpx">
+              <view class="flex-1">{{item.detail.remark}}</view>
+              <text class="jt blue" a:if="{{isUrl}}">»</text>
+            </view>
+            <view class="cis">
+              <text class="num">{{item.count}}</text>次</view>
+          </view>
+        </block>
+        <view a:else style="text-align: center;color:#666">暂无数据</view>
+      </view>
+    </view>
+    <view class="task">
+      <view class="title">分值最高的事项</view>
+      <view class="text">B分</view>
+      <view class="item" a:if="{{result.rule.point_top_b_events.length>0}}">
+        <view class="li" a:for="{{result.rule.point_top_b_events}}">
+          <view class="flex-box" style="margin-bottom:0rpx">
+            <view class="flex-1">{{item.remark.customize}}</view>
+          </view>
+          <view class="cis">
+            {{item.employee.name}}
+            <text class="num" a:if="{{item.point>0}}">{{item.point}}</text>
+            <text class="num" a:else>{{item.point}}</text>分
+          </view>
+        </view>
+      </view>
+      <view a:else style="text-align: center;color:#666">暂无数据</view>
+      <view class="text">A分</view>
+      <view class="item" a:if="{{result.rule.point_top_a_events.length>0}}">
+        <view class="li" a:for="{{result.rule.point_top_a_events}}">
+          <view class="flex-box" style="margin-bottom:0rpx">
+            <view class="flex-1">{{item.remark.customize}}</view>
+          </view>
+          <view class="cis">
+            {{item.employee.name}}
+            <text class="num" a:if="{{item.point>0}}">{{item.point}}</text>
+            <text class="num" a:else>{{item.point}}</text>分
+          </view>
+        </view>
+      </view>
+      <view a:else style="text-align: center;color:#666">暂无数据</view>
+    </view>
+    <view class="footer" data-index="6" catchTap="openView">
+      <image mode="scaleToFill" src="../../../image/logo.png"></image>
+      <text>以上数据统计由功道云积分制提供</text>
+    </view>
+  </scroll-view>
+</view>

+ 161 - 0
pages/reportBox/report/report.js

@@ -0,0 +1,161 @@
+var app = getApp();
+var that;
+import 'dingtalk-jsapi/entry/mobile';
+import openLink from 'dingtalk-jsapi/api/biz/util/openLink';
+Page({
+  data: {
+    showIndex: 1,
+    thisweek: {
+      end_day: '',
+      start_day: ''
+    },
+    employee_id: '',
+    isUrl: true,
+    start: '',//查看周开始时间
+    allDate:'',
+  },
+  onLoad(e) {
+    that = this;
+    dd.setNavigationBar({ title: "积分周报" });
+    if (e.employee_id) {
+      this.setData({
+        employee_id: e.employee_id
+      })
+    }
+    if (e.start) {
+      this.setData({
+        isUrl: e.start,
+      })
+    }
+    if (e.isUrl) {
+      this.setData({
+        isUrl: false,
+      })
+    }
+    this.setData({
+        allDate: app.globalData.allDate,
+    })
+    this.setDate();
+    dd.showLoading({
+      content: '加载中...',
+    });
+    setTimeout(() => {
+      dd.hideLoading();
+    }, 1000)
+  },
+  onShareAppMessage() {
+    let userId = this.data.employee_id ? this.data.employee_id : app.globalData.userData.id
+    return {
+      title: '积分周报',
+      desc: that.data.result.employee.name + '的积分周报分享',
+      path: 'pages/reportBox/report/report?employee_id=' + userId + '&isUrl=123&start' + that.data.result.date.start
+    };
+  },
+  onShow() {
+    this.opneWebSocket()
+  },
+  //跳转
+  openView(e) {
+    let index = e.target.dataset.index
+    if (!this.data.isUrl && index != 6) {
+      return false
+    }
+    if (index == 1) {
+      dd.navigateTo({
+        url: '../../statistics/my_task/my_task'
+      })
+    } else if (index == 2) {
+      dd.navigateTo({
+        url: '../../statistics/my_issue/my_issue'
+      })
+    } else if (index == 3) {
+      dd.navigateTo({
+        url: '../../workbench/prize_buckle/prize_buckle'
+      })
+    } else if (index == 4) {
+      let data = {
+        type: 'week_statistics',
+        employee_id: this.data.employee_id ? this.data.employee_id : app.globalData.userData.id,
+        start_date: this.data.start ? this.data.start : this.data.thisweek.start_day,
+        method: 'ruleList',
+        page_size: 1000,
+        rule_item_id: e.target.dataset.item.rule_item_id
+      }
+      dd.navigateTo({
+        url: '../moreE/moreE?data=' + JSON.stringify(data)
+      })
+    } else if (index == 5) {
+      dd.navigateTo({
+        url: '../noUser/noUser?list=' + JSON.stringify(this.data.result.rank.free_man)
+      })
+    } else if (index == 6) {
+      openLink({
+        url: 'https://h5.dingtalk.com/open-market/share.html?shareGoodsCode=D34E5A30A9AC7FC6327AB5E6D2D145418457E59F16C3FC969F1A50AEF2E5E320588012470F1AB045&token=d37751d45abad15178adf60f936d7c28&shareUid=C5EB7B5C85793F3D909B2AC4771E12D7'
+      })
+    } else if (index == 7) {
+      let data = {
+        type: 'week_statistics',
+        employee_id: this.data.employee_id ? this.data.employee_id : app.globalData.userData.id,
+        start_date: this.data.start ? this.data.start : this.data.thisweek.start_day,
+        method: 'myTaskList',
+        page_size: 1000,
+        range: 'all'
+      }
+      dd.navigateTo({
+        url: '../newspaperTask/newspaperTask?data=' + JSON.stringify(data)
+      })
+    } else if (index == 8) {
+      let data = {
+        type: 'week_statistics',
+        employee_id: this.data.employee_id ? this.data.employee_id : app.globalData.userData.id,
+        start_date: this.data.start ? this.data.start : this.data.thisweek.start_day,
+        method: 'taskList',
+        page_size: 1000,
+        range: 'all'
+      }
+      dd.navigateTo({
+        url: '../newspaperTask/newspaperTask?data=' + JSON.stringify(data)
+      })
+    }
+  },
+  setDate() {
+    var thisweek = {};
+    var date = new Date();
+    // 本周一的日期
+    date.setDate(date.getDate() - date.getDay() + 1);
+    let month = (date.getMonth() + 1) < 10 ? '0' + (date.getMonth() + 1) : (date.getMonth() + 1)
+    let getDate = date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()
+    thisweek.start_day = date.getFullYear() + "-" + month + "-" + getDate;
+
+    // 本周日的日期
+    date.setDate(date.getDate() + 6);
+    let month2 = (date.getMonth() + 1) < 10 ? '0' + (date.getMonth() + 1) : (date.getMonth() + 1)
+    let getDate2 = date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate()
+    thisweek.end_day = date.getFullYear() + "-" + month2 + "-" + getDate2;
+    this.setData({
+      thisweek: thisweek
+    })
+  },
+  // 页面被关闭
+  onUnload() {
+    app.globalData.socketApi.closewebsocket();
+  },
+  opneWebSocket() {
+    let data = {
+      type: 'week_statistics',
+      employee_id: this.data.employee_id ? this.data.employee_id : app.globalData.userData.id,
+      start_date: this.data.start ? this.data.start : this.data.thisweek.start_day
+    }
+    app.globalData.socketApi.sendData(data, this.onmessageWS);
+  },
+  onmessageWS(e) {
+    // 因为作用域问题,这个函数不能使用this
+    if (e.type == 'week_statistics' && e.msg == 'all') {
+      let result = e.result
+      that.setData({
+        result: result
+      })
+      // app.globalData.socketApi.closewebsocket();
+    }
+  }
+});

+ 3 - 0
pages/reportBox/report/report.json

@@ -0,0 +1,3 @@
+{
+  "usingComponents": {}
+}

+ 7 - 4
pages/statistics/B_ranking/B_ranking.js

@@ -8,7 +8,8 @@ Page({
     isPx:true,
     page:1,
     scroll_top:0,
-    popupCx: '',  
+    popupCx: '',
+    // pt_id: app.getTypesItem('BF').id,
   },
   onLoad() {
     that = this;
@@ -37,7 +38,7 @@ Page({
           }
         } else {
           dd.reLaunch({
-            url: '../noJurisdiction/noJurisdiction'
+            url: '../../noJurisdiction/noJurisdiction'
           })
         }
       },function(){})
@@ -48,7 +49,7 @@ Page({
       page: that.data.page,
       page_size: 20,
       dept_id:that.data.dept_id,
-      pt_id: app.getTypesItem('BF').id,
+      pt_id:3,
       sort: that.data.isPx?'DESC':'ASC',
       type: 'all',
     }
@@ -106,7 +107,9 @@ Page({
   },
   //选择部门
   onConfirmTissue(data) {
-    this.setData({ dept_id: data.id,page:1,TissueVal:data.name })
+    if(data){
+      this.setData({ dept_id: data.id,page:1,TissueVal:data.name })
+    }
     this.getData();
   },
 });

+ 1 - 1
pages/statistics/C_ranking/C_ranking.js

@@ -65,7 +65,7 @@ Page({
           }
         } else {
           dd.reLaunch({
-            url: '../noJurisdiction/noJurisdiction'
+            url: '../../noJurisdiction/noJurisdiction'
           })
         }
       },function(){})

+ 1 - 1
pages/statistics/allTask/allTask.axml

@@ -25,7 +25,7 @@
   </view>
   <view class="main scroll">
     <scroll-view class="scroll" a:if="{{list.length>0}}" scroll-y="{{true}}" onScrollToLower="onScrollToLower">
-      <view class="li border-bottom" a:for="{{list}}" catchTap="openDetail" data-item="{{item}}">
+      <view class="li border-bottom" a:for="{{list}}" catchTap="openDetail" data-item="{{item}}" key="{{item.id}}">
         <view class="flex-box li-top">
           <img-box name="{{item.employee_name}}" a:key="{{index}}" id="{{item.employee_id}}" height="80rpx" width="80rpx" fSize="24rpx"></img-box>
           <view class="flex-1" style="padding-left:16rpx;">

+ 1 - 1
pages/statistics/allTask/allTask.js

@@ -46,7 +46,7 @@ Page({
           }
         } else {
           dd.reLaunch({
-            url: '../noJurisdiction/noJurisdiction'
+            url: '../../noJurisdiction/noJurisdiction'
           })
         }
       },function(){})

+ 9 - 8
pages/statistics/check_top/check_top.axml

@@ -16,20 +16,20 @@
     </view>
   </view>
   <view class="main scroll">
-    <scroll-view scroll-y="{{true}}" class="scroll" a:if="{{list.length>0}}"  onScrollToLower="onScrollToLower" >
-      <view class="flex-box flex-v-ce item border-bottom" data-item="{{item}}"  onTap="openDetail" a:for="{{list}}">
+    <scroll-view scroll-y="{{true}}" class="scroll" a:if="{{list.length>0}}" onScrollToLower="onScrollToLower">
+      <view class="flex-box flex-v-ce item border-bottom" data-item="{{item}}" onTap="openDetail" a:for="{{list}}" key="{{item.id}}">
         <view class="index" a:if="{{index==0}}">
-          <image mode="scaleToFill" src="../../../image/1.png"/>
+          <image mode="scaleToFill" src="../../../image/1.png" />
         </view>
         <view class="index" a:elif="{{index==1}}">
-          <image mode="scaleToFill" src="../../../image/2.png"/>
+          <image mode="scaleToFill" src="../../../image/2.png" />
         </view>
         <view class="index" a:elif="{{index==2}}">
-          <image mode="scaleToFill" src="../../../image/3.png"/>
+          <image mode="scaleToFill" src="../../../image/3.png" />
         </view>
         <view class="index" a:else>{{(index+1)}}</view>
         <view class="flex-1 flex-box flex-v-ce">
-          <img-box name="{{item.name}}" imgUrl="{{item.img_url}}" height="80rpx" width="80rpx" fSize="24rpx"></img-box>
+          <img-box name="{{item.name}}" key="{{item.id}}" imgUrl="{{item.img_url}}" height="80rpx" width="80rpx" fSize="24rpx"></img-box>
           <view class="users">
             <view class="name">{{item.name}}</view>
             <view class="num">{{item.dept_name}}</view>
@@ -37,9 +37,10 @@
         </view>
         <view class="blue" style="margin-right:28rpx;">{{item.point}}分</view>
       </view>
-              <view class="noDatas" a:if="{{isData}}">没有更多咯</view>
+      <view class="noDatas" a:if="{{isData}}">没有更多咯</view>
     </scroll-view>
     <no-data a:if="{{list.length==0}}"></no-data>
   </view>
-  <select-date notDate="{{false}}" defaultDate="{{defaultDate}}" isShow="{{showDate}}" a:if="{{showDate==true}}" onClose="onClose" onConfirm="onConfirmDate"></select-date>
+  <select-date notDate="{{false}}" defaultDate="{{defaultDate}}" isShow="{{showDate}}" a:if="{{showDate==true}}" onClose="onClose" 
+    onConfirm="onConfirmDate"></select-date>
 </view>

+ 1 - 1
pages/statistics/getTask/getTask.js

@@ -41,7 +41,7 @@ Page({
           })
         } else {
           dd.reLaunch({
-            url: '../noJurisdiction/noJurisdiction'
+            url: '../../noJurisdiction/noJurisdiction'
           })
         }
       },function(){})

+ 6 - 6
pages/statistics/grant/grant.js

@@ -16,6 +16,12 @@ Page({
     dd.setNavigationBar({ title: "发放奖票" });
     this.setData({ isAdministrator: app.globalData.isAdministrator })
   },
+  onShow() {
+    animation = dd.createAnimation({
+      duration: 200,
+      timeFunction: "linear",
+    });
+  },
   //备注输入
   bindTextAreaBlur: function (e) {
     this.setData({
@@ -85,12 +91,6 @@ Page({
       animationInfo: animation.export()
     });
   },
-  onShow() {
-    animation = dd.createAnimation({
-      duration: 200,
-      timeFunction: "linear",
-    });
-  },
   //关闭规则
   onClose() {
     animation.translateY(1200).step();

+ 2 - 1
pages/statistics/index/index.js

@@ -19,7 +19,7 @@ Page({
       },
       {
         code: '任务管理', child: [
-          { name: '指派任务', imgUrl: '../../../image/my_publish.png', url: '../assaign/assaign', code: 'creator admin ' },
+          { name: '指派任务', imgUrl: '../../../image/my_publish.png', url: '../assaign/assaign', code: 'creator admin' },
           { name: '发布悬赏', imgUrl: '../../../image/caback6.png', url: '../offerAreward/offerAreward', code: 'creator admin ' },
           { name: '我发布的', imgUrl: '../../../image/my_publish.png', url: '../my_issue/my_issue', code: 'creator admin ' },
           { name: '我的任务', imgUrl: '../../../image/my_task.png', url: '../my_task/my_task', code: 'admin employee' },
@@ -35,6 +35,7 @@ Page({
           { name: '日志分', imgUrl: '../../../image/log1.png', url: '../log_rank/log_rank', code: 'creator admin employee' },
           { name: '任务分', imgUrl: '../../../image/log2.png', url: '../task_rank/task_rank', code: 'creator admin employee' },
           { name: '积分事件', imgUrl: '../../../image/event_list_a.png', url: '../integralEvent/integralEvent', code: 'creator admin employee' },
+          { name: '积分周报', imgUrl: '../../../image/length_point.png', url: '../../reportBox/report/report', code: 'admin' },
         ]
       },
       {

+ 1 - 2
pages/statistics/integralEvent/integralEvent.acss

@@ -3,8 +3,7 @@
     background: #fff;
 }
 .li{
-   padding: 24rpx 32rpx;
-   
+   padding: 24rpx 32rpx; 
 }
 .main-right{
   margin-left: 10rpx;

+ 2 - 2
pages/statistics/integralEvent/integralEvent.axml

@@ -19,8 +19,8 @@
     </view>
     <view class="main scroll">
       <scroll-view class="scroll" a:if="{{list.length>0}}" scroll-y="{{true}}" onScrollToLower="onScrollToLower">
-        <view class="flex-box li border-bottom" a:for="{{list}}" catchTap="openDetail" data-item="{{item}}">
-          <img-box name="{{item.employee_name}}" imgUrl="{{item.employee_img_url}}" height="80rpx" width="80rpx" fSize="24rpx"></img-box>
+        <view class="flex-box li border-bottom" a:for="{{list}}" catchTap="openDetail" data-item="{{item}}" key="{{item.id}}">
+          <img-box name="{{item.employee_name}}" key="{{item.id}}" imgUrl="{{item.employee_img_url}}" height="80rpx" width="80rpx" fSize="24rpx"></img-box>
           <view class="flex-1 main-right">
             <view class="flex-box flex-v-ce">
               <view class="name flex-1">{{item.employee_name}}</view>

+ 21 - 9
pages/statistics/integralEvent/integralEvent.js

@@ -26,7 +26,7 @@ Page({
 
     page: 1,
     popupCx: '',  
-
+    rule_item_id:'',//细则ID
   },
   onLoad(e) {
     that = this;
@@ -55,6 +55,11 @@ Page({
         defaultDate: { type: '1', date: e.month },
       })
     }
+    if(e.rule_item_id){//周报进来
+      this.setData({
+        rule_item_id: e.rule_item_id,
+      })
+    }
   },
   onShow() {
     typeArr = [{ id: 0, name: '全部' }];
@@ -80,7 +85,7 @@ Page({
           }
         } else {
           dd.reLaunch({
-            url: '../noJurisdiction/noJurisdiction'
+            url: '../../noJurisdiction/noJurisdiction'
           })
         }
       },function(){})
@@ -100,6 +105,9 @@ Page({
     } else {
       data.month = that.data.dateObj || that.data.date;
     }
+    if(that.data.rule_item_id){//周报进来的细则ID
+      data.item_id=that.data.rule_item_id
+    }
     app.$get('api/integral/statistics/integral', data).then((res) => {
       var data = res.data.data.list;
       data.map((item) => {
@@ -168,6 +176,7 @@ Page({
       date_type: data.type == 1 ? 3 : data.type,
       page: 1,
       selectDateVal: data.type == 1 ? (data.date == that.data.date ? '本月' : '月') : '日',
+      rule_item_id:''
     })
     this.getData();
   },
@@ -177,21 +186,23 @@ Page({
       showDate: false,
       showStaff: false,
       showRuleTwo: false,
-      popupCx: ''
+      popupCx: '',
+      rule_item_id:''
     })
   },
   //选择积分分类
   bingIntegralType(e) {
     this.setData({
       typesIndex: e.detail.value,
-      page: 1
+      page: 1,
+      rule_item_id:''
     });
     this.getData();
   },
   //选择员工
   onConfirmStaff(data) {
     if (!data) {
-      this.setData({ staffVal: '员工', employee_ids: '', page: 1 })
+      this.setData({ staffVal: '员工', employee_ids: '', page: 1,rule_item_id:'' })
       this.getData();
       return false;
     }
@@ -204,12 +215,12 @@ Page({
           arr.push(item.id);
         })
         var employee_ids = arr.join(',');
-        this.setData({ staffVal: str.substring(0, str.length - 1), employee_ids: employee_ids, page: 1 })
+        this.setData({ staffVal: str.substring(0, str.length - 1), employee_ids: employee_ids, page: 1,rule_item_id:'' })
       } else {
-        this.setData({ staffVal: data[0].name, employee_ids: [data[0].id], page: 1 })
+        this.setData({ staffVal: data[0].name, employee_ids: [data[0].id], page: 1,rule_item_id:'' })
       }
     } else {
-      this.setData({ staffVal: '员工', employee_ids: [], page: 1 })
+      this.setData({ staffVal: '员工', employee_ids: [], page: 1,rule_item_id:'' })
     }
     this.getData();
   },
@@ -218,7 +229,8 @@ Page({
     this.setData({
       rule_id: e.id ? e.id : '',
       page: 1,
-      ruleVal: e.name
+      ruleVal: e.name,
+      rule_item_id:''
     })
     this.getData();
   },

+ 1 - 1
pages/statistics/log_rank/log_rank.axml

@@ -17,7 +17,7 @@
     <view class="fontColorF" style="font-size:28rpx;padding:10rpx 28rpx;">排名不包含初始分和工龄分</view>
     <view class="main scroll">
       <scroll-view class="scroll" scroll-y="{{true}}" a:if="{{list.length>0}}" onScrollToLower="onScrollToLower">
-        <view a:for="{{list}}" data-item="{{item}}" class="flex-box flex-v-ce item border-bottom">
+        <view a:for="{{list}}" data-item="{{item}}" class="flex-box flex-v-ce item border-bottom" key="{{item.id}}">
           <view a:if="{{item.rank==1}}" class="index">
             <image mode="scaleToFill" src="../../../image/1.png"></image>
           </view>

+ 2 - 2
pages/statistics/my_PrizeBuckle/my_PrizeBuckle.axml

@@ -15,8 +15,8 @@
   </view>
   <view class="main scroll">
     <scroll-view class="scroll" a:if="{{activeIndex==1&&list.length>0}}" scroll-y="{{true}}" onScrollToLower="onScrollToLower">
-      <view class="flex-box li border-bottom" data-index="1" a:for="{{list}}" catchTap="openDetail" data-item="{{item}}">
-        <img-box name="{{item.employee_name}}" imgUrl="{{item.employee_img_url}}" height="80rpx" width="80rpx" fSize="24rpx"></img-box>
+      <view class="flex-box li border-bottom" data-index="1" a:for="{{list}}" catchTap="openDetail" data-item="{{item}}" key="{{item.id}}">
+        <img-box name="{{item.employee_name}}" key="{{item.id}}" imgUrl="{{item.employee_img_url}}" height="80rpx" width="80rpx" fSize="24rpx"></img-box>
         <view class="flex-1 main-right">
           <view class="flex-box flex-v-ce">
             <view class="name flex-1">{{item.employee_name}}</view>

+ 1 - 1
pages/statistics/my_PrizeBuckle/my_PrizeBuckle.js

@@ -31,7 +31,7 @@ Page({
           }
         } else {
           dd.reLaunch({
-            url: '../noJurisdiction/noJurisdiction'
+            url: '../../noJurisdiction/noJurisdiction'
           })
         }
       },function(){})

+ 1 - 1
pages/statistics/my_apply/my_apply.axml

@@ -16,7 +16,7 @@
   </view>
   <view class="main scroll">
     <scroll-view class="scroll" a:if="{{list.length>0}}" scroll-y="{{true}}" onScrollToLower="onScrollToLower">
-      <view class="flex-box li border-bottom" catchTap="openDetail" a:for="{{list}}" data-item="{{item}}">
+      <view class="flex-box li border-bottom" catchTap="openDetail" a:for="{{list}}" data-item="{{item}}" key="{{item.id}}">
         <view class="flex-1 main-right">
           <view class="flex-box">
             <view class="name flex-1" style="margin-right: 10rpx;">{{item.remark.customize || item.remark.rule}}</view>

+ 3 - 3
pages/statistics/my_issue/my_issue.axml

@@ -12,7 +12,7 @@
       <view style="margin-top:16rpx;">
         <view class="search flex-box flex-v-ce">
           <image mode="scaleToFill" src="../../../image/ss.png"/>
-          <input class="flex-1" placeholder="请输入任务内容" onInput="bindKeyInput" class="flex-1"/>
+          <input class="flex-1" placeholder="请输入任务内容" onInput="bindKeyInput"/>
           <button a:if="{{isVal}}" class="delVal" formType="reset">×</button>
         </view>
       </view>
@@ -20,8 +20,8 @@
   </view>
   <view class="main scroll">
     <scroll-view class="scroll" a:if="{{(activeIndex==1||activeIndex==2)&&list.length>0}}" scroll-y="{{true}}" onScrollToLower="onScrollToLower">
-      <view class="flex-box li border-bottom" data-index="1" a:for="{{list}}" catchTap="openDetail" data-item="{{item}}">
-        <img-box name="{{item.employee_name}}" id="{{item.employee_id}}" a:if="{{activeIndex==1}}" imgUrl="{{item.employee_img_url}}" height="80rpx" width="80rpx" fSize="24rpx"></img-box>
+      <view class="flex-box li border-bottom" data-index="1" a:for="{{list}}" catchTap="openDetail" data-item="{{item}}" key="{{item.id}}">
+        <img-box name="{{item.employee_name}}" key="{{item.id}}" id="{{item.employee_id}}" a:if="{{activeIndex==1}}" imgUrl="{{item.employee_img_url}}" height="80rpx" width="80rpx" fSize="24rpx"></img-box>
         <block a:if="{{activeIndex==2}}">
           <img-box name="{{item.owner_name}}" a:if="{{item.receiver_id==0}}" imgUrl="{{item.owner_img_url}}" height="80rpx" width="80rpx" fSize="24rpx"></img-box>
           <img-box name="{{item.receiver_name}}" a:else imgUrl="{{item.receiver_img_url}}" height="80rpx" width="80rpx" fSize="24rpx"></img-box>

+ 24 - 12
pages/statistics/my_issue/my_issue.js

@@ -29,6 +29,25 @@ Page({
     that = this;
     dd.setNavigationBar({ title: "我发布的任务" });
   },
+  onShow() {
+    if (app.globalData.userData) {
+        if (this.data.page == 1) {
+          dd.hideLoading();
+          this.setData({ list: [] })
+          that.getData(that.data.activeIndex);
+        }
+    } else {
+      app.login(app.globalData.corpId, function (is) {
+        if (is) {
+          that.getData(that.data.activeIndex);
+        } else {
+          dd.reLaunch({
+            url: '../../noJurisdiction/noJurisdiction'
+          })
+        }
+      }, function () { })
+    }
+  },
   onReset() {
     this.setData({
       page: 1,
@@ -84,13 +103,6 @@ Page({
     this.setData({ list: [] })
     this.getData(this.data.activeIndex);
   },
-  onShow() {
-    if (this.data.page == 1) {
-      dd.hideLoading();
-      this.setData({ list: [] })
-      that.getData(that.data.activeIndex);
-    }
-  },
   //过滤List,通常用于删除了某条数据,刷新列表
   filtrationList(index, id) {
     if (index == 1) {
@@ -117,7 +129,7 @@ Page({
         pt_id: parameter1.pt_id,//类型
         status: parameter1.status,//状态
         sort: parameter1.sort,//排序
-        content:that.data.searchName,
+        content: that.data.searchName,
       }
     } else if (index == 2) {
       var parameter2 = this.data.parameter2;
@@ -128,20 +140,20 @@ Page({
         source_type: 1,
         pt_id: parameter2.pt_id,//类型
         order_by: parameter2.order_by,//类型
-        content:that.data.searchName,
+        content: that.data.searchName,
       }
     } else {
       data = {
         page: that.data.page,
         page_size: 20,
-        content:that.data.searchName,
+        content: that.data.searchName,
       }
     }
     app.$get(urlS[index - 1], data).then((res) => {
       var data = res.data.data.list;
-      if(that.data.page==1){
+      if (that.data.page == 1) {
         this.setData({
-          list:[],
+          list: [],
         })
       }
       var list = that.data.list;

+ 2 - 2
pages/statistics/my_sp/my_sp.axml

@@ -25,9 +25,9 @@
   </view>
   <view class="main scroll">
     <scroll-view class="scroll" a:if="{{(minuteIndex==0)&&list.length>0}}" scroll-y="{{true}}" onScrollToLower="onScrollToLower">
-      <view class="li border-bottom" a:for="{{list}}">
+      <view class="li border-bottom" a:for="{{list}}" key="{{item.id}}">
         <view class="flex-box li-top">
-          <img-box name="{{item.employee_name}}" a:key="{{index}}" id="{{item.employee_id}}" height="80rpx" width="80rpx" fSize="24rpx"></img-box>
+          <img-box name="{{item.employee_name}}" key="{{item.id}}" a:key="{{index}}" id="{{item.employee_id}}" height="80rpx" width="80rpx" fSize="24rpx"></img-box>
           <view class="flex-1" style="padding-left:16rpx;">
             <view class="flex-box-ce" style="padding-top:16rpx;">
               <text class="flex-1">{{item.employee_name}}</text>

+ 1 - 1
pages/statistics/my_sp/my_sp.js

@@ -44,7 +44,7 @@ Page({
           }
         } else {
           dd.reLaunch({
-            url: '../noJurisdiction/noJurisdiction'
+            url: '../../noJurisdiction/noJurisdiction'
           })
         }
       },function(){})

+ 1 - 1
pages/statistics/my_task/my_task.axml

@@ -21,7 +21,7 @@
   <view class="main scroll">
     <scroll-view class="scroll" a:if="{{(activeIndex==1)&&list.length>0}}" scroll-y="{{true}}" onScrollToLower="onScrollToLower">
       <view class="task" a:if="{{toList.length>0}}">今日任务</view>
-      <view class="li border-bottom" a:for="{{toList}}" a:if="{{toList.length>0}}">
+      <view class="li border-bottom" a:for="{{toList}}" a:if="{{toList.length>0}}" key="{{item.id}}">
         <view class="flex-box li-top" catchTap="openDetail" data-item="{{item}}">
           <view class="flex-1">{{item.task_name}}</view>
           <text class="red" a:if="{{item.point_config.base_point>0}}">+{{item.point_config.base_point}}  {{item.pt_name}}</text>

+ 1 - 1
pages/statistics/my_task/my_task.js

@@ -41,7 +41,7 @@ Page({
           }
         } else {
           dd.reLaunch({
-            url: '../noJurisdiction/noJurisdiction'
+            url: '../../noJurisdiction/noJurisdiction'
           })
         }
       },function(){})

+ 1 - 1
pages/statistics/openPerform/openPerform.axml

@@ -8,7 +8,7 @@
     <view style="background:#fff;padding:0 28rpx;" a:if="{{items.files[0]}}" class="flex-box flex-v-ce">
       <view a:for="{{items.files}}" key="index" a:for-item="imgs" a:for-index="imgIndex" style="position:relative">
         <text class="detele" data-itemIndx="{{index}}" data-index="{{imgIndex}}" catchTap="deteleImg">×</text>
-        <image mode="scaleToFill" class="showImg" src="{{imgs}}" data-index="{{imgIndex}}" data-item="{{items.files}}" catchTap="showImg"/>
+        <image mode="scaleToFill" class="showImg" src="{{imgs}}" data-index="{{imgIndex}}" data-item="{{items.files}}"/>
       </view>
     </view>
   </view>

+ 2 - 2
pages/statistics/sectionRanking/sectionRanking.axml

@@ -17,7 +17,7 @@
     <view class="fontColorF" style="font-size:28rpx;padding:10rpx 28rpx;">排名不包含初始分和工龄分</view>
     <view class="main scroll">
       <scroll-view class="scroll" scroll-y="{{true}}" a:if="{{list.length>0}}" onScrollToLower="onScrollToLower">
-        <view a:for="{{list}}" data-item="{{item}}" class="flex-box flex-v-ce item border-bottom">
+        <view a:for="{{list}}" data-item="{{item}}" class="flex-box flex-v-ce item border-bottom" key="{{item.id}}">
           <view a:if="{{item.rank==1}}" class="index">
             <image mode="scaleToFill" src="../../../image/1.png"></image>
           </view>
@@ -29,7 +29,7 @@
           </view>
           <view a:else class="index">{{item.rank}}</view>
           <view class="flex-1 flex-box flex-v-ce">
-            <img-box name="{{item.employee_name}}" imgUrl="{{item.employee_img_url}}" height="80rpx" width="80rpx" fSize="24rpx"></img-box>
+            <img-box name="{{item.employee_name}}" key="{{item.id}}" imgUrl="{{item.employee_img_url}}" height="80rpx" width="80rpx" fSize="24rpx"></img-box>
             <view class="name">{{item.employee_name}}</view>
           </view>
           <view class="blue" style="margin-right:28rpx;">{{item.point}}</view>

+ 1 - 2
pages/statistics/sectionRanking/sectionRanking.js

@@ -41,7 +41,6 @@ Page({
   onLoad() {
     that = this;
     dd.setNavigationBar({ title: "阶段排名" });
-    this.getData();
   },
   onShow() {
     if (app.globalData.userData) {
@@ -58,7 +57,7 @@ Page({
           }
         } else {
           dd.reLaunch({
-            url: '../noJurisdiction/noJurisdiction'
+            url: '../../noJurisdiction/noJurisdiction'
           })
         }
       },function(){})

+ 1 - 1
pages/statistics/taskDetail/taskDetail.js

@@ -39,7 +39,7 @@ Page({
           that.getDetail(that.data.id);
         } else {
           dd.reLaunch({
-            url: '../noJurisdiction/noJurisdiction'
+            url: '../../noJurisdiction/noJurisdiction'
           })
         }
       }, function () { })

+ 2 - 2
pages/statistics/task_rank/task_rank.axml

@@ -23,7 +23,7 @@
     <view class="fontColorF" style="font-size:28rpx;padding:10rpx 28rpx;">排名不包含初始分和工龄分</view>
     <view class="main scroll">
       <scroll-view class="scroll" scroll-y="{{true}}" a:if="{{list.length>0}}" onScrollToLower="onScrollToLower">
-        <view a:for="{{list}}" data-item="{{item}}" class="flex-box flex-v-ce item border-bottom">
+        <view a:for="{{list}}" data-item="{{item}}" class="flex-box flex-v-ce item border-bottom" key="{{item.id}}">
           <view a:if="{{item.rank==1}}" class="index">
             <image mode="scaleToFill" src="../../../image/1.png"></image>
           </view>
@@ -35,7 +35,7 @@
           </view>
           <view a:else class="index">{{item.rank}}</view>
           <view class="flex-1 flex-box flex-v-ce">
-            <img-box name="{{item.employee_name}}" imgUrl="{{item.employee_img_url}}" height="80rpx" width="80rpx" fSize="24rpx"></img-box>
+            <img-box name="{{item.employee_name}}" key="{{item.id}}" imgUrl="{{item.employee_img_url}}" height="80rpx" width="80rpx" fSize="24rpx"></img-box>
             <view class="name">{{item.employee_name}}</view>
           </view>
           <view class="blue" style="margin-right:28rpx;">{{item.point}}</view>

+ 31 - 26
pages/statistics/workDetail/workDetail.axml

@@ -2,7 +2,8 @@
   <view class="header margin-bottom">
     <view class="header-top flex-box flex-v-ce  margin-bottom">
       <view class="flex-box flex-v-ce flex-1 ">
-        <img-box name="{{dataDetail.employee_name}}" a:if="{{dataDetail.employee_name}}" imgUrl="{{dataDetail.img_url}}" height="90rpx" width="90rpx" fSize="28rpx"></img-box>
+        <img-box name="{{dataDetail.employee_name}}" a:if="{{dataDetail.employee_name}}" imgUrl="{{dataDetail.img_url}}" 
+          height="90rpx" width="90rpx" fSize="28rpx"></img-box>
         <view class="top-left">
           <view class="name">{{dataDetail.employee_name}}</view>
           <view a:if="{{dataDetail.dept_list[0]}}">{{dataDetail.dept_list[0].dept_name}}</view>
@@ -25,7 +26,7 @@
       </view>
       <view class="flex-box flex-v-ce">
         <view class="laber">驳回理由</view>
-        <view class="flex-1">{{dataDetail.review_remark}}</text>
+        <view class="flex-1">{{dataDetail.review_remark}}
         </view>
       </view>
       <view style="height:20rpx;background: rgba(245, 247, 250, 1);"></view>
@@ -37,7 +38,7 @@
       </view>
       <view class="flex-box flex-v-ce">
         <view class="laber">备注</view>
-        <view class="flex-1">{{dataDetail.review_remark}}</text>
+        <view class="flex-1">{{dataDetail.review_remark}}
         </view>
       </view>
       <view style="height:20rpx;background: rgba(245, 247, 250, 1);"></view>
@@ -54,7 +55,8 @@
       <view class="flex-box" a:if="{{dataDetail.task_file_list.length>0}}">
         <view class="laber"></view>
         <view class="flex-1 flex-box flex-v-ce imgs">
-          <image mode="scaleToFill" data-index="{{index}}" a:for="{{dataDetail.task_file_list}}" data-item="{{dataDetail.task_file_list}}" src="{{item}}" catchTap="showImg"/>
+          <image mode="scaleToFill" data-index="{{index}}" a:for="{{dataDetail.task_file_list}}" data-item="{{dataDetail.task_file_list}}" 
+            src="{{item}}" catchTap="showImg" />
         </view>
       </view>
       <view class="flex-box flex-v-ce">
@@ -84,10 +86,10 @@
       <view class="flex-box flex-v-ce">
         <view class="laber">截止时间</view>
         <view class="flex-1">{{dataDetail.expire_time}}
-        <text style="padding-left: 10px;" class="red" a:if="{{dataDetail.expire_day > 0}}">逾期{{dataDetail.expire_day}}天</text>
+          <text style="padding-left: 10px;" class="red" a:if="{{dataDetail.expire_day > 0}}">逾期{{dataDetail.expire_day}}天</text>
         </view>
       </view>
-
+      
       <view class="flex-box flex-v-ce" a:if="{{dataDetail.point_config.ahead_award_point}}">
         <view class="laber">提前奖分</view>
         <view class="flex-1">{{dataDetail.point_config.ahead_award_point}}B分/天</view>
@@ -103,7 +105,8 @@
       <view class="flex-box" a:if="{{dataDetail.complete_task.files.length>0}}">
         <view class="laber"></view>
         <view class="flex-1 flex-box flex-v-ce imgs">
-          <image mode="scaleToFill" data-index="{{index}}" a:for="{{dataDetail.complete_task.files}}" data-item="{{dataDetail.complete_task.files}}" src="{{item}}" catchTap="showImg"/>
+          <image mode="scaleToFill" data-index="{{index}}" a:for="{{dataDetail.complete_task.files}}" data-item="{{dataDetail.complete_task.files}}" 
+            src="{{item}}" catchTap="showImg" />
         </view>
       </view>
     </view>
@@ -153,27 +156,27 @@
         <text style="padding-right:24rpx" catchTap="openJyt" a:if="{{dataDetail.employee_id==userId&&dataDetail.status<3}}">+记一条</text>
       </view>
       <view a:if="{{activeIndex == 2}}" class="flex-box-end flex-2 blue ji">
-        <text style="padding-right:24rpx" catchTap="openJf"  a:if="{{keepTheScore}}">记分</text>
+        <text style="padding-right:24rpx" catchTap="openJf" a:if="{{keepTheScore}}">记分</text>
       </view>
     </view>
     <view a:if="{{activeIndex == 1}}" style="margin-bottom:0.8rem">
       <view class="flex-box gc_item" a:for="{{process}}" a:if="{{item.recorder_id==dataDetail.employee_id}}">
-          <view class="flex-box  flex-1">
-            <img-box name="{{item.recorder}}" imgUrl="{{item.img_url}}" height="90rpx" width="90rpx" fSize="28rpx"></img-box>
-            <view class="top-left flex-1">
-              <view class="flex-box flex-v-ce">
-                <view class="fontColorX flex-1">{{item.recorder}}</view>
-                <view style="font-size:28rpx">{{item.time}}</view>
-              </view>
-              <view style="color:#222;margin-right:80rpx;">{{item.remark}}</view>
-            </view>
-            <view class="delete" a:if="{{item.recorder_id==userId&&dataDetail.status<3}}">
-              <image mode="scaleToFill" data-index="{{index}}" src="../../../image/delete.png" class="img" catchTap="deleteItem"></image>
+        <view class="flex-box  flex-1">
+          <img-box name="{{item.recorder}}" imgUrl="{{item.img_url}}" height="90rpx" width="90rpx" fSize="28rpx"></img-box>
+          <view class="top-left flex-1">
+            <view class="flex-box flex-v-ce">
+              <view class="fontColorX flex-1">{{item.recorder}}</view>
+              <view style="font-size:28rpx">{{item.time}}</view>
             </view>
+            <view style="color:#222;margin-right:80rpx;word-break: break-all;">{{item.remark}}</view>
+          </view>
+          <view class="delete" a:if="{{item.recorder_id==userId&&dataDetail.status<3}}">
+            <image mode="scaleToFill" data-index="{{index}}" src="../../../image/delete.png" class="img" catchTap="deleteItem"></image>
           </view>
+        </view>
       </view>
       <view class="flex-box-v flex-center-center noTask" a:if="{{dataDetail.gc.length==0}}">
-        <image mode="scaleToFill" src="../../../image/noTask.png"/>
+        <image mode="scaleToFill" src="../../../image/noTask.png" />
         <text style="font-size:24rpx">还没有任务过程去记一条吧</text>
       </view>
     </view>
@@ -190,26 +193,28 @@
             </view>
             <view a:if="{{item.point*1 > 0}}" style="margin-bottom:10rpx;">+{{item.point}}</view>
             <view a:if="{{item.point*1 < 0}}" style="margin-bottom:10rpx;">{{item.point}}</view>
-            <view style="color:#222;margin-right:80rpx;">{{item.remark}}</view>
+            <view style="color:#222;margin-right:80rpx;word-break: break-all;">{{item.remark}}</view>
           </view>
           <view class="delete" a:if="{{item.recorder_id==userId&&dataDetail.status<3}}">
-            <image mode="scaleToFill" data-index="{{index}}" src="../../../image/delete.png" class="img"  catchTap="deleteItem"></image>
+            <image mode="scaleToFill" data-index="{{index}}" src="../../../image/delete.png" class="img" catchTap="deleteItem"></image>
           </view>
         </view>
       </view>
       <view class="flex-box-v flex-center-center noTask" a:if="{{dataDetail.jf.length==0}}">
-        <image mode="scaleToFill" src="../../../image/noTask.png"/>
+        <image mode="scaleToFill" src="../../../image/noTask.png" />
         <text style="font-size:24rpx">还没有任务记录去记一条吧</text>
       </view>
     </view>
   </view>
   <view class="btn-area" style="margin-top:28rpx;" a:if="{{(dataDetail.reviewer_id == userId && dataDetail.status == 2)||(dataDetail.employee_id == userId && dataDetail.status == 1)}}">
-      <button type="default" loading="{{disabled}}" a:if="{{dataDetail.reviewer_id == userId && dataDetail.status == 2&&!isNot}}" class="defBtn" disabled="{{disabled}}" catchTap="openWc">去审批</button>
-      <button type="default" loading="{{disabled}}" a:if="{{dataDetail.employee_id == userId && dataDetail.status == 1}}" class="defBtn" disabled="{{disabled}}" catchTap="openPerform">完成</button>
+    <button type="default" loading="{{disabled}}" a:if="{{dataDetail.reviewer_id == userId && dataDetail.status == 2&&!isNot}}" 
+      class="defBtn" disabled="{{disabled}}" catchTap="openWc">去审批</button>
+    <button type="default" loading="{{disabled}}" a:if="{{dataDetail.employee_id == userId && dataDetail.status == 1}}" class="defBtn" 
+      disabled="{{disabled}}" catchTap="openPerform">完成</button>
   </view>
   <view class="pop-up" a:if="{{isPublisher}}">
     <picker onChange="bindPickerChange" value="{{index}}" range="{{array}}">
-      <image class="img2" mode="scaleToFill" src="../../../image/Bj.png"/>
+      <image class="img2" mode="scaleToFill" src="../../../image/Bj.png" />
     </picker>
   </view>
 </view>

+ 1 - 1
pages/statistics/workDetail/workDetail.js

@@ -52,7 +52,7 @@ Page({
           that.getDetail(that.data.id);
         } else {
           dd.reLaunch({
-            url: '../noJurisdiction/noJurisdiction'
+            url: '../../noJurisdiction/noJurisdiction'
           })
         }
       }, function () { })

+ 1 - 1
pages/statistics/workpoints/workpoints.axml

@@ -15,7 +15,7 @@
             <input value="{{process.point}}" name="{{index}}" placeholder="0" type="number" onInput="bindKeyInput" data-index="{{index}}" class="flex-1"/>
             <view class="picker-box" data-index="{{index}}" catchTap="bindPickerChange">
               <view class="{{isArrindex==true? 'picker-right':'picker-left'}} yuan"></view>
-              <view class="flex-box flex-v-ce" class="picker">
+              <view class="flex-box flex-v-ce">
                 <text class="red flex-1">奖</text>
                 <text class="green flex-1">扣</text>
               </view>

+ 1 - 1
pages/workbench/apply/apply.js

@@ -85,7 +85,7 @@ Page({
           that.showQrcode();
         } else {
           dd.reLaunch({
-            url: '../noJurisdiction/noJurisdiction'
+            url: '../../noJurisdiction/noJurisdiction'
           })
         }
       }, function () { })

+ 2 - 1
pages/workbench/approval_batch/approval_batch.acss

@@ -86,7 +86,7 @@
 }
 .li {
   padding: 24rpx 28rpx;
-  padding-bottom: 0rpx;
+  padding-bottom: 16rpx;
 }
 .main{
   background: #fff;
@@ -109,6 +109,7 @@
   -webkit-box-orient: vertical;
   padding-top: 10rpx;
   margin-bottom: 10rpx;
+  height: 80rpx;
 }
 
 .main-right .date {

+ 1 - 1
pages/workbench/approval_batch/approval_batch.axml

@@ -14,7 +14,7 @@
       <view style="margin-top:16rpx;">
         <view class="search flex-box flex-v-ce">
           <image mode="scaleToFill" src="../../../image/ss.png" />
-          <input class="flex-1" placeholder="请输入任务内容" onInput="bindKeyInput" />
+          <input class="flex-1" placeholder="请输入审批内容或姓名" onInput="bindKeyInput" />
           <button a:if="{{isVal}}" class="delVal" formType="reset">×</button>
         </view>
       </view>

+ 1 - 1
pages/workbench/approval_batch/approval_batch.js

@@ -45,7 +45,7 @@ Page({
           that.refreshData();
         } else {
           dd.reLaunch({
-            url: '../noJurisdiction/noJurisdiction'
+            url: '../../noJurisdiction/noJurisdiction'
           })
         }
       }, function () { })

+ 2 - 2
pages/workbench/approveDetail/approveDetail.js

@@ -36,10 +36,10 @@ Page({
           that.getData();
         } else {
           dd.reLaunch({
-            url: '../noJurisdiction/noJurisdiction'
+            url: '../../noJurisdiction/noJurisdiction'
           })
         }
-      }, function () { })
+      })
     }
   },
   openDetail() {

+ 55 - 3
pages/workbench/index/index.js

@@ -65,7 +65,7 @@ Page({
         that.setMenuList("employee");
       }
     } else {
-      app.login(app.globalData.corpId, function (is) {
+      app.login(app.globalData.corpId,function (is) {
         if (is) {
           if (app.globalData.isCreator) {
             that.setMenuList("creator");
@@ -85,12 +85,64 @@ Page({
           })
         } else {
           dd.reLaunch({
-            url: '../noJurisdiction/noJurisdiction'
+            url: '../../noJurisdiction/noJurisdiction'
           })
         }
-      })
+      },function(){},true)
     }
   },
+  activeA(){
+      dd.createDing({
+          users: ["102250695436416908"], //默认选中用户工号列表;类型: Array<String>
+          corpId: app.globalData.corpId, // 类型: String
+          alertType: 2, // 钉发送方式 0:电话, 1:短信, 2:应用内;类型 Number
+          alertDate: {"format":"yyyy-MM-dd HH:mm", "value":"2019-08-29 08:25"}, // 非必选,定时发送时间, 非定时DING不需要填写
+          type: 1,// 附件类型 1:image, 2:link;类型: Number
+          
+          // 非必选
+          // 附件信息
+          attachment: {
+            images: ["https://www.baidu.com/img/bd_logo1.png?where=super"], // 图片附件, type=1时, 必选;类型: Array<String>
+            // image: "https://www.baidu.com/img/bd_logo1.png?where=super", // 链接附件, type=2时, 必选;类型: String    
+            title: "这是一个测试", // 链接附件, type=2时, 必选;类型: String
+            url: "https://www.baidu.com/", // 链接附件, type=2时, 必选;类型 String
+            text: "测试发钉成功" // 链接附件, type=2时, 必选;类型: String
+          },
+          text: '测试ding',  // 正文
+          bizType :0, // 业务类型 0:通知DING;1:任务;2:会议;
+
+          // 任务信息
+          // bizType=1的时候选填
+          taskInfo: {    
+            ccUsers: ['100', '101'],// 抄送用户列表, 工号,类型: Array<String>
+            deadlineTime: {"format":"yyyy-MM-dd HH:mm", "value":"2015-05-09 08:00"}, // 任务截止时间    
+            taskRemind: 30 // 任务提醒时间, 单位分钟;支持参数: 0:不提醒;15:提前15分钟;60:提前1个小时;180:提前3个小时;1440:提前一天;类型: Number
+          },
+          // 日程信息
+          // bizType=2的时候选填
+          confInfo: {      
+            bizSubType: 0,  // 子业务类型如会议: 0:预约会议, 1:预约电话会议, 2:预约视频会议;类型: Number (注: 目前只有会议才有子业务类型);
+            location: '某某会议室', // 会议地点(非必选),类型: String    
+            startTime: {"format":"yyyy-MM-dd HH:mm", "value":"2015-05-09 08:00"},// 会议开始时间  
+            endTime: {"format":"yyyy-MM-dd HH:mm", "value":"2015-05-09 08:00"},// 会议结束时间    
+            remindMinutes: 30, // 会前提醒。单位分钟;1:不提醒, 0:事件发生时提醒, 5:提前5分钟, 15:提前15分钟, 30:提前30分钟, 60:提前1个小时, 1440:提前一天
+            remindType: 2 // 会议提前提醒方式;0:电话, 1:短信, 2:应用内;类型: Number
+          },
+        
+          success:function(res){
+            /*
+            {
+              "dingId": "1_1_a09f167xxx",
+              "text": "钉正文内容",
+              "result": true
+            }
+            */  
+          },
+          fail:function(err){
+          }
+      })
+  },
+
   openGly() {
     contactAdminToUseApp({ id: '55493', corpId: that.data.mainCorpId })
       .catch((err) => {

+ 1 - 1
pages/workbench/jk_B/jk_B.js

@@ -522,7 +522,6 @@ Page({
           let obj = this.returnResult(Number(item.employee_id))[0]
           item.name = obj ? obj.name:'未知';
         })
-       
         this.setData({
           isErrorShow: true,
           errorList: errorList
@@ -580,6 +579,7 @@ Page({
     }, 1000);
   },
   returnResult(id) {
+    console.log(id)
     return app.globalData.usersList.filter(item => {
       return item.id == id;
     })

+ 1 - 0
pages/workbench/my_approve/my_approve.acss

@@ -76,6 +76,7 @@
   -webkit-box-orient: vertical;
   padding-top: 10rpx;
   margin-bottom: 10rpx;
+  height: 80rpx;
 }
 
 .main-right .date {

+ 3 - 3
pages/workbench/my_approve/my_approve.axml

@@ -3,7 +3,7 @@
     <form onReset="onReset" class="flex-box-ce">
       <view class="search flex-box flex-v-ce">
         <image mode="scaleToFill" src="../../../image/ss.png"/>
-        <input placeholder="请输入姓名" onInput="bindKeyInput" onConfirm="bindKeyInput" class="flex-1"/>
+        <input placeholder="请输入审批内容或姓名" onInput="bindKeyInput" onConfirm="bindKeyInput" class="flex-1"/>
         <button a:if="{{isVal}}" class="delVal" formType="reset">×</button>
       </view>
       <button size="mini" type="primary" catchTap="openPl">批量审批</button>
@@ -29,8 +29,8 @@
             <view class="name" a:if="{{item.source_type == 1}}">{{item.employee_name}}的积分任务</view>
             <view class="name" a:if="{{item.source_type == 3}}">{{item.employee_name}}的积分奖扣</view>
             <view class="name" a:if="{{item.source_type == 4}}">{{item.employee_name}}的绩效工作</view>
-            <view class="context" a:if="{{item.remark.customize}}">{{item.remark.customize}}</view>
-            <view class="context" a:else>{{item.remark.rule}}</view>
+            <view class="context" style="height:40rpx" a:if="{{item.remark.customize}}">{{item.remark.customize}}</view>
+            <view class="context" style="height:40rpx" a:else>{{item.remark.rule}}</view>
             <view class="flex-box flex-v-ce">
               <view class="date flex-1">{{item.event_time}}</view>
               <view class="flex-box flex-v-ce">

+ 1 - 1
pages/workbench/my_approve/my_approve.js

@@ -44,7 +44,7 @@ Page({
           that.refreshData();
         } else {
           dd.reLaunch({
-            url: '../noJurisdiction/noJurisdiction'
+            url: '../../noJurisdiction/noJurisdiction'
           })
         }
       },function(){})

+ 1 - 1
pages/workbench/noticeDetail/noticeDetail.js

@@ -34,7 +34,7 @@ Page({
           that.getList(that.data.id);
         } else {
           dd.reLaunch({
-            url: '../noJurisdiction/noJurisdiction'
+            url: '../../noJurisdiction/noJurisdiction'
           })
         }
       }, function () { })

+ 1 - 1
pages/workbench/prize_buckle/prize_buckle.js

@@ -37,7 +37,7 @@ Page({
           that.getUserData();
         } else {
           dd.reLaunch({
-            url: '../noJurisdiction/noJurisdiction'
+            url: '../../noJurisdiction/noJurisdiction'
           })
         }
       },function(){})

+ 10 - 8
utils/websocket.js

@@ -19,17 +19,19 @@ let initWebSocket = (callback) => {
   //初始化 websocket
   
   dd.onSocketClose((res) => {
-      console.log(res);
+      // console.log(res);
   });
 
   // 打开
   dd.onSocketOpen((res) => {
-    let wsData = {
-      type: 'auth',
-      token: dd.globalData.token,
-      machine: generateUUID()
-    };
-    sendSocketMessage(wsData)
+    if(dd.globalData.token){
+      let wsData = {
+        type: 'auth',
+        token: dd.globalData.token,
+        machine: generateUUID()
+      };
+      sendSocketMessage(wsData)
+    }
     ws = true;
     callback()
   });
@@ -65,7 +67,7 @@ let sendSocketMessage = (message) => {
 // 发送数据
 let sendData = (data, callback) => {
   weboscket_callback = callback
-  if (ws) {
+  if (ws) {//周统计不需要验证
     sendSocketMessage(data);
   } else {
     initWebSocket(() => {