Browse Source

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

 Conflicts:
	fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/ProjectService.java
cs 2 years ago
parent
commit
bb2aadbbb1
27 changed files with 1246 additions and 419 deletions
  1. 9 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ProjectController.java
  2. 2 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/WeiXinCorpController.java
  3. 13 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/ExcelExportService.java
  4. 4 1
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/ProjectService.java
  5. 102 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ExcelExportServiceImpl.java
  6. 20 2
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java
  7. 236 210
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/WxCorpInfoServiceImpl.java
  8. 29 0
      fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/WorkDayCalculateUtils.java
  9. 11 11
      fhKeeper/formulahousekeeper/octopus/config/index.js
  10. 12 12
      fhKeeper/formulahousekeeper/timesheet/config/index.js
  11. 8 2
      fhKeeper/formulahousekeeper/timesheet/src/components/select.vue
  12. 5 2
      fhKeeper/formulahousekeeper/timesheet/src/i18n/en.json
  13. 5 2
      fhKeeper/formulahousekeeper/timesheet/src/i18n/zh.json
  14. 12 4
      fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue
  15. 133 85
      fhKeeper/formulahousekeeper/timesheet/src/views/project/detail.vue
  16. 19 1
      fhKeeper/formulahousekeeper/timesheet/src/views/project/detailDep.vue
  17. 3 0
      fhKeeper/formulahousekeeper/timesheet/src/views/project/info.vue
  18. 13 2
      fhKeeper/formulahousekeeper/timesheet/src/views/project/projectInside.vue
  19. 1 1
      fhKeeper/formulahousekeeper/timesheet/src/views/project/project_gantt.vue
  20. 112 66
      fhKeeper/formulahousekeeper/timesheet/src/views/project/summary.vue
  21. 12 1
      fhKeeper/formulahousekeeper/timesheet/src/views/task/list.vue
  22. 39 8
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue
  23. 8 0
      fhKeeper/formulahousekeeper/timesheet_h5/src/router/index.js
  24. 5 1
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/project/index.vue
  25. 57 7
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/project/projectInside.vue
  26. 340 0
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/task/editask.vue
  27. 36 1
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/task/index.vue

+ 9 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ProjectController.java

@@ -67,6 +67,15 @@ public class ProjectController {
     private UserMapper userMapper;
     @Resource
     private OperationRecordService operationRecordService;
+    @RequestMapping("/testRead")
+    public HttpRespMsg testRead(String jobId) {
+        return projectService.testRead(jobId);
+    }
+
+    @RequestMapping("/testAdd")
+    public HttpRespMsg testAdd(String jobId) {
+        return projectService.testAdd(jobId);
+    }
 
     /**
      * 获取我参与的全部项目的负责人列表

+ 2 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/WeiXinCorpController.java

@@ -8,6 +8,7 @@ import com.management.platform.entity.*;
 import com.management.platform.entity.vo.UserVO;
 import com.management.platform.mapper.*;
 import com.management.platform.service.*;
+import com.management.platform.service.impl.ExcelExportServiceImpl;
 import com.management.platform.util.*;
 import com.qq.weixin.mp.aes.AesException;
 import com.qq.weixin.mp.aes.WXBizMsgCrypt;
@@ -413,6 +414,7 @@ public class WeiXinCorpController {
                     result.setJobId(jobId);
                     result.setJobType(jobType);
                     corpwxJobResultMapper.insert(result);
+                    ExcelExportServiceImpl.corpwxJobCenter.put(jobId, result);
                 }
             }
         } catch (Exception e) {

+ 13 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/ExcelExportService.java

@@ -0,0 +1,13 @@
+package com.management.platform.service;
+
+import com.management.platform.entity.WxCorpInfo;
+import com.management.platform.util.HttpRespMsg;
+
+import java.util.List;
+
+public interface ExcelExportService {
+    public void testRead(String jobId);
+    public HttpRespMsg exportGeneralExcelByTitleAndList(WxCorpInfo wxCorpInfo, String title, List<List<String>> list, String downloadPath) throws Exception;
+
+    void testAdd(String jobId);
+}

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

@@ -9,7 +9,6 @@ import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
 import java.time.LocalDate;
-import java.util.Map;
 
 /**
  * <p>
@@ -198,5 +197,9 @@ public interface ProjectService extends IService<Project> {
 
     HttpRespMsg synchronizationProject(String dataJson);
 
+    HttpRespMsg testRead(String jobId);
+
+    HttpRespMsg testAdd(String jobId);
+
     HttpRespMsg getEmpMonthHours(Integer pageIndex, Integer pageSize, LocalDate Month,Integer departmentId,String userId, HttpServletRequest request);
 }

+ 102 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ExcelExportServiceImpl.java

@@ -0,0 +1,102 @@
+package com.management.platform.service.impl;
+
+import com.management.platform.entity.CorpwxJobResult;
+import com.management.platform.entity.WxCorpInfo;
+import com.management.platform.mapper.CorpwxJobResultMapper;
+import com.management.platform.service.ExcelExportService;
+import com.management.platform.service.WxCorpInfoService;
+import com.management.platform.util.ExcelUtil;
+import com.management.platform.util.HttpRespMsg;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Isolation;
+import org.springframework.transaction.annotation.Transactional;
+
+import javax.annotation.Resource;
+import java.util.HashMap;
+import java.util.List;
+
+@Service
+public class ExcelExportServiceImpl implements ExcelExportService {
+    //用于控制线程锁
+    public static HashMap<String, CorpwxJobResult> corpwxJobCenter = new HashMap();
+    @Resource
+    private WxCorpInfoService wxCorpInfoService;
+
+    @Resource
+    private CorpwxJobResultMapper corpwxJobResultMapper;
+
+    @Transactional(isolation = Isolation.READ_COMMITTED)
+    public void testRead(String jobId) {
+        System.out.println("Enter ExcelExportService testRead@@@");
+        int i = 0;
+        while (i < 10) {
+            try {
+                Thread.sleep(2000);
+            } catch (InterruptedException e) {
+                e.printStackTrace();
+            }
+//            CorpwxJobResult corpwxJobResult = corpwxJobResultMapper.selectById(jobId);
+            CorpwxJobResult corpwxJobResult = corpwxJobCenter.get(jobId);
+//            CorpwxJobResult item = new CorpwxJobResult();
+//            item.setJobId("444");
+//            corpwxJobResultMapper.insert(item);
+            if (corpwxJobResult != null) {
+                System.out.println("===读取到了====");
+                corpwxJobCenter.remove(jobId);
+                break;
+            } else {
+                System.out.println("===无匹配记录====");
+            }
+            i++;
+        }
+    }
+
+    public HttpRespMsg exportGeneralExcelByTitleAndList(WxCorpInfo wxCorpInfo, String title, List<List<String>> list, String downloadPath) throws Exception {
+        String result = "系统提示:Excel文件导出成功!";
+        String fileName = title + ".xls";
+        HttpRespMsg httpRespMsg = new HttpRespMsg();
+        String resp = ExcelUtil.exportGeneralExcelByTitleAndList(null, title, list, downloadPath);
+        String fileUrlSuffix = title + ".xls";
+        if(wxCorpInfo != null && wxCorpInfo.getSaasSyncContact() == 1){
+            String mediaId = wxCorpInfoService.getTranslationMediaId(fileUrlSuffix);
+            String jobId = wxCorpInfoService.syncTranslation(wxCorpInfo.getCorpid(),mediaId,fileUrlSuffix, null);
+            int i = 0;
+            String syncTranslationResult = null;
+            /**
+             * 异步上传转译文件的任务完成时会触发回调,在WeiXinCorpController中的commonDevCallbackPost实现了对回调的处理,存储到corpwxJobResult表中
+             * 此处轮询查询本地数据库,检测到有任务的回调数据时继续执行查询操作
+             */
+            while (i < 10) {
+                Thread.sleep(300);
+                CorpwxJobResult corpwxJobResult = corpwxJobCenter.get(jobId);
+                if (corpwxJobResult != null) {
+                    if (corpwxJobResult.getErrCode() == 0) {
+                        syncTranslationResult = wxCorpInfoService.getSyncTranslationResult(jobId);
+                        corpwxJobCenter.remove(jobId);
+                    } else {
+                        httpRespMsg.setError(corpwxJobResult.getErrMsg());
+                        return httpRespMsg;
+                    }
+                    break;
+                }
+                i++;
+            }
+            if (syncTranslationResult != null) {
+                httpRespMsg.data = syncTranslationResult;
+            } else {
+                httpRespMsg.setError("处理超时...");
+            }
+        }else {
+            httpRespMsg.data = resp;
+        }
+        return httpRespMsg;
+    }
+
+    @Override
+    public void testAdd(String jobId) {
+        CorpwxJobResult corpwxJobResult = new CorpwxJobResult();
+        corpwxJobResult.setJobId(jobId);
+        corpwxJobCenter.put(jobId, corpwxJobResult);
+//        corpwxJobResultMapper.insert(corpwxJobResult);
+    }
+}

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

@@ -38,6 +38,8 @@ import org.assertj.core.util.Lists;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Isolation;
+import org.springframework.transaction.annotation.Propagation;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.StringUtils;
 import org.springframework.web.bind.annotation.RequestParam;
@@ -77,6 +79,8 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
     @Resource
     private HttpServletRequest request;
     @Resource
+    ExcelExportService excelExportService;
+    @Resource
     private ProjectNotifyUserService projectNotifyUserService;
     @Resource
     private GroupParticipatorMapper groupParticipatorMapper;
@@ -1329,13 +1333,15 @@ 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(wxCorpInfo,fileName , allList, path);
-            httpRespMsg.data = resp;
+            return excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileName , allList, path);
         } catch (NullPointerException e) {
             e.printStackTrace();
             //httpRespMsg.setError("验证失败");
             httpRespMsg.setError(MessageUtils.message("access.verificationError"));
             return httpRespMsg;
+        } catch (Exception exception) {
+            exception.printStackTrace();
+            httpRespMsg.setError(exception.getMessage());
         }
         return httpRespMsg;
     }
@@ -6914,6 +6920,18 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         return msg;
     }
 
