Browse Source

第一版

347617796@qq.com 3 years ago
parent
commit
1db2e1d81e

+ 1 - 1
.mini-ide/compileMode.json

@@ -11,7 +11,7 @@
     {
       "title": "绩效考核",
       "page": "pages/home/performanceDetails/performanceDetails",
-      "pageQuery": "Tit=2022年03月绩效考核&id=7"
+      "pageQuery": "id=888"
     },
     {
       "title": "编辑管理记录",

File diff suppressed because it is too large
+ 1 - 1
app.js


+ 2 - 1
app.json

@@ -19,7 +19,8 @@
     "pages/home/statementDetails/statementDetails",
     "pages/home/resultValueEntry/resultValueEntry",
     "pages/serve/serve/serve",
-    "pages/serve/webView/webView"
+    "pages/serve/webView/webView",
+    "pages/index/noPage/noPage"
   ],
   "window": {
     "defaultTitle": "功道云",

BIN
image/xcxbj.png


+ 6 - 10
pages/home/actionplanDetails/actionplanDetails.js

@@ -120,14 +120,12 @@ Page({
           })
           this.employeeDet();
         }
+		setTimeout(() => {
+		  this.setData({
+		    bootBool: false
+		  })
+		}, 1000);
       })
-      .finally(() => {
-        setTimeout(() => {
-          this.setData({
-            bootBool: false
-          })
-        }, 1000);
-      });
   },
   closeWt() {
     localStorage.setItem('isWt', true);
@@ -199,10 +197,8 @@ Page({
           }
         }
       }
+	  this.routeBack();
     })
