Преглед на файлове

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

cs преди 2 години
родител
ревизия
f8fee4bc8f
променени са 15 файла, в които са добавени 784 реда и са изтрити 68 реда
  1. 36 7
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/WeiXinCorpController.java
  2. 13 8
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/Project.java
  3. 12 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectMainServiceImpl.java
  4. 62 23
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java
  5. 46 9
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java
  6. 2 2
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/UserServiceImpl.java
  7. 2 1
      fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ProjectMapper.xml
  8. 394 0
      fhKeeper/formulahousekeeper/timesheet/src/components/cascader.vue
  9. 175 0
      fhKeeper/formulahousekeeper/timesheet/src/components/cascaderOption.vue
  10. 2 2
      fhKeeper/formulahousekeeper/timesheet/src/components/select.vue
  11. 1 0
      fhKeeper/formulahousekeeper/timesheet/src/i18n/en.json
  12. 1 0
      fhKeeper/formulahousekeeper/timesheet/src/i18n/zh.json
  13. 7 1
      fhKeeper/formulahousekeeper/timesheet/src/views/expense/expense.vue
  14. 4 4
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue
  15. 27 11
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/list.vue

+ 36 - 7
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/WeiXinCorpController.java

@@ -1415,13 +1415,14 @@ public class WeiXinCorpController {
         //默认普通员工的角色
         //获取公司根部门人员,也就是没有分配部门的人员
         int companyRootDeptId = 1;
-        JSONArray allCorpWxUserJsonArray = getDeptUserInfo(curCorpAccessToken, companyRootDeptId);
-        System.out.println("获取到公司下的员工数量="+allCorpWxUserJsonArray.size());
+        JSONArray usersUnderRootArray = getDeptUserInfo(curCorpAccessToken, companyRootDeptId);
+        System.out.println("获取到公司下的员工数量="+usersUnderRootArray.size());
         SysRole defaultRole = sysRoleMapper.selectOne(
                 new QueryWrapper<SysRole>().eq("company_id", companyId).eq("is_default", 1));
         List<User> allCorpWxUserList = new ArrayList<>();
-        for (int m=0;m<allCorpWxUserJsonArray.size(); m++) {
-            JSONObject userJson = allCorpWxUserJsonArray.getJSONObject(m);
+        for (int m=0;m<usersUnderRootArray.size(); m++) {
+            JSONObject userJson = usersUnderRootArray.getJSONObject(m);
+            System.out.println(userJson.toString());
             String curUserid = userJson.getString("userid");
             //跳过非激活状态的员工
             if (userJson.getInteger("status") != 1) continue;
@@ -1475,6 +1476,31 @@ public class WeiXinCorpController {
                         departmentMapper.updateById(curDept);
                     }
                 }
+                //获取部门下的人员
+                JSONArray userList = getDeptUserSimple(curCorpAccessToken, deptId);
+                for (int m=0;m<userList.size(); m++) {
+                    JSONObject userJson = userList.getJSONObject(m);
+                    String curUserid = userJson.getString("userid");
+                    System.out.println("人员信息:"+userJson.toString());
+                    //不存在的人员, 进行插入
+                    User user = new User();
+                    Optional<User> first = allCorpWxUserList.stream().filter(all -> all.getCorpwxUserid().equals(curUserid)).findFirst();
+                    if (first.isPresent()) {
+                        user = first.get();
+                        user.setCorpwxDeptid(deptId);
+                    } else {
+                        //在当前部门下的员工
+                        user.setId(SnowFlake.nextId()+"")
+                                .setRoleId(defaultRole.getId())//默认普通员工
+                                .setRoleName(defaultRole.getRolename())
+                                .setCompanyId(companyId)
+                                .setName(userJson.getString("name"))
+                                .setCorpwxUserid(curUserid)
+                                .setColor(ColorUtil.randomColor())
+                                .setJobNumber(curUserid);
+                        allCorpWxUserList.add(user);
+                    }
+                }
             }
         }
         //更新部门层级关系
@@ -1491,13 +1517,14 @@ public class WeiXinCorpController {
                 newItem.setDepartmentCascade(convertDepartmentIdToCascade(deptId, allDeptList));
             }
         });
-        userService.saveBatch(newUserList);
+        if (newUserList.size() > 0) {
+            userService.saveBatch(newUserList);
+        }
         List<User> updateUserList = allCorpWxUserList.stream().filter(newItem->existingUsers.stream().anyMatch(existingItem->newItem.getCorpwxUserid().equals(existingItem.getCorpwxUserid())
                                             && (!newItem.getName().equals(existingItem.getName()) || (newItem.getCorpwxDeptid() != null && !newItem.getCorpwxDeptid().equals(existingItem.getCorpwxDeptid()))))).collect(Collectors.toList());
         List<Integer> corpWxDeptIds = updateUserList.stream().map(User::getCorpwxDeptid).collect(Collectors.toList());
         List<Department> departmentList = null;
         if (corpWxDeptIds.size() > 0) {
-            //
             departmentList = departmentMapper.selectList(new QueryWrapper<Department>().eq("company_id", companyId).in("corpwx_deptid", corpWxDeptIds));
         }
         final  List<Department> fDeptList = departmentList;
@@ -1513,7 +1540,9 @@ public class WeiXinCorpController {
                 u.setDepartmentCascade("0");
             }
         });
-        userService.updateBatchById(updateUserList);
+        if (updateUserList.size() > 0) {
+            userService.updateBatchById(updateUserList);
+        }
         return new HttpRespMsg();
     }
 

+ 13 - 8
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/Project.java

@@ -1,9 +1,14 @@
 package com.management.platform.entity;
 
 import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.extension.activerecord.Model;
+import java.time.LocalDate;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableField;
+import java.io.Serializable;
+import java.util.List;
+import java.util.Map;
+
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.management.platform.config.PropertyMsg;
 import lombok.Data;
