Browse Source

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

# Conflicts:
#	fhKeeper/formulahousekeeper/timesheet_h5/vue.config.js
山水共长天一色 3 năm trước cách đây
mục cha
commit
7200fc0a48

+ 12 - 11
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/ProjectRequirementController.java

@@ -154,7 +154,7 @@ public class ProjectRequirementController {
             List<ProjectRequirement> projectRequirementList = projectRequirementMapper.selectList(null);
             List<ProjectRequirement> projectRequirements=new ArrayList<>();
             for (int rowIndex = 0; rowIndex <= rowNum; rowIndex++) {
-                XSSFRow row = sheet.getRow(rowIndex);
+                XSSFRow row = sheet.getRow(rowIndex+1);
                 if (row == null) {
                     continue;
                 }
@@ -164,23 +164,24 @@ public class ProjectRequirementController {
                 }
                 //项目编号	任务需求  人员需求
                 XSSFCell codeCell = row.getCell(0);
-                XSSFCell nameCell = row.getCell(1);
-                XSSFCell taskReqCell = row.getCell(2);
-                XSSFCell membReqCell = row.getCell(3);
-                if(nameCell==null&&codeCell==null){
-                    throw new Exception("项目编号以及名称不能同时不存在");
-                }
+                XSSFCell taskReqCell = row.getCell(1);
+                XSSFCell membReqCell = row.getCell(2);
+
                 if (codeCell != null)codeCell.setCellType(CellType.STRING);
-                if (nameCell != null)nameCell.setCellType(CellType.STRING);
                 if (taskReqCell != null)taskReqCell.setCellType(CellType.STRING);
                 if (membReqCell != null)membReqCell.setCellType(CellType.STRING);
                 ProjectRequirement projectRequirement=new ProjectRequirement();
+                if(codeCell==null){
+                    throw new Exception("项目编号/名称不能为空");
+                }
+                System.out.println(codeCell.getStringCellValue());
                 List<Project> list = projectList.stream().filter(project ->
                         (StringUtils.isEmpty(project.getProjectCode())?"":project.getProjectCode()).equals(codeCell.getStringCellValue())
-                        || (StringUtils.isEmpty(project.getProjectName())?"":project.getProjectName()).equals(nameCell.getStringCellValue())
+                        || (StringUtils.isEmpty(project.getProjectName())?"":project.getProjectName()).equals(codeCell.getStringCellValue())
                 ).collect(Collectors.toList());
-                if(StringUtils.isEmpty(list)){
-                    msg.setError("项目编号/名称"+codeCell.getStringCellValue()+"/"+nameCell.getStringCellValue()+"不存在");
+                if(list.size()<=0){
+                    msg.setError("项目编号/名称"+codeCell.getStringCellValue()+"不存在");
+                    return msg;
                 }else{
                     list.forEach(li->{
                         projectRequirement.setProjectId(li.getId());

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

@@ -826,7 +826,7 @@ public class ReportController {
             }
         }
 
-        if (!createDate[0].contains("@") && targetUids.length == 0) {
+        if (!createDate[0].contains("@") && (targetUids==null || targetUids.length == 0)) {
             //不是批量,可能是按周填报。
             boolean isWeeklyFill = true;
             if (reportList.stream().anyMatch(r->r.getId() != null)) {

+ 17 - 16
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/controller/TaskController.java

@@ -2,41 +2,27 @@ package com.management.platform.controller;
 
 
 import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.management.platform.entity.*;
 import com.management.platform.entity.vo.SysRichFunction;
 import com.management.platform.mapper.*;
 import com.management.platform.service.*;
 import com.management.platform.util.HttpRespMsg;
 import org.assertj.core.util.Lists;
-import org.opencv.features2d.SimpleBlobDetector;
-import org.springframework.format.annotation.DateTimeFormat;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.util.StringUtils;
-import org.springframework.web.bind.WebDataBinder;
-import org.springframework.web.bind.annotation.InitBinder;
 import org.springframework.web.bind.annotation.RequestMapping;
-
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.context.request.WebRequest;
 import org.springframework.web.multipart.MultipartFile;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
-import java.awt.*;
-import java.beans.PropertyChangeListener;
-import java.beans.PropertyEditor;
-import java.sql.Blob;
-import java.text.SimpleDateFormat;
 import java.time.LocalDate;
 import java.time.format.DateTimeFormatter;
 import java.util.*;
-import java.util.List;
 import java.util.stream.Collectors;
-import java.util.stream.Stream;
 
 /**
  * <p>
@@ -81,6 +67,8 @@ public class TaskController {
     private TaskExecutorService taskExecutorService;
     @Resource
     private CompanyDingdingService companyDingdingService;
+    @Resource
+    private WxCorpInfoService wxCorpInfoService;
 
     @RequestMapping("/save")
     @Transactional
@@ -216,7 +204,20 @@ public class TaskController {
                         task.getName(), endStr);
             } else if (recpUserList.get(0).getCorpwxUserid() != null) {
                 //企业微信用户
-
+                WxCorpInfo wxCorpInfo = wxCorpInfoService.getOne(new QueryWrapper<WxCorpInfo>().eq("company_id", user.getCompanyId()));
+                recpUserList.forEach(ru->{
+                    String corpUid = ru.getCorpwxUserid();
+                    JSONObject json=new JSONObject();
+                    JSONArray dataJson=new JSONArray();
+                    JSONObject jsonObj=new JSONObject();
+                    jsonObj.put("key", "任务内容");
+                    jsonObj.put("value",task.getName());
+                    dataJson.add(jsonObj);
+                    json.put("template_id","tty9TkCAAAovv416zsWtn0e06CJ635HA");
+                    json.put("url", "https://open.weixin.qq.com/connect/oauth2/authorize?appid=ww4e237fd6abb635af&redirect_uri=http://mobworktime.ttkuaiban.com/api/corpWXAuth&response_type=code&scope=snsapi_base&state=0#wechat_redirect");
+                    json.put("content_item",dataJson);
+                    wxCorpInfoService.sendWXCorpTemplateMsg(wxCorpInfo, corpUid, json);
+                });
             }
 
         }

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

@@ -268,6 +268,19 @@ public class ProjectPercentageServiceImpl extends ServiceImpl<ProjectPercentageM
             e.printStackTrace();
             msg.setError("文件加密状态,需要先解除加密状态再上传");
             return msg;
+        }finally {
+            //关闭流
+            try {
+                if (outputStream != null && inputStream != null) {
+                    outputStream.close();
+                    inputStream.close();
+                    System.out.println("流已关闭");
+                }
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+//            file.deleteOnExit();//程序退出时删除临时文件
+            System.out.println(file.delete());
         }
     }
 }

+ 30 - 3
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ProjectServiceImpl.java

@@ -1860,7 +1860,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         HttpRespMsg msg = new HttpRespMsg();
         String token = request.getHeader("TOKEN");
         User user = userMapper.selectById(token);
-        List<Map<String, Object>> list = projectMapper.getOvertimeList(userId, user.getCompanyId(), startDate, endDate, projectId);
+        List<Map<String, Object>> list = projectMapper.getOvertimeDetail(userId, user.getCompanyId(), startDate, endDate, projectId);
         boolean hasViewSalary = sysFunctionService.hasPriviledge(user.getRoleId(), "查看加班成本");
         if (!hasViewSalary) {
             //去掉权限
@@ -1869,6 +1869,7 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
                 item.remove("cost");
             }
         }
+
         msg.data = list;
         return msg;
     }
@@ -1879,11 +1880,19 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
         try {
             String token = request.getHeader("TOKEN");
             User user = userMapper.selectById(token);
-            List<Map<String, Object>> list = projectMapper.getOvertimeList(userId, user.getCompanyId(), startDate, endDate, projectId);
+            TimeType timeType = timeTypeMapper.selectById(user.getCompanyId());
+            List<Map<String, Object>> list = projectMapper.getOvertimeDetail(userId, user.getCompanyId(), startDate, endDate, projectId);
             boolean hasViewSalary = sysFunctionService.hasPriviledge(user.getRoleId(), "查看加班成本");
             BigDecimal totalMoneyCost = BigDecimal.valueOf(0);
             List<String> headList = new ArrayList<String>();
-            headList.add("人员");
+            headList.add("序号");
+            headList.add("项目编号");
+            headList.add("项目名称");
+            headList.add(timeType.getCustomDegreeName());
+            headList.add("姓名");
+            headList.add("部门");
+            headList.add("工作日期");
+            headList.add("工作时长(h)");
             headList.add("加班工时(h)");
             if (hasViewSalary) {
                 headList.add("加班成本(元)");
@@ -1892,21 +1901,39 @@ public class ProjectServiceImpl extends ServiceImpl<ProjectMapper, Project> impl
             List<List<String>> allList = new ArrayList<List<String>>();
             allList.add(headList);
             double totalCostTime = 0;
+            double totalWorkTime = 0;
+            int seq = 1;
             for (Map<String, Object> map : list) {
                 totalMoneyCost = totalMoneyCost.add((BigDecimal)map.get("cost"));
                 totalCostTime += (Double)map.get("overtimeHours");
+                totalWorkTime += (Double)map.get("workingTime");
                 List<String> rowData = new ArrayList<String>();
+                rowData.add(""+seq);
+                rowData.add((String)map.get("projectCode"));
+                rowData.add((String)map.get("projectName"));
+                rowData.add((String)map.get("degreeName"));
                 rowData.add((String)map.get("username"));
+                rowData.add((String)map.get("departmentName"));
+                rowData.add((String)map.get("createDate"));
+                rowData.add(((Double)map.get("workingTime")).toString());
                 rowData.add(((Double)map.get("overtimeHours")).toString());
                 if (hasViewSalary) {
                     rowData.add(((BigDecimal)map.get("cost")).toString());
                 }
                 allList.add(rowData);
+                seq++;
             }
             String total = totalMoneyCost.toString();
             //合计
             List<String> sumRow = new ArrayList<String>();
             sumRow.add("合计");
+            sumRow.add("");
+            sumRow.add("");
+            sumRow.add("");
+            sumRow.add("");
+            sumRow.add("");
+            sumRow.add("");
+            sumRow.add(""+totalWorkTime);
             sumRow.add(""+totalCostTime);
             if (hasViewSalary) {
                 sumRow.add(totalMoneyCost.toString());

+ 7 - 4
fhKeeper/formulahousekeeper/management-platform/src/main/resources/mapper/ProjectMapper.xml

@@ -395,11 +395,15 @@
 
     <!-- 获取某个员工的某时间段内的加班详情 -->
     <select id="getOvertimeDetail" resultType="java.util.Map">
-        SELECT date_format(report.`create_date`, '%Y-%m-%d') AS createDate, report.`creator_id` AS userId, user.`name` AS username, SUM(report.`working_time`) AS workingTime,
-        IFNULL(SUM(report.`overtime_hours`), 0) AS overtimeHours,
+        SELECT date_format(report.`create_date`, '%Y-%m-%d') AS createDate,
+        report.`creator_id` AS userId, user.`name` AS username, report.`working_time` AS workingTime,
+        IFNULL(report.`overtime_hours`, 0) AS overtimeHours,
         project.project_name as projectName,project.project_code as projectCode,
-        IFNULL(SUM(report.overtime_cost), 0) AS cost FROM report LEFT JOIN user ON user.id = report.`creator_id`
+        IFNULL(report.overtime_cost, 0) AS cost,
+        IFNULL(report_extra_degree.name,'') as degreeName, department.department_name as departmentName FROM report LEFT JOIN user ON user.id = report.`creator_id`
         left join project on project.id = report.project_id
+        left join report_extra_degree on report_extra_degree.id = report.degree_id
+        left join department on department.department_id = report.dept_id
         WHERE report.is_overtime = 1
         and report.`state` = 1
         AND report.`create_date` BETWEEN #{startDate} and #{endDate}
@@ -410,7 +414,6 @@
         <if test="userId != null">
             AND report.`creator_id` = #{userId}
         </if>
-        group by report.create_date
     </select>
     <!--按照项目内的阶段名称分组统计工时-->
     <select id="getDegreeCost" resultType="java.util.Map">

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

@@ -1,7 +1,8 @@
 var path = require('path')
 
 //  var ip = '127.0.0.1'
-var ip = '192.168.2.39'
+// var ip = '192.168.2.39'
+var ip = '192.168.2.2'
 // var ip = '192.168.2.39'
 // var ip = '192.168.2.12'// var ip = '47.100.37.243' 
 

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

@@ -516,7 +516,7 @@
                 }
             }
             .logo-width {
-                width: 230px;
+                width: 200px;
             }
             .logo-collapse-width {
                 width: 60px;
@@ -562,8 +562,8 @@
                 width: 60px;
             }
             .menu-expanded {
-                flex: 0 0 230px;
-                width: 230px;
+                flex: 0 0 200px;
+                width: 200px;
             }
             .content-container {
                 flex: 1;

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

@@ -48,7 +48,7 @@
             <!--项目报表 -->
             <el-table v-if="ins == 0" :key="ins" border :data="list0" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;">
                 <el-table-column  prop="projectCode" label="项目编号"  width="120"></el-table-column>
-                <el-table-column  prop="projectName" label="项目名称" >
+                <el-table-column  prop="projectName" label="项目名称" width="200">
                   <template slot-scope="scope" >
                     {{scope.row.projectName}}
                   </template>

+ 21 - 4
fhKeeper/formulahousekeeper/timesheet/src/views/expense/expense.vue

@@ -112,7 +112,10 @@
             <el-table-column prop="projectName" label="所属项目" width="180">
               <template slot-scope="scope">
                 <el-select size="small" v-model="scope.row.projectId" placeholder="项目" style="width: 150px" filterable>
-                  <el-option v-for="(item, index) in projectList" :key="index" :label="item.projectName" :value="item.id" @click="ok(item)"></el-option>
+                  <el-option v-for="(item, index) in projectList" :key="index" :label="item.projectName + item.projectCode" :value="item.id" @click="ok(item)">
+                    <span style="float: left;color: #8492a6; font-size: 13px">{{ item.projectCode }}</span>
+                    <span style="float: right;margin-left: 20px">{{ item.projectName }}</span>
+                  </el-option>
                 </el-select>
               </template>
             </el-table-column>
@@ -331,7 +334,10 @@
             <el-table-column prop="projectId" label="项目" width="155">
                 <template slot-scope="scope">
                   <el-select size="small" v-if="!flg" v-model="scope.row.projectId" placeholder="项目" style="width: 130px">
-                    <el-option v-for="(item, index) in projectList" :key="index" :label="item.projectName" :value="item.id" @click="ok(item)"></el-option>
+                    <el-option v-for="(item, index) in projectList" :key="index" :label="item.projectName + item.projectCode" :value="item.id" @click="ok(item)">
+                      <span style="float: left;color: #8492a6; font-size: 13px">{{ item.projectCode }}</span>
+                      <span style="float: right;margin-left: 20px">{{ item.projectName }}</span>
+                    </el-option>
                   </el-select>
                   <!-- <span v-else>{{projectIdName[scope.$index].projectName}}</span> -->
                   <div v-else>
@@ -367,7 +373,7 @@
             </el-table-column>
             <el-table-column prop="amount" label="费用金额(含税:元)" width="172">
               <template slot-scope="scope">
-                <el-input size="small"  v-if="!flg" :id="'am'+scope.$index" v-model="scope.row.amount" @change="kan" @keyup.native="restrictNumber('am'+scope.$index)"></el-input>
+                <el-input size="small"  v-if="!flg" :id="'am'+scope.$index" v-model="scope.row.amount" @input="zhiNum(scope.$index, scope)" @change="kan" @keyup.native="restrictNumber('am'+scope.$index)"></el-input>
                 <span v-else>¥{{scope.row.amount}}</span>
               </template>
             </el-table-column>
@@ -379,7 +385,7 @@
             </el-table-column>
             <el-table-column prop="taxPercent" label="税率%" width="172">
               <template slot-scope="scope">
-                <el-input size="small"  v-if="!flg" v-model="scope.row.taxPercent"></el-input>
+                <el-input size="small"  v-if="!flg" v-model="scope.row.taxPercent" @input="zhiNum(scope.$index, scope)"></el-input>
                 <span v-else>{{scope.row.taxPercent}}</span>
               </template>
             </el-table-column>
@@ -999,6 +1005,7 @@ export default {
       }, 0)
     },
     zhi(e) {
+      console.log('看看值', e)
       var i = e
       if(this.invoiceList[i].amount == null || this.invoiceList[i].amount == 'null' || this.invoiceList[i].taxPercent == null || this.invoiceList[i].taxPercent == 'null') {
         return
@@ -1009,6 +1016,16 @@ export default {
       var zhi = this.invoiceList[i].amount / (1 + shui) * shui
       this.invoiceList[i].taxValue = zhi.toFixed(2)
     },
+    zhiNum(i, val) {
+      console.log('看看值', i, val)
+      console.log(this.ParticularsList.invoiceList)
+      if(this.ParticularsList.invoiceList[i].amount == null || this.ParticularsList.invoiceList[i].amount == 'null' || this.ParticularsList.invoiceList[i].taxPercent == null || this.ParticularsList.invoiceList[i].taxPercent == 'null') {
+        return
+      }
+      var shui =  this.ParticularsList.invoiceList[i].taxPercent / 100
+      var zhi = this.ParticularsList.invoiceList[i].amount / (1 + shui) * shui
+      this.ParticularsList.invoiceList[i].taxValue = zhi.toFixed(2)
+    },
     zhis(e) {
       var i = e
       this.invoiceList[i].taxValue = this.invoiceList[i].taxValue.toFixed(2)

+ 36 - 18
fhKeeper/formulahousekeeper/timesheet/src/views/leave/list.vue

@@ -1,6 +1,6 @@
 <template>
-  <section>
-    <div class="sidebars" ref="sidebars" style="width: 200px;display: block;background: #fff">
+  <section id="section">
+    <div class="sidebars" ref="sidebars" :style="'width: 180px;display: block;background: #fff;height:'+hubs+ 'px'">
       <h3><i class="iconfont firerock-iconbaoxiao" style="padding-right: 10px"></i>请假管理</h3>
       <el-divider ></el-divider>
       <el-col :span="12">
@@ -87,7 +87,7 @@
     <!-- 上面部分 -->
     <div v-if="!displayTable && apk == false" class="tops">
         <!-- 公共 -->
-        <div class="ctons">
+        <div class="ctons" :style="'width: '+kuanBl+'px'">
             <!-- 表单 -->
             <el-form ref="addForm" :model="addForm" label-width="80px" :rules="addFormRules">
                 <!-- 请假类型 -->
@@ -172,10 +172,10 @@
     <!-- 下面部分 -->
     <div v-if="displayTable && apk == false" class="tops">
         <!-- 公共 -->
-        <div class="ctons">
+        <div class="ctons" :style="'width: '+kuanBl+'px'">
           <div class="flex">
             <div>
-              <el-select v-model="ownerIds" placeholder="请选择请假人" clearable @change="chufas()" style="width: 180px" size="small" v-show="permissions.leaveAll" filterable="true">
+              <el-select v-model="ownerIds" placeholder="请选择请假人" clearable @change="chufas()" style="width: 160px" size="small" v-show="permissions.leaveAll" filterable="true">
                   <span v-for="(item, index) in users" :key="index">
                   <el-option :label="item.name" :value="item.id"></el-option>
                   </span> 
@@ -183,7 +183,7 @@
             </div>
             <div>
               <span style="color: #606266">请假类型</span>
-              <el-select v-model="type" placeholder="请选择请假类型" clearable @change="chufas()" style="width: 180px;" size="small" filterable="true">
+              <el-select v-model="type" placeholder="请选择请假类型" clearable @change="chufas()" style="width: 160px;" size="small" filterable="true">
                   <span v-for="(item, index) in typess" :key="index">
                   <el-option :label="item.name" :value="item.id"></el-option>
                   </span> 
@@ -191,12 +191,12 @@
             </div>
             <div>
               <span style="color: #606266">请假状态</span>
-              <el-select v-if="falg == 0" v-model="code" placeholder="请选择请假状态" clearable @change="chufas()" size="small" style="width: 180px" filterable="true">
+              <el-select v-if="falg == 0" v-model="code" placeholder="请选择请假状态" clearable @change="chufas()" size="small" style="width: 160px" filterable="true">
                   <span v-for="(item, index) in statuss" :key="index">
                   <el-option :label="item.name" :value="item.id"></el-option>
                   </span> 
               </el-select>
-              <el-select v-if="falg == 1" disabled v-model="code" placeholder="请选择请假类型" clearable @change="chufas()" size="small" style="width: 180px" filterable="true">
+              <el-select v-if="falg == 1" disabled v-model="code" placeholder="请选择请假类型" clearable @change="chufas()" size="small" style="width: 160px" filterable="true">
                   <span v-for="(item, index) in statuss" :key="index">
                   <el-option :label="item.name" :value="item.id"></el-option>
                   </span> 
@@ -291,7 +291,7 @@
     <!-- 统计部分 -->
     <div v-if="displayTable && apk && apk2 == 4" class="tops">
       <!-- 公共 -->
-        <div class="ctons">
+        <div class="ctons" :style="'width: '+kuanBl+'px'">
           <div style="display: flex;align-items: center;padding-bottom: 20px;border-bottom: 1px solid #f2f2f2">
             <div style="display: inline-block;width: 350px">
               <el-input style="float:left;" v-model="keyword" class="input-with-select" placeholder="请输入人员搜索" clearable="true" size="small">
@@ -356,7 +356,7 @@
 <!-- 审批流 -->
     <div v-if="displayTable && apk && apk2 == 5" class="tops">
         
-        <div class="ctons">
+        <div class="ctons" :style="'width: '+kuanBl+'px'">
         <el-col :span="6" >
             <el-scrollbar style="height:100%;border:1px solid #dddddd;margin-left:15px;" >
             <div class="tree" :style="'height:'+ (tableHeight-120) + 'px'">
@@ -420,7 +420,7 @@
     </div>
   <!-- 年假管理 -->
     <div v-if="displayTable && apk && apk2 == 6" class="tops">
-      <div class="ctons">
+      <div class="ctons" :style="'width: '+kuanBl+'px'">
         <div style="display: flex;align-items: center;padding-bottom: 20px;border-bottom: 1px solid #f2f2f2">
             <div style="display: inline-block;width: 18%;margin-left:1%">
               <el-button size="small" @click="changeAltime(0)">批量设置</el-button>
@@ -496,7 +496,7 @@
 
     <div v-if="displayTable && apk && apk2 == 8" class="tops">
         <!-- 公共 -->
-        <div class="ctons">
+        <div class="ctons" :style="'width: '+ kuanBl +'px'">
           <div class="flex">
             <div>
               <span>请假类型</span>
@@ -821,12 +821,17 @@ export default {
       departmentOptions: [],
       departmentSel: [],
       userSelId: '',
-      synchronizeLoading: false
+      synchronizeLoading: false,
+      kuanBl: 0,
+      hubs: 0
     };
   },
   computed: {},
   watch: {},
   created() {
+    let widTHBul = document.documentElement.clientWidth - 440
+    this.kuanBl = widTHBul
+    this.hubs = document.documentElement.clientHeight || document.body.clientHeight
     let height = window.innerHeight;
             this.tableHeight = height - 195;
             const that = this;
@@ -838,19 +843,32 @@ export default {
   },
 
   mounted() {
+    // this.watchSize()
     if(this.isDingding){
       this.bills(false,2)
       this.staffs(7,['7'])
       this.getUsers()
     }else{
       this.getUsers() // 获取人员信息
-    this.getDepartment();
-    this.getAl();
-    this.getApproverList()
+      this.getDepartment();
+      this.getAl();
+      this.getApproverList()
     }
   },
   filters: {},
   methods: {
+    // 监听元素
+    //  watchSize() {
+    //    const _this = this;
+    //    var erd = elementResizeDetectorMaker();
+    //    erd.listenTo(this.$refs.section, (element) => { // 这里的this.$refs.fan指定要监听的元素对象,对应的是<div ref="fan"></div>
+    //      var width = element.offsetWidth;
+    //      var height = element.offsetHeight;
+    //      _this.$nextTick(() => { // 这里填写监听改变后的操做
+    //       	console.log('触发监听')
+    //      });
+    //    });
+    //  },
     // 从钉钉同步假期剩余表
     listSynchronize(){
       this.synchronizeLoading = true
@@ -2018,10 +2036,10 @@ export default {
     position: absolute;
     background: #f7f7f7;
     box-sizing: border-box;
-    padding: 20px 0 0 220px;
+    padding: 20px 0 0 200px;
 }
 .ctons {
-    width: 86%;
+    /* width: 86%; */
     height: 92%;
     overflow: hidden;
     background: #fff;

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

@@ -71,7 +71,7 @@
         </el-col>
 
         <!--列表-->
-        <el-table ref="projectlistOfWudulist" :data="list" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;" @selection-change="checkedWudulist">
+        <el-table ref="projectlistOfWudulist" :data="list" highlight-current-row v-loading="listLoading" :height="tableHeight - 28" style="width: 100%;" @selection-change="checkedWudulist">
             <el-table-column type="selection" width="60" :selectable="isSelectable">
                 <!-- creator 项目创建人    incharger 项目负责人 -->
             </el-table-column>

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

@@ -328,7 +328,7 @@
                     <!--移除执行人 -->
                     <i class="el-icon-delete" v-if="index>0 && (addForm.id == null|| user.id == addForm.createrId || currentProject.inchargerId == user.id)" style="margin-left:5px" @click="removeExecutorLine(index)"></i>
                 </el-form-item>
-                <el-link type="primary" v-if="(addForm.executorListFront == null || addForm.executorListFront.length<10)&& (addForm.id == null|| user.id == addForm.createrId || currentProject.inchargerId == user.id)" style="margin-left:35px;" @click="addExecutorLine">添加执行人</el-link>
+                <el-link type="primary" v-if="(addForm.executorListFront == null || addForm.executorListFront.length<10)&& (addForm.id == null|| user.id == addForm.createrId || currentProject.inchargerId == user.id || permissions.projectManagement)" style="margin-left:35px;" @click="addExecutorLine">添加执行人</el-link>
                 </div>
                 <el-form-item label="优先级">
                     <el-select v-model="addForm.taskLevel" style="width:100%;" >

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

@@ -3,17 +3,17 @@ const pxtorem = require("postcss-pxtorem");
 const path = require('path');
 const themePath = path.resolve(__dirname,'src/assets/style/theme.less');
 
-var ip = '192.168.2.2'
+// var ip = '192.168.2.2'
 // var ip = '127.0.0.1'
-// 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 = {
     // 关闭eslint检查