Commit e9cdf457 authored by zhangjianqian's avatar zhangjianqian

应急设备基本信息展示

parent 1fd71101
......@@ -7,9 +7,9 @@ import com.zehong.common.core.domain.BaseEntity;
/**
* 应急设备对象 t_emergency_device
*
*
* @author zehong
* @date 2022-03-17
* @date 2022-03-21
*/
public class TEmergencyDevice extends BaseEntity
{
......@@ -34,73 +34,113 @@ public class TEmergencyDevice extends BaseEntity
@Excel(name = "纬度")
private String latitude;
/** 联系人 */
@Excel(name = "联系人")
private String contacts;
/** 联系电话 */
@Excel(name = "联系电话")
private String phone;
/** 详细地址 */
@Excel(name = "详细地址")
private String address;
/** 简介 */
@Excel(name = "简介")
private String introduce;
/** 0未删除 1已删除 */
@Excel(name = "0未删除 1已删除")
private Integer isDel;
public void setId(String id)
public void setId(String id)
{
this.id = id;
}
public String getId()
public String getId()
{
return id;
}
public void setDeviceType(Integer deviceType)
public void setDeviceType(Integer deviceType)
{
this.deviceType = deviceType;
}
public Integer getDeviceType()
public Integer getDeviceType()
{
return deviceType;
}
public void setDeviceName(String deviceName)
public void setDeviceName(String deviceName)
{
this.deviceName = deviceName;
}
public String getDeviceName()
public String getDeviceName()
{
return deviceName;
}
public void setLongitude(String longitude)
public void setLongitude(String longitude)
{
this.longitude = longitude;
}
public String getLongitude()
public String getLongitude()
{
return longitude;
}
public void setLatitude(String latitude)
public void setLatitude(String latitude)
{
this.latitude = latitude;
}
public String getLatitude()
public String getLatitude()
{
return latitude;
}
public void setAddress(String address)
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)
{
this.address = address;
}
public String getAddress()
public String getAddress()
{
return address;
}
public void setIsDel(Integer isDel)
public void setIntroduce(String introduce)
{
this.introduce = introduce;
}
public String getIntroduce()
{
return introduce;
}
public void setIsDel(Integer isDel)
{
this.isDel = isDel;
}
public Integer getIsDel()
public Integer getIsDel()
{
return isDel;
}
......@@ -108,15 +148,18 @@ public class TEmergencyDevice extends BaseEntity
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("deviceType", getDeviceType())
.append("deviceName", getDeviceName())
.append("longitude", getLongitude())
.append("latitude", getLatitude())
.append("address", getAddress())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.append("isDel", getIsDel())
.toString();
.append("id", getId())
.append("deviceType", getDeviceType())
.append("deviceName", getDeviceName())
.append("longitude", getLongitude())
.append("latitude", getLatitude())
.append("contacts", getContacts())
.append("phone", getPhone())
.append("address", getAddress())
.append("introduce", getIntroduce())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.append("isDel", getIsDel())
.toString();
}
}
......@@ -10,14 +10,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="deviceName" column="device_name" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="contacts" column="contacts" />
<result property="phone" column="phone" />
<result property="address" column="address" />
<result property="introduce" column="introduce" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="isDel" column="is_del" />
</resultMap>
<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>
<select id="selectTEmergencyDeviceList" parameterType="TEmergencyDevice" resultMap="TEmergencyDeviceResult">
......@@ -44,22 +47,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deviceName != null">device_name,</if>
<if test="longitude != null">longitude,</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="introduce != null">introduce,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="isDel != null">is_del,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="deviceType != null">#{deviceType},</if>
<if test="deviceName != null">#{deviceName},</if>
<if test="longitude != null">#{longitude},</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="introduce != null">#{introduce},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="isDel != null">#{isDel},</if>
</trim>
</trim>
</insert>
<update id="updateTEmergencyDevice" parameterType="TEmergencyDevice">
......@@ -69,7 +78,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="deviceName != null">device_name = #{deviceName},</if>
<if test="longitude != null">longitude = #{longitude},</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="introduce != null">introduce = #{introduce},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</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,11 +311,8 @@ export class EditorMap {
this.allDevice[iconType] = [];
}
this.allDevice[iconType].push(device);
this.deviceEvent(device, compontent);
// 设备的事件函数
if(iconType<10){
this.deviceEvent(device, compontent);
}
this.deviceEvent(device, compontent);
}
deviceEvent(device, compontent) {
device.on("click", (e) => {
......
......@@ -238,6 +238,7 @@ import Company from "@/components/bigWindow/Company.vue";
import PipeColor from "@/components/emergency/PipeColor.vue";
import GetPos from '@/components/GetPos';
import rightBar from "@/components/emergency/rightBar.vue";
import deviceMaterial from "@/components/emergency/deviceMaterial.vue";
export default {
name: "Home",
components: {
......@@ -247,6 +248,8 @@ export default {
UserCenter,
OtherCenter,
PipeColor,
deviceMaterial,
},
data() {
return {
......@@ -489,7 +492,7 @@ export default {
});
this.deviceList = response.rows;
//console.log(this.deviceList)
this.addDevice({"data":this.deviceList},null)
this.addDevice({"data":this.deviceList},deviceMaterial)
this.arr2.forEach((item) => (item.ischeck = true));
});
},
......@@ -594,7 +597,7 @@ export default {
},
// 设备上图
addDevice(data, component) {
console.log(data,data)
//console.log(data,data)
for (let comp in data) {
data[comp].forEach((pipe) => {
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