提交代码
parent
659f828a27
commit
8877bef239
17
pom.xml
17
pom.xml
|
@ -372,6 +372,14 @@
|
|||
<profiles.active>本地服务器环境</profiles.active>
|
||||
<discovery.server-addr>62.234.3.186:8848</discovery.server-addr>
|
||||
</properties>
|
||||
|
||||
</profile>
|
||||
<profile>
|
||||
<id>测试服务器环境</id>
|
||||
<properties>
|
||||
<profiles.active>测试服务器环境</profiles.active>
|
||||
<discovery.server-addr>62.234.3.186:8848</discovery.server-addr>
|
||||
</properties>
|
||||
<!-- 默认环境 -->
|
||||
<activation>
|
||||
<activeByDefault>true</activeByDefault>
|
||||
|
@ -384,14 +392,7 @@
|
|||
<discovery.server-addr>0.0.0.0:8848</discovery.server-addr>
|
||||
</properties>
|
||||
</profile>
|
||||
<profile>
|
||||
<id>测试服务器环境</id>
|
||||
<properties>
|
||||
<profiles.active>测试服务器环境</profiles.active>
|
||||
<discovery.server-addr>62.234.3.186:8848</discovery.server-addr>
|
||||
</properties>
|
||||
</profile>
|
||||
<!-- docker环境打包-->
|
||||
<!-- docker环境打包 -->
|
||||
<profile>
|
||||
<id>docker测试环境1</id>
|
||||
<properties>
|
||||
|
|
|
@ -53,13 +53,16 @@
|
|||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>2.5.15</version>
|
||||
<configuration>
|
||||
<fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
|
@ -68,43 +71,17 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- docker-maven-plugin插件(不带Dockerfile文件) -->
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>1.2.0</version>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<configuration>
|
||||
<!--用于指定镜像名称-->
|
||||
<imageName>${project.build.finalName}</imageName>
|
||||
<imageTags>latest</imageTags>
|
||||
<!--用于指定基础镜像,相当于Dockerfile中的FROM指令-->
|
||||
<baseImage>openjdk:latest</baseImage>
|
||||
<!--相当于Dockerfile的ENTRYPOINT指令-->
|
||||
<entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>
|
||||
<!--是否跳过docker build-->
|
||||
<skipDockerBuild>true</skipDockerBuild>
|
||||
<dockerHost>${configuration.docker-one-Host}</dockerHost>
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>/</targetPath>
|
||||
<!--用于指定需要复制的根目录,${project.build.directory}表示target目录-->
|
||||
<directory>${project.build.directory}</directory>
|
||||
<!--用于指定需要复制的文件。${project.build.finalName}.jar指的是打包后的jar包文件。-->
|
||||
<include>${project.build.finalName}.jar</include>
|
||||
</resource>
|
||||
</resources>
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
<warName>${project.artifactId}</warName>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>build-image</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>build</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<!--如果不设置resource 会导致bootstrap.yml中的@@找不到pom文件中的配置-->
|
||||
<resources>
|
||||
<resource>
|
||||
|
@ -113,5 +90,65 @@
|
|||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
|
||||
<!-- <build>-->
|
||||
<!-- <finalName>${project.artifactId}</finalName>-->
|
||||
<!-- <plugins>-->
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
|
||||
<!-- <executions>-->
|
||||
<!-- <execution>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>repackage</goal>-->
|
||||
<!-- </goals>-->
|
||||
<!-- </execution>-->
|
||||
<!-- </executions>-->
|
||||
<!-- </plugin>-->
|
||||
<!-- <!– docker-maven-plugin插件(不带Dockerfile文件) –>-->
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>com.spotify</groupId>-->
|
||||
<!-- <artifactId>docker-maven-plugin</artifactId>-->
|
||||
<!-- <version>1.2.0</version>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <!–用于指定镜像名称–>-->
|
||||
<!-- <imageName>${project.build.finalName}</imageName>-->
|
||||
<!-- <imageTags>latest</imageTags>-->
|
||||
<!-- <!–用于指定基础镜像,相当于Dockerfile中的FROM指令–>-->
|
||||
<!-- <baseImage>openjdk:latest</baseImage>-->
|
||||
<!-- <!–相当于Dockerfile的ENTRYPOINT指令–>-->
|
||||
<!-- <entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>-->
|
||||
<!-- <!–是否跳过docker build–>-->
|
||||
<!-- <skipDockerBuild>true</skipDockerBuild>-->
|
||||
<!-- <dockerHost>${configuration.docker-one-Host}</dockerHost>-->
|
||||
<!-- <resources>-->
|
||||
<!-- <resource>-->
|
||||
<!-- <targetPath>/</targetPath>-->
|
||||
<!-- <!–用于指定需要复制的根目录,${project.build.directory}表示target目录–>-->
|
||||
<!-- <directory>${project.build.directory}</directory>-->
|
||||
<!-- <!–用于指定需要复制的文件。${project.build.finalName}.jar指的是打包后的jar包文件。–>-->
|
||||
<!-- <include>${project.build.finalName}.jar</include>-->
|
||||
<!-- </resource>-->
|
||||
<!-- </resources>-->
|
||||
<!-- </configuration>-->
|
||||
<!-- <executions>-->
|
||||
<!-- <execution>-->
|
||||
<!-- <id>build-image</id>-->
|
||||
<!-- <phase>package</phase>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>build</goal>-->
|
||||
<!-- </goals>-->
|
||||
<!-- </execution>-->
|
||||
<!-- </executions>-->
|
||||
<!-- </plugin>-->
|
||||
<!-- </plugins>-->
|
||||
<!-- <!–如果不设置resource 会导致bootstrap.yml中的@@找不到pom文件中的配置–>-->
|
||||
<!-- <resources>-->
|
||||
<!-- <resource>-->
|
||||
<!-- <directory>src/main/resources</directory>-->
|
||||
<!-- <filtering>true</filtering>-->
|
||||
<!-- </resource>-->
|
||||
<!-- </resources>-->
|
||||
<!-- </build>-->
|
||||
|
||||
</project>
|
||||
|
|
|
@ -7,8 +7,10 @@ public enum UserTypeEnums {
|
|||
|
||||
ZSRY("00", "正式人员"),
|
||||
LSRY("08", "临时人员"),
|
||||
FBDL("80", "分包代理"),
|
||||
FBRY("81", "分包人员");
|
||||
FBWTDL("80", "分包代理人"),
|
||||
FBXMJL("79", "分包项目经理"),
|
||||
FBBZZZ("78", "分包班组组长"),
|
||||
FBLWRY("77", "分包劳务人员");
|
||||
|
||||
private final String code;
|
||||
private final String info;
|
||||
|
|
|
@ -49,6 +49,11 @@ public class ProProjectInfo extends BaseEntity
|
|||
@Excel(name = "项目类型")
|
||||
private String projectType;
|
||||
|
||||
/**
|
||||
* 项目类型名称
|
||||
*/
|
||||
private String projectTypeName;
|
||||
|
||||
/** 项目等级 */
|
||||
@Excel(name = "项目等级")
|
||||
private String projectLevel;
|
||||
|
@ -550,6 +555,14 @@ public class ProProjectInfo extends BaseEntity
|
|||
this.projectPackage = projectPackage;
|
||||
}
|
||||
|
||||
public String getProjectTypeName() {
|
||||
return projectTypeName;
|
||||
}
|
||||
|
||||
public void setProjectTypeName(String projectTypeName) {
|
||||
this.projectTypeName = projectTypeName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
package com.yanzhu.manage.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.yanzhu.manage.domain.AttendanceUbiData;
|
||||
|
||||
/**
|
||||
|
@ -63,4 +65,17 @@ public interface AttendanceUbiDataMapper
|
|||
List<AttendanceUbiData> queryStatistics(AttendanceUbiData attendanceUbiData);
|
||||
|
||||
List<AttendanceUbiData> queryStatisticsByUserIds(AttendanceUbiData attendanceUbiData);
|
||||
|
||||
/**
|
||||
* 统计今日出勤信息
|
||||
* @param where 查询条件
|
||||
*/
|
||||
List<Map<String,Object>> statsAttendanceDays(AttendanceUbiData where);
|
||||
|
||||
/**
|
||||
* 统计人员出勤信息
|
||||
* @param where 查询条件
|
||||
*/
|
||||
List<Map<String,Object>> statsAttendanceView(AttendanceUbiData where);
|
||||
|
||||
}
|
||||
|
|
|
@ -95,4 +95,9 @@ public interface ProProjectInfoSubdeptsUsersMapper
|
|||
* @return 结果
|
||||
*/
|
||||
public List<Map<String, Object>> findActReProcdefDept(@Param("proId")Long proId, @Param("defType")String defType);
|
||||
|
||||
/**
|
||||
* 统计分包单位在岗人员
|
||||
*/
|
||||
public List<Map<String, Object>> statsSubDeptsUsersByProId(ProProjectInfoSubdeptsUsers where);
|
||||
}
|
||||
|
|
|
@ -40,11 +40,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
eventGuid,inPhoto,outPhoto,comName,projectName,sub_dept_id,sub_dept_name,
|
||||
inTime, outTime, deviceNo, is_del, state, remark, create_by, create_time, update_by, update_time from attendance_ubi_data
|
||||
</sql>
|
||||
|
||||
<sql id="selectAttendanceUbiDataAllVo">
|
||||
select id, comId, projectId, userId, userName, sub_dept_group, sub_dept_group_name, craft_type, craft_post,admitGuid,
|
||||
eventGuid,inPhoto,outPhoto,inData,outData,comName,projectName,sub_dept_id,sub_dept_name,
|
||||
inTime, outTime, deviceNo, is_del, state, remark, create_by, create_time, update_by, update_time from attendance_ubi_data
|
||||
</sql> <select id="selectAttendanceUbiDataList" parameterType="AttendanceUbiData" resultMap="AttendanceUbiDataResult">
|
||||
</sql>
|
||||
|
||||
<select id="selectAttendanceUbiDataList" parameterType="AttendanceUbiData" resultMap="AttendanceUbiDataResult">
|
||||
<include refid="selectAttendanceUbiDataVo"/>
|
||||
<where>
|
||||
<if test="comId != null "> and comId = #{comId}</if>
|
||||
|
@ -63,7 +66,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="deviceNo != null and deviceNo != ''"> and deviceNo = #{deviceNo}</if>
|
||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
<if test="state != null "> and state = #{state}</if>
|
||||
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''"> and date(create_time) between #{params.beginTime} and #{params.endTime}</if>
|
||||
</where>
|
||||
order by id desc
|
||||
</select>
|
||||
|
||||
<select id="queryAttendaceInfo" parameterType="AttendanceUbiData" resultMap="AttendanceUbiDataResult">
|
||||
|
@ -217,4 +222,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="statsAttendanceDays" parameterType="AttendanceUbiData" resultType="Map">
|
||||
select u.craft_type as craftType, count(1) as total from attendance_ubi_data d
|
||||
left join pro_project_info_subdepts_users u on u.user_id = d.userId
|
||||
where u.id is not null and u.use_status = '1'
|
||||
<if test="comId != null "> and d.comId = #{comId}</if>
|
||||
<if test="projectId != null "> and d.projectId = #{projectId}</if>
|
||||
<if test="subDeptId != null "> and d.sub_dept_id = #{subDeptId}</if>
|
||||
<if test="subDeptGroup != null "> and d.sub_dept_group = #{subDeptGroup}</if>
|
||||
<if test="params.createTime != null and params.createTime != ''"> and date(d.create_time) = #{params.createTime}</if>
|
||||
group by u.craft_type
|
||||
</select>
|
||||
|
||||
<select id="statsAttendanceView" parameterType="AttendanceUbiData" resultType="Map">
|
||||
select DATE_FORMAT(days.attendanceTime, '%m-%d') as attendanceTime,days.total from(
|
||||
select date(d.inTime) as attendanceTime, count(1) as total from attendance_ubi_data d
|
||||
where 1=0
|
||||
<if test="comId != null "> and d.comId = #{comId}</if>
|
||||
<if test="projectId != null "> and d.projectId = #{projectId}</if>
|
||||
<if test="subDeptId != null "> and d.sub_dept_id = #{subDeptId}</if>
|
||||
<if test="subDeptGroup != null "> and d.sub_dept_group = #{subDeptGroup}</if>
|
||||
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''"> and date(d.create_time) between #{params.beginTime} and #{params.endTime}</if>
|
||||
group by date(d.inTime)
|
||||
order by date(d.inTime)
|
||||
)days
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -14,6 +14,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="projectCode" column="project_code" />
|
||||
<result property="simpleName" column="simple_name" />
|
||||
<result property="projectType" column="project_type" />
|
||||
<result property="projectTypeName" column="project_type_name" />
|
||||
<result property="projectLevel" column="project_level" />
|
||||
<result property="projectRegional" column="project_regional" />
|
||||
<result property="projectPackage" column="project_package" />
|
||||
|
@ -24,13 +25,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="projectPersonPhone" column="project_person_phone" />
|
||||
<result property="longitude" column="longitude" />
|
||||
<result property="latitude" column="latitude" />
|
||||
|
||||
<result property="techLeader" column="tech_leader" />
|
||||
<result property="techLeaderPhone" column="tech_leader_phone" />
|
||||
<result property="province" column="province" />
|
||||
<result property="city" column="city" />
|
||||
<result property="district" column="district" />
|
||||
|
||||
<result property="projectTimeLimit" column="project_time_limit" />
|
||||
<result property="totalInvestment" column="total_investment" />
|
||||
<result property="floorArea" column="floor_area" />
|
||||
|
@ -89,22 +88,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<select id="selectProProjectInfoList" parameterType="ProProjectInfo" resultMap="ProProjectInfoResult">
|
||||
<include refid="selectProProjectInfoVo"/>
|
||||
<if test="currentUserId != null "> left join pro_project_info_users pu on pu.project_id = pi.id</if>
|
||||
<if test="currentUserId != null "> left join pro_project_info_users pu on pu.project_id = pi.id </if>
|
||||
<if test="currentUserId != null "> left join pro_project_info_subdepts_users psu on psu.project_id = pi.id </if>
|
||||
<where>
|
||||
<if test="comId != null "> and pi.com_id = #{comId}</if>
|
||||
<if test="disDeptId != null "> and pi.dis_dept_id = #{disDeptId}</if>
|
||||
<if test="activeComId != null "> and pi.com_id = #{activeComId}</if>
|
||||
<if test="currentUserId != null"> and pu.user_id = #{currentUserId} and pu.use_status='1' and pu.is_del=0</if>
|
||||
<if test="currentUserId != null"> and ((pu.user_id = #{currentUserId} and pu.use_status='1' and pu.is_del=0) or (psu.user_id = #{currentUserId} and approve_status <![CDATA[ >= ]]> 100 and psu.user_id = #{currentUserId} and psu.use_status='1' and psu.is_del=0))</if>
|
||||
<if test="projectName != null and projectName != ''"> and pi.project_name like concat('%', #{projectName}, '%')</if>
|
||||
<if test="projectCode != null and projectCode != ''"> and pi.project_code = #{projectCode}</if>
|
||||
<if test="simpleName != null and simpleName != ''"> and pi.simple_name like concat('%', #{simpleName}, '%')</if>
|
||||
|
||||
<if test="techLeader != null and techLeader != ''"> and pi.tech_leader like concat('%', #{techLeader}, '%')</if>
|
||||
<if test="techLeaderPhone != null and techLeaderPhone != ''"> and pi.tech_leader_phone like concat('%', #{techLeaderPhone}, '%')</if>
|
||||
<if test="province != null and province != ''"> and pi.province like concat('%', #{province}, '%')</if>
|
||||
<if test="city != null and city != ''"> and pi.city like concat('%', #{city}, '%')</if>
|
||||
<if test="district != null and district != ''"> and pi.district like concat('%', #{district}, '%')</if>
|
||||
|
||||
<if test="projectType != null and projectType != ''"> and pi.project_type = #{projectType}</if>
|
||||
<if test="projectLevel != null and projectLevel != ''"> and pi.project_level = #{projectLevel}</if>
|
||||
<if test="projectPerson != null and projectPerson != ''"> and pi.project_person = #{projectPerson}</if>
|
||||
|
@ -118,7 +116,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<select id="selectProProjectInfoById" parameterType="Long" resultMap="ProProjectInfoResult">
|
||||
select pi.id, pi.com_id, sd.dept_name as com_name, pi.dis_dept_id,sd2.dept_name dis_dept_name, pi.project_name,
|
||||
pi.project_code, pi.simple_name, pi.project_type, pi.project_level, pi.project_regional, pi.project_package, pi.project_address, pi.project_nature,
|
||||
pi.project_code, pi.simple_name, pi.project_type, sdd1.dict_label as project_type_name, pi.project_level, pi.project_regional, pi.project_package, pi.project_address, pi.project_nature,
|
||||
pi.tech_leader,pi.tech_leader_phone,pi.province,pi.city,pi.district,
|
||||
pi.licence_number, pi.project_person, pi.project_person_phone, pi.longitude, pi.latitude, pi.project_time_limit, pi.total_investment,
|
||||
pi.floor_area, pi.total_output_value, pi.planned_completion_time, pi.scheduled_start_time, pi.actual_operating_time, pi.actual_completion_time,
|
||||
|
@ -131,6 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join sys_dept sd2 on sd2.dept_id = pi.dis_dept_id
|
||||
left join pro_project_info_depts pd on pi.id=pd.project_id
|
||||
left join pro_project_info_setting ps on pi.id=ps.project_id
|
||||
left join sys_dict_data sdd1 on sdd1.dict_value = pi.project_type and sdd1.dict_type='pro_project_type'
|
||||
where pi.id = #{id}
|
||||
</select>
|
||||
|
||||
|
|
|
@ -68,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="loginIp" column="login_ip" />
|
||||
<result property="loginDate" column="login_date" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectProProjectInfoSubdeptsUsersVo">
|
||||
SELECT psu.id, psu.par_id, psu.com_id, psu.project_id, pi.project_name, psu.sub_dept_id, psu.sub_dept_type, dic3.dict_label as sub_dept_type_name, psu.sub_dept_name, psu.sub_dept_power_path, psu.user_id, psu.sub_dept_group,
|
||||
psu.sub_dept_group_name, psu.user_post, psu.craft_type, psu.craft_post, psu.edu_status, psu.edu_file_path, psu.edu_sign_path, psu.edu_date, psu.approve_status,
|
||||
|
@ -314,4 +315,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where rp.SUSPENSION_STATE_ = 1 and PROJ_ID_ = #{proId} and TYPE_ = #{defType} order by SORT_ desc
|
||||
</select>
|
||||
|
||||
<select id="statsSubDeptsUsersByProId" parameterType="ProProjectInfoSubdeptsUsers" resultType="Map">
|
||||
select u.craft_type as craftType, u.use_status as useStatus,count(1) as total
|
||||
from pro_project_info_subdepts_users u
|
||||
where u.approve_status <![CDATA[ >= ]]> 100
|
||||
<if test="comId != null "> and u.com_id = #{comId}</if>
|
||||
<if test="parId != null "> and u.par_id = #{parId}</if>
|
||||
<if test="projectId != null "> and u.project_id = #{projectId}</if>
|
||||
<if test="subDeptId != null "> and u.sub_dept_id = #{subDeptId}</if>
|
||||
<if test="subDeptType != null and subDeptType != ''"> and u.sub_dept_type = #{subDeptType}</if>
|
||||
<if test="subDeptGroup != null "> and u.sub_dept_group = #{subDeptGroup}</if>
|
||||
group by u.craft_type,u.use_status
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -49,8 +49,9 @@ public class TokenService
|
|||
public Map<String, Object> createToken(LoginUser loginUser)
|
||||
{
|
||||
String token = IdUtils.fastUUID();
|
||||
Long userId = loginUser.getSysUser().getUserId();
|
||||
String userName = loginUser.getSysUser().getUserName();
|
||||
SysUser user = loginUser.getSysUser();
|
||||
Long userId = user.getUserId();
|
||||
String userName = user.getUserName();
|
||||
loginUser.setToken(token);
|
||||
loginUser.setUserid(userId);
|
||||
loginUser.setUsername(userName);
|
||||
|
@ -65,6 +66,9 @@ public class TokenService
|
|||
|
||||
// 接口返回信息
|
||||
Map<String, Object> rspMap = new HashMap<String, Object>();
|
||||
rspMap.put("access_uid", userId);
|
||||
rspMap.put("access_type", user.getUserType());
|
||||
rspMap.put("access_role", user.getRoles());
|
||||
rspMap.put("access_token", JwtUtils.createToken(claimsMap));
|
||||
rspMap.put("expires_in", expireTime);
|
||||
return rspMap;
|
||||
|
@ -93,6 +97,7 @@ public class TokenService
|
|||
|
||||
// 接口返回信息
|
||||
Map<String, Object> rspMap = new HashMap<String, Object>();
|
||||
rspMap.put("access_uid", userId);
|
||||
rspMap.put("access_type", user.getUserType());
|
||||
rspMap.put("access_role", user.getRoles());
|
||||
rspMap.put("access_token", JwtUtils.createToken(claimsMap));
|
||||
|
|
|
@ -91,11 +91,14 @@
|
|||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>2.5.15</version>
|
||||
<configuration>
|
||||
<fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
|
@ -104,44 +107,18 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- docker-maven-plugin插件(不带Dockerfile文件) -->
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>1.2.0</version>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<configuration>
|
||||
<!--用于指定镜像名称-->
|
||||
<imageName>${project.build.finalName}</imageName>
|
||||
<imageTags>latest</imageTags>
|
||||
<!--用于指定基础镜像,相当于Dockerfile中的FROM指令-->
|
||||
<baseImage>openjdk:latest</baseImage>
|
||||
<!--相当于Dockerfile的ENTRYPOINT指令-->
|
||||
<entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>
|
||||
<!--是否跳过docker build-->
|
||||
<skipDockerBuild>true</skipDockerBuild>
|
||||
<dockerHost>${configuration.docker-two-Host}</dockerHost>
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>/</targetPath>
|
||||
<!--用于指定需要复制的根目录,${project.build.directory}表示target目录-->
|
||||
<directory>${project.build.directory}</directory>
|
||||
<!--用于指定需要复制的文件。${project.build.finalName}.jar指的是打包后的jar包文件。-->
|
||||
<include>${project.build.finalName}.jar</include>
|
||||
</resource>
|
||||
</resources>
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
<warName>${project.artifactId}</warName>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>build-image</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>build</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<!--如果不设置resource 会导致application.yml中的@@找不到pom文件中的配置-->
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<!--如果不设置resource 会导致bootstrap.yml中的@@找不到pom文件中的配置-->
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
|
@ -150,4 +127,64 @@
|
|||
</resources>
|
||||
</build>
|
||||
|
||||
<!-- <build>-->
|
||||
<!-- <finalName>${project.artifactId}</finalName>-->
|
||||
<!-- <plugins>-->
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
|
||||
<!-- <executions>-->
|
||||
<!-- <execution>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>repackage</goal>-->
|
||||
<!-- </goals>-->
|
||||
<!-- </execution>-->
|
||||
<!-- </executions>-->
|
||||
<!-- </plugin>-->
|
||||
<!-- <!– docker-maven-plugin插件(不带Dockerfile文件) –>-->
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>com.spotify</groupId>-->
|
||||
<!-- <artifactId>docker-maven-plugin</artifactId>-->
|
||||
<!-- <version>1.2.0</version>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <!–用于指定镜像名称–>-->
|
||||
<!-- <imageName>${project.build.finalName}</imageName>-->
|
||||
<!-- <imageTags>latest</imageTags>-->
|
||||
<!-- <!–用于指定基础镜像,相当于Dockerfile中的FROM指令–>-->
|
||||
<!-- <baseImage>openjdk:latest</baseImage>-->
|
||||
<!-- <!–相当于Dockerfile的ENTRYPOINT指令–>-->
|
||||
<!-- <entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>-->
|
||||
<!-- <!–是否跳过docker build–>-->
|
||||
<!-- <skipDockerBuild>true</skipDockerBuild>-->
|
||||
<!-- <dockerHost>${configuration.docker-two-Host}</dockerHost>-->
|
||||
<!-- <resources>-->
|
||||
<!-- <resource>-->
|
||||
<!-- <targetPath>/</targetPath>-->
|
||||
<!-- <!–用于指定需要复制的根目录,${project.build.directory}表示target目录–>-->
|
||||
<!-- <directory>${project.build.directory}</directory>-->
|
||||
<!-- <!–用于指定需要复制的文件。${project.build.finalName}.jar指的是打包后的jar包文件。–>-->
|
||||
<!-- <include>${project.build.finalName}.jar</include>-->
|
||||
<!-- </resource>-->
|
||||
<!-- </resources>-->
|
||||
<!-- </configuration>-->
|
||||
<!-- <executions>-->
|
||||
<!-- <execution>-->
|
||||
<!-- <id>build-image</id>-->
|
||||
<!-- <phase>package</phase>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>build</goal>-->
|
||||
<!-- </goals>-->
|
||||
<!-- </execution>-->
|
||||
<!-- </executions>-->
|
||||
<!-- </plugin>-->
|
||||
<!-- </plugins>-->
|
||||
<!-- <!–如果不设置resource 会导致application.yml中的@@找不到pom文件中的配置–>-->
|
||||
<!-- <resources>-->
|
||||
<!-- <resource>-->
|
||||
<!-- <directory>src/main/resources</directory>-->
|
||||
<!-- <filtering>true</filtering>-->
|
||||
<!-- </resource>-->
|
||||
<!-- </resources>-->
|
||||
<!-- </build>-->
|
||||
|
||||
</project>
|
||||
|
|
|
@ -69,11 +69,14 @@
|
|||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>2.5.15</version>
|
||||
<configuration>
|
||||
<fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
|
@ -82,43 +85,17 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- docker-maven-plugin插件(不带Dockerfile文件) -->
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>1.2.0</version>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<configuration>
|
||||
<!--用于指定镜像名称-->
|
||||
<imageName>${project.build.finalName}</imageName>
|
||||
<imageTags>latest</imageTags>
|
||||
<!--用于指定基础镜像,相当于Dockerfile中的FROM指令-->
|
||||
<baseImage>openjdk:latest</baseImage>
|
||||
<!--相当于Dockerfile的ENTRYPOINT指令-->
|
||||
<entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>
|
||||
<!--是否跳过docker build-->
|
||||
<skipDockerBuild>true</skipDockerBuild>
|
||||
<dockerHost>${configuration.docker-one-Host}</dockerHost>
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>/</targetPath>
|
||||
<!--用于指定需要复制的根目录,${project.build.directory}表示target目录-->
|
||||
<directory>${project.build.directory}</directory>
|
||||
<!--用于指定需要复制的文件。${project.build.finalName}.jar指的是打包后的jar包文件。-->
|
||||
<include>${project.build.finalName}.jar</include>
|
||||
</resource>
|
||||
</resources>
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
<warName>${project.artifactId}</warName>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>build-image</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>build</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<!--如果不设置resource 会导致bootstrap.yml中的@@找不到pom文件中的配置-->
|
||||
<resources>
|
||||
<resource>
|
||||
|
@ -127,5 +104,65 @@
|
|||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
|
||||
<!-- <build>-->
|
||||
<!-- <finalName>${project.artifactId}</finalName>-->
|
||||
<!-- <plugins>-->
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
|
||||
<!-- <executions>-->
|
||||
<!-- <execution>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>repackage</goal>-->
|
||||
<!-- </goals>-->
|
||||
<!-- </execution>-->
|
||||
<!-- </executions>-->
|
||||
<!-- </plugin>-->
|
||||
<!-- <!– docker-maven-plugin插件(不带Dockerfile文件) –>-->
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>com.spotify</groupId>-->
|
||||
<!-- <artifactId>docker-maven-plugin</artifactId>-->
|
||||
<!-- <version>1.2.0</version>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <!–用于指定镜像名称–>-->
|
||||
<!-- <imageName>${project.build.finalName}</imageName>-->
|
||||
<!-- <imageTags>latest</imageTags>-->
|
||||
<!-- <!–用于指定基础镜像,相当于Dockerfile中的FROM指令–>-->
|
||||
<!-- <baseImage>openjdk:latest</baseImage>-->
|
||||
<!-- <!–相当于Dockerfile的ENTRYPOINT指令–>-->
|
||||
<!-- <entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>-->
|
||||
<!-- <!–是否跳过docker build–>-->
|
||||
<!-- <skipDockerBuild>true</skipDockerBuild>-->
|
||||
<!-- <dockerHost>${configuration.docker-one-Host}</dockerHost>-->
|
||||
<!-- <resources>-->
|
||||
<!-- <resource>-->
|
||||
<!-- <targetPath>/</targetPath>-->
|
||||
<!-- <!–用于指定需要复制的根目录,${project.build.directory}表示target目录–>-->
|
||||
<!-- <directory>${project.build.directory}</directory>-->
|
||||
<!-- <!–用于指定需要复制的文件。${project.build.finalName}.jar指的是打包后的jar包文件。–>-->
|
||||
<!-- <include>${project.build.finalName}.jar</include>-->
|
||||
<!-- </resource>-->
|
||||
<!-- </resources>-->
|
||||
<!-- </configuration>-->
|
||||
<!-- <executions>-->
|
||||
<!-- <execution>-->
|
||||
<!-- <id>build-image</id>-->
|
||||
<!-- <phase>package</phase>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>build</goal>-->
|
||||
<!-- </goals>-->
|
||||
<!-- </execution>-->
|
||||
<!-- </executions>-->
|
||||
<!-- </plugin>-->
|
||||
<!-- </plugins>-->
|
||||
<!-- <!–如果不设置resource 会导致bootstrap.yml中的@@找不到pom文件中的配置–>-->
|
||||
<!-- <resources>-->
|
||||
<!-- <resource>-->
|
||||
<!-- <directory>src/main/resources</directory>-->
|
||||
<!-- <filtering>true</filtering>-->
|
||||
<!-- </resource>-->
|
||||
<!-- </resources>-->
|
||||
<!-- </build>-->
|
||||
|
||||
</project>
|
|
@ -114,11 +114,14 @@
|
|||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>2.5.15</version>
|
||||
<configuration>
|
||||
<fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
|
@ -127,44 +130,18 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- docker-maven-plugin插件(不带Dockerfile文件) -->
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>1.2.0</version>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<configuration>
|
||||
<!--用于指定镜像名称-->
|
||||
<imageName>${project.build.finalName}</imageName>
|
||||
<imageTags>latest</imageTags>
|
||||
<!--用于指定基础镜像,相当于Dockerfile中的FROM指令-->
|
||||
<baseImage>openjdk:latest</baseImage>
|
||||
<!--相当于Dockerfile的ENTRYPOINT指令-->
|
||||
<entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>
|
||||
<!--是否跳过docker build-->
|
||||
<skipDockerBuild>true</skipDockerBuild>
|
||||
<dockerHost>${configuration.docker-two-Host}</dockerHost>
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>/</targetPath>
|
||||
<!--用于指定需要复制的根目录,${project.build.directory}表示target目录-->
|
||||
<directory>${project.build.directory}</directory>
|
||||
<!--用于指定需要复制的文件。${project.build.finalName}.jar指的是打包后的jar包文件。-->
|
||||
<include>${project.build.finalName}.jar</include>
|
||||
</resource>
|
||||
</resources>
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
<warName>${project.artifactId}</warName>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>build-image</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>build</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<!--如果不设置resource 会导致application.yml中的@@找不到pom文件中的配置-->
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<!--如果不设置resource 会导致bootstrap.yml中的@@找不到pom文件中的配置-->
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
|
@ -173,4 +150,64 @@
|
|||
</resources>
|
||||
</build>
|
||||
|
||||
<!-- <build>-->
|
||||
<!-- <finalName>${project.artifactId}</finalName>-->
|
||||
<!-- <plugins>-->
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
|
||||
<!-- <executions>-->
|
||||
<!-- <execution>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>repackage</goal>-->
|
||||
<!-- </goals>-->
|
||||
<!-- </execution>-->
|
||||
<!-- </executions>-->
|
||||
<!-- </plugin>-->
|
||||
<!-- <!– docker-maven-plugin插件(不带Dockerfile文件) –>-->
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>com.spotify</groupId>-->
|
||||
<!-- <artifactId>docker-maven-plugin</artifactId>-->
|
||||
<!-- <version>1.2.0</version>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <!–用于指定镜像名称–>-->
|
||||
<!-- <imageName>${project.build.finalName}</imageName>-->
|
||||
<!-- <imageTags>latest</imageTags>-->
|
||||
<!-- <!–用于指定基础镜像,相当于Dockerfile中的FROM指令–>-->
|
||||
<!-- <baseImage>openjdk:latest</baseImage>-->
|
||||
<!-- <!–相当于Dockerfile的ENTRYPOINT指令–>-->
|
||||
<!-- <entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>-->
|
||||
<!-- <!–是否跳过docker build–>-->
|
||||
<!-- <skipDockerBuild>true</skipDockerBuild>-->
|
||||
<!-- <dockerHost>${configuration.docker-two-Host}</dockerHost>-->
|
||||
<!-- <resources>-->
|
||||
<!-- <resource>-->
|
||||
<!-- <targetPath>/</targetPath>-->
|
||||
<!-- <!–用于指定需要复制的根目录,${project.build.directory}表示target目录–>-->
|
||||
<!-- <directory>${project.build.directory}</directory>-->
|
||||
<!-- <!–用于指定需要复制的文件。${project.build.finalName}.jar指的是打包后的jar包文件。–>-->
|
||||
<!-- <include>${project.build.finalName}.jar</include>-->
|
||||
<!-- </resource>-->
|
||||
<!-- </resources>-->
|
||||
<!-- </configuration>-->
|
||||
<!-- <executions>-->
|
||||
<!-- <execution>-->
|
||||
<!-- <id>build-image</id>-->
|
||||
<!-- <phase>package</phase>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>build</goal>-->
|
||||
<!-- </goals>-->
|
||||
<!-- </execution>-->
|
||||
<!-- </executions>-->
|
||||
<!-- </plugin>-->
|
||||
<!-- </plugins>-->
|
||||
<!-- <!–如果不设置resource 会导致application.yml中的@@找不到pom文件中的配置–>-->
|
||||
<!-- <resources>-->
|
||||
<!-- <resource>-->
|
||||
<!-- <directory>src/main/resources</directory>-->
|
||||
<!-- <filtering>true</filtering>-->
|
||||
<!-- </resource>-->
|
||||
<!-- </resources>-->
|
||||
<!-- </build>-->
|
||||
|
||||
</project>
|
|
@ -188,7 +188,7 @@ public class FlowBusinessKeyController extends BaseController {
|
|||
if(CollectionUtils.isNotEmpty(list)){
|
||||
data.put("todo",list.size());
|
||||
}else{
|
||||
data.put("todo",5);
|
||||
data.put("todo",0);
|
||||
}
|
||||
return success(data);
|
||||
}
|
||||
|
|
|
@ -172,13 +172,13 @@
|
|||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>2.5.15</version>
|
||||
<configuration>
|
||||
<includeSystemScope>true</includeSystemScope>
|
||||
<fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
|
@ -188,44 +188,18 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- docker-maven-plugin插件(不带Dockerfile文件) -->
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>1.2.0</version>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<configuration>
|
||||
<!--用于指定镜像名称-->
|
||||
<imageName>${project.build.finalName}</imageName>
|
||||
<imageTags>latest</imageTags>
|
||||
<!--用于指定基础镜像,相当于Dockerfile中的FROM指令-->
|
||||
<baseImage>openjdk:latest</baseImage>
|
||||
<!--相当于Dockerfile的ENTRYPOINT指令-->
|
||||
<entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>
|
||||
<!--是否跳过docker build-->
|
||||
<skipDockerBuild>true</skipDockerBuild>
|
||||
<dockerHost>${configuration.docker-two-Host}</dockerHost>
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>/</targetPath>
|
||||
<!--用于指定需要复制的根目录,${project.build.directory}表示target目录-->
|
||||
<directory>${project.build.directory}</directory>
|
||||
<!--用于指定需要复制的文件。${project.build.finalName}.jar指的是打包后的jar包文件。-->
|
||||
<include>${project.build.finalName}.jar</include>
|
||||
</resource>
|
||||
</resources>
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
<warName>${project.artifactId}</warName>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>build-image</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>build</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<!--如果不设置resource 会导致application.yml中的@@找不到pom文件中的配置-->
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<!--如果不设置resource 会导致bootstrap.yml中的@@找不到pom文件中的配置-->
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
|
@ -234,4 +208,67 @@
|
|||
</resources>
|
||||
</build>
|
||||
|
||||
<!-- <build>-->
|
||||
<!-- <finalName>${project.artifactId}</finalName>-->
|
||||
<!-- <plugins>-->
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <includeSystemScope>true</includeSystemScope>-->
|
||||
<!-- </configuration>-->
|
||||
<!-- <executions>-->
|
||||
<!-- <execution>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>repackage</goal>-->
|
||||
<!-- </goals>-->
|
||||
<!-- </execution>-->
|
||||
<!-- </executions>-->
|
||||
<!-- </plugin>-->
|
||||
<!-- <!– docker-maven-plugin插件(不带Dockerfile文件) –>-->
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>com.spotify</groupId>-->
|
||||
<!-- <artifactId>docker-maven-plugin</artifactId>-->
|
||||
<!-- <version>1.2.0</version>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <!–用于指定镜像名称–>-->
|
||||
<!-- <imageName>${project.build.finalName}</imageName>-->
|
||||
<!-- <imageTags>latest</imageTags>-->
|
||||
<!-- <!–用于指定基础镜像,相当于Dockerfile中的FROM指令–>-->
|
||||
<!-- <baseImage>openjdk:latest</baseImage>-->
|
||||
<!-- <!–相当于Dockerfile的ENTRYPOINT指令–>-->
|
||||
<!-- <entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>-->
|
||||
<!-- <!–是否跳过docker build–>-->
|
||||
<!-- <skipDockerBuild>true</skipDockerBuild>-->
|
||||
<!-- <dockerHost>${configuration.docker-two-Host}</dockerHost>-->
|
||||
<!-- <resources>-->
|
||||
<!-- <resource>-->
|
||||
<!-- <targetPath>/</targetPath>-->
|
||||
<!-- <!–用于指定需要复制的根目录,${project.build.directory}表示target目录–>-->
|
||||
<!-- <directory>${project.build.directory}</directory>-->
|
||||
<!-- <!–用于指定需要复制的文件。${project.build.finalName}.jar指的是打包后的jar包文件。–>-->
|
||||
<!-- <include>${project.build.finalName}.jar</include>-->
|
||||
<!-- </resource>-->
|
||||
<!-- </resources>-->
|
||||
<!-- </configuration>-->
|
||||
<!-- <executions>-->
|
||||
<!-- <execution>-->
|
||||
<!-- <id>build-image</id>-->
|
||||
<!-- <phase>package</phase>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>build</goal>-->
|
||||
<!-- </goals>-->
|
||||
<!-- </execution>-->
|
||||
<!-- </executions>-->
|
||||
<!-- </plugin>-->
|
||||
<!-- </plugins>-->
|
||||
<!-- <!–如果不设置resource 会导致application.yml中的@@找不到pom文件中的配置–>-->
|
||||
<!-- <resources>-->
|
||||
<!-- <resource>-->
|
||||
<!-- <directory>src/main/resources</directory>-->
|
||||
<!-- <filtering>true</filtering>-->
|
||||
<!-- </resource>-->
|
||||
<!-- </resources>-->
|
||||
<!-- </build>-->
|
||||
|
||||
</project>
|
|
@ -95,4 +95,16 @@ public class ProProjectInfoDeptsController extends BaseController
|
|||
{
|
||||
return toAjax(proProjectInfoDeptsService.deleteProProjectInfoDeptsByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询参建单位
|
||||
*/
|
||||
@GetMapping("/findAllDepts/{proId}")
|
||||
public AjaxResult remove(@PathVariable("proId") Long proId)
|
||||
{
|
||||
ProProjectInfoDepts query = new ProProjectInfoDepts();
|
||||
query.setProjectId(proId);
|
||||
List<ProProjectInfoDepts> list = proProjectInfoDeptsService.selectProProjectInfoDeptsList(query);
|
||||
return success(list);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import com.yanzhu.common.log.annotation.Log;
|
|||
import com.yanzhu.common.log.enums.BusinessType;
|
||||
import com.yanzhu.common.security.annotation.InnerAuth;
|
||||
import com.yanzhu.common.security.annotation.RequiresPermissions;
|
||||
import com.yanzhu.common.security.utils.SecurityUtils;
|
||||
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers;
|
||||
import com.yanzhu.manage.service.IProProjectInfoSubdeptsUsersService;
|
||||
import com.yanzhu.manage.service.IUniService;
|
||||
|
@ -35,6 +36,7 @@ public class ProProjectInfoSubdeptsUsersController extends BaseController
|
|||
|
||||
@Autowired
|
||||
private IUniService uniService;
|
||||
|
||||
/**
|
||||
* 查询分包单位工人列表
|
||||
*/
|
||||
|
@ -174,4 +176,18 @@ public class ProProjectInfoSubdeptsUsersController extends BaseController
|
|||
return AjaxResult.error(ex.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分包单位人员
|
||||
* @param proId 项目主键
|
||||
*/
|
||||
@GetMapping("/findProSubDeptsUser/{proId}")
|
||||
public AjaxResult findProSubDeptsUser(@PathVariable("proId")Long proId)
|
||||
{
|
||||
ProProjectInfoSubdeptsUsers query = new ProProjectInfoSubdeptsUsers();
|
||||
query.setProjectId(proId);
|
||||
query.setUserId(SecurityUtils.getUserId());
|
||||
List<ProProjectInfoSubdeptsUsers> list = proProjectInfoSubdeptsUsersService.selectProProjectInfoSubdeptsUsersList(query);
|
||||
return success(list);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,85 @@
|
|||
package com.yanzhu.manage.controller.wechat;
|
||||
|
||||
import com.yanzhu.common.core.web.controller.BaseController;
|
||||
import com.yanzhu.common.core.web.domain.AjaxResult;
|
||||
import com.yanzhu.common.redis.service.RedisService;
|
||||
import com.yanzhu.manage.domain.AttendanceUbiData;
|
||||
import com.yanzhu.manage.service.IAttendanceUbiDataService;
|
||||
import com.yanzhu.manage.service.IProProjectInfoSubdeptsUsersService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @version : V1.0
|
||||
* @ClassName: WXAttendanceController
|
||||
* @Description: 人员考勤
|
||||
* @Auther: JiangYuQi
|
||||
* @Date: 2024/12/7 18:03
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/attendance")
|
||||
public class WXAttendanceController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private RedisService redisService;
|
||||
|
||||
@Autowired
|
||||
private IAttendanceUbiDataService attendanceUbiDataService;
|
||||
|
||||
@Autowired
|
||||
private IProProjectInfoSubdeptsUsersService proProjectInfoSubdeptsUsersService;
|
||||
|
||||
/**
|
||||
* 统计劳务人员信息
|
||||
* @param proId 项目主键
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/v1/findSubDeptsUsers/{proId}")
|
||||
public AjaxResult findSubDeptsUsers(@PathVariable("proId") Long proId){
|
||||
List<Map<String, Object>> list = proProjectInfoSubdeptsUsersService.statsSubDeptsUsersByProId(proId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计今日出勤信息
|
||||
* @param proId 项目主键
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/v1/findDaysAttendanceView/{proId}")
|
||||
public AjaxResult findDaysAttendanceView(@PathVariable("proId") Long proId){
|
||||
List<Map<String, Object>> list = attendanceUbiDataService.statsAttendanceDaysByProId(proId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计人员出勤信息
|
||||
* @param proId 项目主键
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/v1/findSubDeptsAttendanceView/{proId}")
|
||||
public AjaxResult findSubDeptsAttendanceView(@PathVariable("proId") Long proId){
|
||||
List<Map<String, Object>> list = attendanceUbiDataService.statsAttendanceViewByProId(proId);
|
||||
Map<String, Object> data = new HashMap<>();
|
||||
data.put("list",list);
|
||||
data.put("user",list.stream().mapToInt((u) -> Integer.valueOf(String.valueOf(u.get("total")))).sum());
|
||||
return AjaxResult.success(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计人员出勤明细
|
||||
* @param proId 项目主键
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/v1/findUsersAttendanceView/{proId}")
|
||||
public AjaxResult findUsersAttendanceView(@PathVariable("proId") Long proId){
|
||||
List<AttendanceUbiData> list = attendanceUbiDataService.findUsersAttendanceView(proId);
|
||||
return AjaxResult.success(list);
|
||||
}
|
||||
}
|
|
@ -2,6 +2,8 @@ package com.yanzhu.manage.service;
|
|||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.yanzhu.manage.domain.AttendanceUbiData;
|
||||
|
||||
/**
|
||||
|
@ -76,4 +78,23 @@ public interface IAttendanceUbiDataService
|
|||
List<AttendanceUbiData> queryStatisticsByUserIds(AttendanceUbiData attendanceUbiData);
|
||||
|
||||
List<AttendanceUbiData> procStatistics(Date inTime, List<AttendanceUbiData> datas, List<AttendanceUbiData> userDatas,boolean updateCraft);
|
||||
|
||||
/**
|
||||
* 统计今日出勤信息
|
||||
* @param proId
|
||||
*/
|
||||
List<Map<String,Object>> statsAttendanceDaysByProId(Long proId);
|
||||
|
||||
/**
|
||||
* 统计人员出勤信息
|
||||
* @param proId
|
||||
*/
|
||||
List<Map<String,Object>> statsAttendanceViewByProId(Long proId);
|
||||
|
||||
/**
|
||||
* 查询人员出勤明细
|
||||
* @param proId
|
||||
*/
|
||||
List<AttendanceUbiData> findUsersAttendanceView(Long proId);
|
||||
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers;
|
|||
import com.yanzhu.manage.domain.SignetFileVo;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 分包单位工人Service接口
|
||||
|
@ -117,4 +118,10 @@ public interface IProProjectInfoSubdeptsUsersService
|
|||
* @return
|
||||
*/
|
||||
List<ProProjectInfoSubdeptsUsers> groupByCraftTypeByAttendance(ProProjectInfoSubdeptsUsers where);
|
||||
|
||||
/**
|
||||
* 统计分包单位在岗人员
|
||||
* @param proId
|
||||
*/
|
||||
List<Map<String,Object>> statsSubDeptsUsersByProId(Long proId);
|
||||
}
|
||||
|
|
|
@ -2,14 +2,21 @@ package com.yanzhu.manage.service.impl;
|
|||
|
||||
import java.util.*;
|
||||
|
||||
import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.A;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.yanzhu.common.core.context.SecurityContextHolder;
|
||||
import com.yanzhu.common.core.enums.ShiFouEnums;
|
||||
import com.yanzhu.common.core.enums.UserTypeEnums;
|
||||
import com.yanzhu.common.core.utils.DateUtils;
|
||||
import com.yanzhu.common.core.utils.StringUtils;
|
||||
import com.yanzhu.common.security.utils.SecurityUtils;
|
||||
import com.yanzhu.manage.domain.AttendanceUbiData;
|
||||
import com.yanzhu.manage.domain.ProProjectInfoSubdeptsUsers;
|
||||
import com.yanzhu.manage.enums.UserPostEnums;
|
||||
import com.yanzhu.manage.mapper.AttendanceUbiDataMapper;
|
||||
import com.yanzhu.manage.mapper.ProProjectInfoSubdeptsUsersMapper;
|
||||
import com.yanzhu.manage.service.IAttendanceUbiDataService;
|
||||
import com.yanzhu.system.api.domain.SysDictData;
|
||||
import com.yanzhu.system.api.domain.SysUser;
|
||||
import com.yanzhu.system.mapper.SysDictDataMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -23,12 +30,16 @@ import org.springframework.stereotype.Service;
|
|||
@Service
|
||||
public class AttendanceUbiDataServiceImpl implements IAttendanceUbiDataService
|
||||
{
|
||||
@Autowired
|
||||
private AttendanceUbiDataMapper attendanceUbiDataMapper;
|
||||
|
||||
|
||||
@Autowired
|
||||
private SysDictDataMapper dictDataMapper;
|
||||
|
||||
@Autowired
|
||||
private AttendanceUbiDataMapper attendanceUbiDataMapper;
|
||||
|
||||
@Autowired
|
||||
private ProProjectInfoSubdeptsUsersMapper proProjectInfoSubdeptsUsersMapper;
|
||||
|
||||
/**
|
||||
* 查询考勤管理
|
||||
*
|
||||
|
@ -195,4 +206,79 @@ public class AttendanceUbiDataServiceImpl implements IAttendanceUbiDataService
|
|||
}
|
||||
return days;
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计今日出勤信息
|
||||
* @param proId
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String,Object>> statsAttendanceDaysByProId(Long proId){
|
||||
AttendanceUbiData attendanceQuery = new AttendanceUbiData();
|
||||
attendanceQuery.setProjectId(proId);
|
||||
SysUser sysUser = SecurityUtils.getLoginUser().getSysUser();
|
||||
if(!Objects.equals(sysUser.getUserType(), UserTypeEnums.ZSRY.getCode()) && !Objects.equals(sysUser.getUserType(),UserTypeEnums.LSRY.getCode())){
|
||||
ProProjectInfoSubdeptsUsers query = new ProProjectInfoSubdeptsUsers();
|
||||
query.setProjectId(proId);
|
||||
query.setUserId(sysUser.getUserId());
|
||||
List<ProProjectInfoSubdeptsUsers> users = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(query);
|
||||
if(StringUtils.isNotEmpty(users)){
|
||||
attendanceQuery.setSubDeptId(users.get(0).getSubDeptId());
|
||||
if(Objects.equals(users.get(0).getUserPost(), UserPostEnums.BZZ.getCode())){
|
||||
attendanceQuery.setSubDeptGroup(users.get(0).getSubDeptGroup());
|
||||
}
|
||||
}
|
||||
}
|
||||
return attendanceUbiDataMapper.statsAttendanceDays(attendanceQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计人员出勤信息
|
||||
* @param proId
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String,Object>> statsAttendanceViewByProId(Long proId){
|
||||
AttendanceUbiData attendanceQuery = new AttendanceUbiData();
|
||||
attendanceQuery.setProjectId(proId);
|
||||
SysUser sysUser = SecurityUtils.getLoginUser().getSysUser();
|
||||
if(!Objects.equals(sysUser.getUserType(), UserTypeEnums.ZSRY.getCode()) && !Objects.equals(sysUser.getUserType(),UserTypeEnums.LSRY.getCode())){
|
||||
ProProjectInfoSubdeptsUsers query = new ProProjectInfoSubdeptsUsers();
|
||||
query.setProjectId(proId);
|
||||
query.setUserId(sysUser.getUserId());
|
||||
List<ProProjectInfoSubdeptsUsers> users = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(query);
|
||||
if(StringUtils.isNotEmpty(users)){
|
||||
attendanceQuery.setSubDeptId(users.get(0).getSubDeptId());
|
||||
if(Objects.equals(users.get(0).getUserPost(), UserPostEnums.BZZ.getCode())){
|
||||
attendanceQuery.setSubDeptGroup(users.get(0).getSubDeptGroup());
|
||||
}
|
||||
}
|
||||
}
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.add(Calendar.DAY_OF_MONTH, -1);
|
||||
params.put("beginTime",DateUtil.format(calendar.getTime(),DateUtils.YYYY_MM_DD));
|
||||
calendar.add(Calendar.DAY_OF_MONTH, -6);
|
||||
params.put("endTime",DateUtil.format(calendar.getTime(),DateUtils.YYYY_MM_DD));
|
||||
attendanceQuery.setParams(params);
|
||||
return attendanceUbiDataMapper.statsAttendanceView(attendanceQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询人员出勤明细
|
||||
* @param proId
|
||||
*/
|
||||
@Override
|
||||
public List<AttendanceUbiData> findUsersAttendanceView(Long proId){
|
||||
AttendanceUbiData attendanceQuery = new AttendanceUbiData();
|
||||
attendanceQuery.setProjectId(proId);
|
||||
attendanceQuery.setUserId(SecurityUtils.getUserId());
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.add(Calendar.DAY_OF_MONTH, -1);
|
||||
params.put("beginTime",DateUtil.format(calendar.getTime(),DateUtils.YYYY_MM_DD));
|
||||
calendar.add(Calendar.DAY_OF_MONTH, -6);
|
||||
params.put("endTime",DateUtil.format(calendar.getTime(),DateUtils.YYYY_MM_DD));
|
||||
attendanceQuery.setParams(params);
|
||||
attendanceQuery.setIsDel(ShiFouEnums.FOU.getCode());
|
||||
return attendanceUbiDataMapper.selectAttendanceUbiDataList(attendanceQuery);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -88,7 +88,7 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
|
|||
SysUser sysUser = new SysUser();
|
||||
sysUser.setUserName(proProjectInfoSubdeptsGroup.getGroupLeaderPhone());
|
||||
sysUser.setNickName(proProjectInfoSubdeptsGroup.getGroupLeaderName());
|
||||
sysUser.setUserType(UserTypeEnums.FBRY.getCode());
|
||||
sysUser.setUserType(UserTypeEnums.FBBZZZ.getCode());
|
||||
sysUser.setCardType(CardTypeEnums.SFZ.getCode());
|
||||
sysUser.setCardCode(proProjectInfoSubdeptsGroup.getGroupLeaderCode());
|
||||
sysUser.setUserPicture(proProjectInfoSubdeptsGroup.getGroupLeaderUserPicture());
|
||||
|
@ -126,7 +126,7 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu
|
|||
SysUser sysUser = new SysUser();
|
||||
sysUser.setUserName(proProjectInfoSubdeptsGroup.getGroupLeaderPhone());
|
||||
sysUser.setNickName(proProjectInfoSubdeptsGroup.getGroupLeaderName());
|
||||
sysUser.setUserType(UserTypeEnums.FBRY.getCode());
|
||||
sysUser.setUserType(UserTypeEnums.FBBZZZ.getCode());
|
||||
sysUser.setCardType(CardTypeEnums.SFZ.getCode());
|
||||
sysUser.setCardCode(proProjectInfoSubdeptsGroup.getGroupLeaderCode());
|
||||
sysUser.setUserPicture(proProjectInfoSubdeptsGroup.getGroupLeaderUserPicture());
|
||||
|
|
|
@ -110,7 +110,7 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
|
|||
SysUser sysUser = new SysUser();
|
||||
sysUser.setUserName(proProjectInfoSubdepts.getSubDeptLeaderPhone());
|
||||
sysUser.setNickName(proProjectInfoSubdepts.getSubDeptLeaderName());
|
||||
sysUser.setUserType(UserTypeEnums.FBDL.getCode());
|
||||
sysUser.setUserType(UserTypeEnums.FBWTDL.getCode());
|
||||
sysUser.setPhonenumber(proProjectInfoSubdepts.getSubDeptLeaderPhone());
|
||||
sysUser.setCardType(CardTypeEnums.SFZ.getCode());
|
||||
sysUser.setCardCode(proProjectInfoSubdepts.getSubDeptLeaderCode());
|
||||
|
@ -200,7 +200,7 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
|
|||
SysUser sysUser = new SysUser();
|
||||
sysUser.setUserName(proProjectInfoSubdepts.getSubDeptLeaderPhone());
|
||||
sysUser.setNickName(proProjectInfoSubdepts.getSubDeptLeaderName());
|
||||
sysUser.setUserType(UserTypeEnums.FBDL.getCode());
|
||||
sysUser.setUserType(UserTypeEnums.FBWTDL.getCode());
|
||||
sysUser.setPhonenumber(proProjectInfoSubdepts.getSubDeptLeaderPhone());
|
||||
sysUser.setCardType(CardTypeEnums.SFZ.getCode());
|
||||
sysUser.setCardCode(proProjectInfoSubdepts.getSubDeptLeaderCode());
|
||||
|
@ -272,7 +272,7 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
|
|||
sysUser.setUserName(proProjectInfoSubdepts.getSubDeptLeaderPhone());
|
||||
sysUser.setNickName(proProjectInfoSubdepts.getSubDeptLeaderName());
|
||||
sysUser.setPhonenumber(proProjectInfoSubdepts.getSubDeptLeaderPhone());
|
||||
sysUser.setUserType(UserTypeEnums.FBDL.getCode());
|
||||
sysUser.setUserType(UserTypeEnums.FBWTDL.getCode());
|
||||
sysUser.setCardType(CardTypeEnums.SFZ.getCode());
|
||||
sysUser.setCardCode(proProjectInfoSubdepts.getSubDeptLeaderCode());
|
||||
sysUser.setUserPicture(proProjectInfoSubdepts.getLeaderUserPicture());
|
||||
|
@ -348,7 +348,7 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept
|
|||
sysUser.setUserName(proProjectInfoSubdepts.getSubDeptLeaderPhone());
|
||||
sysUser.setNickName(proProjectInfoSubdepts.getSubDeptLeaderName());
|
||||
sysUser.setPhonenumber(proProjectInfoSubdepts.getSubDeptLeaderPhone());
|
||||
sysUser.setUserType(UserTypeEnums.FBDL.getCode());
|
||||
sysUser.setUserType(UserTypeEnums.FBWTDL.getCode());
|
||||
sysUser.setCardType(CardTypeEnums.SFZ.getCode());
|
||||
sysUser.setCardCode(proProjectInfoSubdepts.getSubDeptLeaderCode());
|
||||
sysUser.setUserPicture(proProjectInfoSubdepts.getLeaderUserPicture());
|
||||
|
|
|
@ -110,6 +110,15 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
|
|||
proProjectInfoSubdeptsUsers.setSubStep(1L);
|
||||
proProjectInfoSubdeptsUsers.setApproveStatus(ApproveStatus.passed.getCode());
|
||||
SysUser user = proProjectInfoSubdeptsUsers.getUser();
|
||||
if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.WTDL)){
|
||||
user.setUserType(UserTypeEnums.FBWTDL.getCode());
|
||||
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.XMJL)){
|
||||
user.setUserType(UserTypeEnums.FBXMJL.getCode());
|
||||
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.BZZ)){
|
||||
user.setUserType(UserTypeEnums.FBBZZZ.getCode());
|
||||
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.LWGR)){
|
||||
user.setUserType(UserTypeEnums.FBLWRY.getCode());
|
||||
}
|
||||
Long userId= remoteUserService.registerUserInfo(user, SecurityConstants.INNER).getData();
|
||||
proProjectInfoSubdeptsUsers.setUserId(userId);
|
||||
uniService.syncUniUser(userId,proProjectInfoSubdeptsUsers.getProjectId());
|
||||
|
@ -202,7 +211,15 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
|
|||
// 完善人员信息...
|
||||
user.setUserName(proProjectInfoSubdeptsUsers.getPhoneNumber());
|
||||
user.setPhonenumber(proProjectInfoSubdeptsUsers.getPhoneNumber());
|
||||
user.setUserType(UserTypeEnums.FBRY.getCode());
|
||||
if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.WTDL)){
|
||||
user.setUserType(UserTypeEnums.FBWTDL.getCode());
|
||||
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.XMJL)){
|
||||
user.setUserType(UserTypeEnums.FBXMJL.getCode());
|
||||
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.BZZ)){
|
||||
user.setUserType(UserTypeEnums.FBBZZZ.getCode());
|
||||
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.LWGR)){
|
||||
user.setUserType(UserTypeEnums.FBLWRY.getCode());
|
||||
}
|
||||
user.setCardType(CardTypeEnums.SFZ.getCode());
|
||||
user.setSex(StringUtils.judgeGender(user.getCardCode()));
|
||||
user.setCreateBy(DataSourceEnuns.APP.getInfo());
|
||||
|
@ -226,6 +243,18 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
|
|||
proProjectInfoSubdeptsUsers.setUpdateBy(SecurityUtils.getUsername());
|
||||
proProjectInfoSubdeptsUsers.setUpdateTime(DateUtils.getNowDate());
|
||||
SysUser user = proProjectInfoSubdeptsUsers.getUser();
|
||||
// 完善人员信息...
|
||||
if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.WTDL)){
|
||||
user.setUserType(UserTypeEnums.FBWTDL.getCode());
|
||||
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.XMJL)){
|
||||
user.setUserType(UserTypeEnums.FBXMJL.getCode());
|
||||
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.BZZ)){
|
||||
user.setUserType(UserTypeEnums.FBBZZZ.getCode());
|
||||
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.LWGR)){
|
||||
user.setUserType(UserTypeEnums.FBLWRY.getCode());
|
||||
}
|
||||
user.setUpdateBy(SecurityUtils.getUsername());
|
||||
user.setUpdateTime(DateUtils.getNowDate());
|
||||
Long userId = remoteUserService.registerUserInfo(user, SecurityConstants.INNER).getData();
|
||||
proProjectInfoSubdeptsUsers.setUserId(userId);
|
||||
uniService.syncUniUser(userId,proProjectInfoSubdeptsUsers.getProjectId());
|
||||
|
@ -343,7 +372,15 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
|
|||
|
||||
// 完善人员信息
|
||||
user.setUserName(user.getPhonenumber());
|
||||
user.setUserType(UserTypeEnums.FBRY.getCode());
|
||||
if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.WTDL)){
|
||||
user.setUserType(UserTypeEnums.FBWTDL.getCode());
|
||||
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.XMJL)){
|
||||
user.setUserType(UserTypeEnums.FBXMJL.getCode());
|
||||
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.BZZ)){
|
||||
user.setUserType(UserTypeEnums.FBBZZZ.getCode());
|
||||
}else if(Objects.equals(proProjectInfoSubdeptsUsers.getUserPost(),UserPostEnums.LWGR)){
|
||||
user.setUserType(UserTypeEnums.FBLWRY.getCode());
|
||||
}
|
||||
user.setCardType(CardTypeEnums.SFZ.getCode());
|
||||
user.setSex(StringUtils.judgeGender(user.getCardCode()));
|
||||
user.setUpdateBy(DataSourceEnuns.APP.getInfo());
|
||||
|
@ -614,4 +651,27 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu
|
|||
return proProjectInfoSubdeptsUsersMapper.groupByCraftTypeByAttendance(where);
|
||||
}
|
||||
|
||||
/**
|
||||
* 统计分包单位在岗人员
|
||||
* @param proId
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String,Object>> statsSubDeptsUsersByProId(Long proId){
|
||||
ProProjectInfoSubdeptsUsers query = new ProProjectInfoSubdeptsUsers();
|
||||
query.setProjectId(proId);
|
||||
SysUser sysUser = SecurityUtils.getLoginUser().getSysUser();
|
||||
if(!Objects.equals(sysUser.getUserType(),UserTypeEnums.ZSRY.getCode()) && !Objects.equals(sysUser.getUserType(),UserTypeEnums.LSRY.getCode())){
|
||||
query.setUserId(sysUser.getUserId());
|
||||
List<ProProjectInfoSubdeptsUsers> users = proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(query);
|
||||
query.setUserId(null);
|
||||
if(StringUtils.isNotEmpty(users)){
|
||||
query.setSubDeptId(users.get(0).getSubDeptId());
|
||||
if(Objects.equals(users.get(0).getUserPost(),UserPostEnums.BZZ.getCode())){
|
||||
query.setSubDeptGroup(users.get(0).getSubDeptGroup());
|
||||
}
|
||||
}
|
||||
}
|
||||
return proProjectInfoSubdeptsUsersMapper.statsSubDeptsUsersByProId(query);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -94,11 +94,14 @@
|
|||
</dependencies>
|
||||
|
||||
<build>
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>2.5.15</version>
|
||||
<configuration>
|
||||
<fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
|
@ -107,44 +110,18 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<!-- docker-maven-plugin插件(不带Dockerfile文件) -->
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>1.2.0</version>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-war-plugin</artifactId>
|
||||
<version>3.1.0</version>
|
||||
<configuration>
|
||||
<!--用于指定镜像名称-->
|
||||
<imageName>${project.build.finalName}</imageName>
|
||||
<imageTags>latest</imageTags>
|
||||
<!--用于指定基础镜像,相当于Dockerfile中的FROM指令-->
|
||||
<baseImage>openjdk:latest</baseImage>
|
||||
<!--相当于Dockerfile的ENTRYPOINT指令-->
|
||||
<entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>
|
||||
<!--是否跳过docker build-->
|
||||
<skipDockerBuild>true</skipDockerBuild>
|
||||
<dockerHost>${configuration.docker-two-Host}</dockerHost>
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>/</targetPath>
|
||||
<!--用于指定需要复制的根目录,${project.build.directory}表示target目录-->
|
||||
<directory>${project.build.directory}</directory>
|
||||
<!--用于指定需要复制的文件。${project.build.finalName}.jar指的是打包后的jar包文件。-->
|
||||
<include>${project.build.finalName}.jar</include>
|
||||
</resource>
|
||||
</resources>
|
||||
<failOnMissingWebXml>false</failOnMissingWebXml>
|
||||
<warName>${project.artifactId}</warName>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>build-image</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>build</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<!--如果不设置resource 会导致application.yml中的@@找不到pom文件中的配置-->
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<!--如果不设置resource 会导致bootstrap.yml中的@@找不到pom文件中的配置-->
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
|
@ -152,5 +129,65 @@
|
|||
</resource>
|
||||
</resources>
|
||||
</build>
|
||||
|
||||
<!-- <build>-->
|
||||
<!-- <finalName>${project.artifactId}</finalName>-->
|
||||
<!-- <plugins>-->
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>org.springframework.boot</groupId>-->
|
||||
<!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
|
||||
<!-- <executions>-->
|
||||
<!-- <execution>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>repackage</goal>-->
|
||||
<!-- </goals>-->
|
||||
<!-- </execution>-->
|
||||
<!-- </executions>-->
|
||||
<!-- </plugin>-->
|
||||
<!-- <!– docker-maven-plugin插件(不带Dockerfile文件) –>-->
|
||||
<!-- <plugin>-->
|
||||
<!-- <groupId>com.spotify</groupId>-->
|
||||
<!-- <artifactId>docker-maven-plugin</artifactId>-->
|
||||
<!-- <version>1.2.0</version>-->
|
||||
<!-- <configuration>-->
|
||||
<!-- <!–用于指定镜像名称–>-->
|
||||
<!-- <imageName>${project.build.finalName}</imageName>-->
|
||||
<!-- <imageTags>latest</imageTags>-->
|
||||
<!-- <!–用于指定基础镜像,相当于Dockerfile中的FROM指令–>-->
|
||||
<!-- <baseImage>openjdk:latest</baseImage>-->
|
||||
<!-- <!–相当于Dockerfile的ENTRYPOINT指令–>-->
|
||||
<!-- <entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>-->
|
||||
<!-- <!–是否跳过docker build–>-->
|
||||
<!-- <skipDockerBuild>true</skipDockerBuild>-->
|
||||
<!-- <dockerHost>${configuration.docker-two-Host}</dockerHost>-->
|
||||
<!-- <resources>-->
|
||||
<!-- <resource>-->
|
||||
<!-- <targetPath>/</targetPath>-->
|
||||
<!-- <!–用于指定需要复制的根目录,${project.build.directory}表示target目录–>-->
|
||||
<!-- <directory>${project.build.directory}</directory>-->
|
||||
<!-- <!–用于指定需要复制的文件。${project.build.finalName}.jar指的是打包后的jar包文件。–>-->
|
||||
<!-- <include>${project.build.finalName}.jar</include>-->
|
||||
<!-- </resource>-->
|
||||
<!-- </resources>-->
|
||||
<!-- </configuration>-->
|
||||
<!-- <executions>-->
|
||||
<!-- <execution>-->
|
||||
<!-- <id>build-image</id>-->
|
||||
<!-- <phase>package</phase>-->
|
||||
<!-- <goals>-->
|
||||
<!-- <goal>build</goal>-->
|
||||
<!-- </goals>-->
|
||||
<!-- </execution>-->
|
||||
<!-- </executions>-->
|
||||
<!-- </plugin>-->
|
||||
<!-- </plugins>-->
|
||||
<!-- <!–如果不设置resource 会导致application.yml中的@@找不到pom文件中的配置–>-->
|
||||
<!-- <resources>-->
|
||||
<!-- <resource>-->
|
||||
<!-- <directory>src/main/resources</directory>-->
|
||||
<!-- <filtering>true</filtering>-->
|
||||
<!-- </resource>-->
|
||||
<!-- </resources>-->
|
||||
<!-- </build>-->
|
||||
|
||||
</project>
|
|
@ -0,0 +1,35 @@
|
|||
import {
|
||||
request
|
||||
} from '../utils/request'
|
||||
|
||||
// 统计劳务人员信息
|
||||
export function findSubDeptsUsers(proId) {
|
||||
return request({
|
||||
url: '/manage/attendance/v1/findSubDeptsUsers/'+proId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 统计今日出勤信息
|
||||
export function findDaysAttendanceView(proId) {
|
||||
return request({
|
||||
url: '/manage/attendance/v1/findDaysAttendanceView/'+proId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 统计人员出勤信息
|
||||
export function findSubDeptsAttendanceView(proId) {
|
||||
return request({
|
||||
url: '/manage/attendance/v1/findSubDeptsAttendanceView/'+proId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询人员出勤信息
|
||||
export function findUsersAttendanceView(proId) {
|
||||
return request({
|
||||
url: '/manage/attendance/v1/findUsersAttendanceView/'+proId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
|
@ -69,3 +69,11 @@ export function getMaPhoneNumber(data) {
|
|||
})
|
||||
}
|
||||
|
||||
//从缓存获取用户信息
|
||||
export function findUserInfoByCache(){
|
||||
return request({
|
||||
'url': '/system/user/getInfo',
|
||||
'method': 'get'
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
@ -43,6 +43,14 @@ export function findProSubDeptsUserById(id) {
|
|||
})
|
||||
}
|
||||
|
||||
// 查询项目参建单位人员
|
||||
export function findProSubDeptsUserByParams(proId) {
|
||||
return request({
|
||||
url: '/manage/proProjectInfoSubdeptsUsers/findProSubDeptsUser/' + proId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增项目参建单位人员
|
||||
export function registerSubDeptsUsers(data) {
|
||||
return request({
|
||||
|
@ -50,4 +58,20 @@ export function registerSubDeptsUsers(data) {
|
|||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询我的项目信息
|
||||
export function findMyProjectList() {
|
||||
return request({
|
||||
url: '/manage/proProjectInfo/findMyProjectList',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询项目参建单位
|
||||
export function findProjectDepts(proId) {
|
||||
return request({
|
||||
url: '/manage/proProjectInfoDepts/findAllDepts/' + proId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
|
@ -26,15 +26,9 @@ import {
|
|||
App({
|
||||
globalData: {
|
||||
userData: null,
|
||||
paramDeptId: '',
|
||||
useProjectId: '',
|
||||
useProjectName: '',
|
||||
searchProject: {
|
||||
id: "",
|
||||
text: "全部临时项目",
|
||||
projectId: "",
|
||||
projectName: "全部临时项目"
|
||||
},
|
||||
searchProject: {},
|
||||
projectInfoList: [],
|
||||
},
|
||||
|
||||
|
|
|
@ -10,9 +10,8 @@
|
|||
"pages/project_flowable/detailTask/index",
|
||||
"pages/project_flowable/editTask/index",
|
||||
"pages/project_flowable/myProcessIns/index",
|
||||
"pages/project_info/list/index",
|
||||
"pages/project_info/add/index",
|
||||
"pages/project_info/edit/index",
|
||||
"pages/project_info/index",
|
||||
"pages/project_list/index",
|
||||
"pages/project_check/list/index",
|
||||
"pages/project_check/edit/index",
|
||||
"pages/project_check/info/index",
|
||||
|
@ -63,7 +62,8 @@
|
|||
"select-group-position": "./components/select-group-position/index",
|
||||
"van-dropdown-menu": "@vant/weapp/dropdown-menu/index",
|
||||
"van-dropdown-item": "@vant/weapp/dropdown-item/index",
|
||||
"curve-echarts": "pages/components/curve-echarts/index"
|
||||
"curve-echarts": "pages/components/curve-echarts/index",
|
||||
"user-infos": "pages/components/user-infos/index"
|
||||
},
|
||||
"window": {
|
||||
"backgroundTextStyle": "light",
|
||||
|
|
|
@ -95,7 +95,7 @@ Component({
|
|||
var option = {
|
||||
grid: {
|
||||
//图表的位置
|
||||
top: "8%",
|
||||
top: "0%",
|
||||
left: "3%",
|
||||
right: "5%",
|
||||
bottom: "-12%",
|
||||
|
@ -189,7 +189,7 @@ Component({
|
|||
name: {
|
||||
width: 120,
|
||||
color: '#c6d9fa',
|
||||
padding:[0,0,0,10],
|
||||
padding:[0,0,0,5],
|
||||
fontSize:'14',
|
||||
},
|
||||
color:{
|
||||
|
@ -226,8 +226,7 @@ Component({
|
|||
},
|
||||
{
|
||||
type: 'bar',
|
||||
name:legend[0],
|
||||
|
||||
//name:legend[0],
|
||||
stack: '1',
|
||||
legendHoverLink: false,
|
||||
barWidth: 6,
|
||||
|
@ -242,7 +241,7 @@ Component({
|
|||
data: yesProp
|
||||
}, {
|
||||
type: 'bar',
|
||||
name:legend[1],
|
||||
//name:legend[1],
|
||||
stack: '1',
|
||||
legendHoverLink: false,
|
||||
barWidth: 6,
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
// 应用全局配置
|
||||
module.exports = {
|
||||
timeout: 60000,
|
||||
appId: "wx2350a5efb3f28e66",
|
||||
appId: "wx46466c7828eede2b",
|
||||
//baseUrl: 'https:xiangguan.sxyanzhu.com',
|
||||
baseUrl: 'http://127.0.0.1:8080',
|
||||
//baseImgUrl: 'https:xiangguan.sxyanzhu.com/file',
|
||||
baseImgUrl: 'http://127.0.0.1:9300',
|
||||
noSecuritys:['/code','/auth/wxLogin','/auth/getMaOpenId','/auth/getMaPhoneNumber','/auth/maLogin']
|
||||
};
|
|
@ -1,3 +1,4 @@
|
|||
// pages/components/project-select/index.js
|
||||
const app = getApp()
|
||||
Component({
|
||||
/**
|
||||
|
@ -14,7 +15,6 @@ Component({
|
|||
type: String
|
||||
}
|
||||
},
|
||||
|
||||
/**数据监听 */
|
||||
observers: {
|
||||
init: function (val) {
|
||||
|
@ -25,7 +25,6 @@ Component({
|
|||
}
|
||||
},
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
|
@ -34,21 +33,17 @@ Component({
|
|||
index: 0,
|
||||
item: '',
|
||||
columns: [],
|
||||
defaultColumns: [],
|
||||
projectList: [],
|
||||
findProjectValue:"",
|
||||
},
|
||||
|
||||
created() {
|
||||
if (this.data.init && this.data.init.id == "") {
|
||||
this.setData({
|
||||
projectList: this.data.init.concat(app.globalData.projectInfoList)
|
||||
})
|
||||
} else {
|
||||
this.setData({
|
||||
projectList: app.globalData.projectInfoList
|
||||
})
|
||||
}
|
||||
this.setData({
|
||||
projectList: app.globalData.projectInfoList,
|
||||
findProjectValue:"",
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
|
@ -61,7 +56,7 @@ Component({
|
|||
data.forEach((item, i) => {
|
||||
selectColumns.push({
|
||||
id: item.id,
|
||||
text: item.text
|
||||
text: item.projectName
|
||||
});
|
||||
if (initData.id == item.id) {
|
||||
this.setData({
|
||||
|
@ -69,20 +64,40 @@ Component({
|
|||
})
|
||||
}
|
||||
});
|
||||
console.log("default-index=" + this.data.index);
|
||||
this.setData({
|
||||
findProjectValue:"",
|
||||
columns: selectColumns,
|
||||
defaultColumns:selectColumns,
|
||||
show: true
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
//获取搜索的项目名称
|
||||
findProject: function (even) {
|
||||
if(even.detail.value){
|
||||
let list = [];
|
||||
this.data.columns.forEach(item=>{
|
||||
if(item.text.indexOf(even.detail.value)>-1){
|
||||
list.push(item);
|
||||
}
|
||||
});
|
||||
this.setData({
|
||||
columns: list
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
columns: this.data.defaultColumns
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
onClose() {
|
||||
this.setData({
|
||||
show: false
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
onSelectChange(e) {
|
||||
this.setData({
|
||||
item: e.detail.value
|
||||
|
@ -99,5 +114,13 @@ Component({
|
|||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 重新加载项目列表
|
||||
*/
|
||||
load:function(){
|
||||
this.setData({
|
||||
projectList: app.globalData.projectInfoList,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
|
@ -1,18 +1,17 @@
|
|||
<!--pages/components/project-select/index.wxml-->
|
||||
<view class="video_add">
|
||||
<view class="video_address" style="width: {{width}};margin-left: {{left}};">
|
||||
<view class="video_address_min" bindtap="showPopup">
|
||||
{{item.text}}
|
||||
</view>
|
||||
<view class="video_address" style="width: {{width}};margin-left: {{left}};">
|
||||
<view class="video_address_min" bindtap="showPopup">
|
||||
{{item.text}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<van-popup show="{{ show }}" bind:close="onClose" position="bottom" custom-class="popup_style">
|
||||
<view class="option_list_title">
|
||||
<view class="option_list_title_btn" bindtap="onClose">取消</view>
|
||||
<view>{{placeholder}}</view>
|
||||
<view class="option_list_title_btn" bindtap="onConfirm">确认</view>
|
||||
</view>
|
||||
<van-picker columns="{{ columns }}" bind:change="onSelectChange" custom-class="time_select_style" default-index="{{ index }}"
|
||||
column-class="time_list_style" active-class="time_active_style" toolbar-class="toolbar_style" visible-item-count="5" />
|
||||
</van-popup>
|
||||
<view class="option_list_title">
|
||||
<view class="option_list_title_btn" bindtap="onClose">取消</view>
|
||||
<view style="text-align: center;"><input placeholder="请输入项目名称搜索" placeholder-style="color:#638fbd;" style="width: 280rpx;" bindinput="findProject" value="{{findProjectValue}}" /></view>
|
||||
<view class="option_list_title_btn" bindtap="onConfirm">确认</view>
|
||||
</view>
|
||||
<van-picker columns="{{ columns }}" bind:change="onSelectChange" custom-class="time_select_style" default-index="{{ index }}" column-class="time_list_style" active-class="time_active_style" toolbar-class="toolbar_style" visible-item-count="5" />
|
||||
</van-popup>
|
|
@ -1,49 +1,54 @@
|
|||
/* pages/components/project-select/index.wxss */
|
||||
|
||||
.video_add{
|
||||
padding: 20rpx 30rpx;
|
||||
}
|
||||
.video_address{
|
||||
background:#30343f;
|
||||
padding:0 20rpx;
|
||||
border-radius:50rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.video_address_min{
|
||||
background:url("http://fileimg.makalu.cc/CORE_B1C818B4CF2C44FE9D96624589329EBC.png") no-repeat left/40rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
padding-left: 50rpx;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
|
||||
.option_list_title{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20rpx;
|
||||
color: #06d4f8;
|
||||
}
|
||||
.option_list_title_btn{
|
||||
color: #1989fa;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.popup_style{
|
||||
background: #232a44 !important;
|
||||
}
|
||||
.time_select_style{
|
||||
background: none !important;
|
||||
.video_add {
|
||||
padding: 20rpx 30rpx;
|
||||
}
|
||||
|
||||
.time_active_style{
|
||||
color: #ffffff !important;
|
||||
.video_address {
|
||||
background: #30343f;
|
||||
padding: 0 20rpx;
|
||||
border-radius: 50rpx;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.time_list_style{
|
||||
background: none !important;
|
||||
color: #546696 !important;
|
||||
|
||||
.video_address_min {
|
||||
background: url("https://szgcwx.jhncidg.com/staticFiles/img/menu/CORE_B1C818B4CF2C44FE9D96624589329EBC.png") no-repeat left/40rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
padding-left: 50rpx;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
|
||||
.option_list_title {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 20rpx;
|
||||
color: #06d4f8;
|
||||
}
|
||||
|
||||
.option_list_title_btn {
|
||||
color: #1989fa;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.popup_style {
|
||||
background: #232a44 !important;
|
||||
}
|
||||
|
||||
.time_select_style {
|
||||
background: none !important;
|
||||
}
|
||||
|
||||
.time_active_style {
|
||||
color: #ffffff !important;
|
||||
}
|
||||
|
||||
.time_list_style {
|
||||
background: none !important;
|
||||
color: #546696 !important;
|
||||
}
|
|
@ -0,0 +1,216 @@
|
|||
import {
|
||||
removeToken
|
||||
} from '../../../utils/auth'
|
||||
import {
|
||||
loginOut,
|
||||
updatePwd,
|
||||
findOpenUserMsgId
|
||||
} from '../../../api/login'
|
||||
|
||||
const app = getApp()
|
||||
Component({
|
||||
/**数据监听 */
|
||||
observers: {},
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
show: false,
|
||||
userData: {},
|
||||
resPas: false,
|
||||
oldPsw: '',
|
||||
newPsw: '',
|
||||
password: '',
|
||||
showOldPass: true,
|
||||
showNewPass: true,
|
||||
showPassWord: true,
|
||||
binding: false,
|
||||
msgOpenId: "",
|
||||
},
|
||||
|
||||
created() {
|
||||
let that = this;
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
userData: res.data,
|
||||
loginName: res.data.loginName,
|
||||
msgOpenId: res.data.msgOpenId || "",
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
loadUserInfo() {
|
||||
let that = this;
|
||||
//获取缓存数据
|
||||
wx.getStorage({
|
||||
key: 'userinfo',
|
||||
success: function (res) {
|
||||
findOpenUserMsgId(res.data.openId).then(vo =>{
|
||||
if(vo.code==200 && vo.data){
|
||||
res.data.msgOpenId=vo.data.msgOpenId;
|
||||
wx.setStorage({
|
||||
key: 'userinfo',
|
||||
data: res.data
|
||||
});
|
||||
that.setData({
|
||||
show:true,
|
||||
userData: res.data,
|
||||
loginName: res.data.loginName,
|
||||
msgOpenId: res.data.msgOpenId || "",
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
showPopup() {
|
||||
this.setData({
|
||||
show: true
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 关闭用户详情
|
||||
*/
|
||||
closePopup() {
|
||||
this.setData({
|
||||
show: false
|
||||
});
|
||||
},
|
||||
|
||||
//修改密码
|
||||
resPassword: function () {
|
||||
this.setData({
|
||||
resPas: true
|
||||
});
|
||||
},
|
||||
|
||||
//绑定公众号
|
||||
binding: function () {
|
||||
app.initWxAuth();
|
||||
},
|
||||
|
||||
/**
|
||||
* 修改密码返回
|
||||
*/
|
||||
closeResPas: function () {
|
||||
this.setData({
|
||||
resPas: false
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 修改密码返回
|
||||
*/
|
||||
closeBinding: function () {
|
||||
this.setData({
|
||||
binding: false
|
||||
});
|
||||
},
|
||||
|
||||
bindingBuild: function () {
|
||||
wx.previewImage({
|
||||
urls: "https://szgcwx.jhncidg.com/staticFiles/qrv1.jpg".split(","),
|
||||
current: 0
|
||||
})
|
||||
},
|
||||
|
||||
//退出登录
|
||||
loginOut: function () {
|
||||
loginOut({}).then(res => {
|
||||
removeToken();
|
||||
});
|
||||
wx.clearStorageSync();
|
||||
wx.setStorageSync('isReload', "1")
|
||||
wx.redirectTo({
|
||||
url: '../login/index',
|
||||
})
|
||||
},
|
||||
|
||||
seeTap1() {
|
||||
let that = this;
|
||||
that.setData({
|
||||
// 切换图标
|
||||
showOldPass: !that.data.showOldPass
|
||||
})
|
||||
},
|
||||
|
||||
seeTap2() {
|
||||
let that = this;
|
||||
that.setData({
|
||||
// 切换图标
|
||||
showNewPass: !that.data.showNewPass
|
||||
})
|
||||
},
|
||||
|
||||
seeTap3() {
|
||||
let that = this;
|
||||
that.setData({
|
||||
// 切换图标
|
||||
showPassWord: !that.data.showPassWord
|
||||
})
|
||||
if (that.data.newPsw != '' && that.data.newPsw != that.data.password) {
|
||||
app.toast("两次密码输入不一致!");
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 添加预警信息
|
||||
*/
|
||||
submit: function () {
|
||||
var that = this;
|
||||
if (that.data.oldPsw == '') {
|
||||
app.toast("请输入旧密码!");
|
||||
return;
|
||||
}
|
||||
if (that.data.password == '') {
|
||||
app.toast("请确认新密码!");
|
||||
return;
|
||||
}
|
||||
if (that.data.newPsw != '' && that.data.newPsw != that.data.password) {
|
||||
app.toast("两次密码输入不一致!");
|
||||
return;
|
||||
}
|
||||
if (that.data.oldPsw.length < 6) {
|
||||
app.toast("请输入旧密码长度 [6-20]位字符!");
|
||||
return;
|
||||
}
|
||||
if (that.data.newPsw.length < 6) {
|
||||
app.toast("请输入新密码长度 [6-20]位字符!");
|
||||
return;
|
||||
}
|
||||
if (that.data.password.length < 6) {
|
||||
app.toast("请输入确认密码长度 [6-20]位字符!");
|
||||
return;
|
||||
}
|
||||
let data = {
|
||||
loginName: that.data.loginName,
|
||||
oldPass: that.data.oldPsw,
|
||||
password: that.data.newPsw,
|
||||
confPass: that.data.password,
|
||||
source:"u"
|
||||
}
|
||||
updatePwd(data).then(res =>{
|
||||
if(res.code==200){
|
||||
app.toast("密码修改成功,请重新登录!",800);
|
||||
removeToken();
|
||||
wx.clearStorageSync();
|
||||
wx.setStorageSync('isReload', "1");
|
||||
setTimeout(()=>{
|
||||
wx.redirectTo({
|
||||
url: '../login/index',
|
||||
});
|
||||
},500)
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
})
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-row": "@vant/weapp/row",
|
||||
"van-col": "@vant/weapp/col",
|
||||
"van-popup": "@vant/weapp/popup",
|
||||
"van-notice-bar": "@vant/weapp/notice-bar/index",
|
||||
"van-grid": "@vant/weapp/grid/index",
|
||||
"van-grid-item": "@vant/weapp/grid-item/index"
|
||||
},
|
||||
"navigationStyle":"custom"
|
||||
}
|
|
@ -0,0 +1,88 @@
|
|||
<view class="header_img" bindtap="showPopup">
|
||||
<image src="/images/foot_3.png"></image>
|
||||
</view>
|
||||
<!-- 左侧账号信息 -->
|
||||
<van-popup show="{{ show }}" position="left" custom-style="width: 70%;height:100%;background:#191d28" bind:close="closePopup">
|
||||
<view class="left_max">
|
||||
<van-row class="demo clearfix">
|
||||
<van-col span="24">
|
||||
<view class="left_info_dept">{{userData.deptName}}</view>
|
||||
</van-col>
|
||||
<van-col span="10">
|
||||
<view class="left_head">
|
||||
<image src="https://szgcwx.jhncidg.com/staticFiles/images/user_avatar.png"></image>
|
||||
</view>
|
||||
</van-col>
|
||||
<van-col span="14">
|
||||
<view class="left_info">
|
||||
<view class="left_info_name">{{userData.nickName}}</view>
|
||||
<view class="left_info_name">{{userData.loginName}}</view>
|
||||
<view wx:if="{{msgOpenId==''}}" class="left_info_name" style="color: #F56C6C;display:flex;font-weight: 600;"><van-icon name="clear" />消息未授权</view>
|
||||
<view wx:if="{{msgOpenId!=''}}" class="left_info_name" style="color: #38cf4c;display:flex;font-weight: 600;"><van-icon name="checked" />消息已授权</view>
|
||||
</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
<view class="left_manage_min" wx:if="{{true}}">
|
||||
<view class="message-title">关注公众号才能成功开启消息通知</view>
|
||||
</view>
|
||||
<button wx:if="{{true}}" type="default" size="default" style="margin-top: 40rpx;background-color: #513ea7;color: #FFF;" bindtap="bindingBuild">立即关注公众号</button>
|
||||
<view class="left_manage_min" wx:if="{{true}}">
|
||||
<view class="left_manage" bindtap="binding">
|
||||
<image src="/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>
|
||||
<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>
|
||||
<text class="left_sign">退出登录</text>
|
||||
<image src="/images/right.png" class="left_flaot"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</van-popup>
|
||||
|
||||
<!--修改密码-->
|
||||
<van-popup show="{{ resPas }}" position="left" class="passClass" custom-style="width: 100%;height:100%;background: #191d28 url(https://szgcwx.jhncidg.com/staticFiles/img/CORE_40247DD946964A15AA0D4000E1031E19.png) no-repeat bottom/100%;" bind:close="closeResPas">
|
||||
<view class="bg_bg">
|
||||
<image src="https://szgcwx.jhncidg.com/staticFiles/img/yanzhu_logo_blue.png"></image>
|
||||
</view>
|
||||
<view class="inspect_info">
|
||||
<view class="inspect_info_list">
|
||||
<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:else class="password-icon" src="/images/yj_01.png" bindtap="seeTap1"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<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="/images/yj_01.png" bindtap="seeTap2" wx:else />
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<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="/images/yj_01.png" bindtap="seeTap3" wx:else />
|
||||
</view>
|
||||
</view>
|
||||
<view class="problem_submit_to">
|
||||
<view class="problem_submit_to_btn" bindtap="closeResPas">取消</view>
|
||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="submit">修改密码</view>
|
||||
</view>
|
||||
</view>
|
||||
</van-popup>
|
|
@ -0,0 +1,207 @@
|
|||
.header_img {
|
||||
padding-left: 30rpx;
|
||||
padding-top: 10rpx;
|
||||
}
|
||||
|
||||
.header_img image {
|
||||
width: 33rpx;
|
||||
height: 33rpx;
|
||||
}
|
||||
|
||||
/* 左侧菜单 */
|
||||
.left_max {
|
||||
padding-top: 180rpx;
|
||||
}
|
||||
|
||||
.left_head {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
margin: auto;
|
||||
background: #2b345b;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.left_head image {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.left_info {
|
||||
font-size: 28rpx;
|
||||
padding-top: 10rpx;
|
||||
}
|
||||
|
||||
.left_info_name {
|
||||
padding: 10rpx;
|
||||
}
|
||||
|
||||
.left_info_dept {
|
||||
text-align: center;
|
||||
margin-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.left_manage_max {
|
||||
padding: 50rpx 0;
|
||||
}
|
||||
|
||||
.left_manage_min {
|
||||
padding: 0 5%;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
.message-title{
|
||||
color: #FFFFFF;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.color_blue {
|
||||
color: #45affb;
|
||||
}
|
||||
|
||||
.left_manage {
|
||||
padding: 20rpx 20rpx 15rpx;
|
||||
background: #2b345b;
|
||||
border-radius: 100rpx;
|
||||
font-size: 28rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.left_manage:active {
|
||||
background: #232a4a;
|
||||
}
|
||||
|
||||
.left_pro {
|
||||
position: relative;
|
||||
top: -10rpx;
|
||||
padding-left: 20rpx;
|
||||
}
|
||||
|
||||
.left_icon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.left_flaot {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.left_password {
|
||||
text-align: center;
|
||||
padding-bottom: 5rpx;
|
||||
}
|
||||
|
||||
.left_binding {
|
||||
text-align: center;
|
||||
padding-bottom: 5rpx;
|
||||
color: #45affb;
|
||||
}
|
||||
|
||||
.left_sign {
|
||||
text-align: center;
|
||||
padding-bottom: 5rpx;
|
||||
color: #F56C6C;
|
||||
}
|
||||
|
||||
.left_begin {
|
||||
text-align: center;
|
||||
padding-bottom: 5rpx;
|
||||
color: #faf8ff;
|
||||
}
|
||||
|
||||
.left_manage2 {
|
||||
float: left;
|
||||
width: 50%;
|
||||
margin-bottom: 35rpx;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.password-icon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
position: absolute;
|
||||
right: 60rpx;
|
||||
margin-top: -60rpx;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.bg_bg {
|
||||
text-align: center;
|
||||
margin-top: 80rpx;
|
||||
}
|
||||
|
||||
.bg_bg image {
|
||||
width: 320rpx;
|
||||
height: 320rpx;
|
||||
}
|
||||
|
||||
.inspect_input_fill_in {
|
||||
height: 90rpx;
|
||||
background: #212737;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
|
||||
.problem_submit_to {
|
||||
padding: 40rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.problem_submit_to_btn {
|
||||
padding: 20rpx 0;
|
||||
width: 220rpx;
|
||||
text-align: center;
|
||||
border-radius: 10rpx;
|
||||
background: #3e4148;
|
||||
}
|
||||
|
||||
.problem_submit_to_btn:active {
|
||||
background: #292d35;
|
||||
}
|
||||
|
||||
.problem_submit_to_save {
|
||||
background: #513ea7;
|
||||
}
|
||||
|
||||
.problem_submit_to_save:active {
|
||||
background: #372a70;
|
||||
}
|
||||
|
||||
.inspect_info {
|
||||
padding: 30rpx;
|
||||
margin-bottom: 30rpx;
|
||||
}
|
||||
|
||||
.inspect_info_list {
|
||||
padding: 10rpx 0;
|
||||
}
|
||||
|
||||
.inspect_info_title {
|
||||
padding: 10rpx 0;
|
||||
color: #83a5ef
|
||||
}
|
||||
|
||||
.inspect_info_type {
|
||||
padding: 20rpx 0;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.inspect_info_type view {
|
||||
width: 30%;
|
||||
padding: 18rpx 0;
|
||||
background: #262c3c;
|
||||
text-align: center;
|
||||
border-radius: 10rpx;
|
||||
color: #6a77a3;
|
||||
}
|
||||
|
||||
.inspect_info_type .active {
|
||||
color: #ffffff;
|
||||
background: #576691;
|
||||
}
|
|
@ -3,6 +3,7 @@ import {
|
|||
setToken,
|
||||
getOpenId,
|
||||
setOpenId,
|
||||
setUserInfo,
|
||||
getSessionKey,
|
||||
setSessionKey,
|
||||
} from '../../utils/auth'
|
||||
|
@ -12,8 +13,11 @@ import {
|
|||
getCodeImg,
|
||||
getMaOpenId,
|
||||
refreshMobileToken,
|
||||
findUserInfoByCache,
|
||||
} from '../../api/login'
|
||||
|
||||
import {
|
||||
findMyProjectList,
|
||||
} from '../../api/project'
|
||||
const app = getApp();
|
||||
Page({
|
||||
|
||||
|
@ -55,11 +59,9 @@ Page({
|
|||
//刷新权限信息
|
||||
refreshMobileToken().then(res => {
|
||||
if (res.code == '200') {
|
||||
wx.redirectTo({
|
||||
url: '../index/index',
|
||||
})
|
||||
this.getUserInfoByCache();
|
||||
} else {
|
||||
that.loadCodeImage();
|
||||
this.loadCodeImage();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
@ -121,11 +123,9 @@ Page({
|
|||
"uuid": that.data.uuid,
|
||||
}).then(res => {
|
||||
if (res.code == '200') {
|
||||
setToken(res.access_token)
|
||||
setToken(res.data.access_token)
|
||||
//跳转页面
|
||||
wx.redirectTo({
|
||||
url: '../index/index',
|
||||
})
|
||||
this.getUserInfoByCache();
|
||||
} else {
|
||||
that.loadCodeImage();
|
||||
}
|
||||
|
@ -153,4 +153,49 @@ Page({
|
|||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询
|
||||
* 用户详细信息
|
||||
* @param {*} e
|
||||
*/
|
||||
getUserInfoByCache: function () {
|
||||
findUserInfoByCache().then(res=>{
|
||||
if(res.code==200){
|
||||
setUserInfo(res.user);
|
||||
app.globalData.userData = res.user;
|
||||
this.getMyProjectList();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询
|
||||
* 用户项目信息
|
||||
* 根据项目配置进入不同页面...
|
||||
*/
|
||||
getMyProjectList: function () {
|
||||
findMyProjectList().then(res=>{
|
||||
if(res.code==200){
|
||||
app.globalData.projectInfoList = res.rows;
|
||||
if(res.rows.length>0){
|
||||
if(res.rows.length==1){
|
||||
app.globalData.useProjectId = res.rows[0].id;
|
||||
app.globalData.useProjectName = res.rows[0].projectName;
|
||||
//单项目直接进入项目页面
|
||||
wx.redirectTo({
|
||||
url: '../project_info/index',
|
||||
})
|
||||
}else{
|
||||
//多项目进入项目切换页面
|
||||
wx.redirectTo({
|
||||
url: '../project_list/index',
|
||||
})
|
||||
}
|
||||
}else{
|
||||
app.toast("未查询到当前用户项目,信息审核中或人员已离场");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
})
|
|
@ -1,188 +0,0 @@
|
|||
import {
|
||||
getProjectNo,
|
||||
addProjectInfo,
|
||||
} from '../../../api/project'
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
parDeptId: null,
|
||||
projectName: null,
|
||||
proNo: "",
|
||||
proName: "",
|
||||
proInfo: "",
|
||||
proAddress: "",
|
||||
proPerson: "",
|
||||
proPersonPhone: "",
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
this.initProNo();
|
||||
this.setData({
|
||||
parDeptId: app.globalData.userData?.parDeptId,
|
||||
parDeptName: app.globalData.userData?.parDeptName
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 初始化临建项目编号
|
||||
* @param {*} e
|
||||
*/
|
||||
initProNo: function (e) {
|
||||
getProjectNo().then(res => {
|
||||
if (res.code == 200) {
|
||||
this.setData({
|
||||
proNo: res.data
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
* @param {*} e
|
||||
*/
|
||||
inputProName: function (e) {
|
||||
this.setData({
|
||||
proName: e.detail.value
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 项目负责人
|
||||
* @param {*} e
|
||||
*/
|
||||
inputProPerson: function (e) {
|
||||
this.setData({
|
||||
proPerson: e.detail.value
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 项目负责人电话
|
||||
* @param {*} e
|
||||
*/
|
||||
inputProPersonPhone: function (e) {
|
||||
this.setData({
|
||||
proPersonPhone: e.detail.value
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 临建项目地址
|
||||
* @param {*} e
|
||||
*/
|
||||
onInputProAddress: function (e) {
|
||||
this.setData({
|
||||
proAddress: e.detail.value
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 临建项目详情
|
||||
* @param {*} e
|
||||
*/
|
||||
onInputProInfo: function (e) {
|
||||
this.setData({
|
||||
proInfo: e.detail.value
|
||||
});
|
||||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 提交保存数据
|
||||
*/
|
||||
onSaveSubmit: function () {
|
||||
let {
|
||||
proNo,
|
||||
proName,
|
||||
proInfo,
|
||||
proAddress,
|
||||
proPerson,
|
||||
proPersonPhone,
|
||||
} = this.data;
|
||||
//数据效验
|
||||
if (proNo == "") {
|
||||
app.toast("数据异常,请刷新页面重试!")
|
||||
return;
|
||||
}
|
||||
if (proName == "") {
|
||||
app.toast("请填写临建项目名称!")
|
||||
return;
|
||||
}
|
||||
addProjectInfo({
|
||||
no: proNo,
|
||||
name: proName
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
app.toast("新增成功!")
|
||||
setTimeout(() => {
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
}, 200)
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"usingComponents": {},
|
||||
"navigationStyle":"custom"
|
||||
}
|
|
@ -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>
|
||||
<view class="max_content">
|
||||
<view class="inspect_info ">
|
||||
<view class="module_title module_title_flex">
|
||||
<view>{{parDeptName}}</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">临建项目编号</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写临建项目编号" placeholder-style="color:#6777aa;" model:value="{{proNo}}" class="inspect_input_fill_in" disabled="disabled"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">临建项目名称</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写临建项目名称" placeholder-style="color:#6777aa;" bindinput="inputProName" class="inspect_input_fill_in" maxlength="30"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{false}}" >
|
||||
<view class="inspect_info_title">临建项目地址</view>
|
||||
<view class="inspect_info_content">
|
||||
<textarea class="add_textarea" placeholder="请填写临建项目地址"
|
||||
placeholder-style="color:#6777aa;" bindinput="onInputProAddress" class="inspect_input_fill_in" maxlength="255"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{false}}" >
|
||||
<view class="inspect_info_title">临建项目详情</view>
|
||||
<view class="inspect_info_content">
|
||||
<textarea class="add_textarea" placeholder="请填写临建项目详情"
|
||||
placeholder-style="color:#6777aa;" bindinput="onInputProInfo" class="inspect_input_fill_in" maxlength="255"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{false}}" >
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">项目负责人</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写临建项目负责人" placeholder-style="color:#6777aa;" bindinput="inputProPerson" class="inspect_input_fill_in" maxlength="30"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{false}}" >
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">负责人电话</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写临建负责人电话" placeholder-style="color:#6777aa;" bindinput="inputProPersonPhone" class="inspect_input_fill_in" maxlength="30"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="problem_submit_to">
|
||||
<view class="problem_submit_to_btn" bindtap="returnToPage">取消</view>
|
||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onSaveSubmit">提交保存</view>
|
||||
</view>
|
||||
</view>
|
|
@ -1 +0,0 @@
|
|||
/* pages/project_info/add/index.wxss */
|
|
@ -1,187 +0,0 @@
|
|||
import {
|
||||
getProjectInfo,
|
||||
updateProjectInfo,
|
||||
} from '../../../api/project'
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
parDeptId: null,
|
||||
projectName: null,
|
||||
id:null,
|
||||
infoData: {},
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
let {
|
||||
id
|
||||
} = options
|
||||
this.initData(id);
|
||||
this.setData({
|
||||
id,
|
||||
parDeptId: app.globalData.userData?.parDeptId,
|
||||
parDeptName: app.globalData.userData?.parDeptName
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 初始化临建项目
|
||||
* @param {*} e
|
||||
*/
|
||||
initData: function (id) {
|
||||
getProjectInfo(id).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.setData({
|
||||
infoData: res.data
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
* @param {*} e
|
||||
*/
|
||||
inputProName: function (e) {
|
||||
this.setData({
|
||||
"infoData.name": e.detail.value
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 项目负责人
|
||||
* @param {*} e
|
||||
*/
|
||||
inputProPerson: function (e) {
|
||||
this.setData({
|
||||
"infoData.personName": e.detail.value
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 项目负责人电话
|
||||
* @param {*} e
|
||||
*/
|
||||
inputProPersonPhone: function (e) {
|
||||
this.setData({
|
||||
"infoData.personPhone": e.detail.value
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 临建项目地址
|
||||
* @param {*} e
|
||||
*/
|
||||
onInputProAddress: function (e) {
|
||||
this.setData({
|
||||
"infoData.address": e.detail.value
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 临建项目详情
|
||||
* @param {*} e
|
||||
*/
|
||||
onInputProInfo: function (e) {
|
||||
this.setData({
|
||||
"infoData.infos": e.detail.value
|
||||
});
|
||||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 提交保存数据
|
||||
*/
|
||||
onEditSubmit: function () {
|
||||
let {
|
||||
id,
|
||||
parDeptId,
|
||||
infoData
|
||||
} = this.data;
|
||||
//数据效验
|
||||
if (parDeptId == null || parDeptId == "" || infoData.no == "") {
|
||||
app.toast("数据异常,请刷新页面重试!")
|
||||
return;
|
||||
}
|
||||
if (infoData.name == "") {
|
||||
app.toast("请填写临建项目名称!")
|
||||
return;
|
||||
}
|
||||
updateProjectInfo({
|
||||
id,
|
||||
no: infoData.no,
|
||||
name: infoData.name,
|
||||
deptId: infoData.deptId,
|
||||
}).then(res => {
|
||||
if (res.code == 200) {
|
||||
app.toast("修改成功!")
|
||||
setTimeout(() => {
|
||||
wx.redirectTo({
|
||||
url: '../list/index',
|
||||
})
|
||||
}, 200)
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"usingComponents": {},
|
||||
"navigationStyle":"custom"
|
||||
}
|
|
@ -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>
|
||||
<view class="max_content">
|
||||
<view class="inspect_info ">
|
||||
<view class="module_title module_title_flex">
|
||||
<view>{{parDeptName}}</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">临建项目编号</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写临建项目编号" placeholder-style="color:#6777aa;" model:value="{{infoData.no}}" class="inspect_input_fill_in" disabled="disabled"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list">
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">临建项目名称</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写临建项目名称" placeholder-style="color:#6777aa;" bindinput="inputProName" model:value="{{infoData.name}}" class="inspect_input_fill_in" maxlength="30"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{false}}" >
|
||||
<view class="inspect_info_title">临建项目地址</view>
|
||||
<view class="inspect_info_content">
|
||||
<textarea class="add_textarea" placeholder="请填写临建项目地址"
|
||||
placeholder-style="color:#6777aa;" bindinput="onInputProAddress" model:value="{{infoData.address}}" class="inspect_input_fill_in" maxlength="255"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{false}}" >
|
||||
<view class="inspect_info_title">临建项目详情</view>
|
||||
<view class="inspect_info_content">
|
||||
<textarea class="add_textarea" placeholder="请填写临建项目详情"
|
||||
placeholder-style="color:#6777aa;" bindinput="onInputProInfo" model:value="{{infoData.infos}}" class="inspect_input_fill_in" maxlength="255"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{false}}" >
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">项目负责人</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写临建项目负责人" placeholder-style="color:#6777aa;" bindinput="inputProPerson" model:value="{{infoData.personName}}" class="inspect_input_fill_in" maxlength="30"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_info_list" wx:if="{{false}}" >
|
||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">负责人电话</view>
|
||||
<view class="inspect_info_content">
|
||||
<input placeholder="请填写临建负责人电话" placeholder-style="color:#6777aa;" bindinput="inputProPersonPhone" model:value="{{infoData.personPhone}}" class="inspect_input_fill_in" maxlength="30"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="problem_submit_to">
|
||||
<view class="problem_submit_to_btn" bindtap="returnToPage">取消</view>
|
||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onEditSubmit">提交保存</view>
|
||||
</view>
|
||||
</view>
|
|
@ -1 +0,0 @@
|
|||
/* pages/project_info/edit/index.wxss */
|
|
@ -0,0 +1,824 @@
|
|||
import * as echarts from '../../ec-canvas/echarts';
|
||||
import config from '../../config'
|
||||
import {
|
||||
getToken
|
||||
} from '../../utils/auth'
|
||||
import {
|
||||
findProjectInfo,
|
||||
findProjectDepts,
|
||||
findProSubDeptsUserByParams
|
||||
} from '../../api/project'
|
||||
import {
|
||||
findSubDeptsUsers,
|
||||
findDaysAttendanceView,
|
||||
findUsersAttendanceView,
|
||||
findSubDeptsAttendanceView
|
||||
} from '../../api/attendance'
|
||||
|
||||
const app = getApp();
|
||||
|
||||
Page({
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
title: "项目详情",
|
||||
activeNames: ["base"],
|
||||
//项目信息
|
||||
projectInfo: {},
|
||||
projectDeptsList: [],
|
||||
deptTypes: [{
|
||||
"name": "建设单位",
|
||||
"iconSrc": "https://guangzhou.sxyanzhu.com/YZLJXM/profile/icon/jsdw.png"
|
||||
}, {
|
||||
"name": "监理单位",
|
||||
"iconSrc": "https://guangzhou.sxyanzhu.com/YZLJXM/profile/icon/jldw.png"
|
||||
}, {
|
||||
"name": "设计单位",
|
||||
"iconSrc": "https://guangzhou.sxyanzhu.com/YZLJXM/profile/icon/sjdw.png"
|
||||
}, {
|
||||
"name": "检测单位",
|
||||
"iconSrc": "https://guangzhou.sxyanzhu.com/YZLJXM/profile/icon/jcjg.png"
|
||||
}, {
|
||||
"name": "勘察单位",
|
||||
"iconSrc": "https://guangzhou.sxyanzhu.com/YZLJXM/profile/icon/fbdw.png"
|
||||
}, {
|
||||
"name": "总包单位",
|
||||
"iconSrc": "https://guangzhou.sxyanzhu.com/YZLJXM/profile/icon/zbdw.png"
|
||||
}],
|
||||
active: 0,
|
||||
show: false,
|
||||
ec_1: {
|
||||
lazyLoad: true //动态加载
|
||||
},
|
||||
ec_2: {
|
||||
lazyLoad: true
|
||||
},
|
||||
ec_3: {
|
||||
lazyLoad: true
|
||||
},
|
||||
//参数——————————————————————————————————————
|
||||
//组织架构id
|
||||
deptId: '',
|
||||
//项目的id
|
||||
projectId: '',
|
||||
//项目名称参数
|
||||
projectNameArgs: '',
|
||||
//视频接入数
|
||||
videoNum: '',
|
||||
//正常视频数
|
||||
videoOnline: '',
|
||||
//机械接入数
|
||||
machineryNum: '',
|
||||
//正常机械运行数
|
||||
machineryOnline: '',
|
||||
monthEarlyNum: '0',
|
||||
yangchenCount: '0',
|
||||
weather: '',
|
||||
weatherPic: '',
|
||||
temperature: '',
|
||||
//加载模板参数
|
||||
loadShow: false,
|
||||
initData: {},
|
||||
todoDb: 0,
|
||||
approveDb: 0,
|
||||
aq: 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
|
||||
},
|
||||
|
||||
// 事件委托
|
||||
selectedTab(e) {
|
||||
this.setData({
|
||||
nactive: e.target.dataset.set,
|
||||
labourImg: this.data.labourTypeList[e.target.dataset.set].img,
|
||||
})
|
||||
this.initSubDeptUsersCharts();
|
||||
},
|
||||
|
||||
//项目切换 返回值
|
||||
onProjectSelect(e) {
|
||||
this.onClickShow();
|
||||
let projectId = e.detail.id;
|
||||
let projectName = e.detail.text;
|
||||
app.globalData.projectId = projectId;
|
||||
app.globalData.projectName = projectName;
|
||||
this.setData({
|
||||
switchChart: true,
|
||||
projectId: projectId,
|
||||
projectName: projectName
|
||||
})
|
||||
this.onLoad();
|
||||
},
|
||||
|
||||
// 手风琴
|
||||
onCollChange(event) {
|
||||
this.setData({
|
||||
activeNames: event.detail,
|
||||
});
|
||||
},
|
||||
|
||||
//初始化视频监控饼图数据
|
||||
init_one: function (datas_1) {
|
||||
this.oneComponent.init((canvas, width, height, dpr) => {
|
||||
const chart = echarts.init(canvas, null, {
|
||||
width: width,
|
||||
height: height,
|
||||
devicePixelRatio: dpr //解决小程序视图模糊的问题,必写
|
||||
});
|
||||
initChart_1(chart, datas_1);
|
||||
this.chart = chart;
|
||||
return chart;
|
||||
});
|
||||
},
|
||||
|
||||
//初始化机械设备饼图数据
|
||||
init_two: function (datas_2, datas_name) {
|
||||
this.twoComponent.init((canvas, width, height, dpr) => {
|
||||
const chart = echarts.init(canvas, null, {
|
||||
width: width,
|
||||
height: height,
|
||||
devicePixelRatio: dpr //解决小程序视图模糊的问题,必写
|
||||
});
|
||||
initChart_2(chart, datas_2, datas_name);
|
||||
this.chart = chart;
|
||||
return chart;
|
||||
});
|
||||
},
|
||||
|
||||
//初始化劳务管理
|
||||
init_three: function (xData_1, yData_1) {
|
||||
this.threeComponent.init((canvas, width, height, dpr) => {
|
||||
const chart = echarts.init(canvas, null, {
|
||||
width: width,
|
||||
height: height,
|
||||
devicePixelRatio: dpr //解决小程序视图模糊的问题,必写
|
||||
});
|
||||
initChart_3(chart, xData_1, yData_1);
|
||||
this.chart = chart;
|
||||
return chart;
|
||||
});
|
||||
},
|
||||
|
||||
onClickShow() {
|
||||
this.setData({
|
||||
loadShow: false
|
||||
});
|
||||
},
|
||||
|
||||
onClickHide() {
|
||||
this.setData({
|
||||
loadShow: false
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
console.log("config.imgBaseUrl",config.baseImgUrl,this.data.imgBaseUrl)
|
||||
this.setData({
|
||||
labourImg: this.data.labourTypeList[this.data.nactive].img,
|
||||
});
|
||||
this.initAnimationData();
|
||||
if (getToken()) {
|
||||
this.setData({
|
||||
userData: app.globalData.userData,
|
||||
projectId: app.globalData.useProjectId,
|
||||
projectName: app.globalData.useProjectName,
|
||||
initData: {
|
||||
id: app.globalData.useProjectId,
|
||||
text: app.globalData.useProjectName,
|
||||
}
|
||||
});
|
||||
//项目基本信息
|
||||
this.getProjectInfo(app.globalData.useProjectId);
|
||||
//项目单位信息
|
||||
//this.getProjectDepts(app.globalData.useProjectId);
|
||||
//劳务人员信息
|
||||
if (app.globalData.userData.userType != '77') {
|
||||
//统计劳务人员信息
|
||||
this.getSubDeptsUsers(app.globalData.useProjectId);
|
||||
this.initSubDeptDaysCharts(app.globalData.useProjectId);
|
||||
}
|
||||
//今日出勤信息
|
||||
if (app.globalData.userData.userType != '80' && app.globalData.userData.userType != '79' && app.globalData.userData.userType != '78' && app.globalData.userData.userType != '77') {
|
||||
this.getSubDeptsAttendanceView(app.globalData.useProjectId);
|
||||
}
|
||||
//人员出勤信息
|
||||
if (app.globalData.userData.userType == '77') {
|
||||
//统计劳务人员信息
|
||||
this.getUsersAttendanceView(app.globalData.useProjectId);
|
||||
}
|
||||
//初始化二维码
|
||||
if (app.globalData.userData.userType == '80' || app.globalData.userData.userType == '79' || app.globalData.userData.userType == '78') {
|
||||
this.getProSubDeptsUserInfo(app.globalData.useProjectId);
|
||||
}
|
||||
} else {
|
||||
console.log("未查询到Token...{}...准备重新登录")
|
||||
wx.redirectTo({
|
||||
url: '../login/login',
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 统计劳务人员信息
|
||||
* @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 == '1') {
|
||||
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 == '1') {
|
||||
if (item.craftType == '2') {
|
||||
ts += item.total;
|
||||
} else if (item.craftType == '3') {
|
||||
gl += item.total;
|
||||
} else {
|
||||
lw += item.total;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (item.useStatus != '1') {
|
||||
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
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 初始化
|
||||
* 今日考勤
|
||||
* @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
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 统计
|
||||
* 最近出勤信息
|
||||
* @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
|
||||
*/
|
||||
getProSubDeptsUserInfo(proId){
|
||||
findProSubDeptsUserByParams(proId).then(res =>{
|
||||
this.setData({
|
||||
subDeptUserInfo: res.data
|
||||
});
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 查询公众号消息授权
|
||||
*/
|
||||
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 => {
|
||||
that.setData({
|
||||
projectDeptsList: res.data
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
//加载天气数据
|
||||
getWeatherData: function (even1, even2) {
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/weixin/applets/selectWeather',
|
||||
method: "GET",
|
||||
data: {
|
||||
lng: even1,
|
||||
lat: even2,
|
||||
},
|
||||
success: function (weatherRes) {
|
||||
that.setData({
|
||||
weather: weatherRes.data.weather,
|
||||
weatherPic: weatherRes.data.weatherPic,
|
||||
temperature: weatherRes.data.temperature
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取项目下的视频数
|
||||
getProjectVideoAll: function (even) {
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/weixin/video/getProjectVideoNum',
|
||||
method: 'get',
|
||||
data: {
|
||||
projectName: even
|
||||
},
|
||||
success: resData => {
|
||||
this.setData({
|
||||
videoNum: resData.data.videoAll,
|
||||
videoOnline: resData.data.videoOnline
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 获取机械的数据
|
||||
getMachineryNum: function (event) {
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/mkl/machinery/getMachineryDataWest',
|
||||
data: {
|
||||
"projectId": event
|
||||
},
|
||||
method: 'get',
|
||||
success: resData => {
|
||||
this.setData({
|
||||
machineryNum: resData.data.allNum,
|
||||
machineryOnline: resData.data.onlineNum
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//机械的列表,名称
|
||||
getMachineryList: function (event) {
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/mkl/machinery/getMachineryListWest',
|
||||
data: {
|
||||
"projectId": event
|
||||
},
|
||||
method: 'GET',
|
||||
success: resData => {
|
||||
if (resData.data == '') {
|
||||
that.init_two([{
|
||||
"value": "0",
|
||||
"name": ""
|
||||
}]);
|
||||
} else {
|
||||
that.init_two(resData.data);
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//获取视频的列表,名称
|
||||
getVideoList: function (even) {
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/weixin/video/getProjectVideoListEc',
|
||||
method: 'GET',
|
||||
data: {
|
||||
projectName: even
|
||||
},
|
||||
success: resData => {
|
||||
that.onClickHide();
|
||||
if (resData.data.length > 0) {
|
||||
that.init_one(resData.data);
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
//查询劳务人员出勤数据
|
||||
selectEnvirData: function (even) {
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/weixin/userinfo/selectAttendanceNum',
|
||||
method: "GET",
|
||||
data: {
|
||||
projectId: even,
|
||||
},
|
||||
success: function (hjyj) {
|
||||
that.setData({
|
||||
monthEarlyNum: hjyj.data.userCount,
|
||||
yangchenCount: hjyj.data.userCount
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
//查询出最近一周劳务人员考勤人数
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/weixin/userinfo/selectLabourDayByProjectId',
|
||||
method: "GET",
|
||||
data: {
|
||||
projectId: even
|
||||
},
|
||||
success: function (sspm) {
|
||||
var createTime = [];
|
||||
var userCount = [];
|
||||
for (var i = 0; i < sspm.data.length; i++) {
|
||||
createTime.push(sspm.data[i].createTime);
|
||||
userCount.push(sspm.data[i].userCount);
|
||||
}
|
||||
that.init_three(createTime, userCount);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 拨打电话
|
||||
* @param {*} event
|
||||
*/
|
||||
calling: function (event) {
|
||||
let callPhone = event.currentTarget.dataset.phone;
|
||||
wx.makePhoneCall({
|
||||
phoneNumber: callPhone,
|
||||
success: function () {
|
||||
console.log("拨打电话成功!")
|
||||
},
|
||||
fail: function () {
|
||||
console.log("拨打电话失败!")
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 劳务管理查看详细
|
||||
*/
|
||||
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 () {
|
||||
app.toast("正在建设中");
|
||||
// wx.redirectTo({
|
||||
// url: '../safety_manage/index'
|
||||
// })
|
||||
},
|
||||
|
||||
//跳转到质量管理
|
||||
ZLGL: function () {
|
||||
app.toast("正在建设中");
|
||||
// wx.redirectTo({
|
||||
// url: '../quality_manage/index'
|
||||
// })
|
||||
},
|
||||
|
||||
//跳转到进度管理
|
||||
JDGL2: function () {
|
||||
app.toast("正在建设中");
|
||||
// wx.redirectTo({
|
||||
// url: '../../pageage/project_schedule/list/index'
|
||||
// })
|
||||
},
|
||||
|
||||
//跳转到更多功能
|
||||
GDGN: function () {
|
||||
wx.redirectTo({
|
||||
url: '../gengduogongneng/index'
|
||||
})
|
||||
},
|
||||
|
||||
//查询当前登录人的代办任务
|
||||
awaitTask(minRoleId, deptId, loginName, userId) {
|
||||
let param = {
|
||||
"businessKey": app.globalData.projectId,
|
||||
"nowRole": minRoleId,
|
||||
"nowDept": deptId,
|
||||
"nowUserName": loginName,
|
||||
"nowUser": userId,
|
||||
"activeName": "await"
|
||||
}
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.reqUrl + '/wechat/flowTask/myAwaitFlowTaskListCount',
|
||||
data: param,
|
||||
method: "post",
|
||||
success: function (res) {
|
||||
res = res.data;
|
||||
if (res.code == "200") {
|
||||
that.setData({
|
||||
todoDb: res.data.todo + res.data.approveLZYJ,
|
||||
approveDb: res.data.approve + res.data.zlCount,
|
||||
aq: res.data.aqCount,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
})
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-row": "@vant/weapp/row",
|
||||
"van-col": "@vant/weapp/col",
|
||||
"van-action-sheet": "@vant/weapp/action-sheet",
|
||||
"van-sticky": "@vant/weapp/sticky",
|
||||
"van-tabbar": "@vant/weapp/tabbar",
|
||||
"van-tabbar-item": "@vant/weapp/tabbar-item",
|
||||
"van-popup": "@vant/weapp/popup/index",
|
||||
"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",
|
||||
"van-overlay": "@vant/weapp/overlay/index"
|
||||
},
|
||||
"navigationStyle":"custom"
|
||||
}
|
|
@ -0,0 +1,274 @@
|
|||
<wxs module="format" src="/utils/format.wxs"></wxs>
|
||||
<view class="header_title">
|
||||
<view class="header_title_row">
|
||||
<van-row>
|
||||
<van-col span="5">
|
||||
<user-infos id="userInfos"></user-infos>
|
||||
</van-col>
|
||||
<van-col span="14">
|
||||
<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="{{userData.userType!='80' && userData.userType!='79' && userData.userType!='78' && userData.userType!='77'}}">
|
||||
<image src="/images/s_8.png"></image>总工期:<text>{{projectInfo.projectTimeLimit + ' 天'}}</text>
|
||||
</view>
|
||||
<view wx:if="{{userData.userType!='80' && userData.userType!='79' && userData.userType!='78' && userData.userType!='77'}}">
|
||||
<image src="/images/s_10.png"></image>项目负责人:<text>{{projectInfo.projectPerson}}</text>
|
||||
</view>
|
||||
<view wx:if="{{userData.userType!='80' && userData.userType!='79' && userData.userType!='78' && userData.userType!='77'}}">
|
||||
<image src="/images/s_11.png"></image>负责人手机号:<text>{{projectInfo.projectPersonPhone}}</text>
|
||||
</view>
|
||||
<view wx:if="{{userData.userType!='80' && userData.userType!='79' && userData.userType!='78' && userData.userType!='77'}}">
|
||||
<image src="/images/s_15.png"></image>项目概述:<text>{{projectInfo.projectSummarize}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</van-collapse-item>
|
||||
<van-collapse-item wx:if="{{userData.userType!='80' && userData.userType!='79' && userData.userType!='78' && userData.userType!='77'}}" 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="{{userData.userType!='80' && userData.userType!='79' && userData.userType!='78'}}">
|
||||
<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 chart-id="chart2" data="{{labourData}}" height="350"></safety-bar-chart>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="echarts_max" wx:if="{{userData.userType!='80' && userData.userType!='79' && userData.userType!='78'}}">
|
||||
<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 chart-id="chart2" data="{{labourDays}}" height="350"></safety-bar-chart>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="echarts_max" wx:if="{{userData.userType=='80' || userData.userType=='79' || userData.userType=='78'}}">
|
||||
<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 src="{{imgBaseUrl+subDeptUserInfo.qrCode}}"></image>
|
||||
</van-col>
|
||||
<van-col span="14">
|
||||
<view wx:if="{{userData.userType=='80'}}" class="qrtext"><text class="zz">项目经理 </text>扫描二维码登记信息,完成安全学习和在线考试,签署安全承诺书后可申请入场。</view>
|
||||
<view wx:if="{{userData.userType=='79'}}" class="qrtext"><text class="zz">班组组长 </text>扫描二维码登记信息,完成安全学习和在线考试,签署安全承诺书后可申请入场。</view>
|
||||
<view wx:if="{{userData.userType=='78'}}" class="qrtext"><text class="zz">劳务人员 </text>扫描二维码登记信息,完成安全学习和在线考试,签署安全承诺书后可申请入场。</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="echarts_max" wx:if="{{userData.userType!='80' && userData.userType!='79' && userData.userType!='78' && userData.userType!='77'}}">
|
||||
<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="{{userData.userType=='77'}}">
|
||||
<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 < 9 ?'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="{{userData.userType!='77'}}" 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 wx:if="{{userData.userType!='80' && userData.userType!='79' && userData.userType!='78' && userData.userType!='77'}}" 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="{{aq>0}}">{{aq}}</span>
|
||||
</van-tabbar-item>
|
||||
|
||||
<van-tabbar-item wx:if="{{userData.userType!='80' && userData.userType!='79' && userData.userType!='78' && userData.userType!='77'}}" 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="{{approveDb>0}}">{{approveDb}}</span>
|
||||
</van-tabbar-item>
|
||||
|
||||
<van-tabbar-item wx:if="{{userData.userType!='80' && userData.userType!='79' && userData.userType!='78' && userData.userType!='77'}}" bindtap="JDGL2">
|
||||
<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="GDGN">
|
||||
<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-overlay show="{{loadShow}}">
|
||||
<view class="gif">
|
||||
<image src="../../images/loding2.gif"></image>
|
||||
<view>数据加载中!请稍后...</view>
|
||||
</view>
|
||||
</van-overlay>
|
|
@ -0,0 +1,250 @@
|
|||
/* 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;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
|
@ -1,130 +0,0 @@
|
|||
import {
|
||||
listProjectInfo,
|
||||
} from '../../../api/project'
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
pageNum: 1,
|
||||
pageSize: 50,
|
||||
parDeptId: null,
|
||||
listData: [],
|
||||
total: 0,
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
this.setData({
|
||||
parDeptId: app.globalData.userData?.parDeptId
|
||||
});
|
||||
this.initListData();
|
||||
},
|
||||
|
||||
/**
|
||||
* 初始化临建项目数据
|
||||
*/
|
||||
initListData() {
|
||||
let params = "deptId=" + this.data.parDeptId + "&pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize;
|
||||
listProjectInfo(params).then(res => {
|
||||
if (res.code == 200) {
|
||||
this.setData({
|
||||
total: res.total,
|
||||
listData: this.data.listData.concat(res.rows)
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 加载更多数据
|
||||
*/
|
||||
onScrollToLower() {
|
||||
let nal = Math.ceil(this.data.total / this.data.pageSize);
|
||||
if (this.data.pageNum < nal) {
|
||||
this.setData({
|
||||
pageNum: this.data.pageNum + 1
|
||||
});
|
||||
this.initListData();
|
||||
}
|
||||
},
|
||||
|
||||
returnToPage: function () {
|
||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||
wx.redirectTo({
|
||||
url: '../../index/index',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 新增项目信息
|
||||
*/
|
||||
addTap: function () {
|
||||
wx.redirectTo({
|
||||
url: '../add/index',
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 修改项目信息
|
||||
*/
|
||||
editTap: function (e) {
|
||||
let {id} = e.currentTarget.dataset.set
|
||||
wx.redirectTo({
|
||||
url: '../edit/index?id='+id,
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"usingComponents": {},
|
||||
"navigationStyle":"custom"
|
||||
}
|
|
@ -1,50 +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="16">
|
||||
<view class="header_name">临建项目管理</view>
|
||||
</van-col>
|
||||
</van-row>
|
||||
</view>
|
||||
</view>
|
||||
<view class="max_content">
|
||||
<view class="inspect_max">
|
||||
<view class="inspect_list">
|
||||
<view class="inspect_for" wx:for="{{listData}}" wx:key="index" data-set="{{item}}" bindtap="editTap">
|
||||
<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 color_blue">{{item.no}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_list_info">
|
||||
<view class="inspect_list_info_details">
|
||||
<view class="color_blue">项目名称:{{item.name}}</view>
|
||||
</view>
|
||||
<view class="inspect_list_info_details">
|
||||
<view class="color_purple">开建时间:{{item.createTime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{listData.length==0}}">
|
||||
<view style="padding-top: 70px;text-align: -webkit-center;">
|
||||
<image src="/images/nodata.png" style="width: 130px;height: 105px;"></image>
|
||||
<view style="color: #a5abbb;">暂无数据</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="inspect_add_to" bindtap="addTap">
|
||||
<view style="padding-top: 22rpx;">
|
||||
<image src="/images/new_add.png"></image>
|
||||
<view>新增</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
|
@ -1 +0,0 @@
|
|||
/* pages/project_info/list/index.wxss */
|
|
@ -0,0 +1,63 @@
|
|||
import {
|
||||
getToken
|
||||
} from '../../utils/auth'
|
||||
import {
|
||||
findMyProjectList,
|
||||
} 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'];
|
||||
wx.redirectTo({
|
||||
url: '../project_info/index',
|
||||
})
|
||||
}
|
||||
})
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-row": "@vant/weapp/row",
|
||||
"van-col": "@vant/weapp/col"
|
||||
},
|
||||
"navigationStyle":"custom"
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
<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>
|
|
@ -0,0 +1,324 @@
|
|||
.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;
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"appid": "wx2350a5efb3f28e66",
|
||||
"appid": "wx46466c7828eede2b",
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "3.6.0",
|
||||
"packOptions": {
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
const TokenKey = 'YanZhu-XD-App-Token'
|
||||
const OpenIdKey = 'YanZhu-XD-App-OpenId'
|
||||
const SessionKey = 'YanZhu-XD-App-SessionKey';
|
||||
const UserInfoKey = 'YanZhu-XD-App-UserInfoKey';
|
||||
|
||||
export function getToken() {
|
||||
return wx.getStorageSync(TokenKey)
|
||||
|
@ -22,6 +23,16 @@ export function removeOpenId() {
|
|||
return wx.removeStorageSync(OpenIdKey)
|
||||
}
|
||||
|
||||
export function getUserInfo() {
|
||||
return wx.getStorageSync(UserInfoKey)
|
||||
}
|
||||
export function setUserInfo(userInfo) {
|
||||
return wx.setStorageSync(UserInfoKey, userInfo)
|
||||
}
|
||||
export function removeUserInfo() {
|
||||
return wx.removeStorageSync(UserInfoKey)
|
||||
}
|
||||
|
||||
export function getSessionKey() {
|
||||
return wx.getStorageSync(SessionKey)
|
||||
}
|
||||
|
|
|
@ -32,7 +32,6 @@ onMounted(() => {
|
|||
background-color: #f56c6c;
|
||||
border-radius: 10px;
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
font-size: 12px;
|
||||
height: 18px;
|
||||
line-height: 18px;
|
||||
|
@ -53,7 +52,6 @@ onMounted(() => {
|
|||
background-color: #f56c6c;
|
||||
border-radius: 10px;
|
||||
color: #fff;
|
||||
display: inline-block;
|
||||
font-size: 12px;
|
||||
height: 18px;
|
||||
line-height: 18px;
|
||||
|
|
|
@ -18,9 +18,9 @@ export function getBusTrainingVideoUser(id) {
|
|||
}
|
||||
|
||||
// 查询用户培训视频详细
|
||||
export function getBusTrainingVideoUserLast(id) {
|
||||
export function getBusTrainingVideoUserLast(userId) {
|
||||
return request({
|
||||
url: '/manage/busTrainingVideoUser/last/' + id,
|
||||
url: '/manage/busTrainingVideoUser/last/' + userId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
|
|
@ -41,4 +41,4 @@ export function delProProjectInfo(id) {
|
|||
url: '/manage/proProjectInfo/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue