Parcourir la source

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

cs il y a 2 ans
Parent
commit
c5777629e3
28 fichiers modifiés avec 1205 ajouts et 157 suppressions
  1. 6 5
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/FinanceController.java
  2. 5 2
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ProjectController.java
  3. 4 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ProjectRequirementController.java
  4. 4 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/UserCorpwxTimeController.java
  5. 3 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/Project.java
  6. 5 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/ProjectService.java
  7. 9 3
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/DepartmentServiceImpl.java
  8. 6 2
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/FinanceServiceImpl.java
  9. 4 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/LeaveSheetServiceImpl.java
  10. 104 36
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java
  11. 6 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProviderInfoServiceImpl.java
  12. 7 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportExtraDegreeServiceImpl.java
  13. 5 2
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java
  14. 8 8
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/SimpleReportServiceImpl.java
  15. 62 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/ExcelUtil.java
  16. 4 1
      fhKeeper/formulahousekeeper/timesheet/src/components/cascaderOption.vue
  17. 223 44
      fhKeeper/formulahousekeeper/timesheet/src/components/select.vue
  18. 63 0
      fhKeeper/formulahousekeeper/timesheet/src/http.js
  19. 61 36
      fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue
  20. 32 7
      fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue
  21. 15 1
      fhKeeper/formulahousekeeper/timesheet/src/views/task/list.vue
  22. 4 1
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue
  23. 15 1
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/list.vue
  24. 15 0
      fhKeeper/formulahousekeeper/timesheet_h5/src/router/index.js
  25. 9 0
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/index/index.vue
  26. 2 1
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/project/index.vue
  27. 344 0
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/project/projectInside.vue
  28. 180 0
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/task/index.vue

+ 6 - 5
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/FinanceController.java

@@ -2,13 +2,11 @@ package com.management.platform.controller;
 
 
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.management.platform.entity.Company;
-import com.management.platform.entity.FinanceFixedcolname;
-import com.management.platform.entity.FinanceTblcuscol;
-import com.management.platform.entity.TimeType;
+import com.management.platform.entity.*;
 import com.management.platform.mapper.CompanyMapper;
 import com.management.platform.mapper.FinanceTblcuscolMapper;
 import com.management.platform.mapper.TimeTypeMapper;
+import com.management.platform.mapper.WxCorpInfoMapper;
 import com.management.platform.service.FinanceFixedcolnameService;
 import com.management.platform.service.FinanceService;
 import com.management.platform.util.ExcelUtil;
@@ -51,6 +49,8 @@ public class FinanceController {
     private FinanceFixedcolnameService financeFixedcolnameService;
     @Resource
     private TimeTypeMapper timeTypeMapper;
+    @Resource
+    private WxCorpInfoMapper wxCorpInfoMapper;
 
     @Value(value = "${upload.path}")
     private String path;
@@ -130,6 +130,7 @@ public class FinanceController {
 
         List<String> heads = new ArrayList<>();
         Company company = companyMapper.selectById(companyId);
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
         //判断是否启用了工号模式
         TimeType timeType = timeTypeMapper.selectById(companyId);
         if (timeType.getFinanceJobnumEnabled() == 1) {
@@ -154,7 +155,7 @@ public class FinanceController {
         allList.add(heads);
         //String fileName = company.getCompanyName()+"_财务人员成本模板";
         String fileName = MessageUtils.message("fileName.financialCost",company.getCompanyName());
-        msg.data = ExcelUtil.exportGeneralExcelByTitleAndList(fileName, allList, path);
+        msg.data = ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName, allList, path);
 
         return msg;
     }

+ 5 - 2
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ProjectController.java

@@ -556,8 +556,11 @@ public class ProjectController {
     }
 
     @RequestMapping("/exportData")
-    public HttpRespMsg exportData() {
-        return projectService.exportData(request);
+    public HttpRespMsg exportData(String keyword,
+                                  @RequestParam(required = false, defaultValue = "1") Integer searchField,
+                                  Integer projectId, //可以直接传projectId来进行匹配
+                                  Integer status, Integer category,Integer projectMainId,Integer deptId,String inchagerId,String participation) {
+        return projectService.exportData(keyword,searchField,projectId,status,category,projectMainId,deptId,inchagerId,participation,request);
     }
 
     @RequestMapping("/exportGroupData")

+ 4 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ProjectRequirementController.java

@@ -59,6 +59,8 @@ public class ProjectRequirementController {
     private TaskMapper taskMapper;
     @Resource
     private GroupParticipatorMapper groupParticipatorMapper;
+    @Resource
+    private WxCorpInfoMapper wxCorpInfoMapper;
     @RequestMapping("/addOrMod")
     public HttpRespMsg addOrMod(ProjectRequirement record) {
         HttpRespMsg msg = new HttpRespMsg();
@@ -116,6 +118,7 @@ public class ProjectRequirementController {
         SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
         HttpRespMsg httpRespMsg=new HttpRespMsg();
         Integer companyId = userMapper.selectById(request.getHeader("TOKEN")).getCompanyId();
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
         LocalDate now = LocalDate.now();
         now = now.minusDays(7);
         String startDate = DateTimeFormatter.ofPattern("yyyy-MM-dd").format(now);
@@ -177,7 +180,7 @@ public class ProjectRequirementController {
         //生成excel文件导出
         //String fileName = "资源需求统计报表_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.resourceDemand",System.currentTimeMillis());
-        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(fileName , dataList, path);
+        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
         httpRespMsg.data=resp;
         return httpRespMsg;
     }

+ 4 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/UserCorpwxTimeController.java

@@ -62,6 +62,8 @@ public class UserCorpwxTimeController {
     CompanyMapper companyMapper;
     @Resource
     SysFunctionMapper sysFunctionMapper;
+    @Resource
+    WxCorpInfoMapper wxCorpInfoMapper;
 
     @RequestMapping("/getMyDeptMembsData")
     public HttpRespMsg getMyDeptMembsData(String startDate, String endDate) {
@@ -228,6 +230,7 @@ public class UserCorpwxTimeController {
         String token = request.getHeader("TOKEN");
         User user = userMapper.selectById(token);
         Integer companyId = user.getCompanyId();
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
         Integer manageDeptId = user.getManageDeptId();
 
         HttpRespMsg ret = getMyDeptMembsData(startDate, endDate);
@@ -291,7 +294,7 @@ public class UserCorpwxTimeController {
         }
         //fileName += "_人员工时统计模板"+startDate+"至"+endDate;
         fileName += MessageUtils.message("fileName.workHour",startDate,endDate);
-        msg.data = ExcelUtil.exportGeneralExcelByTitleAndList(fileName, allData, path);
+        msg.data = ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName, allData, path);
         return msg;
     }
 }

+ 3 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/entity/Project.java

@@ -353,6 +353,9 @@ public class Project extends Model<Project> {
 
     @TableField(exist = false)
     List<TaskGroup> taskGroupList;
+    
+    @TableField(exist = false)
+    private String levelString;
 
     @Override
     protected Serializable pkVal() {

+ 5 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/ProjectService.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
 import com.management.platform.entity.Project;
 import com.management.platform.entity.ProjectSeparate;
 import com.management.platform.util.HttpRespMsg;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
@@ -107,7 +108,10 @@ public interface ProjectService extends IService<Project> {
 
     HttpRespMsg getDegreeCost(String startDate, String endDate, Integer projectId, HttpServletRequest request);
 
-    HttpRespMsg exportData(HttpServletRequest request);
+    HttpRespMsg exportData(String keyword,
+                           @RequestParam(required = false, defaultValue = "1") Integer searchField,
+                           Integer projectId, //可以直接传projectId来进行匹配
+                           Integer status, Integer category,Integer projectMainId,Integer deptId,String inchagerId,String participation,HttpServletRequest request);
 
     HttpRespMsg exportGroupData(HttpServletRequest request);
 

+ 9 - 3
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/DepartmentServiceImpl.java

@@ -61,6 +61,8 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
     private AuditWorkflowSettingMapper auditWorkflowSettingMapper;
     @Resource
     private DepartmentOtherManagerMapper departmentOtherManagerMapper;
+    @Resource
+    private WxCorpInfoMapper wxCorpInfoMapper;
     //新增部门
     @Override
     public HttpRespMsg insertDepartment(String departmentName, Integer superiorId, String managerId, String reportAuditUserid,String otherManagerIds,  HttpServletRequest request) {
@@ -731,7 +733,8 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
             //生成excel文件导出
             //String fileName = "人员成本统计_"+System.currentTimeMillis();
             String fileName = MessageUtils.message("fileName.costStatistics",System.currentTimeMillis());
-            String resp = ExcelUtil.exportGeneralExcelByTitleAndList(fileName , dataList, path);
+            WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
+            String resp = ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
 
             httpRespMsg.data = resp;
         } catch (NullPointerException e) {
@@ -834,6 +837,7 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         try {
             Integer companyId = userMapper.selectById(request.getHeader("Token")).getCompanyId();
+            WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
             HttpRespMsg msg = getUserCustomDataStatistic(startDate, endDate, null, request);
             Map<String, Object> map = (Map<String, Object>) msg.data;
             List<HashMap> itemList = (List<HashMap>) map.get("list");
@@ -870,7 +874,7 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
             //生成excel文件导出
             //String fileName = timeType.getCustomDataName() + "统计_"+System.currentTimeMillis();
             String fileName = MessageUtils.message("fileName.statistics",timeType.getCustomDataName(),System.currentTimeMillis());
-            String resp = ExcelUtil.exportGeneralExcelByTitleAndList(fileName , allList, path);
+            String resp = ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , allList, path);
 
             httpRespMsg.data = resp;
         } catch (NullPointerException e) {
@@ -1010,6 +1014,8 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
     public HttpRespMsg exportDeptStatistic(String startDate, String endDate, HttpServletRequest request) {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         try {
+            Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
+            WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
             HttpRespMsg msg = getDepartmentStatistics(null, startDate, endDate, request);
             Map<String,Object> mapData = (Map<String, Object>) msg.data;
             List<DepartmentMasterVO> costList = (List<DepartmentMasterVO>) mapData.get("costList");
@@ -1053,7 +1059,7 @@ public class DepartmentServiceImpl extends ServiceImpl<DepartmentMapper, Departm
             //生成excel文件导出
             //String fileName = "部门工时统计_"+System.currentTimeMillis();
             String fileName = MessageUtils.message("fileName.depHours",System.currentTimeMillis());
-            String resp = ExcelUtil.exportGeneralExcelByTitleAndList(fileName , dataList, path);
+            String resp = ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
             httpRespMsg.data = resp;
         } catch (NullPointerException e) {
             e.printStackTrace();

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

@@ -75,6 +75,8 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
     private ProjectCategoryMapper projectCategoryMapper;
     @Resource
     FinanceProjectsService financeProjectsService;
+    @Resource
+    WxCorpInfoMapper wxCorpInfoMapper;
 
     @Resource
     private ProjectMapper projectMapper;
@@ -456,6 +458,7 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         try {
             Integer companyId = userMapper.selectById(request.getHeader("Token")).getCompanyId();
+            WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
             TimeType timeType = timeTypeMapper.selectById(companyId);
             boolean isSecret = timeType.getIsSecretSalary()==1?true:false;
             final List<FinanceTblcuscol> cusColList = financeTblcuscolMapper.selectList(new QueryWrapper<FinanceTblcuscol>().eq("company_id", companyId));
@@ -1076,7 +1079,7 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
             //生成excel文件导出
             //String fileName = yearMonth+(groupByCategory==0?"财务人员成本_":"财务项目分类成本_")+System.currentTimeMillis();
             String fileName = yearMonth+(groupByCategory==0?MessageUtils.message("fileName.costFinancialPersonnel"):MessageUtils.message("fileName.proClassCost"))+System.currentTimeMillis();
-            String resp = ExcelUtil.exportGeneralExcelByTitleAndList(fileName , allList, path);
+            String resp = ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , allList, path);
 
             httpRespMsg.data = resp;
         } catch (NullPointerException e) {
@@ -1348,6 +1351,7 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         try {
             Integer companyId = userMapper.selectById(request.getHeader("Token")).getCompanyId();
+            WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
             final List<FinanceTblcuscol> cusColList = financeTblcuscolMapper.selectList(new QueryWrapper<FinanceTblcuscol>().eq("company_id", companyId));
             Company company = companyMapper.selectById(companyId);
             BigDecimal totalMoneyCost = BigDecimal.valueOf(0);
@@ -1488,7 +1492,7 @@ public class FinanceServiceImpl extends ServiceImpl<FinanceMapper, Finance> impl
             //生成excel文件导出
             //String fileName = "人员薪资_"+company.getCompanyName()+yearMonth+"_"+System.currentTimeMillis();
             String fileName = MessageUtils.message("fileName.perSal")+company.getCompanyName()+yearMonth+"_"+System.currentTimeMillis();
-            String resp = ExcelUtil.exportGeneralExcelByTitleAndList(fileName , allList, path);
+            String resp = ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , allList, path);
             httpRespMsg.data = resp;
         } catch (NullPointerException e) {
             e.printStackTrace();

+ 4 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/LeaveSheetServiceImpl.java

@@ -63,6 +63,8 @@ public class LeaveSheetServiceImpl extends ServiceImpl<LeaveSheetMapper, LeaveSh
     SysFunctionMapper sysFunctionMapper;
     @Resource
     DepartmentService departmentService;
+    @Resource
+    WxCorpInfoMapper wxCorpInfoMapper;
 
     @Override
     public HttpRespMsg add(LeaveSheet sheet, String userId) {
@@ -241,6 +243,7 @@ public class LeaveSheetServiceImpl extends ServiceImpl<LeaveSheetMapper, LeaveSh
     public HttpRespMsg exportLeaveData(String userId,Integer status,Integer leaveType,String startTime,String endTime) {
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         Integer companyId = userMapper.selectById(userId).getCompanyId();
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
         QueryWrapper<LeaveSheet> qw = new QueryWrapper<LeaveSheet>()
                 .select("owner_name", "tel", "leave_type", "start_date","end_date","time_days", "time_hours", "status", "remark")
                 .eq("company_id", companyId)
@@ -340,7 +343,7 @@ public class LeaveSheetServiceImpl extends ServiceImpl<LeaveSheetMapper, LeaveSh
         }
         //String fileName = "请假信息_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.leaveInfo")+System.currentTimeMillis();
-        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(fileName , allList, path);
+        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , allList, path);
         httpRespMsg.data = resp;
         return httpRespMsg;
     }

+ 104 - 36
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -40,6 +40,7 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.StringUtils;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
@@ -185,6 +186,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
     TaskGroupService taskGroupService;
     @Resource
     GroupTemplateMapper GroupTemplateMapper;
+    @Resource
+    WxCorpInfoMapper wxCorpInfoMapper;
 
     @Resource
     private HttpServletResponse response;
@@ -1107,6 +1110,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         try {
             User targetUser = userMapper.selectById(request.getHeader("Token"));
             Integer companyId =targetUser.getCompanyId();
+            WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
             Map<String, Object> resultMap = new HashMap<>();
             //当前用户管理部门
             List<Integer> deptIds=null;
@@ -1325,7 +1329,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             //生成excel文件导出
             //String fileName = "项目成本工时统计_"+System.currentTimeMillis();
             String fileName = MessageUtils.message("fileName.projectCost")+System.currentTimeMillis();
-            String resp = ExcelUtil.exportGeneralExcelByTitleAndList(fileName , allList, path);
+            String resp = ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , allList, path);
             httpRespMsg.data = resp;
         } catch (NullPointerException e) {
             e.printStackTrace();
@@ -1667,6 +1671,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //通过公司id获取该公司所有的项目列表
         User user = userMapper.selectById(request.getHeader("Token"));
         Integer companyId = user.getCompanyId();
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
         //判断用户的角色,如果是管理员和负责人,查看全部的。如果是普通员工,只能是看到参与的项目
         QueryWrapper<Project> queryWrapper = new QueryWrapper<Project>().eq("company_id", companyId);
         DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd");
@@ -1701,7 +1706,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         }
         //String fileName = "项目报表_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.projectReport")+System.currentTimeMillis();
-        ExcelUtil.exportGeneralExcelByTitleAndList(fileName, exportList, path);
+        ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName, exportList, path);
         httpRespMsg.data =  pathPrefix + fileName+".xls";
         return httpRespMsg;
     }
@@ -1744,7 +1749,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
 
         User user = userMapper.selectById(request.getHeader("Token"));
         Integer companyId = user.getCompanyId();
-
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
         QueryWrapper<Project> queryWrapper = new QueryWrapper<Project>().eq("company_id", companyId);
         DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd");
         List<Project> projectAllList = projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", companyId));
@@ -1789,7 +1794,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         }
         //String fileName = "项目任务报表_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.projectTaskReport")+System.currentTimeMillis();
-        ExcelUtil.exportGeneralExcelByTitleAndList(fileName, exportList, path);
+        ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName, exportList, path);
         httpRespMsg.data =  pathPrefix + fileName+".xls";
         return httpRespMsg;
     }
@@ -1839,6 +1844,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //通过公司id获取该公司所有的项目列表
         User user = userMapper.selectById(request.getHeader("Token"));
         Integer companyId = user.getCompanyId();
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
         List<Project> projectAllList = projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", companyId));
         List<SysRichFunction> functionAllList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "全部项目任务报表");
         List<SysRichFunction> functionInchargeList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "负责项目任务报表");
@@ -1876,7 +1882,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         }
         //String fileName = "项目成本报表_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.projectCostReport")+System.currentTimeMillis();
-        ExcelUtil.exportGeneralExcelByTitleAndList(fileName, exportList, path);
+        ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName, exportList, path);
         httpRespMsg.data =  pathPrefix + fileName+".xls";
         return httpRespMsg;
     }
@@ -1945,6 +1951,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //通过公司id获取该公司所有的项目列表
         User user = userMapper.selectById(request.getHeader("Token"));
         Integer companyId = user.getCompanyId();
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
         List<Project> projectAllList = projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", companyId));
         List<SysRichFunction> functionAllList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "全部项目任务报表");
         List<SysRichFunction> functionInchargeList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "负责项目任务报表");
@@ -1992,7 +1999,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         }
         //String fileName = "项目收支平衡报表(利润表)_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.profitSta")+System.currentTimeMillis();
-        ExcelUtil.exportGeneralExcelByTitleAndList(fileName, exportList, path);
+        ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName, exportList, path);
         httpRespMsg.data =  pathPrefix + fileName+".xls";
         return httpRespMsg;
     }
@@ -2003,7 +2010,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //通过公司id获取该公司所有的项目列表
         User user = userMapper.selectById(request.getHeader("Token"));
         Integer companyId = user.getCompanyId();
-
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
         List<CustomerProject> projectList = projectMapper.getCustomerProjectInAndOut(companyId, null, null,null,null);
         List<List<String>> exportList = new ArrayList<>();
         //String[] titles = {"客户名称", "相关项目", "合同金额", "人工成本", "一般费用", "差旅费用","外包费用", "总费用", "利润", "利润率"};
@@ -2061,7 +2068,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         }
         //String fileName = "客户项目利润报表_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.cusPro")+System.currentTimeMillis();
-        ExcelUtil.exportGeneralExcelByTitleAndList(fileName, exportList, path);
+        ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName, exportList, path);
         httpRespMsg.data =  pathPrefix + fileName+".xls";
         return httpRespMsg;
     }
@@ -2521,6 +2528,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         }
         User user = userMapper.selectById(token);
         Integer companyId = user.getCompanyId();
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
         HttpRespMsg msg = new HttpRespMsg();
         List<Project> projectList = projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", companyId));
         List<SysRichFunction> functionAllList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "全部项目任务报表");
@@ -2587,7 +2595,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         //String fileName = "项目阶段工时报表_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.ProPeriodWork")+System.currentTimeMillis();
-        ExcelUtil.exportGeneralExcelByTitleAndList(fileName, dataList, path);
+        ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName, dataList, path);
         httpRespMsg.data =  pathPrefix + fileName+".xls";
         return httpRespMsg;
     }
@@ -3018,6 +3026,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     project.setCreatorId(userId);
                     project.setCreatorName(user.getName());
                     project.setProjectName(name);
+                    project.setCreateDate(LocalDate.now());
 
                     //处理人员
                     if (inchargerCell != null) {
@@ -3452,6 +3461,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     project.setCreatorId(userId);
                     project.setCreatorName(user.getName());
                     project.setProjectName(name);
+                    project.setCreateDate(LocalDate.now());
 
                     //处理人员
                     if (inchargerCell != null) {
@@ -4142,7 +4152,10 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
     }
 
     @Override
-    public HttpRespMsg exportData(HttpServletRequest request) {
+    public HttpRespMsg exportData(String keyword,
+                                  @RequestParam(required = false, defaultValue = "1") Integer searchField,
+                                  Integer projectId, //可以直接传projectId来进行匹配
+                                  Integer status, Integer category,Integer projectMainId,Integer deptId,String inchagerId,String participation,HttpServletRequest request) {
         String token = request.getHeader("TOKEN");
         User user = userMapper.selectById(token);
         List<Department> departmentList = departmentMapper.selectList(new QueryWrapper<Department>().eq("company_id", user.getCompanyId()));
@@ -4152,12 +4165,13 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             //无全部项目权限,只能导出自己相关的(创建或参与)
             userId = user.getId();
         }
-        HttpRespMsg projectPage = getProjectPage(null, null, null, null, null, null, null, null,null, null, null,null,null, request);
+        HttpRespMsg projectPage = getProjectPage(null, null, keyword, searchField, status, category, projectId, projectMainId,deptId, null, null,inchagerId,participation, request);
         List<ProjectKeyNodesSetting> projectKeyNodesSettingList = projectKeyNodesSettingMapper.selectList(new QueryWrapper<ProjectKeyNodesSetting>().eq("company_id", user.getCompanyId()));
         Map<String,Object> resultMap= (Map<String, Object>) projectPage.data;
         List<ProjectVO> projectVOList= (List<ProjectVO>) resultMap.get("records");
         List<String> nameList= (List<String>) resultMap.get("nameList");
         Company company = companyMapper.selectById(user.getCompanyId());
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", company.getId()));
         List<String> headList = new ArrayList<String>();
 //        headList.add("项目编号");
 //        headList.add("项目分类");
@@ -4335,8 +4349,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     rowData.add("");
                     rowData.add("");
                 }
-                Integer status = projectVO.getStatus();
-                switch (status){
+                Integer state = projectVO.getStatus();
+                switch (state){
                     //case 0:rowData.add("全部");
                     case 0:rowData.add(MessageUtils.message("excel.whole"));
                         break;
@@ -4373,7 +4387,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //生成excel文件导出
         //String fileName = "项目导出_"+company.getCompanyName()+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.proExport")+company.getCompanyName()+System.currentTimeMillis();
-        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(fileName , allList, path);
+        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName,allList,path);
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         httpRespMsg.data = resp;
 
@@ -4384,6 +4398,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
     public HttpRespMsg exportGroupData(HttpServletRequest request) {
         String token = request.getHeader("TOKEN");
         User user = userMapper.selectById(token);
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
         List<HashMap<String, Object>> list = projectMapper.getExportGroupData(user.getCompanyId());
         List<List<String>> allList = new ArrayList<>();
         List<String> headList = new ArrayList<String>();
@@ -4409,7 +4424,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         }
         //String fileName = "项目分组_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.proGroup")+System.currentTimeMillis();
-        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(fileName , allList, path);
+        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , allList, path);
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         httpRespMsg.data = resp;
         return httpRespMsg;
@@ -4452,6 +4467,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         try {
             Integer companyId = userMapper.selectById(request.getHeader("Token")).getCompanyId();
+            WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
             TimeType timeType = timeTypeMapper.selectById(companyId);
             List<String> headList = new ArrayList<String>();
 //            headList.add("序号");
@@ -4530,7 +4546,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             //生成excel文件导出
             //String fileName = timeType.getCustomDataName() + "统计_"+System.currentTimeMillis();
             String fileName = timeType.getCustomDataName() + MessageUtils.message("Statistics.tj")+"_"+System.currentTimeMillis();
-            String resp = ExcelUtil.exportGeneralExcelByTitleAndList(fileName , allList, path);
+            String resp = ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , allList, path);
 
             httpRespMsg.data = resp;
         } catch (NullPointerException e) {
@@ -4822,7 +4838,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //通过公司id获取该公司所有的项目列表
         User user = userMapper.selectById(request.getHeader("Token"));
         Integer companyId = user.getCompanyId();
-
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
         List<HashMap> projectList = projectMapper.getBaseCostAndRealCost(companyId, null, null, null);
         List<List<String>> exportList = new ArrayList<>();
         //String[] titles = {"项目编号", "项目名称", "当前总预算","当前剩余预算","总剩余预算","已发生总工时成本"};
@@ -4915,7 +4931,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         }
         //String fileName = "工时成本预警表_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.hourCostAlert")+System.currentTimeMillis();
-        ExcelUtil.exportGeneralExcelByTitleAndList(fileName, exportList, path);
+        ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName, exportList, path);
         httpRespMsg.data =  pathPrefix + fileName+".xls";
         return httpRespMsg;
     }
@@ -5183,6 +5199,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             //根据系统配置的员工成本计算方式,按固定时薪还是固定月薪,分情况计算。
             User targetUser = userMapper.selectById(request.getHeader("Token"));
             Integer companyId =targetUser.getCompanyId();
+            WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
             Map<String, Object> resultMap = new HashMap<>();
             //当前用户管理部门
             List<Integer> deptIds=null;
