Commit 67bd97e0 authored by 耿迪迪's avatar 耿迪迪
parents 097b1553 6df79890
...@@ -28,6 +28,26 @@ public class PipeInterfaceController extends BaseController { ...@@ -28,6 +28,26 @@ public class PipeInterfaceController extends BaseController {
@Autowired @Autowired
private TokenService tokenService; private TokenService tokenService;
/**
* 查询管道数据列表
*/
@RequestBody
@RequestMapping("/getPipeForSelect")
public PipeList getPipeForSelect() {
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
SysUser user = loginUser.getUser();
if ("-2".equals(user.getDeptId())){
user.setDeptId("0");
}
//查询管道数据列表
List<PipeDate> pipeDates = iPipeInterfaceService.getPipeForSelect(String.valueOf(user.getDeptId()));
PipeList pipeList=new PipeList();
pipeList.setData(pipeDates);
return pipeList;
}
/** /**
* 查询管道数据列表 * 查询管道数据列表
*/ */
......
...@@ -90,6 +90,9 @@ public class TPipeInfoController extends BaseController ...@@ -90,6 +90,9 @@ public class TPipeInfoController extends BaseController
//根据企业id查询企业名称 //根据企业id查询企业名称
String EnterpriseName = tEmployedPeopleInfoService.selectEnterpriseName(tPipeInfo.getBeyondEnterpriseId()); String EnterpriseName = tEmployedPeopleInfoService.selectEnterpriseName(tPipeInfo.getBeyondEnterpriseId());
tPipeInfo.setBeyondEnterpriseName(EnterpriseName); tPipeInfo.setBeyondEnterpriseName(EnterpriseName);
//
return toAjax(tPipeInfoService.insertTPipeInfo(tPipeInfo)); return toAjax(tPipeInfoService.insertTPipeInfo(tPipeInfo));
} }
......
...@@ -44,6 +44,66 @@ public class PipeDate extends BaseEntity { ...@@ -44,6 +44,66 @@ public class PipeDate extends BaseEntity {
private int iconType; private int iconType;
/**
* 管道名称
*/
private String pipeName;
/**
* 详细地址
*/
private String detaildAddress;
/**
* 行业主管部门
*/
private String indRegAuth;
/**
* 行业主管部门负责人
*/
private String indRegAuthPer;
/**
* 属地负责人电话
*/
private String indRegAuthPerCon;
/**
* 重点部位燃气具使用情况
*/
private String keyAreasGasUsage;
/**
* 所属燃气公司
*/
private String affGasCom;
/**
* 所属燃气公司安检人员
*/
private String affGasComSecPer;
/**
* 燃气公司安检人员电话
*/
private String affGasComSecPerCon;
/**
* 安检时间
*/
private String secCheckTime;
/**
* 单位燃气用户负责人
*/
private String unitGasUserRes;
/**
* 单位燃气用户负责人电话
*/
private String unitGasUserResCon;
public String getPipeId() { public String getPipeId() {
return pipeId; return pipeId;
...@@ -205,6 +265,102 @@ public class PipeDate extends BaseEntity { ...@@ -205,6 +265,102 @@ public class PipeDate extends BaseEntity {
this.inspectionTime = inspectionTime; this.inspectionTime = inspectionTime;
} }
public String getPipeName() {
return pipeName;
}
public void setPipeName(String pipeName) {
this.pipeName = pipeName;
}
public String getDetaildAddress() {
return detaildAddress;
}
public void setDetaildAddress(String detaildAddress) {
this.detaildAddress = detaildAddress;
}
public String getIndRegAuth() {
return indRegAuth;
}
public void setIndRegAuth(String indRegAuth) {
this.indRegAuth = indRegAuth;
}
public String getIndRegAuthPer() {
return indRegAuthPer;
}
public void setIndRegAuthPer(String indRegAuthPer) {
this.indRegAuthPer = indRegAuthPer;
}
public String getIndRegAuthPerCon() {
return indRegAuthPerCon;
}
public void setIndRegAuthPerCon(String indRegAuthPerCon) {
this.indRegAuthPerCon = indRegAuthPerCon;
}
public String getKeyAreasGasUsage() {
return keyAreasGasUsage;
}
public void setKeyAreasGasUsage(String keyAreasGasUsage) {
this.keyAreasGasUsage = keyAreasGasUsage;
}
public String getAffGasCom() {
return affGasCom;
}
public void setAffGasCom(String affGasCom) {
this.affGasCom = affGasCom;
}
public String getAffGasComSecPer() {
return affGasComSecPer;
}
public void setAffGasComSecPer(String affGasComSecPer) {
this.affGasComSecPer = affGasComSecPer;
}
public String getAffGasComSecPerCon() {
return affGasComSecPerCon;
}
public void setAffGasComSecPerCon(String affGasComSecPerCon) {
this.affGasComSecPerCon = affGasComSecPerCon;
}
public String getSecCheckTime() {
return secCheckTime;
}
public void setSecCheckTime(String secCheckTime) {
this.secCheckTime = secCheckTime;
}
public String getUnitGasUserRes() {
return unitGasUserRes;
}
public void setUnitGasUserRes(String unitGasUserRes) {
this.unitGasUserRes = unitGasUserRes;
}
public String getUnitGasUserResCon() {
return unitGasUserResCon;
}
public void setUnitGasUserResCon(String unitGasUserResCon) {
this.unitGasUserResCon = unitGasUserResCon;
}
@Override @Override
public String toString() { public String toString() {
return "PipeDate{" + return "PipeDate{" +
......
...@@ -71,6 +71,66 @@ public class TPipeInfo extends BaseEntity ...@@ -71,6 +71,66 @@ public class TPipeInfo extends BaseEntity
/** 是否删除(0正常,1删除) */ /** 是否删除(0正常,1删除) */
private String isDel; private String isDel;
/**
* 管道名称
*/
private String pipeName;
/**
* 详细地址
*/
private String detaildAddress;
/**
* 行业主管部门
*/
private String indRegAuth;
/**
* 行业主管部门负责人
*/
private String indRegAuthPer;
/**
* 属地负责人电话
*/
private String indRegAuthPerCon;
/**
* 重点部位燃气具使用情况
*/
private String keyAreasGasUsage;
/**
* 所属燃气公司
*/
private String affGasCom;
/**
* 所属燃气公司安检人员
*/
private String affGasComSecPer;
/**
* 燃气公司安检人员电话
*/
private String affGasComSecPerCon;
/**
* 安检时间
*/
private String secCheckTime;
/**
* 单位燃气用户负责人
*/
private String unitGasUserRes;
/**
* 单位燃气用户负责人电话
*/
private String unitGasUserResCon;
/** 备注 */ /** 备注 */
@Excel(name = "备注") @Excel(name = "备注")
private String remarks; private String remarks;
...@@ -218,6 +278,102 @@ public class TPipeInfo extends BaseEntity ...@@ -218,6 +278,102 @@ public class TPipeInfo extends BaseEntity
return remarks; return remarks;
} }
public String getPipeName() {
return pipeName;
}
public void setPipeName(String pipeName) {
this.pipeName = pipeName;
}
public String getDetaildAddress() {
return detaildAddress;
}
public void setDetaildAddress(String detaildAddress) {
this.detaildAddress = detaildAddress;
}
public String getIndRegAuth() {
return indRegAuth;
}
public void setIndRegAuth(String indRegAuth) {
this.indRegAuth = indRegAuth;
}
public String getIndRegAuthPer() {
return indRegAuthPer;
}
public void setIndRegAuthPer(String indRegAuthPer) {
this.indRegAuthPer = indRegAuthPer;
}
public String getIndRegAuthPerCon() {
return indRegAuthPerCon;
}
public void setIndRegAuthPerCon(String indRegAuthPerCon) {
this.indRegAuthPerCon = indRegAuthPerCon;
}
public String getKeyAreasGasUsage() {
return keyAreasGasUsage;
}
public void setKeyAreasGasUsage(String keyAreasGasUsage) {
this.keyAreasGasUsage = keyAreasGasUsage;
}
public String getAffGasCom() {
return affGasCom;
}
public void setAffGasCom(String affGasCom) {
this.affGasCom = affGasCom;
}
public String getAffGasComSecPer() {
return affGasComSecPer;
}
public void setAffGasComSecPer(String affGasComSecPer) {
this.affGasComSecPer = affGasComSecPer;
}
public String getAffGasComSecPerCon() {
return affGasComSecPerCon;
}
public void setAffGasComSecPerCon(String affGasComSecPerCon) {
this.affGasComSecPerCon = affGasComSecPerCon;
}
public String getSecCheckTime() {
return secCheckTime;
}
public void setSecCheckTime(String secCheckTime) {
this.secCheckTime = secCheckTime;
}
public String getUnitGasUserRes() {
return unitGasUserRes;
}
public void setUnitGasUserRes(String unitGasUserRes) {
this.unitGasUserRes = unitGasUserRes;
}
public String getUnitGasUserResCon() {
return unitGasUserResCon;
}
public void setUnitGasUserResCon(String unitGasUserResCon) {
this.unitGasUserResCon = unitGasUserResCon;
}
@Override @Override
public String toString() { public String toString() {
return "TPipeInfo{" + return "TPipeInfo{" +
......
...@@ -18,6 +18,13 @@ public interface PipeInterfaceMapper { ...@@ -18,6 +18,13 @@ public interface PipeInterfaceMapper {
*/ */
List<PipeDate> selectPipeData(String enterId); List<PipeDate> selectPipeData(String enterId);
/**
* 按照名称查询管道数据列表
* @return
*/
List<PipeDate> getPipeForSelect(String enterId);
/** /**
* 获取分组数据 * 获取分组数据
* @return * @return
......
...@@ -15,6 +15,12 @@ public interface IPipeInterfaceService { ...@@ -15,6 +15,12 @@ public interface IPipeInterfaceService {
*/ */
List<PipeDate> selectPipeData(String enterId); List<PipeDate> selectPipeData(String enterId);
/**
* 查询管道数据列表 名称不为空
* @return
*/
List<PipeDate> getPipeForSelect(String enterId);
/** /**
* 获取分组数据 * 获取分组数据
* @return * @return
......
...@@ -26,6 +26,16 @@ public class PipeInterfaceServiceImpl implements IPipeInterfaceService { ...@@ -26,6 +26,16 @@ public class PipeInterfaceServiceImpl implements IPipeInterfaceService {
return pipeDates; return pipeDates;
} }
/**
* 查询管道数据列表 名称不为空
* @return
*/
@Override
public List<PipeDate> getPipeForSelect(String enterId) {
List<PipeDate> pipeDates = pipeInterfaceMapper.getPipeForSelect(enterId);
return pipeDates;
}
/** /**
* 获取分组数据 * 获取分组数据
* @return * @return
......
...@@ -43,6 +43,7 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService ...@@ -43,6 +43,7 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
@Override @Override
public List<TDetectorUserVO> detectorUserList(TDetectorUser tDetectorUser) public List<TDetectorUserVO> detectorUserList(TDetectorUser tDetectorUser)
{ {
long startTime = System.currentTimeMillis();
List<TDetectorUserVO> list = new ArrayList<>(); List<TDetectorUserVO> list = new ArrayList<>();
List<TDetectorUserVO> tDetectorUserList = tDetectorUserMapper.countTDetectorUser(tDetectorUser); List<TDetectorUserVO> tDetectorUserList = tDetectorUserMapper.countTDetectorUser(tDetectorUser);
...@@ -66,6 +67,8 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService ...@@ -66,6 +67,8 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
} }
} }
long end = System.currentTimeMillis();
System.out.println("detectorUserList = " + (end - startTime));
return list; return list;
} }
......
...@@ -19,6 +19,19 @@ ...@@ -19,6 +19,19 @@
<result property="companyType" column="beyond_enterprise_id" /> <result property="companyType" column="beyond_enterprise_id" />
<result property="pipeLength" column="pipe_length" /> <result property="pipeLength" column="pipe_length" />
<result property="pipeName" column="pipe_name" />
<result property="detaildAddress" column="detaild_address" />
<result property="indRegAuth" column="ind_reg_auth" />
<result property="indRegAuthPer" column="ind_reg_auth_per" />
<result property="indRegAuthPerCon" column="ind_reg_auth_per_con" />
<result property="keyAreasGasUsage" column="key_areas_gas_usage" />
<result property="affGasCom" column="aff_gas_com" />
<result property="affGasComSecPer" column="aff_gas_com_sec_per" />
<result property="affGasComSecPerCon" column="aff_gas_com_sec_per_con" />
<result property="secCheckTime" column="sec_check_time" />
<result property="unitGasUserRes" column="unit_gas_user_res" />
<result property="unitGasUserResCon" column="unit_gas_user_res_con" />
</resultMap> </resultMap>
<!--调压箱--> <!--调压箱-->
...@@ -110,6 +123,18 @@ ...@@ -110,6 +123,18 @@
</if> </if>
</select> </select>
<!--查询管道数据列表-->
<select id="getPipeForSelect" parameterType="PipeDate" resultMap="PipeDateResult">
select format(pipe_length,2)pipe_length,pipe_pressure,beyond_enterprise_id,pipe_id,pipe_diameter,pipe_material,
buried_depth,pipe_trend,build_date,pipe_addr,coordinates,remarks,build_unit,beyond_enterprise_name,
pipe_name,detaild_address,ind_reg_auth,ind_reg_auth_per,ind_reg_auth_per_con,key_areas_gas_usage,
aff_gas_com,aff_gas_com_sec_per,aff_gas_com_sec_per_con,sec_check_time,unit_gas_user_res,unit_gas_user_res_con from t_pipe_info
where is_del='0' and pipe_name is not null
<if test="enterId != null and enterId != 0">
and beyond_enterprise_id=#{enterId}
</if>
</select>
<!--获取分组数据--> <!--获取分组数据-->
<select id="selectGroupPipeData" parameterType="PipeDate" resultMap="PipeDateResult"> <select id="selectGroupPipeData" parameterType="PipeDate" resultMap="PipeDateResult">
select beyond_enterprise_id,pipe_id,pipe_diameter,pipe_material,buried_depth,pipe_trend,build_date,pipe_addr,coordinates,remarks,build_unit,beyond_enterprise_name from t_pipe_info select beyond_enterprise_id,pipe_id,pipe_diameter,pipe_material,buried_depth,pipe_trend,build_date,pipe_addr,coordinates,remarks,build_unit,beyond_enterprise_name from t_pipe_info
......
...@@ -24,10 +24,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -24,10 +24,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="isDel" column="is_del" /> <result property="isDel" column="is_del" />
<result property="remarks" column="remarks" /> <result property="remarks" column="remarks" />
<result property="pipeName" column="pipe_name" />
<result property="detaildAddress" column="detaild_address" />
<result property="indRegAuth" column="ind_reg_auth" />
<result property="indRegAuthPer" column="ind_reg_auth_per" />
<result property="indRegAuthPerCon" column="ind_reg_auth_per_con" />
<result property="keyAreasGasUsage" column="key_areas_gas_usage" />
<result property="affGasCom" column="aff_gas_com" />
<result property="affGasComSecPer" column="aff_gas_com_sec_per" />
<result property="affGasComSecPerCon" column="aff_gas_com_sec_per_con" />
<result property="secCheckTime" column="sec_check_time" />
<result property="unitGasUserRes" column="unit_gas_user_res" />
<result property="unitGasUserResCon" column="unit_gas_user_res_con" />
</resultMap> </resultMap>
<sql id="selectTPipeInfoVo"> <sql id="selectTPipeInfoVo">
select pipe_id,pipe_length, pipe_diameter, pipe_pressure, pipe_material, pipe_addr, buried_depth, pipe_trend, build_date, build_unit, beyond_enterprise_id, beyond_enterprise_name, coordinates, create_by, create_time, update_by, update_time, is_del, remarks from t_pipe_info select pipe_id,pipe_length, pipe_diameter, pipe_pressure, pipe_material, pipe_addr, buried_depth, pipe_trend, build_date, build_unit, beyond_enterprise_id, beyond_enterprise_name, coordinates, create_by, create_time, update_by, update_time, is_del,pipe_name,detaild_address,ind_reg_auth,ind_reg_auth_per,ind_reg_auth_per_con,key_areas_gas_usage,aff_gas_com,aff_gas_com_sec_per,aff_gas_com_sec_per_con,sec_check_time,unit_gas_user_res,unit_gas_user_res_con, remarks from t_pipe_info
</sql> </sql>
<select id="selectTPipeInfoList" parameterType="TPipeInfo" resultMap="TPipeInfoResult"> <select id="selectTPipeInfoList" parameterType="TPipeInfo" resultMap="TPipeInfoResult">
...@@ -48,6 +61,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -48,6 +61,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="coordinates != null and coordinates != ''"> and coordinates = #{coordinates}</if> <if test="coordinates != null and coordinates != ''"> and coordinates = #{coordinates}</if>
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if> <if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if> <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
<if test="pipeName != null and pipeName != ''"> and pipe_name = #{pipeName}</if>
<if test="detaildAddress != null and detaildAddress != ''"> and detaild_address = #{detaildAddress}</if>
<if test="indRegAuth != null and indRegAuth != ''"> and ind_reg_auth = #{indRegAuth}</if>
<if test="indRegAuthPer != null and indRegAuthPer != ''"> and ind_reg_auth_per = #{indRegAuthPer}</if>
<if test="indRegAuthPerCon != null and indRegAuthPerCon != ''"> and ind_reg_auth_per_con = #{indRegAuthPerCon}</if>
<if test="keyAreasGasUsage != null and keyAreasGasUsage != ''"> and key_areas_gas_usage = #{keyAreasGasUsage}</if>
<if test="affGasCom != null and affGasCom != ''"> and aff_gas_com = #{affGasCom}</if>
<if test="affGasComSecPer != null and affGasComSecPer != ''"> and aff_gas_com_sec_per = #{affGasComSecPer}</if>
<if test="affGasComSecPerCon != null and affGasComSecPerCon != ''"> and aff_gas_com_sec_per_con = #{affGasComSecPerCon}</if>
<if test="secCheckTime != null and secCheckTime != ''"> and sec_check_time = #{secCheckTime}</if>
<if test="unitGasUserRes != null and unitGasUserRes != ''"> and unit_gas_user_res = #{unitGasUserRes}</if>
<if test="unitGasUserResCon != null and unitGasUserResCon != ''"> and unit_gas_user_res_con = #{unitGasUserResCon}</if>
</where> </where>
order by pipe_id desc order by pipe_id desc
</select> </select>
...@@ -78,6 +104,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -78,6 +104,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time,</if> <if test="updateTime != null">update_time,</if>
<if test="isDel != null">is_del,</if> <if test="isDel != null">is_del,</if>
<if test="remarks != null">remarks,</if> <if test="remarks != null">remarks,</if>
<if test="pipeName != null">pipe_name,</if>
<if test="detaildAddress != null">detaild_address,</if>
<if test="indRegAuth != null">ind_reg_auth,</if>
<if test="indRegAuthPer != null">ind_reg_auth_per,</if>
<if test="indRegAuthPerCon != null">ind_reg_auth_per_con,</if>
<if test="keyAreasGasUsage != null">key_areas_gas_usage,</if>
<if test="affGasCom != null">aff_gas_com,</if>
<if test="affGasComSecPer != null">aff_gas_com_sec_per,</if>
<if test="affGasComSecPerCon != null">aff_gas_com_sec_per_con,</if>
<if test="secCheckTime != null">sec_check_time,</if>
<if test="unitGasUserRes != null">unit_gas_user_res,</if>
<if test="unitGasUserResCon != null">unit_gas_user_res_con,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="pipeLength != null">#{pipeLength},</if> <if test="pipeLength != null">#{pipeLength},</if>
...@@ -98,6 +137,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -98,6 +137,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="isDel != null">#{isDel},</if> <if test="isDel != null">#{isDel},</if>
<if test="remarks != null">#{remarks},</if> <if test="remarks != null">#{remarks},</if>
<if test="pipeName != null">#{pipeName},</if>
<if test="detaildAddress != null">#{detaildAddress},</if>
<if test="indRegAuth != null">#{indRegAuth},</if>
<if test="indRegAuthPer != null">#{indRegAuthPer},</if>
<if test="indRegAuthPerCon != null">#{indRegAuthPerCon},</if>
<if test="keyAreasGasUsage != null">#{keyAreasGasUsage},</if>
<if test="affGasCom != null">#{affGasCom},</if>
<if test="affGasComSecPer != null">#{affGasComSecPer},</if>
<if test="affGasComSecPerCon != null">#{affGasComSecPerCon},</if>
<if test="secCheckTime != null">#{secCheckTime},</if>
<if test="unitGasUserRes != null">#{unitGasUserRes},</if>
<if test="unitGasUserResCon != null">#{unitGasUserResCon},</if>
</trim> </trim>
</insert> </insert>
...@@ -122,6 +174,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -122,6 +174,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time = #{updateTime},</if> <if test="updateTime != null">update_time = #{updateTime},</if>
<if test="isDel != null">is_del = #{isDel},</if> <if test="isDel != null">is_del = #{isDel},</if>
<if test="remarks != null">remarks = #{remarks},</if> <if test="remarks != null">remarks = #{remarks},</if>
<if test="pipeName != null">pipe_name = #{pipeName},</if>
<if test="detaildAddress != null">detaild_address =#{detaildAddress},</if>
<if test="indRegAuth != null">ind_reg_auth =#{indRegAuth},</if>
<if test="indRegAuthPer != null">ind_reg_auth_per =#{indRegAuthPer},</if>
<if test="indRegAuthPerCon != null">ind_reg_auth_per_con =#{indRegAuthPerCon},</if>
<if test="keyAreasGasUsage != null">key_areas_gas_usage =#{keyAreasGasUsage},</if>
<if test="affGasCom != null">aff_gas_com =#{affGasCom},</if>
<if test="affGasComSecPer != null">aff_gas_com_sec_per =#{affGasComSecPer},</if>
<if test="affGasComSecPerCon != null">aff_gas_com_sec_per_con =#{affGasComSecPerCon},</if>
<if test="secCheckTime != null">sec_check_time =#{secCheckTime},</if>
<if test="unitGasUserRes != null">unit_gas_user_res =#{unitGasUserRes},</if>
<if test="unitGasUserResCon != null">unit_gas_user_res_con =#{unitGasUserResCon},</if>
</trim> </trim>
where pipe_id = #{pipeId} where pipe_id = #{pipeId}
</update> </update>
......
...@@ -13,9 +13,8 @@ ...@@ -13,9 +13,8 @@
securityJsCode:'d4bb6c4d7a074701457bc9721eb7754a', securityJsCode:'d4bb6c4d7a074701457bc9721eb7754a',
} }
</script> </script>
<script src="https://webapi.amap.com/maps?v=2.0&key=72306333e96c7806b856a9bc69afc402&plugin=Map3D,AMap.DistrictSearch,AMap.Scale,AMap.OverView,AMap.ToolBar,AMap.MouseTool,AMap.ControlBar,AMap.CircleEditor,AMap.PolyEditor"></script> <!-- <script src="https://webapi.amap.com/maps?v=2.0&key=72306333e96c7806b856a9bc69afc402&plugin=Map3D,AMap.DistrictSearch,AMap.Scale,AMap.OverView,AMap.ToolBar,AMap.MouseTool,AMap.ControlBar,AMap.CircleEditor,AMap.PolyEditor"></script> -->
<!-- <script src="https://webapi.amap.com/maps?v=2.0&key=49fcb156d466062435d7d33437099582&plugin=Map3D,AMap.DistrictSearch,AMap.Scale,AMap.OverView,AMap.ToolBar,AMap.MouseTool,AMap.ControlBar,AMap.CircleEditor,AMap.PolyEditor"></script>--> <script src="https://webapi.amap.com/maps?v=2.0&key=49fcb156d466062435d7d33437099582&plugin=Map3D,AMap.DistrictSearch,AMap.Scale,AMap.OverView,AMap.ToolBar,AMap.MouseTool,AMap.ControlBar,AMap.CircleEditor,AMap.PolyEditor"></script>
<script src="h5player/h5player.min.js"></script> <script src="h5player/h5player.min.js"></script>
<style> <style>
html, html,
......
...@@ -8,6 +8,15 @@ ...@@ -8,6 +8,15 @@
*/ */
import request from '@/utils/request' import request from '@/utils/request'
// 查询管道去查询
export function getPipeForSelect(query) {
return request({
url: '/pipe/pipe/getPipeForSelect',
method: 'get',
params: query
})
}
// 查询管道 // 查询管道
export function getPipe(query) { export function getPipe(query) {
return request({ return request({
......
...@@ -59,3 +59,4 @@ export function selectTEnterprise() { ...@@ -59,3 +59,4 @@ export function selectTEnterprise() {
method: 'get' method: 'get'
}) })
} }
...@@ -105,7 +105,6 @@ export default { ...@@ -105,7 +105,6 @@ export default {
this.map.mouseAddMarker(); this.map.mouseAddMarker();
} }
} else { } else {
console.log(this.pipePath)
if (this.pipePath!=null && this.pipePath.length > 0) { if (this.pipePath!=null && this.pipePath.length > 0) {
this.map.addPipeLine({ path: this.pipePath }); this.map.addPipeLine({ path: this.pipePath });
} else { } else {
......
...@@ -15,6 +15,11 @@ ...@@ -15,6 +15,11 @@
</div> </div>
<div class="group flex first"> <div class="group flex first">
<div class="first once left">管道名称:</div>
<div class="right pipeAddr right zzz">{{ deviceData.pipeName }}</div>
</div>
<div class="group flex ">
<div class="left first">管道长度:</div> <div class="left first">管道长度:</div>
<div class="right zzz">{{ deviceData.pipeLength }}</div> <div class="right zzz">{{ deviceData.pipeLength }}</div>
<div class="left">管径:</div> <div class="left">管径:</div>
......
<!--
* @Author: your name
* @Date: 2022-01-27 14:25:45
* @LastEditTime: 2022-02-28 11:35:31
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /hello-world/src/views/components/User.vue
-->
<template>
<div class="user-wrapper">
<div class="title">{{ companyType[deviceData.companyType] }}</div>
<div class="close" @click="close">
<!-- <img src="@/assets/mapImages/closeBtn.png" alt="" /> -->
<i class="el-icon-close" style="font-size:20px;color:#5dfefe;"></i>
</div>
<div class="group flex first">
<div class="first once left">管道名称:</div>
<div class="right pipeAddr right zzz">{{ deviceData.pipeName }}</div>
</div>
<div class="group flex">
<div class="left first">管道长度:</div>
<div class="right zzz">{{ deviceData.pipeLength }}</div>
<div class="left">管径:</div>
<div class="right last">{{ deviceData.pipeDiameter }}</div>
</div>
<!-- <div class="group flex">
</div> -->
<div class="group flex">
<div class="left first">管道压力:</div>
<div :title="deviceData.pipePressure" class="right zzz">
{{ deviceData.pipePressure }}
</div>
<div class="left">所属公司:</div>
<div class="right last zzz">{{ companyType[deviceData.companyType] }}</div>
</div>
<div class="group flex">
<div class="first left">管道材质:</div>
<div class="right">{{ deviceData.pipeMaterial }}</div>
<div class="left">管道埋深:</div>
<div class="right last">{{ deviceData.pipeDepth }}</div>
</div>
<div class="group flex">
<div class="left first">管道走向:</div>
<div class="right zzz" :title="deviceData.pipeTrend">{{ deviceData.pipeTrend }}</div>
<div class="left">权属单位:</div>
<div :title="deviceData.powerCompany" class="right last zzz">
{{ deviceData.powerCompany }}
</div>
</div>
<div class="group flex">
<div class="first left">建设年代:</div>
<div class="right">{{ deviceData.buildyear }}</div>
<div class="left">建设单位:</div>
<div class="last right zzz" :title="deviceData.buildCompany">{{ deviceData.buildCompany }}</div>
</div>
<div class="group flex">
<div class="first once left">管道位置:</div>
<div
v-unValue
:title="deviceData.pipeAddr"
class="last pipeAddr right zzz"
>
{{ deviceData.pipeAddr }}
</div>
</div>
<div class="group flex" v-show="isVisibleMethod">
<div class="left">详细地址:</div>
<div class="right pipeAddr last zzz">{{ deviceData.detaildAddress }}</div>
</div>
<div class="group flex" v-show="isVisibleMethod">
<div class="first left">主管部门:</div>
<div class="right zzz">{{ deviceData.indRegAuth }}</div>
<div class="left">主管负责人:</div>
<div class="right last zzz">{{ deviceData.indRegAuthPer }}</div>
</div>
<div class="group flex" v-show="isVisibleMethod">
<div class="first left">主管负责电话:</div>
<div class="right zzz">{{ deviceData.indRegAuthPerCon }}</div>
<div class="left">重点燃气使用:</div>
<div class="right last zzz">{{ deviceData.keyAreasGasUsage }}</div>
</div>
<div class="group flex" v-show="isVisibleMethod">
<div class="first left">燃气公司:</div>
<div class="right zzz">{{ deviceData.affGasCom }}</div>
<div class="left">燃气安检人:</div>
<div class="right last zzz">{{ deviceData.affGasComSecPer }}</div>
</div>
<div class="group flex" v-show="isVisibleMethod">
<div class="first left">安检人电话:</div>
<div class="right zzz">{{ deviceData.affGasComSecPerCon }}</div>
<div class="left">安检时间:</div>
<div class="right last zzz">{{ deviceData.secCheckTime }}</div>
</div>
<div class="group flex" v-show="isVisibleMethod">
<div class="first left">燃气负责人:</div>
<div class="right zzz">{{ deviceData.unitGasUserRes }}</div>
<div class="left">负责人电话:</div>
<div class="right last zzz">{{ deviceData.unitGasUserResCon }}</div>
</div>
</div>
</template>
<script>
import { companyType, pipePressure } from "@/utils/mapClass/config.js";
export default {
data() {
return {
companyType,
pipePressure,
isClose: false
};
},
computed:{
prodTest(){
return this.vueRoot.$store.state.user.systemSetting.prod_test
},
company(){
return this.vueRoot.$store.state.bigWindowCompany.company;
}
},
mounted(){
// 如果不是测试,而是真数据,就要用帧数据的东西
if(this.prodTest !="test"){
this.companyType={};
this.company.forEach(item=>{
this.companyType[item.conpanyId] = item.companyName;
})
}
},
methods: {
close() {
// 关闭前先把颜色改回来
this.mapClass.infowindowClose();
},
isVisibleMethod(){
return deviceData.pipePressure == "中压"
}
},
};
</script>
<style lang="scss" scoped>
.user-wrapper {
box-shadow: 0px 0px 10px #54e0ef inset;
background-color: #071738;
padding: 10px;
position: relative;
width: 500px;
border-radius: 7px;
.title {
font-size: 14px;
line-height: 14px;
color: #ffffff;
}
.close {
position: absolute;
right: 10px;
top: 5px;
cursor: pointer;
}
.group {
border-top: none;
height: 28px;
font-size: 14px;
line-height: 28px;
color: #ffffff;
&.first {
margin-top: 10px;
}
div {
flex: 1;
}
.left {
text-align: right;
}
.right {
box-sizing: border-box;
text-align: left;
padding: 0 1em;
}
.last {
border: none;
}
.once {
flex: 1;
}
.pipeAddr {
flex: 3;
padding: 0 3em 0 1em;
}
}
.flex {
display: flex;
justify-content: space-between;
}
}
</style>
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
--> -->
<template> <template>
<div> <div>
<!-- <div class="pipePressure"> <div class="pipePressure">
<!--
<div style="float: left;margin-right: 5px;"> <div style="float: left;margin-right: 5px;">
<div class="hasColorBox"> <div class="hasColorBox">
<img src="../../assets/image/bigtyx.svg" alt=""> <img src="../../assets/image/bigtyx.svg" alt="">
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<img src="../../assets/image/bigjk.svg" alt=""> <img src="../../assets/image/bigjk.svg" alt="">
监控 监控
</div> </div>
</div> </div> -->
<div> <div>
<div class="hasColorBox" :style="{ color: pipeColor[`1`] }"> <div class="hasColorBox" :style="{ color: pipeColor[`1`] }">
<div :style="{ backgroundColor: pipeColor[`1`] }"></div> <div :style="{ backgroundColor: pipeColor[`1`] }"></div>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
高压管线 高压管线
</div> </div>
</div> </div>
</div> --> </div>
<div class="mapChange"> <div class="mapChange">
<div :class="{ active: mapStyle }" @click="mapChange(2)">全景地图</div> <div :class="{ active: mapStyle }" @click="mapChange(2)">全景地图</div>
...@@ -85,16 +85,17 @@ export default { ...@@ -85,16 +85,17 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.pipePressure { .pipePressure {
width: 180px; width: 130px;
height: auto; height: auto;
border: 1px solid #a5a5a5; border: 1px solid #a5a5a5;
background-color: #112238b3; background-color: #112238b3;
position: fixed; position: fixed;
color: rgb(205, 219, 228); color: rgb(205, 219, 228);
left: 460px; left: 530px;
bottom: 20px; bottom: 50px;
padding: 5px; padding: 5px;
font-size: 14px; font-size: 14px;
pointer-events: none;
// background: rgba(6, 29, 51, 0.8); // background: rgba(6, 29, 51, 0.8);
.hasColorBox { .hasColorBox {
// border: 1px solid #053b6a; // border: 1px solid #053b6a;
......
<!--
* @Author: your name
* @Date: 2022-01-26 10:52:10
* @LastEditTime: 2022-02-17 10:11:35
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/components/PipeColor.vue
-->
<template>
<div>
<div class="pipePressure" :style="{ pointerEvents: dynamicPointerEvents }">
<div class="container" id="div1">
<div class="searchbar1">
<form>
<table>
<li v-for="data in newDatalist" :key="data.id" @click="goPage(data)">
{{data.pipeName}}
</li>
</table>
</form>
</div>
</div>
<div class="input-group">
<input class="input-field" type="text" v-model="inputText" placeholder="请输入管道名称...">
<button class="close" @click="handleClick">&times;</button>
</div>
</div>
</div>
</template>
<script>
import {
getPipeForSelect
} from "@/api/bigWindow/getDevice";
export default {
data(){
return{
downIcon: true,
inputText:"",
datalist:[], //原始数据
newDatalist:[],
rowsToShow: 3, // 默认显示的行数
maxRows: 6, // 最多显示的行数
dynamicPointerEvents: 'none',
}
},
created(){
this.fetchData();
},
methods: {
fetchData(){
getPipeForSelect().then((res) => {
if (res.data){
this.datalist = res.data
}
})
},
goPage:function(data){
var path = data.path.replaceAll("[[","").replaceAll("]]","").replaceAll("],["," ");
var id = data.pipeId;
let arrArea = path.split(" ")
let centerLength = null;
if (arrArea.length % 2 == 0) {
centerLength = arrArea.length / 2;
} else {
centerLength = (arrArea.length + 1) /2;
}
if (centerLength != null) {
this.$emit('transmit', arrArea[centerLength],id)
} else {
alert("数据异常")
}
},
handleClick(){
this.newDatalist=[];
this.inputText = "";
this.$emit('closeMediumPressureLine');
}
},
watch:{//监听输入框的变化
inputText:function(newText){
this.dynamicPointerEvents = newText ? 'auto' : 'none';
if(newText.length>0){
this.newDatalist.splice(0,this.newDatalist.length);//清空之前数组
for(let value of this.datalist){
if(value.pipeName.indexOf(newText)>-1){// 可以直接用indexOf(属性)
this.newDatalist.push(value);//一定要加this
}
}
}else{
this.newDatalist=[];//输入框为空,等于原始数据
}
}
},
};
</script>
<style lang="scss" scoped>
.pipePressure {
width: 210px;
height: auto;
position: fixed;
color: rgb(205, 219, 228);
left: 660px;
bottom: 50px;
padding: 5px;
}
form {
position: relative;
width: 300px;
margin: 0 auto;
}
input {
width: 100%;
height: 42px;
padding-left: 13px;
}
.pipePressure input {
border: 2px solid #7BA7AB;
border-radius: 5px;
background: #f9f0da1f;
color: #9E9C9C;
}
li{
text-align: left;
width:100%;
background: #f9f0da0c;
list-style: none;
}
.container {
height: 150px;
overflow-y: auto;
overflow-x: hidden;
display:flex;
flex-direction: column-reverse;
}
.input-group {
position: relative;
display: inline-block;
pointer-events: auto;
}
.input-field {
padding-right: 40px; /* Make space for the button */
width: 200px; /* Adjust width as needed */
}
.close {
font-size: 18px;
font-weight: bold;
color: #000;
text-shadow: 0 1px 0 #fff;
opacity: 0.5;
float: right;
margin-left: 10px;
cursor: pointer;
position: absolute;
top: 0;
right: 0;
height: 100%; /* Match height with input */
width: 40px; /* Adjust width as needed */
}
.close:hover {
opacity: 1;
}
</style>
...@@ -9,10 +9,10 @@ ...@@ -9,10 +9,10 @@
import store from "@/store"; import store from "@/store";
export const pipeColor = { export const pipeColor = {
1: "#2EE7E7", 1: "#18FF0F",
2: "#FFFFFF", 2: "#2EE7E7",
3: "#18FF0F", 3: "#DE67FA",
4: "#DE67FA", 4: "#FF0000",
// 运行监控-巡检巡查的线条颜色 // 运行监控-巡检巡查的线条颜色
5: "#1890FF", 5: "#1890FF",
}; };
......
...@@ -443,11 +443,68 @@ export class EditorMap { ...@@ -443,11 +443,68 @@ export class EditorMap {
return new AMap.Marker(MarkerOptions); return new AMap.Marker(MarkerOptions);
} }
filterSelectPipe(id,mediumComponent,lng, lat) {
this.pipeArr[6].forEach((pipe) => {
const deviceExtData = pipe.getExtData();
if (deviceExtData.pipeId === id) {
//设置颜色
const options = pipe.getOptions();
options.strokeColor = "blue";
// options.strokeWeight =4;
pipe.setOptions(options);
// 创建一个可以控制的组件,将其dom插入infowindow
this.infowindowComponent = this.createInfowindowDom(
this.vue,
this,
deviceExtData,
mediumComponent
);
this.infowindow = new AMap.InfoWindow({
isCustom: true,
content: this.infowindowComponent.$el,
position: [lng, lat],
// anchor: "top-left",
// offset: [20, -15],
anchor: "middle-left",
offset: [20, 0],
});
this.infowindow.open(this.map);
}
})
}
// 地图上add管道
addMediumPipeLine(objData, component,mediumConponent) {
const { path, pipePressure, iconType ,id} = objData;
// 根据压力获取颜色
const color = pipeColor[pipePressure];
const pipe = this.createPipeLine({
id:id,
path: eval(path),
strokeWeight: objData.strokeWeight || 4,
strokeColor: color,
extData: objData,
cursor: "pointer",
});
this.map.add(pipe);
// pipe.hide();
if (!Array.isArray(this.pipeArr[iconType])) {
this.pipeArr[iconType] = [];
}
this.pipeArr[iconType].push(pipe);
if (pipePressure == 1 ){
this.pipeEvent(pipe, mediumConponent);
} else {
this.pipeEvent(pipe, component);
}
};
// 地图上add管道 // 地图上add管道
addPipeLine(objData, component) { addPipeLine(objData, component) {
const { path, pipePressure, iconType } = objData; const { path, pipePressure, iconType } = objData;
// 根据压力获取颜色 // 根据压力获取颜色
const color = pipeColor[pipePressure + 1]; const color = pipeColor[pipePressure];
const pipe = this.createPipeLine({ const pipe = this.createPipeLine({
path: eval(path), path: eval(path),
strokeWeight: objData.strokeWeight || 4, strokeWeight: objData.strokeWeight || 4,
...@@ -480,10 +537,26 @@ export class EditorMap { ...@@ -480,10 +537,26 @@ export class EditorMap {
}); });
pipe.on("mouseout", (e) => { pipe.on("mouseout", (e) => {
if(this.infowindow) {
var infowindowOptions = this.infowindow.getOptions();
if (infowindowOptions.visible){
var pipeData = this.infowindowComponent.deviceData;
const target = e.target;
var clickPipeId = pipeData.pipeId;
const { pipeId } = target.getExtData();
if (clickPipeId === pipeId) return;
}
}
const target = e.target; const target = e.target;
// 根据管道压力获取颜色 // 根据管道压力获取颜色
const { pipePressure } = target.getExtData(); const { pipePressure } = target.getExtData();
const color = pipeColor[pipePressure + 1]; const color = pipeColor[pipePressure];
// 获取当前颜色 // 获取当前颜色
const options = target.getOptions(); const options = target.getOptions();
...@@ -541,6 +614,25 @@ export class EditorMap { ...@@ -541,6 +614,25 @@ export class EditorMap {
} }
infowindowClose() { infowindowClose() {
if (!this.infowindow) return; if (!this.infowindow) return;
//关闭的时候恢复颜色
var data = this.infowindowComponent.deviceData;
var pipePressure = data.pipePressure;
var id = data.pipeId;
const color = pipeColor[pipePressure];
this.pipeArr[6].forEach((pipe) => {
const deviceExtData = pipe.getExtData();
if (deviceExtData.pipeId === id) {
//设置颜色
const options = pipe.getOptions();
options.strokeColor = color;
// options.strokeWeight =4;
pipe.setOptions(options);
}
});
this.infowindow.close(); this.infowindow.close();
} }
// 设备以及公司过滤 // 设备以及公司过滤
......
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
:pageSize="20" :pageSize="20"
/> />
<PipeColor /> <PipeColor />
<PipeSelect @transmit="getPipeSelectMessage" @closeMediumPressureLine="clearBigWindowsSelectPipe"/>
<!-- 底部按钮 --> <!-- 底部按钮 -->
<!-- <div class="home-div"> <!-- <div class="home-div">
<img src="../../assets/firstimage/bottombk.svg" alt="" style="backdrop-filter: blur(4px);" /> <img src="../../assets/firstimage/bottombk.svg" alt="" style="backdrop-filter: blur(4px);" />
...@@ -171,7 +173,7 @@ import { ...@@ -171,7 +173,7 @@ import {
getYhq, getYhq,
deviceUser deviceUser
} from "@/api/bigWindow/getDevice"; } from "@/api/bigWindow/getDevice";
import Line from "@/components/bigWindow/Line.vue"; import Line from "@/components/bigWindow/Line.vue";
import VideoView from "@/components/bigWindow/VideoView.vue"; import VideoView from "@/components/bigWindow/VideoView.vue";
import Device from "@/components/bigWindow/Device.vue"; import Device from "@/components/bigWindow/Device.vue";
import Cz from "@/components/bigWindow/Cz.vue"; import Cz from "@/components/bigWindow/Cz.vue";
...@@ -189,6 +191,8 @@ import leftBar from "@/components/bigWindow/leftBar.vue"; ...@@ -189,6 +191,8 @@ import leftBar from "@/components/bigWindow/leftBar.vue";
import rightBar from "@/components/bigWindow/rightBar.vue"; import rightBar from "@/components/bigWindow/rightBar.vue";
import Bottom from "./components/Bottom.vue"; import Bottom from "./components/Bottom.vue";
import { mapState } from 'vuex' import { mapState } from 'vuex'
import MediumPressureLineVue from '../../components/bigWindow/MediumPressureLine.vue';
import PipeSelect from '../../components/bigWindow/PipeSelect.vue';
export default { export default {
name: "Home", name: "Home",
components: { components: {
...@@ -198,6 +202,7 @@ export default { ...@@ -198,6 +202,7 @@ export default {
UserCenter, UserCenter,
OtherCenter, OtherCenter,
PipeColor, PipeColor,
PipeSelect,
Bottom, Bottom,
}, },
data() { data() {
...@@ -322,8 +327,8 @@ export default { ...@@ -322,8 +327,8 @@ export default {
"map", "map",
{ {
center: path, center: path,
// mapStyle: "amap://styles/806fa63f07c70b043867bd1f9a600981", // mapStyle: "amap://styles/4651b4007b4adfcf5015dd154459ab46",
mapStyle: "amap://styles/4651b4007b4adfcf5015dd154459ab46", mapStyle: "amap://styles/f71d3a3d73e14f5b2bf5508bf1411758",
zoom: 12, zoom: 12,
}, },
this this
...@@ -362,7 +367,8 @@ export default { ...@@ -362,7 +367,8 @@ export default {
this.arr.forEach((item) => (item.ischeck = true)); this.arr.forEach((item) => (item.ischeck = true));
// getPipe() getTyx() getFm() getCz() getVideo() getUser() // getPipe() getTyx() getFm() getCz() getVideo() getUser()
await this.goMap(getEnterprise, this.addDevice, Company, true); await this.goMap(getEnterprise, this.addDevice, Company, true);
this.goMap(getPipe, this.addPipeLine, Line, true); // this.goMap(getPipe, this.addPipeLine, Line, true);
this.goMediumPressureLineMap(getPipe, this.addMediumPipeLine, Line,MediumPressureLineVue, true);
this.goMap(getTyx, this.addDevice, Device, false); this.goMap(getTyx, this.addDevice, Device, false);
this.goMap(getFm, this.addDevice, Device, false); this.goMap(getFm, this.addDevice, Device, false);
this.goMap(getCz, this.addDevice, Cz, false); this.goMap(getCz, this.addDevice, Cz, false);
...@@ -396,6 +402,15 @@ export default { ...@@ -396,6 +402,15 @@ export default {
windowClick(){ windowClick(){
this.$refs.Bottom.selectUpClear(); this.$refs.Bottom.selectUpClear();
}, },
// 点击了 大屏端 管道搜索的清除键
clearBigWindowsSelectPipe(){
this.map.infowindowClose();
},
getPipeSelectMessage(data,id) {
let arrArea = data.split(',');
this.map.setCenter([arrArea[0],arrArea[1]])
this.map.filterSelectPipe(id,MediumPressureLineVue,arrArea[0],arrArea[1]);
},
// 管道上图 // 管道上图
addPipeLine(data, component) { addPipeLine(data, component) {
for (let comp in data) { for (let comp in data) {
...@@ -404,6 +419,14 @@ export default { ...@@ -404,6 +419,14 @@ export default {
}); });
} }
}, },
// 管道上图
addMediumPipeLine(data, component,mediumComponent) {
for (let comp in data) {
data[comp].forEach((pipe) => {
this.map.addMediumPipeLine(pipe, component,mediumComponent);
});
}
},
// 设备上图 // 设备上图
addDevice(data, component, show) { addDevice(data, component, show) {
for (let comp in data) { for (let comp in data) {
...@@ -434,15 +457,39 @@ export default { ...@@ -434,15 +457,39 @@ export default {
}); });
} }
}, },
goMediumPressureLineMap(httpFunc, addFunc, component,mediumComponent, show){
return httpFunc().then((res) => {
// 给用户加icontype
if (res.data && !res.data[0].iconType) {
res.data.forEach((item) => {
item.iconType = 6;
});
}
// 根据数据格式不同,赋值不同,如果是个数组,就用res,如果不是就用res.data
let config = {};
if (Array.isArray(res)) {
config = { data: res };
// 给视频设备的conpanyType变成null,因为视频不受企业控制
if (res[0].iconType == 5) {
res.forEach((item) => {
item.companyType = null;
});
}
} else {
config = { data: res.data || res.rows };
}
addFunc(config, component, mediumComponent,show);
return config.iconType;
});
},
goMap(httpFunc, addFunc, component, show) { goMap(httpFunc, addFunc, component, show) {
return httpFunc().then((res) => { return httpFunc().then((res) => {
console.log("ares", res);
// 给用户加icontype // 给用户加icontype
// if (res.data && !res.data[0].iconType) { if (res.data && !res.data[0].iconType) {
// res.data.forEach((item) => { res.data.forEach((item) => {
// item.iconType = 6; item.iconType = 6;
// }); });
// } }
// 根据数据格式不同,赋值不同,如果是个数组,就用res,如果不是就用res.data // 根据数据格式不同,赋值不同,如果是个数组,就用res,如果不是就用res.data
let config = {}; let config = {};
if (Array.isArray(res)) { if (Array.isArray(res)) {
...@@ -456,7 +503,6 @@ export default { ...@@ -456,7 +503,6 @@ export default {
} else { } else {
config = { data: res.data || res.rows }; config = { data: res.data || res.rows };
} }
console.log("reresresresresresresresresress", config);
addFunc(config, component, show); addFunc(config, component, show);
return config.iconType; return config.iconType;
...@@ -549,7 +595,6 @@ export default { ...@@ -549,7 +595,6 @@ export default {
getDetectorInfoList(httpFunc, queryParams, title) { getDetectorInfoList(httpFunc, queryParams, title) {
console.log(queryParams); console.log(queryParams);
return httpFunc(queryParams).then((res) => { return httpFunc(queryParams).then((res) => {
// console.log("queryParams", res);
if (res.code == 200) { if (res.code == 200) {
this.detcetorList = res.rows; this.detcetorList = res.rows;
this.centerUserId = queryParams.userId; this.centerUserId = queryParams.userId;
...@@ -568,8 +613,6 @@ export default { ...@@ -568,8 +613,6 @@ export default {
getTcqDevice(queryParams, title) { getTcqDevice(queryParams, title) {
console.log(queryParams); console.log(queryParams);
return getTcqDevice(queryParams).then((res) => { return getTcqDevice(queryParams).then((res) => {
// console.log("queryParams", res);
console.log("resresresresreszzzzzzzzzzzzzzz", res);
this.detcetorList = res; this.detcetorList = res;
this.centerUserId = queryParams.devId; this.centerUserId = queryParams.devId;
......
...@@ -46,8 +46,8 @@ ...@@ -46,8 +46,8 @@
"map", "map",
{ {
center: path, center: path,
// mapStyle: "amap://styles/806fa63f07c70b043867bd1f9a600981", // mapStyle: "amap://styles/4651b4007b4adfcf5015dd154459ab46",
mapStyle: "amap://styles/4651b4007b4adfcf5015dd154459ab46", mapStyle: "amap://styles/f71d3a3d73e14f5b2bf5508bf1411758",
zoom: 14.5, zoom: 14.5,
}, },
this, this,
......
...@@ -26,16 +26,7 @@ ...@@ -26,16 +26,7 @@
size="small" size="small"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<!-- <el-form-item label="压力" prop="pipePressure">-->
<!-- <el-input-->
<!-- v-model="queryParams.pipePressure"-->
<!-- placeholder="请输入压力"-->
<!-- clearable-->
<!-- size="small"-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
...@@ -155,9 +146,15 @@ ...@@ -155,9 +146,15 @@
/> />
<!-- 添加或修改管道信息对话框 --> <!-- 添加或修改管道信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="180px">
<el-row>
<el-col :span="23">
<el-form-item label="管道名称" prop="pipeName">
<el-input v-model="form.pipeName" placeholder="请输入管道名称" />
</el-form-item>
</el-col>
</el-row>
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="管道长度" prop="pipeLength"> <el-form-item label="管道长度" prop="pipeLength">
...@@ -229,16 +226,7 @@ ...@@ -229,16 +226,7 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<!-- <el-col :span="11">-->
<!-- <el-form-item label="人员类型" prop="peopleOccupation">-->
<!-- <el-select v-model="form.peopleOccupation" placeholder="请选择人员类型">-->
<!-- <el-option label="运行维护人员" value="1" />-->
<!-- <el-option label="抢修人员" value="2" />-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<el-col :span="11"> <el-col :span="11">
<el-form-item label="权属单位" prop="beyondEnterpriseName"> <el-form-item label="权属单位" prop="beyondEnterpriseName">
<el-select style="width: 100%" v-model="form.beyondEnterpriseId" placeholder="请在下拉框中选择权属单位" maxlength="255" :disabled="false" clearable> <el-select style="width: 100%" v-model="form.beyondEnterpriseId" placeholder="请在下拉框中选择权属单位" maxlength="255" :disabled="false" clearable>
...@@ -260,6 +248,88 @@ ...@@ -260,6 +248,88 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row>
<el-col :span="23">
<el-form-item label="详细地址" prop="detaildAddress">
<el-input v-model="form.detaildAddress" type="textarea" placeholder="请输入详细地址" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="行业主管部门" prop="indRegAuth">
<el-input v-model="form.indRegAuth" placeholder="请输入行业主管部门" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="行业主管部门负责人" prop="indRegAuthPer">
<el-input v-model="form.indRegAuthPer" placeholder="请输入行业主管部门负责人" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="属地负责人电话" prop="indRegAuthPerCon">
<el-input v-model="form.indRegAuthPerCon" placeholder="请输入属地负责人联系电话" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="重点部位燃气具使用情况" prop="keyAreasGasUsage">
<el-input v-model="form.keyAreasGasUsage" placeholder="请输入重点部位燃气具使用情况" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="所属燃气公司" prop="affGasCom">
<el-input v-model="form.affGasCom" placeholder="请输入所属燃气公司" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="所属燃气公司安检人员" prop="affGasComSecPer">
<el-input v-model="form.affGasComSecPer" placeholder="请输入所属燃气公司安检人员" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="燃气公司安检人员电话" prop="affGasComSecPerCon">
<el-input v-model="form.affGasComSecPerCon" placeholder="请输入燃气公司安检人员联系电话" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="安检时间" prop="secCheckTime">
<el-input v-model="form.secCheckTime" placeholder="请输入安检时间" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="单位燃气用户负责人" prop="unitGasUserRes">
<el-input v-model="form.unitGasUserRes" placeholder="请输入单位燃气用户负责人" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="单位燃气用户负责人电话" prop="unitGasUserResCon">
<el-input v-model="form.unitGasUserResCon" placeholder="请输入单位燃气用户负责人电话" />
</el-form-item>
</el-col>
</el-row>
<el-row> <el-row>
<el-col :span="23"> <el-col :span="23">
<el-form-item label="备注" prop="remarks"> <el-form-item label="备注" prop="remarks">
...@@ -291,7 +361,7 @@ export default { ...@@ -291,7 +361,7 @@ export default {
pipePressure, pipePressure,
dialogVisible:false, dialogVisible:false,
//地图管径回显数据 //地图管径回显数据
coordinateslist:null, coordinateslist: null,
// 遮罩层 // 遮罩层
loading: true, loading: true,
...@@ -407,7 +477,20 @@ export default { ...@@ -407,7 +477,20 @@ export default {
updateBy: null, updateBy: null,
updateTime: null, updateTime: null,
isDel: null, isDel: null,
remarks: null remarks: null,
pipeName:null,
detaildAddress:null,
indRegAuth:null,
indRegAuthPer:null,
indRegAuthPerCon:null,
keyAreasGasUsage:null,
affGasCom:null,
affGasComSecPer:null,
affGasComSecPerCon:null,
secCheckTime:null,
unitGasUserRes:null,
unitGasUserResCon:null
}; };
this.resetForm("form"); this.resetForm("form");
}, },
...@@ -432,8 +515,9 @@ export default { ...@@ -432,8 +515,9 @@ export default {
//查询企业名称下拉框数据 //查询企业名称下拉框数据
selectTEnterprise().then(response => { selectTEnterprise().then(response => {
this.test = response.data; this.test = response.data;
}); });
this.coordinateslist+=JSON.parse(null); // this.coordinateslist+=JSON.parse(null);
this.coordinateslist = null;
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "添加管道信息"; this.title = "添加管道信息";
...@@ -449,8 +533,9 @@ export default { ...@@ -449,8 +533,9 @@ export default {
getPipe(pipeId).then(response => { getPipe(pipeId).then(response => {
this.form = response.data; this.form = response.data;
const text=this.form.coordinates const text=this.form.coordinates
console.log(text) if(text){
this.coordinateslist=JSON.parse(text); this.coordinateslist=JSON.parse(text);
}
this.open = true; this.open = true;
this.title = "修改管道信息"; this.title = "修改管道信息";
...@@ -460,6 +545,15 @@ export default { ...@@ -460,6 +545,15 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
var coordinates = this.form.coordinates;
if (coordinates) {
let isAccept = new RegExp("^\\[\\[[-+]?\\d+(\\.\\d+)?,\\s*[-+]?\\d+(\\.\\d+)?\\](?:,\\s*\\[\\s*[-+]?\\d+(\\.\\d+)?,\\s*[-+]?\\d+(\\.\\d+)?\\s*\\])*\\]$").test(coordinates)
if (!isAccept) {
this.msgError("坐标数据异常");
return;
}
}
if (this.form.pipeId != null) { if (this.form.pipeId != null) {
updatePipe(this.form).then(response => { updatePipe(this.form).then(response => {
this.msgSuccess("修改成功"); this.msgSuccess("修改成功");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment