Commit 13a00380 authored by wuqinghua's avatar wuqinghua

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

parent 76d699a1
......@@ -61,6 +61,13 @@
<artifactId>gas-management-generator</artifactId>
</dependency>
<!--influxDB-->
<dependency>
<groupId>org.influxdb</groupId>
<artifactId>influxdb-java</artifactId>
<version>2.10</version>
</dependency>
</dependencies>
<build>
......
......@@ -6,7 +6,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
/**
* 启动程序
*
*
* @author zehong
*/
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
......@@ -15,5 +15,6 @@ public class GasSafetyApplication
public static void main(String[] 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";
}
......@@ -20,7 +20,7 @@ import com.zehong.framework.config.ServerConfig;
/**
* 通用请求处理
*
*
* @author zehong
*/
@RestController
......@@ -33,7 +33,7 @@ public class CommonController
/**
* 通用下载请求
*
*
* @param fileName 文件名称
* @param delete 是否删除
*/
......@@ -78,9 +78,11 @@ public class CommonController
// String url = serverConfig.getUrl() + fileName;
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");
if(fileServer.contains("rqgw.zhkjgf.com")){
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);
AjaxResult ajax = AjaxResult.success();
ajax.put("fileName", fileName);
......
package com.zehong.web.controller.dataMonitoring;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
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.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.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -28,7 +33,7 @@ import com.zehong.common.core.page.TableDataInfo;
/**
* 设备监控Controller
*
*
* @author zehong
* @date 2021-08-09
*/
......@@ -47,13 +52,54 @@ public class TDeviceReportDataController extends BaseController
public TableDataInfo list(DeviceReportDataForm deviceReportDataForm)
{
startPage();
// PageDomain pageDomain = TableSupport.buildPageRequest();
// Integer pageNum = pageDomain.getPageNum();
// Integer pageSize = pageDomain.getPageSize();
if(null == deviceReportDataForm.getStartReportTime() && null == deviceReportDataForm.getEndReportTime()){
Calendar startTime = Calendar.getInstance();
startTime.add(Calendar.DATE, - 7);
deviceReportDataForm.setStartReportTime(startTime.getTime());
deviceReportDataForm.setEndReportTime(new Date());
}
PageInfo<DeviceReportDataVo> page = tDeviceReportDataService.selectTDeviceReportDataPage(deviceReportDataForm);
/**
* 连接时序数据库
*/
// 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);
return getDataTable(page);
}
......
......@@ -23,7 +23,7 @@ import com.zehong.common.core.page.TableDataInfo;
/**
* 巡检员定位Controller
*
*
* @author zehong
* @date 2021-07-31
*/
......@@ -64,6 +64,7 @@ public class TUserLocationController extends BaseController
for(SysUser sysUser : inspectors){
map.put("userId",sysUser.getUserId());
map.put("initInspectors","initInspectors");
System.out.println(tUserLocationService.selectTUserLocationListByMap(map));
inspectorLocations.addAll(tUserLocationService.selectTUserLocationListByMap(map));
}
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;
}
}
......@@ -24,7 +24,7 @@ import com.zehong.common.core.page.TableDataInfo;
/**
* 工单反馈信息Controller
*
*
* @author zehong
* @date 2021-07-19
*/
......
......@@ -21,7 +21,7 @@ import java.util.List;
/**
* 工单基础信息Controller
*
*
* @author zehong
* @date 2021-07-19
*/
......@@ -42,6 +42,7 @@ public class TWorkOrderController extends BaseController
startPage();
PageInfo<WorkOrderVo> page = null;
try {
System.out.println(tWorkOrderForm+"2222");
page = tWorkOrderService.selectTWorkOrderPage(tWorkOrderForm);
} catch (Exception e) {
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,10 +5,14 @@ spring:
driverClassName: com.mysql.cj.jdbc.Driver
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:
# 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:
url: jdbc:mysql://27.128.175.86:3307/gas_mdb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: zehong
password: root@123
# 从库数据源
slave:
# 从数据源开关/默认关闭
......@@ -89,8 +93,8 @@ zehong:
copyrightYear: 2021
# 实例演示开关
demoEnabled: true
# 文件路径 示例( Windows配置D:/zehong/uploadPath,Linux配置 /data/zehong/uploadPath
profile: /data/zehong/uploadPath
# 文件路径 示例( Windows配置D:/zehong/uploadPath,Linux配置 /mnt/sdb/img
profile: /mnt/sdb/img
# 获取ip地址开关
addressEnabled: false
# 验证码类型 math 数组计算 char 字符验证
......
......@@ -5,10 +5,14 @@ spring:
driverClassName: com.mysql.cj.jdbc.Driver
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:
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
url: jdbc:mysql://27.128.175.86:3307/gas_mdb_prod?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: zehong123
password: root@123
# 从库数据源
slave:
# 从数据源开关/默认关闭
......@@ -90,7 +94,7 @@ zehong:
# 实例演示开关
demoEnabled: true
# 文件路径 示例( Windows配置D:/zehong/uploadPath,Linux配置 /data/zehong/uploadPath)
profile: /data/zehong/uploadPath
profile: /mnt/sdb/img
# 获取ip地址开关
addressEnabled: false
# 验证码类型 math 数组计算 char 字符验证
......
......@@ -5,10 +5,14 @@ spring:
driverClassName: com.mysql.cj.jdbc.Driver
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:
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
url: jdbc:mysql://27.128.175.86:3307/gas_mdb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username: zehong
password: root@123
# 从库数据源
slave:
# 从数据源开关/默认关闭
......@@ -90,7 +94,7 @@ zehong:
# 实例演示开关
demoEnabled: true
# 文件路径 示例( Windows配置D:/zehong/uploadPath,Linux配置 /data/zehong/uploadPath)
profile: C:/Temp/zehong
profile: /mnt/sdb/img
# 获取ip地址开关
addressEnabled: false
# 验证码类型 math 数组计算 char 字符验证
......
......@@ -5,6 +5,9 @@ server:
servlet:
# 应用的访问路径
context-path: /gassafety
# ssl:
# key-store: classpath:7926469_bazhou.zhkjgf.com.pfx #类路径下的自签证书
# key-store-password: WNR6pN48 #证书密码
tomcat:
# tomcat的URI编码
uri-encoding: UTF-8
......@@ -13,6 +16,8 @@ server:
# Tomcat启动初始化的线程数,默认值25
min-spare-threads: 30
# 日志配置
logging:
level:
......@@ -25,7 +30,7 @@ spring:
messages:
# 国际化资源文件路径
basename: i18n/messages
profiles:
profiles:
active: test
# 文件上传
servlet:
......@@ -48,7 +53,7 @@ token:
secret: abcdefghijklmnopqrstuvwxyz
# 令牌有效期(默认30分钟)
expireTime: 30
# MyBatis配置
mybatis:
# 搜索指定包别名
......@@ -59,11 +64,11 @@ mybatis:
configLocation: classpath:mybatis/mybatis-config.xml
# PageHelper分页插件
pagehelper:
pagehelper:
helperDialect: mysql
reasonable: true
supportMethodsArguments: true
params: count=countSql
params: count=countSql
# Swagger配置
swagger:
......@@ -73,10 +78,16 @@ swagger:
pathMapping: /dev-api
# 防止XSS攻击
xss:
xss:
# 过滤开关
enabled: true
# 排除链接(多个用逗号分隔)
excludes: /system/notice/*
# 匹配链接
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;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
......@@ -11,7 +12,7 @@ import org.springframework.format.annotation.DateTimeFormat;
/**
* 巡检员定位对象 t_user_location
*
*
* @author zehong
* @date 2021-07-31
*/
......@@ -39,7 +40,8 @@ public class TUserLocation extends BaseEntity
private String phonenumber;
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;
@Override
......@@ -80,34 +82,34 @@ public class TUserLocation extends BaseEntity
this.locationId = locationId;
}
public Long getLocationId()
public Long getLocationId()
{
return locationId;
}
public void setUserId(Long userId)
public void setUserId(Long userId)
{
this.userId = userId;
}
public Long getUserId()
public Long getUserId()
{
return userId;
}
public void setLongitude(BigDecimal longitude)
public void setLongitude(BigDecimal longitude)
{
this.longitude = longitude;
}
public BigDecimal getLongitude()
public BigDecimal getLongitude()
{
return longitude;
}
public void setLatitude(BigDecimal latitude)
public void setLatitude(BigDecimal latitude)
{
this.latitude = latitude;
}
public BigDecimal getLatitude()
public BigDecimal getLatitude()
{
return latitude;
}
......
......@@ -10,7 +10,7 @@ import java.util.Date;
/**
* 工单基础信息对象 t_work_order
*
*
* @author zehong
* @date 2021-07-19
*/
......@@ -52,22 +52,22 @@ public class TWorkOrderForm extends BaseEntity
/** 用户名 */
private String userName;
public void setOrderId(String orderId)
public void setOrderId(String orderId)
{
this.orderId = orderId;
}
public String getOrderId()
public String getOrderId()
{
return orderId;
}
public void setOrderType(String orderType)
public void setOrderType(String orderType)
{
this.orderType = orderType;
}
public String getOrderType()
public String getOrderType()
{
return orderType;
}
......@@ -77,17 +77,17 @@ public class TWorkOrderForm extends BaseEntity
this.orderName = orderName;
}
public String getOrderName()
public String getOrderName()
{
return orderName;
}
public void setOrderStatus(String orderStatus)
public void setOrderStatus(String orderStatus)
{
this.orderStatus = orderStatus;
}
public String getOrderStatus()
public String getOrderStatus()
{
return orderStatus;
}
......@@ -141,4 +141,20 @@ public class TWorkOrderForm extends BaseEntity
public void setActualTime(Date 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 + '\'' +
'}';
}
}
......@@ -13,7 +13,7 @@ import java.util.List;
/**
* 设备监控对象 t_device_report_data
*
*
* @author zehong
* @date 2021-08-09
*/
......@@ -99,12 +99,12 @@ public class DeviceReportDataVo extends BaseEntity
/**上报设备名称*/
private String reportDeviceName;
public void setDeviceReportDataId(Long deviceReportDataId)
public void setDeviceReportDataId(Long deviceReportDataId)
{
this.deviceReportDataId = deviceReportDataId;
}
public Long getDeviceReportDataId()
public Long getDeviceReportDataId()
{
return deviceReportDataId;
}
......@@ -188,88 +188,88 @@ public class DeviceReportDataVo extends BaseEntity
this.standardConditionAccumulation = standardConditionAccumulation;
}
public BigDecimal getStandardConditionAccumulation()
public BigDecimal getStandardConditionAccumulation()
{
return standardConditionAccumulation;
}
public void setWorkingConditionAccumulation(BigDecimal workingConditionAccumulation)
public void setWorkingConditionAccumulation(BigDecimal workingConditionAccumulation)
{
this.workingConditionAccumulation = workingConditionAccumulation;
}
public BigDecimal getWorkingConditionAccumulation()
public BigDecimal getWorkingConditionAccumulation()
{
return workingConditionAccumulation;
}
public void setResidualQuantity(BigDecimal residualQuantity)
public void setResidualQuantity(BigDecimal residualQuantity)
{
this.residualQuantity = residualQuantity;
}
public BigDecimal getResidualQuantity()
public BigDecimal getResidualQuantity()
{
return residualQuantity;
}
public void setStandardConditionFlow(BigDecimal standardConditionFlow)
public void setStandardConditionFlow(BigDecimal standardConditionFlow)
{
this.standardConditionFlow = standardConditionFlow;
}
public BigDecimal getStandardConditionFlow()
public BigDecimal getStandardConditionFlow()
{
return standardConditionFlow;
}
public void setWorkingConditionFlow(BigDecimal workingConditionFlow)
public void setWorkingConditionFlow(BigDecimal workingConditionFlow)
{
this.workingConditionFlow = workingConditionFlow;
}
public BigDecimal getWorkingConditionFlow()
public BigDecimal getWorkingConditionFlow()
{
return workingConditionFlow;
}
public void setTemperature(BigDecimal temperature)
public void setTemperature(BigDecimal temperature)
{
this.temperature = temperature;
}
public BigDecimal getTemperature()
public BigDecimal getTemperature()
{
return temperature;
}
public void setPressure(BigDecimal pressure)
public void setPressure(BigDecimal pressure)
{
this.pressure = pressure;
}
public BigDecimal getPressure()
public BigDecimal getPressure()
{
return pressure;
}
public void setReportTime(Date reportTime)
public void setReportTime(Date reportTime)
{
this.reportTime = reportTime;
}
public Date getReportTime()
public Date getReportTime()
{
return reportTime;
}
public void setCommunicationStatus(String communicationStatus)
public void setCommunicationStatus(String communicationStatus)
{
this.communicationStatus = communicationStatus;
}
public String getCommunicationStatus()
public String getCommunicationStatus()
{
return communicationStatus;
}
public void setDeviceStatus(String deviceStatus)
public void setDeviceStatus(String deviceStatus)
{
this.deviceStatus = deviceStatus;
}
public String getDeviceStatus()
public String getDeviceStatus()
{
return deviceStatus;
}
......
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 +
'}';
}
}
......@@ -8,11 +8,11 @@ import org.apache.ibatis.annotations.Param;
/**
* 工单基础信息Mapper接口
*
*
* @author zehong
* @date 2021-07-19
*/
public interface TWorkOrderMapper
public interface TWorkOrderMapper
{
/**
* 获取工单基础信息id
......@@ -23,7 +23,7 @@ public interface TWorkOrderMapper
/**
* 查询工单基础信息
*
*
* @param orderId 工单基础信息ID
* @return 工单基础信息
*/
......@@ -31,8 +31,8 @@ public interface TWorkOrderMapper
/**
* 查询工单基础信息列表
*
* @param tWorkOrder 工单基础信息
*
* @param tWorkOrderForm 工单基础信息
* @return 工单基础信息集合
*/
public List<TWorkOrder> selectTWorkOrderList(TWorkOrderForm tWorkOrderForm);
......@@ -49,7 +49,7 @@ public interface TWorkOrderMapper
/**
* 新增工单基础信息
*
*
* @param tWorkOrder 工单基础信息
* @return 结果
*/
......@@ -57,7 +57,7 @@ public interface TWorkOrderMapper
/**
* 修改工单基础信息
*
*
* @param tWorkOrder 工单基础信息
* @return 结果
*/
......@@ -65,7 +65,7 @@ public interface TWorkOrderMapper
/**
* 删除工单基础信息
*
*
* @param orderId 工单基础信息ID
* @return 结果
*/
......@@ -73,7 +73,7 @@ public interface TWorkOrderMapper
/**
* 批量删除工单基础信息
*
*
* @param orderIds 需要删除的数据ID
* @return 结果
*/
......
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);
}
......@@ -9,15 +9,15 @@ import com.zehong.system.domain.vo.DeviceReportDataVo;
/**
* 设备监控Service接口
*
*
* @author zehong
* @date 2021-08-09
*/
public interface ITDeviceReportDataService
public interface ITDeviceReportDataService
{
/**
* 查询设备监控
*
*
* @param deviceId 设备ID
* @return 设备监控
*/
......@@ -33,7 +33,7 @@ public interface ITDeviceReportDataService
/**
* 查询设备监控列表
*
*
* @param deviceReportDataForm 设备监控
* @return 设备监控集合
*/
......@@ -65,7 +65,7 @@ public interface ITDeviceReportDataService
/**
* 新增设备监控
*
*
* @param tDeviceReportData 设备监控
* @return 结果
*/
......@@ -73,7 +73,7 @@ public interface ITDeviceReportDataService
/**
* 修改设备监控
*
*
* @param tDeviceReportData 设备监控
* @return 结果
*/
......@@ -81,7 +81,7 @@ public interface ITDeviceReportDataService
/**
* 批量删除设备监控
*
*
* @param deviceReportDataIds 需要删除的设备监控ID
* @return 结果
*/
......@@ -89,9 +89,10 @@ public interface ITDeviceReportDataService
/**
* 删除设备监控信息
*
*
* @param deviceReportDataId 设备监控ID
* @return 结果
*/
public int deleteTDeviceReportDataById(Long deviceReportDataId);
}
......@@ -8,22 +8,23 @@ import com.github.pagehelper.PageInfo;
import com.github.pagehelper.PageInfo;
import com.zehong.system.domain.TWorkOrder;
import com.zehong.system.domain.form.TWorkOrderForm;
import com.zehong.system.domain.vo.SevenDayAlarmVo;
import com.zehong.system.domain.vo.WorkOrderVo;
import org.apache.commons.math3.analysis.function.Add;
import org.apache.poi.ss.formula.functions.T;
/**
* 工单基础信息Service接口
*
*
* @author zehong
* @date 2021-07-19
*/
public interface ITWorkOrderService
public interface ITWorkOrderService
{
/**
* 查询工单基础信息
*
*
* @param orderId 工单基础信息ID
* @return 工单基础信息
*/
......@@ -31,7 +32,7 @@ public interface ITWorkOrderService
/**
* 查询工单基础信息列表
*
*
* @param tWorkOrderForm 工单基础信息表单
* @return 工单基础信息集合
*/
......@@ -54,7 +55,7 @@ public interface ITWorkOrderService
/**
* 新增工单基础信息
*
*
* @param tWorkOrder 工单基础信息
* @return 结果
*/
......@@ -62,7 +63,7 @@ public interface ITWorkOrderService
/**
* 修改工单基础信息
*
*
* @param tWorkOrder 工单基础信息
* @return 结果
*/
......@@ -70,7 +71,7 @@ public interface ITWorkOrderService
/**
* 批量删除工单基础信息
*
*
* @param orderIds 需要删除的工单基础信息ID
* @return 结果
*/
......@@ -78,7 +79,7 @@ public interface ITWorkOrderService
/**
* 删除工单基础信息信息
*
*
* @param orderId 工单基础信息ID
* @return 结果
*/
......@@ -90,4 +91,6 @@ public interface ITWorkOrderService
* @return
*/
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;
import com.zehong.system.domain.*;
import com.zehong.system.domain.form.TWorkOrderForm;
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.mapper.*;
import com.zehong.system.service.ITWorkOrderService;
......@@ -19,12 +20,12 @@ import org.springframework.stereotype.Service;
/**
* 工单基础信息Service业务层处理
*
*
* @author zehong
* @date 2021-07-19
*/
@Service
public class TWorkOrderServiceImpl implements ITWorkOrderService
public class TWorkOrderServiceImpl implements ITWorkOrderService
{
@Autowired
private TWorkOrderMapper tWorkOrderMapper;
......@@ -47,7 +48,7 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
/**
* 查询工单基础信息
*
*
* @param orderId 工单基础信息ID
* @return 工单基础信息
*/
......@@ -56,7 +57,6 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
{
WorkOrderVo workOrderVo = new WorkOrderVo();
TWorkOrder tWorkOrder = tWorkOrderMapper.selectTWorkOrderById(orderId);
BeanUtils.copyProperties(tWorkOrder, workOrderVo);
// 获取巡检员姓名
......@@ -187,7 +187,7 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
/**
* 查询工单基础信息列表
*
*
* @param tWorkOrderForm 工单基础信息
* @return 工单基础信息
*/
......@@ -229,12 +229,12 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
@Override
public PageInfo<WorkOrderVo> selectTWorkOrderPage(TWorkOrderForm tWorkOrderForm) throws Exception
{
System.out.println(tWorkOrderForm.toString()+"222222222222");
List<TWorkOrder> workOrderList = tWorkOrderMapper.selectTWorkOrderList(tWorkOrderForm);
System.out.println(workOrderList);
PageInfo<WorkOrderVo> pageVo = PageInfoUtil.pageInfo2PageInfoDTO(new PageInfo<>(workOrderList),WorkOrderVo.class);
if(pageVo.getList().size() != 0){
for(WorkOrderVo workOrder : pageVo.getList()){
// 获取巡检员姓名
SysUser appointInspector = sysUserMapper.selectUserById(workOrder.getAppointInspector());
workOrder.setAppointInspectorName(appointInspector.getNickName());
......@@ -247,6 +247,7 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
}
}
}
System.out.println(pageVo);
return pageVo;
}
......@@ -276,7 +277,7 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
}
/**
* 新增工单基础信息
*
*
* @param tWorkOrder 工单基础信息
* @return 结果
*/
......@@ -319,7 +320,7 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
/**
* 修改工单基础信息
*
*
* @param tWorkOrder 工单基础信息
* @return 结果
*/
......@@ -355,7 +356,7 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
/**
* 批量删除工单基础信息
*
*
* @param orderIds 需要删除的工单基础信息ID
* @return 结果
*/
......@@ -367,7 +368,7 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
/**
* 删除工单基础信息信息
*
*
* @param orderId 工单基础信息ID
* @return 结果
*/
......@@ -381,4 +382,6 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
TWorkOrder order = tWorkOrderMapper.selectTWorkOrderById(orderId);
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);
}
}
......@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.TWorkOrderMapper">
<resultMap type="TWorkOrder" id="TWorkOrderResult">
<result property="orderId" column="order_id" />
<result property="orderType" column="order_type" />
......@@ -77,7 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectTWorkOrderVo"/>
where t.order_id = #{orderId}
</select>
<insert id="insertTWorkOrder" parameterType="TWorkOrder">
insert into t_work_order
<trim prefix="(" suffix=")" suffixOverrides=",">
......@@ -132,7 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete id="deleteTWorkOrderByIds" parameterType="String">
delete from t_work_order where order_id in
delete from t_work_order where order_id in
<foreach item="orderId" collection="array" open="(" separator="," close=")">
#{orderId}
</foreach>
......@@ -188,4 +188,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</choose>
</select>
</mapper>
\ No newline at end of file
</mapper>
<?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 @@
"clipboard": "2.0.6",
"core-js": "3.8.1",
"echarts": "^4.9.0",
"element-ui": "2.15.0",
"element-ui": "^2.15.9",
"file-saver": "2.0.4",
"fuse.js": "6.4.3",
"highlight.js": "9.18.5",
......@@ -3350,7 +3350,7 @@
"node_modules/babel-runtime": {
"version": "6.26.0",
"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": {
"core-js": "^2.4.0",
"regenerator-runtime": "^0.11.0"
......@@ -3360,7 +3360,7 @@
"version": "2.6.12",
"resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz",
"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
},
"node_modules/babel-runtime/node_modules/regenerator-runtime": {
......@@ -6079,9 +6079,9 @@
"dev": true
},
"node_modules/element-ui": {
"version": "2.15.0",
"resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.15.0.tgz",
"integrity": "sha512-9z/1+b7V8fvp08OnKUEW4/BZ72kT+IhuKR9cTMz3XoCTKmEsqLLb32XjbO/DznSFaaiFbOYU93G7WtkvrCAL9A==",
"version": "2.15.9",
"resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.15.9.tgz",
"integrity": "sha512-dx45nQLt4Hn87/Z9eRr3ex6KFZbxlFAwEU3QoW3wA5EsYftvHTyL9Pq7VnXXD7hu1Eiaup2jcs6kp+/VSFmXuA==",
"dependencies": {
"async-validator": "~1.8.1",
"babel-helper-vue-jsx-merge-props": "^2.0.0",
......@@ -10602,7 +10602,7 @@
"node_modules/normalize-wheel": {
"version": "1.0.1",
"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": {
"version": "2.0.2",
......@@ -19234,7 +19234,7 @@
"babel-runtime": {
"version": "6.26.0",
"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": {
"core-js": "^2.4.0",
"regenerator-runtime": "^0.11.0"
......@@ -21556,9 +21556,9 @@
"dev": true
},
"element-ui": {
"version": "2.15.0",
"resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.15.0.tgz",
"integrity": "sha512-9z/1+b7V8fvp08OnKUEW4/BZ72kT+IhuKR9cTMz3XoCTKmEsqLLb32XjbO/DznSFaaiFbOYU93G7WtkvrCAL9A==",
"version": "2.15.9",
"resolved": "https://registry.npmjs.org/element-ui/-/element-ui-2.15.9.tgz",
"integrity": "sha512-dx45nQLt4Hn87/Z9eRr3ex6KFZbxlFAwEU3QoW3wA5EsYftvHTyL9Pq7VnXXD7hu1Eiaup2jcs6kp+/VSFmXuA==",
"requires": {
"async-validator": "~1.8.1",
"babel-helper-vue-jsx-merge-props": "^2.0.0",
......@@ -25232,7 +25232,7 @@
"normalize-wheel": {
"version": "1.0.1",
"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": {
"version": "2.0.2",
......@@ -6,7 +6,7 @@
"license": "MIT",
"scripts": {
"dev": "vue-cli-service serve",
"build:prod": "vue-cli-service build",
"build": "vue-cli-service build",
"build:stage": "vue-cli-service build --mode staging",
"preview": "node build/index.js --preview",
"lint": "eslint --ext .js,.vue src"
......@@ -18,7 +18,7 @@
"clipboard": "2.0.6",
"core-js": "3.8.1",
"echarts": "^4.9.0",
"element-ui": "2.15.0",
"element-ui": "^2.15.9",
"file-saver": "2.0.4",
"fuse.js": "6.4.3",
"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) {
})
}
//初始化巡检员位置及路线
//初始化巡检员位置及路线s
export function getInspectorLocations(query){
return request({
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">
<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"/>
<g id="路径_185" data-name="路径 185" fill="none">
<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"/>
<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"/>
</g>
<path id="多边形_32" data-name="多边形 32" d="M4.53,0l4.53,6.039H0Z" transform="translate(16.306 30.197) rotate(180)" fill="#7bf8f4"/>
<svg width="22" height="33" viewBox="0 0 22 33" fill="none" xmlns="http://www.w3.org/2000/svg">
<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"/>
<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"/>
<g filter="url(#filter0_f_35_132)">
<path d="M11.118 27.9995L6.84167 22.3993H15.3943L11.118 27.9995Z" fill="#EAC448"/>
</g>
<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>
<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 @@
<div>报警状态:<span>报警</span></div>
<div>详细信息:<span>管线两端设备压差较大,管线可能泄漏</span></div>
</div> -->
<div class="btn">
<span @mousedown.stop="deviceMore">
<el-button class="elbtn" type="primary">设备详情</el-button>
</span>
<!-- <div class="btn">-->
<!-- <span @mousedown.stop="deviceMore">-->
<!-- <el-button class="elbtn" type="primary">设备详情</el-button>-->
<!-- </span>-->
<!-- <el-button class="elbtn" type="primary">生成工单</el-button> -->
</div>
<!-- </div>-->
</div>
</div>
</template>
......@@ -132,16 +132,18 @@ export default {
},
deviceMore() {
this.view.dialogFormVisible=true;
this.view.hiddenDanger=this.obj
console.log(this.obj.polyline.getExtData().lineData);
this.obj.polyline.getExtData().class.view.$router.push({
// path: "/dataMonitoring/realtimedetail",
path: "/device/pipeDetail",
query: {
pipeId: this.obj.polyline.getExtData().lineData.pipeId,
//这里是传数字
deviceType: "0",
},
});
// this.obj.polyline.getExtData().class.view.$router.push({
// // path: "/dataMonitoring/realtimedetail",
// path: "/device/pipeDetail",
// query: {
// pipeId: this.obj.polyline.getExtData().lineData.pipeId,
// //这里是传数字
// deviceType: "0",
// },
// });
},
},
};
......@@ -168,6 +170,7 @@ export default {
// border: 1px solid #fff;
box-sizing: border-box;
position: relative;
background: rgb(4,17,31,0.6);
&:before {
content: "";
position: absolute;
......@@ -175,8 +178,8 @@ export default {
top: 5px;
z-index: -1;
width: 33px;
height: 33px;
background-image: url(../../assets/images/blueLeftTriangle.png);
height: 26px;
background-image: url(../../assets/images/polygon.png);
}
.text {
font-weight: 600;
......@@ -200,7 +203,7 @@ export default {
overflow: hidden;
overflow-y: auto;
padding-bottom: 2px;
border-bottom: 1px solid #eeeeee;
/*border-bottom: 1px solid #eeeeee;*/
.eq-content {
// min-height: 156px;
box-sizing: border-box;
......
......@@ -56,7 +56,6 @@
</div>
</div>
</div>
<!-- 报警状态 -->
<div class="warn-wrapper" v-if="true">
<!-- <div class="warn-content">
......@@ -65,10 +64,11 @@
</div> -->
<template v-if="data.deviceType ==3 || data.deviceType==4">
<div v-if="data.deviceType==3" class="windowwarn-content" style="
border-bottom: 1px solid #e2e2e2;
padding: 10px 0 2px 22px;
height: 150px;padding-bottom: 2px;
height: 150px;
">
<div style="border-bottom: 1px solid #eeeeee;">
</div>
<el-col :span="12">
<div class="windowwarn">
标况累积量:<span class="standardConditionAccumulation">-</span>
......@@ -111,10 +111,11 @@
</el-col>
</div>
<div v-if="data.deviceType==4" class="windowwarn-content" style="
border-bottom: 1px solid #e2e2e2;
padding: 10px 0 2px 22px;
height: 70px;padding-bottom: 2px;
">
<div style="border-bottom: 1px solid #eeeeee;">
</div>
<el-col :span="24">
<div class="windowwarn">
压力:<span class="pressure">-</span>
......@@ -129,12 +130,29 @@
</template>
<div class="btn">
<span @mousedown.stop="deviceMore">
<el-button class="elbtn" type="primary">设备详情</el-button>
</span>
<!-- <div class="btn">-->
<!-- <span @mousedown.stop="deviceMore">-->
<!-- <el-button class="elbtn" type="primary">设备详情</el-button>-->
<!-- </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> -->
</div>
<!-- </div>-->
</div>
</div>
</template>
......@@ -150,6 +168,7 @@
title: "",
data: {},
map: null,
dialogFormVisible:false,
},
data() {
return {
......@@ -180,14 +199,16 @@
methods: {
moment,
deviceMore() {
this.data.class.view.$router.push({
// path: "/dataMonitoring/realtimedetail",
path: "/device/deviceInfoDetail",
query: {
deviceId: this.data.deviceId,
// deviceType: this.data.deviceType,
},
});
alert("111")
this.dialogFormVisible=true;
// this.data.class.view.$router.push({
// // path: "/dataMonitoring/realtimedetail",
// path: "/device/deviceInfoDetail",
// query: {
// deviceId: this.data.deviceId,
// // deviceType: this.data.deviceType,
// },
// });
},
getDataid() {
getWindowData(this.data.deviceId).then(response => {
......@@ -248,6 +269,7 @@
background: rgba(7, 29, 51, 0.9);
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
color: #fff;
/*border-bottom: 1px solid #e2e2e2;*/
// overflow: hidden;
.top {
......@@ -257,7 +279,9 @@
background-image: url(../../assets/images/blueTopBg.png);
background-size: 100% 100%;
background-position: center;
background: rgb(4,17,31,0.8);
/*background:rgba(255,0,0,0.5);*/
opacity:0.8;
&:before {
// content: "";
// position: absolute;
......@@ -275,8 +299,8 @@
top: 5px;
z-index: -1;
width: 33px;
height: 33px;
background-image: url(../../assets/images/blueLeftTriangle.png);
height: 26px;
background-image: url(../../assets/images/polygon.png);
}
.text {
......@@ -305,7 +329,7 @@
overflow: hidden;
overflow-y: auto;
padding-bottom: 2px;
border-bottom: 1px solid #eeeeee;
/*border-bottom: 1px solid #eeeeee;*/
.eq-content {
// min-height: 156px;
......@@ -381,7 +405,7 @@
.warn-content {
box-sizing: border-box;
padding: 10px 0 2px 22px;
border-bottom: 1px solid #e2e2e2;
/*border-bottom: 1px solid #e2e2e2;*/
color: #fe5966;
&>div {
......@@ -411,4 +435,4 @@
display: flex;
justify-content: space-between;
}
</style>
\ No newline at end of file
</style>
......@@ -62,7 +62,6 @@
</div>
</div>
</div>
<!-- 隐患关联设备状态 -->
<div class="warn-wrapper" v-if="true">
<div class="warn-content">
......@@ -91,6 +90,8 @@
</div>
</div>
</div>
</template>
<script>
......@@ -102,6 +103,7 @@ export default {
title: "",
data: {},
map: null,
hiddenDanger:[]
},
data() {
return {
......@@ -159,13 +161,18 @@ export default {
this.data.class.view.domAllShow();
},
deviceMore() {
this.data.class.view.$router.push({
path: "/riskManagement/hiddenTroubleDetail",
query: {
troubleId: this.data.troubleId,
// dcviceType: this.deviceType[this.data.deviceType],
},
});
this.data.class.view.dialogFormVisible=true;
this.data.class.view.hiddenDanger=this.data
// this.dialogFormVisible=true;
// 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() {
......
......@@ -59,4 +59,4 @@ export default {
}
}
}
</style>
\ No newline at end of file
</style>
......@@ -136,8 +136,8 @@ export default {
label: item.nickName,
value: item.userId,
}));
this.formData.beginTime = moment().format("YYYY-MM-DD HH:mm:ss");
this.formData.endTime = moment().add(2, "h").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().format("YYYY-MM-DD HH:mm:ss");
},
watch: {
dialogVisible(val) {
......@@ -158,11 +158,9 @@ export default {
.subtract(2, "h")
.format("YYYY-MM-DD HH:mm:ss");
this.formData.endTime = moment().format("YYYY-MM-DD HH:mm:ss");
} else if (e == 2) {
this.formData.beginTime = moment().format("YYYY-MM-DD HH:mm:ss");
this.formData.endTime = moment()
.add(1, "d")
.format("YYYY-MM-DD HH:mm:ss");
} else if (e == 2) { //24小时
this.formData.beginTime = moment().add(-1, "d").format("YYYY-MM-DD HH:mm:ss");
this.formData.endTime = moment().format("YYYY-MM-DD HH:mm:ss");
} else {
this.formData.beginTime = "";
this.formData.endTime = "";
......@@ -171,14 +169,14 @@ export default {
ok() {
this.$refs.formData.validate((valid) => {
if (valid) {
if (
moment(this.formData.beginTime).valueOf() >
moment(this.formData.endTime).valueOf()
) {
this.msgError("开始时间不能大于结束时间");
this.formData.endTime = "";
return;
}
// if (
// moment(this.formData.beginTime).valueOf() >
// moment(this.formData.endTime).valueOf()
// ) {
// this.msgError("开始时间不能大于结束时间");
// this.formData.endTime = "";
// return;
// }
this.okLoading = true;
if (this.formData.changeTime != 3) {
......
......@@ -95,6 +95,7 @@
map: gaode.myMap
});
});
})
}
},
......
<template>
<el-dialog
title="拾取坐标"
title="拾取坐标22"
:visible.sync="dialogTableVisible"
:before-close="handleClose"
>
......@@ -49,8 +49,11 @@
handler(value) {
if(value){
window.addEventListener("click", this.barClose);
this.$nextTick(() => {
this.map = new gaodeMap(process.env.VUE_APP_MAP_CENTER);
this.map.searchTips(this.map.myMap);
this.map.addMouseTool();
if(this.str){
this.map.addPolyline([{coordinates:this.str}]);
......@@ -60,6 +63,12 @@
if (this.map.newLineObj == null) {
this.map.createNewLine();
}
//搜索功能
// AMap.plugin(["AMap.AutoComplete","AMap.PlaceSearch"], function() {
// that.placeSearch = new AMap.PlaceSearch({
// map: gaode.myMap
// });
// });
})
}else{
......@@ -85,7 +94,7 @@
this.$emit('dialogcancelFun');
},
search(){
this.placeSearch.search(this.keyWorld); //关键字查询查询
this.map.placeSearch.search(this.keyWorld); //关键字查询查询
},
handleClose(){
this.$emit('dialogcancelFun');
......
......@@ -12,7 +12,7 @@ import { delPipe } from "@/api/device/pipe.js";
import { lineColor,mapStyle } from "@/utils/mapCommon.js";
import vue from "@/main";
let defaultCenter = "石家庄";
let defaultCenter = "新疆巴州";
export let map;
export const DEVICE_TYPE = {
PIPEPLINE: "1",
......@@ -43,7 +43,7 @@ class gaodeMap {
this.center = center ? center : defaultCenter;
map = new AMap.Map("container1", {
//mask: addMask(result.districtList[0].boundaries),
center: [114.72995, 38.37417],
center: [86.144237,41.775235],
// resizeEnable: true,
disableSocket: true,
viewMode: "3D",
......@@ -89,7 +89,8 @@ class gaodeMap {
// console.log("缩放开始")
this.closeInfoWindow()
})
this.districtBoundaries();
// this.districtBoundaries();
}
/**
......@@ -106,7 +107,7 @@ class gaodeMap {
*/
set setCenter(value) {
this.center = value;
this.districtBoundaries();
// this.districtBoundaries();
}
resetMapCenter(value) {
......@@ -887,9 +888,9 @@ class gaodeMap {
}
);
}
searchTips(inputId) {
let that = this;
placeSearch=null;
searchTips(map) {
let that = this
AMap.plugin(["AMap.AutoComplete", "AMap.PlaceSearch"], function() {
//输入提示
// var autoOptions = {
......@@ -897,7 +898,7 @@ class gaodeMap {
// };
// let auto = new AMap.AutoComplete(autoOptions);
that.placeSearch = new AMap.PlaceSearch({
map: map
map,
});
//构造地点查询类
// auto.on("select", function(e) {
......
......@@ -8,11 +8,10 @@ import pipelineView from "../components/PopWindow/pipelineView.vue";
import lineInfoWindow from "../components/PopWindow/lineInfoWindow.vue";
import { delDeviceInfo, updateDeviceInfo } from "@/api/device/deviceInfo";
import markerInfoWindow from "../components/PopWindow/markerInfoWindow.vue";
import { getArray } from "@/utils/gassafety.js";
import { delPipe, updatePipe } from "@/api/device/pipe.js";
import vue from "../main";
let defaultCenter = "石家庄";
let defaultCenter = "新疆巴州";
export let map;
export const DEVICE_TYPE = {
PIPEPLINE: "1",
......@@ -49,7 +48,7 @@ class gaodeMap {
this.center = center ? center : defaultCenter;
map = new AMap.Map(container, {
//mask: addMask(result.districtList[0].boundaries),
center: [114.72995, 38.37417],
center: [86.161485,41.767488],
// resizeEnable: true,
disableSocket: true,
viewMode: "3D",
......@@ -142,7 +141,7 @@ class gaodeMap {
console.log("飞行结束");
});
this.districtBoundaries(latlng);
// this.districtBoundaries(latlng);
}
panTo(lnglat) {
this.myMap.panTo(lnglat);
......
......@@ -5,6 +5,7 @@ import flowMeter from "../components/PopWindow/flowMeter.vue";
import pipelineView from "../components/PopWindow/pipelineView.vue";
import lineInfoWindow from "../components/PopWindowGis/lineInfoWindow.vue";
import markerInfoWindow from "../components/PopWindowGis/markerInfoWindow.vue";
import equipment from "../components/PopWindowGis/equipment.vue";
import removeLineInfoWindow from "../components/PopWindowGis/removeLineInfoWindow.vue";
import markerInfoWindowWarn from "../components/PopWindowGis/markerInfoWindowWarn.vue";
import troubleInfoWindowWarn from "../components/PopWindowGis/troubleInfoWindowWarn.vue";
......@@ -21,7 +22,7 @@ import { lineColor, mapStyle } from "./mapCommon.js";
import { delPipe } from "@/api/device/pipe.js";
import vue from "../main";
import { Card } from "element-ui";
let defaultCenter = "石家庄";
let defaultCenter = "巴州";
export let map;
export const DEVICE_TYPE = {
PIPEPLINE: "1",
......@@ -45,6 +46,7 @@ class gaodeMap {
troubles = [];
// 摄像头
cameras = [];
dialogTableVisible =true;
// 值班人员对象的arr
workerManMarkArr = [];
// 是否开启新增
......@@ -69,7 +71,7 @@ class gaodeMap {
this.center = center ? center : defaultCenter;
map = new AMap.Map("container", {
//mask: addMask(result.districtList[0].boundaries),
center: [114.72995, 38.37417],
center: [86.161485,41.767488],
// resizeEnable: true,
disableSocket: true,
viewMode: "3D",
......@@ -148,7 +150,7 @@ class gaodeMap {
options.scrollWheel = true;
this.myMap.setStatus(options);
});
this.districtBoundaries();
// this.districtBoundaries();
}
changeMap(bool) {
// 卫星图
......@@ -204,7 +206,7 @@ class gaodeMap {
defaultCenter.push(result.districtList[0].center.lng);
defaultCenter.push(result.districtList[0].center.lat);
// map.setCenter(defaultCenter);
map.setCenter([124.762977, 45.127297]);
map.setCenter([86.161485,41.767488]);
let bounds = result.districtList[0].boundaries;
for (let i = 0; i < bounds.length; i += 1) {
new AMap.Polyline({
......@@ -282,12 +284,14 @@ class gaodeMap {
marker.on("mouseover", this.wokerManOpen);
marker.on("mouseout", e => {
e.target.infoWindow.close();
this.domAllShow();
});
marker.on("mousedown", e => {
// console.log(data);
that.closeInfoWindow();
if (marker.workerPoint) return;
that.workerManView({
title: "值班人员轨迹回放",
......@@ -339,6 +343,7 @@ class gaodeMap {
});
marker.on("mousedown", e => {
that.closeInfoWindow();
that.videoView({
title: "监控",
target: marker,
......@@ -453,8 +458,10 @@ class gaodeMap {
this.boxCollision(e.target.infoWindow.dom);
this.workerManInfoWindow = e.target.infoWindow;
};
// 隐患
// 隐患弹出层触发
troubleOpen = e => {
// this.view.dialogFormVisible=true;
this.view.hiddenDanger=e.target.data
this.markerType = e.target.markerType;
e.target.content = this.getMarketContent(e.target.data);
e.target.infoWindow.setContent(e.target.content);
......@@ -475,6 +482,37 @@ class gaodeMap {
// 鼠标移入设备时候实行的函数
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().deviceType == 4) {
this.markerType = "7";
......@@ -502,7 +540,9 @@ class gaodeMap {
console.log("this.markerType");
e.target.content = this.getMarketContent(
e.target.getExtData(),
markerInfoWindow
markerInfoWindow,
equipment,
this.dialogTableVisible = true
);
}
......@@ -584,6 +624,7 @@ class gaodeMap {
data: data,
map: map
});
// this.view.hiddenDanger=data
const html = dom.$el;
dom.remove();
return html;
......@@ -610,10 +651,11 @@ class gaodeMap {
return html;
}
case DEVICE_TYPE.TROUBLE: {
console.log("DEVICE_TYPE.VIDEODEVICE_TYPE.VIDEO", DEVICE_TYPE.VIDEO);
const dom = createPop(troubleInfoWindowWarn, {
title: "隐患",
data: data,
map: map
map: map,
});
const html = dom.$el;
dom.remove();
......@@ -964,7 +1006,11 @@ class gaodeMap {
}
}
// 鼠标移入线条执行
//管道弹出
polylineMouseOver = e => {
// this.view.theConduit=true;
// console.log(e.target+"数据")
// this.view.pipelineInformation=e.target.getExtData().lineData;
let polyline = e.target;
if (this.lineType == 1) return;
// 生成infoWindow
......
......@@ -50,7 +50,7 @@ export default {
tooltip: {
trigger: 'axis',
axisPointer: { // 坐标轴指示器,坐标轴触发有效
type: 'shadow' // 默认为直线,可选为:'line' | 'shadow'
type: 'line' // 默认为直线,可选为:'line' | 'shadow'
}
},
grid: {
......
......@@ -6,9 +6,29 @@
import echarts from 'echarts'
require('echarts/theme/macarons') // echarts theme
import resize from './mixins/resize'
import { sevenDayAlarm } from "@/api/dashboard/panelGroup";
export default {
data() {
return {
time:'',
chart: null,
timeList:[],
timeQuantity:[],
}
},
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: {
className: {
type: String,
......@@ -31,11 +51,6 @@ export default {
required: true
}
},
data() {
return {
chart: null
}
},
watch: {
chartData: {
deep: true,
......@@ -48,6 +63,7 @@ export default {
this.$nextTick(() => {
this.initChart()
})
this.setOptions(this.chartData)
},
beforeDestroy() {
if (!this.chart) {
......@@ -56,15 +72,18 @@ export default {
this.chart.dispose()
this.chart = null
},
methods: {
initChart() {
this.chart = echarts.init(this.$el, 'macarons')
this.setOptions(this.chartData)
},
setOptions({ expectedData, actualData } = {}) {
this.chart.setOption({
xAxis: {
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
data:this.timeList,
boundaryGap: false,
axisTick: {
show: false
......@@ -104,30 +123,31 @@ export default {
},
smooth: true,
type: 'line',
data: expectedData,
data: this.timeQuantity,
animationDuration: 2800,
animationEasing: 'cubicInOut'
},
{
name: 'actual',
smooth: true,
type: 'line',
itemStyle: {
normal: {
color: '#3888fa',
lineStyle: {
color: '#3888fa',
width: 2
},
areaStyle: {
color: '#f3f8ff'
}
}
},
data: actualData,
animationDuration: 2800,
animationEasing: 'quadraticOut'
}]
// {
// name: 'actual',
// smooth: true,
// type: 'line',
// itemStyle: {
// normal: {
// color: '#3888fa',
// lineStyle: {
// color: '#3888fa',
// width: 2
// },
// areaStyle: {
// color: '#f3f8ff'
// }
// }
// },
// data: actualData,
// animationDuration: 2800,
// animationEasing: 'quadraticOut'
// }
]
})
}
}
......
<template>
<el-row :gutter="15" class="chart-wrapper">
<span>设备实时数据</span>
<el-row :gutter="40" class="panel-group">
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel" @click="handleSetLineChartData('newVisitis')">
<div class="card-panel-icon-wrapper icon-people">
<svg-icon icon-class="peoples" class-name="card-panel-icon" />
<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-warning"></el-icon>
</div>
<div class="card-panel-description">
<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="102400" :duration="2600" class="card-panel-num" />
<count-to :start-val="0" :end-val="alarm" :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" @click="handleSetLineChartData('messages')">
<div class="card-panel-icon-wrapper icon-message">
<svg-icon icon-class="message" class-name="card-panel-icon" />
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
<div class="card-panel">
<div style="font-size: 59px; color: #00ff43; position: relative; left: 32px; top: 16px;">
<el-icon class="el-icon-success"></el-icon>
</div>
<div class="card-panel-description">
<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="81212" :duration="3000" class="card-panel-num" />
<count-to :start-val="0" :end-val="equipmentNormal" :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" @click="handleSetLineChartData('purchases')">
<div class="card-panel-icon-wrapper icon-money">
<svg-icon icon-class="money" class-name="card-panel-icon" />
<div class="card-panel">
<div style="font-size: 59px; color:rgb(0 208 255); position: relative; left: 32px; top: 16px;">
<el-icon class="el-icon-s-management"></el-icon>
</div>
<div class="card-panel-description">
<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="9280" :duration="3200" class="card-panel-num" />
<count-to :start-val="0" :end-val="historicalData" :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" @click="handleSetLineChartData('shoppings')">
<div class="card-panel-icon-wrapper icon-shopping">
<svg-icon icon-class="shopping" class-name="card-panel-icon" />
<div class="card-panel" >
<div style="font-size: 59px; color:rgb(255 153 0); position: relative; left: 32px; top: 16px;">
<el-icon class=" el-icon-s-release"></el-icon>
</div>
<div class="card-panel-description">
<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="13600" :duration="3600" class="card-panel-num" />
<count-to :start-val="0" :end-val="historicalAlarm" :duration="3600" class="card-panel-num" />
</div>
</div>
</el-col>
</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>
<script>
import CountTo from 'vue-count-to'
import { EquipmentAlarmSize,equipmentNormalSize,historicalDataSize,historicalAlarmSize,workOrderNotReceived,workOrderReceived,workOrderFeedback,WorkOrderArchived } from "@/api/dashboard/panelGroup";
export default {
components: {
CountTo
},
data() {
return {
alarm:'0',
equipmentNormal:'0',
historicalData:'0',
historicalAlarm:'0',
workOrderNotReceived:'0',
workOrderReceived:'0',
workOrderFeedback:'0',
WorkOrderArchived:'0',
};
},
created() {
this.getList();
},
methods: {
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>
......
......@@ -328,7 +328,9 @@
loadmap: false,
dialogTableVisible: false,
// 设备类型字典
typeOptions: [],
typeOptions: [
],
// 查询参数
queryParams: {
pageNum: 1,
......@@ -396,7 +398,11 @@
created() {
this.getList();
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: {
......
......@@ -53,7 +53,8 @@
<font>{{form.pipeName}}</font>
</el-form-item>
<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 label="联系人:" prop="linkman">
<font>{{form.linkman}}</font>
......@@ -62,8 +63,15 @@
<font>{{form.phone}}</font>
</el-form-item>
<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-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-col>
<el-col :span="6">
......@@ -81,7 +89,8 @@
<font>{{form.installationTime}}</font>
</el-form-item>
<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 label="设备图片:" prop="iconUrl">
<div style="width: 20%;">
......
......@@ -38,7 +38,8 @@
<font>{{form.pipeName}}</font>
</el-form-item>
<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 label="管道类型:" prop="pipeType">
<font v-if="form.pipeType == 1">地埋管线</font>
......@@ -51,23 +52,28 @@
<font v-if="form.pipePressure == 4">高压</font>
</el-form-item>
<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 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>
</el-col>
<el-col :span="6">
<el-form ref="form" v-model="form" label-width="100px" style="width: 100%;">
<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 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 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 label="管道图片:" prop="iconUrl">
<div style="width: 20%;">
......@@ -342,7 +348,7 @@
}else{
tip = '请确认是否删除管道名称为"' + res.pipeName + '"的数据项'
}
this.$confirm(tip, {
confirmButtonText: "确定",
cancelButtonText: "取消",
......
......@@ -30,28 +30,28 @@
:height="tableHeight"
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 prop="deviceName" label="设备名称" width="150">
<el-table-column prop="deviceName" label="名称" width="150">
</el-table-column>
<el-table-column prop="alarmType" label="报警类型" width="">
</el-table-column>
<el-table-column prop="createTime" label="报警开始时间" width="">
</el-table-column>
<el-table-column label="处理状态" align="center" prop="dealStatus">
<template slot-scope="scope">
<span v-if="scope.row.orderId == null || scope.row.orderId == ''"
>未生成工单</span
>
<span v-else-if="!scope.row.dealStatus && scope.row.orderId"
>暂未处理</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 == 3">未处理完成</span>
<span v-else> - </span>
</template>
</el-table-column>
<!-- <el-table-column label="处理状态" align="center" prop="dealStatus">-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="scope.row.orderId == null || scope.row.orderId == ''"-->
<!-- >未生成工单</span-->
<!-- >-->
<!-- <span v-else-if="!scope.row.dealStatus && scope.row.orderId"-->
<!-- >暂未处理</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 == 3">未处理完成</span>-->
<!-- <span v-else> - </span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column prop="alarmValue" label="报警内容" width="100">
</el-table-column>
</el-table>
......@@ -231,14 +231,14 @@ export default {
// background-color: #fff;
display: flex;
justify-content: space-between;
background-color: #03315cd9;
& > div {
}
.left {
width: 716px;
height: 198px;
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;
// color: #fff;
font-size: 14px;
......@@ -262,6 +262,7 @@ export default {
left:50%;
margin-left:-92px;
top:-5px;
color: #fffaf1;
}
.repeat {
position: absolute;
......@@ -272,7 +273,7 @@ export default {
&:hover {
color: #2788ea;
}
}
.repeat2 {
position: absolute;
......@@ -357,4 +358,4 @@ export default {
opacity: 0;
}
}
</style>
\ No newline at end of file
</style>
......@@ -102,7 +102,7 @@ export default {
if (value) {
this.getInspectorList()
console.log("this.form",this.form);
// console.log(this.alarmId);
// this.handleIssue(this.alarmId);
}
......@@ -153,4 +153,4 @@ export default {
</script>
<style>
</style>
\ No newline at end of file
</style>
......@@ -12,6 +12,7 @@
<i
class="iconfont"
:class="[iconClass(item), { iconFontSize: item.type == 4 }]"
:style="{color:index==2?'#EAC448':''}"
></i>
</div>
<div class="text">
......@@ -66,7 +67,7 @@ export default {
<style lang="scss" scoped>
.wrapper {
width: 270px;
width: 202px;
height: 857px;
position: fixed;
top: 80px;
......@@ -95,10 +96,10 @@ export default {
& > .right-content {
// background-color: #fff;
width: 247px;
height: 104px;
height: 28px;
margin-bottom: 29px;
box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.16);
background-image: url(../../../../assets/images/listBg.png);
/*box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.16);*/
/*background-image: url(../../../../assets/images/listBg.png);*/
margin-right: 10px;
display: flex;
&:last-child{
......@@ -109,13 +110,13 @@ export default {
}
// align-items: center;
.text-icon {
line-height: 102px;
padding-left: 28px;
margin-right: 22px;
margin-left: 30px;
line-height: 101px;
padding-left: 33px;
margin-right: 12px;
margin-left: 41px;
i {
color: #7bf8f4;
font-size: 60px;
font-size: 41px;
}
}
.text {
......@@ -135,7 +136,7 @@ export default {
}
// 单独调整下最后一个icon的大小
.iconFontSize {
font-size: 50px !important;
font-size: 35px !important;
}
.fade-enter-to,
.fade-leave {
......@@ -151,4 +152,4 @@ export default {
opacity: 0;
}
}
</style>
\ No newline at end of file
</style>
......@@ -25,7 +25,7 @@
</el-col>
</el-row>
</div>
</template>
......@@ -35,7 +35,7 @@ import LineChart from './dashboard/LineChart'
import RaddarChart from './dashboard/RaddarChart'
import PieChart from './dashboard/PieChart'
import BarChart from './dashboard/BarChart'
import { sevenDayAlarm } from "@/api/dashboard/panelGroup";
const lineChartData = {
newVisitis: {
expectedData: [100, 120, 161, 134, 105, 160, 165],
......@@ -66,13 +66,26 @@ export default {
},
data() {
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: {
handleSetLineChartData(type) {
this.lineChartData = lineChartData[type]
}
this.newVisitis = lineChartData[type]
},
}
}
</script>
......
......@@ -48,7 +48,7 @@
</el-form>
<!-- 底部 -->
<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>
</template>
......
......@@ -7,25 +7,25 @@
<line-chart :chart-data="lineChartData" />
</el-row>
<el-row :gutter="32">
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">
<raddar-chart />
</div>
</el-col>
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">
<pie-chart />
</div>
</el-col>
<el-col :xs="24" :sm="24" :lg="8">
<div class="chart-wrapper">
<bar-chart />
</div>
</el-col>
</el-row>
<!-- <el-row :gutter="32">-->
<!-- <el-col :xs="24" :sm="24" :lg="8">-->
<!-- <div class="chart-wrapper">-->
<!-- <raddar-chart />-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :xs="24" :sm="24" :lg="8">-->
<!-- <div class="chart-wrapper">-->
<!-- <pie-chart />-->
<!-- </div>-->
<!-- </el-col>-->
<!-- <el-col :xs="24" :sm="24" :lg="8">-->
<!-- <div class="chart-wrapper">-->
<!-- <bar-chart />-->
<!-- </div>-->
<!-- </el-col>-->
<!-- </el-row>-->
</div>
</template>
......@@ -39,7 +39,7 @@ import BarChart from '../../dashboard/BarChart'
const lineChartData = {
newVisitis: {
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: {
expectedData: [200, 192, 120, 144, 160, 130, 140],
......@@ -66,7 +66,7 @@ export default {
},
data() {
return {
lineChartData: lineChartData.newVisitis
lineChartData: lineChartData.newVisitis,
}
},
methods: {
......
......@@ -33,8 +33,10 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
// target: `http://36.148.23.59:8901/gassafety`,
target: process.env.VUE_APP_TARGET,
// target: `http://36.148.23.59:8901/gassafety`,
//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,
pathRewrite: {
["^" + process.env.VUE_APP_BASE_API]: ""
......
......@@ -1863,7 +1863,7 @@
"@babel/helper-define-polyfill-provider" "^0.2.2"
"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"
"version" "6.26.0"
dependencies:
......@@ -3509,10 +3509,10 @@
"resolved" "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.768.tgz"
"version" "1.3.768"
"element-ui@2.15.0":
"integrity" "sha512-9z/1+b7V8fvp08OnKUEW4/BZ72kT+IhuKR9cTMz3XoCTKmEsqLLb32XjbO/DznSFaaiFbOYU93G7WtkvrCAL9A=="
"resolved" "https://registry.npmjs.org/element-ui/-/element-ui-2.15.0.tgz"
"version" "2.15.0"
"element-ui@^2.15.9":
"integrity" "sha512-dx45nQLt4Hn87/Z9eRr3ex6KFZbxlFAwEU3QoW3wA5EsYftvHTyL9Pq7VnXXD7hu1Eiaup2jcs6kp+/VSFmXuA=="
"resolved" "https://registry.npmjs.org/element-ui/-/element-ui-2.15.9.tgz"
"version" "2.15.9"
dependencies:
"async-validator" "~1.8.1"
"babel-helper-vue-jsx-merge-props" "^2.0.0"
......@@ -6274,7 +6274,7 @@
"sort-keys" "^1.0.0"
"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"
"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