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

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

2 调整管道信息,新增行业主管,单位燃气等信息,并在地图上根据中压,高压按照不同颜色展示 功能完成。
3 在首页实现管道检索功能,并能实现点击检索列表某一项 实现地图管道定位,高亮,并打开 管道信息界面。
parent e5cab16a
......@@ -28,6 +28,26 @@ public class PipeInterfaceController extends BaseController {
@Autowired
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
//根据企业id查询企业名称
String EnterpriseName = tEmployedPeopleInfoService.selectEnterpriseName(tPipeInfo.getBeyondEnterpriseId());
tPipeInfo.setBeyondEnterpriseName(EnterpriseName);
//
return toAjax(tPipeInfoService.insertTPipeInfo(tPipeInfo));
}
......
......@@ -44,6 +44,66 @@ public class PipeDate extends BaseEntity {
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() {
return pipeId;
......@@ -205,6 +265,102 @@ public class PipeDate extends BaseEntity {
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
public String toString() {
return "PipeDate{" +
......
......@@ -71,6 +71,66 @@ public class TPipeInfo extends BaseEntity
/** 是否删除(0正常,1删除) */
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 = "备注")
private String remarks;
......@@ -218,6 +278,102 @@ public class TPipeInfo extends BaseEntity
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
public String toString() {
return "TPipeInfo{" +
......
......@@ -18,6 +18,13 @@ public interface PipeInterfaceMapper {
*/
List<PipeDate> selectPipeData(String enterId);
/**
* 按照名称查询管道数据列表
* @return
*/
List<PipeDate> getPipeForSelect(String enterId);
/**
* 获取分组数据
* @return
......
......@@ -15,6 +15,12 @@ public interface IPipeInterfaceService {
*/
List<PipeDate> selectPipeData(String enterId);
/**
* 查询管道数据列表 名称不为空
* @return
*/
List<PipeDate> getPipeForSelect(String enterId);
/**
* 获取分组数据
* @return
......
......@@ -26,6 +26,16 @@ public class PipeInterfaceServiceImpl implements IPipeInterfaceService {
return pipeDates;
}
/**
* 查询管道数据列表 名称不为空
* @return
*/
@Override
public List<PipeDate> getPipeForSelect(String enterId) {
List<PipeDate> pipeDates = pipeInterfaceMapper.getPipeForSelect(enterId);
return pipeDates;
}
/**
* 获取分组数据
* @return
......
......@@ -43,6 +43,7 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
@Override
public List<TDetectorUserVO> detectorUserList(TDetectorUser tDetectorUser)
{
long startTime = System.currentTimeMillis();
List<TDetectorUserVO> list = new ArrayList<>();
List<TDetectorUserVO> tDetectorUserList = tDetectorUserMapper.countTDetectorUser(tDetectorUser);
......@@ -66,6 +67,8 @@ public class TDetectorUserServiceImpl implements ITDetectorUserService
}
}
long end = System.currentTimeMillis();
System.out.println("detectorUserList = " + (end - startTime));
return list;
}
......
......@@ -19,6 +19,19 @@
<result property="companyType" column="beyond_enterprise_id" />
<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>
<!--调压箱-->
......@@ -110,6 +123,18 @@
</if>
</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 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"
<result property="updateTime" column="update_time" />
<result property="isDel" column="is_del" />
<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>
<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>
<select id="selectTPipeInfoList" parameterType="TPipeInfo" resultMap="TPipeInfoResult">
......@@ -48,6 +61,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="coordinates != null and coordinates != ''"> and coordinates = #{coordinates}</if>
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</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>
order by pipe_id desc
</select>
......@@ -78,6 +104,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time,</if>
<if test="isDel != null">is_del,</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 prefix="values (" suffix=")" suffixOverrides=",">
<if test="pipeLength != null">#{pipeLength},</if>
......@@ -98,6 +137,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">#{updateTime},</if>
<if test="isDel != null">#{isDel},</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>
</insert>
......@@ -122,6 +174,19 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="isDel != null">is_del = #{isDel},</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>
where pipe_id = #{pipeId}
</update>
......
......@@ -13,9 +13,8 @@
securityJsCode:'d4bb6c4d7a074701457bc9721eb7754a',
}
</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=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="h5player/h5player.min.js"></script>
<style>
html,
......
......@@ -8,6 +8,15 @@
*/
import request from '@/utils/request'
// 查询管道去查询
export function getPipeForSelect(query) {
return request({
url: '/pipe/pipe/getPipeForSelect',
method: 'get',
params: query
})
}
// 查询管道
export function getPipe(query) {
return request({
......
......@@ -59,3 +59,4 @@ export function selectTEnterprise() {
method: 'get'
})
}
......@@ -105,7 +105,6 @@ export default {
this.map.mouseAddMarker();
}
} else {
console.log(this.pipePath)
if (this.pipePath!=null && this.pipePath.length > 0) {
this.map.addPipeLine({ path: this.pipePath });
} else {
......
......@@ -15,6 +15,11 @@
</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>
......
......@@ -8,8 +8,8 @@
-->
<template>
<div>
<!-- <div class="pipePressure">
<div class="pipePressure">
<!--
<div style="float: left;margin-right: 5px;">
<div class="hasColorBox">
<img src="../../assets/image/bigtyx.svg" alt="">
......@@ -31,7 +31,7 @@
<img src="../../assets/image/bigjk.svg" alt="">
监控
</div>
</div>
</div> -->
<div>
<div class="hasColorBox" :style="{ color: pipeColor[`1`] }">
<div :style="{ backgroundColor: pipeColor[`1`] }"></div>
......@@ -50,7 +50,7 @@
高压管线
</div>
</div>
</div> -->
</div>
<div class="mapChange">
<div :class="{ active: mapStyle }" @click="mapChange(2)">全景地图</div>
......@@ -85,16 +85,17 @@ export default {
<style lang="scss" scoped>
.pipePressure {
width: 180px;
width: 130px;
height: auto;
border: 1px solid #a5a5a5;
background-color: #112238b3;
position: fixed;
color: rgb(205, 219, 228);
left: 460px;
bottom: 20px;
left: 530px;
bottom: 50px;
padding: 5px;
font-size: 14px;
pointer-events: none;
// background: rgba(6, 29, 51, 0.8);
.hasColorBox {
// border: 1px solid #053b6a;
......
......@@ -9,10 +9,10 @@
import store from "@/store";
export const pipeColor = {
1: "#2EE7E7",
2: "#FFFFFF",
3: "#18FF0F",
4: "#DE67FA",
1: "#18FF0F",
2: "#2EE7E7",
3: "#DE67FA",
4: "#FF0000",
// 运行监控-巡检巡查的线条颜色
5: "#1890FF",
};
......
......@@ -443,11 +443,68 @@ export class EditorMap {
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管道
addPipeLine(objData, component) {
const { path, pipePressure, iconType } = objData;
// 根据压力获取颜色
const color = pipeColor[pipePressure + 1];
const color = pipeColor[pipePressure];
const pipe = this.createPipeLine({
path: eval(path),
strokeWeight: objData.strokeWeight || 4,
......@@ -480,10 +537,26 @@ export class EditorMap {
});
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 { pipePressure } = target.getExtData();
const color = pipeColor[pipePressure + 1];
const color = pipeColor[pipePressure];
// 获取当前颜色
const options = target.getOptions();
......@@ -541,6 +614,25 @@ export class EditorMap {
}
infowindowClose() {
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();
}
// 设备以及公司过滤
......
......@@ -30,6 +30,8 @@
:pageSize="20"
/>
<PipeColor />
<PipeSelect @transmit="getPipeSelectMessage" @closeMediumPressureLine="clearBigWindowsSelectPipe"/>
<!-- 底部按钮 -->
<!-- <div class="home-div">
<img src="../../assets/firstimage/bottombk.svg" alt="" style="backdrop-filter: blur(4px);" />
......@@ -171,7 +173,7 @@ import {
getYhq,
deviceUser
} 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 Device from "@/components/bigWindow/Device.vue";
import Cz from "@/components/bigWindow/Cz.vue";
......@@ -189,6 +191,8 @@ import leftBar from "@/components/bigWindow/leftBar.vue";
import rightBar from "@/components/bigWindow/rightBar.vue";
import Bottom from "./components/Bottom.vue";
import { mapState } from 'vuex'
import MediumPressureLineVue from '../../components/bigWindow/MediumPressureLine.vue';
import PipeSelect from '../../components/bigWindow/PipeSelect.vue';
export default {
name: "Home",
components: {
......@@ -198,6 +202,7 @@ export default {
UserCenter,
OtherCenter,
PipeColor,
PipeSelect,
Bottom,
},
data() {
......@@ -322,8 +327,8 @@ export default {
"map",
{
center: path,
// mapStyle: "amap://styles/806fa63f07c70b043867bd1f9a600981",
mapStyle: "amap://styles/4651b4007b4adfcf5015dd154459ab46",
// mapStyle: "amap://styles/4651b4007b4adfcf5015dd154459ab46",
mapStyle: "amap://styles/f71d3a3d73e14f5b2bf5508bf1411758",
zoom: 12,
},
this
......@@ -362,7 +367,8 @@ export default {
this.arr.forEach((item) => (item.ischeck = true));
// getPipe() getTyx() getFm() getCz() getVideo() getUser()
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(getFm, this.addDevice, Device, false);
this.goMap(getCz, this.addDevice, Cz, false);
......@@ -396,6 +402,15 @@ export default {
windowClick(){
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) {
for (let comp in data) {
......@@ -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) {
for (let comp in data) {
......@@ -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) {
return httpFunc().then((res) => {
console.log("ares", res);
// 给用户加icontype
// if (res.data && !res.data[0].iconType) {
// res.data.forEach((item) => {
// item.iconType = 6;
// });
// }
if (res.data && !res.data[0].iconType) {
res.data.forEach((item) => {
item.iconType = 6;
});
}
// 根据数据格式不同,赋值不同,如果是个数组,就用res,如果不是就用res.data
let config = {};
if (Array.isArray(res)) {
......@@ -456,7 +503,6 @@ export default {
} else {
config = { data: res.data || res.rows };
}
console.log("reresresresresresresresresress", config);
addFunc(config, component, show);
return config.iconType;
......@@ -549,7 +595,6 @@ export default {
getDetectorInfoList(httpFunc, queryParams, title) {
console.log(queryParams);
return httpFunc(queryParams).then((res) => {
// console.log("queryParams", res);
if (res.code == 200) {
this.detcetorList = res.rows;
this.centerUserId = queryParams.userId;
......@@ -568,8 +613,6 @@ export default {
getTcqDevice(queryParams, title) {
console.log(queryParams);
return getTcqDevice(queryParams).then((res) => {
// console.log("queryParams", res);
console.log("resresresresreszzzzzzzzzzzzzzz", res);
this.detcetorList = res;
this.centerUserId = queryParams.devId;
......
......@@ -46,8 +46,8 @@
"map",
{
center: path,
// mapStyle: "amap://styles/806fa63f07c70b043867bd1f9a600981",
mapStyle: "amap://styles/4651b4007b4adfcf5015dd154459ab46",
// mapStyle: "amap://styles/4651b4007b4adfcf5015dd154459ab46",
mapStyle: "amap://styles/f71d3a3d73e14f5b2bf5508bf1411758",
zoom: 14.5,
},
this,
......
......@@ -26,16 +26,7 @@
size="small"
@keyup.enter.native="handleQuery"
/>
</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>
......@@ -155,9 +146,15 @@
/>
<!-- 添加或修改管道信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
<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-col :span="11">
<el-form-item label="管道长度" prop="pipeLength">
......@@ -229,16 +226,7 @@
</el-col>
</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-row>
<el-col :span="11">
<el-form-item label="权属单位" prop="beyondEnterpriseName">
<el-select style="width: 100%" v-model="form.beyondEnterpriseId" placeholder="请在下拉框中选择权属单位" maxlength="255" :disabled="false" clearable>
......@@ -260,6 +248,88 @@
</el-col>
</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-col :span="23">
<el-form-item label="备注" prop="remarks">
......@@ -291,7 +361,7 @@ export default {
pipePressure,
dialogVisible:false,
//地图管径回显数据
coordinateslist:null,
coordinateslist: null,
// 遮罩层
loading: true,
......@@ -407,7 +477,20 @@ export default {
updateBy: null,
updateTime: 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");
},
......@@ -449,8 +532,9 @@ export default {
getPipe(pipeId).then(response => {
this.form = response.data;
const text=this.form.coordinates
console.log(text)
this.coordinateslist=JSON.parse(text);
if(text){
this.coordinateslist=JSON.parse(text);
}
this.open = true;
this.title = "修改管道信息";
......@@ -460,6 +544,15 @@ export default {
submitForm() {
this.$refs["form"].validate(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) {
updatePipe(this.form).then(response => {
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