Compare commits

..

No commits in common. "b02c67b7a311288b7fb954c7d9bc36d51ba578af" and "467e9755fcd460c4caf7306d2638a6159d64dc44" have entirely different histories.

22 changed files with 219 additions and 679 deletions

View File

@ -5,22 +5,20 @@ package com.yanzhu.common.core.enums;
*/ */
public enum UserTypeEnums { public enum UserTypeEnums {
ZSRY("00", "正式人员",""), ZSRY("00", "正式人员"),
LSRY("08", "临时人员",""), LSRY("08", "临时人员"),
FBWTDL("80", "分包代理人","fbwtdl"), FBWTDL("80", "分包代理人"),
FBXMJL("79", "分包项目经理","fbxmjl"), FBXMJL("79", "分包项目经理"),
FBBZZZ("78", "分包班组组长","fbbzzz"), FBBZZZ("78", "分包班组组长"),
FBLWRY("77", "分包劳务人员",""); FBLWRY("77", "分包劳务人员");
private final String code; private final String code;
private final String info; private final String info;
private final String keys;
UserTypeEnums(String code, String info, String keys) UserTypeEnums(String code, String info)
{ {
this.code = code; this.code = code;
this.info = info; this.info = info;
this.keys = keys;
} }
public String getCode() public String getCode()
@ -33,9 +31,4 @@ public enum UserTypeEnums {
return info; return info;
} }
public String getKeys()
{
return keys;
}
} }

View File

@ -55,9 +55,6 @@ public class FlowTaskEntity extends BaseEntity {
@ApiModelProperty("流程发起人名称") @ApiModelProperty("流程发起人名称")
private String startUserName; private String startUserName;
@ApiModelProperty("流程发起人班组")
private Long startUserGroupId;
@ApiModelProperty("流程发起人单位") @ApiModelProperty("流程发起人单位")
private String startDeptName; private String startDeptName;
@ -409,12 +406,4 @@ public class FlowTaskEntity extends BaseEntity {
public void setBusinessMk3(String businessMk3) { public void setBusinessMk3(String businessMk3) {
this.businessMk3 = businessMk3; this.businessMk3 = businessMk3;
} }
public Long getStartUserGroupId() {
return startUserGroupId;
}
public void setStartUserGroupId(Long startUserGroupId) {
this.startUserGroupId = startUserGroupId;
}
} }

View File

@ -1,7 +1,6 @@
package com.yanzhu.flowable.mapper; package com.yanzhu.flowable.mapper;
import com.yanzhu.flowable.domain.my.FlowTaskEntity; import com.yanzhu.flowable.domain.my.FlowTaskEntity;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -67,11 +66,4 @@ public interface FlowBusinessKeyMapper {
*/ */
public List<Map<String, Object>> selectMyFinishedFlowTask(FlowTaskEntity flowTaskEntity); public List<Map<String, Object>> selectMyFinishedFlowTask(FlowTaskEntity flowTaskEntity);
/**
*
* @param proId
* @param userId
* @return
*/
public List<Map<String, Object>> selectMySubdeptsGroups(@Param("proId")Long proId, @Param("userId")Long userId);
} }

View File

@ -123,15 +123,6 @@ public interface SysRoleMapper
*/ */
public List<SysRole> findDeptRoleListByDeptId(Long deptId); public List<SysRole> findDeptRoleListByDeptId(Long deptId);
/**
* ID
*
* @param deptId ID
* @param roleKey
* @return
*/
public List<SysRole> findDeptRoleListByDeptIdAndKey(@Param("deptId") Long deptId, @Param("roleKey") String roleKey);
/** /**
* ID * ID
* *

View File

@ -69,9 +69,7 @@
<if test="startProId != null and startProId != ''"> and fa.startProId = #{startProId}</if> <if test="startProId != null and startProId != ''"> and fa.startProId = #{startProId}</if>
<if test="startProName != null and startProName != ''"> and fa.startProName like concat('%', #{startProName}, '%')</if> <if test="startProName != null and startProName != ''"> and fa.startProName like concat('%', #{startProName}, '%')</if>
<if test='activeTags == "depts"'> and fa.category = '1'</if> <if test='activeTags == "depts"'> and fa.category = '1'</if>
<if test='activeTags == "users"'> and fa.category in ('2','3','4') <if test='activeTags == "users"'> and fa.category in ('2','3','4')</if>
<if test="startUserGroupId != null"> and bus.sub_dept_group = #{startUserGroupId}</if>
</if>
<if test="assigneeId != null and roleIds != null and roleIds.size()>0"> <if test="assigneeId != null and roleIds != null and roleIds.size()>0">
AND (fa.ASSIGNEE_ = #{assigneeId} AND (fa.ASSIGNEE_ = #{assigneeId}
OR ( OR (
@ -147,11 +145,4 @@
order by fa.endTime desc order by fa.endTime desc
</select> </select>
<!--查询我的已办任务-->
<select id="selectMySubdeptsGroups" resultType="Map">
select * from pro_project_info_subdepts_users where project_id = #{proId} and user_id = #{userId} and user_post=3 and is_del=0
</select>
</mapper> </mapper>

View File

@ -89,15 +89,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by r.role_sort order by r.role_sort
</select> </select>
<select id="findDeptRoleListByDeptIdAndKey" resultMap="SysRoleResult">
select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.menu_check_strictly, r.dept_check_strictly,
r.status, r.del_flag, r.create_time, r.remark
from sys_role r
left join sys_role_dept rd on rd.role_id = r.role_id
where r.del_flag = '0' and rd.dept_id = ${deptId} and r.role_key like concat('%', #{roleKey}, '%')
order by r.role_sort
</select>
<select id="findDeptRoleListByComId" parameterType="Long" resultMap="SysRoleSysRoleDeptResult"> <select id="findDeptRoleListByComId" parameterType="Long" resultMap="SysRoleSysRoleDeptResult">
select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.menu_check_strictly, r.dept_check_strictly, select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.menu_check_strictly, r.dept_check_strictly,
r.status, r.del_flag, r.create_time, r.remark, rd.role_id as sub_role_id, rd.dept_id as sub_dept_id, d.dept_name as sub_dept_name r.status, r.del_flag, r.create_time, r.remark, rd.role_id as sub_role_id, rd.dept_id as sub_dept_id, d.dept_name as sub_dept_name

View File

@ -203,11 +203,8 @@ public class FlowBusinessKeyController extends BaseController {
* @return AjaxResult * @return AjaxResult
*/ */
@GetMapping(value = "/findMyTask") @GetMapping(value = "/findMyTask")
public AjaxResult findMyTask(String proId) { public AjaxResult findMyTask() {
FlowTaskEntity flowTaskEntity = new FlowTaskEntity(); FlowTaskEntity flowTaskEntity = new FlowTaskEntity();
if(StringUtils.isNotEmpty(proId)){
flowTaskEntity.setStartProId(proId);
}
flowTaskEntity.setAssigneeId(SecurityUtils.getUserId()); flowTaskEntity.setAssigneeId(SecurityUtils.getUserId());
List<SysRole> roles = SecurityUtils.getLoginUser().getSysUser().getRoles(); List<SysRole> roles = SecurityUtils.getLoginUser().getSysUser().getRoles();
if(StringUtils.isNotEmpty(roles)){ if(StringUtils.isNotEmpty(roles)){
@ -219,19 +216,12 @@ public class FlowBusinessKeyController extends BaseController {
flowTaskEntity.setRoleIds(roleIds); flowTaskEntity.setRoleIds(roleIds);
} }
List<Map<String, Object>> list = flowBusinessKeyService.selectMyAwaitFlowTask(flowTaskEntity); List<Map<String, Object>> list = flowBusinessKeyService.selectMyAwaitFlowTask(flowTaskEntity);
Map<String, Long> sumByCategory = list.stream()
.collect(Collectors.groupingBy(
map -> (String) map.get("category"),
Collectors.counting()
));
Map<String,Object> data = new HashMap<>(); Map<String,Object> data = new HashMap<>();
if(CollectionUtils.isNotEmpty(list)){ if(CollectionUtils.isNotEmpty(list)){
data.put("todo",list.size()); data.put("todo",list.size());
}else{ }else{
data.put("todo",0); data.put("todo",0);
} }
data.put("dwsh",Convert.toInt(sumByCategory.get("1"),0));
data.put("rysh",Convert.toInt(sumByCategory.get("2"),0)+Convert.toInt(sumByCategory.get("3"),0)+Convert.toInt(sumByCategory.get("4"),0));
return success(data); return success(data);
} }

View File

@ -1,8 +1,6 @@
package com.yanzhu.flowable.service.impl; package com.yanzhu.flowable.service.impl;
import com.yanzhu.common.core.text.Convert; import com.yanzhu.common.core.text.Convert;
import com.yanzhu.common.core.utils.StringUtils;
import com.yanzhu.common.security.utils.SecurityUtils;
import com.yanzhu.flowable.domain.my.FlowTaskEntity; import com.yanzhu.flowable.domain.my.FlowTaskEntity;
import com.yanzhu.flowable.mapper.FlowBusinessKeyMapper; import com.yanzhu.flowable.mapper.FlowBusinessKeyMapper;
import com.yanzhu.flowable.service.IFlowBusinessKeyService; import com.yanzhu.flowable.service.IFlowBusinessKeyService;
@ -10,7 +8,10 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.*; import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
/** /**
* *
@ -42,19 +43,10 @@ public class FlowBusinessKeyServiceImpl implements IFlowBusinessKeyService {
*/ */
@Override @Override
public Map<String,Object> quueryCount(FlowTaskEntity flowTaskEntity) { public Map<String,Object> quueryCount(FlowTaskEntity flowTaskEntity) {
// 查询用户是否是班组长... flowTaskEntity.setActiveTags("await");
if(Objects.nonNull(flowTaskEntity.getAssigneeId())){
List<Map<String, Object>> groups = flowBusinessKeyMapper.selectMySubdeptsGroups(Convert.toLong(flowTaskEntity.getStartProId()),SecurityUtils.getUserId());
if(StringUtils.isNotEmpty(groups)){
flowTaskEntity.setStartUserGroupId(Convert.toLong(groups.get(0).get("sub_dept_group")));
}
}
int awaitSize = flowBusinessKeyMapper.selectMyAwaitFlowTask(flowTaskEntity).size(); int awaitSize = flowBusinessKeyMapper.selectMyAwaitFlowTask(flowTaskEntity).size();
FlowTaskEntity finishedQuery = new FlowTaskEntity(); flowTaskEntity.setActiveTags("finished");
finishedQuery.setAssigneeId(SecurityUtils.getUserId()); int finishedSize = flowBusinessKeyMapper.selectAllFlowTaskByParams(flowTaskEntity).size();
finishedQuery.setStartProId(flowTaskEntity.getStartProId());
finishedQuery.setActiveTags(flowTaskEntity.getActiveTags());
int finishedSize = flowBusinessKeyMapper.selectMyFinishedFlowTask(finishedQuery).size();
Map<String, Object> dataMap = new HashMap<>(); Map<String, Object> dataMap = new HashMap<>();
dataMap.put("await",awaitSize); dataMap.put("await",awaitSize);
dataMap.put("finished",finishedSize); dataMap.put("finished",finishedSize);
@ -95,13 +87,6 @@ public class FlowBusinessKeyServiceImpl implements IFlowBusinessKeyService {
*/ */
@Override @Override
public List<Map<String, Object>> selectMyAwaitFlowTask(FlowTaskEntity flowTaskEntity){ public List<Map<String, Object>> selectMyAwaitFlowTask(FlowTaskEntity flowTaskEntity){
// 查询用户是否是班组长...
if(Objects.nonNull(flowTaskEntity.getAssigneeId())){
List<Map<String, Object>> groups = flowBusinessKeyMapper.selectMySubdeptsGroups(Convert.toLong(flowTaskEntity.getStartProId()),SecurityUtils.getUserId());
if(StringUtils.isNotEmpty(groups)){
flowTaskEntity.setStartUserGroupId(Convert.toLong(groups.get(0).get("sub_dept_group")));
}
}
return flowBusinessKeyMapper.selectMyAwaitFlowTask(flowTaskEntity); return flowBusinessKeyMapper.selectMyAwaitFlowTask(flowTaskEntity);
} }

View File

@ -98,7 +98,6 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
sysUser.setCreateBy(SecurityUtils.getUsername()); sysUser.setCreateBy(SecurityUtils.getUsername());
sysUser.setCreateTime(DateUtils.getNowDate()); sysUser.setCreateTime(DateUtils.getNowDate());
sysUser.setRemark(proProjectInfoSubdeptsGroup.getSubDeptName()); sysUser.setRemark(proProjectInfoSubdeptsGroup.getSubDeptName());
sysUser.setActiveProjectId(proProjectInfoSubdeptsGroup.getProjectId());
try { try {
remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER); remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER);
}catch (Exception e){ }catch (Exception e){
@ -137,7 +136,6 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
sysUser.setCreateBy(SecurityUtils.getUsername()); sysUser.setCreateBy(SecurityUtils.getUsername());
sysUser.setCreateTime(DateUtils.getNowDate()); sysUser.setCreateTime(DateUtils.getNowDate());
sysUser.setRemark(proProjectInfoSubdeptsGroup.getSubDeptName()); sysUser.setRemark(proProjectInfoSubdeptsGroup.getSubDeptName());
sysUser.setActiveProjectId(proProjectInfoSubdeptsGroup.getProjectId());
try { try {
remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER); remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER);
}catch (Exception e){ }catch (Exception e){

View File

@ -121,7 +121,6 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
sysUser.setCreateBy(SecurityUtils.getUsername()); sysUser.setCreateBy(SecurityUtils.getUsername());
sysUser.setCreateTime(DateUtils.getNowDate()); sysUser.setCreateTime(DateUtils.getNowDate());
sysUser.setRemark(proProjectInfoSubdepts.getSubDeptName()); sysUser.setRemark(proProjectInfoSubdepts.getSubDeptName());
sysUser.setActiveProjectId(proProjectInfoSubdepts.getProjectId());
try { try {
R<Long> userResult = remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER); R<Long> userResult = remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER);
proProjectInfoSubdepts.setSubDeptLeaderId(userResult.getData()); proProjectInfoSubdepts.setSubDeptLeaderId(userResult.getData());
@ -212,7 +211,6 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
sysUser.setCreateBy(DataSourceEnuns.APP.getInfo()); sysUser.setCreateBy(DataSourceEnuns.APP.getInfo());
sysUser.setCreateTime(DateUtils.getNowDate()); sysUser.setCreateTime(DateUtils.getNowDate());
sysUser.setRemark(proProjectInfoSubdepts.getSubDeptName()); sysUser.setRemark(proProjectInfoSubdepts.getSubDeptName());
sysUser.setActiveProjectId(proProjectInfoSubdepts.getProjectId());
try { try {
R<Long> userResult = remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER); R<Long> userResult = remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER);
proProjectInfoSubdepts.setSubDeptLeaderId(userResult.getData()); proProjectInfoSubdepts.setSubDeptLeaderId(userResult.getData());
@ -284,7 +282,6 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
sysUser.setUpdateBy(SecurityUtils.getUsername()); sysUser.setUpdateBy(SecurityUtils.getUsername());
sysUser.setUpdateTime(DateUtils.getNowDate()); sysUser.setUpdateTime(DateUtils.getNowDate());
sysUser.setRemark(proProjectInfoSubdepts.getSubDeptName()); sysUser.setRemark(proProjectInfoSubdepts.getSubDeptName());
sysUser.setActiveProjectId(proProjectInfoSubdepts.getProjectId());
try { try {
remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER); remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER);
}catch (Exception e){ }catch (Exception e){
@ -361,7 +358,6 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
sysUser.setUpdateBy(DataSourceEnuns.APP.getInfo()); sysUser.setUpdateBy(DataSourceEnuns.APP.getInfo());
sysUser.setUpdateTime(DateUtils.getNowDate()); sysUser.setUpdateTime(DateUtils.getNowDate());
sysUser.setRemark(proProjectInfoSubdepts.getSubDeptName()); sysUser.setRemark(proProjectInfoSubdepts.getSubDeptName());
sysUser.setActiveProjectId(proProjectInfoSubdepts.getProjectId());
try { try {
R<Long> userResult = remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER); R<Long> userResult = remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER);
proProjectInfoSubdepts.setSubDeptLeaderId(userResult.getData()); proProjectInfoSubdepts.setSubDeptLeaderId(userResult.getData());

View File

@ -119,7 +119,6 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.LWGR)){ }else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.LWGR)){
user.setUserType(UserTypeEnums.FBLWRY.getCode()); user.setUserType(UserTypeEnums.FBLWRY.getCode());
} }
user.setActiveProjectId(proProjectInfoSubdeptsUsers.getProjectId());
Long userId= remoteUserService.registerUserInfo(user, SecurityConstants.INNER).getData(); Long userId= remoteUserService.registerUserInfo(user, SecurityConstants.INNER).getData();
proProjectInfoSubdeptsUsers.setUserId(userId); proProjectInfoSubdeptsUsers.setUserId(userId);
uniService.syncUniUser(userId,proProjectInfoSubdeptsUsers.getProjectId()); uniService.syncUniUser(userId,proProjectInfoSubdeptsUsers.getProjectId());
@ -226,7 +225,6 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
user.setCreateBy(DataSourceEnuns.APP.getInfo()); user.setCreateBy(DataSourceEnuns.APP.getInfo());
user.setCreateTime(DateUtils.getNowDate()); user.setCreateTime(DateUtils.getNowDate());
user.setRemark(proProjectInfoSubdeptsUsers.getSubDeptName()); user.setRemark(proProjectInfoSubdeptsUsers.getSubDeptName());
user.setActiveProjectId(proProjectInfoSubdeptsUsers.getProjectId());
Long userId = remoteUserService.registerUserInfo(user, SecurityConstants.INNER).getData(); Long userId = remoteUserService.registerUserInfo(user, SecurityConstants.INNER).getData();
proProjectInfoSubdeptsUsers.setUserId(userId); proProjectInfoSubdeptsUsers.setUserId(userId);
proProjectInfoSubdeptsUsersMapper.insertProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers); proProjectInfoSubdeptsUsersMapper.insertProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers);
@ -257,7 +255,6 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
} }
user.setUpdateBy(SecurityUtils.getUsername()); user.setUpdateBy(SecurityUtils.getUsername());
user.setUpdateTime(DateUtils.getNowDate()); user.setUpdateTime(DateUtils.getNowDate());
user.setActiveProjectId(proProjectInfoSubdeptsUsers.getProjectId());
Long userId = remoteUserService.registerUserInfo(user, SecurityConstants.INNER).getData(); Long userId = remoteUserService.registerUserInfo(user, SecurityConstants.INNER).getData();
proProjectInfoSubdeptsUsers.setUserId(userId); proProjectInfoSubdeptsUsers.setUserId(userId);
uniService.syncUniUser(userId,proProjectInfoSubdeptsUsers.getProjectId()); uniService.syncUniUser(userId,proProjectInfoSubdeptsUsers.getProjectId());
@ -389,7 +386,6 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
user.setUpdateBy(DataSourceEnuns.APP.getInfo()); user.setUpdateBy(DataSourceEnuns.APP.getInfo());
user.setUpdateTime(DateUtils.getNowDate()); user.setUpdateTime(DateUtils.getNowDate());
user.setRemark(proProjectInfoSubdeptsUsers.getSubDeptName()); user.setRemark(proProjectInfoSubdeptsUsers.getSubDeptName());
user.setActiveProjectId(proProjectInfoSubdeptsUsers.getProjectId());
Long userId = remoteUserService.registerUserInfo(user, SecurityConstants.INNER).getData(); Long userId = remoteUserService.registerUserInfo(user, SecurityConstants.INNER).getData();
proProjectInfoSubdeptsUsers.setUserId(userId); proProjectInfoSubdeptsUsers.setUserId(userId);
proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers); proProjectInfoSubdeptsUsersMapper.updateProProjectInfoSubdeptsUsers(proProjectInfoSubdeptsUsers);