+    @Override
+    public HttpRespMsg testRead(String jobId) {
+        excelExportService.testRead(jobId);
+        return new HttpRespMsg();
+    }
+
+    @Override
+    public HttpRespMsg testAdd(String jobId) {
+        excelExportService.testAdd(jobId);
+        return new HttpRespMsg();
+    }
+
     public static void main(String[] args) {
         Map params = new HashMap<>();
         Map paramDataJson = new HashMap<>();

+ 236 - 210
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/WxCorpInfoServiceImpl.java

@@ -33,6 +33,7 @@ import java.net.URI;
 import java.text.SimpleDateFormat;
 import java.time.*;
 import java.time.format.DateTimeFormatter;
+import java.time.temporal.ChronoUnit;
 import java.util.*;
 import java.util.concurrent.Executors;
 import java.util.stream.Collectors;
@@ -539,6 +540,7 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
             String resp = responseEntity.getBody();
             if (showLog) System.out.println(resp);
             JSONObject json = JSONObject.parseObject(resp);
+            DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd");
             if (json.getIntValue("errcode") == 0) {
                 JSONArray datas = json.getJSONArray("datas");
                 for (int i = 0; i < datas.size(); i++) {
@@ -591,250 +593,274 @@ public class WxCorpInfoServiceImpl extends ServiceImpl<WxCorpInfoMapper, WxCorpI
                     int regular_work_sec = summary_info.getIntValue("regular_work_sec");//秒
                     Integer standard_work_sec = summary_info.getInteger("standard_work_sec");
 
-
                     ct.setStartTime(DateTimeUtil.getTimeFromSeconds(sTime));
                     ct.setEndTime(DateTimeUtil.getTimeFromSeconds(eTime));
                     //直接设置打卡时长,以企业微信的为准,不考虑漏打卡的情况
                     ct.setCardTime(DateTimeUtil.getHoursFromSeconds(regular_work_sec));
-
-                    JSONArray holidayItems = jsonObject.getJSONArray("holiday_infos");
-//                        if (eTime == sTime) {
-                    //开始时间和结束时间一样,说明下班没有打卡,需要提取请假的最晚时间作为下班打卡时间
-                    String lastestOffworkTime = null;
-                    boolean needRecaculate = false;
-                    for (int t = 0; t < holidayItems.size(); t++) {
-                        JSONObject holiday = holidayItems.getJSONObject(t);
-                        JSONObject spTitle = holiday.getJSONObject("sp_title");
-                        JSONArray data = spTitle.getJSONArray("data");
-                        for (int m = 0; m < data.size(); m++) {
-                            String leaveText = data.getJSONObject(m).getString("text");
-                            if (leaveText.startsWith("请假")) {
-                                //获取对应位置的请假时间段
-                                String string = holiday.getJSONObject("sp_description").getJSONArray("data").getJSONObject(m).getString("text");
-                                String[] s = string.split(" |\\~");
-                                boolean isOldFormat = false;
-                                if (s.length < 5) {
-                                    isOldFormat = true;
-                                }
-
-                                //获取到请假的开始时间和结束时间
-                                String leaveEnd = isOldFormat ? s[3] : s[4];
-                                String leaveStart = s[1];
-                                //请假开始的日期和结束的日期
-                                String dateStart = localDate.getYear() + "/" + s[0];
-                                String dateEnd = localDate.getYear() + "/" + (isOldFormat ? s[2] : s[3]);
-                                LocalDate sDate = LocalDate.parse(dateStart, mdFormat);
-                                LocalDate eDate = LocalDate.parse(dateEnd, mdFormat);
-                                if (sDate.isEqual(eDate)) {
-                                    //请假在一天内
-                                    if (leaveEnd.equals("下午")) {
-                                        if (leaveStart.equals("上午")) {
-                                            leaveEnd = baseAfternoonEnd;//上午和下午都请假,算全天
-                                            leaveStart = baseMorningStart;
-                                        } else {
-                                            leaveStart = "14:00";
-                                            leaveEnd = baseAfternoonEnd;//请假的下班打卡时间,算上午结束的时间
-                                        }
-                                    } else if (leaveEnd.equals("上午")) {
-                                        //上午请假
-                                        leaveEnd = baseMorningEnd;
-                                        leaveStart = baseMorningStart;
-                                    }
-                                    //开始时间是00:00要处理成正常打卡的开始时间
-                                    if ("00:00".equals(leaveStart)) {
-                                        leaveStart = baseMorningStart;
+                    ct.setAskLeaveTime(0.0);
+                    ct.setWorkHours(0.0);
+                    ct.setOutdoorTime(0.0);
+                    //工作日或者非工作日有打卡,需要校正请假,外出的时长数据
+                    if (WorkDayCalculateUtils.isWorkDay(localDate) || sTime > 0 || eTime > 0) {
+                        JSONArray holidayItems = jsonObject.getJSONArray("holiday_infos");
+                        //开始时间和结束时间一样,说明下班没有打卡,需要提取请假的最晚时间作为下班打卡时间
+                        boolean needRecaculate = false;
+                        //跨天请假的情况,中间如果有非工作日要自动补齐时间。
+                        List<LocalDate> betweenNonWorkDays = new ArrayList<>();
+                        int betweenTotalDays = 0;
+                        for (int t = 0; t < holidayItems.size(); t++) {
+                            JSONObject holiday = holidayItems.getJSONObject(t);
+                            JSONObject spTitle = holiday.getJSONObject("sp_title");
+                            JSONArray data = spTitle.getJSONArray("data");
+                            for (int m = 0; m < data.size(); m++) {
+                                String leaveText = data.getJSONObject(m).getString("text");
+                                if (leaveText.startsWith("请假")) {
+                                    //获取对应位置的请假时间段
+                                    String string = holiday.getJSONObject("sp_description").getJSONArray("data").getJSONObject(m).getString("text");
+                                    String[] s = string.split(" |\\~");
+                                    boolean isOldFormat = false;
+                                    if (s.length < 5) {
+                                        isOldFormat = true;
                                     }
-                                    System.out.println("leaveStart==" + leaveStart + ", leaveEnd=" + leaveEnd);
-                                } else {
-                                    if (showLog) System.out.println("跨天请假@@@@");
-                                    if (showLog)
-                                        System.out.println("当天==" + localDate + ", sDate=" + sDate + ", 比较=" + (localDate.isEqual(sDate)));
-                                    //跨天请假
-                                    if (localDate.isEqual(sDate)) {
-                                        //当前日期第一天,需判断上下午半天请假的情况
-                                        if (leaveStart.equals("上午")) {
-                                            leaveStart = baseMorningStart;
-                                        } else {
-                                            leaveStart = baseAfternoonStart;
-                                        }
-                                        //跨天请假的第一天,结束时间默认为18:00
-                                        leaveEnd = baseAfternoonEnd;//上午开始请假的算全天
-                                    } else if (localDate.isEqual(eDate)) {
-                                        //当前日期就是最后一天,需判断上下午半天请假的情况
+
+                                    //获取到请假的开始时间和结束时间
+                                    String leaveEnd = isOldFormat ? s[3] : s[4];
+                                    String leaveStart = s[1];
+                                    //请假开始的日期和结束的日期
+                                    String dateStart = localDate.getYear() + "/" + s[0];
+                                    String dateEnd = localDate.getYear() + "/" + (isOldFormat ? s[2] : s[3]);
+                                    LocalDate sDate = LocalDate.parse(dateStart, mdFormat);
+                                    LocalDate eDate = LocalDate.parse(dateEnd, mdFormat);
+                                    if (sDate.isEqual(eDate)) {
+                                        //请假在一天内
                                         if (leaveEnd.equals("下午")) {
-                                            leaveEnd = baseAfternoonEnd;//请假到最后一天的下午,就算是全天
+                                            if (leaveStart.equals("上午")) {
+                                                leaveEnd = baseAfternoonEnd;//上午和下午都请假,算全天
+                                                leaveStart = baseMorningStart;
+                                            } else {
+                                                leaveStart = "14:00";
+                                                leaveEnd = baseAfternoonEnd;//请假的下班打卡时间,算上午结束的时间
+                                            }
                                         } else if (leaveEnd.equals("上午")) {
                                             //上午请假
                                             leaveEnd = baseMorningEnd;
+                                            leaveStart = baseMorningStart;
+                                        }
+                                        //开始时间是00:00要处理成正常打卡的开始时间
+                                        if ("00:00".equals(leaveStart)) {
+                                            leaveStart = baseMorningStart;
                                         }
-                                        //跨天请假的最后一天,开始时间默认为9:00
-                                        leaveStart = baseMorningStart;
+                                        System.out.println("leaveStart==" + leaveStart + ", leaveEnd=" + leaveEnd);
                                     } else {
-                                        //中间日期就是全天
-                                        leaveStart = baseMorningStart;
-                                        leaveEnd = baseAfternoonEnd;
-                                        if (showLog) System.out.println("===中间天请假===");
+                                        if (showLog) System.out.println("跨天请假@@@@");
+                                        if (showLog)
+                                            System.out.println("当天==" + localDate + ", sDate=" + sDate + ", 比较=" + (localDate.isEqual(sDate)));
+                                        //跨天请假,获取期间的非工作日,加进去
+                                        List<LocalDate> localDates = WorkDayCalculateUtils.getNonWorkDaysListInRange(dtf.format(sDate) ,dtf.format(eDate));
+                                        for (LocalDate curLdate : localDates) {
+                                            if (!betweenNonWorkDays.stream().anyMatch(be->be.isEqual(curLdate))) {
+                                                if (showLog) System.out.println("含非工作日请假:"+curLdate);
+                                                betweenNonWorkDays.add(curLdate);
+                                            }
+                                        }
+                                        if (betweenNonWorkDays.size() > 0) {
+                                            betweenTotalDays = (int)sDate.until(eDate, ChronoUnit.DAYS) + 1;
+                                            if (showLog) System.out.println("总跨度请假天数为:"+betweenTotalDays);
+                                        }
+                                        if (localDate.isEqual(sDate)) {
+                                            //当前日期第一天,需判断上下午半天请假的情况
+                                            if (showLog) System.out.println("跨天请假第一天leaveStart为:"+leaveStart);
+                                            if (leaveStart.equals("上午")) {
+                                                leaveStart = baseMorningStart;
+                                            } else if (leaveStart.equals("下午")) {
+                                                leaveStart = baseAfternoonStart;
+                                            }
+                                            //跨天请假的第一天,结束时间默认为18:00
+                                            leaveEnd = baseAfternoonEnd;//上午开始请假的算全天
+                                        } else if (localDate.isEqual(eDate)) {
+                                            //当前日期就是最后一天,需判断上下午半天请假的情况
+                                            if (leaveEnd.equals("下午")) {
+                                                leaveEnd = baseAfternoonEnd;//请假到最后一天的下午,就算是全天
+                                            } else if (leaveEnd.equals("上午")) {
+                                                //上午请假
+                                                leaveEnd = baseMorningEnd;
+                                            }
+                                            //跨天请假的最后一天,开始时间默认为9:00
+                                            leaveStart = baseMorningStart;
+                                        } else {
+                                            //中间日期就是全天
+                                            leaveStart = baseMorningStart;
+                                            leaveEnd = baseAfternoonEnd;
+                                            if (showLog) System.out.println("===中间天请假===");
+                                        }
                                     }
-                                }
 
-                                //获取请假最早的开始时间和最晚的结束时间最为当天考勤的最早和最晚时间
-                                if (ct.getStartTime().equals("00:00") || ct.getStartTime().compareTo(leaveStart) > 0) {
-                                    ct.setStartTime(leaveStart);
-                                    needRecaculate = true;
-                                }
-                                if (ct.getEndTime().compareTo(leaveEnd) < 0) {
-                                    ct.setEndTime(leaveEnd);
-                                    needRecaculate = true;
-                                }
-                            } else if (leaveText.startsWith("外出")) {
-                                String string = holiday.getJSONObject("sp_description").getJSONArray("data").getJSONObject(m).getString("text");
-                                String[] s = string.split(" |\\~");
-                                //获取到外出的开始时间和结束时间
-                                boolean isOldFormat = false;
-                                if (s.length < 5) {
-                                    isOldFormat = true;
-                                }
-                                String outEnd = isOldFormat ? s[3] : s[4];
-                                String outStart = s[1];
-                                //获取外出的最早的开始时间和最晚的结束时间最为当天考勤的最早和最晚时间
-                                if (ct.getStartTime().equals("00:00") || ct.getStartTime().compareTo(outStart) > 0) {
-                                    ct.setStartTime(outStart);
-                                    needRecaculate = true;
-                                }
+                                    //获取请假最早的开始时间和最晚的结束时间最为当天考勤的最早和最晚时间
+                                    if (ct.getStartTime().equals("00:00") || ct.getStartTime().compareTo(leaveStart) > 0) {
+                                        ct.setStartTime(leaveStart);
+                                        needRecaculate = true;
+                                    }
+                                    if (ct.getEndTime().compareTo(leaveEnd) < 0) {
+                                        ct.setEndTime(leaveEnd);
+                                        needRecaculate = true;
+                                    }
+                                } else if (leaveText.startsWith("外出")) {
+                                    String string = holiday.getJSONObject("sp_description").getJSONArray("data").getJSONObject(m).getString("text");
+                                    String[] s = string.split(" |\\~");
+                                    //获取到外出的开始时间和结束时间
+                                    boolean isOldFormat = false;
+                                    if (s.length < 5) {
+                                        isOldFormat = true;
+                                    }
+                                    String outEnd = isOldFormat ? s[3] : s[4];
+                                    String outStart = s[1];
+                                    //获取外出的最早的开始时间和最晚的结束时间最为当天考勤的最早和最晚时间
+                                    if (ct.getStartTime().equals("00:00") || ct.getStartTime().compareTo(outStart) > 0) {
+                                        ct.setStartTime(outStart);
+                                        needRecaculate = true;
+                                    }
 
-                                if (ct.getEndTime().compareTo(outEnd) < 0) {
-                                    ct.setEndTime(outEnd);
-                                    needRecaculate = true;
+                                    if (ct.getEndTime().compareTo(outEnd) < 0) {
+                                        ct.setEndTime(outEnd);
+                                        needRecaculate = true;
+                                    }
                                 }
                             }
                         }
-                    }
-                    double timeDelta = 0;
-                    //时间有变化,需要重新计算
-                    if (needRecaculate) {
-                        System.out.println("" + ct.getStartTime() + "--" + ct.getEndTime());
-                        timeDelta = DateTimeUtil.getHoursFromSeconds(DateTimeUtil.getSecondsFromTime(ct.getEndTime()) - DateTimeUtil.getSecondsFromTime(ct.getStartTime()));
-                        //超过下午上班的开始时间,需要减去午休的时间
-                        if (ct.getEndTime().compareTo(baseAfternoonStart) >= 0) {
-                            //重新计算打卡工时时,需要减去中间午休时间
-
-                            timeDelta -= restTime;
+                        double timeDelta = 0;
+                        //时间有变化,需要重新计算
+                        if (needRecaculate) {
+                            System.out.println("" + ct.getStartTime() + "--" + ct.getEndTime());
+                            timeDelta = DateTimeUtil.getHoursFromSeconds(DateTimeUtil.getSecondsFromTime(ct.getEndTime()) - DateTimeUtil.getSecondsFromTime(ct.getStartTime()));
+                            //超过下午上班的开始时间,需要减去午休的时间
+                            if (ct.getEndTime().compareTo(baseAfternoonStart) >= 0) {
+                                //重新计算打卡工时时,需要减去中间午休时间
+                                timeDelta -= restTime;
+                            }
+                        } else {
+                            timeDelta = ct.getCardTime();
                         }
-                    } else {
-                        timeDelta = ct.getCardTime();
-                    }
 
-                    if (showLog) System.out.println("上下班间隔时长为==" + timeDelta);
-                    ct.setName(name);
-                    //解析请假和外出的情况
-                    JSONArray sp_items = jsonObject.getJSONArray("sp_items");
-                    for (int j = 0; j < sp_items.size(); j++) {
-                        JSONObject spItem = sp_items.getJSONObject(j);
-                        switch (spItem.getInteger("type")) {
-                            case 1://请假
-                                Double leaveTime = ct.getAskLeaveTime();
-                                if (leaveTime == null) {
-                                    leaveTime = 0.0;
-                                }
-                                ct.setAskLeaveTime(leaveTime + convertDayTimeToHours(DateTimeUtil.getHoursFromSeconds(spItem.getInteger("duration"))));
-                                break;
-                            case 2://补卡
-                            case 3://出差
-                            case 4://外出
-                            case 100://外勤
-                                Double outdoorTime = ct.getOutdoorTime();
-                                if (outdoorTime == null) {
-                                    outdoorTime = 0.0;
-                                }
-                                double otTime = convertDayTimeToHours(DateTimeUtil.getHoursFromSeconds(spItem.getInteger("duration")));
-                                if (otTime > 8.0) {
-                                    otTime = 8.0;
-                                }
-                                ct.setOutdoorTime(outdoorTime + otTime);
-                                break;
+                        if (showLog) System.out.println("上下班间隔时长为==" + timeDelta);
+                        ct.setName(name);
+                        //解析请假和外出的情况
+                        JSONArray sp_items = jsonObject.getJSONArray("sp_items");
+                        for (int j = 0; j < sp_items.size(); j++) {
+                            JSONObject spItem = sp_items.getJSONObject(j);
+                            switch (spItem.getInteger("type")) {
+                                case 1://请假
+                                    Double leaveTime = ct.getAskLeaveTime();
+                                    if (leaveTime == null) {
+                                        leaveTime = 0.0;
+                                    }
+                                    int wxDuration = spItem.getInteger("duration");
+                                    int seconds = 0;
+                                    if (betweenNonWorkDays.size() > 0) {
+                                        //跨天请假中含有非工作日的情况,要减去非工作日来重新计算实际工作日的每天请假时长。
+                                        seconds = wxDuration * betweenTotalDays/(betweenTotalDays - betweenNonWorkDays.size());
+                                    }
+                                    double curLeaveTime = convertDayTimeToHours(DateTimeUtil.getHoursFromSeconds(seconds));
+                                    ct.setAskLeaveTime(leaveTime + curLeaveTime);
+                                    break;
+                                case 2://补卡
+                                case 3://出差
+                                case 4://外出
+                                case 100://外勤
+                                    Double outdoorTime = ct.getOutdoorTime();
+                                    if (outdoorTime == null) {
+                                        outdoorTime = 0.0;
+                                    }
+                                    double otTime = convertDayTimeToHours(DateTimeUtil.getHoursFromSeconds(spItem.getInteger("duration")));
+                                    if (otTime > 8.0) {
+                                        otTime = 8.0;
+                                    }
+                                    ct.setOutdoorTime(outdoorTime + otTime);
+                                    break;
+                            }
                         }
-                    }
 
-                    //获取请假的最早和最晚时间
-                    for (int t = 0; t < holidayItems.size(); t++) {
-                        JSONObject holiday = holidayItems.getJSONObject(t);
-                        JSONObject spTitle = holiday.getJSONObject("sp_title");
-                        JSONArray data = spTitle.getJSONArray("data");
-                        for (int m = 0; m < data.size(); m++) {
-                            String leaveText = data.getJSONObject(m).getString("text");
-                            if (leaveText.startsWith("请假")) {
-                                //获取对应位置的请假时间段
-                                String string = holiday.getJSONObject("sp_description").getJSONArray("data").getJSONObject(m).getString("text");
-                                String[] s = string.split(" |\\~");
-                                boolean isOldFormat = false;
-                                if (s.length < 5) {
-                                    isOldFormat = true;
-                                }
-                                //获取到请假的开始时间和结束时间
-                                String leaveStart = s[1];
-                                String leaveEnd = isOldFormat ? s[3] : s[4];
-
-                                //检查请假时间段是否在打卡的时间范围内
-                                if ("上午".equals(leaveEnd) || "下午".equals(leaveEnd)) {
-                                    //半天或者全天请假, 上面已经处理过结束时间为请假之前的时间了,此处不需要再处理了
-                                    if (ct.getAskLeaveTime() >= 12) {
-                                        if (showLog)
-                                            System.out.println("====半天或者全天请假 =转化为8小时制下的时间=" + (ct.getAskLeaveTime() / 24 * 8.0));
-                                        //12小时以上的,是请假半天或者全天的。 防止1天有2次上下午分开的请假,导致计算两次的错误
-                                        ct.setAskLeaveTime(ct.getAskLeaveTime() / 24 * 8.0);//转换成一天8小时工作制
+                        //获取请假的最早和最晚时间
+                        for (int t = 0; t < holidayItems.size(); t++) {
+                            JSONObject holiday = holidayItems.getJSONObject(t);
+                            JSONObject spTitle = holiday.getJSONObject("sp_title");
+                            JSONArray data = spTitle.getJSONArray("data");
+                            for (int m = 0; m < data.size(); m++) {
+                                String leaveText = data.getJSONObject(m).getString("text");
+                                if (leaveText.startsWith("请假")) {
+                                    //获取对应位置的请假时间段
+                                    String string = holiday.getJSONObject("sp_description").getJSONArray("data").getJSONObject(m).getString("text");
+                                    String[] s = string.split(" |\\~");
+                                    boolean isOldFormat = false;
+                                    if (s.length < 5) {
+                                        isOldFormat = true;
                                     }
-                                } else if (ct.getStartTime().compareTo(leaveStart) <= 0 && ct.getEndTime().compareTo(leaveEnd) >= 0) {
-                                    String hourLeaveTime = leaveText.replaceAll("请假", "").replaceAll("小时", "");
-                                    if (showLog) System.out.println("请假时长=" + hourLeaveTime);
+                                    //获取到请假的开始时间和结束时间
+                                    String leaveStart = s[1];
+                                    String leaveEnd = isOldFormat ? s[3] : s[4];
+
+                                    //检查请假时间段是否在打卡的时间范围内
+                                    if ("上午".equals(leaveEnd) || "下午".equals(leaveEnd)) {
+                                        //半天或者全天请假, 上面已经处理过结束时间为请假之前的时间了,此处不需要再处理了
+                                        if (ct.getAskLeaveTime() >= 12) {
+                                            if (showLog)
+                                                System.out.println("====半天或者全天请假 =转化为8小时制下的时间=" + (ct.getAskLeaveTime() / 24 * 8.0));
+                                            //12小时以上的,是请假半天或者全天的。 防止1天有2次上下午分开的请假,导致计算两次的错误
+                                            ct.setAskLeaveTime(ct.getAskLeaveTime() / 24 * 8.0);//转换成一天8小时工作制
+                                        }
+                                    } else if (ct.getStartTime().compareTo(leaveStart) <= 0 && ct.getEndTime().compareTo(leaveEnd) >= 0) {
+                                        String hourLeaveTime = leaveText.replaceAll("请假", "").replaceAll("小时", "");
+                                        if (showLog) System.out.println("请假时长=" + hourLeaveTime);
 //                                        ct.setCardTime(ct.getCardTime() - Double.parseDouble(hourLeaveTime));
+                                    }
                                 }
                             }
                         }
-                    }
-                    //校正请假时长
-                    if (ct.getAskLeaveTime() != null && ct.getAskLeaveTime() == 24.0) {
-                        ct.setAskLeaveTime(8.0);//24小时为一天,修正为8小时
-                    }
-                    if (ct.getAskLeaveTime() > 8.0) {
-                        ct.setAskLeaveTime(8.0);//超过8小时都以8小时计算
-                    }
-                    if (showLog) System.out.println("校正后请假时长=" + ct.getAskLeaveTime());
-                    //如果有出差的,但是没有打卡,则用出差的时间作为timeDelta
-                    if (timeDelta < 8.0 && ct.getOutdoorTime() > 0) {
-                        timeDelta += ct.getOutdoorTime();
-                    }
-                    double workHours = timeDelta - ct.getAskLeaveTime();
-                    if (workHours < 0) {
-                        workHours = 0;
-                    }
-                    if (ct.getAskLeaveTime() >= 8.0) {
-                        //全天请假了,就不算打卡工作时长了。
-                        workHours = 0;
-                        //重新校正开始时间和结束时间
-                        ct.setStartTime(baseMorningStart);
-                        ct.setEndTime(baseAfternoonEnd);
-                    }
-                    if (showLog) System.out.println("工作时长==" + workHours);
-                    ct.setWorkHours(DateTimeUtil.getHoursFromDouble(workHours));
+                        //校正请假时长
+                        if (ct.getAskLeaveTime() != null && ct.getAskLeaveTime() == 24.0) {
+                            ct.setAskLeaveTime(8.0);//24小时为一天,修正为8小时
+                        }
+                        if (ct.getAskLeaveTime() > 8.0) {
+                            ct.setAskLeaveTime(8.0);//超过8小时都以8小时计算
+                        }
+                        if (showLog) System.out.println("校正后请假时长=" + ct.getAskLeaveTime());
+                        //如果有出差的,但是没有打卡,则用出差的时间作为timeDelta
+                        if (timeDelta < 8.0 && ct.getOutdoorTime() > 0) {
+                            timeDelta += ct.getOutdoorTime();
+                        }
+                        double workHours = timeDelta - ct.getAskLeaveTime();
+                        if (workHours < 0) {
+                            workHours = 0;
+                        }
+                        if (ct.getAskLeaveTime() >= 8.0) {
+                            //全天请假了,就不算打卡工作时长了。
+                            workHours = 0;
+                            //重新校正开始时间和结束时间
+                            ct.setStartTime(baseMorningStart);
+                            ct.setEndTime(baseAfternoonEnd);
+                        }
+                        if (showLog) System.out.println("工作时长==" + workHours);
+                        ct.setWorkHours(DateTimeUtil.getHoursFromDouble(workHours));
 //                        if (regular_work_sec < standard_work_sec) {
 //                            ct.setWorkHours(DateTimeUtil.getHoursFromDouble(ct.getCardTime() + ct.getOutdoorTime()));
 //                        } else {
 //                            ct.setWorkHours(DateTimeUtil.getHoursFromDouble(ct.getCardTime()));
 //                        }
-                    //仅有一次打卡,并且没有请假,外出的情况,需要补足下班的打卡时间
-                    if (ct.getStartTime().equals(ct.getEndTime()) && !"00:00".equals(ct.getStartTime())) {
-                        if (ct.getEndTime().compareTo(baseAfternoonEnd) < 0) {
-                            ct.setEndTime(baseAfternoonEnd);
-                            //重新计算时长
-                            double workTime = DateTimeUtil.getHoursFromSeconds(DateTimeUtil.getSecondsFromTime(ct.getEndTime()) - DateTimeUtil.getSecondsFromTime(ct.getStartTime()));
-                            if (ct.getStartTime().compareTo(baseMorningEnd) >= 0) {
-                                //重新计算打卡工时时,需要减去中间午休时间
-                                workTime -= restTime;
+                        //仅有一次打卡,并且没有请假,外出的情况,需要补足下班的打卡时间
+                        if (ct.getStartTime().equals(ct.getEndTime()) && !"00:00".equals(ct.getStartTime())) {
+                            if (ct.getEndTime().compareTo(baseAfternoonEnd) < 0) {
+                                ct.setEndTime(baseAfternoonEnd);
+                                //重新计算时长
+                                double workTime = DateTimeUtil.getHoursFromSeconds(DateTimeUtil.getSecondsFromTime(ct.getEndTime()) - DateTimeUtil.getSecondsFromTime(ct.getStartTime()));
+                                if (ct.getStartTime().compareTo(baseMorningEnd) >= 0) {
+                                    //重新计算打卡工时时,需要减去中间午休时间
+                                    workTime -= restTime;
+                                }
+                                ct.setCardTime(workTime);
+                                ct.setWorkHours(DateTimeUtil.getHoursFromDouble(workTime));
                             }
-                            ct.setCardTime(workTime);
-                            ct.setWorkHours(DateTimeUtil.getHoursFromDouble(workTime));
                         }
                     }
+
                     UserCorpwxTime item = userCorpwxTimeMapper.selectOne(new QueryWrapper<UserCorpwxTime>().eq("corpwx_userid", curUserid)
                             .eq("create_date", localDate));
                     if (item != null) {

+ 29 - 0
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/util/WorkDayCalculateUtils.java

@@ -119,6 +119,35 @@ public class WorkDayCalculateUtils {
         return list;
     }
 
+    /**
+     * 获取期间的非工作日
+     * @param startDate
+     * @param endDate
+     * @return
+     */
+    public static List<LocalDate> getNonWorkDaysListInRange(String startDate, String endDate) {
+        int daysOffset = 0;
+        LocalDate localStartDate = LocalDate.parse(startDate, dateTimeFormatter);
+        LocalDate localEndDate = LocalDate.parse(endDate, dateTimeFormatter);
+        List<LocalDate> list = new ArrayList<>();
+        while(true) {
+            localStartDate = localStartDate.plusDays(daysOffset);
+            if (!isWorkDay(localStartDate)) {
+                list.add(localStartDate);
+            }
+            //到达结束日期,结束计算
+            if (localStartDate.isEqual(localEndDate)) {
+                break;
+            }
+            //每次加一天
+            if (daysOffset == 0) {
+                daysOffset = 1;
+            }
+        }
+        return list;
+    }
+
+
     /**
      * 计算给定时间范围内的工作日天数
      * @param startDate

+ 11 - 11
fhKeeper/formulahousekeeper/octopus/config/index.js

@@ -1,18 +1,18 @@
 var path = require('path')
 
 //  var ip = '127.0.0.1'
-// var ip = '192.168.2.13'
-// var ip = '47.100.37.243' 
+var ip = '192.168.2.4'
+// var ip = '47.101.180.183' 
 
-var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
-for (var i in ifaces) {
-    for (var j in ifaces[i]) {
-        var val = ifaces[i][j]
-        if (val.family === 'IPv4' && val.address !== '127.0.0.1') {
-            ip = val.address
-        }
-    } 
-}
+// var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
+// for (var i in ifaces) {
+//     for (var j in ifaces[i]) {
+//         var val = ifaces[i][j]
+//         if (val.family === 'IPv4' && val.address !== '127.0.0.1') {
+//             ip = val.address
+//         }
+//     } 
+// }
 
 module.exports = {
   build: {

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

@@ -1,20 +1,20 @@
 var path = require('path')
 
 //  var ip = '127.0.0.1'
-// var ip = '47.101.180.183' 
+var ip = '47.101.180.183'
 // var ip = '192.168.10.6'
-// var ip = '192.168.2.39'
-
-var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
-for (var i in ifaces) {
-    for (var j in ifaces[i]) {
-        var val = ifaces[i][j]
-        if (val.family === 'IPv4' && val.address !== '127.0.0.1') {
-            ip = val.address
-        }
-    }
-}
+// var ip = '192.168.2.6'
 
+// var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
+// for (var i in ifaces) {
+//     for (var j in ifaces[i]) {
+//         var val = ifaces[i][j]
+//         if (val.family === 'IPv4' && val.address !== '127.0.0.1') {
+//             ip = val.address
+//         }
+//     }
+// }
+// 1196735749
 module.exports = {
   build: {
     env: require('./prod.env'),

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

@@ -126,7 +126,12 @@ export default {
         other: {
             type: [String, Number, Boolean],
             default: false
-        }
+        },
+        // 是否执行到日报单独的函数
+        flgs: {
+            type: Boolean,
+            default: false
+        },
     },
     components: {
         selectWidth: '150',
@@ -281,7 +286,8 @@ export default {
         liClick(item, itemIndex) {
             let nameId = item.id || item.auditorId
             if(!this.multiSelect) {
-                if(this.flg) {
+                console.log('我进来了', this.flg)
+                if(this.flgs) {
                     let obj = {
                         id: nameId,
                         idx: this.dailyListIndex

+ 5 - 2
fhKeeper/formulahousekeeper/timesheet/src/i18n/en.json

@@ -42,7 +42,7 @@
     "approvedProject": "Approved project daily review",
     "allState": "All state",
     "DidNotFillIn": "Did not fill in",
-    "missFillReport":"Missing",
+    "missFillReport": "Missing",
     "alreadyPassed": "already passed",
     "WaitingAudit": "Waiting audit",
     "notThrough": "Not through",
@@ -1394,5 +1394,8 @@
   "dao-chu-qing-jia-dan": "Export leave request",
   "suixiangmuzidongchuangjian": "Automatically created with project",
   "ren-wu-lie-biao-ming-cheng": "task list name",
-  "yu-suan-gong-shi": "budgeted hours"
+  "yu-suan-gong-shi": "budgeted hours",
+  "fan-hui": "return",
+  "jie-duan": "phase",
+  "xiang-mu-cheng-ben": "project cost"
 }

+ 5 - 2
fhKeeper/formulahousekeeper/timesheet/src/i18n/zh.json

@@ -42,7 +42,7 @@
     "approvedProject": "项目日报审核通过",
     "allState": "全部状态",
     "DidNotFillIn": "未填报",
-    "missFillReport":"漏填",
+    "missFillReport": "漏填",
     "alreadyPassed": "已通过",
     "WaitingAudit": "待审核",
     "notThrough": "不通过",
@@ -1394,5 +1394,8 @@
   "dao-chu-qing-jia-dan": "导出请假单",
   "suixiangmuzidongchuangjian": "随项目自动创建",
   "ren-wu-lie-biao-ming-cheng": "任务列表名称",
-  "yu-suan-gong-shi": "预算工时"
+  "yu-suan-gong-shi": "预算工时",
+  "fan-hui": "返回",
+  "xiang-mu-cheng-ben": "项目成本",
+  "jie-duan": "阶段"
 }

+ 12 - 4
fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue

@@ -618,10 +618,18 @@
                                         totalCost += Number(params[i].data.money);
                                     }
                                 }
-                                res = res +'<br/>'+ params[0].name+ '<br/>' + _this.$t('zong-ji') + ':' + 
-                                ((_this.permissions.countHours) ? totalTime.toFixed(1) + _this.$t('time.hour') : '') + 
-                                ((_this.permissions.countCost) ? totalCost.toFixed(2) + _this.$t('yuan') : '') + 
-                                "<br/>";
+                                if(_this.user.userNameNeedTranslate != 1) {
+                                    res = res +'<br/>'+ params[0].name+ '<br/>' + _this.$t('zong-ji') + ':' + 
+                                    ((_this.permissions.countHours) ? totalTime.toFixed(1) + _this.$t('time.hour') : '') + 
+                                    ((_this.permissions.countCost) ? totalCost.toFixed(2) + _this.$t('yuan') : '') + 
+                                    "<br/>";
+                                } else {
+                                    res = res +'<br/>'+ '' + '<br/>' + _this.$t('zong-ji') + ':' + 
+                                    ((_this.permissions.countHours) ? totalTime.toFixed(1) + _this.$t('time.hour') : '') + 
+                                    ((_this.permissions.countCost) ? totalCost.toFixed(2) + _this.$t('yuan') : '') + 
+                                    "<br/>";
+                                }
+                                
                                 return res;
                             }
                         },

+ 133 - 85
fhKeeper/formulahousekeeper/timesheet/src/views/project/detail.vue

@@ -4,23 +4,23 @@
         <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
             <el-form :inline="true">
                 <el-form-item>
-                    <el-button type="text" @click="backToList" icon="el-icon-back" class="back">返回</el-button>
+                    <el-button type="text" @click="backToList" icon="el-icon-back" class="back">{{ $t('fan-hui') }}</el-button>
                 </el-form-item>
                 <el-form-item class="divLine"></el-form-item>
                 <el-form-item>
                     <span class="workName">{{detailName}}</span>
                 </el-form-item>
                 <el-form-item style="float:right;">
-                    <span style="font-size:18px;">项目成本:<span style="color:#20a0ff;">{{cost.toFixed(2)}}元</span></span>
+                    <span style="font-size:18px;">{{ $t('xiang-mu-cheng-ben') }}:<span style="color:#20a0ff;">{{cost.toFixed(2)}}{{ $t('yuan') }}</span></span>
                 </el-form-item>
             </el-form>
         </el-col>
         <el-col :span="24"  style="margin-top:10px;padding-bottom: 0px;text-align:center;">
             <el-radio-group v-model="radio" @change="getList">
-                <el-radio-button label="人员"></el-radio-button>
-                <el-radio-button label="任务分组" v-if="user.company.packageProject != 0"></el-radio-button>
-                <el-radio-button label="子项目" v-if="user.timeType.mainProjectState != '1'"></el-radio-button>
-                <el-radio-button label="阶段" v-if="user.company.packageProject != 0"></el-radio-button>
+                <el-radio-button :label="$t('ren-yuan')"></el-radio-button>
+                <el-radio-button :label="$t('other.taskGroup')" v-if="user.company.packageProject != 0"></el-radio-button>
+                <el-radio-button :label="$t('lable.subproject')" v-if="user.timeType.mainProjectState != '1'"></el-radio-button>
+                <el-radio-button :label="$t('jie-duan')" v-if="user.company.packageProject != 0"></el-radio-button>
             </el-radio-group>
         </el-col>
         <div id="clearfix" :style="'overflow-x: auto;width:100%;padding-bottom: 0px; position: relative; height:'+containerHeight+'px;'">
@@ -40,7 +40,7 @@
                 endDate: null,
                 detailId: this.$route.params.id,
                 detailName: this.$route.params.name,
-                radio:"人员",
+                radio:this.$t('ren-yuan'),
                 user: JSON.parse(sessionStorage.getItem("user")),
 
                 cost: 0,
@@ -64,11 +64,11 @@
             getList() {
                 this.listLoading = true;
                 var url = "";
-                if (this.radio=='人员') {
+                if (this.radio==this.$t('ren-yuan')) {
                     url = this.port.project.projectCost;
-                } else if (this.radio=='任务分组') {
+                } else if (this.radio==this.$t('other.taskGroup')) {
                     url = '/project/getCostByGroup';
-                } else if (this.radio=='子项目') {
+                } else if (this.radio==this.$t('lable.subproject')) {
                     url = '/sub-project/getTimeCost';
                 } else {
                     url = "/project/getCostInStage";
@@ -91,83 +91,19 @@
                     this.listLoading = false;
                     var _this = this;
                     if (res.code == "ok") {
-                        var xList = [],yList = [] , list = res.data.costList;
-                        this.cost = res.data.totalMoneyCost;
-                        for(var i in list) {
-                            if(this.radio == '任务分组'){
-                                xList.push(list[i].GroupName);
-                            }else{
-                                xList.push(list[i].name);
+                        if(this.user.userNameNeedTranslate == 1 && this.radio == this.$t('ren-yuan')) {
+                            let arr = []
+                            for(var i in res.data.costList) {
+                                let obj = {}
+                                obj.type = 'userName'
+                                obj.id = res.data.costList[i].name
+                                arr.push(obj)
                             }
-                            yList.push({
-                                "value": this.yAxisValue==0?list[i].costMoney:list[i].cost,
-                                "cost": list[i].cost,
-                                "money": list[i].costMoney,
-                            });
+                            this.dealWithTranslation(arr, res.data.costList, res.data.totalMoneyCost)
+                            // this.pullAway(res.data.costList, res.data.totalMoneyCost)
+                        } else {
+                            this.pullAway(res.data.costList, res.data.totalMoneyCost)
                         }
-
-                        var myChart = echarts.init(document.getElementById("container"));
-                        // 设置宽度
-                        myChart.resize({
-                            width: this.widthHtval
-                        })
-                        _this.myChart = myChart;
-                        var option = {
-                            // 工具箱
-                            toolbox: {
-                                show: true,
-                                feature:{
-                                    saveAsImage:{
-                                        show:true
-                                    },
-                                    restore:{
-                                        show:true
-                                    },
-                                    dataView:{
-                                        show:true
-                                    },
-                                    dataZoom:{
-                                        show:true
-                                    },
-                                    magicType:{
-                                        type:['line','bar']
-                                    }
-                                }
-                            },
-                            grid : {
-                                top : 80,    //距离容器上边界40像素
-                                bottom: 100,   //距离容器下边界30像素
-                                left: 150,
-                                right: 150
-                            },
-                            tooltip:{
-                                trigger:'axis',
-                                formatter: function (params,ticket,callback) {
-                                    var res = params[0].name + "<br/>工作成本"+" : " + params[0].data.money 
-                                    + "元 <br/>工作时长"+" : " + params[0].data.cost + "小时";
-                                    return res;
-                                }
-                            },
-                            xAxis: {
-                                data: xList,
-                                axisLabel: {
-                                    interval:0,rotate:20
-                                }
-                            },
-                            yAxis: [{
-                                type : 'value',
-                                axisLabel: {
-                                    formatter:this.yAxisValue==0?'{value} (元)':'{value}(小时)'
-                                }
-                            }],
-                            series: [{
-                                name: this.yAxisValue==0?'工作成本(元)':'工作时长(小时)',
-                                type: 'bar',
-                                barMaxWidth: 30,
-                                data: yList,
-                            }]
-                        };
-                        myChart.setOption(option,{notMerge: true});
                     } else {
                         this.$message({
                         message: res.msg,
@@ -182,6 +118,118 @@
                         type: "error"
                     });
                 });
+            },
+            dealWithTranslation(items, dataArr, cosess) {
+                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 dataArr) {
+                        dataArr[i].name = result.items[i].data
+                    }
+                    this.pullAway(dataArr, cosess)
+                }
+                
+                myFunOne()
+            },
+            // 抽离出来的方法
+            pullAway(datalist, cosess) {
+                // var xList = [],yList = [] , list = res.data.costList;
+                var _this = this;
+                var xList = [],yList = [] , list = datalist;
+                // this.cost = res.data.totalMoneyCost;
+                this.cost = cosess;
+                for(var i in list) {
+                    if(this.radio == this.$t('other.taskGroup')){
+                        xList.push(list[i].GroupName);
+                    }else{
+                        xList.push(list[i].name);
+                    }
+                    yList.push({
+                        "value": this.yAxisValue==0?list[i].costMoney:list[i].cost,
+                        "cost": list[i].cost,
+                        "money": list[i].costMoney,
+                    });
+                }
+
+                var myChart = echarts.init(document.getElementById("container"));
+                // 设置宽度
+                myChart.resize({
+                    width: this.widthHtval
+                })
+                _this.myChart = myChart;
+                var option = {
+                    // 工具箱
+                    toolbox: {
+                        show: true,
+                        feature:{
+                            saveAsImage:{
+                                show:true
+                            },
+                            restore:{
+                                show:true
+                            },
+                            dataView:{
+                                show:true
+                            },
+                            dataZoom:{
+                                show:true
+                            },
+                            magicType:{
+                                type:['line','bar']
+                            }
+                        }
+                    },
+                    grid : {
+                        top : 80,    //距离容器上边界40像素
+                        bottom: 100,   //距离容器下边界30像素
+                        left: 150,
+                        right: 150
+                    },
+                    tooltip:{
+                        trigger:'axis',
+                        formatter: function (params,ticket,callback) {
+                            var res
+                            if(_this.user.userNameNeedTranslate == 1 && _this.radio == _this.$t('ren-yuan')) {
+                                res = '' + "<br/>"+_this.$t('workcost')+" : " + params[0].data.money 
+                                + _this.$t('yuan')+"<br/>"+_this.$t('screening.workTime')+" : " + params[0].data.cost + _this.$t('time.hour');
+                            } else {
+                                res = params[0].name + "<br/>"+_this.$t('workcost')+" : " + params[0].data.money 
+                                + _this.$t('yuan')+"<br/>"+_this.$t('screening.workTime')+" : " + params[0].data.cost + _this.$t('time.hour');
+                            }
+                            
+                            return res;
+                        }
+                    },
+                    xAxis: {
+                        data: xList,
+                        axisLabel: {
+                            interval:0,rotate:20
+                        }
+                    },
+                    yAxis: [{
+                        type : 'value',
+                        axisLabel: {
+                            formatter:this.yAxisValue==0?'{value} (元)':'{value}(小时)'
+                        }
+                    }],
+                    series: [{
+                        name: this.yAxisValue==0?_this.$t('workcost')+'('+_this.$t('yuan')+')':_this.$t('screening.workTime')+'('+_this.$t('time.hour')+')',
+                        type: 'bar',
+                        barMaxWidth: 30,
+                        data: yList,
+                    }]
+                };
+                myChart.setOption(option,{notMerge: true});
             },
              // 左右滚动
             scrollFunction () {

+ 19 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/detailDep.vue

@@ -10,8 +10,11 @@
                 <el-form-item style="width: 500px">
                     <!-- <div class="dipali"> -->
                         <!-- <span class="workName">{{detailName}}</span> -->
-                        <el-cascader v-model="departmentId" placeholder="请选择部门" style="width: 180px;margin-left:10px;" @change="getList"
+
+                        <el-cascader v-if="user.userNameNeedTranslate != '1'" v-model="departmentId" placeholder="请选择部门" style="width: 180px;margin-left:10px;" @change="getList"
                         :options="option" :props="{ checkStrictly: true }" :show-all-levels="false"></el-cascader>
+
+                        <vueCascader v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :widthStr="'180'" :clearable="true" :subject="option" :radios="true" :distinction="'1'" @vueCasader="vueCasader" :selectNameChuan="$t('qing-xuan-ze-bu-men')"></vueCascader>
                     <!-- </div> -->
                 </el-form-item>
                 <el-form-item >
@@ -31,7 +34,13 @@
 <script>
     import util from "../../common/js/util";
 
+    // 引入自定义级联组件
+    import vueCascader from "@/components/cascader.vue"
+
     export default {
+        components: {
+            vueCascader
+        },
         data() {
             return {
                 yAxisValue: localStorage.yAxisValue,
@@ -297,6 +306,15 @@
                 event.preventDefault() // 阻止浏览器默认事件
                 this.domObj.scrollLeft = this.domObj.scrollLeft + step
             },
+            // 自定义事件
+            vueCasader(obj) {
+                if(obj.distinction == 1) {
+                    let arr = []
+                    arr.push(obj.id)
+                    this.departmentId = arr
+                    this.getList()
+                }
+            }
         },
         created() {
             let height = window.innerHeight;

+ 3 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/project/info.vue

@@ -762,6 +762,9 @@
         methods: {
             levelTextShow(lev){
                 if(this.user.timeType.projectLevelState == 1){
+                    if(this.levelList.filter(item => item.id == lev).length == 0){
+                        return this.levelTxt[lev]
+                    }
                     return this.levelList.filter(item => item.id == lev)[0].projectLevelName
                 }else{
                     return this.levelTxt[lev]

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

@@ -448,7 +448,18 @@
 
                         <div class="remind" ref="addRem" style="display: none">
                             <el-checkbox-group v-model="checkboxGrounp" v-for="item in users" :key="item.id">
-                                <p><el-checkbox :label="item.name" @change="kkk(item)"></el-checkbox></p>
+                                <p>
+                                    <el-checkbox :label="item.name" @change="kkk(item)">
+                                        <span>
+                                            <span v-if="user.userNameNeedTranslate != '1'">
+                                                {{item.name}}
+                                            </span>
+                                            <span v-if="user.userNameNeedTranslate == '1'">
+                                                <ww-open-data type='userName' :openid='item.name'></ww-open-data>
+                                            </span>
+                                        </span>
+                                    </el-checkbox>
+                                </p>
                             </el-checkbox-group>
                         </div>
                         <div class="ssp" @click="sss"></div>
@@ -634,7 +645,7 @@
                             <div>
                                 <span v-if="user.userNameNeedTranslate != 1">{{scope.row.creatorName}}</span>
                                 <span v-if="user.userNameNeedTranslate == 1">
-                                    <ww-open-data type='departmentName' :openid='scope.row.creatorName'></ww-open-data>
+                                    <ww-open-data type='userName' :openid='scope.row.creatorName'></ww-open-data>
                                 </span>
                             </div>
                         </template>

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/project_gantt.vue

@@ -77,7 +77,7 @@
     </div>
 
     <gantt v-if="isDataLoaded" ref="ganttTable1" class="left-container" :tasks="tasks" 
-    :stafforpro="radio1" 
+    :stafforpro="radio1"
     :valueDate="valueDate"
     :key="updatakey1"></gantt>
 

+ 112 - 66
fhKeeper/formulahousekeeper/timesheet/src/views/project/summary.vue

@@ -417,73 +417,20 @@
                 }
                 this.http.post(url, {projectId: this.curProjectId},
                 res => {
-                    if (res.code == "ok") {
-                        var xList = [], yList = [], list = res.data;
-                        for(var i in list) {
-                            xList.push(list[i].executorName);
-                            yList.push({
-                                "value": _this.sumListRadio == this.$t('plantime') ? list[i].taskHours : list[i].taskCount,
-                                "id": list[i].executorId
-                            });
+                    if (res.code == "ok") { 
+                        if(this.user.userNameNeedTranslate != 1) {
+                            this.pulledOut(res.data)
+                        } else {
+                            let arrList = []
+                            let textList = [] // 是否有待认领的文字
+                            for(var i in res.data) {
+                                let obj = {}
+                                obj.type = res.data[i].type
+                                obj.id = res.data[i].executorName
+                                arrList.push(obj)
+                            }
+                            this.dealWithTranslation(arrList, res.data)
                         }
-                        var myChart = echarts.init(document.getElementById("executorPanel"));
-                        _this.executorChart = myChart;
-                        var option = {
-                            color: ["#409EFF","#71C671"],
-                            title: {
-                                show:list.length == 0,
-                                textStyle: {
-                                    color: "#666666",
-                                    fontSize: 18,
-                                    fontWeight: 'normal',
-                                 },
-                              text: list.length == 0?this.$t('nodata'):this.$t('zhi-hang-ren-fen-pei-tu'),
-                              left: "center",
-                              top: "center"
-                            },
-                            toolbox: {
-                                show: true,
-                                feature:{
-                                    saveAsImage:{
-                                        show:true
-                                    },
-                                    restore:{
-                                        show:true
-                                    },
-                                    magicType:{
-                                        type:['line','bar']
-                                    },
-                                }
-                            },
-                            tooltip:{
-                                trigger:'axis',
-                                formatter: function (params,ticket,callback) {
-                                    var res = params[0].name + ""+" : " + params[0].data.value 
-                                    + (_this.sumListRadio == this.$t('plantime') ? this.$t('time.hour') : this.$t('ge'));
-                                    _this.params = params;
-                                    return res;
-                                }
-                            },
-                            xAxis: {
-                                data: xList,
-                                axisLabel: {
-                                    interval:0,rotate:20
-                                }
-                            },
-                            yAxis: [{
-                                type : 'value',
-                                axisLabel: {
-                                    formatter:'{value} '
-                                }
-                            }],
-                            series: [{
-                                name: _this.sumListRadio == this.$t('plantime') ? this.$t('xiaoshijihua') : this.$t('rwushuliang'),
-                                type: 'bar',
-                                barMaxWidth: 30,
-                                data: yList,
-                            }]
-                        };
-                        myChart.setOption(option,{notMerge: true});
                     } else {
                         this.$message({
                             message: res.msg,
@@ -498,6 +445,105 @@
                     });
                 });
             },
+
+            dealWithTranslation(items, dataArr) {
+                console.log('过来的值')
+                console.log(items, dataArr)
+                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)
+                            })
+                        }
+                       
+                    })
+                    console.log(result, '出来的值')
+                    for(let i in dataArr) {
+                        dataArr[i].executorName = result.items[i].data
+                    }
+                    console.log('将要传过去的值', dataArr)
+                    this.pulledOut(dataArr)
+                }
+                
+                myFunOne()
+            },
+            // 单独抽离出来
+            pulledOut(dataList) {
+                console.log(dataList, '过来的值')
+                // var xList = [], yList = [], list = res.data;
+                let _this = this;
+                var xList = [], yList = [], list = dataList;
+                for(var i in list) {
+                    xList.push(list[i].executorName);
+                    yList.push({
+                        "value": _this.sumListRadio == this.$t('plantime') ? list[i].taskHours : list[i].taskCount,
+                        "id": list[i].executorId
+                    });
+                }
+                var myChart = echarts.init(document.getElementById("executorPanel"));
+                _this.executorChart = myChart;
+                var option = {
+                    color: ["#409EFF","#71C671"],
+                    title: {
+                        show:list.length == 0,
+                        textStyle: {
+                            color: "#666666",
+                            fontSize: 18,
+                            fontWeight: 'normal',
+                         },
+                      text: list.length == 0?this.$t('nodata'):this.$t('zhi-hang-ren-fen-pei-tu'),
+                      left: "center",
+                      top: "center"
+                    },
+                    toolbox: {
+                        show: true,
+                        feature:{
+                            saveAsImage:{
+                                show:true
+                            },
+                            restore:{
+                                show:true
+                            },
+                            magicType:{
+                                type:['line','bar']
+                            },
+                        }
+                    },
+                    tooltip:{
+                        trigger:'axis',
+                        formatter: function (params,ticket,callback) {
+                            var res = params[0].name + ""+" : " + params[0].data.value 
+                            + (_this.sumListRadio == this.$t('plantime') ? this.$t('time.hour') : this.$t('ge'));
+                            _this.params = params;
+                            return res;
+                        }
+                    },
+                    xAxis: {
+                        data: xList,
+                        axisLabel: {
+                            interval:0,rotate:20
+                        }
+                    },
+                    yAxis: [{
+                        type : 'value',
+                        axisLabel: {
+                            formatter:'{value} '
+                        }
+                    }],
+                    series: [{
+                        name: _this.sumListRadio == this.$t('plantime') ? this.$t('xiaoshijihua') : this.$t('rwushuliang'),
+                        type: 'bar',
+                        barMaxWidth: 30,
+                        data: yList,
+                    }]
+                };
+                myChart.setOption(option,{notMerge: true});
+            },
             getProjectTaskSum() {
                 this.http.post('/project/taskSum', {
                     id: this.curProjectId

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

@@ -307,7 +307,18 @@
 
                         <div class="remind" ref="addRem" style="display: none">
                             <el-checkbox-group v-model="checkboxGrounp" v-for="item in users" :key="item.id">
-                                <p><el-checkbox :label="item.name" @change="kkk(item)"></el-checkbox></p>
+                                <p>
+                                    <el-checkbox :label="item.name" @change="kkk(item)">
+                                        <span>
+                                            <span v-if="user.userNameNeedTranslate != '1'">
+                                                {{item.name}}
+                                            </span>
+                                            <span v-if="user.userNameNeedTranslate == '1'">
+                                                <ww-open-data type='userName' :openid='item.name'></ww-open-data>
+                                            </span>
+                                        </span>
+                                    </el-checkbox>
+                                </p>
                             </el-checkbox-group>
                         </div>
                         <div class="ssp" @click="sss"></div>

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

@@ -177,7 +177,9 @@
                                                                 <!-- 待项目审核人 --> {{$t('other.waitForTheProjectReviewer')}}
                                                                 <span v-if="item2.projectAuditorName != null">(
                                                                     <!-- {{item2.projectAuditorName}} -->
-                                                                    <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item2.projectAuditorName'></ww-open-data></span>
+                                                                    <span v-if="user.userNameNeedTranslate == '1'">
+                                                                        <ww-open-data type='userName' :openid='item2.projectAuditorName'></ww-open-data>
+                                                                    </span>
                                                                     <span v-if="user.userNameNeedTranslate != '1'">{{item2.projectAuditorName}}</span>
                                                                     )</span> 
                                                                 <!-- 审核 --> {{$t('other.audit')}}
@@ -186,7 +188,9 @@
                                                                 <!-- 项目审核人 --> {{$t('other.projectAuditor')}}
                                                                 <span v-if="item2.projectAuditorName != null">(
                                                                     <!-- {{item2.projectAuditorName}} -->
-                                                                    <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='userName' :openid='item2.projectAuditorName'></ww-open-data></span>
+                                                                    <span v-if="user.userNameNeedTranslate == '1'">
+                                                                        <ww-open-data type='userName' :openid='item2.projectAuditorName'></ww-open-data>
+                                                                    </span>
                                                                     <span v-if="user.userNameNeedTranslate != '1'">{{item2.projectAuditorName}}</span>
                                                                     )</span>
                                                                 <!-- 审核通过 --> {{$t('state.approved')}}
@@ -195,7 +199,10 @@
                                                         <span v-else-if="item2.isDeptAudit==1">
                                                             <!-- {{($t('other.await') +' '+ item2.auditDeptName +' '+ $t('other.audit'))}} -->
                                                             ({{$t('other.await')}}
-                                                            <span v-if="user.userNameNeedTranslate == '1'"><ww-open-data type='departmentName' :openid='item2.auditDeptName'></ww-open-data></span>
+                                                            <span v-if="user.userNameNeedTranslate == '1'">
+                                                                <ww-open-data type='departmentName' :openid='item2.auditDeptName'></ww-open-data>
+
+                                                            </span>
                                                             <span v-if="user.userNameNeedTranslate != '1'">{{item2.auditDeptName}}</span>
                                                             {{$t('other.audit')}})
                                                         </span>
@@ -213,7 +220,16 @@
                                                         <span style="margin-left:15px;color:#DAA520;" v-if="item2.state == -1">[ {{$t('other.importWaitingForReview')}} ]</span>
                                                         <span style="margin-left:15px;color:#DAA520;" v-if="item2.state == 0 && item2.departmentAuditState == -1">[ {{$t('other.waitingForProfessionalReview')}} ]</span>
                                                         <span style="margin-left:15px;color:#DAA520;" v-if="item2.state == 0 && item2.departmentAuditState == 0">[ {{$t('other.waitingForDepartmentReview')}} ]</span>
-                                                        <span style="margin-left:15px;color:#DAA520;" v-if="item2.state == 0 && item2.departmentAuditState == 1">[ {{$t('other.waitForTheProjectReviewer')}}<span v-if="item2.projectAuditorName != null">({{item2.projectAuditorName}})</span>{{$t('other.audit')}} ]</span>
+                                                        <span style="margin-left:15px;color:#DAA520;" v-if="item2.state == 0 && item2.departmentAuditState == 1">[ {{$t('other.waitForTheProjectReviewer')}}<span v-if="item2.projectAuditorName != null">
+                                                            (
+                                                                <span v-if="user.userNameNeedTranslate != 1">
+                                                                    {{item2.projectAuditorName}}
+                                                                </span>
+                                                                <span v-if="user.userNameNeedTranslate == 1">
+                                                                    <ww-open-data type='userName' :openid='item2.projectAuditorName'></ww-open-data>
+                                                                </span>
+                                                            )
+                                                        </span>{{$t('other.audit')}} ]</span>
                                                         <span style="margin-left:15px;color:#32CD32;" v-else-if="item2.state == 1">[ {{$t('state.alreadyPassed')}} ]</span>
                                                         <span style="margin-left:15px;color:#FF0000;" v-else-if="item2.state == 2">[ {{$t('state.rejected')}} ] {{$t('other.reason')}}:{{item2.rejectReason}}</span>
                                                         <span style="margin-left:15px;color:#FF0000;" v-else-if="item2.state == 3">[ {{$t('state.waitingsubmit')}} ]</span>
@@ -447,7 +463,7 @@
                             </el-option>
                         </el-select>
 
-                        <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>
+                        <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :subject="domain.auditUserList" :idx="index" :subjectId="domain.projectAuditorId" ref="selectCat" :flg="domain.projectAuditorId ? true : false" :flgs="true" @selectCatCli="selectCatCli"></selectCat>
 
                     </el-form-item>
                     <!-- 111111 -->
@@ -592,7 +608,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="'small'" :subject="domain.auditUserList" :idx="index" :subjectId="domain.projectAuditorId" ref="selectCat" :flg="true" :flgs="true" @selectCatCli="selectCatCli"></selectCat>
                         </el-form-item>
                         
 
@@ -1030,12 +1046,26 @@
         
         <!-- 按部门选择人员 -->
         <el-dialog :title="$t('defaultText.selectthepersonwhneedstofillinthereport')"  v-if="chooseParticipVisible" :visible.sync="chooseParticipVisible" :close-on-click-modal="false" customClass="customWidth" width="500px">
-            <el-input style="width:100%" v-model="deptMembDataText" :placeholder="$t('defaultText.pleaseEnterNametoSearch')"></el-input>
+            <el-input v-if="user.userNameNeedTranslate != 1" style="width:100%" v-model="deptMembDataText" :placeholder="$t('defaultText.pleaseEnterNametoSearch')"></el-input>
             <div class="tree" style="height:400px">
                 <el-scrollbar style="height:100%">
                 <el-tree :data="deptMembData" show-checkbox :props="defaultProps" node-key="id"
                     ref="chooseMembTree" @check-change="onTreeItemChange" :default-checked-keys="workForm.userId"
-                    highlight-current :filter-node-method="filterNode"></el-tree>
+                    highlight-current :filter-node-method="filterNode">
+                    <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>
@@ -5906,6 +5936,7 @@
             },
             // 触发 selectCat 组件更改他的值
             selectCatCli(obj) {
+                console.log(obj, '看看')
                 // obj.id 是 选中人员的id, obj.idx 是 当前的索引
                 this.workForm.domains[obj.idx].projectAuditorId = obj.id
             },

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

@@ -82,6 +82,14 @@ const router = new Router({
         },
         component: () => import("@/views/project/projectInside")
     },
+    {
+        path: "/editask",
+        name: "editask",
+        meta: {
+            title: "编辑任务"
+        },
+        component: () => import("@/views/task/editask")
+    },
     {
         path: "/search", 
         meta: {

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

@@ -47,7 +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="primary" text="查看" @click="toProjectInside(item)"/>
                             <van-button square type="info" text="编辑" @click="openDialog(index)"/>
                             <van-button square type="danger" text="删除" @click="delPro(index)"/>
                         </template>
@@ -162,6 +162,10 @@
         created() {
         },
         methods: {
+            toProjectInside(item){
+                sessionStorage.setItem('projectId',JSON.stringify(item.id))
+                this.$router.push("/projectInside");
+            },
             popoverSelect(action){
                 if(this.popoverType == action.type){
                     return

+ 57 - 7
fhKeeper/formulahousekeeper/timesheet_h5/src/views/project/projectInside.vue

@@ -2,7 +2,7 @@
     <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-cell><div style="width:100%;text-align:center;font-size:120%">{{projectDetail.projectName ? projectDetail.projectName : '-'}}</div></van-cell>
             <van-tabs v-model="active" @change="activeChange">
                 <!-- 任务看板 -->
                 <van-tab title="任务看板">
@@ -30,6 +30,9 @@
                             </template>
                         </van-picker>
                     </van-popup>
+                    <van-cell value-class="addtaskvalue">
+                        <van-button plain type="info" class="addtaskbutton" @click="toEditask(null)">新建任务</van-button>
+                    </van-cell>
                     <div class="taskList">
                         <van-cell v-for="item in inside.taskList" :key="item.id">
                             <div style="line-height:0.8rem">任务名称:{{item.name}}</div>
@@ -37,6 +40,9 @@
                                 <span v-if="item.startDate && item.endDate">{{(item.startDate ? item.startDate : ' - ') + '\u3000至\u3000' + (item.endDate ? item.endDate : ' - ')}}</span>
                                 <span v-else></span>
                             </div>
+                            <div class="task_button">
+                                <van-button size="small" type="info" @click="toEditask(item.id)">编辑</van-button>
+                            </div>
                         </van-cell>
                     </div>
                 </van-tab>
@@ -130,7 +136,7 @@
                     <van-cell>
                         <van-row>
                             <van-col span="7">合同编号:</van-col>
-                            <van-col span="17">{{projectDetail.projectSeparate.contractCode}}</van-col>
+                            <van-col span="17">{{projectDetail.projectSeparate.contractCode ? projectDetail.projectSeparate.contractCode : '-'}}</van-col>
                         </van-row>
                     </van-cell>
                     <van-cell>
@@ -221,8 +227,8 @@ export default {
     data() {
         return {
             user: JSON.parse(localStorage.userInfo),
-            project: JSON.parse(this.$route.params.project),
-            projectDetail: {},
+            projectId: JSON.parse(sessionStorage.projectId),
+            projectDetail: null,
             
             active: 0,
             inside:{    // 任务看板
@@ -247,6 +253,7 @@ export default {
     },
     mounted() {
         // console.log('project',this.project);
+        
         this.getProjectDetail()
         this.getLevelList()
         this.getTaskGroupList()
@@ -274,9 +281,34 @@ export default {
             this.inside.taskList = value.taskList
         },
 
+        // 新建/编辑任务
+        toEditask(taskid){
+            let item
+            if(taskid == null){
+                item = {
+                    addNew: true,
+                    id: null,
+                    groupId: this.inside.taskGroup.active.id,
+                    stagesId: this.inside.stages.active.id
+                }
+            }else{
+                item = {
+                    addNew: false,
+                    id: taskid,
+                    groupId: null,
+                    stagesId: null
+                }
+            }
+            sessionStorage.setItem('taskId',JSON.stringify(item))
+            this.$router.push("/editask");
+        },
+        
+        
+
+
         getTaskGroupList(){     // 任务分组列表
             this.$axios.post("/task-group/list", {
-                projectId:this.project.id
+                projectId:this.projectId
             }).then(res => {
                 if(res.code == "ok") {
                     this.inside.taskGroup.list = res.data
@@ -290,7 +322,7 @@ export default {
         getStagesList(){        // 任务列表
             this.$axios.post("/stages/list", {
                 groupId: this.inside.taskGroup.active.id,
-                projectId: this.project.id,
+                projectId: this.projectId,
                 order: 'seq',
                 isDesc: false
             }).then(res => {
@@ -306,7 +338,7 @@ export default {
 
         // 项目概览
         getProjectDetail(){
-            this.$axios.post("/project/detail", {id: this.project.id})
+            this.$axios.post("/project/detail", {id: this.projectId})
             .then(res => {
                 if(res.code == "ok") {
                     this.projectDetail = res.data
@@ -316,7 +348,11 @@ export default {
             }).catch(err=> {this.$toast.clear();console.log(err)});
         },
         levelToText(lev){
+            console.log('levelToText',lev,this.info.levelList,this.info.levelList.filter(item => item.id == lev));
             if(this.user.timeType.projectLevelState == 1){
+                if(this.info.levelList.filter(item => item.id == lev).length == 0){
+                    return this.info.levelText[lev]
+                }
                 return this.info.levelList.filter(item => item.id == lev)[0].projectLevelName
             }else{
                 return this.info.levelText[lev]
@@ -340,5 +376,19 @@ export default {
 .content{
     margin-top: 46px;
     overflow: auto;
+    .addtaskvalue{
+        text-align: center;
+        .addtaskbutton{
+            width: 70%;
+            height: 30px;
+        }
+    }
+    .task_button{
+        padding-top: .09rem;
+        text-align: right;
+        button{
+            margin-left: .2667rem;
+        }
+    }
 }
 </style>

+ 340 - 0
fhKeeper/formulahousekeeper/timesheet_h5/src/views/task/editask.vue

@@ -0,0 +1,340 @@
+<template>
+    <div>
+        <van-nav-bar :title="title" left-text="返回" @click-left="back" fixed left-arrow />
+        <div class="content">
+            <van-form>
+                <!-- 类型 -->
+                <van-field v-model="taskform.taskType" label="类型" @click="taskType.show = true" readonly clickable>
+                    <template #input><span>{{taskType.list[taskform.taskType]}}</span></template>
+                </van-field>
+                <van-popup v-model="taskType.show" position="bottom" v-if="canEdit">
+                    <van-picker
+                    show-toolbar
+                    :columns="taskType.list"
+                    @confirm="tasktypeChange"
+                    @cancel="taskType.show = false;$forceUpdate();"/>
+                </van-popup>
+                <!-- 任务内容 -->
+                <van-field v-model="taskform.name" label="任务内容" placeholder="请输入任务内容" :rules="[{ required: true, message: '请输入任务内容' }]" type="textarea" :disabled="!canEdit"></van-field>
+                <!-- 开始时间 -->
+                <van-field v-if="taskform.type != 1" v-model="taskform.startDate" label="开始时间" placeholder="请选择开始时间" @click="startDateShow = true" readonly clickable></van-field>
+                <van-popup v-model="startDateShow" position="bottom" v-if="canEdit">
+                    <van-datetime-picker
+                    type="date"
+                    title="选择开始时间"
+                    @confirm="startDateChange"
+                    @cancel="startDateShow = false;$forceUpdate();"
+                    :min-date="new Date(2010,0,1)"
+                    :max-date="taskform.endDate ? new Date(taskform.endDate) : new Date(2030,11,31)"/>
+                </van-popup>
+                <!-- 截止时间 -->
+                <van-field v-model="taskform.endDate" label="截止时间" placeholder="请选择截止时间" @click="endDateShow = true" readonly clickable></van-field>
+                <van-popup v-model="endDateShow" position="bottom" v-if="canEdit">
+                    <van-datetime-picker
+                    type="date"
+                    title="选择截止时间"
+                    @confirm="endDateChange"
+                    @cancel="endDateShow = false;$forceUpdate();"
+                    :min-date="taskform.startDate ? new Date(taskform.startDate) : new Date(2010,0,1)"
+                    :max-date="new Date(2030,11,31)"/>
+                </van-popup>
+                <!-- 完成时间 -->
+                <van-field v-if="taskform.type == 1" v-model="taskform.finishDate" label="完成时间" placeholder="请选择完成时间" @click="finishDateShow = true" readonly clickable></van-field>
+                <van-popup v-model="finishDateShow" position="bottom" v-if="canEdit">
+                    <van-datetime-picker
+                    type="date"
+                    title="选择完成时间"
+                    @confirm="finishDateChange"
+                    @cancel="finishDateShow = false;$forceUpdate();"
+                    :min-date="new Date(2010,0,1)"
+                    :max-date="new Date(2030,11,31)"/>
+                </van-popup>
+                <!-- 执行人 -->
+                <div style="border: 0.5px solid #87c3ff;margin:0.2rem;position:relative" v-for="item,index in taskform.executorList" :key="index">
+                    <van-field v-model="item.executorName" :label="'执行人' + (index + 1)" placeholder="请选择执行人" @click="executorChange(item,index)" readonly clickable></van-field>
+                    <van-field label="计划工时">
+                        <template #input>
+                            <van-stepper v-model="item.planHours" :disabled="!canEdit"/><span>{{'\u3000h'}}</span>
+                        </template>
+                    </van-field>
+                    <van-icon v-if="index != 0" class="delete_executor" name="delete-o" @click.stop="deleteExecutor(index)" />
+                </div>
+                <van-popup v-model="executor.show" position="bottom" v-if="canEdit">
+                    <van-search v-model="executor.searchText" placeholder="输入员工姓名搜索" @search="onSearch" v-if="user.userNameNeedTranslate != '1'"></van-search>
+                    <div style="minHeight:300px;">
+                        <van-radio-group v-model="executor.item">
+                            <van-radio v-for="uitem in executor.searchList" :key="uitem.id" :name="uitem" style="padding:10px">
+                                <span>{{uitem.name}}</span>
+                            </van-radio>
+                        </van-radio-group>
+                    <van-button style="width:100%;position: -webkit-sticky;position: sticky;bottom: 0;" @click="searchExecutor()">确定</van-button>
+                    </div>
+                </van-popup>
+                <!-- 添加执行人 -->
+                <div class="add_executor" @click="addExecutor" v-if="canEdit">添加执行人</div>
+                <!-- 优先级 -->
+                <van-field v-model="taskform.taskLevel" label="优先级" @click="taskLevel.show = true" readonly clickable>
+                    <template #input><span>{{taskLevel.list[taskform.taskLevel]}}</span></template>
+                </van-field>
+                <van-popup v-model="taskLevel.show" position="bottom" v-if="canEdit">
+                    <van-picker
+                    show-toolbar
+                    :columns="taskLevel.list"
+                    @confirm="taskLevelChange"
+                    @cancel="taskLevel.show = false;$forceUpdate();"/>
+                </van-popup>
+
+            </van-form>
+            <div class="form_btn" style="position:fixed; bottom:0px;width:100%;">
+                <div style="padding-bottom:10px;">
+                    <van-button square block type="info" @click="submitTask" native-type="submit" style="width:100%;float:left;" :disabled="!canEdit">
+                        <div v-if="canEdit">保存</div>
+                        <div v-else>暂无权限编辑</div>
+                    </van-button>
+                </div>
+            </div>
+                    
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    data() {
+        return {
+            title: '编辑任务',
+            user: JSON.parse(localStorage.userInfo),
+            taskId: JSON.parse(sessionStorage.taskId),
+            canEdit: true,
+            taskform:{      // 表单
+                taskType: 0,
+                name: '',
+                startDate: null,
+                endDate: null,
+                finishDate: null,
+                taskLevel: 0,
+                executorList: [{executorName: '',executorId: '',planHours: 8}],
+
+            },
+            taskType:{
+                show: false,
+                list: ['任务','里程碑','风险']
+            },
+            startDateShow: false,
+            endDateShow: false,
+            finishDateShow: false,
+            taskLevel:{
+                show: false,
+                list: ['一般','重要','紧急']
+            },
+            executor:{
+                show: false,
+                item: {id:null,name:''},
+                index: 0,
+                list: [],
+                searchList: [],
+                searchText: ''
+            }
+
+        }
+    },
+    mounted() {
+        if(!this.taskId.addNew){
+            this.title = '编辑任务'
+            this.getTask()
+        }else{
+            this.title = '新建任务'
+            this.taskform = {
+                projectId: JSON.parse(sessionStorage.projectId),
+                groupId: this.taskId.groupId,
+                stagesId: this.taskId.stagesId,
+                taskType: 0,
+                name: '',
+                startDate: null,
+                endDate: null,
+                finishDate: null,
+                taskLevel: 0,
+                executorList: [{executorName: '',executorId: '',planHours: this.user.timeType.allday}]
+            }
+        }
+        this.getUsersList()
+        console.log('mounted',this.taskId,null);
+    },
+    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()}`;
+        },
+
+
+        tasktypeChange(value,key){      // 类型
+            this.taskform.taskType = key
+            this.taskType.show = false
+        },
+        startDateChange(date){          // 开始时间
+            this.taskform.startDate = this.formatDate(date)
+            this.startDateShow = false
+        },
+        endDateChange(date){            // 截止时间
+            this.taskform.endDate = this.formatDate(date)
+            this.endDateShow = false
+        },
+        finishDateChange(date){         // 完成时间
+            this.taskform.finishDate = this.formatDate(date)
+            this.finishDateShow = false
+        },
+        
+        executorChange(item,index){           // 选择执行人
+            this.executor.show = true
+            this.executor.index = index
+            this.executor.searchList.forEach(u=>{if (u.id == item.executorId) {
+                this.executor.item = u
+            }})
+        },
+        deleteExecutor(index){
+            console.log('deleteExecutor');
+            this.taskform.executorList.splice(index,1)
+            this.$forceUpdate();
+        },
+        addExecutor(){
+            console.log('addExecutor');
+            this.taskform.executorList.push({
+                executorName: '',
+                executorId: '',
+                planHours: this.user.timeType.allday
+            })
+            this.$forceUpdate();
+        },
+        onSearch(val) {
+            console.log(val);
+            this.executor.searchList = [];
+            this.executor.list.forEach(u=>{if (u.name.startsWith(val)) {
+                this.executor.searchList.push(u);
+            }})
+        },
+        searchExecutor(){
+            this.taskform.executorList[this.executor.index].executorId = this.executor.item.id
+            this.taskform.executorList[this.executor.index].executorName = this.executor.item.name
+            this.executor.show = false
+            console.log('searchExecutor',this.executor.item,this.executor.item.name);
+        },
+
+        taskLevelChange(value,key){     // 优先级
+            this.taskform.taskLevel = key
+            this.taskLevel.show = false
+        },
+
+        submitTask(){
+            console.log('submitTask');
+            
+            // 执行人查重
+            let arr = this.taskform.executorList
+            let json={};
+            for(let i in arr){
+                if(!json[arr[i].executorId]){
+                    json[arr[i].executorId]=1;
+                }else{
+                    this.$toast.fail("执行人存在重复");
+                    return
+                }
+            }
+
+            // 去除未选择执行人的执行人列表
+            this.taskform.executorList = this.taskform.executorList.filter(item => item.executorId)
+            this.taskform.executorListStr = JSON.stringify(this.taskform.executorList)
+            
+            delete this.taskform.executorList
+            delete this.taskform.subTaskList;
+            delete this.taskform.refTaskList;
+            delete this.taskform.progress;
+            this.$axios.post("/task/save", this.taskform)
+            .then(res => {
+                if(res.code == "ok") {
+                    this.$toast.success('保存成功');
+                    this.back()
+                } else {
+                    this.$toast.fail('保存失败');
+                }
+            }).catch(err=> {this.$toast.clear();console.log(err)});
+
+        },
+
+        getTask(){
+            this.$axios.post("/task/getTask", {
+                id: this.taskId.id
+            }).then(res => {
+                if(res.code == "ok") {
+                    this.taskform = res.data
+                    this.taskform.createDate = null;
+                    this.taskform.indate = null;
+                    let projectManagement = false
+
+                    // 判断编辑权限
+                    for(let i in this.user.functionList){
+                        if(this.user.functionList[i].name == '查看全部项目'){
+                            projectManagement = true
+                        }
+                    }
+                    if(this.user.id == res.data.createrId || this.user.id == res.data.projectInchargerId || this.user.id == res.data.groupInchargerId || projectManagement || this.title == '新建任务'){
+                        this.canEdit = true
+                    }else{
+                        this.canEdit = false
+                    }
+
+
+                    // (
+                    //     (
+                    //         (addForm.executorListFront == null || addForm.executorListFront.length<10) 
+                    //         && (
+                    //             addForm.id == null|| user.id == addForm.createrId || currentProject.inchargerId == user.id || permissions.projectManagement
+                    //         )
+                    //     ) 
+                    //     || groupResponsibleId == user.id
+                    // )
+
+
+
+                    // this.canEdit = false
+                } else {
+                    this.$toast.fail('获取失败');
+                }
+            }).catch(err=> {this.$toast.clear();console.log(err)});
+        },
+        getUsersList(){
+            this.$axios.post("/user/getSimpleActiveUserList", {})
+            .then(res => {
+                if(res.code == "ok") {
+                    this.executor.list = res.data
+                    this.executor.searchList = 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;
+    .add_executor{
+        font-size:13px;
+        color:#1989fa;
+        padding-left:0.42667rem;
+        padding-bottom:.2rem;
+        width:100px
+    }
+    .delete_executor{
+        position: absolute;
+        top: 3px;
+        right: 3px;
+        font-size: 22px;
+        color: #c03131;
+    }
+}
+</style>

+ 36 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/task/index.vue

@@ -49,7 +49,7 @@
                 <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-calendar v-model="select_date_show" type="range" @confirm="dateChange" :min-date="new Date(2010,0,1)" :max-date="new Date(2030,11,31)" />
     </van-sticky>
 
         <div class="taskList" v-if="taskList.length != 0">
@@ -60,6 +60,12 @@
                     <span v-if="item.startDate && item.endDate">{{(item.startDate ? item.startDate : ' - ') + '\u3000至\u3000' + (item.endDate ? item.endDate : ' - ')}}</span>
                     <span v-else></span>
                 </div>
+                <div class="task_button">
+                    <van-button size="small" type="info" @click="toEditask(item.id)">编辑</van-button>
+                    <van-button size="small" type="primary" @click="taskStatus(item.id,0)" v-if="select_state == '进行中'">完成</van-button>
+                    <van-button size="small" color="#e6a23c" @click="taskStatus(item.id,1)" v-else>重启</van-button>
+
+                </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>
@@ -99,6 +105,28 @@ export default {
         back() {
             history.back();
         },
+        toEditask(taskid){    // 跳转编辑任务
+            sessionStorage.setItem('taskId',JSON.stringify({
+                addNew: false,
+                id: taskid,
+                groupId: null,
+                stagesId: null
+            }))
+            this.$router.push("/editask");
+        },
+        taskStatus(taskid,status){          // 改变任务状态
+            this.$axios.post("/task/finish", {
+                id: taskid,
+                taskStatus: status
+            }).then(res => {
+                if(res.code == "ok") {
+                    this.$toast.success('操作成功');
+                    this.getList()
+                } else {
+                    this.$toast.fail('获取失败');
+                }
+            }).catch(err=> {this.$toast.clear();console.log(err)});
+        },
         formatDate(date) {
             let mon = date.getMonth() + 1
             return `${date.getFullYear()}-${mon<10?'0'+mon:mon}-${date.getDate()<10?'0'+date.getDate():date.getDate()}`;
@@ -173,6 +201,13 @@ export default {
 .content{
     margin-top: 46px;
     // overflow: auto;
+    .task_button{
+        padding-top: .09rem;
+        text-align: right;
+        button{
+            margin-left: .2667rem;
+        }
+    }
 }
 // .dateSelectCell{
 //     height: 1.2rem;