提交代码

dev_xd
姜玉琦 2025-05-18 10:49:15 +08:00
parent b9958ebdb1
commit 2a6abb3ad2
192 changed files with 555 additions and 16353 deletions

View File

@ -61,7 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
psu.remark,psu.face_guid,sd.dept_name com_name,psu.work_type
from pro_project_info_subdepts_users psu
left join pro_project_info pi on pi.id = psu.project_id
join pro_project_info_subdepts pdept on psu.sub_dept_id=pdept.id
left join pro_project_info_subdepts pdept on psu.sub_dept_id=pdept.id
left join sys_dept sd on sd.dept_id = psu.com_id
left join sys_dict_data dic1 on psu.`craft_type`=dic1.`dict_value` and dic1.`dict_type`='pro_craft_type'
left join sys_dict_data dic2 on psu.`craft_post`=dic2.`dict_value` and dic2.`dict_type`='pro_craft_post'

View File

@ -2,7 +2,6 @@ package com.yanzhu.manage.controller.device;
import com.alibaba.fastjson2.JSON;
import com.yanzhu.common.core.annotation.RateLimiter;
import com.yanzhu.common.core.constant.CacheConstants;
import com.yanzhu.common.core.enums.LimitType;
import com.yanzhu.common.core.exception.ServiceException;
import com.yanzhu.common.core.text.Convert;
@ -10,7 +9,10 @@ import com.yanzhu.common.core.utils.StringUtils;
import com.yanzhu.common.core.web.domain.AjaxResult;
import com.yanzhu.common.redis.service.RedisService;
import com.yanzhu.device.domain.*;
import com.yanzhu.manage.domain.TowerReqVo;
import com.yanzhu.manage.domain.vo.TowerReqVo;
import com.yanzhu.manage.domain.vo.TyTowerRoundReqVO;
import com.yanzhu.manage.domain.vo.TyTowerRunReqVO;
import com.yanzhu.manage.domain.vo.TyTowerWarningReqVO;
import com.yanzhu.manage.enums.HttpStatusEnum;
import com.yanzhu.manage.enums.TowerTypeEnums;
import com.yanzhu.manage.service.*;
@ -23,6 +25,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.Valid;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@ -58,12 +61,16 @@ public class TowerCraneApiController {
@Autowired
private IDevTowerDataCollideService devTowerDataCollideService;
@Autowired
private IDevTowerDataWarningService devTowerDataWarningService;
@Autowired
private IDevTowerProjectConfigService devTowerProjectConfigService;
/**
* ++
* [6010IP]
*
* @param req
* @author JiangYuQi
* @date 2024-01-13
@ -72,31 +79,32 @@ public class TowerCraneApiController {
@RateLimiter(count = 10, limitType = LimitType.IP)
@PostMapping("/v1/push")
public AjaxResult pushData(@Validated @RequestBody TowerReqVo req) {
DevTowerProjectConfig config = redisService.getCacheObject(YANZHU_DEVICE_TOWER+req.getContent().getDeviceKey());
if(config==null){
DevTowerProjectConfig config = redisService.getCacheObject(YANZHU_DEVICE_TOWER + req.getContent().getDeviceKey());
if (config == null) {
throw new ServiceException(HttpStatusEnum.DARA_EXCEPTION.getInfo(), HttpStatusEnum.DARA_EXCEPTION.getCode());
}
if(req.getType() == TowerTypeEnums.BASE.getCode()){
this.pushConfigData(config,req);
}else if(req.getType() == TowerTypeEnums.RUN.getCode()){
this.pushRunData(config,req);
}else if(req.getType() == TowerTypeEnums.ROUND.getCode()){
this.pushRoundData(config,req);
}else if(req.getType() == TowerTypeEnums.COLLIDE.getCode()){
this.pushCollideData(config,req);
}else if(req.getType() == TowerTypeEnums.LIMIT.getCode()){
this.pushLimitData(config,req);
}else if(req.getType() == TowerTypeEnums.LOCAL.getCode()){
this.pushLocalData(config,req);
if (req.getType() == TowerTypeEnums.BASE.getCode()) {
this.pushConfigData(config, req);
} else if (req.getType() == TowerTypeEnums.RUN.getCode()) {
this.pushRunData(config, req);
} else if (req.getType() == TowerTypeEnums.ROUND.getCode()) {
this.pushRoundData(config, req);
} else if (req.getType() == TowerTypeEnums.COLLIDE.getCode()) {
this.pushCollideData(config, req);
} else if (req.getType() == TowerTypeEnums.LIMIT.getCode()) {
this.pushLimitData(config, req);
} else if (req.getType() == TowerTypeEnums.LOCAL.getCode()) {
this.pushLocalData(config, req);
}
return AjaxResult.success();
}
/**
*
*
* @param req
*/
private void pushConfigData(DevTowerProjectConfig config,TowerReqVo req){
private void pushConfigData(DevTowerProjectConfig config, TowerReqVo req) {
DevTowerProjectConfig devTowerProjectConfig = devTowerProjectConfigService.selectDevTowerProjectConfigById(config.getId());
Map<String, Object> dataContent = req.getContent().getDataContent();
devTowerProjectConfig.setTowerId(Convert.toStr(dataContent.get("towerId")));
@ -113,9 +121,10 @@ public class TowerCraneApiController {
/**
*
*
* @param req
*/
private static void pushRunData(DevTowerProjectConfig config,TowerReqVo req){
private void pushRunData(DevTowerProjectConfig config, TowerReqVo req) {
DevTowerDataRun devTowerDataRun = new DevTowerDataRun();
Map<String, Object> dataContent = req.getContent().getDataContent();
devTowerDataRun.setCfgId(config.getId());
@ -141,33 +150,34 @@ public class TowerCraneApiController {
devTowerDataRun.setRangeSensorState(Convert.toStr(dataContent.get("rangeSensorState")));
devTowerDataRun.setHeightSensorState(Convert.toStr(dataContent.get("heightSensorState")));
devTowerDataRun.setBrakingStatus(Convert.toStr(dataContent.get("brakingStatus")));
if(dataContent.get("warnings")!=null){
List<String> warnings = (List<String>)dataContent.get("warnings");
if (dataContent.get("warnings") != null) {
List<String> warnings = (List<String>) dataContent.get("warnings");
devTowerDataRun.setWarnings(String.join(",", warnings));
for(String warning:warnings){
for (String warning : warnings) {
pushWarningData(config, warning);
Integer alarm = Convert.toInt(warning);
if(alarm>100 && alarm<120){
if (alarm > 100 && alarm < 120) {
devTowerDataRun.setIsAlarm(1L);
}
}
}
System.out.println(devTowerDataRun);
//devTowerDataRunService.insertDevTowerDataRun(devTowerDataRun);
devTowerDataRunService.insertDevTowerDataRun(devTowerDataRun);
}
public static void main(String[] args) {
String str = "{\"type\":111,\"content\":{\"time\":1496263304,\"dataType\":113001,\"deviceKey\":\"jycw6\",\"dataContent\":{\"height\":\"4.1\",\"range\": \"21.9\",\"rotation\": \"171.0\",\"load\": \"0.0\",\"windSpeed\": \"0.0\",\"leanAngleX\":\"0.5\",\"leanAngley\":\"0.0\",\"loadPercent\":\"0\", \"mome ntPercent\":\"0\",\"windSpeedPercent\":\"0\",\"leanAnglePercent\": \"0\", \"warnings\": [\"0\"],\"rate\":\"2\",\"rotationSensorState\":\"1\",\"loadSensorState\": \"1\",\"windSpeedSensorState\": \"1\",\"leanAngleSensorState\":\"1\",\"rangeSensorState\":\"1\",\"heightSensorState\":\"1\",\"bra kingStatus\":\"0\"}}}";
TowerReqVo req = JSON.parseObject(str,TowerReqVo.class);
TowerReqVo req = JSON.parseObject(str, TowerReqVo.class);
System.out.println(req);
DevTowerProjectConfig config = new DevTowerProjectConfig();
pushRunData(config,req);
//pushRunData(config,req);
}
/**
*
*
* @param req
*/
private void pushRoundData(DevTowerProjectConfig config,TowerReqVo req){
private void pushRoundData(DevTowerProjectConfig config, TowerReqVo req) {
DevTowerDataRound devTowerDataRound = new DevTowerDataRound();
Map<String, Object> dataContent = req.getContent().getDataContent();
devTowerDataRound.setCfgId(config.getId());
@ -199,15 +209,16 @@ public class TowerCraneApiController {
devTowerDataRound.setEndLeanAngleX(Convert.toStr(dataContent.get("endLeanAngleX")));
devTowerDataRound.setStartLeanAngleY(Convert.toStr(dataContent.get("startleanAngleY")));
devTowerDataRound.setEndLeanAngleY(Convert.toStr(dataContent.get("endLeanAngleY")));
if(dataContent.get("warning")!=null){
List<String> warnings = (List<String>)dataContent.get("warning");
if (dataContent.get("warning") != null) {
List<String> warnings = (List<String>) dataContent.get("warning");
devTowerDataRound.setWarnings(String.join(",", warnings));
for(String warning:warnings){
for (String warning : warnings) {
pushWarningData(config, warning);
Integer alarm = Convert.toInt(warning);
if(alarm>6 && alarm<10){
if (alarm > 6 && alarm < 10) {
devTowerDataRound.setIsOverload(1L);
}
if(alarm>100 && alarm<120){
if (alarm > 100 && alarm < 120) {
devTowerDataRound.setIsAlarm(1L);
}
}
@ -215,11 +226,28 @@ public class TowerCraneApiController {
devTowerDataRoundService.insertDevTowerDataRound(devTowerDataRound);
}
/**
*
*
* @param config
* @param warning
*/
private void pushWarningData(DevTowerProjectConfig config, Object warning) {
DevTowerDataWarning devTowerDataWarning = new DevTowerDataWarning();
devTowerDataWarning.setCfgId(config.getId());
devTowerDataWarning.setProjectId(config.getProjectId());
devTowerDataWarning.setComId(config.getComId());
devTowerDataWarning.setDeviceKey(config.getDeviceSn());
devTowerDataWarning.setWarnType(Convert.toLong(warning));
devTowerDataWarningService.insertDevTowerDataWarning(devTowerDataWarning);
}
/**
*
*
* @param req
*/
private void pushCollideData(DevTowerProjectConfig config,TowerReqVo req){
private void pushCollideData(DevTowerProjectConfig config, TowerReqVo req) {
DevTowerDataCollide devTowerDataCollide = new DevTowerDataCollide();
Map<String, Object> dataContent = req.getContent().getLocalDeviceInfo();
devTowerDataCollide.setCfgId(config.getId());
@ -239,8 +267,8 @@ public class TowerCraneApiController {
devTowerDataCollide.setAlarmWarningDistance(Convert.toStr(dataContent.get("alarmWarningDistance")));
devTowerDataCollide.setContourValue(Convert.toStr(dataContent.get("contourValue")));
List<DevTowerDataCollideDetail> devTowerDataCollideDetailList = new ArrayList<>();
if(StringUtils.isNotEmpty(req.getContent().getCollideTowers())){
for (Map<String, Object> collideTowers:req.getContent().getCollideTowers()){
if (StringUtils.isNotEmpty(req.getContent().getCollideTowers())) {
for (Map<String, Object> collideTowers : req.getContent().getCollideTowers()) {
DevTowerDataCollideDetail devTowerDataCollideDetail = new DevTowerDataCollideDetail();
devTowerDataCollideDetail.setTowerId(Convert.toStr(collideTowers.get("towerId")));
devTowerDataCollideDetail.setCoordinateX(Convert.toStr(collideTowers.get("coordinateX")));
@ -263,9 +291,10 @@ public class TowerCraneApiController {
/**
*
*
* @param req
*/
private void pushLimitData(DevTowerProjectConfig config,TowerReqVo req){
private void pushLimitData(DevTowerProjectConfig config, TowerReqVo req) {
DevTowerDataLimit devTowerDataLimit = new DevTowerDataLimit();
Map<String, Object> dataContent = req.getContent().getDataContent();
devTowerDataLimit.setCfgId(config.getId());
@ -312,9 +341,10 @@ public class TowerCraneApiController {
/**
*
*
* @param req
*/
private void pushLocalData(DevTowerProjectConfig config,TowerReqVo req){
private void pushLocalData(DevTowerProjectConfig config, TowerReqVo req) {
DevTowerDataLocal devTowerDataLocal = new DevTowerDataLocal();
Map<String, Object> dataContent = req.getContent().getDataContent();
devTowerDataLocal.setCfgId(config.getId());
@ -343,4 +373,175 @@ public class TowerCraneApiController {
devTowerDataLocalService.insertDevTowerDataLocal(devTowerDataLocal);
}
/**
* ++
* [6010IP]
*
* @param req
* @author JiangYuQi
* @date 2024-01-13
*/
@ApiOperation(value = "山东探越-塔吊监测-实时数据")
@RateLimiter(count = 10, limitType = LimitType.IP)
@PostMapping("/v2_ty/run/push")
public AjaxResult tyPushRunData(@RequestBody @Valid TyTowerRunReqVO req) {
log.info("desApi.towerCrane.v2_ty.run.push...{}",req.getEid());
DevTowerProjectConfig config = redisService.getCacheObject(YANZHU_DEVICE_TOWER + req.getEid());
if (config == null) {
throw new ServiceException(HttpStatusEnum.ERROR.getInfo(), HttpStatusEnum.ERROR.getCode());
}
DevTowerDataRun devTowerDataRun = new DevTowerDataRun();
devTowerDataRun.setCfgId(config.getId());
devTowerDataRun.setProjectId(config.getProjectId());
devTowerDataRun.setComId(config.getComId());
devTowerDataRun.setDeviceKey(config.getDeviceSn());
devTowerDataRun.setHeight(Convert.toStr(req.getHeight()));
devTowerDataRun.setRange(Convert.toStr(req.getAmplitude()));
devTowerDataRun.setRotation(Convert.toStr(req.getRound()));
devTowerDataRun.setLoad(Convert.toStr(req.getWeight()));
devTowerDataRun.setWindSpeed(Convert.toStr(req.getWind_speed()));
devTowerDataRun.setLeanAngleX(Convert.toStr(req.getAngle_x()));
devTowerDataRun.setLeanAngleY(Convert.toStr(req.getAngle_y()));
devTowerDataRun.setMomentPercent(Convert.toStr(req.getMoment_percent()));
devTowerDataRun.setRate(Convert.toStr(req.getOverride()));
devTowerDataRunService.insertDevTowerDataRun(devTowerDataRun);
return AjaxResult.success();
}
/**
* ++
* [6010IP]
*
* @param req
* @author JiangYuQi
* @date 2024-01-13
*/
@ApiOperation(value = "山东探越-塔吊监测-循环数据")
@RateLimiter(count = 10, limitType = LimitType.IP)
@PostMapping("/v2_ty/round/push")
public AjaxResult tyPushRoundData(@RequestBody @Valid TyTowerRoundReqVO req) {
log.info("desApi.towerCrane.v2_ty.round.push...{}",req.getEid());
DevTowerProjectConfig config = redisService.getCacheObject(YANZHU_DEVICE_TOWER + req.getEid());
if (config == null) {
throw new ServiceException(HttpStatusEnum.ERROR.getInfo(), HttpStatusEnum.ERROR.getCode());
}
DevTowerDataRound devTowerDataRound = new DevTowerDataRound();
devTowerDataRound.setCfgId(config.getId());
devTowerDataRound.setProjectId(config.getProjectId());
devTowerDataRound.setComId(config.getComId());
devTowerDataRound.setDeviceKey(config.getDeviceSn());
devTowerDataRound.setWorkStartTime(Convert.toStr(req.getStart_time()));
devTowerDataRound.setWorkEndTime(Convert.toStr(req.getEnd_time()));
devTowerDataRound.setMinHeight(Convert.toStr(req.getStart_height()));
devTowerDataRound.setMaxHeight(Convert.toStr(req.getEnd_height()));
devTowerDataRound.setMinRange(Convert.toStr(req.getStart_range()));
devTowerDataRound.setMaxRange(Convert.toStr(req.getEnd_range()));
devTowerDataRound.setStartHeight(Convert.toStr(req.getStart_height()));
devTowerDataRound.setEndHeight(Convert.toStr(req.getEnd_height()));
devTowerDataRound.setStartRange(Convert.toStr(req.getStart_range()));
devTowerDataRound.setEndRange(Convert.toStr(req.getEnd_range()));
devTowerDataRound.setStartRotation(Convert.toStr(req.getStart_rotation_angle()));
devTowerDataRound.setEndRotation(Convert.toStr(req.getEnd_rotation_angle()));
devTowerDataRound.setMaxLoad(Convert.toStr(req.getWeight()));
devTowerDataRound.setMaxMomentPercent(Convert.toStr(req.getMoment_percent()));
devTowerDataRoundService.insertDevTowerDataRound(devTowerDataRound);
return AjaxResult.success();
}
/**
* ++
* [6010IP]
*
* @param req
* @author JiangYuQi
* @date 2024-01-13
*/
@ApiOperation(value = "山东探越-塔吊监测-预警数据")
@RateLimiter(count = 10, limitType = LimitType.IP)
@PostMapping("/v2_ty/warning/push")
public AjaxResult tyPushWarningData(@RequestBody @Valid TyTowerWarningReqVO req) {
log.info("desApi.towerCrane.v2_ty.warning.push...{}",req.getEid());
DevTowerProjectConfig config = redisService.getCacheObject(YANZHU_DEVICE_TOWER + req.getEid());
if (config == null) {
throw new ServiceException(HttpStatusEnum.ERROR.getInfo(), HttpStatusEnum.ERROR.getCode());
}
DevTowerDataWarning devTowerDataWarning = new DevTowerDataWarning();
devTowerDataWarning.setCfgId(config.getId());
devTowerDataWarning.setProjectId(config.getProjectId());
devTowerDataWarning.setComId(config.getComId());
devTowerDataWarning.setDeviceKey(config.getDeviceSn());
devTowerDataWarning.setWarnType(Convert.toLong(req.getAlarm_type()));
devTowerDataWarningService.insertDevTowerDataWarning(devTowerDataWarning);
return AjaxResult.success();
}
/**
*
*
* @param warningType
* @return
*/
private String convertTyTowerWarningType(String warningType) {
String warningTypeEs;
switch (warningType) {
case "1":
warningTypeEs = "1";
break;
case "2":
warningTypeEs = "101";
break;
case "3":
warningTypeEs = "4";
break;
case "4":
warningTypeEs = "103";
break;
case "5":
warningTypeEs = "3";
break;
case "6":
warningTypeEs = "102";
break;
case "7":
warningTypeEs = "7";
break;
case "8":
warningTypeEs = "106";
break;
case "9":
warningTypeEs = "10";
break;
case "10":
warningTypeEs = "107";
break;
case "11":
warningTypeEs = "13";
break;
case "12":
warningTypeEs = "108";
break;
case "13":
warningTypeEs = "5";
break;
case "14":
warningTypeEs = "104";
break;
case "15":
warningTypeEs = "6";
break;
case "16":
warningTypeEs = "105";
break;
case "17":
warningTypeEs = "14";
break;
case "18":
warningTypeEs = "109";
break;
default:
warningTypeEs = "0";
break;
}
return warningTypeEs;
}
}

View File

@ -11,6 +11,7 @@ import com.yanzhu.manage.service.*;
import com.yanzhu.security.utils.DictUtils;
import com.yanzhu.system.api.domain.SysUser;
import com.yanzhu.system.api.model.LoginUser;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -22,6 +23,7 @@ import java.util.Objects;
* @author JiangYuQi
* @date 2024-08-25
*/
@Slf4j
@RestController
@RequestMapping("/wxApi")
public class WxController extends BaseController {
@ -107,7 +109,9 @@ public class WxController extends BaseController {
public AjaxResult findProSubDeptsUserInfo(@PathVariable("proId") Long proId)
{
LoginUser loginUser = SecurityUtils.getLoginUser();
log.info("findProSubDeptsUserInfo...findProSubDeptsUserInfo...{}...{}", proId, loginUser.getUserid());
if(SecurityUtils.isAdmin(loginUser.getUserid()) || SecurityUtils.isGSAdmin()){
log.info("findProSubDeptsUserInfo...1");
ProProjectInfo projectInfo = proProjectInfoService.selectProProjectInfoById(proId);
ProProjectInfoSubdeptsUsers adminUser = new ProProjectInfoSubdeptsUsers();
adminUser.setId(0L);
@ -122,6 +126,7 @@ public class WxController extends BaseController {
adminUser.setUserName(loginUser.getSysUser().getNickName());
return success(adminUser);
}else{
log.info("findProSubDeptsUserInfo...2");
return success(proProjectInfoSubdeptsUsersService.findProSubDeptsUserInfo(proId, loginUser.getUserid()));
}
}

View File

@ -1,5 +1,6 @@
package com.yanzhu.manage.domain;
package com.yanzhu.manage.domain.vo;
import com.yanzhu.manage.domain.TowerContentReqVo;
import lombok.Data;
import javax.validation.constraints.NotNull;

View File

@ -0,0 +1,37 @@
package com.yanzhu.manage.domain.vo;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* -
*/
@Data
public class TyTowerRoundReqVO {
/** 设备ID */
@NotNull
private Integer eid;
/** 开始高度 */
private Float start_height;
/** 开始幅度 */
private Float start_range;
/** 开始回转角度 */
private Float start_rotation_angle;
/** 结束高度 */
private Float end_height;
/** 结束幅度 */
private Float end_range;
/** 结束回转角度 */
private Float end_rotation_angle;
/** 重量 */
private Float weight;
/** 力矩百分比 */
private Float moment_percent;
/** 开始时间 */
private String start_time;
/** 结束时间 */
private String end_time;
}

View File

@ -0,0 +1,36 @@
package com.yanzhu.manage.domain.vo;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* -
*/
@Data
public class TyTowerRunReqVO {
/** 设备ID */
@NotNull
private Integer eid;
/** 高度(米) */
private Float height;
/** 重量(kg) */
private Float weight;
/** 回转(°) */
private Float round;
/** 幅度(°) */
private Float amplitude;
/** 风速(米/秒) */
private Float wind_speed;
/** 力矩 */
private Float moment;
/** 力矩百分比(%) */
private Float moment_percent;
/** 倍率(正整数) */
private Integer override;
/** 倾角X(°) */
private Float angle_x;
/** 倾角Y(°) */
private Float angle_y;
}

View File

@ -0,0 +1,39 @@
package com.yanzhu.manage.domain.vo;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* -
*/
@Data
public class TyTowerWarningReqVO {
/** 设备ID */
@NotNull
private Integer eid;
/** 高度 */
private Float height;
/** 重量 */
private Float weight;
/** 回转 */
private Float round;
/** 幅度 */
private Float amplitude;
/** 风速 */
private Float wind_speed;
/** 力矩 */
private Float moment;
/** 力矩百分比 */
private Float moment_percent;
/** 倍率 */
private Integer override;
/** 倾角X */
private Float angle_x;
/** 倾角Y */
private Float angle_y;
/** 报警type,报警内容由报警编号决定 */
private Integer alarm_type;
}

View File

@ -53,7 +53,6 @@ public class DevTowerDataRoundServiceImpl implements IDevTowerDataRoundService
@Override
public int insertDevTowerDataRound(DevTowerDataRound devTowerDataRound)
{
//devTowerDataRound.setCreateBy(SecurityUtils.getUsername());
devTowerDataRound.setCreateTime(DateUtils.getNowDate());
return devTowerDataRoundMapper.insertDevTowerDataRound(devTowerDataRound);
}
@ -67,7 +66,6 @@ public class DevTowerDataRoundServiceImpl implements IDevTowerDataRoundService
@Override
public int updateDevTowerDataRound(DevTowerDataRound devTowerDataRound)
{
//devTowerDataRound.setUpdateBy(SecurityUtils.getUsername());
devTowerDataRound.setUpdateTime(DateUtils.getNowDate());
return devTowerDataRoundMapper.updateDevTowerDataRound(devTowerDataRound);
}

View File

@ -186,89 +186,49 @@ public class ProPlanScheduleServiceImpl implements IProPlanScheduleService
* @param plan
*/
private void RecursionEditStartDate(ProPlan plan){
if(plan.getStartDate()!=null){
int res = proPlanMapper.updateProPlan(plan);
if(res>0){
ProPlan entity = proPlanMapper.selectProPlanByParams(plan.getProjectId(),plan.getParentId());
if(entity!=null){
List<ProPlan> belows = proPlanMapper.selectProPlanBelows(entity.getProjectId(),entity.getTaskId());
int Finished = 0;
try {
if(belows.size()>0){
for(ProPlan item:belows){
Float sNode = Convert.toFloat(item.getScheduleNode(),0.0F);
if(sNode>0){
if(sNode==100){
Finished += Convert.toFloat(item.getTaskDuation(),0.0F);
}else{
Finished += Convert.toFloat(item.getTaskDuation()*(sNode/100));
}
int res = proPlanMapper.updateProPlan(plan);
if(res>0){
ProPlan entity = proPlanMapper.selectProPlanByParams(plan.getProjectId(),plan.getParentId());
if(entity!=null){
if(entity.getStartDate()==null){
entity.setStartDate(plan.getStartDate());
}
List<ProPlan> belows = proPlanMapper.selectProPlanBelows(entity.getProjectId(),entity.getTaskId());
Float Finished = 0.0F;
int totalTaskDuation = 0;
try {
if(belows.size()>0){
for(ProPlan item:belows){
totalTaskDuation += item.getTaskDuation();
Float sNode = Convert.toFloat(item.getScheduleNode(),0.0F);
if(sNode>0){
if(sNode>=100){
Finished += Convert.toFloat(item.getTaskDuation(),0.0F);
}else{
Finished += Convert.toFloat(item.getTaskDuation()*(sNode/100));
}
}
}
}catch (Exception e){
e.printStackTrace();
}
if(Finished==0){
entity.setScheduleNode("0");
}else{
Double _cn = Convert.toDouble(Finished/entity.getTaskDuation())*100;
if(_cn>100){
entity.setScheduleNode("100");
}else{
entity.setScheduleNode(String.format("%.2f", _cn));
}
}
// 更新总进度
if(entity.getTaskOutlineLevel()==1){
proPlanScheduleMapper.updateProPlanTotalSchedule(entity.getProjectId(),entity.getScheduleNode());
}
System.out.println("RecursionEditStartDate.entity.getScheduleNode()..."+entity.getScheduleNode());
entity.setStartDate(plan.getStartDate());
RecursionEditStartDate(entity);
}catch (Exception e){
e.printStackTrace();
}
}
}else{
int res = proPlanMapper.updateProPlanStartDate(plan);
if(res>0){
ProPlan entity = proPlanMapper.selectProPlanByParams(plan.getProjectId(),plan.getParentId());
if(entity!=null){
List<ProPlan> belows = proPlanMapper.selectProPlanBelows(entity.getProjectId(),entity.getTaskId());
Float Finished = 0.0F;
try {
if(belows.size()>0){
for(ProPlan item:belows){
Float sNode = Convert.toFloat(item.getScheduleNode(),0.0F);
if(sNode>0){
if(sNode==100){
Finished += Convert.toFloat(item.getTaskDuation(),0.0F);
}else{
Finished += Convert.toFloat(item.getTaskDuation()*(sNode/100));
}
}
}
}
}catch (Exception e){
e.printStackTrace();
}
if(Finished==0){
entity.setScheduleNode("0");
if(Finished==0){
entity.setScheduleNode("0");
}else{
Double _cn = Convert.toDouble(Finished/totalTaskDuation)*100;
if(_cn>=100){
entity.setScheduleNode("100");
}else{
Double _cn = Convert.toDouble(Finished/entity.getTaskDuation())*100;
if(_cn>100){
entity.setScheduleNode("100");
}else{
entity.setScheduleNode(String.format("%.2f", _cn));
}
entity.setScheduleNode(String.format("%.2f", _cn));
}
// 更新总进度
if(entity.getTaskOutlineLevel()==1){
proPlanScheduleMapper.updateProPlanTotalSchedule(entity.getProjectId(),entity.getScheduleNode());
}
System.out.println("RecursionEditStartDate.entity.getScheduleNode()..."+entity.getScheduleNode());
entity.setStartDate(plan.getStartDate());
RecursionEditStartDate(entity);
}
// 更新总进度
if(entity.getTaskOutlineLevel()==1L){
proPlanScheduleMapper.updateProPlanTotalSchedule(entity.getProjectId(),entity.getScheduleNode());
}
System.out.println("RecursionEditStartDate.entity.getScheduleNode()..."+entity.getScheduleNode());
RecursionEditStartDate(entity);
}
}
}
@ -278,93 +238,53 @@ public class ProPlanScheduleServiceImpl implements IProPlanScheduleService
* @param plan
*/
private void RecursionEditFinishDate(ProPlan plan){
if(plan.getFinishDate()!=null){
int res = proPlanMapper.updateProPlan(plan);
if(res>0){
ProPlan entity = proPlanMapper.selectProPlanByParams(plan.getProjectId(),plan.getParentId());
if(entity!=null){
int res = proPlanMapper.updateProPlan(plan);
if(res>0){
ProPlan entity = proPlanMapper.selectProPlanByParams(plan.getProjectId(),plan.getParentId());
if(entity!=null){
if(plan.getFinishDate()!=null){
entity.setFinishDate(plan.getFinishDate());
entity.setUpdateTime(plan.getUpdateTime());
if(entity.getStartDate()==null){
entity.setStartDate(entity.getUpdateTime());
}
List<ProPlan> belows = proPlanMapper.selectProPlanBelows(entity.getProjectId(),entity.getTaskId());
Float Finished = 0.0F;
try {
if(belows.size()>0){
for(ProPlan item:belows){
Float sNode = Convert.toFloat(item.getScheduleNode(),0.0F);
if(sNode>0){
if(sNode==100){
Finished += Convert.toFloat(item.getTaskDuation(),0.0F);
}else{
Finished += Convert.toFloat(item.getTaskDuation()*(sNode/100));
}
}
List<ProPlan> belows = proPlanMapper.selectProPlanBelows(entity.getProjectId(),entity.getTaskId());
Float Finished = 0.0F;
int totalTaskDuation = 0;
try {
if(belows.size()>0){
for(ProPlan item:belows){
totalTaskDuation += item.getTaskDuation();
Float sNode = Convert.toFloat(item.getScheduleNode(),0.0F);
if(sNode>0){
if(sNode>=100){
Finished += Convert.toFloat(item.getTaskDuation(),0.0F);
}else{
Finished += Convert.toFloat(item.getTaskDuation()*(sNode/100));
}
}
}
}catch (Exception e){
e.printStackTrace();
}
if(Finished==0){
entity.setScheduleNode("0");
}else{
Double _cn = Convert.toDouble(Finished/entity.getTaskDuation())*100;
if(_cn>100){
entity.setScheduleNode("100");
}else{
entity.setScheduleNode(String.format("%.2f", _cn));
}
}
// 更新总进度
if(entity.getTaskOutlineLevel()==1L){
proPlanScheduleMapper.updateProPlanTotalSchedule(entity.getProjectId(),entity.getScheduleNode());
}
System.out.println("RecursionEditFinishDate.entity.getScheduleNode()..."+entity.getScheduleNode());
entity.setFinishDate(plan.getFinishDate());
RecursionEditFinishDate(entity);
}catch (Exception e){
e.printStackTrace();
}
}
}else{
int res = proPlanMapper.updateProPlanFinishDate(plan);
if(res>0){
ProPlan entity = proPlanMapper.selectProPlanByParams(plan.getProjectId(),plan.getParentId());
if(entity!=null){
List<ProPlan> belows = proPlanMapper.selectProPlanBelows(entity.getProjectId(),entity.getTaskId());
Float Finished = 0.0F;
try {
if(belows.size()>0){
for(ProPlan item:belows){
Float sNode = Convert.toFloat(item.getScheduleNode(),0.0F);
if(sNode>0){
if(sNode==100){
Finished += Convert.toFloat(item.getTaskDuation(),0.0F);
}else{
Finished += Convert.toFloat(item.getTaskDuation()*(sNode/100));
}
}
}
}
}catch (Exception e){
e.printStackTrace();
}
if(Finished==0){
entity.setScheduleNode("0");
if(Finished==0){
entity.setScheduleNode("0");
}else{
Double _cn = Convert.toDouble(Finished/totalTaskDuation)*100;
if(_cn>=100){
entity.setScheduleNode("100");
}else{
Double _cn = Convert.toDouble(Finished/entity.getTaskDuation())*100;
if(_cn>100){
entity.setScheduleNode("100");
}else{
entity.setScheduleNode(String.format("%.2f", _cn));
}
entity.setScheduleNode(String.format("%.2f", _cn));
}
// 更新总进度
if(entity.getTaskOutlineLevel()==1L){
proPlanScheduleMapper.updateProPlanTotalSchedule(entity.getProjectId(),entity.getScheduleNode());
}
System.out.println("RecursionEditFinishDate.entity.getScheduleNode()..."+entity.getScheduleNode());
entity.setFinishDate(plan.getFinishDate());
RecursionEditFinishDate(entity);
}
// 更新总进度
if(entity.getTaskOutlineLevel()==1L){
proPlanScheduleMapper.updateProPlanTotalSchedule(entity.getProjectId(),entity.getScheduleNode());
}
System.out.println("RecursionEditFinishDate.entity.getScheduleNode()..."+entity.getScheduleNode());
RecursionEditFinishDate(entity);
}
}
}

View File

@ -321,4 +321,20 @@ export function submitPlanSchedule(data) {
method: 'post',
data: data
})
}
}
// 视频监控管理
export function proVideoList(query) {
return request({
url: '/manage/videoMonitor/list',
method: 'get',
params: query
})
}
export function getYsToken(id){
return request({
url: '/manage/videoMonitor/getYsToken/' + id,
method: 'get'
})
}

View File

@ -61,7 +61,7 @@ App({
// this.toast("请使用手机号码登录");
// }, 1000);
wx.redirectTo({
url: '/pages/login/index',
url: '/pages/login/login',
});
}
}

View File

@ -1,38 +1,49 @@
{
"pages": [
"pages/login/login",
"pages/project_qr/index",
"pages/project_list/index",
"pages/project_info/index",
"pages/project_more/index",
"pages/project_safety/index",
"pages/project_quality/index",
"pages/sign_mags/index",
"pages/project_flowable/approveTask/index",
"pages/project_flowable/detailTask/index",
"pages/project_flowable/subDepts/index",
"pages/project_flowable/subDeptsUsers/index",
"pages/project_problemmodify/list/index",
"pages/project_problemmodify/info/index",
"pages/project_problemmodify/modify/index",
"pages/project_problemmodify/check/index",
"pages/project_problemmodify/add/index",
"pages/project_problemmodify/draft/index",
"pages/project_subdepts/list/index",
"pages/project_subdepts/add/index",
"pages/project_subdepts/info/index",
"pages/project_subgroups/list/index",
"pages/project_subgroups/add/index",
"pages/project_subgroups/info/index",
"pages/project_subusers/list/index",
"pages/project_subusers/add/index",
"pages/project_subusers/info/index",
"pages/project_magusers/list/index",
"pages/project_magusers/add/index",
"pages/project_magusers/info/index",
"pages/project_schedule/list/index",
"pages/project_schedule/add/index",
"pages/project_schedule/info/index"
"pages/project_qr/index"
],
"subpackages": [
{
"root": "pageage",
"name": "pageage",
"pages": [
"project_flowable/approveTask/index",
"project_flowable/detailTask/index",
"project_flowable/subDepts/index",
"project_flowable/subDeptsUsers/index",
"project_video/list/index",
"project_video/info/index",
"project_list/index",
"project_info/index",
"project_more/index",
"project_safety/index",
"project_quality/index",
"sign_mags/index",
"project_problemmodify/list/index",
"project_problemmodify/info/index",
"project_problemmodify/modify/index",
"project_problemmodify/check/index",
"project_problemmodify/add/index",
"project_problemmodify/draft/index",
"project_subdepts/list/index",
"project_subdepts/add/index",
"project_subdepts/info/index",
"project_subgroups/list/index",
"project_subgroups/add/index",
"project_subgroups/info/index",
"project_subusers/list/index",
"project_subusers/add/index",
"project_subusers/info/index",
"project_magusers/list/index",
"project_magusers/add/index",
"project_magusers/info/index",
"project_schedule/list/index",
"project_schedule/add/index",
"project_schedule/info/index"
],
"independent": false
}
],
"usingComponents": {
"van-row": "@vant/weapp/row",
@ -84,6 +95,12 @@
"curve-echarts": "pages/components/curve-echarts/index",
"user-infos": "pages/components/user-infos/index"
},
"plugins": {
"ezplayer": {
"version": "1.0.9",
"provider": "wxf2b3a0262975d8c2"
}
},
"window": {
"backgroundTextStyle": "light",
"navigationBarBackgroundColor": "#191d28",

View File

@ -7,7 +7,7 @@
<view class="tree-item-onOff" wx:else></view>
<view class="block_" bindtap="select" data-item="{{item}}" data-index="{{index}}">
<block wx:if="{{showCheckBox}}">
<image wx:if="{{item.checked === 1}}" src="/images/choice.png" class="check-box"></image>
<image wx:if="{{item.checked === 1}}" src="https://xiangguan.sxyanzhu.com/profile/static/images/choice.png" class="check-box"></image>
<image wx:if="{{item.checked === 0}}" src="/images/unchoice.png" class="check-box"></image>
<image wx:if="{{item.checked === -1}}" src="/images/unfullChoice.png" class="check-box"></image>
</block>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 579 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 579 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -28,21 +28,21 @@
<button wx:if="{{false}}" type="default" size="default" style="margin-top: 40rpx;background-color: #513ea7;color: #FFF;" bindtap="bindingBuild">立即关注公众号</button>
<view class="left_manage_min" wx:if="{{false}}">
<view class="left_manage" bindtap="binding">
<image src="/images/img_1.png" class="left_icon"></image>
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/img_1.png" class="left_icon"></image>
<text class="left_binding">授权消息通知</text>
<image src="/images/right.png" class="left_flaot"></image>
</view>
</view>
<view class="left_manage_min">
<view class="left_manage" bindtap="resPassword">
<image src="/images/img_5.png" class="left_icon"></image>
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/img_5.png" class="left_icon"></image>
<text class="left_password">修改密码</text>
<image src="/images/right.png" class="left_flaot"></image>
</view>
</view>
<view class="left_manage_min">
<view class="left_manage" bindtap="loginOut">
<image src="/images/set.png" class="left_icon"></image>
<image src="https://xiangguan.sxyanzhu.com/profile/static/images/set.png" class="left_icon"></image>
<text class="left_sign">退出登录</text>
<image src="/images/right.png" class="left_flaot"></image>
</view>
@ -60,7 +60,7 @@
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">旧密码</view>
<view class="inspect_info_content">
<input placeholder="请输入旧密码" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" password="{{showOldPass}}" maxlength="20" model:value="{{oldPsw}}" />
<image wx:if="{{showOldPass}}" class="password-icon" src="/images/biyan.png" bindtap="seeTap1"></image>
<image wx:if="{{showOldPass}}" class="password-icon" src="https://xiangguan.sxyanzhu.com/profile/static/images/biyan.png" bindtap="seeTap1"></image>
<image wx:else class="password-icon" src="/images/yj_01.png" bindtap="seeTap1"></image>
</view>
</view>
@ -68,7 +68,7 @@
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">新密码</view>
<view class="inspect_info_content">
<input placeholder="请输入新密码" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" password="{{showNewPass}}" maxlength="20" model:value="{{newPsw}}" />
<image class="password-icon" src="/images/biyan.png" bindtap="seeTap2" wx:if="{{showNewPass}}" />
<image class="password-icon" src="https://xiangguan.sxyanzhu.com/profile/static/images/biyan.png" bindtap="seeTap2" wx:if="{{showNewPass}}" />
<image class="password-icon" src="/images/yj_01.png" bindtap="seeTap2" wx:else />
</view>
</view>
@ -76,7 +76,7 @@
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">确认密码</view>
<view class="inspect_info_content">
<input placeholder="请确认新密码" placeholder-style="color:#6777aa;" class="inspect_input_fill_in" password="{{showPassWord}}" maxlength="20" model:value="{{password}}" />
<image class="password-icon" src="/images/biyan.png" bindtap="seeTap3" wx:if="{{showPassWord}}" />
<image class="password-icon" src="https://xiangguan.sxyanzhu.com/profile/static/images/biyan.png" bindtap="seeTap3" wx:if="{{showPassWord}}" />
<image class="password-icon" src="/images/yj_01.png" bindtap="seeTap3" wx:else />
</view>
</view>

View File

@ -187,14 +187,14 @@ Page({
setUserInfo(userInfo);
//单项目直接进入项目页面
wx.redirectTo({
url: '../project_info/index',
url: '../../pageage/project_info/index',
})
}
});
}else{
//多项目进入项目切换页面
wx.redirectTo({
url: '../project_list/index',
url: '../../pageage/project_list/index',
})
}
}else{

View File

@ -1,468 +0,0 @@
import config from '../../../config'
import {
reject,
complete,
returnTask,
returnList,
readDeployNotes,
findCommentByProcInsId
} from '../../../api/flowable'
import {
editApproveStatus,
findProSubDeptsInfoById,
findProSubDeptsUserInfoById
} from '../../../api/project'
import {
getToken
} from '../../../utils/auth'
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
options: {},
active: 0,
stepList: [],
rejectNode: false,
activeName: "",
flowRecordList: [],
subDeptData: {
subDeptInfos: {}
},
subDeptUserData: {
userInfos: {},
},
comment: "",
targetKey: "",
targetKeyList: [],
imgBaseUrl: config.baseImgUrl
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
options: options
})
this.findFlowNodes();
this.findApplyDataInfo();
this.findCommentByProcInsId();
this.initTargetKeyList();
},
//查询工作流节点
findFlowNodes() {
readDeployNotes(this.data.options.deployId).then(res => {
let list = [{
text: '开始'
}];
let index = this.data.active;
res.data.forEach((item, idx) => {
if (this.data.options.taskName == item.name) {
index = idx + 1;
}
list.push({
text: item.name.substr(0,5),
desc: ''
});
});
list.push({
text: '结束'
});
this.setData({
active: index,
stepList: list
})
});
},
//查询审批日志
findCommentByProcInsId() {
findCommentByProcInsId({
procInsId: this.data.options.procInsId
}).then(res => {
this.setData({
flowRecordList: res.data
})
let list = [];
res.data.forEach((item, idx) => {
if (idx == 1 && (item.commentType == "3" || item.commentType == "2")) {
this.setData({
rejectNode: true
})
}
if (item.deleteReason) {
item.deleteReason = this.getDeleteReason(item.deleteReason);
}
if (item.duration) {
item.duration = app.getDurationDate(item.duration);
}
list.push(item);
})
this.setData({
flowRecordList: list
})
});
},
//查询审批表单参数
findApplyDataInfo() {
findProSubDeptsUserInfoById(this.data.options.businessKey).then(res => {
if (res.data.eduFilePath) {
let files = res.data.eduFilePath.split('/');
res.data.eduFileName = files[files.length - 1];
}
if(res.data.userInfos){
res.data.userInfos = JSON.parse(res.data.userInfos);
}
this.setData({
subDeptUserData: res.data
})
//查询单位信息
this.getSubDeptInfo(res.data.subDeptId);
})
},
//查询审批表单参数
getSubDeptInfo(subDeptId) {
findProSubDeptsInfoById(subDeptId).then(res => {
res.data.subDeptInfos = JSON.parse(res.data.subDeptInfos);
this.setData({
subDeptData: res.data
})
})
},
//初始化退回节点
initTargetKeyList() {
returnList({
taskId: this.data.options.taskId
}).then(res => {
if (res.data && res.data.length > 0) {
let list = [];
res.data.forEach(item => {
list.push({
id: item.id,
text: item.name
})
})
this.setData({
targetKey: list[0].id,
targetKeyList: list
})
}
});
},
//退回
onBack() {
let {
options,
comment
} = this.data;
//数据效验
if (!options.taskId) {
app.toast("数据异常,请刷新页面重试!")
return;
}
if (!comment) {
app.toast("请填写审批意见!")
return false;
}
let that = this;
//弹出确认
wx.showModal({
title: '提示',
content: '是否确认审批驳回?',
success: function (sm) {
if (sm.confirm) {
that.submitBackTask();
}
}
})
},
/**
* 提交退回任务
*/
submitBackTask() {
let {
options,
comment,
targetKeyList
} = this.data;
returnTask({
taskId: options.taskId,
targetKey: targetKeyList[0].id,
comment
}).then(res => {
if (res.code == 200) {
editApproveStatus(this.data.options.businessKey);
app.toast("驳回申请成功!")
setTimeout(() => {
this.returnToPage();
}, 500)
}
});
},
//通过
onPass() {
let {
options,
comment
} = this.data;
//数据效验
if (!options.taskId) {
app.toast("数据异常,请刷新页面重试!")
return;
}
if (comment == "") {
app.toast("请填写审批意见!")
return;
}
let that = this;
//弹出确认
wx.showModal({
title: '提示',
content: '是否确认审批通过?',
success: function (sm) {
if (sm.confirm) {
that.submitPassTask();
}
}
})
},
/**
* 提交审核结果
*/
submitPassTask() {
let {
options,
procInsId,
comment
} = this.data;
complete({
taskId: options.taskId,
instanceId: procInsId,
comment
}).then(res => {
if (res.code == 200) {
app.toast("申请审批通过成功!")
setTimeout(() => {
this.returnToPage();
}, 500)
}
});
},
//驳回
onReject() {
let {
taskId,
procInsId,
comment
} = this.data;
//数据效验
if (!taskId || !procInsId) {
app.toast("数据异常,请刷新页面重试!")
return;
}
if (comment == "") {
app.toast("请填写审批意见!")
return;
}
let that = this;
//弹出确认
wx.showModal({
title: '提示',
content: '是否确认审批驳回?',
success: function (sm) {
if (sm.confirm) {
that.submitRejectTask();
}
}
})
},
/**
* 提交流程驳回
*/
submitRejectTask() {
let {
taskId,
procInsId,
comment
} = this.data;
reject({
taskId,
instanceId: procInsId,
comment
}).then(res => {
if (res.code == 200) {
app.toast("驳回申请流程成功!")
setTimeout(() => {
this.returnToPage();
}, 500)
}
});
},
//申请说明
commentInput: function (options) {
this.data.comment = options.detail.value;
},
// 手风琴
onChange(event) {
this.setData({
activeName: event.detail,
});
},
/**
* 获取驳回节点
* @param {*} val
*/
getDeleteReason(val) {
val = val.replace("Change activity to ", "");
let flowRecordList = this.data.flowRecordList;
for (let i = 0; i < flowRecordList.length; i++) {
if (flowRecordList[i].taskDefKey == val) {
return "驳回至" + flowRecordList[i].taskName;
}
}
},
//终止原因
commentblur: function (options) {
this.data.comment = options.detail.value;
},
//展示图片
showImg: function (e) {
let paths = e.target.dataset.set;
let path = [];
paths.split(',').forEach(url => {
path.push(config.baseImgUrl + url);
});
wx.previewImage({
urls: path,
current: path[0]
})
},
/**
* 下载并打开文档
* @param {*} e
*/
downFile: function (e) {
let path = this.data.subDeptUserData.eduFilePath;
wx.downloadFile({
// 示例 url并非真实存在
url: config.baseUrl + '/file/download?fileName=' + path,
header: {
'Authorization': 'Bearer ' + getToken()
},
success: function (res) {
const filePath = res.tempFilePath
let fpt = path.split(".");
wx.openDocument({
filePath: filePath,
fileType: fpt[fpt.length - 1],
success: function (res) {
console.log('打开文档成功')
},
fail: function (res) {
console.log(res)
}
})
}
})
},
//选择退回节点
onSelectTargetKey(e) {
this.setData({
targetKey: e.detail.id,
backName: e.detail.name
})
},
/**
* 返回页面
*/
returnToPage: function () {
if (wx.getStorageSync('nav-types') == "depts") {
wx.redirectTo({
url: '../subDepts/index',
})
} else if (wx.getStorageSync('nav-types') == "users") {
wx.redirectTo({
url: '../subDeptsUsers/index',
})
}
},
/**
* 修改申请
*/
onEditApply: function () {
wx.redirectTo({
url: `../editTask/index?deployId=${this.data.options.deployId}&procInsId=${this.data.options.procInsId}&nickName=${this.data.options.nickName}&deptName=${this.data.options.deptName}&procDefName=${this.data.options.procDefName}&taskId=${this.data.options.taskId}&taskName=${this.data.options.taskName}&category=${this.data.options.category}&projectName=${this.data.options.projectName}&businessKey=${this.data.options.businessKey}&businessKeyParName=${this.data.options.businessKeyParName}&businessDeptId=${this.data.options.businessDeptId}&startUserId=${this.data.options.startUserId}`,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -1,8 +0,0 @@
{
"usingComponents": {
"van-collapse": "@vant/weapp/collapse",
"van-collapse-item": "@vant/weapp/collapse-item",
"van-steps": "@vant/weapp/steps/index"
},
"navigationStyle":"custom"
}

View File

@ -1,347 +0,0 @@
<view class="header_title">
<view class="header_title_row">
<van-row>
<van-col span="4">
<view class="header_img" bindtap="returnToPage">
<image src="/images/left.png"></image>
<text class="header_fh">返回</text>
</view>
</van-col>
<van-col span="16">
<view class="header_name">流程申请详情</view>
</van-col>
</van-row>
</view>
</view>
<view class="max_content">
<van-steps steps="{{ stepList }}" active="{{ active }}" />
<view class="inspect_overview inspect_overview_max">
<view class="gk_open" style="margin-top: 20rpx;border: 1px solid transparent;">
<van-collapse value="{{activeName}}" bind:change="onChange">
<van-collapse-item title="审批日志" name="2">
<view class="inspect_list">
<view class="inspect_for" wx:for="{{flowRecordList}}" wx:key="index">
<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">{{(flowRecordList.length-index) < 10 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}</view>
<view class="module_title module_title_flex inspect_list_title_text">{{item.taskName}}
<text wx:if="{{item.taskName!='提交申请' && item.commentResult=='通过'}}" class="timeline_for_state_1 color_green">{{item.commentResult}}</text>
<text wx:if="{{item.commentResult=='委派'}}" class="timeline_for_state_1 color_blue">{{item.commentResult}}</text>
<text wx:if="{{item.commentResult=='转办'}}" class="timeline_for_state_1 color_blue">{{item.commentResult}}</text>
<text wx:if="{{item.commentResult=='驳回'}}" class="timeline_for_state_2 color_purple">{{item.commentResult}}</text>
<text wx:if="{{item.commentResult=='退回'}}" class="timeline_for_state_2 color_purple">{{item.commentResult}}</text>
</view>
</view>
</view>
<view class="inspect_list_info gk_open_con">
<view wx:if="{{item.assigneeName}}">
<image src="/images/lw_3.png"></image>办理用户:<text>{{item.assigneeName}}</text>
</view>
<view wx:if="{{item.assigneeName}}">
<image src="/images/s_1.png"></image>办理单位:<text class="color_blue">{{item.deptName}}</text>
</view>
<view wx:if="{{item.candidate}}">
<image src="/images/s_2.png"></image>候选办理:<text>{{item.candidate}}</text>
</view>
<view wx:if="{{item.deleteReason}}">
<image src="/images/s_18.png"></image>驳回节点:<text>{{item.deleteReason}}</text>
</view>
<view>
<image src="/images/s_6.png"></image>接收时间:<text>{{item.startTime}}</text>
</view>
<view wx:if="{{item.endTime}}">
<image src="/images/lw_8.png"></image>处理时间:<text>{{item.endTime}}</text>
</view>
<view wx:if="{{item.duration}}">
<image src="/images/img_11.png"></image>处理耗时:<text>{{item.duration}}</text>
</view>
<view wx:if="{{item.message}}">
<image src="/images/s_7.png"></image>处理意见:<text>{{item.message}}</text>
</view>
</view>
</view>
</view>
</view>
</van-collapse-item>
</van-collapse>
</view>
<view class="module_title module_title_padding">
<view>{{subDeptData.projectName}}</view>
</view>
<view class="inspect_info" wx:if="{{options.category=='1' || options.category=='2' || options.category=='3' || options.category=='4' || options.category=='5' || options.category=='6' || options.category=='8'}}">
<!-- <view class="inspect_overview_list">
<van-row>
<van-col span="8"><text class="color_purple">项目单位</text></van-col>
<van-col span="16" class="color_orange">{{ subDeptData.projectName}}</van-col>
</van-row>
</view> -->
<view class="inspect_overview_list">
<van-row>
<van-col span="8"><text class="color_purple">单位类型</text></van-col>
<van-col span="16" class="color_blue">{{subDeptData.subDeptTypeName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list">
<van-row>
<van-col span="8"><text class="color_purple">单位名称</text></van-col>
<van-col span="16">{{subDeptData.subDeptName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category=='1'}}">
<van-row>
<van-col span="8"><text class="color_purple">信用代码</text></van-col>
<van-col span="16">{{subDeptData.subDeptCode}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category=='1'}}">
<van-row>
<van-col span="8"><text class="color_purple">营业执照</text></van-col>
<van-col span="16">
<view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:key="index">
<image bindtap='showImg' data-set="{{subDeptData.businessLicensePath}}" src="{{imgBaseUrl+subDeptData.businessLicensePath+'.min.jpg'}}"></image>
</view>
</view>
</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category=='1'}}">
<van-row>
<van-col span="8"><text class="color_purple">法人姓名</text></van-col>
<van-col span="16">{{subDeptData.subDeptInfos.legalPerson}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category=='1'}}">
<van-row>
<van-col span="8"><text class="color_purple">法人身份证</text></van-col>
<van-col span="16">{{subDeptData.subDeptInfos.legalPersonCard}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category=='1'}}">
<van-row>
<van-col span="8"><text class="color_purple">法人证件</text></van-col>
<van-col span="16">
<view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:key="index">
<image bindtap='showImg' data-set="{{subDeptData.subDeptInfos.legalPersonCardImgPos}}" src="{{imgBaseUrl+subDeptData.subDeptInfos.legalPersonCardImgPos+'.min.jpg'}}"></image>
<image bindtap='showImg' data-set="{{subDeptData.subDeptInfos.legalPersonCardImgInv}}" src="{{imgBaseUrl+subDeptData.subDeptInfos.legalPersonCardImgInv+'.min.jpg'}}"></image>
</view>
</view>
</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category=='1'}}">
<van-row>
<van-col span="8"><text class="color_purple">进入场地时间</text></van-col>
<van-col span="16">{{subDeptData.useDates}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category=='1'}}">
<van-row>
<van-col span="8"><text class="color_purple">计划开工时间</text></van-col>
<van-col span="16">{{subDeptData.startWorkDates}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category=='1'}}">
<van-row>
<van-col span="8"><text class="color_purple">计划完工时间</text></van-col>
<van-col span="16">{{subDeptData.endWorkDates}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category=='1'}}">
<van-row>
<van-col span="8"><text class="color_purple">合同约定范围</text></van-col>
<van-col span="16">{{subDeptData.contractInfos}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list">
<van-row>
<van-col span="8">
<text wx:if="{{options.category=='1'}}" class="color_purple">委托代理人</text>
<text wx:if="{{options.category!='1'}}" class="color_purple">人员姓名</text>
</van-col>
<van-col span="16">{{subDeptUserData.userName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list">
<van-row>
<van-col span="8">
<text wx:if="{{options.category=='1'}}" class="color_purple">代理人身份证</text>
<text wx:if="{{options.category!='1'}}" class="color_purple">身份证号码</text>
</van-col>
<van-col span="16">{{subDeptUserData.cardCode}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category!='1'}}">
<van-row>
<van-col span="8">
<text class="color_purple">工种岗位</text>
</van-col>
<van-col span="16">{{subDeptUserData.craftPostName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category!='1' && options.category!='2'}}">
<van-row>
<van-col span="8">
<text class="color_purple">工种班组</text>
</van-col>
<van-col span="16">{{subDeptUserData.subDeptGroupName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category!='1'}}">
<van-row>
<van-col span="8"><text class="color_purple">民族</text></van-col>
<van-col span="16">{{subDeptUserData.userInfos.nation}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category!='1'}}">
<van-row>
<van-col span="8"><text class="color_purple">籍贯</text></van-col>
<van-col span="16">{{subDeptUserData.userInfos.nativePlace}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category!='1'}}">
<van-row>
<van-col span="8"><text class="color_purple">详细地址</text></van-col>
<van-col span="16">{{subDeptUserData.userInfos.address}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list">
<van-row>
<van-col span="8">
<text wx:if="{{options.category=='1'}}" class="color_purple">代理人证件</text>
<text wx:if="{{options.category!='1'}}" class="color_purple">人员证件照</text>
</van-col>
<van-col span="16">
<view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:key="index">
<image bindtap='showImg' data-set="{{subDeptUserData.userInfos.cardImgPos}}" src="{{imgBaseUrl+subDeptUserData.userInfos.cardImgPos+'.min.jpg'}}"></image>
<image bindtap='showImg' data-set="{{subDeptUserData.userInfos.cardImgInv}}" src="{{imgBaseUrl+subDeptUserData.userInfos.cardImgInv+'.min.jpg'}}"></image>
</view>
</view>
</van-col>
</van-row>
</view>
<view class="inspect_overview_list">
<van-row>
<van-col span="8"><text class="color_purple">花名册近照</text></van-col>
<van-col span="16">
<view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:key="index">
<image bindtap='showImg' data-set="{{subDeptUserData.userPicture}}" src="{{imgBaseUrl+subDeptUserData.userPicture+'.min.jpg'}}"></image>
</view>
</view>
</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category!='3' && options.category!='4' && options.category!='5' && options.category!='8'}}">
<van-row>
<van-col span="8"><text class="color_purple">单位委托书</text></van-col>
<van-col span="16">
<view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:key="index">
<image bindtap='showImg' data-set="{{subDeptUserData.subDeptPowerPath}}" src="{{imgBaseUrl+subDeptUserData.subDeptPowerPath+'.min.jpg'}}"></image>
</view>
</view>
</van-col>
</van-row>
</view>
<view class="inspect_overview_list">
<van-row>
<van-col span="8"><text class="color_purple">联系电话</text></van-col>
<van-col span="16">{{subDeptUserData.userPhone}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category!='1'}}">
<van-row>
<van-col span="8"><text class="color_purple">紧急联系人</text></van-col>
<van-col span="16">{{subDeptUserData.userInfos.emergencyContact}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category!='1'}}">
<van-row>
<van-col span="8"><text class="color_purple">紧急联系电话</text></van-col>
<van-col span="16">{{subDeptUserData.userInfos.contactPhone}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category=='3' || options.category=='4' || options.category=='5'}}">
<van-row>
<van-col span="8"><text class="color_purple">开户行名称</text></van-col>
<van-col span="16">{{subDeptUserData.userInfos.bankName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category=='3' || options.category=='4' || options.category=='5'}}">
<van-row>
<van-col span="8"><text class="color_purple">开户行网点</text></van-col>
<van-col span="16">{{subDeptUserData.userInfos.bankOffice}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category=='3' || options.category=='4' || options.category=='5'}}">
<van-row>
<van-col span="8"><text class="color_purple">工资银行卡号</text></van-col>
<van-col span="16">{{subDeptUserData.userInfos.bankCardNo}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">高血压、心脏病等基础身体健康问题
</view>
<view class="inspect_info_content">
<text wx:if="{{subDeptUserData.illnessStatus=='0'}}" class="code_label_2 code_label_green" style="padding: 5rpx 50rpx;font-size: 25rpx;">无</text>
<text wx:if="{{subDeptUserData.illnessStatus!='0'}}" class="code_label_2 code_label_red" style="padding: 5rpx 50rpx;font-size: 25rpx;">有</text>
</view>
</view>
<view class="inspect_overview_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">严重呼吸系统疾病、严重心脑血管疾病、肝肾疾病、恶性肿瘤以及药物无法有效控制的高血压和糖尿病等基础性病症状征兆
</view>
<view class="inspect_info_content">
<text wx:if="{{subDeptUserData.supIllnessStatus=='0'}}" class="code_label_2 code_label_green" style="padding: 5rpx 50rpx;font-size: 25rpx;">无</text>
<text wx:if="{{subDeptUserData.supIllnessStatus!='0'}}" class="code_label_2 code_label_red" style="padding: 5rpx 50rpx;font-size: 25rpx;">有</text>
</view>
</view>
<view class="inspect_overview_list">
<van-row>
<van-col span="8"><text class="color_purple">安全承诺书</text></van-col>
<van-col span="16" class="color_blue">
<view class="files">
<text data-set="{{subDeptUserData.eduFilePath}}" style="word-wrap: break-word;" bindtap='downFile'>点击查看安全承诺书</text>
</view>
</van-col>
</van-row>
</view>
</view>
</view>
<view class="inspect_overview_list_max">
<view class="inspect_overview_list">
<view class="markers inspect_overview_title">审批意见</view>
<view class="inspect_overview_content">
<textarea class="add_textarea" placeholder="请填写审批意见500字内" placeholder-style="color:#6777aa;" maxlength="500" bindinput="commentInput" />
</view>
</view>
<view class="inspect_overview_list" wx:if="{{false}}">
<view class="markers inspect_overview_title">退回节点</view>
<view class="inspect_overview_content">
<voucher-select columns="{{targetKeyList}}" placeholder="请选择退回节点" bindchange="onSelectTargetKey"></voucher-select>
</view>
</view>
</view>
<view class="problem_submit_to">
<view class="problem_submit_to_btn" bindtap="onEditApply" wx:if="{{false}}">修改申请</view>
<view class="problem_submit_to_btn problem_submit_to_blue" bindtap="onAssign" wx:if="{{false}}">任务转办</view>
<view class="problem_submit_to_btn problem_submit_to_eq" bindtap="onDelegate" wx:if="{{false}}">任务委派</view>
<view class="problem_submit_to_btn problem_submit_to_delete" bindtap="onBack">审批驳回</view>
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onPass">审批通过</view>
</view>
<view class="problem_submit_to" wx:if="{{false}}">
<view class="problem_submit_to_btn" bindtap="onEditApply">修改申请信息</view>
</view>
<view class="safety_prop module_title_flex" style="margin-left: 30rpx;" wx:if="{{false}}">
<view class="color_orange">“任务转办” 指定人处理后由您继续审批。</view>
</view>
<view class="safety_prop module_title_flex" style="margin-left: 30rpx;" wx:if="{{false}}">
<view class="color_orange">“任务委派” 任务由指定人进行处理。</view>
</view>
</view>

View File

@ -1,112 +0,0 @@
/* pageage/safetyManagement/addSafetyInspect/index.wxss */
.van-popup{
background: none !important;
}
.van-image__img{
border-radius: 10rpx !important;
}
.radio_custom_class{
padding: 10rpx 100rpx 10rpx 0;
}
.radio_label_class{
color: #ffffff !important;
}
.max_tab_name{
padding: 0 40rpx;
font-size:30rpx;
height: 460rpx;
overflow: auto;
margin-top: 20rpx;
text-align: center;
}
.van-popup.van-popup--bottom{
background: #232a44;
}
.van-popup {
background-color: var(--popup-background-color,#232a44) !important;
}
.font_color{
padding: 15rpx 0;
color: #157dd2;
}
.active{
font-size:30rpx;
font-weight: 600;
color: #14feff
}
.van-collapse.van-hairline--top-bottom:after{
border-width: 0px 0;
}
.van-cell.van-cell--borderless{
background-color: #2b345b;
color: #fff;
margin-top: 30rpx;
border-radius: 5rpx;
}
.van-cell.van-cell--borderless:active{
background-color: #2b345b;
}
.van-collapse-item__title.van-collapse-item__title--expanded:active{
background-color: #2b345b;
}
.van-collapse-item .van-cell:after{
border-bottom: 0;
}
.van-collapse-item.van-hairline--top:after{
border-top-width:0
}
.van-cell.van-cell--clickable{
background-color: #2b345b;
margin-top: 30rpx;
color: #fff;
border-radius: 15rpx;
}
.van-cell.van-cell--clickable:active{
background-color: #2b345b;
}
.van-collapse-item__wrapper .van-collapse-item__content{
background-color: #1e2336;
color:#8ca4ec ;
border-width: 0px 0;
}
.gk_open_con view{
padding: 10rpx 0;
width: 100%;
}
.gk_open_con image{
width: 30rpx;
height: 30rpx;
margin-right: 5rpx;
position: relative;
top: 5rpx;
}
.pass{
background-color: #388a38;
}
.transact{
background-color: #8e6424;
}
.text_active{
padding-left: 5rpx;
color: #8369f5;
}
.van-steps{
background-color: transparent !important;
}
.van-step--horizontal .van-step__circle-container{
background-color: transparent !important;
}
.van-steps--horizontal{
padding: 10px 20px !important;
}
.markers{
background: url("https://xiangguan.sxyanzhu.com/profile/icon/req.png") no-repeat left/40rpx;
height: 20px;
line-height: 20px;
padding-left: 42rpx;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
}

View File

@ -1,391 +0,0 @@
import config from '../../../config'
import {
readDeployNotes,
findCommentByProcInsId
} from '../../../api/flowable'
import {
findProSubDeptsInfoById,
findProSubDeptsUserInfoById
} from '../../../api/project'
import {
getToken
} from '../../../utils/auth'
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
options: {},
active: 100,
rejectNode: false,
stepList: [],
activeName: "",
flowRecordList: [],
subDeptData: {
subDeptInfos: {}
},
subDeptUserData: {
userInfos: {},
},
stopShow: false,
deleteShow: false,
revocationShow: false,
fileNames: [],
minImageList: [],
imgTypes: ["png", "jpg", "jpeg"],
stopBtnShow: false,
comment: "",
imgBaseUrl: config.baseImgUrl
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
options: options
})
this.findFlowNodes();
this.findApplyDataInfo();
this.findCommentByProcInsId();
},
//查询工作流节点
findFlowNodes() {
readDeployNotes(this.data.options.deployId).then(res => {
let list = [{
text: '开始'
}];
let index = this.data.active;
res.data.forEach((item,idx) => {
console.log("this.data.options.taskName",this.data.options.taskName)
console.log("item.name",item.name)
if(this.data.options.taskName==item.name){
index = idx+1;
}
list.push({
text: item.name.substr(0,5),
desc: ''
});
});
list.push({
text: '结束'
});
this.setData({
active: index,
stepList: list
})
});
},
//查询审批日志
findCommentByProcInsId() {
findCommentByProcInsId({
procInsId: this.data.options.procInsId
}).then(res => {
this.setData({
flowRecordList: res.data
})
let list = [];
res.data.forEach((item, idx) => {
if (idx == 1 && (item.commentType == "3" || item.commentType == "2")) {
this.setData({
rejectNode: true
})
}
if (item.deleteReason) {
item.deleteReason = this.getDeleteReason(item.deleteReason);
}
if (item.duration) {
item.duration = app.getDurationDate(item.duration);
}
list.push(item);
})
this.setData({
flowRecordList: list
})
});
},
//查询审批表单参数
findApplyDataInfo() {
findProSubDeptsUserInfoById(this.data.options.businessKey).then(res => {
if (res.data.eduFilePath) {
let files = res.data.eduFilePath.split('/');
res.data.eduFileName = files[files.length - 1];
}
if(res.data.userInfos){
res.data.userInfos = JSON.parse(res.data.userInfos);
}
this.setData({
subDeptUserData: res.data
})
//查询单位信息
this.getSubDeptInfo(res.data.subDeptId);
})
},
//查询审批表单参数
getSubDeptInfo(subDeptId) {
findProSubDeptsInfoById(subDeptId).then(res => {
res.data.subDeptInfos = JSON.parse(res.data.subDeptInfos);
this.setData({
subDeptData: res.data
})
})
},
//流程退回
onStop() {
if (!this.data.stopBtnShow) {
app.toast("请填写终止原因!")
this.setData({
stopBtnShow: true
})
return;
} else {
if (this.data.comment == "") {
app.toast("请填写终止原因!")
this.setData({
stopBtnShow: true
})
return;
}
}
let that = this
//弹出确认
wx.showModal({
title: '提示',
content: '是否终止当前流程申请?',
success: function (sm) {
if (sm.confirm) {
that.submitStopProcess();
}
}
})
},
/**
* 确认撤回
*/
submitStopProcess() {
stopProcess({
instanceId: this.data.options.procInsId,
comment: this.data.comment
}).then(res => {
if (res.code == 200) {
app.toast("终止流程申请成功!")
setTimeout(() => {
wx.redirectTo({
url: '../../index/index',
})
}, 500)
}
});
},
//流程删除
onDelete() {
let that = this
//弹出确认
wx.showModal({
title: '提示',
content: '是否确认删除流程申请?',
success: function (sm) {
if (sm.confirm) {
that.submitDeleteInstance();
}
}
})
},
/**
* 流程删除
*/
submitDeleteInstance() {
deleteInstance(this.data.options.procInsId).then(res => {
if (res.code == 200) {
app.toast("删除流程申请成功!")
setTimeout(() => {
wx.redirectTo({
url: '../../index/index',
})
}, 500)
}
});
},
//流程撤回
onRevocation() {
let that = this
//弹出确认
wx.showModal({
title: '提示',
content: '是否确认撤回当前任务流程?',
success: function (sm) {
if (sm.confirm) {
that.submitRevokeProcess();
}
}
});
},
/**
* 流程撤回
*/
submitRevokeProcess() {
revokeProcess({
procInsId: this.data.options.procInsId,
instanceId: this.data.options.procInsId,
taskId: this.data.options.taskId
}).then(res => {
if (res.code == 200) {
app.toast("撤回流程申请成功!")
setTimeout(() => {
wx.redirectTo({
url: '../../index/index',
})
}, 500)
}
});
},
// 手风琴
onChange(event) {
this.setData({
activeName: event.detail,
});
},
/**
* 获取驳回节点
* @param {*} val
*/
getDeleteReason(val) {
val = val.replace("Change activity to ", "");
let flowRecordList = this.data.flowRecordList;
for (let i = 0; i < flowRecordList.length; i++) {
if (flowRecordList[i].taskDefKey == val) {
return "驳回至" + flowRecordList[i].taskName;
}
}
},
//终止原因
commentblur: function (options) {
this.data.comment = options.detail.value;
},
/**
* 下载并打开文档
* @param {*} e
*/
downFile: function (e) {
let path = this.data.subDeptUserData.eduFilePath;
wx.downloadFile({
// 示例 url并非真实存在
url: config.baseUrl + '/file/download?fileName=' + path,
header: {
'Authorization': 'Bearer ' + getToken()
},
success: function (res) {
const filePath = res.tempFilePath
let fpt = path.split(".");
wx.openDocument({
filePath: filePath,
fileType: fpt[fpt.length - 1],
success: function (res) {
console.log('打开文档成功')
},
fail: function (res) {
console.log(res)
}
})
}
})
},
//选择退回节点
onSelectTargetKey(e) {
this.setData({
targetKey: e.detail.id,
backName: e.detail.name
})
},
returnToPage: function () {
/*关闭当前页面,跳转到其它页面。*/
if (wx.getStorageSync('nav-types') == "depts") {
wx.redirectTo({
url: '../subDepts/index',
})
} else if (wx.getStorageSync('nav-types') == "users") {
wx.redirectTo({
url: '../subDeptsUsers/index',
})
}
},
//展示图片
showImg:function(e){
let paths = e.target.dataset.set;
let path = [];
paths.split(',').forEach(url => {
path.push(config.baseImgUrl + url);
});
wx.previewImage({
urls: path,
current: path[0]
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -1,8 +0,0 @@
{
"usingComponents": {
"van-collapse": "@vant/weapp/collapse",
"van-collapse-item": "@vant/weapp/collapse-item",
"van-steps": "@vant/weapp/steps/index"
},
"navigationStyle":"custom"
}

View File

@ -1,314 +0,0 @@
<view class="header_title">
<view class="header_title_row">
<van-row>
<van-col span="4">
<view class="header_img" bindtap="returnToPage">
<image src="/images/left.png"></image>
<text class="header_fh">返回</text>
</view>
</van-col>
<van-col span="16">
<view class="header_name">流程申请详情</view>
</van-col>
</van-row>
</view>
</view>
<view class="max_content">
<van-steps steps="{{ stepList }}" active="{{ active }}" />
<view class="inspect_overview inspect_overview_max">
<view class="gk_open" style="margin-top: 20rpx;border: 1px solid transparent;">
<van-collapse value="{{activeName}}" bind:change="onChange">
<van-collapse-item title="审批日志" name="2">
<view class="inspect_list">
<view class="inspect_for" wx:for="{{flowRecordList}}" wx:key="index">
<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">{{(flowRecordList.length-index) < 10 ?'0'+(flowRecordList.length-index):(flowRecordList.length-index)}}</view>
<view class="module_title module_title_flex inspect_list_title_text">{{item.taskName}}
<text wx:if="{{item.taskName!='提交申请' && item.commentResult=='通过'}}" class="timeline_for_state_1 color_green">{{item.commentResult}}</text>
<text wx:if="{{item.commentResult=='委派'}}" class="timeline_for_state_1 color_blue">{{item.commentResult}}</text>
<text wx:if="{{item.commentResult=='转办'}}" class="timeline_for_state_1 color_blue">{{item.commentResult}}</text>
<text wx:if="{{item.commentResult=='驳回'}}" class="timeline_for_state_2 color_purple">{{item.commentResult}}</text>
<text wx:if="{{item.commentResult=='退回'}}" class="timeline_for_state_2 color_purple">{{item.commentResult}}</text>
</view>
</view>
</view>
<view class="inspect_list_info gk_open_con">
<view wx:if="{{item.assigneeName}}">
<image src="/images/lw_3.png"></image>办理用户:<text>{{item.assigneeName}}</text>
</view>
<view wx:if="{{item.assigneeName}}">
<image src="/images/s_1.png"></image>办理单位:<text class="color_blue">{{item.deptName}}</text>
</view>
<view wx:if="{{item.candidate}}">
<image src="/images/s_2.png"></image>候选办理:<text>{{item.candidate}}</text>
</view>
<view wx:if="{{item.deleteReason}}">
<image src="/images/s_18.png"></image>驳回节点:<text>{{item.deleteReason}}</text>
</view>
<view>
<image src="/images/s_6.png"></image>接收时间:<text>{{item.startTime}}</text>
</view>
<view wx:if="{{item.endTime}}">
<image src="/images/lw_8.png"></image>处理时间:<text>{{item.endTime}}</text>
</view>
<view wx:if="{{item.duration}}">
<image src="/images/img_11.png"></image>处理耗时:<text>{{item.duration}}</text>
</view>
<view wx:if="{{item.message}}">
<image src="/images/s_7.png"></image>处理意见:<text>{{item.message}}</text>
</view>
</view>
</view>
</view>
</view>
</van-collapse-item>
</van-collapse>
</view>
<view class="module_title module_title_padding">
<view>{{subDeptData.projectName}}</view>
</view>
<view class="inspect_info" wx:if="{{options.category=='1' || options.category=='2' || options.category=='3' || options.category=='4' || options.category=='5' || options.category=='6' || options.category=='8'}}">
<!-- <view class="inspect_overview_list">
<van-row>
<van-col span="8"><text class="color_purple">项目单位</text></van-col>
<van-col span="16" class="color_orange">{{ subDeptData.projectName}}</van-col>
</van-row>
</view> -->
<view class="inspect_overview_list">
<van-row>
<van-col span="8"><text class="color_purple">单位类型</text></van-col>
<van-col span="16" class="color_blue">{{subDeptData.subDeptTypeName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list">
<van-row>
<van-col span="8"><text class="color_purple">单位名称</text></van-col>
<van-col span="16">{{subDeptData.subDeptName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category=='1'}}">
<van-row>
<van-col span="8"><text class="color_purple">信用代码</text></van-col>
<van-col span="16">{{subDeptData.subDeptCode}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category=='1'}}">
<van-row>
<van-col span="8"><text class="color_purple">营业执照</text></van-col>
<van-col span="16">
<view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:key="index">
<image bindtap='showImg' data-set="{{subDeptData.businessLicensePath}}" src="{{imgBaseUrl+subDeptData.businessLicensePath+'.min.jpg'}}"></image>
</view>
</view>
</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category=='1'}}">
<van-row>
<van-col span="8"><text class="color_purple">法人姓名</text></van-col>
<van-col span="16">{{subDeptData.subDeptInfos.legalPerson}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category=='1'}}">
<van-row>
<van-col span="8"><text class="color_purple">法人身份证</text></van-col>
<van-col span="16">{{subDeptData.subDeptInfos.legalPersonCard}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category=='1'}}">
<van-row>
<van-col span="8"><text class="color_purple">法人证件</text></van-col>
<van-col span="16">
<view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:key="index">
<image bindtap='showImg' data-set="{{subDeptData.subDeptInfos.legalPersonCardImgPos}}" src="{{imgBaseUrl+subDeptData.subDeptInfos.legalPersonCardImgPos+'.min.jpg'}}"></image>
<image bindtap='showImg' data-set="{{subDeptData.subDeptInfos.legalPersonCardImgInv}}" src="{{imgBaseUrl+subDeptData.subDeptInfos.legalPersonCardImgInv+'.min.jpg'}}"></image>
</view>
</view>
</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category=='1'}}">
<van-row>
<van-col span="8"><text class="color_purple">进入场地时间</text></van-col>
<van-col span="16">{{subDeptData.useDates}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category=='1'}}">
<van-row>
<van-col span="8"><text class="color_purple">计划开工时间</text></van-col>
<van-col span="16">{{subDeptData.startWorkDates}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category=='1'}}">
<van-row>
<van-col span="8"><text class="color_purple">计划完工时间</text></van-col>
<van-col span="16">{{subDeptData.endWorkDates}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category=='1'}}">
<van-row>
<van-col span="8"><text class="color_purple">合同约定范围</text></van-col>
<van-col span="16">{{subDeptData.contractInfos}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list">
<van-row>
<van-col span="8">
<text wx:if="{{options.category=='1'}}" class="color_purple">委托代理人</text>
<text wx:if="{{options.category!='1'}}" class="color_purple">人员姓名</text>
</van-col>
<van-col span="16">{{subDeptUserData.userName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list">
<van-row>
<van-col span="8">
<text wx:if="{{options.category=='1'}}" class="color_purple">代理人身份证</text>
<text wx:if="{{options.category!='1'}}" class="color_purple">身份证号码</text>
</van-col>
<van-col span="16">{{subDeptUserData.cardCode}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category!='1'}}">
<van-row>
<van-col span="8">
<text class="color_purple">工种岗位</text>
</van-col>
<van-col span="16">{{subDeptUserData.craftPostName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category!='1' && options.category!='2'}}">
<van-row>
<van-col span="8">
<text class="color_purple">工种班组</text>
</van-col>
<van-col span="16">{{subDeptUserData.subDeptGroupName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category!='1'}}">
<van-row>
<van-col span="8"><text class="color_purple">民族</text></van-col>
<van-col span="16">{{subDeptUserData.userInfos.nation}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category!='1'}}">
<van-row>
<van-col span="8"><text class="color_purple">籍贯</text></van-col>
<van-col span="16">{{subDeptUserData.userInfos.nativePlace}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category!='1'}}">
<van-row>
<van-col span="8"><text class="color_purple">详细地址</text></van-col>
<van-col span="16">{{subDeptUserData.userInfos.address}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list">
<van-row>
<van-col span="8">
<text wx:if="{{options.category=='1'}}" class="color_purple">代理人证件</text>
<text wx:if="{{options.category!='1'}}" class="color_purple">人员证件照</text>
</van-col>
<van-col span="16">
<view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:key="index">
<image bindtap='showImg' data-set="{{subDeptUserData.userInfos.cardImgPos}}" src="{{imgBaseUrl+subDeptUserData.userInfos.cardImgPos+'.min.jpg'}}"></image>
<image bindtap='showImg' data-set="{{subDeptUserData.userInfos.cardImgInv}}" src="{{imgBaseUrl+subDeptUserData.userInfos.cardImgInv+'.min.jpg'}}"></image>
</view>
</view>
</van-col>
</van-row>
</view>
<view class="inspect_overview_list">
<van-row>
<van-col span="8"><text class="color_purple">花名册近照</text></van-col>
<van-col span="16">
<view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:key="index">
<image bindtap='showImg' data-set="{{subDeptUserData.userPicture}}" src="{{imgBaseUrl+subDeptUserData.userPicture+'.min.jpg'}}"></image>
</view>
</view>
</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category!='3' && options.category!='4' && options.category!='5' && options.category!='8'}}">
<van-row>
<van-col span="8"><text class="color_purple">单位委托书</text></van-col>
<van-col span="16">
<view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:key="index">
<image bindtap='showImg' data-set="{{subDeptUserData.subDeptPowerPath}}" src="{{imgBaseUrl+subDeptUserData.subDeptPowerPath+'.min.jpg'}}"></image>
</view>
</view>
</van-col>
</van-row>
</view>
<view class="inspect_overview_list">
<van-row>
<van-col span="8"><text class="color_purple">联系电话</text></van-col>
<van-col span="16">{{subDeptUserData.userPhone}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category!='1'}}">
<van-row>
<van-col span="8"><text class="color_purple">紧急联系人</text></van-col>
<van-col span="16">{{subDeptUserData.userInfos.emergencyContact}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category!='1'}}">
<van-row>
<van-col span="8"><text class="color_purple">紧急联系电话</text></van-col>
<van-col span="16">{{subDeptUserData.userInfos.contactPhone}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category=='3' || options.category=='4' || options.category=='5'}}">
<van-row>
<van-col span="8"><text class="color_purple">开户行名称</text></van-col>
<van-col span="16">{{subDeptUserData.userInfos.bankName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category=='3' || options.category=='4' || options.category=='5'}}">
<van-row>
<van-col span="8"><text class="color_purple">开户行网点</text></van-col>
<van-col span="16">{{subDeptUserData.userInfos.bankOffice}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{options.category=='3' || options.category=='4' || options.category=='5'}}">
<van-row>
<van-col span="8"><text class="color_purple">工资银行卡号</text></van-col>
<van-col span="16">{{subDeptUserData.userInfos.bankCardNo}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">高血压、心脏病等基础身体健康问题
</view>
<view class="inspect_info_content">
<text wx:if="{{subDeptUserData.illnessStatus=='0'}}" class="code_label_2 code_label_green" style="padding: 5rpx 50rpx;font-size: 25rpx;">无</text>
<text wx:if="{{subDeptUserData.illnessStatus!='0'}}" class="code_label_2 code_label_red" style="padding: 5rpx 50rpx;font-size: 25rpx;">有</text>
</view>
</view>
<view class="inspect_overview_list">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">严重呼吸系统疾病、严重心脑血管疾病、肝肾疾病、恶性肿瘤以及药物无法有效控制的高血压和糖尿病等基础性病症状征兆
</view>
<view class="inspect_info_content">
<text wx:if="{{subDeptUserData.supIllnessStatus=='0'}}" class="code_label_2 code_label_green" style="padding: 5rpx 50rpx;font-size: 25rpx;">无</text>
<text wx:if="{{subDeptUserData.supIllnessStatus!='0'}}" class="code_label_2 code_label_red" style="padding: 5rpx 50rpx;font-size: 25rpx;">有</text>
</view>
</view>
<view class="inspect_overview_list">
<van-row>
<van-col span="8"><text class="color_purple">安全承诺书</text></van-col>
<van-col span="16" class="color_blue">
<view class="files">
<text data-set="{{subDeptUserData.eduFilePath}}" style="word-wrap: break-word;" bindtap='downFile'>点击下载安全承诺书</text>
</view>
</van-col>
</van-row>
</view>
</view>
</view>
</view>

View File

@ -1,101 +0,0 @@
.van-popup{
background: none !important;
}
.van-image__img{
border-radius: 10rpx !important;
}
.radio_custom_class{
padding: 10rpx 100rpx 10rpx 0;
}
.radio_label_class{
color: #ffffff !important;
}
.max_tab_name{
padding: 0 40rpx;
font-size:30rpx;
height: 460rpx;
overflow: auto;
margin-top: 20rpx;
text-align: center;
}
.van-popup.van-popup--bottom{
background: #232a44;
}
.van-popup {
background-color: var(--popup-background-color,#232a44) !important;
}
.font_color{
padding: 15rpx 0;
color: #157dd2;
}
.active{
font-size:30rpx;
font-weight: 600;
color: #14feff
}
.van-collapse.van-hairline--top-bottom:after{
border-width: 0px 0;
}
.van-cell.van-cell--borderless{
background-color: #2b345b;
color: #fff;
margin-top: 30rpx;
border-radius: 5rpx;
}
.van-cell.van-cell--borderless:active{
background-color: #2b345b;
}
.van-collapse-item__title.van-collapse-item__title--expanded:active{
background-color: #2b345b;
}
.van-collapse-item .van-cell:after{
border-bottom: 0;
}
.van-collapse-item.van-hairline--top:after{
border-top-width:0
}
.van-cell.van-cell--clickable{
background-color: #2b345b;
margin-top: 30rpx;
color: #fff;
border-radius: 15rpx;
}
.van-cell.van-cell--clickable:active{
background-color: #2b345b;
}
.van-collapse-item__wrapper .van-collapse-item__content{
background-color: #1e2336;
color:#8ca4ec ;
border-width: 0px 0;
}
.gk_open_con view{
padding: 10rpx 0;
width: 100%;
}
.gk_open_con image{
width: 30rpx;
height: 30rpx;
margin-right: 5rpx;
position: relative;
top: 5rpx;
}
.pass{
background-color: #388a38;
}
.transact{
background-color: #8e6424;
}
.text_active{
padding-left: 5rpx;
color: #8369f5;
}
.van-steps{
background-color: transparent !important;
}
.van-step--horizontal .van-step__circle-container{
background-color: transparent !important;
}
.van-steps--horizontal{
padding: 10px 20px !important;
}

View File

@ -1,277 +0,0 @@
import config from '../../../config'
import {
getToken
} from '../../../utils/auth'
import {
quueryCount,
myAwaitFlowTaskList,
myFinishedFlowTaskList,
} from '../../../api/flowable'
const app = getApp()
Page({
/**
* 页面的初始数据
*/
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) {
if (getToken()) {
this.setData({
pageNum: 1,
pageSize: 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=depts&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=depts&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', "depts");
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',
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

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

View File

@ -1,58 +0,0 @@
<view class="header_title">
<view class="header_title_row">
<van-row>
<van-col span="4">
<view class="header_img" bindtap="returnToPage">
<image src="/images/left.png"></image>
<text class="header_fh">返回</text>
</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 < 10 ?'0'+(index+1):(index+1)}}</view>
<view class="module_title 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

@ -1 +0,0 @@
/* pages/project_flowable/subDepts/index.wxss */

View File

@ -1,372 +0,0 @@
import config from '../../../config'
import {
getToken,
getUserInfo
} from '../../../utils/auth'
import {
quueryCount,
batchComplete,
myAwaitFlowTaskList,
myFinishedFlowTaskList,
} from '../../../api/flowable'
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
projectId: '',
projectName: '',
initData: {},
activeState: "dsh",
dshCount: 0,
yshCount: 0,
listData: [],
pageNum: 1,
pageSize: 10,
total: 0,
checkedAll:false,
showChecked:false,
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) {
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,
}
});
let userInfo = getUserInfo();
if(userInfo && userInfo.projectUserInfo && userInfo.projectUserInfo.subDeptType=="1"){
this.setData({
showChecked:true
});
}
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
} = e.currentTarget.dataset.set
wx.setStorageSync('nav-types', "users");
if (this.data.activeState=="ysh") {
//详情页面
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 {*} e
*/
selectItem: function(event){
let procInsId = event.currentTarget.dataset.set;
console.log("procInsId==>",procInsId)
let _listData = this.data.listData;
_listData.forEach(item =>{
if(procInsId==item.procInsId){
item.selected=!item.selected;
}
})
this.setData({
listData: _listData
});
},
/**
* 全选
*/
onCheckedAll(){
let _checked = !this.data.checkedAll;
let _listData = this.data.listData;
_listData.forEach(item =>{
item.selected=_checked;
});
this.setData({
listData: _listData,
checkedAll: _checked
});
},
/**
* 批量
* 审核通过
*/
onBatchPass(){
let taskIds = [];
let _listData = this.data.listData;
_listData.forEach(item =>{
if(item.selected){
taskIds.push(item.taskId);
}
});
if(taskIds.length==0){
app.toast("请选择要审批的数据项!","none",1500);
return false;
}
let that = this;
//弹出确认
wx.showModal({
title: '提示',
content: '是否确认批量审批通过?',
success: function (sm) {
if (sm.confirm) {
that.submitBatchPass();
}
}
})
},
/**
* 提交审批
*/
submitBatchPass(){
let taskIds = [];
let instanceIds = [];
let _listData = this.data.listData;
_listData.forEach(item =>{
if(item.selected){
taskIds.push(item.taskId);
instanceIds.push(item.procInsId);
}
});
let _data = {
'taskIds':taskIds,
'instanceIds':instanceIds
}
batchComplete(_data).then(res =>{
app.toast("批量审批通过成功!");
this.onLoad();
});
},
/**
* 办理时间计算
* @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',
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

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

View File

@ -1,65 +0,0 @@
<view class="header_title">
<view class="header_title_row">
<van-row>
<van-col span="4">
<view class="header_img" bindtap="returnToPage">
<image src="/images/left.png"></image>
<text class="header_fh">返回</text>
</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 < 10 ?'0'+(index+1):(index+1)}}</view>
<view class="module_title 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 wx:if="{{showChecked && activeState=='dsh'}}" class="myIcon" data-set="{{item.procInsId}}" catchtap="selectItem">
<image src="{{item.selected ? '/images/choice.png' : '/images/unchoice.png'}}" />
</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 && showChecked && activeState=='dsh'}}" class="problem_submit_to">
<view class="problem_submit_to_btn problem_submit_to_blue" bindtap="onCheckedAll">{{checkedAll?"全不选":"全选"}}</view>
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onBatchPass">审批通过</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

@ -1,10 +0,0 @@
/* pages/project_flowable/subDeptsUsers/index.wxss */
.myIcon{
position: fixed;
right: 25px;
}
.myIcon image {
width: 22px;
height: 22px;
background-color: #eeeeee;
}

View File

@ -1,616 +0,0 @@
import config from '../../config'
import {
getToken,
getUserInfo
} from '../../utils/auth'
import {
findProjectInfo,
findProjectDepts
} from '../../api/project'
import {
findSubDeptsUsers,
findDaysAttendanceView,
findUsersAttendanceView,
findSubDeptsAttendanceView
} from '../../api/attendance'
import {
findMyTask
} from '../../api/flowable'
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
title: "项目详情",
activeNames: ["base"],
//项目信息
projectInfo: {},
projectDeptsList: [],
deptTypes: [{
"name": "建设单位",
"iconSrc": "https://xiangguan.sxyanzhu.com/profile/icon/jsdw.png"
}, {
"name": "监理单位",
"iconSrc": "https://xiangguan.sxyanzhu.com/profile/icon/jldw.png"
}, {
"name": "设计单位",
"iconSrc": "https://xiangguan.sxyanzhu.com/profile/icon/sjdw.png"
}, {
"name": "检测单位",
"iconSrc": "https://xiangguan.sxyanzhu.com/profile/icon/jcjg.png"
}, {
"name": "勘察单位",
"iconSrc": "https://xiangguan.sxyanzhu.com/profile/icon/fbdw.png"
}, {
"name": "总包单位",
"iconSrc": "https://xiangguan.sxyanzhu.com/profile/icon/zbdw.png"
}],
active: 0,
projectId: '',
projectName: '',
initData: {},
aqglDb: 0,
zlglDb: 0,
todoDb: 0,
nactive: 0,
labourData: [{
name: "管理人员",
total: 0,
unit: "人",
yesMonitor: 180
},
{
name: "劳务人员",
yesMonitor: 0,
total: 0,
unit: "人"
},
{
name: "特殊工种",
yesMonitor: 0,
total: 0,
unit: "人"
},
],
labourDataList: [],
labourDays: [{
name: "管理人员",
total: 0,
unit: "人",
yesMonitor: 180
},
{
name: "劳务人员",
yesMonitor: 0,
total: 0,
unit: "人"
},
{
name: "特殊工种",
yesMonitor: 0,
total: 0,
unit: "人"
},
],
labourDaysTotal: 0,
labourImg: "https://szgcwx.jhncidg.com/staticFiles/icon/zgry.png",
labourName: "在岗人员",
labourTotal: 0,
labourTypeList: [{
name: "在岗人员",
total: 0,
img: "https://szgcwx.jhncidg.com/staticFiles/icon/zgry.png"
}, {
name: "离岗人员",
total: 0,
img: "https://szgcwx.jhncidg.com/staticFiles/icon/rylg.png"
}],
animation: true,
animationData: {},
labourDatas: {
unit: '人',
legend: ['出勤人数', '当前在岗'],
color: ['#2e6ed0', '#fb9300'],
Xdata: ['01-01', '01-02', '01-03', '01-04', '01-05', '01-06', '01-07'],
Ydata: [
[0, 0, 0, 0, 0, 0, 0],
[0, 0, 0, 0, 0, 0, 0]
]
},
switchChart: false,
attendanceListData: [],
subDeptUserInfo: {},
imgBaseUrl: config.baseImgUrl
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
if (!getToken()) {
wx.redirectTo({
url: '../login/login',
})
}
wx.setStorageSync('nav-menu', "xmgk");
const proUserInfo = getUserInfo();
app.globalData.subDeptUserData = proUserInfo.projectUserInfo;
this.initAnimationData();
this.setData({
labourImg: this.data.labourTypeList[this.data.nactive].img,
projectId: app.globalData.useProjectId,
projectName: app.globalData.useProjectName,
initData: {
id: app.globalData.useProjectId,
text: app.globalData.useProjectName,
},
subDeptUserInfo: proUserInfo.projectUserInfo
});
//项目基本信息
this.getProjectInfo(app.globalData.useProjectId);
//用户项目信息
this.getProUserDatas();
//项目建设单位
this.getProjectDepts(app.globalData.useProjectId);
},
/**
* 统计劳务人员信息
* @param {*} proId
*/
getSubDeptsUsers(proId) {
findSubDeptsUsers(proId).then(res => {
if (res.code == 200) {
let zg = 0;
let lg = 0;
res.data.forEach(item => {
if (item.useStatus == '0') {
zg += item.total;
} else {
lg += item.total;
}
});
this.setData({
"labourTypeList[0].total": zg,
"labourTypeList[1].total": lg,
labourTotal: zg,
labourDataList: res.data || []
})
this.initSubDeptUsersCharts();
}
});
},
/**
* 初始化动画
*/
initAnimationData() {
var animation = wx.createAnimation({
duration: 1000,
timingFunction: 'linear',
})
this.animation = animation;
if (this.data.animation) {
animation.translateY(-8).step();
} else {
animation.translateY(8).step();
}
this.setData({
animation: this.data.animation ? false : true,
animationData: animation.export()
})
setTimeout(() => {
this.initAnimationData();
}, 1200)
},
/**
* 初始化统计图表
*/
initSubDeptUsersCharts() {
let labourDataList = this.data.labourDataList;
if (labourDataList.length > 0) {
let gl = 0;
let ts = 0;
let lw = 0;
labourDataList.forEach(item => {
if (this.data.nactive == 0) {
if (item.useStatus == '0') {
if (item.craftType == '2') {
ts += item.total;
} else if (item.craftType == '3') {
gl += item.total;
} else {
lw += item.total;
}
}
} else {
if (item.useStatus != '0') {
if (item.craftType == '2') {
ts += item.total;
} else if (item.craftType == '3') {
gl += item.total;
} else {
lw += item.total;
}
}
}
});
this.setData({
"labourData[0].total": gl,
"labourData[0].yesMonitor": gl,
"labourData[1].total": ts,
"labourData[1].yesMonitor": ts,
"labourData[2].total": lw,
"labourData[2].yesMonitor": lw,
labourTotal: this.data.labourTypeList[this.data.nactive].total
})
if (this.data.switchChart) {
let chats = this.selectComponent("#userChart");
chats.initChart();
}
}
},
/**
* 初始化
* 今日考勤
* @param {*} proId
*/
initSubDeptDaysCharts(proId) {
findDaysAttendanceView(proId).then(res => {
if (res.code == 200) {
let gl = 0;
let ts = 0;
let lw = 0;
res.data.forEach(item => {
if (item.craftType == '2') {
ts += item.total;
} else if (item.craftType == '3') {
gl += item.total;
} else {
lw += item.total;
}
});
this.setData({
"labourDays[0].total": gl,
"labourDays[0].yesMonitor": gl,
"labourDays[1].total": ts,
"labourDays[1].yesMonitor": ts,
"labourDays[2].total": lw,
"labourDays[2].yesMonitor": lw,
labourDaysTotal: gl + ts + lw
})
if (this.data.switchChart) {
let chats = this.selectComponent("#attsChart");
chats.initChart();
}
}
});
},
/**
* 统计
* 最近出勤信息
* @param {*} proId
*/
getSubDeptsAttendanceView(proId) {
findSubDeptsAttendanceView(proId).then(res => {
if (res.code == 200) {
let xd = [];
let yd1 = [];
let yd2 = [];
res.data.list.forEach(item => {
xd.push(item.attendanceTime);
yd1.push(item.total);
});
if (xd.length < 7) {
let n = 7 - xd.length;
for (let i = 0; i < n; i++) {
xd.push('-');
yd1.push(0);
}
}
for (let y = 0; y < 7; y++) {
yd2.push(res.data.user);
}
let yd = [];
yd.push(yd1);
yd.push(yd2);
this.setData({
"labourDatas.Xdata": xd,
"labourDatas.Ydata": yd
});
if (this.data.switchChart) {
let chats = this.selectComponent("#chartBar");
chats.initChart();
}
}
});
},
/**
* 查询用户考勤
* @param {*} proId
*/
getUsersAttendanceView(proId) {
findUsersAttendanceView(proId).then(res => {
if (res.code == 200) {
this.setData({
attendanceListData: res.data
});
}
})
},
/**
* 单位人员信息
* @param {*} proId
*/
getProUserDatas() {
//劳务人员信息
if ((app.globalData.subDeptUserData.subDeptType == '1' || app.globalData.subDeptUserData.subDeptType == '4' || app.globalData.subDeptUserData.subDeptType == '5') && app.globalData.subDeptUserData.userPost != '4' && app.globalData.subDeptUserData.userPost != '5' && app.globalData.subDeptUserData.userPost != '6' && app.globalData.subDeptUserData.userPost != '8') {
//统计劳务人员信息
this.getSubDeptsUsers(app.globalData.useProjectId);
this.initSubDeptDaysCharts(app.globalData.useProjectId);
}
this.awaitTask();
//今日出勤信息
if (app.globalData.subDeptUserData.subDeptType == '1') {
this.getSubDeptsAttendanceView(app.globalData.useProjectId);
}
//人员出勤信息
if (app.globalData.subDeptUserData.userPost == '4' || app.globalData.subDeptUserData.userPost == '5' || app.globalData.subDeptUserData.userPost == '6' || app.globalData.subDeptUserData.userPost == '8') {
//统计劳务人员信息
this.getUsersAttendanceView(app.globalData.useProjectId);
}
},
/**
* 查询公众号消息授权
*/
reUserOpenMsgId() {
let userInfos = this.selectComponent("#userInfos");
userInfos.loadUserInfo();
},
// 底部导航
onChange(event) {
// event.detail 的值为当前选中项的索引
this.setData({
active: event.detail
});
},
/**
* 初始化曲线图表
*/
initLabourDatas() {
findGroupAllByDays({
projectId: app.globalData.projectId
}).then(res => {
if (res.code == 200) {
let xd = [];
let yd1 = [];
let yd2 = [];
res.data.list.forEach(item => {
xd.push(item.attendanceTime);
yd1.push(item.total);
});
if (xd.length < 7) {
let n = 7 - xd.length;
for (let i = 0; i < n; i++) {
xd.push('');
yd1.push(0);
}
}
for (let y = 0; y < 7; y++) {
yd2.push(res.data.user);
}
let yd = [];
yd.push(yd1);
yd.push(yd2);
this.setData({
"labourDatas.Xdata": xd,
"labourDatas.Ydata": yd
});
if (this.data.switchChart) {
let chats = this.selectComponent("#chartBar");
chats.initChart();
}
}
});
},
/**
* 查询项目详情
* @param {*} proId
*/
getProjectInfo: function (proId) {
findProjectInfo(proId).then(res => {
if (res.data.scheduledStartTime) {
res.data.scheduledStartTime = res.data.scheduledStartTime.split("T")[0];
} else {
res.data.scheduledStartTime = " - ";
}
if (res.data.actualOperatingTime) {
res.data.actualOperatingTime = res.data.actualOperatingTime.split("T")[0];
} else {
res.data.actualOperatingTime = " - ";
}
if (res.data.plannedCompletionTime) {
res.data.plannedCompletionTime = res.data.plannedCompletionTime.split("T")[0];
} else {
res.data.plannedCompletionTime = " - ";
}
res.data.projectDeptsList.forEach(item => {
this.data.deptTypes.forEach(_it => {
if (_it.name == item.deptType) {
item.iconSrc = _it.iconSrc;
}
})
});
this.setData({
projectInfo: res.data,
projectDeptsList: res.data.projectDeptsList
})
});
},
/**
* 查询
* 项目建设单位
* @param {*} proId
*/
getProjectDepts: function (proId) {
findProjectDepts(proId).then(res => {
this.setData({
projectDeptsList: res.data
})
});
},
// 页签选中事件
selectedTab(e) {
this.setData({
nactive: e.target.dataset.set,
labourImg: this.data.labourTypeList[e.target.dataset.set].img,
})
this.initSubDeptUsersCharts();
},
//项目切换 返回值
onProjectSelect(e) {
let projectId = e.detail.id;
let projectName = e.detail.text;
app.globalData.useProjectId = projectId;
app.globalData.useProjectName = projectName;
this.setData({
switchChart: true
})
this.onLoad();
},
// 手风琴
onCollChange(event) {
this.setData({
activeNames: event.detail,
});
},
/**
* 拨打电话
* @param {*} event
*/
calling: function (event) {
let callPhone = event.currentTarget.dataset.phone;
wx.makePhoneCall({
phoneNumber: callPhone,
success: function () {
console.log("拨打电话成功!")
},
fail: function () {
console.log("拨打电话失败!")
}
})
},
showImg: function (e) {
let paths = e.target.dataset.set;
let path = [];
paths.split(',').forEach(url => {
path.push(config.baseImgUrl + url);
});
wx.previewImage({
urls: path,
current: path[0]
})
},
/**
* 劳务管理查看详细
*/
goLWGL: function () {
if (this.data.nactive == 2) {
wx.redirectTo({
url: '../../pageage/project_attendance/project_attendanceData/list/index'
})
} else {
let type;
if (this.data.nactive == 0) {
type = 1;
} else {
type = 2;
}
wx.redirectTo({
url: '../../pageage/project_attendance/project_attendanceUser/list/index?type=' + type
})
}
},
/**
* 最近出勤
*/
goZJCQ: function () {
wx.redirectTo({
url: '../../pageage/project_attendance/project_attendanceData/list/index'
})
},
//跳转到安全管控
XMSP: function () {
wx.setStorageSync('nav-menu', "aqgl");
wx.redirectTo({
url: '../project_safety/index'
})
},
//跳转到质量管理
ZLGL: function () {
wx.setStorageSync('nav-menu', "zlgl");
wx.redirectTo({
url: '../project_quality/index'
})
},
//跳转到进度管理
JDGL: function () {
wx.setStorageSync('nav-menu', "xmgk");
wx.redirectTo({
url: '../project_schedule/list/index'
})
},
//跳转到项目管理
XMGL: function () {
wx.setStorageSync('nav-menu', "xmgl");
wx.redirectTo({
url: '../project_more/index'
})
},
//跳转到项目列表
XMLB: function () {
wx.redirectTo({
url: '../project_list/index'
})
},
/**
* 统计代办
*/
awaitTask() {
let param = "proId=" + app.globalData.useProjectId;
findMyTask(param).then(res => {
if (res.code == 200) {
let proUserInfo = this.data.subDeptUserInfo;
this.setData({
todoDb: proUserInfo.subDeptType=="1"?(res.data.dwsh+res.data.rysh):res.data.todo,
aqglDb: proUserInfo.subDeptType=="1"?res.data.aqgl:0,
zlglDb: proUserInfo.subDeptType=="1"?res.data.zlgl:0
})
}
});
},
})

View File

@ -1,13 +0,0 @@
{
"usingComponents": {
"van-row": "@vant/weapp/row",
"van-col": "@vant/weapp/col",
"van-tabbar": "@vant/weapp/tabbar",
"van-tabbar-item": "@vant/weapp/tabbar-item",
"van-collapse": "@vant/weapp/collapse",
"van-collapse-item": "@vant/weapp/collapse-item",
"ec-canvas": "../../ec-canvas/ec-canvas",
"van-notice-bar": "@vant/weapp/notice-bar"
},
"navigationStyle":"custom"
}

View File

@ -1,287 +0,0 @@
<wxs module="format" src="/utils/format.wxs"></wxs>
<view class="header_title">
<view class="header_title_row">
<van-row>
<van-col span="4">
<view class="header_img" bindtap="XMLB">
<image src="/images/left.png"></image>
<text class="header_fh">返回</text>
</view>
</van-col>
<van-col span="3">
<user-infos></user-infos>
</van-col>
<van-col span="10">
<view class="header_name">{{title}}</view>
</van-col>
</van-row>
</view>
</view>
<!-- 中间内容 -->
<view class="max_content">
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
<view class="gk_open" style="margin-top: 5rpx;border: 1px solid transparent;">
<van-collapse value="{{activeNames}}" bind:change="onCollChange">
<van-collapse-item title="项目基本信息" name="base">
<view class="gk_open_con">
<view>
<image src="/images/s_12.png"></image>项目单位:<text>{{projectInfo.comName}}</text>
</view>
<view wx:if="{{projectInfo.province && projectInfo.city}}">
<image src="/images/s_1.png"></image>所属区域:<text>{{projectInfo.province+' - '+projectInfo.city}}</text>
</view>
<view>
<image src="/images/s_2.png"></image>详细地址:<text>{{projectInfo.projectAddress}}</text>
</view>
<view>
<image src="/images/s_3.png"></image>项目类型:<text>{{projectInfo.projectTypeName}}</text>
</view>
<view wx:if="{{false}}">
<image src="/images/s_4.png"></image>总建筑面积:<text>{{projectInfo.totalBuildingArea}}</text>
</view>
<view>
<image src="/images/s_5.png"></image>计划开工日期:<text>{{projectInfo.scheduledStartTime}}</text>
</view>
<view>
<image src="/images/s_6.png"></image>实际开工日期:<text>{{projectInfo.actualOperatingTime}}</text>
</view>
<view>
<image src="/images/s_7.png"></image>计划竣工日期:<text>{{projectInfo.plannedCompletionTime}}</text>
</view>
<view wx:if="{{subDeptUserInfo.subDeptType=='1'}}">
<image src="/images/s_8.png"></image>总工期:<text>{{projectInfo.projectTimeLimit + ' 天'}}</text>
</view>
<view wx:if="{{subDeptUserInfo.subDeptType=='1'}}">
<image src="/images/s_10.png"></image>项目负责人:<text>{{projectInfo.projectPerson}}</text>
</view>
<view wx:if="{{subDeptUserInfo.subDeptType=='1'}}">
<image src="/images/s_11.png"></image>负责人手机号:<text>{{projectInfo.projectPersonPhone}}</text>
</view>
<view wx:if="{{subDeptUserInfo.subDeptType=='1'}}">
<image src="/images/s_15.png"></image>项目概述:<text>{{projectInfo.projectSummarize}}</text>
</view>
</view>
</van-collapse-item>
<van-collapse-item wx:if="{{subDeptUserInfo.subDeptType=='1'}}" title="建设及管理单位信息" name="dept">
<view class="construction_unit" wx:for="{{projectDeptsList}}" wx:key="unique">
<view class="construction_unit_image">
<image src="{{item.iconSrc}}"></image>
</view>
<view class="construction_unit_list">
<view class="construction_unit_title">{{item.deptType}}</view>
<view class="construction_unit_name">{{item.deptName}}</view>
<view class="construction_unit_phone" bindtap="calling" data-phone="{{item.phone}}">{{item.leader}} {{item.phone}}</view>
</view>
</view>
</van-collapse-item>
</van-collapse>
</view>
<view class="echarts_max" wx:if="{{(subDeptUserInfo.subDeptType=='1' || subDeptUserInfo.subDeptType=='4' || subDeptUserInfo.subDeptType=='5') && subDeptUserInfo.userPost!='4' && subDeptUserInfo.userPost!='6' && subDeptUserInfo.userPost!='8'}}">
<view class="echarts_min">
<view class="eharts_title module_title_flex">
劳务人员
<!-- <view class="module_see_info" bindtap="goLWGL">查看详情
<van-icon name="arrow" />
</view> -->
</view>
<!-- tab栏切换 -->
<view class="information-review-tab" bindtap="selectedTab">
<view class="{{nactive===index?'active':''}}" data-set="{{index}}" wx:for="{{labourTypeList}}" wx:key="index">
{{item.name}}({{item.total}})
</view>
</view>
<view class="video_ai_survey">
<van-row>
<van-col span="8">
<view class="survey_content">
<view class="survey_content_img">
<image animation="{{animationData}}" src="{{labourImg}}" />
</view>
</view>
<view class="survey_content_number labour-survey_content_number">
<view class="survey_content_value">
<text>{{ labourTotal }}</text> 人
</view>
</view>
</van-col>
<van-col span="16">
<safety-bar-chart id="userChart" chart-id="userChart" data="{{labourData}}" height="350"></safety-bar-chart>
</van-col>
</van-row>
</view>
</view>
</view>
<view class="echarts_max" wx:if="{{(subDeptUserInfo.subDeptType=='1' || subDeptUserInfo.subDeptType=='4' || subDeptUserInfo.subDeptType=='5') && subDeptUserInfo.userPost!='4' && subDeptUserInfo.userPost!='6' && subDeptUserInfo.userPost!='8'}}">
<view class="echarts_min">
<view class="eharts_title module_title_flex">
今日出勤
<!-- <view class="module_see_info" bindtap="goLWGL">查看详情
<van-icon name="arrow" />
</view> -->
</view>
<view class="video_ai_survey">
<van-row>
<van-col span="8">
<view class="survey_content">
<view class="survey_content_img">
<image animation="{{animationData}}" src="https://szgcwx.jhncidg.com/staticFiles/icon/dw.png" />
</view>
</view>
<view class="survey_content_number labour-survey_content_number">
<view class="survey_content_value">
<text>{{ labourDaysTotal }}</text> 人
</view>
</view>
</van-col>
<van-col span="16">
<safety-bar-chart id="attsChart" chart-id="attsChart" data="{{labourDays}}" height="350"></safety-bar-chart>
</van-col>
</van-row>
</view>
</view>
</view>
<view class="echarts_max bt30" wx:if="{{(subDeptUserInfo.subDeptType=='4' || subDeptUserInfo.subDeptType=='5') && subDeptUserInfo.userPost!='4' && subDeptUserInfo.userPost!='5' && subDeptUserInfo.userPost!='6' && subDeptUserInfo.userPost!='8'}}">
<view class="echarts_min">
<view class="eharts_title module_title_flex">
我的二维码
</view>
<view class="video_ai_survey">
<van-row>
<van-col span="10" class="qrcode">
<image bindtap='showImg' data-set="{{subDeptUserInfo.qrCode}}" src="{{imgBaseUrl+subDeptUserInfo.qrCode}}"></image>
</van-col>
<van-col span="14">
<view wx:if="{{subDeptUserInfo.userPost=='1'}}" class="qrtext"><text class="zz">项目经理 </text>扫描二维码登记信息,完成安全学习和在线考试,签署安全承诺书后可申请入场。</view>
<view wx:if="{{subDeptUserInfo.userPost=='2'}}" class="qrtext"><text class="zz">班组组长 </text>扫描二维码登记信息,完成安全学习和在线考试,签署安全承诺书后可申请入场。</view>
<view wx:if="{{subDeptUserInfo.userPost=='3'}}" class="qrtext"><text class="zz">劳务人员 </text>扫描二维码登记信息,完成安全学习和在线考试,签署安全承诺书后可申请入场。</view>
</van-col>
</van-row>
</view>
</view>
</view>
<view class="echarts_max" wx:if="{{subDeptUserInfo.subDeptType=='1'}}">
<view class="echarts_min">
<view class="eharts_title module_title_flex">
最近出勤
<!-- <view class="module_see_info" bindtap="goZJCQ">查看详情
<van-icon name="arrow" />
</view> -->
</view>
<view class="video_ai_survey">
<bar-chart id="chartBar" chartId="chartBar" chartData="{{labourDatas}}"></bar-chart>
</view>
</view>
</view>
<view class="echarts_max" wx:if="{{subDeptUserInfo.userPost=='4' || subDeptUserInfo.userPost=='5' || subDeptUserInfo.userPost=='6' || subDeptUserInfo.userPost=='8'}}">
<view class="echarts_min">
<view class="eharts_title module_title_flex">
最近出勤
<!-- <view class="module_see_info" bindtap="goZJCQ">查看详情
<van-icon name="arrow" />
</view> -->
</view>
<view class="video_ai_survey">
<view class="inspect_max_scroll">
<view class="safety_prop module_title_flex summury">
<text class="color_orange">默认展示近7天考勤数据</text>
</view>
<view class="inspect_for_scroll" v-if="{{ attendanceListData.length>0 }}" wx:for="{{attendanceListData}}" wx:key="index">
<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 < 10 ?'0'+(index+1):(index+1)}}</view>
<view class="module_title module_title_flex inspect_list_title_label">考勤时间:{{format.dateStrEv(item.inTime,item.outTime)}}</view>
</view>
</view>
<view class="inspect_list_info">
<view class="inspect_list_info_details">
<view class="inspect_list_info_img">
<van-image wx:if="{{item.inPhoto}}" width="120rpx" height="120rpx" fit="cover" src="{{imgBaseUrl+item.inPhoto}}" />
<van-image wx:else width="120rpx" height="120rpx" fit="cover" src="{{imgBaseUrl+item.outPhoto}}" />
</view>
<view class="inspect_list_info_data">
<view class="inspect_list_info_data_prop color_blue">人员姓名:<text>{{item.userName}}</text></view>
<view class="inspect_list_info_data_prop">入场时间:
<text wx:if="{{item.inTime}}">{{format.timeStr(item.inTime)}}</text>
<text wx:else class="color_red">未打卡</text>
</view>
<view class="inspect_list_info_data_prop">离场时间:
<text wx:if="{{item.outTime}}">{{format.timeStr(item.outTime)}}</text>
<text wx:else class="color_red">未打卡</text>
</view>
</view>
</view>
<view class="inspect_list_info_position">
<text class="color_purple">单位名称:{{item.subDeptName}}</text>
</view>
</view>
</view>
</view>
<view wx:if="{{attendanceListData.length==0}}">
<view style="padding-top: 5px;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>
</view>
</view>
</view>
</view>
<!-- 底部导航 -->
<van-tabbar wx:if="{{subDeptUserInfo.subDeptType=='1'}}" active="{{ active }}" bind:change="onChange" active-color="#ffffff" inactive-color="#7d95d6">
<van-tabbar-item>
<image slot="icon" src="/images/footer_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
项目概况
</van-tabbar-item>
<van-tabbar-item bindtap="XMSP">
<image slot="icon" src="/images/footer_7.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_7.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
安全管理
<span class="tabNum" wx:if="{{aqglDB>0}}">{{aqglDB}}</span>
</van-tabbar-item>
<van-tabbar-item bindtap="ZLGL">
<image slot="icon" src="/images/footer_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
质量管理
<span class="tabNum" wx:if="{{zlglDB>0}}">{{zlglDB}}</span>
</van-tabbar-item>
<van-tabbar-item bindtap="JDGL">
<image slot="icon" src="/images/footer_6.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_6.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
进度管理
</van-tabbar-item>
<van-tabbar-item bindtap="XMGL">
<image slot="icon" src="/images/footer_1.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_1.png" mode="aspectFit" style="width:40rpx; height:40rpx;" />
项目管理
<span class="tabNum" wx:if="{{todoDb>0}}">{{todoDb}}</span>
</van-tabbar-item>
</van-tabbar>
<!-- 底部导航 -->
<van-tabbar wx:if="{{(subDeptUserInfo.subDeptType=='4' || subDeptUserInfo.subDeptType=='5') && subDeptUserInfo.userPost!='4' && subDeptUserInfo.userPost!='5'}}" active="{{ active }}" bind:change="onChange" active-color="#ffffff" inactive-color="#7d95d6">
<van-tabbar-item>
<image slot="icon" src="/images/footer_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
项目概况
</van-tabbar-item>
<van-tabbar-item bindtap="XMGL">
<image slot="icon" src="/images/footer_1.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_1.png" mode="aspectFit" style="width:40rpx; height:40rpx;" />
项目管理
<span class="tabNum" wx:if="{{todoDb>0}}">{{todoDb}}</span>
</van-tabbar-item>
</van-tabbar>

View File

@ -1,255 +0,0 @@
/* pages/xiangmugaikuang/index.wxss */
.information-review-tab {
display: flex;
justify-content: space-around;
align-items: center;
height: 80rpx;
color: #92a1ca;
}
.information-review-tab .active {
color: #87e3fa;
padding-left: 40rpx;
background: url("https://szgcwx.jhncidg.com/staticFiles/icon/utilization.png") no-repeat left/35rpx;
}
/* 有赞原码修改 */
.van-collapse.van-hairline--top-bottom:after {
border-width: 0px 0;
}
.van-cell.van-cell--borderless {
background-color: #2b345b;
color: #fff;
margin-top: 30rpx;
border-radius: 5rpx;
}
.van-cell.van-cell--borderless:active {
background-color: #2b345b;
}
.van-collapse-item__title.van-collapse-item__title--expanded:active {
background-color: #2b345b;
}
.van-collapse-item .van-cell:after {
border-bottom: 0;
}
.van-collapse-item.van-hairline--top:after {
border-top-width: 0
}
.van-cell.van-cell--clickable {
background-color: #2b345b;
margin-top: 10rpx;
color: #fff;
border-radius: 15rpx;
}
.van-cell.van-cell--clickable:active {
background-color: #2b345b;
}
.van-collapse-item__wrapper .van-collapse-item__content {
background-color: #1e2336;
color: #8ca4ec;
border-width: 0px 0;
}
/* 页面样式 */
.gk_open {
padding: 0 30rpx;
}
.gk_open_con view {
padding: 10rpx 0;
}
.gk_open_con image {
width: 30rpx;
height: 30rpx;
margin-right: 5rpx;
position: relative;
top: 5rpx;
}
.echarts_max {
margin-top: 30rpx;
padding: 0 30rpx;
}
.echarts_min {
background: #1e2336;
font-size: 28rpx;
padding: 15rpx;
border-radius: 15rpx;
}
.eharts_title {
height: 40rpx;
line-height: 40rpx;
padding-left: 40rpx;
background: url("https://szgcwx.jhncidg.com/staticFiles/img/menu/CORE_52887EE6A33042408E11C2174974ABA1.png") no-repeat left/35rpx;
}
.eharts_head {
text-align: center;
padding: 30rpx 0;
}
.eharts_head text {
color: #0ad7ec;
font-size: 40rpx;
}
.eharts_con {
height: 320rpx;
width: auto;
}
.eharts_title_float {
float: right;
}
.eharts_title_float text {
padding: 0 5rpx;
}
.eharts_con_top {
margin-top: -320rpx;
}
.eharts_title_float_img {
width: 40rpx;
height: 40rpx;
float: right;
position: relative;
top: 2rpx;
}
.zdzb_bg {
height: 88rpx;
border-radius: 15rpx;
background: #2b345b;
margin: 30rpx;
font-size: 28rpx;
line-height: 88rpx;
padding-left: 30rpx;
}
.construction_unit {
padding: 10rpx 0;
display: flex;
}
.construction_unit_image {
padding-top: 15rpx;
}
.construction_unit_image image {
width: 80rpx;
height: 80rpx;
}
.construction_unit_list {
width: calc(100% - 100rpx);
padding-left: 20rpx;
}
.construction_unit_title {
padding: 6rpx 0;
color: #c5d9fc;
}
.construction_unit_name {
padding: 6rpx 0;
color: #54acf6;
}
.construction_unit_phone {
padding: 6rpx 0;
color: #ce9433;
}
.official {
margin-left: 30rpx;
margin-right: 30rpx;
}
.survey_content {
display: flex;
align-items: center;
justify-content: center;
margin-top: 15px;
}
.survey_content_img {
width: 90px;
height: 90px;
text-align: center;
line-height: 90px;
position: relative;
background: url("https://szgcwx.jhncidg.com/staticFiles/icon/survey_total_icon.png") no-repeat bottom/90px 60px;
}
.survey_content_img image {
text-align: center;
line-height: 90px;
width: 50px;
height: 50px;
}
.labour-survey_content_number {
color: #cbdaff;
font-size: 16px;
text-align: center;
padding-top: 25px;
padding-left: 0;
}
.survey_content_number {
padding-left: 15px;
color: #cbdaff;
font-size: 16px;
}
.labour-survey_content_number {
color: #cbdaff;
font-size: 16px;
text-align: center;
padding-top: 25px;
padding-left: 0;
}
.survey_content_value text {
font-size: 25px;
font-style: italic;
font-weight: bold;
color: #87e3fa;
padding-right: 5px;
}
.inspect_max_scroll {
height: 30vh;
max-height: 82vh;
}
.zz{
color: #fcbc02;
font-weight: 800;
}
.qrcode{
text-align: center;
}
.qrtext{
margin-top: 25rpx;
}
.qrcode image{
width: 100px;
height: 100px;
}
.bt30{
margin-bottom: 20px;
}

View File

@ -1,74 +0,0 @@
import {
getToken,
setUserInfo,
getUserInfo
} from '../../utils/auth'
import {
findMyProjectList,
findProSubDeptsUserInfo,
} from '../../api/project'
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
proCount:0,
projectInfoList:[],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
if (getToken()) {
this.getMyProjectList();
} else {
console.log("未查询到Token...{}...准备重新登录")
wx.redirectTo({
url: '../login/login',
})
}
},
/**
* 查询
* 用户项目信息
* 根据项目配置进入不同页面...
*/
getMyProjectList: function () {
findMyProjectList().then(res=>{
if(res.code==200){
res.rows.forEach(item =>{
item.videoNum = 0;
item.warningCount = 0;
item.monitoringCount = 0;
});
app.globalData.projectInfoList = res.rows;
this.setData({
proCount:res.total,
projectInfoList:res.rows
})
}
});
},
//项目详情
checkProject:function(even){
//赋值到公共参数
app.globalData.useProjectId = even.currentTarget.dataset['id'];
app.globalData.useProjectName = even.currentTarget.dataset['name'];
findProSubDeptsUserInfo(app.globalData.useProjectId).then(detail=>{
if(detail.code==200){
let userInfo = getUserInfo();
userInfo.projectUserInfo = detail.data;
setUserInfo(userInfo);
//单项目直接进入项目页面
wx.redirectTo({
url: '../project_info/index',
})
}
});
}
})

View File

@ -1,7 +0,0 @@
{
"usingComponents": {
"van-row": "@vant/weapp/row",
"van-col": "@vant/weapp/col"
},
"navigationStyle":"custom"
}

View File

@ -1,45 +0,0 @@
<view class="header_title">
<view class="header_title_row">
<view class="header_name">工程项目列表</view>
</view>
</view>
<view class="max_content">
<view class="address list_title">
总工程数<text>{{proCount}}</text>
</view>
<view class="list_option_max">
<view class="list_option" wx:for="{{projectInfoList}}" wx:key="projectInfoList">
<view class="list_right" bindtap="checkProject" data-id="{{item.id}}" data-name="{{item.projectName}}">
<view class="list_left">{{item.comName}}</view>
<view class="list_con_bottom">
<view class="list_right_name">{{item.projectName}}</view>
<view class="list_right_address">{{item.projectAddress}}</view>
<view class="list_right_info">
<van-row>
<van-col span="8" wx:if="{{item.warningCount != '0'}}">
<text class="list_warning active">预警({{item.warningCount}})</text>
</van-col>
<van-col span="8" wx:if="{{item.warningCount == '0'}}">
<text class="list_warning">预警({{item.warningCount}})</text>
</van-col>
<van-col span="8" wx:if="{{item.videoNum != '0'}}">
<text class="list_video active">视频({{item.videoNum}})</text>
</van-col>
<van-col span="8" wx:if="{{item.videoNum == '0'}}">
<text class="list_video">视频({{item.videoNum}})</text>
</van-col>
<van-col span="8" wx:if="{{item.monitoringCount != '0'}}">
<text class="list_dust active">结构体({{item.monitoringCount}})</text>
</van-col>
<van-col span="8" wx:if="{{item.monitoringCount == '0'}}">
<text class="list_dust">结构体({{item.monitoringCount}})</text>
</van-col>
</van-row>
</view>
</view>
</view>
</view>
</view>
</view>

View File

@ -1,324 +0,0 @@
.list_max{
padding: 0 30rpx;
margin: 30rpx 0 10rpx;
}
.list_min{
border-radius:10rpx;
background: #2b345b;
height: 80rpx;
}
.list_min_1{
height: 80rpx;
line-height: 80rpx;
font-size: 28rpx;
padding-left: 10rpx;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
}
.list_min_2{
height: 80rpx;
text-align: center;
line-height: 80rpx;
}
.list_bottom{
width:30rpx;
height:30rpx;
}
.list_title{
color:#8ca4ee;
font-size: 24rpx;
padding: 20rpx 30rpx;
}
.list_title text{
font-size: 26rpx;
color: #1aeff5;
}
.list_option_max{
padding:20rpx 30rpx;
}
.list_option{
margin-bottom: 40rpx;
background: #222840;
border-radius: 30rpx;
}
.list_left{
background: #273051;
border-radius: 30rpx 30rpx 0 0 ;
height: 80rpx;
font-size: 32rpx;
color: #14feff;
line-height: 80rpx;
padding-left: 30rpx;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
}
.list_right{
font-size: 24rpx;
}
.list_con_bottom{
padding: 30rpx;
}
.list_right_name{
font-size: 30rpx;
}
.list_right_address{
padding: 20rpx 0 20rpx 35rpx;
color:#8ca4ee;
background: url("https://szgcwx.jhncidg.com/staticFiles/img/menu/CORE_B1C818B4CF2C44FE9D96624589329EBC.png") no-repeat left/35rpx;
}
.list_right_info{
padding: 10rpx 0;
font-size: 22rpx;
}
.list_warning{
background: url("https://szgcwx.jhncidg.com/staticFiles/img/CORE_632B884CD4084C4F8E556AB742809723.png") no-repeat left/30rpx;
padding-left: 35rpx;
}
.list_video{
background: url("https://szgcwx.jhncidg.com/staticFiles/img/CORE_970838B4C6F54BC7B33BB9F198D50130.png") no-repeat left/30rpx;
padding-left: 35rpx;
}
.list_dust{
background: url("https://szgcwx.jhncidg.com/staticFiles/img/62bfb39a8e5944f99a14c02922ffb80e.png") no-repeat left/30rpx;
padding-left: 35rpx;
}
.list_warning.active{
background: url("https://szgcwx.jhncidg.com/staticFiles/img/CORE_ACFA3598B4C943EB836848A6977C4189.png") no-repeat left/30rpx;
padding-left: 35rpx;
}
.list_video.active{
background: url("https://szgcwx.jhncidg.com/staticFiles/img/CORE_48D684509A314D55BD3B61EFFB77EF07.png") no-repeat left/30rpx;
padding-left: 35rpx;
}
.list_dust.active{
background: url("https://szgcwx.jhncidg.com/staticFiles/img/66036a52100146f5a36b0019849e8de0.png") no-repeat left/30rpx;
padding-left: 35rpx;
}
.sel_max{
width: 600rpx;
border-radius: 20rpx;
max-height: 800rpx;
padding: 30rpx;
background: #232a44;
border-radius: 20rpx;
overflow: auto;
}
.sel_min{
background: #273051;
height: 100rpx;
font-size: 28rpx;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
line-height: 100rpx;
padding: 0 20rpx;
border-radius: 10rpx;
color: #14feff;
margin: 20rpx 0;
}
.sel_min:active{
background: #394577;
}
.van-popup.van-popup--center{
background: none;
}
.address{
margin: 0 30rpx;
color: #8ca4ee;
font-size: 28rpx;
padding: 20rpx 0 20rpx 50rpx;
background: url("https://szgcwx.jhncidg.com/staticFiles/img/CORE_1F1F3A2778334D3EAC1226DDCEBD48D0.png") no-repeat left/40rpx;
}
.map_list_info{
background: #232a44;
padding: 0 30rpx;
}
.van-center-enter-to.van-center-enter-active{
border-radius: 20rpx;
background: #232a44;
}
.map_list_info_title{
padding: 30rpx;
text-align: center;
}
.map_list_info .van-picker{
background: none;
}
.map_list_info view{
background: none;
}
.map_list_info .van-picker-column{
color: #157dd2;
}
.map_list_info .van-picker-column__item--selected{
color: #00e3fe;
}
.map_list_info .van-hairline--top-bottom:after{
border-width: 0px 0;
}
/* -------------------------- */
.van-popup.van-popup--bottom{
background: #232a44;
}
.all_name{
font-size: 26rpx;
padding:30rpx 20rpx;
line-height: 50rpx;
color: #00e3fe;
}
.van-tabs__scroll{
background: none !important;
}
.van-hairline--top-bottom:after{
border: none !important;
}
.van-tab.van-tab--active{
color: #14feff !important;
}
.van-tab{
color: #157dd2 !important;
}
.max_tab_name{
padding: 0 40rpx;
font-size:30rpx;
height: 460rpx;
overflow: auto;
margin-top: 20rpx;
text-align: center;
}
.font_color{
padding: 15rpx 0;
color: #157dd2;
}
.active1{
color: #14feff
}
.active2{
color: #14feff
}
.active3{
color: #14feff ;
}
.van-tabs__line{
background-color:#14feff !important;
}
.tab_max_tltie{
padding:0 30rpx;
font-size: 30rpx;
}
.tab_max_tltie text{
padding: 30rpx ;
color: #999999;
}
.tab_max_tltie .active{
font-weight: bold;
color: #00e3fe;
}
.choice_max{
width: 500rpx;
background: #232a44;
padding:0 30rpx;
}
.choice_tltie{
text-align: center;
color: #00e3fe;
font-size: 28rpx;
padding: 20rpx 0;
}
.choice_input input{
border: 1px solid #00e3fe;
width: 100%;
height:60rpx;
border-radius: 50rpx;
font-size: 28rpx;
color: #00e3fe;
padding-left: 30rpx;
box-sizing: border-box;
}
.choice_content{
padding: 20rpx 0;
}
.choice_content_max{
max-height: 515rpx;
overflow: auto;
}
.choice_content_min{
padding: 10px 0;
border-bottom: 1px solid #39446f;
font-size: 24rpx;
color: #157dd2;
}
.choice_content_min:active{
color: #00e3fe;
}
.queren{
float: right;
position: relative;
right: 20rpx;
padding: 10rpx;
color: #157dd2;
font-size: 28rpx;
}
.choice_max{
width: 500rpx;
background: #232a44;
padding:0 30rpx;
}
.choice_tltie{
text-align: center;
color: #00e3fe;
font-size: 28rpx;
padding: 20rpx 0;
}
.choice_input input{
border: 1px solid #00e3fe;
width: 100%;
height:60rpx;
border-radius: 50rpx;
font-size: 28rpx;
color: #00e3fe;
padding-left: 30rpx;
box-sizing: border-box;
}
.choice_content{
padding: 20rpx 0;
}
.choice_content_max{
max-height: 515rpx;
overflow: auto;
}
.choice_content_min{
padding: 10px 0;
border-bottom: 1px solid #39446f;
font-size: 24rpx;
color: #157dd2;
}
.choice_content_min:active{
color: #00e3fe;
}
.queren{
float: right;
position: relative;
right: 20rpx;
padding: 10rpx;
color: #157dd2;
font-size: 28rpx;
}

View File

@ -1,586 +0,0 @@
import config from '../../../config'
import {
getToken,
getUserInfo
} from '../../../utils/auth'
import {
findProRoles,
findDictCache,
findCardOcrFront
} from '../../../api/publics'
import {
addUser,
getUserRoles
} from '../../../api/login'
import {
findProSubUsersInfoById
} from '../../../api/project'
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
limit: 1,
maxDate: new Date(2088, 1, 1).getTime(),
form: {},
active: 0,
flowNodes: [{
text: '信息登记'
}, {
text: '信息审核'
}, {
text: '人员入场'
}],
deptsList: [],
postsList: [],
allPostList:[],
proRoleList: [],
loadShow: false,
imgBase: config.baseImgUrl,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if (!getToken()) {
wx.redirectTo({
url: '../../login/login',
})
}
if (options && options.id) {
//查询数据回填...
this.initData(options.id);
}
const proUserInfo = getUserInfo();
this.setData({
"form.comId": proUserInfo.projectUserInfo.comId,
"form.deptId": app.globalData.useProjectId,
"form.projectId": app.globalData.useProjectId,
"form.projectName": app.globalData.useProjectName
});
this.getDictCache();
this.getAllProDeptRoles();
},
/**
* 获取单位
*/
getAllProDeptRoles() {
findProRoles(app.globalData.useProjectId).then(res => {
let list = [];
res.data.forEach(item => {
list.push({
"roleId": item.roleId,
"roleName": item.roleName,
"roleKey": item.roleKey,
"state": false
});
});
this.setData({
proRoleList: list
});
});
},
/**
* 获取字典缓存数据
*/
getDictCache() {
// 初始化岗位
findDictCache("user_work_type").then(res => {
if (res.code == 200) {
let depts = [];
res.data.forEach(item => {
if(item.remark){
const exists = depts.some(ops => ops.id === item.remark);
if (!exists) {
depts.push({
'id': item.remark,
'text': item.remark,
'post': []
});
}
}
});
depts.forEach(des => {
res.data.forEach(item => {
if (des.id == item.remark) {
des.post.push({
'id': item.dictValue,
'text': item.dictLabel
});
}
});
})
this.setData({
deptsList: depts,
allPostList: res.data
});
}
})
},
/**
* 初始化数据
* @param {*} id
*/
initData(id) {
findProSubUsersInfoById(id).then(userRes => {
if (userRes.code == 200 && userRes.data != null) {
userRes.data.deptId = userRes.data.projectId;
userRes.data.nickName = userRes.data.userName;
userRes.data.phonenumber = userRes.data.userPhone;
if (userRes.data.userInfos) {
let userInfosJSON = JSON.parse(userRes.data.userInfos);
userRes.data.nativePlace = userInfosJSON.nativePlace;
userRes.data.nation = userInfosJSON.nation;
userRes.data.address = userInfosJSON.address;
userRes.data.cardImgPos = userInfosJSON.cardImgPos;
userRes.data.cardImgInv = userInfosJSON.cardImgInv;
}
if (userRes.data.cardImgPos) {
userRes.data.cardImgPos = (this.data.imgBase + userRes.data.cardImgPos).split(',');
}
if (userRes.data.cardImgInv) {
userRes.data.cardImgInv = (this.data.imgBase + userRes.data.cardImgInv).split(',');
}
if (userRes.data.userPicture) {
userRes.data.avatar = (this.data.imgBase + userRes.data.userPicture).split(',');
}
this.setData({
active: 100,
form: userRes.data
});
this.initUserRole(userRes.data.userId);
}
});
},
/**
* 初始化用户角色
* @param {*} userId
*/
initUserRole(userId){
getUserRoles(userId).then(res => {
if(res.code==200){
let _roleIds = [];
let _roleNames = "";
res.data.roles.forEach(item =>{
_roleIds.push(item.roleId);
_roleNames += "" + item.roleName;
});
this.setData({
"form.deptId":res.data.deptId,
"form.roleIds": _roleIds,
"form.roleNames":_roleNames.substring(1)
})
}
})
},
//选择角色
onAddRoles(e) {
if (e.detail.length > 0) {
let _roleIds = "";
let _roleNames = "";
e.detail.forEach(item => {
_roleIds += "," + item.roleId;
_roleNames += "" + item.roleName;
});
this.setData({
"form.roleIds": _roleIds.substring(1).split(','),
"form.roleNames":_roleNames
})
console.log("dddddddd",this.data.form);
} else {
this.setData({
"form.roleIds": []
})
}
},
//取消页面
cancelSaveView() {
this.returnToPage()
},
/**
* 委托代理提交参建单位信息
*/
submitSubUsers() {
let {
form
} = this.data;
//数据效验
if (!form.comId || !form.deptId || !form.projectId) {
app.toast("数据异常,请刷新页面重试!")
return false;
}
if (!form.cardImgPos || form.cardImgPos.length == 0) {
app.toast("请上传身份证正面照!");
return false;
}
if (!form.cardImgInv || form.cardImgInv.length == 0) {
app.toast("请上传身份证反面照!");
return false;
}
if (!form.avatar || form.avatar.length == 0) {
app.toast("请上传进场半身近照!");
return false;
}
if (!form.nickName) {
app.toast("请填写人员姓名!");
return false;
}
if (!form.cardCode) {
app.toast("请填写身份证号!");
return false;
} else {
const cardCodePattern = /^[1-9]\d{5}(18|19|20|21|22)?\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}(\d|[Xx])$/;
if (!cardCodePattern.test(form.cardCode)) {
app.toast("身份证号码不正确!");
return false;
}
}
if (!form.phonenumber) {
app.toast("请填写联系电话!");
return false;
} else {
const phonePattern = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/;
if (!phonePattern.test(form.phonenumber)) {
app.toast("人员联系电话不正确!");
return false;
}
}
if(!form.id){
if (!form.password) {
app.toast("请输入登录密码!");
return false;
}else if(form.password.length<6){
app.toast("登录密码最少6位字符");
return false;
}
if (!form.depts) {
app.toast("请选择岗位部门!");
return false;
}
}
if (!form.workType) {
app.toast("请选择岗位级别!");
return false;
}
if (!form.roleIds || form.roleIds.length==0) {
app.toast("请选择用户角色!");
return false;
}
let that = this;
//弹出确认
wx.showModal({
title: '提示',
content: '是否确认保存总包人员信息?',
success: function (sm) {
if (sm.confirm) {
that.submitSubUserForm();
}
}
})
},
/**
* 委托代理提交参建单位表单
*/
submitSubUserForm() {
let _form = {
...this.data.form
};
this.setData({
loadShow: true
})
let uploadFiles = [];
if (_form.cardImgPos && _form.cardImgPos.length > 0) {
uploadFiles.push({
type: 'cardImgPos',
path: _form.cardImgPos[0]
});
}
if (_form.cardImgInv && _form.cardImgInv.length > 0) {
uploadFiles.push({
type: 'cardImgInv',
path: _form.cardImgInv[0]
});
}
if (_form.avatar && _form.avatar.length > 0) {
uploadFiles.push({
type: 'userPicture',
path: _form.avatar[0]
});
}
let that = this;
let uploads = [];
uploadFiles.forEach(async (item, idx) => {
let obj;
if (item.path.indexOf(this.data.imgBase) > -1) {
obj = {
data: {
data: {
url: item.path.replace(this.data.imgBase, "")
}
}
}
} else {
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
obj = await that.syncUploadImage(item.path);
}
if (item.type == "cardImgPos") {
_form.cardImgPos = obj.data.data.url;
}
if (item.type == "cardImgInv") {
_form.cardImgInv = obj.data.data.url;
}
if (item.type == "userPicture") {
_form.avatar = obj.data.data.url;
}
uploads.push(obj.data.data.url);
//验证图片上传完毕
if (uploads.length == uploadFiles.length) {
let userInfos = {};
userInfos.nation = _form.nation;
userInfos.nativePlace = _form.nativePlace;
userInfos.address = _form.address;
userInfos.cardImgPos = _form.cardImgPos;
userInfos.cardImgInv = _form.cardImgInv;
_form.userInfos = JSON.stringify(userInfos);
addUser(_form).then(res => {
this.setData({
loadShow: false
});
if (res.code == 200) {
app.toast("保存数据成功!")
setTimeout(() => {
wx.redirectTo({
url: `../list/index`,
})
}, 200)
}
});
}
});
},
/**
* 个人身份证正面照
* @param {*} options
*/
fileUploadCardImgPos(options) {
let file = options.detail;
this.setData({
"form.cardImgPos": file
});
file.forEach(async (item, idx) => {
let obj = await this.syncUploadImage(item);
findCardOcrFront(obj.data.data.url).then(res => {
if (res.code == 200) {
if (res.data.nation.indexOf("族") < 0) {
res.data.nation = res.data.nation + "族";
}
this.setData({
"form.nickName": res.data.name,
"form.cardCode": res.data.cardId,
"form.nation": res.data.nation,
"form.nativePlace": res.data.native,
"form.address": res.data.address
})
if (!res.data.name || !res.data.cardId) {
this.setData({
"form.cardImgPos": []
});
app.toast("身份证正面照识别失败!请重新上传");
}
}
});
})
},
/**
* 个人身份证反面照
* @param {*} options
*/
fileUploadCardImgInv(options) {
let file = options.detail;
this.setData({
"form.cardImgInv": file
});
},
/**
* 个人半身近照
* @param {*} options
*/
fileUploadUserPicture(options) {
let file = options.detail;
this.setData({
"form.avatar": file
});
},
/**
* 输入个人姓名
* @param {*} e
*/
inputUserName(e) {
this.setData({
"form.nickName": e.detail.value
})
},
/**
* 输入个人身份证号
* @param {*} e
*/
inputUserCode(e) {
this.setData({
"form.cardCode": e.detail.value
})
},
/**
* 输入联系电话
* @param {*} e
*/
inputUserPhone(e) {
this.setData({
"form.phonenumber": e.detail.value
})
},
/**
* 登陆密码
* @param {*} e
*/
inputPassword(e) {
this.setData({
"form.password": e.detail.value
})
},
/**
* 选择部门
* @param {*} e
*/
onDepts(e) {
let _list = this.data.deptsList;
_list.forEach(item => {
if (item.id == e.detail.id) {
this.setData({
"form.depts": e.detail.id,
"form.workType": null,
postsList: item.post
})
}
});
},
/**
* 选择岗位
* @param {*} e
*/
onPosts(e) {
this.setData({
"form.workType": e.detail.id
})
},
/**
* 这里考虑上传图片异步问题封装为同步
*/
syncUploadImage(file) {
let _baseUrl = config.baseUrl;
return new Promise((resolve, reject) => {
wx.uploadFile({
url: _baseUrl + "/file/upload", // 上传的服务器接口地址
filePath: file,
header: {
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
'Authorization': 'Bearer ' + getToken()
},
name: "file", //上传的所需字段,后端提供
formData: {},
success: (res) => {
// 上传完成操作
const data = JSON.parse(res.data)
resolve({
data: data
})
},
fail: (err) => {
//上传失败修改pedding为reject
console.log("访问接口失败", err);
wx.showToast({
title: "网络出错,上传失败",
icon: 'none',
duration: 1000
});
reject(err)
}
});
})
},
returnToPage: function () {
wx.redirectTo({
url: `../list/index`
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -1,8 +0,0 @@
{
"usingComponents": {
"van-steps": "@vant/weapp/steps/index",
"van-notice-bar": "@vant/weapp/notice-bar/index",
"van-overlay": "@vant/weapp/overlay/index"
},
"navigationStyle": "custom"
}

View File

@ -1,122 +0,0 @@
<view class="header_title">
<view class="header_title_row">
<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">{{form.id?'修改':'新增'}}总包人员</view>
</van-col>
</van-row>
</view>
</view>
<view class="max_content">
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
<view class="inspect_info">
<view class="module_title_2 module_title_padding">
<view>{{form.projectName}}</view>
</view>
<view class="inspect_info_list">
<van-row>
<van-col span="8">
<view class="markers inspect_info_title">身份证正面
</view>
<view class="inspect_info_content" style="margin-left: 10px;">
<file-uploader bindimages="fileUploadCardImgPos" iconClass="in-zcard-click" limit="{{limit}}" fileUrlArray="{{form.cardImgPos}}"></file-uploader>
</view>
</van-col>
<van-col span="8">
<view class="markers inspect_info_title">身份证反面
</view>
<view class="inspect_info_content" style="margin-left: 10px;">
<file-uploader bindimages="fileUploadCardImgInv" iconClass="in-fcard-click" limit="{{limit}}" fileUrlArray="{{form.cardImgInv}}"></file-uploader>
</view>
</van-col>
<van-col span="8">
<view class="markers inspect_info_title">半身清晰照
</view>
<view class="inspect_info_content" style="margin-left: 10px;">
<file-uploader bindimages="fileUploadUserPicture" limit="{{limit}}" fileUrlArray="{{form.avatar}}"></file-uploader>
</view>
</van-col>
</van-row>
</view>
<view class="inspect_info_list">
<view class="markers inspect_info_title">人员姓名
<text style="font-size: small; color: #ff711e;">[不可输入,证件自动识别]</text>
</view>
<view class="inspect_info_content">
<input placeholder="请填写姓名" placeholder-style="color:#6777aa;" bindinput="inputUserName" class="inspect_input_fill_in" disabled maxlength="30" model:value="{{form.nickName}}" />
</view>
</view>
<view class="inspect_info_list">
<view class="markers inspect_info_title">身份证号
<text style="font-size: small; color: #ff711e;">[不可输入,证件自动识别]</text>
</view>
<view class="inspect_info_content">
<input placeholder="请填写身份证号" placeholder-style="color:#6777aa;" bindinput="inputUserCode" class="inspect_input_fill_in" disabled maxlength="30" model:value="{{form.cardCode}}" />
</view>
</view>
<view class="inspect_info_list">
<view class="markers inspect_info_title">手机号码
<text wx:if="{{form.id}}" style="font-size: small; color: #ff711e;">[不可修改]</text>
</view>
<view class="inspect_info_content" wx:if="{{form.id}}">
<input placeholder-style="color:#6777aa;" model:value="{{form.phonenumber}}" class="inspect_input_fill_out" disabled />
</view>
<view class="inspect_info_content" wx:if="{{!form.id}}">
<input placeholder="请填写手机号码" placeholder-style="color:#6777aa;" bindinput="inputUserPhone" model:value="{{form.phonenumber}}" class="inspect_input_fill_in" maxlength="11"/>
</view>
</view>
<view class="safety_inspect_title module_title_flex">
<text class="color_delete">使用手机号码登录系统。</text>
</view>
<view class="inspect_info_list" wx:if="{{!form.id}}">
<view class="markers inspect_info_title">登陆密码</view>
<view class="inspect_info_content">
<input placeholder="请填写登陆密码" type="password" placeholder-style="color:#6777aa;" bindinput="inputPassword" class="inspect_input_fill_in" maxlength="30" model:value="{{form.password}}" />
</view>
</view>
<view class="inspect_info_list" wx:if="{{!form.id}}">
<view class="markers inspect_info_title">岗位部门</view>
<view class="inspect_info_content">
<voucher-select columns="{{deptsList}}" placeholder="请选择岗位部门" bindchange="onDepts" ></voucher-select>
</view>
</view>
<view class="inspect_info_list" wx:if="{{!form.id}}">
<view class="markers inspect_info_title">岗位级别</view>
<view class="inspect_info_content">
<voucher-select columns="{{postsList}}" placeholder="请选择岗位部门" bindchange="onPosts" selectValue="{{form._userPost}}"></voucher-select>
</view>
</view>
<view class="inspect_info_list" wx:if="{{form.id}}">
<view class="markers inspect_info_title">部门岗位</view>
<view class="inspect_info_content">
<input wx:for="{{allPostList}}" wx:key="index" wx:if="{{item.dictValue==form.workType}}" placeholder-style="color:#6777aa;" model:value="{{item.remark+item.dictLabel}}" class="inspect_input_fill_out" disabled />
</view>
</view>
<view class="inspect_info_list">
<view class="markers inspect_info_title">用户角色</view>
<view class="inspect_info_content">
<select-roles rectifierData="{{proRoleList}}" multiple="{{true}}" bindselected="onAddRoles" title="请选择用户角色" choose="{{form.roleNames}}"></select-roles>
</view>
</view>
<view class="safety_inspect_title module_title_flex">
<text class="color_orange">{{form.id?'修改':'新增'}}人员信息不进入审核流程、{{form.id?'修改':'新增'}}后立即生效。</text>
</view>
</view>
<view class="problem_submit_to">
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="submitSubUsers">提交保存</view>
</view>
</view>
<van-overlay show="{{loadShow}}">
<view class="gif">
<image src="/images/loding.gif"></image>
<view>数据处理中!请稍后...</view>
</view>
</van-overlay>

View File

@ -1,11 +0,0 @@
.van-steps {
background-color: transparent !important;
}
.van-step--horizontal .van-step__circle-container {
background-color: transparent !important;
}
.van-steps--horizontal {
padding: 10px 20px !important;
}

View File

@ -1,321 +0,0 @@
import config from '../../../config'
import {
getToken
} from '../../../utils/auth'
import {
editSubUsersPhone,
editSubUsersUseStatus,
findProSubUsersInfoById
} from '../../../api/project'
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
active: 100,
flowNodes: [{
text: '信息登记'
}, {
text: '信息审核'
}, {
text: '人员入场'
}],
form: {},
newUserPhone:"",
isChange: false,
imgBaseUrl: config.baseImgUrl
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if (!getToken()) {
wx.redirectTo({
url: '../../login/login',
})
}
if (options && options.id) {
//查询数据回填...
this.initData(options.id);
}
},
/**
* 初始化数据
* @param {*} id
*/
initData(id) {
findProSubUsersInfoById(id).then(userRes => {
if (userRes.code == 200 && userRes.data != null) {
if (userRes.data.userInfos) {
let userInfosJSON = JSON.parse(userRes.data.userInfos);
userRes.data.nativePlace = userInfosJSON.nativePlace;
userRes.data.nation = userInfosJSON.nation;
userRes.data.address = userInfosJSON.address;
userRes.data.emergencyContact = userInfosJSON.emergencyContact;
userRes.data.contactPhone = userInfosJSON.contactPhone;
userRes.data.bankName = userInfosJSON.bankName;
userRes.data.bankOffice = userInfosJSON.bankOffice;
userRes.data.bankCardNo = userInfosJSON.bankCardNo;
userRes.data.cardImgPos = userInfosJSON.cardImgPos;
userRes.data.cardImgInv = userInfosJSON.cardImgInv;
}
if (userRes.data.cardImgPos) {
userRes.data.cardImgPos = (this.data.imgBaseUrl + userRes.data.cardImgPos).split(',');
}
if (userRes.data.cardImgInv) {
userRes.data.cardImgInv = (this.data.imgBaseUrl + userRes.data.cardImgInv).split(',');
}
if (userRes.data.userPicture) {
userRes.data.userPicture = (this.data.imgBaseUrl + userRes.data.userPicture).split(',');
}
if (userRes.data.subDeptPowerPath) {
userRes.data.subDeptPowerPath = (this.data.imgBaseUrl + userRes.data.subDeptPowerPath).split(',');
}
this.setData({
active: 100,
form: userRes.data
});
}
});
},
/**
* 返回上页
*/
returnToPage: function () {
wx.redirectTo({
url: `../list/index`
})
},
/**
* 展示图片
* @param {*} e
*/
showImg: function (e) {
let paths = e.target.dataset.set;
let path = [];
paths.split(',').forEach(url => {
path.push(url);
});
wx.previewImage({
urls: path,
current: path[0]
})
},
/**
* 下载并打开文档
* @param {*} e
*/
downFile: function (e) {
let path = this.data.form.eduFilePath;
wx.downloadFile({
// 示例 url并非真实存在
url: config.baseUrl + '/file/download?fileName=' + path,
header: {
'Authorization': 'Bearer ' + getToken()
},
success: function (res) {
const filePath = res.tempFilePath
let fpt = path.split(".");
wx.openDocument({
filePath: filePath,
fileType: fpt[fpt.length - 1],
success: function (res) {
console.log('打开文档成功')
},
fail: function (res) {
console.log(res)
}
})
}
})
},
/**
* 单位入场
*/
submitSubDeptsIn(){
let that = this;
//弹出确认
wx.showModal({
title: '提示',
content: '是否确认班组人员入场?',
success: function (sm) {
if (sm.confirm) {
that.submitSubDeptsUseStatus(0);
}
}
})
},
/**
* 单位离场
*/
submitSubDeptsOut(){
let that = this;
//弹出确认
wx.showModal({
title: '提示',
content: '是否确认班组人员离场?',
success: function (sm) {
if (sm.confirm) {
that.submitSubDeptsUseStatus(1);
}
}
})
},
/**
* 表单提交
*/
submitSubDeptsUseStatus(status){
editSubUsersUseStatus(this.data.form.id,status).then(res =>{
if(res.code==200){
app.toast("操作成功!")
setTimeout(() => {
wx.redirectTo({
url: `../list/index`,
})
}, 200)
}
});
},
/**
* 输入联系电话
* @param {*} e
*/
inputUserPhone(e) {
this.setData({
newUserPhone: e.detail.value
})
},
/**
* 变更手机号
*/
changeUserPhone() {
this.setData({
isChange: !this.data.isChange
});
setTimeout(() => {
wx.pageScrollTo({
scrollTop: 99999, // 滚动到内容区域的高度,即最底部
duration: 100 // 滚动的动画持续时间
});
}, 500)
},
/**
*
*/
submitChangePhone(){
let {
form,
newUserPhone
} = this.data;
if(!newUserPhone){
app.toast("请输入新手机号码!")
return false;
}else{
const phonePattern = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/;
if (!phonePattern.test(newUserPhone)) {
app.toast("手机号码不正确!");
return false;
}
}
let that = this;
//弹出确认
wx.showModal({
title: '提示',
content: '是否确认变更人员手机号?',
success: function (sm) {
if (sm.confirm) {
that.submitChangePhoneForm();
}
}
})
},
/**
* 确定
* 变更手机号
*/
submitChangePhoneForm(){
let _form = {
...this.data.form
};
let {
newUserPhone
} = this.data;
_form.userPhone = newUserPhone;
_form.cardImgPos = "";
_form.cardImgInv = "";
_form.userPicture = "";
_form.subDeptPowerPath = "";
editSubUsersPhone(_form).then(res =>{
if(res.code==200){
app.toast("变更成功!")
this.setData({
isChange: !this.data.isChange
})
this.onLoad({id: _form.id});
}
});
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -1,6 +0,0 @@
{
"usingComponents": {
"van-steps": "@vant/weapp/steps/index"
},
"navigationStyle": "custom"
}

View File

@ -1,244 +0,0 @@
<view class="header_title">
<view class="header_title_row">
<van-row>
<van-col span="4">
<view class="header_img" bindtap="returnToPage">
<image src="/images/left.png"></image>
<text class="header_fh">返回</text>
</view>
</van-col>
<van-col span="16">
<view class="header_name">总包人员详情</view>
</van-col>
</van-row>
</view>
</view>
<view class="max_content">
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
<view class="inspect_overview inspect_overview_max">
<view class="module_title module_title_padding">
<view>{{form.projectName}}</view>
</view>
<view class="inspect_info">
<view class="inspect_overview_list">
<van-row>
<van-col span="8"><text class="color_purple">单位类型</text></van-col>
<van-col span="16" class="color_blue">{{form.subDeptTypeName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list">
<van-row>
<van-col span="8"><text class="color_purple">单位名称</text></van-col>
<van-col span="16">{{form.subDeptName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{form.subDeptGroupName}}">
<van-row>
<van-col span="8"><text class="color_purple">所属班组</text></van-col>
<van-col span="16">{{form.subDeptGroupName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{form.craftTypeName}}">
<van-row>
<van-col span="8"><text class="color_purple">工种类型</text></van-col>
<van-col span="16">{{form.craftTypeName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{form.craftPostName}}">
<van-row>
<van-col span="8"><text class="color_purple">工种岗位</text></van-col>
<van-col span="16">
{{form.craftPostName}}
<text wx:if="{{form.userPost=='3'}}" style="font-size: small; color: #ff6d6d;">[班组长]</text>
</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{form.cardImgPos && form.cardImgInv}}">
<van-row>
<van-col span="8"><text class="color_purple">身份证件</text></van-col>
<van-col span="16">
<view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:key="index">
<image bindtap='showImg' data-set="{{form.cardImgPos}}" src="{{form.cardImgPos+'.min.jpg'}}"></image>
<image bindtap='showImg' data-set="{{form.cardImgInv}}" src="{{form.cardImgInv+'.min.jpg'}}"></image>
</view>
</view>
</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{form.userPicture}}">
<van-row>
<van-col span="8"><text class="color_purple">半身近照</text></van-col>
<van-col span="16">
<view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:key="index">
<image bindtap='showImg' data-set="{{form.userPicture}}" src="{{form.userPicture+'.min.jpg'}}"></image>
</view>
</view>
</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{form.subDeptPowerPath}}">
<van-row>
<van-col span="8"><text class="color_purple">单位委托书</text></van-col>
<van-col span="16">
<view class="problem_list_info_con in-img-max">
<view class="in-img-div" wx:key="index">
<image bindtap='showImg' data-set="{{form.subDeptPowerPath}}" src="{{form.subDeptPowerPath+'.min.jpg'}}"></image>
</view>
</view>
</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{form.userName}}">
<van-row>
<van-col span="8">
<text class="color_purple">人员姓名</text>
</van-col>
<van-col span="16">{{form.userName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{form.cardCode}}">
<van-row>
<van-col span="8">
<text class="color_purple">身份证号码</text>
</van-col>
<van-col span="16">{{form.cardCode}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{form.nation}}">
<van-row>
<van-col span="8"><text class="color_purple">所属民族</text></van-col>
<van-col span="16">{{form.nation}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{form.nativePlace}}">
<van-row>
<van-col span="8"><text class="color_purple">籍贯地址</text></van-col>
<van-col span="16">{{form.nativePlace}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{form.address}}">
<van-row>
<van-col span="8"><text class="color_purple">详细地址</text></van-col>
<van-col span="16">{{form.address}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{form.userPhone}}">
<van-row>
<van-col span="8"><text class="color_purple">联系电话</text></van-col>
<van-col span="16"><text class="color_blue txtb">{{form.userPhone}}</text></van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{form.emergencyContact}}">
<van-row>
<van-col span="8"><text class="color_purple">紧急联系人</text></van-col>
<van-col span="16">{{form.emergencyContact}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{form.contactPhone}}">
<van-row>
<van-col span="8"><text class="color_purple">紧急联系电话</text></van-col>
<van-col span="16">{{form.contactPhone}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{form.bankName}}">
<van-row>
<van-col span="8"><text class="color_purple">开户行名称</text></van-col>
<van-col span="16">{{form.bankName}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{form.bankOffice}}">
<van-row>
<van-col span="8"><text class="color_purple">开户行网点</text></van-col>
<van-col span="16">{{form.bankOffice}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{form.bankCardNo}}">
<van-row>
<van-col span="8"><text class="color_purple">工资银行卡号</text></van-col>
<van-col span="16">{{form.bankCardNo}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{form.illnessStatus!=null}}">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">高血压、心脏病等基础身体健康问题
</view>
<view class="inspect_info_content">
<text wx:if="{{form.illnessStatus=='0'}}" class="code_label_2 code_label_green" style="padding: 5rpx 50rpx;font-size: 25rpx;">无</text>
<text wx:if="{{form.illnessStatus!='0'}}" class="code_label_2 code_label_red" style="padding: 5rpx 50rpx;font-size: 25rpx;">有</text>
</view>
</view>
<view class="inspect_overview_list" wx:if="{{form.supIllnessStatus!=null}}">
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">严重呼吸系统疾病、严重心脑血管疾病、肝肾疾病、恶性肿瘤以及药物无法有效控制的高血压和糖尿病等基础性病症状征兆
</view>
<view class="inspect_info_content">
<text wx:if="{{form.supIllnessStatus=='0'}}" class="code_label_2 code_label_green" style="padding: 5rpx 50rpx;font-size: 25rpx;">无</text>
<text wx:if="{{form.supIllnessStatus!='0'}}" class="code_label_2 code_label_red" style="padding: 5rpx 50rpx;font-size: 25rpx;">有</text>
</view>
</view>
<view class="inspect_overview_list" wx:if="{{form.eduFilePath}}">
<van-row>
<van-col span="8"><text class="color_purple">安全承诺书</text></van-col>
<van-col span="16" class="color_blue">
<view class="files">
<text data-set="{{form.eduFilePath}}" style="word-wrap: break-word;" bindtap='downFile'>点击下载安全承诺书</text>
</view>
</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{form.useStatus}}">
<van-row>
<van-col span="8"><text class="color_purple">入场状态</text></van-col>
<van-col span="16">
<text wx:if="{{form.useStatus=='0'}}" class="color_blue txtb">已入场</text>
<text wx:if="{{form.useStatus=='1'}}" class="color_delete txtb">已离场</text>
</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{form.approveStatus}}">
<van-row>
<van-col span="8"><text class="color_purple">审批状态</text></van-col>
<van-col span="16">
<text wx:if="{{form.approveStatus==0}}" class="code_label_2 code_label_yellow" style="padding: 5rpx 50rpx;font-size: 15px;font-weight: 600;">待提交</text>
<text wx:if="{{form.approveStatus==10}}" class="code_label_2 code_label_blue" style="padding: 5rpx 50rpx;font-size: 15px;font-weight: 600;">审核中</text>
<text wx:if="{{form.approveStatus==11}}" class="code_label_2 code_label_red" style="padding: 5rpx 50rpx;font-size: 15px;font-weight: 600;">审核驳回</text>
<text wx:if="{{form.approveStatus==100}}" class="code_label_2 code_label_green" style="padding: 5rpx 50rpx;font-size: 15px;font-weight: 600;">审核通过</text>
<text wx:if="{{form.approveStatus==101}}" class="code_label_2 code_label_green" style="padding: 5rpx 50rpx;font-size: 15px;font-weight: 600;">系统免审</text>
</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{form.createBy}}">
<van-row>
<van-col span="8"><text class="color_purple">数据来源</text></van-col>
<van-col span="16">{{form.createBy}}</van-col>
</van-row>
</view>
<view class="inspect_overview_list" wx:if="{{form.createTime}}">
<van-row>
<van-col span="8"><text class="color_purple">创建时间</text></van-col>
<van-col span="16">{{form.createTime}}</van-col>
</van-row>
</view>
</view>
</view>
<view class="inspect_overview" wx:if="{{isChange}}">
<view class="module_title module_title_padding">
<view>变更手机号码</view>
</view>
<view class="inspect_overview_list_max">
<view class="inspect_info_list">
<view class="markers inspect_info_title">新手机号码</view>
<view class="inspect_info_content">
<input placeholder="请填写新手机号码" placeholder-style="color:#6777aa;" bindinput="inputUserPhone" model:value="{{newUserPhone}}" class="inspect_input_fill_in" maxlength="11"/>
</view>
</view>
</view>
</view>
<view class="problem_submit_to">
<view class="problem_submit_to_btn" bindtap="returnToPage">返回取消</view>
<view wx:if="{{!isChange}}" class="problem_submit_to_btn problem_submit_to_view_eq" bindtap="changeUserPhone">变更电话</view>
<view wx:if="{{isChange}}" class="problem_submit_to_btn problem_submit_to_view_save" bindtap="submitChangePhone">提交保存</view>
<view wx:if="{{form.useStatus=='0'}}" class="problem_submit_to_btn problem_submit_to_delete" bindtap="submitSubDeptsOut">人员离场</view>
<view wx:if="{{form.useStatus=='1'}}" class="problem_submit_to_btn problem_submit_to_warning" bindtap="submitSubDeptsIn">人员入场</view>
</view>
</view>

View File

@ -1,11 +0,0 @@
.van-steps {
background-color: transparent !important;
}
.van-step--horizontal .van-step__circle-container {
background-color: transparent !important;
}
.van-steps--horizontal {
padding: 10px 20px !important;
}

View File

@ -1,228 +0,0 @@
import {
getToken
} from '../../../utils/auth'
import {
subusersList,
subusersCount
} from '../../../api/project'
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
addFlag: false,
initData: {},
pageNum: 1,
pageSize: 10000,
total: 0,
listData: [],
activeState: "0",
yrcCount: 0,
ylcCount: 0,
activeName: "0_0",
},
//项目切换 返回值
onProjectSelect(e) {
let projectId = e.detail.id;
let projectName = e.detail.text;
app.globalData.useProjectId = projectId;
app.globalData.useProjectName = projectName;
this.onLoad();
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
if (!getToken()) {
wx.redirectTo({
url: '../../login/login',
})
}
this.setData({
addFlag: true,
initData: {
id: app.globalData.useProjectId,
text: app.globalData.useProjectName,
},
pageNum: 1,
pageSize: 10000,
listData: [],
total: 0
});
//获取数据列表
this.getListData();
this.getListCount();
},
/**
* 添加按钮
*/
skipAdd() {
wx.redirectTo({
url: `../add/index`,
})
},
/**
* 获取详情
* @param {*} e
*/
getInfo(e) {
let _id = e.currentTarget.dataset.set;
wx.redirectTo({
url: `../info/index?id=${_id}`,
})
},
/**
* 修改按钮
* @param {*} e
*/
editInfo(e) {
let _id = e.currentTarget.dataset.set;
wx.redirectTo({
url: `../add/index?id=${_id}`,
})
},
// 手风琴
onChange(e) {
this.setData({
activeName: e.target.dataset.set
});
},
/**
* 查询数据列表
*/
getListData() {
let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&useStatus=" + this.data.activeState + "&activeTags=finished&searchValue=magUsers";
subusersList(params).then(res => {
if (res.code == 200) {
this.setData({
total: res.total,
listData: this.data.listData.concat(res.rows)
})
}
});
},
/**
* 统计数据列表
*/
getListCount() {
let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&activeTags=finished&searchValue=magUsers";
subusersCount(params).then(res => {
if (res.code == 200) {
let _yrc = 0,
_ylc = 0;
res.data.forEach(item => {
if (item.useStatus == "0") {
_yrc = item.total;
} else {
_ylc = item.total;
}
});
this.setData({
yrcCount: _yrc,
ylcCount: _ylc
})
}
});
},
/**
* 标签切换
*/
trainJump(e) {
let index = e.currentTarget.dataset.index;
let nav = "";
if (index == 1) {
nav = '0';
} else {
nav = '1';
}
this.setData({
activeState: nav,
pageNum: 1,
pageSize: 10000,
listData: [],
});
this.getListData();
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
returnToPage: function () {
/*关闭当前页面,跳转到其它页面。*/
wx.redirectTo({
url: '../../project_more/index',
})
},
/**
* 滚动到底部
*/
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();
} else {
console.log("已经到底了,没有数据可加载!!!");
}
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})

View File

@ -1,9 +0,0 @@
{
"usingComponents": {
"van-collapse": "@vant/weapp/collapse",
"van-collapse-item": "@vant/weapp/collapse-item",
"van-cell-group": "@vant/weapp/cell-group",
"van-cell": "@vant/weapp/cell"
},
"navigationStyle": "custom"
}

View File

@ -1,61 +0,0 @@
<view class="header_title">
<view class="header_title_row">
<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=='0'?'active':''}}" bindtap="trainJump" data-index="1"><text>已入场({{yrcCount}}</text></view>
<view class="{{activeState=='1'?'active':''}}" bindtap="trainJump" data-index="2"><text>已离场({{ylcCount}}</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">
<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 < 10 ?'0'+(index+1):(index+1)}}</view>
<view class="module_title module_title_flex inspect_list_title_text_2 color_orange">
{{item.subDeptName}}
</view>
</view>
</view>
<view class="inspect_list_info">
<van-collapse wx:for="{{item.groups}}" wx:for-item="groupItem" wx:for-index="groupIndex" wx:key="groupIndex" data-set="{{index+'_'+groupIndex}}" value="{{activeName}}" bind:change="onChange" accordion>
<van-collapse-item title="{{groupItem.subDeptGroupName+' ( '+groupItem.users.length+' )'}}" name="{{index+'_'+groupIndex}}" icon="qr">
<van-cell-group style="width: 100%;">
<van-cell wx:for="{{groupItem.users}}" wx:for-item="userItem" wx:for-index="userIndex" wx:key="userIndex" title="{{userItem.userName}}" cell-class="switch-cell" data-set="{{userItem.id}}" bindtap="getInfo" icon="vip-card-o">
<view class="module_see_info_edit" catchtap="editInfo" data-set="{{userItem.id}}">
<van-icon name="edit" /><text class="edit_text">修改</text>
</view>
</van-cell>
</van-cell-group>
</van-collapse-item>
</van-collapse>
</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 wx:if="{{addFlag}}" class="inspect_add_to" bindtap="skipAdd">
<view style="padding-top: 22rpx;">
<image src="/images/new_add.png"></image>
<view>新增</view>
</view>
</view>
</view>
</scroll-view>

View File

@ -1,19 +0,0 @@
/* pages/project_subDepts/index.wxss */
.module_see_info_edit {
color: #91ef4a;
font-weight: 600;
}
.module_see_info_edit .edit_text {
padding-left: 10rpx;
}
.van-cell{
color: #89a3ee !important;
background-color: #32374c !important;
}
.van-collapse-item__content{
padding: 0;
background-color: transparent !important;
}

View File

@ -1,161 +0,0 @@
import {
getToken,
getUserInfo
} from '../../utils/auth'
import {
findUserMenuList
} from '../../api/publics'
import {
findMyTask
} from '../../api/flowable'
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
active: 1,
projectId: '',
projectName: '',
subDeptUserInfo: {},
menuList: [],
initData: {},
aqglDb: 0,
zlglDb: 0,
todoDB: 0,
fbdwDB: 0,
fbrtDB: 0,
aqyhDB: 0,
zlyhDB: 0
},
//项目切换 返回值
onProjectSelect(e) {
let projectId = e.detail.id;
let projectName = e.detail.text;
app.globalData.useProjectId = projectId;
app.globalData.useProjectName = projectName;
this.onLoad();
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
if (!getToken()) {
wx.redirectTo({
url: '../login/login',
})
}
const proUserInfo = getUserInfo();
this.setData({
projectId: app.globalData.useProjectId,
projectName: app.globalData.useProjectName,
initData: {
id: app.globalData.useProjectId,
text: app.globalData.useProjectName,
},
active: proUserInfo.projectUserInfo.subDeptType == '1' ? 4 : 1,
subDeptUserInfo: proUserInfo.projectUserInfo,
});
//用户权限菜单
this.getUserMenuList(app.globalData.useProjectId);
this.awaitTask();
},
/**
* 查询功能菜单
* @param {*} proId
*/
getUserMenuList: function (proId) {
findUserMenuList(proId, 'gdgn').then(res => {
if (res.code == 200) {
this.setData({
menuList: res.data
})
}
});
},
goMenu: function (event) {
let _url = event.currentTarget.dataset.url;
if (!_url) {
app.toast("正在建设中...")
return false;
}
wx.setStorageSync('nav-menu', "xmgl");
wx.redirectTo({
url: _url
})
//跳转到其它小程序
//wx.navigateToMiniProgram({
// appId: 'wx7c39a25db91228f7',
// path: 'pages/tabbar/order-new/index?type=0'
//})
},
// 底部导航
onChange(event) {
// event.detail 的值为当前选中项的索引
this.setData({
active: event.detail
});
},
//跳转到项目概况
XMGK: function () {
wx.setStorageSync('nav-menu', "xmgk");
wx.redirectTo({
url: '../project_info/index'
})
},
//跳转到安全管理
AQGL: function () {
wx.setStorageSync('nav-menu', "aqgl");
wx.redirectTo({
url: '../project_safety/index'
})
},
//跳转到质量管理
ZLGL: function () {
wx.setStorageSync('nav-menu', "zlgl");
wx.redirectTo({
url: '../project_quality/index'
})
},
//跳转到进度管理
JDGL: function () {
wx.setStorageSync('nav-menu', "xmgl");
wx.redirectTo({
url: '../project_schedule/list/index'
})
},
/**
* 统计代办
*/
awaitTask() {
let param = "proId=" + app.globalData.useProjectId;
findMyTask(param).then(res => {
if (res.code == 200) {
let proUserInfo = this.data.subDeptUserInfo;
this.setData({
todoDb: proUserInfo.subDeptType == "1" ? (res.data.dwsh + res.data.rysh) : res.data.todo,
fbdwDB: res.data.dwsh,
fbrtDB: res.data.rysh,
aqglDb: proUserInfo.subDeptType == "1" ? res.data.aqgl : 0,
zlglDb: proUserInfo.subDeptType == "1" ? res.data.zlgl : 0,
aqyhDB: res.data.aqgl,
zlyhDB: res.data.zlgl,
})
}
});
},
})

View File

@ -1,7 +0,0 @@
{
"usingComponents": {
"van-tabbar": "@vant/weapp/tabbar",
"van-tabbar-item": "@vant/weapp/tabbar-item"
},
"navigationStyle":"custom"
}

View File

@ -1,87 +0,0 @@
<wxs module="format" src="/utils/format.wxs"></wxs>
<view class="header_title">
<view class="header_title_row">
<van-row>
<van-col span="4">
<view class="header_img" bindtap="XMGK">
<image src="/images/left.png"></image>
<text class="header_fh">返回</text>
</view>
</van-col>
<van-col span="3">
<user-infos></user-infos>
</van-col>
<van-col span="10">
<view class="header_name">项目管理</view>
</van-col>
</van-row>
</view>
</view>
<view class="max_content">
<project-select init="{{initData}}" bindchange="onProjectSelect"></project-select>
<view class="gd_max" style="margin-top: 20rpx;">
<van-row class="demo clearfix">
<van-col span="8" wx:for="{{menuList}}" wx:key="unique">
<view class="gd_min" data-id="{{item.menuIdenti}}" data-url="{{item.menuUrl}}" bindtap="goMenu">
<span class="tabNum_active" wx:if="{{item.menuIdenti=='FBDWSH' && fbdwDB>0}}">{{fbdwDB}}</span>
<span class="tabNum_active" wx:if="{{item.menuIdenti=='FBRYSH' && fbrtDB>0}}">{{fbrtDB}}</span>
<span class="tabNum_active" wx:if="{{item.menuIdenti=='AQYHPC' && aqyhDB>0}}">{{aqyhDB}}</span>
<span class="tabNum_active" wx:if="{{item.menuIdenti=='ZLYHPC' && zlyhDB>0}}">{{zlyhDB}}</span>
<image src="{{format.httpImg(item.menuImg)}}"></image>
<view>{{item.menuName}}</view>
</view>
</van-col>
</van-row>
</view>
</view>
<van-tabbar wx:if="{{subDeptUserInfo.subDeptType=='1'}}" active="{{ active }}" bind:change="onChange" active-color="#ffffff" inactive-color="#7d95d6">
<van-tabbar-item bindtap="XMGK">
<image slot="icon" src="/images/footer_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
项目概况
</van-tabbar-item>
<van-tabbar-item bindtap="AQGL">
<image slot="icon" src="/images/footer_7.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_7.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
安全管理
<span class="tabNum" wx:if="{{aqglDB>0}}">{{aqglDB}}</span>
</van-tabbar-item>
<van-tabbar-item bindtap="ZLGL">
<image slot="icon" src="/images/footer_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
质量管理
<span class="tabNum" wx:if="{{zhglDB>0}}">{{zhglDB}}</span>
</van-tabbar-item>
<van-tabbar-item bindtap="JDGL">
<image slot="icon" src="/images/footer_6.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_6.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
进度管理
</van-tabbar-item>
<van-tabbar-item>
<image slot="icon" src="/images/footer_1.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_1.png" mode="aspectFit" style="width:40rpx; height:40rpx;" />
项目管理
<span class="tabNum" wx:if="{{todoDb>0}}">{{todoDb}}</span>
</van-tabbar-item>
</van-tabbar>
<van-tabbar wx:if="{{(subDeptUserInfo.subDeptType=='4' || subDeptUserInfo.subDeptType=='5') && subDeptUserInfo.userPost!='4' && subDeptUserInfo.userPost!='5'}}" active="{{ active }}" bind:change="onChange" active-color="#ffffff" inactive-color="#7d95d6">
<van-tabbar-item bindtap="XMGK">
<image slot="icon" src="/images/footer_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_5.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
项目概况
</van-tabbar-item>
<van-tabbar-item>
<image slot="icon" src="/images/footer_1.png" mode="aspectFit" style="width:40rpx; height: 40rpx;" />
<image slot="icon-active" src="/images/foot_1.png" mode="aspectFit" style="width:40rpx; height:40rpx;" />
项目管理
<span class="tabNum" wx:if="{{todoDb>0}}">{{todoDb}}</span>
</van-tabbar-item>
</van-tabbar>

Some files were not shown because too many files have changed in this diff Show More