Compare commits
No commits in common. "b38c88f5490b1c5ce379b7b7ada567d1ad3c7316" and "72b770d62693b342c19975b7e5381d988a095359" have entirely different histories.
b38c88f549
...
72b770d626
|
@ -50,8 +50,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="comId != null "> and comId = #{comId}</if>
|
<if test="comId != null "> and comId = #{comId}</if>
|
||||||
<if test="projectId != null "> and projectId = #{projectId}</if>
|
<if test="projectId != null "> and projectId = #{projectId}</if>
|
||||||
<if test="infoType != null "> and infoType = #{infoType}</if>
|
<if test="infoType != null "> and infoType = #{infoType}</if>
|
||||||
|
<if test="marksPicture != null and marksPicture != ''"> and marks_picture = #{marksPicture}</if>
|
||||||
|
<if test="marksVideo != null and marksVideo != ''"> and marks_video = #{marksVideo}</if>
|
||||||
|
<if test="problemArea != null and problemArea != ''"> and problemArea = #{problemArea}</if>
|
||||||
|
<if test="workParts != null and workParts != ''"> and workParts = #{workParts}</if>
|
||||||
|
<if test="changeInfo != null and changeInfo != ''"> and changeInfo = #{changeInfo}</if>
|
||||||
|
<if test="lordSent != null and lordSent != ''"> and lordSent = #{lordSent}</if>
|
||||||
|
<if test="lordSentUser != null and lordSentUser != ''"> and lordSentUser = #{lordSentUser}</if>
|
||||||
|
<if test="copySend != null and copySend != ''"> and copySend = #{copySend}</if>
|
||||||
|
<if test="copySendUser != null and copySendUser != ''"> and copySendUser = #{copySendUser}</if>
|
||||||
|
<if test="checkState != null "> and checkState = #{checkState}</if>
|
||||||
|
<if test="nickedArea != null and nickedArea != ''"> and nickedArea = #{nickedArea}</if>
|
||||||
|
<if test="nickedTime != null "> and nickedTime = #{nickedTime}</if>
|
||||||
|
<if test="projectType != null and projectType != ''"> and projectType = #{projectType}</if>
|
||||||
|
<if test="processName != null and processName != ''"> and processName like concat('%', #{processName}, '%')</if>
|
||||||
|
<if test="projectName != null and projectName != ''"> and projectName like concat('%', #{projectName}, '%')</if>
|
||||||
|
<if test="nickedInfo != null and nickedInfo != ''"> and nickedInfo = #{nickedInfo}</if>
|
||||||
|
<if test="checkUser != null and checkUser != ''"> and checkUser = #{checkUser}</if>
|
||||||
|
<if test="checkUserPhone != null and checkUserPhone != ''"> and checkUserPhone = #{checkUserPhone}</if>
|
||||||
|
<if test="smarkUrl != null and smarkUrl != ''"> and smark_url = #{smarkUrl}</if>
|
||||||
|
<if test="isDel != null "> and isDel = #{isDel}</if>
|
||||||
|
<if test="createUser != null and createUser != ''"> and createUser = #{createUser}</if>
|
||||||
|
<if test="createTime != null "> and createTime = #{createTime}</if>
|
||||||
|
<if test="updateUser != null and updateUser != ''"> and updateUser = #{updateUser}</if>
|
||||||
|
<if test="updateTime != null "> and updateTime = #{updateTime}</if>
|
||||||
|
<if test="dangerType != null and dangerType != ''"> and danger_type = #{dangerType}</if>
|
||||||
|
<if test="recheckSend != null and recheckSend != ''"> and recheckSend = #{recheckSend}</if>
|
||||||
|
<if test="recheckSendUser != null and recheckSendUser != ''"> and recheckSendUser = #{recheckSendUser}</if>
|
||||||
|
<if test="roleType != null "> and roleType = #{roleType}</if>
|
||||||
<if test="problemType != null and problemType != ''"> and problemType = #{problemType}</if>
|
<if test="problemType != null and problemType != ''"> and problemType = #{problemType}</if>
|
||||||
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''"> and date(createTime) between #{params.beginTime} and #{params.endTime}</if>
|
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
@ -111,8 +111,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="recheckSendUser != null and recheckSendUser != ''"> and ssp.recheckSendUser = #{recheckSendUser}</if>
|
<if test="recheckSendUser != null and recheckSendUser != ''"> and ssp.recheckSendUser = #{recheckSendUser}</if>
|
||||||
<if test="problemType != null and problemType != ''"> and ssp.problemType = #{problemType}</if>
|
<if test="problemType != null and problemType != ''"> and ssp.problemType = #{problemType}</if>
|
||||||
<if test="currentUserId != null and currentUserId!=''">
|
<if test="currentUserId != null and currentUserId!=''">
|
||||||
and (
|
and
|
||||||
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>
|
||||||
<if test='activeTags == "dzg"'> and ssp.checkState in (0,3) </if>
|
<if test='activeTags == "dzg"'> and ssp.checkState in (0,3) </if>
|
||||||
|
@ -299,7 +300,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<sql id="countUserWhere">
|
<sql id="countUserWhere">
|
||||||
<if test="projectName != null and projectName != ''"> and a.projectName like concat('%', #{projectName}, '%')</if>
|
|
||||||
<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>
|
||||||
<if test="createTime != null "> and date(a.createTime) >= date(#{createTime})</if>
|
<if test="createTime != null "> and date(a.createTime) >= date(#{createTime})</if>
|
||||||
|
@ -307,50 +307,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="createUser != null"> and a.createUser = #{createUser}</if>
|
<if test="createUser != null"> and a.createUser = #{createUser}</if>
|
||||||
<if test="lordSent != null and lordSent != ''"> and a.lordSent = #{lordSent}</if>
|
<if test="lordSent != null and lordSent != ''"> and a.lordSent = #{lordSent}</if>
|
||||||
<if test="currentUserId != null and currentUserId!=''">
|
<if test="currentUserId != null and currentUserId!=''">
|
||||||
and (
|
AND
|
||||||
|
(
|
||||||
a.createUser=#{currentUserId} or a.lordSent=#{currentUserId} or find_in_set(#{currentUserId},a.copySend) or a.recheckSend=#{currentUserId}
|
a.createUser=#{currentUserId} or a.lordSent=#{currentUserId} or find_in_set(#{currentUserId},a.copySend) or a.recheckSend=#{currentUserId}
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
and a.isDel=0
|
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="getListCount" parameterType="SmzSspProblemmodify" resultMap="SmzSspProblemmodifyResult">
|
<select id="getListCount" parameterType="SmzSspProblemmodify" resultMap="SmzSspProblemmodifyResult">
|
||||||
select 'a' projectName, count(1) id ,'全部' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.infoType=#{infoType}
|
select 'a' projectName, count(1) id ,'全部' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.comId=#{comId} and a.infoType=#{infoType} and a.isDel=0
|
||||||
<include refid="countUserWhere"></include>
|
<include refid="countUserWhere"></include>
|
||||||
union
|
union
|
||||||
select 'b' projectName, count(1) id,'待整改' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.infoType=#{infoType}
|
select 'b' projectName, count(1) id,'待整改' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.comId=#{comId} and a.infoType=#{infoType} and a.isDel=0 and a.checkState in (0,3)
|
||||||
<include refid="countUserWhere"></include>
|
<include refid="countUserWhere"></include>
|
||||||
union
|
union
|
||||||
select 'c' projectName, count(1) id,'待复检' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.infoType=#{infoType} and a.checkState in (1)
|
select 'c' projectName, count(1) id,'待复检' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.comId=#{comId} and a.infoType=#{infoType} and a.isDel=0 and a.checkState in (1)
|
||||||
<include refid="countUserWhere"></include>
|
<include refid="countUserWhere"></include>
|
||||||
union
|
union
|
||||||
select 'd' projectName, count(1) id,'整改完成' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.infoType=#{infoType} and a.checkState in (4)
|
select 'd' projectName, count(1) id,'整改完成' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.comId=#{comId} and a.infoType=#{infoType} and a.isDel=0 and a.checkState in (4)
|
||||||
<include refid="countUserWhere"></include>
|
<include refid="countUserWhere"></include>
|
||||||
union
|
union
|
||||||
select 'e' projectName, count(1) id,'整改超时' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.infoType=#{infoType} and a.checkState not in (4) and date(a.nickedTime) <= curdate()
|
select 'e' projectName, count(1) id,'整改超时' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.comId=#{comId} and a.infoType=#{infoType} and a.isDel=0 and a.checkState not in (4) and date(a.nickedTime) <= curdate()
|
||||||
<include refid="countUserWhere"></include>
|
<include refid="countUserWhere"></include>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getListCountBG" parameterType="SmzSspProblemmodify" resultMap="SmzSspProblemmodifyResult">
|
<select id="getListCountBG" parameterType="SmzSspProblemmodify" resultMap="SmzSspProblemmodifyResult">
|
||||||
select 'a' projectName, count(1) id ,'全部' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.infoType=#{infoType}
|
select 'a' projectName, count(1) id ,'全部' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.comId=#{comId} and a.infoType=#{infoType} and a.isDel=0
|
||||||
<include refid="countUserWhere"></include>
|
<include refid="countUserWhere"></include>
|
||||||
union
|
union
|
||||||
select 'b' projectName, count(1) id,'待整改' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.infoType=#{infoType} and a.checkState in (0)
|
select 'b' projectName, count(1) id,'待整改' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.comId=#{comId} and a.infoType=#{infoType} and a.isDel=0 and a.checkState in (0)
|
||||||
<include refid="countUserWhere"></include>
|
<include refid="countUserWhere"></include>
|
||||||
union
|
union
|
||||||
select 'c' projectName, count(1) id,'待复检' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.infoType=#{infoType} and a.checkState in (1)
|
select 'c' projectName, count(1) id,'待复检' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.comId=#{comId} and a.infoType=#{infoType} and a.isDel=0 and a.checkState in (1)
|
||||||
<include refid="countUserWhere"></include>
|
<include refid="countUserWhere"></include>
|
||||||
union
|
union
|
||||||
select 'd' projectName, count(1) id,'驳回' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.infoType=#{infoType} and a.checkState in (3)
|
select 'd' projectName, count(1) id,'驳回' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.comId=#{comId} and a.infoType=#{infoType} and a.isDel=0 and a.checkState in (3)
|
||||||
<include refid="countUserWhere"></include>
|
<include refid="countUserWhere"></include>
|
||||||
union
|
union
|
||||||
select 'e' projectName, count(1) id,'完成' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.infoType=#{infoType} and a.checkState in (4)
|
select 'e' projectName, count(1) id,'完成' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.comId=#{comId} and a.infoType=#{infoType} and a.isDel=0 and a.checkState in (4)
|
||||||
<include refid="countUserWhere"></include>
|
<include refid="countUserWhere"></include>
|
||||||
union
|
union
|
||||||
select 'f' projectName, count(1) id,'整改超时' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.infoType=#{infoType} and a.checkState not in (4) and date(a.nickedTime) <= curdate()
|
select 'f' projectName, count(1) id,'整改超时' remark from smz_ssp_problemmodify a where a.projectId=#{projectId} and a.comId=#{comId} and a.infoType=#{infoType} and a.isDel=0 and a.checkState not in (4) and date(a.nickedTime) <= curdate()
|
||||||
<include refid="countUserWhere"></include>
|
<include refid="countUserWhere"></include>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getWxListCount" parameterType="SmzSspProblemmodify" resultType="Map">
|
<select id="getWxListCount" parameterType="SmzSspProblemmodify" resultType="Map">
|
||||||
select ssp.checkState, count(1) as total from smz_ssp_problemmodify ssp
|
select ssp.checkState, count(1) as total from smz_ssp_problemmodify ssp
|
||||||
<where>
|
<where>
|
||||||
|
@ -358,7 +357,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="projectId != null "> and ssp.projectId = #{projectId}</if>
|
<if test="projectId != null "> and ssp.projectId = #{projectId}</if>
|
||||||
<if test="infoType != null "> and ssp.infoType = #{infoType}</if>
|
<if test="infoType != null "> and ssp.infoType = #{infoType}</if>
|
||||||
<if test="currentUserId != null and currentUserId!=''">
|
<if test="currentUserId != null and currentUserId!=''">
|
||||||
and (
|
and
|
||||||
|
(
|
||||||
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>
|
||||||
|
@ -436,29 +436,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
a.problemType
|
a.problemType
|
||||||
FROM
|
FROM
|
||||||
smz_ssp_problemmodify a
|
smz_ssp_problemmodify a
|
||||||
LEFT JOIN pro_project_info_subdepts_users b ON a.lordSent = b.user_id and a.projectId = b.project_id
|
LEFT JOIN pro_project_info_subdepts_users b ON a.lordSent = b.user_id AND a.projectId = b.project_id AND a.comId = b.com_id
|
||||||
LEFT JOIN pro_project_info_subdepts_users d ON a.recheckSend = d.user_id and a.projectId = d.project_id
|
LEFT JOIN pro_project_info_subdepts_users d ON a.recheckSend = d.user_id AND a.projectId = d.project_id AND a.comId = d.com_id
|
||||||
LEFT JOIN sys_user c ON a.createUser = c.user_id
|
LEFT JOIN sys_user c ON a.createUser = c.user_id
|
||||||
where a.projectId = #{projectId} and a.infoType = #{infoType}
|
|
||||||
<if test="checkState==1">
|
where a.isDel=0 and a.projectId=#{projectId} and a.comId=#{comId} and a.infoType=#{infoType}
|
||||||
|
<if test="projectName==1">
|
||||||
|
|
||||||
</if>
|
</if>
|
||||||
<if test="checkState==2">
|
<if test="projectName==2">
|
||||||
and a.checkState in (0,3)
|
and a.checkState in (0,3)
|
||||||
</if>
|
</if>
|
||||||
<if test="checkState==3">
|
<if test="projectName==3">
|
||||||
and a.checkState in (1)
|
and a.checkState in (1)
|
||||||
</if>
|
</if>
|
||||||
<if test="checkState==4">
|
<if test="projectName==4">
|
||||||
and a.checkState in (4)
|
and a.checkState in (4)
|
||||||
</if>
|
</if>
|
||||||
<if test="checkState==5">
|
<if test="projectName==5">
|
||||||
and a.checkState not in (4) and date(nickedTime) <= curdate()
|
and a.checkState not in (4) and date(nickedTime) <= curdate()
|
||||||
</if>
|
</if>
|
||||||
<if test="checkState==6">
|
<if test="projectName==6">
|
||||||
and a.checkState in (0)
|
and a.checkState in (0)
|
||||||
</if>
|
</if>
|
||||||
<if test="checkState==7">
|
<if test="projectName==7">
|
||||||
and a.checkState in (3)
|
and a.checkState in (3)
|
||||||
</if>
|
</if>
|
||||||
<include refid="countUserWhere"></include>
|
<include refid="countUserWhere"></include>
|
||||||
|
@ -466,7 +467,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
order by a.id desc
|
order by a.id desc
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="groupByProblemType" parameterType="SmzSspProblemmodify" resultMap="SmzSspProblemmodifyResult">
|
<select id="groupByProblemType" parameterType="SmzSspProblemmodify" resultMap="SmzSspProblemmodifyResult">
|
||||||
select a.dict_value nickedInfo,a.dict_label problemType,b.cnt id
|
select a.dict_value nickedInfo,a.dict_label problemType,b.cnt id
|
||||||
from (SELECT * from sys_dict_data dic WHERE dict_type='ssp_proble_type') a
|
from (SELECT * from sys_dict_data dic WHERE dict_type='ssp_proble_type') a
|
||||||
|
|
|
@ -119,7 +119,7 @@ public class GreenCarbonDataController extends BaseController
|
||||||
public AjaxResult add(@RequestBody GreenCarbonData greenCarbonData)
|
public AjaxResult add(@RequestBody GreenCarbonData greenCarbonData)
|
||||||
{
|
{
|
||||||
GreenCarbonData where =new GreenCarbonData();
|
GreenCarbonData where =new GreenCarbonData();
|
||||||
//where.setComId(greenCarbonData.getComId());
|
where.setComId(greenCarbonData.getComId());
|
||||||
where.setProjectId(greenCarbonData.getProjectId());
|
where.setProjectId(greenCarbonData.getProjectId());
|
||||||
where.setDataDate(greenCarbonData.getDataDate());
|
where.setDataDate(greenCarbonData.getDataDate());
|
||||||
where.setItemId(greenCarbonData.getItemId());
|
where.setItemId(greenCarbonData.getItemId());
|
||||||
|
@ -139,7 +139,7 @@ public class GreenCarbonDataController extends BaseController
|
||||||
public AjaxResult edit(@RequestBody GreenCarbonData greenCarbonData)
|
public AjaxResult edit(@RequestBody GreenCarbonData greenCarbonData)
|
||||||
{
|
{
|
||||||
GreenCarbonData where =new GreenCarbonData();
|
GreenCarbonData where =new GreenCarbonData();
|
||||||
//where.setComId(greenCarbonData.getComId());
|
where.setComId(greenCarbonData.getComId());
|
||||||
where.setProjectId(greenCarbonData.getProjectId());
|
where.setProjectId(greenCarbonData.getProjectId());
|
||||||
where.setDataDate(greenCarbonData.getDataDate());
|
where.setDataDate(greenCarbonData.getDataDate());
|
||||||
where.setItemId(greenCarbonData.getItemId());
|
where.setItemId(greenCarbonData.getItemId());
|
||||||
|
|
|
@ -98,7 +98,7 @@ public class GreenCarbonItemController extends BaseController
|
||||||
item.setProjectId(prjId);
|
item.setProjectId(prjId);
|
||||||
item.setComId(comId);
|
item.setComId(comId);
|
||||||
if(item.getId()==null|| item.getId().equals(0l)){
|
if(item.getId()==null|| item.getId().equals(0l)){
|
||||||
//where.setComId(item.getComId());
|
where.setComId(item.getComId());
|
||||||
where.setProjectId(item.getProjectId());
|
where.setProjectId(item.getProjectId());
|
||||||
where.setCarbonName(item.getCarbonName());
|
where.setCarbonName(item.getCarbonName());
|
||||||
where.setCarbonFactorType(item.getCarbonFactorType());
|
where.setCarbonFactorType(item.getCarbonFactorType());
|
||||||
|
@ -119,7 +119,7 @@ public class GreenCarbonItemController extends BaseController
|
||||||
if(old==null){
|
if(old==null){
|
||||||
item.setRemark("无效ID");
|
item.setRemark("无效ID");
|
||||||
}else{
|
}else{
|
||||||
//where.setComId(old.getComId());
|
where.setComId(old.getComId());
|
||||||
where.setProjectId(old.getProjectId());
|
where.setProjectId(old.getProjectId());
|
||||||
where.setCarbonName(item.getCarbonName());
|
where.setCarbonName(item.getCarbonName());
|
||||||
where.setCarbonFactorType(item.getCarbonFactorType());
|
where.setCarbonFactorType(item.getCarbonFactorType());
|
||||||
|
@ -162,7 +162,7 @@ public class GreenCarbonItemController extends BaseController
|
||||||
public AjaxResult add(@RequestBody GreenCarbonItem greenCarbonItem)
|
public AjaxResult add(@RequestBody GreenCarbonItem greenCarbonItem)
|
||||||
{
|
{
|
||||||
GreenCarbonItem where=new GreenCarbonItem();
|
GreenCarbonItem where=new GreenCarbonItem();
|
||||||
//where.setComId(greenCarbonItem.getComId());
|
where.setComId(greenCarbonItem.getComId());
|
||||||
where.setProjectId(greenCarbonItem.getProjectId());
|
where.setProjectId(greenCarbonItem.getProjectId());
|
||||||
where.setCarbonName(greenCarbonItem.getCarbonName());
|
where.setCarbonName(greenCarbonItem.getCarbonName());
|
||||||
where.setCarbonFactorType(greenCarbonItem.getCarbonFactorType());
|
where.setCarbonFactorType(greenCarbonItem.getCarbonFactorType());
|
||||||
|
@ -182,7 +182,7 @@ public class GreenCarbonItemController extends BaseController
|
||||||
public AjaxResult edit(@RequestBody GreenCarbonItem greenCarbonItem)
|
public AjaxResult edit(@RequestBody GreenCarbonItem greenCarbonItem)
|
||||||
{
|
{
|
||||||
GreenCarbonItem where=new GreenCarbonItem();
|
GreenCarbonItem where=new GreenCarbonItem();
|
||||||
//where.setComId(greenCarbonItem.getComId());
|
where.setComId(greenCarbonItem.getComId());
|
||||||
where.setProjectId(greenCarbonItem.getProjectId());
|
where.setProjectId(greenCarbonItem.getProjectId());
|
||||||
where.setCarbonName(greenCarbonItem.getCarbonName());
|
where.setCarbonName(greenCarbonItem.getCarbonName());
|
||||||
where.setCarbonFactorType(greenCarbonItem.getCarbonFactorType());
|
where.setCarbonFactorType(greenCarbonItem.getCarbonFactorType());
|
||||||
|
|
|
@ -152,7 +152,7 @@ public class ProCostOutputController extends BaseController
|
||||||
public AjaxResult listByProjectId(long projectId,long comId){
|
public AjaxResult listByProjectId(long projectId,long comId){
|
||||||
ProCostOutput where =new ProCostOutput();
|
ProCostOutput where =new ProCostOutput();
|
||||||
where.setProjectId(projectId);
|
where.setProjectId(projectId);
|
||||||
//where.setComId(comId);
|
where.setComId(comId);
|
||||||
List<ProCostOutput> list=proCostOutputService.selectProCostOutputList(where);
|
List<ProCostOutput> list=proCostOutputService.selectProCostOutputList(where);
|
||||||
if(list.size()==0){
|
if(list.size()==0){
|
||||||
proCostOutputService.initProject(projectId,comId);
|
proCostOutputService.initProject(projectId,comId);
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class SmzSspProblemmodifyController extends BaseController
|
||||||
{
|
{
|
||||||
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()) {
|
||||||
where.setCurrentUserId(null);
|
where.setCurrentUserId(null);
|
||||||
}else{
|
}else{
|
||||||
|
@ -76,7 +76,6 @@ public class SmzSspProblemmodifyController extends BaseController
|
||||||
public TableDataInfo wxList(SmzSspProblemmodify where)
|
public TableDataInfo wxList(SmzSspProblemmodify where)
|
||||||
{
|
{
|
||||||
SysUser user = SecurityUtils.getLoginUser().getSysUser();
|
SysUser user = SecurityUtils.getLoginUser().getSysUser();
|
||||||
where.setProjectId(user.getActiveProjectId());
|
|
||||||
if(SecurityUtils.isAdmin(SecurityUtils.getUserId()) || SecurityUtils.isGSAdmin()) {
|
if(SecurityUtils.isAdmin(SecurityUtils.getUserId()) || SecurityUtils.isGSAdmin()) {
|
||||||
where.setCurrentUserId(null);
|
where.setCurrentUserId(null);
|
||||||
}else{
|
}else{
|
||||||
|
@ -97,7 +96,7 @@ public class SmzSspProblemmodifyController extends BaseController
|
||||||
public AjaxResult getListCount(SmzSspProblemmodify where){
|
public AjaxResult getListCount(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()) {
|
||||||
where.setCurrentUserId(null);
|
where.setCurrentUserId(null);
|
||||||
}else{
|
}else{
|
||||||
|
|
|
@ -3,10 +3,8 @@ package com.yanzhu.manage.controller;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import com.yanzhu.common.security.utils.SecurityUtils;
|
|
||||||
import com.yanzhu.manage.domain.SmzSspProblemmodifyDraft;
|
import com.yanzhu.manage.domain.SmzSspProblemmodifyDraft;
|
||||||
import com.yanzhu.manage.service.ISmzSspProblemmodifyDraftService;
|
import com.yanzhu.manage.service.ISmzSspProblemmodifyDraftService;
|
||||||
import com.yanzhu.system.api.domain.SysUser;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
@ -44,13 +42,6 @@ public class SmzSspProblemmodifyDraftController extends BaseController
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(SmzSspProblemmodifyDraft smzSspProblemmodifyDraft)
|
public TableDataInfo list(SmzSspProblemmodifyDraft smzSspProblemmodifyDraft)
|
||||||
{
|
{
|
||||||
SysUser user = SecurityUtils.getLoginUser().getSysUser();
|
|
||||||
smzSspProblemmodifyDraft.setProjectId(user.getActiveProjectId());
|
|
||||||
if(SecurityUtils.isAdmin(SecurityUtils.getUserId()) || SecurityUtils.isGSAdmin()) {
|
|
||||||
smzSspProblemmodifyDraft.setCreateUser(null);
|
|
||||||
}else{
|
|
||||||
smzSspProblemmodifyDraft.setCreateUser(user.getUserId().toString());
|
|
||||||
}
|
|
||||||
startPage();
|
startPage();
|
||||||
List<SmzSspProblemmodifyDraft> list = smzSspProblemmodifyDraftService.selectSmzSspProblemmodifyDraftList(smzSspProblemmodifyDraft);
|
List<SmzSspProblemmodifyDraft> list = smzSspProblemmodifyDraftService.selectSmzSspProblemmodifyDraftList(smzSspProblemmodifyDraft);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
|
|
|
@ -4,7 +4,7 @@ module.exports = {
|
||||||
appId: "wx46466c7828eede2b",
|
appId: "wx46466c7828eede2b",
|
||||||
baseUrl: 'https://xiangguan.sxyanzhu.com/wechat',
|
baseUrl: 'https://xiangguan.sxyanzhu.com/wechat',
|
||||||
//baseUrl: 'http://127.0.0.1:8080',
|
//baseUrl: 'http://127.0.0.1:8080',
|
||||||
baseImgUrl: 'https://xiangguan.sxyanzhu.com',
|
baseImgUrl: 'https://xiangguan.sxyanzhu.com/wechat',
|
||||||
//baseImgUrl: 'http://127.0.0.1:9300',
|
//baseImgUrl: 'http://127.0.0.1:9300',
|
||||||
noSecuritys:['/code','/auth/wxLogin','/auth/getMaOpenId','/auth/getMaPhoneNumber','/auth/maLogin']
|
noSecuritys:['/code','/auth/wxLogin','/auth/getMaOpenId','/auth/getMaPhoneNumber','/auth/maLogin']
|
||||||
};
|
};
|
|
@ -123,7 +123,7 @@ Page({
|
||||||
* 查询项目质量隐患排查数据
|
* 查询项目质量隐患排查数据
|
||||||
*/
|
*/
|
||||||
getListData(userInfo, activeState, type) {
|
getListData(userInfo, activeState, type) {
|
||||||
let params = "pageNum=" + this.data.pageNum + "&pageSize=" + this.data.pageSize + "&projectId=" + app.globalData.useProjectId + "&infoType=" + type + "&activeTags=" + activeState;
|
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 => {
|
list(params).then(res => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
res.rows.forEach(item => {
|
res.rows.forEach(item => {
|
||||||
|
|
|
@ -92,6 +92,15 @@
|
||||||
<el-form-item label="施工部位">{{ data.row.workParts }}</el-form-item>
|
<el-form-item label="施工部位">{{ data.row.workParts }}</el-form-item>
|
||||||
<el-form-item label="整改要求">{{ data.row.changeInfo }}</el-form-item>
|
<el-form-item label="整改要求">{{ data.row.changeInfo }}</el-form-item>
|
||||||
<template v-if="data.mode == 'edit'">
|
<template v-if="data.mode == 'edit'">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="提交人">{{ data.row.createUser }}</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="提交时间">{{ data.row.createTime }}</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="整改人">{{ data.row.lordSentUser }}</el-form-item>
|
<el-form-item label="整改人">{{ data.row.lordSentUser }}</el-form-item>
|
||||||
|
@ -108,23 +117,10 @@
|
||||||
<el-form-item label="截至时间">{{ data.row.nickedTime }}</el-form-item>
|
<el-form-item label="截至时间">{{ data.row.nickedTime }}</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="流程状态">
|
|
||||||
<dict-tag :options="data.checkStates" :value="data.row.checkState" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="提交人">{{ data.row.createUser }}</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="提交时间">{{ data.row.createTime }}</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
|
<el-form-item label="提交人">{{ data.row.createUser }}</el-form-item>
|
||||||
|
<el-form-item label="提交时间">{{ data.row.createTime }}</el-form-item>
|
||||||
<el-form-item label="整改人">{{ data.row.lordSentUser }}</el-form-item>
|
<el-form-item label="整改人">{{ data.row.lordSentUser }}</el-form-item>
|
||||||
<el-form-item label="抄送人">{{ data.row.copySendUser }}</el-form-item>
|
<el-form-item label="抄送人">{{ data.row.copySendUser }}</el-form-item>
|
||||||
<el-form-item label="复检人">{{ data.row.recheckSendUser }}</el-form-item>
|
<el-form-item label="复检人">{{ data.row.recheckSendUser }}</el-form-item>
|
||||||
|
@ -132,8 +128,6 @@
|
||||||
<el-form-item label="流程状态">
|
<el-form-item label="流程状态">
|
||||||
<dict-tag :options="data.checkStates" :value="data.row.checkState" />
|
<dict-tag :options="data.checkStates" :value="data.row.checkState" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="提交人">{{ data.row.createUser }}</el-form-item>
|
|
||||||
<el-form-item label="提交时间">{{ data.row.createTime }}</el-form-item>
|
|
||||||
</template>
|
</template>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template v-if="data.mode == 'edit'">
|
<template v-if="data.mode == 'edit'">
|
||||||
|
|
|
@ -1,26 +1,27 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container trouble-problemodify-index">
|
<div class="app-container trouble-problemodify-index">
|
||||||
<el-form class="header-form" :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
|
<el-form class="header-form" :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
|
||||||
|
|
||||||
<el-form-item label="检查类型" prop="problemType">
|
<el-form-item label="检查类型" prop="problemType">
|
||||||
<el-select v-model="queryParams.problemType" placeholder="请选择检查类型" clearable>
|
<el-select v-model="queryParams.problemType" placeholder="请选择检查类型" clearable style="width: 160px;">
|
||||||
<el-option v-for="dict in ssp_proble_type" :key="dict.value" :label="dict.label" :value="dict.value">
|
<el-option v-for="dict in ssp_proble_type" :key="dict.value" :label="dict.label" :value="dict.value">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="隐患类型" prop="dangerType">
|
<el-form-item label="隐患类型" prop="dangerType">
|
||||||
<el-select v-model="queryParams.dangerType" placeholder="请选择隐患类型" clearable>
|
<el-select v-model="queryParams.dangerType" placeholder="请选择隐患类型" clearable>
|
||||||
<el-option v-for="dict in ssp_proble_sub_type.filter(d => d.remark == '0')" :key="dict.value" :label="dict.label" :value="dict.value">
|
<el-option v-for="dict in ssp_proble_sub_type" :key="dict.value" :label="dict.label" :value="dict.value">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="整改人" prop="lordSent">
|
<el-form-item label="整改人" prop="lordSent">
|
||||||
<el-input v-model="queryParams.lordSent" placeholder="请输入人员姓名/联系方式" clearable/>
|
<el-input v-model="queryParams.lordSent" placeholder="请输入人员姓名/联系方式" clearable style="width: 180px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="提交人" prop="createUser">
|
<el-form-item label="提交人" prop="createUser">
|
||||||
<el-input v-model="queryParams.createUser" placeholder="请输入人员姓名/联系方式" clearable/>
|
<el-input v-model="queryParams.createUser" placeholder="请输入人员姓名/联系方式" clearable style="width: 180px;" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="提交时间" prop="dateRange">
|
<el-form-item label="提交时间" prop="dateRange">
|
||||||
<el-date-picker v-model="queryParams.dataRange" type="daterange" style="width: 308px;" range-separator="--"
|
<el-date-picker v-model="queryParams.dataRange" type="daterange" style="width: 300px;" range-separator="--"
|
||||||
start-placeholder="开始日期" end-placeholder="结束日期" />
|
start-placeholder="开始日期" end-placeholder="结束日期" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
|
@ -36,8 +37,9 @@
|
||||||
<el-tab-pane :label="data.tabInfo['e']" name="e"></el-tab-pane>
|
<el-tab-pane :label="data.tabInfo['e']" name="e"></el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<el-table v-loading="loading" :data="problemmodifyList">
|
<el-table v-loading="loading" :data="problemmodifyList">
|
||||||
<el-table-column label="序号" align="center" type="index" width="60" />
|
<el-table-column prop="id" width="55" label="序号" align="center">
|
||||||
<el-table-column label="项目名称" align="center" prop="projectName" />
|
<template #default="scope">{{ scope.$index + 1 + (queryParams.pageNum - 1) * queryParams.pageSize }}</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="问题图片" align="center" prop="smarkUrl">
|
<el-table-column label="问题图片" align="center" prop="smarkUrl">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-image :src="scope.row.smarkUrlPic" style="height:80px;" :preview-teleported="true"
|
<el-image :src="scope.row.smarkUrlPic" style="height:80px;" :preview-teleported="true"
|
||||||
|
@ -57,15 +59,16 @@
|
||||||
<el-table-column label="施工部位" align="center" prop="workParts" />
|
<el-table-column label="施工部位" align="center" prop="workParts" />
|
||||||
<el-table-column label="整改要求" align="center" prop="changeInfo" />
|
<el-table-column label="整改要求" align="center" prop="changeInfo" />
|
||||||
<el-table-column label="整改截至时间" align="center" prop="nickedTime" width="120" />
|
<el-table-column label="整改截至时间" align="center" prop="nickedTime" width="120" />
|
||||||
<el-table-column label="整改人" align="center" prop="lordSentUser" width="180"/>
|
<el-table-column label="整改人" align="center" prop="lordSentUser" width="200" />
|
||||||
<el-table-column label="复检人" align="center" prop="recheckSendUser" width="180"/>
|
<el-table-column label="复检人" align="center" prop="recheckSendUser" width="200" />
|
||||||
<el-table-column label="抄送人" align="center" prop="copySendUser" width="100"/>
|
<el-table-column label="抄送人" align="center" prop="copySendUser" width="200" />
|
||||||
<el-table-column label="流程状态" align="center" prop="checkState">
|
<el-table-column label="流程状态" align="center" prop="checkState">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<dict-tag :options="data.checkStates" :value="scope.row.checkState" />
|
<dict-tag :options="data.checkStates" :value="scope.row.checkState" />
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="提交时间" align="center" prop="createTime" width="120">
|
<el-table-column label="提交人" align="center" prop="createUser" />
|
||||||
|
<el-table-column label="提交时间" align="center" prop="createTime" width="180">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
@ -108,14 +111,16 @@ const detailDrawerRef = ref();
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
form: {},
|
form: {},
|
||||||
queryParams: {
|
queryParams: {
|
||||||
|
dateRange: [],
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
|
comId: null,
|
||||||
|
projectId: null,
|
||||||
|
infoType: null,
|
||||||
problemType: null,
|
problemType: null,
|
||||||
dangerType: null,
|
dangerType: null,
|
||||||
lordSent: null,
|
lordSent: null,
|
||||||
createUser: null,
|
createUser: null,
|
||||||
checkState: null,
|
|
||||||
dateRange: [],
|
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
comId: [
|
comId: [
|
||||||
|
@ -133,10 +138,6 @@ const { queryParams, form, rules } = toRefs(data);
|
||||||
|
|
||||||
/** 查询安全隐患整改列表 */
|
/** 查询安全隐患整改列表 */
|
||||||
function getList() {
|
function getList() {
|
||||||
if (!userStore.currentPrjId) {
|
|
||||||
proxy.$modal.msgWarning("请切换到项目数据!!!");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
let postData = {
|
let postData = {
|
||||||
infoType: 0,
|
infoType: 0,
|
||||||
|
@ -144,7 +145,7 @@ function getList() {
|
||||||
dangerType: queryParams.value.dangerType,
|
dangerType: queryParams.value.dangerType,
|
||||||
lordSent: queryParams.value.lordSent,
|
lordSent: queryParams.value.lordSent,
|
||||||
createUser: queryParams.value.createUser,
|
createUser: queryParams.value.createUser,
|
||||||
checkState: " abcde".indexOf(data.activeName)
|
projectName: " abcde".indexOf(data.activeName)
|
||||||
};
|
};
|
||||||
if (queryParams.value.dataRange && queryParams.value.dataRange.length > 0) {
|
if (queryParams.value.dataRange && queryParams.value.dataRange.length > 0) {
|
||||||
postData.createTime = queryParams.value.dataRange[0];
|
postData.createTime = queryParams.value.dataRange[0];
|
||||||
|
@ -221,9 +222,6 @@ function handleDelete(row) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCount() {
|
function getCount() {
|
||||||
if (!userStore.currentPrjId) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
let postData = {
|
let postData = {
|
||||||
infoType: 0,
|
infoType: 0,
|
||||||
problemType: queryParams.value.problemType,
|
problemType: queryParams.value.problemType,
|
||||||
|
|
|
@ -6,9 +6,8 @@
|
||||||
<el-option v-for="dict in ssp_proble_type" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
<el-option v-for="dict in ssp_proble_type" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="提交时间" prop="dateRange">
|
<el-form-item label="整改人" prop="lordSent">
|
||||||
<el-date-picker v-model="data.queryParams.dataRange" type="daterange" style="width: 308px;" range-separator="--"
|
<el-input v-model="data.queryParams.userName" style="width: 200px;" placeholder="请输入人员姓名/联系方式" clearable @keyup.enter="handleQuery" />
|
||||||
start-placeholder="开始日期" end-placeholder="结束日期" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
|
@ -73,7 +72,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div :class="scope.row.errDangerType ? 'is-err' : ''">
|
<div :class="scope.row.errDangerType ? 'is-err' : ''">
|
||||||
<el-select v-model="scope.row.dangerType" placeholder="请选择隐患类型" clearable style="margin-top:80px;" @change="scope.row.errDangerType = scope.row.dangerType ? false : true">
|
<el-select v-model="scope.row.dangerType" placeholder="请选择隐患类型" clearable style="margin-top:80px;" @change="scope.row.errDangerType = scope.row.dangerType ? false : true">
|
||||||
<el-option v-for="dict in ssp_proble_sub_type.filter(d => d.remark == '0')" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
<el-option v-for="dict in ssp_proble_sub_type" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -205,11 +204,8 @@ const data = reactive({
|
||||||
showList: [],
|
showList: [],
|
||||||
form: {},
|
form: {},
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
infoType: 0,
|
|
||||||
problemType: null,
|
problemType: null,
|
||||||
dateRange: [],
|
userName: null,
|
||||||
},
|
},
|
||||||
rules: {},
|
rules: {},
|
||||||
selData: [],
|
selData: [],
|
||||||
|
@ -223,55 +219,13 @@ const { queryParams, form, rules } = toRefs(data)
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
function handleQuery() {
|
function handleQuery() {
|
||||||
proxy.$modal
|
data.showList = data.dataList.filter((d) => {
|
||||||
.confirm('是否确认查询数据,继续查询未保存数据将会丢失?')
|
let ck1 = true
|
||||||
.then(function () {
|
if (data.queryParams.problemType) {
|
||||||
getList();
|
ck1 = d.problemType == data.queryParams.problemType
|
||||||
})
|
|
||||||
.catch(() => {})
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 获取数据列表 */
|
|
||||||
function getList(){
|
|
||||||
if (!userStore.currentPrjId) {
|
|
||||||
proxy.$modal.msgWarning("请切换到项目数据!!!");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
data.showList = [];
|
|
||||||
if (data.queryParams.dataRange && data.queryParams.dataRange.length > 0) {
|
|
||||||
let params = {};
|
|
||||||
params.beginTime = queryParams.value.dataRange[0];
|
|
||||||
params.endTime = queryParams.value.dataRange[1];
|
|
||||||
data.queryParams.params = params;
|
|
||||||
}
|
|
||||||
listProblemmodifyDraft(data.queryParams).then(res =>{
|
|
||||||
if(res.total>0){
|
|
||||||
res.rows.forEach((item,idx) => {
|
|
||||||
item.key = idx;
|
|
||||||
data.showList.push(item);
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
let row = {
|
|
||||||
key: +new Date(),
|
|
||||||
id: null,
|
|
||||||
projectId: userStore.currentPrjId,
|
|
||||||
comId: userStore.currentComId,
|
|
||||||
problemType: null,
|
|
||||||
dangerType: null,
|
|
||||||
smarkUrl: null,
|
|
||||||
workParts: null,
|
|
||||||
changeInfo: null,
|
|
||||||
lordSent: null,
|
|
||||||
copySend: null,
|
|
||||||
recheckSend: null,
|
|
||||||
nickedTime: null,
|
|
||||||
isDel: 0,
|
|
||||||
infoType: 0,
|
|
||||||
}
|
|
||||||
data.showList.push(row);
|
|
||||||
}
|
}
|
||||||
});
|
return ck1
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
|
@ -290,10 +244,6 @@ function handleSelectionChange(selection) {
|
||||||
|
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
function handleAdd() {
|
function handleAdd() {
|
||||||
if (!userStore.currentPrjId) {
|
|
||||||
proxy.$modal.msgWarning("请切换到项目数据!!!");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
let row = {
|
let row = {
|
||||||
key: +new Date(),
|
key: +new Date(),
|
||||||
id: null,
|
id: null,
|
||||||
|
@ -309,9 +259,10 @@ function handleAdd() {
|
||||||
recheckSend: null,
|
recheckSend: null,
|
||||||
nickedTime: null,
|
nickedTime: null,
|
||||||
isDel: 0,
|
isDel: 0,
|
||||||
infoType: 0,
|
infoType: 1,
|
||||||
}
|
}
|
||||||
data.showList.push(row);
|
data.dataList.push(row)
|
||||||
|
data.showList.push(row)
|
||||||
}
|
}
|
||||||
/** 数据同步 */
|
/** 数据同步 */
|
||||||
function dataSynchronization() {
|
function dataSynchronization() {
|
||||||
|
@ -340,6 +291,8 @@ function batchSubmitForm() {
|
||||||
data.selData.forEach((it) => {
|
data.selData.forEach((it) => {
|
||||||
if (!checkRow(it)) {
|
if (!checkRow(it)) {
|
||||||
cnt++
|
cnt++
|
||||||
|
//data.showList.splice(it, 1);
|
||||||
|
//data.dataList.splice(it, 1);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (cnt > 0) {
|
if (cnt > 0) {
|
||||||
|
@ -366,7 +319,8 @@ function doBatchAdd(datas) {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
proxy.$modal.msgSuccess('提交成功!')
|
proxy.$modal.msgSuccess('提交成功!')
|
||||||
datas.forEach((it) => {
|
datas.forEach((it) => {
|
||||||
data.showList.splice(it, 1);
|
data.showList.splice(it, 1)
|
||||||
|
data.dataList.splice(it, 1)
|
||||||
})
|
})
|
||||||
if (data.showList.length == 0) {
|
if (data.showList.length == 0) {
|
||||||
let row = {
|
let row = {
|
||||||
|
@ -384,9 +338,10 @@ function doBatchAdd(datas) {
|
||||||
recheckSend: null,
|
recheckSend: null,
|
||||||
nickedTime: null,
|
nickedTime: null,
|
||||||
isDel: 0,
|
isDel: 0,
|
||||||
infoType: 0,
|
infoType: 1,
|
||||||
}
|
}
|
||||||
data.dataList.push(row);
|
data.dataList.push(row)
|
||||||
|
data.showList.push(row)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -464,7 +419,7 @@ function submitForm() {
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
/** 删除按钮操作 */
|
||||||
function handleDelete(row) {
|
function handleDelete(row) {
|
||||||
if (data.showList.length == 1) {
|
if (data.dataList.length == 1) {
|
||||||
proxy.$modal.msgError('至少保留一条数据')
|
proxy.$modal.msgError('至少保留一条数据')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -472,6 +427,7 @@ function handleDelete(row) {
|
||||||
.confirm('是否确认删除数据项?')
|
.confirm('是否确认删除数据项?')
|
||||||
.then(function () {
|
.then(function () {
|
||||||
data.showList.splice(row, 1)
|
data.showList.splice(row, 1)
|
||||||
|
data.dataList.splice(row, 1)
|
||||||
proxy.$modal.msgSuccess('删除成功')
|
proxy.$modal.msgSuccess('删除成功')
|
||||||
})
|
})
|
||||||
.catch(() => {})
|
.catch(() => {})
|
||||||
|
@ -514,6 +470,25 @@ function makeSelectData(users, type) {
|
||||||
return arr
|
return arr
|
||||||
}
|
}
|
||||||
function getUserTree() {
|
function getUserTree() {
|
||||||
|
let row = {
|
||||||
|
key: +new Date(),
|
||||||
|
id: null,
|
||||||
|
projectId: userStore.currentPrjId,
|
||||||
|
comId: userStore.currentComId,
|
||||||
|
problemType: null,
|
||||||
|
dangerType: null,
|
||||||
|
smarkUrl: null,
|
||||||
|
workParts: null,
|
||||||
|
changeInfo: null,
|
||||||
|
lordSent: null,
|
||||||
|
copySend: null,
|
||||||
|
recheckSend: null,
|
||||||
|
nickedTime: null,
|
||||||
|
isDel: 0,
|
||||||
|
infoType: 1,
|
||||||
|
}
|
||||||
|
data.dataList.push(row)
|
||||||
|
data.showList.push(row)
|
||||||
listProProjectInfoSubdeptsUsers({ projectId: userStore.currentPrjId, pageNum: 1, pageSize: 1000 }).then((d) => {
|
listProProjectInfoSubdeptsUsers({ projectId: userStore.currentPrjId, pageNum: 1, pageSize: 1000 }).then((d) => {
|
||||||
let users = d.rows || []
|
let users = d.rows || []
|
||||||
data.users = users
|
data.users = users
|
||||||
|
@ -527,8 +502,7 @@ function getUserTree() {
|
||||||
data.recheckUserList = makeSelectData(users.filter((it) => it.subDeptType == 1))
|
data.recheckUserList = makeSelectData(users.filter((it) => it.subDeptType == 1))
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
getList();
|
getUserTree()
|
||||||
getUserTree();
|
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.problemmodify-draft {
|
.problemmodify-draft {
|
||||||
|
|
|
@ -1,606 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="app-container problemmodify-draft">
|
|
||||||
<el-form :model="data.queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
|
||||||
<el-form-item label="检查类型" prop="problemType">
|
|
||||||
<el-select v-model="data.queryParams.problemType" placeholder="请选择检查类型" clearable>
|
|
||||||
<el-option v-for="dict in ssp_proble_type" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="提交时间" prop="dateRange">
|
|
||||||
<el-date-picker v-model="data.queryParams.dataRange" type="daterange" style="width: 308px;" range-separator="--"
|
|
||||||
start-placeholder="开始日期" end-placeholder="结束日期" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button type="primary" plain size="small" @click="handleAdd" v-hasPermi="['trouble:smzSspProblemmodifyDraft:add']">
|
|
||||||
<el-icon>
|
|
||||||
<Plus />
|
|
||||||
</el-icon>新增
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button type="warning" plain size="small" @click="dataSynchronization" :disabled="single" v-hasPermi="['trouble:smzSspProblemmodifyDraft:add']">
|
|
||||||
<el-icon>
|
|
||||||
<CopyDocument />
|
|
||||||
</el-icon>数据同步
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-tooltip content="批量提交选择的数据!" placement="bottom">
|
|
||||||
<el-button type="success" plain size="small" @click="batchSubmitForm" :disabled="multiple" v-hasPermi="['trouble:smzSspProblemmodifyDraft:add']">
|
|
||||||
<el-icon>
|
|
||||||
<Check />
|
|
||||||
</el-icon>批量提交
|
|
||||||
</el-button>
|
|
||||||
</el-tooltip>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-alert title="操作说明" class="tips" effect="dark" type="warning" :closable="false">
|
|
||||||
<template #title>
|
|
||||||
<div>
|
|
||||||
<strong>数据同步:</strong>将选中行的数据同步到(当前项目或项目为空)的其它行!
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<strong>批量提交:</strong>将选中行的数据,数据验证通过后一次全部提交!
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-alert>
|
|
||||||
<el-form :model="data.form" :rules="data.rules" ref="formRef">
|
|
||||||
<el-table :data="data.showList" @selection-change="handleSelectionChange">
|
|
||||||
<el-table-column type="selection" width="30" align="center" />
|
|
||||||
<el-table-column type="index" width="50" align="center" label="序号"></el-table-column>
|
|
||||||
|
|
||||||
<el-table-column align="center" width="180" class-name="td-up-img" label="问题图片">
|
|
||||||
<template #default="scope">
|
|
||||||
<div :class="scope.row.errSmarkUrl ? 'is-err' : ''">
|
|
||||||
<image-upload v-model="scope.row.smarkUrl" previewAll :limit="5" :isShowTip="false" @change="scope.row.errSmarkUrl = scope.row.smarkUrl ? false : true" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column align="center" width="180" class-name="td-proble-type" label="隐患类型">
|
|
||||||
<template #default="scope">
|
|
||||||
<div :class="scope.row.errProblemType ? 'is-err' : ''">
|
|
||||||
<el-select v-model="scope.row.problemType" placeholder="请选择检查类型" clearable @change="scope.row.errProblemType = scope.row.problemType ? false : true">
|
|
||||||
<el-option v-for="dict in ssp_proble_type" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
<div :class="scope.row.errDangerType ? 'is-err' : ''">
|
|
||||||
<el-select v-model="scope.row.dangerType" placeholder="请选择隐患类型" clearable style="margin-top:80px;" @change="scope.row.errDangerType = scope.row.dangerType ? false : true">
|
|
||||||
<el-option v-for="dict in ssp_proble_sub_type.filter(d => d.remark == '1')" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="施工部位" align="center" prop="workParts" min-width="240" class-name="td-textarea">
|
|
||||||
<template #default="scope">
|
|
||||||
<div :class="scope.row.errWorkParts ? 'is-err' : ''">
|
|
||||||
<el-input v-model="scope.row.workParts" placeholder="请输入施工部位" type="textarea" :rows="3" @change="scope.row.errWorkParts = scope.row.workParts ? false : true" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="整改要求" align="center" prop="changeInfo" min-width="240" class-name="td-textarea">
|
|
||||||
<template #default="scope">
|
|
||||||
<div :class="scope.row.errChangeInfo ? 'is-err' : ''">
|
|
||||||
<el-input v-model="scope.row.changeInfo" placeholder="请输入整改要求" type="textarea" :rows="3" @change="scope.row.errChangeInfo = scope.row.changeInfo ? false : true" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="问题人员" align="center" width="300" class-name="td-select">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-form-item label="整改人">
|
|
||||||
<div :class="scope.row.errLordSent ? 'is-err' : ''" style="width: 100%;">
|
|
||||||
<el-select
|
|
||||||
v-model="scope.row.lordSent"
|
|
||||||
placeholder="请选择人员"
|
|
||||||
clearable
|
|
||||||
@change="scope.row.errLordSent = scope.row.lordSent ? false : true"
|
|
||||||
popper-class="select-popper-group-pd"
|
|
||||||
>
|
|
||||||
<el-option-group v-for="group in data.modUserList" :key="group.label" :label="group.label">
|
|
||||||
<el-option v-for="item in group.options" :key="item.value" :label="item.label" :value="item.value" />
|
|
||||||
</el-option-group>
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="抄送人">
|
|
||||||
<div :class="scope.row.errCopySend ? 'is-err' : ''" style="width: 100%;">
|
|
||||||
<el-select
|
|
||||||
v-model="scope.row.copySend"
|
|
||||||
placeholder="请选择人员"
|
|
||||||
clearable
|
|
||||||
multiple
|
|
||||||
collapse-tags
|
|
||||||
@change="scope.row.errCopySend = scope.row.copySend ? false : true"
|
|
||||||
popper-class="select-popper-group-pd"
|
|
||||||
collapse-tags-tooltip
|
|
||||||
>
|
|
||||||
<el-option-group v-for="group in data.ccUserList" :key="group.label" :label="group.label">
|
|
||||||
<el-option v-for="item in group.options" :key="item.value" :label="item.label" :value="item.value" />
|
|
||||||
</el-option-group>
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="复检人">
|
|
||||||
<div :class="scope.row.errRecheckSend ? 'is-err' : ''" style="width: 100%;">
|
|
||||||
<el-select
|
|
||||||
v-model="scope.row.recheckSend"
|
|
||||||
placeholder="请选择人员"
|
|
||||||
clearable
|
|
||||||
@change="scope.row.errRecheckSend = scope.row.recheckSend ? false : true"
|
|
||||||
popper-class="select-popper-group-pd"
|
|
||||||
collapse-tags-tooltip
|
|
||||||
>
|
|
||||||
<el-option-group v-for="group in data.recheckUserList" :key="group.label" :label="group.label">
|
|
||||||
<el-option v-for="item in group.options" :key="item.value" :label="item.label" :value="item.value" />
|
|
||||||
</el-option-group>
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
</el-form-item>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column label="整改截至时间" align="center" prop="nickedTime" width="180" class-name="td-select">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-form-item label>
|
|
||||||
<div :class="scope.row.errNickedTime ? 'is-err' : ''" style="width: 100%;">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="scope.row.nickedTime"
|
|
||||||
type="date"
|
|
||||||
placeholder="选择日期"
|
|
||||||
value-format="YYYY-MM-DD"
|
|
||||||
@change="scope.row.errNickedTime = scope.row.nickedTime ? false : true"
|
|
||||||
style="width: 100%"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</el-form-item>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-button link type="primary" icon="Edit" @click="submitRow(scope.row)" v-hasPermi="['trouble:problemmodifyDraft:edit']">提交</el-button>
|
|
||||||
<br />
|
|
||||||
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['trouble:problemmodifyDraft:remove']">删除</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</el-form>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup name="ProblemmodifyDraft">
|
|
||||||
import {
|
|
||||||
listProblemmodifyDraft,
|
|
||||||
getProblemmodifyDraft,
|
|
||||||
delProblemmodifyDraft,
|
|
||||||
addProblemmodifyDraft,
|
|
||||||
updateProblemmodifyDraft,
|
|
||||||
} from '@/api/trouble/problemmodifyDraft'
|
|
||||||
import { batchAddProblemmodify } from '@/api/trouble/problemmodify'
|
|
||||||
|
|
||||||
import useUserStore from '@/store/modules/user'
|
|
||||||
import { listProProjectInfoSubdeptsUsers } from '@/api/manage/proProjectInfoSubdeptsUsers'
|
|
||||||
const userStore = useUserStore()
|
|
||||||
const { proxy } = getCurrentInstance()
|
|
||||||
const { ssp_proble_type, ssp_proble_sub_type } = proxy.useDict('ssp_proble_type', 'ssp_proble_sub_type')
|
|
||||||
|
|
||||||
const open = ref(false)
|
|
||||||
const loading = ref(true)
|
|
||||||
const showSearch = ref(true)
|
|
||||||
const ids = ref([])
|
|
||||||
const single = ref(true)
|
|
||||||
const multiple = ref(true)
|
|
||||||
const total = ref(0)
|
|
||||||
const title = ref('')
|
|
||||||
const uploadFileUrl = ref(import.meta.env.VITE_APP_BASE_API + '/file/upload') // 上传文件服务器地址
|
|
||||||
|
|
||||||
const data = reactive({
|
|
||||||
dataList: [],
|
|
||||||
showList: [],
|
|
||||||
form: {},
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
infoType: 1,
|
|
||||||
problemType: null,
|
|
||||||
dateRange: [],
|
|
||||||
},
|
|
||||||
rules: {},
|
|
||||||
selData: [],
|
|
||||||
users: [],
|
|
||||||
modUserList: [], //整改人
|
|
||||||
ccUserList: [], //抄送人
|
|
||||||
recheckUserList: [], //复检人
|
|
||||||
})
|
|
||||||
|
|
||||||
const { queryParams, form, rules } = toRefs(data)
|
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
function handleQuery() {
|
|
||||||
proxy.$modal
|
|
||||||
.confirm('是否确认查询数据,继续查询未保存数据将会丢失?')
|
|
||||||
.then(function () {
|
|
||||||
getList();
|
|
||||||
})
|
|
||||||
.catch(() => {})
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 获取数据列表 */
|
|
||||||
function getList(){
|
|
||||||
data.showList = [];
|
|
||||||
if (!userStore.currentPrjId) {
|
|
||||||
proxy.$modal.msgWarning("请切换到项目数据!!!");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (data.queryParams.dataRange && data.queryParams.dataRange.length > 0) {
|
|
||||||
let params = {};
|
|
||||||
params.beginTime = queryParams.value.dataRange[0];
|
|
||||||
params.endTime = queryParams.value.dataRange[1];
|
|
||||||
data.queryParams.params = params;
|
|
||||||
}
|
|
||||||
listProblemmodifyDraft(data.queryParams).then(res =>{
|
|
||||||
if(res.total>0){
|
|
||||||
res.rows.forEach((item,idx) => {
|
|
||||||
item.key = idx;
|
|
||||||
data.showList.push(item);
|
|
||||||
});
|
|
||||||
}else{
|
|
||||||
let row = {
|
|
||||||
key: +new Date(),
|
|
||||||
id: null,
|
|
||||||
projectId: userStore.currentPrjId,
|
|
||||||
comId: userStore.currentComId,
|
|
||||||
problemType: null,
|
|
||||||
dangerType: null,
|
|
||||||
smarkUrl: null,
|
|
||||||
workParts: null,
|
|
||||||
changeInfo: null,
|
|
||||||
lordSent: null,
|
|
||||||
copySend: null,
|
|
||||||
recheckSend: null,
|
|
||||||
nickedTime: null,
|
|
||||||
isDel: 0,
|
|
||||||
infoType: 1,
|
|
||||||
}
|
|
||||||
data.showList.push(row);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
function resetQuery() {
|
|
||||||
proxy.resetForm('queryRef')
|
|
||||||
handleQuery()
|
|
||||||
}
|
|
||||||
|
|
||||||
// 多选框选中数据
|
|
||||||
function handleSelectionChange(selection) {
|
|
||||||
data.selData = selection
|
|
||||||
ids.value = selection.map((item) => item.id)
|
|
||||||
single.value = selection.length != 1
|
|
||||||
multiple.value = !selection.length
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
function handleAdd() {
|
|
||||||
if (!userStore.currentPrjId) {
|
|
||||||
proxy.$modal.msgWarning("请切换到项目数据!!!");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
let row = {
|
|
||||||
key: +new Date(),
|
|
||||||
id: null,
|
|
||||||
projectId: userStore.currentPrjId,
|
|
||||||
comId: userStore.currentComId,
|
|
||||||
problemType: null,
|
|
||||||
dangerType: null,
|
|
||||||
smarkUrl: null,
|
|
||||||
workParts: null,
|
|
||||||
changeInfo: null,
|
|
||||||
lordSent: null,
|
|
||||||
copySend: null,
|
|
||||||
recheckSend: null,
|
|
||||||
nickedTime: null,
|
|
||||||
isDel: 0,
|
|
||||||
infoType: 1,
|
|
||||||
}
|
|
||||||
data.showList.push(row);
|
|
||||||
}
|
|
||||||
/** 数据同步 */
|
|
||||||
function dataSynchronization() {
|
|
||||||
let row = data.selData[0]
|
|
||||||
data.showList.forEach((it) => {
|
|
||||||
if (it != row) {
|
|
||||||
it.problemType = row.problemType
|
|
||||||
it.dangerType = row.dangerType
|
|
||||||
it.smarkUrl = row.smarkUrl
|
|
||||||
it.workParts = row.workParts
|
|
||||||
it.changeInfo = row.changeInfo
|
|
||||||
it.lordSent = row.lordSent
|
|
||||||
it.copySend = row.copySend
|
|
||||||
it.recheckSend = row.recheckSend
|
|
||||||
it.nickedTime = row.nickedTime
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
function submitRow(row) {
|
|
||||||
if (checkRow(row)) {
|
|
||||||
doBatchAdd([row])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function batchSubmitForm() {
|
|
||||||
let cnt = 0
|
|
||||||
data.selData.forEach((it) => {
|
|
||||||
if (!checkRow(it)) {
|
|
||||||
cnt++
|
|
||||||
}
|
|
||||||
})
|
|
||||||
if (cnt > 0) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
doBatchAdd(data.selData)
|
|
||||||
}
|
|
||||||
function doBatchAdd(datas) {
|
|
||||||
datas.forEach((it) => {
|
|
||||||
it.projectId = userStore.currentPrjId
|
|
||||||
it.comId = userStore.currentComId
|
|
||||||
it.infoType = 0
|
|
||||||
let users = data.users.filter((u) => u.userId == it.lordSent)
|
|
||||||
it.lordSent = users.map((u) => u.userId).join(',')
|
|
||||||
it.lordSentUser = users.map((u) => u.userName).join(',')
|
|
||||||
users = data.users.filter((u) => it.copySend.includes(u.userId))
|
|
||||||
it.copySend = users.map((u) => u.userId).join(',')
|
|
||||||
it.copySendUser = users.map((u) => u.userName).join(',')
|
|
||||||
users = data.users.filter((u) => u.userId == it.recheckSend)
|
|
||||||
it.recheckSend = users.map((u) => u.userId).join(',')
|
|
||||||
it.recheckSendUser = users.map((u) => u.userName).join(',')
|
|
||||||
})
|
|
||||||
batchAddProblemmodify(datas).then((res) => {
|
|
||||||
if (res.code == 200) {
|
|
||||||
proxy.$modal.msgSuccess('提交成功!')
|
|
||||||
datas.forEach((it) => {
|
|
||||||
data.showList.splice(it, 1);
|
|
||||||
})
|
|
||||||
if (data.showList.length == 0) {
|
|
||||||
let row = {
|
|
||||||
key: +new Date(),
|
|
||||||
id: null,
|
|
||||||
projectId: userStore.currentPrjId,
|
|
||||||
comId: userStore.currentComId,
|
|
||||||
problemType: null,
|
|
||||||
dangerType: null,
|
|
||||||
smarkUrl: null,
|
|
||||||
workParts: null,
|
|
||||||
changeInfo: null,
|
|
||||||
lordSent: null,
|
|
||||||
copySend: null,
|
|
||||||
recheckSend: null,
|
|
||||||
nickedTime: null,
|
|
||||||
isDel: 0,
|
|
||||||
infoType: 1,
|
|
||||||
}
|
|
||||||
data.dataList.push(row);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
function checkRow(row) {
|
|
||||||
row.errSmarkUrl = false
|
|
||||||
row.errProblemType = false
|
|
||||||
row.errDangerType = false
|
|
||||||
row.errWorkParts = false
|
|
||||||
row.errChangeInfo = false
|
|
||||||
row.errLordSent = false
|
|
||||||
row.errCopySend = false
|
|
||||||
row.errRecheckSend = false
|
|
||||||
row.errNickedTime = false
|
|
||||||
let ret = true
|
|
||||||
if (!row.smarkUrl) {
|
|
||||||
row.errSmarkUrl = true
|
|
||||||
ret = false
|
|
||||||
}
|
|
||||||
if (!row.problemType) {
|
|
||||||
row.errProblemType = true
|
|
||||||
ret = false
|
|
||||||
}
|
|
||||||
if (!row.dangerType) {
|
|
||||||
row.errDangerType = true
|
|
||||||
ret = false
|
|
||||||
}
|
|
||||||
if (!row.workParts) {
|
|
||||||
row.errWorkParts = true
|
|
||||||
ret = false
|
|
||||||
}
|
|
||||||
if (!row.changeInfo) {
|
|
||||||
row.errChangeInfo = true
|
|
||||||
ret = false
|
|
||||||
}
|
|
||||||
if (!row.lordSent) {
|
|
||||||
row.errLordSent = true
|
|
||||||
ret = false
|
|
||||||
}
|
|
||||||
if (!row.copySend) {
|
|
||||||
row.errCopySend = true
|
|
||||||
ret = false
|
|
||||||
}
|
|
||||||
if (!row.recheckSend) {
|
|
||||||
row.errRecheckSend = true
|
|
||||||
ret = false
|
|
||||||
}
|
|
||||||
if (!row.nickedTime) {
|
|
||||||
row.errNickedTime = true
|
|
||||||
ret = false
|
|
||||||
}
|
|
||||||
return ret
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 提交按钮 */
|
|
||||||
function submitForm() {
|
|
||||||
proxy.$refs['problemmodifyDraftRef'].validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
if (form.value.id != null) {
|
|
||||||
updateProblemmodifyDraft(form.value).then((response) => {
|
|
||||||
proxy.$modal.msgSuccess('修改成功')
|
|
||||||
open.value = false
|
|
||||||
getList()
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
addProblemmodifyDraft(form.value).then((response) => {
|
|
||||||
proxy.$modal.msgSuccess('新增成功')
|
|
||||||
open.value = false
|
|
||||||
getList()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
function handleDelete(row) {
|
|
||||||
if (data.showList.length == 1) {
|
|
||||||
proxy.$modal.msgError('至少保留一条数据')
|
|
||||||
return
|
|
||||||
}
|
|
||||||
proxy.$modal
|
|
||||||
.confirm('是否确认删除数据项?')
|
|
||||||
.then(function () {
|
|
||||||
data.showList.splice(row, 1)
|
|
||||||
proxy.$modal.msgSuccess('删除成功')
|
|
||||||
})
|
|
||||||
.catch(() => {})
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
function handleExport() {
|
|
||||||
proxy.download(
|
|
||||||
'trouble/problemmodifyDraft/export',
|
|
||||||
{
|
|
||||||
...queryParams.value,
|
|
||||||
},
|
|
||||||
`problemmodifyDraft_${new Date().getTime()}.xlsx`
|
|
||||||
)
|
|
||||||
}
|
|
||||||
function makeSelectData(users, type) {
|
|
||||||
console.log("--->",users,type)
|
|
||||||
let objs = {}
|
|
||||||
users.forEach((it) => {
|
|
||||||
let deptName = it.subDeptName||it.projectName
|
|
||||||
if (!objs[deptName]) {
|
|
||||||
objs[deptName] = []
|
|
||||||
}
|
|
||||||
objs[deptName].push(it)
|
|
||||||
})
|
|
||||||
let arr = []
|
|
||||||
for (let k in objs) {
|
|
||||||
arr.push({
|
|
||||||
label: k,
|
|
||||||
options: objs[k].map((it) => {
|
|
||||||
let pos = type ? `[${it.userPost == 2 ? '项目经理' : it.userPost == 3 ? '班组长' : it.userPost == 8 ? '安全员' : ''}]` : ''
|
|
||||||
return {
|
|
||||||
value: it.userId,
|
|
||||||
label: it.userName + pos,
|
|
||||||
data: it,
|
|
||||||
}
|
|
||||||
}),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
return arr
|
|
||||||
}
|
|
||||||
function getUserTree() {
|
|
||||||
listProProjectInfoSubdeptsUsers({ projectId: userStore.currentPrjId, pageNum: 1, pageSize: 1000 }).then((d) => {
|
|
||||||
let users = d.rows || []
|
|
||||||
data.users = users
|
|
||||||
data.modUserList = makeSelectData(
|
|
||||||
users
|
|
||||||
.filter((it) => it.subDeptType == 4 || it.subDeptType == 5)
|
|
||||||
.filter((it) => it.userPost == 2 || it.userPost == 3 || it.userPost == 8),
|
|
||||||
true
|
|
||||||
)
|
|
||||||
data.ccUserList = makeSelectData(users.filter((it) => it.userPost != 4 && it.userPost != 5))
|
|
||||||
data.recheckUserList = makeSelectData(users.filter((it) => it.subDeptType == 1))
|
|
||||||
})
|
|
||||||
}
|
|
||||||
getList();
|
|
||||||
getUserTree();
|
|
||||||
</script>
|
|
||||||
<style lang="scss">
|
|
||||||
.problemmodify-draft {
|
|
||||||
.td-up-img {
|
|
||||||
.component-upload-image {
|
|
||||||
height: 150px;
|
|
||||||
overflow: hidden;
|
|
||||||
|
|
||||||
.el-upload-list__item {
|
|
||||||
position: absolute;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.td-textarea {
|
|
||||||
.cell {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
.el-textarea {
|
|
||||||
width: 100%;
|
|
||||||
height: 150px;
|
|
||||||
|
|
||||||
.el-textarea__inner {
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.td-select {
|
|
||||||
.el-select {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.is-err {
|
|
||||||
&::after {
|
|
||||||
bottom: -15px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.is-err {
|
|
||||||
position: relative;
|
|
||||||
padding-bottom: 12px;
|
|
||||||
|
|
||||||
.el-upload--picture-card {
|
|
||||||
border-color: red;
|
|
||||||
}
|
|
||||||
|
|
||||||
&::after {
|
|
||||||
content: '不为空';
|
|
||||||
color: red;
|
|
||||||
left: 0px;
|
|
||||||
font-size: 12px;
|
|
||||||
position: absolute;
|
|
||||||
bottom: -7px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-select__wrapper,
|
|
||||||
.el-textarea__inner,
|
|
||||||
.el-input__wrapper {
|
|
||||||
box-shadow: inset 0 0 0 1px red;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.select-popper-group-pd {
|
|
||||||
.el-select-group {
|
|
||||||
.el-select-dropdown__item {
|
|
||||||
padding-left: 30px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,453 +0,0 @@
|
||||||
<template>
|
|
||||||
<el-drawer v-model="data.visible" :close-on-click-modal="false" :close-on-press-escape="false" size="1000px" :append-to-body="true" title="质量隐患详情" class="problemmodify-detail-drawer">
|
|
||||||
<el-row v-if="data && data.row" style="padding:20px;">
|
|
||||||
<el-col :span="10" class="detail-left">
|
|
||||||
<el-steps style="max-width: 600px" :active="data.stepActive" finish-status="success" simple>
|
|
||||||
<el-step title="待整改" />
|
|
||||||
<el-step title="待复检" />
|
|
||||||
<el-step title="复检驳回" v-if="!data.simple" />
|
|
||||||
<el-step title="复检通过" />
|
|
||||||
</el-steps>
|
|
||||||
<div class="step-list">
|
|
||||||
<div v-for="(it, idx) in data.auditinfoList" :key="idx">
|
|
||||||
<div class="step-header" :class="data.row.checkState >= 0 ? 'is-active' : ''">
|
|
||||||
<el-icon>
|
|
||||||
<SuccessFilled />
|
|
||||||
</el-icon>
|
|
||||||
{{ it.index }}.
|
|
||||||
<span v-if="it.processState == 0">整改处理</span>
|
|
||||||
<span v-if="it.processState == 1">复检通过</span>
|
|
||||||
<span v-if="it.processState == 2">复检驳回</span>
|
|
||||||
</div>
|
|
||||||
<el-card>
|
|
||||||
<table border class="step-table">
|
|
||||||
<tr>
|
|
||||||
<td width="40%">
|
|
||||||
<svg-icon icon-class="user" />
|
|
||||||
<span v-if="it.processState == 0">整改说明</span>
|
|
||||||
<span v-if="it.processState == 1">复检意见</span>
|
|
||||||
<span v-if="it.processState == 2">驳回意见</span>
|
|
||||||
</td>
|
|
||||||
<td>{{ it.opinion }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr v-if="it.processState == 0">
|
|
||||||
<td>
|
|
||||||
<svg-icon icon-class="camera" />整改图片
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<div class="step-img">
|
|
||||||
<el-image :src="toUrl(file.fileUrl)" v-for="(file, index) in it.files" :key="index" :preview-teleported="true" :preview-src-list="[toUrl(file.fileUrl)]"></el-image>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</el-card>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="step-header" :class="data.row.checkState >= 0 ? 'is-active' : ''">
|
|
||||||
<el-icon>
|
|
||||||
<SuccessFilled />
|
|
||||||
</el-icon>01.待整改
|
|
||||||
</div>
|
|
||||||
<el-card>
|
|
||||||
<table border class="step-table">
|
|
||||||
<tr>
|
|
||||||
<td width="40%">
|
|
||||||
<svg-icon icon-class="user" />办理用户
|
|
||||||
</td>
|
|
||||||
<td>{{ data.row.createUser }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<el-icon>
|
|
||||||
<Calendar />
|
|
||||||
</el-icon>办理时间
|
|
||||||
</td>
|
|
||||||
<td>{{ data.row.createTime }}</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<svg-icon icon-class="camera" />隐患图片
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<el-image :src="toUrl(data.row.smarkUrlPic)" style="height:80px;" :preview-teleported="true" :preview-src-list="data.row.smarkUrlPics"></el-image>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</el-card>
|
|
||||||
</div>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="14" class="detail-right" :class="'is-' + data.mode">
|
|
||||||
<el-form style="margin: 0px 20px;" :model="data.baseForm" ref="baseInfo">
|
|
||||||
<el-form-item label="项目名称">{{ data.row.projectName }}</el-form-item>
|
|
||||||
<el-form-item label="隐患图片">
|
|
||||||
<el-image :src="toUrl(data.row.smarkUrlPic)" style="height:80px;" :preview-teleported="true" :preview-src-list="data.row.smarkUrlPics"></el-image>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="检查类型">
|
|
||||||
<dict-tag :options="ssp_proble_type" :value="data.row.problemType" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="隐患类型">
|
|
||||||
<dict-tag :options="ssp_proble_sub_type" :value="data.row.dangerType" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="施工部位">{{ data.row.workParts }}</el-form-item>
|
|
||||||
<el-form-item label="整改要求">{{ data.row.changeInfo }}</el-form-item>
|
|
||||||
<template v-if="data.mode == 'edit'">
|
|
||||||
|
|
||||||
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="整改人">{{ data.row.lordSentUser }}</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="抄送人">{{ data.row.copySendUser }}</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="复检人">{{ data.row.recheckSendUser }}</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="截至时间">{{ data.row.nickedTime }}</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="流程状态">
|
|
||||||
<dict-tag :options="data.checkStates" :value="data.row.checkState" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
<el-row>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="提交人">{{ data.row.createUser }}</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="12">
|
|
||||||
<el-form-item label="提交时间">{{ data.row.createTime }}</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
<el-form-item label="整改人">{{ data.row.lordSentUser }}</el-form-item>
|
|
||||||
<el-form-item label="抄送人">{{ data.row.copySendUser }}</el-form-item>
|
|
||||||
<el-form-item label="复检人">{{ data.row.recheckSendUser }}</el-form-item>
|
|
||||||
<el-form-item label="截至时间">{{ data.row.nickedTime }}</el-form-item>
|
|
||||||
<el-form-item label="流程状态">
|
|
||||||
<dict-tag :options="data.checkStates" :value="data.row.checkState" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="提交人">{{ data.row.createUser }}</el-form-item>
|
|
||||||
<el-form-item label="提交时间">{{ data.row.createTime }}</el-form-item>
|
|
||||||
</template>
|
|
||||||
</el-form>
|
|
||||||
<template v-if="data.mode == 'edit'">
|
|
||||||
<div class="step-2" v-if="data.hasStep2Role && (data.row.checkState == 0 || data.row.checkState == 2)">
|
|
||||||
<div class="step-header">
|
|
||||||
<svg-icon icon-class="twrap" />整改情况
|
|
||||||
</div>
|
|
||||||
<el-form ref="formStep2Ref" :model="step2Form" :rules="step2Rules">
|
|
||||||
<el-form-item label="整改说明" prop="opinion">
|
|
||||||
<el-input v-model="step2Form.opinion" style="width: 100%" maxlength="200" :rows="3" type="textarea" placeholder="请输入整改说明(最多255字)" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="整改图片" prop="images" style="margin-top:15px">
|
|
||||||
<image-upload v-model="step2Form.images" previewAll :limit="5" @change="doStep2ImageUpload" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div style="text-align: center;">
|
|
||||||
<el-button @click="data.visible = false">取消</el-button>
|
|
||||||
<el-button type="primary" @click="step2Submit" :disabled="data.loading">提交</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="step-3" v-if="data.hasStep3Role && data.row.checkState == 1">
|
|
||||||
<div class="step-header">
|
|
||||||
<svg-icon icon-class="twrap" />复检
|
|
||||||
</div>
|
|
||||||
<el-form ref="formStep3Ref" :model="step3Form" :rules="step3Rules">
|
|
||||||
<el-form-item label="复检意见" prop="opinion">
|
|
||||||
<el-input v-model="step3Form.opinion" style="width: 100%" maxlength="200" :rows="3" type="textarea" placeholder="请输入复检意见(最多255字)" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<div style="text-align: center;margin-top:20px;">
|
|
||||||
<el-button @click="data.visible = false">取消</el-button>
|
|
||||||
<el-button type="danger" @click="step3Reject" :disabled="data.loading">复检驳回</el-button>
|
|
||||||
<el-button type="primary" @click="step3Submit" :disabled="data.loading">复检通过</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-col>
|
|
||||||
</el-row>
|
|
||||||
</el-drawer>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup name="Problemmodify">
|
|
||||||
import useUserStore from '@/store/modules/user'
|
|
||||||
import { listAuditinfo, addAuditinfo } from '@/api/trouble/auditinfo'
|
|
||||||
import { fa } from 'element-plus/es/locales.mjs'
|
|
||||||
const { proxy } = getCurrentInstance()
|
|
||||||
const { ssp_proble_type, ssp_proble_sub_type } = proxy.useDict('ssp_proble_type', 'ssp_proble_sub_type')
|
|
||||||
const formStep2Ref = ref()
|
|
||||||
const formStep3Ref = ref()
|
|
||||||
const userStore = useUserStore()
|
|
||||||
const emit = defineEmits(['success'])
|
|
||||||
let data = reactive({
|
|
||||||
simple: false,
|
|
||||||
mode: '',
|
|
||||||
loading: false,
|
|
||||||
visible: false,
|
|
||||||
row: null,
|
|
||||||
auditinfoList: [],
|
|
||||||
stepActive: 0,
|
|
||||||
hasStep2Role: false,
|
|
||||||
hasStep3Role: false,
|
|
||||||
baseForm: {},
|
|
||||||
step2Form: {
|
|
||||||
opinion: '',
|
|
||||||
images: [],
|
|
||||||
},
|
|
||||||
step2Rules: {
|
|
||||||
opinion: [
|
|
||||||
{ required: true, message: '请输入审核意见', trigger: 'blur' },
|
|
||||||
{ min: 1, max: 200, message: '长度在 1 到 255 个字符', trigger: 'blur' },
|
|
||||||
],
|
|
||||||
images: [{ validator: validateStep2Images }],
|
|
||||||
},
|
|
||||||
step3Form: {
|
|
||||||
opinion: '',
|
|
||||||
},
|
|
||||||
step3Rules: {
|
|
||||||
opinion: [
|
|
||||||
{ required: true, message: '请输入审核意见', trigger: 'blur' },
|
|
||||||
{ min: 1, max: 200, message: '长度在 1 到 255 个字符', trigger: 'blur' },
|
|
||||||
],
|
|
||||||
},
|
|
||||||
checkStates: [
|
|
||||||
{ value: '0', label: '待整改' },
|
|
||||||
{ value: '1', label: '待复检' },
|
|
||||||
{ value: '3', label: '复检驳回' },
|
|
||||||
{ value: '4', label: '复检通过' },
|
|
||||||
],
|
|
||||||
})
|
|
||||||
const { step2Form, step2Rules, step3Form, step3Rules } = toRefs(data)
|
|
||||||
|
|
||||||
function toUrl(url) {
|
|
||||||
return url
|
|
||||||
}
|
|
||||||
function validateStep2Images(rule, value, callback) {
|
|
||||||
if (step2Form.value.images.length == 0) {
|
|
||||||
callback(new Error('请上传图片!'))
|
|
||||||
} else {
|
|
||||||
callback()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
function showDrawer(row, mode) {
|
|
||||||
data.mode = mode
|
|
||||||
data.row = row
|
|
||||||
|
|
||||||
step2Form.value.images = []
|
|
||||||
step2Form.value.opinion = ''
|
|
||||||
step3Form.value.opinion = ''
|
|
||||||
data.hasStep2Role = row.lordSent == userStore.uid
|
|
||||||
data.hasStep3Role = row.recheckSend == userStore.uid
|
|
||||||
data.stepActive = row.checkState + 1
|
|
||||||
data.visible = true
|
|
||||||
getListAuditinfo()
|
|
||||||
}
|
|
||||||
function getListAuditinfo() {
|
|
||||||
listAuditinfo({
|
|
||||||
page: 1,
|
|
||||||
limit: 100,
|
|
||||||
mainId: data.row.id,
|
|
||||||
}).then((res) => {
|
|
||||||
let tmps = (res.rows || []).map((it) => {
|
|
||||||
it.index = ''
|
|
||||||
return it
|
|
||||||
})
|
|
||||||
for (let i = 0; i < tmps.length; i++) {
|
|
||||||
let idx = tmps.length - i + 1
|
|
||||||
tmps[i].index = idx < 10 ? '0' + idx : idx
|
|
||||||
}
|
|
||||||
data.auditinfoList = tmps
|
|
||||||
if (data.row.checkState == 3) {
|
|
||||||
if (tmps.length == 2) {
|
|
||||||
data.simple = true
|
|
||||||
data.stepActive = 3
|
|
||||||
} else {
|
|
||||||
data.simple = false
|
|
||||||
data.stepActive = 4
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
function step3Reject() {
|
|
||||||
data.loading = true
|
|
||||||
formStep3Ref.value.validate((v) => {
|
|
||||||
data.loading = false
|
|
||||||
if (!v) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
proxy
|
|
||||||
.$confirm('确认驳回此整改?', '提示', {
|
|
||||||
confirmButtonText: '确 认',
|
|
||||||
cancelButtonText: '取 消',
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
let postData = {
|
|
||||||
mainId: data.row.id,
|
|
||||||
opinion: step3Form.value.opinion,
|
|
||||||
processState: 2,
|
|
||||||
}
|
|
||||||
addAuditinfo(postData).then((d) => {
|
|
||||||
if (d.code == 200) {
|
|
||||||
proxy.$modal.msgSuccess('提交成功!')
|
|
||||||
data.visible = false
|
|
||||||
emit('success')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
function step3Submit() {
|
|
||||||
data.loading = true
|
|
||||||
formStep3Ref.value.validate((v) => {
|
|
||||||
data.loading = false
|
|
||||||
if (!v) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
proxy
|
|
||||||
.$confirm('确认复检通过此整改?', '提示', {
|
|
||||||
confirmButtonText: '确 认',
|
|
||||||
cancelButtonText: '取 消',
|
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
let postData = {
|
|
||||||
mainId: data.row.id,
|
|
||||||
opinion: step3Form.value.opinion,
|
|
||||||
processState: 1,
|
|
||||||
}
|
|
||||||
addAuditinfo(postData).then((d) => {
|
|
||||||
if (d.code == 200) {
|
|
||||||
proxy.$modal.msgSuccess('提交成功!')
|
|
||||||
data.visible = false
|
|
||||||
emit('success')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
function step2Submit() {
|
|
||||||
data.loading = true
|
|
||||||
formStep2Ref.value.validate((v) => {
|
|
||||||
data.loading = false
|
|
||||||
if (v) {
|
|
||||||
let postData = {
|
|
||||||
mainId: data.row.id,
|
|
||||||
opinion: step2Form.value.opinion,
|
|
||||||
processState: 0,
|
|
||||||
images: step2Form.value.images,
|
|
||||||
}
|
|
||||||
addAuditinfo(postData).then((d) => {
|
|
||||||
if (d.code == 200) {
|
|
||||||
proxy.$modal.msgSuccess('提交成功!')
|
|
||||||
data.visible = false
|
|
||||||
emit('success')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
function doStep2ImageUpload() {
|
|
||||||
formStep2Ref.value.validateField('images')
|
|
||||||
}
|
|
||||||
defineExpose({
|
|
||||||
showDrawer,
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
|
||||||
.problemmodify-detail-drawer {
|
|
||||||
.el-drawer__header {
|
|
||||||
margin-bottom: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-drawer__body {
|
|
||||||
padding: 0px 20px;
|
|
||||||
|
|
||||||
.detail-left {
|
|
||||||
.el-steps--simple {
|
|
||||||
padding: 13px;
|
|
||||||
|
|
||||||
.el-step__title {
|
|
||||||
font-size: 12px;
|
|
||||||
max-width: unset;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.step-list {
|
|
||||||
overflow-y: auto;
|
|
||||||
height: calc(100vh - 128px);
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-card__body {
|
|
||||||
padding: 8px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.step-table {
|
|
||||||
width: 100%;
|
|
||||||
border-collapse: collapse;
|
|
||||||
border-color: #dddddda6;
|
|
||||||
|
|
||||||
td {
|
|
||||||
color: #888;
|
|
||||||
font-size: 12px;
|
|
||||||
padding: 4px 10px;
|
|
||||||
background: #eeebeb;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.step-header {
|
|
||||||
line-height: 40px;
|
|
||||||
font-weight: bold;
|
|
||||||
|
|
||||||
&.is-active {
|
|
||||||
color: var(--el-color-success);
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-icon {
|
|
||||||
position: relative;
|
|
||||||
top: 2px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.step-img {
|
|
||||||
.el-image {
|
|
||||||
width: 90px;
|
|
||||||
height: 80px;
|
|
||||||
margin-left: 3px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.detail-right {
|
|
||||||
padding-left: 12px;
|
|
||||||
|
|
||||||
&.is-edit {
|
|
||||||
.el-form-item--default {
|
|
||||||
margin-bottom: 0px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.el-upload-list__item,
|
|
||||||
.el-upload--picture-card {
|
|
||||||
width: 80px !important;
|
|
||||||
height: 80px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.step-header {
|
|
||||||
color: var(--el-color-primary);
|
|
||||||
font-weight: bold;
|
|
||||||
line-height: 30px;
|
|
||||||
border-bottom: dotted 1px var(--el-border-color-light);
|
|
||||||
margin-block: 12px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,270 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="app-container trouble-problemodify-index">
|
|
||||||
<el-form class="header-form" :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
|
|
||||||
<el-form-item label="检查类型" prop="problemType">
|
|
||||||
<el-select v-model="queryParams.problemType" placeholder="请选择检查类型" clearable>
|
|
||||||
<el-option v-for="dict in ssp_proble_type" :key="dict.value" :label="dict.label" :value="dict.value">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="隐患类型" prop="dangerType">
|
|
||||||
<el-select v-model="queryParams.dangerType" placeholder="请选择隐患类型" clearable>
|
|
||||||
<el-option v-for="dict in ssp_proble_sub_type.filter(d => d.remark == '1')" :key="dict.value" :label="dict.label" :value="dict.value">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="整改人" prop="lordSent">
|
|
||||||
<el-input v-model="queryParams.lordSent" placeholder="请输入人员姓名/联系方式" clearable/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="提交人" prop="createUser">
|
|
||||||
<el-input v-model="queryParams.createUser" placeholder="请输入人员姓名/联系方式" clearable/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="提交时间" prop="dateRange">
|
|
||||||
<el-date-picker v-model="queryParams.dataRange" type="daterange" style="width: 308px;" range-separator="--"
|
|
||||||
start-placeholder="开始日期" end-placeholder="结束日期" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item>
|
|
||||||
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
|
|
||||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<el-tabs v-model="data.activeName" class="main-tabs" @tab-click="tabClick">
|
|
||||||
<el-tab-pane :label="data.tabInfo['a']" name="a"></el-tab-pane>
|
|
||||||
<el-tab-pane :label="data.tabInfo['b']" name="b"></el-tab-pane>
|
|
||||||
<el-tab-pane :label="data.tabInfo['c']" name="c"></el-tab-pane>
|
|
||||||
<el-tab-pane :label="data.tabInfo['d']" name="d"></el-tab-pane>
|
|
||||||
<el-tab-pane :label="data.tabInfo['e']" name="e"></el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
<el-table v-loading="loading" :data="problemmodifyList">
|
|
||||||
<el-table-column label="序号" align="center" type="index" width="60" />
|
|
||||||
<el-table-column label="项目名称" align="center" prop="projectName" />
|
|
||||||
<el-table-column label="问题图片" align="center" prop="smarkUrl" width="100">
|
|
||||||
<template #default="scope">
|
|
||||||
<el-image :src="scope.row.smarkUrlPic" style="height:80px;" :preview-teleported="true"
|
|
||||||
:preview-src-list="scope.row.smarkUrlPics"></el-image>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="检查类型" align="center" prop="problemType">
|
|
||||||
<template #default="scope">
|
|
||||||
<dict-tag :options="ssp_proble_type" :value="scope.row.problemType" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="隐患类型" align="center" prop="dangerType">
|
|
||||||
<template #default="scope">
|
|
||||||
<dict-tag :options="ssp_proble_sub_type" :value="scope.row.dangerType" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="施工部位" align="center" prop="workParts" />
|
|
||||||
<el-table-column label="整改要求" align="center" prop="changeInfo" />
|
|
||||||
<el-table-column label="整改截至时间" align="center" prop="nickedTime" width="120" />
|
|
||||||
<el-table-column label="整改人" align="center" prop="lordSentUser" width="180"/>
|
|
||||||
<el-table-column label="复检人" align="center" prop="recheckSendUser" width="180"/>
|
|
||||||
<el-table-column label="抄送人" align="center" prop="copySendUser" width="100"/>
|
|
||||||
<el-table-column label="流程状态" align="center" prop="checkState">
|
|
||||||
<template #default="scope">
|
|
||||||
<dict-tag :options="data.checkStates" :value="scope.row.checkState" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="提交时间" align="center" prop="createTime" width="120">
|
|
||||||
<template #default="scope">
|
|
||||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120" fixed="right">
|
|
||||||
<template #default="scope">
|
|
||||||
|
|
||||||
<el-button v-if="getIsModify(scope.row)" link type="primary" size="small" :icon="Check"
|
|
||||||
@click="handleModify(scope.row)" v-hasPermi="['trouble:problemmodify:edit']">处理</el-button>
|
|
||||||
<el-button size="small" :icon="Document" link type="primary" @click="handleDetail(scope.row)"
|
|
||||||
v-hasPermi="['trouble:problemmodify:query']">详情</el-button>
|
|
||||||
<el-button v-if="getIsVdel(scope.row)" size="small" link type="primary" :icon="Delete"
|
|
||||||
@click="handleDelete(scope.row)" v-hasPermi="['trouble:problemmodify:remove']">删除</el-button>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum"
|
|
||||||
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
|
||||||
<detailDrawer ref="detailDrawerRef" @success="handleQuery"></detailDrawer>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup name="Problemmodify">
|
|
||||||
import detailDrawer from "./detailDrawer.vue";
|
|
||||||
import useUserStore from '@/store/modules/user'
|
|
||||||
import { Check, Document, Delete } from '@element-plus/icons-vue'
|
|
||||||
import { listProblemmodify, getProblemmodify, delProblemmodify, addProblemmodify, updateProblemmodify, getListCount } from "@/api/trouble/problemmodify";
|
|
||||||
const { proxy } = getCurrentInstance();
|
|
||||||
const { ssp_proble_type, ssp_proble_sub_type } = proxy.useDict('ssp_proble_type', 'ssp_proble_sub_type');
|
|
||||||
const problemmodifyList = ref([]);
|
|
||||||
const userStore = useUserStore()
|
|
||||||
const loading = ref(true);
|
|
||||||
const showSearch = ref(true);
|
|
||||||
const ids = ref([]);
|
|
||||||
const single = ref(true);
|
|
||||||
const multiple = ref(true);
|
|
||||||
const total = ref(0);
|
|
||||||
const detailDrawerRef = ref();
|
|
||||||
const data = reactive({
|
|
||||||
form: {},
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
problemType: null,
|
|
||||||
dangerType: null,
|
|
||||||
lordSent: null,
|
|
||||||
createUser: null,
|
|
||||||
checkState: null,
|
|
||||||
dateRange: [],
|
|
||||||
},
|
|
||||||
rules: {
|
|
||||||
comId: [
|
|
||||||
{ required: true, message: "租户ID不能为空", trigger: "blur" }
|
|
||||||
],
|
|
||||||
},
|
|
||||||
activeName: 'a',
|
|
||||||
tabInfo: {},
|
|
||||||
checkStates: [{ value: "0", label: '待整改' }, { value: "1", label: '待复检' },
|
|
||||||
{ value: "3", label: '复检驳回' },
|
|
||||||
{ value: "4", label: '复检通过' }]
|
|
||||||
});
|
|
||||||
|
|
||||||
const { queryParams, form, rules } = toRefs(data);
|
|
||||||
|
|
||||||
/** 查询质量隐患整改列表 */
|
|
||||||
function getList() {
|
|
||||||
if (!userStore.currentPrjId) {
|
|
||||||
proxy.$modal.msgWarning("请切换到项目数据!!!");
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
loading.value = true;
|
|
||||||
let postData = {
|
|
||||||
infoType: 1,
|
|
||||||
problemType: queryParams.value.problemType,
|
|
||||||
dangerType: queryParams.value.dangerType,
|
|
||||||
lordSent: queryParams.value.lordSent,
|
|
||||||
createUser: queryParams.value.createUser,
|
|
||||||
checkState: " abcde".indexOf(data.activeName)
|
|
||||||
};
|
|
||||||
if (queryParams.value.dataRange && queryParams.value.dataRange.length > 0) {
|
|
||||||
postData.createTime = queryParams.value.dataRange[0];
|
|
||||||
postData.updateTime = queryParams.value.dataRange[1];
|
|
||||||
}
|
|
||||||
listProblemmodify(postData).then(response => {
|
|
||||||
problemmodifyList.value = (response.rows || []).map(it => {
|
|
||||||
it.smarkUrlPic = it.smarkUrl.split(",")[0];
|
|
||||||
it.smarkUrlPics = it.smarkUrl.split(",")
|
|
||||||
return it;
|
|
||||||
});
|
|
||||||
total.value = response.total;
|
|
||||||
loading.value = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
function handleQuery() {
|
|
||||||
queryParams.value.pageNum = 1;
|
|
||||||
getCount();
|
|
||||||
getList();
|
|
||||||
}
|
|
||||||
|
|
||||||
function tabClick() {
|
|
||||||
setTimeout(handleQuery, 800);
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleModify(row) {
|
|
||||||
detailDrawerRef.value.showDrawer(row, 'edit');
|
|
||||||
}
|
|
||||||
function handleDetail(row) {
|
|
||||||
detailDrawerRef.value.showDrawer(row, 'show');
|
|
||||||
}
|
|
||||||
function getIsVdel(row) {
|
|
||||||
let isAdmin = userStore.isAdmin;
|
|
||||||
if (isAdmin) {
|
|
||||||
return true;
|
|
||||||
} else if (row.updateUser == userStore.uid && row.checkState != 3) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
function getIsModify(row) {
|
|
||||||
if (row.checkState == 0 || row.checkState == 2) {
|
|
||||||
return row.lordSent == userStore.uid;
|
|
||||||
}
|
|
||||||
if (row.checkState == 1) {
|
|
||||||
return row.recheckSend == userStore.uid;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
function resetQuery() {
|
|
||||||
proxy.resetForm("queryRef");
|
|
||||||
queryParams.value.dataRange = [];
|
|
||||||
handleQuery();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 多选框选中数据
|
|
||||||
function handleSelectionChange(selection) {
|
|
||||||
ids.value = selection.map(item => item.id);
|
|
||||||
single.value = selection.length != 1;
|
|
||||||
multiple.value = !selection.length;
|
|
||||||
}
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
function handleDelete(row) {
|
|
||||||
const _ids = row.id || ids.value;
|
|
||||||
proxy.$modal.confirm('是否确认删除质量隐患整改编号为"' + _ids + '"的数据项?').then(function () {
|
|
||||||
return delProblemmodify(_ids);
|
|
||||||
}).then(() => {
|
|
||||||
getList();
|
|
||||||
proxy.$modal.msgSuccess("删除成功");
|
|
||||||
}).catch(() => { });
|
|
||||||
}
|
|
||||||
|
|
||||||
function getCount() {
|
|
||||||
if (!userStore.currentPrjId) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
let postData = {
|
|
||||||
infoType: 1,
|
|
||||||
problemType: queryParams.value.problemType,
|
|
||||||
dangerType: queryParams.value.dangerType,
|
|
||||||
lordSent: queryParams.value.lordSent,
|
|
||||||
createUser: queryParams.value.createUser
|
|
||||||
};
|
|
||||||
if (queryParams.value.dataRange && queryParams.value.dataRange.length > 0) {
|
|
||||||
postData.createTime = queryParams.value.dataRange[0];
|
|
||||||
postData.updateTime = queryParams.value.dataRange[1];
|
|
||||||
}
|
|
||||||
data.tabInfo = {
|
|
||||||
a: '全部数据(0)',
|
|
||||||
b: '待整改(0)',
|
|
||||||
c: '待复检(0)',
|
|
||||||
d: '整改完成(0)',
|
|
||||||
e: '整改超时(0)',
|
|
||||||
};
|
|
||||||
getListCount(postData).then(response => {
|
|
||||||
let obj = {
|
|
||||||
a: '全部数据',
|
|
||||||
b: '待整改',
|
|
||||||
c: '待复检',
|
|
||||||
d: '整改完成',
|
|
||||||
e: '整改超时',
|
|
||||||
};
|
|
||||||
(response.data || []).forEach(it => {
|
|
||||||
data.tabInfo[it.projectName] = obj[it.projectName] + `(${it.id || 0})`
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
getCount();
|
|
||||||
handleQuery();
|
|
||||||
</script>
|
|
||||||
<style lang="scss">
|
|
||||||
.trouble-problemodify-index {
|
|
||||||
.header-form {
|
|
||||||
.el-form-item {
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -39,8 +39,8 @@ export default defineConfig(({ mode, command }) => {
|
||||||
},
|
},
|
||||||
// https://cn.vitejs.dev/config/#server-proxy
|
// https://cn.vitejs.dev/config/#server-proxy
|
||||||
"/dev-api": {
|
"/dev-api": {
|
||||||
//target: "http://localhost:8080",
|
target: "http://localhost:8080",
|
||||||
target: "http://62.234.3.186/prod-api/",
|
//target: "http://62.234.3.186/prod-api/",
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (p) => p.replace(/^\/dev-api/, ""),
|
rewrite: (p) => p.replace(/^\/dev-api/, ""),
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue