Commit 7ffd74ee authored by 军师中郎将's avatar 军师中郎将

1 管道信息-新增修改时 坐标 数据增加格式校验。

2 调整管道信息,新增行业主管,单位燃气等信息,并在地图上根据中压,高压按照不同颜色展示 功能完成。
3 在首页实现管道检索功能,并能实现点击检索列表某一项 实现地图管道定位,高亮,并打开 管道信息界面。
parent e5cab16a
...@@ -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>
......
...@@ -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;
......
...@@ -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");
}, },
...@@ -449,8 +532,9 @@ export default { ...@@ -449,8 +532,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 +544,15 @@ export default { ...@@ -460,6 +544,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