@@ -5328,7 +5345,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             //生成excel文件导出
             //String fileName = "项目分类工时成本统计_"+System.currentTimeMillis();
             String fileName = MessageUtils.message("fileName.proClassLaborCost")+System.currentTimeMillis();
-            String resp = ExcelUtil.exportGeneralExcelByTitleAndList(fileName , allList, path);
+            String resp = ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , allList, path);
             httpRespMsg.data = resp;
         } catch (NullPointerException e) {
             e.printStackTrace();
@@ -5394,6 +5411,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         HttpRespMsg msg = new HttpRespMsg();
         String token = request.getHeader("TOKEN");
         User user = userMapper.selectById(token);
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
         List<SysRichFunction> functionAllList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "全公司工时分配");
         List<SysRichFunction> functionDeptList = sysFunctionMapper.getRoleFunctions(user.getRoleId(), "负责部门工时分配");
         List<Integer> deptIds=null;
@@ -5437,7 +5455,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //生成excel文件导出
         //String fileName = "人员工时分配统计_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.perHoursAllSta")+System.currentTimeMillis();
-        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(fileName , dataList, path);
+        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
         msg.data = resp;
         return msg;
     }
@@ -5604,7 +5622,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 BigDecimal divide;
                 if(days!=0){
                      divide = bigDecimal.divide(BigDecimal.valueOf(days), 2, BigDecimal.ROUND_HALF_UP);
-                }else if(days==0&&num!=0){
+                }else if(days==0){
                     divide=new BigDecimal(1);
                     //查看当天有请假直接算100%
                 }else if (days==0&&num!=0&&leaveSheetList.size()>0){
@@ -5624,7 +5642,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 BigDecimal divide;
                 if(days!=0){
                     divide = bigDecimal.divide(BigDecimal.valueOf(days), 2, BigDecimal.ROUND_HALF_UP);
-                }else if(days==0&&num!=0){
+                }else if(days==0){
                     divide=new BigDecimal(1);
                     //查看当天有请假直接算100%
                 }else if (days==0&&num!=0&&leaveSheetList.size()>0){
@@ -5654,6 +5672,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
     @Override
     public HttpRespMsg exportReportTimelinessRate(HttpServletRequest request, String startDate, String endDate) {
         HttpRespMsg httpRespMsg=new HttpRespMsg();
+        Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
         HttpRespMsg msg = getUserReportTimelinessRate(request, startDate, endDate, null, null, null, null);
         HashMap map= (HashMap) msg.data;
         List<TimelinessRateVO> list = (List<TimelinessRateVO>) map.get("list");
@@ -5673,7 +5693,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //生成excel文件导出
         //String fileName = "人员填报及时率统计_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.timePerFill")+System.currentTimeMillis();
-        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(fileName , dataList, path);
+        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
         httpRespMsg.data = resp;
         return httpRespMsg;
     }
@@ -5718,6 +5738,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
     @Override
     public HttpRespMsg exportWaitingReviewList(HttpServletRequest request, Integer stateKey, String userId,String startDate,String endDate) {
         HttpRespMsg msg = getWaitingReviewList(request, stateKey, userId, null, null,startDate,endDate,null);
+        Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
         HashMap resultmap= (HashMap) msg.data;
         List<Map<String,Object>> list= (List<Map<String, Object>>) resultmap.get("result");
         List<List<String>> dataList=new ArrayList<>();
@@ -5733,7 +5755,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //生成excel文件导出
         //String fileName = "人员待审核统计_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.perReviewed")+System.currentTimeMillis();
-        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(fileName , dataList, path);
+        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
         msg.data = resp;
         return msg;
     }
@@ -5849,6 +5871,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
     @Override
     public HttpRespMsg exportUserWorkingTimeStatic(String startDate, String endDate, HttpServletRequest request, String userId, Integer departmentId) {
         HttpRespMsg msg=new HttpRespMsg();
+        Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
         HttpRespMsg httpRespMsg = getUserWorkingTimeStatic(startDate, endDate, null, null, request, userId, departmentId);
         Map<String,Object> data = (Map<String, Object>) httpRespMsg.data;
         List<Map<String,Object>> resultList= (List<Map<String, Object>>) data.get("result");
@@ -5880,7 +5904,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //生成excel文件导出
         //String fileName = "人员工时统计_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.perHoursSta")+System.currentTimeMillis();
-        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(fileName , dataList, path);
+        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
         msg.data = resp;
         return msg;
     }
@@ -6293,6 +6317,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
     public HttpRespMsg exportProjectBaseCost(HttpServletRequest request) {
         HttpRespMsg httpRespMsg=new HttpRespMsg();
         HttpRespMsg projectBaseCost = getProjectBaseCost(null, request, null, null);
+        Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
         HashMap map= (HashMap) projectBaseCost.data;
         List<Project> resultProjectList= (List<Project>) map.get("result");
         List<List<String>> dataList=new ArrayList<>();
@@ -6323,7 +6349,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //生成excel文件导出
         //String fileName = "项目成本基线表_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("Statistics.ProjectCostBase")+System.currentTimeMillis();
-        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(fileName , dataList, path);
+        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
         httpRespMsg.data = resp;
         return httpRespMsg;
     }
@@ -6392,6 +6418,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
     public HttpRespMsg exportTimeCostByUserCustom(String startDate, String endDate, String subCustomName, Integer customId, HttpServletRequest request, String fieldName) {
         HttpRespMsg httpRespMsg=new HttpRespMsg();
         User targetUser = userMapper.selectById(request.getHeader("token"));
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", targetUser.getCompanyId()));
         List<SysRichFunction> functionTimeList = sysFunctionMapper.getRoleFunctions(targetUser.getRoleId(), "查看工时统计");
         List<SysRichFunction> functionCostList = sysFunctionMapper.getRoleFunctions(targetUser.getRoleId(), "查看成本统计");
         HttpRespMsg msg = getTimeCostByUserCustom(startDate, endDate, null, customId, request, fieldName);
@@ -6424,7 +6451,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         //生成excel文件导出
         //String fileName = userCustom.getName()+"工时成本统计_"+System.currentTimeMillis();
         String fileName = userCustom.getName()+MessageUtils.message("fileName.hourCost")+System.currentTimeMillis();
-        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(fileName , dataList, path);
+        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
         httpRespMsg.data = resp;
 
         return httpRespMsg;
@@ -6754,7 +6781,13 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             msg.setError(MessageUtils.message("other.tokenOverdue"));
             return msg;
         }
+        TimeType timeType = timeTypeMapper.selectById(thirdPartyInterface.getCompanyId());
         List<Project> allProject = projectMapper.selectList(new QueryWrapper<Project>().eq("company_id", thirdPartyInterface.getCompanyId()));
+        List<ProjectMain> projectMainList = projectMainMapper.selectList(new QueryWrapper<ProjectMain>().eq("company_id", thirdPartyInterface.getCompanyId()));
+        List<ProjectLevel> projectLevelList = projectLevelMapper.selectList(new QueryWrapper<ProjectLevel>().eq("company_id", thirdPartyInterface.getCompanyId()));
+        List<ProjectStage> projectStageList = projectStageMapper.selectList(new QueryWrapper<ProjectStage>().eq("company_id", thirdPartyInterface.getCompanyId()));
+        List<ProjectCategory> projectCategoryList = projectCategoryMapper.selectList(new QueryWrapper<ProjectCategory>().eq("company_id", thirdPartyInterface.getCompanyId()));
+        List<User> userList = userMapper.selectList(new QueryWrapper<User>().eq("company_id", thirdPartyInterface.getCompanyId()));
         String message="";
         List<Project> changeProjectList=new ArrayList<>();
         List<Project> inertProjectList=new ArrayList<>();
@@ -6766,6 +6799,37 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     if(first.isPresent()){
                         continue;
                     }
+                    if(timeType.getMainProjectState()==1){
+                        Optional<ProjectMain> mainOptional = projectMainList.stream().filter(pm -> pm.getName().equals(project.getProjectMainName())).findFirst();
+                        if(mainOptional.isPresent()){
+                            project.setProjectMainId(mainOptional.get().getId());
+                            project.setCategoryName(mainOptional.get().getCategoryName());
+                            project.setCategory(mainOptional.get().getCategoryId());
+                        }else project.setProjectMainName(null);
+                    }else {
+                        Optional<ProjectCategory> category = projectCategoryList.stream().filter(pc -> pc.getName().equals(project.getCategoryName())).findFirst();
+                        if(category.isPresent()){
+                            project.setProjectMainId(null);
+                            project.setProjectMainName(null);
+                            project.setCategoryName(category.get().getName());
+                            project.setCategory(category.get().getId());
+                        }else project.setCategoryName(null);
+                    }
+                    if(timeType.getProjectLevelState()==1){
+                        Optional<ProjectLevel> level = projectLevelList.stream().filter(pl -> pl.getProjectLevelName().equals(project.getLevelString())).findFirst();
+                        if(level.isPresent()){
+                            project.setLevel(level.get().getId());
+                        }
+                    }
+                    Optional<User> user = userList.stream().filter(ul -> ul.getJobNumber()!=null&&ul.getJobNumber().equals(project.getInchargerId())).findFirst();
+                    if(user.isPresent()){
+                        project.setInchargerId(user.get().getId());
+                        project.setInchargerName(user.get().getName());
+                    }
+                    Optional<ProjectStage> stage = projectStageList.stream().filter(ps -> ps.getProjectStageName().equals(project.getCurrentStageName())).findFirst();
+                    if(stage.isPresent()){
+                        project.setCurrentStageId(stage.get().getId());
+                    }else project.setCurrentStageName(null);
                     project.setCompanyId(thirdPartyInterface.getCompanyId());
                     inertProjectList.add(project);
                 }
@@ -6773,6 +6837,9 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                     //message+="成功添加"+inertProjectList.size()+"条项目数据";
                     message+=MessageUtils.message("project.upDataSuc",inertProjectList.size());
                 }
+                List<Integer> idList = inertProjectList.stream().map(Project::getId).collect(Collectors.toList());
+                idList.add(-1);
+                List<ProjectSeparate> projectSeparateList = projectSeparateMapper.selectList(new QueryWrapper<ProjectSeparate>().in("id", idList));
                 for (Project project : inertProjectList) {
                     List<TaskGroup> taskGroupList = project.getTaskGroupList();
                     if(taskGroupList!=null){
@@ -6780,16 +6847,19 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                         taskGroupService.saveBatch(taskGroupList);
                     }
                     ProjectSeparate projectSeparate = project.getProjectSeparate();
-                    if(projectSeparate!=null){
-                        projectSeparate.setId(project.getId());
-                        projectSeparateService.save(projectSeparate);
-                    }
+                    projectSeparate.setId(project.getId());
+                    projectSeparateService.saveOrUpdate(projectSeparate);
                 }
             }
         }else if(changeType.equals("update_project")){
             if(projectList!=null &&projectList.size()>0){
                 for (Project project : projectList) {
                     Optional<Project> first = allProject.stream().filter(ap ->ap.getProjectCode()!=null&& ap.getProjectCode().equals(project.getProjectCode())).findFirst();
+                    Optional<User> user = userList.stream().filter(ul ->ul.getJobNumber()!=null&&ul.getJobNumber().equals(project.getInchargerId())).findFirst();
+                    if(user.isPresent()){
+                        project.setInchargerId(user.get().getId());
+                        project.setInchargerName(user.get().getName());
+                    }
                     if(first.isPresent()){
                         project.setId(first.get().getId());
                         project.setCompanyId(thirdPartyInterface.getCompanyId());
@@ -6803,7 +6873,7 @@ 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));
+                List<ProjectSeparate> projectSeparateList = projectSeparateMapper.selectList(new QueryWrapper<ProjectSeparate>().in("id", idList));
                 for (Project project : changeProjectList) {
                     List<TaskGroup> taskGroupList = project.getTaskGroupList();
                     if(taskGroupList!=null){
@@ -6819,10 +6889,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                         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());
-                    }
+                    projectSeparate.setId(project.getId());
+                    projectSeparateService.saveOrUpdate(projectSeparate);
                     projectSeparateService.saveOrUpdate(projectSeparate);
                 }
             }

+ 6 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProviderInfoServiceImpl.java

@@ -4,8 +4,10 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.management.platform.entity.ProviderInfo;
 import com.management.platform.entity.User;
+import com.management.platform.entity.WxCorpInfo;
 import com.management.platform.mapper.ProviderInfoMapper;
 import com.management.platform.mapper.UserMapper;
+import com.management.platform.mapper.WxCorpInfoMapper;
 import com.management.platform.service.ProviderInfoService;
 import com.management.platform.util.ExcelUtil;
 import com.management.platform.util.HttpRespMsg;
@@ -43,6 +45,8 @@ public class ProviderInfoServiceImpl extends ServiceImpl<ProviderInfoMapper, Pro
     ProviderInfoMapper providerInfoMapper;
     @Resource
     UserMapper userMapper;
