347617796@qq.com 4 éve
szülő
commit
3d80b77a8d

+ 2 - 1
Component/noData/noData.acss

@@ -6,6 +6,7 @@
   width: 340rpx;
   height: 340rpx;
 }
-.nodata .content{
+.nodata .content2{
   margin-bottom: 20rpx;
+  text-align: center
 }

+ 1 - 1
Component/noData/noData.axml

@@ -1,6 +1,6 @@
 <view>
   <view class="flex-box-v flex-center-center  nodata">
     <image mode="scaleToFill" src="../../../image/noData.png"/>
-    <view class="content">{{content}}</view>
+    <view class="content2">{{content}}</view>
   </view>
 </view>

+ 0 - 10
Component/selectSection/selectSection.axml

@@ -18,16 +18,6 @@
             <view class="xia" data-item="{{item}}" catchTap="openDown" a:if="{{item._child.length>0}}">| 下级</view>
           </view>
       </scroll-view>
-      <!-- <scroll-view class="ul" scroll-y="{{true}}">
-        <radio-group class="radio-group" onChange="radioChange">
-          <view class="flex-box flex-v-ce li" a:for="{{rule_tree}}">
-            <label class="flex-box flex-v-ce flex-1">
-              <radio value="{{item}}" checked="{{item.checked}}" name="{{item.id}}"/>
-              <image mode="scaleToFill" style="width:50rpx;height:50rpx; margin:0 10rpx;" src="../../../image/BM.png"/> {{item.name}}</label>
-            <view class="xia" data-item="{{item}}" catchTap="openDown" a:if="{{item._child.length>0}}">| 下级</view>
-          </view>
-        </radio-group>
-      </scroll-view> -->
     </view>
     <view class="flex-box date-btn">
       <view class="flex-1" catchTap="onClose">取消</view>

+ 1 - 1
Component/selectSectionStaff/selectSectionStaff.acss

@@ -86,7 +86,7 @@
   width: 100%;
   background-color: #fff;
   box-sizing: border-box;
-  height: calc(100vh - 390rpx);
+  height: calc(100vh - 350rpx);
 }
 .userItem{
     padding:14rpx 24rpx;

+ 3 - 2
Component/selectSectionStaff/selectSectionStaff.axml

@@ -11,7 +11,7 @@
     <view a:if="{{terr.length>1}}" class="flex-box flex-v-ce shu">
       <view a:for="{{terr}}" class="flex-box flex-v-ce" data-index="{{index}}" catchTap="activeItem" data-item="{{item}}">
         <image a:if="{{index!=0}}" mode="scaleToFill" src="../../../image/right.png" style="width:20rpx;height:20rpx;margin:0 6rpx;"></image>
-        {{item.name}}
+        <text style="max-width:2.5rem" class="font-flex-word">{{item.name}}</text>
       </view>
     </view>
     <scroll-view class="staff-ul" scroll-y="{{true}}" style="{{terr.length>1? 'height: calc(100vh - 390rpx);':'height: calc(100vh - 320rpx);'}}">
@@ -19,7 +19,8 @@
         <view a:for="{{rule_tree}}" class="flex-box flex-v-ce li">
           <view class="flex-box flex-v-ce flex-1" data-item="{{item}}" catchTap="changeSection">
             <image mode="scaleToFill" style="width:50rpx;height:50rpx; margin:0 10rpx;" src="../../../image/BM.png"></image>
-              {{item.name}}
+            <text class="flex-1">{{item.name}}</text>
+              
           </view>
           <view a:if="{{item._child.length>0}}" class="xia" data-item="{{item}}" catchTap="openDown">| 下级</view>
         </view>

+ 4 - 2
Component/selectSectionStaff_tow/selectSectionStaff_tow.axml

@@ -10,14 +10,16 @@
   <view class="content">
     <view class="flex-box flex-v-ce shu" a:if="{{terr.length>1}}">
       <view a:for="{{terr}}" class="flex-box flex-v-ce" data-index="{{index}}" catchTap="activeItem" data-item="{{item}}">
-        <image mode="scaleToFill" src="../../../image/right.png" style="width:20rpx;height:20rpx;margin:0 6rpx;" a:if="{{index!=0}}"/>{{item.name}}
+        <image mode="scaleToFill" src="../../../image/right.png" style="width:20rpx;height:20rpx;margin:0 6rpx;" a:if="{{index!=0}}"/>
+        <text style="max-width:2.5rem" class="font-flex-word">{{item.name}}</text>
       </view>
     </view>
     <scroll-view class="staff-ul" scroll-y="{{true}}" style="{{terr.length>1? 'height: calc(100vh - 390rpx);':'height: calc(100vh - 320rpx);'}}">
         <view class="ul2">
           <view class="flex-box flex-v-ce li" a:for="{{rule_tree}}">
             <view class="flex-box flex-v-ce flex-1" data-item="{{item}}" catchTap="changeSection">
-              <image mode="scaleToFill" style="width:50rpx;height:50rpx; margin:0 10rpx;" src="../../../image/BM.png"/> {{item.name}}
+              <image mode="scaleToFill" style="width:50rpx;height:50rpx; margin:0 10rpx;" src="../../../image/BM.png"/> 
+               <text class="flex-1">{{item.name}}</text>
             </view>
             <view class="xia" a:if="{{item._child.length>0}}" data-item="{{item}}" catchTap="openDown">| 下级</view>
           </view>

+ 39 - 19
Component/selectSectionStaff_tow/selectSectionStaff_tow.js

@@ -15,15 +15,16 @@ Component({
     selectUserId: [],
     isAllChecked: false,
     userData: [],//初次显示的数据源
-    keyVal:''
+    keyVal: ''
   },
   props: {
     onClose: (data) => console.log(data),
     onConfirm: (data) => console.log(data),
-    selectUser: [],
+    selectUser: [],//默认选择
     isAllSelect: true,//是否多选
     isLeadership: false,//是否选择领导
     superior_list: [],//上级交叉领导集合
+    islead: false,//是否只显示领导
   },
   didMount() {
     that = this;
@@ -41,7 +42,7 @@ Component({
     onReset() {
       this.setData({
         isVal: false,
-        keyVal:''
+        keyVal: ''
       })
     },
     onConfirm() {
@@ -51,7 +52,7 @@ Component({
     //搜索
     bindKeyInput(e) {
       this.setData({
-        keyVal:e.detail.value,
+        keyVal: e.detail.value,
         isVal: e.detail.value ? true : false
       })
 
@@ -162,25 +163,44 @@ Component({
         var selectUserId = this.data.selectUserId;
         var arr = [];
         var ids = [];
-        list.map((item) => {
-          item.checked = false;
-          if (selectUserId.length > 0) {
-            selectUserId.forEach(item2 => {
+        if (that.props.lead) {//只显示管理者
+          list.map((item) => {
+            item.checked = false;
+            if (item.name == 'admin' || item.name == 'creator' || item.name == 'point_manager'||item.name=='dept_manager') {
+
+             
+            }
+            if (selectUserId.length > 0) {
+              selectUserId.forEach(item2 => {
+                if (item.id == item2.id) {
+                  item.checked = true;
+                  ids.push(item);
+                }
+              })
+            }
+
+
+          })
+        } else {
+          list.map((item) => {
+            item.checked = false;
+            if (selectUserId.length > 0) {
+              selectUserId.forEach(item2 => {
+                if (item.id == item2.id) {
+                  item.checked = true;
+                  ids.push(item);
+                }
+              })
+            }
+          })
+          that.data.userData.map((item) => {
+            list.map((item2) => {
               if (item.id == item2.id) {
-                item.checked = true;
-                ids.push(item);
+                arr.push(item2);
               }
             })
-          }
-        })
-        that.data.userData.map((item) => {
-          list.map((item2) => {
-            if (item.id == item2.id) {
-              arr.push(item2);
-            }
           })
-        })
-
+        }
         this.setData({
           userList: arr,
           all_user_list: arr,

+ 21 - 6
app.acss

@@ -10,7 +10,9 @@
 		-webkit-tap-highlight-color: transparent;
 		font-family: "Source Sans Pro", "Helvetica Neue", Arial, sans-serif;
 	}
-
+	.nodeBer{
+		border:none!important;
+	}
 	view, text {
 		line-height: 40rpx;
 	}
@@ -34,11 +36,12 @@
 	.fontColorZ {
 		color: #303133!important;
 	}
-
 	.fontColorF {
 		color: #606266 !important;
 	}
-
+	.fontColorX{
+		color: #969799 !important;
+	}
 	.fontColorT {
 		color: #C0C4CC!important;
 	}
@@ -158,7 +161,19 @@
 	}
 
 	/* 弹窗过程 */
-
+	.pop-up{
+  position: fixed;
+  right: 10rpx;
+  width: 100rpx;
+  height: 100rpx;
+  border-radius: 50%;
+  background: #fff;
+  text-align: center;
+  bottom: 200rpx;
+  box-sizing: border-box;
+  line-height: 100rpx;
+   box-shadow: 0 0 0.12rem rgba(0,0,0,.05);
+}
 	.showPop {
 		animation: showLayer 0.2s linear both;
 	}
@@ -207,11 +222,11 @@
 	}
 
 	.margin-bottom {
-		margin-bottom: 24rpx;
+		margin-bottom: 20rpx;
 	}
 
 	.margin-top {
-		margin-top: 24rpx;
+		margin-top: 20rpx;
 	}
 
 	.defBtn {

+ 17 - 1
app.json

@@ -34,7 +34,23 @@
     "pages/workbench/noJurisdiction/noJurisdiction",
     "pages/init/init",
     "pages/deploy/sku/sku",
-    "pages/start/start"
+    "pages/start/start",
+    "pages/deploy/upgrade/upgrade",
+    "pages/deploy/upgradeDetail/upgradeDetail",
+    "pages/statistics/grant/grant",
+    "pages/statistics/myGrant/myGrant",
+    "pages/statistics/assaign/assaign",
+    "pages/statistics/offerAreward/offerAreward",
+    "pages/statistics/my_issue/my_issue",
+    "pages/statistics/workDetail/workDetail",
+    "pages/statistics/schedule/schedule",
+    "pages/statistics/recordOne/recordOne",
+    "pages/statistics/workpoints/workpoints",
+    "pages/statistics/my_task/my_task",
+    "pages/statistics/openPerform/openPerform",
+    "pages/statistics/taskDetail/taskDetail",
+    "pages/statistics/repetitive_tasks_detail/repetitive_tasks_detail",
+    "pages/statistics/getTask/getTask"
   ],
   "window": {
     "defaultTitle": "功道云",

+ 2 - 1
pages/deploy/index/index.acss

@@ -14,7 +14,7 @@
   right: 32rpx;
   border-radius: 20rpx;
   background-color: #fff;
-   box-shadow: 0rpx 4rpx 10rpx rgba(0, 0, 0, 0.05);
+  box-shadow: 0 0.04rem 0.12rem 0 rgba(0,0,0,.05);
   height: 140rpx;
 }
 .head .flex-box{
@@ -26,6 +26,7 @@
 }
 .li{
   background-color: #fff;
+  border-bottom: 1px solid #f1f1f1;
 }
 .img-left{
   width: 40rpx;

+ 23 - 7
pages/deploy/index/index.axml

@@ -5,7 +5,7 @@
         <view>{{userData.name}}</view>
         <view class="fontColorF font-flex-word" style="font-size:28rpx;margin-top:10rpx;width:80%">{{userData.post}}</view>
       </view>
-      <img-box name="{{userData.name}}" imgUrl="{{userData.img_url}}"  height="100rpx" width="100rpx"></img-box>
+      <img-box name="{{userData.name}}" imgUrl="{{userData.img_url}}" height="100rpx" width="100rpx"></img-box>
     </view>
   </view>
   <view class="margin-bottom">
@@ -16,34 +16,50 @@
         <view class="flex-box flex-v-ce flex-1 li-right">
           <view class="title flex-1">
             <view>当前为{{corpMessage.package_name}}</view>
-            <view class="date">有效期至 <text style="color:#FF9600">{{corpMessage.expire_time}}</text></view>
+            <view class="date">有效期至
+              <text style="color:#FF9600">{{corpMessage.expire_time}}</text></view>
           </view>
           <view class="xusj" data-index="1" onTap="openView">续费升级</view>
         </view>
       </view>
-      <view class="flex-box flex-v-ce li margin-bottom" data-index="2" onTap="openView">
+      <view class="flex-box flex-v-ce li " data-index="2" onTap="openView">
         <image class="img-left" mode="scaleToFill" src="../../../image/bmyg.png"></image>
         <view class="flex-box flex-v-ce flex-1 li-right">
           <view class="title flex-1">组织架构</view>
           <image mode="scaleToFill" src="../../../image/right.png" class="img-right"></image>
         </view>
       </view>
-      <view class="flex-box flex-v-ce li margin-bottom" data-index="3" onTap="openView">
+      <view class="flex-box flex-v-ce li" data-index="3" onTap="openView">
         <image class="img-left" mode="scaleToFill" src="../../../image/jfgz.png"></image>
         <view class="flex-box flex-v-ce flex-1 li-right">
           <view class="title flex-1">积分规则</view>
           <image mode="scaleToFill" src="../../../image/right.png" class="img-right"></image>
         </view>
       </view>
-      <view class="flex-box flex-v-ce li" data-index="4" onTap="openView">
+      <view class="flex-box flex-v-ce li nodeBer margin-bottom" data-index="4" onTap="openView">
         <image class="img-left" mode="scaleToFill" src="../../../image/kqjf.png"></image>
         <view class="flex-box flex-v-ce flex-1 li-right">
           <view class="title flex-1">考勤积分规则</view>
           <image mode="scaleToFill" src="../../../image/right.png" class="img-right"></image>
         </view>
       </view>
+      
+      <view class="flex-box flex-v-ce li" data-index="5" onTap="openView">
+        <image class="img-left" mode="scaleToFill" src="../../../image/sj.png"></image>
+        <view class="flex-box flex-v-ce flex-1 li-right">
+          <view class="title flex-1">升级公告</view>
+          <image mode="scaleToFill" src="../../../image/right.png" class="img-right"></image>
+        </view>
+      </view>
+      <view class="flex-box flex-v-ce li nodeBer" data-index="6" onTap="openView">
+        <image class="img-left" mode="scaleToFill" src="../../../image/kf.png"></image>
+        <view class="flex-box flex-v-ce flex-1 li-right">
+          <view class="title flex-1">官方服务群</view>
+          <image mode="scaleToFill" src="../../../image/right.png" class="img-right"></image>
+        </view>
+      </view>
+
+
     </view>
   </view>
-  <!-- <view class="fontColorF" style="text-align: center">正式1.0</view> -->
-  <!-- <view class="fontColorF" style="text-align: center">测试1.0</view> -->
 </view>

+ 9 - 6
pages/deploy/index/index.js

@@ -1,5 +1,7 @@
 var app = getApp();
 var that;
+import 'dingtalk-jsapi/entry/mobile';
+import openLink from 'dingtalk-jsapi/api/biz/util/openLink';
 Page({
   data: {
     userData:[],
@@ -13,20 +15,21 @@ Page({
   //跳转
   openView(e) {
     var index = e.target.dataset.index-1;
+    if(index==5){
+      openLink({
+        url: `https://page.dingtalk.com/wow/dingtalk/act/serviceconversation?wh_biz=tm&showmenu=false&goodsCode=DT_GOODS_881607043109331&corpId=${app.globalData.corpId}&token=5784a3e6b5e025ee891517ea814180f4`
+      })
+      return;
+    }
     var urls = [
       { url: '../addMoney/addMoney', query: '' },
       { url: '../organization/organization', query: '' },
       { url: '../integralRule/integralRule', query: '' },
       { url: '../setCheck/setCheck', query: '' },
+      { url: '../upgrade/upgrade', query: '' },
     ];
     dd.navigateTo({
       url: urls[index].url+'?'+urls[index].query
     })
   },
-  onReady() {
-    // 页面加载完成
-  },
-  onShow() {
-    // 页面显示
-  },
 });

+ 6 - 0
pages/deploy/setCheck/setCheck.axml

@@ -48,6 +48,12 @@
         <view>每满一天加{{data.ot_per_day}}分</view>
       </view>
     </view>
+    <view class="flex-box li">
+      <view class="li-left">
+        <view>全勤</view>
+        <view>月度全勤加{{data.month_full_ad}}分</view>
+      </view>
+    </view>
   </view>
   <!--<view class="flex-box li"><view class="li-left"><view>加班</view><view>每小时加{{data.ot_per_hour}}分</view></view></view><view class="flex-box li"><view class="li-left"><view>请假</view><view>每小时扣{{data.leave_per_hour}}分</view></view></view> -->
 </view>

+ 5 - 6
pages/statistics/glz_execute/glz_execute.axml

@@ -8,7 +8,7 @@
     </view>
     <view class="flex-1">
       <picker onChange="bindPickerChange" value="{{activeIndex}}" range="{{array}}" range-key="name">
-        <text  class="picker">{{array[activeIndex].name}}</text>
+        <text class="picker">{{array[activeIndex].name}}</text>
       </picker>
     </view>
   </view>
@@ -18,7 +18,7 @@
     <view class="flex-1">人均扣分(次)</view>
   </view>
   <view class="main scroll">
-    <scroll-view scroll-y="{{true}}" class="scroll" a:if="{{list.length>0}}"  onScrollToLower="onScrollToLower">
+    <scroll-view scroll-y="{{true}}" class="scroll" a:if="{{list.length>0}}" onScrollToLower="onScrollToLower">
       <view catchTap="openDetail" data-item={{item}} class="flex-box flex-v-ce item border-bottom" a:for="{{list}}">
         <view class="flex-2 flex-box flex-v-ce">
           <img-box name="{{item.name}}" imgUrl="{{item.img_url}}" height="80rpx" width="80rpx" fSize="24rpx"></img-box>
@@ -30,10 +30,9 @@
         <view class="flex-1">{{item.reward_count}}</view>
         <view class="flex-1">{{item.deduct_count}}</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>
+    <no-data a:if="{{list.length==0}}" content="未找到考勤组"></no-data>
   </view>
-
-    <select-section defaultSection="{{tissueVal}}" isShow="{{showTissue}}" a:if="{{showTissue==true}}" onClose="onClose" onConfirm="onConfirmTissue"></select-section>
+  <select-section defaultSection="{{tissueVal}}" isShow="{{showTissue}}" a:if="{{showTissue==true}}" onClose="onClose" onConfirm="onConfirmTissue"></select-section>
 </view>

+ 72 - 4
pages/statistics/index/index.acss

@@ -1,16 +1,84 @@
-.li{
+.li {
   background-color: #fff;
 }
-.img-left{
+
+.img-left {
   width: 46rpx;
   height: 46rpx;
   margin: 0 28rpx;
 }
-.img-right{
+
+.img-right {
   width: 24rpx;
   height: 24rpx;
   margin-right: 28rpx;
 }
-.li-right{
+
+.li-right {
   padding: 28rpx 0;
+}
+
+.img {
+  padding: 28rpx;
+  background: #fff;
+}
+
+.img image {
+  width: 100%;
+  height: 250rpx;
+  border-radius: 10rpx;
+}
+
+.menu-item {
+  width: 25%;
+  text-align: center;
+  position: relative;
+  margin-bottom: 28rpx;
+}
+
+.menuNum {
+  position: absolute;
+  right: 20rpx;
+  top: -20rpx;
+  width: 50rpx;
+  height: 40rpx;
+  line-height: 40rpx;
+  background: #F56C6C;
+  color: #fff;
+  font-size: 24rpx;
+  text-align: center;
+  border-radius: 25%;
+}
+
+.menu-item image {
+  width: 1rem;
+  height: 1rem;
+}
+
+.menu-item view {
+  font-size: .28rem;
+  color: #606266;
+  line-height: .44rem;
+  width: 1.4rem;
+  text-align: center;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  margin: 0 auto
+}
+
+.menuList {
+  padding: 0 28rpx;
+}
+
+.menu-title {
+  font-size: .32rem;
+  color: #1c1c1c;
+  font-weight: 700;
+  margin: 0 .32rem .3rem;
+  padding: 0 28rpx;
+}
+.menuAll{
+  background: #fff;
+  padding-top: 28rpx;
 }

+ 30 - 27
pages/statistics/index/index.axml

@@ -1,60 +1,63 @@
 <view>
-  <view class="header">
-    <view class="flex-box flex-v-ce li" data-index="1" onTap="openView"  a:if="{{isAdministrator}}">
-      <image class="img-left" mode="scaleToFill" src="../../../image/jk.png"></image>
+  <view class="header margin-bottom">
+    <view class="img">
+      <image mode="scaleToFill" src="../../../image/start3.png"/>
+    </view>
+  </view>
+  <view class="main">
+    <view a:for="{{menuList}}" a:for-index="idx" a:for-item="itemName" class="menuAll">
+      <view class="menu-title">{{itemName.code}}</view>
+      <view class="menuList flex-box flex-d-wrap">
+        <view a:for="{{itemName.child}}" class="menu-item" data-url="{{item.url}}" onTap="openUrl">
+          <image mode="scaleToFill" src="{{item.imgUrl}}"/>
+          <view>{{item.name}}</view>
+          <text class="menuNum font-flex-word" a:if="{{item.name=='审批'&&total}}">{{total}}</text>
+        </view>
+      </view>
+    </view>
+  </view>
+  <!-- <view class="header">
+    <view class="flex-box flex-v-ce li" data-index="1" onTap="openView" a:if="{{isAdministrator}}">
+      <image class="img-left" mode="scaleToFill" src="../../../image/jk.png">
+      </image>
       <view class="flex-box flex-v-ce flex-1 li-right border-bottom">
         <view class="title flex-1">我奖扣的</view>
         <image mode="scaleToFill" src="../../../image/right.png" class="img-right"></image>
-      </view>
-    </view>
+      </view></view>
     <view class="flex-box flex-v-ce li margin-bottom" data-index="2" onTap="openView">
       <image class="img-left" mode="scaleToFill" src="../../../image/wsqd.png"></image>
       <view class="flex-box flex-v-ce flex-1 li-right">
         <view class="title flex-1">我申请的</view>
-        <image mode="scaleToFill" src="../../../image/right.png" class="img-right"></image>
-      </view>
+        <image mode="scaleToFill" src="../../../image/right.png" class="img-right"></image></view>
     </view>
-    <view class="flex-box flex-v-ce li" data-index="3" onTap="openView"  a:if="{{isAdministrator}}">
+    <view class="flex-box flex-v-ce li" data-index="3" onTap="openView" a:if="{{isAdministrator}}">
       <image class="img-left" mode="scaleToFill" src="../../../image/glz.png"></image>
       <view class="flex-box flex-v-ce flex-1 li-right border-bottom">
         <view class="title flex-1">管理者奖扣</view>
-        <image mode="scaleToFill" src="../../../image/right.png" class="img-right"></image>
-      </view>
-    </view>
+        <image mode="scaleToFill" src="../../../image/right.png" class="img-right"></image></view></view>
     <view class="flex-box flex-v-ce li margin-bottom" data-index="4" onTap="openView">
       <image class="img-left" mode="scaleToFill" src="../../../image/jfsj.png"></image>
       <view class="flex-box flex-v-ce flex-1 li-right">
         <view class="title flex-1">积分事件</view>
-        <image mode="scaleToFill" src="../../../image/right.png" class="img-right"></image>
-      </view>
-    </view>
+        <image mode="scaleToFill" src="../../../image/right.png" class="img-right"></image></view></view>
     <view class="flex-box flex-v-ce li" a-if="{{ding_enable}}" data-index="5" onTap="openView">
       <image class="img-left" mode="scaleToFill" src="../../../image/kq.png"></image>
       <view class="flex-box flex-v-ce flex-1 li-right border-bottom">
         <view class="title flex-1">考勤分排名</view>
-        <image mode="scaleToFill" src="../../../image/right.png" class="img-right"></image>
-      </view>
-    </view>
+        <image mode="scaleToFill" src="../../../image/right.png" class="img-right"></image></view></view>
     <view class="flex-box flex-v-ce li" data-index="6" onTap="openView">
       <image class="img-left" mode="scaleToFill" src="../../../image/Bf.png"></image>
       <view class="flex-box flex-v-ce flex-1 li-right border-bottom">
         <view class="title flex-1">部门B分排名</view>
-        <image mode="scaleToFill" src="../../../image/right.png" class="img-right"></image>
-      </view>
-    </view>
+        <image mode="scaleToFill" src="../../../image/right.png" class="img-right"></image></view></view>
     <view class="flex-box flex-v-ce li" data-index="7" onTap="openView">
       <image class="img-left" mode="scaleToFill" src="../../../image/ljpm.png"></image>
       <view class="flex-box flex-v-ce flex-1 li-right border-bottom">
         <view class="title flex-1">累计B分排名</view>
-        <image mode="scaleToFill" src="../../../image/right.png" class="img-right"></image>
-      </view>
-    </view>
+        <image mode="scaleToFill" src="../../../image/right.png" class="img-right"></image></view></view>
     <view class="flex-box flex-v-ce li" data-index="8" onTap="openView">
       <image class="img-left" mode="scaleToFill" src="../../../image/zdyfz.png"></image>
       <view class="flex-box flex-v-ce flex-1 li-right">
         <view class="title flex-1">自定义分组B分排名</view>
-        <image mode="scaleToFill" src="../../../image/right.png" class="img-right"></image>
-      </view>
-    </view>
-  </view>
+        <image mode="scaleToFill" src="../../../image/right.png" class="img-right"></image></view></view></view> -->
 </view>

+ 74 - 48
pages/statistics/index/index.js

@@ -3,17 +3,84 @@ var that;
 Page({
   data: {
     incidentList: [1, 2, 2, 2, 2, 2, 2, 2, 2],
-    isAdministrator:false,//是否管理员角色
-    ding_enable:true,
+    isAdministrator: false,//是否管理员角色
+    ding_enable: true,
+    menuList: [
+      {
+        code: '积分执行', child: [
+          { name: '奖扣B分', imgUrl: '../../../image/point_entry.png', url: '../../workbench/jk_B/jk_B?type=B', code: 'creator admin ' },
+          { name: '奖扣A分', imgUrl: '../../../image/a_entry.png', url: '../../workbench/jk_B/jk_B?type=A', code: 'creator admin ' },
+          { name: '我奖扣的', imgUrl: '../../../image/entry_list.png', url: '../my_PrizeBuckle/my_PrizeBuckle?index=', code: 'creator admin ' },
+          { name: '申请积分', imgUrl: '../../../image/a_apply.png', url: '../../workbench/apply/apply', code: 'admin employee' },
+          { name: '我申请的', imgUrl: '../../../image/apply_list.png', url: '../my_apply/my_apply?index=', code: 'admin employee' },
+          { name: '发放奖票', imgUrl: '../../../image/add_ticket.png', url: '../grant/grant', code: 'creator admin ' },
+          { name: '我的奖票', imgUrl: '../../../image/my_ticket.png', url: '../myGrant/myGrant', code: 'admin employee' },
+        ]
+      },
+      {
+        code: '任务管理', child: [
+          { 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' },
+          { name: '领任务', imgUrl: '../../../image/task_hall.png', url: '../getTask/getTask', code: 'creator admin employee' },
+        ]
+      },
+      {
+        code: '统计分析', child: [
+          { name: '排行榜', imgUrl: '../../../image/att_statistics.png', url: '../userRamking/userRamking', code: 'creator admin ' },
+          { name: '考勤分排名', imgUrl: '../../../image/att_statistics.png', url: '../glz_execute/glz_execute', code: 'creator admin employee' },
+          { name: '积分事件', imgUrl: '../../../image/event_list_a.png', url: '../integralEvent/integralEvent', code: 'creator admin employee' },
+        ]
+      },
+      {
+        code: '其他', child: [
+          { name: '组织架构', imgUrl: '../../../image/dept.png', url: '../../deploy/organization/organization', code: 'creator admin employee' },
+          { name: '积分规则', imgUrl: '../../../image/rule.png', url: '../../deploy/integralRule/integralRule', code: 'creator admin employee' },
+          { name: '考勤分规则', imgUrl: '../../../image/rule.png', url: '../../deploy/setCheck/setCheck', code: 'creator admin employee' },
+          { name: '工作汇报分规则', imgUrl: '../../../image/e66f.jpg', url: '../my_approve/my_approve', code: 'creator admin employee' },
+        ]
+      },
+
+    ]
   },
-  onLoad(query) {
+  onLoad() {
     that = this;
-    this.setData({isAdministrator:app.globalData.isAdministrator})
-    dd.setNavigationBar({ title: "统计"});
+    dd.setNavigationBar({ title: "统计" });
+    this.setData({ isAdministrator: app.globalData.isAdministrator })
+    if(app.globalData.isCreator){
+      that.setMenuList("creator");
+    }else if(app.globalData.isAdministrator){
+      that.setMenuList("admin");
+    }else if(!app.globalData.isCreator&&!app.globalData.isAdministrator){
+      that.setMenuList("employee");
+    }
+  },
+  openUrl(e){
+    dd.navigateTo({
+      url:e.target.dataset.url
+    })
+  },
+  setMenuList(str){
+      var arr=[];
+      that.data.menuList.forEach(item=>{
+        var obj={};
+        obj.code=item.code
+        obj.child=[];
+        item.child.forEach(childItem=>{
+            if(childItem.code.indexOf(str)>=0){
+                obj.child.push(childItem)
+            }
+        })
+        arr.push(obj);
+      })
+      that.setData({
+        menuList:arr
+      })
   },
   //跳转
   openView(e) {
-    var index = e.target.dataset.index-1;
+    var index = e.target.dataset.index - 1;
     var urls = [
       { url: '../my_PrizeBuckle/my_PrizeBuckle', query: "index=" },
       { url: '../my_apply/my_apply', query: "index=" },
@@ -25,48 +92,7 @@ Page({
       { url: '../customRamking/customRamking', query: '' },
     ];
     dd.navigateTo({
-      url: urls[index].url+'?'+urls[index].query
+      url: urls[index].url + '?' + urls[index].query
     })
   },
-  getList() {
-    app.$get('api/ad/info').then((res) => {
-        this.setData({
-          ding_enable:res.data.data.ding_enable==1? true:false
-        })
-    })
-  },
-  //打开更多
-  openMore() {
-
-  },
-  onReady() {
-    // 页面加载完成
-  },
-  onShow() {
-    this.getList();
-    // 页面显示
-  },
-  onHide() {
-    // 页面隐藏
-  },
-  onUnload() {
-    // 页面被关闭
-  },
-
-  //下拉
-  onPullDownRefresh() {
-    dd.stopPullDownRefresh()
-  },
-  onReachBottom() {
-    console.log("到底了")
-    // 页面被拉到底部
-  },
-  onShareAppMessage() {
-    // 返回自定义分享信息
-    return {
-      title: 'My App',
-      desc: 'My App description',
-      path: 'pages/index/index',
-    };
-  },
 });

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

@@ -66,7 +66,7 @@
   color: #26A2FF;
   font-size: 28rpx;
 }
-.main-right .3-:nth-child(1){
+.main-right view:nth-child(1){
   margin-right: 20rpx;
 }
 .index{

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

@@ -20,8 +20,8 @@
         <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>
-            <view class="red" a:if="{{item.review_point > 0}}">+{{item.review_point}}</view>
-            <view class="green" a:else>{{item.review_point}}</view>
+            <view class="red" a:if="{{item.review_point > 0}}">+{{item.review_point}} {{item.pt_name}}</view>
+            <view class="green" a:else>{{item.review_point}} {{item.pt_name}}</view>
           </view>
           <view class="flex-box flex-v-ce">
             <view class="date flex-1">{{item.event_time}}</view>

+ 6 - 0
pages/statistics/my_apply/my_apply.js

@@ -55,7 +55,13 @@ Page({
       data.type = "refuse"
     }
     app.$get('api/integral/review/apply/list', data).then((res) => {
+
       var data = res.data.data.list;
+      data.forEach(element => {
+        if(element.pt_id){
+          element.pt_name=app.getTypesItem(element.pt_id).name
+        }
+      });
       var list = that.data.list;
       if (is) {
         if (data.length < 20) {

+ 1 - 1
pages/statistics/prizeBuckleDetail/prizeBuckleDetail.acss

@@ -15,7 +15,7 @@
 }
 .header-main .laber{
   color: #909399;
-  width: 150rpx;
+  width: 180rpx;
 }
 .header-main .flex-box{
  padding: 5rpx 0;

+ 1 - 1
pages/workbench/approveDetail/approveDetail.acss

@@ -14,7 +14,7 @@
 }
 .header-main .laber{
   color: #909399;
-  width: 150rpx;
+  width: 180rpx;
 }
 .header-main .flex-box{
  padding: 5rpx 0;

+ 39 - 1
pages/workbench/index/index.acss

@@ -2,7 +2,7 @@
   width: 100%;
   height: 70rpx;
   background-color: #26A2FF;
-  margin-bottom: 70rpx;
+  margin-bottom: 100rpx;
 }
 
 .head {
@@ -299,4 +299,42 @@
   height: 0.2rem;
   background-image: linear-gradient(to top, #F2A640 0%, #F8C748 100%);
   border-radius: 100%;
+}
+
+.menu-item{
+  width: 25%;
+  text-align: center;
+  position: relative;
+  margin-bottom: 28rpx;
+}
+.menuNum{
+  position: absolute;
+  right: 20rpx;
+  top:-20rpx;
+  width: 50rpx;
+  height: 40rpx;
+  line-height: 40rpx;
+  background: #F56C6C;
+  color: #fff;
+  font-size:24rpx;
+  text-align: center; 
+  border-radius:25%;
+}
+.menu-item image{
+  width: 1rem;
+  height: 1rem;
+}
+.menu-item view{
+    font-size: .28rem;
+    color: #606266;
+    line-height: .44rem;
+    width: 1.4rem;
+    text-align: center;
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap; 
+    margin: 0 auto
+}
+.menuList{
+  padding: 0 28rpx;
 }

+ 12 - 4
pages/workbench/index/index.axml

@@ -11,7 +11,15 @@
   </view>
   <view class="headed margin-bottom">
     <view class="top"></view>
-    <view class="headed-box">
+
+    <view class="menuList flex-box flex-d-wrap">
+        <view a:for="{{menuList}}" class="menu-item" data-url="{{item.url}}" onTap="openUrl">
+            <image mode="scaleToFill" src="{{item.imgUrl}}"/>
+            <view>{{item.name}}</view>
+            <text class="menuNum font-flex-word" a:if="{{item.name=='审批'&&total}}">{{total}}</text>
+        </view>
+    </view>
+    <!-- <view class="headed-box">
       <view a:if="{{isAdministrator}}" class="flex-box headed-box-item">
         <view class="flex-box flex-center-center flex-1 left" data-index="3" onTap="openView">
           <image mode="scaleToFill" src="../../../image/jkbf.png"></image>
@@ -37,13 +45,13 @@
         </view>
       </view>
       
-    </view>
+    </view> -->
   </view>
 
   <view class="main margin-bottom">
     <view class="main-title flex-box flex-v-ce" onTap="openView" data-index="10">
       <text class="flex-1" style="font-size:32rpx">排行榜</text>
-      <text class="fontColorF" style="font-size:28rpx">每小时更新一</text>
+      <text class="fontColorF" style="font-size:28rpx">每小时更新一</text>
     </view>
     <view class="flex-box flex-v-ce" style="padding:0.28rem; border-bottom: 1px solid #f1f1f1; " a:for="{{rankingList}}" data-item="{{item}}" onTap="openViewRanking">
       <view class="flex-box flex-v-ce flex-1">
@@ -56,7 +64,7 @@
         <image mode="scaleToFill" src="../../../image/right.png" class="img-right"></image> 
       </view>
     </view>
-    <view a:if="{{rankingTotal > 5}}" class="rankingLists" onTap="openView" data-index="10">
+    <view  class="rankingLists" onTap="openView" data-index="10">
         <text>查看所有排行榜</text>
         <image mode="scaleToFill" src="../../../image/right.png" class="img-right"></image> 
     </view>

+ 49 - 22
pages/workbench/index/index.js

@@ -14,24 +14,41 @@ Page({
     rankingList: [],
     getRole_four: app.globalData.isCreator,//是否创始人
     setECharts: [],//柱形图数据
-    pieTotal: 1
+    pieTotal: 1,
+    total:188,
+    menuList: [
+      { name: '审批', imgUrl: '../../../image/sp.png', url: '../my_approve/my_approve', code: 'creator admin employee' },
+      { name: '任务', imgUrl: '../../../image/a7.png', url: '../../statistics/my_task/my_task', code: 'admin employee' },
+      { name: '奖扣B分', imgUrl: '../../../image/point_entry.png', url: '../jk_B/jk_B?type=B', code: 'creator admin' },
+      { name: '指派任务', imgUrl: '../../../image/my_publish.png', url: '../../statistics/assaign/assaign', code: 'creator admin' },
+      { name: '申请积分', imgUrl: '../../../image/a_apply.png', url: '../apply/apply', code: 'admin employee' },
+      { name: '奖扣A分', imgUrl: '../../../image/a_entry.png', url: '../jk_B/jk_B?type=A', code: 'creator admin' },
+      { name: '领任务', imgUrl: '../../../image/task_hall.png', url: '../../statistics/getTask/getTask', code: 'admin employee' },
+      { name: '发布悬赏', imgUrl: '../../../image/caback6.png', url: '../../statistics/offerAreward/offerAreward', code: 'creator admin' },
+      { name: '发放奖票', imgUrl: '../../../image/add_ticket.png', url: '../../statistics/grant/grant', code: 'creator admin' },
+      { name: '全部', imgUrl: '../../../image/all.png', url: 'all', code: 'creator admin employee' },
+    ]
   },
   onLoad() {
     that = this;
     chart1, chart2, chart3 = '';
   },
+
   onShow(query) {
     if (app.globalData.userData) {
-      that.getUserData();
-      // that.getIncidentLsit();
-      // that.getIncidentNum();
+      // that.getUserData();
       that.setData({ isAdministrator: app.globalData.isAdministrator, getRole_four: app.globalData.isCreator })
     } else {
       app.login(app.globalData.corpId, function (is) {
         if (is) {
-          that.getUserData();
-          // that.getIncidentLsit();
-          // that.getIncidentNum();
+          if(app.globalData.isCreator){
+            that.setMenuList("creator");
+          }else if(app.globalData.isAdministrator){
+            that.setMenuList("admin");
+          }else if(!app.globalData.isCreator&&!app.globalData.isAdministrator){
+            that.setMenuList("employee");
+          }
+          // that.getUserData();
           that.setData({ isAdministrator: app.globalData.isAdministrator, getRole_four: app.globalData.isCreator })
         } else {
           dd.reLaunch({
@@ -41,6 +58,29 @@ Page({
       })
     }
   },
+  openUrl(e){
+    var url = e.target.dataset.url;
+    if(url=='all'){
+      dd.switchTab({
+        url: '../../statistics/index/index'
+      })
+      return
+    }
+    dd.navigateTo({
+      url: url
+    })
+  },
+  setMenuList(str){
+      var arr=[];
+      that.data.menuList.forEach(item=>{
+        if(item.code.indexOf(str)>=0){
+            arr.push(item)
+        }
+      })
+      that.setData({
+        menuList:arr
+      })
+  },
   showText() {
     this.setData({ isBh: !this.data.isBh })
   },
@@ -52,7 +92,7 @@ Page({
     } else if (item.type == 'all') {
       url = '../../statistics/B_ranking/B_ranking';
     } else {
-      url = '../../statistics/C_ranking/C_ranking?id=' + item.target_id + '&name=' + item.group_name+'&date_interval='+item.date_interval;
+      url = '../../statistics/C_ranking/C_ranking?id=' + item.target_id + '&name=' + item.group_name + '&date_interval=' + item.date_interval;
     }
     dd.navigateTo({
       url: url
@@ -173,7 +213,7 @@ Page({
     chart3.source(that.data.setECharts, {
       date: { tickCount: 5 }
     });
-    chart3.axis('field',{
+    chart3.axis('field', {
       grid: {
         lineDash: null,
         stroke: '#e8e8e8',
@@ -200,7 +240,6 @@ Page({
     date2.setDate(date1.getDate() - 30);
     var start_date = date2.getFullYear() + "-" + (date2.getMonth() + 1) + "-" + date2.getDate();
     var incident = app.$get2("api/integral/statistics/b", { employee_id: 0, start_date: start_date, end_date: app.globalData.day, show_type: '1' });
-    // var pei = app.$get2("api/integral/statistics/pie/b", { employee_id: 0, month: that.data.date });
     Promise.all([incident]).then(resArr => {
       if (resArr[0].data.code == 1) {
         const { b, chart, good, bad } = resArr[0].data.data
@@ -214,18 +253,6 @@ Page({
           data_bad: bad,
         });
       }
-      // if (resArr[1].data.code == 1) {
-      //   const pieData = resArr[1].data.data.list.map((item) => {
-      //     return { name: item.name, percent: item.point < 0 ? 0 : item.point, a: '1', point: item.point }
-      //   })
-      //   var isData = pieData.every(itme => {
-      //     return itme.percent == 0;
-      //   })
-      //   that.setData({
-      //     pieData: isData ? [] : pieData
-      //   });
-      //   chart2.changeData(pieData);
-      // }
     }).catch(e => {
       console.error(e)
     })

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

@@ -47,8 +47,8 @@
             <view class="name flex-1" a:if="{{item.source_type == 3}}">{{item.employee_name}}的积分奖扣</view>
             <view class="name flex-1" a:if="{{item.source_type == 4}}">{{item.employee_name}}的绩效工作</view>
             <block a:if="{{item.status==1}}">
-              <view class="red" a:if="{{item.review_point>0}}">+{{item.review_point}}</view>
-              <view class="green" a:else>{{item.review_point}}</view>
+              <view class="red" a:if="{{item.review_point>0}}">+{{item.review_point}} {{item.pt_name}}</view>
+              <view class="green" a:else>{{item.review_point}} {{item.pt_name}}</view>
             </block>
           </view>
           <view class="context" a:if="{{item.remark.customize}}">{{item.remark.customize}}</view>

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

@@ -105,7 +105,13 @@ Page({
   },
   getData(type) {
     app.$get("api/integral/review/list", { type: that.data.httpType, page: that.data.page, pt_id: 0, page_size: 20, keyword: that.data.keyword }).then((res) => {
-      var data = res.data.data.list || [];
+      var list=res.data.data.list || [];
+      list.forEach(element => {
+        if(element.pt_id){
+          element.pt_name=app.getTypesItem(element.pt_id).name
+        }
+      });
+      var data = list;
       var dataList = that.data.dataList || [];
       if (type == '2') {
         if (data.length < 20) {

+ 1 - 1
pages/workbench/statistics_A/statistics_A.acss

@@ -25,7 +25,7 @@
   right: 32rpx;
   border-radius: 20rpx;
   background-color: #fff;
-   box-shadow: 0rpx 4rpx 10rpx rgba(0, 0, 0, 0.05);
+  box-shadow: 0 0.04rem 0.12rem 0 rgba(0,0,0,.05);
   height: 140rpx;
   text-align: center;
 }

+ 1 - 1
pages/workbench/statistics_B/statistics_B.acss

@@ -25,7 +25,7 @@
   right: 32rpx;
   border-radius: 20rpx;
   background-color: #fff;
-  box-shadow: 0rpx 0rpx 10rpx rgba(0, 0, 0, 0.05);
+  box-shadow: 0 0.04rem 0.12rem 0 rgba(0,0,0,.05);
   height: 140rpx;
   text-align: center;
 }