Forráskód Böngészése

Merge branch 'master' of http://47.100.37.243:10080/wutt/manHourHousekeeper

cs 2 éve
szülő
commit
8d4304841a

+ 112 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/AuthRedirectController.java

@@ -43,6 +43,12 @@ public class AuthRedirectController {
     private String suitId;
     @Value("${suitSecret}")
     private String suitSecret;
+    @Value("${privateDeployURL.pcUrl}")
+    private String pcUrl;
+    @Value("${privateDeployURL.mobUrl}")
+    private String mobUrl;
+    @Value("${corpId}")
+    private String corpId;
 
     @Resource
     SysConfigMapper sysConfigMapper;
@@ -144,6 +150,93 @@ public class AuthRedirectController {
     }
 
 
+    @RequestMapping("/corpInsideWXAuth")
+    public ModelAndView authInside(String code, String state) throws Exception{
+        Map<String,Object> reqParam = new HashMap<String,Object>(16);
+        String userAgent = request.getHeader("User-Agent");
+        //获取设备类型
+        String deviceType = UserAgentUtils.getDeviceType(userAgent);
+        boolean isMobile = "MOBILE".equals(deviceType);
+        WxCorpInfo corpInfo = wxCorpInfoMapper.selectById(corpId);
+        String url = WeiXinCorpController.GET_CORP_INSIDE_USERINFO_URL.replace("ACCESS_TOKEN",getCorpConcactAccessToken(corpInfo)).replace("CODE", code);
+        String forObject = this.restTemplate.getForObject(url, String.class);
+        JSONObject obj = JSONObject.parseObject(forObject);
+        String wxUserId = obj.getString("UserId");
+        String openUserId = obj.getString("open_userid");
+        String corpId = obj.getString("CorpId");
+
+        System.out.println("wxUserId="+wxUserId+", openUserId="+openUserId);
+        List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("corpwx_userid", openUserId));
+        Integer companyId = 0;
+        if (userList.size() > 0) {
+            //该用户已存在
+            User curUser = userList.get(0);
+            companyId = curUser.getCompanyId();
+            if (curUser.getIsActive() == 1) {
+                reqParam.put("userId", curUser.getId());
+            } else {
+                //提示账号已停用
+                //reqParam.put("errorMsg", "您的账号已停用,无法登录");
+                reqParam.put("errorMsg", MessageUtils.message("user.inactive"));
+            }
+        } else {
+            //使用UserId比对,之前有的老用户存的是UserId
+            WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectById(corpId);
+            if (wxCorpInfo == null) {
+                reqParam.put("errorMsg", MessageUtils.message("user.accountNoExist"));
+            } else {
+                User curUser = userMapper.selectOne(new QueryWrapper<User>().eq("company_id", wxCorpInfo.getCompanyId()).eq("corpwx_userid", wxUserId));
+                if (curUser == null) {
+//                    reqParam.put("errorMsg", MessageUtils.message("user.accountNoExist"));
+                    //用户不存在,去生成该用户
+                    if (wxCorpInfo.getSaasSyncContact() == 1) {
+                        curUser = wxCorpInfoService.generateUserInfo(wxCorpInfo.getCompanyId(), openUserId);
+                    }
+                }
+                if (curUser != null) {
+                    if (curUser.getIsActive() == 1) {
+                        companyId = curUser.getCompanyId();
+                        reqParam.put("userId", curUser.getId());
+                    } else {
+                        //提示账号已停用
+                        //reqParam.put("errorMsg", "您的账号已停用,无法登录");
+                        reqParam.put("errorMsg", MessageUtils.message("user.inactive"));
+                    }
+                } else {
+                    System.err.println("==生成企业微信User失败==");
+                    reqParam.put("errorMsg", MessageUtils.message("user.accountNoExist"));
+                }
+
+            }
+        }
+        reqParam.put("hasTriedAutoLogin", 1);
+        if (!StringUtils.isEmpty(state) && state.length() > 1) {
+            reqParam.put("path", state);
+        }
+
+        String redirecUrl = null;
+        String router = "index";
+        if (companyId > 0) {
+            HashMap compExpireInfo = getCompExpireInfo(companyId);
+            if (compExpireInfo != null) {
+                //过期了
+                router = "expire";
+                reqParam.put("expDate", compExpireInfo.get("expDate"));
+                reqParam.put("version", compExpireInfo.get("version"));
+            }
+        }
+        if (isMobile) {
+            redirecUrl = mobUrl + router;
+        } else {
+            redirecUrl = pcUrl + router;
+        }
+        ModelAndView modelAndView = new ModelAndView(
+                new RedirectView(redirecUrl), reqParam);
+
+        return modelAndView;
+    }
+
+
 
 
     private HashMap getCompExpireInfo(Integer companyId) {
@@ -241,4 +334,23 @@ public class AuthRedirectController {
         return WeiXinCorpController.SUITE_ACCESS_TOKEN;
     }
 
+
+    //获取企业通讯录的accessToken,在私有化部署的企业内部服务器上跑
+    private String getCorpConcactAccessToken(WxCorpInfo corpInfo) throws Exception {
+        String url = WeiXinCorpController.GET_CORP_TOKEN.replace("ID", corpInfo.getCorpid()).replace("SECRET", corpInfo.getContactSecret());
+        ResponseEntity<String> responseEntity = this.restTemplate.exchange(url,
+                HttpMethod.GET, null, String.class);
+        if (responseEntity.getStatusCode() == HttpStatus.OK) {
+            String resp = responseEntity.getBody();
+            JSONObject json = JSONObject.parseObject(resp);
+            if (json.getIntValue("errcode") == 0) {
+                String access_token = json.getString("access_token");
+                corpInfo.setAccessToken(access_token);
+            } else {
+                throw new Exception(json.toJSONString());
+            }
+        }
+        return corpInfo.getAccessToken();
+    }
+
 }