@@ -11,18 +16,13 @@ import lombok.EqualsAndHashCode;
 import lombok.experimental.Accessors;
 import org.springframework.format.annotation.DateTimeFormat;
 
-import java.io.Serializable;
-import java.time.LocalDate;
-import java.util.List;
-import java.util.Map;
-
 /**
  * <p>
  * 
  * </p>
  *
  * @author Seyason
- * @since 2022-08-08
+ * @since 2022-09-30
  */
 @Data
 @EqualsAndHashCode(callSuper = false)
@@ -290,6 +290,11 @@ public class Project extends Model<Project> {
     @TableField("project_main_id")
     private Integer projectMainId;
 
+    /**
+     * 主项目名称
+     */
+    @TableField("project_main_name")
+    private String projectMainName;
 
     /**
      * 供应商id

+ 12 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectMainServiceImpl.java

@@ -2,12 +2,16 @@ package com.management.platform.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.management.platform.entity.Project;
 import com.management.platform.entity.ProjectCategory;
 import com.management.platform.entity.ProjectMain;
+import com.management.platform.entity.ProjectSeparate;
 import com.management.platform.mapper.ProjectCategoryMapper;
 import com.management.platform.mapper.ProjectMainMapper;
+import com.management.platform.mapper.ProjectMapper;
 import com.management.platform.mapper.UserMapper;
 import com.management.platform.service.ProjectMainService;
+import com.management.platform.service.ProjectService;
 import com.management.platform.util.HttpRespMsg;
 import com.management.platform.util.MessageUtils;
 import org.springframework.stereotype.Service;
@@ -33,6 +37,10 @@ public class ProjectMainServiceImpl extends ServiceImpl<ProjectMainMapper, Proje
     private UserMapper userMapper;
     @Resource
     private ProjectCategoryMapper projectCategoryMapper;
+    @Resource
+    private ProjectMapper projectMapper;
+    @Resource
+    private ProjectService projectService;
     @Override
     public HttpRespMsg addOrMod(HttpServletRequest request,ProjectMain projectMain) {
         HttpRespMsg httpRespMsg=new HttpRespMsg();
@@ -56,6 +64,10 @@ public class ProjectMainServiceImpl extends ServiceImpl<ProjectMainMapper, Proje
                 return httpRespMsg;
             }
             projectMainMapper.updateById(projectMain);
+            //修改主项目名称  更新项目表
+            List<Project> projectList = projectMapper.selectList(new QueryWrapper<Project>().eq("project_main_id", projectMain.getId()));
+            projectList.forEach(pl->pl.setProjectMainName(projectMain.getName()));
+            projectService.updateBatchById(projectList);
         }else {
             Integer count2 = projectMainMapper.selectCount(new QueryWrapper<ProjectMain>().eq("company_id", projectMain.getCompanyId())
                     .eq("code", projectMain.getCode()));

+ 62 - 23
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -4943,6 +4943,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
 
     @Override
     public HttpRespMsg batchAddMembToGroup(String membIdArray, String groupIds) {
+        User user = userMapper.selectById(request.getHeader("token"));
         List<String> membArray = JSONArray.parseArray(membIdArray, String.class);
         List<Integer> groupArray = JSONArray.parseArray(groupIds, Integer.class);
         List<GroupParticipator> gpList = groupParticipatorMapper.selectList(new QueryWrapper<GroupParticipator>().in("group_id", groupArray));
@@ -4965,6 +4966,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             List<Integer> collect = addToGpList.stream().map(GroupParticipator::getGroupId).collect(Collectors.toList());
             List<TaskGroup> taskGroups = taskGroupMapper.selectList(new QueryWrapper<TaskGroup>().in("id", collect));
             List<Integer> projectIds = taskGroups.stream().map(TaskGroup::getProjectId).collect(Collectors.toList());
+            List<Project> projectList = projectMapper.selectList(new QueryWrapper<Project>().in("id", projectIds));
             List<Participation> participationList = participationMapper.selectList(new QueryWrapper<Participation>().in("project_id", projectIds));
             List<Participation> addPartiToProject = new ArrayList<>();
             for (Integer proId : projectIds) {
@@ -4976,6 +4978,17 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                         addPartiToProject.add(p);
                     }
                 }
+                Optional<Project> first = projectList.stream().filter(pl -> pl.getId().equals(proId)).findFirst();
+                if(first.isPresent()){
+                    OperationRecord operationRecord=new OperationRecord();
+                    operationRecord.setModuleName("项目管理")
+                            .setContent("批量添加分组参与人")
+                            .setCompanyId(first.get().getCompanyId())
+                            .setOperationTime(LocalDateTime.now())
+                            .setProjectName(first.get().getProjectName())
+                            .setOperatorName(user.getName());
+                    operationRecordService.save(operationRecord);
+                }
             }
             if (addPartiToProject.size() > 0) {
                 participationService.saveBatch(addPartiToProject);
@@ -5725,10 +5738,10 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
     @Override
     public HttpRespMsg batchSetParticipation(HttpServletRequest request,String  projectIdArray,String userIds) {
         HttpRespMsg msg=new HttpRespMsg();
-        Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
+        User user = userMapper.selectById(request.getHeader("token"));
         List<Integer> array = JSONArray.parseArray(projectIdArray, Integer.class);
         List<String> userIdList = JSONArray.parseArray(userIds, String.class);
-        List<Project> projectList = projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", companyId).in("id",array));
+        List<Project> projectList = projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", user.getCompanyId()).in("id",array));
         List<Participation> list=new ArrayList<>();
         for (Project project : projectList) {
             List<Participation> participationList = participationMapper.selectList(new QueryWrapper<Participation>().eq("project_id", project.getId()));
@@ -5742,6 +5755,14 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 participation.setUserId(s);
                 list.add(participation);
             }
+            OperationRecord operationRecord=new OperationRecord();
+            operationRecord.setModuleName("项目管理")
+                           .setOperatorName(user.getName())
+                           .setProjectName(project.getProjectName())
+                           .setCompanyId(user.getCompanyId())
+                           .setOperationTime(LocalDateTime.now())
+                           .setContent("批量添加项目参与人");
+            operationRecordService.save(operationRecord);
         }
         participationService.saveBatch(list);
         return msg;
@@ -6632,6 +6653,14 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 participation.setUserId(inchargerId);
                 participationMapper.insert(participation);
             }
+            OperationRecord operationRecord=new OperationRecord();
+            operationRecord.setOperatorName(user.getName());
+            operationRecord.setProjectName(project.getProjectName());
+            operationRecord.setCompanyId(project.getCompanyId());
+            operationRecord.setOperationTime(LocalDateTime.now());
+            operationRecord.setContent("批量操作:[设置项目负责人为:"+inchargerId+"]");
+            operationRecord.setModuleName("项目管理");
+            operationRecordService.save(operationRecord);
         }
         return httpRespMsg;
     }
@@ -6709,7 +6738,6 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         String token = String.valueOf(header.get("token"));
         String changeType = String.valueOf(header.get("changeType"));
         List<Project> projectList = JSON.parseArray(String.valueOf(jsonObject.get("projectArrays")), Project.class);
-        List<ProjectSeparate> projectSeparateList = JSON.parseArray(String.valueOf(jsonObject.get("projectSeparateArrays")), ProjectSeparate.class);
         HttpRespMsg msg=new HttpRespMsg();
         List<ThirdPartyInterface> thirdPartyInterfaceList = thirdPartyInterfaceService.list(new QueryWrapper<ThirdPartyInterface>().eq("token", token));
         if(thirdPartyInterfaceList.size()==0){
@@ -6744,11 +6772,15 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 }
                 for (Project project : inertProjectList) {
                     List<TaskGroup> taskGroupList = project.getTaskGroupList();
-                    if(taskGroupList==null){
-                        continue;
+                    if(taskGroupList!=null){
+                        taskGroupList.forEach(tl->tl.setProjectId(project.getId()));
+                        taskGroupService.saveBatch(taskGroupList);
+                    }
+                    ProjectSeparate projectSeparate = project.getProjectSeparate();
+                    if(projectSeparate!=null){
+                        projectSeparate.setId(project.getId());
+                        projectSeparateService.save(projectSeparate);
                     }
-                    taskGroupList.forEach(tl->tl.setProjectId(project.getId()));
-                    taskGroupService.saveBatch(taskGroupList);
                 }
             }
         }else if(changeType.equals("update_project")){
@@ -6768,21 +6800,27 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 List<Integer> idList = changeProjectList.stream().map(Project::getId).collect(Collectors.toList());
                 idList.add(-1);
                 List<TaskGroup> groupList = taskGroupMapper.selectList(new QueryWrapper<TaskGroup>().in("project_id", idList));
+                List<ProjectSeparate> projectSeparateList = projectSeparateMapper.selectList(new QueryWrapper<ProjectSeparate>().in("project_id", idList));
                 for (Project project : changeProjectList) {
                     List<TaskGroup> taskGroupList = project.getTaskGroupList();
-                    if(taskGroupList==null){
-                        continue;
-                    }
-                    for (TaskGroup taskGroup : taskGroupList) {
-                        taskGroup.setProjectId(project.getId());
-                        if(groupList!=null){
-                            Optional<TaskGroup> first = groupList.stream().filter(gl -> gl.getTaskGroupCode() != null && gl.getTaskGroupCode().equals(taskGroup.getTaskGroupCode())).findFirst();
-                            if(first.isPresent()){
-                                taskGroup.setId(first.get().getId());
+                    if(taskGroupList!=null){
+                        for (TaskGroup taskGroup : taskGroupList) {
+                            taskGroup.setProjectId(project.getId());
+                            if(groupList!=null){
+                                Optional<TaskGroup> first = groupList.stream().filter(gl -> gl.getTaskGroupCode() != null && gl.getTaskGroupCode().equals(taskGroup.getTaskGroupCode())).findFirst();
+                                if(first.isPresent()){
+                                    taskGroup.setId(first.get().getId());
+                                }
                             }
                         }
+                        taskGroupService.saveOrUpdateBatch(taskGroupList);
+                    }
+                    ProjectSeparate projectSeparate = project.getProjectSeparate();
+                    Optional<ProjectSeparate> first = projectSeparateList.stream().filter(pl -> pl.getId().equals(project.getId())).findFirst();
+                    if(first.isPresent()) {
+                        projectSeparate.setId(first.get().getId());
                     }
-                    taskGroupService.saveOrUpdateBatch(taskGroupList);
+                    projectSeparateService.saveOrUpdate(projectSeparate);
                 }
             }
         }else if(changeType.equals("delete_project")){
@@ -6792,13 +6830,14 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     project.setId(first.get().getId());
                     deleteProjectList.add(project);
                 }else continue;
-                List<Integer> idList = deleteProjectList.stream().map(Project::getId).collect(Collectors.toList());
-                if(deleteProjectList.size()>0&&removeByIds(idList)){
-                    //message+="成功删除"+idList.size()+"条项目数据";
-                    message+=MessageUtils.message("project.deleteDate",idList.size());
-                }
-                taskGroupMapper.delete(new QueryWrapper<TaskGroup>().in("project_id",idList));
             }
+            List<Integer> idList = deleteProjectList.stream().map(Project::getId).collect(Collectors.toList());
+            if(deleteProjectList.size()>0&&removeByIds(idList)){
+                //message+="成功删除"+idList.size()+"条项目数据";
+                message+=MessageUtils.message("project.deleteDate",idList.size());
+            }
+            taskGroupMapper.delete(new QueryWrapper<TaskGroup>().in("project_id",idList));
+            projectSeparateMapper.delete(new QueryWrapper<ProjectSeparate>().in("id",idList));
         }
         msg.data=message;
         return msg;

+ 46 - 9
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -1562,7 +1562,42 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
             }
             if (timeType.getReportAuditType() == 3) {
                 //审核通过的话,给抄送人发送审核通过提醒
-
+                for (Report report : reportList) {
+                    if(report.getState()==1){
+                        ReportAuditorSetting reportAuditorSetting = reportAuditorSettingMapper.selectById(report.getId());
+                        if(reportAuditorSetting.getCcUserid() != null){
+                            Optional<User> first = userList.stream().filter(ul -> ul.getId().equals(reportAuditorSetting.getCcUserid())).findFirst();
+                            //取到抄送人
+                            User u = first.get();
+                            if(u.getCorpwxUserid()!=null){
+                                if(wxCorpInfoList.size()>0){
+                                    JSONObject json=new JSONObject();
+                                    JSONArray dataJson=new JSONArray();
+                                    JSONObject item=new JSONObject();
+                                    item.put("key","审核结果");
+                                    item.put("value","通过");
+                                    dataJson.add(item);
+                                    JSONObject item1=new JSONObject();
+                                    item1.put("key","项目名称");
+                                    item1.put("value",projectList.stream().filter(pro->pro.getId().equals(report.getProjectId())).findFirst().get().getProjectName());
+                                    dataJson.add(item1);
+                                    JSONObject item2=new JSONObject();
+                                    item2.put("key","填报人员");
+                                    item2.put("value",userList.stream().filter(curU->curU.getId().equals(report.getCreatorId())).findFirst().get().getName());
+                                    dataJson.add(item2);
+                                    JSONObject item3=new JSONObject();
+                                    item3.put("key","工作日期");
+                                    item3.put("value",report.getCreateDate());
+                                    dataJson.add(item3);
+                                    json.put("template_id","tty9TkCAAAwOgmzwS2uFogWgOmPDdIRQ");
+                                    json.put("url","https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww4e237fd6abb635af&redirect_uri=http://mobworktime.ttkuaiban.com/api/corpWXAuth&response_type=code&scope=snsapi_base&state=0#wechat_redirect");
+                                    json.put("content_item",dataJson);
+                                    wxCorpInfoService.sendWXCorpTemplateMsg(wxCorpInfoList.get(0),u.getCorpwxUserid(),json);
+                                }
+                            }
+                        }
+                    }
+                }
             }
             //对导入审核,添加记录
             int channel = oldState == -1?0:1; //0-导入审核, 项目报告审核
@@ -4005,6 +4040,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         List<Department> departmentList = departmentMapper.selectList(new QueryWrapper<Department>().eq("company_id", companyId));
         //获取企业微信同步数据
         List<Map> userCorpwxTimeMapList = userCorpwxTimeMapper.selectByAsk(companyId,startDate,endDate);
+
         //请假人员名单
 
         DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
@@ -4029,7 +4065,9 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         long cnt = localStart.until(localEnd, ChronoUnit.DAYS);
         List<String> cpwxIds = new ArrayList<>();
         //获取请假数据
-        List<LeaveSheet> leaveSheetList = leaveSheetMapper.selectList(new QueryWrapper<LeaveSheet>().eq("company_id", user.getCompanyId()));
+        List<LeaveSheet> leaveSheetList = leaveSheetMapper.selectList(new QueryWrapper<LeaveSheet>().eq("company_id", user.getCompanyId())
+                .le("start_date", endDate)
+                .ge("end_date", startDate));
         //已驳回的数据
         List<Report> deniedReportList = reportMapper.selectList(new QueryWrapper<Report>().eq("company_id", companyId).eq("state", 2).between("create_date", startDate, endDate));
         List<Report> waitingSubmitReportList = reportMapper.selectList(new QueryWrapper<Report>().eq("company_id", companyId).eq("state", 3).between("create_date", startDate, endDate));
@@ -4087,15 +4125,14 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
                         }
                         noRecord.name = curUser.getName();
                         //请假的
-                        List<LeaveSheet> leaveSheets = leaveSheetList.stream().filter(ls -> ls.getOwnerId().equals(curUser.getId())
-                                &&(ls.getStartDate().isAfter(LocalDate.parse(startDate))||ls.getStartDate().isEqual(LocalDate.parse(startDate)))
-                                &&(ls.getEndDate().isBefore(LocalDate.parse(endDate))||ls.getEndDate().isEqual(LocalDate.parse(endDate)))).collect(Collectors.toList());
-                        noReportDataList.add(noRecord);
-                        for (LeaveSheet leaveSheet : leaveSheets) {
-                            if(!(date.isBefore(leaveSheet.getStartDate())||date.isAfter(leaveSheet.getEndDate()))){
-                                noReportDataList.remove(noRecord);
+                        for (LeaveSheet leaveSheet : leaveSheetList) {
+                            if (leaveSheet.getOwnerId().equals(curUser.getId()) &&
+                                    (leaveSheet.getStartDate().isEqual(date) || leaveSheet.getEndDate().isEqual(date)
+                                        || (leaveSheet.getStartDate().isBefore(date) && leaveSheet.getEndDate().isAfter(date)))) {
+                                noRecord.status = MessageUtils.message("leave.leave");
                             }
                         }
+                        noReportDataList.add(noRecord);
                     }
                 }
         }

+ 2 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/UserServiceImpl.java

@@ -1468,14 +1468,14 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
                 HSSFRow row = sheet.createRow(rowNum);
                 row.createCell(0).setCellValue(rowNum);
                 if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
-                    row.createCell(1).setCellValue("$userName="+item.getCorpwxUserid()==null?"":item.getCorpwxUserid()+"$");
+                    row.createCell(1).setCellValue("$userName="+(item.getCorpwxUserid()==null?" ":item.getCorpwxUserid())+"$");
                 }else {
                     row.createCell(1).setCellValue(item.getName());
                 }
                 row.createCell(2).setCellValue(item.getRoleName());
                 row.createCell(3).setCellValue(item.getPhone());
                 if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
-                    row.createCell(4).setCellValue("$departmentName="+item.getCorpwxDeptid()==null?"":item.getCorpwxDeptid()+"$");
+                    row.createCell(4).setCellValue("$departmentName="+(item.getCorpwxDeptid()==null?" ":item.getCorpwxDeptid())+"$");
                 }else {
                     row.createCell(4).setCellValue(item.getDepartmentName());
                 }

Файловите разлики са ограничени, защото са твърде много
+ 2 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ProjectMapper.xml


+ 394 - 0
fhKeeper/formulahousekeeper/timesheet/src/components/cascader.vue

@@ -0,0 +1,394 @@
+<template>
+  <div tabindex="0" @blur="selectClihide()" style="display: inline-block;position: relative;">  
+    <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'">
+            <div :style="'line-height: '+selectHeight+'px'" :class="selectName == $t('defaultText.pleaseChoose') ? 'selecttex selecttexXuan' : 'selecttex'">
+                <ww-open-data type='departmentName' :openid='selectName'></ww-open-data>
+                <!-- {{selectName}} -->
+            </div>
+            <i :class=" move ? 'el-icon-arrow-down iostu iostuHover' : 'el-icon-arrow-down iostu'" v-if="!moveIon"></i>
+            <i v-if="moveIon" class="el-icon-circle-close iostu" @click.stop="clearDelete"></i>
+        </div>
+    </div>
+    <transition name="el-zoom-in-top">
+      <div v-show="show" style="position: relative;z-index: 99;">
+        <div class="transitionBox">
+            <ul class="transitionBoxUl">
+                <li :class="transitionBoxLiIdx == index ? 'liHover' : ''" v-for="(item, index) in options" :key="index" @mouseover="liMouseOver(index, item)" @click.stop="liClist(item)"> 
+                    <span :class="item.children ? 'idxspan' : ''" v-if="!radios">
+                        <!-- {{item.label}} -->
+                        <ww-open-data type='departmentName' :openid='item.label'></ww-open-data>
+                    </span>
+                    <span v-if="radios" style="margin-left: -15px">
+                        <el-radio v-model="optionsOId" :label="item.value">
+                            <span class="idxspan" style="margin-left: -10px"> 
+                                <!-- {{item.label}}  -->
+                                <ww-open-data type='departmentName' :openid='item.label'></ww-open-data>
+                            </span>
+                        </el-radio>
+                    </span>
+                    <i class="el-icon-arrow-right" v-if="item.children"></i>
+                </li>
+            </ul>
+        </div>
+
+        <div v-for="(item, index) in options" :key="index">
+            <div v-if="item.children" style="position: absolute;left: 200px;top: 6px">
+                <cascaderOption :subject="item.children" :radios="radios" v-show="transitionBoxLiIdx == index" @cascaderOptionClick="cascaderOptionClick"></cascaderOption>
+            </div>
+        </div>
+
+      </div>
+    </transition>
+  </div>
+</template>
+
+<script>
+// 引入里面的
+import cascaderOption from "@/components/cascaderOption.vue"
+export default {
+    components: {
+        cascaderOption
+    },
+    props: {
+        subject:{
+            type: Array
+        },
+        size: {
+            type: String,
+        },
+        subjectId: {
+            type: [String, Number]
+        },
+        // 是否为单选
+        radios: {
+            type: Boolean,
+            default: false
+        },
+        // 当前页面用到的第几个
+        distinction: {
+            type: String,
+            default: '1',
+        },
+        // 真对填写日报单独处理
+        idx: {
+            type: String
+        },
+        flg: {
+            type: Boolean,
+            default: false, // 默认值,不是填写日报
+        },
+        // 剩下统一索引
+        index: {
+            type: String
+        },
+        // 是否禁用
+        disabled: {
+            type: Boolean,
+            default: false
+        },
+        // 是否可清空
+        clearable: {
+            type: Boolean,
+            default: false
+        },
+        // 是否可搜索
+        filterable: {
+            type: Boolean,
+            default: false
+        },
+        // 其他数据
+        other: {
+            type: [String, Number, Boolean],
+            default: false
+        },
+        // 宽度
+        widthStr: {
+            type: String,
+            default: false
+        }
+    },
+    data() {
+        return {
+            selectWidth: '150',
+            selectHeight: '28',
+            show: false, // 下拉框
+            options: [], // 列表数据
+            transitionBoxLiIdx: '-1', // hover 背景色
+            selectName: this.$t('defaultText.pleaseChoose'), // 显示的文字
+            classDiv: false, // 获得焦点样式
+            optionsOId: '', // 选中人的id
+            dailyListObj: null, // 填写日报的数据
+            dailyListIndex: null, // 日报点的索引
+            move: false,
+            moveIon: false,
+            hoverValIdx: '-1', // 鼠标移入的值 
+            hoverList: [],
+            radioVal: ''
+        };
+    },
+    computed: {},
+    watch: {
+        subject: {
+            handler(newValue, oldValue) {
+                console.log(newValue, '看看值')
+                this.options = newValue
+                if(newValue) {
+                    
+                }
+            },
+        },
+        // 日报点的索引, 真对填写的日报
+        idx: {
+            handler(newValue, oldValue) {
+                console.log(newValue, oldValue)
+                this.dailyListIndex = newValue
+            },
+        },
+        subjectId: {
+            handler(newValue, oldValue) {
+                console.log(newValue, oldValue)
+                this.optionsOId = newValue
+                if(this.optionsOId) {
+                    for(let i in this.options) {
+                        if(this.options[i].id == this.optionsOId || this.options[i].auditorId == this.optionsOId) {
+                            this.selectName = this.options[i].name || this.options[i].auditorName
+                        }
+                    }
+                }
+            },
+        },
+        widthStr: {
+            handler(newValue, oldValue) {
+                console.log('卧槽')
+                this.selectWidth = newValue
+            },
+        }
+    },
+    created() {},
+    mounted() {
+        if(this.size == 'mini') {
+            this.selectWidth = '150'
+            this.selectHeight = '28'
+        } else if(this.size == 'small') {
+            this.selectWidth = '191'
+            this.selectHeight = '32'
+        } 
+        if(this.widthStr) {
+            console.log('one')
+            this.selectWidth = this.widthStr
+        }
+        if(this.subject) {
+            this.options = JSON.parse(JSON.stringify(this.subject))
+        }
+        if(this.subjectId) {
+            this.optionsOId = JSON.parse(JSON.stringify(this.subjectId))
+            for(let i in this.options) {
+                if(this.options[i].id == this.optionsOId || this.options[i].auditorId == this.optionsOId) {
+                     this.selectName = this.options[i].name || this.options[i].auditorName
+                }
+            }
+        }
+        console.log(this.subjectId)
+        this.dailyListIndex = this.idx
+        // this.moveIon = JSON.parse(JSON.stringify(this.clearable))
+    },
+    methods: {
+        selectCli() {
+            console.log('我被你触发了')
+            if(!this.disabled) {
+                this.$refs.selectDiv.focus()
+                this.classDiv = !this.classDiv
+                this.show = !this.show
+                this.move = !this.move
+            }
+        },
+        selectClihide() {
+            if(this.classDiv) {
+                this.transitionBoxLiIdx = ''
+                this.show = !this.show
+                this.classDiv = false
+                this.move = false
+            }
+        },
+        liMouseOver(index, item) {
+            this.transitionBoxLiIdx = index
+            if(item.children) {
+                this.hoverList = []
+                this.hoverList = item.children
+                this.$forceUpdate()
+            } else {
+                this.hoverList = []
+            }
+        },
+        // 点击
+        liClist(item) {
+            if(!item.children) {
+                this.selectName = item.label
+                let obj = {
+                    id: item.value,
+                    distinction: this.distinction
+                }
+                this.$emit('vueCasader', obj)
+            }
+            if(this.radios) {
+                this.selectName = item.label
+                let obj = {
+                    id: item.value,
+                    distinction: this.distinction
+                }
+                this.$emit('vueCasader', obj)
+            }
+            this.transitionBoxLiIdx = ''
+            this.show = !this.show
+            this.classDiv = false
+            this.move = false
+        },
+        // 接受子组件传过来的值
+        cascaderOptionClick(item) {
+            this.liClist(item)
+        },
+        moveIonDiv() {
+            console.log(this.selectName)
+            if(this.clearable) {
+                if(this.selectName != this.$t('defaultText.pleaseChoose')) {
+                    this.moveIon = true
+                }
+            }
+        },
+        outIonDiv() {
+            if(this.clearable) {
+                this.moveIon = false
+            }
+        },
+        clearDelete() {
+            this.selectName = this.$t('defaultText.pleaseChoose')
+            let obj = {
+                label: this.$t('defaultText.pleaseChoose'),
+                value: ''
+            }
+            this.show = true
+            this.liClist(obj)
+        }
+    },
+    triggerOption(){
+
+    },
+    choose(item,value){
+      
+    },
+
+};
+</script>
+
+<style scoped lang="scss">
+    .selectDiv {
+        border-color: #409EFF !important;
+    }
+    .disabledTrue {
+        background: #F5F7FA !important;
+        border-radius: 4px;
+        cursor: not-allowed !important;
+        position: relative;
+    }
+    .disabledFalse .select {
+        background: #FFF;
+        border-radius: 4px;
+    }
+    .select {
+        -webkit-appearance: none;
+        // background-color: #FFF;
+        background-image: none;
+        border-radius: 4px;
+        border: 1px solid #DCDFE6;
+        -webkit-box-sizing: border-box;
+        box-sizing: border-box;
+        color: #606266;
+        display: inline-block;
+        font-size: inherit;
+        height: 40px;
+        line-height: 40px;
+        outline: 0;
+        padding: 0 15px;
+        -webkit-transition: border-color .2s cubic-bezier(.645,.045,.355,1);
+        transition: border-color .2s cubic-bezier(.645,.045,.355,1);
+        width: 100%;
+        position: relative;
+        cursor: pointer;
+    }
+    .selecttex {
+        height: 28px;
+        line-height: 28px;
+        text-overflow: ellipsis;
+        font-size: 12px;
+    }
+    .iostu {
+        position: absolute;
+        top: 50%;
+        margin-top: -4px;
+        right: 8px;
+        color: #C0C4CC;
+        transition: All 0.2s ease-in-out;
+    }
+    .iostuHover {
+        transform: rotate(-180deg);
+    }
+    .transitionBox {
+        background: #FFF;
+        position: absolute; 
+        min-width: 200px;
+        border-radius: 2em;
+        border: 1px solid #E4E7ED;
+        border-radius: 4px;
+        background-color: #FFF;
+        box-sizing: border-box;
+        margin: 5px 0;
+        // box-shadow: 0 2px 12px #dfdfdf;
+        max-height: 274px;
+        overflow: auto;
+        z-index: 500 !important;
+    }
+    .transitionBoxUl {
+        list-style: none;
+        padding: 6px 0;
+        margin: 0;
+        -webkit-box-sizing: border-box;
+        box-sizing: border-box;
+    }
+    .transitionBoxUl li {
+        font-size: 14px;
+        padding: 0 20px;
+        // position: relative;
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        color: #606266;
+        height: 34px;
+        line-height: 34px;
+        -webkit-box-sizing: border-box;
+        box-sizing: border-box;
+        cursor: pointer;
+        display: flex;
+        align-items: center;
+    }
+    .liHover {
+        background-color: #F5F7FA;
+        // color: #409eff !important;
+    }
+    .liHover .idxspan {
+        color: #409eff !important;
+        font-weight: 700;
+    }
+    .transitionBoxUl span {
+        flex: 1;
+        width: 110px;
+        width: 20px;
+        padding: 0 10px;
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+    }
+    .selecttexXuan {
+        color: #C0C4CC;;
+    }
+</style>

+ 175 - 0
fhKeeper/formulahousekeeper/timesheet/src/components/cascaderOption.vue

@@ -0,0 +1,175 @@
+<template>
+  <div class="childComponents">
+    <div class="child">
+        <ul class="transitionBoxUl">
+            <li :class="transitionBoxLiIdx == index ? 'liHover' : ''" v-for="(item, index) in options" :key="index" @mouseover="liMouseOver(index, item)" @click="liClick(item)"> 
+                <span :class="item.children ? 'idxspan' : ''" v-if="!radios">{{item.label}}</span>
+                <span v-if="radios" style="margin-left: -15px">
+                    <el-radio v-model="departmentId" :label="item.value">
+                        <span class="idxspan" style="margin-left: -10px"> 
+                            <!-- {{item.label}}  -->
+                            <ww-open-data type='departmentName' :openid='item.label'></ww-open-data>
+                        </span>
+                    </el-radio>
+                </span>
+                <i class="el-icon-arrow-right" v-if="item.children"></i>
+            </li>
+        </ul>
+    </div>
+
+    <div v-for="(item, index) in options" :key="index">
+        <div v-if="item.children">
+            <cascaderOption :subject="item.children" :radios="radiosFlg" :subjectId="departmentId" v-show="transitionBoxLiIdx == index" @cascaderOptionClick="cascaderOptionClick"></cascaderOption>
+        </div>
+    </div>
+  </div>
+</template>
+
+<script>
+// 引入里面的
+import cascaderOption from "@/components/cascaderOption.vue"
+export default {
+  name: 'cascaderOption',
+  components: {
+    cascaderOption
+  },
+  props: {
+    subject:{
+        type: Array
+    },
+    subjectId: {
+        type: [String, Number]
+    },
+    // 是否为单选
+    radios: {
+        type: Boolean,
+        default: false
+    },
+  },
+  watch: {
+    subject: {
+        handler(newValue, oldValue) {
+            console.log(newValue, '子组件')
+            this.options = newValue
+            if(newValue) {
+                this.options = newValue
+            }
+        },
+        deep: true,
+    },
+
+  },
+  data() {
+    return {
+        options: [],
+        transitionBoxLiIdx: '0',
+        hoverList: [],
+        radiosFlg: false, // 是否为单选
+        departmentId: '',
+        radioVal: ''
+    };
+  },
+  computed: {},
+  watch: {
+    radios: {
+        handler(newValue, oldValue) {
+            this.radiosFlg = newValue
+        },
+    }
+  },
+  created() {},
+  mounted() {
+    if(this.subject) {
+        this.options = JSON.parse(JSON.stringify(this.subject))
+    }
+    this.radiosFlg = JSON.parse(JSON.stringify(this.radios))
+    if(this.subjectId) {
+        this.departmentId = JSON.parse(JSON.stringify(this.subjectId))
+    }
+  },
+  methods: {
+    liMouseOver(index, item) {
+        this.transitionBoxLiIdx = index
+        if(item.children) {
+            this.hoverList = item.children
+        } else {
+            this.hoverList = []
+        }
+    },
+    liClick(item) {
+        if(!item.children) {
+            this.$emit("cascaderOptionClick", item);
+        }
+        if(this.radios) {
+            this.$emit("cascaderOptionClick", item);
+        }
+    },
+    cascaderOptionClick(item) {
+        this.liClick(item)
+    }
+  },
+};
+</script>
+
+<style scoped lang="scss">
+    .childComponents {
+        width: 200px;
+        position: absolute;
+        top: -6px;
+        right: -200px;
+        height: 274px;
+        background: #fff;
+        border: 1px solid #E4E7ED;
+        border-radius: 4px;
+        border-top-left-radius: 0px;
+        border-bottom-left-radius: 0px;
+        box-sizing: border-box;
+        margin: 5px 0;
+        // box-shadow: 0 2px 12px #dfdfdf;
+    }
+    .child {
+        width: 100%;
+        max-height: 270px;
+        overflow: auto;
+    }
+    .transitionBoxUl {
+        list-style: none;
+        padding: 6px 0;
+        margin: 0;
+        -webkit-box-sizing: border-box;
+        box-sizing: border-box;
+    }
+    .transitionBoxUl li {
+        font-size: 14px;
+        padding: 0 20px;
+        // position: relative;
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        color: #606266;
+        height: 34px;
+        line-height: 34px;
+        -webkit-box-sizing: border-box;
+        box-sizing: border-box;
+        cursor: pointer;
+        display: flex;
+        align-items: center;
+    }
+    .liHover {
+        background-color: #F5F7FA;
+        // color: #409eff !important;
+    }
+    .liHover .idxspan {
+        color: #409eff !important;
+        font-weight: 700;
+    }
+    .transitionBoxUl span {
+        flex: 1;
+        width: 110px;
+        width: 20px;
+        padding: 0 10px;
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+    }
+</style>

+ 2 - 2
fhKeeper/formulahousekeeper/timesheet/src/components/select.vue

@@ -241,8 +241,8 @@ export default {
         cursor: not-allowed !important;
         position: relative;
     }
-    .disabledTrue {
-        background: #FFF;
+    .disabledFalse .select {
+        background: #FFF !important;
         border-radius: 4px;
     }
     .select {

+ 1 - 0
fhKeeper/formulahousekeeper/timesheet/src/i18n/en.json

@@ -42,6 +42,7 @@
     "approvedProject": "Approved project daily review",
     "allState": "All state",
     "DidNotFillIn": "Did not fill in",
+    "missFillReport":"Missing",
     "alreadyPassed": "already passed",
     "WaitingAudit": "Waiting audit",
     "notThrough": "Not through",

+ 1 - 0
fhKeeper/formulahousekeeper/timesheet/src/i18n/zh.json

@@ -42,6 +42,7 @@
     "approvedProject": "项目日报审核通过",
     "allState": "全部状态",
     "DidNotFillIn": "未填报",
+    "missFillReport":"漏填",
     "alreadyPassed": "已通过",
     "WaitingAudit": "待审核",
     "notThrough": "不通过",

+ 7 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/expense/expense.vue

@@ -1004,8 +1004,14 @@ export default {
                 return;
               }
               this.add();
-                  this.addForm = {code:null,ownerId:null,createDate: null,type:this.z, ticketNum:1,remark:null,totalAmount:0,}
+                  this.addForm = {
+                    code:null,
+                    ownerId:this.user.id,
+                    createDate: null,
+                    type:this.z, 
+                    ticketNum:1,remark:null,totalAmount:0,}
                   this.invoiceList = []
+                  this.getNextCode()
               
             }
       });

+ 4 - 4
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -116,10 +116,10 @@
                                     <!-- 待提交 -->
                                     {{$t('state.waitingsubmit')}}
                                     <el-link :underline="false" @click="showMembList(2)"><span style="margin-left:5px;margin-right:5px;color:green;">{{fillList.filter(item => item.state == 3).length}}</span></el-link>{{$t('other.people')}},
-                                    <!-- 未填写 -->
-                                    {{$t('state.DidNotFillIn')}}
-                                    <el-link :underline="false" @click="showMembList(0)"><span style="margin-left:5px;margin-right:5px;color:red;">{{unFillList.length | numbers}}</span></el-link>{{$t('other.people')}}
-                                    <span v-if="leaveAllNum">{{'(全天请假' + leaveAllNum + '人)'}}</span>
+                                    <!-- 漏填 -->
+                                    {{$t('state.missFillReport')}}
+                                    <el-link :underline="false" @click="showMembList(0)"><span style="margin-left:5px;margin-right:5px;color:red;">{{(unFillList.length - leaveAllNum) | numbers}}</span>{{$t('other.people')}}
+                                    <span v-if="leaveAllNum">{{', 全天请假' + leaveAllNum + '人'}}</span></el-link>
                                     </span>
                                     </span>
                                 </span>

+ 27 - 11
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/list.vue

@@ -4,14 +4,11 @@
         <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
             <el-form :inline="true">
                 <el-form-item :label="$t('lable.department')" style="width: 165px">
-                    <el-cascader v-model="search.departmentIdArray" :placeholder="$t('defaultText.pleaseChoose')" style="width: 125px"
+                    <el-cascader v-if="user.userNameNeedTranslate != 1" v-model="search.departmentIdArray" :placeholder="$t('defaultText.pleaseChoose')" style="width: 125px"
                     :options="option" :props="{ checkStrictly: false,expandTrigger: 'hover' }" :show-all-levels="false" clearable
-                    @change="getList(1)" size="mini">
-                        <template slot-scope="{ data }">
-                            <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='departmentName' :openid='data.label'></ww-open-data></span>
-                            <span v-if="user.userNameNeedTranslate != '1'">{{data.label}}</span>
-                        </template>
-                    </el-cascader>
+                    @change="getList(1)" size="mini"></el-cascader>
+
+                    <vueCascader :size="'mini'" :widthStr="'125'" :clearable="true" :subject="option" :radios="false" :distinction="'1'" @vueCasader="vueCasader" v-if="user.userNameNeedTranslate == 1"></vueCascader>
                 </el-form-item>
 
                 <el-form-item :label="$t('ren-yuan')" style="width: 210px">
@@ -59,9 +56,7 @@
                     </el-form-item>
 
                     <!-- 调试 -->
-                    <!-- <el-form-item :label="$t('ren-yuan')" style="width: 215px">
-                        <selectCat :size="'mini'" :subject="searchUsersList"/>
-                    </el-form-item> -->
+                    <!-- <cascaderOption></cascaderOption> -->
                 <!-- </div> -->
             </el-form>
         </el-col>
@@ -385,9 +380,15 @@
     // 引入自定义组件
     import selectCat from "@/components/select.vue"
 
+    // 引入自定义级联组件
+    import vueCascader from "@/components/cascader.vue"
+    import cascaderOption from "@/components/cascaderOption.vue"
+
     export default {
         components: {
-            selectCat
+            selectCat,
+            vueCascader,
+            cascaderOption
         },
         data() {
             return {
@@ -548,6 +549,7 @@
                         var list1 = JSON.parse(JSON.stringify(res.data));
                         
                         this.option = this.changeArr(list1);
+                        console.log(this.option, '部门')
                     } else {
                         this.$message({
                             message: res.msg,
@@ -897,6 +899,20 @@
                     this.search.endDate = null
                 }
                 this.getList()
+            },
+            // 自定义部门选择
+            vueCasader(obj) {
+                console.log(obj, '组件传过来的')
+                if(obj.distinction == '1') {
+                    if(obj.id != '') {
+                        let arr = []
+                        arr.push(obj.id)
+                        this.search.departmentIdArray = arr
+                    } else {
+                        this.search.departmentIdArray = []
+                    }
+                    this.getList(1)
+                }
             }
         },
         created() {