+    @Resource
+    WxCorpInfoMapper wxCorpInfoMapper;
     @Value(value = "${upload.path}")
     String path;
     @Override
@@ -158,6 +162,7 @@ public class ProviderInfoServiceImpl extends ServiceImpl<ProviderInfoMapper, Pro
     @Override
     public HttpRespMsg exportData(HttpServletRequest request) {
         User user = userMapper.selectById(request.getHeader("token"));
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
         List<List<String>> dataList=new ArrayList<>();
         //String[] titleString=new String[]{"供应商编号","供应商名称","分类","联系人","联系电话","邮箱","地址","备注"};
         String[] titleString=new String[]{MessageUtils.message("excel.supplierNo"),MessageUtils.message("excel.supplierName"),MessageUtils.message("excel.classification"),MessageUtils.message("excel.contacts"),MessageUtils.message("excel.phone"),MessageUtils.message("excel.email"),MessageUtils.message("excel.address"),MessageUtils.message("excel.remarks")};
@@ -179,7 +184,7 @@ public class ProviderInfoServiceImpl extends ServiceImpl<ProviderInfoMapper, Pro
         //生成excel文件导出
         //String fileName = "供应商统计_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.supStat")+System.currentTimeMillis();
-        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(fileName , dataList, path);
+        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         httpRespMsg.data = resp;
         return httpRespMsg;

+ 7 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportExtraDegreeServiceImpl.java

@@ -5,13 +5,16 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.management.platform.entity.ReportExtraDegree;
 import com.management.platform.entity.TimeType;
 import com.management.platform.entity.User;
+import com.management.platform.entity.WxCorpInfo;
 import com.management.platform.mapper.ReportExtraDegreeMapper;
 import com.management.platform.mapper.TimeTypeMapper;
 import com.management.platform.mapper.UserMapper;
+import com.management.platform.mapper.WxCorpInfoMapper;
 import com.management.platform.service.ReportExtraDegreeService;
 import com.management.platform.util.ExcelUtil;
 import com.management.platform.util.HttpRespMsg;
 import com.management.platform.util.MessageUtils;
+import com.qq.weixin.mp.aes.WXBizMsgCrypt;
 import org.apache.poi.EncryptedDocumentException;
 import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
 import org.apache.poi.ss.usermodel.Row;
@@ -49,6 +52,8 @@ public class ReportExtraDegreeServiceImpl extends ServiceImpl<ReportExtraDegreeM
     UserMapper userMapper;
     @Resource
     TimeTypeMapper timeTypeMapper;
+    @Resource
+    WxCorpInfoMapper wxCorpInfoMapper;
     @Override
     public HttpRespMsg importData(HttpServletRequest request, MultipartFile multipartFile) {
         HttpRespMsg msg=new HttpRespMsg();
@@ -152,6 +157,7 @@ public class ReportExtraDegreeServiceImpl extends ServiceImpl<ReportExtraDegreeM
     public HttpRespMsg exportData(HttpServletRequest request) {
         HttpRespMsg httpRespMsg=new HttpRespMsg();
         User user = userMapper.selectById(request.getHeader("token"));
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
         List<ReportExtraDegree> reportExtraDegreeList = reportExtraDegreeMapper.selectList(new QueryWrapper<ReportExtraDegree>().eq("company_id", user.getCompanyId()));
         TimeType timeType = timeTypeMapper.selectById(user.getCompanyId());
         List<String> titleList=new ArrayList<>();
@@ -165,7 +171,7 @@ public class ReportExtraDegreeServiceImpl extends ServiceImpl<ReportExtraDegreeM
         }
         //生成excel文件导出
         String fileName = timeType.getCustomDegreeName()+"_"+System.currentTimeMillis();
-        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(fileName , dataList, path);
+        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
         httpRespMsg.data = resp;
         return httpRespMsg;
     }

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

@@ -3111,6 +3111,8 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
     @Override
     public HttpRespMsg exportUserDailyWorkTime(HttpServletRequest request, String startDate, String endDate) {
         HttpRespMsg msg = getUserDailyWorkTime(request, startDate, endDate);
+        Integer companyId = userMapper.selectById(request.getHeader("token")).getCompanyId();
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
         //String[] weekDayCHN = {"周一","周二","周三","周四","周五","周六","周日"};
         String[] weekDayCHN = {MessageUtils.message("week.Monday"),MessageUtils.message("week.Tuesday"),MessageUtils.message("week.Wednesday"),MessageUtils.message("week.Thursday"),MessageUtils.message("week.Friday"),MessageUtils.message("week.Saturday"),MessageUtils.message("week.Sunday")};
         HashMap map = (HashMap) msg.data;
@@ -3161,7 +3163,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         //生成excel文件导出
         //String fileName = "人员每日工时统计_"+startDate+"至"+endDate+"_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.dailyManHour",startDate,endDate)+"_"+System.currentTimeMillis();
-        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(fileName , dataList, path);
+        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         httpRespMsg.data = resp;
         return httpRespMsg;
@@ -4219,6 +4221,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         HttpRespMsg msg = getNoReportUserList(request, startDate, endDate);
         String token = request.getHeader("TOKEN");
         TimeType timeType = timeTypeMapper.selectById(userMapper.selectById(token).getCompanyId());
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", userMapper.selectById(token).getCompanyId()));
         //String[] weekDayCHN = {"周一","周二","周三","周四","周五","周六","周日"};
         String[] weekDayCHN = {MessageUtils.message("week.Monday"),MessageUtils.message("week.Tuesday"),MessageUtils.message("week.Wednesday"),MessageUtils.message("week.Thursday"),MessageUtils.message("week.Friday"),MessageUtils.message("week.Saturday"),MessageUtils.message("week.Sunday")};
         List<UserDailyWorkItem> dailyWorkItems = (List<UserDailyWorkItem>) msg.data;
@@ -4255,7 +4258,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
         //生成excel文件导出
         //String fileName = "未填人员统计_"+startDate+"至"+endDate+"_"+System.currentTimeMillis();
         String fileName = MessageUtils.message("fileName.perNoFill")+startDate+MessageUtils.message("leave.to")+endDate+"_"+System.currentTimeMillis();
-        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(fileName , dataList, path);
+        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         httpRespMsg.data = resp;
         return httpRespMsg;

+ 8 - 8
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/SimpleReportServiceImpl.java

@@ -2,13 +2,8 @@ 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.SimpleFinance;
-import com.management.platform.entity.SimpleProjectime;
-import com.management.platform.entity.SimpleReport;
-import com.management.platform.entity.User;
-import com.management.platform.mapper.SimpleFinanceMapper;
-import com.management.platform.mapper.SimpleProjectimeMapper;
-import com.management.platform.mapper.SimpleReportMapper;
+import com.management.platform.entity.*;
+import com.management.platform.mapper.*;
 import com.management.platform.service.SimpleFinanceService;
 import com.management.platform.service.SimpleProjectimeService;
 import com.management.platform.service.SimpleReportService;
@@ -69,6 +64,10 @@ public class SimpleReportServiceImpl extends ServiceImpl<SimpleReportMapper, Sim
     SimpleProjectimeMapper simpleProjectimeMapper;
     @Resource
     SimpleProjectimeService simpleProjectimeService;
+    @Resource
+    UserMapper userMapper;
+    @Resource
+    WxCorpInfoMapper wxCorpInfoMapper;
     @Value(value = "${upload.path}")
     private String path;
 
@@ -393,6 +392,7 @@ public class SimpleReportServiceImpl extends ServiceImpl<SimpleReportMapper, Sim
     @Override
     public HttpRespMsg exportData(String yearMonth, Integer companyId, String type, HttpServletRequest request) {
         HttpRespMsg timeCost = getTimeCost(yearMonth, companyId, type, request);
+        WxCorpInfo wxCorpInfo = wxCorpInfoMapper.selectOne(new QueryWrapper<WxCorpInfo>().eq("company_id", companyId));
         HashMap map = (HashMap)timeCost.data;
         List<HashMap> costList = (List<HashMap>)map.get("costList");
         List<List<String>> dataList = new ArrayList<>();
@@ -440,7 +440,7 @@ public class SimpleReportServiceImpl extends ServiceImpl<SimpleReportMapper, Sim
         dataList.add(sumRow);
         //生成excel文件导出
         String fileName = yearMonth+"_"+type+MessageUtils.message("report.report")+"_"+System.currentTimeMillis();
-        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(fileName , dataList, path);
+        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , dataList, path);
         HttpRespMsg httpRespMsg = new HttpRespMsg();
         httpRespMsg.data = resp;
         return  httpRespMsg;

+ 62 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/ExcelUtil.java

@@ -1,12 +1,21 @@
 package com.management.platform.util;
 
+import com.management.platform.entity.CorpwxJobResult;
+import com.management.platform.entity.WxCorpInfo;
+import com.management.platform.mapper.CorpwxJobResultMapper;
+import com.management.platform.service.CorpwxJobResultService;
+import com.management.platform.service.WxCorpInfoService;
 import org.apache.poi.hssf.usermodel.*;
 import org.apache.poi.ss.usermodel.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
 
+import javax.annotation.PostConstruct;
 import java.io.File;
 import java.io.FileOutputStream;
 import java.util.List;
 
+@Component
 public class ExcelUtil {
     /**
      * 简单Excel导出
@@ -14,7 +23,23 @@ public class ExcelUtil {
      * @param list      数据
      * @return
      */
-    public static String exportGeneralExcelByTitleAndList(String title, List<List<String>> list, String downloadPath) {
+
+    @Autowired
+    private WxCorpInfoService wxCorpInfoService;
+
+    @Autowired
+    private CorpwxJobResultService corpwxJobResultService;
+
+    public ExcelUtil(){}
+    public static ExcelUtil ExcelUtil;
+
+    @PostConstruct
+    public void init(){
+        ExcelUtil = this;
+    }
+
+
+    public static String exportGeneralExcelByTitleAndList(WxCorpInfo wxCorpInfo,String title, List<List<String>> list, String downloadPath) {
         String result="系统提示:Excel文件导出成功!";
         String fileName= title+".xls";
         try {
@@ -142,6 +167,42 @@ public class ExcelUtil {
             workBook.write(os);
             os.flush();
             os.close();
+            if(wxCorpInfo!=null&&wxCorpInfo.getSaasSyncContact()==1){
+                String mediaId =ExcelUtil.wxCorpInfoService.getTranslationMediaId(fileName);
+                String jobId = ExcelUtil.wxCorpInfoService.syncTranslation(wxCorpInfo.getCorpid(),mediaId,fileName, null);
+            /*if(jobId!=null&&!jobId.equals("")){
+                File file=new File(path + fileUrlSuffix);
+                if(file.exists()){
+                    file.delete();
+                }
+            }*/
+                int i = 0;
+                String syncTranslationResult = null;
+                /**
+                 * 异步上传转译文件的任务完成时会触发回调,在WeiXinCorpController中的commonDevCallbackPost实现了对回调的处理,存储到corpwxJobResult表中
+                 * 此处轮询查询本地数据库,检测到有任务的回调数据时继续执行查询操作
+                 */
+                while (i < 10) {
+                    Thread.sleep(300);
+                    CorpwxJobResult corpwxJobResult = ExcelUtil.corpwxJobResultService.getById(jobId);
+                    if (corpwxJobResult != null) {
+                        if (corpwxJobResult.getErrCode() == 0) {
+                            syncTranslationResult = ExcelUtil.wxCorpInfoService.getSyncTranslationResult(jobId);
+                        } else {
+                            return corpwxJobResult.getErrMsg();
+                        }
+                        break;
+                    }
+                    i++;
+                }
+                if (syncTranslationResult != null) {
+                    return syncTranslationResult;
+                } else {
+                    return  "处理超时...";
+                }
+            }else {
+                return  "/upload/" + fileName;
+            }
         }catch(Exception e) {
             System.out.println(result);
             e.printStackTrace();

+ 4 - 1
fhKeeper/formulahousekeeper/timesheet/src/components/cascaderOption.vue

@@ -3,7 +3,10 @@
     <div class="child">
         <ul class="transitionBoxUl">
             <li :class="transitionBoxLiIdx == index ? 'liHover' : ''" v-for="(item, index) in options" :key="index" @mouseover="liMouseOver(index, item)" @click.stop="liClick(item)"> 
-                <span :class="item.children ? 'idxspan' : ''" v-if="!radios">{{item.label}}</span>
+                <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="departmentId" :label="item.value">
                         <span class="idxspan" style="margin-left: -10px"> 

+ 223 - 44
fhKeeper/formulahousekeeper/timesheet/src/components/select.vue

@@ -3,26 +3,58 @@
     <!-- <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'">
-            <div :style="'line-height: '+selectHeight+'px'" :class="selectName == $t('defaultText.pleaseChoose') ? 'selecttex selecttexXuan' : 'selecttex'">
+            <div v-if="!multiSelect" :style="'line-height: '+selectHeight+'px;font-size: '+selectFontSize+'px;'" :class="selectName == $t('defaultText.pleaseChoose') ? 'selecttex selecttexXuan' : 'selecttex'">
                 <ww-open-data type='userName' :openid='selectName'></ww-open-data>
                 <!-- {{selectName}} -->
             </div>
+            <div v-if="multiSelect" :style="'line-height: '+selectHeight+'px;margin-left: -10px'" :class="selectName == $t('defaultText.pleaseChoose') ? 'selecttex selecttexXuan' : 'selecttex'">
+                <span v-if="multiSelectList.length > 0">
+                    <span v-if="!tile">
+                        <span class="all">
+                            <ww-open-data type='userName' :openid='multiSelectList[0].name'></ww-open-data>
+                            <!-- {{multiSelectList[0].name}} -->
+                            <i class="el-icon-error" v-if="!disabled" @click.stop="deleteMultiSelectList('-1')"></i>
+                        </span>
+                        <span class="all" v-if="multiSelectList.length > 1"> + {{multiSelectList.length - 1}}</span>
+                    </span>
+                    <span v-if="tile">
+                        <span class="all" style="margin-right: 6px" v-for="(items, indexs) in multiSelectList" :key="indexs">
+                            <ww-open-data type='userName' :openid='multiSelectList[0].name'></ww-open-data>
+                            <!-- {{items.name}} -->
+                            <i class="el-icon-error" @click.stop="deleteMultiSelectList(indexs)" v-if="!disabled"></i>
+                        </span>
+                    </span>
+                </span>
+                <span v-else class="allTwo">{{$t('defaultText.pleaseChoose')}}</span>
+            </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="clearDelete"></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)" @click="liClick(item)"> 
-                    <span v-if="item.name">
-                        <ww-open-data type='userName' :openid='item.name'></ww-open-data>
-                    </span> 
-                    <span v-if="item.auditorName">
-                        <ww-open-data type='userName' :openid='item.auditorName'></ww-open-data>
+                <li :class="transitionBoxLiIdx == index ? 'liHover' : ''" v-for="(item, index) in options" :key="index" @mouseover="liMouseOver(index)" @click="liClick(item, index)"> 
+                    <span v-if="!multiSelect">
+                        <span v-if="item.name">
+                            <ww-open-data type='userName' :openid='item.name'></ww-open-data>
+                        </span> 
+                        <span v-if="item.auditorName">
+                            <ww-open-data type='userName' :openid='item.auditorName'></ww-open-data>
+                        </span>
+                        <!-- {{item.name || item.auditorName}} -->
+                    </span>
+
+                    <span v-if="multiSelect">
+                        <span :class="item.flg ? 'hoverSpan hoverSpanHover' : 'hoverSpan'">
+                            <span>
+                                <ww-open-data type='userName' :openid='item.name'></ww-open-data>
+                                <!-- {{item.name}} -->
+                            </span>
+                            <span v-if="item.flg"><i class="el-icon-check"></i></span>
+                        </span>
                     </span>
-                    <!-- {{item.name || item.auditorName}} -->
                 </li>
             </ul>
         </div>
@@ -41,7 +73,17 @@ export default {
             type: String,
         },
         subjectId: {
-            type: [String, Number]
+            type: [String, Number, Array]
+        },
+        // 是否支持多选
+        multiSelect: {
+            type: Boolean,
+            default: false
+        },
+        // 是否平铺 (需要 multiSelect 为 true)
+        tile: {
+            type: Boolean,
+            default: false
         },
         // 当前页面用到的第几个
         distinction: {
@@ -56,6 +98,11 @@ export default {
             type: Boolean,
             default: false, // 默认值,不是填写日报
         },
+        // 宽度
+        widthStr: {
+            type: String,
+            default: false
+        },
         // 剩下统一索引
         index: {
             type: String
@@ -89,6 +136,7 @@ export default {
         return {
             selectWidth: '150',
             selectHeight: '28',
+            selectFontSize: '12',
             show: false, // 下拉框
             options: [], // 列表数据
             transitionBoxLiIdx: '', // hover 背景色
@@ -98,7 +146,8 @@ export default {
             dailyListObj: null, // 填写日报的数据
             dailyListIndex: null, // 日报点的索引
             move: false,
-            moveIon: false
+            moveIon: false,
+            multiSelectList: []
         };
     },
     computed: {},
@@ -125,14 +174,34 @@ export default {
             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
+                this.multiSelectList = []
+                if(!this.multiSelect) {
+                    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
+                            }
+                        }
+                    } else {
+                        this.selectName = this.$t('defaultText.pleaseChoose')
+                    }
+                }
+                if(this.multiSelect) {
+                    for(var i in this.options) {
+                        for(var j in this.optionsOId) {
+                            if(this.options[i].id == this.optionsOId[j] || this.options[i].auditorId == this.optionsOId[j]) {
+                                this.multiSelectList.push(this.options[i])
+                                this.options[i].flg = true
+                            }
                         }
                     }
                 }
             },
+        },
+        widthStr: {
+            handler(newValue, oldValue) {
+                this.selectWidth = newValue
+            },
         }
     },
     created() {},
@@ -143,21 +212,41 @@ export default {
         } else if(this.size == 'small') {
             this.selectWidth = '191'
             this.selectHeight = '32'
-        } 
+        } else if(this.size == 'medium') {
+            this.selectWidth = '205'
+            this.selectHeight = '40'
+            this.selectFontSize = '14'
+        }
+        if(this.widthStr) {
+            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
+            this.multiSelectList = []
+            if(!this.multiSelect) {
+                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
+                    }
+                }
+            }
+            if(this.multiSelect) {
+                for(var i in this.options) {
+                    for(var j in this.optionsOId) {
+                        if(this.options[i].id == this.optionsOId[j] || this.options[i].auditorId == this.optionsOId[j]) {
+                            this.multiSelectList.push(this.options[i])
+                            this.options[i].flg = true
+                        }
+                    }
                 }
             }
         }
-        console.log(this.subjectId)
+        console.log(this.subject)
         this.dailyListIndex = this.idx
-        // this.moveIon = JSON.parse(JSON.stringify(this.clearable))
     },
     methods: {
         selectCli() {
@@ -174,33 +263,59 @@ export default {
                 this.show = !this.show
                 this.classDiv = false
                 this.move = false
+                if(this.multiSelect) {
+                    let obj = {
+                        // id: nameId,
+                        distinction: this.distinction,
+                        index: this.index, // 选中的索引
+                        other: this.other,
+                        arrUserList: this.multiSelectList
+                    }
+                    this.$emit("selectCal", obj)
+                }
             }
         },
         liMouseOver(index) {
             this.transitionBoxLiIdx = index
         },
-        liClick(item) {
+        liClick(item, itemIndex) {
             let nameId = item.id || item.auditorId
-            if(this.flg) {
-                let obj = {
-                    id: nameId,
-                    idx: this.dailyListIndex
+            if(!this.multiSelect) {
+                if(this.flg) {
+                    let obj = {
+                        id: nameId,
+                        idx: this.dailyListIndex
+                    }
+                    this.$emit("selectCatCli", obj);
+                } else {
+                    let obj = {
+                        id: nameId,
+                        distinction: this.distinction,
+                        index: this.index, // 选中的索引
+                        other: this.other
+                    }
+                    this.$emit("selectCal", obj)
                 }
-                this.$emit("selectCatCli", obj);
-            } else {
-                let obj = {
-                    id: nameId,
-                    distinction: this.distinction,
-                    index: this.index, // 选中的索引
-                    other: this.other
+                this.selectName = item.name || item.auditorName
+                this.transitionBoxLiIdx = ''
+                this.show = false
+                this.classDiv = false
+                this.move = false
+            }
+            if(this.multiSelect) {
+                if(this.options[itemIndex].flg) {
+                    this.options[itemIndex].flg = !this.options[itemIndex].flg
+                    for(var i in this.multiSelectList) {
+                        if(this.multiSelectList[i].id == item.id) {
+                            this.multiSelectList.splice(i, 1)
+                        }
+                    }
+                } else {
+                    this.options[itemIndex].flg = false
+                    this.options[itemIndex].flg = !this.options[itemIndex].flg
+                    this.multiSelectList.push(item)
                 }
-                this.$emit("selectCal", obj)
             }
-            this.selectName = item.name || item.auditorName
-            this.transitionBoxLiIdx = ''
-            this.show = !this.show
-            this.classDiv = false
-            this.move = false
         },
         moveIonDiv() {
             if(this.clearable) {
@@ -213,12 +328,54 @@ export default {
             }
         },
         clearDelete() {
-            this.selectName = this.$t('defaultText.pleaseChoose')
+            if(!this.multiSelect) {
+                this.selectName = this.$t('defaultText.pleaseChoose')
+                let obj = {
+                    name: this.$t('defaultText.pleaseChoose'),
+                    id: ''
+                }
+                this.liClick(obj)
+            }
+            if(this.multiSelect) {
+                this.multiSelectList = []
+                let obj = {
+                    distinction: this.distinction,
+                    index: this.index, // 选中的索引
+                    other: this.other,
+                    arrUserList: []
+                }
+                for(var i in this.options) {
+                    if(this.options[i].flg) {
+                        this.options[i].flg = false
+                    }
+                }
+                this.$emit("selectCal", obj)
+            }
+        },
+        deleteMultiSelectList(str) {
+            let userId
+            if(str == '-1') {
+                userId = this.multiSelectList[0].id
+                this.multiSelectList.splice(0, 1)
+            } else {
+                userId = this.multiSelectList[str].id
+                this.multiSelectList.splice(str, 1)
+            }
+            for(var i in this.options) {
+                if(this.options[i].id == userId) {
+                    if(this.options[i].flg) {
+                        this.options[i].flg = false
+                    }
+                }
+            }
+            
             let obj = {
-                name: this.$t('defaultText.pleaseChoose'),
-                id: ''
+                distinction: this.distinction,
+                index: this.index, // 选中的索引
+                other: this.other,
+                arrUserList: this.multiSelectList
             }
-            this.liClick(obj)
+            this.$emit("selectCal", obj)
         }
     },
     triggerOption(){
@@ -325,4 +482,26 @@ export default {
     .selecttexXuan {
         color: #C0C4CC;;
     }
+    .all {
+        display: inline-block;
+        font-size: 10px;
+        background: #f4f4f5;
+        height: 20px;
+        line-height: 24px;
+        padding: 0px 8px;
+        color: #909399;
+    }
+    .allTwo {
+        display: inline-block;
+        margin-left: 10px;
+    }
+    .hoverSpan {
+        display: flex;
+        width: 100%;
+        justify-content: space-between;
+    }
+    .hoverSpanHover {
+        color: #409eff;
+        font-weight: 700;
+    }
 </style>

+ 63 - 0
fhKeeper/formulahousekeeper/timesheet/src/http.js

@@ -97,6 +97,69 @@ export default {
             }
         )
     },
+
+    WPGpost (url, data, response, exception) {
+        let user = sessionStorage.getItem('user') , token = "";
+        if(user != null){
+            token = JSON.parse(user).id
+        }
+        axios({
+            method: 'post',
+            url: handleUrl(url),
+            
+            // timeout: TIME_OUT_MS,
+            headers: {
+                //'Content-Type': 'application/json; charset=UTF-8'
+                'Content-type': ' application/x-www-form-urlencoded; charset=UTF-8',
+                'Token': token,
+                'app_id': '3bf356d5-bdba-48d4-b1f5-e91468beefa3',
+                'app_key': 'f2960f3bf3c5ca58ee0c6970c1242e87-1655272886142-371814'
+            },
+            data: {
+                'headers' : {
+                    'Authorization' : ''
+                },
+                'IT_TAB': {
+                    'PSPHI': '',
+                    'PROJK': '',
+                    'GJAHR': '',
+                    'MONAT': '',
+                    'ZUNAM': '',
+                    'ZID': '',
+                    'ZDEP': '',
+                    'DMBTR': '',
+                }
+            }
+        }).then(
+            (result) => {
+                response(handleResults(result))
+            }
+        ).catch(
+            (error) => {
+                if (exception) {
+                    var str = error + ''
+                    if(str.indexOf('504') != '-1' || str.indexOf('502') != '-1') {
+
+                        if (flgs == 0) {
+                            timer = setTimeout(() => {
+                                prompt()
+                            }, 100)
+                            flgs++
+                            clearTimeout(timer2)
+                            timer2 = setTimeout(() => {
+                                flgs = 0
+                            }, 12000)
+                        }
+                        // exception(false)
+                    } else {
+                        exception(error)
+                    }
+                } else {
+                    console.log(error, 3)
+                }
+            }
+        )
+    },
     /*
      * get 请求
      * @param url

+ 61 - 36
fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue

@@ -437,10 +437,25 @@
                         // 
                         this.personnelAll = res.data
                         this.allListData = res.data
-                        this.gtff()
+
+                        if(this.user.userNameNeedTranslate == '1') {
+                            let list = res.data.list
+                            let dealWithList = []
+                            for(var i in list) {
+                                let obj = {}
+                                obj.type = list[i].type
+                                obj.id = list[i].name
+                                dealWithList.push(obj)
+                            }
+                            this.dealWithTranslationPlone(dealWithList, res.data.list)
+                        } else {
+                            this.personnelAll = res.data
+                            this.allListData = res.data
+                            this.gtff()
+                        }
                     } else {
                         this.$message({
-                        message: res.msg,
+                        message: res.msg + '里面',
                         type: "error"
                         });
                     }
@@ -448,7 +463,7 @@
                 error => {
                     this.listLoading = false;
                     this.$message({
-                        message: error,
+                        message: error + '外面',
                         type: "error"
                     });
                 });
@@ -742,7 +757,14 @@
                 this.http.post(url, param,
                 res => {
                     if (res.code == "ok") {
+                        // additionName // 未转译的数据另外存储一份,用作 DOM 上渲染
+                        if(this.user.userNameNeedTranslate == '1') {
+                            for(var i in res.data.costList) {
+                                res.data.costList[i].additionName = res.data.costList[i].departmentName
+                            }
+                        }
                         this.allListData = res.data
+                        console.log(this.allListData, '部门数据')
                         this.page = 1
                         if(this.user.userNameNeedTranslate == '1' && this.radio == this.$t('lable.department')) {
                             console.log('进入我处理的方法')
@@ -772,18 +794,11 @@
                 });
             },
             dealWithTranslation(items) {
-                console.log('进来的值', items)
-
                     if (WWOpenData.initCanvas) {
                         WWOpenData.initCanvas()
-                        console.log('成功了吧')
                     }
-                    
                     const myFunOne = async () => {
                         const result = await new Promise((resolve, reject) => {
-                            console.log('我触发了')
-                            console.log(WWOpenData)
-                            console.log(WWOpenData.prefetch)
                             if(WWOpenData.prefetch) {
                                  WWOpenData.prefetch({ items }, (err, data) => {
                                     console.log(items)
@@ -795,22 +810,34 @@
                             }
                            
                         })
-                        console.log(result, '取到的数据')
-                        // result.items.map((v)=>{
-                        //     console.log(v,'返回数据 Echar 图标')
-                        //     this.dep_name.push(v.data)
-                        // })
-                        // this.on_analysis() // ECharts 渲染函数
-                        let arrList = []
-                        for(var i in result) {
-                            this.allListData.costList[i].departmentName = result[i].data
+                        for(var i in this.allListData.costList) {
+                            this.allListData.costList[i].departmentName = result.items[i].data
                         }
-                        console.log(this.allListData, '最终的数据')
                         this.jieliu_echarts()
                     }
                     
                     myFunOne()
             },
+            dealWithTranslationPlone(items, dataList) {
+                    if (WWOpenData.initCanvas) {
+                        WWOpenData.initCanvas()
+                    }
+                    const myFunOne = async () => {
+                        const result = await new Promise((resolve, reject) => {
+                            if(WWOpenData.prefetch) {
+                                 WWOpenData.prefetch({ items }, (err, data) => {
+                                    if (err) { return reject(err) }
+                                    resolve(data)
+                                })
+                            }
+                        })
+                        for(var i in this.allListData.list) {
+                            this.allListData.list[i].name = result.items[i].data
+                        }
+                        this.gtff()
+                    }
+                    myFunOne()
+            },
             jieliu_echarts(){
                 var _this = this;
                 // 更具数据的长度去加每个柱子的间距
@@ -945,7 +972,7 @@
                             }
                         }
                         totalHours = totalHours.toFixed(1);
-                var myChart = echarts.init(document.getElementById("container"));
+                        var myChart = echarts.init(document.getElementById("container"));
                         myChart.resize({
                             width: this.widthHtval
                         })
@@ -972,23 +999,21 @@
                                     trigger:'axis',
                                     formatter: function (params,ticket,callback) {
                                         _this.params = params;
-                                        var res = params[0].name + "<br/>" + 
-                                        ((_this.permissions.countCost) ? _this.$t('workcost')+" : " + params[0].data.money 
-                                        + _this.$t('yuan')+"<br/>" : '') + 
-                                        ((_this.permissions.countHours) ? _this.$t('screening.workTime')+" : " + params[0].data.cost + _this.$t('time.hour') : '');
-                                        // console.log(res, '将要渲染的数据')
+                                        var res 
+                                        if(_this.user.userNameNeedTranslate != '1') {
+                                            var res = params[0].name + "<br/>" + 
+                                            ((_this.permissions.countCost) ? _this.$t('workcost')+" : " + params[0].data.money 
+                                            + _this.$t('yuan')+"<br/>" : '') + 
+                                            ((_this.permissions.countHours) ? _this.$t('screening.workTime')+" : " + params[0].data.cost + _this.$t('time.hour') : '');
+                                        } else {
+                                            var res = "<ww-open-data type='departmentName' :openid='"+ _this.allListData.costList[params[0].dataIndex].additionName +"'></ww-open-data>" + "<br/>" + 
+                                            ((_this.permissions.countCost) ? _this.$t('workcost')+" : " + params[0].data.money 
+                                            + _this.$t('yuan')+"<br/>" : '') + 
+                                            ((_this.permissions.countHours) ? _this.$t('screening.workTime')+" : " + params[0].data.cost + _this.$t('time.hour') : '');
+                                        }
+                                        
                                         return res;
                                     }
-                                    // trigger:'axis',
-                                    //  formatter: function (params,ticket,callback) {
-                                    //      _this.params = params;
-                                    //      var res = params[0].name + "<br/>" + 
-                                    //      ((_this.permissions.countCost) ? "工作成本"+" : " + params[0].data.money 
-                                    //      + "元 <br/>" : '') + 
-                                    //      ((_this.permissions.countHours) ? "工作时长"+" : " + params[0].data.cost + "小时" : '');
-                                    //      return res;
-                                    //  }
-
                                 },
                                 xAxis: {
                                     data: xList,

+ 32 - 7
fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

@@ -115,7 +115,7 @@
                         </el-option>
                     </el-select>
 
-                    <selectCat v-if="user.userNameNeedTranslate == 1" :size="'mini'" :subject="users" :subjectId="inchagerId" :distinction="'1'" @selectCal="selectCal"></selectCat>
+                    <selectCat v-if="user.userNameNeedTranslate == 1" :size="'mini'" :subject="users" :subjectId="inchagerId" :distinction="'1'" :clearable="true" @selectCal="selectCal"></selectCat>
 
                 </el-form-item>
                 <el-form-item>
@@ -128,7 +128,7 @@
                         </el-option>
                     </el-select>
 
-                    <selectCat v-if="user.userNameNeedTranslate == 1" :size="'mini'" :subject="users" :subjectId="inchagerId" :distinction="'2'" @selectCal="selectCal"></selectCat>
+                    <selectCat v-if="user.userNameNeedTranslate == 1" :size="'mini'" :subject="users" :subjectId="inchagerId" :distinction="'2'" :clearable="true" @selectCal="selectCal"></selectCat>
 
                 </el-form-item>
                 <!-- 部门筛选 -->
@@ -512,9 +512,10 @@
 
                 </el-form-item>
                 <el-form-item :label="$t('newspaperauditor')" v-show="user.timeType.reportAuditType==0">
-                    <el-select v-model="addForm.auditUserIds" multiple="true" :disabled=" !(permissions.projectManagement|| user.id == addForm.inchargerId || user.id == addForm.creatorId)" filterable :placeholder="$t('defaultistheprojectleader')" style="width:100%;" >
+                    <el-select v-if="user.userNameNeedTranslate != '1'" v-model="addForm.auditUserIds" multiple="true" :disabled=" !(permissions.projectManagement|| user.id == addForm.inchargerId || user.id == addForm.creatorId)" filterable :placeholder="$t('defaultistheprojectleader')" style="width:100%;" >
                         <el-option v-for="item in participator" :key="item.id" :label="item.name" :value="item.id"></el-option>
                     </el-select>
+                    <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :tile="true" :widthStr="'800'" :disabled="!(permissions.projectManagement|| user.id == addForm.inchargerId || user.id == addForm.creatorId)" :subjectId="addForm.auditUserIds" :subject="participator" :clearable="false" :distinction="'10'"  :multiSelect="true" @selectCal="selectCal"></selectCat>
                 </el-form-item>
                 <!--专业项目协作版本功能 -->
                 <el-form-item :label="$t('ji-bie')" :class="title == $t('newproject') && user.companyId == 936 ? 'wpgCssClass' : ''" v-if="user.company.packageProject==1">
@@ -1147,11 +1148,26 @@
                     <el-scrollbar style="height:100%">
                         <el-input
                         :placeholder="$t('keywordfiltering')"
-                        v-model="filterText2">
+                        v-model="filterText2"
+                        v-if="user.userNameNeedTranslate != 1">
                         </el-input>
                     <el-tree :data="deptMembData" show-checkbox :props="defaultProps" node-key="id"
                         ref="chooseMembTree2" @check-change="addPersonCheck"
-                        highlight-current  :filter-node-method="filterNode" :default-checked-keys="addGroupPersonData.person"></el-tree>
+                        highlight-current  :filter-node-method="filterNode" :default-checked-keys="addGroupPersonData.person">
+                        <span class="custom-tree-node" slot-scope="{ node, data }">
+                            <span v-if="user.userNameNeedTranslate == '1'">
+                                <span v-if="node.data.children">
+                                    <ww-open-data type='departmentName' :openid='node.label'></ww-open-data>
+                                </span>
+                                <span v-else>
+                                    <ww-open-data type='userName' :openid='node.label'></ww-open-data>
+                                </span>
+                            </span>
+                            <span v-if="user.userNameNeedTranslate != '1'">
+                                {{ node.label }}
+                            </span>
+                        </span>
+                        </el-tree>
                     </el-scrollbar>
                 </div>
                 <div>{{ $t('btn.choose') }}&nbsp;{{chosenMembCount}}&nbsp;{{ $t('other.people') }}</div>
@@ -1171,7 +1187,7 @@
                             <span style="float: right; color: #8492a6;" v-if="user.companyId == 936">{{ item.jobNumber }}</span>
                         </el-option>
                     </el-select>
-                    <!-- <selectCat :size="'small'" :subject="users" :subjectId="paramInchargerId" :distinction="'5'" @selectCal="selectCal"></selectCat> -->
+                    <selectCat :size="'small'" :widthStr="'272'" v-if="user.userNameNeedTranslate == '1'" :subject="users" :subjectId="paramInchargerId" :distinction="'5'" @selectCal="selectCal"></selectCat>
                 </el-form-item>
             </el-form>
             <div slot="footer" class="dialog-footer">
@@ -3405,6 +3421,7 @@ a {
             handleAdd(i, item) {
                 // console.log('handleadd',i,item);
                 this.contractAmountReasonShow = false
+                console.log(this.levelList, '看看打印出来的值')
                 if(i == -1) {
                     this.title = this.$t('newproject');
                     this.addForm = {
@@ -3414,7 +3431,7 @@ a {
                         userNames:'',
                         code:'',
                         inchargerId:null,
-                        level: this.user.timeType.projectLevelState == 1 ? this.levelList[0].id : 1,
+                        level: this.user.timeType.projectLevelState == 1 ? (this.levelList.length > 0 ? this.levelList[0].id : null) : 1,
                         customerId:null,
                         notifyUserNames:'',
                         chosenLeaders:[],
@@ -3613,6 +3630,7 @@ a {
                                this.addForm.auditUserIds = res.data.map(function(item) {
                                    return item.auditorId;
                                });
+                               this.$forceUpdate()
                             } else {
                                 this.$message({
                                     message: res.msg,
@@ -4057,6 +4075,13 @@ a {
                     this.projectProfessionList[obj.index].inchargerId == obj.id
                 } else if(obj.distinction =='5') {
                     this.paramInchargerId = obj.id
+                } else if(obj.distinction == '10') {
+                    let userList = obj.arrUserList
+                    let arr = []
+                    for(var i in userList) {
+                        arr.push(userList[i].id)
+                    }
+                    this.addForm.auditUserIds = arr
                 }
             }
         },

+ 15 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/task/list.vue

@@ -135,7 +135,12 @@
                     <el-table-column prop="executorName" :label="$t('zhi-hang-ren')" sortable width="130">
                         <template slot-scope="scope">
                             <!-- <el-link type="primary" @click="showUser(scope.row.executorId)">{{scope.row.executorName}}</el-link> -->
-                            <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='scope.row.departmentName'></ww-open-data></span>
+                            <span v-if="user.userNameNeedTranslate == '1'">
+                                <span v-for="(item, index) in scope.row.executorNameList" :key="index">
+                                    <ww-open-data type='userName' :openid='item'></ww-open-data>
+                                    <span v-if="index < scope.row.executorNameList.length - 1">,</span>
+                                </span>
+                            </span>
                             <span v-if="user.userNameNeedTranslate != '1'">{{scope.row.executorName}}</span>
                         </template>
                     </el-table-column>
@@ -974,6 +979,15 @@ import { error } from 'dingtalk-jsapi';
                 res => {
                     this.listLoading = false;
                     if(res.code == 'ok') {
+                        if(this.user.userNameNeedTranslate == 1) {
+                            for(var i in res.data.records) {
+                                let arr = []
+                                if(res.data.records[i].executorName) {
+                                    arr = res.data.records[i].executorName.split(',')
+                                }
+                                res.data.records[i].executorNameList = arr
+                            }
+                        }
                         this.list = res.data.records
                         this.total = res.data.total
                     } else {

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

@@ -447,7 +447,7 @@
                             </el-option>
                         </el-select>
 
-                        <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'small'" :subject="domain.auditUserList" :idx="index" :subjectId="domain.projectAuditorId" ref="selectCat" :flg="true" @selectCatCli="selectCatCli"></selectCat>
+                        <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :subject="domain.auditUserList" :idx="index" :subjectId="domain.projectAuditorId" ref="selectCat" :flg="domain.projectAuditorId ? true : false" @selectCatCli="selectCatCli"></selectCat>
 
                     </el-form-item>
                     <!-- 111111 -->
@@ -5669,9 +5669,12 @@
                             } else {
                                 formData.append("stage", "-");
                             }
+                            console.log(this.workForm.domains[i].projectAuditorId, '审核人的id')
                             if (this.workForm.domains[i].projectAuditorId) {
                                 formData.append("projectAuditorId", this.workForm.domains[i].projectAuditorId);
                             } else {
+                                console.log('执行到了这里')
+                                console.log(this.user.timeType.reportAuditType)
                                 if (this.user.timeType.reportAuditType == 0) {
                                     this.$message({
                                         message: this.$t('message.Pleasespecifyaprojectreviewer'),

+ 15 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/list.vue

@@ -12,12 +12,14 @@
                 </el-form-item>
 
                 <el-form-item :label="$t('ren-yuan')" style="width: 210px">
-                    <el-select v-model="search.userIdArray" :placeholder="$t('defaultText.pleaseChoose')" clearable @visible-change="usersSearch" @remove-tag="usersSearch(false)" @clear="usersSearch(false)" filterable="true" size="mini" style="width: 150px" multiple collapse-tags>
+                    <el-select v-if="user.userNameNeedTranslate != '1'" v-model="search.userIdArray" :placeholder="$t('defaultText.pleaseChoose')" clearable @visible-change="usersSearch" @remove-tag="usersSearch(false)" @clear="usersSearch(false)" filterable="true" size="mini" style="width: 150px" multiple collapse-tags>
                         <el-option v-for="item in searchUsersList" :key="item.id" :label="item.name" :value="item.id">
                             <span style="float: left" v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
                             <span style="float: left" v-if="user.userNameNeedTranslate != '1'">{{item.name}}</span>
                         </el-option>
                     </el-select>
+
+                    <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'size'" :subject="searchUsersList" :clearable="true" :multiSelect="true" @selectCal="selectCal"></selectCat>
                 </el-form-item>
 
                 <el-form-item :label="$t('other.project')" style="width: 215px">
@@ -913,6 +915,18 @@
                     }
                     this.getList(1)
                 }
+            },
+            selectCal(obj) {
+                console.log(obj, '过来的数据')
+                // search.userIdArray
+                let userListId = obj.arrUserList
+                let arr = []
+                for(var i in userListId) {
+                    arr.push(userListId[i].id)
+                }
+                this.search.userIdArray = arr
+                console.log(this.search.userIdArray, '数据看看')
+                this.usersSearch(false)
             }
         },
         created() {

+ 15 - 0
fhKeeper/formulahousekeeper/timesheet_h5/src/router/index.js

@@ -67,6 +67,21 @@ const router = new Router({
         },
         component: () => import("@/views/edit/weekEdit")
     },
+    {
+        path: "/task",
+        meta: {
+            title: "待办任务"
+        },
+        component: () => import("@/views/task/index")
+    },
+    {
+        path: "/projectInside",
+        name: "projectInside",
+        meta: {
+            title: "项目详情"
+        },
+        component: () => import("@/views/project/projectInside")
+    },
     {
         path: "/search", 
         meta: {

+ 9 - 0
fhKeeper/formulahousekeeper/timesheet_h5/src/views/index/index.vue

@@ -77,6 +77,13 @@
                         this.routers.push({name: '按周填报',url: '/weekEdit',icon: 'records'})
                     // }
                 }
+                if(list[i].name == '待办任务') {
+                    this.routers.push({
+                        name: '待办任务',
+                        url: '/task',
+                        icon: 'todo-list-o'
+                    });
+                }
                 if(list[i].name == '项目报告审核') {
                     this.routers.push({name: '项目报告审核',url: '/review',icon: 'todo-list-o'})
                 }
@@ -102,6 +109,8 @@
                                 icon: 'todo-list-o',
                                 info: this.unreadNum
                             });
+
+            
             this.getMessage();
             this.bindIfNessary();
             if (localStorage.userInfo != null) {

+ 2 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/project/index.vue

@@ -47,6 +47,7 @@
                     <van-swipe-cell v-for="(item,index) in list" :key="index">
                         <van-cell :border="false" :title="item.projectName" :value="item.projectCode"/>
                         <template slot="right" v-if="projectManagement || item.creatorId == user.id">
+                            <van-button square type="primary" text="查看" :to="{name:'projectInside',params:{project:JSON.stringify(item)}}"/>
                             <van-button square type="info" text="编辑" @click="openDialog(index)"/>
                             <van-button square type="danger" text="删除" @click="delPro(index)"/>
                         </template>
@@ -74,7 +75,7 @@
                     placeholder="请选择项目经理" @click="showPickerIncharger = true">
                         <template #input>
                             <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='form.inchargerName'></ww-open-data></span>
-                            <span v-else></span>
+                            <span v-else>{{form.inchargerName}}</span>
                         </template>
                     </van-field>
                     <!-- 研究中心 -->

+ 344 - 0
fhKeeper/formulahousekeeper/timesheet_h5/src/views/project/projectInside.vue

@@ -0,0 +1,344 @@
+<template>
+    <div>
+        <van-nav-bar title="项目详情" left-text="返回" @click-left="back" fixed left-arrow />
+        <div class="content">
+            <van-cell><div style="width:100%;text-align:center;font-size:120%">{{project.projectName}}</div></van-cell>
+            <van-tabs v-model="active" @change="activeChange">
+                <!-- 任务看板 -->
+                <van-tab title="任务看板">
+                    <van-cell title="任务分组" :value="inside.taskGroup.active?inside.taskGroup.active.name:''" @click="inside.taskGroup.show = true"></van-cell>
+                    <van-popup v-model="inside.taskGroup.show" position="bottom">
+                        <van-picker
+                        show-toolbar
+                        :columns="inside.taskGroup.list"
+                        @confirm="taskGroupChange"
+                        @cancel="inside.taskGroup.show = false;$forceUpdate();">
+                            <template #option="item">
+                                <span>{{item.name}}</span>
+                            </template>
+                        </van-picker>
+                    </van-popup>
+                    <van-cell title="任务列表" :value="inside.stages.active?inside.stages.active.stagesName:''" @click="inside.stages.show = true"></van-cell>
+                    <van-popup v-model="inside.stages.show" position="bottom">
+                        <van-picker
+                        show-toolbar
+                        :columns="inside.stages.list"
+                        @confirm="stagesChange"
+                        @cancel="inside.stages.show = false;$forceUpdate();">
+                            <template #option="item">
+                                <span>{{item.stagesName}}</span>
+                            </template>
+                        </van-picker>
+                    </van-popup>
+                    <div class="taskList">
+                        <van-cell v-for="item in inside.taskList" :key="item.id">
+                            <div style="line-height:0.8rem">任务名称:{{item.name}}</div>
+                            <div style="line-height:0.8rem">起止时间:
+                                <span v-if="item.startDate && item.endDate">{{(item.startDate ? item.startDate : ' - ') + '\u3000至\u3000' + (item.endDate ? item.endDate : ' - ')}}</span>
+                                <span v-else></span>
+                            </div>
+                        </van-cell>
+                    </div>
+                </van-tab>
+                <!-- 项目概览 -->
+                <van-tab title="项目概览">
+                    <!-- 基本信息 -->
+                    <van-cell>
+                        <van-row>
+                            <van-col span="7">项目分类:</van-col>
+                            <van-col span="17">{{projectDetail.categoryName}}</van-col>
+                        </van-row>
+                    </van-cell>
+                    <van-cell>
+                        <van-row>
+                            <van-col span="7">项目编号:</van-col>
+                            <van-col span="17">{{projectDetail.projectCode}}</van-col>
+                        </van-row>
+                    </van-cell>
+                    <van-cell>
+                        <van-row>
+                            <van-col span="7">项目描述:</van-col>
+                            <van-col span="17">{{projectDetail.projectDesc}}</van-col>
+                        </van-row>
+                    </van-cell>
+                    <van-cell v-if="user.timeType.projectWithDept == 1">
+                        <van-row>
+                            <van-col span="7">所属部门:</van-col>
+                            <van-col span="17">
+                                <span v-if="user.userNameNeedTranslate != 1">{{projectDetail.departmentName}}</span>
+                                <span v-else><ww-open-data type='departmentName' :openid='projectDetail.departmentName'></ww-open-data></span>
+                            </van-col>
+                        </van-row>
+                    </van-cell>
+                    <van-cell>
+                        <van-row>
+                            <van-col span="7">状态:</van-col>
+                            <van-col span="17">{{projectDetail.status == null ? '-' : info.statusText[projectDetail.status]}}</van-col>
+                        </van-row>
+                    </van-cell>
+                    <van-cell v-if="user.company.packageEngineering == 0">
+                        <van-row>
+                            <van-col span="7">完成度:</van-col>
+                            <van-col span="17">{{projectDetail.progress}}%</van-col>
+                        </van-row>
+                    </van-cell>
+                    <van-cell>
+                        <van-row>
+                            <van-col span="7">合同金额:</van-col>
+                            <van-col span="17">¥{{projectDetail.contractAmount == null ? '-' : projectDetail.contractAmount.toFixed(2)}}</van-col>
+                        </van-row>
+                    </van-cell>
+                    <van-cell>
+                        <van-row>
+                            <van-col span="7">项目级别:</van-col>
+                            <van-col span="17">{{levelToText(projectDetail.level)}}</van-col>
+                        </van-row>
+                    </van-cell>
+                    <van-cell>
+                        <van-row>
+                            <van-col span="7">创建日期:</van-col>
+                            <van-col span="17">{{projectDetail.createDate}}</van-col>
+                        </van-row>
+                    </van-cell>
+                    <van-cell>
+                        <van-row>
+                            <van-col span="7">计划开始日期:</van-col>
+                            <van-col span="17">{{projectDetail.planStartDate == null ? '-' : projectDetail.planStartDate}}</van-col>
+                        </van-row>
+                    </van-cell>
+                    <van-cell>
+                        <van-row>
+                            <van-col span="7">计划结束日期:</van-col>
+                            <van-col span="17">{{projectDetail.planEndDate == null ? '-' : projectDetail.planEndDate}}</van-col>
+                        </van-row>
+                    </van-cell>
+                    <van-cell>
+                        <van-row>
+                            <van-col span="7">实际完成日期:</van-col>
+                            <van-col span="17">{{projectDetail.finishDate == null ? '-' : projectDetail.finishDate}}</van-col>
+                        </van-row>
+                    </van-cell>
+                    <van-cell v-if="user.timeType.outputValueStatus == 1">
+                        <van-row>
+                            <van-col span="7">项目产值:</van-col>
+                            <van-col span="17">¥{{projectDetail.outputValue == null ? '-' : projectDetail.outputValue.toFixed(2)}}</van-col>
+                        </van-row>
+                    </van-cell>
+
+                    <!-- 威派格 -->
+                <template v-if="user.companyId == 936">
+                    <van-cell>
+                        <van-row>
+                            <van-col span="7">合同编号:</van-col>
+                            <van-col span="17">{{projectDetail.projectSeparate.contractCode}}</van-col>
+                        </van-row>
+                    </van-cell>
+                    <van-cell>
+                        <van-row>
+                            <van-col span="7">质保开始时间:</van-col>
+                            <van-col span="17">{{projectDetail.projectSeparate.warrantyStartDate == null ? '-' : projectDetail.projectSeparate.warrantyStartDate}}</van-col>
+                        </van-row>
+                    </van-cell>
+                    <van-cell>
+                        <van-row>
+                            <van-col span="7">质保截至时间:</van-col>
+                            <van-col span="17">{{projectDetail.projectSeparate.warrantyEndDate == null ? '-' : projectDetail.projectSeparate.warrantyEndDate}}</van-col>
+                        </van-row>
+                    </van-cell>
+                    <van-cell>
+                        <van-row>
+                            <van-col span="7">自主项目类别:</van-col>
+                            <van-col span="17">{{projectDetail.projectSeparate.projectCategorySub}}</van-col>
+                        </van-row>
+                    </van-cell>
+                    <van-cell>
+                        <van-row>
+                            <van-col span="7">所属大区:</van-col>
+                            <van-col span="17">{{projectDetail.projectSeparate.region}}</van-col>
+                        </van-row>
+                    </van-cell>
+                    <van-cell>
+                        <van-row>
+                            <van-col span="7">所属BU:</van-col>
+                            <van-col span="17">{{projectDetail.projectSeparate.bu}}</van-col>
+                        </van-row>
+                    </van-cell>
+                </template>
+
+                    <!-- 长沙晶易科技 -->
+                <template v-if="user.companyId == 428">
+                    <van-cell>
+                        <van-row>
+                            <van-col span="7">项目分组:</van-col>
+                            <van-col span="17">{{projectDetail.projectSeparate.projectCategorySub ? projectDetail.projectSeparate.projectCategorySub : '-'}}</van-col>
+                        </van-row>
+                    </van-cell>
+                </template>
+
+                    <!-- 相关人员 -->
+                    <van-cell>
+                        <van-row>
+                            <van-col span="7">项目经理:</van-col>
+                            <van-col span="17">
+                                <span v-if="user.userNameNeedTranslate != 1">{{projectDetail.inchargerName}}</span>
+                                <span v-else><ww-open-data type='userName' :openid='projectDetail.inchargerName'></ww-open-data></span>
+                            </van-col>
+                        </van-row>
+                    </van-cell>
+                    <van-cell>
+                        <van-row>
+                            <van-col span="7">日报审核人:</van-col>
+                            <van-col span="17" v-if="projectDetail.auditorList && projectDetail.auditorList.length != 0">
+                                <span v-for="item,index in projectDetail.auditorList" :key="item.id">
+                                    <span v-if="index != 0">,</span>
+                                    <span v-if="user.userNameNeedTranslate != 1">{{item.auditorName}}</span>
+                                    <span v-else><ww-open-data type='userName' :openid='item.auditorName'></ww-open-data></span>
+                                </span>
+                            </van-col>
+                            <van-col span="17" v-else>-</van-col>
+                        </van-row>
+                    </van-cell>
+                    <van-cell v-if="projectDetail.isPublic == 0">
+                        <van-row>
+                            <van-col span="7">参与人:</van-col>
+                            <van-col span="17">
+                                <span v-for="item,index in projectDetail.participationList" :key="item.id">
+                                    <span v-if="index != 0">,</span>
+                                    <span v-if="user.userNameNeedTranslate != 1">{{item.name}}</span>
+                                    <span v-else><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+                                </span>
+                            </van-col>
+                        </van-row>
+                    </van-cell>
+                </van-tab>
+            </van-tabs>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            user: JSON.parse(localStorage.userInfo),
+            project: JSON.parse(this.$route.params.project),
+            projectDetail: {},
+            
+            active: 0,
+            inside:{    // 任务看板
+                taskGroup:{     // 任务分组
+                    show: false,
+                    active: null,
+                    list: []
+                },
+                stages:{        // 任务列表
+                    show: false,
+                    active: null,
+                    list: []
+                },
+                taskList: []
+            },
+            info:{      // 项目概览
+                statusText: ['全部','进行中','已完成','撤销'],
+                levelList: [],
+                levelText: ['全部','正常','紧急','重要','重要且紧急'],
+            }
+        }
+    },
+    mounted() {
+        // console.log('project',this.project);
+        this.getProjectDetail()
+        this.getLevelList()
+        this.getTaskGroupList()
+    },
+    methods: {
+        back() {
+            history.back();
+        },
+        activeChange(name,title){
+            // console.log('activeChange',name,title);
+        },
+        // 任务看板
+        taskGroupChange(value,key){  // 任务分组
+            // console.log('taskGroupChange',value,key);
+            this.inside.taskGroup.active = value
+            this.inside.taskGroup.show = false
+
+            this.getStagesList()
+        },
+        stagesChange(value,key){     // 任务列表
+            // console.log('stagesChange',value,key);
+            this.inside.stages.active = value
+            this.inside.stages.show = false
+
+            this.inside.taskList = value.taskList
+        },
+
+        getTaskGroupList(){     // 任务分组列表
+            this.$axios.post("/task-group/list", {
+                projectId:this.project.id
+            }).then(res => {
+                if(res.code == "ok") {
+                    this.inside.taskGroup.list = res.data
+                    this.inside.taskGroup.active = res.data[0]
+                    this.getStagesList()
+                } else {
+                    this.$toast.fail('获取失败');
+                }
+            }).catch(err=> {this.$toast.clear();console.log(err)});
+        },
+        getStagesList(){        // 任务列表
+            this.$axios.post("/stages/list", {
+                groupId: this.inside.taskGroup.active.id,
+                projectId: this.project.id,
+                order: 'seq',
+                isDesc: false
+            }).then(res => {
+                if(res.code == "ok") {
+                    this.inside.stages.list = res.data.list
+                    this.inside.stages.active = res.data.list[0]
+                    this.inside.taskList = res.data.list[0].taskList
+                } else {
+                    this.$toast.fail('获取失败');
+                }
+            }).catch(err=> {this.$toast.clear();console.log(err)});
+        },
+
+        // 项目概览
+        getProjectDetail(){
+            this.$axios.post("/project/detail", {id: this.project.id})
+            .then(res => {
+                if(res.code == "ok") {
+                    this.projectDetail = res.data
+                } else {
+                    this.$toast.fail('获取失败');
+                }
+            }).catch(err=> {this.$toast.clear();console.log(err)});
+        },
+        levelToText(lev){
+            if(this.user.timeType.projectLevelState == 1){
+                return this.info.levelList.filter(item => item.id == lev)[0].projectLevelName
+            }else{
+                return this.info.levelText[lev]
+            }
+        },
+        getLevelList(){     // 自定义项目级别
+            this.$axios.post("/project-level/list", {})
+            .then(res => {
+                if(res.code == "ok") {
+                    this.info.levelList = res.data
+                } else {
+                    this.$toast.fail('获取失败');
+                }
+            }).catch(err=> {this.$toast.clear();console.log(err)});
+        }
+    },
+}
+</script>
+
+<style lang="less" scoped>
+.content{
+    margin-top: 46px;
+    overflow: auto;
+}
+</style>

+ 180 - 0
fhKeeper/formulahousekeeper/timesheet_h5/src/views/task/index.vue

@@ -0,0 +1,180 @@
+<template>
+  <div>
+    <van-nav-bar title="待办任务" left-text="返回" @click-left="back" fixed left-arrow />
+    <div class="content">
+
+    <van-sticky offset-top="1.22667rem">
+        <!-- 全部任务/我执行的/我创建的 -->
+        <van-tabs v-model="active" @click="activeClick" class="dateSelectCell">
+            <van-tab title="全部任务" :name="0"></van-tab>
+            <van-tab title="我执行的" :name="1"></van-tab>
+            <van-tab title="我创建的" :name="2"></van-tab>
+        </van-tabs>
+        <!-- 任务状态 -->
+        <van-cell title="任务状态" :value="select_state" @click="select_state_show = true" class="dateSelectCell"></van-cell>
+        <van-popup v-model="select_state_show" position="bottom">
+            <van-picker
+            show-toolbar
+            :columns="select_state_array"
+            @confirm="stateChange"
+            @cancel="select_state_show = false;$forceUpdate();"/>
+        </van-popup>
+        <!-- 任务类型 -->
+        <van-cell title="任务类型" :value="select_type" @click="select_type_show = true" class="dateSelectCell"></van-cell>
+        <van-popup v-model="select_type_show" position="bottom">
+            <van-picker
+            show-toolbar
+            :columns="select_type_array"
+            @confirm="typeChange"
+            @cancel="select_type_show = false;$forceUpdate();"/>
+        </van-popup>
+        <!-- 时间范围 -->
+        <van-cell class="dateSelectCell">
+            <template slot="title">
+                <van-popover
+                v-model="select_date_type_show"
+                trigger="click"
+                :actions="select_date_type_array"
+                @select="dateTypeChange"
+                placement="bottom-start">
+                    <template slot="reference">
+                        <span>{{select_date_type}}<van-icon name="arrow-down" size="10" style="margin-left:2px;" /></span>
+                    </template>
+                </van-popover>
+            </template>
+            <template slot="default">
+                <div style="width:100%;height:100%" @click="select_date_show = true">{{select_date.length == 0 ? '请选择日期区间' : select_date[0] + ' 至 ' + select_date[1]}}</div>
+            </template>
+            <template slot="extra">
+                <van-icon v-if="select_date.length != 0" name="close" style="line-height:0.64rem;position:relative;left:5px;" @click.stop="dateClear"/>
+            </template>
+        </van-cell>
+        <van-calendar v-model="select_date_show" type="range" @confirm="dateChange" />
+    </van-sticky>
+
+        <div class="taskList" v-if="taskList.length != 0">
+            <van-cell v-for="item in taskList" :key="item.id">
+                <div style="line-height:0.8rem">任务名称:{{item.name}}</div>
+                <div style="line-height:0.8rem">项目名称:{{item.projectName}}</div>
+                <div style="line-height:0.8rem">起止时间:
+                    <span v-if="item.startDate && item.endDate">{{(item.startDate ? item.startDate : ' - ') + '\u3000至\u3000' + (item.endDate ? item.endDate : ' - ')}}</span>
+                    <span v-else></span>
+                </div>
+            </van-cell>
+        </div>
+        <div v-else style="text-align:center;font-size:16px;font-weight:500;color:#999;width:100%;margin-top:16px">暂无数据</div>
+        
+
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            active: '0',
+            select_state: '进行中',
+            select_state_array: ['进行中','已完成'],
+            select_state_show: false,
+
+            select_type: '全部',
+            select_type_show: false,
+            select_type_array: ['全部','任务','里程碑','风险'],
+
+            select_date: [],
+            select_date_type: '开始时间',
+            select_date_type_array: [{text:'开始时间'},{text:'截止时间'}],
+            select_date_type_show: false,
+            select_date_show: false,
+
+            taskList: [],
+
+        }
+    },
+    mounted() {
+        this.getList()
+    },
+    methods: {
+        back() {
+            history.back();
+        },
+        formatDate(date) {
+            let mon = date.getMonth() + 1
+            return `${date.getFullYear()}-${mon<10?'0'+mon:mon}-${date.getDate()<10?'0'+date.getDate():date.getDate()}`;
+        },
+        activeClick(){  // 导航点击
+            // console.log(this.active);
+            this.getList()
+        },
+        stateChange(value,key){  // 任务状态筛选
+            this.select_state = value
+            this.select_state_show = false
+            this.getList()
+        },
+        typeChange(value,key){   // 任务类型筛选
+            // console.log(value,key);
+            this.select_type = value
+            this.select_type_show = false
+            this.getList()
+        },
+        dateTypeChange(action,index){   // 开始时间/截止时间 切换
+            // console.log(action,index);
+            this.select_date_type = action.text
+            if(this.select_date.length != 0){
+                this.getList()
+            }
+        },
+        dateChange(date){   // 时间区间筛选
+            const [start, end] = date;
+            this.select_date_show = false;
+            this.select_date = [this.formatDate(start),this.formatDate(end)];
+            // console.log(this.select_date,date);
+            this.getList()
+        },
+        dateClear(){
+            this.select_date = []
+            this.getList()
+        },
+
+        getList(){  // 获取任务列表
+            let parameter = {
+                viewId: this.active,
+                status: this.select_state == '进行中' ? 0 : 1,
+                pageIndex: 1,
+                pageSize: 999
+            }
+            if(this.select_type != '全部'){
+                if(this.select_type == '任务'){ parameter.type = 0 }
+                if(this.select_type == '里程碑'){ parameter.type = 1 }
+                if(this.select_type == '风险'){ parameter.type = 2 }
+            }
+            if(this.select_date.length != 0){
+                parameter.dateType = this.select_date_type == '开始时间' ? 0 : 1
+                parameter.startDate = this.select_date[0]
+                parameter.endDate = this.select_date[1]
+            }
+
+            this.$axios.post("/task/listByPage", parameter)
+            .then(res => {
+                if(res.code == "ok") {
+                    this.taskList = res.data.records
+                } else {
+                    this.$toast.fail('获取失败');
+                }
+            }).catch(err=> {this.$toast.clear();console.log(err)});
+        }
+
+    },
+}
+</script>
+
+<style lang="less" scoped>
+.content{
+    margin-top: 46px;
+    // overflow: auto;
+}
+// .dateSelectCell{
+//     height: 1.2rem;
+// }
+</style>