Commit 3476260f authored by wuqinghua's avatar wuqinghua

Merge remote-tracking branch 'origin/master'

parents 7b121ea3 55b10c5e
...@@ -84,7 +84,7 @@ public class TWorkOrderController extends BaseController ...@@ -84,7 +84,7 @@ public class TWorkOrderController extends BaseController
List<Integer> postIds = iSysPostService.selectPostListByUserId(user.getUserId()); List<Integer> postIds = iSysPostService.selectPostListByUserId(user.getUserId());
for(Integer postId : postIds){ for(Integer postId : postIds){
SysPost postInfo = iSysPostService.selectPostById(postId.longValue()); SysPost postInfo = iSysPostService.selectPostById(postId.longValue());
if("se".equals(postInfo.getPostCode())){ if("se".equals(postInfo.getPostCode()) && postIds.size()==1){
tWorkOrder.setWorkAssignManId(user.getUserId()); tWorkOrder.setWorkAssignManId(user.getUserId());
} }
} }
......
...@@ -112,7 +112,11 @@ ...@@ -112,7 +112,11 @@
<groupId>eu.bitwalker</groupId> <groupId>eu.bitwalker</groupId>
<artifactId>UserAgentUtils</artifactId> <artifactId>UserAgentUtils</artifactId>
</dependency> </dependency>
<!-- websocket 支持 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
<!-- servlet包 --> <!-- servlet包 -->
<dependency> <dependency>
<groupId>javax.servlet</groupId> <groupId>javax.servlet</groupId>
......
package com.zehong.common.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
@Configuration
public class WebSocketConfig {
@Bean
public ServerEndpointExporter serverEndpointExporter() {
return new ServerEndpointExporter();
}
}
...@@ -98,7 +98,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter ...@@ -98,7 +98,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
// 过滤请求 // 过滤请求
.authorizeRequests() .authorizeRequests()
// 对于登录login 验证码captchaImage 允许匿名访问 // 对于登录login 验证码captchaImage 允许匿名访问
.antMatchers("/login", "/captchaImage", "/detector/detectorReport/**").anonymous() .antMatchers("/login", "/captchaImage","/websocket/**","/websocketServer", "/detector/detectorReport/**").anonymous()
.antMatchers( .antMatchers(
HttpMethod.GET, HttpMethod.GET,
"/*.html", "/*.html",
......
package com.zehong.system.controller; package com.zehong.system.controller;
import java.util.List; import java.util.List;
import com.alibaba.fastjson.JSONObject;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
......
package com.zehong.system.controller;
import com.alibaba.fastjson.JSONObject;
import com.zehong.system.domain.TEventReceive;
import com.zehong.system.service.ITEventReceiveService;
import com.zehong.system.service.WebSocketServer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@RestController
@RequestMapping("/websocket")
public class WebSocketController {
private static final Logger log = LoggerFactory.getLogger(WebSocketController.class);
@Autowired
private WebSocketServer webSocketServer;
@Autowired
private ITEventReceiveService tEventReceiveService;
@GetMapping("/send")
public void send(Integer enterpriseId){
try {
//List<TEventReceive> list = tEventReceiveService.getReadReceiveList( enterpriseId);
webSocketServer.batchSendMessage(JSONObject.toJSONString("success"));
} catch (Exception e) {
log.error("wesocket发送失败!");
}
}
}
...@@ -24,6 +24,9 @@ public class TEventHandle extends BaseEntity ...@@ -24,6 +24,9 @@ public class TEventHandle extends BaseEntity
@Excel(name = "事件id") @Excel(name = "事件id")
private Long eventId; private Long eventId;
@Excel(name = "类型")
private Integer eventType;
/** 企业id */ /** 企业id */
@Excel(name = "企业id") @Excel(name = "企业id")
private Long enterpriseId; private Long enterpriseId;
...@@ -56,9 +59,27 @@ public class TEventHandle extends BaseEntity ...@@ -56,9 +59,27 @@ public class TEventHandle extends BaseEntity
@Excel(name = "指导时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @Excel(name = "指导时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date guidanceTime; private Date guidanceTime;
private Integer readStatus;
/** 0未删除 1已删除 */ /** 0未删除 1已删除 */
private Integer isDel; 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() { public String getPlanTitle() {
return planTitle; return planTitle;
} }
......
...@@ -70,11 +70,30 @@ public class TEventReceive extends BaseEntity ...@@ -70,11 +70,30 @@ public class TEventReceive extends BaseEntity
/** 备注 */ /** 备注 */
private String remarks; private String remarks;
private Integer companyRead;
private Integer governmentRead;
/** 0未删除 1已删除 */ /** 0未删除 1已删除 */
private Integer isDel; private Integer isDel;
@Excel(name = "状态") @Excel(name = "状态")
private Integer status; 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) public void setId(Integer id)
{ {
this.id = id; this.id = id;
......
...@@ -34,8 +34,8 @@ public class TVehicleLocationInfo extends BaseEntity ...@@ -34,8 +34,8 @@ public class TVehicleLocationInfo extends BaseEntity
private BigDecimal latitude; private BigDecimal latitude;
/** 创建时间 */ /** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date reportTime; private Date reportTime;
/** 是否删除(0正常,1删除) */ /** 是否删除(0正常,1删除) */
......
...@@ -94,8 +94,8 @@ public class TWorkOrder extends BaseEntity ...@@ -94,8 +94,8 @@ public class TWorkOrder extends BaseEntity
private String responsiblePerson; private String responsiblePerson;
/** 截止日期 */ /** 截止日期 */
@JsonFormat(pattern = "yyyy-MM-dd") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "截止日期", width = 30, dateFormat = "yyyy-MM-dd") @Excel(name = "截止日期", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date expiryDate; private Date expiryDate;
/** 是否删除(0正常,1删除) */ /** 是否删除(0正常,1删除) */
......
package com.zehong.system.domain;
import javax.websocket.Session;
import java.util.concurrent.atomic.AtomicInteger;
/**
* <websocket信息对象>
* <用于存储secket连接信息>
* @author wzh
* @version 2018-07-08 18:49
* @see [相关类/方法] (可选)
**/
public class WebSocketBean {
/**
* 连接session对象
*/
private Session session;
/**
* 连接错误次数
*/
private AtomicInteger erroerLinkCount = new AtomicInteger(0);
public int getErroerLinkCount() {
// 线程安全,以原子方式将当前值加1,注意:这里返回的是自增前的值
return erroerLinkCount.getAndIncrement();
}
public void cleanErrorNum()
{
// 清空计数
erroerLinkCount = new AtomicInteger(0);
}
public Session getSession() {
return session;
}
public void setSession(Session session) {
this.session = session;
}
}
\ No newline at end of file
...@@ -58,4 +58,6 @@ public interface TEventReceiveMapper ...@@ -58,4 +58,6 @@ public interface TEventReceiveMapper
* @return 结果 * @return 结果
*/ */
public int deleteTEventReceiveByIds(String[] ids); public int deleteTEventReceiveByIds(String[] ids);
public List<TEventReceive> getReadReceiveList(Integer enterpriseId);
} }
...@@ -58,4 +58,6 @@ public interface ITEventReceiveService ...@@ -58,4 +58,6 @@ public interface ITEventReceiveService
* @return 结果 * @return 结果
*/ */
public int deleteTEventReceiveById(String id); public int deleteTEventReceiveById(String id);
public List<TEventReceive> getReadReceiveList(Integer enterpriseId);
} }
package com.zehong.system.service;
import javax.websocket.EndpointConfig;
import javax.websocket.Session;
/**
* <基于javax websocket通讯>
* <功能详细描述>
* @author wzh
* @version 2018-07-08 17:11
* @see [相关类/方法] (可选)
**/
public interface WebSocketServer {
/**
* 连接建立成功调用的方法
* @param session session 对象
*/
public void onOpen(Session session, EndpointConfig config);
/**
* 断开连接方法
*/
public void onClose(Session session);
/**
* 收到客户端消息后调用的方法
* @param session session 对象
* @param message 返回客户端的消息
*/
public void onMessage(Session session, String message);
/**
* 发生异常时触发的方法
* @param session session 对象
* @param throwable 抛出的异常
*/
public void onError(Session session, Throwable throwable);
/**
* 向单个客户端发送消息
* @param session session 对象
* @param message 发送给客户端的消息
*/
public void sendMessage(Session session, String message);
/**
* 向所有在线用户群发消息
* @param message 发送给客户端的消息
*/
public void batchSendMessage(String message);
}
\ No newline at end of file
package com.zehong.system.service.impl; package com.zehong.system.service.impl;
import java.util.List; import java.util.List;
import com.alibaba.fastjson.JSONObject;
import com.zehong.common.utils.DateUtils; import com.zehong.common.utils.DateUtils;
import com.zehong.system.controller.WebSocketController;
import com.zehong.system.service.WebSocketServer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TEventReceiveMapper; import com.zehong.system.mapper.TEventReceiveMapper;
...@@ -14,11 +19,14 @@ import com.zehong.system.service.ITEventReceiveService; ...@@ -14,11 +19,14 @@ import com.zehong.system.service.ITEventReceiveService;
* @author zehong * @author zehong
* @date 2022-03-18 * @date 2022-03-18
*/ */
@Slf4j
@Service @Service
public class TEventReceiveServiceImpl implements ITEventReceiveService public class TEventReceiveServiceImpl implements ITEventReceiveService
{ {
@Autowired @Autowired
private TEventReceiveMapper tEventReceiveMapper; private TEventReceiveMapper tEventReceiveMapper;
@Autowired
private WebSocketServer webSocketServer;
/** /**
* 查询事件接报 * 查询事件接报
...@@ -69,7 +77,14 @@ public class TEventReceiveServiceImpl implements ITEventReceiveService ...@@ -69,7 +77,14 @@ public class TEventReceiveServiceImpl implements ITEventReceiveService
@Override @Override
public int updateTEventReceive(TEventReceive tEventReceive) public int updateTEventReceive(TEventReceive tEventReceive)
{ {
return tEventReceiveMapper.updateTEventReceive(tEventReceive); int a = tEventReceiveMapper.updateTEventReceive(tEventReceive);
try {
//List<TEventReceive> list = tEventReceiveService.getReadReceiveList( enterpriseId);
webSocketServer.batchSendMessage(JSONObject.toJSONString("success"));
} catch (Exception e) {
log.error("wesocket发送失败!");
}
return a;
} }
/** /**
...@@ -95,4 +110,9 @@ public class TEventReceiveServiceImpl implements ITEventReceiveService ...@@ -95,4 +110,9 @@ public class TEventReceiveServiceImpl implements ITEventReceiveService
{ {
return tEventReceiveMapper.deleteTEventReceiveById(id); return tEventReceiveMapper.deleteTEventReceiveById(id);
} }
@Override
public List<TEventReceive> getReadReceiveList(Integer enterpriseId){
return tEventReceiveMapper.getReadReceiveList(enterpriseId);
}
} }
package com.zehong.system.service.impl;
import com.zehong.system.domain.WebSocketBean;
import com.zehong.system.service.WebSocketServer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.web.servlet.server.Session;
import org.springframework.stereotype.Component;
import javax.websocket.*;
import javax.websocket.server.ServerEndpoint;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
/**
* <基于javax websocket通讯>
* <各个方法的参数都是可以根据项目的实际情况改的>
* @author wzh
* @version 2018-07-08 17:11
* @see [相关类/方法] (可选)
**/
@ServerEndpoint(value = "/websocketServer")
@Component("webSocketService")
public class WebSocketServiceImpl implements WebSocketServer {
private Logger log = LoggerFactory.getLogger(WebSocketServiceImpl.class);
/**
* 错误最大重试次数
*/
private static final int MAX_ERROR_NUM = 10;
/**
* 用来存放每个客户端对应的webSocket对象。
*/
private static Map<String,WebSocketBean> webSocketInfo;
static
{
// concurrent包的线程安全map
webSocketInfo = new ConcurrentHashMap<>();
}
@OnOpen
@Override
public void onOpen(javax.websocket.Session session, EndpointConfig config) {
// 如果是session没有激活的情况,就是没有请求获取或session,这里可能会取出空,需要实际业务处理
/* HttpSession httpSession= (HttpSession) config.getUserProperties().get(HttpSession.class.getName());
if(httpSession != null)
{
log.info("获取到httpsession" + httpSession.getId());
}else {
log.error("未获取到httpsession");
}*/
// 连接成功当前对象放入websocket对象集合
WebSocketBean bean = new WebSocketBean();
bean.setSession(session);
webSocketInfo.put(session.getId(),bean);
log.info("客户端连接服务器session id :"+session.getId()+",当前连接数:" + webSocketInfo.size());
}
@OnClose
@Override
public void onClose(javax.websocket.Session session) {
// 客户端断开连接移除websocket对象
webSocketInfo.remove(session.getId());
log.info("客户端断开连接,当前连接数:" + webSocketInfo.size());
}
@OnMessage
@Override
public void onMessage(javax.websocket.Session session, String message) {
log.info("客户端 session id: "+session.getId()+",消息:" + message);
// 此方法为客户端给服务器发送消息后进行的处理,可以根据业务自己处理,这里返回页面
sendMessage(session, "服务端返回" + message);
}
@OnError
@Override
public void onError(javax.websocket.Session session, Throwable throwable) {
log.error("发生错误"+ throwable.getMessage(),throwable);
}
@Override
public void sendMessage(javax.websocket.Session session, String message) {
try
{
// 发送消息
session.getBasicRemote().sendText(message);
// 清空错误计数
webSocketInfo.get(session.getId()).cleanErrorNum();
}
catch (Exception e)
{
log.error("发送消息失败"+ e.getMessage(),e);
int errorNum = webSocketInfo.get(session.getId()).getErroerLinkCount();
// 小于最大重试次数重发
if(errorNum <= MAX_ERROR_NUM)
{
sendMessage(session, message);
}
else{
log.error("发送消息失败超过最大次数");
// 清空错误计数
webSocketInfo.get(session.getId()).cleanErrorNum();
}
}
}
@Override
public void batchSendMessage(String message) {
Set<Map.Entry<String, WebSocketBean>> set = webSocketInfo.entrySet();
for (Map.Entry<String, WebSocketBean> map : set)
{
sendMessage(map.getValue().getSession(),message);
}
}
}
...@@ -43,6 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -43,6 +43,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="licenseValidityTime != null and licenseValidityTime != ''"> and license_validity_time = #{licenseValidityTime}</if> <if test="licenseValidityTime != null and licenseValidityTime != ''"> and license_validity_time = #{licenseValidityTime}</if>
<if test="annualSupervisionInspection != null and annualSupervisionInspection != ''"> and annual_supervision_inspection = #{annualSupervisionInspection}</if> <if test="annualSupervisionInspection != null and annualSupervisionInspection != ''"> and annual_supervision_inspection = #{annualSupervisionInspection}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if> <if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
<if test="enterpriseId != null and enterpriseId != ''"> and enterprise_id = #{enterpriseId}</if>
</where> </where>
group by enterprise_id desc group by enterprise_id desc
</select> </select>
......
...@@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="TEventHandle" id="TEventHandleResult"> <resultMap type="TEventHandle" id="TEventHandleResult">
<result property="handleId" column="handle_id" /> <result property="handleId" column="handle_id" />
<result property="eventId" column="event_id" /> <result property="eventId" column="event_id" />
<result property="eventType" column="event_type" />
<result property="enterpriseId" column="enterprise_id" /> <result property="enterpriseId" column="enterprise_id" />
<result property="enterpriseName" column="enterprise_name" /> <result property="enterpriseName" column="enterprise_name" />
<result property="management" column="management" /> <result property="management" column="management" />
...@@ -21,13 +22,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -21,13 +22,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectTEventHandleVo"> <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> </sql>
<select id="selectTEventHandleList" parameterType="TEventHandle" resultMap="TEventHandleResult"> <select id="selectTEventHandleList" parameterType="TEventHandle" resultMap="TEventHandleResult">
<include refid="selectTEventHandleVo"/> <include refid="selectTEventHandleVo"/>
<where> <where>
<if test="eventId != null "> and event_id = #{eventId}</if> <if test="eventId != null "> and event_id = #{eventId}</if>
<if test="eventType != null "> and event_type = #{eventType}</if>
</where> </where>
</select> </select>
...@@ -40,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -40,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into t_event_handle insert into t_event_handle
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="eventId != null">event_id,</if> <if test="eventId != null">event_id,</if>
<if test="eventType != null">event_type,</if>
<if test="enterpriseId != null">enterprise_id,</if> <if test="enterpriseId != null">enterprise_id,</if>
<if test="enterpriseName != null">enterprise_name,</if> <if test="enterpriseName != null">enterprise_name,</if>
<if test="management != null">management,</if> <if test="management != null">management,</if>
...@@ -54,6 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -54,6 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="eventId != null">#{eventId},</if> <if test="eventId != null">#{eventId},</if>
<if test="eventType != null">#{eventType},</if>
<if test="enterpriseId != null">#{enterpriseId},</if> <if test="enterpriseId != null">#{enterpriseId},</if>
<if test="enterpriseName != null">#{enterpriseName},</if> <if test="enterpriseName != null">#{enterpriseName},</if>
<if test="management != null">#{management},</if> <if test="management != null">#{management},</if>
...@@ -72,6 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -72,6 +76,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update t_event_handle update t_event_handle
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="eventId != null">event_id = #{eventId},</if> <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="enterpriseId != null">enterprise_id = #{enterpriseId},</if>
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if> <if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
<if test="management != null">management = #{management},</if> <if test="management != null">management = #{management},</if>
......
...@@ -20,14 +20,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -20,14 +20,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="enterpriseId" column="enterprise_id" /> <result property="enterpriseId" column="enterprise_id" />
<result property="enterpriseName" column="enterprise_name" /> <result property="enterpriseName" column="enterprise_name" />
<result property="remarks" column="remarks" /> <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="isDel" column="is_del" />
<result property="createTime" column="create_time" /> <result property="createTime" column="create_time" />
</resultMap> </resultMap>
<sql id="selectTEventReceiveVo"> <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> </sql>
<select id="getReadReceiveList" resultMap="TEventReceiveResult">
<include refid="selectTEventReceiveVo"/>
<where>
<if test="enterpriseId != null and enterpriseId != -2"> and enterprise_id = #{enterpriseId}</if>
</where>
</select>
<select id="selectTEventReceiveList" parameterType="TEventReceive" resultMap="TEventReceiveResult"> <select id="selectTEventReceiveList" parameterType="TEventReceive" resultMap="TEventReceiveResult">
<include refid="selectTEventReceiveVo"/> <include refid="selectTEventReceiveVo"/>
<where> <where>
...@@ -36,6 +44,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -36,6 +44,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="eventGrade != null "> and event_grade = #{eventGrade}</if> <if test="eventGrade != null "> and event_grade = #{eventGrade}</if>
<if test="enterpriseId != null and enterpriseId != ''"> and enterprise_id = #{enterpriseId}</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="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> <if test="status ==5"> and status !=4 </if>
and is_del = 0 and is_del = 0
</where> </where>
...@@ -65,6 +75,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -65,6 +75,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="enterpriseId != null">enterprise_id,</if> <if test="enterpriseId != null">enterprise_id,</if>
<if test="enterpriseName != null">enterprise_name,</if> <if test="enterpriseName != null">enterprise_name,</if>
<if test="remarks != null">remarks,</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="isDel != null">is_del,</if>
<if test="createTime != null">create_time,</if> <if test="createTime != null">create_time,</if>
</trim> </trim>
...@@ -84,6 +96,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -84,6 +96,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="enterpriseId != null">#{enterpriseId},</if> <if test="enterpriseId != null">#{enterpriseId},</if>
<if test="enterpriseName != null">#{enterpriseName},</if> <if test="enterpriseName != null">#{enterpriseName},</if>
<if test="remarks != null">#{remarks},</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="isDel != null">#{isDel},</if>
<if test="createTime != null">#{createTime},</if> <if test="createTime != null">#{createTime},</if>
</trim> </trim>
...@@ -106,6 +120,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -106,6 +120,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="enterpriseId != null">enterprise_id = #{enterpriseId},</if> <if test="enterpriseId != null">enterprise_id = #{enterpriseId},</if>
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if> <if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
<if test="remarks != null">remarks = #{remarks},</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="isDel != null">is_del = #{isDel},</if>
<if test="createTime != null">create_time = #{createTime},</if> <if test="createTime != null">create_time = #{createTime},</if>
</trim> </trim>
......
<svg width="18" height="25" viewBox="0 0 22 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16.7 31.3658H5.30019C4.62592 31.3658 4.09277 30.817 4.09277 30.1584V28.559C4.09277 27.8847 4.6416 27.3516 5.30019 27.3516H16.7157C17.39 27.3516 17.9231 27.9004 17.9231 28.559V30.1584C17.9231 30.817 17.3743 31.3658 16.7 31.3658V31.3658Z" fill="#006AA6"/>
<path d="M5.66113 28.9141H16.3397V29.7765H5.66113V28.9141Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.2417 1.59943H6.74272V4.84533H15.2417V1.59943ZM4.62583 1.56807H17.3742C17.8133 1.56807 18.1583 1.22309 18.1583 0.784034C18.1583 0.344975 17.8133 0 17.3742 0H4.62583C4.18677 0 3.8418 0.344975 3.8418 0.784034C3.8418 1.22309 4.18677 1.56807 4.62583 1.56807ZM9.34556 3.93749H12.6699C13.0932 3.93749 13.4382 3.59251 13.4382 3.15345C13.4382 2.71439 13.0932 2.36942 12.6542 2.36942H9.34556C8.9065 2.36942 8.56152 2.71439 8.56152 3.15345C8.56152 3.59251 8.9065 3.93749 9.34556 3.93749Z" fill="#006AA6"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M15.6181 0.03125H6.38222C5.5825 0.03125 5.1748 0.438948 5.1748 1.23866V5.22156C5.1748 6.02127 5.5825 6.42897 6.38222 6.42897H15.6181C16.4179 6.42897 16.8256 6.02127 16.8256 5.22156V1.23866C16.8256 0.438948 16.4179 0.03125 15.6181 0.03125ZM9.3457 3.93498H12.67C13.0934 3.93498 13.4384 3.59 13.4384 3.15094C13.4384 2.71188 13.0934 2.36691 12.6543 2.36691H9.3457C8.90664 2.36691 8.56166 2.71188 8.56166 3.15094C8.56166 3.59 8.90664 3.93498 9.3457 3.93498Z" fill="#006AA6"/>
<path d="M19.3189 7.60552C18.6133 6.89989 17.6567 6.49219 16.6532 6.49219H5.3474C4.34384 6.49219 3.38732 6.8842 2.68169 7.60552C1.97606 8.31115 1.56836 9.26767 1.56836 10.2712V23.5685C1.56836 24.572 1.96038 25.5285 2.68169 26.2342C3.38732 26.9398 4.34384 27.3475 5.3474 27.3475H16.6532C17.6567 27.3475 18.6133 26.9555 19.3189 26.2342C20.0245 25.5285 20.4322 24.572 20.4322 23.5685V10.2712C20.4322 9.26767 20.0245 8.31115 19.3189 7.60552ZM16.1671 19.4915C16.1044 20.6518 15.5869 21.7495 14.7401 22.5335C13.6111 23.443 12.1999 23.8977 10.7572 23.8037H10.7259C9.78504 23.8193 8.8442 23.5998 8.01312 23.1608C7.26045 22.7531 6.63322 22.1729 6.19416 21.4516C4.97107 19.2092 4.93971 16.4965 6.10008 14.2228C6.25688 13.8935 6.63322 13.7053 6.99388 13.7837C7.35453 13.8621 7.6211 14.1757 7.60542 14.5521C7.60542 15.2263 7.90336 15.8692 8.4365 16.3083C8.54626 15.6183 8.75011 14.9441 9.04805 14.3012C9.76936 12.7331 10.8356 11.3689 12.1685 10.3026C12.4351 10.0987 12.7957 10.0674 13.078 10.2399C13.3602 10.4124 13.5014 10.7417 13.4386 11.0709C13.078 12.3881 13.0937 13.768 13.4857 15.0695C13.7679 15.4302 14.0815 15.7595 14.4422 16.0417C15.6026 16.7944 16.2768 18.1116 16.1671 19.4915Z" fill="#006AA6"/>
<path d="M16.6529 4.92578H5.34711C2.39914 4.92578 0 7.32493 0 10.2729V23.5701C0 26.5181 2.39914 28.9172 5.34711 28.9172H16.6529C19.6009 28.9172 22 26.5181 22 23.5701V10.2729C22 7.32493 19.6165 4.92578 16.6529 4.92578ZM16.1668 19.4931C16.1041 20.6535 15.5866 21.7512 14.7398 22.5352C13.6108 23.4447 12.1996 23.8994 10.7569 23.8053H10.7256C9.78475 23.821 8.84391 23.6015 8.01283 23.1624C7.26016 22.7547 6.63293 22.1745 6.19387 21.4532C4.97078 19.2109 4.93941 16.4981 6.09979 14.2244C6.25659 13.8951 6.63293 13.707 6.99359 13.7854C7.35424 13.8638 7.62081 14.1774 7.60513 14.5537C7.60513 15.228 7.90306 15.8709 8.43621 16.31C8.54597 15.62 8.74982 14.9457 9.04776 14.3028C9.76907 12.7348 10.8354 11.3705 12.1682 10.3043C12.4348 10.1004 12.7954 10.069 13.0777 10.2415C13.3599 10.414 13.5011 10.7433 13.4383 11.0726C13.0777 12.3898 13.0934 13.7697 13.4854 15.0712C13.7676 15.4318 14.0813 15.7611 14.4419 16.0434C15.6023 16.7961 16.2766 18.1132 16.1668 19.4931Z" fill="#006AA6"/>
</svg>
.gass-vehiche { .gass-vehiche {
.el-table { /*.el-table {
background-color: rgba(0, 0, 0, 0) !important; background-color: rgba(0, 0, 0, 0) !important;
.el-table__body { .el-table__body {
width: 100% !important; width: 100% !important;
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
// margin-left: 1px; // margin-left: 1px;
} }
} }
} }*/
// 滚动条样式 // 滚动条样式
...@@ -69,7 +69,9 @@ ...@@ -69,7 +69,9 @@
.drawer{ .drawer{
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 10px; width: 10px;
background: #012a53; //background: #012a53;
background: #f8f8f9;
position: absolute; position: absolute;
top: 0; top: 0;
//display:none //display:none
...@@ -79,7 +81,7 @@ ...@@ -79,7 +81,7 @@
/*滚动条里面小方块*/ /*滚动条里面小方块*/
// border-radius: 10px; // border-radius: 10px;
// box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); // box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
background: #cccccccc; background: #cccccc;
border-radius: 8px; border-radius: 8px;
} }
::-webkit-scrollbar-track { ::-webkit-scrollbar-track {
...@@ -101,7 +103,7 @@ ...@@ -101,7 +103,7 @@
.el-pagination { /* .el-pagination {
button:disabled { button:disabled {
background-color: rgba(0, 0, 0, 0); background-color: rgba(0, 0, 0, 0);
} }
...@@ -166,5 +168,5 @@ ...@@ -166,5 +168,5 @@
background-color: rgba(0, 0, 0, 0); background-color: rgba(0, 0, 0, 0);
border-color: #1890ff; border-color: #1890ff;
//color: #fff; //color: #fff;
} }*/
} }
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
:before-upload="handleBeforeUpload" :before-upload="handleBeforeUpload"
:file-list="fileArr" :file-list="fileArr"
:limit="1" :limit="1"
:fileType="fileType"
:list-type="listType" :list-type="listType"
:on-error="handleUploadError" :on-error="handleUploadError"
:on-exceed="handleExceed" :on-exceed="handleExceed"
......
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2022-01-26 20:07:52 * @Date: 2022-01-26 20:07:52
* @LastEditTime: 2022-03-16 17:32:38 * @LastEditTime: 2022-03-23 15:19:40
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
style="width: 100px; height: 100px" style="width: 100px; height: 100px"
:src="deviceData.pictureAddress" :src="deviceData.pictureAddress"
:preview-src-list="[deviceData.pictureAddress ]" :preview-src-list="[deviceData.pictureAddress ]"
z-index=99999 :z-index="999999"
> >
</el-image> </el-image>
<div class="imgtext" v-else>暂无图片</div> <div class="imgtext" v-else>暂无图片</div>
......
<!-- <!--
* @Author: your name * @Author: your name
* @Date: 2022-01-26 20:07:52 * @Date: 2022-01-26 20:07:52
* @LastEditTime: 2022-03-16 17:29:11 * @LastEditTime: 2022-03-23 15:23:34
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
style="width: 100px; height: 100px" style="width: 100px; height: 100px"
:src="deviceData.iconUrl" :src="deviceData.iconUrl"
:preview-src-list="[deviceData.iconUrl ]" :preview-src-list="[deviceData.iconUrl ]"
z-index=99999 :z-index="999999"
> >
</el-image> </el-image>
<div class="imgtext" v-else>暂无图片</div> <div class="imgtext" v-else>暂无图片</div>
......
<!--
* @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>
...@@ -49,87 +49,42 @@ ...@@ -49,87 +49,42 @@
</div> </div>
</div> </div>
<div class="" style="padding: 0px 10px"> <div class="" style="padding: 0px 10px">
<div <div class="yujingleft yujing">
class="yujingleft yujing" <div class="yujingtop">
style="width: 33%; height: 90px; float: left"
>
<div
class="yujingtop"
style="
width: 70px;
height: 90px;
float: left;
margin-top: 15px;
text-align: right;
"
>
<img <img
src="@/assets/mapinages/group786.png" src="@/assets/mapinages/group786.png"
alt="" alt=""
style="width: 50px; height: 50px" style="width: 50px; height: 50px"
/> />
</div> </div>
<div <div class="yujingbottom">
class="yujingbottom" <div>设备预警</div>
style="float: left; color: #cddbe4; margin-left: 10px"
>
<p>设备预警</p>
<span>2</span> <span>2</span>
</div> </div>
</div> </div>
<div <div class="yujingcenter yujing" >
class="yujingcenter yujing" <div class="yujingtop" >
style="width: 33%; height: 90px; float: left"
>
<div
class="yujingtop"
style="
width: 70px;
height: 90px;
float: left;
margin-top: 15px;
text-align: right;
"
>
<img <img
src="@/assets/mapinages/group787.png" src="@/assets/mapinages/group787.png"
alt="" alt=""
style="width: 50px; height: 50px" style="width: 50px; height: 50px"
/> />
</div> </div>
<div <div class="yujingbottom">
class="yujingbottom" <div>事件情况</div>
style="float: left; color: #cddbe4; margin-left: 10px"
>
<p>事件情况</p>
<span>2</span> <span>2</span>
</div> </div>
</div> </div>
<div <div class="yujingright yujing" >
class="yujingright yujing" <div class="yujingtop">
style="width: 33%; height: 90px; float: left"
>
<div
class="yujingtop"
style="
width: 70px;
height: 90px;
float: left;
margin-top: 15px;
text-align: right;
"
>
<img <img
src="@/assets/mapinages/group788.png" src="@/assets/mapinages/group788.png"
alt="" alt=""
style="width: 50px; height: 50px" style="width: 50px; height: 50px"
/> />
</div> </div>
<div <div class="yujingbottom">
class="yujingbottom" <div>隐患数量</div>
style="float: left; color: #cddbe4; margin-left: 10px"
>
<p>隐患数量</p>
<span>2</span> <span>2</span>
</div> </div>
</div> </div>
...@@ -1020,4 +975,33 @@ export default { ...@@ -1020,4 +975,33 @@ export default {
width: 440px; width: 440px;
margin-left: 20px; margin-left: 20px;
} }
.yj{
padding: 0px 10px;
}
.yujing{
width: 33%;
height: 90px;
float: left;
}
.yujingtop{
width: 70px;
height: 90px;
float: left;
margin-top: 15px;
text-align: right;
}
.yujingbottom{
float: left;
color: #cddbe4;
margin-left: 10px;
line-height: 35px;
padding: 10px 0 0 0;
}
.yujingbottom span{
font-family: 'arialbd';
font-size: 25px;
background-image:-webkit-linear-gradient(bottom,#f0c41b,#e4dbb7);
-webkit-background-clip:text;
-webkit-text-fill-color:transparent;
}
</style> </style>
<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: 18px;
height: 18px;
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: 8px;
height: 8px;
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: 1px;
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: 15px;
word-break: break-all;
margin-bottom: 16px;
color: #d9d9d9;
font-weight: 500;
/*display: inline;*/
}
.timeline-date {
font-size: 13px;
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 @@ ...@@ -14,8 +14,12 @@
<div style="width: 100%" v-for="item in receiveList"> <div style="width: 100%" v-for="item in receiveList">
<div class="el-form-div title-div"> <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==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==2" style="width: 80%;margin-left: 5px;">待处置<span
<div v-if="item.status==3" style="width: 80%;margin-left: 5px;">已处置</div> 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 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 style="height:30px;color: red;cursor:pointer;" v-if="userType==-2" @click="handleDelete(item.id)">取消事件</div>
</div> </div>
...@@ -23,29 +27,53 @@ ...@@ -23,29 +27,53 @@
<div class="content-div">发生时间:{{item.inforTime}}</div> <div class="content-div">发生时间:{{item.inforTime}}</div>
<div class="content-div">事件地点:{{item.address}}</div> <div class="content-div">事件地点:{{item.address}}</div>
<div class="el-form-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="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 v-if="userType!=-2" class="button-div" @click="showList(item.id)">信息处置</div>
<div class="button-div" @click="showDetail(item.id,item.eventName)">详情</div>
</div>
</div> </div>
<div id = "detail" class="show-detail" style="display: none;margin-top: 15px;margin-bottom: 20px;position:fixed;right: 470px;width: 300px;
background: rgba(0, 0, 0, 0.7);top: 110px">
<div class="el-form-div" style="height: 30px;">
<div class="detail-title">{{detailTitle}}</div>
<div style="cursor: pointer;" @click="closeDetail()">
<img style="width: 20px;height: 20px;margin-top: 5px;" src="@/assets/mapImages/closeBtn.png" alt="" />
</div> </div>
</div> </div>
<timeline :timeline-list="handleList"></timeline>
<div style="height: 40px;">
</div>
</div>
</div>
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
<el-row v-if="userType!=-2" :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5" v-if="userType!=-2">
<el-button <el-button
type="primary" type="primary"
plain plain
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
@click="handleAdd" @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-col>
</el-row> </el-row>
<el-table v-loading="loading" :data="handleList" > <el-table v-loading="loading" :data="handleList" >
<el-table-column label="处置信息" align="center" prop="management" /> <el-table-column label="类型" align="center" prop="eventType" :formatter="getType" width="120px"/>
<el-table-column label="处置附件" align="center" prop="managementEvent" width="150px"> <el-table-column label="处置信息/指导意见" align="center" prop="management" />
<el-table-column label="处置附件/引导方案" align="center" prop="managementEvent" width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
<span <span
class="dbtn" class="dbtn"
...@@ -57,49 +85,49 @@ ...@@ -57,49 +85,49 @@
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="指导意见" align="center" prop="guidanceOpinion" /> <!--<el-table-column label="指导意见" align="center" prop="guidanceOpinion" />-->
<el-table-column label="指导方案" align="center" prop="planUrl" > <!--<el-table-column label="指导方案" align="center" prop="planUrl" >-->
<template slot-scope="scope"> <!--<template slot-scope="scope">-->
<span <!--<span-->
class="dbtn" <!--class="dbtn"-->
@click="checkFile(scope.row.planUrl)" <!--@click="checkFile(scope.row.planUrl)"-->
v-if="scope.row.planUrl != null && scope.row.planUrl!=''" <!--v-if="scope.row.planUrl != null && scope.row.planUrl!=''"-->
> <!--&gt;-->
<i class="el-icon el-icon-view"></i>查看/下载 <!--<i class="el-icon el-icon-view"></i>查看/下载-->
</span> <!--</span>-->
<span v-else>-</span> <!--<span v-else>-</span>-->
</template> <!--</template>-->
</el-table-column> <!--</el-table-column>-->
<el-table-column label="指导时间" align="center" prop="guidanceTime" width="180"> <el-table-column label="创建时间" align="center" prop="createTime" width="180">
<!--<template slot-scope="scope">--> <!--<template slot-scope="scope">-->
<!--<span>{{ parseTime(scope.row.guidanceTime, '{y}-{m}-{d}') }}</span>--> <!--<span>{{ parseTime(scope.row.guidanceTime, '{y}-{m}-{d}') }}</span>-->
<!--</template>--> <!--</template>-->
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100"> <!--<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100">-->
<template slot-scope="scope"> <!--<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--> <!--<el-button-->
<!--v-if="userType==-2"-->
<!--size="mini"--> <!--size="mini"-->
<!--type="text"--> <!--type="text"-->
<!--icon="el-icon-edit"--> <!--icon="el-icon-edit"-->
<!--@click="handleUpdate(scope.row)"--> <!--@click="handleUpdate(scope.row)"-->
<!--v-hasPermi="['system:handle:edit']"--> <!--&gt;预案指引</el-button>-->
<!--&gt;修改</el-button>--> <!--<el-button-->
<el-button <!--v-if="userType!=-2"-->
v-if="userType==-2" <!--size="mini"-->
size="mini" <!--type="text"-->
type="text" <!--icon="el-icon-delete"-->
icon="el-icon-edit" <!--@click="handleDelete2(scope.row)"-->
@click="handleUpdate(scope.row)" <!--&gt;删除</el-button>-->
>预案指引</el-button> <!--</template>-->
<el-button <!--</el-table-column>-->
v-if="userType!=-2"
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete2(scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
...@@ -112,11 +140,11 @@ ...@@ -112,11 +140,11 @@
<!-- 添加或修改事件处置对话框 --> <!-- 添加或修改事件处置对话框 -->
<el-dialog :title="title2" :visible.sync="open2" width="550px" append-to-body> <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 ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="处置信息" prop="management"> <el-form-item label="处置信息" prop="management" :style="display">
<el-input v-model="form.management" type="textarea" :disabled="readonly1" placeholder="请输入处置信息" /> <el-input v-model="form.management" type="textarea" placeholder="请输入处置信息" />
</el-form-item> </el-form-item>
<el-form-item label="指导意见" prop="guidanceOpinion" :style="display2"> <el-form-item label="指导意见" prop="management" :style="display2">
<el-input v-model="form.guidanceOpinion" type="textarea" placeholder="请输入指导意见" /> <el-input v-model="form.management" type="textarea" placeholder="请输入指导意见" />
</el-form-item> </el-form-item>
<el-form-item label="应急预案" prop="planId" :style="display2"> <el-form-item label="应急预案" prop="planId" :style="display2">
<el-select v-model="form.planId" placeholder="请选择预案等级" @change="fananchange" > <el-select v-model="form.planId" placeholder="请选择预案等级" @change="fananchange" >
...@@ -131,6 +159,7 @@ ...@@ -131,6 +159,7 @@
<el-form-item label="处置附件" prop="managementEvent" :style="display"> <el-form-item label="处置附件" prop="managementEvent" :style="display">
<FileUpload <FileUpload
listType="picture" listType="picture"
:fileType="fileType"
@resFun="getFileInfo" @resFun="getFileInfo"
@remove="listRemove" @remove="listRemove"
:fileArr="fileList" :fileArr="fileList"
...@@ -148,10 +177,11 @@ ...@@ -148,10 +177,11 @@
</template> </template>
<script> <script>
import { mapGetters } from 'vuex'
import { listReceive, getReceive, delReceive, addReceive, updateReceive } from "@/api/system/receive"; import { listReceive, getReceive, delReceive, addReceive, updateReceive } from "@/api/system/receive";
import { listHandle, getHandle, delHandle, addHandle, updateHandle, exportHandle } from "@/api/system/handle"; import { listHandle, getHandle, delHandle, addHandle, updateHandle, exportHandle } from "@/api/system/handle";
import { listPlanInfo } from "@/api/system/planInfo"; import { listPlanInfo } from "@/api/system/planInfo";
import Timeline from "./Timeline";
import { getUserProfile } from "@/api/system/user"; import { getUserProfile } from "@/api/system/user";
import FileUpload from '@/components/FileUpload'; import FileUpload from '@/components/FileUpload';
let uploadfile = require("@/assets/uploadfile.png"); let uploadfile = require("@/assets/uploadfile.png");
...@@ -159,10 +189,12 @@ ...@@ -159,10 +189,12 @@
export default { export default {
components: { components: {
// RightPic, // RightPic,
FileUpload FileUpload,
Timeline
}, },
data() { data() {
return { return {
fileType:['png', 'jpg', 'jpeg',"doc", "xls", "ppt", "txt", "pdf"],
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
open2: false, open2: false,
...@@ -181,6 +213,7 @@ export default { ...@@ -181,6 +213,7 @@ export default {
status:5, status:5,
enterpriseId:"" enterpriseId:""
}, },
detailTitle:"",
form:'', form:'',
// 遮罩层 // 遮罩层
loading: true, loading: true,
...@@ -196,6 +229,8 @@ export default { ...@@ -196,6 +229,8 @@ export default {
pageSize: 10, pageSize: 10,
eventId: null, eventId: null,
}, },
dongtai:[
],
// 表单校验 // 表单校验
rules: { rules: {
management: [ management: [
...@@ -204,6 +239,11 @@ export default { ...@@ -204,6 +239,11 @@ export default {
} }
}; };
}, },
computed:{
...mapGetters([
"emergencyData"
]),
},
mounted() { mounted() {
// this.$nextTick(()=>{ // this.$nextTick(()=>{
// this.getScrollHeight(); // this.getScrollHeight();
...@@ -213,16 +253,79 @@ export default { ...@@ -213,16 +253,79 @@ export default {
if(this.userType!=-2){ if(this.userType!=-2){
this.queryParams.enterpriseId = response.data.deptId; this.queryParams.enterpriseId = response.data.deptId;
} }
this.getList(); this.getList(1);
}); });
this.socket();
// //定时检测新消息
// setInterval(() => {
//
// }, 5000);
}, },
watch:{
emergencyData:{
handler (val) {
this.showDetail(val.eventId,val.eventName);
console.log('深度监听:', val);
},
deep: true
}
},
methods: { methods: {
socket() {
console.log("socket执行");
this.ws = new WebSocket(
"ws://192.168.2.17:8903/gassafety/websocketServer"
);
this.ws.onopen = (evt) => {
console.log("WebSockets开启");
};
this.ws.onmessage = (evt) => {
console.log("推送", evt);
const obj = JSON.parse(evt.data);
console.log("接受socketobj", obj);
this.getNow();
};
this.ws.onclose = () => {
console.log("ws协议关闭");
};
},
getNow(){
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){
if(this.userType==-2){
item.governmentRead =0;
item.status=3;
}else {
item.companyRead =0;
}
}
});
});
});
},
/** 查询事件接报列表 */ /** 查询事件接报列表 */
getList() { getList(type) {
console.log("******"+type)
listReceive(this.queryParams).then(response => { listReceive(this.queryParams).then(response => {
this.receiveList = response.rows; this.receiveList = response.rows;
if(type==1){
if(this.$route.query.eventId!=undefined){
this.showDetail(this.$route.query.eventId,this.$route.query.eventName);
}
}
//this.total = response.total; //this.total = response.total;
console.log(this.receiveList) //console.log(this.receiveList)
}); });
}, },
//获取事件处置列表 //获取事件处置列表
...@@ -232,21 +335,33 @@ export default { ...@@ -232,21 +335,33 @@ export default {
this.handleList = response.rows; this.handleList = response.rows;
this.total = response.total; this.total = response.total;
this.loading = false; this.loading = false;
return response.total;
}); });
}, },
showList(id) { showList(id) {
this.open = true; this.open = true;
this.title = "事件处置"; this.title = "事件处置";
this.queryParams2.eventId= id this.queryParams2.eventId= id
if(this.userType==-2){
this.queryParams2.eventType= 2;
}else {
this.queryParams2.eventType= 1;
}
this.getHandleList(); this.getHandleList();
}, },
choice(val) { choice() {
console.log(val)
this.getList(); this.getList();
}, },
getType(row){
if(row.eventType==1){
return "处置信息"
}
return "预案指引"
},
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.fileList=[]
this.readonly1=false; this.readonly1=false;
this.display=""; this.display="";
this.display2="display:none"; this.display2="display:none";
...@@ -254,15 +369,17 @@ export default { ...@@ -254,15 +369,17 @@ export default {
this.title2 = "添加事件处置"; this.title2 = "添加事件处置";
this.form.eventId = this.queryParams2.eventId this.form.eventId = this.queryParams2.eventId
}, },
/** 修改按钮操作 */ /** 新增预案 */
handleUpdate(row) { handleUpdate() {
this.reset(); this.reset();
this.readonly1=true; this.readonly1=true;
this.display="display:none"; this.display="display:none";
this.display2=""; this.display2="";
this.form = row; //this.form = row;
this.open2 = true; this.open2 = true;
this.title2 = "预案指引"; this.title2 = "预案指引";
this.form.eventId = this.queryParams2.eventId
this.form.eventType=2;
this.yuanList(); this.yuanList();
}, },
yuanList(){ yuanList(){
...@@ -278,7 +395,7 @@ export default { ...@@ -278,7 +395,7 @@ export default {
return item.planId === value; return item.planId === value;
``}); ``});
this.form.planTitle = obj.planTitle; this.form.planTitle = obj.planTitle;
this.form.planUrl = obj.iconUrl; this.form.managementEvent = obj.iconUrl;
this.form.planId = value; this.form.planId = value;
}, },
// 表单重置 // 表单重置
...@@ -319,7 +436,13 @@ export default { ...@@ -319,7 +436,13 @@ export default {
}); });
}, },
upReceive(id){ upReceive(id){
var receiveform = {id:id,status:3} var receiveform = {id:id}
if(this.form.eventType==2){
receiveform.companyRead=0;
}else {
receiveform.status=3;
receiveform.governmentRead=0;
}
updateReceive(receiveform).then(response => { updateReceive(receiveform).then(response => {
}); });
}, },
...@@ -376,6 +499,44 @@ export default { ...@@ -376,6 +499,44 @@ export default {
assignTask(item){ assignTask(item){
this.$parent.handleUpdate(item); this.$parent.handleUpdate(item);
}, },
async showDetail(id,title){
var that = this;
that.detailTitle=title;
that.queryParams2.eventId= id
that.queryParams2.pageSize=100;
await listHandle(that.queryParams2).then(response => {
this.handleList = response.rows;
if(response.total==0){
this.msgSuccess("暂无详情");
}else{
document.getElementById("detail").style.display="";
that.updateRead(id);
}
});
},
closeDetail(id,event){
document.getElementById("detail").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){ getFileInfo(res){
//this.form.dealPlan = res.fileName; //this.form.dealPlan = res.fileName;
...@@ -462,7 +623,7 @@ export default { ...@@ -462,7 +623,7 @@ export default {
line-height: 25px; line-height: 25px;
text-align: center; text-align: center;
font-size: 15; font-size: 15;
margin-left: 15%; margin-left: 10%;
margin-top: 10px; margin-top: 10px;
} }
.title-div{ .title-div{
...@@ -506,6 +667,15 @@ export default { ...@@ -506,6 +667,15 @@ export default {
border-width: 0; border-width: 0;
color: rgb(48, 180, 107); color: rgb(48, 180, 107);
} }
.detail-title{
height: 100%;
width: 270px;
color: white;
margin-left: 20px;
}
.massage{
color: #00ffff;
}
.test-5::-webkit-scrollbar-track { .test-5::-webkit-scrollbar-track {
/*滚动条里面轨道*/ /*滚动条里面轨道*/
box-shadow : inset 0 0 5px rgba(0, 0, 0, 0.2); box-shadow : inset 0 0 5px rgba(0, 0, 0, 0.2);
......
...@@ -7,12 +7,34 @@ ...@@ -7,12 +7,34 @@
<div class="right-menu"> <div class="right-menu">
<template v-if="device!=='mobile'"> <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" /> --> <!-- <search id="header-search" class="right-menu-item" /> -->
          <el-badge :value="20" :max="99" class="item"> <!--          <el-badge :value="total" :max="99" class="item" >-->
            <i class="el-icon-chat-dot-round" style="width: 10px;height: 10px;"></i> <!--            <i class="el-icon-chat-dot-round" style="width: 10px;height: 10px;" ></i>-->
          </el-badge> <!--          </el-badge>-->
<el-dropdown class="avatar-container right-menu-item hover-effect" style="margin-right: 0px" trigger="click">
<div class="avatar-wrapper" >
<el-badge :value="total" :max="99" class="item" >
   <i class="el-icon-chat-dot-round" style="width: 10px;height: 10px;" ></i>
 </el-badge>
</div>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-if="total==0">
<span>暂无消息</span>
</el-dropdown-item>
<div v-for="(item,index) in receivedList" >
<el-dropdown-item v-if="index==0" @click.native="openMassage(item.id,item.eventName)">
<span>您有新消息:{{item.eventName}}</span>
</el-dropdown-item>
<el-dropdown-item v-if="index>0" divided @click.native="openMassage(item.id,item.eventName)">
<span>您有新消息:{{item.eventName}}</span>
</el-dropdown-item>
</div>
</el-dropdown-menu>
</el-dropdown>
<screenfull id="screenfull" class="right-menu-item hover-effect" /> <screenfull id="screenfull" class="right-menu-item hover-effect" />
<!-- <el-tooltip content="布局大小" effect="dark" placement="bottom"> <!-- <el-tooltip content="布局大小" effect="dark" placement="bottom">
...@@ -43,14 +65,15 @@ ...@@ -43,14 +65,15 @@
</template> </template>
<script> <script>
import { mapGetters } from 'vuex' import { mapGetters,mapMutations } from 'vuex'
import Breadcrumb from '@/components/Breadcrumb' import Breadcrumb from '@/components/Breadcrumb'
import TopNav from '@/components/TopNav' import TopNav from '@/components/TopNav'
import Hamburger from '@/components/Hamburger' import Hamburger from '@/components/Hamburger'
import Screenfull from '@/components/Screenfull' import Screenfull from '@/components/Screenfull'
import SizeSelect from '@/components/SizeSelect' import SizeSelect from '@/components/SizeSelect'
import Search from '@/components/HeaderSearch' import Search from '@/components/HeaderSearch'
import { getUserProfile } from "@/api/system/user";
import { listReceive } from "@/api/system/receive";
export default { export default {
components: { components: {
Breadcrumb, Breadcrumb,
...@@ -60,11 +83,20 @@ export default { ...@@ -60,11 +83,20 @@ export default {
SizeSelect, SizeSelect,
Search Search
}, },
data() {
return {
userType:-2,
total:null,
xiaohidden:false,
receivedList:[],
routerPath:"",
}
},
computed: { computed: {
...mapGetters([ ...mapGetters([
'sidebar', 'sidebar',
'avatar', 'avatar',
'device' 'device',
]), ]),
setting: { setting: {
get() { get() {
...@@ -83,7 +115,24 @@ export default { ...@@ -83,7 +115,24 @@ export default {
} }
} }
}, },
mounted(){
getUserProfile().then(response => {
this.userType = response.data.deptId;
if(this.userType!=-2){
this.queryParams.enterpriseId = response.data.deptId;
}
this.getList();
});
this.socket();
},
methods: { methods: {
...mapMutations({
SET_EMERGENCY:"bigWindowCompany/SET_EMERGENCY"
}
),
toggleSideBar() { toggleSideBar() {
this.$store.dispatch('app/toggleSideBar') this.$store.dispatch('app/toggleSideBar')
}, },
...@@ -97,6 +146,61 @@ export default { ...@@ -97,6 +146,61 @@ export default {
location.href = '/index'; location.href = '/index';
}) })
}).catch(() => {}); }).catch(() => {});
},
openMassage(id,title){
//this.$router.push('/emergency/emergency?eventid='+id);
this.routerPath="/emergency/emergency";
if(window.location.pathname==this.routerPath){
// this.$parent.showDetail(id,title);
this.SET_EMERGENCY({
eventId:id,
eventName:title,
})
}else {
this.$router.push({path: this.routerPath,query:{eventId:id,eventName:title}});
}
},
socket() {
console.log("socket执行");
this.ws = new WebSocket(
"ws://192.168.2.17:8903/gassafety/websocketServer"
);
this.ws.onopen = (evt) => {
console.log("WebSockets开启");
};
this.ws.onmessage = (evt) => {
console.log("推送", evt);
const obj = JSON.parse(evt.data);
console.log("接受socketobj", obj);
this.getList();
};
this.ws.onclose = () => {
console.log("ws协议关闭");
};
},
getList(){
console.log(this.userType)
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
}
listReceive(params).then(response => {
this.receivedList = response.rows;
if(response.total!=0){
this.total= response.total;
}else{
this.total= "";
}
});
} }
} }
} }
...@@ -141,7 +245,6 @@ export default { ...@@ -141,7 +245,6 @@ export default {
float: right; float: right;
height: 100%; height: 100%;
line-height: 50px; line-height: 50px;
&:focus { &:focus {
outline: none; outline: none;
} }
......
...@@ -24,5 +24,6 @@ const getters = { ...@@ -24,5 +24,6 @@ const getters = {
defaultRoutes:state => state.permission.defaultRoutes, defaultRoutes:state => state.permission.defaultRoutes,
sidebarRouters:state => state.permission.sidebarRouters, sidebarRouters:state => state.permission.sidebarRouters,
company:state=>state.bigWindowCompany.company, company:state=>state.bigWindowCompany.company,
emergencyData:state=>state.bigWindowCompany.emergencyData,
} }
export default getters export default getters
...@@ -11,6 +11,11 @@ import { getCompany } from "@/api/bigWindow/getDevice"; ...@@ -11,6 +11,11 @@ import { getCompany } from "@/api/bigWindow/getDevice";
const state = { const state = {
// 公司名称 // 公司名称
company: {}, company: {},
//应急处置消息详情
emergencyData:{
eventId:99999,
eventName:"",
}
}; };
const mutations = { const mutations = {
...@@ -21,6 +26,13 @@ const mutations = { ...@@ -21,6 +26,13 @@ const mutations = {
})); }));
console.log(state.company); console.log(state.company);
}, },
SET_EMERGENCY: (state, emergencyData) => {
state.emergencyData=emergencyData
}
}; };
const actions = { const actions = {
......
...@@ -10,7 +10,8 @@ const user = { ...@@ -10,7 +10,8 @@ const user = {
permissions: [], permissions: [],
systemSetting:{}, systemSetting:{},
posts: [], posts: [],
enterpriseId: '' enterpriseId: '',
userId: ''
}, },
mutations: { mutations: {
...@@ -37,6 +38,9 @@ const user = { ...@@ -37,6 +38,9 @@ const user = {
}, },
SET_ENTERPRISEID: (state,enterpriseId) =>{ SET_ENTERPRISEID: (state,enterpriseId) =>{
state.enterpriseId = enterpriseId state.enterpriseId = enterpriseId
},
SET_USERID:(state,userId) =>{
state.userId = userId
} }
}, },
...@@ -76,7 +80,7 @@ const user = { ...@@ -76,7 +80,7 @@ const user = {
commit('SET_SYSTEMSETTING', res.systemSetting) commit('SET_SYSTEMSETTING', res.systemSetting)
commit('SET_POSTS',res.posts) commit('SET_POSTS',res.posts)
commit('SET_ENTERPRISEID',user.deptId) commit('SET_ENTERPRISEID',user.deptId)
commit('SET_USERID',user.userId);
// 大屏公司获取 // 大屏公司获取
// 第一个参数是其他模块的 actions 路径, // 第一个参数是其他模块的 actions 路径,
// 第二个是传给 actions 的数据, 如果不需要传数据, 也必须预留, // 第二个是传给 actions 的数据, 如果不需要传数据, 也必须预留,
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2022-01-26 10:47:44 * @Date: 2022-01-26 10:47:44
* @LastEditTime: 2022-03-21 17:11:56 * @LastEditTime: 2022-03-23 15:26:48
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/utils/config.js * @FilePath: /test/hello-world/src/utils/config.js
...@@ -24,6 +24,7 @@ export const pipePressure = { ...@@ -24,6 +24,7 @@ export const pipePressure = {
export const alarmtime = 10000; export const alarmtime = 10000;
export const svgUrl = { export const svgUrl = {
// bigwindow页面的设备
2: require("@/assets/image/tiaoyaxiang1.svg"), 2: require("@/assets/image/tiaoyaxiang1.svg"),
3: require("@/assets/image/famen1.svg"), 3: require("@/assets/image/famen1.svg"),
4: require("@/assets/image/changzhan1.svg"), 4: require("@/assets/image/changzhan1.svg"),
...@@ -31,13 +32,22 @@ export const svgUrl = { ...@@ -31,13 +32,22 @@ export const svgUrl = {
6: require("@/assets/image/user1.svg"), 6: require("@/assets/image/user1.svg"),
7: require("@/assets/image/zrxk.svg"), 7: require("@/assets/image/zrxk.svg"),
8: require("@/assets/image/zcrq.svg"), 8: require("@/assets/image/zcrq.svg"),
// 运行监测-车辆信息 operationMonitor/gassVehicle
// 小汽车
9: require("@/assets/image/car.png"), 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"), 14: require("@/assets/mapImages/carTarget.svg"),
//应急设备,应急处置 emergency/emergency
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"),
//煤气罐罐 运行监测 气瓶回溯
17: require("@/assets/mapinages/meiqiguan.svg"),
}; };
export const svgAlarm = { export const svgAlarm = {
2: require("@/assets/mapImages/tyxAlarm.svg"), 2: require("@/assets/mapImages/tyxAlarm.svg"),
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2022-01-11 13:45:12 * @Date: 2022-01-11 13:45:12
* @LastEditTime: 2022-03-21 18:13:58 * @LastEditTime: 2022-03-22 10:35:13
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/utils/mapClass.js * @FilePath: /test/hello-world/src/utils/mapClass.js
...@@ -682,7 +682,7 @@ export class EditorMap { ...@@ -682,7 +682,7 @@ export class EditorMap {
* @param {*} path 轨迹回访率丼 * @param {*} path 轨迹回访率丼
* @return {*} * @return {*}
*/ */
backTrack(vehicleId, path, times) { backTrack(vehicleId, path, times,component) {
this.infowindowClose(); this.infowindowClose();
AMap.plugin("AMap.MoveAnimation", () => { AMap.plugin("AMap.MoveAnimation", () => {
...@@ -718,7 +718,7 @@ export class EditorMap { ...@@ -718,7 +718,7 @@ export class EditorMap {
//点击的时候,先传进来一个点 //点击的时候,先传进来一个点
const carPathData = { ...marker.getExtData(), time: times[0] }; const carPathData = { ...marker.getExtData(), time: times[0] };
carPathData.iconType = 14; carPathData.iconType = 14;
this.addDevice(carPathData, null); this.addDevice(carPathData,component);
// marker.pointArr.push(point); // marker.pointArr.push(point);
marker.on("moveend", (e) => { marker.on("moveend", (e) => {
...@@ -734,7 +734,7 @@ export class EditorMap { ...@@ -734,7 +734,7 @@ export class EditorMap {
// if (e.index == path.length - 1) { // if (e.index == path.length - 1) {
// point = this.addDevice(z, null); // point = this.addDevice(z, null);
// } else { // } else {
this.addDevice(z, null); this.addDevice(z,component);
// workPoint.infoWindow.open(map,e.passedPos); // workPoint.infoWindow.open(map,e.passedPos);
// } // }
console.log("定点", e); console.log("定点", e);
......
...@@ -333,27 +333,39 @@ export default { ...@@ -333,27 +333,39 @@ export default {
{ {
val: 10, val: 10,
ischeck: false, ischeck: false,
imgurl: require("@/assets/image/tyxsub.svg"), imgurl: require("@/assets/image/yj-jydw.png"),
name: "救援队伍", name: "救援队伍",
}, },
{ {
val: 11, val: 11,
ischeck: false, ischeck: false,
imgurl: require("@/assets/image/fmjsub.svg"), imgurl: require("@/assets/image/yj-wz.png"),
name: "救援物资", name: "救援物资",
}, },
{ {
val: 12, val: 12,
ischeck: false, ischeck: false,
imgurl: require("@/assets/image/czsub.svg"), imgurl: require("@/assets/image/yj-cl.png"),
name: "救援车辆", name: "救援车辆",
}, },
{ {
val: 13, val: 13,
ischeck: false, ischeck: false,
imgurl: require("@/assets/image/usersub.svg"), imgurl: require("@/assets/image/yj-yy.png"),
name: "医 院", name: "医 院",
}, },
{
val: 15,
ischeck: false,
imgurl: require("@/assets/image/yj-xf.png"),
name: "消防队伍",
},
{
val: 16,
ischeck: false,
imgurl: require("@/assets/image/yj-xj.png"),
name: "巡检人员",
},
], ],
selarr1: [], selarr1: [],
// 用户的center数据 // 用户的center数据
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<el-select v-model="queryParams.workType" placeholder="请选择任务类型" clearable size="small"> <el-select v-model="queryParams.workType" placeholder="请选择任务类型" clearable size="small">
<el-option label="入户安检" value="1" /> <el-option label="入户安检" value="1" />
<el-option label="巡检" value="2" /> <el-option label="巡检" value="2" />
<el-option label="报警巡查" value="3" /> <!--<el-option label="报警巡查" value="3" />-->
<el-option label="其他" value="4" /> <el-option label="其他" value="4" />
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
size="mini" size="mini"
@click="handleAdd" @click="handleAdd"
v-hasPermi="['system:order:add']" v-hasPermi="['system:order:add']"
v-if="roleType != 'inpector'"
>新增</el-button> >新增</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <el-col :span="1.5">
...@@ -52,6 +53,7 @@ ...@@ -52,6 +53,7 @@
:loading="exportLoading" :loading="exportLoading"
@click="handleExport" @click="handleExport"
v-hasPermi="['system:order:export']" v-hasPermi="['system:order:export']"
v-if="roleType != 'inpector'"
>导出</el-button> >导出</el-button>
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
...@@ -64,7 +66,7 @@ ...@@ -64,7 +66,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.workType == 1">入户安检</span> <span v-if="scope.row.workType == 1">入户安检</span>
<span v-if="scope.row.workType == 2">巡检</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> <span v-if="scope.row.workType == 4">其他</span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -100,7 +102,7 @@ ...@@ -100,7 +102,7 @@
<el-table-column label="责任人员" align="center" prop="responsiblePerson" /> <el-table-column label="责任人员" align="center" prop="responsiblePerson" />
<el-table-column label="截止日期" align="center" prop="expiryDate" width="180"> <el-table-column label="截止日期" align="center" prop="expiryDate" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.expiryDate, '{y}-{m}-{d}') }}</span> <span>{{ parseTime(scope.row.expiryDate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" min-width="150%"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width" min-width="150%">
...@@ -113,7 +115,7 @@ ...@@ -113,7 +115,7 @@
v-hasPermi="['system:order:edit']" v-hasPermi="['system:order:edit']"
key="detail" key="detail"
>详情</el-button> >详情</el-button>
<el-button v-if="scope.row.workStatus == '0' || scope.row.workStatus == '1'" key="edit" <el-button v-if="('zhengfu'== roleType || (('enterprise'== roleType || 'doubleRole' == roleType) && scope.row.workCreateEnterpriseId == $store.state.user.enterpriseId))&& scope.row.workStatus == '0'" key="edit"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
...@@ -126,9 +128,10 @@ ...@@ -126,9 +128,10 @@
icon="el-icon-delete" icon="el-icon-delete"
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['system:order:remove']" v-hasPermi="['system:order:remove']"
v-if="('zhengfu'== roleType || (('enterprise'== roleType || 'doubleRole' == roleType) && scope.row.workCreateEnterpriseId == $store.state.user.enterpriseId))&& scope.row.workStatus == '0'"
key="detele" key="detele"
>删除</el-button> >删除</el-button>
<el-button v-if=" (('enterprise'== roleType && (scope.row.workAssignManId == '' || scope.row.workAssignManId == null)) || ('zhengfu'== roleType && (scope.row.workAssignEnterproseId == '' || scope.row.workAssignEnterproseId == null))) && scope.row.workStatus == '0'" <el-button v-if="'inpector'!= roleType && (scope.row.workAssignManId == '' || scope.row.workAssignManId == null) && scope.row.workStatus == '0'"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
...@@ -136,7 +139,7 @@ ...@@ -136,7 +139,7 @@
v-hasPermi="['system:order:edit']" v-hasPermi="['system:order:edit']"
key="work" key="work"
>任务下发</el-button> >任务下发</el-button>
<el-button v-if=" 'inpector'== roleType && scope.row.workStatus == '0'" <el-button v-if=" ('inpector'== roleType || 'doubleRole' == roleType) && (scope.row.workAssignManId == $store.state.user.userId) && scope.row.workStatus == '0'"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
...@@ -186,7 +189,7 @@ ...@@ -186,7 +189,7 @@
<el-select v-model="form.workType" placeholder="请选择任务类型" style="width: 350px" :disabled="isDetail"> <el-select v-model="form.workType" placeholder="请选择任务类型" style="width: 350px" :disabled="isDetail">
<el-option label="入户安检" value="1" /> <el-option label="入户安检" value="1" />
<el-option label="巡检" value="2" /> <el-option label="巡检" value="2" />
<el-option label="报警巡查" value="3" /> <!--<el-option label="报警巡查" value="3" />-->
<el-option label="其他" value="4" /> <el-option label="其他" value="4" />
</el-select> </el-select>
</el-form-item> </el-form-item>
...@@ -199,9 +202,9 @@ ...@@ -199,9 +202,9 @@
</el-form-item> </el-form-item>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="指派单位" prop="workAssignEnterproseName"> <el-form-item label="指派单位" prop="workAssignEnterproseId">
<!--<el-input v-model="form.workAssignEnterproseName" placeholder="请输入指派单位名称" />--> <!--<el-input v-model="form.workAssignEnterproseName" placeholder="请输入指派单位名称" />-->
<el-select v-model="form.workAssignEnterproseId" placeholder="请选择指派单位名称" style="width: 350px" @change="selectworkAssignEnterprose($event)" :disabled="isDetail"> <el-select v-model="form.workAssignEnterproseId" placeholder="请选择指派单位名称" style="width: 350px" @change="selectworkAssignEnterprose($event)" :disabled="isDetail || isEnterproser">
<el-option <el-option
v-for="item in enterprises" v-for="item in enterprises"
:key="item.enterpriseId" :key="item.enterpriseId"
...@@ -284,8 +287,8 @@ ...@@ -284,8 +287,8 @@
<el-form-item label="截止日期" prop="expiryDate"> <el-form-item label="截止日期" prop="expiryDate">
<el-date-picker clearable size="small" <el-date-picker clearable size="small"
v-model="form.expiryDate" v-model="form.expiryDate"
type="date" type="datetime"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择截止日期" style="width: 350px" :disabled="isDetail"> placeholder="选择截止日期" style="width: 350px" :disabled="isDetail">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
...@@ -309,7 +312,7 @@ ...@@ -309,7 +312,7 @@
<el-form-item label="任务类型" prop="workType"> <el-form-item label="任务类型" prop="workType">
<span v-if="workForm.workType == '1'">入户安检</span> <span v-if="workForm.workType == '1'">入户安检</span>
<span v-if="workForm.workType == '2'">巡检</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> <span v-if="workForm.workType == '4'">其他</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -317,9 +320,9 @@ ...@@ -317,9 +320,9 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="指派单位" prop="workAssignEnterproseName"> <el-form-item label="指派单位" prop="workAssignEnterproseId">
<!--<el-input v-model="form.workAssignEnterproseName" placeholder="请输入指派单位名称" />--> <!--<el-input v-model="form.workAssignEnterproseName" placeholder="请输入指派单位名称" />-->
<el-select v-model="workForm.workAssignEnterproseId" placeholder="请选择指派单位名称" style="width: 350px" @change="selectworkAssignEnterprose($event)"> <el-select v-model="workForm.workAssignEnterproseId" placeholder="请选择指派单位名称" style="width: 350px" @change="selectworkAssignEnterprose($event)" :disabled="isEnterproser">
<el-option <el-option
v-for="item in enterprises" v-for="item in enterprises"
:key="item.enterpriseId" :key="item.enterpriseId"
...@@ -363,7 +366,7 @@ ...@@ -363,7 +366,7 @@
<el-form-item label="任务类型" prop="workType"> <el-form-item label="任务类型" prop="workType">
<span v-if="feedBookForm.workType == '1'">入户安检</span> <span v-if="feedBookForm.workType == '1'">入户安检</span>
<span v-if="feedBookForm.workType == '2'">巡检</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> <span v-if="feedBookForm.workType == '4'">其他</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -442,6 +445,8 @@ export default { ...@@ -442,6 +445,8 @@ export default {
fileList: [], fileList: [],
//详情 //详情
isDetail: false, isDetail: false,
//是否为企业用户
isEnterproser: false,
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
...@@ -481,7 +486,7 @@ export default { ...@@ -481,7 +486,7 @@ export default {
workContent: [ workContent: [
{ required: true, message: "任务内容", trigger: "blur" } { required: true, message: "任务内容", trigger: "blur" }
], ],
workAssignEnterproseName: [ workAssignEnterproseId: [
{ required: true, message: "指派单位", trigger: "blur" } { required: true, message: "指派单位", trigger: "blur" }
], ],
expiryDate: [ expiryDate: [
...@@ -490,7 +495,7 @@ export default { ...@@ -490,7 +495,7 @@ export default {
}, },
//任务下发表单校验 //任务下发表单校验
workRules: { workRules: {
workAssignEnterproseName: [ workAssignEnterproseId: [
{ required: true, message: "指派单位", trigger: "blur" } { required: true, message: "指派单位", trigger: "blur" }
], ],
workAssignMan: [ workAssignMan: [
...@@ -523,8 +528,10 @@ export default { ...@@ -523,8 +528,10 @@ export default {
let enterpriseId = this.$store.state.user.enterpriseId; let enterpriseId = this.$store.state.user.enterpriseId;
let post = this.$store.state.user.posts.find(item => item.postCode === "se"); let post = this.$store.state.user.posts.find(item => item.postCode === "se");
if(-2 != enterpriseId){ if(-2 != enterpriseId){
if(post){ if(post && this.$store.state.user.posts.length <=1){
this.roleType = "inpector"; this.roleType = "inpector";
}else if(post && this.$store.state.user.posts.length >1){
this.roleType = "doubleRole";
}else{ }else{
this.roleType = "enterprise"; this.roleType = "enterprise";
} }
...@@ -606,7 +613,7 @@ export default { ...@@ -606,7 +613,7 @@ export default {
this.reset(); this.reset();
this.open = true; this.open = true;
this.isDetail = false; this.isDetail = false;
this.title = "添加燃气任务"; this.title = "添加巡检巡查任务";
this.getEnterpriseLists(); this.getEnterpriseLists();
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
...@@ -685,10 +692,26 @@ export default { ...@@ -685,10 +692,26 @@ export default {
}, },
//指派单位 //指派单位
getEnterpriseLists(){ getEnterpriseLists(){
enterpriseLists().then(response => { const param = {};
this.judgeOperateType(param);
enterpriseLists(param).then(response => {
this.enterprises = response.rows; this.enterprises = response.rows;
}); });
}, },
//根据用户角色和操作类型设置指派人是否可选
judgeOperateType(param){
if(this.roleType != "zhengfu"){
param.enterpriseId = this.$store.state.user.enterpriseId;
if(this.title == "添加巡检巡查任务"){
this.form.workAssignEnterproseId = this.$store.state.user.enterpriseId;
this.isEnterproser = true;
}
if(this.title == "任务下发"){
this.isEnterproser = true;
}
this.getInspectionUserList(this.$store.state.user.enterpriseId);
}
},
//获取巡检员 //获取巡检员
getInspectionUserList(enterpriseId){ getInspectionUserList(enterpriseId){
getInspectionUsers(enterpriseId,"se").then(response =>{ getInspectionUsers(enterpriseId,"se").then(response =>{
......
...@@ -139,7 +139,8 @@ ...@@ -139,7 +139,8 @@
z-index: 10; z-index: 10;
top: 0; top: 0;
height: 100%; height: 100%;
background: rgb(49 114 195 / 24%); /* background: rgb(49 114 195 / 24%);*/
background: #FFFFFF;
transition: all 0.5s; transition: all 0.5s;
} }
.main-show { .main-show {
...@@ -163,8 +164,9 @@ ...@@ -163,8 +164,9 @@
padding: 0 15px; padding: 0 15px;
font-size: 15px; font-size: 15px;
font-weight: bold; font-weight: bold;
background: rgb(87 114 153 / 44%); /*background: rgb(87 114 153 / 44%);*/
color: white; background: #f8f8f9;
color:#515a6e;
/* border-bottom: 1px solid #eee;*/ /* border-bottom: 1px solid #eee;*/
.close-btn { .close-btn {
display: inline-block; display: inline-block;
...@@ -186,7 +188,7 @@ ...@@ -186,7 +188,7 @@
} }
.switch { .switch {
position: absolute; position: absolute;
right: -35px; right: -33px;
top: 250px; top: 250px;
i { i {
background: #fff; background: #fff;
......
...@@ -49,17 +49,24 @@ ...@@ -49,17 +49,24 @@
icon="el-icon-map-location" icon="el-icon-map-location"
@click="getVehicleTravel(scope.row)" @click="getVehicleTravel(scope.row)"
v-hasPermi="['system:info:remove']" v-hasPermi="['system:info:remove']"
>车辆轨迹</el-button> >车辆位置</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <!-- <el-pagination
@current-change="handleCurrentChangvale" @current-change="handleCurrentChangvale"
:page-size="queryParams.pageSize" :page-size="queryParams.pageSize"
layout="prev, pager, next, jumper" layout="prev, pager, next, jumper"
:total="total" :total="total"
:hide-on-single-page="total <= queryParams.pageSize" :hide-on-single-page="total <= queryParams.pageSize"
:key="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> </div>
</drawer> </drawer>
...@@ -210,6 +217,7 @@ import MapCar from "./component/MapCar"; ...@@ -210,6 +217,7 @@ import MapCar from "./component/MapCar";
import { EditorMap } from "@/utils/mapClass/map"; import { EditorMap } from "@/utils/mapClass/map";
import { mapGetters, mapActions } from "vuex"; import { mapGetters, mapActions } from "vuex";
import drawer from "./component/drawer"; import drawer from "./component/drawer";
import NullVUe from "@/components/bigWindow/Null";
import moment from "moment"; import moment from "moment";
export default { export default {
name: "vechicle", name: "vechicle",
...@@ -288,7 +296,7 @@ export default { ...@@ -288,7 +296,7 @@ export default {
"map", "map",
{ {
center: path, center: path,
mapStyle: "amap://styles/f71d3a3d73e14f5b2bf5508bf1411758", /* mapStyle: "amap://styles/f71d3a3d73e14f5b2bf5508bf1411758",*/
zoom: 14.5, zoom: 14.5,
}, },
this this
...@@ -440,16 +448,14 @@ export default { ...@@ -440,16 +448,14 @@ export default {
paths.push([item.longitude,item.latitude]); paths.push([item.longitude,item.latitude]);
times.push(item.reportTime) times.push(item.reportTime)
}) })
this.map.backTrack(this.backForm.vehicleId,paths,times); this.map.backTrack(this.backForm.vehicleId,paths,times,NullVUe);
this.backOpen = false; this.backOpen = false;
} }
}) })
} }
}); });
}, },
sleep (time) { sleep (time) {
return new Promise((resolve) => setTimeout(resolve, time)); return new Promise((resolve) => setTimeout(resolve, time));
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
</el-table-column> </el-table-column>
<el-table-column label="状态" align="center" prop="detectorStatus"> <el-table-column label="状态" align="center" prop="detectorStatus">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.detectorStatus == 0">正常</span> <span v-if="scope.row.detectorStatus == 0" style="color: green">正常</span>
<span v-if="scope.row.detectorStatus == 1">离线</span> <span v-if="scope.row.detectorStatus == 1" style="color: red">离线</span>
<span v-if="scope.row.detectorStatus == 2">报警</span> <span v-if="scope.row.detectorStatus == 2">报警</span>
</template> </template>
</el-table-column> </el-table-column>
......
<template>
<div class="display">
<div class="leftbar">
<div class="leftnum">
<img src="../../../../assets/mapinages/Group1120.png" alt="" style="width: 80px;">
<span style="margin-left: 20px;margin-right: 20px;">充装数量分析</span>
<img src="../../../../assets/mapinages/Group1121.png" alt="" style="width: 80px;">
</div>
<div id="echartsone" style="width:100%;height:300px;"></div>
</div>
<div class="centerbar">
<div class="leftnum">
<img src="../../../../assets/mapinages/Group1120.png" alt="" style="width: 80px;">
<span style="margin-left: 20px;margin-right: 20px;">预警分析</span>
<img src="../../../../assets/mapinages/Group1121.png" alt="" style="width: 80px;">
</div>
<div id="echartstwo" style="width:100%;height:300px;"></div>
</div>
<div class="rightbar">
<div class="leftnum">
<img src="../../../../assets/mapinages/Group1120.png" alt="" style="width: 80px;">
<span style="margin-left: 20px;margin-right: 20px;">瓶装燃气用户汇总分析</span>
<img src="../../../../assets/mapinages/Group1121.png" alt="" style="width: 80px;">
</div>
<div id="echartsthree" style="width:100%;height:300px;"></div>
</div>
</div>
</template>
<script>
import * as echarts from 'echarts';
export default {
name:"",
data () {
return {
}
},
mounted () {
this.drawLine()
},
methods: {
drawLine() {
// 基于准备好的dom,初始化echarts实例
let myChart1 = this.$echarts.init(document.getElementById("echartsone"));
let myChart2 = this.$echarts.init(document.getElementById("echartstwo"));
let myChart3 = this.$echarts.init(document.getElementById("echartsthree"));
// 绘制图表
myChart1.setOption({
color: ['#4CC4E0'],
grid: {
left: '0',
right: '0',
bottom: '1%',
containLabel: true
},
tooltip: {},
xAxis: {
type: 'category',
data: ['平山', '东回舍', '温塘', '南甸', '古月', '西柏坡', '小觉','下口','两河乡'],
axisLine: {
lineStyle: {
type: 'solid' ,
color: '#99E2FF' , //左边线的颜色
width: '2' //坐标线的宽度
}
},
axisLabel: {
interval: 0,
textStyle: {
color: '#000' , //坐标值得具体的颜色
}
}
},
yAxis: {
type: 'value'
},
series: [
{
data: [1200, 2000, 1500, 800, 700, 1100, 4300,1234,3456],
type: 'bar',
barWidth : 7,
}
]
});
myChart2.setOption({
color: ['#4CC4E0','#EEC25B','#8E83DE'],
grid: {
left: '0',
right: '0',
bottom: '1%',
containLabel: true
},
legend: {
orient:"horizontal",
icon: "circle",
x:'center',
y:' center',
width:'300',
padding:[25, 30,0, 0],
itemWidth:10,
textStyle:{
color:'#000',
},
},
tooltip: {},
dataset: {
source: [
['product', '入户安检', '超重', '超量'],
['平山', 143.3, 185.8, 93.7],
['东回舍', 83.1, 173.4, 55.1],
['温塘', 86.4, 65.2, 82.5],
['南甸', 43.3, 85.8, 393.7],
['古月', 183.1, 273.4, 55.1],
['西柏坡', 186.4, 265.2, 82.5],
['小觉', 43.3, 185.8, 493.7],
['下口', 483.1, 273.4, 55.1],
['两河乡', 286.4, 265.2, 382.5],
['孟家庄', 272.4, 453.9, 139.1]
]
},
xAxis: {
type: 'category',
axisLine: {
lineStyle: {
type: 'solid' ,
color: '#99E2FF' , //左边线的颜色
width: '2' //坐标线的宽度
}
},
axisLabel: {
textStyle: {
color: '#000' , //坐标值得具体的颜色
}
}
},
yAxis: {},
series: [{ type: 'bar',barWidth : 7, }, { type: 'bar',barWidth : 7, }, { type: 'bar',barWidth : 7, }]
});
myChart3.setOption({
color: ['#4CC4E0'],
grid: {
left: '0',
right: '0',
bottom: '1%',
containLabel: true
},
tooltip: {},
xAxis: {
type: 'category',
axisLabel:{
interval: 0,
textStyle: {
color: '#000' , //坐标值得具体的颜色
}
} ,
data: ['平山', '东回舍', '温塘', '南甸', '古月', '西柏坡', '小觉','下口','两河乡'],
axisLine: {
lineStyle: {
type: 'solid' ,
color: '#99E2FF' , //左边线的颜色
width: '2' //坐标线的宽度
}
},
},
yAxis: {
type: 'value',
},
series: [
{
data: [1240, 2040, 1540, 3380, 4370, 1140, 2130,1234,3456],
type: 'bar',
barWidth : 7,
}
]
});
}
}
}
</script>
<style scoped>
.display{
display: flex;
}
.leftbar{
width: 27.5%;
height: 340px;
/* float: left; */
}
.centerbar{
width: 45%;
height: 340px;
/* float: left; */
margin-left: 40px;
}
.rightbar{
width: 27.5%;
height: 340px;
/* float: left; */
margin-left: 40px;
}
.leftnum{
width: 100%;
height: 40px;
text-align: center;
line-height: 70px;
}
</style>
\ No newline at end of file
<template>
<div style="padding: 40px 40px 20px 40px;">
<div class="bottletop">
<div class="bottletopleft">
<div class="bottop">
<div class="botbanner">
<div style="margin-left: 20px;position: absolute;">气瓶统计</div>
<img src="../../../assets/mapinages/Group1129.png" alt="" style="width: 100%;height: 100%;position: absolute;top: 0;left: 0;">
</div>
<div class="botnumber">
<div class="botimage">
<img src="../../../assets/mapinages/Group1130.png" alt="" style="width: 100px;height: 100px;margin-top: 30px;">
<div class="ima">
<div style="color: #4CC4E0;font-weight: bolder;">358275</div><span style="color: #fff;">总计</span>
</div>
</div>
<div class="botnum">
<div class="numdiv">
<p style="color: #4CC4E0;">本月新增</p>
<span style="color: #EEC25B;font-size: 30px;">683</span><span style="color: #4CC4E0;"></span>
</div>
<div class="numdiv">
<p style="color: #4CC4E0;">本年新增</p>
<span style="color: #EEC25B;font-size: 30px;">683</span><span style="color: #4CC4E0;"></span>
</div>
</div>
</div>
</div>
<div class="bottop">
<div class="botbanner">
<div style="margin-left: 20px;position: absolute;">气瓶配送统计</div>
<img src="../../../assets/mapinages/Group1129.png" alt="" style="width: 100%;height: 100%;position: absolute;top: 0;left: 0;">
</div>
<div class="botnumber">
<div class="botimage">
<img src="../../../assets/mapinages/Group1130.png" alt="" style="width: 100px;height: 100px;margin-top: 30px;">
<div class="ima">
<div style="color: #4CC4E0;font-weight: bolder;">35358275</div><span style="color: #fff;">总计</span>
</div>
</div>
<div class="botnum">
<div class="numdiv">
<p style="color: #4CC4E0;">本月新增</p>
<span style="color: #EEC25B;font-size: 30px;">6833</span><span style="color: #4CC4E0;"></span>
</div>
<div class="numdiv">
<p style="color: #4CC4E0;">本年新增</p>
<span style="color: #EEC25B;font-size: 30px;">623483</span><span style="color: #4CC4E0;"></span>
</div>
</div>
</div>
</div>
</div>
<div class="bottletopcenter">
<div id="map"></div>
</div>
<div class="bottletopright">
<div class="bottop">
<div class="botbanner">
<div style="margin-left: 20px;position: absolute;">气瓶充装统计</div>
<img src="../../../assets/mapinages/Group1129.png" alt="" style="width: 100%;height: 100%;position: absolute;top: 0;left: 0;">
</div>
<div class="botnumber">
<div class="botimage">
<img src="../../../assets/mapinages/Group1130.png" alt="" style="width: 100px;height: 100px;margin-top: 30px;">
<div class="ima">
<div style="color: #4CC4E0;font-weight: bolder;">358275</div><span style="color: #fff;">总计</span>
</div>
</div>
<div class="botnum">
<div class="numdiv">
<p style="color: #4CC4E0;">本月新增</p>
<span style="color: #EEC25B;font-size: 30px;">6843</span><span style="color: #4CC4E0;"></span>
</div>
<div class="numdiv">
<p style="color: #4CC4E0;">本年新增</p>
<span style="color: #EEC25B;font-size: 30px;">6483</span><span style="color: #4CC4E0;"></span>
</div>
</div>
</div>
</div>
<div class="bottop">
<div class="botbanner">
<div style="margin-left: 20px;position: absolute;">瓶装燃气用户分析</div>
<img src="../../../assets/mapinages/Group1129.png" alt="" style="width: 100%;height: 100%;position: absolute;top: 0;left: 0;">
</div>
<div class="botnumber">
<div id="myChartpieone" :style="{width: '100%', height: '100%'}"></div>
</div>
</div>
</div>
</div>
<div class="bottlebottom">
<operationNum></operationNum>
</div>
</div>
</template>
<script>
import * as echarts from 'echarts';
import operationNum from "./components/operationNum";
import { EditorMap } from "@/utils/mapClass/map";
import { mapGetters } from "vuex";
import Null from "@/components/bigWindow/Null.vue";
// import { EditorMap } from "@/utils/mapClass/getPath.js";
export default {
components: {
operationNum,
},
data() {
return {
//地图
// map: null,
arr:[
{longitude:114.186007 , latitude:38.260288 , iconType:17},
{longitude:114.185143, latitude:38.260178, iconType:17},
{longitude:114.186345 , latitude:38.261046 , iconType:17},
{longitude:114.187007 , latitude:38.262288 , iconType:17},
{longitude:114.186143, latitude:38.265178, iconType:17},
{longitude:114.187345 , latitude:38.267046 , iconType:17},
{longitude:114.188007 , latitude:38.268288 , iconType:17},
{longitude:114.189143, latitude:38.263178, iconType:17},
{longitude:114.189345 , latitude:38.269046 , iconType:17},
]
}
},
computed: {
...mapGetters([ "systemSetting"])
},
mounted () {
this.drawLine();
const path = eval(this.systemSetting.map_center);
this.map = new EditorMap(
"map",
{
center: path,
zoom: 14.5,
},
this
);
this.addDevice();
},
methods: {
addDevice(data, component) {
for(let i =0;i<this.arr.length;i++){
this.map.addDevice(this.arr[i], Null);
}
},
drawLine() {
// 基于准备好的dom,初始化echarts实例
let myChart1 = this.$echarts.init(document.getElementById("myChartpieone"));
// 绘制图表
myChart1.setOption({
grid: {
bottom: "7%",
containLabel: true,
},
legend: {
orient:"horizontal",
icon: "circle",
x:'right',
y:' center',
width:'300',
padding:[25, 30,0, 0],
itemWidth:10,
textStyle:{
color:'#000',
},
},
tooltip: {
trigger: 'item',
},
series: [
{
name: '任务概况',
type: 'pie',
radius: ['50%', '70%'],
center: ['50%','60%'],
data: [
{
value: 40,
name: '居民',
itemStyle: { color: '#4CC4E0' }
},
{
value: 59,
name: '非居民' ,
itemStyle: { color: '#EEC25B' }
},
],
labelLine:{
length:20,
length2:20,
},
label:{
color:'#fff',
fontSize: 14,
// formatter:"{b}\n\n",
// padding:[0,-55],
normal: {
show: true,
position: 'outer',
// formatter: '{d}%, {c} \n\n',
//模板变量有 {a}, {b},{c},{d},{e},分别表示系列名,数据名,数据值等。
formatter: "{a_set|{b}}{b_set|{d}%}",
// formatter: "{a_set|{b}}\n{c_set|{d}%}\n{b|}\n\n",
borderWidth: 10,
borderRadius: 4,
rich: {
a_set: {
color: "auto",
// lineHeight: 20,
align: "left",
// padding: [55, -40, -15, -40],
},
b_set:{
color: "auto",
},
}
}
},
emphasis: {
itemStyle: {
shadowBlur: 10,
shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)'
}
}
}
]
});
}
}
};
</script>
<style lang="scss" scoped>
.bottletop{
width: 100%;
height: 450px;
display: flex;
}
.bottletopleft{
width: 27.5%;
height: 100%;
}
.bottop{
width: 100%;
height: 50%;
}
.botbanner{
width: 100%;
height: 30px;
position: relative;
font-weight: bolder;
}
.botnumber{
width: 100%;
height: 100%;
}
.botimage{
float: left;
width: 100px;
height: 200px;
position: relative;
margin-left: 20px;
}
.ima{
width: 100%;
position: absolute;
text-align: center;
top: 0;
margin-top: 60px;
}
.botnum{
float: left;
width: 65%;
height: 200px;
padding: 30px 0 25px 0;
}
.numdiv{
width: 50%;
text-align: center;
float: left;
}
.bottletopcenter{
width: 45%;
height: 100%;
/* float: left; */
margin-left: 40px;
}
#map{
width: 100%;
height: 100%;
}
.bottletopright{
width: 27.5%;
height: 100%;
/* float: left; */
margin-left: 40px;
}
.bottlebottom{
width: 100%;
height: 340px;
margin-top: 30px;
}
</style>
\ No newline at end of file
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