View File

@ -7,11 +7,7 @@ import java.util.Objects;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import javax.validation.Validator; import javax.validation.Validator;
import com.yanzhu.common.core.enums.ShiFouEnums;
import com.yanzhu.common.core.enums.UserTypeEnums;
import com.yanzhu.common.core.utils.DateUtils;
import com.yanzhu.system.api.domain.SysDept; import com.yanzhu.system.api.domain.SysDept;
import com.yanzhu.system.api.domain.SysRoleDept;
import com.yanzhu.system.domain.SysPost; import com.yanzhu.system.domain.SysPost;
import com.yanzhu.system.domain.SysUserPost; import com.yanzhu.system.domain.SysUserPost;
import com.yanzhu.system.domain.SysUserRole; import com.yanzhu.system.domain.SysUserRole;
@ -69,9 +65,6 @@ public class SysUserServiceImpl implements ISysUserService
@Autowired @Autowired
private ISysConfigService configService; private ISysConfigService configService;
@Autowired
private SysRoleDeptMapper roleDeptMapper;
@Autowired @Autowired
protected Validator validator; protected Validator validator;
@ -336,76 +329,7 @@ public class SysUserServiceImpl implements ISysUserService
}else{ }else{
userMapper.insertUser(user); userMapper.insertUser(user);
} }
Long userId = user.getUserId(); return user.getUserId();
if(Objects.nonNull(info.getUserType()) && Objects.nonNull(user.getActiveProjectId())){
// 删除用户与角色关联
List<SysUserRole> sysUserRoleList = new ArrayList<>();
SysUserRole userRole = new SysUserRole();
userRole.setUserId(userId);
userRole.setDeptId(user.getActiveProjectId());
userRoleMapper.deleteUserRoleByUserRole(userRole);
if(Objects.equals(info.getUserType(), UserTypeEnums.FBWTDL.getCode())){
List<SysRole> list = roleMapper.findDeptRoleListByDeptIdAndKey(user.getActiveProjectId(),UserTypeEnums.FBWTDL.getKeys()+"_"+user.getActiveProjectId());
if(StringUtils.isEmpty(list)){
//新增单位角色...
Long roleId = insertDeptSysRole(UserTypeEnums.FBWTDL.getInfo(),UserTypeEnums.FBWTDL.getKeys()+"_"+user.getActiveProjectId(),user.getActiveProjectId());
userRole.setRoleId(roleId);
}else{
userRole.setRoleId(list.get(0).getRoleId());
}
sysUserRoleList.add(userRole);
userRoleMapper.batchUserRole(sysUserRoleList);
}else if(Objects.equals(info.getUserType(), UserTypeEnums.FBXMJL.getCode())){
List<SysRole> list = roleMapper.findDeptRoleListByDeptIdAndKey(user.getActiveProjectId(),UserTypeEnums.FBXMJL.getKeys()+"_"+user.getActiveProjectId());
if(StringUtils.isEmpty(list)){
//新增单位角色...
Long roleId = insertDeptSysRole(UserTypeEnums.FBXMJL.getInfo(),UserTypeEnums.FBXMJL.getKeys()+"_"+user.getActiveProjectId(),user.getActiveProjectId());
userRole.setRoleId(roleId);
}else{
userRole.setRoleId(list.get(0).getRoleId());
}
sysUserRoleList.add(userRole);
userRoleMapper.batchUserRole(sysUserRoleList);
}else if(Objects.equals(info.getUserType(), UserTypeEnums.FBBZZZ.getCode())){
List<SysRole> list = roleMapper.findDeptRoleListByDeptIdAndKey(user.getActiveProjectId(),UserTypeEnums.FBBZZZ.getKeys()+"_"+user.getActiveProjectId());
if(StringUtils.isEmpty(list)){
//新增单位角色...
Long roleId = insertDeptSysRole(UserTypeEnums.FBBZZZ.getInfo(),UserTypeEnums.FBBZZZ.getKeys()+"_"+user.getActiveProjectId(),user.getActiveProjectId());
userRole.setRoleId(roleId);
}else{
userRole.setRoleId(list.get(0).getRoleId());
}
sysUserRoleList.add(userRole);
userRoleMapper.batchUserRole(sysUserRoleList);
}
}
return userId;
}
/**
* ...
* @param roleName
* @param roleKey
* @param deptId
* @return
*/
private Long insertDeptSysRole(String roleName,String roleKey,Long deptId){
SysRole sysRole = new SysRole();
sysRole.setRoleName(roleName);
sysRole.setRoleKey(roleKey);
sysRole.setRoleSort(100);
sysRole.setStatus(ShiFouEnums.FOU.getCodeStr());
sysRole.setCreateBy("SYSTEM");
sysRole.setCreateTime(DateUtils.getNowDate());
roleMapper.insertRole(sysRole);
List<SysRoleDept> sysRoleDeptList = new ArrayList<>();
SysRoleDept sysRoleDept = new SysRoleDept();
sysRoleDept.setRoleId(sysRole.getRoleId());
sysRoleDept.setDeptId(deptId);
sysRoleDeptList.add(sysRoleDept);
roleDeptMapper.batchRoleDept(sysRoleDeptList);
return sysRole.getRoleId();
} }
/** /**

View File

@ -123,16 +123,6 @@ export function findCommentByProcInsId(data) {
}) })
} }
// 根据条件统计分包单位审批
export function findMyTask(query) {
return request({
url: '/flowable/businessKey/findMyTask',
method: 'get',
params: query
})
}
// 根据条件统计分包单位审批 // 根据条件统计分包单位审批
export function quueryCount(query) { export function quueryCount(query) {
return request({ return request({

View File

@ -7,6 +7,9 @@ import {
readDeployNotes, readDeployNotes,
findCommentByProcInsId findCommentByProcInsId
} from '../../../api/flowable' } from '../../../api/flowable'
import {
findProjectApplyData
} from '../../../api/publics'
import { import {
findProSubDeptsInfoById, findProSubDeptsInfoById,
findProSubDeptsUserInfoById findProSubDeptsUserInfoById
@ -29,6 +32,7 @@ Page({
subDeptUserData: { subDeptUserData: {
user: {}, user: {},
}, },
stopBtnShow: false,
comment: "", comment: "",
targetKey: "", targetKey: "",
targetKeyList: [], targetKeyList: [],

View File

@ -309,13 +309,13 @@ Page({
returnToPage: function () { returnToPage: function () {
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/ /*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
if (wx.getStorageSync('nav-types') == "depts") { if (this.data.options.ret == "finished") {
wx.redirectTo({ wx.redirectTo({
url: '../subDepts/index', url: '../finished/index',
}) })
} else if (wx.getStorageSync('nav-types') == "users") { } else {
wx.redirectTo({ wx.redirectTo({
url: '../subDeptsUsers/index', url: '../myProcessIns/index',
}) })
} }
}, },

View File

@ -6,24 +6,24 @@ import {
quueryCount, quueryCount,
myAwaitFlowTaskList, myAwaitFlowTaskList,
myFinishedFlowTaskList, myFinishedFlowTaskList,
} from '../../../api/flowable' } from '../../../api/flowable'
const app = getApp() const app = getApp()
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
projectId: '', projectId:'',
projectName: '', projectName:'',
initData: {}, initData: {},
activeState: "dsh", activeState:"dsh",
dshCount: 0, dshCount:0,
yshCount: 0, yshCount:0,
listData: [], listData:[],
pageNum: 1, pageNum:1,
pageSize: 10, pageSize:10,
total: 0, total:0,
imgBaseUrl: config.baseImgUrl imgBaseUrl: config.baseImgUrl
}, },
@ -42,14 +42,14 @@ Page({
onLoad(options) { onLoad(options) {
if (getToken()) { if (getToken()) {
this.setData({ this.setData({
pageNum: 1, pageNum:1,
pageSize: 10, pageSize:10,
lastDataSize: 10, lastDataSize:10,
listData: [], listData:[],
total: 0, total:0,
dshCount: 0, dshCount:0,
yshCount: 0, yshCount:0,
activeState: "dsh", activeState:"dsh",
projectId: app.globalData.useProjectId, projectId: app.globalData.useProjectId,
projectName: app.globalData.useProjectName, projectName: app.globalData.useProjectName,
initData: { initData: {
@ -70,33 +70,33 @@ Page({
/** /**
* 查询列表数据 * 查询列表数据
*/ */
getListData() { getListData(){
let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&activeTags=depts&startProId=" + app.globalData.useProjectId; let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize+"&activeTags=depts&startProId="+app.globalData.useProjectId;
if (this.data.activeState == 'dsh') { if(this.data.activeState=='dsh'){
myAwaitFlowTaskList(params).then(res => { myAwaitFlowTaskList(params).then(res =>{
if (res.code == "200") { if (res.code == "200") {
res.rows.forEach(item => { res.rows.forEach(item =>{
item.businessImg = this.data.imgBaseUrl + item.businessImg; item.businessImg = this.data.imgBaseUrl+item.businessImg;
item.durationStr = this.getDurationDate(item.duration); item.durationStr = this.getDurationDate(item.duration);
}); });
this.setData({ this.setData({
total: res.total, total: res.total,
listData: this.data.listData.concat(res.rows) listData: this.data.listData.concat(res.rows)
}) })
} }
}); });
} else { }else{
myFinishedFlowTaskList(params).then(res => { myFinishedFlowTaskList(params).then(res =>{
if (res.code == "200") { if (res.code == "200") {
res.rows.forEach(item => { res.rows.forEach(item =>{
item.businessImg = this.data.imgBaseUrl + item.businessImg; item.businessImg = this.data.imgBaseUrl+item.businessImg;
item.durationStr = this.getDurationDate(item.duration); item.durationStr = this.getDurationDate(item.duration);
}); });
this.setData({ this.setData({
total: res.total, total: res.total,
listData: this.data.listData.concat(res.rows) listData: this.data.listData.concat(res.rows)
}) })
} }
}); });
} }
}, },
@ -104,14 +104,14 @@ Page({
/** /**
* 统计分包单位数据 * 统计分包单位数据
*/ */
getFlowableCount() { getFlowableCount(){
let params = "activeTags=depts&startProId=" + app.globalData.useProjectId; let params = "activeTags=depts&startProId="+app.globalData.useProjectId;
quueryCount(params).then(res => { quueryCount(params).then(res => {
if (res.code == 200) { if(res.code==200){
this.setData({ this.setData({
dshCount: res.data.await, dshCount: res.data.await,
yshCount: res.data.finished yshCount: res.data.finished
}) })
} }
}); });
}, },
@ -122,32 +122,32 @@ Page({
onScrollToLower() { onScrollToLower() {
let nal = Math.ceil(this.data.total / this.data.pageSize); let nal = Math.ceil(this.data.total / this.data.pageSize);
if (this.data.pageNum < nal) { if (this.data.pageNum < nal) {
this.setData({ this.setData({
pageNum: this.data.pageNum + 1 pageNum: this.data.pageNum + 1
}); });
this.getListData(); this.getListData();
} }
}, },
/** /**
* 切换页签数据 * 切换页签数据
*/ */
switchTabJump(e) { switchTabJump(e){
let index = e.currentTarget.dataset.index; let index = e.currentTarget.dataset.index;
let nav = ""; let nav = "";
if (index == 1) { if(index == 1){
nav = 'dsh'; nav = 'dsh';
} else { }else{
nav = 'ysh'; nav = 'ysh';
} }
if (nav != this.data.activeState) { if(nav!=this.data.activeState){
this.setData({ this.setData({
activeState: nav, activeState:nav,
pageNum: 1, pageNum:1,
pageSize: 10, pageSize:10,
listData: [], listData:[],
}); });
this.getListData(); this.getListData();
} }
}, },
@ -155,27 +155,19 @@ Page({
* 点击栏目 * 点击栏目
* @param {*} e * @param {*} e
*/ */
findDetail(e) { findDetail(e){
let { let {taskId,procInsId,deployId,category,businessKey,finishTime} = e.currentTarget.dataset.set
taskId,
taskName,
procInsId,
deployId,
category,
businessKey,
finishTime
} = e.currentTarget.dataset.set
wx.setStorageSync('nav-types', "depts"); wx.setStorageSync('nav-types', "depts");
if (finishTime) { if(finishTime){
//详情页面 //详情页面
wx.redirectTo({ wx.redirectTo({
url: `../detailTask/index?taskId=${taskId}&taskName=${taskName}&procInsId=${procInsId}&deployId=${deployId}&category=${category}&businessKey=${businessKey}` url: `../detailTask/index?taskId=${taskId}&procInsId=${procInsId}&deployId=${deployId}&category=${category}&businessKey=${businessKey}`
}) })
} else { }else{
//审批页面 //审批页面
wx.redirectTo({ wx.redirectTo({
url: `../approveTask/index?taskId=${taskId}&taskName=${taskName}&procInsId=${procInsId}&deployId=${deployId}&category=${category}&businessKey=${businessKey}` url: `../approveTask/index?taskId=${taskId}&procInsId=${procInsId}&deployId=${deployId}&category=${category}&businessKey=${businessKey}`
}) })
} }
}, },
@ -183,42 +175,42 @@ Page({
* 办理时间计算 * 办理时间计算
* @param {*} val * @param {*} val
*/ */
getDurationDate(val) { getDurationDate(val){
let day = 0; let day=0;
let hours = 0; let hours=0;
let min = val; let min = val;
if (min > 1440) { if(min>1440){
day = parseInt(min / 1440); day = parseInt(min/1440);
min = min % 1440; min = min % 1440;
if (min > 60) { if(min>60){
hours = parseInt(min / 60); hours = parseInt(min/60);
min = min % 60; min = min % 60;
} }
} else if (min > 60) { }else if(min>60){
hours = parseInt(min / 60); hours = parseInt(min/60);
min = min % 60; min = min % 60;
} }
if (day > 0) { if(day>0){
if (day < 10) day = "0" + day; if(day<10) day="0"+day;
if (hours < 10) hours = "0" + hours; if(hours<10) hours="0"+hours;
if (min < 10) min = "0" + min; if(min<10) min="0"+min;
return day + "天" + hours + "小时" + min + "分钟"; return day+"天"+hours+"小时"+min+"分钟";
} }
if (hours > 0) { if(hours>0){
if (hours < 10) hours = "0" + hours; if(hours<10) hours="0"+hours;
if (min < 10) min = "0" + min; if(min<10) min="0"+min;
return hours + "小时" + min + "分钟"; return hours+"小时"+min+"分钟";
} }
if (min > 0) { if(min>0){
if (min < 10) min = "0" + min; if(min<10) min="0"+min;
return min + "分钟"; return min+"分钟";
} }
if (min == 0) { if(min==0){
return "1分钟"; return "1分钟";
} }
}, },
/** /**
* 返回页面 * 返回页面
*/ */
returnToPage: function () { returnToPage: function () {

View File

@ -1,230 +1,18 @@
import config from '../../../config' // pages/project_flowable/subDeptsUsers/index.js
import {
getToken
} from '../../../utils/auth'
import {
quueryCount,
myAwaitFlowTaskList,
myFinishedFlowTaskList,
} from '../../../api/flowable'
const app = getApp()
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
projectId: '',
projectName: '',
initData: {},
activeState: "dsh",
dshCount: 0,
yshCount: 0,
listData: [],
pageNum: 1,
pageSize: 10,
total: 0,
imgBaseUrl: config.baseImgUrl
},
//项目切换 返回值
onProjectSelect(e) {
let projectId = e.detail.id;
let projectName = e.detail.text;
app.globalData.useProjectId = projectId;
app.globalData.useProjectName = projectName;
this.onLoad();
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
if (getToken()) {
this.setData({
pageNum: 1,
pageSize: 10,
lastDataSize: 10,
listData: [],
total: 0,
dshCount: 0,
yshCount: 0,
activeState: "dsh",
projectId: app.globalData.useProjectId,
projectName: app.globalData.useProjectName,
initData: {
id: app.globalData.useProjectId,
text: app.globalData.useProjectName,
}
});
this.getListData();
this.getFlowableCount();
} else {
console.log("未查询到Token...{}...准备重新登录")
wx.redirectTo({
url: '../login/login',
})
}
},
/**
* 查询列表数据
*/
getListData() {
let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&activeTags=users&startProId=" + app.globalData.useProjectId;
if (this.data.activeState == 'dsh') {
myAwaitFlowTaskList(params).then(res => {
if (res.code == "200") {
res.rows.forEach(item => {
item.businessImg = this.data.imgBaseUrl + item.businessImg;
item.durationStr = this.getDurationDate(item.duration);
});
this.setData({
total: res.total,
listData: this.data.listData.concat(res.rows)
})
}
});
} else {
myFinishedFlowTaskList(params).then(res => {
if (res.code == "200") {
res.rows.forEach(item => {
item.businessImg = this.data.imgBaseUrl + item.businessImg;
item.durationStr = this.getDurationDate(item.duration);
});
this.setData({
total: res.total,
listData: this.data.listData.concat(res.rows)
})
}
});
}
},
/**
* 统计分包单位数据
*/
getFlowableCount() {
let params = "activeTags=users&startProId=" + app.globalData.useProjectId;
quueryCount(params).then(res => {
if (res.code == 200) {
this.setData({
dshCount: res.data.await,
yshCount: res.data.finished
})
}
});
},
/**
* 统计审批数据
*/
onScrollToLower() {
let nal = Math.ceil(this.data.total / this.data.pageSize);
if (this.data.pageNum < nal) {
this.setData({
pageNum: this.data.pageNum + 1
});
this.getListData();
}
},
/**
* 切换页签数据
*/
switchTabJump(e) {
let index = e.currentTarget.dataset.index;
let nav = "";
if (index == 1) {
nav = 'dsh';
} else {
nav = 'ysh';
}
if (nav != this.data.activeState) {
this.setData({
activeState: nav,
pageNum: 1,
pageSize: 10,
listData: [],
});
this.getListData();
}
},
/**
* 点击栏目
* @param {*} e
*/
findDetail(e) {
let {
taskId,
taskName,
procInsId,
deployId,
category,
businessKey,
finishTime
} = e.currentTarget.dataset.set
wx.setStorageSync('nav-types', "users");
if (finishTime) {
//详情页面
wx.redirectTo({
url: `../detailTask/index?taskId=${taskId}&taskName=${taskName}&procInsId=${procInsId}&deployId=${deployId}&category=${category}&businessKey=${businessKey}`
})
} else {
//审批页面
wx.redirectTo({
url: `../approveTask/index?taskId=${taskId}&taskName=${taskName}&procInsId=${procInsId}&deployId=${deployId}&category=${category}&businessKey=${businessKey}`
})
}
},
/**
* 办理时间计算
* @param {*} val
*/
getDurationDate(val) {
let day = 0;
let hours = 0;
let min = val;
if (min > 1440) {
day = parseInt(min / 1440);
min = min % 1440;
if (min > 60) {
hours = parseInt(min / 60);
min = min % 60;
}
} else if (min > 60) {
hours = parseInt(min / 60);
min = min % 60;
}
if (day > 0) {
if (day < 10) day = "0" + day;
if (hours < 10) hours = "0" + hours;
if (min < 10) min = "0" + min;
return day + "天" + hours + "小时" + min + "分钟";
}
if (hours > 0) {
if (hours < 10) hours = "0" + hours;
if (min < 10) min = "0" + min;
return hours + "小时" + min + "分钟";
}
if (min > 0) {
if (min < 10) min = "0" + min;
return min + "分钟";
}
if (min == 0) {
return "1分钟";
}
},
/**
* 返回页面
*/
returnToPage: function () {
wx.redirectTo({
url: '../../project_more/index',
})
}, },
/** /**

View File

@ -1,4 +1,3 @@
{ {
"usingComponents": {}, "usingComponents": {}
"navigationStyle":"custom"
} }

View File

@ -1,57 +1,2 @@
<view class="header_title"> <!--pages/project_flowable/subDeptsUsers/index.wxml-->
<view class="header_title_row"> <text>pages/project_flowable/subDeptsUsers/index.wxml</text>
<van-row>
<van-col span="4">
<view class="header_img" bindtap="returnToPage">
<image src="/images/left.png"></image>
</view>
</van-col>
<van-col span="15">
<view class="header_name">分包人员审核</view>
</van-col>
</van-row>
</view>
</view>
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
<project-select init="{{initData}}" bindchange="onProjectSelect" id="projectSel"></project-select>
<view class="modify_video_nav" style="margin-top: 5rpx;">
<view class="{{activeState=='dsh'?'active':''}}" bindtap="switchTabJump" data-index="1"><text>待审核({{dshCount}}</text></view>
<view class="{{activeState=='ysh'?'active':''}}" bindtap="switchTabJump" data-index="2"><text>已审核({{yshCount}}</text></view>
</view>
<view class="inspect_max_scroll">
<!--专项检查样式zxjc-->
<view class="inspect_for_scroll" v-if="{{ listData.length>0 }}" wx:for="{{listData}}" wx:key="index" data-set="{{item}}" bindtap="findDetail">
<view class="inspect_for_bgd">
<view class="inspect_list_title">
<view class="inspect_list_title_label inspect_list_title_width">
<view class="inspect_list_title_number">{{index < 9 ?'0'+(index+1):(index+1)}}</view>
<view class="module_title_3 module_title_flex">
<text wx:if="{{!item.endTime}}" class="color_purple">申请时间 {{item.createTime}}</text>
<text wx:if="{{item.endTime}}" class="color_purple">办结时间 {{item.endTime}}</text>
</view>
</view>
</view>
<view class="inspect_list_info">
<view class="inspect_list_info_details">
<view class="inspect_list_info_img">
<van-image width="120rpx" height="120rpx" fit="cover" src="{{item.businessImg+'.min.jpg'}}" />
</view>
<view class="inspect_list_info_data">
<view class="inspect_list_info_data_prop color_blue">单位类型:<text>{{item.businessMk2}}</text></view>
<view class="inspect_list_info_data_prop">单位名称:<text>{{item.businessMk1}}</text></view>
<view class="inspect_list_info_data_prop">信用代码:<text>{{item.businessMk3}}</text></view>
<view class="inspect_list_info_data_prop color_orange">处理耗时:{{item.durationStr}}</view>
</view>
</view>
</view>
</view>
</view>
<view wx:if="{{listData.length==0}}">
<view style="padding-top: 70px;text-align: -webkit-center;">
<image src="https://szgcwx.jhncidg.com/staticFiles/nodata.png" style="width: 130px;height: 105px;"></image>
<view style="color: #a5abbb;">暂无数据</view>
</view>
</view>
</view>
</scroll-view>

View File

@ -13,9 +13,6 @@ import {
findUsersAttendanceView, findUsersAttendanceView,
findSubDeptsAttendanceView findSubDeptsAttendanceView
} from '../../api/attendance' } from '../../api/attendance'
import {
findMyTask
} from '../../api/flowable'
const app = getApp(); const app = getApp();
Page({ Page({
/** /**
@ -151,7 +148,6 @@ Page({
//统计劳务人员信息 //统计劳务人员信息
this.getSubDeptsUsers(app.globalData.useProjectId); this.getSubDeptsUsers(app.globalData.useProjectId);
this.initSubDeptDaysCharts(app.globalData.useProjectId); this.initSubDeptDaysCharts(app.globalData.useProjectId);
this.awaitTask();
} }
//今日出勤信息 //今日出勤信息
if (app.globalData.userData.userType != '80' && app.globalData.userData.userType != '79' && app.globalData.userData.userType != '78' && app.globalData.userData.userType != '77') { if (app.globalData.userData.userType != '80' && app.globalData.userData.userType != '79' && app.globalData.userData.userType != '78' && app.globalData.userData.userType != '77') {
@ -593,17 +589,31 @@ Page({
}) })
}, },
/** //查询当前登录人的代办任务
* 统计代办 awaitTask(minRoleId, deptId, loginName, userId) {
*/ let param = {
awaitTask() { "businessKey": app.globalData.projectId,
let param = "proId=" + app.globalData.useProjectId; "nowRole": minRoleId,
findMyTask(param).then(res => { "nowDept": deptId,
if(res.code==200){ "nowUserName": loginName,
this.setData({ "nowUser": userId,
todoDb: res.data.todo "activeName": "await"
}) }
var that = this;
wx.request({
url: app.globalData.reqUrl + '/wechat/flowTask/myAwaitFlowTaskListCount',
data: param,
method: "post",
success: function (res) {
res = res.data;
if (res.code == "200") {
that.setData({
todoDb: res.data.todo + res.data.approveLZYJ,
approveDb: res.data.approve + res.data.zlCount,
aq: res.data.aqCount,
})
}
} }
}); })
}, },
}) })

View File

@ -4,9 +4,6 @@ import {
import { import {
findUserMenuList findUserMenuList
} from '../../api/publics' } from '../../api/publics'
import {
findMyTask
} from '../../api/flowable'
const app = getApp() const app = getApp()
Page({ Page({
@ -14,24 +11,27 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
active: 4, active:4,
projectId: '', projectId:'',
projectName: '', projectName:'' ,
loginName: '', loginName:'',
remark: '', remark:'',
roleId: '', roleId:'',
roleName: '', roleName:'',
menuList: [], menuList:[],
initData: {}, initData:{},
hiddenn: true, hiddenn:true,
todoDB: 0, todoDB:0,
fbdwDB: 0, lzyjDB:0,
fbrtDB: 0 approveDB:0,
ad:0,
todoDb:0,
aq:0,
}, },
//项目切换 返回值 //项目切换 返回值
onProjectSelect(e) { onProjectSelect(e){
let projectId = e.detail.id; let projectId = e.detail.id;
let projectName = e.detail.text; let projectName = e.detail.text;
app.globalData.useProjectId = projectId; app.globalData.useProjectId = projectId;
@ -45,40 +45,39 @@ Page({
onLoad: function (options) { onLoad: function (options) {
if (getToken()) { if (getToken()) {
this.setData({ this.setData({
userData: app.globalData.userData, userData: app.globalData.userData,
projectId: app.globalData.useProjectId, projectId: app.globalData.useProjectId,
projectName: app.globalData.useProjectName, projectName: app.globalData.useProjectName,
initData: { initData: {
id: app.globalData.useProjectId, id: app.globalData.useProjectId,
text: app.globalData.useProjectName, text: app.globalData.useProjectName,
} }
}); });
//用户权限菜单 //用户权限菜单
this.getUserMenuList(app.globalData.useProjectId); this.getUserMenuList(app.globalData.useProjectId);
this.awaitTask(); } else {
} else {
console.log("未查询到Token...{}...准备重新登录") console.log("未查询到Token...{}...准备重新登录")
wx.redirectTo({ wx.redirectTo({
url: '../login/login', url: '../login/login',
}) })
} }
}, },
/** /**
* 查询功能菜单 * 查询功能菜单
* @param {*} proId * @param {*} proId
*/ */
getUserMenuList: function (proId) { getUserMenuList:function(proId){
findUserMenuList(proId, 'gdgn').then(res => { findUserMenuList(proId,'gdgn').then(res =>{
if (res.code == 200) { if(res.code==200){
this.setData({ this.setData({
menuList: res.data menuList:res.data
}) })
} }
}); });
}, },
goMenu: function (event) { goMenu:function(event){
wx.redirectTo({ wx.redirectTo({
url: event.currentTarget.dataset.url url: event.currentTarget.dataset.url
}) })
@ -88,23 +87,21 @@ Page({
//}) //})
}, },
// 底部导航 // 底部导航
onChange(event) { onChange(event) {
// event.detail 的值为当前选中项的索引 // event.detail 的值为当前选中项的索引
this.setData({ this.setData({ active: event.detail });
active: event.detail
});
}, },
//跳转到项目概况页面 //跳转到项目概况页面
XMGK: function () { XMGK:function(){
wx.redirectTo({ wx.redirectTo({
url: '../project_info/index' url: '../project_info/index'
}) })
}, },
//跳转到安全管理 //跳转到安全管理
AQGL: function () { AQGL:function(){
app.toast("正在建设中"); app.toast("正在建设中");
// wx.redirectTo({ // wx.redirectTo({
// url:'../safety_manage/index' // url:'../safety_manage/index'
@ -112,35 +109,48 @@ Page({
}, },
//跳转到质量管理 //跳转到质量管理
ZLGL: function () { ZLGL:function(){
app.toast("正在建设中"); app.toast("正在建设中");
// wx.redirectTo({ // wx.redirectTo({
// url:'../quality_manage/index' // url:'../quality_manage/index'
// }) // })
}, },
//跳转到进度管理 //跳转到进度管理
JDGL2: function () { JDGL2:function(){
app.toast("正在建设中"); app.toast("正在建设中");
// wx.redirectTo({ // wx.redirectTo({
// url:'../../pageage/project_schedule/list/index' // url:'../../pageage/project_schedule/list/index'
// }) // })
}, },
/** //查询当前登录人的代办任务
* 统计代办 awaitTask(minRoleId,deptId,loginName,userId) {
*/ let param = {
awaitTask() { "businessKey":app.globalData.projectId,
let param = "proId=" + app.globalData.useProjectId; "nowRole":minRoleId,
findMyTask(param).then(res => { "nowDept":deptId,
if (res.code == 200) { "nowUserName":loginName,
this.setData({ "nowUser":userId,
todoDb: res.data.todo, "activeName":"await"
fbdwDB: res.data.dwsh, }
fbrtDB: res.data.rysh var that = this;
}) wx.request({
url: app.globalData.reqUrl + '/wechat/flowTask/myAwaitFlowTaskListCount',
data:param,
method: "post",
success: function (res) {
res = res.data;
if(res.code=="200"){
that.setData({
todoDB:res.data.todo,
lzyjDB:res.data.approveLZYJ,
todoDb:res.data.todo,
ad:res.data.approve+res.data.zlCount,
aq:res.data.aqCount,
})
}
} }
}); })
}, },
}) })

View File

@ -144,46 +144,12 @@
<el-form-item label="入场肖像近照" v-if="dataOptions.category=='1'"> <el-form-item label="入场肖像近照" v-if="dataOptions.category=='1'">
<ImagePreview :src="initData.user.userPicture" :width="120" :height="70"/> <ImagePreview :src="initData.user.userPicture" :width="120" :height="70"/>
</el-form-item> </el-form-item>
<el-form-item label="单位委托证明" v-if="dataOptions.category=='4'"> <el-form-item label="单位委托证明" v-if="dataOptions.category=='1'">
<ImagePreview :src="initData.subDeptPowerPath" :width="120" :height="70"/> <ImagePreview :src="initData.subDeptPowerPath" :width="120" :height="70"/>
</el-form-item> </el-form-item>
<el-form-item label="委托人姓名" v-if="dataOptions.category=='1'"> <el-form-item label="委托人姓名" v-if="dataOptions.category=='1'">
{{ initData.user.nickName }} <el-tag type="info">{{ initData.user.cardCode }}</el-tag> {{ initData.user.nickName }} <el-tag type="info">{{ initData.user.cardCode }}</el-tag>
</el-form-item> </el-form-item>
<el-form-item label="人员姓名" v-if="dataOptions.category!='1'">
{{ initData.user.nickName }} <el-tag type="info">{{ initData.user.cardCode }}</el-tag>
</el-form-item>
<el-form-item label="工种岗位" v-if="dataOptions.category!='1'">
{{ initData.craftPostName }}
</el-form-item>
<el-form-item label="工种班组" v-if="dataOptions.category!='1' && dataOptions.category!='2'">
{{ initData.subDeptGroupName }}
</el-form-item>
<el-form-item label="所属民族" v-if="dataOptions.category!='1'">
{{ initData.user.userInfos.nativePlace }}
</el-form-item>
<el-form-item label="详细地址" v-if="dataOptions.category!='1'">
{{ initData.user.userInfos.address }}
</el-form-item>
<el-form-item label="身份证照片" v-if="dataOptions.category!='1'">
<ImagePreview :src="initData.user.cardImgPos" :width="120" :height="70"/>
<ImagePreview :src="initData.user.cardImgInv" :width="120" :height="70" style="margin-left: 20px;"/>
</el-form-item>
<el-form-item label="入场肖像近照" v-if="dataOptions.category!='1'">
<ImagePreview :src="initData.user.userPicture" :width="120" :height="70"/>
</el-form-item>
<el-form-item label="紧急联系人" v-if="dataOptions.category!='1'">
{{ initData.user.userInfos.emergencyContact }} <el-tag type="info">{{ initData.user.contactPhone }}</el-tag>
</el-form-item>
<el-form-item label="开户行名称" v-if="dataOptions.category=='4'">
{{ initData.user.userInfos.bankName }}
</el-form-item>
<el-form-item label="开户行网点" v-if="dataOptions.category=='4'">
{{ initData.user.userInfos.bankName }}
</el-form-item>
<el-form-item label="工资银行卡号" v-if="dataOptions.category=='4'">
{{ initData.user.userInfos.bankName }}
</el-form-item>
<el-form-item label="联系电话"> <el-form-item label="联系电话">
{{ initData.user.userName }} {{ initData.user.userName }}
</el-form-item> </el-form-item>