Commit 13a00380 authored by wuqinghua's avatar wuqinghua

2022-7-15 新疆巴州燃气项目修改 wu

parent 76d699a1
...@@ -61,6 +61,13 @@ ...@@ -61,6 +61,13 @@
<artifactId>gas-management-generator</artifactId> <artifactId>gas-management-generator</artifactId>
</dependency> </dependency>
<!--influxDB-->
<dependency>
<groupId>org.influxdb</groupId>
<artifactId>influxdb-java</artifactId>
<version>2.10</version>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
...@@ -15,5 +15,6 @@ public class GasSafetyApplication ...@@ -15,5 +15,6 @@ public class GasSafetyApplication
public static void main(String[] args) public static void main(String[] args)
{ {
SpringApplication.run(GasSafetyApplication.class, args); SpringApplication.run(GasSafetyApplication.class, args);
System.out.println("启动完成");
} }
} }
package com.zehong.web.constant;
/**
* influxdb 时序数据库常量类
*/
public class InfluxdbConstant {
/**
* 数据库账号
*/
public static final String INFLUX_DB_USERNAME="admin";
/**
* 数据库密码
*/
public static final String INFLUX_DB_PASSWORD="123";
/**
* 数据库连接地址 本地
*/
public static final String OPEN_URL = "http://localhost:8086";
/**
* 数据库名称
*/
public static final String DB_NAME="xinjiang_gas";
/**
* 数据库保存策略
*/
public static final String SAVE_POLICY ="autogen";
}
...@@ -78,9 +78,11 @@ public class CommonController ...@@ -78,9 +78,11 @@ public class CommonController
// String url = serverConfig.getUrl() + fileName; // String url = serverConfig.getUrl() + fileName;
String fileName = file.getOriginalFilename(); String fileName = file.getOriginalFilename();
String fileServer = serverConfig.getUrl().contains("127") && serverConfig.getUrl().contains("8093") && !filePath.contains("/data")? serverConfig.getUrl() : serverConfig.getUrl().replace("127.0.0.1:8903","36.148.1.253:8091"); String fileServer = serverConfig.getUrl().contains("127") && serverConfig.getUrl().contains("8093") && !filePath.contains("/data")? serverConfig.getUrl() : serverConfig.getUrl().replace("127.0.0.1:8903","36.148.1.253:8091");
if(fileServer.contains("rqgw.zhkjgf.com")){ if(fileServer.contains("rqgw.zhkjgf.com")){
fileServer = serverConfig.getUrl().replace("rqgw.zhkjgf.com","rqgw.zhkjgf.com:8091"); fileServer = serverConfig.getUrl().replace("rqgw.zhkjgf.com","rqgw.zhkjgf.com:8091");
} }
fileServer="http://27.128.175.86:8903/gassafety";
String url = fileServer + FileUploadUtils.upload(filePath, file); String url = fileServer + FileUploadUtils.upload(filePath, file);
AjaxResult ajax = AjaxResult.success(); AjaxResult ajax = AjaxResult.success();
ajax.put("fileName", fileName); ajax.put("fileName", fileName);
......
package com.zehong.web.controller.dataMonitoring; package com.zehong.web.controller.dataMonitoring;
import java.util.ArrayList;
import java.util.Calendar; import java.util.Calendar;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.zehong.common.core.page.PageDomain;
import com.zehong.common.core.page.TableSupport;
import com.zehong.system.domain.form.DeviceReportDataForm; import com.zehong.system.domain.form.DeviceReportDataForm;
import com.zehong.system.domain.vo.DeviceReportDataVo; import com.zehong.system.domain.vo.DeviceReportDataVo;
import com.zehong.system.domain.vo.InfluxDeviceReportDataVo;
import com.zehong.web.constant.InfluxdbConstant;
import com.zehong.web.controller.tool.InfluxDBConnection;
import org.influxdb.dto.QueryResult;
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;
...@@ -47,12 +52,53 @@ public class TDeviceReportDataController extends BaseController ...@@ -47,12 +52,53 @@ public class TDeviceReportDataController extends BaseController
public TableDataInfo list(DeviceReportDataForm deviceReportDataForm) public TableDataInfo list(DeviceReportDataForm deviceReportDataForm)
{ {
startPage(); startPage();
// PageDomain pageDomain = TableSupport.buildPageRequest();
// Integer pageNum = pageDomain.getPageNum();
// Integer pageSize = pageDomain.getPageSize();
if(null == deviceReportDataForm.getStartReportTime() && null == deviceReportDataForm.getEndReportTime()){ if(null == deviceReportDataForm.getStartReportTime() && null == deviceReportDataForm.getEndReportTime()){
Calendar startTime = Calendar.getInstance(); Calendar startTime = Calendar.getInstance();
startTime.add(Calendar.DATE, - 7); startTime.add(Calendar.DATE, - 7);
deviceReportDataForm.setStartReportTime(startTime.getTime()); deviceReportDataForm.setStartReportTime(startTime.getTime());
deviceReportDataForm.setEndReportTime(new Date()); deviceReportDataForm.setEndReportTime(new Date());
} }
/**
* 连接时序数据库
*/
// InfluxDBConnection influxDBConnection=new InfluxDBConnection(InfluxdbConstant.INFLUX_DB_USERNAME,InfluxdbConstant.INFLUX_DB_PASSWORD,InfluxdbConstant.OPEN_URL,InfluxdbConstant.DB_NAME,InfluxdbConstant.SAVE_POLICY);
// Integer currentNumber= (pageNum-1)*10; //当前条数
// // limit 代表每次显示多少条 offset 代表从第几行开始显示
// String sql="SELECT * FROM historical_data limit "+pageSize+" offset "+currentNumber;
// //查询数据
// QueryResult query = influxDBConnection.query(sql);
// List<InfluxDeviceReportDataVo> deviceReportDataVos=new ArrayList<>();
// //判断数据库是否有值
// if (query.getResults().get(0).getSeries()==null){
// PageInfo pageInfo = new PageInfo(deviceReportDataVos);
// return getDataTable(pageInfo);
// }
// List<List<Object>> values = query.getResults().get(0).getSeries().get(0).getValues();
// for (int i=0;i<values.size();i++){
// InfluxDeviceReportDataVo deviceReportDataVo=new InfluxDeviceReportDataVo();
// deviceReportDataVo.setDeviceCode((String) values.get(i).get(1)); //设备编号
// deviceReportDataVo.setDeviceName((String) values.get(i).get(2)); //设备名称
// deviceReportDataVo.setDeviceType((String) values.get(i).get(4));//设备类型
// deviceReportDataVo.setDeviceModel((String) values.get(i).get(4));//设备型号
// deviceReportDataVo.setStandardConditionAccumulation(String.valueOf(values.get(i).get(10)));//标况累计量
// deviceReportDataVo.setWorkingConditionAccumulation(String.valueOf(values.get(i).get(5)));//工况累计量
// deviceReportDataVo.setResidualQuantity(String.valueOf(values.get(i).get(4)));//剩余量
// deviceReportDataVo.setStandardConditionFlow(String.valueOf(values.get(i).get(10)));//标况流量
// deviceReportDataVo.setWorkingConditionFlow(String.valueOf(values.get(i).get(6)));//工况流量
// deviceReportDataVo.setTemperature(String.valueOf(values.get(i).get(12)));//温度
// deviceReportDataVo.setPressure(String.valueOf(values.get(i).get(7)));//压力
// deviceReportDataVo.setReportTime(String.valueOf(values.get(i).get(8)));//上报时间
// if (values.get(i).get(3).equals(0)){
// deviceReportDataVo.setDeviceStatus("正常");//设备状态
// }else {
// deviceReportDataVo.setDeviceStatus("报警");//设备状态
// }
// deviceReportDataVos.add(deviceReportDataVo);
// }
// PageInfo pageInfo = new PageInfo(deviceReportDataVos);
PageInfo<DeviceReportDataVo> page = tDeviceReportDataService.selectTDeviceReportDataPage(deviceReportDataForm); PageInfo<DeviceReportDataVo> page = tDeviceReportDataService.selectTDeviceReportDataPage(deviceReportDataForm);
return getDataTable(page); return getDataTable(page);
} }
......
...@@ -64,6 +64,7 @@ public class TUserLocationController extends BaseController ...@@ -64,6 +64,7 @@ public class TUserLocationController extends BaseController
for(SysUser sysUser : inspectors){ for(SysUser sysUser : inspectors){
map.put("userId",sysUser.getUserId()); map.put("userId",sysUser.getUserId());
map.put("initInspectors","initInspectors"); map.put("initInspectors","initInspectors");
System.out.println(tUserLocationService.selectTUserLocationListByMap(map));
inspectorLocations.addAll(tUserLocationService.selectTUserLocationListByMap(map)); inspectorLocations.addAll(tUserLocationService.selectTUserLocationListByMap(map));
} }
return AjaxResult.success(inspectorLocations); return AjaxResult.success(inspectorLocations);
......
package com.zehong.web.controller.tool;
import org.influxdb.InfluxDB;
import org.influxdb.InfluxDBFactory;
import org.influxdb.dto.*;
import org.influxdb.dto.Point.Builder;
import java.util.Map;
import java.util.concurrent.TimeUnit;
/**
* InfluxDB数据库连接操作类
*
* @author xuchao
*/
public class InfluxDBConnection {
// 用户名
private String username;
// 密码
private String password;
// 连接地址
private String openurl;
// 数据库名称
private String dbName;
// 保留策略
private String retentionPolicy;
private InfluxDB influxDB;
public InfluxDBConnection(String username, String password, String url, String dbName, String retentionPolicy) {
this.username = username; //账号
this.password = password; //密码
this.openurl = url; //访问地址
this.dbName = dbName; //数据库名称
this.retentionPolicy = retentionPolicy == null || retentionPolicy.equals("") ? "autogen" : retentionPolicy;
influxDbBuild();
}
/**
* 创建数据库
*
* @param dbName
*/
@SuppressWarnings("deprecation")
public void createDB(String dbName) {
influxDB.createDatabase(dbName);
}
/**
* 删除数据库
*
* @param dbName
*/
@SuppressWarnings("deprecation")
public void deleteDB(String dbName) {
influxDB.deleteDatabase(dbName);
}
/**
* 测试连接是否正常
*
* @return true 正常
*/
public boolean ping() {
boolean isConnected = false;
Pong pong;
try {
pong = influxDB.ping();
if (pong != null) {
isConnected = true;
}
} catch (Exception e) {
e.printStackTrace();
}
return isConnected;
}
/**
* 连接时序数据库 ,若不存在则创建
*
* @return
*/
public InfluxDB influxDbBuild() {
if (influxDB == null) {
influxDB = InfluxDBFactory.connect(openurl, username, password);
}
try {
// if (!influxDB.databaseExists(database)) {
// influxDB.createDatabase(database);
// }
} catch (Exception e) {
// 该数据库可能设置动态代理,不支持创建数据库
// e.printStackTrace();
} finally {
influxDB.setRetentionPolicy(retentionPolicy);
}
influxDB.setLogLevel(InfluxDB.LogLevel.NONE);
return influxDB;
}
/**
* 创建自定义保留策略
*
* @param policyName 策略名
* @param days 保存天数
* @param replication 保存副本数量
* @param isDefault 是否设为默认保留策略
*/
public void createRetentionPolicy(String dataBaseName, String policyName, int days, int replication,
Boolean isDefault) {
String sql = String.format("CREATE RETENTION POLICY \"%s\" ON \"%s\" DURATION %sd REPLICATION %s ", policyName,
dataBaseName, days, replication);
if (isDefault) {
sql = sql + " DEFAULT";
}
query(sql);
}
/**
* 创建默认的保留策略
*
* 策略名:hour,保存天数:30天,保存副本数量:1,设为默认保留策略
*/
public void createDefaultRetentionPolicy() {
String command = String
.format("CREATE RETENTION POLICY \"%s\" ON \"%s\" DURATION %s REPLICATION %s DEFAULT", "hour", dbName,
"30d", 1);
this.query(command);
}
/**
* 查询
*
* @param command 查询语句
* @return
*/
public QueryResult query(String command) {
return influxDB.query(new Query(command, dbName));
}
/**
* 插入
*
* @param measurement 表
* @param tags 标签
* @param fields 字段
*/
public void insert(String measurement, Map<String, String> tags, Map<String, Object> fields, long time,
TimeUnit timeUnit) {
Builder builder = Point.measurement(measurement);
builder.tag(tags);
builder.fields(fields);
if (0 != time) {
builder.time(time, timeUnit);
}
influxDB.write(dbName, retentionPolicy, builder.build());
}
/**
* 批量写入测点
*
* @param batchPoints
*/
public void batchInsert(BatchPoints batchPoints, TimeUnit timeUnit) {
influxDB.write(batchPoints);
// influxDB.enableGzip();
// influxDB.enableBatch(2000,100,timeUnit);
// influxDB.disableGzip();
// influxDB.disableBatch();
}
// /**
// * 批量写入数据
// *
// * @param database 数据库
// * @param retentionPolicy 保存策略
// * @param consistency 一致性
// * @param records 要保存的数据(调用BatchPoints.lineProtocol()可得到一条record)
// */
// public void batchInsert(final String database, final String retentionPolicy, final ConsistencyLevel consistency,
// TimeUnit timeUnit, final List<String> records) {
// influxDB.write(database, retentionPolicy, consistency, timeUnit, records);
// }
/**
* 删除
*
* @param command 删除语句
* @return 返回错误信息
*/
public String deleteMeasurementData(String command) {
QueryResult result = influxDB.query(new Query(command, dbName));
return result.getError();
}
/**
* 关闭数据库
*/
public void close() {
influxDB.close();
}
/**
* 构建Point
*
* @param measurement
* @param time
* @param fields
* @return
*/
public Point pointBuilder(String measurement, long time, TimeUnit timeUnit, Map<String, String> tags,
Map<String, Object> fields) {
Point point = Point.measurement(measurement).time(time, timeUnit).tag(tags).fields(fields).build();
return point;
}
}
package com.zehong.web.controller.visualization;
import com.github.pagehelper.PageInfo;
import com.zehong.common.core.controller.BaseController;
import com.zehong.system.domain.form.DeviceReportDataForm;
import com.zehong.system.domain.form.TWorkOrderForm;
import com.zehong.system.domain.vo.DeviceReportDataVo;
import com.zehong.system.domain.vo.SevenDayAlarmVo;
import com.zehong.system.domain.vo.WorkOrderNotReceivedVo;
import com.zehong.system.domain.vo.WorkOrderVo;
import com.zehong.system.service.ITDeviceReportDataService;
import com.zehong.system.service.ITWorkOrderService;
import com.zehong.system.service.IVisualizationService;
import com.zehong.web.timeconfig.TimeConfig;
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.ArrayList;
import java.util.List;
/**
* 燃气管理系统-数据可视化控制层
*/
@RestController
@RequestMapping("/visualization/visualizationData")
public class VisualizationController extends BaseController {
/**
* 数据可视化控制层
*/
@Autowired
private IVisualizationService iVisualizationService;
/**设备监控service层*/
@Autowired
private ITDeviceReportDataService tDeviceReportDataService;
/**工单基础信息service层*/
@Autowired
private ITWorkOrderService tWorkOrderService;
/**
* 查询设备实时监控列表数量接口 (报警状态)
* @return
*/
@GetMapping("/equipmentAlarmSize")
public int realtimeListSize(){
DeviceReportDataForm deviceReportDataForm=new DeviceReportDataForm();
PageInfo<DeviceReportDataVo> page = tDeviceReportDataService.selectRealtimeDataPage(deviceReportDataForm);
int quantity = 0;
for (int i=0;i<page.getSize();i++){
if (page.getList().get(i).getDeviceStatus().equals("报警")){
quantity++;
}
}
return quantity;
}
/**
* 查询设备实时监控列表数量接口 (正常状态)
* @return
*/
@GetMapping("/equipmentNormalSize")
public int equipmentNormalSize(){
DeviceReportDataForm deviceReportDataForm=new DeviceReportDataForm();
PageInfo<DeviceReportDataVo> page = tDeviceReportDataService.selectRealtimeDataPage(deviceReportDataForm);
int quantity = 0;
for (int i=0;i<page.getSize();i++){
if (page.getList().get(i).getDeviceStatus().equals("正常")){
quantity++;
}
}
return quantity;
}
/**
* 查询设备历史监控总数据量
* @return
*/
@GetMapping("/historicalDataSize")
public int HistoricalDataSize(){
//查询设备历史监控总数据量
int DataSize = iVisualizationService.HistoricalDataSize();
return DataSize;
}
/**
* 查询设备历史报警数量
* @return
*/
@GetMapping("/historicalAlarmSize")
public int historicalAlarmSize(){
//查询设备历史报警数量
return iVisualizationService.historicalAlarmSize();
}
/**
* 工单未接收数量
* @return
*/
@GetMapping("/workOrderNotReceived")
public WorkOrderNotReceivedVo workOrderNotReceived() throws Exception {
TWorkOrderForm tWorkOrderForm = new TWorkOrderForm();
PageInfo<WorkOrderVo> page = tWorkOrderService.selectTWorkOrderPage(tWorkOrderForm);
//未接收数量
int workOrderNotReceivedSize=0;
//工单已接收数量
int workOrderReceivedSize=0;
//工单已反馈数量
int workOrderFeedbackSize=0;
//工单已归档数量
int workOrderArchived=0;
for (int i=0;i<page.getSize();i++){
if (page.getList().get(i).getOrderStatus().equals("0")){
workOrderNotReceivedSize++;
}else if (page.getList().get(i).getOrderStatus().equals("1")){
workOrderReceivedSize++;
}else if (page.getList().get(i).getOrderStatus().equals("3")){
workOrderFeedbackSize++;
}else if (page.getList().get(i).getOrderStatus().equals("4")){
workOrderArchived++;
}
}
WorkOrderNotReceivedVo workOrderNotReceivedVo=new WorkOrderNotReceivedVo();
workOrderNotReceivedVo.setWorkOrderNotReceivedSize(workOrderNotReceivedSize);
workOrderNotReceivedVo.setWorkOrderReceivedSize(workOrderReceivedSize);
workOrderNotReceivedVo.setWorkOrderFeedbackSize(workOrderFeedbackSize);
workOrderNotReceivedVo.setWorkOrderArchived(workOrderArchived);
return workOrderNotReceivedVo;
}
/**
* 查询设备近七天报警数量
* @return
*/
@GetMapping("/sevenDayAlarm")
public ArrayList<SevenDayAlarmVo> sevenDayAlarm(){
//查询近七天报警数量数据
List<SevenDayAlarmVo> sevenDayAlarmVos = iVisualizationService.selectSevenDayAlarm(TimeConfig.newBeforeSevenDaysDate(), TimeConfig.newYesterdayDate());
ArrayList<SevenDayAlarmVo> list=new ArrayList<>();
//循环7次
for (int i=0;i<TimeConfig.getSevenDate().size();i++){
SevenDayAlarmVo sevenDayAlarmVo=new SevenDayAlarmVo();
sevenDayAlarmVo.setTime(TimeConfig.getSevenDate().get(i));
//循环查询出来的数据
for (int n=0;n<sevenDayAlarmVos.size();n++){
//循环比较
if (TimeConfig.getSevenDate().get(i).equals(sevenDayAlarmVos.get(n).getTime())){
sevenDayAlarmVo.setCount(sevenDayAlarmVos.get(n).getCount());
break;
}
}
list.add(sevenDayAlarmVo);
}
return list;
}
}
...@@ -42,6 +42,7 @@ public class TWorkOrderController extends BaseController ...@@ -42,6 +42,7 @@ public class TWorkOrderController extends BaseController
startPage(); startPage();
PageInfo<WorkOrderVo> page = null; PageInfo<WorkOrderVo> page = null;
try { try {
System.out.println(tWorkOrderForm+"2222");
page = tWorkOrderService.selectTWorkOrderPage(tWorkOrderForm); page = tWorkOrderService.selectTWorkOrderPage(tWorkOrderForm);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
......
package com.zehong.web.timeconfig;
import com.zehong.common.utils.DateUtils;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.*;
/**
* 时间工具类
*/
public class TimeConfig {
//获取近七天日期
public static List<String> getSevenDate() {
List<String> dateList = new ArrayList<>();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for (int i = 7; i > 0; i--) {
Date date = DateUtils.addDays(new Date(), -i);
String formatDate = sdf.format(date);
dateList.add(formatDate);
}
return dateList;
}
//当前日期时间方法 string类型
public static String newDateTime(){
SimpleDateFormat tempDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String datetime = tempDate.format(new java.util.Date());
return datetime;
}
//生成当天日期方法
public static String newDate(){
SimpleDateFormat tempDate = new SimpleDateFormat("yyyy-MM-dd");
String datetime = tempDate.format(new java.util.Date());
return datetime;
}
//生成昨日的日期
public static String newYesterdayDate(){
DateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd");
Calendar calendar=Calendar.getInstance();
calendar.set(Calendar.HOUR_OF_DAY,-24);
String yesterdayDate=dateFormat.format(calendar.getTime());
return yesterdayDate;
}
//生成前天的日期
public static String newBeforeYesterdayDate(){
DateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd");
Calendar calendar=Calendar.getInstance();
calendar.set(Calendar.HOUR_OF_DAY,-48);
String yesterdayDate=dateFormat.format(calendar.getTime());
return yesterdayDate;
}
//生成七天前的日期
public static String newBeforeSevenDaysDate(){
DateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd");
Calendar calendar=Calendar.getInstance();
calendar.set(Calendar.HOUR_OF_DAY,-168);
String yesterdayDate=dateFormat.format(calendar.getTime());
return yesterdayDate;
}
public static void main(String[] args) {
System.out.println(TimeConfig.newYesterdayDate());
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for (int i = 7; i > 0; i--) {
Date date = org.apache.commons.lang3.time.DateUtils.addDays(new Date(), -i);
String formatDate = sdf.format(date);
System.out.println(formatDate);
}
}
}
...@@ -5,9 +5,13 @@ spring: ...@@ -5,9 +5,13 @@ spring:
driverClassName: com.mysql.cj.jdbc.Driver driverClassName: com.mysql.cj.jdbc.Driver
druid: druid:
# 主库数据源 # 主库数据源
# master:
# url: jdbc:mysql://36.148.23.59:3306/gas_mdb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# username: root
# password: root@123
master: master:
url: jdbc:mysql://36.148.23.59:3306/gas_mdb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 url: jdbc:mysql://27.128.175.86:3307/gas_mdb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root username: zehong
password: root@123 password: root@123
# 从库数据源 # 从库数据源
slave: slave:
...@@ -89,8 +93,8 @@ zehong: ...@@ -89,8 +93,8 @@ zehong:
copyrightYear: 2021 copyrightYear: 2021
# 实例演示开关 # 实例演示开关
demoEnabled: true demoEnabled: true
# 文件路径 示例( Windows配置D:/zehong/uploadPath,Linux配置 /data/zehong/uploadPath # 文件路径 示例( Windows配置D:/zehong/uploadPath,Linux配置 /mnt/sdb/img
profile: /data/zehong/uploadPath profile: /mnt/sdb/img
# 获取ip地址开关 # 获取ip地址开关
addressEnabled: false addressEnabled: false
# 验证码类型 math 数组计算 char 字符验证 # 验证码类型 math 数组计算 char 字符验证
......
...@@ -5,9 +5,13 @@ spring: ...@@ -5,9 +5,13 @@ spring:
driverClassName: com.mysql.cj.jdbc.Driver driverClassName: com.mysql.cj.jdbc.Driver
druid: druid:
# 主库数据源 # 主库数据源
# master:
# url: jdbc:mysql://36.148.23.59:3306/gas_mdb_prod?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# username: root
# password: root@123
master: master:
url: jdbc:mysql://36.148.23.59:3306/gas_mdb_prod?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 url: jdbc:mysql://27.128.175.86:3307/gas_mdb_prod?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root username: zehong123
password: root@123 password: root@123
# 从库数据源 # 从库数据源
slave: slave:
...@@ -90,7 +94,7 @@ zehong: ...@@ -90,7 +94,7 @@ zehong:
# 实例演示开关 # 实例演示开关
demoEnabled: true demoEnabled: true
# 文件路径 示例( Windows配置D:/zehong/uploadPath,Linux配置 /data/zehong/uploadPath) # 文件路径 示例( Windows配置D:/zehong/uploadPath,Linux配置 /data/zehong/uploadPath)
profile: /data/zehong/uploadPath profile: /mnt/sdb/img
# 获取ip地址开关 # 获取ip地址开关
addressEnabled: false addressEnabled: false
# 验证码类型 math 数组计算 char 字符验证 # 验证码类型 math 数组计算 char 字符验证
......
...@@ -5,9 +5,13 @@ spring: ...@@ -5,9 +5,13 @@ spring:
driverClassName: com.mysql.cj.jdbc.Driver driverClassName: com.mysql.cj.jdbc.Driver
druid: druid:
# 主库数据源 # 主库数据源
# master:
# url: jdbc:mysql://36.148.23.59:3306/gas_mdb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
# username: root
# password: root@123
master: master:
url: jdbc:mysql://36.148.23.59:3306/gas_mdb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 url: jdbc:mysql://27.128.175.86:3307/gas_mdb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: root username: zehong
password: root@123 password: root@123
# 从库数据源 # 从库数据源
slave: slave:
...@@ -90,7 +94,7 @@ zehong: ...@@ -90,7 +94,7 @@ zehong:
# 实例演示开关 # 实例演示开关
demoEnabled: true demoEnabled: true
# 文件路径 示例( Windows配置D:/zehong/uploadPath,Linux配置 /data/zehong/uploadPath) # 文件路径 示例( Windows配置D:/zehong/uploadPath,Linux配置 /data/zehong/uploadPath)
profile: C:/Temp/zehong profile: /mnt/sdb/img
# 获取ip地址开关 # 获取ip地址开关
addressEnabled: false addressEnabled: false
# 验证码类型 math 数组计算 char 字符验证 # 验证码类型 math 数组计算 char 字符验证
......
...@@ -5,6 +5,9 @@ server: ...@@ -5,6 +5,9 @@ server:
servlet: servlet:
# 应用的访问路径 # 应用的访问路径
context-path: /gassafety context-path: /gassafety
# ssl:
# key-store: classpath:7926469_bazhou.zhkjgf.com.pfx #类路径下的自签证书
# key-store-password: WNR6pN48 #证书密码
tomcat: tomcat:
# tomcat的URI编码 # tomcat的URI编码
uri-encoding: UTF-8 uri-encoding: UTF-8
...@@ -13,6 +16,8 @@ server: ...@@ -13,6 +16,8 @@ server:
# Tomcat启动初始化的线程数,默认值25 # Tomcat启动初始化的线程数,默认值25
min-spare-threads: 30 min-spare-threads: 30
# 日志配置 # 日志配置
logging: logging:
level: level:
...@@ -80,3 +85,9 @@ xss: ...@@ -80,3 +85,9 @@ xss:
excludes: /system/notice/* excludes: /system/notice/*
# 匹配链接 # 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/* urlPatterns: /system/*,/monitor/*,/tool/*
#配置https的证书
ssl:
key-password: g8YRnKmm
key-store: 7926469_bazhou.zhkjgf.com.pfx
...@@ -3,6 +3,7 @@ package com.zehong.system.domain; ...@@ -3,6 +3,7 @@ package com.zehong.system.domain;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel; import com.zehong.common.annotation.Excel;
...@@ -39,7 +40,8 @@ public class TUserLocation extends BaseEntity ...@@ -39,7 +40,8 @@ public class TUserLocation extends BaseEntity
private String phonenumber; private String phonenumber;
private String nickName; private String nickName;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date createTime; private Date createTime;
@Override @Override
......
...@@ -141,4 +141,20 @@ public class TWorkOrderForm extends BaseEntity ...@@ -141,4 +141,20 @@ public class TWorkOrderForm extends BaseEntity
public void setActualTime(Date actualTime) { public void setActualTime(Date actualTime) {
this.actualTime = actualTime; this.actualTime = actualTime;
} }
@Override
public String toString() {
return "TWorkOrderForm{" +
"orderId='" + orderId + '\'' +
", orderType='" + orderType + '\'' +
", orderName='" + orderName + '\'' +
", orderStatus='" + orderStatus + '\'' +
", appointInspector=" + appointInspector +
", startAllotTime=" + startAllotTime +
", endAllotTime=" + endAllotTime +
", actualInspector=" + actualInspector +
", actualTime=" + actualTime +
", userName='" + userName + '\'' +
'}';
}
} }
package com.zehong.system.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zehong.common.core.domain.BaseEntity;
import com.zehong.system.domain.TDeviceReportData;
import java.util.Date;
import java.util.List;
/**
* 设备监控对象 t_device_report_data
*
* @author zehong
* @date 2022-06-13
*/
public class InfluxDeviceReportDataVo extends BaseEntity
{
/** 设备上报id */
private Long deviceReportDataId;
/** 设备物联网编号 */
private String deviceNum;
/** 设备id */
private Integer deviceId;
/** 设备编号 */
private String deviceCode;
/** 设备名称 */
private String deviceName;
/** 设备类型 */
private String deviceType;
/** 设备型号 */
private String deviceModel;
/** 经度 */
private String longitude;
/** 纬度 */
private String latitude;
/** 设备监控数据列表(用于详情折线图) */
private List<TDeviceReportData> deviceReportDataList;
/** 标况累计量 */
private String standardConditionAccumulation;
/** 工况累计量 */
private String workingConditionAccumulation;
/** 剩余量 */
private String residualQuantity;
/** 标况流量 */
private String standardConditionFlow;
/** 工况流量 */
private String workingConditionFlow;
/** 温度 */
private String temperature;
/** 压力 */
private String pressure;
/** 上报时间 */
private String reportTime;
/** 通讯状态 */
private String communicationStatus;
/** 设备状态 */
private String deviceStatus;
/**上报设备名称*/
private String reportDeviceName;
public void setDeviceReportDataId(Long deviceReportDataId)
{
this.deviceReportDataId = deviceReportDataId;
}
public Long getDeviceReportDataId()
{
return deviceReportDataId;
}
public void setDeviceNum(String deviceNum)
{
this.deviceNum = deviceNum;
}
public String getDeviceNum()
{
return deviceNum;
}
public Integer getDeviceId() {
return deviceId;
}
public void setDeviceId(Integer deviceId) {
this.deviceId = deviceId;
}
public String getDeviceCode() {
return deviceCode;
}
public void setDeviceCode(String deviceCode) {
this.deviceCode = deviceCode;
}
public String getDeviceName() {
return deviceName;
}
public void setDeviceName(String deviceName) {
this.deviceName = deviceName;
}
public String getDeviceType() {
return deviceType;
}
public void setDeviceType(String deviceType) {
this.deviceType = deviceType;
}
public String getDeviceModel() {
return deviceModel;
}
public void setDeviceModel(String deviceModel) {
this.deviceModel = deviceModel;
}
public List<TDeviceReportData> getDeviceReportDataList() {
return deviceReportDataList;
}
public void setDeviceReportDataList(List<TDeviceReportData> deviceReportDataList) {
this.deviceReportDataList = deviceReportDataList;
}
public String getReportTime() {
return reportTime;
}
public void setReportTime(String reportTime) {
this.reportTime = reportTime;
}
public void setCommunicationStatus(String communicationStatus) {
this.communicationStatus = communicationStatus;
}
public String getCommunicationStatus()
{
return communicationStatus;
}
public void setDeviceStatus(String deviceStatus)
{
this.deviceStatus = deviceStatus;
}
public String getDeviceStatus()
{
return deviceStatus;
}
public String getReportDeviceName() {
return reportDeviceName;
}
public void setReportDeviceName(String reportDeviceName) {
this.reportDeviceName = reportDeviceName;
}
public String getLongitude() {
return longitude;
}
public void setLongitude(String longitude) {
this.longitude = longitude;
}
public String getLatitude() {
return latitude;
}
public void setLatitude(String latitude) {
this.latitude = latitude;
}
public String getStandardConditionAccumulation() {
return standardConditionAccumulation;
}
public void setStandardConditionAccumulation(String standardConditionAccumulation) {
this.standardConditionAccumulation = standardConditionAccumulation;
}
public String getWorkingConditionAccumulation() {
return workingConditionAccumulation;
}
public void setWorkingConditionAccumulation(String workingConditionAccumulation) {
this.workingConditionAccumulation = workingConditionAccumulation;
}
public String getResidualQuantity() {
return residualQuantity;
}
public void setResidualQuantity(String residualQuantity) {
this.residualQuantity = residualQuantity;
}
public String getStandardConditionFlow() {
return standardConditionFlow;
}
public void setStandardConditionFlow(String standardConditionFlow) {
this.standardConditionFlow = standardConditionFlow;
}
public String getWorkingConditionFlow() {
return workingConditionFlow;
}
public void setWorkingConditionFlow(String workingConditionFlow) {
this.workingConditionFlow = workingConditionFlow;
}
public String getTemperature() {
return temperature;
}
public void setTemperature(String temperature) {
this.temperature = temperature;
}
public String getPressure() {
return pressure;
}
public void setPressure(String pressure) {
this.pressure = pressure;
}
}
package com.zehong.system.domain.vo;
/**
* 查询近七天报警数据返回值封装类
*/
public class SevenDayAlarmVo {
private String time;
private int count;
public String getTime() {
return time;
}
public void setTime(String time) {
this.time = time;
}
public int getCount() {
return count;
}
public void setCount(int count) {
this.count = count;
}
@Override
public String toString() {
return "SevenDayAlarmVo{" +
"time='" + time + '\'' +
", count='" + count + '\'' +
'}';
}
}
package com.zehong.system.domain.vo;
/**
* 可视化页面 工单数据返回值封装类
*/
public class WorkOrderNotReceivedVo {
/**
* 未接收数量
*/
private int workOrderNotReceivedSize;
/**
* 工单已接收数量
*/
private int workOrderReceivedSize;
/**
* 工单已反馈数量
*/
private int workOrderFeedbackSize;
/**
* 工单已归档数量
*/
private int workOrderArchived;
public int getWorkOrderNotReceivedSize() {
return workOrderNotReceivedSize;
}
public void setWorkOrderNotReceivedSize(int workOrderNotReceivedSize) {
this.workOrderNotReceivedSize = workOrderNotReceivedSize;
}
public int getWorkOrderReceivedSize() {
return workOrderReceivedSize;
}
public void setWorkOrderReceivedSize(int workOrderReceivedSize) {
this.workOrderReceivedSize = workOrderReceivedSize;
}
public int getWorkOrderFeedbackSize() {
return workOrderFeedbackSize;
}
public void setWorkOrderFeedbackSize(int workOrderFeedbackSize) {
this.workOrderFeedbackSize = workOrderFeedbackSize;
}
public int getWorkOrderArchived() {
return workOrderArchived;
}
public void setWorkOrderArchived(int workOrderArchived) {
this.workOrderArchived = workOrderArchived;
}
@Override
public String toString() {
return "WorkOrderNotReceivedVo{" +
"workOrderNotReceivedSize=" + workOrderNotReceivedSize +
", workOrderReceivedSize=" + workOrderReceivedSize +
", workOrderFeedbackSize=" + workOrderFeedbackSize +
", workOrderArchived=" + workOrderArchived +
'}';
}
}
...@@ -32,7 +32,7 @@ public interface TWorkOrderMapper ...@@ -32,7 +32,7 @@ public interface TWorkOrderMapper
/** /**
* 查询工单基础信息列表 * 查询工单基础信息列表
* *
* @param tWorkOrder 工单基础信息 * @param tWorkOrderForm 工单基础信息
* @return 工单基础信息集合 * @return 工单基础信息集合
*/ */
public List<TWorkOrder> selectTWorkOrderList(TWorkOrderForm tWorkOrderForm); public List<TWorkOrder> selectTWorkOrderList(TWorkOrderForm tWorkOrderForm);
......
package com.zehong.system.mapper;
import com.zehong.system.domain.vo.SevenDayAlarmVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface VisualizationMapper {
/**
* 查询设备历史监控总数据量
* @return
*/
int HistoricalDataSize();
/**
* 查询设备历史报警数量
* @return
*/
int historicalAlarmSize();
/**
* 查询近七天报警数量数据
* @param newBeforeSevenDaysDate
* @param newYesterdayDate
*/
List<SevenDayAlarmVo> selectSevenDayAlarm(@Param("newBeforeSevenDaysDate") String newBeforeSevenDaysDate, @Param("newYesterdayDate")String newYesterdayDate);
}
...@@ -94,4 +94,5 @@ public interface ITDeviceReportDataService ...@@ -94,4 +94,5 @@ public interface ITDeviceReportDataService
* @return 结果 * @return 结果
*/ */
public int deleteTDeviceReportDataById(Long deviceReportDataId); public int deleteTDeviceReportDataById(Long deviceReportDataId);
} }
...@@ -8,6 +8,7 @@ import com.github.pagehelper.PageInfo; ...@@ -8,6 +8,7 @@ import com.github.pagehelper.PageInfo;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.zehong.system.domain.TWorkOrder; import com.zehong.system.domain.TWorkOrder;
import com.zehong.system.domain.form.TWorkOrderForm; import com.zehong.system.domain.form.TWorkOrderForm;
import com.zehong.system.domain.vo.SevenDayAlarmVo;
import com.zehong.system.domain.vo.WorkOrderVo; import com.zehong.system.domain.vo.WorkOrderVo;
import org.apache.commons.math3.analysis.function.Add; import org.apache.commons.math3.analysis.function.Add;
import org.apache.poi.ss.formula.functions.T; import org.apache.poi.ss.formula.functions.T;
...@@ -90,4 +91,6 @@ public interface ITWorkOrderService ...@@ -90,4 +91,6 @@ public interface ITWorkOrderService
* @return * @return
*/ */
public TWorkOrder orderDtail(String orderId); public TWorkOrder orderDtail(String orderId);
} }
package com.zehong.system.service;
import com.zehong.system.domain.vo.SevenDayAlarmVo;
import java.util.List;
public interface IVisualizationService {
/**
* 查询设备历史监控总数据量
* @return
*/
int HistoricalDataSize();
/**
* 查询设备历史报警数量
* @return
*/
int historicalAlarmSize();
/**
* 查询近七天报警数量数据
* @param newBeforeSevenDaysDate
* @param newYesterdayDate
*/
List<SevenDayAlarmVo> selectSevenDayAlarm(String newBeforeSevenDaysDate, String newYesterdayDate);
}
...@@ -10,6 +10,7 @@ import com.zehong.common.utils.PageInfoUtil; ...@@ -10,6 +10,7 @@ import com.zehong.common.utils.PageInfoUtil;
import com.zehong.system.domain.*; import com.zehong.system.domain.*;
import com.zehong.system.domain.form.TWorkOrderForm; import com.zehong.system.domain.form.TWorkOrderForm;
import com.zehong.system.domain.vo.OrderFeedbackVo; import com.zehong.system.domain.vo.OrderFeedbackVo;
import com.zehong.system.domain.vo.SevenDayAlarmVo;
import com.zehong.system.domain.vo.WorkOrderVo; import com.zehong.system.domain.vo.WorkOrderVo;
import com.zehong.system.mapper.*; import com.zehong.system.mapper.*;
import com.zehong.system.service.ITWorkOrderService; import com.zehong.system.service.ITWorkOrderService;
...@@ -56,7 +57,6 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService ...@@ -56,7 +57,6 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
{ {
WorkOrderVo workOrderVo = new WorkOrderVo(); WorkOrderVo workOrderVo = new WorkOrderVo();
TWorkOrder tWorkOrder = tWorkOrderMapper.selectTWorkOrderById(orderId); TWorkOrder tWorkOrder = tWorkOrderMapper.selectTWorkOrderById(orderId);
BeanUtils.copyProperties(tWorkOrder, workOrderVo); BeanUtils.copyProperties(tWorkOrder, workOrderVo);
// 获取巡检员姓名 // 获取巡检员姓名
...@@ -229,12 +229,12 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService ...@@ -229,12 +229,12 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
@Override @Override
public PageInfo<WorkOrderVo> selectTWorkOrderPage(TWorkOrderForm tWorkOrderForm) throws Exception public PageInfo<WorkOrderVo> selectTWorkOrderPage(TWorkOrderForm tWorkOrderForm) throws Exception
{ {
System.out.println(tWorkOrderForm.toString()+"222222222222");
List<TWorkOrder> workOrderList = tWorkOrderMapper.selectTWorkOrderList(tWorkOrderForm); List<TWorkOrder> workOrderList = tWorkOrderMapper.selectTWorkOrderList(tWorkOrderForm);
System.out.println(workOrderList);
PageInfo<WorkOrderVo> pageVo = PageInfoUtil.pageInfo2PageInfoDTO(new PageInfo<>(workOrderList),WorkOrderVo.class); PageInfo<WorkOrderVo> pageVo = PageInfoUtil.pageInfo2PageInfoDTO(new PageInfo<>(workOrderList),WorkOrderVo.class);
if(pageVo.getList().size() != 0){ if(pageVo.getList().size() != 0){
for(WorkOrderVo workOrder : pageVo.getList()){ for(WorkOrderVo workOrder : pageVo.getList()){
// 获取巡检员姓名 // 获取巡检员姓名
SysUser appointInspector = sysUserMapper.selectUserById(workOrder.getAppointInspector()); SysUser appointInspector = sysUserMapper.selectUserById(workOrder.getAppointInspector());
workOrder.setAppointInspectorName(appointInspector.getNickName()); workOrder.setAppointInspectorName(appointInspector.getNickName());
...@@ -247,6 +247,7 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService ...@@ -247,6 +247,7 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
} }
} }
} }
System.out.println(pageVo);
return pageVo; return pageVo;
} }
...@@ -381,4 +382,6 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService ...@@ -381,4 +382,6 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
TWorkOrder order = tWorkOrderMapper.selectTWorkOrderById(orderId); TWorkOrder order = tWorkOrderMapper.selectTWorkOrderById(orderId);
return tWorkOrderMapper.orderdtail(orderId,order.getOrderType()); return tWorkOrderMapper.orderdtail(orderId,order.getOrderType());
} }
} }
package com.zehong.system.service.impl;
import com.zehong.system.domain.vo.SevenDayAlarmVo;
import com.zehong.system.mapper.VisualizationMapper;
import com.zehong.system.service.IVisualizationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
@Service
public class VisualizationServiceImpl implements IVisualizationService {
@Autowired
VisualizationMapper visualizationMapper;
/**
* 查询设备历史监控总数据量
* @return
*/
@Override
public int HistoricalDataSize() {
return visualizationMapper.HistoricalDataSize();
}
/**
* 查询设备历史报警数量
* @return
*/
@Override
public int historicalAlarmSize() {
return visualizationMapper.historicalAlarmSize();
}
/**
* 查询近七天报警数量数据
* @param newBeforeSevenDaysDate
* @param newYesterdayDate
* @return
*/
@Override
public List<SevenDayAlarmVo> selectSevenDayAlarm(String newBeforeSevenDaysDate, String newYesterdayDate) {
return visualizationMapper.selectSevenDayAlarm(newBeforeSevenDaysDate, newYesterdayDate);
}
}
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.VisualizationMapper">
<!--查询设备历史监控总数据量-->
<select id="HistoricalDataSize" resultType="java.lang.Integer">
select
count(t.report_time)
from t_device_report_data t
join t_device_info d on t.device_num = d.iot_no
where d.is_del = '0'
order by t.report_time desc
</select>
<!--查询设备历史报警数量-->
<select id="historicalAlarmSize" resultType="java.lang.Integer">
select count(device_status) from (
select
CASE (SELECT COUNT(DISTINCT alarm.device_id) FROM t_device_alarm alarm WHERE alarm.device_id = d.device_id AND alarm.end_time IS NULL)
WHEN 0 THEN '正常'
ELSE '报警'
END as device_status
from t_device_report_data t
join t_device_info d on t.device_num = d.iot_no
where d.is_del = '0' ) a where a.device_status='报警'
</select>
<!--查询近七天报警数量数据-->
<select id="selectSevenDayAlarm" resultType="com.zehong.system.domain.vo.SevenDayAlarmVo">
select DATE_FORMAT(create_time,'%Y-%m-%d') as time,count(create_time) as count from (
select
CASE (SELECT COUNT(DISTINCT alarm.device_id) FROM t_device_alarm alarm WHERE alarm.device_id = d.device_id AND alarm.end_time IS NULL)
WHEN 0 THEN '正常'
ELSE '报警'
END as device_status,create_time
from t_device_report_data t
join t_device_info d on t.device_num = d.iot_no
where d.is_del = '0' ) a where a.device_status='报警'
and create_time between #{newBeforeSevenDaysDate} and #{newYesterdayDate}
group by
DATE_FORMAT(create_time,'%Y-%m-%d')
</select>
</mapper>
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
"clipboard": "2.0.6", "clipboard": "2.0.6",
"core-js": "3.8.1", "core-js": "3.8.1",
"echarts": "^4.9.0", "echarts": "^4.9.0",
"element-ui": "2.15.0", "element-ui": "^2.15.9",
"file-saver": "2.0.4", "file-saver": "2.0.4",
"fuse.js": "6.4.3", "fuse.js": "6.4.3",
"highlight.js": "9.18.5", "highlight.js": "9.18.5",
...@@ -3350,7 +3350,7 @@ ...@@ -3350,7 +3350,7 @@
"node_modules/babel-runtime": { "node_modules/babel-runtime": {
"version": "6.26.0", "version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==",
"dependencies": { "dependencies": {
"core-js": "^2.4.0", "core-js": "^2.4.0",
"regenerator-runtime": "^0.11.0" "regenerator-runtime": "^0.11.0"
...@@ -3360,7 +3360,7 @@ ...@@ -3360,7 +3360,7 @@
"version": "2.6.12", "version": "2.6.12",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz",
"integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==", "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==",
"deprecated": "core-js@<3.4 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js.", "deprecated": "core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.",
"hasInstallScript": true "hasInstallScript": true
}, },
"node_modules/babel-runtime/node_modules/regenerator-runtime": { "node_modules/babel-runtime/node_modules/regenerator-runtime": {
...@@ -6079,9 +6079,9 @@ ...@@ -6079,9 +6079,9 @@
"dev": true "dev": true
}, },
"node_modules/element-ui": { "node_modules/element-ui": {
"version": "2.15.0", "version": "2.15.9",
"resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.15.0.tgz", "resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.15.9.tgz",
"integrity": "sha512-9z/1+b7V8fvp08OnKUEW4/BZ72kT+IhuKR9cTMz3XoCTKmEsqLLb32XjbO/DznSFaaiFbOYU93G7WtkvrCAL9A==", "integrity": "sha512-dx45nQLt4Hn87/Z9eRr3ex6KFZbxlFAwEU3QoW3wA5EsYftvHTyL9Pq7VnXXD7hu1Eiaup2jcs6kp+/VSFmXuA==",
"dependencies": { "dependencies": {
"async-validator": "~1.8.1", "async-validator": "~1.8.1",
"babel-helper-vue-jsx-merge-props": "^2.0.0", "babel-helper-vue-jsx-merge-props": "^2.0.0",
...@@ -10602,7 +10602,7 @@ ...@@ -10602,7 +10602,7 @@
"node_modules/normalize-wheel": { "node_modules/normalize-wheel": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz", "resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
"integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU=" "integrity": "sha512-1OnlAPZ3zgrk8B91HyRj+eVv+kS5u+Z0SCsak6Xil/kmgEia50ga7zfkumayonZrImffAxPU/5WcyGhzetHNPA=="
}, },
"node_modules/npm-run-path": { "node_modules/npm-run-path": {
"version": "2.0.2", "version": "2.0.2",
...@@ -19234,7 +19234,7 @@ ...@@ -19234,7 +19234,7 @@
"babel-runtime": { "babel-runtime": {
"version": "6.26.0", "version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz",
"integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", "integrity": "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g==",
"requires": { "requires": {
"core-js": "^2.4.0", "core-js": "^2.4.0",
"regenerator-runtime": "^0.11.0" "regenerator-runtime": "^0.11.0"
...@@ -21556,9 +21556,9 @@ ...@@ -21556,9 +21556,9 @@
"dev": true "dev": true
}, },
"element-ui": { "element-ui": {
"version": "2.15.0", "version": "2.15.9",
"resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.15.0.tgz", "resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.15.9.tgz",
"integrity": "sha512-9z/1+b7V8fvp08OnKUEW4/BZ72kT+IhuKR9cTMz3XoCTKmEsqLLb32XjbO/DznSFaaiFbOYU93G7WtkvrCAL9A==", "integrity": "sha512-dx45nQLt4Hn87/Z9eRr3ex6KFZbxlFAwEU3QoW3wA5EsYftvHTyL9Pq7VnXXD7hu1Eiaup2jcs6kp+/VSFmXuA==",
"requires": { "requires": {
"async-validator": "~1.8.1", "async-validator": "~1.8.1",
"babel-helper-vue-jsx-merge-props": "^2.0.0", "babel-helper-vue-jsx-merge-props": "^2.0.0",
...@@ -25232,7 +25232,7 @@ ...@@ -25232,7 +25232,7 @@
"normalize-wheel": { "normalize-wheel": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz", "resolved": "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz",
"integrity": "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU=" "integrity": "sha512-1OnlAPZ3zgrk8B91HyRj+eVv+kS5u+Z0SCsak6Xil/kmgEia50ga7zfkumayonZrImffAxPU/5WcyGhzetHNPA=="
}, },
"npm-run-path": { "npm-run-path": {
"version": "2.0.2", "version": "2.0.2",
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"dev": "vue-cli-service serve", "dev": "vue-cli-service serve",
"build:prod": "vue-cli-service build", "build": "vue-cli-service build",
"build:stage": "vue-cli-service build --mode staging", "build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview", "preview": "node build/index.js --preview",
"lint": "eslint --ext .js,.vue src" "lint": "eslint --ext .js,.vue src"
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
"clipboard": "2.0.6", "clipboard": "2.0.6",
"core-js": "3.8.1", "core-js": "3.8.1",
"echarts": "^4.9.0", "echarts": "^4.9.0",
"element-ui": "2.15.0", "element-ui": "^2.15.9",
"file-saver": "2.0.4", "file-saver": "2.0.4",
"fuse.js": "6.4.3", "fuse.js": "6.4.3",
"highlight.js": "9.18.5", "highlight.js": "9.18.5",
......
import request from '@/utils/request'
// 查询设备实时监控列表数量接口 (报警状态)
export function EquipmentAlarmSize() {
return request({
url: '/visualization/visualizationData/equipmentAlarmSize',
method: 'get'
})
}
// 查询设备实时监控列表数量接口 (正常状态)
export function equipmentNormalSize() {
return request({
url: '/visualization/visualizationData/equipmentNormalSize',
method: 'get'
})
}
// 查询设备历史监控总数据量
export function historicalDataSize() {
return request({
url: '/visualization/visualizationData/historicalDataSize',
method: 'get'
})
}
// 查询设备历史报警数量
export function historicalAlarmSize() {
return request({
url: '/visualization/visualizationData/historicalAlarmSize',
method: 'get'
})
}
// 工单未接收数量
export function workOrderNotReceived() {
return request({
url: '/visualization/visualizationData/workOrderNotReceived',
method: 'get'
})
}
// 设备近七天报警数量
export function sevenDayAlarm() {
return request({
url: '/visualization/visualizationData/sevenDayAlarm',
method: 'get'
})
}
...@@ -9,7 +9,7 @@ export function listLocation(query) { ...@@ -9,7 +9,7 @@ export function listLocation(query) {
}) })
} }
//初始化巡检员位置及路线 //初始化巡检员位置及路线s
export function getInspectorLocations(query){ export function getInspectorLocations(query){
return request({ return request({
url: '/system/location/getInspectorLocations', url: '/system/location/getInspectorLocations',
......
<svg id="组_2447" data-name="组 2447" xmlns="http://www.w3.org/2000/svg" width="23.304" height="34.295" viewBox="0 0 23.304 34.295"> <svg width="22" height="33" viewBox="0 0 22 33" fill="none" xmlns="http://www.w3.org/2000/svg">
<path id="路径_168" data-name="路径 168" d="M-1603.123-57.691a9.445,9.445,0,0,0-9.234-8.255,9.5,9.5,0,0,0-9.333,9.663,9.5,9.5,0,0,0,9.333,9.663,9.445,9.445,0,0,0,9.234-8.255h.76v-2.817Zm-16.383.73a7.312,7.312,0,0,1,6.469-6.722v1.475a5.871,5.871,0,0,0-5.045,5.246Zm6.469,8.079a7.311,7.311,0,0,1-6.465-6.67h1.425a5.869,5.869,0,0,0,5.039,5.2Zm-.242-6.99v3.214h-1.149v-7.262h4.784V-58.9h-3.635v2.014h3.429v1.017Zm1.6,6.99v-1.475a5.869,5.869,0,0,0,5.039-5.2h1.425A7.311,7.311,0,0,1-1611.677-48.883Zm5.045-8.079a5.871,5.871,0,0,0-5.045-5.246v-1.475a7.313,7.313,0,0,1,6.469,6.722Z" transform="translate(1624.104 68.362)" fill="#7bf8f4"/> <path d="M19.8076 9.89422C19.5377 7.80085 18.5071 5.87365 16.9055 4.46727C15.3039 3.06089 13.239 2.26995 11.0909 2.23999C8.71311 2.28135 6.44933 3.24836 4.7972 4.92847C3.14506 6.60858 2.23983 8.86428 2.28036 11.1998C2.23983 13.5352 3.14506 15.7909 4.7972 17.471C6.44933 19.1511 8.71311 20.1182 11.0909 20.1595C13.239 20.1296 15.3039 19.3386 16.9055 17.9322C18.5071 16.5259 19.5377 14.5987 19.8076 12.5053H20.5246V9.89344L19.8076 9.89422ZM4.34153 10.5706C4.46122 8.99578 5.13686 7.51138 6.25182 6.37355C7.36677 5.23572 8.85117 4.51585 10.4488 4.33814V5.70644C9.21344 5.87288 8.07134 6.44361 7.20705 7.3264C6.34276 8.20919 5.8068 9.35245 5.6858 10.5714L4.34153 10.5706ZM10.4488 18.0614C8.85947 17.8847 7.38195 17.1712 6.26886 16.043C5.15577 14.9149 4.47624 13.442 4.34635 11.8762H5.69206C5.82275 13.0858 6.3624 14.2176 7.22477 15.0908C8.08714 15.9639 9.22249 16.528 10.4496 16.6931L10.4488 18.0614ZM10.2208 11.5794V14.5601H9.13457V7.82628H13.6507V8.76921H10.2192V10.6365H13.4535V11.5794H10.2208ZM11.733 18.0614V16.6931C12.96 16.5279 14.0953 15.9637 14.9577 15.0906C15.82 14.2175 16.3597 13.0858 16.4905 11.8762H17.8363C17.7064 13.4422 17.0267 14.9153 15.9135 16.0436C14.8002 17.1719 13.3225 17.8854 11.733 18.0621V18.0614ZM16.4953 10.5706C16.3743 9.35179 15.8385 8.20862 14.9743 7.32584C14.1102 6.44307 12.9682 5.87226 11.733 5.70566V4.33737C13.3306 4.51507 14.815 5.23495 15.93 6.37278C17.0449 7.51061 17.7205 8.99501 17.8402 10.5698L16.4953 10.5706Z" fill="#EAC448"/>
<g id="路径_185" data-name="路径 185" fill="none"> <path d="M10.9999 0.774798C8.2724 0.774798 5.70818 1.81803 3.77958 3.71233C1.85098 5.60662 0.788841 8.12521 0.788841 10.8042C0.788841 14.5838 5.96248 21.461 10.979 26.8353C10.9912 26.8218 11.0037 26.8082 11.0163 26.7944C12.13 25.572 14.738 22.7094 17.024 19.5701C19.7631 15.8086 21.2109 12.7773 21.2109 10.8042C21.2109 8.12521 20.1487 5.60662 18.2201 3.71233C16.2915 1.81803 13.7273 0.774798 10.9999 0.774798ZM10.9999 0C17.0749 0 21.9997 4.83719 21.9997 10.8042C21.9997 16.7489 10.9895 27.8445 10.9993 27.9984C10.8704 27.8447 0 16.711 0 10.8042C0 4.83719 4.9248 0 10.9999 0ZM10.9993 27.9984C11.0006 27.9999 11.0008 28.0004 10.9999 27.9996C10.9995 27.9994 10.9993 27.999 10.9993 27.9984Z" fill="#EAC448"/>
<path d="M11.652,0A11.652,11.652,0,0,1,23.3,11.652c0,6.435-11.75,18.467-11.652,18.545S0,18.087,0,11.652A11.652,11.652,0,0,1,11.652,0Z" stroke="none"/> <g filter="url(#filter0_f_35_132)">
<path d="M 11.65185546875 0.9999942779541016 C 5.77839469909668 0.9999942779541016 0.9999961853027344 5.778413772583008 0.9999961853027344 11.65188407897949 C 0.9999961853027344 15.65063667297363 6.374073028564453 22.94361305236816 11.62834739685059 28.69588470458984 C 12.84814071655273 27.33243751525879 15.5371789932251 24.3126106262207 17.89928436279297 21.01001358032227 C 19.90856552124023 18.20073509216309 22.3037052154541 14.29677486419678 22.3037052154541 11.65188407897949 C 22.3037052154541 5.778413772583008 17.52530479431152 0.9999942779541016 11.65185546875 0.9999942779541016 M 11.65185546875 -5.7220458984375e-06 C 18.08699607849121 -5.7220458984375e-06 23.3037052154541 5.216724395751953 23.3037052154541 11.65188407897949 C 23.3037052154541 18.06309509277344 11.64087867736816 30.02925682067871 11.65124988555908 30.19523429870605 C 11.5146951675415 30.02953720092773 -3.814697265625e-06 18.02224731445312 -3.814697265625e-06 11.65188407897949 C -3.814697265625e-06 5.216724395751953 5.216714859008789 -5.7220458984375e-06 11.65185546875 -5.7220458984375e-06 Z M 11.65124988555908 30.19523429870605 C 11.65263366699219 30.19691467285156 11.65285301208496 30.19738388061523 11.65185546875 30.19659423828125 C 11.6514892578125 30.19630432128906 11.65128803253174 30.19585609436035 11.65124988555908 30.19523429870605 Z" stroke="none" fill="#7bf8f4"/> <path d="M11.118 27.9995L6.84167 22.3993H15.3943L11.118 27.9995Z" fill="#EAC448"/>
</g> </g>
<path id="多边形_32" data-name="多边形 32" d="M4.53,0l4.53,6.039H0Z" transform="translate(16.306 30.197) rotate(180)" fill="#7bf8f4"/> <defs>
<filter id="filter0_f_35_132" x="2.84155" y="18.3993" width="16.5527" height="13.6002" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="2" result="effect1_foregroundBlur_35_132"/>
</filter>
</defs>
</svg> </svg>
<template>
<el-dialog title="收货地址" :visible.sync="dialogFormVisible">
<el-form :model="form">
<el-form-item label="活动名称" :label-width="formLabelWidth">
<el-input v-model="form.name" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="活动区域" :label-width="formLabelWidth">
<el-select v-model="form.region" placeholder="请选择活动区域">
<el-option label="区域一" value="shanghai"></el-option>
<el-option label="区域二" value="beijing"></el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取 消</el-button>
<el-button type="primary" @click="dialogFormVisible = false">确 定</el-button>
</div>
</el-dialog>
</template>
<el-button type="text" @click="dialogTableVisible = true">打开嵌套表格的 Dialog</el-button>
<script>
export default {
name: "equipment"
}
</script>
<style scoped>
</style>
...@@ -79,13 +79,13 @@ ...@@ -79,13 +79,13 @@
<div>报警状态:<span>报警</span></div> <div>报警状态:<span>报警</span></div>
<div>详细信息:<span>管线两端设备压差较大,管线可能泄漏</span></div> <div>详细信息:<span>管线两端设备压差较大,管线可能泄漏</span></div>
</div> --> </div> -->
<div class="btn"> <!-- <div class="btn">-->
<span @mousedown.stop="deviceMore"> <!-- <span @mousedown.stop="deviceMore">-->
<el-button class="elbtn" type="primary">设备详情</el-button> <!-- <el-button class="elbtn" type="primary">设备详情</el-button>-->
</span> <!-- </span>-->
<!-- <el-button class="elbtn" type="primary">生成工单</el-button> --> <!-- <el-button class="elbtn" type="primary">生成工单</el-button> -->
</div> <!-- </div>-->
</div> </div>
</div> </div>
</template> </template>
...@@ -132,16 +132,18 @@ export default { ...@@ -132,16 +132,18 @@ export default {
}, },
deviceMore() { deviceMore() {
this.view.dialogFormVisible=true;
this.view.hiddenDanger=this.obj
console.log(this.obj.polyline.getExtData().lineData); console.log(this.obj.polyline.getExtData().lineData);
this.obj.polyline.getExtData().class.view.$router.push({ // this.obj.polyline.getExtData().class.view.$router.push({
// path: "/dataMonitoring/realtimedetail", // // path: "/dataMonitoring/realtimedetail",
path: "/device/pipeDetail", // path: "/device/pipeDetail",
query: { // query: {
pipeId: this.obj.polyline.getExtData().lineData.pipeId, // pipeId: this.obj.polyline.getExtData().lineData.pipeId,
//这里是传数字 // //这里是传数字
deviceType: "0", // deviceType: "0",
}, // },
}); // });
}, },
}, },
}; };
...@@ -168,6 +170,7 @@ export default { ...@@ -168,6 +170,7 @@ export default {
// border: 1px solid #fff; // border: 1px solid #fff;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
background: rgb(4,17,31,0.6);
&:before { &:before {
content: ""; content: "";
position: absolute; position: absolute;
...@@ -175,8 +178,8 @@ export default { ...@@ -175,8 +178,8 @@ export default {
top: 5px; top: 5px;
z-index: -1; z-index: -1;
width: 33px; width: 33px;
height: 33px; height: 26px;
background-image: url(../../assets/images/blueLeftTriangle.png); background-image: url(../../assets/images/polygon.png);
} }
.text { .text {
font-weight: 600; font-weight: 600;
...@@ -200,7 +203,7 @@ export default { ...@@ -200,7 +203,7 @@ export default {
overflow: hidden; overflow: hidden;
overflow-y: auto; overflow-y: auto;
padding-bottom: 2px; padding-bottom: 2px;
border-bottom: 1px solid #eeeeee; /*border-bottom: 1px solid #eeeeee;*/
.eq-content { .eq-content {
// min-height: 156px; // min-height: 156px;
box-sizing: border-box; box-sizing: border-box;
......
...@@ -56,7 +56,6 @@ ...@@ -56,7 +56,6 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 报警状态 --> <!-- 报警状态 -->
<div class="warn-wrapper" v-if="true"> <div class="warn-wrapper" v-if="true">
<!-- <div class="warn-content"> <!-- <div class="warn-content">
...@@ -65,10 +64,11 @@ ...@@ -65,10 +64,11 @@
</div> --> </div> -->
<template v-if="data.deviceType ==3 || data.deviceType==4"> <template v-if="data.deviceType ==3 || data.deviceType==4">
<div v-if="data.deviceType==3" class="windowwarn-content" style=" <div v-if="data.deviceType==3" class="windowwarn-content" style="
border-bottom: 1px solid #e2e2e2;
padding: 10px 0 2px 22px; padding: 10px 0 2px 22px;
height: 150px;padding-bottom: 2px; height: 150px;
"> ">
<div style="border-bottom: 1px solid #eeeeee;">
</div>
<el-col :span="12"> <el-col :span="12">
<div class="windowwarn"> <div class="windowwarn">
标况累积量:<span class="standardConditionAccumulation">-</span> 标况累积量:<span class="standardConditionAccumulation">-</span>
...@@ -111,10 +111,11 @@ ...@@ -111,10 +111,11 @@
</el-col> </el-col>
</div> </div>
<div v-if="data.deviceType==4" class="windowwarn-content" style=" <div v-if="data.deviceType==4" class="windowwarn-content" style="
border-bottom: 1px solid #e2e2e2;
padding: 10px 0 2px 22px; padding: 10px 0 2px 22px;
height: 70px;padding-bottom: 2px; height: 70px;padding-bottom: 2px;
"> ">
<div style="border-bottom: 1px solid #eeeeee;">
</div>
<el-col :span="24"> <el-col :span="24">
<div class="windowwarn"> <div class="windowwarn">
压力:<span class="pressure">-</span> 压力:<span class="pressure">-</span>
...@@ -129,12 +130,29 @@ ...@@ -129,12 +130,29 @@
</template> </template>
<div class="btn"> <!-- <div class="btn">-->
<span @mousedown.stop="deviceMore"> <!-- <span @mousedown.stop="deviceMore">-->
<el-button class="elbtn" type="primary">设备详情</el-button> <!-- <el-button class="elbtn" type="primary">设备详情</el-button>-->
</span> <!-- </span>-->
<!-- <el-dialog title="收货地址" :visible.sync="dialogFormVisible">-->
<!-- <el-form :model="form">-->
<!-- <el-form-item label="活动名称" :label-width="formLabelWidth">-->
<!-- <el-input v-model="form.name" autocomplete="off"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="活动区域" :label-width="formLabelWidth">-->
<!-- <el-select v-model="form.region" placeholder="请选择活动区域">-->
<!-- <el-option label="区域一" value="shanghai"></el-option>-->
<!-- <el-option label="区域二" value="beijing"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- <div slot="footer" class="dialog-footer">-->
<!-- <el-button @click="dialogFormVisible = false">取 消</el-button>-->
<!-- <el-button type="primary" @click="dialogFormVisible = false">确 定</el-button>-->
<!-- </div>-->
<!-- </el-dialog>-->
<!-- <el-button class="elbtn" type="primary">生成工单</el-button> --> <!-- <el-button class="elbtn" type="primary">生成工单</el-button> -->
</div> <!-- </div>-->
</div> </div>
</div> </div>
</template> </template>
...@@ -150,6 +168,7 @@ ...@@ -150,6 +168,7 @@
title: "", title: "",
data: {}, data: {},
map: null, map: null,
dialogFormVisible:false,
}, },
data() { data() {
return { return {
...@@ -180,14 +199,16 @@ ...@@ -180,14 +199,16 @@
methods: { methods: {
moment, moment,
deviceMore() { deviceMore() {
this.data.class.view.$router.push({ alert("111")
// path: "/dataMonitoring/realtimedetail", this.dialogFormVisible=true;
path: "/device/deviceInfoDetail", // this.data.class.view.$router.push({
query: { // // path: "/dataMonitoring/realtimedetail",
deviceId: this.data.deviceId, // path: "/device/deviceInfoDetail",
// deviceType: this.data.deviceType, // query: {
}, // deviceId: this.data.deviceId,
}); // // deviceType: this.data.deviceType,
// },
// });
}, },
getDataid() { getDataid() {
getWindowData(this.data.deviceId).then(response => { getWindowData(this.data.deviceId).then(response => {
...@@ -248,6 +269,7 @@ ...@@ -248,6 +269,7 @@
background: rgba(7, 29, 51, 0.9); background: rgba(7, 29, 51, 0.9);
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16); box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
color: #fff; color: #fff;
/*border-bottom: 1px solid #e2e2e2;*/
// overflow: hidden; // overflow: hidden;
.top { .top {
...@@ -257,7 +279,9 @@ ...@@ -257,7 +279,9 @@
background-image: url(../../assets/images/blueTopBg.png); background-image: url(../../assets/images/blueTopBg.png);
background-size: 100% 100%; background-size: 100% 100%;
background-position: center; background-position: center;
background: rgb(4,17,31,0.8);
/*background:rgba(255,0,0,0.5);*/
opacity:0.8;
&:before { &:before {
// content: ""; // content: "";
// position: absolute; // position: absolute;
...@@ -275,8 +299,8 @@ ...@@ -275,8 +299,8 @@
top: 5px; top: 5px;
z-index: -1; z-index: -1;
width: 33px; width: 33px;
height: 33px; height: 26px;
background-image: url(../../assets/images/blueLeftTriangle.png); background-image: url(../../assets/images/polygon.png);
} }
.text { .text {
...@@ -305,7 +329,7 @@ ...@@ -305,7 +329,7 @@
overflow: hidden; overflow: hidden;
overflow-y: auto; overflow-y: auto;
padding-bottom: 2px; padding-bottom: 2px;
border-bottom: 1px solid #eeeeee; /*border-bottom: 1px solid #eeeeee;*/
.eq-content { .eq-content {
// min-height: 156px; // min-height: 156px;
...@@ -381,7 +405,7 @@ ...@@ -381,7 +405,7 @@
.warn-content { .warn-content {
box-sizing: border-box; box-sizing: border-box;
padding: 10px 0 2px 22px; padding: 10px 0 2px 22px;
border-bottom: 1px solid #e2e2e2; /*border-bottom: 1px solid #e2e2e2;*/
color: #fe5966; color: #fe5966;
&>div { &>div {
......
...@@ -62,7 +62,6 @@ ...@@ -62,7 +62,6 @@
</div> </div>
</div> </div>
</div> </div>
<!-- 隐患关联设备状态 --> <!-- 隐患关联设备状态 -->
<div class="warn-wrapper" v-if="true"> <div class="warn-wrapper" v-if="true">
<div class="warn-content"> <div class="warn-content">
...@@ -91,6 +90,8 @@ ...@@ -91,6 +90,8 @@
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
...@@ -102,6 +103,7 @@ export default { ...@@ -102,6 +103,7 @@ export default {
title: "", title: "",
data: {}, data: {},
map: null, map: null,
hiddenDanger:[]
}, },
data() { data() {
return { return {
...@@ -159,13 +161,18 @@ export default { ...@@ -159,13 +161,18 @@ export default {
this.data.class.view.domAllShow(); this.data.class.view.domAllShow();
}, },
deviceMore() { deviceMore() {
this.data.class.view.$router.push({ this.data.class.view.dialogFormVisible=true;
path: "/riskManagement/hiddenTroubleDetail", this.data.class.view.hiddenDanger=this.data
query: {
troubleId: this.data.troubleId, // this.dialogFormVisible=true;
// dcviceType: this.deviceType[this.data.deviceType], // this.hiddenDanger=this.obj
}, // this.data.class.view.$router.push({
}); // path: "/riskManagement/hiddenTroubleDetail",
// query: {
// troubleId: this.data.troubleId,
// // dcviceType: this.deviceType[this.data.deviceType],
// },
// });
}, },
// 查看工单 // 查看工单
checkWork() { checkWork() {
......
...@@ -136,8 +136,8 @@ export default { ...@@ -136,8 +136,8 @@ export default {
label: item.nickName, label: item.nickName,
value: item.userId, value: item.userId,
})); }));
this.formData.beginTime = moment().format("YYYY-MM-DD HH:mm:ss"); this.formData.beginTime = moment().add(-2, "h").format("YYYY-MM-DD HH:mm:ss");
this.formData.endTime = moment().add(2, "h").format("YYYY-MM-DD HH:mm:ss"); this.formData.endTime = moment().format("YYYY-MM-DD HH:mm:ss");
}, },
watch: { watch: {
dialogVisible(val) { dialogVisible(val) {
...@@ -158,11 +158,9 @@ export default { ...@@ -158,11 +158,9 @@ export default {
.subtract(2, "h") .subtract(2, "h")
.format("YYYY-MM-DD HH:mm:ss"); .format("YYYY-MM-DD HH:mm:ss");
this.formData.endTime = moment().format("YYYY-MM-DD HH:mm:ss"); this.formData.endTime = moment().format("YYYY-MM-DD HH:mm:ss");
} else if (e == 2) { } else if (e == 2) { //24小时
this.formData.beginTime = moment().format("YYYY-MM-DD HH:mm:ss"); this.formData.beginTime = moment().add(-1, "d").format("YYYY-MM-DD HH:mm:ss");
this.formData.endTime = moment() this.formData.endTime = moment().format("YYYY-MM-DD HH:mm:ss");
.add(1, "d")
.format("YYYY-MM-DD HH:mm:ss");
} else { } else {
this.formData.beginTime = ""; this.formData.beginTime = "";
this.formData.endTime = ""; this.formData.endTime = "";
...@@ -171,14 +169,14 @@ export default { ...@@ -171,14 +169,14 @@ export default {
ok() { ok() {
this.$refs.formData.validate((valid) => { this.$refs.formData.validate((valid) => {
if (valid) { if (valid) {
if ( // if (
moment(this.formData.beginTime).valueOf() > // moment(this.formData.beginTime).valueOf() >
moment(this.formData.endTime).valueOf() // moment(this.formData.endTime).valueOf()
) { // ) {
this.msgError("开始时间不能大于结束时间"); // this.msgError("开始时间不能大于结束时间");
this.formData.endTime = ""; // this.formData.endTime = "";
return; // return;
} // }
this.okLoading = true; this.okLoading = true;
if (this.formData.changeTime != 3) { if (this.formData.changeTime != 3) {
......
...@@ -95,6 +95,7 @@ ...@@ -95,6 +95,7 @@
map: gaode.myMap map: gaode.myMap
}); });
}); });
}) })
} }
}, },
......
<template> <template>
<el-dialog <el-dialog
title="拾取坐标" title="拾取坐标22"
:visible.sync="dialogTableVisible" :visible.sync="dialogTableVisible"
:before-close="handleClose" :before-close="handleClose"
> >
...@@ -49,8 +49,11 @@ ...@@ -49,8 +49,11 @@
handler(value) { handler(value) {
if(value){ if(value){
window.addEventListener("click", this.barClose); window.addEventListener("click", this.barClose);
this.$nextTick(() => { this.$nextTick(() => {
this.map = new gaodeMap(process.env.VUE_APP_MAP_CENTER); this.map = new gaodeMap(process.env.VUE_APP_MAP_CENTER);
this.map.searchTips(this.map.myMap);
this.map.addMouseTool(); this.map.addMouseTool();
if(this.str){ if(this.str){
this.map.addPolyline([{coordinates:this.str}]); this.map.addPolyline([{coordinates:this.str}]);
...@@ -60,6 +63,12 @@ ...@@ -60,6 +63,12 @@
if (this.map.newLineObj == null) { if (this.map.newLineObj == null) {
this.map.createNewLine(); this.map.createNewLine();
} }
//搜索功能
// AMap.plugin(["AMap.AutoComplete","AMap.PlaceSearch"], function() {
// that.placeSearch = new AMap.PlaceSearch({
// map: gaode.myMap
// });
// });
}) })
}else{ }else{
...@@ -85,7 +94,7 @@ ...@@ -85,7 +94,7 @@
this.$emit('dialogcancelFun'); this.$emit('dialogcancelFun');
}, },
search(){ search(){
this.placeSearch.search(this.keyWorld); //关键字查询查询 this.map.placeSearch.search(this.keyWorld); //关键字查询查询
}, },
handleClose(){ handleClose(){
this.$emit('dialogcancelFun'); this.$emit('dialogcancelFun');
......
...@@ -12,7 +12,7 @@ import { delPipe } from "@/api/device/pipe.js"; ...@@ -12,7 +12,7 @@ import { delPipe } from "@/api/device/pipe.js";
import { lineColor,mapStyle } from "@/utils/mapCommon.js"; import { lineColor,mapStyle } from "@/utils/mapCommon.js";
import vue from "@/main"; import vue from "@/main";
let defaultCenter = "石家庄"; let defaultCenter = "新疆巴州";
export let map; export let map;
export const DEVICE_TYPE = { export const DEVICE_TYPE = {
PIPEPLINE: "1", PIPEPLINE: "1",
...@@ -43,7 +43,7 @@ class gaodeMap { ...@@ -43,7 +43,7 @@ class gaodeMap {
this.center = center ? center : defaultCenter; this.center = center ? center : defaultCenter;
map = new AMap.Map("container1", { map = new AMap.Map("container1", {
//mask: addMask(result.districtList[0].boundaries), //mask: addMask(result.districtList[0].boundaries),
center: [114.72995, 38.37417], center: [86.144237,41.775235],
// resizeEnable: true, // resizeEnable: true,
disableSocket: true, disableSocket: true,
viewMode: "3D", viewMode: "3D",
...@@ -89,7 +89,8 @@ class gaodeMap { ...@@ -89,7 +89,8 @@ class gaodeMap {
// console.log("缩放开始") // console.log("缩放开始")
this.closeInfoWindow() this.closeInfoWindow()
}) })
this.districtBoundaries(); // this.districtBoundaries();
} }
/** /**
...@@ -106,7 +107,7 @@ class gaodeMap { ...@@ -106,7 +107,7 @@ class gaodeMap {
*/ */
set setCenter(value) { set setCenter(value) {
this.center = value; this.center = value;
this.districtBoundaries(); // this.districtBoundaries();
} }
resetMapCenter(value) { resetMapCenter(value) {
...@@ -887,9 +888,9 @@ class gaodeMap { ...@@ -887,9 +888,9 @@ class gaodeMap {
} }
); );
} }
placeSearch=null;
searchTips(inputId) { searchTips(map) {
let that = this; let that = this
AMap.plugin(["AMap.AutoComplete", "AMap.PlaceSearch"], function() { AMap.plugin(["AMap.AutoComplete", "AMap.PlaceSearch"], function() {
//输入提示 //输入提示
// var autoOptions = { // var autoOptions = {
...@@ -897,7 +898,7 @@ class gaodeMap { ...@@ -897,7 +898,7 @@ class gaodeMap {
// }; // };
// let auto = new AMap.AutoComplete(autoOptions); // let auto = new AMap.AutoComplete(autoOptions);
that.placeSearch = new AMap.PlaceSearch({ that.placeSearch = new AMap.PlaceSearch({
map: map map,
}); });
//构造地点查询类 //构造地点查询类
// auto.on("select", function(e) { // auto.on("select", function(e) {
......
...@@ -8,11 +8,10 @@ import pipelineView from "../components/PopWindow/pipelineView.vue"; ...@@ -8,11 +8,10 @@ import pipelineView from "../components/PopWindow/pipelineView.vue";
import lineInfoWindow from "../components/PopWindow/lineInfoWindow.vue"; import lineInfoWindow from "../components/PopWindow/lineInfoWindow.vue";
import { delDeviceInfo, updateDeviceInfo } from "@/api/device/deviceInfo"; import { delDeviceInfo, updateDeviceInfo } from "@/api/device/deviceInfo";
import markerInfoWindow from "../components/PopWindow/markerInfoWindow.vue"; import markerInfoWindow from "../components/PopWindow/markerInfoWindow.vue";
import { getArray } from "@/utils/gassafety.js";
import { delPipe, updatePipe } from "@/api/device/pipe.js"; import { delPipe, updatePipe } from "@/api/device/pipe.js";
import vue from "../main"; import vue from "../main";
let defaultCenter = "石家庄"; let defaultCenter = "新疆巴州";
export let map; export let map;
export const DEVICE_TYPE = { export const DEVICE_TYPE = {
PIPEPLINE: "1", PIPEPLINE: "1",
...@@ -49,7 +48,7 @@ class gaodeMap { ...@@ -49,7 +48,7 @@ class gaodeMap {
this.center = center ? center : defaultCenter; this.center = center ? center : defaultCenter;
map = new AMap.Map(container, { map = new AMap.Map(container, {
//mask: addMask(result.districtList[0].boundaries), //mask: addMask(result.districtList[0].boundaries),
center: [114.72995, 38.37417], center: [86.161485,41.767488],
// resizeEnable: true, // resizeEnable: true,
disableSocket: true, disableSocket: true,
viewMode: "3D", viewMode: "3D",
...@@ -142,7 +141,7 @@ class gaodeMap { ...@@ -142,7 +141,7 @@ class gaodeMap {
console.log("飞行结束"); console.log("飞行结束");
}); });
this.districtBoundaries(latlng); // this.districtBoundaries(latlng);
} }
panTo(lnglat) { panTo(lnglat) {
this.myMap.panTo(lnglat); this.myMap.panTo(lnglat);
......
...@@ -5,6 +5,7 @@ import flowMeter from "../components/PopWindow/flowMeter.vue"; ...@@ -5,6 +5,7 @@ import flowMeter from "../components/PopWindow/flowMeter.vue";
import pipelineView from "../components/PopWindow/pipelineView.vue"; import pipelineView from "../components/PopWindow/pipelineView.vue";
import lineInfoWindow from "../components/PopWindowGis/lineInfoWindow.vue"; import lineInfoWindow from "../components/PopWindowGis/lineInfoWindow.vue";
import markerInfoWindow from "../components/PopWindowGis/markerInfoWindow.vue"; import markerInfoWindow from "../components/PopWindowGis/markerInfoWindow.vue";
import equipment from "../components/PopWindowGis/equipment.vue";
import removeLineInfoWindow from "../components/PopWindowGis/removeLineInfoWindow.vue"; import removeLineInfoWindow from "../components/PopWindowGis/removeLineInfoWindow.vue";
import markerInfoWindowWarn from "../components/PopWindowGis/markerInfoWindowWarn.vue"; import markerInfoWindowWarn from "../components/PopWindowGis/markerInfoWindowWarn.vue";
import troubleInfoWindowWarn from "../components/PopWindowGis/troubleInfoWindowWarn.vue"; import troubleInfoWindowWarn from "../components/PopWindowGis/troubleInfoWindowWarn.vue";
...@@ -21,7 +22,7 @@ import { lineColor, mapStyle } from "./mapCommon.js"; ...@@ -21,7 +22,7 @@ import { lineColor, mapStyle } from "./mapCommon.js";
import { delPipe } from "@/api/device/pipe.js"; import { delPipe } from "@/api/device/pipe.js";
import vue from "../main"; import vue from "../main";
import { Card } from "element-ui"; import { Card } from "element-ui";
let defaultCenter = "石家庄"; let defaultCenter = "巴州";
export let map; export let map;
export const DEVICE_TYPE = { export const DEVICE_TYPE = {
PIPEPLINE: "1", PIPEPLINE: "1",
...@@ -45,6 +46,7 @@ class gaodeMap { ...@@ -45,6 +46,7 @@ class gaodeMap {
troubles = []; troubles = [];
// 摄像头 // 摄像头
cameras = []; cameras = [];
dialogTableVisible =true;
// 值班人员对象的arr // 值班人员对象的arr
workerManMarkArr = []; workerManMarkArr = [];
// 是否开启新增 // 是否开启新增
...@@ -69,7 +71,7 @@ class gaodeMap { ...@@ -69,7 +71,7 @@ class gaodeMap {
this.center = center ? center : defaultCenter; this.center = center ? center : defaultCenter;
map = new AMap.Map("container", { map = new AMap.Map("container", {
//mask: addMask(result.districtList[0].boundaries), //mask: addMask(result.districtList[0].boundaries),
center: [114.72995, 38.37417], center: [86.161485,41.767488],
// resizeEnable: true, // resizeEnable: true,
disableSocket: true, disableSocket: true,
viewMode: "3D", viewMode: "3D",
...@@ -148,7 +150,7 @@ class gaodeMap { ...@@ -148,7 +150,7 @@ class gaodeMap {
options.scrollWheel = true; options.scrollWheel = true;
this.myMap.setStatus(options); this.myMap.setStatus(options);
}); });
this.districtBoundaries(); // this.districtBoundaries();
} }
changeMap(bool) { changeMap(bool) {
// 卫星图 // 卫星图
...@@ -204,7 +206,7 @@ class gaodeMap { ...@@ -204,7 +206,7 @@ class gaodeMap {
defaultCenter.push(result.districtList[0].center.lng); defaultCenter.push(result.districtList[0].center.lng);
defaultCenter.push(result.districtList[0].center.lat); defaultCenter.push(result.districtList[0].center.lat);
// map.setCenter(defaultCenter); // map.setCenter(defaultCenter);
map.setCenter([124.762977, 45.127297]); map.setCenter([86.161485,41.767488]);
let bounds = result.districtList[0].boundaries; let bounds = result.districtList[0].boundaries;
for (let i = 0; i < bounds.length; i += 1) { for (let i = 0; i < bounds.length; i += 1) {
new AMap.Polyline({ new AMap.Polyline({
...@@ -282,12 +284,14 @@ class gaodeMap { ...@@ -282,12 +284,14 @@ class gaodeMap {
marker.on("mouseover", this.wokerManOpen); marker.on("mouseover", this.wokerManOpen);
marker.on("mouseout", e => { marker.on("mouseout", e => {
e.target.infoWindow.close(); e.target.infoWindow.close();
this.domAllShow(); this.domAllShow();
}); });
marker.on("mousedown", e => { marker.on("mousedown", e => {
// console.log(data); // console.log(data);
that.closeInfoWindow(); that.closeInfoWindow();
if (marker.workerPoint) return; if (marker.workerPoint) return;
that.workerManView({ that.workerManView({
title: "值班人员轨迹回放", title: "值班人员轨迹回放",
...@@ -339,6 +343,7 @@ class gaodeMap { ...@@ -339,6 +343,7 @@ class gaodeMap {
}); });
marker.on("mousedown", e => { marker.on("mousedown", e => {
that.closeInfoWindow(); that.closeInfoWindow();
that.videoView({ that.videoView({
title: "监控", title: "监控",
target: marker, target: marker,
...@@ -453,8 +458,10 @@ class gaodeMap { ...@@ -453,8 +458,10 @@ class gaodeMap {
this.boxCollision(e.target.infoWindow.dom); this.boxCollision(e.target.infoWindow.dom);
this.workerManInfoWindow = e.target.infoWindow; this.workerManInfoWindow = e.target.infoWindow;
}; };
// 隐患 // 隐患弹出层触发
troubleOpen = e => { troubleOpen = e => {
// this.view.dialogFormVisible=true;
this.view.hiddenDanger=e.target.data
this.markerType = e.target.markerType; this.markerType = e.target.markerType;
e.target.content = this.getMarketContent(e.target.data); e.target.content = this.getMarketContent(e.target.data);
e.target.infoWindow.setContent(e.target.content); e.target.infoWindow.setContent(e.target.content);
...@@ -475,6 +482,37 @@ class gaodeMap { ...@@ -475,6 +482,37 @@ class gaodeMap {
// 鼠标移入设备时候实行的函数 // 鼠标移入设备时候实行的函数
infoOpen = e => { infoOpen = e => {
console.log("e.target.getExtData().deviceType",e.target.getExtData().deviceType)
/**
* 调压箱弹出层控制
*/
if (e.target.getExtData().deviceType == 1) {
// this.view.pressureRegulatingBox=true;
// this.view.surgeTankData=e.target.getExtData()
}
/**
* 阀门井弹出层控制
*/
if (e.target.getExtData().deviceType == 2) {
// this.view.valveWell=true;
// this.view.surgeTankData=e.target.getExtData()
}
/**
* 流量计弹出层控制
*/
if (e.target.getExtData().deviceType == 3) {
// this.view.flowmeter=true;
// this.view.flowmeterData=e.target.getExtData()
}
/**
* 压力表弹出层控制
*/
if (e.target.getExtData().deviceType == 4) {
// this.view.pressureGauge=true;
// this.view.flowmeterData=e.target.getExtData()
}
if (e.target.getExtData().alarmState == 1) { if (e.target.getExtData().alarmState == 1) {
if (e.target.getExtData().deviceType == 4) { if (e.target.getExtData().deviceType == 4) {
this.markerType = "7"; this.markerType = "7";
...@@ -502,7 +540,9 @@ class gaodeMap { ...@@ -502,7 +540,9 @@ class gaodeMap {
console.log("this.markerType"); console.log("this.markerType");
e.target.content = this.getMarketContent( e.target.content = this.getMarketContent(
e.target.getExtData(), e.target.getExtData(),
markerInfoWindow markerInfoWindow,
equipment,
this.dialogTableVisible = true
); );
} }
...@@ -584,6 +624,7 @@ class gaodeMap { ...@@ -584,6 +624,7 @@ class gaodeMap {
data: data, data: data,
map: map map: map
}); });
// this.view.hiddenDanger=data
const html = dom.$el; const html = dom.$el;
dom.remove(); dom.remove();
return html; return html;
...@@ -610,10 +651,11 @@ class gaodeMap { ...@@ -610,10 +651,11 @@ class gaodeMap {
return html; return html;
} }
case DEVICE_TYPE.TROUBLE: { case DEVICE_TYPE.TROUBLE: {
console.log("DEVICE_TYPE.VIDEODEVICE_TYPE.VIDEO", DEVICE_TYPE.VIDEO);
const dom = createPop(troubleInfoWindowWarn, { const dom = createPop(troubleInfoWindowWarn, {
title: "隐患", title: "隐患",
data: data, data: data,
map: map map: map,
}); });
const html = dom.$el; const html = dom.$el;
dom.remove(); dom.remove();
...@@ -964,7 +1006,11 @@ class gaodeMap { ...@@ -964,7 +1006,11 @@ class gaodeMap {
} }
} }
// 鼠标移入线条执行 // 鼠标移入线条执行
//管道弹出
polylineMouseOver = e => { polylineMouseOver = e => {
// this.view.theConduit=true;
// console.log(e.target+"数据")
// this.view.pipelineInformation=e.target.getExtData().lineData;
let polyline = e.target; let polyline = e.target;
if (this.lineType == 1) return; if (this.lineType == 1) return;
// 生成infoWindow // 生成infoWindow
......
...@@ -50,7 +50,7 @@ export default { ...@@ -50,7 +50,7 @@ export default {
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效 axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow' type: 'line' // 默认为直线,可选为:'line' | 'shadow'
} }
}, },
grid: { grid: {
......
...@@ -6,9 +6,29 @@ ...@@ -6,9 +6,29 @@
import echarts from 'echarts' import echarts from 'echarts'
require('echarts/theme/macarons') // echarts theme require('echarts/theme/macarons') // echarts theme
import resize from './mixins/resize' import resize from './mixins/resize'
import { sevenDayAlarm } from "@/api/dashboard/panelGroup";
export default { export default {
data() {
return {
time:'',
chart: null,
timeList:[],
timeQuantity:[],
}
},
mixins: [resize], mixins: [resize],
created() {
/** 查询设备实时监控列表数量 (报警状态) */
sevenDayAlarm().then(response => {
for (let i=0; i<response.length; i++){
this.timeList.push(response[i].time)
this.timeQuantity.push(response[i].count)
}
this.setOptions(this.timeList,this.timeQuantity)
}
);
},
props: { props: {
className: { className: {
type: String, type: String,
...@@ -31,11 +51,6 @@ export default { ...@@ -31,11 +51,6 @@ export default {
required: true required: true
} }
}, },
data() {
return {
chart: null
}
},
watch: { watch: {
chartData: { chartData: {
deep: true, deep: true,
...@@ -48,6 +63,7 @@ export default { ...@@ -48,6 +63,7 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
this.initChart() this.initChart()
}) })
this.setOptions(this.chartData)
}, },
beforeDestroy() { beforeDestroy() {
if (!this.chart) { if (!this.chart) {
...@@ -56,15 +72,18 @@ export default { ...@@ -56,15 +72,18 @@ export default {
this.chart.dispose() this.chart.dispose()
this.chart = null this.chart = null
}, },
methods: { methods: {
initChart() { initChart() {
this.chart = echarts.init(this.$el, 'macarons') this.chart = echarts.init(this.$el, 'macarons')
this.setOptions(this.chartData) this.setOptions(this.chartData)
}, },
setOptions({ expectedData, actualData } = {}) { setOptions({ expectedData, actualData } = {}) {
this.chart.setOption({ this.chart.setOption({
xAxis: { xAxis: {
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'], data:this.timeList,
boundaryGap: false, boundaryGap: false,
axisTick: { axisTick: {
show: false show: false
...@@ -104,30 +123,31 @@ export default { ...@@ -104,30 +123,31 @@ export default {
}, },
smooth: true, smooth: true,
type: 'line', type: 'line',
data: expectedData, data: this.timeQuantity,
animationDuration: 2800, animationDuration: 2800,
animationEasing: 'cubicInOut' animationEasing: 'cubicInOut'
}, },
{ // {
name: 'actual', // name: 'actual',
smooth: true, // smooth: true,
type: 'line', // type: 'line',
itemStyle: { // itemStyle: {
normal: { // normal: {
color: '#3888fa', // color: '#3888fa',
lineStyle: { // lineStyle: {
color: '#3888fa', // color: '#3888fa',
width: 2 // width: 2
}, // },
areaStyle: { // areaStyle: {
color: '#f3f8ff' // color: '#f3f8ff'
} // }
} // }
}, // },
data: actualData, // data: actualData,
animationDuration: 2800, // animationDuration: 2800,
animationEasing: 'quadraticOut' // animationEasing: 'quadraticOut'
}] // }
]
}) })
} }
} }
......
<template> <template>
<el-row :gutter="15" class="chart-wrapper">
<span>设备实时数据</span>
<el-row :gutter="40" class="panel-group"> <el-row :gutter="40" class="panel-group">
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col"> <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel" @click="handleSetLineChartData('newVisitis')"> <div slot="header" class="clearfix">
<div class="card-panel-icon-wrapper icon-people"> <span>卡片名称</span>
<svg-icon icon-class="peoples" class-name="card-panel-icon" /> <el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button>
</div> </div>
<div class="card-panel-description"> <div class="card-panel">
<div style=" font-size: 59px; color: red; position: relative; left: 32px; top: 16px;">
<el-icon class="el-icon-warning"></el-icon>
</div>
<div class="card-panel-description" style="position: relative; left: -46px; top: -81px;">
<div class="card-panel-text"> <div class="card-panel-text">
访客 警报状态
</div> </div>
<count-to :start-val="0" :end-val="102400" :duration="2600" class="card-panel-num" /> <count-to :start-val="0" :end-val="alarm" :duration="3200" class="card-panel-num" />
</div> </div>
</div> </div>
</el-col> </el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col"> <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel" @click="handleSetLineChartData('messages')"> <div class="card-panel">
<div class="card-panel-icon-wrapper icon-message"> <div style="font-size: 59px; color: #00ff43; position: relative; left: 32px; top: 16px;">
<svg-icon icon-class="message" class-name="card-panel-icon" /> <el-icon class="el-icon-success"></el-icon>
</div> </div>
<div class="card-panel-description"> <div class="card-panel-description" style="position: relative; left: -46px; top: -81px;">
<div class="card-panel-text"> <div class="card-panel-text">
消息 正常状态
</div> </div>
<count-to :start-val="0" :end-val="81212" :duration="3000" class="card-panel-num" /> <count-to :start-val="0" :end-val="equipmentNormal" :duration="2600" class="card-panel-num" />
</div> </div>
</div> </div>
</el-col> </el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col"> <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel" @click="handleSetLineChartData('purchases')"> <div class="card-panel">
<div class="card-panel-icon-wrapper icon-money"> <div style="font-size: 59px; color:rgb(0 208 255); position: relative; left: 32px; top: 16px;">
<svg-icon icon-class="money" class-name="card-panel-icon" /> <el-icon class="el-icon-s-management"></el-icon>
</div> </div>
<div class="card-panel-description"> <div class="card-panel-description" style="position: relative; left: -46px; top: -81px;">
<div class="card-panel-text"> <div class="card-panel-text">
金额 历史数据数量
</div> </div>
<count-to :start-val="0" :end-val="9280" :duration="3200" class="card-panel-num" /> <count-to :start-val="0" :end-val="historicalData" :duration="3000" class="card-panel-num" />
</div> </div>
</div> </div>
</el-col> </el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col"> <el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel" @click="handleSetLineChartData('shoppings')"> <div class="card-panel" >
<div class="card-panel-icon-wrapper icon-shopping"> <div style="font-size: 59px; color:rgb(255 153 0); position: relative; left: 32px; top: 16px;">
<svg-icon icon-class="shopping" class-name="card-panel-icon" /> <el-icon class=" el-icon-s-release"></el-icon>
</div> </div>
<div class="card-panel-description"> <div class="card-panel-description" style="position: relative; left: -46px; top: -81px;">
<div class="card-panel-text"> <div class="card-panel-text">
订单 历史数据报警数量
</div> </div>
<count-to :start-val="0" :end-val="13600" :duration="3600" class="card-panel-num" /> <count-to :start-val="0" :end-val="historicalAlarm" :duration="3600" class="card-panel-num" />
</div> </div>
</div> </div>
</el-col> </el-col>
</el-row> </el-row>
<!--第二排-->
<span>工单巡检数据</span>
<el-row :gutter="40" class="panel-group">
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div slot="header" class="clearfix">
<span>卡片名称</span>
<el-button style="float: right; padding: 3px 0" type="text">操作按钮</el-button>
</div>
<div class="card-panel">
<div style=" font-size: 59px; color: red; position: relative; left: 32px; top: 16px;">
<el-icon class="el-icon-document-delete"></el-icon>
</div>
<div class="card-panel-description" style="position: relative; left: -46px; top: -81px;">
<div class="card-panel-text">
未接收数量
</div>
<count-to :start-val="0" :end-val="workOrderNotReceived" :duration="3200" class="card-panel-num" />
</div>
</div>
</el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel">
<div style="font-size: 59px; color:rgb(0 126 255); position: relative; left: 32px; top: 16px;">
<el-icon class="el-icon-tickets"></el-icon>
</div>
<div class="card-panel-description" style="position: relative; left: -46px; top: -81px;">
<div class="card-panel-text">
已接收数量
</div>
<count-to :start-val="0" :end-val="workOrderReceived" :duration="2600" class="card-panel-num" />
</div>
</div>
</el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel">
<div style="font-size: 59px; color:rgb(0 255 208); position: relative; left: 32px; top: 16px;">
<el-icon class="el-icon-document-copy"></el-icon>
</div>
<div class="card-panel-description" style="position: relative; left: -46px; top: -81px;">
<div class="card-panel-text">
已反馈数量
</div>
<count-to :start-val="0" :end-val="workOrderFeedback" :duration="3000" class="card-panel-num" />
</div>
</div>
</el-col>
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel">
<div style="font-size: 59px; color:rgb(0 255 67); position: relative; left: 32px; top: 16px;">
<el-icon class=" el-icon-document-checked"></el-icon>
</div>
<div class="card-panel-description" style="position: relative; left: -46px; top: -81px;">
<div class="card-panel-text">
已归档数量
</div>
<count-to :start-val="0" :end-val="WorkOrderArchived" :duration="3600" class="card-panel-num" />
</div>
</div>
</el-col>
</el-row>
</el-row>
</template> </template>
<script> <script>
import CountTo from 'vue-count-to' import CountTo from 'vue-count-to'
import { EquipmentAlarmSize,equipmentNormalSize,historicalDataSize,historicalAlarmSize,workOrderNotReceived,workOrderReceived,workOrderFeedback,WorkOrderArchived } from "@/api/dashboard/panelGroup";
export default { export default {
components: { components: {
CountTo CountTo
}, },
data() {
return {
alarm:'0',
equipmentNormal:'0',
historicalData:'0',
historicalAlarm:'0',
workOrderNotReceived:'0',
workOrderReceived:'0',
workOrderFeedback:'0',
WorkOrderArchived:'0',
};
},
created() {
this.getList();
},
methods: { methods: {
handleSetLineChartData(type) { handleSetLineChartData(type) {
this.$emit('handleSetLineChartData', type) this.$emit('handleSetLineChartData', type)
},
getList() {
/** 查询设备实时监控列表数量 (报警状态) */
EquipmentAlarmSize().then(response => {
this.alarm = response;
}
);
/**查询设备实时监控列表数量接口 (正常状态)*/
equipmentNormalSize().then(response => {
this.equipmentNormal = response;
}
);
/**查询设备历史监控总数据量*/
historicalDataSize().then(response => {
this.historicalData = response;
}
);
/** 查询设备历史报警数量*/
historicalAlarmSize().then(response => {
this.historicalAlarm = response;
} }
);
/** 工单未接收数量*/
workOrderNotReceived().then(response => {
this.workOrderNotReceived = response.workOrderNotReceivedSize;
this.workOrderReceived = response.workOrderReceivedSize;
this.workOrderFeedback = response.workOrderFeedbackSize;
this.WorkOrderArchived = response.workOrderArchived;
} }
);
// /**工单已接收数量*/
// workOrderReceived().then(response => {
// this.workOrderReceived = response;
// }
// );
//
// /**工单已反馈数量*/
// workOrderFeedback().then(response => {
// this.workOrderFeedback = response;
// }
// );
//
// /**工单已归档数量*/
// WorkOrderArchived().then(response => {
// this.WorkOrderArchived = response;
// }
// );
},
},
} }
</script> </script>
......
...@@ -328,7 +328,9 @@ ...@@ -328,7 +328,9 @@
loadmap: false, loadmap: false,
dialogTableVisible: false, dialogTableVisible: false,
// 设备类型字典 // 设备类型字典
typeOptions: [], typeOptions: [
],
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
...@@ -396,7 +398,11 @@ ...@@ -396,7 +398,11 @@
created() { created() {
this.getList(); this.getList();
this.getDicts("t_device_type").then(response => { this.getDicts("t_device_type").then(response => {
this.typeOptions = response.data; this.typeOptions =
[{'dictLabel':'调压阀','dictValue':'1'},
{'dictLabel':'阀门井','dictValue':'2'},
{'dictLabel':'流量计','dictValue':'3'},
{'dictLabel':'压力表','dictValue':'4'}]
}); });
}, },
methods: { methods: {
......
...@@ -53,7 +53,8 @@ ...@@ -53,7 +53,8 @@
<font>{{form.pipeName}}</font> <font>{{form.pipeName}}</font>
</el-form-item> </el-form-item>
<el-form-item label="物联网编号:" prop="iotNo"> <el-form-item label="物联网编号:" prop="iotNo">
<font>{{form.iotNo}}</font> <font v-if="form.iotNo != null">{{form.iotNo}}</font>
<span v-if="form.iotNo == null">-</span>
</el-form-item> </el-form-item>
<el-form-item label="联系人:" prop="linkman"> <el-form-item label="联系人:" prop="linkman">
<font>{{form.linkman}}</font> <font>{{form.linkman}}</font>
...@@ -62,8 +63,15 @@ ...@@ -62,8 +63,15 @@
<font>{{form.phone}}</font> <font>{{form.phone}}</font>
</el-form-item> </el-form-item>
<el-form-item label="备注信息:" prop="remarks" style="width: 170%;"> <el-form-item label="备注信息:" prop="remarks" style="width: 170%;">
<font>{{form.remarks}}</font> <font v-if="form.remarks != null">{{form.remarks}}</font>
<span v-if="form.remarks == null">-</span>
</el-form-item> </el-form-item>
<!-- <el-table-column label="更新时间" align="center" prop="actualTime">-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="scope.row.actualTime != null">{{ scope.row.actualTime }}</span>-->
<!-- <span v-if="scope.row.actualTime == null">-</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-form> </el-form>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
...@@ -81,7 +89,8 @@ ...@@ -81,7 +89,8 @@
<font>{{form.installationTime}}</font> <font>{{form.installationTime}}</font>
</el-form-item> </el-form-item>
<el-form-item label="最后巡检时间:" prop="inspectionTime"> <el-form-item label="最后巡检时间:" prop="inspectionTime">
<font>{{form.inspectionTime}}</font> <font v-if="form.inspectionTime != null">{{form.inspectionTime}}</font>
<span v-if="form.inspectionTime == null">-</span>
</el-form-item> </el-form-item>
<el-form-item label="设备图片:" prop="iconUrl"> <el-form-item label="设备图片:" prop="iconUrl">
<div style="width: 20%;"> <div style="width: 20%;">
......
...@@ -30,15 +30,15 @@ ...@@ -30,15 +30,15 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="关联管道阈值" prop="relationPipeThreshold"> <!-- <el-form-item label="关联管道阈值" prop="relationPipeThreshold">-->
<el-input <!-- <el-input-->
v-model="queryParams.relationPipeThreshold" <!-- v-model="queryParams.relationPipeThreshold"-->
placeholder="请输入关联管道阈值" <!-- placeholder="请输入关联管道阈值"-->
clearable <!-- clearable-->
size="small" <!-- size="small"-->
@keyup.enter.native="handleQuery" <!-- @keyup.enter.native="handleQuery"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="关联设备" prop="relationDeviceId"> <el-form-item label="关联设备" prop="relationDeviceId">
<el-select v-model="queryParams.relationDeviceId" placeholder="请选择关联设备" filterable> <el-select v-model="queryParams.relationDeviceId" placeholder="请选择关联设备" filterable>
<el-option <el-option
...@@ -49,15 +49,15 @@ ...@@ -49,15 +49,15 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="关联设备阈值" prop="relationDeviceThreshold"> <!-- <el-form-item label="关联设备阈值" prop="relationDeviceThreshold">-->
<el-input <!-- <el-input-->
v-model="queryParams.relationDeviceThreshold" <!-- v-model="queryParams.relationDeviceThreshold"-->
placeholder="请输入关联设备阈值" <!-- placeholder="请输入关联设备阈值"-->
clearable <!-- clearable-->
size="small" <!-- size="small"-->
@keyup.enter.native="handleQuery" <!-- @keyup.enter.native="handleQuery"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
...@@ -156,11 +156,11 @@ ...@@ -156,11 +156,11 @@
/> />
<!-- 添加或修改设备监控对话框 --> <!-- 添加或修改设备监控对话框 -->
<el-dialog :title="title" :visible.sync="open" width="650px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="750px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-form-item label="设备" prop="deviceId"> <el-form-item label="设备" prop="deviceId">
<!--<el-input v-model="form.deviceId" placeholder="请输入设备id" />--> <!--<el-input v-model="form.deviceId" placeholder="请输入设备id" />-->
<el-select v-model="form.deviceId" placeholder="请选择设备" filterable> <el-select style="width: 100%" v-model="form.deviceId" placeholder="请选择设备" filterable>
<el-option <el-option
v-for="dict in devices" v-for="dict in devices"
:key="dict.deviceId" :key="dict.deviceId"
...@@ -174,7 +174,7 @@ ...@@ -174,7 +174,7 @@
</el-form-item> </el-form-item>
<el-form-item label="关联管道" prop="relationPipeId"> <el-form-item label="关联管道" prop="relationPipeId">
<!--<el-input v-model="form.relationPipeId" placeholder="请输入关联管道id" />--> <!--<el-input v-model="form.relationPipeId" placeholder="请输入关联管道id" />-->
<el-select v-model="form.relationPipeId" placeholder="请选择关联管道" filterable> <el-select style="width: 100%" v-model="form.relationPipeId" placeholder="请选择关联管道" filterable>
<el-option <el-option
v-for="dict in pipes" v-for="dict in pipes"
:key="dict.pipeId" :key="dict.pipeId"
...@@ -188,7 +188,7 @@ ...@@ -188,7 +188,7 @@
</el-form-item> </el-form-item>
<el-form-item label="关联设备" prop="relationDeviceId"> <el-form-item label="关联设备" prop="relationDeviceId">
<!-- <el-input v-model="form.relationDeviceId" placeholder="请输入关联设备id" />--> <!-- <el-input v-model="form.relationDeviceId" placeholder="请输入关联设备id" />-->
<el-select v-model="form.relationDeviceId" placeholder="请选择关联设备" filterable> <el-select style="width: 100%" v-model="form.relationDeviceId" placeholder="请选择关联设备" filterable>
<el-option <el-option
v-for="dict in devices" v-for="dict in devices"
:key="dict.deviceId" :key="dict.deviceId"
...@@ -206,13 +206,27 @@ ...@@ -206,13 +206,27 @@
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
<!--批量新增--> <!--批量新增-->
<el-dialog title="批量新增" :visible.sync="dialogVisible" append-to-body> <el-dialog title="批量新增" :visible.sync="dialogVisible" append-to-body>
<div class="add-div" style="width: 100%;height: 100%;padding: 50px;"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row :gutter="50">
<span>新增设备</span> <!-- <el-row :gutter="50" >-->
<!--<el-input placeholder="请输入设备名称" style="width: 260px;margin-left: 20px;"></el-input>--> <!-- <span>新增设备</span>-->
<el-select v-model="subForm.deviceId" placeholder="请选择设备名称" filterable> <!-- <el-select v-model="subForm.deviceId" placeholder="请选择设备名称" filterable>-->
<!-- <el-option-->
<!-- v-for="dict in devices"-->
<!-- :key="dict.deviceId"-->
<!-- :label="dict.deviceName"-->
<!-- :value="dict.deviceId"-->
<!-- ></el-option>-->
<!-- </el-select>-->
<!-- </el-row>-->
<el-form-item label="新增设备" prop="deviceId">
<el-select style="width: 100%" v-model="subForm.deviceId" placeholder="请选择设备名称" filterable>
<el-option <el-option
v-for="dict in devices" v-for="dict in devices"
:key="dict.deviceId" :key="dict.deviceId"
...@@ -220,17 +234,41 @@ ...@@ -220,17 +234,41 @@
:value="dict.deviceId" :value="dict.deviceId"
></el-option> ></el-option>
</el-select> </el-select>
<el-input v-model="subForm.deviceThreshold" placeholder="请输入设备阈值" style="width: 260px;margin-left: 50px;"></el-input> </el-form-item>
</el-row>
<el-button type="primary" class="el-icon-plus clolos1" @click="addPdfFile" style="margin-top: 20px;margin-bottom: 20px;">新增关联设备</el-button> <!-- <el-row :gutter="50" style="height: 20%">-->
<!-- <span>设备阈值</span>-->
<!-- <el-input v-model="subForm.deviceThreshold" placeholder="请输入设备阈值" style="width: 226px;margin-left: -2px;"></el-input>-->
<!-- </el-row>-->
<el-form-item label="设备阈值" >
<el-input v-model="subForm.deviceThreshold" placeholder="请输入设备阈值" />
</el-form-item>
</el-form>
<div class="add_pdf" v-for="(item, index) in subForm.relationDevices" :key="index" style="margin-bottom: 30px;"> <div class="add_pdf" v-for="(item, index) in subForm.relationDevices" :key="index" style="margin-bottom: 30px;">
<el-form :model="item" label-width="80px"> <el-form :model="item" label-width="80px">
<el-row :gutter="50"> <el-row :gutter="50" style="margin-left: 14px; margin-right: -98px;">
<el-col :span="20" style="float: left;box-shadow: rgb(233, 229, 229) 3px 3px 7px 2px;padding-top: 20px;padding-left: 15px;"> <el-col :span="20" style="float: left;box-shadow: rgb(233, 229, 229) 3px 3px 7px 2px;padding-top: 41px;padding-left: 15px;">
<el-form-item label="关联管道:" prop="pipeCode">
<!--<el-input v-model="item.sss" placeholder="请输入关联管道名称" style="width: 40%;margin-left: 20px;"></el-input>-->
<el-select v-model="item.relationPipeId" placeholder="请选择关联管道名称" filterable> <!-- <el-form-item label="关联管道:" prop="pipeCode">-->
<!-- &lt;!&ndash;<el-input v-model="item.sss" placeholder="请输入关联管道名称" style="width: 40%;margin-left: 20px;"></el-input>&ndash;&gt;-->
<!-- <el-select v-model="item.relationPipeId" placeholder="请选择关联管道名称" filterable>-->
<!-- <el-option-->
<!-- v-for="dict in pipes"-->
<!-- :key="dict.pipeId"-->
<!-- :label="dict.pipeName"-->
<!-- :value="dict.pipeId"-->
<!-- ></el-option>-->
<!-- </el-select>-->
<!-- <el-input v-model="item.relationPipeThreshold" placeholder="请输入关联管道阈值" style="width: 40%;margin-left: 50px;"></el-input>-->
<!-- </el-form-item>-->
<el-form-item label="关联管道" prop="pipeCode">
<el-select style="width: 100%" v-model="item.relationPipeId" placeholder="请选择关联管道名称" filterable>
<el-option <el-option
v-for="dict in pipes" v-for="dict in pipes"
:key="dict.pipeId" :key="dict.pipeId"
...@@ -238,11 +276,26 @@ ...@@ -238,11 +276,26 @@
:value="dict.pipeId" :value="dict.pipeId"
></el-option> ></el-option>
</el-select> </el-select>
<el-input v-model="item.relationPipeThreshold" placeholder="请输入关联管道阈值" style="width: 40%;margin-left: 50px;"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="关联设备:" prop="pipeCode"> <el-form-item label="管道阈值" >
<!-- <el-input v-model="item.qqq" placeholder="请输入关联设备名称" style="width: 40%;margin-left: 20px;"></el-input>--> <el-input v-model="item.relationPipeThreshold" placeholder="请输入关联管道阈值" />
<el-select v-model="item.relationDeviceId" placeholder="请选择关联设备名称" filterable> </el-form-item>
<!-- <el-form-item label="关联设备:" prop="pipeCode">-->
<!-- &lt;!&ndash; <el-input v-model="item.qqq" placeholder="请输入关联设备名称" style="width: 40%;margin-left: 20px;"></el-input>&ndash;&gt;-->
<!-- <el-select v-model="item.relationDeviceId" placeholder="请选择关联设备名称" filterable>-->
<!-- <el-option-->
<!-- v-for="dict in devices"-->
<!-- :key="dict.deviceId"-->
<!-- :label="dict.deviceName"-->
<!-- :value="dict.deviceId"-->
<!-- ></el-option>-->
<!-- </el-select>-->
<!-- <el-input v-model="item.relationDeviceThreshold" placeholder="请输入关联设备阈值" style="width: 40%;margin-left: 50px;"></el-input>-->
<!-- </el-form-item>-->
<el-form-item label="关联设备" prop="pipeCode">
<el-select style="width: 100%" v-model="item.relationDeviceId" placeholder="请选择关联设备名称" filterable>
<el-option <el-option
v-for="dict in devices" v-for="dict in devices"
:key="dict.deviceId" :key="dict.deviceId"
...@@ -250,24 +303,41 @@ ...@@ -250,24 +303,41 @@
:value="dict.deviceId" :value="dict.deviceId"
></el-option> ></el-option>
</el-select> </el-select>
<el-input v-model="item.relationDeviceThreshold" placeholder="请输入关联设备阈值" style="width: 40%;margin-left: 50px;"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="设备阈值" >
<el-input v-model="item.relationDeviceThreshold" placeholder="请输入关联设备阈值" />
</el-form-item>
<el-button style="position:relative;left:85%;top:-10px;" type="danger" @click="deletePdf(index)" >删除</el-button>
</el-col> </el-col>
<div style="float: left;margin-top: 50px;margin-left: 50px;">
<el-button type="danger" class="el-icon-delete clolos clolos3" @click="deletePdf(index)" circle></el-button>
</div>
</el-row> </el-row>
</el-form> </el-form>
<!-- <div v-show="index !== 0"> --> <!-- <div v-show="index !== 0"> -->
</div> </div>
<el-form label-width="100px"> <!-- <el-form label-width="100px">-->
<el-form-item style="margin-left:100px;margin-top:40px;"> <!-- <el-form-item style="margin-left:100px;margin-top:40px;">-->
<!-- <el-button type="primary" @click="batchSubmit()">提交</el-button>-->
<!-- <el-button @click="dialogVisible = false">返回</el-button>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- <div slot="footer" class="dialog-footer" style="right: -45%;top: 80px; position: relative;">-->
<!-- <el-button type="primary" class="el-icon-plus clolos1" @click="addPdfFile" style="margin-top: 20px;margin-bottom: 20px;">新增关联设备</el-button>-->
<!-- <el-button type="primary" @click="batchSubmit()">提交</el-button>-->
<!-- <el-button @click="dialogVisible = false">返回</el-button>-->
<!-- </div>-->
<div slot="footer" class="dialog-footer">
<el-button type="primary" class="el-icon-plus clolos1" @click="addPdfFile">新增关联设备</el-button>
<el-button type="primary" @click="batchSubmit()">提交</el-button> <el-button type="primary" @click="batchSubmit()">提交</el-button>
<el-button @click="dialogVisible = false">返回</el-button> <el-button @click="dialogVisible = false">返回</el-button>
</el-form-item>
</el-form>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
......
...@@ -38,7 +38,8 @@ ...@@ -38,7 +38,8 @@
<font>{{form.pipeName}}</font> <font>{{form.pipeName}}</font>
</el-form-item> </el-form-item>
<el-form-item label="管道编号:" prop="pipeCode"> <el-form-item label="管道编号:" prop="pipeCode">
<font>{{form.pipeCode}}</font> <font v-if="form.pipeCode!= null">{{form.pipeCode}}</font>
<span v-if="form.pipeCode == null">-</span>
</el-form-item> </el-form-item>
<el-form-item label="管道类型:" prop="pipeType"> <el-form-item label="管道类型:" prop="pipeType">
<font v-if="form.pipeType == 1">地埋管线</font> <font v-if="form.pipeType == 1">地埋管线</font>
...@@ -51,23 +52,28 @@ ...@@ -51,23 +52,28 @@
<font v-if="form.pipePressure == 4">高压</font> <font v-if="form.pipePressure == 4">高压</font>
</el-form-item> </el-form-item>
<el-form-item label="管道长度:" prop="pipeLength"> <el-form-item label="管道长度:" prop="pipeLength">
<font>{{form.pipeLength}}</font> <font v-if="form.pipeLength!= null">{{form.pipeLength}}</font>
<span v-if="form.pipeLength == null">-</span>
</el-form-item> </el-form-item>
<el-form-item label="备注信息:" prop="remarks" style="width: 170%;"> <el-form-item label="备注信息:" prop="remarks" style="width: 170%;">
<font>{{form.remarks}}</font> <font v-if="form.remarks!= null">{{form.remarks}}</font>
<span v-if="form.remarks == null">-</span>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form ref="form" v-model="form" label-width="100px" style="width: 100%;"> <el-form ref="form" v-model="form" label-width="100px" style="width: 100%;">
<el-form-item label="管道地址:" prop="pipeAddr"> <el-form-item label="管道地址:" prop="pipeAddr">
<font>{{form.pipeAddr}}</font> <font v-if="form.pipeAddr!= null">{{form.pipeAddr}}</font>
<span v-if="form.pipeAddr == null">-</span>
</el-form-item> </el-form-item>
<el-form-item label="安装时间:" prop="installationTime"> <el-form-item label="安装时间:" prop="installationTime">
<font>{{form.installationTime}}</font> <font v-if="form.installationTime!= null">{{form.installationTime}}</font>
<span v-if="form.installationTime == null">-</span>
</el-form-item> </el-form-item>
<el-form-item label="最后巡检时间:" prop="inspectionTime"> <el-form-item label="最后巡检时间:" prop="inspectionTime">
<font>{{form.inspectionTime}}</font> <font v-if="form.inspectionTime!= null">{{form.inspectionTime}}</font>
<span v-if="form.inspectionTime == null">-</span>
</el-form-item> </el-form-item>
<el-form-item label="管道图片:" prop="iconUrl"> <el-form-item label="管道图片:" prop="iconUrl">
<div style="width: 20%;"> <div style="width: 20%;">
......
...@@ -30,28 +30,28 @@ ...@@ -30,28 +30,28 @@
:height="tableHeight" :height="tableHeight"
class="el-bottom" class="el-bottom"
> >
<el-table-column prop="deviceCode" label="设备编号" width="100"> <el-table-column prop="deviceCode" label="编号" width="100">
</el-table-column> </el-table-column>
<el-table-column prop="deviceName" label="设备名称" width="150"> <el-table-column prop="deviceName" label="名称" width="150">
</el-table-column> </el-table-column>
<el-table-column prop="alarmType" label="报警类型" width=""> <el-table-column prop="alarmType" label="报警类型" width="">
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="报警开始时间" width=""> <el-table-column prop="createTime" label="报警开始时间" width="">
</el-table-column> </el-table-column>
<el-table-column label="处理状态" align="center" prop="dealStatus"> <!-- <el-table-column label="处理状态" align="center" prop="dealStatus">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<span v-if="scope.row.orderId == null || scope.row.orderId == ''" <!-- <span v-if="scope.row.orderId == null || scope.row.orderId == ''"-->
>未生成工单</span <!-- >未生成工单</span-->
> <!-- >-->
<span v-else-if="!scope.row.dealStatus && scope.row.orderId" <!-- <span v-else-if="!scope.row.dealStatus && scope.row.orderId"-->
>暂未处理</span <!-- >暂未处理</span-->
> <!-- >-->
<span v-else-if="scope.row.dealStatus == 1">不需处理</span> <!-- <span v-else-if="scope.row.dealStatus == 1">不需处理</span>-->
<span v-else-if="scope.row.dealStatus == 2">已处理完成</span> <!-- <span v-else-if="scope.row.dealStatus == 2">已处理完成</span>-->
<span v-else-if="scope.row.dealStatus == 3">未处理完成</span> <!-- <span v-else-if="scope.row.dealStatus == 3">未处理完成</span>-->
<span v-else> - </span> <!-- <span v-else> - </span>-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column prop="alarmValue" label="报警内容" width="100"> <el-table-column prop="alarmValue" label="报警内容" width="100">
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -231,14 +231,14 @@ export default { ...@@ -231,14 +231,14 @@ export default {
// background-color: #fff; // background-color: #fff;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
background-color: #03315cd9;
& > div { & > div {
} }
.left { .left {
width: 716px; width: 716px;
height: 198px; height: 198px;
margin-right: 12px; margin-right: 12px;
box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.16); /*box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.16);*/
// background-color: #fff; // background-color: #fff;
// color: #fff; // color: #fff;
font-size: 14px; font-size: 14px;
...@@ -262,6 +262,7 @@ export default { ...@@ -262,6 +262,7 @@ export default {
left:50%; left:50%;
margin-left:-92px; margin-left:-92px;
top:-5px; top:-5px;
color: #fffaf1;
} }
.repeat { .repeat {
position: absolute; position: absolute;
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
<i <i
class="iconfont" class="iconfont"
:class="[iconClass(item), { iconFontSize: item.type == 4 }]" :class="[iconClass(item), { iconFontSize: item.type == 4 }]"
:style="{color:index==2?'#EAC448':''}"
></i> ></i>
</div> </div>
<div class="text"> <div class="text">
...@@ -66,7 +67,7 @@ export default { ...@@ -66,7 +67,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.wrapper { .wrapper {
width: 270px; width: 202px;
height: 857px; height: 857px;
position: fixed; position: fixed;
top: 80px; top: 80px;
...@@ -95,10 +96,10 @@ export default { ...@@ -95,10 +96,10 @@ export default {
& > .right-content { & > .right-content {
// background-color: #fff; // background-color: #fff;
width: 247px; width: 247px;
height: 104px; height: 28px;
margin-bottom: 29px; margin-bottom: 29px;
box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.16); /*box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.16);*/
background-image: url(../../../../assets/images/listBg.png); /*background-image: url(../../../../assets/images/listBg.png);*/
margin-right: 10px; margin-right: 10px;
display: flex; display: flex;
&:last-child{ &:last-child{
...@@ -109,13 +110,13 @@ export default { ...@@ -109,13 +110,13 @@ export default {
} }
// align-items: center; // align-items: center;
.text-icon { .text-icon {
line-height: 102px; line-height: 101px;
padding-left: 28px; padding-left: 33px;
margin-right: 22px; margin-right: 12px;
margin-left: 30px; margin-left: 41px;
i { i {
color: #7bf8f4; color: #7bf8f4;
font-size: 60px; font-size: 41px;
} }
} }
.text { .text {
...@@ -135,7 +136,7 @@ export default { ...@@ -135,7 +136,7 @@ export default {
} }
// 单独调整下最后一个icon的大小 // 单独调整下最后一个icon的大小
.iconFontSize { .iconFontSize {
font-size: 50px !important; font-size: 35px !important;
} }
.fade-enter-to, .fade-enter-to,
.fade-leave { .fade-leave {
......
<template> <template>
<div> <div>
<!--隐患弹出层-->
<el-dialog title="隐患详情" :visible.sync="dialogFormVisible" style="width: 100%">
<el-form :model="hiddenDanger">
<el-descriptions class="margin-top" title="隐患信息" :column="3" :size="size" border>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-date"></i>
隐患类型
</template>
{{ hiddenDanger.troubleType }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-tickets"></i>
隐患等级
</template>
{{ hiddenDanger.troubleLevel }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-finished"></i>
处理状态
</template>
{{
hiddenDanger.dealStatus ? hiddenDanger.dealStatus : "暂未处理"
}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-user"></i>
上报人员
</template>
<el-tag size="small">{{ hiddenDanger.reportManName }}</el-tag>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-date"></i>
上报日期
</template>
{{hiddenDanger.createTime}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-date"></i>
最后巡检日期
</template>
{{
hiddenDanger.updateTime
? hiddenDanger.updateTime
: "-"
}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-tickets"></i>
工单编号
</template>
{{ hiddenDanger.orderId }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-tickets"></i>
备注信息
</template>
{{ hiddenDanger.remarks ? hiddenDanger.remarks : "-" }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-tickets"></i>
关联设备
</template>
{{ hiddenDanger.deviceName ? hiddenDanger.deviceName : "-" }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-tickets"></i>
设备类型
</template>
{{hiddenDanger.deviceType ? this.deviceTypes[hiddenDanger.deviceType] : "-"}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-tickets"></i>
隐患所在地址
</template>
{{ hiddenDanger.address }}
</el-descriptions-item>
</el-descriptions>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false">取 消</el-button>
<el-button type="primary" @click="dialogFormVisible = false">确 定</el-button>
</div>
</el-dialog>
<!--管道弹出层-->
<el-dialog title="管道信息" :visible.sync="theConduit">
<el-form :model="pipelineInformation">
<div class="content scrollStyle">
<div class="eq-content display-default">
<!--基础信息-->
<div class="text-wrapper">
<div class="eq-text">
管道编号:<span>{{ pipelineInformation.pipeCode }}</span>
</div>
<div class="eq-text">
管道长度:<span>{{ `${pipelineInformation.pipeLength ? pipelineInformation.pipeLength + "米" : ""}` }}</span>
</div>
<div class="eq-text">
管道类型:<span>{{ ["地埋管线", "地表管线"][pipelineInformation.pipeType - 1] }}</span>
</div>
<div class="maintain-content">
<el-col :span="13">
<div class="eq-text">
管道压力:<span>{{["低压", "中压", "次高压", "高压"][pipelineInformation.pipePressure - 1]}}</span>
</div>
</el-col>
<div style="height: 32px;">
<img v-bind:src="pipelineInformation.iconUrl" alt="" style="width:119px; position: relative;
left: 20px;
top: -64px;" />
</div>
</div>
</div>
<div class="maintain-content">
<el-col :span="11">
<div>
<span>安装日期:</span>
<span>{{pipelineInformation.installationTime}}</span>
</div>
</el-col>
<el-col :span="13">
<div>
<span>最后巡检日期:</span>
<span>{{
pipelineInformation.inspectionTime
? pipelineInformation.inspectionTime
: "-"
}}</span>
</div>
</el-col>
<div>
<span>管道所在地址:</span>
<span>{{ pipelineInformation.pipeAddr }}</span>
</div>
<div>
<span>备注信息:</span>
<span>{{ pipelineInformation.remarks ? pipelineInformation.remarks : "-" }} </span>
</div>
</div>
</div>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="theConduit = false">取 消</el-button>
<el-button type="primary" @click="theConduit = false">确 定</el-button>
</div>
</el-dialog>
<!--调压箱弹出层-->
<el-dialog title="调压箱信息" :visible.sync="pressureRegulatingBox">
<el-form :model="surgeTankData">
<div class="content scrollStyle">
<div class="eq-content display-default">
<!--基础信息-->
<div class="text-wrapper">
<div class="eq-text">
设备类型:<span>调压箱</span>
</div>
<div class="eq-text">
设备型号:<span>{{ surgeTankData.deviceModel }}</span>
</div>
<div class="eq-text">
所属管道:<span>{{ surgeTankData.pipeName ? surgeTankData.pipeName : "-" }}</span>
</div>
<div class="maintain-content">
<el-col :span="13">
<div class="eq-text">
物联网编号:<span>{{ surgeTankData.iotNo ? surgeTankData.iotNo : "-" }}</span>
</div>
</el-col>
<div style="height: 32px;">
<img v-bind:src="surgeTankData.iconUrl" alt="" style="width:119px; position: relative;
left: 20px;
top: -64px;" />
</div>
</div>
</div>
</div>
<!-- 维修人员 -->
<div class="maintain-content">
<el-col :span="11">
<div>
<span>安装日期:</span>
<span>{{surgeTankData.installationTime}}</span>
</div>
</el-col>
<el-col :span="13">
<div>
<span>最后巡检日期:</span>
<span>{{ surgeTankData.inspectionTime ? surgeTankData.inspectionTime : "-" }}</span>
</div>
</el-col>
<div>
<span>设备所在地址:</span>
<span>{{ surgeTankData.pipeAddr ? surgeTankData.pipeAddr : "-" }}</span>
</div>
<div>
<span>备注信息:</span>
<span>{{ surgeTankData.remarks ? surgeTankData.remarks : "-" }} </span>
</div>
</div>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="pressureRegulatingBox = false">取 消</el-button>
<el-button type="primary" @click="pressureRegulatingBox = false">确 定</el-button>
</div>
</el-dialog>
<!--阀门井弹出层-->
<el-dialog title="阀门井信息" :visible.sync="valveWell">
<el-form :model="surgeTankData">
<div class="content scrollStyle">
<div class="eq-content display-default">
<!--基础信息-->
<div class="text-wrapper">
<div class="eq-text">
设备类型:<span>阀门井</span>
</div>
<div class="eq-text">
设备型号:<span>{{ surgeTankData.deviceModel }}</span>
</div>
<div class="eq-text">
所属管道:<span>{{ surgeTankData.pipeName ? surgeTankData.pipeName : "-" }}</span>
</div>
<div class="maintain-content">
<el-col :span="13">
<div class="eq-text">
物联网编号:<span>{{ surgeTankData.iotNo ? surgeTankData.iotNo : "-" }}</span>
</div>
</el-col>
<div style="height: 32px;">
<img v-bind:src="surgeTankData.iconUrl" alt="" style="width:119px; position: relative;
left: 20px;
top: -64px;" />
</div>
</div>
</div>
</div>
<!-- 维修人员 -->
<div class="maintain-content">
<el-col :span="11">
<div>
<span>安装日期:</span>
<span>{{surgeTankData.installationTime}}</span>
</div>
</el-col>
<el-col :span="13">
<div>
<span>最后巡检日期:</span>
<span>{{ surgeTankData.inspectionTime ? surgeTankData.inspectionTime : "-" }}</span>
</div>
</el-col>
<div>
<span>设备所在地址:</span>
<span>{{ surgeTankData.pipeAddr ? surgeTankData.pipeAddr : "-" }}</span>
</div>
<div>
<span>备注信息:</span>
<span>{{ surgeTankData.remarks ? surgeTankData.remarks : "-" }} </span>
</div>
</div>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="valveWell = false">取 消</el-button>
<el-button type="primary" @click="valveWell = false">确 定</el-button>
</div>
</el-dialog>
<!--流量计弹出层-->
<el-dialog title="流量计信息" :visible.sync="flowmeter">
<el-form :model="flowmeterData">
<!-- 设备信息 -->
<div class="content scrollStyle">
<div class="eq-content display-default">
<div class="text-wrapper">
<div class="eq-text">
设备类型:<span>流量计</span>
</div>
<div class="eq-text">
设备型号:<span>{{ flowmeterData.deviceModel ? flowmeterData.deviceModel : "-" }}</span>
</div>
<div class="eq-text">
所属管道:<span>{{ flowmeterData.pipeName ? flowmeterData.pipeName : "-" }}</span>
</div>
<div class="maintain-content">
<el-col :span="13">
<div class="eq-text">
物联网编号:<span>{{ flowmeterData.iotNo ? surgeTankData.iotNo : "-" }}</span>
</div>
</el-col>
<div style="height: 32px;">
<img v-bind:src="flowmeterData.iconUrl" alt="" style="width:119px; position: relative;
left: 20px;
top: -64px;" />
</div>
</div>
</div>
</div>
<!-- 维修人员 -->
<div class="maintain-content">
<el-col :span="11">
<div>
<span>安装日期:</span>
<span>{{flowmeterData.installationTime}}</span>
</div>
</el-col>
<el-col :span="13">
<div>
<span>最后巡检日期:</span>
<span>{{ flowmeterData.inspectionTime ? flowmeterData.inspectionTime : "-" }}</span>
</div>
</el-col>
<div>
<span>设备所在地址:</span>
<span>{{ flowmeterData.pipeAddr ? flowmeterData.pipeAddr : "-"}}</span>
</div>
<div>
<span>备注信息:</span>
<span>{{ flowmeterData.remarks ? flowmeterData.remarks : "-"}} </span>
</div>
</div>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="flowmeter = false">取 消</el-button>
<el-button type="primary" @click="flowmeter = false">确 定</el-button>
</div>
</el-dialog>
<!--压力表弹出层-->
<el-dialog title="压力表信息" :visible.sync="pressureGauge">
<el-form :model="flowmeterData">
<!-- 设备信息 -->
<div class="content scrollStyle">
<div class="eq-content display-default">
<div class="text-wrapper">
<div class="eq-text">
设备类型:<span>流量计</span>
</div>
<div class="eq-text">
设备型号:<span>{{ flowmeterData.deviceModel ? flowmeterData.deviceModel : "-" }}</span>
</div>
<div class="eq-text">
所属管道:<span>{{ flowmeterData.pipeName ? flowmeterData.pipeName : "-" }}</span>
</div>
<div class="maintain-content">
<el-col :span="13">
<div class="eq-text">
物联网编号:<span>{{ flowmeterData.iotNo ? surgeTankData.iotNo : "-" }}</span>
</div>
</el-col>
<div style="height: 32px;">
<img v-bind:src="flowmeterData.iconUrl" alt="" style="width:119px; position: relative;
left: 20px;
top: -64px;" />
</div>
</div>
</div>
</div>
<!-- 维修人员 -->
<div class="maintain-content">
<el-col :span="11">
<div>
<span>安装日期:</span>
<span>{{flowmeterData.installationTime}}</span>
</div>
</el-col>
<el-col :span="13">
<div>
<span>最后巡检日期:</span>
<span>{{ flowmeterData.inspectionTime ? flowmeterData.inspectionTime : "-" }}</span>
</div>
</el-col>
<div>
<span>设备所在地址:</span>
<span>{{ flowmeterData.pipeAddr ? flowmeterData.pipeAddr : "-"}}</span>
</div>
<div>
<span>备注信息:</span>
<span>{{ flowmeterData.remarks ? flowmeterData.remarks : "-"}} </span>
</div>
</div>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="pressureGauge = false">取 消</el-button>
<el-button type="primary" @click="pressureGauge = false">确 定</el-button>
</div>
</el-dialog>
<div class="audio"> <div class="audio">
<audio ref="audio" :src="mp3Src"></audio> <audio ref="audio" :src="mp3Src"></audio>
</div> </div>
...@@ -128,6 +565,8 @@ ...@@ -128,6 +565,8 @@
<img v-if="!backFlag" src="@/assets/images/l.png" alt="" /> <img v-if="!backFlag" src="@/assets/images/l.png" alt="" />
<img v-else src="@/assets/images/r.png" alt="" /> <img v-else src="@/assets/images/r.png" alt="" />
</div> </div>
<!--左边表格-->
<!-- 只能动态传入内嵌盒子的高 --> <!-- 只能动态传入内嵌盒子的高 -->
<div class="scroll" :style="{ height: `${boxHeight}px` }"> <div class="scroll" :style="{ height: `${boxHeight}px` }">
<el-input <el-input
...@@ -270,30 +709,30 @@ ...@@ -270,30 +709,30 @@
</div> </div>
</template> </template>
<!-- 摄像头 --> <!-- 摄像头 -->
<template v-else-if="item.value == 10"> <!-- <template v-else-if="item.value == 10">-->
<div class="list-wrapper"> <!-- <div class="list-wrapper">-->
<div class="thead"> <!-- <div class="thead">-->
<div class="no"></div> <!-- <div class="no"></div>-->
<div class="code">监控名称</div> <!-- <div class="code">监控名称</div>-->
<div class="name">监控位置</div> <!-- <div class="name">监控位置</div>-->
</div> <!-- </div>-->
<div <!-- <div-->
class="deviceList" <!-- class="deviceList"-->
:class="{ topActive: index == 0 }" <!-- :class="{ topActive: index == 0 }"-->
v-for="(iten, index) in item.list" <!-- v-for="(iten, index) in item.list"-->
:key="iten.deviceId + `` + index" <!-- :key="iten.deviceId + `` + index"-->
@click.stop="panToo(iten, item)" <!-- @click.stop="panToo(iten, item)"-->
> <!-- >-->
<div class="no">{{ iten.no + 1 }}</div> <!-- <div class="no">{{ iten.no + 1 }}</div>-->
<div :title="iten.deviceName" class="code"> <!-- <div :title="iten.deviceName" class="code">-->
{{ iten.deviceName }} <!-- {{ iten.deviceName }}-->
</div> <!-- </div>-->
<div :title="iten.deviceAddress" class="name"> <!-- <div :title="iten.deviceAddress" class="name">-->
{{ iten.deviceAddress ? iten.deviceAddress : "-" }} <!-- {{ iten.deviceAddress ? iten.deviceAddress : "-" }}-->
</div> <!-- </div>-->
</div> <!-- </div>-->
</div> <!-- </div>-->
</template> <!-- </template>-->
<!-- 翻页 --> <!-- 翻页 -->
<div class="goback"> <div class="goback">
...@@ -327,9 +766,11 @@ ...@@ -327,9 +766,11 @@
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
// import from "utils/gaodeMapView.js"; // import from "utils/gaodeMapView.js";
import moment from "moment";
import { pipeAllInfoList, countPipeLength } from "@/api/device/pipe.js"; import { pipeAllInfoList, countPipeLength } from "@/api/device/pipe.js";
import { videoList } from "@/api/device/videoManager.js"; import { videoList } from "@/api/device/videoManager.js";
import gaodeMap, { import gaodeMap, {
...@@ -354,13 +795,40 @@ export default { ...@@ -354,13 +795,40 @@ export default {
CreateWork, CreateWork,
CreateWorkTrouble, CreateWorkTrouble,
Right, Right,
moment,
}, },
data() { data() {
return { return {
deviceTypes: {
0: "管道",
1: "调压箱",
2: "阀门井",
3: "流量计",
},
mp3Src: require("@/assets/mp3/baojing.mp3"), mp3Src: require("@/assets/mp3/baojing.mp3"),
lineColor, lineColor,
gaoMap: null, gaoMap: null,
deviceType: false, deviceType: false,
//隐患弹出层
dialogFormVisible:false,
//管道弹出层控制
theConduit:false,
//调压箱弹出层控制
pressureRegulatingBox:false,
//阀门井
valveWell:false,
//流量计控制
flowmeter:false,
//压力表控制
pressureGauge:false,
//流量计弹出框数据
flowmeterData:[],
//隐患弹出框 数据
hiddenDanger:[],
//管道弹出框 数据
pipelineInformation:[],
//调压箱弹出框 数据
surgeTankData:[],
value: "", value: "",
operateType: "", operateType: "",
radio1: "", radio1: "",
...@@ -447,15 +915,15 @@ export default { ...@@ -447,15 +915,15 @@ export default {
maxPage: 99, maxPage: 99,
list: [], list: [],
}, },
{ // {
type: "7", // type: "7",
value: 10, // value: 10,
icon: "icon-sxt", // icon: "icon-sxt",
label: "摄像头", // label: "摄像头",
nowPage: 1, // nowPage: 1,
maxPage: 99, // maxPage: 99,
list: [], // list: [],
}, // },
], ],
// 这是图上所有的点 // 这是图上所有的点
allList: [[], [], [], [], [], [], [], []], allList: [[], [], [], [], [], [], [], []],
...@@ -477,9 +945,9 @@ export default { ...@@ -477,9 +945,9 @@ export default {
// 左边抽屉 内嵌scroll盒子的高 // 左边抽屉 内嵌scroll盒子的高
boxHeight: "", boxHeight: "",
boxWidth: "", boxWidth: "",
drawerOpacity: false, drawerOpacity: true,
//抽屉是否收回 //抽屉是否收回
backFlag: true, backFlag: false,
mapStyle: true, mapStyle: true,
// 设备轮询用的定时器 // 设备轮询用的定时器
...@@ -573,7 +1041,7 @@ export default { ...@@ -573,7 +1041,7 @@ export default {
}); });
let icon = new AMap.Icon({ let icon = new AMap.Icon({
opacity: 0.1, opacity: 0.1,
image: require("../../../assets/images/tianqi.png"), // image: require("../../../assets/images/tianqi.png"),
}); });
marker.setIcon(icon); marker.setIcon(icon);
console.log("==========", marker); console.log("==========", marker);
...@@ -672,6 +1140,7 @@ export default { ...@@ -672,6 +1140,7 @@ export default {
getInspectorLocations(queryParams) { getInspectorLocations(queryParams) {
return getInspectorLocations(queryParams).then((res) => { return getInspectorLocations(queryParams).then((res) => {
if (res.code == 200) { if (res.code == 200) {
console.log('11111111111111111111111111',res.data)
// console.log(" 值班人员", res); // console.log(" 值班人员", res);
// 把值班人员传进类里 // 把值班人员传进类里
this.gaoMap.workerManArr = res.data; this.gaoMap.workerManArr = res.data;
...@@ -1786,7 +2255,7 @@ export default { ...@@ -1786,7 +2255,7 @@ export default {
} }
// 如果right与bottom 重叠,则bottom左移动 // 如果right与bottom 重叠,则bottom左移动
.bottomMarginRight { .bottomMarginRight {
right: 280px; right: -10px;
} }
// .btn-wrapper { // .btn-wrapper {
// position: fixed; // position: fixed;
...@@ -2270,6 +2739,17 @@ input[type="radio"] { ...@@ -2270,6 +2739,17 @@ input[type="radio"] {
background: #fff; background: #fff;
} }
} }
.pic {
width: 180px;
height: 103px;
// background-color: black;
img {
width: 100%;
height: 100%;
// cursor: pointer;
}
}
} }
</style> </style>
...@@ -35,7 +35,7 @@ import LineChart from './dashboard/LineChart' ...@@ -35,7 +35,7 @@ import LineChart from './dashboard/LineChart'
import RaddarChart from './dashboard/RaddarChart' import RaddarChart from './dashboard/RaddarChart'
import PieChart from './dashboard/PieChart' import PieChart from './dashboard/PieChart'
import BarChart from './dashboard/BarChart' import BarChart from './dashboard/BarChart'
import { sevenDayAlarm } from "@/api/dashboard/panelGroup";
const lineChartData = { const lineChartData = {
newVisitis: { newVisitis: {
expectedData: [100, 120, 161, 134, 105, 160, 165], expectedData: [100, 120, 161, 134, 105, 160, 165],
...@@ -66,13 +66,26 @@ export default { ...@@ -66,13 +66,26 @@ export default {
}, },
data() { data() {
return { return {
lineChartData: lineChartData.newVisitis newVisitis:{},
expectedData: [],
actualData: [],
}
},
created() {
/** 查询设备实时监控列表数量 (报警状态) */
sevenDayAlarm().then(response => {
for (let i=0; i<response.length; i++){
this.expectedData.push(response[i].time)
this.actualData.push(response[i].count)
} }
this.newVisitis=this.expectedData;
}
);
}, },
methods: { methods: {
handleSetLineChartData(type) { handleSetLineChartData(type) {
this.lineChartData = lineChartData[type] this.newVisitis = lineChartData[type]
} },
} }
} }
</script> </script>
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
</el-form> </el-form>
<!-- 底部 --> <!-- 底部 -->
<div class="el-login-footer"> <div class="el-login-footer">
<span>Copyright © 2018-2021 gassafety All Rights Reserved.</span> <!-- <span>Copyright © 2018-2021 gassafety All Rights Reserved.</span>-->
</div> </div>
</div> </div>
</template> </template>
......
...@@ -7,23 +7,23 @@ ...@@ -7,23 +7,23 @@
<line-chart :chart-data="lineChartData" /> <line-chart :chart-data="lineChartData" />
</el-row> </el-row>
<el-row :gutter="32"> <!-- <el-row :gutter="32">-->
<el-col :xs="24" :sm="24" :lg="8"> <!-- <el-col :xs="24" :sm="24" :lg="8">-->
<div class="chart-wrapper"> <!-- <div class="chart-wrapper">-->
<raddar-chart /> <!-- <raddar-chart />-->
</div> <!-- </div>-->
</el-col> <!-- </el-col>-->
<el-col :xs="24" :sm="24" :lg="8"> <!-- <el-col :xs="24" :sm="24" :lg="8">-->
<div class="chart-wrapper"> <!-- <div class="chart-wrapper">-->
<pie-chart /> <!-- <pie-chart />-->
</div> <!-- </div>-->
</el-col> <!-- </el-col>-->
<el-col :xs="24" :sm="24" :lg="8"> <!-- <el-col :xs="24" :sm="24" :lg="8">-->
<div class="chart-wrapper"> <!-- <div class="chart-wrapper">-->
<bar-chart /> <!-- <bar-chart />-->
</div> <!-- </div>-->
</el-col> <!-- </el-col>-->
</el-row> <!-- </el-row>-->
</div> </div>
...@@ -39,7 +39,7 @@ import BarChart from '../../dashboard/BarChart' ...@@ -39,7 +39,7 @@ import BarChart from '../../dashboard/BarChart'
const lineChartData = { const lineChartData = {
newVisitis: { newVisitis: {
expectedData: [100, 120, 161, 134, 105, 160, 165], expectedData: [100, 120, 161, 134, 105, 160, 165],
actualData: [120, 82, 91, 154, 162, 140, 145] // actualData: [120, 82, 91, 154, 162, 140, 145]
}, },
messages: { messages: {
expectedData: [200, 192, 120, 144, 160, 130, 140], expectedData: [200, 192, 120, 144, 160, 130, 140],
...@@ -66,7 +66,7 @@ export default { ...@@ -66,7 +66,7 @@ export default {
}, },
data() { data() {
return { return {
lineChartData: lineChartData.newVisitis lineChartData: lineChartData.newVisitis,
} }
}, },
methods: { methods: {
......
...@@ -34,7 +34,9 @@ module.exports = { ...@@ -34,7 +34,9 @@ module.exports = {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
// target: `http://36.148.23.59:8901/gassafety`, // target: `http://36.148.23.59:8901/gassafety`,
target: process.env.VUE_APP_TARGET, //target: 'http://192.168.2.22:8903/gassafety',
target: 'http://27.128.175.86:8903/gassafety',
// target: 'https://bazhou.zhkjgf.com:8903/gassafety',
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
["^" + process.env.VUE_APP_BASE_API]: "" ["^" + process.env.VUE_APP_BASE_API]: ""
......
...@@ -1863,7 +1863,7 @@ ...@@ -1863,7 +1863,7 @@
"@babel/helper-define-polyfill-provider" "^0.2.2" "@babel/helper-define-polyfill-provider" "^0.2.2"
"babel-runtime@6.x": "babel-runtime@6.x":
"integrity" "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=" "integrity" "sha512-ITKNuq2wKlW1fJg9sSW52eepoYgZBggvOAHC0u/CYu/qxQ9EVzThCgR69BnSXLHjy2f7SY5zaQ4yt7H9ZVxY2g=="
"resolved" "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz" "resolved" "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz"
"version" "6.26.0" "version" "6.26.0"
dependencies: dependencies:
...@@ -3509,10 +3509,10 @@ ...@@ -3509,10 +3509,10 @@
"resolved" "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.768.tgz" "resolved" "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.768.tgz"
"version" "1.3.768" "version" "1.3.768"
"element-ui@2.15.0": "element-ui@^2.15.9":
"integrity" "sha512-9z/1+b7V8fvp08OnKUEW4/BZ72kT+IhuKR9cTMz3XoCTKmEsqLLb32XjbO/DznSFaaiFbOYU93G7WtkvrCAL9A==" "integrity" "sha512-dx45nQLt4Hn87/Z9eRr3ex6KFZbxlFAwEU3QoW3wA5EsYftvHTyL9Pq7VnXXD7hu1Eiaup2jcs6kp+/VSFmXuA=="
"resolved" "https://registry.npmjs.org/element-ui/-/element-ui-2.15.0.tgz" "resolved" "https://registry.npmjs.org/element-ui/-/element-ui-2.15.9.tgz"
"version" "2.15.0" "version" "2.15.9"
dependencies: dependencies:
"async-validator" "~1.8.1" "async-validator" "~1.8.1"
"babel-helper-vue-jsx-merge-props" "^2.0.0" "babel-helper-vue-jsx-merge-props" "^2.0.0"
...@@ -6274,7 +6274,7 @@ ...@@ -6274,7 +6274,7 @@
"sort-keys" "^1.0.0" "sort-keys" "^1.0.0"
"normalize-wheel@^1.0.1": "normalize-wheel@^1.0.1":
"integrity" "sha1-rsiGr/2wRQcNhWRH32Ls+GFG7EU=" "integrity" "sha512-1OnlAPZ3zgrk8B91HyRj+eVv+kS5u+Z0SCsak6Xil/kmgEia50ga7zfkumayonZrImffAxPU/5WcyGhzetHNPA=="
"resolved" "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz" "resolved" "https://registry.npmjs.org/normalize-wheel/-/normalize-wheel-1.0.1.tgz"
"version" "1.0.1" "version" "1.0.1"
......
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