Commit c1e217d4 authored by yaqizhang's avatar yaqizhang

冲突

parents c855c2c3 85929e34
package com.zehong.web.controller.supervise;
import java.io.File;
import java.text.ParseException;
import java.util.List;
import com.zehong.common.config.GassafetyProgressConfig;
import com.zehong.common.core.domain.entity.SysUser;
import com.zehong.common.utils.SecurityUtils;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -77,8 +79,7 @@ public class TProjectInfoController extends BaseController
@PreAuthorize("@ss.hasPermi('project:info:add')")
@Log(title = "工程项目信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TProjectInfo tProjectInfo)
{
public AjaxResult add(@RequestBody TProjectInfo tProjectInfo) throws ParseException {
//查询是否已经有重复的年份数据
List<TProjectInfo> tProjectInfos = tProjectInfoService.selectSameYear(tProjectInfo.getProjectYear());
//说明有重复的年份 将重复的年份删除
......@@ -86,6 +87,10 @@ public class TProjectInfoController extends BaseController
//重复年份删除方法
tProjectInfoService.deleteisSameYear(tProjectInfo.getProjectYear());
}
SysUser user = SecurityUtils.getLoginUser().getUser();
//获取用户所属单位
String enterpriseName = user.getEnterpriseName();
tProjectInfo.setEnterpriseCode(String.valueOf(enterpriseName));
return toAjax(tProjectInfoService.insertTProjectInfo(tProjectInfo));
}
......@@ -99,7 +104,7 @@ public class TProjectInfoController extends BaseController
{
//查询修改文件之前的路径
TProjectInfo tProjectInfos = tProjectInfoService.selectNearbyAddress(tProjectInfo.getProjectId());
if (tProjectInfos.getNearbyAddress()!=null){
if (tProjectInfos!=null){
// 上传文件路径
String filePath = GassafetyProgressConfig.getUploadPath();
String[] strs = tProjectInfos.getNearbyAddress().split("upload");
......
......@@ -24,6 +24,9 @@ public class TEventHandle extends BaseEntity
@Excel(name = "事件id")
private Long eventId;
@Excel(name = "类型")
private Integer eventType;
/** 企业id */
@Excel(name = "企业id")
private Long enterpriseId;
......@@ -56,9 +59,27 @@ public class TEventHandle extends BaseEntity
@Excel(name = "指导时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date guidanceTime;
private Integer readStatus;
/** 0未删除 1已删除 */
private Integer isDel;
public Integer getEventType() {
return eventType;
}
public void setEventType(Integer eventType) {
this.eventType = eventType;
}
public Integer getReadStatus() {
return readStatus;
}
public void setReadStatus(Integer readStatus) {
this.readStatus = readStatus;
}
public String getPlanTitle() {
return planTitle;
}
......
......@@ -70,11 +70,30 @@ public class TEventReceive extends BaseEntity
/** 备注 */
private String remarks;
private Integer companyRead;
private Integer governmentRead;
/** 0未删除 1已删除 */
private Integer isDel;
@Excel(name = "状态")
private Integer status;
public Integer getCompanyRead() {
return companyRead;
}
public void setCompanyRead(Integer companyRead) {
this.companyRead = companyRead;
}
public Integer getGovernmentRead() {
return governmentRead;
}
public void setGovernmentRead(Integer governmentRead) {
this.governmentRead = governmentRead;
}
public void setId(Integer id)
{
this.id = id;
......
......@@ -46,6 +46,10 @@ public class TProjectInfo extends BaseEntity
@Excel(name = "管道金额")
private BigDecimal pipeInvestment;
/**企业编码*/
@Excel(name = "企业编码")
private String enterpriseCode;
/** 附件地址 */
private String nearbyAddress;
......@@ -56,26 +60,37 @@ public class TProjectInfo extends BaseEntity
@Excel(name = "备注")
private String remarks;
public String getEnterpriseCode() {
return enterpriseCode;
}
public void setEnterpriseCode(String enterpriseCode) {
this.enterpriseCode = enterpriseCode;
}
public void setProjectId(Long projectId)
{
this.projectId = projectId;
}
public Long getProjectId()
{
return projectId;
public static long getSerialVersionUID() {
return serialVersionUID;
}
public void setProjectYear(Date projectYear)
{
this.projectYear = projectYear;
public Long getProjectId() {
return projectId;
}
public Date getProjectYear()
{
public Date getProjectYear() {
return projectYear;
}
public void setGateStationAddress(String gateStationAddress)
{
public void setProjectYear(Date projectYear) {
this.projectYear = projectYear;
}
public void setGateStationAddress(String gateStationAddress) {
this.gateStationAddress = gateStationAddress;
}
......@@ -149,21 +164,18 @@ public class TProjectInfo extends BaseEntity
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("projectId", getProjectId())
.append("projectYear", getProjectYear())
.append("gateStationAddress", getGateStationAddress())
.append("gateStationInvestment", getGateStationInvestment())
.append("numberGateStations", getNumberGateStations())
.append("pipeLength", getPipeLength())
.append("pipeInvestment", getPipeInvestment())
.append("nearbyAddress", getNearbyAddress())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("isDel", getIsDel())
.append("remarks", getRemarks())
.toString();
return "TProjectInfo{" +
"projectId=" + projectId +
", projectYear=" + projectYear +
", gateStationAddress='" + gateStationAddress + '\'' +
", gateStationInvestment=" + gateStationInvestment +
", numberGateStations=" + numberGateStations +
", pipeLength=" + pipeLength +
", pipeInvestment=" + pipeInvestment +
", enterpriseCode='" + enterpriseCode + '\'' +
", nearbyAddress='" + nearbyAddress + '\'' +
", isDel='" + isDel + '\'' +
", remarks='" + remarks + '\'' +
'}';
}
}
......@@ -34,8 +34,8 @@ public class TVehicleLocationInfo extends BaseEntity
private BigDecimal latitude;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date reportTime;
/** 是否删除(0正常,1删除) */
......
......@@ -94,8 +94,8 @@ public class TWorkOrder extends BaseEntity
private String responsiblePerson;
/** 截止日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "截止日期", width = 30, dateFormat = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "截止日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date expiryDate;
/** 是否删除(0正常,1删除) */
......
......@@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="TEventHandle" id="TEventHandleResult">
<result property="handleId" column="handle_id" />
<result property="eventId" column="event_id" />
<result property="eventType" column="event_type" />
<result property="enterpriseId" column="enterprise_id" />
<result property="enterpriseName" column="enterprise_name" />
<result property="management" column="management" />
......@@ -21,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectTEventHandleVo">
select handle_id, event_id, enterprise_id, enterprise_name, management,management_event, plan_id,plan_title,plan_url, guidance_opinion, guidance_time, is_del, create_time from t_event_handle
select handle_id, event_id,event_type, enterprise_id, enterprise_name, management,management_event, plan_id,plan_title,plan_url, guidance_opinion, guidance_time, is_del, create_time from t_event_handle
</sql>
<select id="selectTEventHandleList" parameterType="TEventHandle" resultMap="TEventHandleResult">
......@@ -40,6 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into t_event_handle
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="eventId != null">event_id,</if>
<if test="eventType != null">event_type,</if>
<if test="enterpriseId != null">enterprise_id,</if>
<if test="enterpriseName != null">enterprise_name,</if>
<if test="management != null">management,</if>
......@@ -54,6 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="eventId != null">#{eventId},</if>
<if test="eventType != null">#{eventType},</if>
<if test="enterpriseId != null">#{enterpriseId},</if>
<if test="enterpriseName != null">#{enterpriseName},</if>
<if test="management != null">#{management},</if>
......@@ -72,6 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update t_event_handle
<trim prefix="SET" suffixOverrides=",">
<if test="eventId != null">event_id = #{eventId},</if>
<if test="eventType != null">event_type = #{eventType},</if>
<if test="enterpriseId != null">enterprise_id = #{enterpriseId},</if>
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
<if test="management != null">management = #{management},</if>
......
......@@ -20,12 +20,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="enterpriseId" column="enterprise_id" />
<result property="enterpriseName" column="enterprise_name" />
<result property="remarks" column="remarks" />
<result property="companyRead" column="company_read" />
<result property="governmentRead" column="government_read" />
<result property="isDel" column="is_del" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectTEventReceiveVo">
select id, event_name, event_type, event_grade, address, longitude, latitude, informant, infor_time, informant_phone, `describe`, `status`,enterprise_id, enterprise_name, remarks, is_del, create_time from t_event_receive
select id, event_name, event_type, event_grade, address, longitude, latitude,
company_read,government_read,informant, infor_time, informant_phone, `describe`, `status`,enterprise_id, enterprise_name, remarks, is_del, create_time from t_event_receive
</sql>
<select id="selectTEventReceiveList" parameterType="TEventReceive" resultMap="TEventReceiveResult">
......@@ -36,6 +39,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="eventGrade != null "> and event_grade = #{eventGrade}</if>
<if test="enterpriseId != null and enterpriseId != ''"> and enterprise_id = #{enterpriseId}</if>
<if test="status != null and status!=5"> and status = #{status}</if>
<if test="companyRead != null"> and company_read = #{companyRead}</if>
<if test="governmentRead != null"> and government_read = #{governmentRead}</if>
<if test="status ==5"> and status !=4 </if>
and is_del = 0
</where>
......@@ -65,6 +70,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="enterpriseId != null">enterprise_id,</if>
<if test="enterpriseName != null">enterprise_name,</if>
<if test="remarks != null">remarks,</if>
<if test="companyRead != null">company_read,</if>
<if test="governmentRead != null">government_read,</if>
<if test="isDel != null">is_del,</if>
<if test="createTime != null">create_time,</if>
</trim>
......@@ -84,6 +91,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="enterpriseId != null">#{enterpriseId},</if>
<if test="enterpriseName != null">#{enterpriseName},</if>
<if test="remarks != null">#{remarks},</if>
<if test="companyRead != null">#{companyRead},</if>
<if test="governmentRead != null">#{governmentRead},</if>
<if test="isDel != null">#{isDel},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
......@@ -106,6 +115,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="enterpriseId != null">enterprise_id = #{enterpriseId},</if>
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
<if test="remarks != null">remarks = #{remarks},</if>
<if test="companyRead != null">company_read = #{companyRead},</if>
<if test="governmentRead != null">government_read = #{governmentRead},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
......
......@@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="TProjectInfo" id="TProjectInfoResult">
<result property="projectId" column="project_id" />
<result property="enterpriseCode" column="enterprise_code" />
<result property="projectYear" column="project_year" />
<result property="gateStationAddress" column="gate_station_address" />
<result property="gateStationInvestment" column="gate_station_investment" />
......@@ -22,7 +23,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectTProjectInfoVo">
select project_id, project_year, gate_station_address, gate_station_investment, number_gate_stations, pipe_length, pipe_investment, nearby_address, create_by, create_time, update_by, update_time, is_del, remarks from t_project_info
select project_id,enterprise_code,project_year, gate_station_address, gate_station_investment, number_gate_stations, pipe_length, pipe_investment, nearby_address, create_by, create_time, update_by, update_time, is_del, remarks from t_project_info
</sql>
<select id="selectTProjectInfoList" parameterType="TProjectInfo" resultMap="TProjectInfoResult">
......@@ -51,6 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into t_project_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="projectYear != null">project_year,</if>
<if test="enterpriseCode != null">enterprise_code,</if>
<if test="gateStationAddress != null">gate_station_address,</if>
<if test="gateStationInvestment != null">gate_station_investment,</if>
<if test="numberGateStations != null">number_gate_stations,</if>
......@@ -66,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="projectYear != null">#{projectYear},</if>
<if test="enterpriseCode != null">#{enterpriseCode},</if>
<if test="gateStationAddress != null">#{gateStationAddress},</if>
<if test="gateStationInvestment != null">#{gateStationInvestment},</if>
<if test="numberGateStations != null">#{numberGateStations},</if>
......@@ -85,6 +88,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update t_project_info
<trim prefix="SET" suffixOverrides=",">
<if test="projectYear != null">project_year = #{projectYear},</if>
<if test="enterpriseCode != null">enterprise_code = #{enterpriseCode},</if>
<if test="gateStationAddress != null">gate_station_address = #{gateStationAddress},</if>
<if test="gateStationInvestment != null">gate_station_investment = #{gateStationInvestment},</if>
<if test="numberGateStations != null">number_gate_stations = #{numberGateStations},</if>
......
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1647852854992" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2263" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="20"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
</style></defs><path d="M662.04973405 329.56834123l108.40905238-142.19888693c4.22372932-5.63163908 4.22372932-11.26327817 1.40790978-18.30282702-2.81581955-5.63163908-8.44745863-9.8553684-15.48700748-9.85536841H218.55815604c-9.8553684 0-16.89491725 7.03954885-16.89491725 16.89491726V867.38987389c0 9.8553684 7.03954885 16.89491725 16.89491725 16.89491726s16.89491725-7.03954885 16.89491726-16.89491726V487.25423562h522.33452519c7.03954885 0 12.67118794-4.22372932 15.48700749-9.8553684s1.40790977-12.67118794-2.81581955-18.30282703l-108.40905238-129.52769896z" fill="#EA4942" p-id="2264"></path></svg>
\ No newline at end of file
.gass-vehiche {
.el-table {
/*.el-table {
background-color: rgba(0, 0, 0, 0) !important;
.el-table__body {
width: 100% !important;
......@@ -60,7 +60,7 @@
// margin-left: 1px;
}
}
}
}*/
// 滚动条样式
......@@ -69,7 +69,9 @@
.drawer{
::-webkit-scrollbar {
width: 10px;
background: #012a53;
//background: #012a53;
background: #f8f8f9;
position: absolute;
top: 0;
//display:none
......@@ -79,7 +81,7 @@
/*滚动条里面小方块*/
// border-radius: 10px;
// box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
background: #cccccccc;
background: #cccccc;
border-radius: 8px;
}
::-webkit-scrollbar-track {
......@@ -101,7 +103,7 @@
.el-pagination {
/* .el-pagination {
button:disabled {
background-color: rgba(0, 0, 0, 0);
}
......@@ -166,5 +168,5 @@
background-color: rgba(0, 0, 0, 0);
border-color: #1890ff;
//color: #fff;
}
}*/
}
......@@ -5,6 +5,7 @@
:before-upload="handleBeforeUpload"
:file-list="fileArr"
:limit="1"
:fileType="fileType"
:list-type="listType"
:on-error="handleUploadError"
:on-exceed="handleExceed"
......
<!--
* @Author: your name
* @Date: 2022-03-22 10:31:50
* @LastEditTime: 2022-03-22 10:31:51
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /gassafety-progress/gassafetyprogress-web/src/components/bigWindow/Nulll.vue
-->
<template>
</template>
<script>
export default {
}
</script>
<style>
</style>
......@@ -48,37 +48,93 @@
></div>
</div>
</div>
<div class="yj">
<div class="yujingleft yujing">
<div class="yujingtop">
<img src="@/assets/mapinages/group786.png" alt="" style="width: 50px;height: 50px;" />
<div class="" style="padding: 0px 10px">
<div
class="yujingleft yujing"
style="width: 33%; height: 90px; float: left"
>
<div
class="yujingtop"
style="
width: 70px;
height: 90px;
float: left;
margin-top: 15px;
text-align: right;
"
>
<img
src="@/assets/mapinages/group786.png"
alt=""
style="width: 50px; height: 50px"
/>
</div>
<div class="yujingbottom">
<div>设备预警</div>
<div
class="yujingbottom"
style="float: left; color: #cddbe4; margin-left: 10px"
>
<p>设备预警</p>
<span>2</span>
</div>
</div>
<div class="yujingcenter yujing">
<div class="yujingtop">
<img src="@/assets/mapinages/group787.png" alt="" style="width: 50px;height: 50px;" />
<div
class="yujingcenter yujing"
style="width: 33%; height: 90px; float: left"
>
<div
class="yujingtop"
style="
width: 70px;
height: 90px;
float: left;
margin-top: 15px;
text-align: right;
"
>
<img
src="@/assets/mapinages/group787.png"
alt=""
style="width: 50px; height: 50px"
/>
</div>
<div class="yujingbottom">
<div>事件情况</div>
<div
class="yujingbottom"
style="float: left; color: #cddbe4; margin-left: 10px"
>
<p>事件情况</p>
<span>2</span>
</div>
</div>
<div class="yujingright yujing">
<div class="yujingtop">
<img src="@/assets/mapinages/group788.png" alt="" style="width: 50px;height: 50px;" />
<div
class="yujingright yujing"
style="width: 33%; height: 90px; float: left"
>
<div
class="yujingtop"
style="
width: 70px;
height: 90px;
float: left;
margin-top: 15px;
text-align: right;
"
>
<img
src="@/assets/mapinages/group788.png"
alt=""
style="width: 50px; height: 50px"
/>
</div>
<div class="yujingbottom">
<div>隐患数量</div>
<div
class="yujingbottom"
style="float: left; color: #cddbe4; margin-left: 10px"
>
<p>隐患数量</p>
<span>2</span>
</div>
</div>
</div>
<div class="left">
<div
class="bottom right-bottom-data-left"
......@@ -372,6 +428,10 @@ export default {
this.drawLine3();
});
},
beforeDestroy() {
console.log("清空定时器");
clearInterval(this.alarmTimer);
},
methods: {
getAlarm() {
return alarmData().then((response) => {
......@@ -581,16 +641,13 @@ export default {
});
},
drawLine3() {
// 基于准备好的dom,初始化echarts实例
let myChart31 = echarts.init(document.getElementById("huanleft"));
let myChart32 = echarts.init(document.getElementById('huanright'))
let myChart32 = echarts.init(document.getElementById("huanright"));
// 绘制图表
myChart31.setOption({
color: ["#91cc75", "#5470c6", "#fa8167" ],
color: ["#91cc75", "#5470c6", "#fa8167"],
grid: {
left: 0,
// right: 0,
......
<template>
<ul class="timeline-wrapper">
<li class="timeline-item" v-for="t in timelineList" :key="t.id">
<div class="timeline-box">
<div class="out-circle">
<div class="in-circle"></div>
</div>
<div class="long-line"></div>
</div>
<div class="timeline-content">
<div class="timeline-date">{{t.createTime}}</div>
<div class="timeline-title">{{ t.management}}</div>
<div class="timeline-desc">
<span
class="dbtn"
@click="checkFile(t.managementEvent)"
v-if="t.managementEvent != null && t.managementEvent!=''"
>
<i class="el-icon el-icon-view"></i>查看/下载
</span>
<span v-else>-</span>
</div>
</div>
</li>
</ul>
</template>
<script type="text/babel">
import Vue from 'vue'
export default Vue.component('Timeline',{
name: "Timeline",
props: {
timelineList: {
type: Array,
default: () => {
return []
}
}
},
methods: {
checkFile(url) {
window.open(url,'_blank');
},
}
})
</script>
<style scoped lang="scss">
ul.timeline-wrapper {
list-style: none;
margin: 0;
padding: 0;
}
/* 时间线 */
.timeline-item {
position: relative;
.timeline-box {
text-align: center;
position: absolute;
.out-circle {
width: 16px;
height: 16px;
background: rgba(14, 116, 218, 0.1);
box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.1);
/*opacity: 0.1;*/
border-radius: 50%;
display: flex;
align-items: center;
.in-circle {
width: 12px;
height: 12px;
margin: 0 auto;
background: rgba(14, 116, 218, 1);
border-radius: 50%;
box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.1);
}
}
.long-line {
width: 2px;
height: 98px;
background: #ffffff;
box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.1);
opacity: 0.5;
margin-left: 8px;
}
}
.timeline-content {
box-sizing: border-box;
margin-left: 20px;
height: 86px;
padding: 0 0 0 20px;
text-align: left;
margin-bottom: 30px;
.timeline-title {
font-size: 14px;
word-break: break-all;
margin-bottom: 16px;
color: #d9d9d9;
font-weight: 500;
/*display: inline;*/
}
.timeline-date {
font-size: 16px;
color: #dfe4ed;
font-weight: 500;
margin-bottom: 16px;
}
.timeline-desc {
font-size: 14px;
color: #30b46b;
}
}
}
.dbtn {
display: inline-block;
line-height: normal;
padding-left: 2px;
padding-right: 2px;
cursor: pointer;
border-radius: 3px;
border-style: solid;
border-width: 0;
color: rgb(48, 180, 107);
}
.timeline-item:last-of-type .timeline-content {
margin-bottom: 0;
}
</style>
......@@ -14,8 +14,12 @@
<div style="width: 100%" v-for="item in receiveList">
<div class="el-form-div title-div">
<div v-if="item.status==1" style="width: 80%;margin-left: 5px;">未指派</div>
<div v-if="item.status==2" style="width: 80%;margin-left: 5px;">待处置</div>
<div v-if="item.status==3" style="width: 80%;margin-left: 5px;">已处置</div>
<div v-if="item.status==2" style="width: 80%;margin-left: 5px;">待处置<span
v-if="(item.governmentRead==0&&userType==-2)||(item.companyRead==0&&userType!=-2)" class="massage"> (您有新消息)</span>
</div>
<div v-if="item.status==3" style="width: 80%;margin-left: 5px;">已处置<span
v-if="(item.governmentRead==0&&userType==-2)||(item.companyRead==0&&userType!=-2)" class="massage"> (您有新消息)</span>
</div>
<div v-if="item.status==4" style="width: 80%;margin-left: 5px;">已完结</div>
<div style="height:30px;color: red;cursor:pointer;" v-if="userType==-2" @click="handleDelete(item.id)">取消事件</div>
</div>
......@@ -23,29 +27,42 @@
<div class="content-div">发生时间:{{item.inforTime}}</div>
<div class="content-div">事件地点:{{item.address}}</div>
<div class="el-form-div">
<div v-if="item.status==3 && userType==-2" class="button-div" @click="endevent(item.id)">事件结案</div>
<div v-if="item.status==3 && userType==-2" class="button-div" @click="showList(item.id)" >预案指引</div>
<div v-if="item.status==1 && userType==-2" class="button-div" @click="assignTask(item)">任务指派</div>
<div v-if="userType==-2" class="button-div" @click="showList(item.id)" >预案指引</div>
<div v-if="item.status==3 && userType==-2" class="button-div" @click="endevent(item.id)">事件结案</div>
<div v-if="userType!=-2" class="button-div" @click="showList(item.id)">信息处置</div>
<div class="button-div" @click="showDetail(item.id,$event)">详情</div>
</div>
<div :id = "item.id" style="display: none;margin-top: 15px;margin-bottom: 20px;">
<timeline :timeline-list="handleList"></timeline>
</div>
</div>
</div>
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
<el-row v-if="userType!=-2" :gutter="10" class="mb8">
<el-col :span="1.5">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5" v-if="userType!=-2">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增</el-button>
>新增处置信息</el-button>
</el-col>
<el-col :span="1.5" v-if="userType==-2">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleUpdate"
>新增预案指引</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="handleList" >
<el-table-column label="处置信息" align="center" prop="management" />
<el-table-column label="处置附件" align="center" prop="managementEvent" width="150px">
<el-table-column label="类型" align="center" prop="eventType" :formatter="getType" width="120px"/>
<el-table-column label="处置信息/指导意见" align="center" prop="management" />
<el-table-column label="处置附件/引导方案" align="center" prop="managementEvent" width="150px">
<template slot-scope="scope">
<span
class="dbtn"
......@@ -57,49 +74,49 @@
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="指导意见" align="center" prop="guidanceOpinion" />
<el-table-column label="指导方案" align="center" prop="planUrl" >
<template slot-scope="scope">
<span
class="dbtn"
@click="checkFile(scope.row.planUrl)"
v-if="scope.row.planUrl != null && scope.row.planUrl!=''"
>
<i class="el-icon el-icon-view"></i>查看/下载
</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="指导时间" align="center" prop="guidanceTime" width="180">
<!--<el-table-column label="指导意见" align="center" prop="guidanceOpinion" />-->
<!--<el-table-column label="指导方案" align="center" prop="planUrl" >-->
<!--<template slot-scope="scope">-->
<!--<span-->
<!--class="dbtn"-->
<!--@click="checkFile(scope.row.planUrl)"-->
<!--v-if="scope.row.planUrl != null && scope.row.planUrl!=''"-->
<!--&gt;-->
<!--<i class="el-icon el-icon-view"></i>查看/下载-->
<!--</span>-->
<!--<span v-else>-</span>-->
<!--</template>-->
<!--</el-table-column>-->
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
<!--<template slot-scope="scope">-->
<!--<span>{{ parseTime(scope.row.guidanceTime, '{y}-{m}-{d}') }}</span>-->
<!--</template>-->
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100">
<template slot-scope="scope">
<!--<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100">-->
<!--<template slot-scope="scope">-->
<!--&lt;!&ndash;<el-button&ndash;&gt;-->
<!--&lt;!&ndash;size="mini"&ndash;&gt;-->
<!--&lt;!&ndash;type="text"&ndash;&gt;-->
<!--&lt;!&ndash;icon="el-icon-edit"&ndash;&gt;-->
<!--&lt;!&ndash;@click="handleUpdate(scope.row)"&ndash;&gt;-->
<!--&lt;!&ndash;v-hasPermi="['system:handle:edit']"&ndash;&gt;-->
<!--&lt;!&ndash;&gt;修改</el-button>&ndash;&gt;-->
<!--<el-button-->
<!--v-if="userType==-2"-->
<!--size="mini"-->
<!--type="text"-->
<!--icon="el-icon-edit"-->
<!--@click="handleUpdate(scope.row)"-->
<!--v-hasPermi="['system:handle:edit']"-->
<!--&gt;修改</el-button>-->
<el-button
v-if="userType==-2"
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>预案指引</el-button>
<el-button
v-if="userType!=-2"
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete2(scope.row)"
>删除</el-button>
</template>
</el-table-column>
<!--&gt;预案指引</el-button>-->
<!--<el-button-->
<!--v-if="userType!=-2"-->
<!--size="mini"-->
<!--type="text"-->
<!--icon="el-icon-delete"-->
<!--@click="handleDelete2(scope.row)"-->
<!--&gt;删除</el-button>-->
<!--</template>-->
<!--</el-table-column>-->
</el-table>
<pagination
v-show="total>0"
......@@ -112,11 +129,11 @@
<!-- 添加或修改事件处置对话框 -->
<el-dialog :title="title2" :visible.sync="open2" width="550px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="处置信息" prop="management">
<el-input v-model="form.management" type="textarea" :disabled="readonly1" placeholder="请输入处置信息" />
<el-form-item label="处置信息" prop="management" :style="display">
<el-input v-model="form.management" type="textarea" placeholder="请输入处置信息" />
</el-form-item>
<el-form-item label="指导意见" prop="guidanceOpinion" :style="display2">
<el-input v-model="form.guidanceOpinion" type="textarea" placeholder="请输入指导意见" />
<el-form-item label="指导意见" prop="management" :style="display2">
<el-input v-model="form.management" type="textarea" placeholder="请输入指导意见" />
</el-form-item>
<el-form-item label="应急预案" prop="planId" :style="display2">
<el-select v-model="form.planId" placeholder="请选择预案等级" @change="fananchange" >
......@@ -131,6 +148,7 @@
<el-form-item label="处置附件" prop="managementEvent" :style="display">
<FileUpload
listType="picture"
:fileType="fileType"
@resFun="getFileInfo"
@remove="listRemove"
:fileArr="fileList"
......@@ -151,7 +169,7 @@
import { listReceive, getReceive, delReceive, addReceive, updateReceive } from "@/api/system/receive";
import { listHandle, getHandle, delHandle, addHandle, updateHandle, exportHandle } from "@/api/system/handle";
import { listPlanInfo } from "@/api/system/planInfo";
import Timeline from "./Timeline";
import { getUserProfile } from "@/api/system/user";
import FileUpload from '@/components/FileUpload';
let uploadfile = require("@/assets/uploadfile.png");
......@@ -159,10 +177,12 @@
export default {
components: {
// RightPic,
FileUpload
FileUpload,
Timeline
},
data() {
return {
fileType:['png', 'jpg', 'jpeg',"doc", "xls", "ppt", "txt", "pdf"],
// 是否显示弹出层
open: false,
open2: false,
......@@ -196,6 +216,8 @@ export default {
pageSize: 10,
eventId: null,
},
dongtai:[
],
// 表单校验
rules: {
management: [
......@@ -215,6 +237,30 @@ export default {
}
this.getList();
});
//定时检测新消息
setInterval(() => {
var params = this.queryParams;
if(this.userType==-2){
params.governmentRead=0
}else {
params.companyRead=0
}
listReceive(params).then(response => {
var newList = response.rows;
newList.forEach((model) => {
this.receiveList.forEach((item) => {
if(item.id == model.id){
console.log("---------------"+item.id)
if(this.userType==-2){
item.governmentRead =0;
}else {
item.companyRead =0;
}
}
});
});
});
}, 5000);
},
methods: {
/** 查询事件接报列表 */
......@@ -232,6 +278,7 @@ export default {
this.handleList = response.rows;
this.total = response.total;
this.loading = false;
return response.total;
});
},
showList(id) {
......@@ -240,10 +287,15 @@ export default {
this.queryParams2.eventId= id
this.getHandleList();
},
choice(val) {
console.log(val)
choice() {
this.getList();
},
getType(row){
if(row.eventType==1){
return "处置信息"
}
return "预案指引"
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
......@@ -255,14 +307,16 @@ export default {
this.form.eventId = this.queryParams2.eventId
},
/** 修改按钮操作 */
handleUpdate(row) {
handleUpdate() {
this.reset();
this.readonly1=true;
this.display="display:none";
this.display2="";
this.form = row;
//this.form = row;
this.open2 = true;
this.title2 = "预案指引";
this.form.eventId = this.queryParams2.eventId
this.form.eventType=2;
this.yuanList();
},
yuanList(){
......@@ -278,7 +332,7 @@ export default {
return item.planId === value;
``});
this.form.planTitle = obj.planTitle;
this.form.planUrl = obj.iconUrl;
this.form.managementEvent = obj.iconUrl;
this.form.planId = value;
},
// 表单重置
......@@ -320,6 +374,11 @@ export default {
},
upReceive(id){
var receiveform = {id:id,status:3}
if(this.form.eventType==2){
receiveform.companyRead=0;
}else {
receiveform.governmentRead=0;
}
updateReceive(receiveform).then(response => {
});
},
......@@ -376,6 +435,48 @@ export default {
assignTask(item){
this.$parent.handleUpdate(item);
},
async showDetail(id,event){
var that = this;
that.queryParams2.eventId= id
that.queryParams2.pageSize=100;
if(event.target.innerText=="详情"){
await listHandle(that.queryParams2).then(response => {
this.handleList = response.rows;
if(response.total==0){
this.msgSuccess("暂无详情");
}else{
event.target.innerText="关闭";
document.getElementById(id).style.display="";
that.updateRead(id);
}
});
}else {
event.target.innerText="详情";
document.getElementById(id).style.display="none";
}
},
//更改读取状态
updateRead(id){
var receiveform = {id:id}
if(this.userType==-2){
receiveform.governmentRead = 1;
}else {
receiveform.companyRead = 1;
}
updateReceive(receiveform).then(response => {
});
this.receiveList.forEach((item) => {
if(item.id == id){
if(this.userType==-2){
item.governmentRead =1;
}else {
item.companyRead =1;
}
}
});
},
//上传
getFileInfo(res){
//this.form.dealPlan = res.fileName;
......@@ -462,7 +563,7 @@ export default {
line-height: 25px;
text-align: center;
font-size: 15;
margin-left: 15%;
margin-left: 10%;
margin-top: 10px;
}
.title-div{
......@@ -506,6 +607,9 @@ export default {
border-width: 0;
color: rgb(48, 180, 107);
}
.massage{
color: #00ffff;
}
.test-5::-webkit-scrollbar-track {
/*滚动条里面轨道*/
box-shadow : inset 0 0 5px rgba(0, 0, 0, 0.2);
......
......@@ -7,9 +7,12 @@
<div class="right-menu">
<template v-if="device!=='mobile'">
<!--<div class="right-menu-item" v-if="total>0" @click="$router.push('/emergency/emergency')">-->
<!--<img src="@/assets/xiaoxi.png" :hidden="xiaohidden" style="height: 40px;width: 40px;margin-top: 5px;cursor: pointer;">-->
<!--</div>-->
<!-- <search id="header-search" class="right-menu-item" /> -->
          <el-badge :value="20" :max="99" class="item">
            <i class="el-icon-chat-dot-round" style="width: 10px;height: 10px;"></i>
          <el-badge :value="total" :max="99" class="item" >
            <i class="el-icon-chat-dot-round" style="width: 10px;height: 10px;" @click="$router.push('/emergency/emergency')"></i>
          </el-badge>
......@@ -50,7 +53,8 @@ import Hamburger from '@/components/Hamburger'
import Screenfull from '@/components/Screenfull'
import SizeSelect from '@/components/SizeSelect'
import Search from '@/components/HeaderSearch'
import { getUserProfile } from "@/api/system/user";
import { listReceive } from "@/api/system/receive";
export default {
components: {
Breadcrumb,
......@@ -60,6 +64,13 @@ export default {
SizeSelect,
Search
},
data() {
return {
userType:-2,
total:null,
xiaohidden:false,
}
},
computed: {
...mapGetters([
'sidebar',
......@@ -83,6 +94,36 @@ export default {
}
}
},
mounted(){
getUserProfile().then(response => {
this.userType = response.data.deptId;
});
//定时检测新消息
setInterval(() => {
var params = {
pageNum: 1,
pageSize: 100,
status:5,
enterpriseId:this.userType
};
if(this.userType==-2){
params.governmentRead=0;
params.enterpriseId=null;
}else {
params.companyRead=0
}
console.log(params)
listReceive(params).then(response => {
console.log("total==",response);
if(response.total!=0){
this.total= response.total;
}else{
this.total= "";
}
});
}, 5000);
},
methods: {
toggleSideBar() {
this.$store.dispatch('app/toggleSideBar')
......@@ -141,7 +182,6 @@ export default {
float: right;
height: 100%;
line-height: 50px;
&:focus {
outline: none;
}
......
/*
* @Author: your name
* @Date: 2022-01-26 10:47:44
* @LastEditTime: 2022-03-03 16:03:12
* @LastEditTime: 2022-03-21 17:11:56
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/utils/config.js
*/
import store from '@/store'
import store from "@/store";
export const pipeColor = {
1: "#2EE7E7",
......@@ -32,10 +32,15 @@ export const svgUrl = {
7: require("@/assets/image/zrxk.svg"),
8: require("@/assets/image/zcrq.svg"),
9: require("@/assets/image/car.png"),
10: require("@/assets/mapImages/mark02.png"),
11: require("@/assets/mapImages/mark03.png"),
12: require("@/assets/mapImages/mark04.png"),
13: require("@/assets/mapImages/mark01.png"),
//小汽车的路径标点图标
14: require("@/assets/mapImages/carTarget.svg"),
//应急设备,
10: require("@/assets/image/yj-jydw.png"),
11: require("@/assets/image/yj-wz.png"),
12: require("@/assets/image/yj-cl.png"),
13: require("@/assets/image/yj-yy.png"),
15: require("@/assets/image/yj-xf.png"),
16: require("@/assets/image/yj-xj.png"),
};
export const svgAlarm = {
2: require("@/assets/mapImages/tyxAlarm.svg"),
......@@ -45,15 +50,14 @@ export const svgAlarm = {
6: require("@/assets/mapImages/userAlarm.svg"),
};
export const deviceType = {
1:"管道",
2:"调压箱",
3:"阀门",
4:"场站",
5:"监控",
6:"用户",
1: "管道",
2: "调压箱",
3: "阀门",
4: "场站",
5: "监控",
6: "用户",
};
export const companyType = {
1: "中燃翔科",
2: "中诚燃气",
......@@ -85,7 +89,26 @@ export const pipeData = {
isDel: "0",
remarks: "备注",
companyType: "1",
path: [ [ 114.165756, 38.270519 ], [ 114.165421, 38.269184 ], [ 114.165039, 38.267927 ], [ 114.164857, 38.266685 ], [ 114.16446, 38.263696 ], [ 114.164405, 38.263111 ], [ 114.164418, 38.262426 ], [ 114.164194, 38.260908 ], [ 114.165692, 38.260752 ], [ 114.167399, 38.260559 ], [ 114.168369, 38.260391 ], [ 114.168901, 38.260879 ], [ 114.169059, 38.261128 ], [ 114.169078, 38.261693 ], [ 114.172569, 38.261263 ], [ 114.181772, 38.260066 ], [ 114.181584, 38.259023 ], [ 114.181353, 38.258139 ] ],
path: [
[114.165756, 38.270519],
[114.165421, 38.269184],
[114.165039, 38.267927],
[114.164857, 38.266685],
[114.16446, 38.263696],
[114.164405, 38.263111],
[114.164418, 38.262426],
[114.164194, 38.260908],
[114.165692, 38.260752],
[114.167399, 38.260559],
[114.168369, 38.260391],
[114.168901, 38.260879],
[114.169059, 38.261128],
[114.169078, 38.261693],
[114.172569, 38.261263],
[114.181772, 38.260066],
[114.181584, 38.259023],
[114.181353, 38.258139],
],
},
{
pipeya: "20Pa",
......@@ -110,7 +133,10 @@ export const pipeData = {
isDel: "0",
remarks: "备注",
companyType: "1",
path: [ [ 114.17947, 38.260353 ], [ 114.179546, 38.260732 ] ],
path: [
[114.17947, 38.260353],
[114.179546, 38.260732],
],
},
{
pipeya: "20Pa",
......@@ -135,8 +161,19 @@ export const pipeData = {
isDel: "0",
remarks: null,
companyType: "1",
path:
[ [ 114.236904, 38.239155 ], [ 114.234145, 38.239202 ], [ 114.233368, 38.242778 ], [ 114.233895, 38.249292 ], [ 114.233937, 38.251334 ], [ 114.229746, 38.251479 ], [ 114.226905, 38.25181 ], [ 114.224532, 38.252174 ], [ 114.224474, 38.253066 ], [ 114.224389, 38.254749 ], [ 114.224273, 38.258808 ] ],
path: [
[114.236904, 38.239155],
[114.234145, 38.239202],
[114.233368, 38.242778],
[114.233895, 38.249292],
[114.233937, 38.251334],
[114.229746, 38.251479],
[114.226905, 38.25181],
[114.224532, 38.252174],
[114.224474, 38.253066],
[114.224389, 38.254749],
[114.224273, 38.258808],
],
},
{
pipeya: "20Pa",
......@@ -161,7 +198,16 @@ export const pipeData = {
isDel: "0",
remarks: "阿斯顿",
companyType: "1",
path: [ [ 114.164985, 38.267853 ], [ 114.169441, 38.267047 ], [ 114.176153, 38.265802 ], [ 114.176198, 38.26608 ], [ 114.176877, 38.266001 ], [ 114.176815, 38.265712 ], [ 114.177443, 38.265609 ], [ 114.176635, 38.260772 ] ],
path: [
[114.164985, 38.267853],
[114.169441, 38.267047],
[114.176153, 38.265802],
[114.176198, 38.26608],
[114.176877, 38.266001],
[114.176815, 38.265712],
[114.177443, 38.265609],
[114.176635, 38.260772],
],
},
{
pipeya: "20Pa",
......@@ -185,7 +231,16 @@ export const pipeData = {
isDel: "0",
remarks: "管道高压",
companyType: "1",
path: [ [ 114.169401, 38.267041 ], [ 114.169923, 38.273139 ], [ 114.169782, 38.274468 ], [ 114.169324, 38.276147 ], [ 114.169237, 38.277648 ], [ 114.170117, 38.2815 ], [ 114.170207, 38.282984 ], [ 114.174419, 38.282971 ] ],
path: [
[114.169401, 38.267041],
[114.169923, 38.273139],
[114.169782, 38.274468],
[114.169324, 38.276147],
[114.169237, 38.277648],
[114.170117, 38.2815],
[114.170207, 38.282984],
[114.174419, 38.282971],
],
},
{
pipeya: "20Pa",
......@@ -209,7 +264,16 @@ export const pipeData = {
isDel: "0",
remarks: null,
companyType: "1",
path: [ [ 114.214022, 38.258963 ], [ 114.215365, 38.25896 ], [ 114.215363, 38.259637 ], [ 114.215366, 38.258961 ], [ 114.216537, 38.258983 ], [ 114.216534, 38.259115 ], [ 114.216537, 38.258983 ], [ 114.218661, 38.258925 ] ],
path: [
[114.214022, 38.258963],
[114.215365, 38.25896],
[114.215363, 38.259637],
[114.215366, 38.258961],
[114.216537, 38.258983],
[114.216534, 38.259115],
[114.216537, 38.258983],
[114.218661, 38.258925],
],
},
{
pipeya: "20Pa",
......@@ -289,7 +353,17 @@ export const pipeData = {
remarks: "可以",
companyType: "1",
path: [
[ [ 114.181858, 38.260066 ], [ 114.188165, 38.259239 ], [ 114.188883, 38.259136 ], [ 114.190042, 38.259164 ], [ 114.19217, 38.259316 ], [ 114.194628, 38.258174 ], [ 114.19722, 38.25744 ], [ 114.200157, 38.257364 ], [ 114.206203, 38.256601 ] ]
[
[114.181858, 38.260066],
[114.188165, 38.259239],
[114.188883, 38.259136],
[114.190042, 38.259164],
[114.19217, 38.259316],
[114.194628, 38.258174],
[114.19722, 38.25744],
[114.200157, 38.257364],
[114.206203, 38.256601],
],
],
},
{
......@@ -316,7 +390,11 @@ export const pipeData = {
remarks: "可以",
companyType: "1",
path: [
[ [ 114.185887, 38.259572 ], [ 114.185973, 38.260098 ], [ 114.18599, 38.260102 ] ]
[
[114.185887, 38.259572],
[114.185973, 38.260098],
[114.18599, 38.260102],
],
],
},
......@@ -430,7 +508,15 @@ export const pipeData = {
isDel: "0",
remarks: "123",
companyType: "2",
path: [ [ 114.192016, 38.259428 ], [ 114.192084, 38.262614 ], [ 114.187931, 38.263887 ], [ 114.186155, 38.264606 ], [ 114.184682, 38.26551 ], [ 114.185353, 38.264926 ], [ 114.183887, 38.264904 ] ],
path: [
[114.192016, 38.259428],
[114.192084, 38.262614],
[114.187931, 38.263887],
[114.186155, 38.264606],
[114.184682, 38.26551],
[114.185353, 38.264926],
[114.183887, 38.264904],
],
},
{
pipeya: "20Pa",
......@@ -455,7 +541,12 @@ export const pipeData = {
isDel: "0",
remarks: null,
companyType: "2",
path: [ [ 114.210714, 38.255961 ], [ 114.210617, 38.255911 ], [ 114.209614, 38.256096 ], [ 114.206401, 38.2566 ] ],
path: [
[114.210714, 38.255961],
[114.210617, 38.255911],
[114.209614, 38.256096],
[114.206401, 38.2566],
],
},
{
pipeya: "20Pa",
......@@ -479,7 +570,11 @@ export const pipeData = {
isDel: "0",
remarks: null,
companyType: "2",
path: [ [ 114.17755, 38.265569 ], [ 114.181274, 38.264945 ], [ 114.185067, 38.264924 ] ],
path: [
[114.17755, 38.265569],
[114.181274, 38.264945],
[114.185067, 38.264924],
],
},
{
pipeya: "20Pa",
......@@ -535,7 +630,18 @@ export const pipeData = {
remarks: null,
companyType: "2",
path: [
[ [ 114.199316, 38.260473 ], [ 114.199122, 38.260326 ], [ 114.198749, 38.260441 ], [ 114.198473, 38.260509 ], [ 114.198402, 38.260507 ], [ 114.198345, 38.260473 ], [ 114.197739, 38.258908 ], [ 114.19719, 38.257478 ], [ 114.196485, 38.251297 ], [ 114.195518, 38.242209 ] ]
[
[114.199316, 38.260473],
[114.199122, 38.260326],
[114.198749, 38.260441],
[114.198473, 38.260509],
[114.198402, 38.260507],
[114.198345, 38.260473],
[114.197739, 38.258908],
[114.19719, 38.257478],
[114.196485, 38.251297],
[114.195518, 38.242209],
],
],
},
{
......@@ -562,7 +668,13 @@ export const pipeData = {
remarks: null,
companyType: "2",
path: [
[ [ 114.193173, 38.250357 ], [ 114.193096, 38.249905 ], [ 114.19368, 38.249803 ], [ 114.194377, 38.249718 ], [ 114.196261, 38.249521 ] ]
[
[114.193173, 38.250357],
[114.193096, 38.249905],
[114.19368, 38.249803],
[114.194377, 38.249718],
[114.196261, 38.249521],
],
],
},
{
......@@ -588,8 +700,21 @@ export const pipeData = {
isDel: "0",
remarks: null,
companyType: "2",
path:
[ [ 114.206898, 38.259072 ], [ 114.20675, 38.25672 ], [ 114.20636, 38.256667 ], [ 114.206091, 38.254336 ], [ 114.203348, 38.254645 ], [ 114.206094, 38.254333 ], [ 114.204444, 38.241922 ], [ 114.203839, 38.242023 ], [ 114.203782, 38.240171 ], [ 114.202854, 38.240167 ], [ 114.201458, 38.240228 ], [ 114.200296, 38.239421 ], [ 114.200292, 38.240242 ] ],
path: [
[114.206898, 38.259072],
[114.20675, 38.25672],
[114.20636, 38.256667],
[114.206091, 38.254336],
[114.203348, 38.254645],
[114.206094, 38.254333],
[114.204444, 38.241922],
[114.203839, 38.242023],
[114.203782, 38.240171],
[114.202854, 38.240167],
[114.201458, 38.240228],
[114.200296, 38.239421],
[114.200292, 38.240242],
],
},
{
pipeya: "20Pa",
......@@ -615,7 +740,13 @@ export const pipeData = {
remarks: null,
companyType: "2",
path: [
[ [ 114.196451, 38.250502 ], [ 114.200326, 38.250398 ], [ 114.200496, 38.250399 ], [ 114.221349, 38.249354 ], [ 114.224139, 38.250939 ] ]
[
[114.196451, 38.250502],
[114.200326, 38.250398],
[114.200496, 38.250399],
[114.221349, 38.249354],
[114.224139, 38.250939],
],
],
},
{
......@@ -674,7 +805,12 @@ export const pipeData = {
isDel: "0",
remarks: null,
companyType: "3",
path: [ [ 114.219113, 38.255163 ], [ 114.21852, 38.254677 ], [ 114.218446, 38.249739 ], [ 114.218477, 38.251096 ] ],
path: [
[114.219113, 38.255163],
[114.21852, 38.254677],
[114.218446, 38.249739],
[114.218477, 38.251096],
],
},
{
......@@ -700,7 +836,16 @@ export const pipeData = {
isDel: "0",
remarks: null,
companyType: "3",
path: [ [ 114.208486, 38.259254 ], [ 114.208521, 38.260195 ], [ 114.208488, 38.261122 ], [ 114.208428, 38.262953 ], [ 114.208522, 38.263256 ], [ 114.208593, 38.263614 ], [ 114.208551, 38.26458 ], [ 114.208647, 38.266885 ] ],
path: [
[114.208486, 38.259254],
[114.208521, 38.260195],
[114.208488, 38.261122],
[114.208428, 38.262953],
[114.208522, 38.263256],
[114.208593, 38.263614],
[114.208551, 38.26458],
[114.208647, 38.266885],
],
},
{
......@@ -894,7 +1039,10 @@ export const pipeData = {
isDel: "0",
remarks: null,
companyType: "3",
path: [ [ 114.224644, 38.254009 ], [ 114.223455, 38.254043 ] ],
path: [
[114.224644, 38.254009],
[114.223455, 38.254043],
],
},
{
pipeya: "20Pa",
......@@ -918,7 +1066,12 @@ export const pipeData = {
isDel: "0",
remarks: null,
companyType: "3",
path: [ [ 114.218794, 38.260883 ], [ 114.218831, 38.264988 ], [ 114.220933, 38.264941 ], [ 114.220905, 38.266866 ] ],
path: [
[114.218794, 38.260883],
[114.218831, 38.264988],
[114.220933, 38.264941],
[114.220905, 38.266866],
],
},
{
pipeya: "20Pa",
......
/*
* @Author: your name
* @Date: 2022-01-11 13:45:12
* @LastEditTime: 2022-03-21 08:57:08
* @LastEditTime: 2022-03-22 10:35:13
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/utils/mapClass.js
......@@ -331,7 +331,11 @@ export class EditorMap {
const data = target.getExtData();
console.log(data);
const name =
data.nickName || data.deviceName || data.videoName || data.stationName;
data.nickName ||
data.deviceName ||
data.videoName ||
data.stationName ||
data.time;
target.setLabel({ content: name, direction: "top" });
});
device.on("mouseout", (e) => {
......@@ -678,11 +682,13 @@ export class EditorMap {
* @param {*} path 轨迹回访率丼
* @return {*}
*/
backTrack(vehicleId, path) {
backTrack(vehicleId, path, times,component) {
this.infowindowClose();
AMap.plugin("AMap.MoveAnimation", () => {
let marker = this.allDevice[9].filter(item => item.getExtData().vehicleId == vehicleId)[0];
let marker = this.allDevice[9].filter(
(item) => item.getExtData().vehicleId == vehicleId
)[0];
// 绘制轨迹
marker.polyline = new AMap.Polyline({
......@@ -702,41 +708,74 @@ export class EditorMap {
marker.on("moving", (e) => {
marker.passedPolyline.setPath(e.passedPath);
// this.map.setCenter(e.target.getPosition(), true);
// console.log(getPosition());
});
marker.moveAlong(path , {
// 每个path的点
// marker.pointArr = [];
// carTarget
//点击的时候,先传进来一个点
const carPathData = { ...marker.getExtData(), time: times[0] };
carPathData.iconType = 14;
this.addDevice(carPathData,component);
// marker.pointArr.push(point);
marker.on("moveend", (e) => {
// this.addDevice(carPathData,carBackComponent);
// 如果不是最后一个点,就创建一个新的worderpoint,如果是就不创建,并且把自身删除
let z = {
longitude: e.pos[0],
latitude: e.pos[1],
iconType: 14,
time: times[e.index],
};
// if (e.index == path.length - 1) {
// point = this.addDevice(z, null);
// } else {
this.addDevice(z,component);
// workPoint.infoWindow.open(map,e.passedPos);
// }
console.log("定点", e);
});
marker.moveAlong(path, {
// 每一段的时长
duration: 8000,//可根据实际采集时间间隔设置
duration: 8000, //可根据实际采集时间间隔设置
// JSAPI2.0 是否延道路自动设置角度在 moveAlong 里设置
autoRotation: true,
});
});
}
clearbackTrack(vehicleId) {
// let marker = this.allDevice[9].filter(
// (item) => item.getExtData().vehicleId == vehicleId
// )[0];
this.allDevice["9"]?.forEach(item=>{
this.allDevice["9"]?.forEach((item) => {
if (item) {
// 停止运动
item.stopMove();
if(item.polyline){
// 删除每个点
console.log(item.pointArr);
if (item.polyline) {
this.map.remove(item.polyline);
}
if(item.passedPolyline){
if (item.passedPolyline) {
this.map.remove(item.passedPolyline);
}
this.map.remove(item);
}
})
});
// 最后把数组清空
this.allDevice["9"]=[];
this.allDevice["9"] = [];
// 把car的路径点也清空
this.allDevice["14"]?.forEach((iten) => {
this.map.remove(iten);
});
this.allDevice["14"] = [];
this.infowindowClose();
}
}
......@@ -333,27 +333,39 @@ export default {
{
val: 10,
ischeck: false,
imgurl: require("@/assets/image/tyxsub.svg"),
imgurl: require("@/assets/image/yj-jydw.png"),
name: "救援队伍",
},
{
val: 11,
ischeck: false,
imgurl: require("@/assets/image/fmjsub.svg"),
imgurl: require("@/assets/image/yj-wz.png"),
name: "救援物资",
},
{
val: 12,
ischeck: false,
imgurl: require("@/assets/image/czsub.svg"),
imgurl: require("@/assets/image/yj-cl.png"),
name: "救援车辆",
},
{
val: 13,
ischeck: false,
imgurl: require("@/assets/image/usersub.svg"),
imgurl: require("@/assets/image/yj-yy.png"),
name: "医 院",
},
{
val: 14,
ischeck: false,
imgurl: require("@/assets/image/yj-xf.png"),
name: "消防队伍",
},
{
val: 15,
ischeck: false,
imgurl: require("@/assets/image/yj-xj.png"),
name: "巡检人员",
},
],
selarr1: [],
// 用户的center数据
......
......@@ -14,7 +14,7 @@
<el-select v-model="queryParams.workType" placeholder="请选择任务类型" clearable size="small">
<el-option label="入户安检" value="1" />
<el-option label="巡检" value="2" />
<el-option label="报警巡查" value="3" />
<!--<el-option label="报警巡查" value="3" />-->
<el-option label="其他" value="4" />
</el-select>
</el-form-item>
......@@ -64,7 +64,7 @@
<template slot-scope="scope">
<span v-if="scope.row.workType == 1">入户安检</span>
<span v-if="scope.row.workType == 2">巡检</span>
<span v-if="scope.row.workType == 3">报警巡查</span>
<!-- <span v-if="scope.row.workType == 3">报警巡查</span>-->
<span v-if="scope.row.workType == 4">其他</span>
</template>
</el-table-column>
......@@ -186,7 +186,7 @@
<el-select v-model="form.workType" placeholder="请选择任务类型" style="width: 350px" :disabled="isDetail">
<el-option label="入户安检" value="1" />
<el-option label="巡检" value="2" />
<el-option label="报警巡查" value="3" />
<!--<el-option label="报警巡查" value="3" />-->
<el-option label="其他" value="4" />
</el-select>
</el-form-item>
......@@ -284,8 +284,8 @@
<el-form-item label="截止日期" prop="expiryDate">
<el-date-picker clearable size="small"
v-model="form.expiryDate"
type="date"
value-format="yyyy-MM-dd"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择截止日期" style="width: 350px" :disabled="isDetail">
</el-date-picker>
</el-form-item>
......@@ -309,7 +309,7 @@
<el-form-item label="任务类型" prop="workType">
<span v-if="workForm.workType == '1'">入户安检</span>
<span v-if="workForm.workType == '2'">巡检</span>
<span v-if="workForm.workType == '3'">报警巡查</span>
<!--<span v-if="workForm.workType == '3'">报警巡查</span>-->
<span v-if="workForm.workType == '4'">其他</span>
</el-form-item>
</el-col>
......@@ -363,7 +363,7 @@
<el-form-item label="任务类型" prop="workType">
<span v-if="feedBookForm.workType == '1'">入户安检</span>
<span v-if="feedBookForm.workType == '2'">巡检</span>
<span v-if="feedBookForm.workType == '3'">报警巡查</span>
<!-- <span v-if="feedBookForm.workType == '3'">报警巡查</span>-->
<span v-if="feedBookForm.workType == '4'">其他</span>
</el-form-item>
</el-col>
......@@ -606,7 +606,7 @@ export default {
this.reset();
this.open = true;
this.isDetail = false;
this.title = "添加燃气任务";
this.title = "添加巡检巡查任务";
this.getEnterpriseLists();
},
/** 修改按钮操作 */
......
......@@ -139,7 +139,8 @@
z-index: 10;
top: 0;
height: 100%;
background: rgb(49 114 195 / 24%);
/* background: rgb(49 114 195 / 24%);*/
background: #FFFFFF;
transition: all 0.5s;
}
.main-show {
......@@ -163,8 +164,9 @@
padding: 0 15px;
font-size: 15px;
font-weight: bold;
background: rgb(87 114 153 / 44%);
color: white;
/*background: rgb(87 114 153 / 44%);*/
background: #f8f8f9;
color:#515a6e;
/* border-bottom: 1px solid #eee;*/
.close-btn {
display: inline-block;
......@@ -186,7 +188,7 @@
}
.switch {
position: absolute;
right: -35px;
right: -33px;
top: 250px;
i {
background: #fff;
......
......@@ -49,17 +49,24 @@
icon="el-icon-map-location"
@click="getVehicleTravel(scope.row)"
v-hasPermi="['system:info:remove']"
>车辆轨迹</el-button>
>车辆位置</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
<!-- <el-pagination
@current-change="handleCurrentChangvale"
:page-size="queryParams.pageSize"
layout="prev, pager, next, jumper"
:total="total"
:hide-on-single-page="total <= queryParams.pageSize"
:key="total + '' + queryParams.pageSize"
/>-->
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</drawer>
......@@ -210,6 +217,7 @@ import MapCar from "./component/MapCar";
import { EditorMap } from "@/utils/mapClass/map";
import { mapGetters, mapActions } from "vuex";
import drawer from "./component/drawer";
import NullVUe from "@/components/bigWindow/Null";
import moment from "moment";
export default {
name: "vechicle",
......@@ -288,7 +296,7 @@ export default {
"map",
{
center: path,
mapStyle: "amap://styles/f71d3a3d73e14f5b2bf5508bf1411758",
/* mapStyle: "amap://styles/f71d3a3d73e14f5b2bf5508bf1411758",*/
zoom: 14.5,
},
this
......@@ -440,16 +448,14 @@ export default {
paths.push([item.longitude,item.latitude]);
times.push(item.reportTime)
})
this.map.backTrack(this.backForm.vehicleId,paths,times);
this.map.backTrack(this.backForm.vehicleId,paths,times,NullVUe);
this.backOpen = false;
}
})
}
});
},
sleep (time) {
return new Promise((resolve) => setTimeout(resolve, time));
......
......@@ -16,8 +16,8 @@
</el-table-column>
<el-table-column label="状态" align="center" prop="detectorStatus">
<template slot-scope="scope">
<span v-if="scope.row.detectorStatus == 0">正常</span>
<span v-if="scope.row.detectorStatus == 1">离线</span>
<span v-if="scope.row.detectorStatus == 0" style="color: green">正常</span>
<span v-if="scope.row.detectorStatus == 1" style="color: red">离线</span>
<span v-if="scope.row.detectorStatus == 2">报警</span>
</template>
</el-table-column>
......
......@@ -9,15 +9,6 @@
placeholder="选择工程项目年度">
</el-date-picker>
</el-form-item>
<el-form-item label="门站地址" prop="gateStationAddress">
<el-input
v-model="queryParams.gateStationAddress"
placeholder="请输入门站地址"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
......@@ -75,20 +66,29 @@
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="工程项目年度" align="center" prop="projectYear" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.projectYear, '{y}-{m}-{d}') }}</span>
<span>{{ parseTime(scope.row.projectYear, '{y}') }}</span>
</template>
</el-table-column>
<el-table-column label="门站地址" align="center" prop="gateStationAddress" />
<el-table-column label="门站金额" align="center" prop="gateStationInvestment" />
<el-table-column label="门站数量" align="center" prop="numberGateStations" />
<el-table-column label="管道长度" align="center" prop="pipeLength" />
<el-table-column label="管道金额" align="center" prop="pipeInvestment" />
<el-table-column label="附件" align="center" prop="nearbyAddress">
<el-table-column label="企业名称" align="center" prop="enterpriseCode" >
<span slot-scope="scope" v-if="scope.row.enterpriseCode">{{scope.row.enterpriseCode}}</span>
<span v-else>-</span>
</el-table-column>
<el-table-column label="门站数量(个)" align="center" prop="numberGateStations" />
<el-table-column label="门站投资额(万元)" align="center" prop="gateStationInvestment">
<span slot-scope="scope" v-if="scope.row.gateStationInvestment">{{scope.row.gateStationInvestment}}</span>
<span v-else>-</span>
</el-table-column>
<el-table-column label="管道长度(米)" align="center" prop="pipeLength" />
<el-table-column label="管道投资额(万元)" align="center" prop="pipeInvestment" >
<span slot-scope="scope" v-if="scope.row.pipeInvestment">{{scope.row.pipeInvestment}}</span>
<span v-else>-</span>
</el-table-column>
<el-table-column label="附件" align="center" prop="nearbyAddress" >
<template slot-scope="scope">
<span
class="dbtn"
@click="checkFile(scope.row.nearbyAddress)"
v-if="scope.row.dealPlan != ''"
v-if="scope.row.nearbyAddress"
>
<i class="el-icon el-icon-view"></i>查看/下载
</span>
......@@ -126,8 +126,7 @@
<!-- 添加或修改工程项目信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="780px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form ref="form" :model="form" :rules="rules" label-width="90px">
<el-row>
<el-col :span="11">
<el-form-item label="项目年度" prop="projectYear">
......@@ -141,39 +140,53 @@
</el-col>
<el-col :span="11">
<el-form-item label="门站地址" prop="gateStationAddress">
<el-input v-model="form.gateStationAddress" placeholder="请输入门站地址" />
<el-form-item label="企业名称" prop="enterpriseCode">
<el-input :disabled="true" v-model="form.enterpriseCode" placeholder="企业名称" >
</el-input>
</el-form-item>
</el-col>
</el-row>
<div class="tableTitle">
<img :src="stationImg" style="width: 24px; height: 25px;position: relative; left: -326px; top: -12px;"/>
<span class="midText">门站</span>
</div>
<el-row>
<el-col :span="11">
<el-form-item label="门站数量" prop="numberGateStations">
<el-input @change="numberGateStations()" v-model="form.numberGateStations" placeholder="请输入门站数量" />
<el-input @change="numberGateStations()" v-model="form.numberGateStations" placeholder="请输入门站数量" >
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="门站额" prop="gateStationInvestment">
<el-input :disabled="isGateStationDisabled" v-model="form.gateStationInvestment" placeholder="请输入门站额" >
<template slot="append"></template>
<el-form-item label="门站投资额" prop="gateStationInvestment">
<el-input :disabled="isGateStationDisabled" v-model="form.gateStationInvestment" placeholder="请输入门站投资额" >
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<div class="tableTitle">
<img :src="bookImg" style="width: 24px; height: 25px; position: relative; left: -326px; top: -12px;"/>
<span class="midText">管道</span>
</div>
<el-row>
<el-col :span="11">
<el-form-item label="管道长度" prop="pipeLength">
<el-input @change="conduitGateStations()" v-model="form.pipeLength" placeholder="请输入管道长度" />
<el-input @change="conduitGateStations()" v-model="form.pipeLength" placeholder="请输入管道长度" >
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="管道额" prop="pipeInvestment">
<el-input :disabled="isPipelineAmount" v-model="form.pipeInvestment" placeholder="请输入管道额" >
<template slot="append"></template>
<el-form-item label="管道投资额" prop="pipeInvestment">
<el-input :disabled="isPipelineAmount" v-model="form.pipeInvestment" placeholder="请输入管道投资额" >
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
......@@ -220,6 +233,8 @@ export default {
},
data() {
return {
stationImg: require('@/assets/project/station.png'),
bookImg: require('@/assets/project/theConduit.png'),
// 上传文件列表
fileList: [],
//门站金额输入框是否输入
......@@ -251,7 +266,6 @@ export default {
pageNum: 1,
pageSize: 10,
projectYear: null,
gateStationAddress: null,
gateStationInvestment: null,
numberGateStations: null,
pipeLength: null,
......@@ -325,10 +339,9 @@ export default {
this.form = {
projectId: null,
projectYear: null,
gateStationAddress: null,
gateStationInvestment: null,
numberGateStations: null,
pipeLength: null,
numberGateStations: 0,
pipeLength: 0,
pipeInvestment: null,
nearbyAddress: null,
createBy: null,
......@@ -336,7 +349,8 @@ export default {
updateBy: null,
updateTime: null,
isDel: null,
remarks: null
remarks: null,
enterpriseCode:null
};
this.resetForm("form");
this.fileList = [];
......@@ -482,4 +496,23 @@ export default {
border-width: 1px;
border-color: rgb(48, 180, 107);
}
.tableTitle {
position: relative;
margin: 24px auto;
width: 600px;
height: 2px;
background-color: #d4d4d4;
text-align: center;
font-size: 16px;
color: rgba(101, 101, 101, 1);
}
.midText {
position: absolute;
left: 3%;
background-color: #ffffff;
padding: 0 15px;
transform: translateX(-50%) translateY(-50%);
}
</style>
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