+ 3 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/WeiXinCorpController.java

@@ -80,6 +80,8 @@ public class WeiXinCorpController {
     //网页获取企业用户信息
     public static final String GET_CORP_USERINFO_URL = "https://qyapi.weixin.qq.com/cgi-bin/service/getuserinfo3rd?suite_access_token=SUITE_ACCESS_TOKEN&code=CODE";
     public static final String GET_LIST_MEMB_AUTH = "https://qyapi.weixin.qq.com/cgi-bin/user/list_member_auth?access_token=ACCESS_TOKEN";
+    //网页获取企业内部用户信息
+    public static final String GET_CORP_INSIDE_USERINFO_URL = "https://qyapi.weixin.qq.com/cgi-bin/auth/getuserinfo?access_token=ACCESS_TOKEN&code=CODE";
     //获取员工打卡日报统计信息
     public static final String GET_CHECKIN_DAYDATA = "https://qyapi.weixin.qq.com/cgi-bin/checkin/getcheckin_daydata?access_token=ACCESS_TOKEN";
 
@@ -3620,7 +3622,7 @@ public class WeiXinCorpController {
         data.put("main_title", mainTitle);
         JSONObject cardImg = new JSONObject();
         cardImg.put("url", "http://www.ttkuaiban.com/card_img.png");
-        cardImg.put("aspect_ratio", 2.23);
+        cardImg.put("aspect_ratio", 2.35);
         data.put("card_image", cardImg);
         JSONArray array = new JSONArray();
         JSONObject docItem = new JSONObject();

+ 11 - 11
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/FinanceServiceImpl.java

@@ -254,7 +254,7 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
                     if (salaryCell != null) {
                         salaryCell.setCellType(CellType.STRING);
                         String item = salaryCell.getStringCellValue();
-                        BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
+                        BigDecimal value = !StringUtils.isEmpty(item) ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setMonthCost(value);
                         if (financeConfig.getMonthCostCalculate()==1) total = total.add(value);
                     }
@@ -268,49 +268,49 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
                     if (bonusCell != null) {
                         bonusCell.setCellType(CellType.STRING);
                         String bonusString = bonusCell.getStringCellValue();
-                        BigDecimal bonus = bonusString != null ? new BigDecimal(bonusString.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
+                        BigDecimal bonus = !StringUtils.isEmpty(bonusString) ? new BigDecimal(bonusString.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setBonus(bonus);
                         if (financeConfig.getBonusCalculate()==1) total = total.add(bonus);
                     }
                     if (allowanceCell != null) {
                         allowanceCell.setCellType(CellType.STRING);
                         String item = allowanceCell.getStringCellValue();
-                        BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
+                        BigDecimal value = !StringUtils.isEmpty(item) ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setAllowance(value);
                         if (financeConfig.getAllowanceCalculate()==1) total = total.add(value);
                     }
                     if (inJobCell != null) {
                         inJobCell.setCellType(CellType.STRING);
                         String item = inJobCell.getStringCellValue();
-                        BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
+                        BigDecimal value = !StringUtils.isEmpty(item) ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setInsuranceLosejob(value);
                         if (financeConfig.getInsuranceLosejobCalculate()==1) total = total.add(value);
                     }
                     if (inMedicalCell != null) {
                         inMedicalCell.setCellType(CellType.STRING);
                         String item = inMedicalCell.getStringCellValue();
-                        BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
+                        BigDecimal value = !StringUtils.isEmpty(item) ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setInsuranceMedical(value);
                         if (financeConfig.getInsuranceMedicalCalculate()==1) total = total.add(value);
                     }
                     if (inOldCell != null) {
                         inOldCell.setCellType(CellType.STRING);
                         String item = inOldCell.getStringCellValue();
-                        BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
+                        BigDecimal value = !StringUtils.isEmpty(item)? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setInsuranceOld(value);
                         if (financeConfig.getInsuranceOldCalculate()==1) total = total.add(value);
                     }
                     if (injuryCell != null) {
                         injuryCell.setCellType(CellType.STRING);
                         String item = injuryCell.getStringCellValue();
-                        BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
+                        BigDecimal value = !StringUtils.isEmpty(item) ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setInsuranceInjury(value);
                         if (financeConfig.getInsuranceInjuryCalculate()==1) total = total.add(value);
                     }
                     if (houseFundCell != null) {
                         houseFundCell.setCellType(CellType.STRING);
                         String item = houseFundCell.getStringCellValue();
-                        BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
+                        BigDecimal value = !StringUtils.isEmpty(item) ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setHouseFund(value);
                         if (financeConfig.getHouseFundCalculate()==1) total = total.add(value);
                     }
@@ -318,21 +318,21 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
                     if (field1 != null) {
                         field1.setCellType(CellType.STRING);
                         String item = field1.getStringCellValue();
-                        BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
+                        BigDecimal value = !StringUtils.isEmpty(item) ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setCustomField1(value);
                         if (financeConfig.getField1Calculate() != null && financeConfig.getField1Calculate()==1) total = total.add(value);
                     }
                     if (field2 != null) {
                         field2.setCellType(CellType.STRING);
                         String item = field2.getStringCellValue();
-                        BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
+                        BigDecimal value = !StringUtils.isEmpty(item) ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setCustomField2(value);
                         if (financeConfig.getField2Calculate() != null && financeConfig.getField2Calculate()==1) total = total.add(value);
                     }
                     if (field3 != null) {
                         field3.setCellType(CellType.STRING);
                         String item = field3.getStringCellValue();
-                        BigDecimal value = item != null ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
+                        BigDecimal value = !StringUtils.isEmpty(item) ? new BigDecimal(item.trim().replaceAll("\\u00a0", "")) : BigDecimal.valueOf(0);
                         finance.setCustomField3(value);
                         if (financeConfig.getField3Calculate() != null && financeConfig.getField3Calculate()==1) total = total.add(value);
                     }

+ 30 - 8
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/task/TimingTask.java

@@ -1,17 +1,16 @@
 package com.management.platform.task;
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.injector.methods.SelectById;
 import com.management.platform.controller.WeiXinCorpController;
 import com.management.platform.entity.*;
+import com.management.platform.entity.vo.TokenVo;
 import com.management.platform.mapper.*;
 import com.management.platform.service.*;
-import com.management.platform.util.DockWithMLD;
-import com.management.platform.util.HttpRespMsg;
-import com.management.platform.util.RedisUtil;
-import com.management.platform.util.WorkDayCalculateUtils;
+import com.management.platform.util.*;
 import me.chanjar.weixin.mp.api.WxMpInMemoryConfigStorage;
 import me.chanjar.weixin.mp.api.WxMpService;
 import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl;
@@ -31,11 +30,16 @@ import org.springframework.web.client.RestTemplate;
 
 import javax.annotation.Resource;
 import java.security.SecureRandom;
+import java.sql.Timestamp;
 import java.text.DecimalFormat;
 import java.time.*;
 import java.time.format.DateTimeFormatter;
 import java.time.temporal.TemporalAccessor;
+import java.time.temporal.TemporalAdjusters;
 import java.util.*;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.Executor;
+import java.util.concurrent.Executors;
 import java.util.stream.Collectors;
 import java.util.stream.IntStream;
 
@@ -84,6 +88,8 @@ public class TimingTask {
     private WxCorpInfoService wxCorpInfoService;
     @Resource
     private WxCorpInfoMapper wxCorpInfoMapper;
+    @Resource
+    private ReportLogMapper reportLogMapper;
     @Value(value = "${upload.path}")
     private String path;
 
@@ -188,10 +194,22 @@ public class TimingTask {
         }
     }
 
+    //每个月五号推送日报信息
+    @Scheduled(cron = "0 0 2 2 * ?")
+    private void pushReportListByToken(){
+        if(isDev) return;
+        HttpRespMsg msg=new HttpRespMsg();
+        LocalDate now=LocalDate.now().minusMonths(1);
+        now.with(TemporalAdjusters.lastDayOfMonth());
+        LocalDate start=now.with(TemporalAdjusters.firstDayOfMonth());
+        LocalDate end=now.with(TemporalAdjusters.lastDayOfMonth());
+    }
+
+
     //每天2:11 同步钉钉用户前2天到未来30天时间段的打卡,请假,出差数据
-    @Scheduled(cron = "0 11 2 ? * *")
+    @Scheduled(cron = "0 25 15 ? * *")
     private void synFanWeiWorkData() {
-        if (isDev) return;
+        /*if (isDev) return;*/
         List<TimeType> timeTypeList = timeTypeMapper.selectList(new QueryWrapper<TimeType>().eq("sync_fanwei", 1));
         List<Integer> compIds = timeTypeList.stream().map(TimeType::getCompanyId).collect(Collectors.toList());
         if(compIds.isEmpty()){
@@ -259,8 +277,8 @@ public class TimingTask {
                leaveSheet.setStatus(0);
                leaveSheet.setOwnerId(user.getId());
                leaveSheet.setOwnerName(user.getName());
-               leaveSheet.setStartDate(LocalDate.parse(String.valueOf(map.get("startDate")),dtf));
-               leaveSheet.setEndDate(LocalDate.parse(String.valueOf(map.get("endDate")),dtf));
+               leaveSheet.setStartDate(LocalDate.parse(String.valueOf(map.get("startDate")),dtf1));
+               leaveSheet.setEndDate(LocalDate.parse(String.valueOf(map.get("endtDate")),dtf1));
                int timeType = Integer.parseInt(String.valueOf(map.get("timeType")));
                leaveSheet.setTimeType(timeType);
                leaveSheet.setTimeDays((Float) map.get("timeDays"));
@@ -506,6 +524,10 @@ public class TimingTask {
             token+=s;
         }
         System.out.println(token);
+        LocalDate now=LocalDate.now().minusMonths(1);
+        LocalDate end=now.with(TemporalAdjusters.lastDayOfMonth());
+        LocalDate start=now.with(TemporalAdjusters.firstDayOfMonth());
+        System.out.println(start+"----"+end);
     }
 
     //发送上周填写的工时统计

+ 8 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/resources/application-bkserver.yml

@@ -102,4 +102,11 @@ management:
       enabled: false
 
 configEnv:
-  isDev: true
+  isDev: true
+
+privateDeployURL:
+  pcUrl: http://dev.huoshishanxin.com/#/
+  mobUrl: http://dev.huoshishanxin.com/#/
+
+#平台作为服务商的参数
+corpId: ww0b9aafe69e506b8b

+ 7 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/resources/application.yml

@@ -15,7 +15,7 @@ spring:
       location: C:/upload/
   datasource:
     driver-class-name: com.mysql.cj.jdbc.Driver
-    url: jdbc:mysql://47.101.180.183:3306/man_hour_manager?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&useSSL=false
+    url: jdbc:mysql://47.101.180.183:3306/man_mld?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&rewriteBatchedStatements=true&useSSL=false
     username: root
     password: HuoshiDB@2022
     hikari:
@@ -147,4 +147,10 @@ configEnv:
   # 是否是私有化部署,企业内部应用
   isPrivateDeploy: false
 
+privateDeployURL:
+  pcUrl: http://dev.huoshishanxin.com/#/
+  mobUrl: http://dev.huoshishanxin.com/#/
+
+
+
 

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 40704 - 42375
fhKeeper/formulahousekeeper/management-platform/workTime.log


+ 2 - 2
fhKeeper/formulahousekeeper/timesheet/config/index.js

@@ -1,10 +1,10 @@
 var path = require('path')
 
-//  var ip = '127.0.0.1'
+ var ip = '127.0.0.1'
 // var ip = '47.101.180.183'
 // var ip = '47.100.37.243'
 // var ip = '192.168.2.31'
-var ip = '192.168.2.44'
+// var ip = '192.168.2.44'
 
 // var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
 // for (var i in ifaces) {

+ 71 - 1
fhKeeper/formulahousekeeper/timesheet/src/components/select.vue

@@ -1,5 +1,6 @@
 <template>
-  <div tabindex="0" @blur="selectClihide()" style="display: inline-block;">  
+<div style="display: inline-block;">
+  <div tabindex="0" @blur="selectClihide()" style="display: inline-block;" v-if="!wxCope">
     <!-- <div :style="'width:' + selectWidth + 'px;height:' + selectHeight + 'px'" :class="classDiv ? 'select selectDiv' : 'select'" @click="selectCli" :ref="disabled ? '' : 'selectDiv'"> -->
     <div :class="disabled ? 'disabledTrue' : 'disabledFalse'" @mouseenter="moveIonDiv" @mouseleave="outIonDiv">
         <div :style="`width:${selectWidth}px;height:${selectHeight}px`" :class="classDiv ? 'select selectDiv' : 'select'" @click="selectCli" :ref="disabled ? '' : 'selectDiv'">
@@ -70,6 +71,14 @@
       </div>
     </transition>
   </div>
+  <div v-if="wxCope" class="waihez">
+    <!-- <div @click="dianjis()">点击</div> -->
+    <div :style="`width:${selectWidth}px;height:${selectHeight}px;line-height:${selectHeight}px;background:#fff`" class="select selectDandu" @click="dianjis()">
+        <span v-if="!multiSelect"><ww-open-data type='userName' :openid='selectName'></ww-open-data></span>
+        <!-- <span>你好</span> -->
+    </div>
+  </div>
+</div>
 </template>
 
 <script>
@@ -84,6 +93,10 @@ export default {
         subjectId: {
             type: [String, Number, Array]
         },
+        wxCope: {
+            type: Boolean,
+            default: false,
+        },
         // 是否支持多选
         multiSelect: {
             type: Boolean,
@@ -265,6 +278,54 @@ export default {
         this.dailyListIndex = this.idx
     },
     methods: {
+        dianjis() {
+            if(!this.disabled) {
+                let modes = this.multiSelect ? 'multi' : 'single'
+                let that = this
+                wx.invoke("selectEnterpriseContact", {
+                    "fromDepartmentId": 0,// 必填,表示打开的通讯录从指定的部门开始展示,-1表示自己所在部门开始, 0表示从最上层开始
+                    "mode": modes,// 必填,选择模式,single表示单选,multi表示多选
+                    "type": ["user"],// 必填,选择限制类型,指定department、user中的一个或者多个
+                    "selectedDepartmentIds": [],// 非必填,已选部门ID列表。用于多次选人时可重入,single模式下请勿填入多个id
+                    "selectedUserIds": []// 非必填,已选用户ID列表。用于多次选人时可重入,single模式下请勿填入多个id
+                        },function(res){
+                            console.log(res)
+                            if (res.err_msg == "selectEnterpriseContact:ok"){
+                                console.log(res, '数据来源')
+                                if(typeof res.result == 'string'){
+                                    res.result = JSON.parse(res.result) //由于目前各个终端尚未完全兼容,需要开发者额外判断result类型以保证在各个终端的兼容性
+                                }
+                                var selectedUserList = res.result.userList; // 已选的成员列表
+                                var userId = ''
+                                var userName = ''
+                                for (var i = 0; i < selectedUserList.length; i++) {
+                                        var user = selectedUserList[i];
+                                        userId = user.id; // 已选的单个成员ID
+                                        userName = user.name;// 已选的单个成员名称
+                                        console.log(userId, userName)
+                                }
+                                for(var s in that.options) {
+                                    if(that.options[s].name == userId) {
+                                        that.selectName = userId
+                                        that.wxCoper(that.options[s].id)
+                                    }
+                                }
+                            }
+                        }
+                );
+            }
+        },
+        wxCoper(id) {
+            let obj = {
+                id: id,
+                distinction: this.distinction,
+                index: this.index, // 选中的索引
+                other: this.other,
+                name: this.selectName
+            }
+            console.log(obj)
+            this.$emit("selectCal", obj)
+        },
         selectCli() {
             if(!this.disabled) {
                 this.$refs.selectDiv.focus()
@@ -443,6 +504,15 @@ export default {
 </script>
 
 <style scoped lang="scss">
+    .selectDandu {
+        font-size: 16px;
+    }
+    .waihez {
+        // padding-top: 7px;
+        // box-sizing: border-box;
+        // background: #FFF;
+        display: inline-block;
+    }
     .selectDiv {
         border-color: #409EFF !important;
     }

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/Home.vue

@@ -558,7 +558,7 @@
                                             timestamp: res.data.timestamp, // 必填,生成签名的时间戳
                                             nonceStr: res.data.nonceStr, // 必填,生成签名的随机串
                                             signature: res.data.signature, // 必填,签名,见附录-JS-SDK使用权限签名算法
-                                            jsApiList: ['selectExternalContact'], //必填,传入需要使用的接口名称
+                                            jsApiList: ['selectExternalContact', 'selectEnterpriseContact'], //必填,传入需要使用的接口名称
                                             success: function (result) {
                                                 console.log(result, '请求微信成功')
                                                 console.log(window, 'window')

+ 16 - 4
fhKeeper/formulahousekeeper/timesheet/src/views/leave/list.vue

@@ -185,7 +185,7 @@
                   <el-option :label="item.name" :value="item.id"></el-option>
                   </span> 
               </el-select>
-              <selectCat v-if="user.userNameNeedTranslate == 1" :size="'small'" :subject="users" :subjectId="ownerIds" :distinction="'3'" :disabled="false" :clearable="true" @selectCal="selectCal" v-show="permissions.leaveAll" style="width: 120px"></selectCat>
+              <selectCat v-if="user.userNameNeedTranslate == 1" :size="'small'" :subject="users" :subjectId="ownerIds" :distinction="'3'" :disabled="false" :widthStr="'120'" :clearable="true" @selectCal="selectCal" v-show="permissions.leaveAll" style="width: 120px"></selectCat>
             </div>
             <div>
               <span style="color: #606266">{{ $t('leavetype') }}</span>
@@ -323,7 +323,7 @@
         <div class="ctons" style="width: 98%;">
           <div style="display: flex;align-items: center;padding-bottom: 20px;border-bottom: 1px solid #f2f2f2">
             <div style="display: inline-block;width: 350px">
-              <el-input style="float:left;" v-model="keyword" class="input-with-select" :placeholder="$t('pleaseenterstaffsearch')" clearable="true" size="small">
+              <el-input style="float:left;" v-if="user.userNameNeedTranslate != 1" v-model="keyword" class="input-with-select" :placeholder="$t('pleaseenterstaffsearch')" clearable="true" size="small">
                   <el-button slot="append" @click="statistical()" icon="el-icon-search"></el-button>
               </el-input>
             </div>
@@ -390,7 +390,19 @@
         <el-col :span="6" >
             <el-scrollbar style="height:100%;border:1px solid #dddddd;margin-left:15px;" >
             <div class="tree" :style="'height:'+ (tableHeight-120) + 'px'">
-                <el-tree :data="sdata" :props="sdefaultProps" @node-click="handleNodeClick" accordion></el-tree>
+                <el-tree :data="sdata" :props="sdefaultProps" @node-click="handleNodeClick" accordion>
+                  <!-- 添加试试看 -->
+                  <span class="custom-tree-node" slot-scope="{ node, data }">
+                      <!-- <span>{{ node.label }}</span> -->
+                      <span v-if="user.userNameNeedTranslate == '1'">
+                        <ww-open-data type='departmentName' :openid='node.label'></ww-open-data>
+                      </span>
+                      <span v-else>
+                        {{ node.label }}
+                        <span v-if="false">{{data}}</span>
+                      </span>
+                  </span>
+                </el-tree>
             </div>
             </el-scrollbar>
         </el-col>
@@ -459,7 +471,7 @@
               <el-button size="small" @click="changeAltime(0)">{{ $t('volumeset') }}</el-button>
             </div>
             <div style="display: inline-block;width: 26%">
-              <el-input style="float:left;" v-model="keywordAl" class="input-with-select" :placeholder="$t('pleaseenterhepersonnamesearch')" clearable="true" size="small" @clear="clearsearchAl()">
+              <el-input style="float:left;" v-model="keywordAl" v-if="user.userNameNeedTranslate != 1" class="input-with-select" :placeholder="$t('pleaseenterhepersonnamesearch')" clearable="true" size="small" @clear="clearsearchAl()">
                   <el-button slot="append" @click="searchAl()" icon="el-icon-search"></el-button>
               </el-input>
             </div>

+ 2 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/project/projectInside.vue

@@ -420,6 +420,8 @@
                         </el-select>
 
                         <selectCat v-if="user.userNameNeedTranslate == 1" :size="'mini'" :subject="users" :subjectId="executorItem.executorId" :distinction="'1'" @selectCal="selectCal" :index="index" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !(groupResponsibleId == user.id)"></selectCat>
+                        <!-- <selectCat v-if="user.userNameNeedTranslate == '1'" :wxCope="true" :size="'size'" :subjectId="executorItem.executorId" :distinction="'1'" :subject="users"  @selectCal="selectCal" :index="index" :disabled="(addForm.id != null && user.id != addForm.createrId && currentProject.inchargerId != user.id) && !permissions.projectManagement && !(groupResponsibleId == user.id)"></selectCat> -->
+
 
 
                         <span style="margin-left:30px;margin-right:10px;">{{ $t('plantime') }}</span>

+ 2 - 2
fhKeeper/formulahousekeeper/timesheet_h5/vue.config.js

@@ -4,9 +4,9 @@ const path = require('path');
 const themePath = path.resolve(__dirname,'src/assets/style/theme.less');
 const Timestamp = new Date().getTime();
 
-var ip = '47.101.180.183'
+// var ip = '47.101.180.183'
 // var ip = '192.168.2.7'
-// var ip = '127.0.0.1'
+var ip = '127.0.0.1'
 
 // var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
 // for (var i in ifaces) {