Commit 6c2f88d0 authored by 军师中郎将's avatar 军师中郎将

1 大屏端 调压箱,阀门井,场站,监控,餐饮单位液化气用户 上图都用 LabelsLayer 实现,并且推动时隐藏,停止拖动时显示。

parent 504ad95f
......@@ -83,6 +83,16 @@ public class TDeviceUser extends BaseEntity
private String alarmTime;
private String iconType;
public String getIconType() {
return iconType;
}
public void setIconType(String iconType) {
this.iconType = iconType;
}
public String getAlarmTime() {
return alarmTime;
}
......
......@@ -23,6 +23,7 @@ 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="iconType" column="iconType" />
</resultMap>
<sql id="selectTDeviceUserVo">
......@@ -60,7 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="allListbyTownship" resultMap="TDeviceUserResult" >
SELECT * FROM t_device_user WHERE township IS NOT NULL GROUP BY township
SELECT *,"18" as iconType FROM t_device_user WHERE township IS NOT NULL GROUP BY township
</select>
<insert id="insertTDeviceUser" parameterType="TDeviceUser" useGeneratedKeys="true" keyProperty="userId">
insert into t_device_user
......
......@@ -368,17 +368,21 @@ export default {
// getPipe() getTyx() getFm() getCz() getVideo() getUser()
await this.goMap(getEnterprise, this.addDevice, Company, 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);
this.goMap(getVideo, this.addDevice, VideoView, false);
//调压箱
this.labelsLayerMarksTysGoMap(getTyx, Device, false);
//阀门井
this.labelsLayerMarksFmjGoMap(getFm, Device, false);
//场站
this.labelsLayerMarksCzGoMap(getCz,Cz, false);
//监控
this.labelsLayerMarksVideoGoMap(getVideo,VideoView, false);
//this.goMap(getYhq, this.addDevice2, yhqUser, false); //液化气用户上图
if (this.enterpriseId==-2){
this.goMap(deviceUser, this.addDevice2, yhqUser, false); //用户上图
this.labelsLayerMarksDeviceUserGoMap(deviceUser, yhqUser, false); //用户上图
}
// 用户要等一下 因为有报警数据
this.labelsLayerMarksDetectorUserGoMap(labelsLayerMarksDetectorUserList,User, false).then((res) => {
// 先查一下,然后开启定时器
......@@ -483,6 +487,41 @@ export default {
});
},
labelsLayerMarksDeviceUserGoMap(httpFunc,component,show){
return httpFunc().then((res) => {
const mapData = res.data;
this.map.labelsLayerMarksDeviceUserGoMap(mapData, component, show);
})
}
,
labelsLayerMarksVideoGoMap(httpFunc,component,show){
return httpFunc().then((res) => {
const mapData = res.data;
this.map.labelsLayerMarksVideoGoMap(mapData, component, show);
})
}
,
labelsLayerMarksCzGoMap(httpFunc,component,show){
return httpFunc().then((res) => {
const mapData = res.data;
this.map.labelsLayerMarksCzGoMap(mapData, component, show);
})
}
,
labelsLayerMarksFmjGoMap(httpFunc,component,show){
return httpFunc().then((res) => {
const mapData = res.data;
this.map.labelsLayerMarksFmjGoMap(mapData, component, show);
})
}
,
labelsLayerMarksTysGoMap(httpFunc,component,show){
return httpFunc().then((res) => {
const mapData = res.data;
this.map.labelsLayerMarksTysGoMap(mapData, component, show);
})
}
,
labelsLayerMarksDetectorUserGoMap(httpFunc, component, show) {
return httpFunc().then((res) => {
const mapData = res.data;
......@@ -491,12 +530,6 @@ export default {
},
goMap(httpFunc, addFunc, component, 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)) {
......
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