提交代码
parent
e31a2e2c91
commit
082acc5ce8
|
@ -8,7 +8,7 @@ import com.yanzhu.common.core.annotation.Excel;
|
||||||
import com.yanzhu.common.core.web.domain.BaseEntity;
|
import com.yanzhu.common.core.web.domain.BaseEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 安全隐患整改对象 smz_ssp_problemmodify
|
* 隐患问题对象 smz_ssp_problemmodify
|
||||||
*
|
*
|
||||||
* @author yanzhu
|
* @author yanzhu
|
||||||
* @date 2025-02-15
|
* @date 2025-02-15
|
||||||
|
@ -17,7 +17,7 @@ public class SmzSspProblemmodify extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** $column.columnComment */
|
/** 编号 */
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 租户ID */
|
/** 租户ID */
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
package com.yanzhu.manage.domain;
|
package com.yanzhu.manage.domain;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
@ -8,7 +10,7 @@ import com.yanzhu.common.core.annotation.Excel;
|
||||||
import com.yanzhu.common.core.web.domain.BaseEntity;
|
import com.yanzhu.common.core.web.domain.BaseEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 安全问题草稿对象 smz_ssp_problemmodify_draft
|
* 隐患草稿对象 smz_ssp_problemmodify_draft
|
||||||
*
|
*
|
||||||
* @author yanzhu
|
* @author yanzhu
|
||||||
* @date 2025-02-15
|
* @date 2025-02-15
|
||||||
|
@ -17,7 +19,7 @@ public class SmzSspProblemmodifyDraft extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** $column.columnComment */
|
/** 编号 */
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 租户ID */
|
/** 租户ID */
|
||||||
|
@ -141,6 +143,8 @@ public class SmzSspProblemmodifyDraft extends BaseEntity
|
||||||
@Excel(name = "问题类型", readConverterExp = "1=常规问题,2专项问题")
|
@Excel(name = "问题类型", readConverterExp = "1=常规问题,2专项问题")
|
||||||
private String problemType;
|
private String problemType;
|
||||||
|
|
||||||
|
private List<List<String>> smarkUrls;
|
||||||
|
|
||||||
public void setId(Long id)
|
public void setId(Long id)
|
||||||
{
|
{
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
@ -421,6 +425,14 @@ public class SmzSspProblemmodifyDraft extends BaseEntity
|
||||||
return problemType;
|
return problemType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<List<String>> getSmarkUrls() {
|
||||||
|
return smarkUrls;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSmarkUrls(List<List<String>> smarkUrls) {
|
||||||
|
this.smarkUrls = smarkUrls;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
|
|
@ -4,7 +4,7 @@ import java.util.List;
|
||||||
import com.yanzhu.manage.domain.SmzSspProblemmodifyDraft;
|
import com.yanzhu.manage.domain.SmzSspProblemmodifyDraft;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 安全问题草稿Mapper接口
|
* 隐患草稿Mapper接口
|
||||||
*
|
*
|
||||||
* @author yanzhu
|
* @author yanzhu
|
||||||
* @date 2025-02-15
|
* @date 2025-02-15
|
||||||
|
@ -12,47 +12,47 @@ import com.yanzhu.manage.domain.SmzSspProblemmodifyDraft;
|
||||||
public interface SmzSspProblemmodifyDraftMapper
|
public interface SmzSspProblemmodifyDraftMapper
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询安全问题草稿
|
* 查询隐患草稿
|
||||||
*
|
*
|
||||||
* @param id 安全问题草稿主键
|
* @param id 隐患草稿主键
|
||||||
* @return 安全问题草稿
|
* @return 隐患草稿
|
||||||
*/
|
*/
|
||||||
public SmzSspProblemmodifyDraft selectSmzSspProblemmodifyDraftById(Long id);
|
public SmzSspProblemmodifyDraft selectSmzSspProblemmodifyDraftById(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询安全问题草稿列表
|
* 查询隐患草稿列表
|
||||||
*
|
*
|
||||||
* @param smzSspProblemmodifyDraft 安全问题草稿
|
* @param smzSspProblemmodifyDraft 隐患草稿
|
||||||
* @return 安全问题草稿集合
|
* @return 隐患草稿集合
|
||||||
*/
|
*/
|
||||||
public List<SmzSspProblemmodifyDraft> selectSmzSspProblemmodifyDraftList(SmzSspProblemmodifyDraft smzSspProblemmodifyDraft);
|
public List<SmzSspProblemmodifyDraft> selectSmzSspProblemmodifyDraftList(SmzSspProblemmodifyDraft smzSspProblemmodifyDraft);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增安全问题草稿
|
* 新增隐患草稿
|
||||||
*
|
*
|
||||||
* @param smzSspProblemmodifyDraft 安全问题草稿
|
* @param smzSspProblemmodifyDraft 隐患草稿
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int insertSmzSspProblemmodifyDraft(SmzSspProblemmodifyDraft smzSspProblemmodifyDraft);
|
public int insertSmzSspProblemmodifyDraft(SmzSspProblemmodifyDraft smzSspProblemmodifyDraft);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改安全问题草稿
|
* 修改隐患草稿
|
||||||
*
|
*
|
||||||
* @param smzSspProblemmodifyDraft 安全问题草稿
|
* @param smzSspProblemmodifyDraft 隐患草稿
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int updateSmzSspProblemmodifyDraft(SmzSspProblemmodifyDraft smzSspProblemmodifyDraft);
|
public int updateSmzSspProblemmodifyDraft(SmzSspProblemmodifyDraft smzSspProblemmodifyDraft);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除安全问题草稿
|
* 删除隐患草稿
|
||||||
*
|
*
|
||||||
* @param id 安全问题草稿主键
|
* @param id 隐患草稿主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteSmzSspProblemmodifyDraftById(Long id);
|
public int deleteSmzSspProblemmodifyDraftById(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除安全问题草稿
|
* 批量删除隐患草稿
|
||||||
*
|
*
|
||||||
* @param ids 需要删除的数据主键集合
|
* @param ids 需要删除的数据主键集合
|
||||||
* @return 结果
|
* @return 结果
|
||||||
|
|
|
@ -6,7 +6,7 @@ import java.util.Map;
|
||||||
import com.yanzhu.manage.domain.SmzSspProblemmodify;
|
import com.yanzhu.manage.domain.SmzSspProblemmodify;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 安全隐患整改Mapper接口
|
* 隐患问题Mapper接口
|
||||||
*
|
*
|
||||||
* @author yanzhu
|
* @author yanzhu
|
||||||
* @date 2025-02-15
|
* @date 2025-02-15
|
||||||
|
@ -14,47 +14,47 @@ import com.yanzhu.manage.domain.SmzSspProblemmodify;
|
||||||
public interface SmzSspProblemmodifyMapper
|
public interface SmzSspProblemmodifyMapper
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询安全隐患整改
|
* 查询隐患问题
|
||||||
*
|
*
|
||||||
* @param id 安全隐患整改主键
|
* @param id 隐患问题主键
|
||||||
* @return 安全隐患整改
|
* @return 隐患问题
|
||||||
*/
|
*/
|
||||||
public SmzSspProblemmodify selectSmzSspProblemmodifyById(Long id);
|
public SmzSspProblemmodify selectSmzSspProblemmodifyById(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询安全隐患整改列表
|
* 查询隐患问题列表
|
||||||
*
|
*
|
||||||
* @param smzSspProblemmodify 安全隐患整改
|
* @param smzSspProblemmodify 隐患问题
|
||||||
* @return 安全隐患整改集合
|
* @return 隐患问题集合
|
||||||
*/
|
*/
|
||||||
public List<SmzSspProblemmodify> selectSmzSspProblemmodifyList(SmzSspProblemmodify smzSspProblemmodify);
|
public List<SmzSspProblemmodify> selectSmzSspProblemmodifyList(SmzSspProblemmodify smzSspProblemmodify);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增安全隐患整改
|
* 新增隐患问题
|
||||||
*
|
*
|
||||||
* @param smzSspProblemmodify 安全隐患整改
|
* @param smzSspProblemmodify 隐患问题
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int insertSmzSspProblemmodify(SmzSspProblemmodify smzSspProblemmodify);
|
public int insertSmzSspProblemmodify(SmzSspProblemmodify smzSspProblemmodify);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改安全隐患整改
|
* 修改隐患问题
|
||||||
*
|
*
|
||||||
* @param smzSspProblemmodify 安全隐患整改
|
* @param smzSspProblemmodify 隐患问题
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int updateSmzSspProblemmodify(SmzSspProblemmodify smzSspProblemmodify);
|
public int updateSmzSspProblemmodify(SmzSspProblemmodify smzSspProblemmodify);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除安全隐患整改
|
* 删除隐患问题
|
||||||
*
|
*
|
||||||
* @param id 安全隐患整改主键
|
* @param id 隐患问题主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteSmzSspProblemmodifyById(Long id);
|
public int deleteSmzSspProblemmodifyById(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除安全隐患整改
|
* 批量删除隐患问题
|
||||||
*
|
*
|
||||||
* @param ids 需要删除的数据主键集合
|
* @param ids 需要删除的数据主键集合
|
||||||
* @return 结果
|
* @return 结果
|
||||||
|
@ -66,12 +66,19 @@ public interface SmzSspProblemmodifyMapper
|
||||||
* @param where
|
* @param where
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<SmzSspProblemmodify> getListCount(SmzSspProblemmodify where);
|
public List<SmzSspProblemmodify> getListCount(SmzSspProblemmodify where);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分组统计
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<Map<String, Object>> getWxListCount(SmzSspProblemmodify where);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分组查询 全部数据、待整改、待复检、整改完成、整改超时的数量
|
* 分组查询 全部数据、待整改、待复检、整改完成、整改超时的数量
|
||||||
* @param where
|
* @param where
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<SmzSspProblemmodify> selectList(SmzSspProblemmodify where);
|
public List<SmzSspProblemmodify> selectList(SmzSspProblemmodify where);
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<result property="problemTypeName" column="problemTypeName" />
|
<result property="problemTypeName" column="problemTypeName" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectSmzSspProblemmodifyVo">
|
<select id="selectSmzSspProblemmodifyList" parameterType="SmzSspProblemmodify" resultMap="SmzSspProblemmodifyResult">
|
||||||
select
|
select
|
||||||
ssp.id,
|
ssp.id,
|
||||||
ssp.comId,
|
ssp.comId,
|
||||||
|
@ -72,7 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
ssp.smark_url,
|
ssp.smark_url,
|
||||||
ssp.isDel,
|
ssp.isDel,
|
||||||
ssp.createUser,
|
ssp.createUser,
|
||||||
su.nick_name as createUserName
|
su.nick_name as createUserName,
|
||||||
ssp.createTime,
|
ssp.createTime,
|
||||||
ssp.updateUser,
|
ssp.updateUser,
|
||||||
ssp.updateTime,
|
ssp.updateTime,
|
||||||
|
@ -83,6 +83,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
ssp.roleType,
|
ssp.roleType,
|
||||||
ssp.problemType,
|
ssp.problemType,
|
||||||
sdd1.dict_label AS problemTypeName
|
sdd1.dict_label AS problemTypeName
|
||||||
|
<if test="createBy != null and createBy != ''">, case when ssp.recheckSend = #{createBy} and ssp.checkState=1 then 0
|
||||||
|
when ssp.lordSentUser = #{createBy} then 1
|
||||||
|
else 2 end sort
|
||||||
|
</if>
|
||||||
from
|
from
|
||||||
smz_ssp_problemmodify ssp
|
smz_ssp_problemmodify ssp
|
||||||
left join sys_dict_data sdd1 on sdd1.dict_type = 'ssp_proble_type'
|
left join sys_dict_data sdd1 on sdd1.dict_type = 'ssp_proble_type'
|
||||||
|
@ -90,10 +94,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
left join sys_dict_data sdd2 on sdd2.dict_type = 'ssp_proble_sub_type'
|
left join sys_dict_data sdd2 on sdd2.dict_type = 'ssp_proble_sub_type'
|
||||||
and sdd2.dict_value = ssp.danger_type
|
and sdd2.dict_value = ssp.danger_type
|
||||||
left join sys_user su on su.user_id = ssp.createUser
|
left join sys_user su on su.user_id = ssp.createUser
|
||||||
</sql>
|
|
||||||
|
|
||||||
<select id="selectSmzSspProblemmodifyList" parameterType="SmzSspProblemmodify" resultMap="SmzSspProblemmodifyResult">
|
|
||||||
<include refid="selectSmzSspProblemmodifyVo"/>
|
|
||||||
<where>
|
<where>
|
||||||
<if test="comId != null "> and ssp.comId = #{comId}</if>
|
<if test="comId != null "> and ssp.comId = #{comId}</if>
|
||||||
<if test="projectId != null "> and ssp.projectId = #{projectId}</if>
|
<if test="projectId != null "> and ssp.projectId = #{projectId}</if>
|
||||||
|
@ -116,13 +116,61 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
ssp.createUser=#{currentUserId} or ssp.lordSent=#{currentUserId} or find_in_set(#{currentUserId},ssp.copySend) or ssp.recheckSend=#{currentUserId}
|
ssp.createUser=#{currentUserId} or ssp.lordSent=#{currentUserId} or find_in_set(#{currentUserId},ssp.copySend) or ssp.recheckSend=#{currentUserId}
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
and isDel = 0
|
<if test='activeTags == "dzg"'> and ssp.checkState in (0,3) </if>
|
||||||
|
<if test='activeTags == "yzg"'> and ssp.checkState in (1,4) </if>
|
||||||
|
<if test='activeTags == "dfj"'> and ssp.checkState = 1 </if>
|
||||||
|
<if test='activeTags == "ywc"'> and ssp.checkState = 4 </if>
|
||||||
|
and ssp.isDel = 0
|
||||||
</where>
|
</where>
|
||||||
order by ssp.id desc
|
order by sort, ssp.id desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectSmzSspProblemmodifyById" parameterType="Long" resultMap="SmzSspProblemmodifyResult">
|
<select id="selectSmzSspProblemmodifyById" parameterType="Long" resultMap="SmzSspProblemmodifyResult">
|
||||||
<include refid="selectSmzSspProblemmodifyVo"/>
|
select
|
||||||
|
ssp.id,
|
||||||
|
ssp.comId,
|
||||||
|
ssp.projectId,
|
||||||
|
ssp.infoType,
|
||||||
|
ssp.marks_picture,
|
||||||
|
ssp.marks_video,
|
||||||
|
ssp.correction_picture,
|
||||||
|
ssp.problemArea,
|
||||||
|
ssp.workParts,
|
||||||
|
ssp.changeInfo,
|
||||||
|
ssp.lordSent,
|
||||||
|
ssp.lordSentUser,
|
||||||
|
ssp.copySend,
|
||||||
|
ssp.copySendUser,
|
||||||
|
ssp.checkState,
|
||||||
|
ssp.nickedArea,
|
||||||
|
ssp.nickedTime,
|
||||||
|
ssp.projectType,
|
||||||
|
ssp.processName,
|
||||||
|
ssp.projectName,
|
||||||
|
ssp.nickedInfo,
|
||||||
|
ssp.checkUser,
|
||||||
|
ssp.checkUserPhone,
|
||||||
|
ssp.smark_url,
|
||||||
|
ssp.isDel,
|
||||||
|
ssp.createUser,
|
||||||
|
su.nick_name as createUserName,
|
||||||
|
ssp.createTime,
|
||||||
|
ssp.updateUser,
|
||||||
|
ssp.updateTime,
|
||||||
|
ssp.danger_type,
|
||||||
|
sdd2.dict_label AS danger_type_name,
|
||||||
|
ssp.recheckSend,
|
||||||
|
ssp.recheckSendUser,
|
||||||
|
ssp.roleType,
|
||||||
|
ssp.problemType,
|
||||||
|
sdd1.dict_label AS problemTypeName
|
||||||
|
from
|
||||||
|
smz_ssp_problemmodify ssp
|
||||||
|
left join sys_dict_data sdd1 on sdd1.dict_type = 'ssp_proble_type'
|
||||||
|
and sdd1.dict_value = ssp.problemType
|
||||||
|
left join sys_dict_data sdd2 on sdd2.dict_type = 'ssp_proble_sub_type'
|
||||||
|
and sdd2.dict_value = ssp.danger_type
|
||||||
|
left join sys_user su on su.user_id = ssp.createUser
|
||||||
where ssp.id = #{id}
|
where ssp.id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -250,6 +298,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<sql id="countUserWhere">
|
<sql id="countUserWhere">
|
||||||
<if test="problemType != null and problemType != ''"> and a,problemType = #{problemType}</if>
|
<if test="problemType != null and problemType != ''"> and a,problemType = #{problemType}</if>
|
||||||
<if test="dangerType != null and dangerType != ''"> and a.danger_type = #{dangerType}</if>
|
<if test="dangerType != null and dangerType != ''"> and a.danger_type = #{dangerType}</if>
|
||||||
|
@ -282,6 +331,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<include refid="countUserWhere"></include>
|
<include refid="countUserWhere"></include>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getWxListCount" parameterType="SmzSspProblemmodify" resultType="Map">
|
||||||
|
select ssp.checkState, count(1) as total from smz_ssp_problemmodify ssp
|
||||||
|
<where>
|
||||||
|
<if test="comId != null "> and ssp.comId = #{comId}</if>
|
||||||
|
<if test="projectId != null "> and ssp.projectId = #{projectId}</if>
|
||||||
|
<if test="infoType != null "> and ssp.infoType = #{infoType}</if>
|
||||||
|
<if test="currentUserId != null and currentUserId!=''">
|
||||||
|
and
|
||||||
|
(
|
||||||
|
ssp.createUser=#{currentUserId} or ssp.lordSent=#{currentUserId} or find_in_set(#{currentUserId},ssp.copySend) or ssp.recheckSend=#{currentUserId}
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
and ssp.isDel = 0
|
||||||
|
</where>
|
||||||
|
group by ssp.checkState
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectList" parameterType="SmzSspProblemmodify" resultMap="SmzSspProblemmodifyResult">
|
<select id="selectList" parameterType="SmzSspProblemmodify" resultMap="SmzSspProblemmodifyResult">
|
||||||
SELECT
|
SELECT
|
||||||
a.id,
|
a.id,
|
||||||
|
|
|
@ -168,11 +168,13 @@
|
||||||
<scope>system</scope>
|
<scope>system</scope>
|
||||||
<systemPath>${pom.basedir}/libs/aspose-tasks-24.10-jdk17.jar</systemPath>
|
<systemPath>${pom.basedir}/libs/aspose-tasks-24.10-jdk17.jar</systemPath>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.sf.mpxj</groupId>
|
<groupId>net.sf.mpxj</groupId>
|
||||||
<artifactId>mpxj</artifactId>
|
<artifactId>mpxj</artifactId>
|
||||||
<version>13.5.1</version> <!-- 请检查最新版本 -->
|
<version>13.5.1</version> <!-- 请检查最新版本 -->
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.yanzhu.manage.controller;
|
package com.yanzhu.manage.controller;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
@ -28,7 +29,7 @@ import com.yanzhu.common.log.enums.BusinessType;
|
||||||
import com.yanzhu.common.security.annotation.RequiresPermissions;
|
import com.yanzhu.common.security.annotation.RequiresPermissions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 安全隐患整改Controller
|
* 隐患问题Controller
|
||||||
*
|
*
|
||||||
* @author yanzhu
|
* @author yanzhu
|
||||||
* @date 2025-02-15
|
* @date 2025-02-15
|
||||||
|
@ -41,13 +42,13 @@ public class SmzSspProblemmodifyController extends BaseController
|
||||||
private ISmzSspProblemmodifyService smzSspProblemmodifyService;
|
private ISmzSspProblemmodifyService smzSspProblemmodifyService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询安全隐患整改列表
|
* 查询隐患问题列表
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("trouble:problemmodify:list")
|
@RequiresPermissions("trouble:problemmodify:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(SmzSspProblemmodify where)
|
public TableDataInfo list(SmzSspProblemmodify where)
|
||||||
{
|
{
|
||||||
SysUser user=SecurityUtils.getLoginUser().getSysUser();
|
SysUser user = SecurityUtils.getLoginUser().getSysUser();
|
||||||
where.setProjectId(user.getActiveProjectId());
|
where.setProjectId(user.getActiveProjectId());
|
||||||
where.setComId(user.getActiveComId());
|
where.setComId(user.getActiveComId());
|
||||||
if(SecurityUtils.isAdmin(SecurityUtils.getUserId()) || SecurityUtils.isGSAdmin()) {
|
if(SecurityUtils.isAdmin(SecurityUtils.getUserId()) || SecurityUtils.isGSAdmin()) {
|
||||||
|
@ -60,6 +61,25 @@ public class SmzSspProblemmodifyController extends BaseController
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询隐患问题列表
|
||||||
|
* @RequiresPermissions("trouble:problemmodify:list")
|
||||||
|
*/
|
||||||
|
@GetMapping("/wxList")
|
||||||
|
public TableDataInfo wxList(SmzSspProblemmodify where)
|
||||||
|
{
|
||||||
|
SysUser user = SecurityUtils.getLoginUser().getSysUser();
|
||||||
|
if(SecurityUtils.isAdmin(SecurityUtils.getUserId()) || SecurityUtils.isGSAdmin()) {
|
||||||
|
where.setCurrentUserId(null);
|
||||||
|
}else{
|
||||||
|
where.setCurrentUserId(user.getUserId());
|
||||||
|
}
|
||||||
|
where.setCreateBy(user.getUserId().toString());
|
||||||
|
startPage();
|
||||||
|
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSmzSspProblemmodifyList(where);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分组统计 用户 全部数据、待整改、待复检、整改完成、整改超时的数量
|
* 分组统计 用户 全部数据、待整改、待复检、整改完成、整改超时的数量
|
||||||
* @return
|
* @return
|
||||||
|
@ -78,21 +98,66 @@ public class SmzSspProblemmodifyController extends BaseController
|
||||||
List<SmzSspProblemmodify> result=smzSspProblemmodifyService.getListCount(where);
|
List<SmzSspProblemmodify> result=smzSspProblemmodifyService.getListCount(where);
|
||||||
return AjaxResult.success(result);
|
return AjaxResult.success(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出安全隐患整改列表
|
* 分组统计 用户 全部数据、待整改、待复检、整改完成、整改超时的数量
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/wxListCount")
|
||||||
|
public AjaxResult getWxListCount(SmzSspProblemmodify where){
|
||||||
|
SysUser user = SecurityUtils.getLoginUser().getSysUser();
|
||||||
|
if(SecurityUtils.isAdmin(SecurityUtils.getUserId()) || SecurityUtils.isGSAdmin()) {
|
||||||
|
where.setCurrentUserId(null);
|
||||||
|
}else{
|
||||||
|
where.setCurrentUserId(user.getUserId());
|
||||||
|
}
|
||||||
|
List<Map<String, Object>> result=smzSspProblemmodifyService.getWxListCount(where);
|
||||||
|
Map<String, Object> data = new HashMap<>();
|
||||||
|
int dzg=0,yzg=0,dfj=0,ywc=0;
|
||||||
|
if(result.size()>0){
|
||||||
|
for (Map<String, Object> map:result){
|
||||||
|
// 待整改
|
||||||
|
if(StringUtils.eqObj(map.get("checkState"),"0")){
|
||||||
|
dzg += Convert.toInt(map.get("total"),0);
|
||||||
|
}
|
||||||
|
// 待复检
|
||||||
|
if(StringUtils.eqObj(map.get("checkState"),"1")){
|
||||||
|
dfj += Convert.toInt(map.get("total"),0);
|
||||||
|
yzg += Convert.toInt(map.get("total"),0);
|
||||||
|
}
|
||||||
|
// 复检驳回
|
||||||
|
if(StringUtils.eqObj(map.get("checkState"),"3")){
|
||||||
|
dzg += Convert.toInt(map.get("total"),0);
|
||||||
|
}
|
||||||
|
// 整改完成
|
||||||
|
if(StringUtils.eqObj(map.get("checkState"),"4")){
|
||||||
|
ywc += Convert.toInt(map.get("total"),0);
|
||||||
|
yzg += Convert.toInt(map.get("total"),0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
data.put("dzg",dzg);
|
||||||
|
data.put("yzg",yzg);
|
||||||
|
data.put("dfj",dfj);
|
||||||
|
data.put("ywc",ywc);
|
||||||
|
return AjaxResult.success(data);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出隐患问题列表
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("trouble:problemmodify:export")
|
@RequiresPermissions("trouble:problemmodify:export")
|
||||||
@Log(title = "安全隐患整改", businessType = BusinessType.EXPORT)
|
@Log(title = "隐患问题", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, SmzSspProblemmodify smzSspProblemmodify)
|
public void export(HttpServletResponse response, SmzSspProblemmodify smzSspProblemmodify)
|
||||||
{
|
{
|
||||||
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSmzSspProblemmodifyList(smzSspProblemmodify);
|
List<SmzSspProblemmodify> list = smzSspProblemmodifyService.selectSmzSspProblemmodifyList(smzSspProblemmodify);
|
||||||
ExcelUtil<SmzSspProblemmodify> util = new ExcelUtil<SmzSspProblemmodify>(SmzSspProblemmodify.class);
|
ExcelUtil<SmzSspProblemmodify> util = new ExcelUtil<SmzSspProblemmodify>(SmzSspProblemmodify.class);
|
||||||
util.exportExcel(response, list, "安全隐患整改数据");
|
util.exportExcel(response, list, "隐患问题数据");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取安全隐患整改详细信息
|
* 获取隐患问题详细信息
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("trouble:problemmodify:query")
|
@RequiresPermissions("trouble:problemmodify:query")
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
|
@ -102,10 +167,10 @@ public class SmzSspProblemmodifyController extends BaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增安全隐患整改
|
* 新增隐患问题
|
||||||
|
* @RequiresPermissions("trouble:problemmodify:add")
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("trouble:problemmodify:add")
|
@Log(title = "隐患问题", businessType = BusinessType.INSERT)
|
||||||
@Log(title = "安全隐患整改", businessType = BusinessType.INSERT)
|
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody SmzSspProblemmodify smzSspProblemmodify)
|
public AjaxResult add(@RequestBody SmzSspProblemmodify smzSspProblemmodify)
|
||||||
{
|
{
|
||||||
|
@ -113,10 +178,10 @@ public class SmzSspProblemmodifyController extends BaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增安全隐患整改
|
* 新增隐患问题
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("trouble:problemmodify:add")
|
@RequiresPermissions("trouble:problemmodify:add")
|
||||||
@Log(title = "安全隐患整改", businessType = BusinessType.INSERT)
|
@Log(title = "隐患问题", businessType = BusinessType.INSERT)
|
||||||
@PostMapping("/batchAdd")
|
@PostMapping("/batchAdd")
|
||||||
public AjaxResult batchAdd(@RequestBody List<SmzSspProblemmodify> list)
|
public AjaxResult batchAdd(@RequestBody List<SmzSspProblemmodify> list)
|
||||||
{
|
{
|
||||||
|
@ -125,10 +190,10 @@ public class SmzSspProblemmodifyController extends BaseController
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改安全隐患整改
|
* 修改隐患问题
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("trouble:problemmodify:edit")
|
@RequiresPermissions("trouble:problemmodify:edit")
|
||||||
@Log(title = "安全隐患整改", businessType = BusinessType.UPDATE)
|
@Log(title = "隐患问题", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody SmzSspProblemmodify smzSspProblemmodify)
|
public AjaxResult edit(@RequestBody SmzSspProblemmodify smzSspProblemmodify)
|
||||||
{
|
{
|
||||||
|
@ -136,10 +201,10 @@ public class SmzSspProblemmodifyController extends BaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除安全隐患整改
|
* 删除隐患问题
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("trouble:problemmodify:remove")
|
@RequiresPermissions("trouble:problemmodify:remove")
|
||||||
@Log(title = "安全隐患整改", businessType = BusinessType.DELETE)
|
@Log(title = "隐患问题", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public AjaxResult remove(@PathVariable Long[] ids)
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,7 +23,7 @@ import com.yanzhu.common.log.enums.BusinessType;
|
||||||
import com.yanzhu.common.security.annotation.RequiresPermissions;
|
import com.yanzhu.common.security.annotation.RequiresPermissions;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 安全问题草稿Controller
|
* 隐患草稿Controller
|
||||||
*
|
*
|
||||||
* @author yanzhu
|
* @author yanzhu
|
||||||
* @date 2025-02-15
|
* @date 2025-02-15
|
||||||
|
@ -36,7 +36,7 @@ public class SmzSspProblemmodifyDraftController extends BaseController
|
||||||
private ISmzSspProblemmodifyDraftService smzSspProblemmodifyDraftService;
|
private ISmzSspProblemmodifyDraftService smzSspProblemmodifyDraftService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询安全问题草稿列表
|
* 查询隐患草稿列表
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("trouble:problemmodifyDraft:list")
|
@RequiresPermissions("trouble:problemmodifyDraft:list")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
|
@ -48,20 +48,20 @@ public class SmzSspProblemmodifyDraftController extends BaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出安全问题草稿列表
|
* 导出隐患草稿列表
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("trouble:problemmodifyDraft:export")
|
@RequiresPermissions("trouble:problemmodifyDraft:export")
|
||||||
@Log(title = "安全问题草稿", businessType = BusinessType.EXPORT)
|
@Log(title = "隐患草稿", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, SmzSspProblemmodifyDraft smzSspProblemmodifyDraft)
|
public void export(HttpServletResponse response, SmzSspProblemmodifyDraft smzSspProblemmodifyDraft)
|
||||||
{
|
{
|
||||||
List<SmzSspProblemmodifyDraft> list = smzSspProblemmodifyDraftService.selectSmzSspProblemmodifyDraftList(smzSspProblemmodifyDraft);
|
List<SmzSspProblemmodifyDraft> list = smzSspProblemmodifyDraftService.selectSmzSspProblemmodifyDraftList(smzSspProblemmodifyDraft);
|
||||||
ExcelUtil<SmzSspProblemmodifyDraft> util = new ExcelUtil<SmzSspProblemmodifyDraft>(SmzSspProblemmodifyDraft.class);
|
ExcelUtil<SmzSspProblemmodifyDraft> util = new ExcelUtil<SmzSspProblemmodifyDraft>(SmzSspProblemmodifyDraft.class);
|
||||||
util.exportExcel(response, list, "安全问题草稿数据");
|
util.exportExcel(response, list, "隐患草稿数据");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取安全问题草稿详细信息
|
* 获取隐患草稿详细信息
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("trouble:problemmodifyDraft:query")
|
@RequiresPermissions("trouble:problemmodifyDraft:query")
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
|
@ -71,10 +71,10 @@ public class SmzSspProblemmodifyDraftController extends BaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增安全问题草稿
|
* 新增隐患草稿
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("trouble:problemmodifyDraft:add")
|
@RequiresPermissions("trouble:problemmodifyDraft:add")
|
||||||
@Log(title = "安全问题草稿", businessType = BusinessType.INSERT)
|
@Log(title = "隐患草稿", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody SmzSspProblemmodifyDraft smzSspProblemmodifyDraft)
|
public AjaxResult add(@RequestBody SmzSspProblemmodifyDraft smzSspProblemmodifyDraft)
|
||||||
{
|
{
|
||||||
|
@ -82,10 +82,21 @@ public class SmzSspProblemmodifyDraftController extends BaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改安全问题草稿
|
* 新增隐患草稿
|
||||||
|
* @RequiresPermissions("trouble:problemmodifyDraft:add")
|
||||||
|
*/
|
||||||
|
@Log(title = "隐患草稿", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping("/addDraft")
|
||||||
|
public AjaxResult addDraft(@RequestBody SmzSspProblemmodifyDraft smzSspProblemmodifyDraft)
|
||||||
|
{
|
||||||
|
return toAjax(smzSspProblemmodifyDraftService.insertSmzSspProblemmodifyDraftWx(smzSspProblemmodifyDraft));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改隐患草稿
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("trouble:problemmodifyDraft:edit")
|
@RequiresPermissions("trouble:problemmodifyDraft:edit")
|
||||||
@Log(title = "安全问题草稿", businessType = BusinessType.UPDATE)
|
@Log(title = "隐患草稿", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody SmzSspProblemmodifyDraft smzSspProblemmodifyDraft)
|
public AjaxResult edit(@RequestBody SmzSspProblemmodifyDraft smzSspProblemmodifyDraft)
|
||||||
{
|
{
|
||||||
|
@ -93,10 +104,10 @@ public class SmzSspProblemmodifyDraftController extends BaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除安全问题草稿
|
* 删除隐患草稿
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("trouble:problemmodifyDraft:remove")
|
@RequiresPermissions("trouble:problemmodifyDraft:remove")
|
||||||
@Log(title = "安全问题草稿", businessType = BusinessType.DELETE)
|
@Log(title = "隐患草稿", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public AjaxResult remove(@PathVariable Long[] ids)
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,6 +4,9 @@ import com.yanzhu.common.core.utils.StringUtils;
|
||||||
|
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 业务模板类型
|
||||||
|
*/
|
||||||
public enum BasTemTypes {
|
public enum BasTemTypes {
|
||||||
|
|
||||||
DLR("1", "委托代理人"),
|
DLR("1", "委托代理人"),
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.yanzhu.manage.enums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 隐患状态枚举
|
||||||
|
*/
|
||||||
|
public enum CheckStateEnums {
|
||||||
|
|
||||||
|
DZG(0L, "待整改"),
|
||||||
|
DFJ(1L, "待复检"),
|
||||||
|
ZGBH(3L, "整改驳回"),
|
||||||
|
ZGWC(4L, "整改完成");
|
||||||
|
|
||||||
|
private final Long code;
|
||||||
|
private final String info;
|
||||||
|
|
||||||
|
CheckStateEnums(Long code, String info)
|
||||||
|
{
|
||||||
|
this.code = code;
|
||||||
|
this.info = info;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCode()
|
||||||
|
{
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getInfo()
|
||||||
|
{
|
||||||
|
return info;
|
||||||
|
}
|
||||||
|
}
|
|
@ -4,7 +4,7 @@ import java.util.List;
|
||||||
import com.yanzhu.manage.domain.SmzSspProblemmodifyDraft;
|
import com.yanzhu.manage.domain.SmzSspProblemmodifyDraft;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 安全问题草稿Service接口
|
* 隐患草稿Service接口
|
||||||
*
|
*
|
||||||
* @author yanzhu
|
* @author yanzhu
|
||||||
* @date 2025-02-15
|
* @date 2025-02-15
|
||||||
|
@ -12,49 +12,57 @@ import com.yanzhu.manage.domain.SmzSspProblemmodifyDraft;
|
||||||
public interface ISmzSspProblemmodifyDraftService
|
public interface ISmzSspProblemmodifyDraftService
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询安全问题草稿
|
* 查询隐患草稿
|
||||||
*
|
*
|
||||||
* @param id 安全问题草稿主键
|
* @param id 隐患草稿主键
|
||||||
* @return 安全问题草稿
|
* @return 隐患草稿
|
||||||
*/
|
*/
|
||||||
public SmzSspProblemmodifyDraft selectSmzSspProblemmodifyDraftById(Long id);
|
public SmzSspProblemmodifyDraft selectSmzSspProblemmodifyDraftById(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询安全问题草稿列表
|
* 查询隐患草稿列表
|
||||||
*
|
*
|
||||||
* @param smzSspProblemmodifyDraft 安全问题草稿
|
* @param smzSspProblemmodifyDraft 隐患草稿
|
||||||
* @return 安全问题草稿集合
|
* @return 隐患草稿集合
|
||||||
*/
|
*/
|
||||||
public List<SmzSspProblemmodifyDraft> selectSmzSspProblemmodifyDraftList(SmzSspProblemmodifyDraft smzSspProblemmodifyDraft);
|
public List<SmzSspProblemmodifyDraft> selectSmzSspProblemmodifyDraftList(SmzSspProblemmodifyDraft smzSspProblemmodifyDraft);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增安全问题草稿
|
* 新增隐患草稿
|
||||||
*
|
*
|
||||||
* @param smzSspProblemmodifyDraft 安全问题草稿
|
* @param smzSspProblemmodifyDraft 隐患草稿
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int insertSmzSspProblemmodifyDraft(SmzSspProblemmodifyDraft smzSspProblemmodifyDraft);
|
public int insertSmzSspProblemmodifyDraft(SmzSspProblemmodifyDraft smzSspProblemmodifyDraft);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改安全问题草稿
|
* 新增隐患草稿
|
||||||
|
*
|
||||||
|
* @param smzSspProblemmodifyDraft 隐患草稿
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSmzSspProblemmodifyDraftWx(SmzSspProblemmodifyDraft smzSspProblemmodifyDraft);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改隐患草稿
|
||||||
*
|
*
|
||||||
* @param smzSspProblemmodifyDraft 安全问题草稿
|
* @param smzSspProblemmodifyDraft 隐患草稿
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int updateSmzSspProblemmodifyDraft(SmzSspProblemmodifyDraft smzSspProblemmodifyDraft);
|
public int updateSmzSspProblemmodifyDraft(SmzSspProblemmodifyDraft smzSspProblemmodifyDraft);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除安全问题草稿
|
* 批量删除隐患草稿
|
||||||
*
|
*
|
||||||
* @param ids 需要删除的安全问题草稿主键集合
|
* @param ids 需要删除的隐患草稿主键集合
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteSmzSspProblemmodifyDraftByIds(Long[] ids);
|
public int deleteSmzSspProblemmodifyDraftByIds(Long[] ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除安全问题草稿信息
|
* 删除隐患草稿信息
|
||||||
*
|
*
|
||||||
* @param id 安全问题草稿主键
|
* @param id 隐患草稿主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteSmzSspProblemmodifyDraftById(Long id);
|
public int deleteSmzSspProblemmodifyDraftById(Long id);
|
||||||
|
|
|
@ -6,7 +6,7 @@ import java.util.Map;
|
||||||
import com.yanzhu.manage.domain.SmzSspProblemmodify;
|
import com.yanzhu.manage.domain.SmzSspProblemmodify;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 安全隐患整改Service接口
|
* 隐患问题Service接口
|
||||||
*
|
*
|
||||||
* @author yanzhu
|
* @author yanzhu
|
||||||
* @date 2025-02-15
|
* @date 2025-02-15
|
||||||
|
@ -14,49 +14,49 @@ import com.yanzhu.manage.domain.SmzSspProblemmodify;
|
||||||
public interface ISmzSspProblemmodifyService
|
public interface ISmzSspProblemmodifyService
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询安全隐患整改
|
* 查询隐患问题
|
||||||
*
|
*
|
||||||
* @param id 安全隐患整改主键
|
* @param id 隐患问题主键
|
||||||
* @return 安全隐患整改
|
* @return 隐患问题
|
||||||
*/
|
*/
|
||||||
public SmzSspProblemmodify selectSmzSspProblemmodifyById(Long id);
|
public SmzSspProblemmodify selectSmzSspProblemmodifyById(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询安全隐患整改列表
|
* 查询隐患问题列表
|
||||||
*
|
*
|
||||||
* @param smzSspProblemmodify 安全隐患整改
|
* @param smzSspProblemmodify 隐患问题
|
||||||
* @return 安全隐患整改集合
|
* @return 隐患问题集合
|
||||||
*/
|
*/
|
||||||
public List<SmzSspProblemmodify> selectSmzSspProblemmodifyList(SmzSspProblemmodify smzSspProblemmodify);
|
public List<SmzSspProblemmodify> selectSmzSspProblemmodifyList(SmzSspProblemmodify smzSspProblemmodify);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增安全隐患整改
|
* 新增隐患问题
|
||||||
*
|
*
|
||||||
* @param smzSspProblemmodify 安全隐患整改
|
* @param smzSspProblemmodify 隐患问题
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int insertSmzSspProblemmodify(SmzSspProblemmodify smzSspProblemmodify);
|
public int insertSmzSspProblemmodify(SmzSspProblemmodify smzSspProblemmodify);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改安全隐患整改
|
* 修改隐患问题
|
||||||
*
|
*
|
||||||
* @param smzSspProblemmodify 安全隐患整改
|
* @param smzSspProblemmodify 隐患问题
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int updateSmzSspProblemmodify(SmzSspProblemmodify smzSspProblemmodify);
|
public int updateSmzSspProblemmodify(SmzSspProblemmodify smzSspProblemmodify);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除安全隐患整改
|
* 批量删除隐患问题
|
||||||
*
|
*
|
||||||
* @param ids 需要删除的安全隐患整改主键集合
|
* @param ids 需要删除的隐患问题主键集合
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteSmzSspProblemmodifyByIds(Long[] ids);
|
public int deleteSmzSspProblemmodifyByIds(Long[] ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除安全隐患整改信息
|
* 删除隐患问题信息
|
||||||
*
|
*
|
||||||
* @param id 安全隐患整改主键
|
* @param id 隐患问题主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteSmzSspProblemmodifyById(Long id);
|
public int deleteSmzSspProblemmodifyById(Long id);
|
||||||
|
@ -68,12 +68,19 @@ public interface ISmzSspProblemmodifyService
|
||||||
* @param where
|
* @param where
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<SmzSspProblemmodify> getListCount(SmzSspProblemmodify where);
|
public List<SmzSspProblemmodify> getListCount(SmzSspProblemmodify where);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分组统计
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<Map<String, Object>> getWxListCount(SmzSspProblemmodify where);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分组查询 全部数据、待整改、待复检、整改完成、整改超时的数量
|
* 分组查询 全部数据、待整改、待复检、整改完成、整改超时的数量
|
||||||
* @param where
|
* @param where
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<SmzSspProblemmodify> selectList(SmzSspProblemmodify where);
|
public List<SmzSspProblemmodify> selectList(SmzSspProblemmodify where);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
package com.yanzhu.manage.service.impl;
|
package com.yanzhu.manage.service.impl;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
|
import com.yanzhu.common.core.enums.IsDelEnums;
|
||||||
import com.yanzhu.common.core.utils.DateUtils;
|
import com.yanzhu.common.core.utils.DateUtils;
|
||||||
|
import com.yanzhu.common.security.utils.SecurityUtils;
|
||||||
|
import com.yanzhu.manage.enums.CheckStateEnums;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.yanzhu.manage.mapper.SmzSspProblemmodifyDraftMapper;
|
import com.yanzhu.manage.mapper.SmzSspProblemmodifyDraftMapper;
|
||||||
|
@ -10,7 +15,7 @@ import com.yanzhu.manage.domain.SmzSspProblemmodifyDraft;
|
||||||
import com.yanzhu.manage.service.ISmzSspProblemmodifyDraftService;
|
import com.yanzhu.manage.service.ISmzSspProblemmodifyDraftService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 安全问题草稿Service业务层处理
|
* 隐患草稿Service业务层处理
|
||||||
*
|
*
|
||||||
* @author yanzhu
|
* @author yanzhu
|
||||||
* @date 2025-02-15
|
* @date 2025-02-15
|
||||||
|
@ -22,10 +27,10 @@ public class SmzSspProblemmodifyDraftServiceImpl implements ISmzSspProblemmodify
|
||||||
private SmzSspProblemmodifyDraftMapper smzSspProblemmodifyDraftMapper;
|
private SmzSspProblemmodifyDraftMapper smzSspProblemmodifyDraftMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询安全问题草稿
|
* 查询隐患草稿
|
||||||
*
|
*
|
||||||
* @param id 安全问题草稿主键
|
* @param id 隐患草稿主键
|
||||||
* @return 安全问题草稿
|
* @return 隐患草稿
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public SmzSspProblemmodifyDraft selectSmzSspProblemmodifyDraftById(Long id)
|
public SmzSspProblemmodifyDraft selectSmzSspProblemmodifyDraftById(Long id)
|
||||||
|
@ -34,10 +39,10 @@ public class SmzSspProblemmodifyDraftServiceImpl implements ISmzSspProblemmodify
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询安全问题草稿列表
|
* 查询隐患草稿列表
|
||||||
*
|
*
|
||||||
* @param smzSspProblemmodifyDraft 安全问题草稿
|
* @param smzSspProblemmodifyDraft 隐患草稿
|
||||||
* @return 安全问题草稿
|
* @return 隐患草稿
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<SmzSspProblemmodifyDraft> selectSmzSspProblemmodifyDraftList(SmzSspProblemmodifyDraft smzSspProblemmodifyDraft)
|
public List<SmzSspProblemmodifyDraft> selectSmzSspProblemmodifyDraftList(SmzSspProblemmodifyDraft smzSspProblemmodifyDraft)
|
||||||
|
@ -46,9 +51,9 @@ public class SmzSspProblemmodifyDraftServiceImpl implements ISmzSspProblemmodify
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增安全问题草稿
|
* 新增隐患草稿
|
||||||
*
|
*
|
||||||
* @param smzSspProblemmodifyDraft 安全问题草稿
|
* @param smzSspProblemmodifyDraft 隐患草稿
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -59,9 +64,36 @@ public class SmzSspProblemmodifyDraftServiceImpl implements ISmzSspProblemmodify
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改安全问题草稿
|
* 新增隐患草稿
|
||||||
|
*
|
||||||
|
* @param smzSspProblemmodifyDraft 隐患草稿
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSmzSspProblemmodifyDraftWx(SmzSspProblemmodifyDraft smzSspProblemmodifyDraft){
|
||||||
|
AtomicInteger count = new AtomicInteger();
|
||||||
|
for(List<String> urls:smzSspProblemmodifyDraft.getSmarkUrls()){
|
||||||
|
SmzSspProblemmodifyDraft entity = new SmzSspProblemmodifyDraft();
|
||||||
|
entity.setComId(smzSspProblemmodifyDraft.getComId());
|
||||||
|
entity.setProjectId(smzSspProblemmodifyDraft.getProjectId());
|
||||||
|
entity.setInfoType(smzSspProblemmodifyDraft.getInfoType());
|
||||||
|
entity.setProblemType(smzSspProblemmodifyDraft.getProblemType());
|
||||||
|
entity.setLordSent(smzSspProblemmodifyDraft.getLordSent());
|
||||||
|
entity.setLordSentUser(smzSspProblemmodifyDraft.getLordSentUser());
|
||||||
|
entity.setSmarkUrl(String.join(",", urls));
|
||||||
|
entity.setIsDel(IsDelEnums.NO.getCode());
|
||||||
|
entity.setCheckState(CheckStateEnums.DZG.getCode());
|
||||||
|
entity.setCreateUser(SecurityUtils.getUserId().toString());
|
||||||
|
entity.setCreateTime(new Date());
|
||||||
|
int res = smzSspProblemmodifyDraftMapper.insertSmzSspProblemmodifyDraft(entity);
|
||||||
|
count.addAndGet(res);
|
||||||
|
}
|
||||||
|
return count.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改隐患草稿
|
||||||
*
|
*
|
||||||
* @param smzSspProblemmodifyDraft 安全问题草稿
|
* @param smzSspProblemmodifyDraft 隐患草稿
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -72,9 +104,9 @@ public class SmzSspProblemmodifyDraftServiceImpl implements ISmzSspProblemmodify
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除安全问题草稿
|
* 批量删除隐患草稿
|
||||||
*
|
*
|
||||||
* @param ids 需要删除的安全问题草稿主键
|
* @param ids 需要删除的隐患草稿主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -84,9 +116,9 @@ public class SmzSspProblemmodifyDraftServiceImpl implements ISmzSspProblemmodify
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除安全问题草稿信息
|
* 删除隐患草稿信息
|
||||||
*
|
*
|
||||||
* @param id 安全问题草稿主键
|
* @param id 隐患草稿主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
package com.yanzhu.manage.service.impl;
|
package com.yanzhu.manage.service.impl;
|
||||||
|
|
||||||
|
import com.yanzhu.common.core.utils.DateUtils;
|
||||||
|
import com.yanzhu.common.security.utils.SecurityUtils;
|
||||||
|
import com.yanzhu.manage.domain.SmzSspProblemmodify;
|
||||||
|
import com.yanzhu.manage.enums.CheckStateEnums;
|
||||||
|
import com.yanzhu.manage.mapper.SmzSspProblemmodifyMapper;
|
||||||
|
import com.yanzhu.manage.service.ISmzSspProblemmodifyService;
|
||||||
|
import com.yanzhu.system.api.domain.SysUser;
|
||||||
|
import com.yanzhu.system.api.model.LoginUser;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.atomic.AtomicInteger;
|
import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
|
||||||
import com.yanzhu.common.core.context.SecurityContextHolder;
|
|
||||||
import com.yanzhu.common.core.utils.DateUtils;
|
|
||||||
import com.yanzhu.common.security.utils.SecurityUtils;
|
|
||||||
import com.yanzhu.system.api.domain.SysUser;
|
|
||||||
import com.yanzhu.system.api.model.LoginUser;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Service;
|
|
||||||
import com.yanzhu.manage.mapper.SmzSspProblemmodifyMapper;
|
|
||||||
import com.yanzhu.manage.domain.SmzSspProblemmodify;
|
|
||||||
import com.yanzhu.manage.service.ISmzSspProblemmodifyService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 安全隐患整改Service业务层处理
|
* 隐患问题Service业务层处理
|
||||||
*
|
*
|
||||||
* @author yanzhu
|
* @author yanzhu
|
||||||
* @date 2025-02-15
|
* @date 2025-02-15
|
||||||
|
@ -28,10 +28,10 @@ public class SmzSspProblemmodifyServiceImpl implements ISmzSspProblemmodifyServi
|
||||||
private SmzSspProblemmodifyMapper smzSspProblemmodifyMapper;
|
private SmzSspProblemmodifyMapper smzSspProblemmodifyMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询安全隐患整改
|
* 查询隐患问题
|
||||||
*
|
*
|
||||||
* @param id 安全隐患整改主键
|
* @param id 隐患问题主键
|
||||||
* @return 安全隐患整改
|
* @return 隐患问题
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public SmzSspProblemmodify selectSmzSspProblemmodifyById(Long id)
|
public SmzSspProblemmodify selectSmzSspProblemmodifyById(Long id)
|
||||||
|
@ -40,10 +40,10 @@ public class SmzSspProblemmodifyServiceImpl implements ISmzSspProblemmodifyServi
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询安全隐患整改列表
|
* 查询隐患问题列表
|
||||||
*
|
*
|
||||||
* @param smzSspProblemmodify 安全隐患整改
|
* @param smzSspProblemmodify 隐患问题
|
||||||
* @return 安全隐患整改
|
* @return 隐患问题
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<SmzSspProblemmodify> selectSmzSspProblemmodifyList(SmzSspProblemmodify smzSspProblemmodify)
|
public List<SmzSspProblemmodify> selectSmzSspProblemmodifyList(SmzSspProblemmodify smzSspProblemmodify)
|
||||||
|
@ -52,37 +52,38 @@ public class SmzSspProblemmodifyServiceImpl implements ISmzSspProblemmodifyServi
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增安全隐患整改
|
* 新增隐患问题
|
||||||
*
|
*
|
||||||
* @param smzSspProblemmodify 安全隐患整改
|
* @param smzSspProblemmodify 隐患问题
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int insertSmzSspProblemmodify(SmzSspProblemmodify smzSspProblemmodify)
|
public int insertSmzSspProblemmodify(SmzSspProblemmodify smzSspProblemmodify)
|
||||||
{
|
{
|
||||||
|
smzSspProblemmodify.setCheckState(CheckStateEnums.DZG.getCode());
|
||||||
|
smzSspProblemmodify.setCreateUser(SecurityUtils.getUserId().toString());
|
||||||
smzSspProblemmodify.setCreateTime(DateUtils.getNowDate());
|
smzSspProblemmodify.setCreateTime(DateUtils.getNowDate());
|
||||||
smzSspProblemmodify.setCreateBy(SecurityContextHolder.getUserName());
|
|
||||||
return smzSspProblemmodifyMapper.insertSmzSspProblemmodify(smzSspProblemmodify);
|
return smzSspProblemmodifyMapper.insertSmzSspProblemmodify(smzSspProblemmodify);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改安全隐患整改
|
* 修改隐患问题
|
||||||
*
|
*
|
||||||
* @param smzSspProblemmodify 安全隐患整改
|
* @param smzSspProblemmodify 隐患问题
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int updateSmzSspProblemmodify(SmzSspProblemmodify smzSspProblemmodify)
|
public int updateSmzSspProblemmodify(SmzSspProblemmodify smzSspProblemmodify)
|
||||||
{
|
{
|
||||||
|
smzSspProblemmodify.setUpdateUser(SecurityUtils.getUserId().toString());
|
||||||
smzSspProblemmodify.setUpdateTime(DateUtils.getNowDate());
|
smzSspProblemmodify.setUpdateTime(DateUtils.getNowDate());
|
||||||
smzSspProblemmodify.setUpdateBy(SecurityContextHolder.getUserName());
|
|
||||||
return smzSspProblemmodifyMapper.updateSmzSspProblemmodify(smzSspProblemmodify);
|
return smzSspProblemmodifyMapper.updateSmzSspProblemmodify(smzSspProblemmodify);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除安全隐患整改
|
* 批量删除隐患问题
|
||||||
*
|
*
|
||||||
* @param ids 需要删除的安全隐患整改主键
|
* @param ids 需要删除的隐患问题主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -92,9 +93,9 @@ public class SmzSspProblemmodifyServiceImpl implements ISmzSspProblemmodifyServi
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除安全隐患整改信息
|
* 删除隐患问题信息
|
||||||
*
|
*
|
||||||
* @param id 安全隐患整改主键
|
* @param id 隐患问题主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
@ -130,6 +131,16 @@ public class SmzSspProblemmodifyServiceImpl implements ISmzSspProblemmodifyServi
|
||||||
return smzSspProblemmodifyMapper.getListCount(where);
|
return smzSspProblemmodifyMapper.getListCount(where);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分组统计
|
||||||
|
* @param where
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Map<String, Object>> getWxListCount(SmzSspProblemmodify where){
|
||||||
|
return smzSspProblemmodifyMapper.getWxListCount(where);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分组查询 全部数据、待整改、待复检、整改完成、整改超时的数量
|
* 分组查询 全部数据、待整改、待复检、整改完成、整改超时的数量
|
||||||
* @param where
|
* @param where
|
||||||
|
|
|
@ -5,12 +5,39 @@ import {
|
||||||
// 查询隐患列表
|
// 查询隐患列表
|
||||||
export function list(query) {
|
export function list(query) {
|
||||||
return request({
|
return request({
|
||||||
url: '/manage/problemmodify/list',
|
url: '/manage/problemmodify/wxList',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 统计隐患列表
|
||||||
|
export function listCount(query) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/problemmodify/wxListCount',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增隐患问题
|
||||||
|
export function add(data) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/problemmodify',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增隐患草稿
|
||||||
|
export function addDraft(data) {
|
||||||
|
return request({
|
||||||
|
url: '/manage/problemmodifyDraft/addDraft',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 查询我上次提交的隐患信息
|
// 查询我上次提交的隐患信息
|
||||||
export function findMyLastProblemmodify(proId,type) {
|
export function findMyLastProblemmodify(proId,type) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
@ -1551,7 +1551,7 @@ swiper-item video {
|
||||||
}
|
}
|
||||||
|
|
||||||
.module_title_padding {
|
.module_title_padding {
|
||||||
padding: 30rpx 0 30rpx 40rpx;
|
padding: 15rpx 0 15rpx 40rpx;
|
||||||
border-bottom: 1px solid #303c84;
|
border-bottom: 1px solid #303c84;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ page{
|
||||||
}
|
}
|
||||||
.rectifier_list_name{
|
.rectifier_list_name{
|
||||||
padding-left: 10rpx;
|
padding-left: 10rpx;
|
||||||
color: #6576a2;
|
color: #8499d0;
|
||||||
}
|
}
|
||||||
.rectifier_list_name.active{
|
.rectifier_list_name.active{
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
|
import config from '../../../config'
|
||||||
import {
|
import {
|
||||||
getToken,
|
getToken,
|
||||||
getUserInfo
|
getUserInfo
|
||||||
} from '../../../utils/auth'
|
} from '../../../utils/auth'
|
||||||
import {
|
|
||||||
findDictCache
|
|
||||||
} from '../../../api/publics'
|
|
||||||
import {
|
|
||||||
findProjectDeptUsers
|
|
||||||
} from '../../../api/project'
|
|
||||||
import {
|
import {
|
||||||
|
findDictCache
|
||||||
|
} from '../../../api/publics'
|
||||||
|
import {
|
||||||
|
findProjectDeptUsers
|
||||||
|
} from '../../../api/project'
|
||||||
|
import {
|
||||||
|
add,
|
||||||
findMyLastProblemmodify
|
findMyLastProblemmodify
|
||||||
} from '../../../api/problemmodify'
|
} from '../../../api/problemmodify'
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
|
@ -19,21 +21,40 @@ Page({
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
maxDate: new Date(2088, 1, 1).getTime(),
|
maxDate: new Date(2088, 1, 1).getTime(),
|
||||||
type:"",
|
minDate: new Date().getTime()+(3600*48*1000),
|
||||||
typeName:"",
|
type: "",
|
||||||
projectId:"",
|
typeName: "",
|
||||||
projectName:"",
|
|
||||||
problemTypeList: [],
|
problemTypeList: [],
|
||||||
problemSubTypeList: [],
|
problemSubTypeList: [],
|
||||||
imageInfoData: [],
|
imageInfoData: [],
|
||||||
form:{
|
form: {
|
||||||
infoType:"",
|
projectId: "",
|
||||||
problemType:"1",
|
projectName: "",
|
||||||
dangerType:null,
|
infoType: "",
|
||||||
nickedTime:"",
|
problemType: "1",
|
||||||
|
dangerType: "1",
|
||||||
|
workParts: "",
|
||||||
|
changeInfo: "",
|
||||||
|
nickedTime: "",
|
||||||
|
lordSent: "",
|
||||||
|
lordSentUser: "",
|
||||||
|
recheckSend: "",
|
||||||
|
recheckSendUser: "",
|
||||||
|
copySend: "",
|
||||||
|
copySendUser: ""
|
||||||
},
|
},
|
||||||
active: 0,
|
active: 0,
|
||||||
flowNodes:[{text:'开始'},{text:'提交隐患'},{text:'隐患整改'},{text:'隐患复检'},{text:'结束'}],
|
flowNodes: [{
|
||||||
|
text: '开始'
|
||||||
|
}, {
|
||||||
|
text: '提交隐患'
|
||||||
|
}, {
|
||||||
|
text: '隐患整改'
|
||||||
|
}, {
|
||||||
|
text: '隐患复检'
|
||||||
|
}, {
|
||||||
|
text: '结束'
|
||||||
|
}],
|
||||||
lordSentList: [],
|
lordSentList: [],
|
||||||
copySendList: [],
|
copySendList: [],
|
||||||
checkUserList: [],
|
checkUserList: [],
|
||||||
|
@ -45,78 +66,78 @@ Page({
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
if(!getToken()){
|
if (!getToken()) {
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '../../login/login',
|
url: '../../login/login',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const proUserInfo = getUserInfo();
|
const proUserInfo = getUserInfo();
|
||||||
this.setData({
|
this.setData({
|
||||||
type:options.type,
|
type: options.type,
|
||||||
typeName:options.type==1?"质量":"安全",
|
typeName: options.type == 1 ? "质量" : "安全",
|
||||||
projectId:app.globalData.useProjectId,
|
"form.comId": proUserInfo.projectUserInfo.comId,
|
||||||
projectName:app.globalData.useProjectName,
|
"form.projectId": app.globalData.useProjectId,
|
||||||
"form.infoType":options.type,
|
"form.projectName": app.globalData.useProjectName,
|
||||||
"form.recheckSend": proUserInfo.nickName,
|
"form.infoType": options.type,
|
||||||
"form.recheckSendUser": proUserInfo.userId
|
"form.recheckSend": proUserInfo.userId,
|
||||||
});
|
"form.recheckSendUser": proUserInfo.nickName
|
||||||
this.getDictCache();
|
});
|
||||||
this.getHisInfo(options.type);
|
this.getDictCache();
|
||||||
this.getProjectUsers();
|
this.getHisInfo(options.type);
|
||||||
|
this.getProjectUsers();
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取字典缓存数据
|
* 获取字典缓存数据
|
||||||
*/
|
*/
|
||||||
getDictCache(signId) {
|
getDictCache() {
|
||||||
// 初始化检查类型
|
// 初始化检查类型
|
||||||
findDictCache("ssp_proble_type").then(res => {
|
findDictCache("ssp_proble_type").then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
let list = [];
|
let list = [];
|
||||||
res.data.forEach(item => {
|
res.data.forEach(item => {
|
||||||
list.push({
|
list.push({
|
||||||
"id": item.dictValue,
|
"id": item.dictValue,
|
||||||
"text": item.dictLabel
|
"text": item.dictLabel
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.setData({
|
this.setData({
|
||||||
problemTypeList: list
|
problemTypeList: list
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//初始化隐患类型
|
//初始化隐患类型
|
||||||
findDictCache("ssp_proble_sub_type").then(res => {
|
findDictCache("ssp_proble_sub_type").then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
let list = [];
|
let list = [];
|
||||||
res.data.forEach(item => {
|
res.data.forEach(item => {
|
||||||
list.push({
|
list.push({
|
||||||
"id": item.dictValue,
|
"id": item.dictValue,
|
||||||
"text": item.dictLabel
|
"text": item.dictLabel
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.setData({
|
this.setData({
|
||||||
problemSubTypeList: list
|
problemSubTypeList: list
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询项目人员数据
|
* 查询项目人员数据
|
||||||
* 获取项目所有人员,在页面组装数据...
|
* 获取项目所有人员,在页面组装数据...
|
||||||
*/
|
*/
|
||||||
getProjectUsers() {
|
getProjectUsers() {
|
||||||
findProjectDeptUsers(app.globalData.useProjectId).then(res =>{
|
findProjectDeptUsers(app.globalData.useProjectId).then(res => {
|
||||||
if(res.code==200){
|
if (res.code == 200) {
|
||||||
this.setData({
|
this.setData({
|
||||||
lordSentList: res.data.lordSentList,
|
lordSentList: res.data.lordSentList,
|
||||||
copySendList: res.data.copySendList,
|
copySendList: res.data.copySendList,
|
||||||
checkUserList: res.data.checkUserList,
|
checkUserList: res.data.checkUserList,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -125,8 +146,8 @@ Page({
|
||||||
* @param {*} type
|
* @param {*} type
|
||||||
*/
|
*/
|
||||||
getHisInfo(type) {
|
getHisInfo(type) {
|
||||||
findMyLastProblemmodify(app.globalData.useProjectId,type).then(res => {
|
findMyLastProblemmodify(app.globalData.useProjectId, type).then(res => {
|
||||||
if(res.code==200 && res.data && res.data.length>0){
|
if (res.code == 200 && res.data && res.data.length > 0) {
|
||||||
this.setData({
|
this.setData({
|
||||||
showHis: true,
|
showHis: true,
|
||||||
"form.lordSent": res.data[0].lordSent,
|
"form.lordSent": res.data[0].lordSent,
|
||||||
|
@ -143,21 +164,21 @@ Page({
|
||||||
//隐患描述
|
//隐患描述
|
||||||
onInputWorkParts(e) {
|
onInputWorkParts(e) {
|
||||||
this.setData({
|
this.setData({
|
||||||
"form.workParts":e.detail.value
|
"form.workParts": e.detail.value
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
//整改要求
|
//整改要求
|
||||||
onInputChangeInfoValue(e) {
|
onInputChangeInfoValue(e) {
|
||||||
this.setData({
|
this.setData({
|
||||||
"form.changeInfo":e.detail.value
|
"form.changeInfo": e.detail.value
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
//验收时间
|
//验收时间
|
||||||
onInputTime(e) {
|
onInputTime(e) {
|
||||||
this.setData({
|
this.setData({
|
||||||
"form.nickedTime":e.detail
|
"form.nickedTime": e.detail
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -172,8 +193,8 @@ Page({
|
||||||
onAddLordSent(e) {
|
onAddLordSent(e) {
|
||||||
if (e.detail.length > 0) {
|
if (e.detail.length > 0) {
|
||||||
this.setData({
|
this.setData({
|
||||||
lordSent: e.detail[0].userName,
|
"form.lordSent": e.detail[0].userId,
|
||||||
lordSentUser: e.detail[0].phoneNumber
|
"form.lordSentUser": e.detail[0].userName
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -181,20 +202,20 @@ Page({
|
||||||
//添加抄送人
|
//添加抄送人
|
||||||
onAddCopySend(e) {
|
onAddCopySend(e) {
|
||||||
if (e.detail.length > 0) {
|
if (e.detail.length > 0) {
|
||||||
let phoneNumbers = "";
|
let _userIds = "";
|
||||||
let userNames = "";
|
let _userNames = "";
|
||||||
e.detail.forEach(it => {
|
e.detail.forEach(it => {
|
||||||
phoneNumbers += "," + it.phoneNumber;
|
_userIds += "," + it.userId;
|
||||||
userNames += "," + it.userName;
|
_userNames += "," + it.userName;
|
||||||
});
|
});
|
||||||
this.setData({
|
this.setData({
|
||||||
copySend: userNames.substring(1),
|
"form.copySend": _userIds.substring(1),
|
||||||
copySendUser: phoneNumbers.substring(1)
|
"form.copySendUser": _userNames.substring(1)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.setData({
|
this.setData({
|
||||||
copySend: "",
|
"form.copySend": "",
|
||||||
copySendUser: ""
|
"form.copySendUser": ""
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -203,8 +224,8 @@ Page({
|
||||||
onAddRecheckSend(e) {
|
onAddRecheckSend(e) {
|
||||||
if (e.detail.length > 0) {
|
if (e.detail.length > 0) {
|
||||||
this.setData({
|
this.setData({
|
||||||
recheckSend: e.detail[0].userName,
|
"form.recheckSend": e.detail[0].userId,
|
||||||
recheckSendUser: e.detail[0].phoneNumber
|
"form.recheckSendUser": e.detail[0].userName
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -214,162 +235,82 @@ Page({
|
||||||
this.returnToPage()
|
this.returnToPage()
|
||||||
},
|
},
|
||||||
|
|
||||||
//保存
|
/**
|
||||||
onProblemSubmitSave() {
|
* 数据保存
|
||||||
this.setData({
|
*/
|
||||||
loadShow: true
|
submitSave() {
|
||||||
})
|
let _form = {
|
||||||
let that = this
|
...this.data.form
|
||||||
|
};
|
||||||
let {
|
let {
|
||||||
projectId,
|
imageInfoData
|
||||||
projectName,
|
} = this.data
|
||||||
dangerType,
|
|
||||||
lordSent,
|
|
||||||
lordSentUser,
|
|
||||||
copySend,
|
|
||||||
copySendUser,
|
|
||||||
workParts,
|
|
||||||
changeInfo,
|
|
||||||
nickedTime,
|
|
||||||
recheckSend,
|
|
||||||
recheckSendUser,
|
|
||||||
imageInfoData,
|
|
||||||
loginName,
|
|
||||||
problemType,
|
|
||||||
userName
|
|
||||||
} = that.data;
|
|
||||||
//数据效验
|
//数据效验
|
||||||
if (projectId == "" || loginName == "") {
|
if (!_form.comId || !_form.projectId) {
|
||||||
app.toast("数据异常,请刷新页面重试!")
|
app.toast("数据异常,请刷新页面重试!")
|
||||||
that.setData({
|
return false;
|
||||||
loadShow: false
|
|
||||||
})
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if (imageInfoData.length == 0) {
|
if (imageInfoData.length == 0) {
|
||||||
app.toast("请上传隐患现场图片!")
|
app.toast("请上传隐患现场图片!")
|
||||||
that.setData({
|
return false;
|
||||||
loadShow: false
|
|
||||||
})
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if (problemType == "") {
|
if (!_form.problemType) {
|
||||||
app.toast("请选择检查类型!")
|
app.toast("请选择检查类型!")
|
||||||
that.setData({
|
return false;
|
||||||
loadShow: false
|
|
||||||
})
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if (dangerType == "") {
|
if (!_form.dangerType) {
|
||||||
app.toast("请选择隐患类型!")
|
app.toast("请选择隐患类型!")
|
||||||
that.setData({
|
return false;
|
||||||
loadShow: false
|
|
||||||
})
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if (workParts == "") {
|
if (!_form.workParts) {
|
||||||
app.toast("请填写隐患描述!")
|
app.toast("请填写隐患描述!")
|
||||||
that.setData({
|
return false;
|
||||||
loadShow: false
|
|
||||||
})
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if (changeInfo == "") {
|
if (!_form.changeInfo) {
|
||||||
app.toast("请填写隐患整改要求!")
|
app.toast("请填写隐患整改要求!")
|
||||||
that.setData({
|
return false;
|
||||||
loadShow: false
|
|
||||||
})
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if (nickedTime == "") {
|
if (!_form.nickedTime) {
|
||||||
app.toast("请选择整改截至时间!")
|
app.toast("请选择整改截至时间!")
|
||||||
that.setData({
|
return false;
|
||||||
loadShow: false
|
|
||||||
})
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if (lordSent == "" || lordSentUser == "") {
|
if (!_form.lordSent || !_form.lordSentUser) {
|
||||||
app.toast("请选择整改人!")
|
app.toast("请选择整改人!")
|
||||||
that.setData({
|
return false;
|
||||||
loadShow: false
|
|
||||||
})
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if (recheckSend == "" || recheckSendUser == "") {
|
if (!_form.recheckSend || !_form.recheckSendUser) {
|
||||||
app.toast("请选择复检人!")
|
app.toast("请选择复检人!")
|
||||||
that.setData({
|
return false;
|
||||||
loadShow: false
|
|
||||||
})
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if (copySend == "" || copySendUser == "") {
|
if (!_form.copySend || !_form.copySendUser) {
|
||||||
app.toast("请选择抄送人!")
|
app.toast("请选择抄送人!")
|
||||||
that.setData({
|
return false;
|
||||||
loadShow: false
|
|
||||||
})
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
let pos = copySend.split(",");
|
|
||||||
pos.forEach(it => {
|
|
||||||
if (it == lordSent) {
|
|
||||||
app.toast("抄送人中不能包含整改人!")
|
|
||||||
that.setData({
|
|
||||||
loadShow: false
|
|
||||||
})
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
let fileUrls = [];
|
let fileUrls = [];
|
||||||
|
this.setData({
|
||||||
|
loadShow: true
|
||||||
|
});
|
||||||
|
let that = this;
|
||||||
imageInfoData.forEach(async (item) => {
|
imageInfoData.forEach(async (item) => {
|
||||||
let uploadUrl = app.globalData.uploadUrl + '/common/upload'
|
|
||||||
let name = "file"
|
|
||||||
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
|
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
|
||||||
let obj = await that.syncUploadImage(uploadUrl, item, name);
|
let obj = await that.syncUploadImage(item);
|
||||||
fileUrls.push(obj.data.fileName);
|
fileUrls.push(obj.data.data.url);
|
||||||
//验证图片上传完毕
|
//验证图片上传完毕
|
||||||
if (fileUrls.length == imageInfoData.length) {
|
if (fileUrls.length == imageInfoData.length) {
|
||||||
let params = {
|
_form.smarkUrl = fileUrls.toString();
|
||||||
projectId,
|
add(_form).then(res => {
|
||||||
infoType: "1",
|
this.setData({
|
||||||
problemArea: projectName,
|
loadShow: false
|
||||||
problemType,
|
});
|
||||||
workParts,
|
if (res.code == 200) {
|
||||||
changeInfo,
|
app.toast("新增数据成功!")
|
||||||
lordSent,
|
setTimeout(() => {
|
||||||
lordSentUser,
|
wx.redirectTo({
|
||||||
copySend,
|
url: '../list/index',
|
||||||
copySendUser,
|
})
|
||||||
checkState: 0,
|
}, 200)
|
||||||
nickedTime: nickedTime + " 23:59:59",
|
|
||||||
smarkUrl: fileUrls.toString(),
|
|
||||||
createUser: loginName,
|
|
||||||
dangerType,
|
|
||||||
recheckSend,
|
|
||||||
recheckSendUser
|
|
||||||
}
|
|
||||||
wx.request({
|
|
||||||
url: app.globalData.reqUrl + '/wechat/projectProblemmodify/addQuality',
|
|
||||||
method: "POST",
|
|
||||||
data: params,
|
|
||||||
header: {
|
|
||||||
"Username": loginName,
|
|
||||||
"Content-Type": "application/json"
|
|
||||||
},
|
|
||||||
success(res) {
|
|
||||||
that.setData({
|
|
||||||
loadShow: false
|
|
||||||
})
|
|
||||||
res = res.data
|
|
||||||
if (res.code == 200) {
|
|
||||||
app.toast("添加成功!")
|
|
||||||
setTimeout(() => {
|
|
||||||
wx.redirectTo({
|
|
||||||
url: '../list/index',
|
|
||||||
})
|
|
||||||
}, 200)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
@ -388,10 +329,46 @@ Page({
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 这里考虑上传图片异步问题,封装为同步
|
||||||
|
*/
|
||||||
|
syncUploadImage(file) {
|
||||||
|
let _baseUrl = config.baseUrl;
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
wx.uploadFile({
|
||||||
|
url: _baseUrl + "/file/upload", // 上传的服务器接口地址
|
||||||
|
filePath: file,
|
||||||
|
header: {
|
||||||
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
||||||
|
'Authorization': 'Bearer ' + getToken()
|
||||||
|
},
|
||||||
|
name: "file", //上传的所需字段,后端提供
|
||||||
|
formData: {},
|
||||||
|
success: (res) => {
|
||||||
|
// 上传完成操作
|
||||||
|
const data = JSON.parse(res.data)
|
||||||
|
resolve({
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
//上传失败:修改pedding为reject
|
||||||
|
console.log("访问接口失败", err);
|
||||||
|
wx.showToast({
|
||||||
|
title: "网络出错,上传失败",
|
||||||
|
icon: 'none',
|
||||||
|
duration: 1000
|
||||||
|
});
|
||||||
|
reject(err)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
returnToPage: function () {
|
returnToPage: function () {
|
||||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '../list/index',
|
url: `../list/index?type=${this.data.type}`
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -1,141 +1,93 @@
|
||||||
<view class="header_title">
|
<view class="header_title">
|
||||||
<view class="header_title_row">
|
<view class="header_title_row">
|
||||||
<van-row>
|
<van-row>
|
||||||
<van-col span="4">
|
<van-col span="4">
|
||||||
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
|
<view class="header_img" bindtap="returnToPage">
|
||||||
</van-col>
|
<image src="/images/left.png"></image>
|
||||||
<van-col span="15">
|
</view>
|
||||||
<view class="header_name">新增{{typeName}}隐患</view>
|
</van-col>
|
||||||
</van-col>
|
<van-col span="15">
|
||||||
</van-row>
|
<view class="header_name">新增{{typeName}}隐患</view>
|
||||||
</view>
|
</van-col>
|
||||||
|
</van-row>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="max_content">
|
<view class="max_content">
|
||||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
|
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
|
||||||
<view class="inspect_info">
|
<view class="inspect_info">
|
||||||
<view class="video_address_min_2">
|
<view class="module_title_2 module_title_padding">
|
||||||
<view>{{projectName}}</view>
|
<view>{{form.projectName}}</view>
|
||||||
</view>
|
|
||||||
<view class="inspect_info_list">
|
|
||||||
<view class="markers inspect_info_title">隐患图片</view>
|
|
||||||
<view class="inspect_info_content">
|
|
||||||
<file-uploader bindimages="onImagesArr"></file-uploader>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_list">
|
<view class="markers inspect_info_title">隐患图片</view>
|
||||||
|
<view class="inspect_info_content">
|
||||||
|
<file-uploader bindimages="onImagesArr"></file-uploader>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="inspect_info_list">
|
||||||
<view class="markers inspect_info_title">检查类型</view>
|
<view class="markers inspect_info_title">检查类型</view>
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
<voucher-select columns="{{problemTypeList}}" placeholder="请选择检查类型" bindchange="onSelectProblemType"></voucher-select>
|
<voucher-select columns="{{problemTypeList}}" placeholder="请选择检查类型" bindchange="onSelectProblemType" selectValue="{{form.problemType}}"></voucher-select>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="markers inspect_info_title">隐患类型</view>
|
<view class="markers inspect_info_title">隐患类型</view>
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
<voucher-select columns="{{problemSubTypeList}}" placeholder="请选择隐患类型" bindchange="onSelectDangerType" selectValue="{{form.dangerType}}"></voucher-select>
|
<voucher-select columns="{{problemSubTypeList}}" placeholder="请选择隐患类型" bindchange="onSelectDangerType" selectValue="{{form.dangerType}}"></voucher-select>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
|
||||||
<view class="inspect_info_list" >
|
|
||||||
<view class="markers inspect_info_title">隐患描述</view>
|
|
||||||
<view class="inspect_info_content">
|
|
||||||
<textarea class="add_textarea" placeholder="请填写质量隐患描述"
|
|
||||||
placeholder-style="color:#6777aa;" bindinput="onInputWorkParts" maxlength="500"/>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_list" >
|
<view class="markers inspect_info_title">隐患描述</view>
|
||||||
<view class="markers inspect_info_title">整改要求</view>
|
<view class="inspect_info_content">
|
||||||
<view class="inspect_info_content">
|
<textarea class="add_textarea" placeholder="请填写质量隐患描述(200字内)" placeholder-style="color:#6777aa;" bindinput="onInputWorkParts" maxlength="200" />
|
||||||
<textarea class="add_textarea" placeholder="请填写隐患整改要求"
|
</view>
|
||||||
placeholder-style="color:#6777aa;" bindinput="onInputChangeInfoValue" maxlength="500"/>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_list">
|
<view class="markers inspect_info_title">整改要求</view>
|
||||||
<view class="markers inspect_info_title">整改截至时间</view>
|
<view class="inspect_info_content">
|
||||||
<view class="inspect_info_content">
|
<textarea class="add_textarea" placeholder="请填写隐患整改要求(200字内)" placeholder-style="color:#6777aa;" bindinput="onInputChangeInfoValue" maxlength="200" />
|
||||||
<voucher-date counts="5" placeholder="请选择整改截至时间" maxDate="{{maxDate}}" bindchange="onInputTime"></voucher-date>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_list">
|
<view class="markers inspect_info_title">整改截至时间</view>
|
||||||
|
<view class="inspect_info_content">
|
||||||
|
<voucher-date counts="5" placeholder="请选择整改截至时间" minDate="{{minDate}}" maxDate="{{maxDate}}" bindchange="onInputTime"></voucher-date>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="inspect_info_list">
|
||||||
<view class="markers inspect_info_title">整改人</view>
|
<view class="markers inspect_info_title">整改人</view>
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
<select-group-person rectifierData="{{lordSentList}}" multiple="{{fales}}" bindselected="onAddLordSent" index="1" title="请选择整改人" choose="{{lordSent}}">
|
<select-group-person rectifierData="{{lordSentList}}" multiple="{{fales}}" bindselected="onAddLordSent" index="1" title="请选择整改人" choose="{{form.lordSentUser}}">
|
||||||
</select-group-person>
|
</select-group-person>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="markers inspect_info_title">复检人</view>
|
<view class="markers inspect_info_title">复检人</view>
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
<select-group-person rectifierData="{{checkUserList}}" multiple="{{fales}}" bindselected="onAddRecheckSend" index="2" title="请选择复检人" choose="{{recheckSend}}">
|
<select-group-person rectifierData="{{checkUserList}}" multiple="{{fales}}" bindselected="onAddRecheckSend" index="2" title="请选择复检人" choose="{{form.recheckSendUser}}">
|
||||||
</select-group-person>
|
</select-group-person>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="markers inspect_info_title">抄送人</view>
|
<view class="markers inspect_info_title">抄送人</view>
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
<select-group-person rectifierData="{{copySendList}}" multiple="{{true}}" bindselected="onAddCopySend" index="3" title="请选择抄送人" choose="{{copySend}}">
|
<select-group-person rectifierData="{{copySendList}}" multiple="{{true}}" bindselected="onAddCopySend" index="3" title="请选择抄送人" choose="{{form.copySendUser}}">
|
||||||
</select-group-person>
|
</select-group-person>
|
||||||
</view>
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="safety_inspect_title module_title_flex" wx:if="{{showHis}}">
|
||||||
|
<text class="color_orange">已自动填充上次隐患的整改人,复检人,抄送人。</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="safety_inspect_title module_title_flex" wx:if="{{showHis}}">
|
<view class="problem_submit_to">
|
||||||
<text class="color_orange">已自动填充上次隐患的整改人,复检人,抄送人。</text>
|
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>
|
||||||
|
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="submitSave">提交隐患</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="problem_submit_to">
|
|
||||||
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>
|
|
||||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onProblemSubmitSave">提交隐患</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<van-overlay show="{{loadShow}}">
|
<van-overlay show="{{loadShow}}">
|
||||||
<view class="gif">
|
<view class="gif">
|
||||||
<image src="/../images/loding2.gif"></image>
|
<image src="/images/loding.gif"></image>
|
||||||
<view>数据上传中!请稍后...</view>
|
<view>数据处理中!请稍后...</view>
|
||||||
</view>
|
</view>
|
||||||
</van-overlay>
|
</van-overlay>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -16,10 +16,3 @@
|
||||||
.van-steps--horizontal {
|
.van-steps--horizontal {
|
||||||
padding: 10px 20px !important;
|
padding: 10px 20px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.video_address_min_2 {
|
|
||||||
background: url("http://fileimg.makalu.cc/CORE_B1C818B4CF2C44FE9D96624589329EBC.png") no-repeat left/40rpx;
|
|
||||||
height: 40rpx;
|
|
||||||
line-height: 40rpx;
|
|
||||||
padding-left: 40rpx;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,3 +1,18 @@
|
||||||
|
import config from '../../../config'
|
||||||
|
import {
|
||||||
|
getToken,
|
||||||
|
getUserInfo
|
||||||
|
} from '../../../utils/auth'
|
||||||
|
import {
|
||||||
|
findDictCache
|
||||||
|
} from '../../../api/publics'
|
||||||
|
import {
|
||||||
|
findProjectDeptUsers
|
||||||
|
} from '../../../api/project'
|
||||||
|
import {
|
||||||
|
addDraft,
|
||||||
|
findMyLastProblemmodify
|
||||||
|
} from '../../../api/problemmodify'
|
||||||
const app = getApp()
|
const app = getApp()
|
||||||
Page({
|
Page({
|
||||||
|
|
||||||
|
@ -5,20 +20,18 @@ Page({
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
maxDate: new Date(2088, 1, 1).getTime(),
|
type: "",
|
||||||
minDate: new Date().getTime() + (3600 * 48 * 1000),
|
typeName: "",
|
||||||
projectId: "",
|
problemTypeList: [],
|
||||||
projectName: "",
|
form: {
|
||||||
loginName: "",
|
projectId: "",
|
||||||
userName: "",
|
projectName: "",
|
||||||
rectifierData: [],
|
infoType: "",
|
||||||
loadShow: false,
|
problemType: "1",
|
||||||
showHis: false,
|
lordSent: "",
|
||||||
inspectInfoData: [{
|
lordSentUser: "",
|
||||||
image_upload: []
|
},
|
||||||
}],
|
active: 0,
|
||||||
lordSent: "",
|
|
||||||
lordSentUser: "",
|
|
||||||
flowNodes: [{
|
flowNodes: [{
|
||||||
text: '开始'
|
text: '开始'
|
||||||
}, {
|
}, {
|
||||||
|
@ -30,14 +43,11 @@ Page({
|
||||||
}, {
|
}, {
|
||||||
text: '结束'
|
text: '结束'
|
||||||
}],
|
}],
|
||||||
active: 0,
|
lordSentList: [],
|
||||||
problemType: "1",
|
loadShow: false,
|
||||||
problemTypeList: [{
|
showHis: false,
|
||||||
id: 1,
|
inspectInfoData: [{
|
||||||
text: '常规检查'
|
image_upload: []
|
||||||
}, {
|
|
||||||
id: 2,
|
|
||||||
text: '专项检查'
|
|
||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -45,74 +55,78 @@ Page({
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
//获取缓存数据
|
if (!getToken()) {
|
||||||
wx.getStorage({
|
wx.redirectTo({
|
||||||
key: 'userinfo',
|
url: '../../login/login',
|
||||||
success: res => {
|
})
|
||||||
|
}
|
||||||
|
const proUserInfo = getUserInfo();
|
||||||
|
this.setData({
|
||||||
|
type: options.type,
|
||||||
|
typeName: options.type == 1 ? "质量" : "安全",
|
||||||
|
"form.comId": proUserInfo.projectUserInfo.comId,
|
||||||
|
"form.projectId": app.globalData.useProjectId,
|
||||||
|
"form.projectName": app.globalData.useProjectName,
|
||||||
|
"form.infoType": options.type
|
||||||
|
});
|
||||||
|
this.getDictCache();
|
||||||
|
this.getHisInfo(options.type);
|
||||||
|
this.getProjectUsers();
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取字典缓存数据
|
||||||
|
*/
|
||||||
|
getDictCache() {
|
||||||
|
// 初始化检查类型
|
||||||
|
findDictCache("ssp_proble_type").then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
let list = [];
|
||||||
|
res.data.forEach(item => {
|
||||||
|
list.push({
|
||||||
|
"id": item.dictValue,
|
||||||
|
"text": item.dictLabel
|
||||||
|
});
|
||||||
|
});
|
||||||
this.setData({
|
this.setData({
|
||||||
projectId: app.globalData.projectId,
|
problemTypeList: list
|
||||||
projectName: app.globalData.projectName,
|
});
|
||||||
loginName: res.data.loginName,
|
}
|
||||||
userName: res.data.nickName
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目人员数据
|
||||||
|
* 获取项目所有人员,在页面组装数据...
|
||||||
|
*/
|
||||||
|
getProjectUsers() {
|
||||||
|
findProjectDeptUsers(app.globalData.useProjectId).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.setData({
|
||||||
|
lordSentList: res.data.lordSentList
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 这里查询当前登录人上次提交隐患
|
||||||
|
* 自动填充整改人,复检人,抄送人
|
||||||
|
* @param {*} type
|
||||||
|
*/
|
||||||
|
getHisInfo(type) {
|
||||||
|
findMyLastProblemmodify(app.globalData.useProjectId, type).then(res => {
|
||||||
|
if (res.code == 200 && res.data && res.data.length > 0) {
|
||||||
|
this.setData({
|
||||||
|
showHis: true,
|
||||||
|
"form.lordSent": res.data[0].lordSent,
|
||||||
|
"form.lordSentUser": res.data[0].lordSentUser
|
||||||
})
|
})
|
||||||
this.getAllProjectUserData();
|
|
||||||
this.getHisInfo();
|
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
//查询项目人员数据
|
// 上传图片
|
||||||
getAllProjectUserData() {
|
|
||||||
let that = this
|
|
||||||
wx.request({
|
|
||||||
url: app.globalData.reqUrl + '/wechat/projectuserinfo/selectProjectUnitUser',
|
|
||||||
method: "get",
|
|
||||||
data: {
|
|
||||||
projectId: that.data.projectId,
|
|
||||||
loginName: that.data.loginName
|
|
||||||
},
|
|
||||||
header: {
|
|
||||||
'content-type': 'application/x-www-form-urlencoded'
|
|
||||||
},
|
|
||||||
success(res) {
|
|
||||||
res = res.data
|
|
||||||
if (res.code == 200) {
|
|
||||||
that.setData({
|
|
||||||
rectifierData: res.data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
getHisInfo() {
|
|
||||||
//这里查询当前登录人上次提交隐患,自动填充整改人,复检人,抄送人
|
|
||||||
let that = this
|
|
||||||
wx.request({
|
|
||||||
url: app.globalData.reqUrl + '/wechat/projectProblemmodify/findDraftLastDataByParams',
|
|
||||||
method: "get",
|
|
||||||
data: {
|
|
||||||
projectId: that.data.projectId,
|
|
||||||
createUser: that.data.loginName,
|
|
||||||
infoType: 1
|
|
||||||
},
|
|
||||||
header: {
|
|
||||||
'content-type': 'application/x-www-form-urlencoded'
|
|
||||||
},
|
|
||||||
success(res) {
|
|
||||||
res = res.data
|
|
||||||
if (res.code == 200 && res.data) {
|
|
||||||
that.setData({
|
|
||||||
showHis: true,
|
|
||||||
lordSent: res.data.lordSent,
|
|
||||||
lordSentUser: res.data.lordSentUser
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// list 上传图片
|
|
||||||
onImagesArr(e) {
|
onImagesArr(e) {
|
||||||
var index = e.currentTarget.dataset.index
|
var index = e.currentTarget.dataset.index
|
||||||
var data = this.data.inspectInfoData
|
var data = this.data.inspectInfoData
|
||||||
|
@ -126,108 +140,77 @@ Page({
|
||||||
onAddLordSent(e) {
|
onAddLordSent(e) {
|
||||||
if (e.detail.length > 0) {
|
if (e.detail.length > 0) {
|
||||||
this.setData({
|
this.setData({
|
||||||
lordSent: e.detail[0].userName,
|
"form.lordSent": e.detail[0].userId,
|
||||||
lordSentUser: e.detail[0].phoneNumber
|
"form.lordSentUser": e.detail[0].userName
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
//取消页面
|
// 取消页面
|
||||||
cancelSaveView() {
|
cancelSaveView() {
|
||||||
this.returnToPage()
|
this.returnToPage()
|
||||||
},
|
},
|
||||||
|
|
||||||
//保存
|
// 保存
|
||||||
onProblemSubmitSave() {
|
submitSave() {
|
||||||
|
let _form = {
|
||||||
|
...this.data.form
|
||||||
|
};
|
||||||
|
let {
|
||||||
|
inspectInfoData
|
||||||
|
} = this.data
|
||||||
|
//数据效验
|
||||||
|
if (!_form.comId || !_form.projectId) {
|
||||||
|
app.toast("数据异常,请刷新页面重试!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!_form.problemType) {
|
||||||
|
app.toast("请选择检查类型!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!_form.lordSent || !_form.lordSentUser) {
|
||||||
|
app.toast("请选择整改人!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (inspectInfoData.length>0) {
|
||||||
|
for(let i=0;i<inspectInfoData.length;i++){
|
||||||
|
if(inspectInfoData[i].image_upload.length==0){
|
||||||
|
app.toast("请上传问题“"+(i+1)+"”的隐患图片或删除问题项!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
this.setData({
|
this.setData({
|
||||||
loadShow: true
|
loadShow: true
|
||||||
})
|
})
|
||||||
let that = this
|
|
||||||
let {
|
|
||||||
projectId,
|
|
||||||
projectName,
|
|
||||||
problemType,
|
|
||||||
lordSent,
|
|
||||||
lordSentUser,
|
|
||||||
loginName,
|
|
||||||
inspectInfoData
|
|
||||||
} = that.data;
|
|
||||||
//数据效验
|
|
||||||
if (projectId == "" || loginName == "") {
|
|
||||||
app.toast("数据异常,请刷新页面重试!")
|
|
||||||
that.setData({
|
|
||||||
loadShow: false
|
|
||||||
})
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (problemType == "") {
|
|
||||||
app.toast("请选择问题类型!")
|
|
||||||
that.setData({
|
|
||||||
loadShow: false
|
|
||||||
})
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (lordSent == "" || lordSentUser == "") {
|
|
||||||
app.toast("请选择整改人!")
|
|
||||||
that.setData({
|
|
||||||
loadShow: false
|
|
||||||
})
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let fileUrls = [];
|
let fileUrls = [];
|
||||||
|
let that = this;
|
||||||
inspectInfoData.forEach(async (item) => {
|
inspectInfoData.forEach(async (item) => {
|
||||||
let beforeCheckUrl = [];
|
let beforeCheckUrl = [];
|
||||||
item.image_upload.forEach(async (it) => {
|
item.image_upload.forEach(async (itFile) => {
|
||||||
let uploadUrl = app.globalData.uploadUrl + '/common/upload'
|
|
||||||
let name = "file";
|
|
||||||
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
|
//这里复杂的图片上传,改为同步上传,因为小程序只能上传一张图片
|
||||||
let obj = await that.syncUploadImage(uploadUrl, it, name);
|
let obj = await that.syncUploadImage(itFile);
|
||||||
beforeCheckUrl.push(obj.data.fileName);
|
beforeCheckUrl.push(obj.data.data.url);
|
||||||
if (beforeCheckUrl.length >= item.image_upload.length) {
|
if (beforeCheckUrl.length >= item.image_upload.length) {
|
||||||
fileUrls.push(beforeCheckUrl);
|
fileUrls.push(beforeCheckUrl);
|
||||||
}
|
}
|
||||||
//验证图片上传完毕
|
//验证图片上传完毕
|
||||||
if (fileUrls.length >= inspectInfoData.length) {
|
if (fileUrls.length >= inspectInfoData.length) {
|
||||||
let params = {
|
_form.smarkUrls = fileUrls;
|
||||||
projectId,
|
addDraft(_form).then(res => {
|
||||||
infoType: "1",
|
this.setData({
|
||||||
problemArea: projectName,
|
loadShow: false
|
||||||
problemType,
|
});
|
||||||
lordSent,
|
if (res.code == 200) {
|
||||||
lordSentUser,
|
app.toast("新增数据成功!")
|
||||||
checkState: 0,
|
setTimeout(() => {
|
||||||
fileUrls: fileUrls,
|
wx.redirectTo({
|
||||||
createUser: loginName
|
url: '../list/index',
|
||||||
}
|
})
|
||||||
wx.request({
|
}, 200);
|
||||||
url: app.globalData.reqUrl + '/wechat/projectProblemmodify/addQualityDraft',
|
|
||||||
method: "POST",
|
|
||||||
data: params,
|
|
||||||
header: {
|
|
||||||
"Username": loginName,
|
|
||||||
"Content-Type": "application/json"
|
|
||||||
},
|
|
||||||
success(res) {
|
|
||||||
that.setData({
|
|
||||||
loadShow: false
|
|
||||||
})
|
|
||||||
res = res.data
|
|
||||||
if (res.code == 200) {
|
|
||||||
app.toast("添加成功!")
|
|
||||||
setTimeout(() => {
|
|
||||||
if (wx.getStorageSync('nav-menu') == "list") {
|
|
||||||
wx.redirectTo({
|
|
||||||
url: '../list/index',
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
wx.redirectTo({
|
|
||||||
url: '../../../../pages/quality_manage/index',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}, 200);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
@ -236,18 +219,18 @@ Page({
|
||||||
/**
|
/**
|
||||||
* 这里考虑上传图片异步问题,封装为同步
|
* 这里考虑上传图片异步问题,封装为同步
|
||||||
*/
|
*/
|
||||||
syncUploadImage(url, uploadFile, name) {
|
syncUploadImage(file) {
|
||||||
|
let _baseUrl = config.baseUrl;
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
wx.uploadFile({
|
wx.uploadFile({
|
||||||
url, // 上传的服务器接口地址
|
url: _baseUrl + "/file/upload", // 上传的服务器接口地址
|
||||||
filePath: uploadFile,
|
filePath: file,
|
||||||
header: {
|
header: {
|
||||||
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8"
|
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
|
||||||
},
|
'Authorization': 'Bearer ' + getToken()
|
||||||
name, //上传的所需字段,后端提供
|
|
||||||
formData: {
|
|
||||||
user: 'test'
|
|
||||||
},
|
},
|
||||||
|
name: "file", //上传的所需字段,后端提供
|
||||||
|
formData: {},
|
||||||
success: (res) => {
|
success: (res) => {
|
||||||
// 上传完成操作
|
// 上传完成操作
|
||||||
const data = JSON.parse(res.data)
|
const data = JSON.parse(res.data)
|
||||||
|
@ -275,7 +258,7 @@ Page({
|
||||||
*/
|
*/
|
||||||
onSelectProblemType(e) {
|
onSelectProblemType(e) {
|
||||||
this.setData({
|
this.setData({
|
||||||
problemType: e.detail.id,
|
"form.problemType": e.detail.id,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -283,11 +266,11 @@ Page({
|
||||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||||
if (wx.getStorageSync('nav-menu') == "list") {
|
if (wx.getStorageSync('nav-menu') == "list") {
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '../list/index',
|
url: `../list/index?type=${this.data.type}`
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '../../../../pages/quality_manage/index',
|
url: `../list/index?type=${this.data.type}`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"van-steps": "@vant/weapp/steps/index",
|
"van-steps": "@vant/weapp/steps/index",
|
||||||
"van-overlay": "@vant/weapp/overlay/index"
|
"van-overlay": "@vant/weapp/overlay/index"
|
||||||
},
|
},
|
||||||
"navigationStyle":"custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
|
@ -5,7 +5,7 @@
|
||||||
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
|
<view class="header_img" bindtap="returnToPage"><image src="/images/left.png"></image></view>
|
||||||
</van-col>
|
</van-col>
|
||||||
<van-col span="15">
|
<van-col span="15">
|
||||||
<view class="header_name">新增质量隐患草稿</view>
|
<view class="header_name">新增{{typeName}}隐患草稿</view>
|
||||||
</van-col>
|
</van-col>
|
||||||
</van-row>
|
</van-row>
|
||||||
</view>
|
</view>
|
||||||
|
@ -13,19 +13,19 @@
|
||||||
<view class="max_content">
|
<view class="max_content">
|
||||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
|
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
|
||||||
<view class="inspect_info ">
|
<view class="inspect_info ">
|
||||||
<view class="module_title_2 module_title_flex">
|
<view class="module_title_2 module_title_padding">
|
||||||
<view>{{projectName}}</view>
|
<view>{{form.projectName}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">问题类型</view>
|
<view class="markers inspect_info_title">检查类型</view>
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
<voucher-select columns="{{problemTypeList}}" placeholder="请选择问题类型" bindchange="onSelectProblemType" selectValue="{{problemType}}"></voucher-select>
|
<voucher-select columns="{{problemTypeList}}" placeholder="请选择检查类型" bindchange="onSelectProblemType" selectValue="{{form.problemType}}"></voucher-select>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title" style="padding: 20rpx 0 10rpx;">整改人员</view>
|
<view class="markers inspect_info_title">整改人员</view>
|
||||||
<view class="inspect_info_content">
|
<view class="inspect_info_content">
|
||||||
<select-group-person rectifierData="{{rectifierData}}" multiple="{{fales}}" bindselected="onAddLordSent" index="1" title="请选择整改人员" choose="{{lordSent}}">
|
<select-group-person rectifierData="{{lordSentList}}" multiple="{{fales}}" bindselected="onAddLordSent" index="1" title="请选择整改人员" choose="{{form.lordSentUser}}">
|
||||||
</select-group-person>
|
</select-group-person>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -38,7 +38,7 @@
|
||||||
<view class="module_see_info_delete" wx:if="{{index != 0}}" bindtap="onNewIssuesDelete" data-index="{{index}}"><van-icon name="delete" /> 删除</view>
|
<view class="module_see_info_delete" wx:if="{{index != 0}}" bindtap="onNewIssuesDelete" data-index="{{index}}"><van-icon name="delete" /> 删除</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_info_list">
|
<view class="inspect_info_list">
|
||||||
<view class="inspect_info_title" style="padding: 20rpx 0 20rpx;">检查图片</view>
|
<view class="markers inspect_info_title">隐患图片</view>
|
||||||
<view class="problem_list_info_con">
|
<view class="problem_list_info_con">
|
||||||
<file-uploader bindimages="onImagesArr" data-index="{{index}}" fileUrlArray="{{item.image_upload}}"></file-uploader>
|
<file-uploader bindimages="onImagesArr" data-index="{{index}}" fileUrlArray="{{item.image_upload}}"></file-uploader>
|
||||||
</view>
|
</view>
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="problem_submit_to">
|
<view class="problem_submit_to">
|
||||||
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>
|
<view class="problem_submit_to_btn" bindtap="cancelSaveView">取消</view>
|
||||||
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="onProblemSubmitSave">保存草稿</view>
|
<view class="problem_submit_to_btn problem_submit_to_save" bindtap="submitSave">保存草稿</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
|
@ -4,3 +4,15 @@
|
||||||
.van-image__img{
|
.van-image__img{
|
||||||
border-radius: 10rpx !important;
|
border-radius: 10rpx !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.van-steps {
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.van-step--horizontal .van-step__circle-container {
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.van-steps--horizontal {
|
||||||
|
padding: 10px 20px !important;
|
||||||
|
}
|
||||||
|
|
|
@ -1,267 +1,263 @@
|
||||||
import config from '../../../config'
|
import config from '../../../config'
|
||||||
import {
|
import {
|
||||||
getToken
|
getToken,
|
||||||
} from '../../../utils/auth'
|
getUserInfo
|
||||||
|
} from '../../../utils/auth'
|
||||||
import {
|
import {
|
||||||
list
|
list,
|
||||||
} from '../../../api/problemmodify'
|
listCount
|
||||||
const app = getApp()
|
} from '../../../api/problemmodify'
|
||||||
Page({
|
const app = getApp()
|
||||||
|
Page({
|
||||||
/**
|
|
||||||
* 页面的初始数据
|
|
||||||
*/
|
|
||||||
data: {
|
|
||||||
type:"",
|
|
||||||
typeName:"",
|
|
||||||
addFlag:true,
|
|
||||||
addDraftFlag:true,
|
|
||||||
projectId:"",
|
|
||||||
projectName:"",
|
|
||||||
initData: {},
|
|
||||||
pageNum:1,
|
|
||||||
pageSize:10,
|
|
||||||
total:0,
|
|
||||||
listData:[],
|
|
||||||
activeState:"dzg",
|
|
||||||
dzgCount:0,
|
|
||||||
dfjCount:0,
|
|
||||||
yclCount:0,
|
|
||||||
imgBaseUrl: config.baseImgUrl,
|
|
||||||
},
|
|
||||||
|
|
||||||
//项目切换 返回值
|
/**
|
||||||
onProjectSelect(e) {
|
* 页面的初始数据
|
||||||
let projectId = e.detail.id;
|
*/
|
||||||
let projectName = e.detail.text;
|
data: {
|
||||||
app.globalData.useProjectId = projectId;
|
type: "",
|
||||||
app.globalData.useProjectName = projectName;
|
typeName: "",
|
||||||
this.onLoad({type:this.data.type});
|
addFlag: false,
|
||||||
|
addDraftFlag: false,
|
||||||
|
projectId: "",
|
||||||
|
projectName: "",
|
||||||
|
initData: {},
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0,
|
||||||
|
listData: [],
|
||||||
|
activeState: "dzg",
|
||||||
|
dzgCount: 0,
|
||||||
|
dfjCount: 0,
|
||||||
|
yzgCount: 0,
|
||||||
|
ywcCount: 0,
|
||||||
|
imgBaseUrl: config.baseImgUrl,
|
||||||
|
projectUserInfo: {}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面加载
|
|
||||||
*/
|
|
||||||
onLoad(options) {
|
|
||||||
if(!getToken()){
|
|
||||||
wx.redirectTo({
|
|
||||||
url: '../../login/login',
|
|
||||||
})
|
|
||||||
}
|
|
||||||
this.setData({
|
|
||||||
type:options.type,
|
|
||||||
typeName:options.type==1?"质量":"安全",
|
|
||||||
projectId:app.globalData.useProjectId,
|
|
||||||
projectName:app.globalData.useProjectName,
|
|
||||||
initData: {
|
|
||||||
id: app.globalData.useProjectId,
|
|
||||||
text: app.globalData.useProjectName,
|
|
||||||
},
|
|
||||||
pageNum:1,
|
|
||||||
pageSize:10,
|
|
||||||
listData: [],
|
|
||||||
total: 0
|
|
||||||
});
|
|
||||||
this.getListData();
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
//项目切换 返回值
|
||||||
* 添加隐患信息
|
onProjectSelect(e) {
|
||||||
*/
|
let projectId = e.detail.id;
|
||||||
skipAdd(){
|
let projectName = e.detail.text;
|
||||||
wx.redirectTo({
|
app.globalData.useProjectId = projectId;
|
||||||
url: `../add/index?type=${this.data.type}`,
|
app.globalData.useProjectName = projectName;
|
||||||
})
|
this.onLoad({
|
||||||
},
|
type: this.data.type
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 添加隐患草稿
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
skipAddDarft(){
|
onLoad(options) {
|
||||||
|
if (!getToken()) {
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: `../draft/index?type=${this.data.type}`,
|
url: '../../login/login',
|
||||||
})
|
})
|
||||||
},
|
}
|
||||||
|
const proUserInfo = getUserInfo();
|
||||||
|
const _activeState = proUserInfo.projectUserInfo.subDeptType == "1" ? "dfj" : "dzg";
|
||||||
|
this.setData({
|
||||||
|
type: options.type,
|
||||||
|
typeName: options.type == 1 ? "质量" : "安全",
|
||||||
|
addFlag: proUserInfo.projectUserInfo.subDeptType == "1",
|
||||||
|
addDraftFlag: proUserInfo.projectUserInfo.subDeptType == "1",
|
||||||
|
activeState: _activeState,
|
||||||
|
projectUserInfo: proUserInfo.projectUserInfo,
|
||||||
|
projectId: app.globalData.useProjectId,
|
||||||
|
projectName: app.globalData.useProjectName,
|
||||||
|
initData: {
|
||||||
|
id: app.globalData.useProjectId,
|
||||||
|
text: app.globalData.useProjectName,
|
||||||
|
},
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
listData: [],
|
||||||
|
total: 0
|
||||||
|
});
|
||||||
|
this.getListData(proUserInfo.projectUserInfo, _activeState, options.type);
|
||||||
|
},
|
||||||
|
|
||||||
getInfo(e){
|
/**
|
||||||
let {id,checkState,lordSentUser,recheckSendUser} = e.currentTarget.dataset.set
|
* 添加隐患信息
|
||||||
if((checkState==0 || checkState==3) && lordSentUser==this.data.loginName){
|
*/
|
||||||
//整改页面(状态时待整改&&整改人是当前登录人)
|
skipAdd() {
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: `../modify/index?id=${id}`,
|
url: `../add/index?type=${this.data.type}`,
|
||||||
})
|
})
|
||||||
}else if(checkState==1 && recheckSendUser==this.data.loginName){
|
},
|
||||||
//复检页面 (状态时待复检&&复检人是当前登录人)
|
|
||||||
wx.redirectTo({
|
/**
|
||||||
url: `../check/index?id=${id}`,
|
* 添加隐患草稿
|
||||||
})
|
*/
|
||||||
}else{
|
skipAddDarft() {
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: `../info/index?id=${id}`,
|
url: `../draft/index?type=${this.data.type}`,
|
||||||
})
|
})
|
||||||
}
|
},
|
||||||
},
|
|
||||||
|
getInfo(e) {
|
||||||
/**
|
let {
|
||||||
* 查询项目质量隐患排查数据
|
id,
|
||||||
*/
|
checkState,
|
||||||
getListData() {
|
lordSentUser,
|
||||||
let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId" + app.globalData.useProjectId+"&infoType="+this.data.type;
|
recheckSendUser
|
||||||
list(params).then(res =>{
|
} = e.currentTarget.dataset.set
|
||||||
if(res.data == 200){
|
if ((checkState == 0 || checkState == 3) && lordSentUser == this.data.loginName) {
|
||||||
this.setData({
|
//整改页面(状态时待整改&&整改人是当前登录人)
|
||||||
total: res.total,
|
wx.redirectTo({
|
||||||
listData: this.data.listData.concat(res.rows)
|
url: `../modify/index?id=${id}`,
|
||||||
|
})
|
||||||
|
} else if (checkState == 1 && recheckSendUser == this.data.loginName) {
|
||||||
|
//复检页面 (状态时待复检&&复检人是当前登录人)
|
||||||
|
wx.redirectTo({
|
||||||
|
url: `../check/index?id=${id}`,
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
wx.redirectTo({
|
||||||
|
url: `../info/index?id=${id}`,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询项目质量隐患排查数据
|
||||||
|
*/
|
||||||
|
getListData(userInfo, activeState, type) {
|
||||||
|
let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&comId=" + userInfo.comId + "&projectId=" + app.globalData.useProjectId + "&infoType=" + type + "&activeTags=" + activeState;
|
||||||
|
list(params).then(res => {
|
||||||
|
if (res.data == 200) {
|
||||||
|
this.setData({
|
||||||
|
total: res.total,
|
||||||
|
listData: this.data.listData.concat(res.rows)
|
||||||
})
|
})
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
queryCount(param){
|
|
||||||
let that = this;
|
|
||||||
//查询统计数量
|
|
||||||
wx.request({
|
|
||||||
url: app.globalData.reqUrl + '/wechat/projectProblemmodify/queryCount',
|
|
||||||
data: param,
|
|
||||||
method: "get",
|
|
||||||
success: function (res) {
|
|
||||||
let sum1=0;
|
|
||||||
let sumfj=0;
|
|
||||||
if(res.data.data.check0){
|
|
||||||
sum1+=res.data.data.check0;
|
|
||||||
}
|
|
||||||
if(res.data.data.check1){
|
|
||||||
sumfj+=res.data.data.check1;
|
|
||||||
}
|
|
||||||
if(res.data.data.check3){
|
|
||||||
sum1+=res.data.data.check3;
|
|
||||||
}
|
|
||||||
let sum4=0;
|
|
||||||
let sum99=0;
|
|
||||||
if(res.data.data.check4){
|
|
||||||
sum4+=res.data.data.check4;
|
|
||||||
}
|
|
||||||
if(res.data.data.check99){
|
|
||||||
sum99+=res.data.data.check99;
|
|
||||||
}
|
|
||||||
that.setData({
|
|
||||||
dzgCount:sum1,
|
|
||||||
dfjCount:sumfj,
|
|
||||||
yclCount:sum4,
|
|
||||||
zgcsCount:sum99
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 标签切换
|
|
||||||
*/
|
|
||||||
trainingTypeJump(e){
|
|
||||||
let index = e.currentTarget.dataset.index;
|
|
||||||
let nav = "";
|
|
||||||
if(index == 1){
|
|
||||||
nav = 'dzg';
|
|
||||||
}if(index == 2){
|
|
||||||
nav = 'dfj';
|
|
||||||
}else if(index == 3){
|
|
||||||
nav = 'ycl';
|
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
// 统计列表
|
||||||
|
listCount(params).then(res => {
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.setData({
|
||||||
|
dzgCount: res.data.dzg,
|
||||||
|
dfjCount: res.data.dfj,
|
||||||
|
yzgCount: res.data.yzg,
|
||||||
|
ywcCount: res.data.ywc,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标签切换
|
||||||
|
*/
|
||||||
|
trainingTypeJump(e) {
|
||||||
|
let index = e.currentTarget.dataset.index;
|
||||||
|
let nav = "";
|
||||||
|
if (index == 1) {
|
||||||
|
nav = 'dzg';
|
||||||
|
}
|
||||||
|
if (index == 2) {
|
||||||
|
nav = 'yzg';
|
||||||
|
} else if (index == 3) {
|
||||||
|
nav = 'dfj';
|
||||||
|
} else if (index == 4) {
|
||||||
|
nav = 'dzg';
|
||||||
|
} else if (index == 5) {
|
||||||
|
nav = 'ywc';
|
||||||
|
}
|
||||||
|
this.setData({
|
||||||
|
activeState: nav,
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
listData: [],
|
||||||
|
});
|
||||||
|
this.getListData(this.data.projectUserInfo, nav, this.data.type);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面初次渲染完成
|
||||||
|
*/
|
||||||
|
onReady() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 生命周期函数--监听页面显示
|
||||||
|
*/
|
||||||
|
onShow() {
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
returnToPage: function () {
|
||||||
|
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
||||||
|
if (wx.getStorageSync('nav-menu') == "gdgn") {
|
||||||
|
wx.redirectTo({
|
||||||
|
url: '../../project_more/index',
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
if (this.data.type == 1) {
|
||||||
|
wx.redirectTo({
|
||||||
|
url: '../../../../pages/quality_manage/index',
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
wx.redirectTo({
|
||||||
|
url: '../../../../pages/quality_manage/index',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
//项目切换 返回值
|
||||||
|
onProjectSelect(e) {
|
||||||
|
let projectId = e.detail.id;
|
||||||
|
let projectName = e.detail.text;
|
||||||
|
app.globalData.projectId = projectId;
|
||||||
|
app.globalData.projectName = projectName;
|
||||||
|
this.onLoad();
|
||||||
|
},
|
||||||
|
|
||||||
|
onScrollToLower() {
|
||||||
|
let nal = Math.ceil(this.data.total / this.data.pageSize);
|
||||||
|
if (this.data.pageNum < nal) {
|
||||||
this.setData({
|
this.setData({
|
||||||
activeState:nav,
|
pageNum: this.data.pageNum + 1
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
listData: [],
|
|
||||||
});
|
});
|
||||||
this.getListData();
|
this.getListData(this.data.projectUserInfo, this.data.activeState, this.data.type);
|
||||||
},
|
} else {
|
||||||
|
console.log("已经到底了,没有数据可加载!!!");
|
||||||
/**
|
}
|
||||||
* 生命周期函数--监听页面初次渲染完成
|
},
|
||||||
*/
|
|
||||||
onReady() {
|
/**
|
||||||
|
* 生命周期函数--监听页面隐藏
|
||||||
},
|
*/
|
||||||
|
onHide() {
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面显示
|
},
|
||||||
*/
|
|
||||||
onShow() {
|
/**
|
||||||
|
* 生命周期函数--监听页面卸载
|
||||||
},
|
*/
|
||||||
|
onUnload() {
|
||||||
returnToPage: function () {
|
|
||||||
/*关闭当前页面,跳转到应用内的某个页面。但是不允许跳转到 tabbar 页面*/
|
},
|
||||||
if(wx.getStorageSync('nav-menu')=="gdgn"){
|
|
||||||
wx.redirectTo({
|
/**
|
||||||
url: '../../project_more/index',
|
* 页面相关事件处理函数--监听用户下拉动作
|
||||||
})
|
*/
|
||||||
}else{
|
onPullDownRefresh() {
|
||||||
if(this.data.type==1){
|
|
||||||
wx.redirectTo({
|
},
|
||||||
url: '../../../../pages/quality_manage/index',
|
|
||||||
})
|
/**
|
||||||
}else{
|
* 页面上拉触底事件的处理函数
|
||||||
wx.redirectTo({
|
*/
|
||||||
url: '../../../../pages/quality_manage/index',
|
onReachBottom() {
|
||||||
})
|
|
||||||
}
|
},
|
||||||
}
|
|
||||||
},
|
/**
|
||||||
|
* 用户点击右上角分享
|
||||||
//项目切换 返回值
|
*/
|
||||||
onProjectSelect(e){
|
onShareAppMessage() {
|
||||||
let projectId = e.detail.id;
|
|
||||||
let projectName = e.detail.text;
|
}
|
||||||
app.globalData.projectId = projectId;
|
})
|
||||||
app.globalData.projectName = projectName;
|
|
||||||
this.onLoad();
|
|
||||||
},
|
|
||||||
|
|
||||||
onScrollToLower(){
|
|
||||||
let nal = Math.ceil(this.data.total / this.data.pageSize);
|
|
||||||
if (this.data.pageNum < nal) {
|
|
||||||
this.setData({
|
|
||||||
pageNum: this.data.pageNum + 1
|
|
||||||
});
|
|
||||||
this.getListData();
|
|
||||||
}else{
|
|
||||||
console.log("已经到底了,没有数据可加载!!!");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面隐藏
|
|
||||||
*/
|
|
||||||
onHide() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生命周期函数--监听页面卸载
|
|
||||||
*/
|
|
||||||
onUnload() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 页面相关事件处理函数--监听用户下拉动作
|
|
||||||
*/
|
|
||||||
onPullDownRefresh() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 页面上拉触底事件的处理函数
|
|
||||||
*/
|
|
||||||
onReachBottom() {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户点击右上角分享
|
|
||||||
*/
|
|
||||||
onShareAppMessage() {
|
|
||||||
|
|
||||||
}
|
|
||||||
})
|
|
|
@ -14,10 +14,14 @@
|
||||||
</view>
|
</view>
|
||||||
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
|
<scroll-view class="max_content_scroll" type="list" scroll-y bindscrolltolower="onScrollToLower">
|
||||||
<project-select init="{{initData}}" bindchange="onProjectSelect" id="projectSel"></project-select>
|
<project-select init="{{initData}}" bindchange="onProjectSelect" id="projectSel"></project-select>
|
||||||
<view class="modify_video_nav" style="margin-top: 5rpx;">
|
<view wx:if="{{projectUserInfo.subDeptType!='1'}}" class="modify_video_nav" style="margin-top: 5rpx;">
|
||||||
<view class="{{activeState=='dzg'?'active':''}}" bindtap="trainingTypeJump" data-index="1"><text>整改({{dzgCount}})</text></view>
|
<view class="{{activeState=='dzg'?'active':''}}" bindtap="trainingTypeJump" data-index="1"><text>待整改({{dzgCount}})</text></view>
|
||||||
<view class="{{activeState=='dfj'?'active':''}}" bindtap="trainingTypeJump" data-index="2"><text>复检({{dfjCount}})</text></view>
|
<view class="{{activeState=='yzg'?'active':''}}" bindtap="trainingTypeJump" data-index="2"><text>已整改({{yzgCount}})</text></view>
|
||||||
<view class="{{activeState=='ycl'?'active':''}}" bindtap="trainingTypeJump" data-index="3"><text>完成({{yclCount}})</text></view>
|
</view>
|
||||||
|
<view wx:if="{{projectUserInfo.subDeptType=='1'}}" class="modify_video_nav" style="margin-top: 5rpx;">
|
||||||
|
<view class="{{activeState=='dfj'?'active':''}}" bindtap="trainingTypeJump" data-index="3"><text>待复检({{dfjCount}})</text></view>
|
||||||
|
<view class="{{activeState=='dzg'?'active':''}}" bindtap="trainingTypeJump" data-index="4"><text>待整改({{dzgCount}})</text></view>
|
||||||
|
<view class="{{activeState=='ywc'?'active':''}}" bindtap="trainingTypeJump" data-index="5"><text>已完成({{ywcCount}})</text></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_max_scroll">
|
<view class="inspect_max_scroll">
|
||||||
<!--专项检查样式zxjc-->
|
<!--专项检查样式zxjc-->
|
||||||
|
@ -32,8 +36,8 @@
|
||||||
<view wx:if="{{item.checkState==3}}" class="code_label code_label_red">复检驳回</view>
|
<view wx:if="{{item.checkState==3}}" class="code_label code_label_red">复检驳回</view>
|
||||||
<view wx:if="{{item.checkState==4}}" class="code_label code_label_green">整改完成</view>
|
<view wx:if="{{item.checkState==4}}" class="code_label code_label_green">整改完成</view>
|
||||||
</view>
|
</view>
|
||||||
<text class="timeline_for_state_1" wx:if="{{item.problemType=='1'}}">常规检查</text>
|
<text class="timeline_for_state_1" wx:if="{{item.problemType!='4'}}">{{item.problemTypeName}}</text>
|
||||||
<text class="timeline_for_state_2" wx:if="{{item.problemType=='2'}}">专项检查</text>
|
<text class="timeline_for_state_2" wx:if="{{item.problemType=='4'}}">{{item.problemTypeName}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="inspect_list_info">
|
<view class="inspect_list_info">
|
||||||
|
@ -44,7 +48,8 @@
|
||||||
<view class="inspect_list_info_data">
|
<view class="inspect_list_info_data">
|
||||||
<view class="inspect_list_info_data_prop color_blue">隐患类型:<text>{{item.dangerTypeName}}</text></view>
|
<view class="inspect_list_info_data_prop color_blue">隐患类型:<text>{{item.dangerTypeName}}</text></view>
|
||||||
<view class="inspect_list_info_data_prop">隐患描述:<text>{{item.workParts}}</text></view>
|
<view class="inspect_list_info_data_prop">隐患描述:<text>{{item.workParts}}</text></view>
|
||||||
<view class="inspect_list_info_data_prop">检查单位:<text>{{item.deptName}}</text></view>
|
<view class="inspect_list_info_data_prop color_orange">整改人:<text>{{item.lordSentUser}}</text></view>
|
||||||
|
<view class="inspect_list_info_data_prop color_blue">复检人:<text>{{item.recheckSendUser}}</text></view>
|
||||||
<view class="inspect_list_info_data_prop">检查时间:<text class="color_blue">{{item.createTime}}</text></view>
|
<view class="inspect_list_info_data_prop">检查时间:<text class="color_blue">{{item.createTime}}</text></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
@ -135,6 +135,7 @@ Page({
|
||||||
}],
|
}],
|
||||||
illnessStatus: '',
|
illnessStatus: '',
|
||||||
supIllnessStatus: '',
|
supIllnessStatus: '',
|
||||||
|
loadShow:false
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1527,6 +1528,9 @@ Page({
|
||||||
let subDeptInfos = {
|
let subDeptInfos = {
|
||||||
..._form.subDeptInfos
|
..._form.subDeptInfos
|
||||||
};
|
};
|
||||||
|
this.setData({
|
||||||
|
loadShow: true
|
||||||
|
})
|
||||||
let uploadFiles = [];
|
let uploadFiles = [];
|
||||||
if (_form.businessLicensePath && _form.businessLicensePath.length > 0) {
|
if (_form.businessLicensePath && _form.businessLicensePath.length > 0) {
|
||||||
uploadFiles.push({
|
uploadFiles.push({
|
||||||
|
@ -1623,13 +1627,9 @@ Page({
|
||||||
if (_form.proProjectInfoSubdeptsUsers && _form.proProjectInfoSubdeptsUsers.userInfos) {
|
if (_form.proProjectInfoSubdeptsUsers && _form.proProjectInfoSubdeptsUsers.userInfos) {
|
||||||
_form.proProjectInfoSubdeptsUsers.userInfos = JSON.stringify(_form.proProjectInfoSubdeptsUsers.userInfos);
|
_form.proProjectInfoSubdeptsUsers.userInfos = JSON.stringify(_form.proProjectInfoSubdeptsUsers.userInfos);
|
||||||
}
|
}
|
||||||
wx.showLoading({
|
|
||||||
mask: true,
|
|
||||||
title: '正在处理'
|
|
||||||
});
|
|
||||||
registerSubDepts(_form).then(res => {
|
registerSubDepts(_form).then(res => {
|
||||||
wx.hideLoading({
|
this.setData({
|
||||||
success: (r) => {}
|
loadShow: false
|
||||||
});
|
});
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.setData({
|
this.setData({
|
||||||
|
@ -1763,6 +1763,9 @@ Page({
|
||||||
let _form = {
|
let _form = {
|
||||||
...this.data.form
|
...this.data.form
|
||||||
};
|
};
|
||||||
|
this.setData({
|
||||||
|
loadShow: true
|
||||||
|
});
|
||||||
let uploadFiles = [];
|
let uploadFiles = [];
|
||||||
if (_form.cardImgPos && _form.cardImgPos.length > 0) {
|
if (_form.cardImgPos && _form.cardImgPos.length > 0) {
|
||||||
uploadFiles.push({
|
uploadFiles.push({
|
||||||
|
@ -1831,13 +1834,9 @@ Page({
|
||||||
userInfos.cardImgPos = _form.cardImgPos;
|
userInfos.cardImgPos = _form.cardImgPos;
|
||||||
userInfos.cardImgInv = _form.cardImgInv;
|
userInfos.cardImgInv = _form.cardImgInv;
|
||||||
_form.userInfos = JSON.stringify(userInfos);
|
_form.userInfos = JSON.stringify(userInfos);
|
||||||
wx.showLoading({
|
|
||||||
mask: true,
|
|
||||||
title: '正在处理'
|
|
||||||
});
|
|
||||||
registerSubDeptsUsers(_form).then(res => {
|
registerSubDeptsUsers(_form).then(res => {
|
||||||
wx.hideLoading({
|
this.setData({
|
||||||
success: (res) => {}
|
loadShow: false
|
||||||
});
|
});
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.setData({
|
this.setData({
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
"van-checkbox": "@vant/weapp/checkbox/index",
|
"van-checkbox": "@vant/weapp/checkbox/index",
|
||||||
"van-checkbox-group": "@vant/weapp/checkbox-group/index",
|
"van-checkbox-group": "@vant/weapp/checkbox-group/index",
|
||||||
"van-steps": "@vant/weapp/steps/index",
|
"van-steps": "@vant/weapp/steps/index",
|
||||||
"van-notice-bar": "@vant/weapp/notice-bar/index"
|
"van-notice-bar": "@vant/weapp/notice-bar/index",
|
||||||
|
"van-overlay": "@vant/weapp/overlay/index"
|
||||||
},
|
},
|
||||||
"navigationStyle": "custom"
|
"navigationStyle": "custom"
|
||||||
}
|
}
|
|
@ -352,8 +352,8 @@
|
||||||
<voucher-select columns="{{craftTypeList}}" bindchange="onChageCraftType" placeholder="请选择工种类型" selectValue="{{form.craftType}}"></voucher-select>
|
<voucher-select columns="{{craftTypeList}}" bindchange="onChageCraftType" placeholder="请选择工种类型" selectValue="{{form.craftType}}"></voucher-select>
|
||||||
</van-col>
|
</van-col>
|
||||||
<van-col span="16"> -->
|
<van-col span="16"> -->
|
||||||
<voucher-select columns="{{craftPostList}}" bindchange="onChageCraftPost" placeholder="请选择工种岗位" selectValue="{{form.craftPost}}"></voucher-select>
|
<voucher-select columns="{{craftPostList}}" bindchange="onChageCraftPost" placeholder="请选择工种岗位" selectValue="{{form.craftPost}}"></voucher-select>
|
||||||
<!-- </van-col>
|
<!-- </van-col>
|
||||||
</van-row> -->
|
</van-row> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -922,20 +922,27 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view wx:if="{{userPhoneNumber && active==100}}">
|
<view wx:if="{{userPhoneNumber && active==100}}">
|
||||||
<view class="header_title">
|
<view class="header_title">
|
||||||
<view class="header_title_row">
|
<view class="header_title_row">
|
||||||
<view class="header_name">{{title}}</view>
|
<view class="header_name">{{title}}</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
<view class="max_content">
|
||||||
<view class="max_content">
|
<project-select init="{{initProject}}"></project-select>
|
||||||
<project-select init="{{initProject}}"></project-select>
|
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
|
||||||
<van-steps steps="{{ flowNodes }}" active="{{ active }}" />
|
<view class="kaoshimianban_8">
|
||||||
<view class="kaoshimianban_8">
|
<view class="kaoshimianban_9">
|
||||||
<view class="kaoshimianban_9">
|
<jyq-result wx:if="{{form.approveStatus!='100' && form.approveStatus!='11'}}" iconPath="https://xiangguan.sxyanzhu.com/profile/icon/dd.png" title="信息审核中" description="您的信息已登记完成,相关人员正在审核您的信息,请耐心等待。" actionText="下 载 承 诺 书" bind:action="downloadSignetFiles" />
|
||||||
<jyq-result wx:if="{{form.approveStatus!='100' && form.approveStatus!='11'}}" iconPath="https://xiangguan.sxyanzhu.com/profile/icon/dd.png" title="信息审核中" description="您的信息已登记完成,相关人员正在审核您的信息,请耐心等待。" actionText="下 载 承 诺 书" bind:action="downloadSignetFiles" />
|
<jyq-result wx:if="{{form.approveStatus=='100'}}" iconPath="https://xiangguan.sxyanzhu.com/profile/icon/cg.png" title="恭喜,审核通过" description="您的信息已登记完成。" actionText="下 载 承 诺 书" bind:action="downloadSignetFiles" descActionText="立 即 登 录" bind:descAction="wxSignLogin" />
|
||||||
<jyq-result wx:if="{{form.approveStatus=='100'}}" iconPath="https://xiangguan.sxyanzhu.com/profile/icon/cg.png" title="恭喜,审核通过" description="您的信息已登记完成。" actionText="下 载 承 诺 书" bind:action="downloadSignetFiles" descActionText="立 即 登 录" bind:descAction="wxSignLogin" />
|
<jyq-result wx:if="{{busExamInfos.passMark>busExamInfos.userMark}}" iconPath="https://xiangguan.sxyanzhu.com/profile/icon/sb.png" title="很遗憾!审核未通过" description="您的信息已登记完成,但未审核通过。" />
|
||||||
<jyq-result wx:if="{{busExamInfos.passMark>busExamInfos.userMark}}" iconPath="https://xiangguan.sxyanzhu.com/profile/icon/sb.png" title="很遗憾!审核未通过" description="您的信息已登记完成,但未审核通过。"/>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
|
||||||
|
<van-overlay show="{{loadShow}}">
|
||||||
|
<view class="gif">
|
||||||
|
<image src="/images/loding.gif"></image>
|
||||||
|
<view>数据处理中!请稍后...</view>
|
||||||
|
</view>
|
||||||
|
</van-overlay>
|
Loading…
Reference in New Issue