Commit e9cdf457 authored by zhangjianqian's avatar zhangjianqian

应急设备基本信息展示

parent 1fd71101
...@@ -9,7 +9,7 @@ import com.zehong.common.core.domain.BaseEntity; ...@@ -9,7 +9,7 @@ import com.zehong.common.core.domain.BaseEntity;
* 应急设备对象 t_emergency_device * 应急设备对象 t_emergency_device
* *
* @author zehong * @author zehong
* @date 2022-03-17 * @date 2022-03-21
*/ */
public class TEmergencyDevice extends BaseEntity public class TEmergencyDevice extends BaseEntity
{ {
...@@ -34,11 +34,24 @@ public class TEmergencyDevice extends BaseEntity ...@@ -34,11 +34,24 @@ public class TEmergencyDevice extends BaseEntity
@Excel(name = "纬度") @Excel(name = "纬度")
private String latitude; private String latitude;
/** 联系人 */
@Excel(name = "联系人")
private String contacts;
/** 联系电话 */
@Excel(name = "联系电话")
private String phone;
/** 详细地址 */ /** 详细地址 */
@Excel(name = "详细地址") @Excel(name = "详细地址")
private String address; private String address;
/** 简介 */
@Excel(name = "简介")
private String introduce;
/** 0未删除 1已删除 */ /** 0未删除 1已删除 */
@Excel(name = "0未删除 1已删除")
private Integer isDel; private Integer isDel;
public void setId(String id) public void setId(String id)
...@@ -86,6 +99,24 @@ public class TEmergencyDevice extends BaseEntity ...@@ -86,6 +99,24 @@ public class TEmergencyDevice extends BaseEntity
{ {
return latitude; return latitude;
} }
public void setContacts(String contacts)
{
this.contacts = contacts;
}
public String getContacts()
{
return contacts;
}
public void setPhone(String phone)
{
this.phone = phone;
}
public String getPhone()
{
return phone;
}
public void setAddress(String address) public void setAddress(String address)
{ {
this.address = address; this.address = address;
...@@ -95,6 +126,15 @@ public class TEmergencyDevice extends BaseEntity ...@@ -95,6 +126,15 @@ public class TEmergencyDevice extends BaseEntity
{ {
return address; return address;
} }
public void setIntroduce(String introduce)
{
this.introduce = introduce;
}
public String getIntroduce()
{
return introduce;
}
public void setIsDel(Integer isDel) public void setIsDel(Integer isDel)
{ {
this.isDel = isDel; this.isDel = isDel;
...@@ -113,7 +153,10 @@ public class TEmergencyDevice extends BaseEntity ...@@ -113,7 +153,10 @@ public class TEmergencyDevice extends BaseEntity
.append("deviceName", getDeviceName()) .append("deviceName", getDeviceName())
.append("longitude", getLongitude()) .append("longitude", getLongitude())
.append("latitude", getLatitude()) .append("latitude", getLatitude())
.append("contacts", getContacts())
.append("phone", getPhone())
.append("address", getAddress()) .append("address", getAddress())
.append("introduce", getIntroduce())
.append("createTime", getCreateTime()) .append("createTime", getCreateTime())
.append("updateTime", getUpdateTime()) .append("updateTime", getUpdateTime())
.append("isDel", getIsDel()) .append("isDel", getIsDel())
......
...@@ -10,14 +10,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -10,14 +10,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="deviceName" column="device_name" /> <result property="deviceName" column="device_name" />
<result property="longitude" column="longitude" /> <result property="longitude" column="longitude" />
<result property="latitude" column="latitude" /> <result property="latitude" column="latitude" />
<result property="contacts" column="contacts" />
<result property="phone" column="phone" />
<result property="address" column="address" /> <result property="address" column="address" />
<result property="introduce" column="introduce" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" /> <result property="updateTime" column="update_time" />
<result property="isDel" column="is_del" /> <result property="isDel" column="is_del" />
</resultMap> </resultMap>
<sql id="selectTEmergencyDeviceVo"> <sql id="selectTEmergencyDeviceVo">
select id, device_type, device_name, longitude, latitude, address, create_time, update_time, is_del from t_emergency_device select id, device_type, device_name, longitude, latitude, contacts, phone, address, introduce, create_time, update_time, is_del from t_emergency_device
</sql> </sql>
<select id="selectTEmergencyDeviceList" parameterType="TEmergencyDevice" resultMap="TEmergencyDeviceResult"> <select id="selectTEmergencyDeviceList" parameterType="TEmergencyDevice" resultMap="TEmergencyDeviceResult">
...@@ -44,7 +47,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -44,7 +47,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deviceName != null">device_name,</if> <if test="deviceName != null">device_name,</if>
<if test="longitude != null">longitude,</if> <if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if> <if test="latitude != null">latitude,</if>
<if test="contacts != null">contacts,</if>
<if test="phone != null">phone,</if>
<if test="address != null">address,</if> <if test="address != null">address,</if>
<if test="introduce != null">introduce,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
<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>
...@@ -55,7 +61,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -55,7 +61,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deviceName != null">#{deviceName},</if> <if test="deviceName != null">#{deviceName},</if>
<if test="longitude != null">#{longitude},</if> <if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if> <if test="latitude != null">#{latitude},</if>
<if test="contacts != null">#{contacts},</if>
<if test="phone != null">#{phone},</if>
<if test="address != null">#{address},</if> <if test="address != null">#{address},</if>
<if test="introduce != null">#{introduce},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if> <if test="updateTime != null">#{updateTime},</if>
<if test="isDel != null">#{isDel},</if> <if test="isDel != null">#{isDel},</if>
...@@ -69,7 +78,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -69,7 +78,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deviceName != null">device_name = #{deviceName},</if> <if test="deviceName != null">device_name = #{deviceName},</if>
<if test="longitude != null">longitude = #{longitude},</if> <if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if> <if test="latitude != null">latitude = #{latitude},</if>
<if test="contacts != null">contacts = #{contacts},</if>
<if test="phone != null">phone = #{phone},</if>
<if test="address != null">address = #{address},</if> <if test="address != null">address = #{address},</if>
<if test="introduce != null">introduce = #{introduce},</if>
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>
<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>
......
<!--
* @Author: your name
* @Date: 2022-01-26 20:07:52
* @LastEditTime: 2022-03-08 16:16:39
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/views/components/deviceA.vue
-->
<template>
<div class="devicea-wrapper">
<div class="title">
{{deviceData.deviceName}}
</div>
<div class="close" @click="close">
<img src="@/assets/mapImages/closeBtn.png" alt="" />
</div>
<div class="top flex">
</div>
<div class="middle">
<div class="left">
<div>联系人:</div>
</div>
<div v-unValue title="123" class="right">
{{ deviceData.contacts }}
</div>
</div>
<div class="middle">
<div class="left">
<div>联系电话:</div>
</div>
<div v-unValue title="123" class="right">
{{ deviceData.phone }}
</div>
</div>
<div class="middle">
<div class="left">
<div>设施地址:</div>
</div>
<div v-unValue title="123" class="right">
{{ deviceData.address }}
</div>
</div>
<div class="middle">
<div class="left">
<div>简介:</div>
</div>
<div v-unValue title="123" class="right">
{{ deviceData.introduce }}
</div>
</div>
</div>
</template>
<script>
import { companyType, deviceType } from "@/utils/mapClass/config.js";
export default {
data() {
return {
companyType,
deviceType,
profile: "暂无备注",
};
},
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;
});
}
console.log(this.deviceData);
},
methods: {
close() {
this.mapClass.infowindowClose();
},
btnClick() {
// this.vueRoot.centerDataFunc(this.deviceData.pressureFlows);
},
},
};
</script>
<style lang="scss" scoped>
.devicea-wrapper {
background-color: rgba(9, 18, 32, 0.6);
padding: 10px;
position: relative;
width: 500px;
.title {
// padding-top: 10px;
// padding-left: 10px;
font-size: 14px;
line-height: 14px;
color: #ffffff;
}
.close {
position: absolute;
right: 10px;
top: 5px;
cursor: pointer;
}
.top {
margin-top: 10px;
// margin-bottom: 10px;
border: 1px solid #cccccc;
box-sizing: border-box;
.group {
height: 30px;
flex: 1;
display: flex;
justify-content: space-between;
box-sizing: border-box;
div {
flex: 1;
box-sizing: border-box;
border-right: 1px solid #cccccc;
text-align: center;
font-size: 14px;
color: #ffffff;
line-height: 30px;
padding: 0 5px;
&.last {
border-right: none;
}
}
.left {
text-align: right;
background-color: rgba(255, 255, 255, 0.1);
}
}
}
.middle {
display: flex;
border: 1px solid #cccccc;
border-top: none;
& > div {
box-sizing: border-box;
border-right: 1px solid #cccccc;
text-align: center;
font-size: 14px;
color: #ffffff;
line-height: 30px;
padding: 0 5px;
&.left {
width: 113px;
display: flex;
align-items: center;
background-color: rgba(255, 255, 255, 0.1);
div {
text-align: right;
flex: 1;
}
}
&.right {
border: none;
flex: 1;
text-align: left;
text-indent: 2em;
line-height: normal;
padding: 5px;
}
}
}
.foot {
width: 100%;
padding: 5px;
border: 1px solid #ffffff;
box-sizing: border-box;
font-size: 14px;
color: #ffffff;
text-indent: 2em;
margin-bottom: 10px;
}
.flex {
display: flex;
justify-content: space-between;
}
}
</style>
...@@ -311,12 +311,9 @@ export class EditorMap { ...@@ -311,12 +311,9 @@ export class EditorMap {
this.allDevice[iconType] = []; this.allDevice[iconType] = [];
} }
this.allDevice[iconType].push(device); this.allDevice[iconType].push(device);
this.deviceEvent(device, compontent);
// 设备的事件函数 // 设备的事件函数
if(iconType<10){
this.deviceEvent(device, compontent); this.deviceEvent(device, compontent);
} }
}
deviceEvent(device, compontent) { deviceEvent(device, compontent) {
device.on("click", (e) => { device.on("click", (e) => {
const target = e.target; const target = e.target;
......
...@@ -238,6 +238,7 @@ import Company from "@/components/bigWindow/Company.vue"; ...@@ -238,6 +238,7 @@ import Company from "@/components/bigWindow/Company.vue";
import PipeColor from "@/components/emergency/PipeColor.vue"; import PipeColor from "@/components/emergency/PipeColor.vue";
import GetPos from '@/components/GetPos'; import GetPos from '@/components/GetPos';
import rightBar from "@/components/emergency/rightBar.vue"; import rightBar from "@/components/emergency/rightBar.vue";
import deviceMaterial from "@/components/emergency/deviceMaterial.vue";
export default { export default {
name: "Home", name: "Home",
components: { components: {
...@@ -247,6 +248,8 @@ export default { ...@@ -247,6 +248,8 @@ export default {
UserCenter, UserCenter,
OtherCenter, OtherCenter,
PipeColor, PipeColor,
deviceMaterial,
}, },
data() { data() {
return { return {
...@@ -489,7 +492,7 @@ export default { ...@@ -489,7 +492,7 @@ export default {
}); });
this.deviceList = response.rows; this.deviceList = response.rows;
//console.log(this.deviceList) //console.log(this.deviceList)
this.addDevice({"data":this.deviceList},null) this.addDevice({"data":this.deviceList},deviceMaterial)
this.arr2.forEach((item) => (item.ischeck = true)); this.arr2.forEach((item) => (item.ischeck = true));
}); });
}, },
...@@ -594,7 +597,7 @@ export default { ...@@ -594,7 +597,7 @@ export default {
}, },
// 设备上图 // 设备上图
addDevice(data, component) { addDevice(data, component) {
console.log(data,data) //console.log(data,data)
for (let comp in data) { for (let comp in data) {
data[comp].forEach((pipe) => { data[comp].forEach((pipe) => {
this.map.addDevice(pipe, component); this.map.addDevice(pipe, component);
......
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