-      .finally(() => {
-        this.routeBack();
-      });
   },
   init() {
     let query = this.data.query;

+ 1 - 1
pages/home/actionplanList/actionplanList.js

@@ -78,7 +78,7 @@ Page({
         actionPlanList.forEach((item, index) => {
           item.index.forEach(item2 => {
             item2.isOperation = false;
-            if (item2.record_ids.indexOf(this.$getUserData_jx().id) >= 0) {
+            if (item2.record_ids.indexOf(app.globalData.userData.id) >= 0) {
               item2.isOperation = true;
             }
           });

+ 11 - 9
pages/home/addthePlan/addthePlan.js

@@ -56,8 +56,8 @@ Page({
     dd.confirm({
       title: this.data.knowFrom == 'action' ? '删除计划' : '删除记录',
       content: '确认删除' + this.data.detailsTIt + ' :' + this.data.titValue + '',
-      confirmButtonText: '取消',
-      cancelButtonText: '确定',
+      confirmButtonText: '确定',
+      cancelButtonText: '取消',
       success: (result) => {
         if (result.confirm) {
           if (this.data.knowFrom == 'action') {
@@ -104,6 +104,10 @@ Page({
     }
   },
   routerBak() {
+    var page = getCurrentPages()[getCurrentPages().length - 2]//上一个页面的数据
+    if(page){
+      page.employeeDet()
+    }
     dd.navigateBack({
       delta: 1
     })
@@ -154,14 +158,12 @@ Page({
           app.globalData.showToast('提交成功');
           this.routerBak();
         }
+		setTimeout(() => {
+		  this.setData({
+		    bootBool: false
+		  })
+		}, 1000);
       })
-      .finally(() => {
-        setTimeout(() => {
-          this.setData({
-            bootBool: false
-          })
-        }, 1000);
-      });
   },
   bindTextAreaBlur: function (e) {
     this.setData({

+ 1 - 1
pages/home/allJx/allJx.js

@@ -19,7 +19,7 @@ Page({
   },
   onLoad() {
     that = this;
-    dd.setNavigationBar({ title: "全部绩效" });
+    dd.setNavigationBar({ title: "全部考核" });
   },
   onShow(){
     this.getList();

+ 17 - 2
pages/home/home/home.acss

@@ -1,17 +1,32 @@
+.top-img{
+  width: 100%;
+}
+
+
 .que{
     background-color: #fff;
     text-align: center;
 }
+.top{
+  height: 1.2rem;
+  /* background-color: #26a2ff; */
+}
 .que view{
     padding:0.24rem 0;
 }
+.nameBox{
+  background-color: #26a2ff;
+  color: #fff;
+  text-align: center;
+  line-height: 0.9rem;
+}
 .header{
   padding:0.24rem;
   background-color: #fff;
   border: 1px solid #f1f1f1;
   font-size: 0.28rem;
   position: absolute;
-  top: 0.2rem;
+  top: 0.5rem;
   left: 0.32rem;
   right: 0.32rem;
   border-radius: 0.16rem;
@@ -78,7 +93,7 @@
     padding: 0 0.2rem;
     text-align: center;
     border-radius: 6rpx;
-    margin: 0 0.32rem ;
+    margin: 0.32rem ;
     line-height: 0.76rem;
 }
 .footer {

+ 4 - 4
pages/home/home/home.axml

@@ -1,10 +1,10 @@
 <view>
   <view class="headerBox" style="position: relative;">
-    <view style="height: 1.2rem;background-color: #26a2ff;"></view>
+    <view class="top"><image class="top-img" mode="widthFix" src="../../../image/xcxbj.png" /></view>
     <view style="height: 0.8rem;background: #fff;"></view>
     <view class="header flex-box-ce">
       <view style="width:0.9rem;height:0.9rem;margin-right:20rpx;border-radius:100%">
-        <image mode="scaleToFill" src="{{userInfo.img_url}}" style="width:0.9rem;height:0.9rem;border-radius:100%" />
+        <img-box name="{{userInfo.name}}" imgUrl="{{userInfo.img_url}}" height="90rpx" width="90rpx" fSize="28rpx"></img-box>
       </view>
       <view class="flex-1">
         <view style="font-size:0.3rem">{{userInfo.name}}</view>
@@ -12,7 +12,7 @@
           <text a:for="{{userInfo.dept_list}}" a:for-item="e">{{e.name}}<text a:if="{{userInfo.dept_list.length - index > 1}}">,</text></text>
         </view>
       </view>
-      <view class="sf">绩效主管理员</view>
+      <view class="sf">{{str}}</view>
     </view>
   </view>
   <view class="main">
@@ -32,7 +32,7 @@
   </view>
   <view class="list" a:if="{{tabIndex==1}}">
     <view class="item flex-box-ce" a:for="{{dbList}}" a:if="{{dbList.length>0}}" onTap="openDetail" data-item="{{item}}">
-      <view class="font-flex-word flex-1">{{item.employee_name}}的{{item.remark.package_name}}</view>
+      <view class="font-flex-word flex-1">{{item.userInfo.name}}的{{item.remark.package_name}}</view>
       <text class="orange">
         <text a:if="{{item.node_type==9}}">待审批</text>
         <text a:if="{{item.node_type==1}}">目标待制定</text>

+ 68 - 18
pages/home/home/home.js

@@ -5,10 +5,10 @@ Page({
   data: {
     tabIndex: 1,
     menuList: [
-      { name: '我的绩效', icon: 'icon-fenzu', url: '../myJx/myJx', code: 'creator admin', index: 1,color:'blue' },
-      { name: '我参与的', icon: 'icon-canyu', url: '../participation/participation', code: 'admin employee', index: 2,color:'orange' },
-      { name: '报表统计', icon: 'icon-tongji', url: '../statistics/statistics', code: 'creator admin', index: 3,color:'green' },
-      { name: '全部考核', icon: 'icon-quanbu', url: '../allJx/allJx', code: 'creator admin', index: 4,color:'blue' },
+      { name: '我的绩效', icon: 'icon-fenzu', url: '../myJx/myJx', code: 'creator admin', index: 1, color: 'blue' },
+      { name: '我参与的', icon: 'icon-canyu', url: '../participation/participation', code: 'admin employee', index: 2, color: 'orange' },
+      { name: '报表统计', icon: 'icon-tongji', url: '../statistics/statistics', code: 'creator admin', index: 3, color: 'green' },
+      { name: '全部考核', icon: 'icon-quanbu', url: '../allJx/allJx', code: 'creator admin', index: 4, color: 'blue' },
     ],
     dbList: [],
     dbTolal: 0,
@@ -21,21 +21,38 @@ Page({
     dd.setNavigationBar({ title: "首页" });
     that.setData({
       userInfo: app.globalData.userData,
-      role:getCache('role')
+      role: getCache('role')
     })
     this.setR();
+    this.returnS();
+    this.getUserList();
   },
   onShow() {
     this.getDb()
-    this.getUserList();
   },
-  setR(){
-    if(this.data.role=='employee'){
+  returnS() {
+    let str = "绩效主管理员"
+    let role = this.data.role
+    if (role == 'masterAdministrator') {
+      str = "绩效主管理员"
+    } else if (role == 'childAdministrator') {
+      str = "绩效子管理员"
+    } else if (role == 'deptManager') {
+      str = "部门管理员"
+    } else {
+      str = "员工"
+    }
+    that.setData({
+      str: str
+    })
+  },
+  setR() {
+    if (this.data.role == 'employee') {
       this.setData({
-          menuList: [
-            { name: '我的绩效', icon: 'icon-fenzu', url: '../myJx/myJx', code: 'creator admin', index: 1,color:'blue' },
-            { name: '我参与的', icon: 'icon-canyu', url: '../participation/participation', code: 'admin employee', index: 2,color:'orange' },
-          ],
+        menuList: [
+          { name: '我的绩效', icon: 'icon-fenzu', url: '../myJx/myJx', code: 'admin', index: 1, color: 'blue' },
+          { name: '我参与的', icon: 'icon-canyu', url: '../participation/participation', code: 'admin employee', index: 2, color: 'orange' },
+        ],
       })
     }
   },
@@ -48,8 +65,29 @@ Page({
       }
       app.globalData.usersList = data;
     })
-  }, 
+  },
   openUrl(e) {
+    // dd.chooseDingTalkDir({
+    //     success: (res) => {
+    //         /* data结构
+    //         {"data":
+    //             [
+    //                 {
+    //                     "spaceId": "" //被选中的空间id
+    //                     "path": "", // 被选中的文件夹路径
+    //                     "dirId": "", //被选中的文件夹id
+    //                 }
+    //             ]
+    //         }
+    //       */
+    //     },
+    //     fail: (err) =>{
+    //         dd.alert({
+    //             content:JSON.stringify(err)
+    //         })
+    //     }
+    // })
+    // return false
     var url = e.target.dataset.url;
     if (url == 'all') {
       dd.switchTab({
@@ -63,7 +101,7 @@ Page({
   },
   openDetail(e) {
     let item = e.target.dataset.item
-    if(this.data.tabIndex==2){
+    if (this.data.tabIndex == 2) {
       let data = {
         id: item.id,
         type: item.type,
@@ -72,10 +110,10 @@ Page({
       dd.navigateTo({
         url: `../performanceDetails/performanceDetails?id=${item.remark.packageEmployee_id}&tel=${item.remark.package_name}&paths='messageInform'&data=${JSON.stringify(data)}`
       })
-    }else{
+    } else {
       dd.navigateTo({
         url: `../performanceDetails/performanceDetails?id=${item.remark.packageEmployee_id}&tel=${item.remark.package_name}`
-      }) 
+      })
     }
   },
   //代办||未读消息
@@ -85,6 +123,18 @@ Page({
     Promise.all([http1, http2]).then(function (res) {
       let data1 = res[0].data.data;
       let data2 = res[1].data.data;
+      data1.list.forEach(item => {
+        if (item.remark.employee_id) {
+          //被考核人
+          item.userInfo = app.globalData.usersList[item.remark.employee_id];
+        }
+      });
+      data2.list.forEach(item => {
+        if (item.remark.employee_id) {
+          //被考核人
+          item.userInfo = app.globalData.usersList[item.remark.employee_id];
+        }
+      });
       that.setData({
         dbList: data1.list,
         dbTolal: data1.total,
@@ -101,11 +151,11 @@ Page({
   },
   openAll(e) {
     let index = e.target.dataset.index
-    if(index==1){
+    if (index == 1) {
       dd.navigateTo({
         url: `../backlog/backlog`
       })
-    }else{
+    } else {
       dd.navigateTo({
         url: `../messageInform/messageInform`
       })

+ 3 - 3
pages/home/participation/participation.js

@@ -21,14 +21,15 @@ Page({
   onLoad() {
     that = this;
     dd.setNavigationBar({ title: "消息通知" });
+    this.getRange();
   },
   onShow() {
     animation = dd.createAnimation({
       duration: 200,
       timeFunction: "linear",
     });
-    if(this.data.page==1){
-      this.getRange();
+    if(this.data.page==1&&this.data.defaultRuleId){
+      this.getManagement();
     }
   },
   openDetail(e) {
@@ -183,7 +184,6 @@ Page({
         defaultRuleId: obj[0].id,
         jxName: obj[0].name,
       })
-    }).finally(() => {
       this.getManagement();
     })
   },

+ 4 - 4
pages/home/performanceDetails/performanceDetails.axml

@@ -47,7 +47,7 @@
         <view>
           <text class="textBox" a:for="{{item.tabList}}" a:for-item="list" a:if="{{list.prop}}">{{ list.prop }}</text>
         </view>
-        <view>
+        <view a:if="{{item.per_remark}}">
           <view class="orange stanTit">考核标准</view>
           <view style="border: 0.02rem solid #efefef; border-radius: 0.1rem;white-space: pre-wrap;padding: 0.2rem;font-size:0.26rem"> {{item.per_remark}}</view>
         </view>
@@ -104,7 +104,7 @@
           </view>
           <view class="flex-box inputBox" a:if="{{(ruleScore == 1 && !item.totalScore) || (ruleScore == 2 && item.totalScore)}}">
             <text class="flex-box">评分说明</text>
-            <textarea onBlur="bindText" data-index="{{index}}" value="{{item.remarks}}" class="flex-1" auto-height placeholder="请输入" maxlength="50" />
+            <textarea onInput="bindText" data-index="{{index}}" value="{{item.remarks}}" class="flex-1" auto-height placeholder="请输入" maxlength="50" />
           </view>
         </view>
       </view>
@@ -222,7 +222,7 @@
               <picker onChange="clickreject" value="{{rejectListIndex}}" range="{{rejectList}}" range-key="name">
                 <view style="text-align:right;padding-right:10rpx;" class="fontColorX">
                     <text a:if="{{!rejectList[rejectListIndex]}}">请选择</text>
-                    <text a:if="{{rejectList[rejectListIndex]}}">{{ rejectListIndex + 1 }}.</text>{{rejectList[rejectListIndex].name}}
+                    <text a:if="{{rejectList[rejectListIndex]}}">{{rejectList[rejectListIndex].name}}</text>
                 </view>
               </picker>
             </view>
@@ -298,7 +298,7 @@
             <view class="line-feed" style="font-size:.3rem;color:block;font-width:600">{{ item.title }}</view>
             <text style="font-size:.24rem;padding:0.2rem 0" class="fontColorX">
               {{ item.date }}
-              <text a:if="{{logText == '管理记录'}}" style="padding-left:10rpx">记录人:{{ item.employee_id }}</text>
+              <text a:if="{{logText == '管理记录'}}" style="padding-left:10rpx">记录人:{{ item.userName }}</text>
             </text>
             <text class="line-feed" style="font-size:.25rem;color:#505050;">
               {{item.remark}}

File diff suppressed because it is too large
+ 522 - 481
pages/home/performanceDetails/performanceDetails.js


+ 5 - 10
pages/home/resultValueEntry/resultValueEntry.js

@@ -66,14 +66,12 @@ Page({
       .then(res => {
         app.globalData.showToast('设置成功');
         this.getPackageDtail();
+		setTimeout(() => {
+		    this.setData({
+		      bootBool:false
+		    })
+		}, 3000);
       })
-      .finally(() => {
-        setTimeout(() => {
-            this.setData({
-              bootBool:false
-            })
-        }, 3000);
-      });
   },
   getPackageDtail() {
     app.$get('api/per/package/employee/info', { id: this.data.id }).then(res => {
@@ -144,8 +142,5 @@ Page({
         age: { num1: noStatusList.length, num2: statusList.length }
       })
     })
-      .finally(() => {
-        this.skeletonLoad = false;
-      });
   }
 });

+ 3 - 2
pages/home/statistics/statistics.axml

@@ -65,10 +65,11 @@
         </view>
       </block>
       <view a:else class="tu">
-        <view style="height:400rpx">
+        <view style="height:400rpx" a:if="{{statementperson.length>0}}">
           <f2 onInit="onInitChart2"></f2>
         </view>
-        <view style="padding:0.2rem 0.32rem">参与考核部门人数</view>
+        <no-data a:else content="暂无对应部门"></no-data>
+        <view style="padding:0.2rem 0.32rem" a:if="{{statementperson.length>0}}">参与考核部门人数</view>
         <view a:for="{{statementperson}}" class="flex-box-ce" style="padding:0.24rem 0.32rem;border-bottom:1px solid #f1f1f1" onTap="cellDept" data-item="{{item}}">
           <view class="flex-1">
             <view>{{ item.name }}</view>

+ 2 - 2
pages/home/statistics/statistics.js

@@ -93,6 +93,7 @@ Page({
     let arr = [];
     this.data.allStatementResult.map(item => {
       if (this.isQualified(item)) {
+        item.name=app.globalData.usersList[item.id].name
         arr.push(item);
       }
     });
@@ -330,8 +331,7 @@ Page({
         defaultRuleId: obj[0].id,
         jxName: obj[0].name,
       })
-    }).finally(() => {
-      this.statisticalPeople();
+	  this.statisticalPeople();
     })
   },
   onInitChart2(F2, config) {

+ 1 - 1
pages/index/begin/begin.axml

@@ -1,7 +1,7 @@
 <view>
   <view class="noData flex-box-v flex-center-center">
     <image mode="scaleToFill" src="../../image/logo.png" class="initImg"/>
-    <text class="text">{{str}}</text>
+    <text class="text">{{msg}}</text>
     <button type="primary" a:if="{{num==3}}" class="btn" catchTap="loginAll">同步企业信息</button>
   </view>
 </view>

+ 1 - 1
pages/index/noJurisdiction/noJurisdiction.axml

@@ -5,7 +5,7 @@
         你当前未授权自己进入应用,请修改应用的可见范围为全部或包含自己,如需咨询客服,请到你企业专属的功道云服务群咨询
       </view>
       <view a:else>
-        当前用户未授权进入系统,请联系管理员为你【启用积分管理】,如需咨询客服,请到你企业专属的功道云服务群咨询
+        当前用户未授权进入系统,请联系管理员为你【启用绩效管理】,如需咨询客服,请到你企业专属的功道云服务群咨询
       </view>
   </view>
 </view>

+ 4 - 0
pages/index/noPage/noPage.acss

@@ -0,0 +1,4 @@
+.noJ{
+  text-align: center;
+  padding-top: 30%
+}

+ 8 - 0
pages/index/noPage/noPage.axml

@@ -0,0 +1,8 @@
+<view>
+  <view class="noJ">
+      <image mode="scaleToFill" src="../../../image/noData.png" style="width: 340rpx;height: 340rpx;margin-bottom:20rpx;"/>
+      <view>
+          户用考核被删除或用户未启用
+      </view>
+  </view>
+</view>

+ 11 - 0
pages/index/noPage/noPage.js

@@ -0,0 +1,11 @@
+var app = getApp()
+var that;
+Page({
+  data: {
+    isCreator: false,
+    creatorName:'',
+  },
+  onLoad() {
+      this.setData({isCreator: app.globalData.isCreator,creatorName:app.globalData.corpMessage.creators})
+  },
+});

+ 3 - 0
pages/index/noPage/noPage.json

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

+ 10 - 10
pages/index/start/start.axml

@@ -1,19 +1,19 @@
 <view>
   <view a:if="{{showIndex==1}}" class="box">
-    <view class="title">欢迎使用功道云积分制</view>
+    <view class="title">欢迎使用功道云绩效制</view>
     <view class="content fontColorZ">
       <view class="c_top">
         你是开通应用的
         <text class="yellow">创始人</text>
         ,可在
         <text class="yellow">“设置-组织架构”</text>
-        授权员工【开启积分管理】
+        授权员工【开启绩效管理】
       </view>
       <view class="flex-box  c_main">
         <image mode="scaleToFill" src="../../image/dt.png"></image>
         <view class="c_text fontColorZ">
           <view>授权后,员工才能正式进入应用</view>
-          <view class="fontColorF">设置路径:钉钉电脑版-工作-功道云积分制-设置-组织架构</view>
+          <view class="fontColorF">设置路径:钉钉电脑版-工作-功道云绩效制-设置-组织架构</view>
         </view>
       </view>
       <view class="c_footer">
@@ -23,18 +23,18 @@
     </view>
   </view>
   <view a:if="{{showIndex==2}}" class="box">
-    <view class="title">欢迎使用功道云积分制</view>
+    <view class="title">欢迎使用功道云绩效制</view>
     <view class="content fontColorZ">
       <view class="c_top">
         你可在
         <text class="yellow">“设置-角色权限”</text>
-        添加【积分管理员】来协助执行积分管理
+        添加【绩效管理员】来协助执行绩效管理
       </view>
       <view class="flex-box  c_main">
         <image mode="scaleToFill" src="../../image/dt.png"></image>
         <view class="c_text fontColorZ">
-          <view>推荐行政人事或有执行力的管理层来当【积分管理员】</view>
-          <view class="fontColorF">设置路径:钉钉电脑版-工作-功道云积分制-设置-角色权限</view>
+          <view>推荐行政人事或有执行力的管理层来当【绩效管理员】</view>
+          <view class="fontColorF">设置路径:钉钉电脑版-工作-功道云绩效制-设置-角色权限</view>
         </view>
       </view>
       <view class="c_footer">
@@ -44,16 +44,16 @@
     </view>
   </view>
   <view a:if="{{showIndex==3}}" class="box">
-    <view class="title">欢迎使用功道云积分制</view>
+    <view class="title">欢迎使用功道云绩效制</view>
     <view class="content fontColorZ">
       <view class="c_top">
-        <view>3步走,轻松搭建积分管理</view>
+        <view>3步走,轻松搭建绩效管理</view>
         <view class="fontColorF">请前往电脑端体验完整管理流程</view>
       </view>
       <view class="c_footer">
         <image mode="scaleToFill" src="../../image/start1.jpg" data-str="../../image/start1.jpg"></image>
       </view>
-      <view class="fontColorT text_f">路径:钉钉电脑端(需下载安装)-工作-功道云积分制</view>
+      <view class="fontColorT text_f">路径:钉钉电脑端(需下载安装)-工作-功道云绩效制</view>
 
       <button type="primary" class="btn" catchTap="openUrl">已熟悉电脑端,直达手机端功能</button>
       <!-- <button type="primary" class="btn" catchTap="openView">前往PC端操作</button> -->

Some files were not shown because too many files changed in this diff