迁移大屏vue文件到ipc文件夹下,移除无关代码文件
@ -1,30 +0,0 @@
|
||||
package com.inspur.web.controller.industrial;
|
||||
|
||||
import com.inspur.common.core.controller.BaseController;
|
||||
import com.inspur.common.core.domain.AjaxResult;
|
||||
import com.inspur.industrial.service.IDataLogService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 测试界面
|
||||
*
|
||||
* @author inspur
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/dataLog")
|
||||
public class DataLogController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDataLogService iDataLogService;
|
||||
|
||||
/**
|
||||
* 获取测试界面数据
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public AjaxResult list()
|
||||
{
|
||||
return AjaxResult.success(iDataLogService.queryDataLog());
|
||||
}
|
||||
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
package com.inspur.web.controller.industrial;
|
||||
|
||||
import com.inspur.common.core.controller.BaseController;
|
||||
import com.inspur.common.core.domain.AjaxResult;
|
||||
import com.inspur.common.core.domain.entity.MalConfig;
|
||||
import com.inspur.industrial.service.IMalConfigService;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 故障树
|
||||
*
|
||||
* @author inspur
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mal")
|
||||
public class MalConfigController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IMalConfigService iMalConfigService;
|
||||
|
||||
/**
|
||||
* 获取故障树列表
|
||||
*/
|
||||
@GetMapping("/tree")
|
||||
public AjaxResult list(MalConfig malConfig)
|
||||
{
|
||||
return AjaxResult.success(iMalConfigService.queryMalConfigList(malConfig));
|
||||
}
|
||||
}
|
@ -1,111 +0,0 @@
|
||||
package com.inspur.web.controller.industrial;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.inspur.common.annotation.Log;
|
||||
import com.inspur.common.core.controller.BaseController;
|
||||
import com.inspur.common.core.domain.AjaxResult;
|
||||
import com.inspur.common.enums.BusinessType;
|
||||
import com.inspur.industrial.domain.PhmEquParaConfig;
|
||||
import com.inspur.industrial.service.IPhmEquParaConfigService;
|
||||
import com.inspur.common.utils.poi.ExcelUtil;
|
||||
import com.inspur.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 参数值配置表Controller
|
||||
*
|
||||
* @author zhaofie
|
||||
* @date 2023-08-17
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/paraConfig")
|
||||
public class PhmEquParaConfigController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IPhmEquParaConfigService phmEquParaConfigService;
|
||||
|
||||
/**
|
||||
* 查询参数值配置表列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('paraConfig:paraConfig:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(PhmEquParaConfig phmEquParaConfig)
|
||||
{
|
||||
startPage();
|
||||
List<PhmEquParaConfig> list = phmEquParaConfigService.selectPhmEquParaConfigList(phmEquParaConfig);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/listAll")
|
||||
public AjaxResult listAll(PhmEquParaConfig phmEquParaConfig)
|
||||
{
|
||||
return AjaxResult.success(phmEquParaConfigService.selectPhmEquParaConfigList(phmEquParaConfig));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出参数值配置表列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('paraConfig:paraConfig:export')")
|
||||
@Log(title = "参数值配置表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, PhmEquParaConfig phmEquParaConfig)
|
||||
{
|
||||
List<PhmEquParaConfig> list = phmEquParaConfigService.selectPhmEquParaConfigList(phmEquParaConfig);
|
||||
ExcelUtil<PhmEquParaConfig> util = new ExcelUtil<PhmEquParaConfig>(PhmEquParaConfig.class);
|
||||
util.exportExcel(response, list, "参数值配置表数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取参数值配置表详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('paraConfig:paraConfig:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(phmEquParaConfigService.selectPhmEquParaConfigById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增参数值配置表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('paraConfig:paraConfig:add')")
|
||||
@Log(title = "参数值配置表", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody PhmEquParaConfig phmEquParaConfig)
|
||||
{
|
||||
return toAjax(phmEquParaConfigService.insertPhmEquParaConfig(phmEquParaConfig));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改参数值配置表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('paraConfig:paraConfig:edit')")
|
||||
@Log(title = "参数值配置表", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody PhmEquParaConfig phmEquParaConfig)
|
||||
{
|
||||
return toAjax(phmEquParaConfigService.updatePhmEquParaConfig(phmEquParaConfig));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除参数值配置表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('paraConfig:paraConfig:remove')")
|
||||
@Log(title = "参数值配置表", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(phmEquParaConfigService.deletePhmEquParaConfigByIds(ids));
|
||||
}
|
||||
}
|
@ -1,111 +0,0 @@
|
||||
package com.inspur.web.controller.industrial;
|
||||
|
||||
import com.inspur.common.core.controller.BaseController;
|
||||
import com.inspur.common.core.domain.AjaxResult;
|
||||
import com.inspur.industrial.service.IPhmEquAlarmRecordService;
|
||||
import com.inspur.industrial.service.ITestScreenService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* 测试界面
|
||||
*
|
||||
* @author inspur
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/test/screen")
|
||||
public class TestScreenController extends BaseController {
|
||||
@Autowired
|
||||
private ITestScreenService iTestScreenService;
|
||||
|
||||
@Autowired
|
||||
private IPhmEquAlarmRecordService iPhmEquAlarmRecordService;
|
||||
|
||||
/**
|
||||
* 获取ipc运行监控界面数据
|
||||
*/
|
||||
@GetMapping("/data")
|
||||
public AjaxResult list() {
|
||||
return AjaxResult.success(iTestScreenService.queryScreenData());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取tzipc超压底缸运行监控界面数据
|
||||
*/
|
||||
@GetMapping("/cydgdata")
|
||||
public AjaxResult cydgdata() {
|
||||
return AjaxResult.success(iTestScreenService.querycydgdata());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取tzipc中高顶辊运行监控界面数据
|
||||
*/
|
||||
@GetMapping("/zgdgTopdata")
|
||||
public AjaxResult zgdgTopdata() {
|
||||
return AjaxResult.success(iTestScreenService.zgdgTopdata());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取tzipc中高底辊运行监控界面数据
|
||||
*/
|
||||
@GetMapping("/zgdgBottomdata")
|
||||
public AjaxResult zgdgBottomdata() {
|
||||
return AjaxResult.success(iTestScreenService.zgdgBottomdata());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取ipc运行监控界面数据
|
||||
*/
|
||||
@GetMapping("/zgdkdata")
|
||||
public AjaxResult zgdkdata() {
|
||||
return AjaxResult.success(iTestScreenService.queryzgdkdata());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取tzipc中高顶辊实时数据
|
||||
*/
|
||||
@GetMapping("/zgdgTopdataRealTime")
|
||||
public AjaxResult zgdgTopdataRealTime() {
|
||||
return AjaxResult.success(iTestScreenService.zgdgTopdataRealTime());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取tzipc中高底辊实时数据
|
||||
*/
|
||||
@GetMapping("/zgdgBottodataRealTime")
|
||||
public AjaxResult zgdgBottodataRealTime() {
|
||||
return AjaxResult.success(iTestScreenService.zgdgBottomdataRealTime());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取tzipc超压底缸实时数据
|
||||
*/
|
||||
@GetMapping("/cydgdataRealTime")
|
||||
public AjaxResult cydgdataRealTime() {
|
||||
return AjaxResult.success(iTestScreenService.querycydgdataRealTime());
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取tzipc超压底缸历史报警数据
|
||||
*/
|
||||
@GetMapping("/cydgdataHistory")
|
||||
public AjaxResult cydgdataHistory() {
|
||||
return AjaxResult.success(iPhmEquAlarmRecordService.selectPhmEquAlarmRecordList(null));
|
||||
}
|
||||
/**
|
||||
* 获取tzipc中高顶辊历史报警数据
|
||||
*/
|
||||
@GetMapping("/zgdgTopdataHistory")
|
||||
public AjaxResult zgdgTopdataHistory() {
|
||||
return AjaxResult.success(iPhmEquAlarmRecordService.selectPhmEquAlarmRecordList1(null));
|
||||
}
|
||||
/**
|
||||
* 获取tzipc中高底辊历史报警数据
|
||||
*/
|
||||
@GetMapping("/zgdgBottomdataHistory")
|
||||
public AjaxResult zgdgBottomdataHistory() {
|
||||
return AjaxResult.success(iPhmEquAlarmRecordService.selectPhmEquAlarmRecordList2(null));
|
||||
}
|
||||
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
package com.inspur.datasyn.modbus.timer;
|
||||
|
||||
import com.inspur.common.core.redis.RedisCache;
|
||||
import com.inspur.datasyn.modbus.Modbus4jUtils;
|
||||
import com.inspur.datasyn.mqtt.BeanUtils;
|
||||
import com.inspur.industrial.domain.PhmEquParaConfig;
|
||||
import com.inspur.industrial.mapper.PhmEquParaConfigMapper;
|
||||
import com.inspur.system.service.influx.InfluxDBService;
|
||||
import com.serotonin.modbus4j.code.DataType;
|
||||
import com.serotonin.modbus4j.exception.ErrorResponseException;
|
||||
import com.serotonin.modbus4j.exception.ModbusInitException;
|
||||
import com.serotonin.modbus4j.exception.ModbusTransportException;
|
||||
import org.influxdb.dto.QueryResult;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class IPCDataTimerThread implements Runnable {
|
||||
private static final Logger logger = LoggerFactory.getLogger(IPCDataTimerThread.class);
|
||||
|
||||
|
||||
private Modbus4jUtils modbus4jUtils;
|
||||
private RedisCache redisCache;
|
||||
|
||||
public IPCDataTimerThread(Modbus4jUtils modbus4jUtils,RedisCache redisCache){
|
||||
this.modbus4jUtils = modbus4jUtils;
|
||||
this.redisCache = redisCache;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
PhmEquParaConfigMapper phmEquParaConfigMapper = BeanUtils.getBean(PhmEquParaConfigMapper.class);
|
||||
InfluxDBService influxDBService = BeanUtils.getBean(InfluxDBService.class);
|
||||
// Modbus4jUtils modbus4jUtils = BeanUtils.getBean(Modbus4jUtils.class);
|
||||
|
||||
List<PhmEquParaConfig> phmEquParaConfigs = phmEquParaConfigMapper.selectPhmEquParaConfigList(new PhmEquParaConfig());
|
||||
QueryResult query = influxDBService.query("select * from phm_monitor_data_list order by time desc limit 1");
|
||||
List<Map<String, Object>> maps = influxDBService.queryResultProcess(query);
|
||||
Integer comResult = 1;
|
||||
if (maps.size() > 0) {
|
||||
for (Map<String, Object> object : maps) {
|
||||
for (int i = 0; i < phmEquParaConfigs.size(); i ++) {
|
||||
PhmEquParaConfig config = phmEquParaConfigs.get(i);
|
||||
//获取实际值
|
||||
Double value = Double.parseDouble((object.get(config.getNameKey()) == null || object.get(config.getNameKey()) == "" ? 0.0 : object.get(config.getNameKey())).toString());
|
||||
//根据比较条件比较实际值和参考值
|
||||
if (config.getReferenceCon().equals("小于")) {
|
||||
if (!(value.compareTo(new Double(config.getReference())) < 0)) {
|
||||
comResult = 2;
|
||||
break;
|
||||
}
|
||||
} else if (config.getReferenceCon().equals("大于")) {
|
||||
if (!(value.compareTo(new Double(config.getReference())) > 0)) {
|
||||
comResult = 2;
|
||||
break;
|
||||
}
|
||||
} else if (config.getReferenceCon().equals("等于")) {
|
||||
if (!(value.compareTo(new Double(config.getReference())) == 0)) {
|
||||
comResult = 2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
if(comResult.equals(redisCache.getCacheObject("lightStatus"))){
|
||||
modbus4jUtils.writeHoldingRegister(1, 100, comResult, DataType.FOUR_BYTE_INT_UNSIGNED_SWAPPED);
|
||||
logger.info("三色等状态控制,三色灯在状态修改为:"+comResult);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,91 +0,0 @@
|
||||
package com.inspur.industrial.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
|
||||
/**
|
||||
* 设备参数表 phm_equ_config
|
||||
*
|
||||
* @author zhaofei
|
||||
*/
|
||||
public class EquConfig
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 设备主键 */
|
||||
private Long equId;
|
||||
|
||||
/** 设备名称 */
|
||||
private String equName;
|
||||
|
||||
/** 设备型号 */
|
||||
private String equMode;
|
||||
|
||||
/** 设备状态 */
|
||||
private String equStatus;
|
||||
|
||||
/** 设备安装位置 */
|
||||
private String equPlace;
|
||||
|
||||
/** 维修记录 */
|
||||
private String equDate;
|
||||
|
||||
public Long getEquId() {
|
||||
return equId;
|
||||
}
|
||||
|
||||
public void setEquId(Long equId) {
|
||||
this.equId = equId;
|
||||
}
|
||||
|
||||
public String getEquName() {
|
||||
return equName;
|
||||
}
|
||||
|
||||
public void setEquName(String equName) {
|
||||
this.equName = equName;
|
||||
}
|
||||
|
||||
public String getEquMode() {
|
||||
return equMode;
|
||||
}
|
||||
|
||||
public void setEquMode(String equMode) {
|
||||
this.equMode = equMode;
|
||||
}
|
||||
|
||||
public String getEquStatus() {
|
||||
return equStatus;
|
||||
}
|
||||
|
||||
public void setEquStatus(String equStatus) {
|
||||
this.equStatus = equStatus;
|
||||
}
|
||||
|
||||
public String getEquPlace() {
|
||||
return equPlace;
|
||||
}
|
||||
|
||||
public void setEquPlace(String equPlace) {
|
||||
this.equPlace = equPlace;
|
||||
}
|
||||
|
||||
public String getEquDate() {
|
||||
return equDate;
|
||||
}
|
||||
|
||||
public void setEquDate(String equDate) {
|
||||
this.equDate = equDate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this)
|
||||
.append("equId", equId)
|
||||
.append("equName", equName)
|
||||
.append("equMode", equMode)
|
||||
.append("equStatus", equStatus)
|
||||
.append("equPlace", equPlace)
|
||||
.append("equDate", equDate)
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -1,159 +0,0 @@
|
||||
package com.inspur.industrial.domain;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.inspur.common.annotation.Excel;
|
||||
import com.inspur.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 报警记录
|
||||
*
|
||||
* @author zhanghan
|
||||
* @date 2023-10-12
|
||||
*/
|
||||
public class PhmEquAlarmRecord extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 业务id
|
||||
*/
|
||||
@Excel(name = "业务id")
|
||||
private Long businessId;
|
||||
|
||||
/**
|
||||
* 报警项key
|
||||
*/
|
||||
@Excel(name = "报警项key")
|
||||
private String alarmNameKey;
|
||||
|
||||
/**
|
||||
* 报警项
|
||||
*/
|
||||
@Excel(name = "报警项")
|
||||
private String alarmName;
|
||||
|
||||
/**
|
||||
* 报警数据
|
||||
*/
|
||||
@Excel(name = "报警数据")
|
||||
private String alarmData;
|
||||
|
||||
/**
|
||||
* 报警内容
|
||||
*/
|
||||
@Excel(name = "报警内容")
|
||||
private String alarmDetail;
|
||||
|
||||
/**
|
||||
* 报警时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "报警时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date alarmTime;
|
||||
|
||||
private String type;
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setBusinessId(Long businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public Long getBusinessId() {
|
||||
return businessId;
|
||||
}
|
||||
|
||||
public void setAlarmNameKey(String alarmNameKey) {
|
||||
this.alarmNameKey = alarmNameKey;
|
||||
}
|
||||
|
||||
public String getAlarmNameKey() {
|
||||
return alarmNameKey;
|
||||
}
|
||||
|
||||
public void setAlarmName(String alarmName) {
|
||||
this.alarmName = alarmName;
|
||||
}
|
||||
|
||||
public String getAlarmName() {
|
||||
return alarmName;
|
||||
}
|
||||
|
||||
public void setAlarmData(String alarmData) {
|
||||
this.alarmData = alarmData;
|
||||
}
|
||||
|
||||
public String getAlarmData() {
|
||||
return alarmData;
|
||||
}
|
||||
|
||||
public void setAlarmDetail(String alarmDetail) {
|
||||
this.alarmDetail = alarmDetail;
|
||||
}
|
||||
|
||||
public String getAlarmDetail() {
|
||||
return alarmDetail;
|
||||
}
|
||||
|
||||
public void setAlarmTime(Date alarmTime) {
|
||||
this.alarmTime = alarmTime;
|
||||
}
|
||||
|
||||
public Date getAlarmTime() {
|
||||
return alarmTime;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("businessId", getBusinessId())
|
||||
.append("alarmNameKey", getAlarmNameKey())
|
||||
.append("alarmName", getAlarmName())
|
||||
.append("alarmData", getAlarmData())
|
||||
.append("alarmDetail", getAlarmDetail())
|
||||
.append("alarmTime", getAlarmTime())
|
||||
.toString();
|
||||
}
|
||||
|
||||
public PhmEquAlarmRecord() {
|
||||
}
|
||||
|
||||
public PhmEquAlarmRecord(Long businessId, String alarmNameKey, String alarmName, String alarmData, String alarmDetail, Date alarmTime, String type) {
|
||||
this.businessId = businessId;
|
||||
this.alarmNameKey = alarmNameKey;
|
||||
this.alarmName = alarmName;
|
||||
this.alarmData = alarmData;
|
||||
this.alarmDetail = alarmDetail;
|
||||
this.alarmTime = alarmTime;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public PhmEquAlarmRecord(Long businessId, String alarmData, Date alarmTime) {
|
||||
this.businessId = businessId;
|
||||
this.alarmData = alarmData;
|
||||
this.alarmTime = alarmTime;
|
||||
}
|
||||
}
|
@ -1,183 +0,0 @@
|
||||
package com.inspur.industrial.domain;
|
||||
|
||||
import com.inspur.common.annotation.Excel;
|
||||
import com.inspur.common.core.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 参数值配置表对象 phm_equ_para_config
|
||||
*
|
||||
* @author zhaofie
|
||||
* @date 2023-08-17
|
||||
*/
|
||||
public class PhmEquParaConfig extends BaseEntity implements Cloneable
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** id */
|
||||
private Long id;
|
||||
|
||||
/** 名称对应key */
|
||||
private String nameKey;
|
||||
|
||||
/** 名称 */
|
||||
private String name;
|
||||
|
||||
/** 单位 */
|
||||
private String unit;
|
||||
|
||||
/** 参考值 */
|
||||
private String reference;
|
||||
|
||||
/** 参考值显示 */
|
||||
private String referenceName;
|
||||
|
||||
/** 参考值比较标准 */
|
||||
private String referenceCon;
|
||||
|
||||
/** 故障显示 */
|
||||
private String alarmDetail;
|
||||
|
||||
/** 类型 */
|
||||
private String type;
|
||||
|
||||
/** alarmId */
|
||||
private Long alarmId;
|
||||
/**
|
||||
* 实际值
|
||||
*/
|
||||
private Double realityValue;
|
||||
/**
|
||||
* 数据状态
|
||||
*/
|
||||
private Boolean comResult;
|
||||
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setNameKey(String nameKey)
|
||||
{
|
||||
this.nameKey = nameKey;
|
||||
}
|
||||
|
||||
public String getNameKey()
|
||||
{
|
||||
return nameKey;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setUnit(String unit)
|
||||
{
|
||||
this.unit = unit;
|
||||
}
|
||||
|
||||
public String getUnit()
|
||||
{
|
||||
return unit;
|
||||
}
|
||||
public void setReference(String reference)
|
||||
{
|
||||
this.reference = reference;
|
||||
}
|
||||
|
||||
public String getReference()
|
||||
{
|
||||
return reference;
|
||||
}
|
||||
public void setReferenceName(String referenceName)
|
||||
{
|
||||
this.referenceName = referenceName;
|
||||
}
|
||||
|
||||
public String getReferenceName()
|
||||
{
|
||||
return referenceName;
|
||||
}
|
||||
public void setReferenceCon(String referenceCon)
|
||||
{
|
||||
this.referenceCon = referenceCon;
|
||||
}
|
||||
|
||||
public String getReferenceCon()
|
||||
{
|
||||
return referenceCon;
|
||||
}
|
||||
|
||||
public Double getRealityValue() {
|
||||
return realityValue;
|
||||
}
|
||||
|
||||
public void setRealityValue(Double realityValue) {
|
||||
this.realityValue = realityValue;
|
||||
}
|
||||
|
||||
public Boolean getComResult() {
|
||||
return comResult;
|
||||
}
|
||||
|
||||
public void setComResult(Boolean comResult) {
|
||||
this.comResult = comResult;
|
||||
}
|
||||
|
||||
public String getAlarmDetail() {
|
||||
return alarmDetail;
|
||||
}
|
||||
|
||||
public void setAlarmDetail(String alarmDetail) {
|
||||
this.alarmDetail = alarmDetail;
|
||||
}
|
||||
|
||||
public Long getAlarmId() {
|
||||
return alarmId;
|
||||
}
|
||||
|
||||
public void setAlarmId(Long alarmId) {
|
||||
this.alarmId = alarmId;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("nameKey", getNameKey())
|
||||
.append("name", getName())
|
||||
.append("unit", getUnit())
|
||||
.append("reference", getReference())
|
||||
.append("referenceName", getReferenceName())
|
||||
.append("referenceCon", getReferenceCon())
|
||||
.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PhmEquParaConfig clone() {
|
||||
try {
|
||||
return (PhmEquParaConfig) super.clone();
|
||||
} catch (CloneNotSupportedException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
package com.inspur.industrial.mapper;
|
||||
|
||||
import com.inspur.industrial.domain.EquConfig;
|
||||
import com.inspur.system.domain.SysConfig;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 设备参数配置 数据层
|
||||
*
|
||||
* @author zhaofei
|
||||
*/
|
||||
public interface EquConfigMapper
|
||||
{
|
||||
/**
|
||||
* 查询设备参数配置信息
|
||||
*
|
||||
* @return 参数配置信息
|
||||
*/
|
||||
public EquConfig selectConfig();
|
||||
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
package com.inspur.industrial.mapper;
|
||||
|
||||
import com.inspur.common.core.domain.entity.MalConfig;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 故障树 数据层
|
||||
*
|
||||
* @author inspur
|
||||
*/
|
||||
public interface MalConfigMapper {
|
||||
|
||||
/**
|
||||
* 查询故障列表
|
||||
*
|
||||
* @param malConfig
|
||||
* @return 故障集合
|
||||
*/
|
||||
public List<MalConfig> queryMalConfigList(MalConfig malConfig);
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
package com.inspur.industrial.mapper;
|
||||
|
||||
import com.inspur.industrial.domain.PhmEquAlarmRecord;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface PhmEquAlarmRecordMapper {
|
||||
/**
|
||||
* 查询超压顶缸报警记录列表
|
||||
*/
|
||||
List<PhmEquAlarmRecord> selectPhmEquAlarmRecordList(PhmEquAlarmRecord phmEquAlarmRecord);
|
||||
|
||||
/**
|
||||
* 查询中高顶辊报警记录列表
|
||||
*/
|
||||
List<PhmEquAlarmRecord> selectPhmEquAlarmRecordList1(PhmEquAlarmRecord phmEquAlarmRecord);
|
||||
|
||||
/**
|
||||
* 查询中高底辊报警记录列表
|
||||
*/
|
||||
List<PhmEquAlarmRecord> selectPhmEquAlarmRecordList2(PhmEquAlarmRecord phmEquAlarmRecord);
|
||||
|
||||
/**
|
||||
* 批量新增超压顶缸报警记录
|
||||
*/
|
||||
int batchPhmEquAlarmRecord(List<PhmEquAlarmRecord> list);
|
||||
|
||||
/**
|
||||
* 批量新增中高顶辊报警记录
|
||||
*/
|
||||
int batchPhmEquAlarmRecord1(List<PhmEquAlarmRecord> list);
|
||||
|
||||
/**
|
||||
* 批量新增中高底辊报警记录
|
||||
*/
|
||||
int batchPhmEquAlarmRecord2(List<PhmEquAlarmRecord> list);
|
||||
|
||||
}
|
@ -1,79 +0,0 @@
|
||||
package com.inspur.industrial.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.inspur.industrial.domain.EquConfig;
|
||||
import com.inspur.industrial.domain.PhmEquParaConfig;
|
||||
|
||||
/**
|
||||
* 参数值配置表Mapper接口
|
||||
*
|
||||
* @author zhaofie
|
||||
* @date 2023-08-17
|
||||
*/
|
||||
public interface PhmEquParaConfigMapper
|
||||
{
|
||||
/**
|
||||
* 查询参数值配置表
|
||||
*
|
||||
* @param id 参数值配置表主键
|
||||
* @return 参数值配置表
|
||||
*/
|
||||
public PhmEquParaConfig selectPhmEquParaConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 查询超压底缸参数值配置表列表
|
||||
*
|
||||
* @param phmEquParaConfig 参数值配置表
|
||||
* @return 参数值配置表集合
|
||||
*/
|
||||
public List<PhmEquParaConfig> selectPhmEquParaConfigList(PhmEquParaConfig phmEquParaConfig);
|
||||
|
||||
/**
|
||||
* 查询中高顶辊参数值配置表列表
|
||||
*
|
||||
* @param phmEquParaConfig 参数值配置表
|
||||
* @return 参数值配置表集合
|
||||
*/
|
||||
public List<PhmEquParaConfig> selectPhmEquParaConfigList1(PhmEquParaConfig phmEquParaConfig);
|
||||
|
||||
/**
|
||||
* 查询中高底辊参数值配置表列表
|
||||
*
|
||||
* @param phmEquParaConfig 参数值配置表
|
||||
* @return 参数值配置表集合
|
||||
*/
|
||||
public List<PhmEquParaConfig> selectPhmEquParaConfigList2(PhmEquParaConfig phmEquParaConfig);
|
||||
|
||||
/**
|
||||
* 新增参数值配置表
|
||||
*
|
||||
* @param phmEquParaConfig 参数值配置表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPhmEquParaConfig(PhmEquParaConfig phmEquParaConfig);
|
||||
|
||||
/**
|
||||
* 修改参数值配置表
|
||||
*
|
||||
* @param phmEquParaConfig 参数值配置表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePhmEquParaConfig(PhmEquParaConfig phmEquParaConfig);
|
||||
|
||||
/**
|
||||
* 删除参数值配置表
|
||||
*
|
||||
* @param id 参数值配置表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePhmEquParaConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除参数值配置表
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePhmEquParaConfigByIds(Long[] ids);
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
package com.inspur.industrial.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 数据记录 服务层
|
||||
*
|
||||
* @author zhaofei
|
||||
*/
|
||||
public interface IDataLogService {
|
||||
/**
|
||||
* 数据记录接口
|
||||
*/
|
||||
public List<Map<String,Object>> queryDataLog();
|
||||
}
|
@ -1,38 +0,0 @@
|
||||
package com.inspur.industrial.service;
|
||||
|
||||
import com.inspur.common.core.domain.TreeSelect;
|
||||
import com.inspur.common.core.domain.entity.MalConfig;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 故障树 服务层
|
||||
*
|
||||
* @author inspur
|
||||
*/
|
||||
public interface IMalConfigService {
|
||||
|
||||
/**
|
||||
* 查询故障列表
|
||||
*
|
||||
* @param malConfig
|
||||
* @return 故障集合
|
||||
*/
|
||||
public List<TreeSelect> queryMalConfigList(MalConfig malConfig);
|
||||
|
||||
/**
|
||||
* 构建前端所需要树结构
|
||||
*
|
||||
* @param malConfigs
|
||||
* @return 树结构列表
|
||||
*/
|
||||
public List<MalConfig> buildMalConfig(List<MalConfig> malConfigs);
|
||||
|
||||
/**
|
||||
* 构建前端所需要下拉树结构
|
||||
*
|
||||
* @param malConfigs
|
||||
* @return 下拉树结构列表
|
||||
*/
|
||||
public List<TreeSelect> buildMalConfigSelect(List<MalConfig> malConfigs);
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
package com.inspur.industrial.service;
|
||||
|
||||
import com.inspur.industrial.domain.PhmEquAlarmRecord;
|
||||
import com.inspur.industrial.domain.PhmEquParaConfig;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 参数值配置表Service接口
|
||||
*
|
||||
* @author zhaofie
|
||||
* @date 2023-08-17
|
||||
*/
|
||||
public interface IPhmEquAlarmRecordService
|
||||
{
|
||||
/**
|
||||
* 查询超压顶缸报警记录列表
|
||||
*/
|
||||
List<PhmEquAlarmRecord> selectPhmEquAlarmRecordList(PhmEquAlarmRecord phmEquAlarmRecord);
|
||||
|
||||
/**
|
||||
* 查询中高顶辊报警记录列表
|
||||
*/
|
||||
List<PhmEquAlarmRecord> selectPhmEquAlarmRecordList1(PhmEquAlarmRecord phmEquAlarmRecord);
|
||||
|
||||
/**
|
||||
* 查询中高底辊报警记录列表
|
||||
*/
|
||||
List<PhmEquAlarmRecord> selectPhmEquAlarmRecordList2(PhmEquAlarmRecord phmEquAlarmRecord);
|
||||
|
||||
/**
|
||||
* 批量新增超压顶缸报警记录
|
||||
*/
|
||||
int batchPhmEquAlarmRecord(List<PhmEquAlarmRecord> list);
|
||||
|
||||
/**
|
||||
* 批量新增中高顶辊报警记录
|
||||
*/
|
||||
int batchPhmEquAlarmRecord1(List<PhmEquAlarmRecord> list);
|
||||
|
||||
/**
|
||||
* 批量新增中高底辊报警记录
|
||||
*/
|
||||
int batchPhmEquAlarmRecord2(List<PhmEquAlarmRecord> list);
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
package com.inspur.industrial.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.inspur.industrial.domain.PhmEquParaConfig;
|
||||
|
||||
/**
|
||||
* 参数值配置表Service接口
|
||||
*
|
||||
* @author zhaofie
|
||||
* @date 2023-08-17
|
||||
*/
|
||||
public interface IPhmEquParaConfigService
|
||||
{
|
||||
/**
|
||||
* 查询参数值配置表
|
||||
*
|
||||
* @param id 参数值配置表主键
|
||||
* @return 参数值配置表
|
||||
*/
|
||||
public PhmEquParaConfig selectPhmEquParaConfigById(Long id);
|
||||
|
||||
/**
|
||||
* 查询参数值配置表列表
|
||||
*
|
||||
* @param phmEquParaConfig 参数值配置表
|
||||
* @return 参数值配置表集合
|
||||
*/
|
||||
public List<PhmEquParaConfig> selectPhmEquParaConfigList(PhmEquParaConfig phmEquParaConfig);
|
||||
|
||||
/**
|
||||
* 新增参数值配置表
|
||||
*
|
||||
* @param phmEquParaConfig 参数值配置表
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertPhmEquParaConfig(PhmEquParaConfig phmEquParaConfig);
|
||||
|
||||
/**
|
||||
* 修改参数值配置表
|
||||
*
|
||||
* @param phmEquParaConfig 参数值配置表
|
||||
* @return 结果
|
||||
*/
|
||||
public int updatePhmEquParaConfig(PhmEquParaConfig phmEquParaConfig);
|
||||
|
||||
/**
|
||||
* 批量删除参数值配置表
|
||||
*
|
||||
* @param ids 需要删除的参数值配置表主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePhmEquParaConfigByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除参数值配置表信息
|
||||
*
|
||||
* @param id 参数值配置表主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deletePhmEquParaConfigById(Long id);
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
package com.inspur.industrial.service;
|
||||
|
||||
import com.inspur.industrial.domain.PhmEquParaConfig;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 参数配置 服务层
|
||||
*
|
||||
* @author zhaofei
|
||||
*/
|
||||
public interface ITestScreenService {
|
||||
/**
|
||||
* 大屏数据接口
|
||||
*/
|
||||
Map<String, Object> queryScreenData();
|
||||
|
||||
Map<String, Object> querycydgdata();
|
||||
|
||||
Map<String, Object> zgdgBottomdata();
|
||||
|
||||
Map<String, Object> zgdgTopdata();
|
||||
|
||||
Map<String, Object> queryzgdkdata();
|
||||
|
||||
/**
|
||||
* 实时数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<PhmEquParaConfig> querycydgdataRealTime();
|
||||
|
||||
List<PhmEquParaConfig> zgdgBottomdataRealTime();
|
||||
|
||||
List<PhmEquParaConfig> zgdgTopdataRealTime();
|
||||
}
|
@ -1,43 +0,0 @@
|
||||
package com.inspur.industrial.service.impl;
|
||||
|
||||
import com.inspur.industrial.service.IDataLogService;
|
||||
import com.inspur.system.service.influx.InfluxDBService;
|
||||
import org.influxdb.dto.QueryResult;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
@Service
|
||||
public class DataLogServicempl implements IDataLogService {
|
||||
|
||||
@Autowired
|
||||
private InfluxDBService influxDBService;
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> queryDataLog() {
|
||||
QueryResult query = influxDBService.query("select * from phm_monitor_data_list order by time desc limit 18");
|
||||
List<Map<String, Object>> maps = influxDBService.queryResultProcess(query);
|
||||
return maps;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
String s = "2015-07-17T20:32:58.662703915Z";
|
||||
System.out.println(s);
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
try {
|
||||
Date time = simpleDateFormat.parse(s);
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(time);
|
||||
int m = calendar.get(Calendar.MINUTE);
|
||||
int ss = calendar.get(Calendar.SECOND);
|
||||
System.out.println(m + ":" + ss);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,112 +0,0 @@
|
||||
package com.inspur.industrial.service.impl;
|
||||
|
||||
import com.inspur.common.core.domain.TreeSelect;
|
||||
import com.inspur.common.utils.StringUtils;
|
||||
import com.inspur.common.core.domain.entity.MalConfig;
|
||||
import com.inspur.industrial.mapper.MalConfigMapper;
|
||||
import com.inspur.industrial.service.IMalConfigService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 故障树 服务实现
|
||||
*
|
||||
* @author inspur
|
||||
*/
|
||||
@Service
|
||||
public class MalConfigServicempl implements IMalConfigService {
|
||||
|
||||
@Autowired
|
||||
private MalConfigMapper malConfigMapper;
|
||||
|
||||
/**
|
||||
* 查询故障列表
|
||||
*
|
||||
* @param malConfig
|
||||
* @return 故障集合
|
||||
*/
|
||||
@Override
|
||||
public List<TreeSelect> queryMalConfigList(MalConfig malConfig) {
|
||||
List<MalConfig> malTrees = malConfigMapper.queryMalConfigList(malConfig);
|
||||
return buildMalConfigSelect(malTrees);
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建前端所需要树结构
|
||||
*
|
||||
* @param malConfigs
|
||||
* @return 树结构列表
|
||||
*/
|
||||
@Override
|
||||
public List<MalConfig> buildMalConfig(List<MalConfig> malConfigs) {
|
||||
List<MalConfig> returnList = new ArrayList<MalConfig>();
|
||||
List<Long> tempList = new ArrayList<Long>();
|
||||
for (MalConfig malConfig : malConfigs) {
|
||||
tempList.add(malConfig.getId());
|
||||
}
|
||||
for (MalConfig malConfig : malConfigs) {
|
||||
// 如果是顶级节点, 遍历该父节点的所有子节点
|
||||
if (!tempList.contains(malConfig.getParentId())) {
|
||||
recursionFn(malConfigs, malConfig);
|
||||
returnList.add(malConfig);
|
||||
}
|
||||
}
|
||||
if (returnList.isEmpty()) {
|
||||
returnList = malConfigs;
|
||||
}
|
||||
return returnList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 构建前端所需要下拉树结构
|
||||
*
|
||||
* @param malConfigs
|
||||
* @return 下拉树结构列表
|
||||
*/
|
||||
@Override
|
||||
public List<TreeSelect> buildMalConfigSelect(List<MalConfig> malConfigs) {
|
||||
List<MalConfig> malConfig = buildMalConfig(malConfigs);
|
||||
return malConfig.stream().map(TreeSelect::new).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归列表
|
||||
*/
|
||||
private void recursionFn(List<MalConfig> list, MalConfig t) {
|
||||
// 得到子节点列表
|
||||
List<MalConfig> childList = getChildList(list, t);
|
||||
t.setChildren(childList);
|
||||
for (MalConfig tChild : childList) {
|
||||
if (hasChild(list, tChild)) {
|
||||
recursionFn(list, tChild);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 得到子节点列表
|
||||
*/
|
||||
private List<MalConfig> getChildList(List<MalConfig> list, MalConfig t) {
|
||||
List<MalConfig> tlist = new ArrayList<MalConfig>();
|
||||
Iterator<MalConfig> it = list.iterator();
|
||||
while (it.hasNext()) {
|
||||
MalConfig n = (MalConfig) it.next();
|
||||
if (StringUtils.isNotNull(n.getParentId()) && n.getParentId().longValue() == t.getId().longValue()) {
|
||||
tlist.add(n);
|
||||
}
|
||||
}
|
||||
return tlist;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否有子节点
|
||||
*/
|
||||
private boolean hasChild(List<MalConfig> list, MalConfig t) {
|
||||
return getChildList(list, t).size() > 0;
|
||||
}
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
package com.inspur.industrial.service.impl;
|
||||
|
||||
import com.inspur.industrial.domain.PhmEquAlarmRecord;
|
||||
import com.inspur.industrial.mapper.PhmEquAlarmRecordMapper;
|
||||
import com.inspur.industrial.service.IPhmEquAlarmRecordService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class PhmEquAlarmRecordServiceImpl implements IPhmEquAlarmRecordService {
|
||||
@Autowired
|
||||
private PhmEquAlarmRecordMapper phmEquAlarmRecordMapper;
|
||||
|
||||
@Override
|
||||
public List<PhmEquAlarmRecord> selectPhmEquAlarmRecordList(PhmEquAlarmRecord phmEquAlarmRecord) {
|
||||
return phmEquAlarmRecordMapper.selectPhmEquAlarmRecordList(phmEquAlarmRecord);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PhmEquAlarmRecord> selectPhmEquAlarmRecordList1(PhmEquAlarmRecord phmEquAlarmRecord) {
|
||||
return phmEquAlarmRecordMapper.selectPhmEquAlarmRecordList1(phmEquAlarmRecord);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PhmEquAlarmRecord> selectPhmEquAlarmRecordList2(PhmEquAlarmRecord phmEquAlarmRecord) {
|
||||
return phmEquAlarmRecordMapper.selectPhmEquAlarmRecordList2(phmEquAlarmRecord);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int batchPhmEquAlarmRecord(List<PhmEquAlarmRecord> list) {
|
||||
return phmEquAlarmRecordMapper.batchPhmEquAlarmRecord(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int batchPhmEquAlarmRecord1(List<PhmEquAlarmRecord> list) {
|
||||
return phmEquAlarmRecordMapper.batchPhmEquAlarmRecord1(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int batchPhmEquAlarmRecord2(List<PhmEquAlarmRecord> list) {
|
||||
return phmEquAlarmRecordMapper.batchPhmEquAlarmRecord2(list);
|
||||
}
|
||||
}
|
@ -1,130 +0,0 @@
|
||||
package com.inspur.industrial.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.inspur.system.service.influx.InfluxDBService;
|
||||
import org.influxdb.dto.QueryResult;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.inspur.industrial.mapper.PhmEquParaConfigMapper;
|
||||
import com.inspur.industrial.domain.PhmEquParaConfig;
|
||||
import com.inspur.industrial.service.IPhmEquParaConfigService;
|
||||
|
||||
/**
|
||||
* 参数值配置表Service业务层处理
|
||||
*
|
||||
* @author zhaofie
|
||||
* @date 2023-08-17
|
||||
*/
|
||||
@Service
|
||||
public class PhmEquParaConfigServiceImpl implements IPhmEquParaConfigService
|
||||
{
|
||||
@Autowired
|
||||
private PhmEquParaConfigMapper phmEquParaConfigMapper;
|
||||
|
||||
@Autowired
|
||||
private InfluxDBService influxDBService;
|
||||
|
||||
/**
|
||||
* 查询参数值配置表
|
||||
*
|
||||
* @param id 参数值配置表主键
|
||||
* @return 参数值配置表
|
||||
*/
|
||||
@Override
|
||||
public PhmEquParaConfig selectPhmEquParaConfigById(Long id)
|
||||
{
|
||||
return phmEquParaConfigMapper.selectPhmEquParaConfigById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询参数值配置表列表
|
||||
*
|
||||
* @param phmEquParaConfig 参数值配置表
|
||||
* @return 参数值配置表
|
||||
*/
|
||||
@Override
|
||||
public List<PhmEquParaConfig> selectPhmEquParaConfigList(PhmEquParaConfig phmEquParaConfig)
|
||||
{
|
||||
List<PhmEquParaConfig> phmEquParaConfigs = phmEquParaConfigMapper.selectPhmEquParaConfigList(phmEquParaConfig);
|
||||
QueryResult query = influxDBService.query("select * from phm_monitor_data_list order by time desc limit 1");
|
||||
List<Map<String, Object>> maps = influxDBService.queryResultProcess(query);
|
||||
if (maps.size() > 0) {
|
||||
for (Map<String, Object> object : maps) {
|
||||
for (int i = 0; i < phmEquParaConfigs.size(); i ++) {
|
||||
PhmEquParaConfig config = phmEquParaConfigs.get(i);
|
||||
//获取实际值
|
||||
Double value = Double.parseDouble((object.get(config.getNameKey()) == null || object.get(config.getNameKey()) == "" ? 0.0 : object.get(config.getNameKey())).toString());
|
||||
phmEquParaConfigs.get(i).setRealityValue(value);
|
||||
//根据比较条件比较实际值和参考值
|
||||
Boolean comResult = true;
|
||||
if (config.getReferenceCon().equals("小于")) {
|
||||
if (!(value.compareTo(new Double(config.getReference())) < 0)) {
|
||||
comResult = false;
|
||||
}
|
||||
} else if (config.getReferenceCon().equals("大于")) {
|
||||
if (!(value.compareTo(new Double(config.getReference())) > 0)) {
|
||||
comResult = false;
|
||||
}
|
||||
} else if (config.getReferenceCon().equals("等于")) {
|
||||
if (!(value.compareTo(new Double(config.getReference())) == 0)) {
|
||||
comResult = false;
|
||||
}
|
||||
}
|
||||
phmEquParaConfigs.get(i).setComResult(comResult);
|
||||
}
|
||||
}
|
||||
}
|
||||
return phmEquParaConfigs;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增参数值配置表
|
||||
*
|
||||
* @param phmEquParaConfig 参数值配置表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertPhmEquParaConfig(PhmEquParaConfig phmEquParaConfig)
|
||||
{
|
||||
return phmEquParaConfigMapper.insertPhmEquParaConfig(phmEquParaConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改参数值配置表
|
||||
*
|
||||
* @param phmEquParaConfig 参数值配置表
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updatePhmEquParaConfig(PhmEquParaConfig phmEquParaConfig)
|
||||
{
|
||||
return phmEquParaConfigMapper.updatePhmEquParaConfig(phmEquParaConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除参数值配置表
|
||||
*
|
||||
* @param ids 需要删除的参数值配置表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePhmEquParaConfigByIds(Long[] ids)
|
||||
{
|
||||
return phmEquParaConfigMapper.deletePhmEquParaConfigByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除参数值配置表信息
|
||||
*
|
||||
* @param id 参数值配置表主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deletePhmEquParaConfigById(Long id)
|
||||
{
|
||||
return phmEquParaConfigMapper.deletePhmEquParaConfigById(id);
|
||||
}
|
||||
|
||||
}
|
@ -1,867 +0,0 @@
|
||||
package com.inspur.industrial.service.impl;
|
||||
|
||||
import com.inspur.industrial.domain.EquConfig;
|
||||
import com.inspur.industrial.domain.PhmEquParaConfig;
|
||||
import com.inspur.industrial.mapper.EquConfigMapper;
|
||||
import com.inspur.industrial.mapper.PhmEquParaConfigMapper;
|
||||
import com.inspur.industrial.service.ITestScreenService;
|
||||
import com.inspur.industrial.utils.Constant;
|
||||
import com.inspur.industrial.utils.JudgeUtil;
|
||||
import com.inspur.system.service.influx.InfluxDBService;
|
||||
import org.influxdb.dto.QueryResult;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.xml.crypto.Data;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
|
||||
@Service
|
||||
public class TestScreenServicempl implements ITestScreenService {
|
||||
|
||||
@Autowired
|
||||
private InfluxDBService influxDBService;
|
||||
|
||||
@Autowired
|
||||
private EquConfigMapper equConfigMapper;
|
||||
|
||||
@Override
|
||||
public Map<String, Object> queryScreenData() {
|
||||
Map<String, Object> screenData = new HashMap<>();
|
||||
QueryResult query = influxDBService.query("select * from phm_monitor_data_list order by time desc limit 60");
|
||||
List<Map<String, Object>> maps = influxDBService.queryResultProcess(query);
|
||||
List<String> xData = new ArrayList<>();
|
||||
//rX1:X1轴震动传感器,rX2:X2轴震动传感器,rY1:Y1轴震动传感器,rY2:Y2轴震动传感器,z:Z轴震动传感器
|
||||
//iPM4:4um颗粒度,iPM6:6um颗粒度,iPM14:14um颗粒度,iPM21:21um颗粒度,rPT1:进油温度,rPT2:回油温度,rRH:相对湿度,rU:粘度
|
||||
List<Object> rX1 = new ArrayList<>();
|
||||
List<Object> rX2 = new ArrayList<>();
|
||||
List<Object> rY1 = new ArrayList<>();
|
||||
List<Object> rY2 = new ArrayList<>();
|
||||
List<Object> rZ = new ArrayList<>();
|
||||
List<Object> iPM4 = new ArrayList<>();
|
||||
List<Object> iPM6 = new ArrayList<>();
|
||||
List<Object> iPM14 = new ArrayList<>();
|
||||
List<Object> iPM21 = new ArrayList<>();
|
||||
List<Object> rPT1 = new ArrayList<>();
|
||||
List<Object> rPT2 = new ArrayList<>();
|
||||
List<Object> rRH = new ArrayList<>();
|
||||
List<Object> rU = new ArrayList<>();
|
||||
Map<String, Object> oil = new HashMap<>();
|
||||
for (int i = maps.size() - 1; i > -1; i--) {
|
||||
Map<String, Object> object = maps.get(i);
|
||||
rX1.add(object.get("rX1") == null ? 0 : object.get("rX1"));
|
||||
rX2.add(object.get("rX2") == null ? 0 : object.get("rX2"));
|
||||
rY1.add(object.get("rY1") == null ? 0 : object.get("rY1"));
|
||||
rY2.add(object.get("rY2") == null ? 0 : object.get("rY2"));
|
||||
rZ.add(object.get("rZ") == null ? 0 : object.get("rZ"));
|
||||
iPM4.add(object.get("iPM4") == null ? 0 : object.get("iPM4"));
|
||||
iPM6.add(object.get("iPM6") == null ? 0 : object.get("iPM6"));
|
||||
iPM14.add(object.get("iPM14") == null ? 0 : object.get("iPM14"));
|
||||
iPM21.add(object.get("iPM21") == null ? 0 : object.get("iPM21"));
|
||||
rPT1.add(object.get("rPT1") == null ? 0 : object.get("rPT1"));
|
||||
rPT2.add(object.get("rPT2") == null ? 0 : object.get("rPT2"));
|
||||
rRH.add(object.get("rRH") == null ? 0 : object.get("rRH"));
|
||||
rU.add(object.get("rU") == null ? 0 : object.get("rU"));
|
||||
//处理时间
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
try {
|
||||
Date time = new Date();
|
||||
if (object.containsKey("insertTime") && null != object.get("insertTime")) {
|
||||
time = simpleDateFormat.parse((String) object.get("insertTime"));
|
||||
}
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(time);
|
||||
int m = calendar.get(Calendar.MINUTE);
|
||||
int s = calendar.get(Calendar.SECOND);
|
||||
xData.add(m + ":" + s);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (i == 0) {
|
||||
oil.put("rPT1", object.get("rPT1"));
|
||||
oil.put("rPT2", object.get("rPT2"));
|
||||
oil.put("rSP1", object.get("rSP1"));
|
||||
}
|
||||
}
|
||||
screenData.put("xData", xData);
|
||||
screenData.put("rX1", rX1);
|
||||
screenData.put("rX2", rX2);
|
||||
screenData.put("rY1", rY1);
|
||||
screenData.put("rY2", rY2);
|
||||
screenData.put("rZ", rZ);
|
||||
screenData.put("iPM4", iPM4);
|
||||
screenData.put("iPM6", iPM6);
|
||||
screenData.put("iPM14", iPM14);
|
||||
screenData.put("iPM21", iPM21);
|
||||
screenData.put("rPT1", rPT1);
|
||||
screenData.put("rPT2", rPT2);
|
||||
screenData.put("rRH", rRH);
|
||||
screenData.put("rU", rU);
|
||||
screenData.put("oil", oil);
|
||||
//查询设备资料
|
||||
EquConfig equConfig = equConfigMapper.selectConfig();
|
||||
screenData.put("equConfig", equConfig);
|
||||
return screenData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> querycydgdata() {
|
||||
Map<String, Object> screenData = new HashMap<>();
|
||||
QueryResult query = influxDBService.query("select * from tzipc_monitor_data1_list order by time desc limit 60");
|
||||
List<Map<String, Object>> maps = influxDBService.queryResultProcess(query);
|
||||
List<String> xData = new ArrayList<>();
|
||||
// 主电机电流
|
||||
List<Object> zdjdl = new ArrayList<>();
|
||||
// 泵输出流量
|
||||
List<Object> bscll = new ArrayList<>();
|
||||
// 系统压力
|
||||
List<Object> xtyl = new ArrayList<>();
|
||||
// 液位
|
||||
List<Object> yw = new ArrayList<>();
|
||||
List<Object> ywcsz = new ArrayList<>();
|
||||
List<Object> ywmin = new ArrayList<>();
|
||||
List<Object> ywmax = new ArrayList<>();
|
||||
// 液温
|
||||
List<Object> ywe = new ArrayList<>();
|
||||
// 油液颗粒度
|
||||
List<Object> yykld4 = new ArrayList<>();
|
||||
List<Object> yykld6 = new ArrayList<>();
|
||||
List<Object> yykld14 = new ArrayList<>();
|
||||
List<Object> yykld21 = new ArrayList<>();
|
||||
// 油水检测
|
||||
List<Object> ysjc = new ArrayList<>();
|
||||
// 油品粘度
|
||||
List<Object> ypnd = new ArrayList<>();
|
||||
// 操作侧软辊流量
|
||||
List<Object> czcrgll = new ArrayList<>();
|
||||
// 操作侧热辊流量
|
||||
List<Object> czcregll = new ArrayList<>();
|
||||
// 传动侧软辊流量
|
||||
List<Object> cdcrgll = new ArrayList<>();
|
||||
// 传动侧热辊流量
|
||||
List<Object> cdcregll = new ArrayList<>();
|
||||
// 车速
|
||||
List<Object> cs = new ArrayList<>();
|
||||
// 底缸操作侧油缸位移
|
||||
List<Object> dgczcygwy = new ArrayList<>();
|
||||
// 底缸传动侧油缸位移
|
||||
List<Object> dgcdcygwy = new ArrayList<>();
|
||||
// 底缸操作侧比例伺服阀
|
||||
List<Object> dgczcblsff = new ArrayList<>();
|
||||
// 底缸操作侧比例减压阀
|
||||
List<Object> dgczcbljyf = new ArrayList<>();
|
||||
// 底缸传动侧比例伺服阀
|
||||
List<Object> dgcdcblsff = new ArrayList<>();
|
||||
// 底缸传动侧比例减压阀
|
||||
List<Object> dgcdcbljyf = new ArrayList<>();
|
||||
// TS软辊比例减压阀(TS软辊实际压力)
|
||||
List<Object> tsrgsjyl = new ArrayList<>();
|
||||
// TS热辊比例减压阀(TS热辊实际压力)
|
||||
List<Object> tsregsjyl = new ArrayList<>();
|
||||
// TS热辊合辊压力
|
||||
List<Object> tsreghgyl = new ArrayList<>();
|
||||
// TS热辊加压压力
|
||||
List<Object> tsregjyyl = new ArrayList<>();
|
||||
// TS软辊辊合辊压力
|
||||
List<Object> tsrghgyl = new ArrayList<>();
|
||||
// TS软辊加压压力
|
||||
List<Object> tsrgjyyl = new ArrayList<>();
|
||||
// DS软辊比例减压阀(DS软辊实际压力)
|
||||
List<Object> dsrgsjyl = new ArrayList<>();
|
||||
// DS热辊比例减压阀(DS热辊实际压力)
|
||||
List<Object> dsregsjyl = new ArrayList<>();
|
||||
// DS热辊合辊压力
|
||||
List<Object> dsreghgyl = new ArrayList<>();
|
||||
// DS热辊加压压力
|
||||
List<Object> dsregjyyl = new ArrayList<>();
|
||||
// DS软辊辊合辊压力
|
||||
List<Object> dsrghgyl = new ArrayList<>();
|
||||
// DS软辊加压压力
|
||||
List<Object> dsrgjyyl = new ArrayList<>();
|
||||
|
||||
for (int i = maps.size() - 1; i > -1; i--) {
|
||||
Map<String, Object> object = maps.get(i);
|
||||
zdjdl.add(object.get("zdjdl") == null ? 0 : object.get("zdjdl"));
|
||||
bscll.add(object.get("bscll") == null ? 0 : object.get("bscll"));
|
||||
xtyl.add(object.get("xtyl") == null ? 0 : object.get("xtyl"));
|
||||
yw.add(object.get("yw") == null ? 0 : object.get("yw"));
|
||||
ywcsz.add(object.get("ywcsz") == null ? 0 : object.get("ywcsz"));
|
||||
ywmin.add(object.get("ywmin") == null ? 0 : object.get("ywmin"));
|
||||
ywmax.add(object.get("ywmax") == null ? 0 : object.get("ywmax"));
|
||||
ywe.add(object.get("ywe") == null ? 0 : object.get("ywe"));
|
||||
yykld4.add(object.get("yykld4") == null ? 0 : object.get("yykld4"));
|
||||
yykld6.add(object.get("yykld6") == null ? 0 : object.get("yykld6"));
|
||||
yykld14.add(object.get("yykld14") == null ? 0 : object.get("yykld14"));
|
||||
yykld21.add(object.get("yykld21") == null ? 0 : object.get("yykld21"));
|
||||
ysjc.add(object.get("ysjc") == null ? 0 : object.get("ysjc"));
|
||||
ypnd.add(object.get("ypnd") == null ? 0 : object.get("ypnd"));
|
||||
czcrgll.add(object.get("czcrgll") == null ? 0 : object.get("czcrgll"));
|
||||
czcregll.add(object.get("czcregll") == null ? 0 : object.get("czcregll"));
|
||||
cdcrgll.add(object.get("cdcrgll") == null ? 0 : object.get("cdcrgll"));
|
||||
cdcregll.add(object.get("cdcregll") == null ? 0 : object.get("cdcregll"));
|
||||
cs.add(object.get("cs") == null ? 0 : object.get("cs"));
|
||||
dgczcygwy.add(object.get("dgczcygwy") == null ? 0 : object.get("dgczcygwy"));
|
||||
dgcdcygwy.add(object.get("dgcdcygwy") == null ? 0 : object.get("dgcdcygwy"));
|
||||
dgczcblsff.add(object.get("dgczcblsff") == null ? 0 : object.get("dgczcblsff"));
|
||||
dgczcbljyf.add(object.get("dgczcbljyf") == null ? 0 : object.get("dgczcbljyf"));
|
||||
dgcdcblsff.add(object.get("dgcdcblsff") == null ? 0 : object.get("dgcdcblsff"));
|
||||
dgcdcbljyf.add(object.get("dgcdcbljyf") == null ? 0 : object.get("dgcdcbljyf"));
|
||||
tsrgsjyl.add(object.get("tsrgsjyl") == null ? 0 : object.get("tsrgsjyl"));
|
||||
tsregsjyl.add(object.get("tsregsjyl") == null ? 0 : object.get("tsregsjyl"));
|
||||
tsreghgyl.add(object.get("tsreghgyl") == null ? 0 : object.get("tsreghgyl"));
|
||||
tsregjyyl.add(object.get("tsregjyyl") == null ? 0 : object.get("tsregjyyl"));
|
||||
tsrghgyl.add(object.get("tsrghgyl") == null ? 0 : object.get("tsrghgyl"));
|
||||
tsrgjyyl.add(object.get("tsrgjyyl") == null ? 0 : object.get("tsrgjyyl"));
|
||||
dsrgsjyl.add(object.get("dsrgsjyl") == null ? 0 : object.get("dsrgsjyl"));
|
||||
dsregsjyl.add(object.get("dsregsjyl") == null ? 0 : object.get("dsregsjyl"));
|
||||
dsreghgyl.add(object.get("dsreghgyl") == null ? 0 : object.get("dsreghgyl"));
|
||||
dsregjyyl.add(object.get("dsregjyyl") == null ? 0 : object.get("dsregjyyl"));
|
||||
dsrghgyl.add(object.get("dsrghgyl") == null ? 0 : object.get("dsrghgyl"));
|
||||
dsrgjyyl.add(object.get("dsrgjyyl") == null ? 0 : object.get("dsrgjyyl"));
|
||||
//处理时间
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
try {
|
||||
Date time = new Date();
|
||||
if (object.containsKey("insertTime") && null != object.get("insertTime")) {
|
||||
time = simpleDateFormat.parse((String) object.get("insertTime"));
|
||||
}
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(time);
|
||||
int m = calendar.get(Calendar.MINUTE);
|
||||
int s = calendar.get(Calendar.SECOND);
|
||||
xData.add((m < 10 ? "0" + m : m) + ":" + (s < 10 ? "0" + s : s));
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
screenData.put("xData", xData);
|
||||
screenData.put("zdjdl", zdjdl);
|
||||
screenData.put("bscll", bscll);
|
||||
screenData.put("xtyl", xtyl);
|
||||
screenData.put("yw", yw);
|
||||
screenData.put("ywcsz", ywcsz);
|
||||
screenData.put("ywmin", ywmin);
|
||||
screenData.put("ywmax", ywmax);
|
||||
screenData.put("ywe", ywe);
|
||||
screenData.put("yykld4", yykld4);
|
||||
screenData.put("yykld6", yykld6);
|
||||
screenData.put("yykld14", yykld14);
|
||||
screenData.put("yykld21", yykld21);
|
||||
screenData.put("ysjc", ysjc);
|
||||
screenData.put("ypnd", ypnd);
|
||||
screenData.put("czcrgll", czcrgll);
|
||||
screenData.put("czcregll", czcregll);
|
||||
screenData.put("cdcrgll", cdcrgll);
|
||||
screenData.put("cdcregll", cdcregll);
|
||||
screenData.put("cs", cs);
|
||||
screenData.put("dgczcygwy", dgczcygwy);
|
||||
screenData.put("dgcdcygwy", dgcdcygwy);
|
||||
screenData.put("dgczcblsff", dgczcblsff);
|
||||
screenData.put("dgczcbljyf", dgczcbljyf);
|
||||
screenData.put("dgcdcblsff", dgcdcblsff);
|
||||
screenData.put("dgcdcbljyf", dgcdcbljyf);
|
||||
screenData.put("tsrgsjyl", tsrgsjyl);
|
||||
screenData.put("tsregsjyl", tsregsjyl);
|
||||
screenData.put("tsreghgyl", tsreghgyl);
|
||||
screenData.put("tsregjyyl", tsregjyyl);
|
||||
screenData.put("tsrghgyl", tsrghgyl);
|
||||
screenData.put("tsrgjyyl", tsrgjyyl);
|
||||
screenData.put("dsrgsjyl", dsrgsjyl);
|
||||
screenData.put("dsregsjyl", dsregsjyl);
|
||||
screenData.put("dsreghgyl", dsreghgyl);
|
||||
screenData.put("dsregjyyl", dsregjyyl);
|
||||
screenData.put("dsrghgyl", dsrghgyl);
|
||||
screenData.put("dsrgjyyl", dsrgjyyl);
|
||||
//查询设备资料
|
||||
EquConfig equConfig = equConfigMapper.selectConfig();
|
||||
// 查询实时报警
|
||||
// screenData.put("alarmData", JudgeUtil.dealRealTimeData(maps.get(0), "1"));
|
||||
screenData.put("equConfig", equConfig);
|
||||
return screenData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> zgdgTopdata() {
|
||||
Map<String, Object> screenData = new HashMap<>();
|
||||
QueryResult query = influxDBService.query("select * from tzipc_monitor_data2_list order by time desc limit 60");
|
||||
List<Map<String, Object>> maps = influxDBService.queryResultProcess(query);
|
||||
List<String> xData = new ArrayList<>();
|
||||
// 主电机电流
|
||||
List<Object> zdjdl = new ArrayList<>();
|
||||
// 主泵输出流量
|
||||
List<Object> zbscll = new ArrayList<>();
|
||||
// 冷却循环电机电流
|
||||
List<Object> lqxhdjdl = new ArrayList<>();
|
||||
// 系统压力
|
||||
List<Object> xtyl = new ArrayList<>();
|
||||
// 液位
|
||||
List<Object> yw = new ArrayList<>();
|
||||
List<Object> ywcsz = new ArrayList<>();
|
||||
List<Object> ywmin = new ArrayList<>();
|
||||
List<Object> ywmax = new ArrayList<>();
|
||||
// 液温
|
||||
List<Object> ywen = new ArrayList<>();
|
||||
// 油液颗粒度
|
||||
List<Object> yykld4 = new ArrayList<>();
|
||||
List<Object> yykld6 = new ArrayList<>();
|
||||
List<Object> yykld14 = new ArrayList<>();
|
||||
List<Object> yykld21 = new ArrayList<>();
|
||||
// 油水检测
|
||||
List<Object> ysjc = new ArrayList<>();
|
||||
// 油品粘度
|
||||
List<Object> ypnd = new ArrayList<>();
|
||||
// 铁磁检测
|
||||
List<Object> tcjc = new ArrayList<>();
|
||||
// 一压区比例减压阀
|
||||
List<Object> yqbljyf1 = new ArrayList<>();
|
||||
// 二压区比例减压阀
|
||||
List<Object> yqbljyf2 = new ArrayList<>();
|
||||
// 三压区比例减压阀
|
||||
List<Object> yqbljyf3 = new ArrayList<>();
|
||||
// 四压区比例减压阀
|
||||
List<Object> yqbljyf4 = new ArrayList<>();
|
||||
// 五压区比例减压阀
|
||||
List<Object> yqbljyf5 = new ArrayList<>();
|
||||
// 六压区比例减压阀
|
||||
List<Object> yqbljyf6 = new ArrayList<>();
|
||||
// 七压区比例减压阀
|
||||
List<Object> yqbljyf7 = new ArrayList<>();
|
||||
// 八压区比例减压阀
|
||||
List<Object> yqbljyf8 = new ArrayList<>();
|
||||
// 九压区比例减压阀
|
||||
List<Object> yqbljyf9 = new ArrayList<>();
|
||||
// 十压区比例减压阀
|
||||
List<Object> yqbljyf10 = new ArrayList<>();
|
||||
// 十一压区比例减压阀
|
||||
List<Object> yqbljyf11 = new ArrayList<>();
|
||||
// 一压区流量
|
||||
List<Object> yqll1 = new ArrayList<>();
|
||||
// 二压区流量
|
||||
List<Object> yqll2 = new ArrayList<>();
|
||||
// 三压区流量
|
||||
List<Object> yqll3 = new ArrayList<>();
|
||||
// 四压区流量
|
||||
List<Object> yqll4 = new ArrayList<>();
|
||||
// 五压区流量
|
||||
List<Object> yqll5 = new ArrayList<>();
|
||||
// 六压区流量
|
||||
List<Object> yqll6 = new ArrayList<>();
|
||||
// 七压区流量
|
||||
List<Object> yqll7 = new ArrayList<>();
|
||||
// 八压区流量
|
||||
List<Object> yqll8 = new ArrayList<>();
|
||||
// 九压区流量
|
||||
List<Object> yqll9 = new ArrayList<>();
|
||||
// 十压区流量
|
||||
List<Object> yqll10 = new ArrayList<>();
|
||||
// 十一压区流量
|
||||
List<Object> yqll11 = new ArrayList<>();
|
||||
|
||||
for (int i = maps.size() - 1; i > -1; i--) {
|
||||
Map<String, Object> object = maps.get(i);
|
||||
zdjdl.add(object.get("zdjdl") == null ? 0 : object.get("zdjdl"));
|
||||
zbscll.add(object.get("zbscll") == null ? 0 : object.get("zbscll"));
|
||||
lqxhdjdl.add(object.get("lqxhdjdl") == null ? 0 : object.get("lqxhdjdl"));
|
||||
xtyl.add(object.get("xtyl") == null ? 0 : object.get("xtyl"));
|
||||
yw.add(object.get("yw") == null ? 0 : object.get("yw"));
|
||||
ywcsz.add(object.get("ywcsz") == null ? 0 : object.get("ywcsz"));
|
||||
ywmin.add(object.get("ywmin") == null ? 0 : object.get("ywmin"));
|
||||
ywmax.add(object.get("ywmax") == null ? 0 : object.get("ywmax"));
|
||||
ywen.add(object.get("ywen") == null ? 0 : object.get("ywen"));
|
||||
yykld4.add(object.get("yykld4") == null ? 0 : object.get("yykld4"));
|
||||
yykld6.add(object.get("yykld6") == null ? 0 : object.get("yykld6"));
|
||||
yykld14.add(object.get("yykld14") == null ? 0 : object.get("yykld14"));
|
||||
yykld21.add(object.get("yykld21") == null ? 0 : object.get("yykld21"));
|
||||
ysjc.add(object.get("ysjc") == null ? 0 : object.get("ysjc"));
|
||||
ypnd.add(object.get("ypnd") == null ? 0 : object.get("ypnd"));
|
||||
tcjc.add(object.get("tcjc") == null ? 0 : object.get("tcjc"));
|
||||
yqbljyf1.add(object.get("yqbljyf1") == null ? 0 : object.get("yqbljyf1"));
|
||||
yqbljyf2.add(object.get("yqbljyf2") == null ? 0 : object.get("yqbljyf2"));
|
||||
yqbljyf3.add(object.get("yqbljyf3") == null ? 0 : object.get("yqbljyf3"));
|
||||
yqbljyf4.add(object.get("yqbljyf4") == null ? 0 : object.get("yqbljyf4"));
|
||||
yqbljyf5.add(object.get("yqbljyf5") == null ? 0 : object.get("yqbljyf5"));
|
||||
yqbljyf6.add(object.get("yqbljyf6") == null ? 0 : object.get("yqbljyf6"));
|
||||
yqbljyf7.add(object.get("yqbljyf7") == null ? 0 : object.get("yqbljyf7"));
|
||||
yqbljyf8.add(object.get("yqbljyf8") == null ? 0 : object.get("yqbljyf8"));
|
||||
yqbljyf9.add(object.get("yqbljyf9") == null ? 0 : object.get("yqbljyf9"));
|
||||
yqbljyf10.add(object.get("yqbljyf10") == null ? 0 : object.get("yqbljyf10"));
|
||||
yqbljyf11.add(object.get("yqbljyf11") == null ? 0 : object.get("yqbljyf11"));
|
||||
yqll1.add(object.get("yqll1") == null ? 0 : object.get("yqll1"));
|
||||
yqll2.add(object.get("yqll2") == null ? 0 : object.get("yqll2"));
|
||||
yqll3.add(object.get("yqll3") == null ? 0 : object.get("yqll3"));
|
||||
yqll4.add(object.get("yqll4") == null ? 0 : object.get("yqll4"));
|
||||
yqll5.add(object.get("yqll5") == null ? 0 : object.get("yqll5"));
|
||||
yqll6.add(object.get("yqll6") == null ? 0 : object.get("yqll6"));
|
||||
yqll7.add(object.get("yqll7") == null ? 0 : object.get("yqll7"));
|
||||
yqll8.add(object.get("yqll8") == null ? 0 : object.get("yqll8"));
|
||||
yqll9.add(object.get("yqll9") == null ? 0 : object.get("yqll9"));
|
||||
yqll10.add(object.get("yqll10") == null ? 0 : object.get("yqll10"));
|
||||
yqll11.add(object.get("yqll11") == null ? 0 : object.get("yqll11"));
|
||||
//处理时间
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
try {
|
||||
Date time = new Date();
|
||||
if (object.containsKey("insertTime") && null != object.get("insertTime")) {
|
||||
time = simpleDateFormat.parse((String) object.get("insertTime"));
|
||||
}
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(time);
|
||||
int m = calendar.get(Calendar.MINUTE);
|
||||
int s = calendar.get(Calendar.SECOND);
|
||||
xData.add((m < 10 ? "0" + m : m) + ":" + (s < 10 ? "0" + s : s));
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
screenData.put("xData", xData);
|
||||
screenData.put("zdjdl", zdjdl);
|
||||
screenData.put("zbscll", zbscll);
|
||||
screenData.put("lqxhdjdl", lqxhdjdl);
|
||||
screenData.put("xtyl", xtyl);
|
||||
screenData.put("yw", yw);
|
||||
screenData.put("ywcsz", ywcsz);
|
||||
screenData.put("ywmin", ywmin);
|
||||
screenData.put("ywmax", ywmax);
|
||||
screenData.put("ywen", ywen);
|
||||
screenData.put("yykld4", yykld4);
|
||||
screenData.put("yykld6", yykld6);
|
||||
screenData.put("yykld14", yykld14);
|
||||
screenData.put("yykld21", yykld21);
|
||||
screenData.put("ysjc", ysjc);
|
||||
screenData.put("ypnd", ypnd);
|
||||
screenData.put("tcjc", tcjc);
|
||||
screenData.put("yqbljyf1", yqbljyf1);
|
||||
screenData.put("yqbljyf2", yqbljyf2);
|
||||
screenData.put("yqbljyf3", yqbljyf3);
|
||||
screenData.put("yqbljyf4", yqbljyf4);
|
||||
screenData.put("yqbljyf5", yqbljyf5);
|
||||
screenData.put("yqbljyf6", yqbljyf6);
|
||||
screenData.put("yqbljyf7", yqbljyf7);
|
||||
screenData.put("yqbljyf8", yqbljyf8);
|
||||
screenData.put("yqbljyf9", yqbljyf9);
|
||||
screenData.put("yqbljyf10", yqbljyf10);
|
||||
screenData.put("yqbljyf11", yqbljyf11);
|
||||
screenData.put("yqll1", yqll1);
|
||||
screenData.put("yqll2", yqll2);
|
||||
screenData.put("yqll3", yqll3);
|
||||
screenData.put("yqll4", yqll4);
|
||||
screenData.put("yqll5", yqll5);
|
||||
screenData.put("yqll6", yqll6);
|
||||
screenData.put("yqll7", yqll7);
|
||||
screenData.put("yqll8", yqll8);
|
||||
screenData.put("yqll9", yqll9);
|
||||
screenData.put("yqll10", yqll10);
|
||||
screenData.put("yqll11", yqll11);
|
||||
//查询设备资料
|
||||
EquConfig equConfig = equConfigMapper.selectConfig();
|
||||
// 查询实时报警
|
||||
// screenData.put("alarmData", JudgeUtil.dealRealTimeData(maps.get(0), "2"));
|
||||
screenData.put("equConfig", equConfig);
|
||||
return screenData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> zgdgBottomdata() {
|
||||
Map<String, Object> screenData = new HashMap<>();
|
||||
QueryResult query = influxDBService.query("select * from tzipc_monitor_data3_list order by time desc limit 60");
|
||||
List<Map<String, Object>> maps = influxDBService.queryResultProcess(query);
|
||||
List<String> xData = new ArrayList<>();
|
||||
// 主电机电流
|
||||
List<Object> zdjdl = new ArrayList<>();
|
||||
// 主泵输出流量
|
||||
List<Object> zbscll = new ArrayList<>();
|
||||
// 冷却循环电机电流
|
||||
List<Object> lqxhdjdl = new ArrayList<>();
|
||||
// 系统压力
|
||||
List<Object> xtyl = new ArrayList<>();
|
||||
// 液位
|
||||
List<Object> yw = new ArrayList<>();
|
||||
List<Object> ywcsz = new ArrayList<>();
|
||||
List<Object> ywmin = new ArrayList<>();
|
||||
List<Object> ywmax = new ArrayList<>();
|
||||
// 液温
|
||||
List<Object> ywen = new ArrayList<>();
|
||||
// 油液颗粒度
|
||||
List<Object> yykld4 = new ArrayList<>();
|
||||
List<Object> yykld6 = new ArrayList<>();
|
||||
List<Object> yykld14 = new ArrayList<>();
|
||||
List<Object> yykld21 = new ArrayList<>();
|
||||
// 油水检测
|
||||
List<Object> ysjc = new ArrayList<>();
|
||||
// 油品粘度
|
||||
List<Object> ypnd = new ArrayList<>();
|
||||
// 铁磁检测
|
||||
List<Object> tcjc = new ArrayList<>();
|
||||
// 一压区比例减压阀
|
||||
List<Object> yqbljyf1 = new ArrayList<>();
|
||||
// 二压区比例减压阀
|
||||
List<Object> yqbljyf2 = new ArrayList<>();
|
||||
// 三压区比例减压阀
|
||||
List<Object> yqbljyf3 = new ArrayList<>();
|
||||
// 四压区比例减压阀
|
||||
List<Object> yqbljyf4 = new ArrayList<>();
|
||||
// 五压区比例减压阀
|
||||
List<Object> yqbljyf5 = new ArrayList<>();
|
||||
// 六压区比例减压阀
|
||||
List<Object> yqbljyf6 = new ArrayList<>();
|
||||
// 七压区比例减压阀
|
||||
List<Object> yqbljyf7 = new ArrayList<>();
|
||||
// 八压区比例减压阀
|
||||
List<Object> yqbljyf8 = new ArrayList<>();
|
||||
// 九压区比例减压阀
|
||||
List<Object> yqbljyf9 = new ArrayList<>();
|
||||
// 十压区比例减压阀
|
||||
List<Object> yqbljyf10 = new ArrayList<>();
|
||||
// 十一压区比例减压阀
|
||||
List<Object> yqbljyf11 = new ArrayList<>();
|
||||
// 一压区流量
|
||||
List<Object> yqll1 = new ArrayList<>();
|
||||
// 二压区流量
|
||||
List<Object> yqll2 = new ArrayList<>();
|
||||
// 三压区流量
|
||||
List<Object> yqll3 = new ArrayList<>();
|
||||
// 四压区流量
|
||||
List<Object> yqll4 = new ArrayList<>();
|
||||
// 五压区流量
|
||||
List<Object> yqll5 = new ArrayList<>();
|
||||
// 六压区流量
|
||||
List<Object> yqll6 = new ArrayList<>();
|
||||
// 七压区流量
|
||||
List<Object> yqll7 = new ArrayList<>();
|
||||
// 八压区流量
|
||||
List<Object> yqll8 = new ArrayList<>();
|
||||
// 九压区流量
|
||||
List<Object> yqll9 = new ArrayList<>();
|
||||
// 十压区流量
|
||||
List<Object> yqll10 = new ArrayList<>();
|
||||
// 十一压区流量
|
||||
List<Object> yqll11 = new ArrayList<>();
|
||||
|
||||
for (int i = maps.size() - 1; i > -1; i--) {
|
||||
Map<String, Object> object = maps.get(i);
|
||||
zdjdl.add(object.get("zdjdl") == null ? 0 : object.get("zdjdl"));
|
||||
zbscll.add(object.get("zbscll") == null ? 0 : object.get("zbscll"));
|
||||
lqxhdjdl.add(object.get("lqxhdjdl") == null ? 0 : object.get("lqxhdjdl"));
|
||||
xtyl.add(object.get("xtyl") == null ? 0 : object.get("xtyl"));
|
||||
yw.add(object.get("yw") == null ? 0 : object.get("yw"));
|
||||
ywcsz.add(object.get("ywcsz") == null ? 0 : object.get("ywcsz"));
|
||||
ywmin.add(object.get("ywmin") == null ? 0 : object.get("ywmin"));
|
||||
ywmax.add(object.get("ywmax") == null ? 0 : object.get("ywmax"));
|
||||
ywen.add(object.get("ywen") == null ? 0 : object.get("ywen"));
|
||||
yykld4.add(object.get("yykld4") == null ? 0 : object.get("yykld4"));
|
||||
yykld6.add(object.get("yykld6") == null ? 0 : object.get("yykld6"));
|
||||
yykld14.add(object.get("yykld14") == null ? 0 : object.get("yykld14"));
|
||||
yykld21.add(object.get("yykld21") == null ? 0 : object.get("yykld21"));
|
||||
ysjc.add(object.get("ysjc") == null ? 0 : object.get("ysjc"));
|
||||
ypnd.add(object.get("ypnd") == null ? 0 : object.get("ypnd"));
|
||||
tcjc.add(object.get("tcjc") == null ? 0 : object.get("tcjc"));
|
||||
yqbljyf1.add(object.get("yqbljyf1") == null ? 0 : object.get("yqbljyf1"));
|
||||
yqbljyf2.add(object.get("yqbljyf2") == null ? 0 : object.get("yqbljyf2"));
|
||||
yqbljyf3.add(object.get("yqbljyf3") == null ? 0 : object.get("yqbljyf3"));
|
||||
yqbljyf4.add(object.get("yqbljyf4") == null ? 0 : object.get("yqbljyf4"));
|
||||
yqbljyf5.add(object.get("yqbljyf5") == null ? 0 : object.get("yqbljyf5"));
|
||||
yqbljyf6.add(object.get("yqbljyf6") == null ? 0 : object.get("yqbljyf6"));
|
||||
yqbljyf7.add(object.get("yqbljyf7") == null ? 0 : object.get("yqbljyf7"));
|
||||
yqbljyf8.add(object.get("yqbljyf8") == null ? 0 : object.get("yqbljyf8"));
|
||||
yqbljyf9.add(object.get("yqbljyf9") == null ? 0 : object.get("yqbljyf9"));
|
||||
yqbljyf10.add(object.get("yqbljyf10") == null ? 0 : object.get("yqbljyf10"));
|
||||
yqbljyf11.add(object.get("yqbljyf11") == null ? 0 : object.get("yqbljyf11"));
|
||||
yqll1.add(object.get("yqll1") == null ? 0 : object.get("yqll1"));
|
||||
yqll2.add(object.get("yqll2") == null ? 0 : object.get("yqll2"));
|
||||
yqll3.add(object.get("yqll3") == null ? 0 : object.get("yqll3"));
|
||||
yqll4.add(object.get("yqll4") == null ? 0 : object.get("yqll4"));
|
||||
yqll5.add(object.get("yqll5") == null ? 0 : object.get("yqll5"));
|
||||
yqll6.add(object.get("yqll6") == null ? 0 : object.get("yqll6"));
|
||||
yqll7.add(object.get("yqll7") == null ? 0 : object.get("yqll7"));
|
||||
yqll8.add(object.get("yqll8") == null ? 0 : object.get("yqll8"));
|
||||
yqll9.add(object.get("yqll9") == null ? 0 : object.get("yqll9"));
|
||||
yqll10.add(object.get("yqll10") == null ? 0 : object.get("yqll10"));
|
||||
yqll11.add(object.get("yqll11") == null ? 0 : object.get("yqll11"));
|
||||
//处理时间
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
try {
|
||||
Date time = new Date();
|
||||
if (object.containsKey("insertTime") && null != object.get("insertTime")) {
|
||||
time = simpleDateFormat.parse((String) object.get("insertTime"));
|
||||
}
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(time);
|
||||
int m = calendar.get(Calendar.MINUTE);
|
||||
int s = calendar.get(Calendar.SECOND);
|
||||
xData.add((m < 10 ? "0" + m : m) + ":" + (s < 10 ? "0" + s : s));
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
screenData.put("xData", xData);
|
||||
screenData.put("zdjdl", zdjdl);
|
||||
screenData.put("zbscll", zbscll);
|
||||
screenData.put("lqxhdjdl", lqxhdjdl);
|
||||
screenData.put("xtyl", xtyl);
|
||||
screenData.put("yw", yw);
|
||||
screenData.put("ywcsz", ywcsz);
|
||||
screenData.put("ywmin", ywmin);
|
||||
screenData.put("ywmax", ywmax);
|
||||
screenData.put("ywen", ywen);
|
||||
screenData.put("yykld4", yykld4);
|
||||
screenData.put("yykld6", yykld6);
|
||||
screenData.put("yykld14", yykld14);
|
||||
screenData.put("yykld21", yykld21);
|
||||
screenData.put("ysjc", ysjc);
|
||||
screenData.put("ypnd", ypnd);
|
||||
screenData.put("tcjc", tcjc);
|
||||
screenData.put("yqbljyf1", yqbljyf1);
|
||||
screenData.put("yqbljyf2", yqbljyf2);
|
||||
screenData.put("yqbljyf3", yqbljyf3);
|
||||
screenData.put("yqbljyf4", yqbljyf4);
|
||||
screenData.put("yqbljyf5", yqbljyf5);
|
||||
screenData.put("yqbljyf6", yqbljyf6);
|
||||
screenData.put("yqbljyf7", yqbljyf7);
|
||||
screenData.put("yqbljyf8", yqbljyf8);
|
||||
screenData.put("yqbljyf9", yqbljyf9);
|
||||
screenData.put("yqbljyf10", yqbljyf10);
|
||||
screenData.put("yqbljyf11", yqbljyf11);
|
||||
screenData.put("yqll1", yqll1);
|
||||
screenData.put("yqll2", yqll2);
|
||||
screenData.put("yqll3", yqll3);
|
||||
screenData.put("yqll4", yqll4);
|
||||
screenData.put("yqll5", yqll5);
|
||||
screenData.put("yqll6", yqll6);
|
||||
screenData.put("yqll7", yqll7);
|
||||
screenData.put("yqll8", yqll8);
|
||||
screenData.put("yqll9", yqll9);
|
||||
screenData.put("yqll10", yqll10);
|
||||
screenData.put("yqll11", yqll11);
|
||||
//查询设备资料
|
||||
EquConfig equConfig = equConfigMapper.selectConfig();
|
||||
// 查询实时报警
|
||||
// screenData.put("alarmData", JudgeUtil.dealRealTimeData(maps.get(0), "3"));
|
||||
screenData.put("equConfig", equConfig);
|
||||
return screenData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> queryzgdkdata() {
|
||||
Map<String, Object> screenData = new HashMap<>();
|
||||
QueryResult query = influxDBService.query("select * from tzipc_monitor_data2_list order by time desc limit 60");
|
||||
List<Map<String, Object>> maps = influxDBService.queryResultProcess(query);
|
||||
List<String> xData = new ArrayList<>();
|
||||
// 主电机电流
|
||||
List<Object> zdjdl = new ArrayList<>();
|
||||
// 主泵输出流量
|
||||
List<Object> zbscll = new ArrayList<>();
|
||||
// 冷却循环电机电流
|
||||
List<Object> lqxhdjdl = new ArrayList<>();
|
||||
// 系统压力
|
||||
List<Object> xtyl = new ArrayList<>();
|
||||
// 液位
|
||||
List<Object> yw = new ArrayList<>();
|
||||
List<Object> ywcsz = new ArrayList<>();
|
||||
List<Object> ywmin = new ArrayList<>();
|
||||
List<Object> ywmax = new ArrayList<>();
|
||||
// 液温
|
||||
List<Object> ywen = new ArrayList<>();
|
||||
// 油液颗粒度
|
||||
List<Object> yykld4 = new ArrayList<>();
|
||||
List<Object> yykld6 = new ArrayList<>();
|
||||
List<Object> yykld14 = new ArrayList<>();
|
||||
List<Object> yykld21 = new ArrayList<>();
|
||||
// 油水检测
|
||||
List<Object> ysjc = new ArrayList<>();
|
||||
// 油品粘度
|
||||
List<Object> ypnd = new ArrayList<>();
|
||||
// 铁磁检测
|
||||
List<Object> tcjc = new ArrayList<>();
|
||||
// 一压区比例减压阀
|
||||
List<Object> yqbljyf1 = new ArrayList<>();
|
||||
// 二压区比例减压阀
|
||||
List<Object> yqbljyf2 = new ArrayList<>();
|
||||
// 三压区比例减压阀
|
||||
List<Object> yqbljyf3 = new ArrayList<>();
|
||||
// 四压区比例减压阀
|
||||
List<Object> yqbljyf4 = new ArrayList<>();
|
||||
// 五压区比例减乐阀
|
||||
List<Object> yqbljyf5 = new ArrayList<>();
|
||||
// 六压区比例减压阀
|
||||
List<Object> yqbljyf6 = new ArrayList<>();
|
||||
// 七压区比例减压阀
|
||||
List<Object> yqbljyf7 = new ArrayList<>();
|
||||
// 八压区比例减压阀
|
||||
List<Object> yqbljyf8 = new ArrayList<>();
|
||||
// 九压区比例减压阀
|
||||
List<Object> yqbljyf9 = new ArrayList<>();
|
||||
// 十压区比例减乐阀
|
||||
List<Object> yqbljyf10 = new ArrayList<>();
|
||||
// 十一压区比例减压阀
|
||||
List<Object> yqbljyf11 = new ArrayList<>();
|
||||
// 一压区流量
|
||||
List<Object> yqll1 = new ArrayList<>();
|
||||
// 二压区流量
|
||||
List<Object> yqll2 = new ArrayList<>();
|
||||
// 三压区流量
|
||||
List<Object> yqll3 = new ArrayList<>();
|
||||
// 四压区流量
|
||||
List<Object> yqll4 = new ArrayList<>();
|
||||
// 五压区流量
|
||||
List<Object> yqll5 = new ArrayList<>();
|
||||
// 六压区流量
|
||||
List<Object> yqll6 = new ArrayList<>();
|
||||
// 七压区流量
|
||||
List<Object> yqll7 = new ArrayList<>();
|
||||
// 八压区流量
|
||||
List<Object> yqll8 = new ArrayList<>();
|
||||
// 九压区流量
|
||||
List<Object> yqll9 = new ArrayList<>();
|
||||
// 十压区流量
|
||||
List<Object> yqll10 = new ArrayList<>();
|
||||
// 十一压区流量
|
||||
List<Object> yqll11 = new ArrayList<>();
|
||||
|
||||
for (int i = maps.size() - 1; i > -1; i--) {
|
||||
Map<String, Object> object = maps.get(i);
|
||||
zdjdl.add(object.get("zdjdl") == null ? 0 : object.get("zdjdl"));
|
||||
zbscll.add(object.get("zbscll") == null ? 0 : object.get("zbscll"));
|
||||
lqxhdjdl.add(object.get("lqxhdjdl") == null ? 0 : object.get("lqxhdjdl"));
|
||||
xtyl.add(object.get("xtyl") == null ? 0 : object.get("xtyl"));
|
||||
yw.add(object.get("yw") == null ? 0 : object.get("yw"));
|
||||
ywcsz.add(object.get("ywcsz") == null ? 0 : object.get("ywcsz"));
|
||||
ywmin.add(object.get("ywmin") == null ? 0 : object.get("ywmin"));
|
||||
ywmax.add(object.get("ywmax") == null ? 0 : object.get("ywmax"));
|
||||
ywen.add(object.get("ywen") == null ? 0 : object.get("ywen"));
|
||||
yykld4.add(object.get("yykld4") == null ? 0 : object.get("yykld4"));
|
||||
yykld6.add(object.get("yykld6") == null ? 0 : object.get("yykld6"));
|
||||
yykld14.add(object.get("yykld14") == null ? 0 : object.get("yykld14"));
|
||||
yykld21.add(object.get("yykld21") == null ? 0 : object.get("yykld21"));
|
||||
ysjc.add(object.get("ysjc") == null ? 0 : object.get("ysjc"));
|
||||
ypnd.add(object.get("ypnd") == null ? 0 : object.get("ypnd"));
|
||||
tcjc.add(object.get("tcjc") == null ? 0 : object.get("tcjc"));
|
||||
yqbljyf1.add(object.get("yqbljyf1") == null ? 0 : object.get("yqbljyf1"));
|
||||
yqbljyf2.add(object.get("yqbljyf2") == null ? 0 : object.get("yqbljyf2"));
|
||||
yqbljyf3.add(object.get("yqbljyf3") == null ? 0 : object.get("yqbljyf3"));
|
||||
yqbljyf4.add(object.get("yqbljyf4") == null ? 0 : object.get("yqbljyf4"));
|
||||
yqbljyf5.add(object.get("yqbljyf5") == null ? 0 : object.get("yqbljyf5"));
|
||||
yqbljyf6.add(object.get("yqbljyf6") == null ? 0 : object.get("yqbljyf6"));
|
||||
yqbljyf7.add(object.get("yqbljyf7") == null ? 0 : object.get("yqbljyf7"));
|
||||
yqbljyf8.add(object.get("yqbljyf8") == null ? 0 : object.get("yqbljyf8"));
|
||||
yqbljyf9.add(object.get("yqbljyf9") == null ? 0 : object.get("yqbljyf9"));
|
||||
yqbljyf10.add(object.get("yqbljyf10") == null ? 0 : object.get("yqbljyf10"));
|
||||
yqbljyf11.add(object.get("yqbljyf11") == null ? 0 : object.get("yqbljyf11"));
|
||||
yqll1.add(object.get("yqll1") == null ? 0 : object.get("yqll1"));
|
||||
yqll2.add(object.get("yqll2") == null ? 0 : object.get("yqll2"));
|
||||
yqll3.add(object.get("yqll3") == null ? 0 : object.get("yqll3"));
|
||||
yqll4.add(object.get("yqll4") == null ? 0 : object.get("yqll4"));
|
||||
yqll5.add(object.get("yqll5") == null ? 0 : object.get("yqll5"));
|
||||
yqll6.add(object.get("yqll6") == null ? 0 : object.get("yqll6"));
|
||||
yqll7.add(object.get("yqll7") == null ? 0 : object.get("yqll7"));
|
||||
yqll8.add(object.get("yqll8") == null ? 0 : object.get("yqll8"));
|
||||
yqll9.add(object.get("yqll9") == null ? 0 : object.get("yqll9"));
|
||||
yqll10.add(object.get("yqll10") == null ? 0 : object.get("yqll10"));
|
||||
yqll11.add(object.get("yqll11") == null ? 0 : object.get("yqll11"));
|
||||
//处理时间
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
try {
|
||||
Date time = new Date();
|
||||
if (object.containsKey("insertTime") && null != object.get("insertTime")) {
|
||||
time = simpleDateFormat.parse((String) object.get("insertTime"));
|
||||
}
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(time);
|
||||
int m = calendar.get(Calendar.MINUTE);
|
||||
int s = calendar.get(Calendar.SECOND);
|
||||
xData.add(m + ":" + s);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
screenData.put("xData", xData);
|
||||
screenData.put("zdjdl", zdjdl);
|
||||
screenData.put("zbscll", zbscll);
|
||||
screenData.put("lqxhdjdl", lqxhdjdl);
|
||||
screenData.put("xtyl", xtyl);
|
||||
screenData.put("yw", yw);
|
||||
screenData.put("ywcsz", ywcsz);
|
||||
screenData.put("ywmin", ywmin);
|
||||
screenData.put("ywmax", ywmax);
|
||||
screenData.put("ywen", ywen);
|
||||
screenData.put("yykld4", yykld4);
|
||||
screenData.put("yykld6", yykld6);
|
||||
screenData.put("yykld14", yykld14);
|
||||
screenData.put("yykld21", yykld21);
|
||||
screenData.put("ysjc", ysjc);
|
||||
screenData.put("ypnd", ypnd);
|
||||
screenData.put("tcjc", tcjc);
|
||||
screenData.put("yqbljyf1", yqbljyf1);
|
||||
screenData.put("yqbljyf2", yqbljyf2);
|
||||
screenData.put("yqbljyf3", yqbljyf3);
|
||||
screenData.put("yqbljyf4", yqbljyf4);
|
||||
screenData.put("yqbljyf5", yqbljyf5);
|
||||
screenData.put("yqbljyf6", yqbljyf6);
|
||||
screenData.put("yqbljyf7", yqbljyf7);
|
||||
screenData.put("yqbljyf8", yqbljyf8);
|
||||
screenData.put("yqbljyf9", yqbljyf9);
|
||||
screenData.put("yqbljyf10", yqbljyf10);
|
||||
screenData.put("yqbljyf11", yqbljyf11);
|
||||
screenData.put("yqll1", yqll1);
|
||||
screenData.put("yqll2", yqll2);
|
||||
screenData.put("yqll3", yqll3);
|
||||
screenData.put("yqll4", yqll4);
|
||||
screenData.put("yqll5", yqll5);
|
||||
screenData.put("yqll6", yqll6);
|
||||
screenData.put("yqll7", yqll7);
|
||||
screenData.put("yqll8", yqll8);
|
||||
screenData.put("yqll9", yqll9);
|
||||
screenData.put("yqll10", yqll10);
|
||||
screenData.put("yqll11", yqll11);
|
||||
//查询设备资料
|
||||
EquConfig equConfig = equConfigMapper.selectConfig();
|
||||
screenData.put("equConfig", equConfig);
|
||||
return screenData;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PhmEquParaConfig> querycydgdataRealTime() {
|
||||
List<PhmEquParaConfig> returnList = new ArrayList<>();
|
||||
QueryResult query = influxDBService.query("select * from tzipc_monitor_data1_list order by time desc limit 1");
|
||||
Map<String, Object> map = influxDBService.queryResultProcess(query).get(0);
|
||||
return JudgeUtil.dealRealTimeData(map, "1");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PhmEquParaConfig> zgdgTopdataRealTime() {
|
||||
List<PhmEquParaConfig> returnList = new ArrayList<>();
|
||||
QueryResult query = influxDBService.query("select * from tzipc_monitor_data2_list order by time desc limit 1");
|
||||
Map<String, Object> map = influxDBService.queryResultProcess(query).get(0);
|
||||
return JudgeUtil.dealRealTimeData(map, "2");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PhmEquParaConfig> zgdgBottomdataRealTime() {
|
||||
List<PhmEquParaConfig> returnList = new ArrayList<>();
|
||||
QueryResult query = influxDBService.query("select * from tzipc_monitor_data3_list order by time desc limit 1");
|
||||
Map<String, Object> map = influxDBService.queryResultProcess(query).get(0);
|
||||
return JudgeUtil.dealRealTimeData(map, "3");
|
||||
}
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
String s = "2015-07-17T20:32:58.662703915Z";
|
||||
System.out.println(s);
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
try {
|
||||
Date time = simpleDateFormat.parse(s);
|
||||
Calendar calendar = Calendar.getInstance();
|
||||
calendar.setTime(time);
|
||||
int m = calendar.get(Calendar.MINUTE);
|
||||
int ss = calendar.get(Calendar.SECOND);
|
||||
System.out.println(m + ":" + ss);
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,39 +0,0 @@
|
||||
package com.inspur.industrial.utils;
|
||||
|
||||
public class Constant {
|
||||
|
||||
/**
|
||||
* 大于
|
||||
*/
|
||||
public static final String GREATER = "大于";
|
||||
|
||||
/**
|
||||
* 小于
|
||||
*/
|
||||
public static final String LESS = "小于";
|
||||
|
||||
/**
|
||||
* 大于等于
|
||||
*/
|
||||
public static final String GREATER_EQUAL = "大于等于";
|
||||
|
||||
/**
|
||||
* 小于等于
|
||||
*/
|
||||
public static final String LESS_EQUAL = "小于等于";
|
||||
|
||||
/**
|
||||
* 等于
|
||||
*/
|
||||
public static final String EQUAL = "等于";
|
||||
|
||||
/**
|
||||
* 区间内
|
||||
*/
|
||||
public static final String WIDTHIN_INTERVAL = "区间内";
|
||||
|
||||
/**
|
||||
* 区间外
|
||||
*/
|
||||
public static final String OUTSIDE_INTERVAL = "区间外";
|
||||
}
|
@ -1,164 +0,0 @@
|
||||
package com.inspur.industrial.utils;
|
||||
|
||||
|
||||
import com.inspur.industrial.domain.PhmEquParaConfig;
|
||||
import com.inspur.industrial.mapper.PhmEquParaConfigMapper;
|
||||
import com.inspur.industrial.service.IPhmEquAlarmRecordService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Component
|
||||
public class JudgeUtil {
|
||||
|
||||
@Autowired
|
||||
private IPhmEquAlarmRecordService phmEquAlarmRecordService;
|
||||
|
||||
@Autowired
|
||||
private PhmEquParaConfigMapper phmEquParaConfigMapper;
|
||||
|
||||
private static List<PhmEquParaConfig> PhmEquParaConfigList;
|
||||
private static List<PhmEquParaConfig> PhmEquParaConfigList1;
|
||||
private static List<PhmEquParaConfig> PhmEquParaConfigList2;
|
||||
|
||||
private static JudgeUtil judgeUtil;
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
judgeUtil = this;
|
||||
judgeUtil.phmEquAlarmRecordService = this.phmEquAlarmRecordService;
|
||||
}
|
||||
|
||||
/**
|
||||
* 定时获取报警规则
|
||||
* 每30分钟执行执行
|
||||
*/
|
||||
// @Scheduled(cron = "0 */30 * * * ?") 无法启动时执行
|
||||
@Scheduled(fixedRate = 1800000) // 每隔半个小时执行一次
|
||||
public void task() {
|
||||
System.out.println("查询最新规则配置");
|
||||
PhmEquParaConfigList = phmEquParaConfigMapper.selectPhmEquParaConfigList(new PhmEquParaConfig());
|
||||
PhmEquParaConfigList1 = phmEquParaConfigMapper.selectPhmEquParaConfigList1(new PhmEquParaConfig());
|
||||
PhmEquParaConfigList2 = phmEquParaConfigMapper.selectPhmEquParaConfigList2(new PhmEquParaConfig());
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据报警规则判断是否正常
|
||||
*
|
||||
* @param realValue 实际值
|
||||
* @param referenceValue 参考值
|
||||
* @param referenceCon 比较标准
|
||||
* @return
|
||||
*/
|
||||
public static Boolean judgeAlarm(double realValue, String referenceValue, String referenceCon) {
|
||||
Boolean flag = true;
|
||||
if (Constant.GREATER.equals(referenceCon)) {
|
||||
flag = realValue > Double.parseDouble(referenceValue);
|
||||
} else if (Constant.GREATER_EQUAL.equals(referenceCon)) {
|
||||
flag = realValue >= Double.parseDouble(referenceValue);
|
||||
} else if (Constant.LESS.equals(referenceCon)) {
|
||||
flag = realValue < Double.parseDouble(referenceValue);
|
||||
} else if (Constant.LESS_EQUAL.equals(referenceCon)) {
|
||||
flag = realValue <= Double.parseDouble(referenceValue);
|
||||
} else if (Constant.EQUAL.equals(referenceCon)) {
|
||||
flag = realValue == Double.parseDouble(referenceValue);
|
||||
} else if (Constant.WIDTHIN_INTERVAL.equals(referenceCon)) {
|
||||
String[] arr = referenceValue.split(",");
|
||||
flag = realValue >= Double.parseDouble(arr[0]) && realValue <= Double.parseDouble(arr[1]);
|
||||
} else if (Constant.OUTSIDE_INTERVAL.equals(referenceCon)) {
|
||||
String[] arr = referenceValue.split(",");
|
||||
flag = realValue < Double.parseDouble(arr[0]) || realValue > Double.parseDouble(arr[1]);
|
||||
} else {
|
||||
flag = true;
|
||||
}
|
||||
|
||||
return flag;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量处理实时数据
|
||||
*/
|
||||
public static List<PhmEquParaConfig> dealRealTimeData(Map<String, Object> map, String type) {
|
||||
List<PhmEquParaConfig> list = new ArrayList<>();
|
||||
switch (type) {
|
||||
case "1":
|
||||
list = PhmEquParaConfigList;
|
||||
break;
|
||||
case "2":
|
||||
list = PhmEquParaConfigList1;
|
||||
break;
|
||||
case "3":
|
||||
list = PhmEquParaConfigList2;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
List<PhmEquParaConfig> returnList = new ArrayList<>();
|
||||
for (PhmEquParaConfig phmEquParaConfig : list) {
|
||||
PhmEquParaConfig newPhmEquParaConfig = phmEquParaConfig.clone();
|
||||
if (map.get(newPhmEquParaConfig.getNameKey()) == null) {
|
||||
newPhmEquParaConfig.setRealityValue(0.0);
|
||||
newPhmEquParaConfig.setComResult(false);
|
||||
} else {
|
||||
double realityValue = Double.parseDouble(map.get(newPhmEquParaConfig.getNameKey()).toString());
|
||||
newPhmEquParaConfig.setRealityValue(realityValue);
|
||||
newPhmEquParaConfig.setComResult(judgeAlarm(realityValue, newPhmEquParaConfig.getReference(), newPhmEquParaConfig.getReferenceCon()));
|
||||
}
|
||||
returnList.add(newPhmEquParaConfig);
|
||||
}
|
||||
return returnList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断并记录报警数据
|
||||
*/
|
||||
public static void judgeAndSaveAlarmData(Map<String, Object> map, String type) {
|
||||
// List<PhmEquAlarmRecord> recordList = new ArrayList<>();
|
||||
// List<PhmEquParaConfig> list = new ArrayList<>();
|
||||
// switch (type) {
|
||||
// case "1":
|
||||
// list = PhmEquParaConfigList;
|
||||
// break;
|
||||
// case "2":
|
||||
// list = PhmEquParaConfigList1;
|
||||
// break;
|
||||
// case "3":
|
||||
// list = PhmEquParaConfigList2;
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
// for (PhmEquParaConfig phmEquParaConfig : list) {
|
||||
// PhmEquAlarmRecord phmEquAlarmRecord = null;
|
||||
// if (map.get(phmEquParaConfig.getNameKey()) == null) {
|
||||
// phmEquAlarmRecord = new PhmEquAlarmRecord(phmEquParaConfig.getId(),"0",new Date());
|
||||
// } else if (!judgeAlarm(Double.parseDouble(map.get(phmEquParaConfig.getNameKey()).toString()), phmEquParaConfig.getReference(), phmEquParaConfig.getReferenceCon())) {
|
||||
// phmEquAlarmRecord = new PhmEquAlarmRecord(phmEquParaConfig.getId(),map.get(phmEquParaConfig.getNameKey()).toString(),new Date());
|
||||
// }
|
||||
// if (phmEquAlarmRecord!=null){
|
||||
// recordList.add(phmEquAlarmRecord);
|
||||
// }
|
||||
// }
|
||||
// if(!recordList.isEmpty()) {
|
||||
// switch (type) {
|
||||
// case "1":
|
||||
// judgeUtil.phmEquAlarmRecordService.batchPhmEquAlarmRecord(recordList);
|
||||
// break;
|
||||
// case "2":
|
||||
// judgeUtil.phmEquAlarmRecordService.batchPhmEquAlarmRecord1(recordList);
|
||||
// break;
|
||||
// case "3":
|
||||
// judgeUtil.phmEquAlarmRecordService.batchPhmEquAlarmRecord2(recordList);
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
@ -1,16 +1,8 @@
|
||||
package com.inspur.ipc.utils;
|
||||
|
||||
import com.inspur.common.constant.CacheConstants;
|
||||
import com.inspur.common.utils.uuid.IdUtils;
|
||||
import com.inspur.industrial.domain.PhmEquParaConfig;
|
||||
import com.inspur.industrial.utils.Constant;
|
||||
import com.inspur.ipc.domain.IpcAlarmRecord;
|
||||
import com.inspur.ipc.domain.IpcAlarmRulesConfig;
|
||||
import com.inspur.ipc.domain.IpcMonitorField;
|
||||
import com.inspur.ipc.service.IIpcAlarmRecordService;
|
||||
import com.inspur.ipc.service.IIpcAlarmRulesConfigService;
|
||||
import com.inspur.ipc.service.IIpcMonitorFieldService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
@ -48,19 +40,19 @@ public class IpcUtil {
|
||||
flag = true;
|
||||
return flag;
|
||||
}
|
||||
if (Constant.GREATER.equals(referenceCon)) {
|
||||
if (IpcConstant.GREATER.equals(referenceCon)) {
|
||||
flag = realValue.compareTo(referenceValue1) > 0;
|
||||
} else if (Constant.GREATER_EQUAL.equals(referenceCon)) {
|
||||
} else if (IpcConstant.GREATER_EQUAL.equals(referenceCon)) {
|
||||
flag = realValue.compareTo(referenceValue1) >= 0;
|
||||
} else if (Constant.LESS.equals(referenceCon)) {
|
||||
} else if (IpcConstant.LESS.equals(referenceCon)) {
|
||||
flag = realValue.compareTo(referenceValue1) < 0;
|
||||
} else if (Constant.LESS_EQUAL.equals(referenceCon)) {
|
||||
} else if (IpcConstant.LESS_EQUAL.equals(referenceCon)) {
|
||||
flag = realValue.compareTo(referenceValue1) <= 0;
|
||||
} else if (Constant.EQUAL.equals(referenceCon)) {
|
||||
} else if (IpcConstant.EQUAL.equals(referenceCon)) {
|
||||
flag = realValue.compareTo(referenceValue1) == 0;
|
||||
} else if (Constant.WIDTHIN_INTERVAL.equals(referenceCon)) {
|
||||
} else if (IpcConstant.WIDTHIN_INTERVAL.equals(referenceCon)) {
|
||||
flag = realValue.compareTo(referenceValue1) >= 0 && realValue.compareTo(referenceValue2) <= 0;
|
||||
} else if (Constant.OUTSIDE_INTERVAL.equals(referenceCon)) {
|
||||
} else if (IpcConstant.OUTSIDE_INTERVAL.equals(referenceCon)) {
|
||||
flag = realValue.compareTo(referenceValue1) <= 0 || realValue.compareTo(referenceValue2) >= 0;
|
||||
} else {
|
||||
flag = true;
|
||||
|
@ -1,25 +0,0 @@
|
||||
<?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.inspur.industrial.mapper.EquConfigMapper">
|
||||
|
||||
<resultMap type="com.inspur.industrial.domain.EquConfig" id="EquConfigResult">
|
||||
<id property="equId" column="equ_id" />
|
||||
<result property="equName" column="equ_name" />
|
||||
<result property="equMode" column="equ_mode" />
|
||||
<result property="equStatus" column="equ_status" />
|
||||
<result property="equPlace" column="equ_place" />
|
||||
<result property="equDate" column="equ_date" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectConfigVo">
|
||||
select equ_id, equ_name, equ_mode, equ_status, equ_place, equ_date
|
||||
from phm_equ_config
|
||||
</sql>
|
||||
|
||||
<select id="selectConfig" resultMap="EquConfigResult">
|
||||
<include refid="selectConfigVo"/>
|
||||
order by equ_id
|
||||
</select>
|
||||
</mapper>
|
@ -1,25 +0,0 @@
|
||||
<?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.inspur.industrial.mapper.MalConfigMapper">
|
||||
|
||||
<resultMap type="com.inspur.common.core.domain.entity.MalConfig" id="MalConfigResult">
|
||||
<id property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="parentId" column="parent_id"/>
|
||||
<result property="isUse" column="is_use"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectMalConfigVo">
|
||||
select id, parent_id, name,is_use
|
||||
from ipc_mal_config
|
||||
</sql>
|
||||
|
||||
<select id="queryMalConfigList" parameterType="MalConfig" resultMap="MalConfigResult">
|
||||
<include refid="selectMalConfigVo"/>
|
||||
where is_use = '1'
|
||||
order by id
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -1,111 +0,0 @@
|
||||
<?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.inspur.industrial.mapper.PhmEquAlarmRecordMapper">
|
||||
|
||||
<resultMap type="com.inspur.industrial.domain.PhmEquAlarmRecord" id="PhmEquAlarmRecordResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="businessId" column="business_id"/>
|
||||
<result property="alarmDetail" column="alarm_detail"/>
|
||||
<result property="alarmTime" column="alarm_time"/>
|
||||
<result property="alarmNameKey" column="alarm_name_key"/>
|
||||
<result property="alarmName" column="alarm_name"/>
|
||||
<result property="alarmData" column="alarm_data"/>
|
||||
<result property="type" column="type"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="selectPhmEquAlarmRecordList" parameterType="com.inspur.industrial.domain.PhmEquAlarmRecord"
|
||||
resultMap="PhmEquAlarmRecordResult">
|
||||
-- 适用于自增ID和创建时间排序一致,暂定查询5分钟内最新数据
|
||||
SELECT
|
||||
a.id,
|
||||
a.business_id,
|
||||
a.alarm_data,
|
||||
a.alarm_time,
|
||||
b.NAME alarm_name,
|
||||
b.name_key alarm_name_key,
|
||||
b.type,
|
||||
b.alarm_detail
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
t1.*
|
||||
FROM
|
||||
phm_equ_alarm_record t1
|
||||
INNER JOIN ( SELECT MAX( id ) AS id FROM phm_equ_alarm_record WHERE alarm_time >= DATE_SUB( NOW(), INTERVAL 5 day ) GROUP BY business_id ) t2 ON t1.id = t2.id
|
||||
) a
|
||||
LEFT JOIN phm_equ_para_config b ON a.business_id = b.id
|
||||
-- 适用于id无序情况
|
||||
-- SELECT
|
||||
-- t1.*
|
||||
-- FROM
|
||||
-- phm_equ_alarm_record t1
|
||||
-- WHERE
|
||||
-- ( SELECT COUNT( 1 ) FROM phm_equ_alarm_record t2 WHERE t2.business_id = t1.business_id AND t1.alarm_time <= t2.alarm_time ) <= 1
|
||||
</select>
|
||||
|
||||
<select id="selectPhmEquAlarmRecordList1" parameterType="com.inspur.industrial.domain.PhmEquAlarmRecord"
|
||||
resultMap="PhmEquAlarmRecordResult">
|
||||
SELECT
|
||||
a.id,
|
||||
a.business_id,
|
||||
a.alarm_data,
|
||||
a.alarm_time,
|
||||
b.NAME alarm_name,
|
||||
b.name_key alarm_name_key,
|
||||
b.type,
|
||||
b.alarm_detail
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
t1.*
|
||||
FROM
|
||||
phm_equ_alarm_record1 t1
|
||||
INNER JOIN ( SELECT MAX( id ) AS id FROM phm_equ_alarm_record1 WHERE alarm_time >= DATE_SUB( NOW(), INTERVAL 5 day ) GROUP BY business_id ) t2 ON t1.id = t2.id
|
||||
) a
|
||||
LEFT JOIN phm_equ_para_config1 b ON a.business_id = b.id
|
||||
</select>
|
||||
|
||||
<select id="selectPhmEquAlarmRecordList2" parameterType="com.inspur.industrial.domain.PhmEquAlarmRecord"
|
||||
resultMap="PhmEquAlarmRecordResult">
|
||||
SELECT
|
||||
a.id,
|
||||
a.business_id,
|
||||
a.alarm_data,
|
||||
a.alarm_time,
|
||||
b.NAME alarm_name,
|
||||
b.name_key alarm_name_key,
|
||||
b.type,
|
||||
b.alarm_detail
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
t1.*
|
||||
FROM
|
||||
phm_equ_alarm_record2 t1
|
||||
INNER JOIN ( SELECT MAX( id ) AS id FROM phm_equ_alarm_record2 WHERE alarm_time >= DATE_SUB( NOW(), INTERVAL 5 day ) GROUP BY business_id ) t2 ON t1.id = t2.id
|
||||
) a
|
||||
LEFT JOIN phm_equ_para_config2 b ON a.business_id = b.id
|
||||
</select>
|
||||
|
||||
<insert id="batchPhmEquAlarmRecord">
|
||||
insert into phm_equ_alarm_record( business_id, alarm_data,alarm_time) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.businessId}, #{item.alarmData},#{item.alarmTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchPhmEquAlarmRecord1">
|
||||
insert into phm_equ_alarm_record1( business_id, alarm_data,alarm_time) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.businessId}, #{item.alarmData},#{item.alarmTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
<insert id="batchPhmEquAlarmRecord2">
|
||||
insert into phm_equ_alarm_record2( business_id, alarm_data,alarm_time) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
( #{item.businessId}, #{item.alarmData},#{item.alarmTime})
|
||||
</foreach>
|
||||
</insert>
|
||||
</mapper>
|
@ -1,113 +0,0 @@
|
||||
<?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.inspur.industrial.mapper.PhmEquParaConfigMapper">
|
||||
|
||||
<resultMap type="com.inspur.industrial.domain.PhmEquParaConfig" id="PhmEquParaConfigResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="nameKey" column="name_key" />
|
||||
<result property="name" column="name" />
|
||||
<result property="unit" column="unit" />
|
||||
<result property="reference" column="reference" />
|
||||
<result property="referenceName" column="reference_name" />
|
||||
<result property="referenceCon" column="reference_con" />
|
||||
<result property="alarmDetail" column="alarm_detail" />
|
||||
<result property="alarmId" column="alarm_id" />
|
||||
<result property="type" column="type" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPhmEquParaConfigVo">
|
||||
select id, name_key, name, unit, reference, reference_name, reference_con,alarm_detail,alarm_id,type from phm_equ_para_config
|
||||
</sql>
|
||||
|
||||
<select id="selectPhmEquParaConfigList" parameterType="com.inspur.industrial.domain.PhmEquParaConfig" resultMap="PhmEquParaConfigResult">
|
||||
select id, name_key, name, unit, reference, reference_name, reference_con,alarm_detail,alarm_id,type from phm_equ_para_config
|
||||
<where>
|
||||
<if test="nameKey != null and nameKey != ''"> and name_key = #{nameKey}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
|
||||
<if test="reference != null and reference != ''"> and reference = #{reference}</if>
|
||||
<if test="referenceName != null and referenceName != ''"> and reference_name like concat('%', #{referenceName}, '%')</if>
|
||||
<if test="referenceCon != null and referenceCon != ''"> and reference_con = #{referenceCon}</if>
|
||||
</where>
|
||||
order by id
|
||||
</select>
|
||||
|
||||
<select id="selectPhmEquParaConfigList1" parameterType="com.inspur.industrial.domain.PhmEquParaConfig" resultMap="PhmEquParaConfigResult">
|
||||
select id, name_key, name, unit, reference, reference_name, reference_con,alarm_detail,alarm_id,type from phm_equ_para_config1
|
||||
<where>
|
||||
<if test="nameKey != null and nameKey != ''"> and name_key = #{nameKey}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
|
||||
<if test="reference != null and reference != ''"> and reference = #{reference}</if>
|
||||
<if test="referenceName != null and referenceName != ''"> and reference_name like concat('%', #{referenceName}, '%')</if>
|
||||
<if test="referenceCon != null and referenceCon != ''"> and reference_con = #{referenceCon}</if>
|
||||
</where>
|
||||
order by id
|
||||
</select>
|
||||
|
||||
<select id="selectPhmEquParaConfigList2" parameterType="com.inspur.industrial.domain.PhmEquParaConfig" resultMap="PhmEquParaConfigResult">
|
||||
select id, name_key, name, unit, reference, reference_name, reference_con,alarm_detail,alarm_id,type from phm_equ_para_config2
|
||||
<where>
|
||||
<if test="nameKey != null and nameKey != ''"> and name_key = #{nameKey}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="unit != null and unit != ''"> and unit = #{unit}</if>
|
||||
<if test="reference != null and reference != ''"> and reference = #{reference}</if>
|
||||
<if test="referenceName != null and referenceName != ''"> and reference_name like concat('%', #{referenceName}, '%')</if>
|
||||
<if test="referenceCon != null and referenceCon != ''"> and reference_con = #{referenceCon}</if>
|
||||
</where>
|
||||
order by id
|
||||
</select>
|
||||
|
||||
<select id="selectPhmEquParaConfigById" parameterType="Long" resultMap="PhmEquParaConfigResult">
|
||||
<include refid="selectPhmEquParaConfigVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertPhmEquParaConfig" parameterType="com.inspur.industrial.domain.PhmEquParaConfig">
|
||||
insert into phm_equ_para_config
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
<if test="nameKey != null">name_key,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="unit != null">unit,</if>
|
||||
<if test="reference != null">reference,</if>
|
||||
<if test="referenceName != null">reference_name,</if>
|
||||
<if test="referenceCon != null">reference_con,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
<if test="nameKey != null">#{nameKey},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="unit != null">#{unit},</if>
|
||||
<if test="reference != null">#{reference},</if>
|
||||
<if test="referenceName != null">#{referenceName},</if>
|
||||
<if test="referenceCon != null">#{referenceCon},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updatePhmEquParaConfig" parameterType="com.inspur.industrial.domain.PhmEquParaConfig">
|
||||
update phm_equ_para_config
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="nameKey != null">name_key = #{nameKey},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="unit != null">unit = #{unit},</if>
|
||||
<if test="reference != null">reference = #{reference},</if>
|
||||
<if test="referenceName != null">reference_name = #{referenceName},</if>
|
||||
<if test="referenceCon != null">reference_con = #{referenceCon},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deletePhmEquParaConfigById" parameterType="Long">
|
||||
delete from phm_equ_para_config where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deletePhmEquParaConfigByIds" parameterType="String">
|
||||
delete from phm_equ_para_config where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -1,10 +0,0 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
// 查询推送数据列表
|
||||
export function dataList(query) {
|
||||
return request({
|
||||
url: "/dataLog/list",
|
||||
method: "get",
|
||||
params: query,
|
||||
});
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
// 查询故障树列表
|
||||
export function queryTree(query) {
|
||||
return request({
|
||||
url: "/mal/tree",
|
||||
method: "get",
|
||||
params: query,
|
||||
});
|
||||
}
|
@ -1,77 +0,0 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
// 查询参数值配置表列表
|
||||
export function listParaConfig(query) {
|
||||
return request({
|
||||
url: "/paraConfig/list",
|
||||
method: "get",
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询参数值配置表列表
|
||||
export function listParaConfigAll(query) {
|
||||
return request({
|
||||
url: "/paraConfig/listAll",
|
||||
method: "get",
|
||||
params: query,
|
||||
});
|
||||
}
|
||||
|
||||
// 查询参数值配置表详细
|
||||
export function getParaConfig(id) {
|
||||
return request({
|
||||
url: "/paraConfig/" + id,
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
// 新增参数值配置表
|
||||
export function addParaConfig(data) {
|
||||
return request({
|
||||
url: "/paraConfig",
|
||||
method: "post",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 修改参数值配置表
|
||||
export function updateParaConfig(data) {
|
||||
return request({
|
||||
url: "/paraConfig",
|
||||
method: "put",
|
||||
data: data,
|
||||
});
|
||||
}
|
||||
|
||||
// 删除参数值配置表
|
||||
export function delParaConfig(id) {
|
||||
return request({
|
||||
url: "/paraConfig/" + id,
|
||||
method: "delete",
|
||||
});
|
||||
}
|
||||
|
||||
// 超压底缸
|
||||
export function cydgdataRealTime() {
|
||||
return request({
|
||||
url: "/test/screen/cydgdataRealTime",
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
// 中高顶辊
|
||||
export function zgdgTopdataRealTime() {
|
||||
return request({
|
||||
url: "/test/screen/zgdgTopdataRealTime",
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
// 中高底辊
|
||||
export function zgdgBottodataRealTime() {
|
||||
return request({
|
||||
url: "/test/screen/zgdgBottodataRealTime",
|
||||
method: "get",
|
||||
});
|
||||
}
|
@ -1,69 +0,0 @@
|
||||
import request from "@/utils/request";
|
||||
|
||||
// 查询测试界面数据
|
||||
//rX1:X1轴震动传感器,rX2:X2轴震动传感器,rY1:Y1轴震动传感器,rY2:Y2轴震动传感器,z:Z轴震动传感器
|
||||
//iPM4:4um颗粒度,iPM6:6um颗粒度,iPM14:14um颗粒度,iPM21:21um颗粒度,rPT1:进油温度,rPT2:回油温度,rRH:相对湿度,rU:粘度
|
||||
//oil:rPT1:进油温度,rPT2:回油温度,rSP1:进油压力
|
||||
//equConfig:equMode型号,equName名称,equStatus状态,equPlace安装位置,equDate维修记录
|
||||
export function listData() {
|
||||
return request({
|
||||
url: "/test/screen/data",
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
// 超压底缸
|
||||
export function cydgdata() {
|
||||
return request({
|
||||
url: "/test/screen/cydgdata",
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
// 中高顶辊
|
||||
export function zgdgTopdata() {
|
||||
return request({
|
||||
url: "/test/screen/zgdgTopdata",
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
// 中高底辊
|
||||
export function zgdgBottomdata() {
|
||||
return request({
|
||||
url: "/test/screen/zgdgBottomdata",
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
export function zgdkdata() {
|
||||
return request({
|
||||
url: "/test/screen/zgdkdata",
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
// 历史报警数据
|
||||
// 超压底缸
|
||||
export function cydgdataHistory() {
|
||||
return request({
|
||||
url: "/test/screen/cydgdataHistory",
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
// 中高顶辊
|
||||
export function zgdgTopdataHistory() {
|
||||
return request({
|
||||
url: "/test/screen/zgdgTopdataHistory",
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
|
||||
// 中高底辊
|
||||
export function zgdgBottomdataHistory() {
|
||||
return request({
|
||||
url: "/test/screen/zgdgBottomdataHistory",
|
||||
method: "get",
|
||||
});
|
||||
}
|
@ -1,77 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询报警管理列表
|
||||
export function listAlarm(query) {
|
||||
return request({
|
||||
url: '/measure/alarm/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询报警管理详细
|
||||
export function getAlarm(id) {
|
||||
return request({
|
||||
url: '/measure/alarm/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增报警管理
|
||||
export function addAlarm(data) {
|
||||
return request({
|
||||
url: '/measure/alarm',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改报警管理
|
||||
export function updateAlarm(data) {
|
||||
return request({
|
||||
url: '/measure/alarm',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除报警管理
|
||||
export function delAlarm(id) {
|
||||
return request({
|
||||
url: '/measure/alarm/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询报警次数
|
||||
export function getAlarmTimes(id) {
|
||||
return request({
|
||||
url: '/measure/alarm/times?equipId=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询设备状态变化数据详细
|
||||
export function getChange(id) {
|
||||
return request({
|
||||
url: '/system/change/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询设备状态变化数据详细
|
||||
export function getRunDetail(id) {
|
||||
return request({
|
||||
url: '/system/change/run/detail?equipId=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询设备的严重等级和最新状态
|
||||
////设备状态:0:正常,1:闲置,2:预警 3:维修 4:保养 5:报废
|
||||
export function getAlarmLevelStatus() {
|
||||
return request({
|
||||
url: '/measure/alarm/levelinfo',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
@ -1,60 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询故障信息管理列表
|
||||
export function listBreakdown(query) {
|
||||
return request({
|
||||
url: '/observe/breakdown/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询故障信息管理详细
|
||||
export function getBreakdown(id) {
|
||||
return request({
|
||||
url: '/observe/breakdown/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增故障信息管理
|
||||
export function addBreakdown(data) {
|
||||
return request({
|
||||
url: '/observe/breakdown',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改故障信息管理
|
||||
export function updateBreakdown(data) {
|
||||
return request({
|
||||
url: '/observe/breakdown',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除故障信息管理
|
||||
export function delBreakdown(id) {
|
||||
return request({
|
||||
url: '/observe/breakdown/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询故障次数
|
||||
export function getBreakdownTimes(id) {
|
||||
return request({
|
||||
url: '/observe/breakdown/times?equipId=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 查询各种类型故障的数量
|
||||
export function getBreakdownTypes() {
|
||||
return request({
|
||||
url: '/observe/breakdown/type/number' ,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询预警规则管理列表
|
||||
export function listRules(query) {
|
||||
return request({
|
||||
url: '/system/rules/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询预警规则管理详细
|
||||
export function getRules(id) {
|
||||
return request({
|
||||
url: '/system/rules/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增预警规则管理
|
||||
export function addRules(data) {
|
||||
return request({
|
||||
url: '/system/rules',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改预警规则管理
|
||||
export function updateRules(data) {
|
||||
return request({
|
||||
url: '/system/rules',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除预警规则管理
|
||||
export function delRules(id) {
|
||||
return request({
|
||||
url: '/system/rules/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
@ -1,160 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<div
|
||||
ref="chart"
|
||||
style="width: 100%; height: 400px;"
|
||||
></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from "echarts";
|
||||
// @/assets/icons/svg/list.svg
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
internalTreeData: {
|
||||
name: "服务器故障",
|
||||
symbol:
|
||||
"path://M800.450704 721.126761v158.647887c-96.630986-76.439437-191.819718-115.380282-288.450704-115.380282S320.180282 803.335211 223.549296 879.774648V721.126761c0-175.95493 96.630986-334.602817 288.450704-475.943662 191.819718 141.340845 288.450704 299.988732 288.450704 475.943662z",
|
||||
color: "#FF0000",
|
||||
labelColor: "blue", // 自定义 label 颜色
|
||||
children: [
|
||||
{
|
||||
name: "", //资源短缺
|
||||
symbol:
|
||||
"path://M513.677 1023.503L70.73 769.705l-1.679-510.503L510.321 2.498 953.27 256.293l1.678 510.505-441.271 256.705zM95.683 755.189l417.899 239.446L929.9 752.447l-1.584-481.638-417.9-239.444L94.1 273.554l1.583 481.635z",
|
||||
color: "#00FF00",
|
||||
lineColor: "green",
|
||||
children: [
|
||||
{
|
||||
name: "内存过多",
|
||||
symbol:
|
||||
"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",
|
||||
color: "#0000FF",
|
||||
lineColor: "purple",
|
||||
children: [
|
||||
{
|
||||
name: "具体的内存问题内容可能很长,如果超出会隐藏",
|
||||
symbol: "custom://icon-path",
|
||||
color: "#0000FF",
|
||||
lineColor: "purple",
|
||||
children: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "CPU",
|
||||
symbol:
|
||||
"image://data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAFXA+cDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAr/xAAUEAEAAAAAAAAAAAAAAAAAAAAA/8QAFAEBAAAAAAAAAAAAAAAAAAAAAP/EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAMAwEAAhEDEQA/AL+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAf/9k=",
|
||||
color: "#FFA500",
|
||||
lineColor: "orange",
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
name: "硬盘",
|
||||
symbol:
|
||||
"image://data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/XBs/fNwfjZ0frl3/zy7////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkAABAALAAAAAAQABAAAAVVICSOZGlCQAosJ6mu7fiyZeKqNKToQGDsM8hBADgUXoGAiqhSvp5QAnQKGIgUhwFUYLCVDFCrKUE1lBavAViFIDlTImbKC5Gm2hB0SlBCBMQiB0UjIQA7",
|
||||
color: "blue",
|
||||
lineColor: "brown",
|
||||
children: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.chart = echarts.init(this.$refs.chart);
|
||||
this.drawFaultTree();
|
||||
},
|
||||
methods: {
|
||||
drawFaultTree() {
|
||||
const option = {
|
||||
series: [
|
||||
{
|
||||
type: "tree",
|
||||
data: [this.convertToEChartsTree(this.internalTreeData)],
|
||||
top: "10%",
|
||||
left: "20%",
|
||||
bottom: "10%",
|
||||
right: "20%",
|
||||
symbolSize: [60, 40],
|
||||
label: {
|
||||
position: "inside",
|
||||
align: "center",
|
||||
fontSize: 12,
|
||||
color: "#fff",
|
||||
color: this.internalTreeData.labelColor || "#fff", // 使用节点自定义的 label 颜色
|
||||
},
|
||||
leaves: {
|
||||
label: {
|
||||
position: "bottom",
|
||||
verticalAlign: "middle",
|
||||
align: "center",
|
||||
fontSize: 12,
|
||||
color: this.internalTreeData.labelColor || "#fff",
|
||||
},
|
||||
},
|
||||
// 开启折线后无法设定各连接线颜色
|
||||
edgeForkPosition: "50%", // 正交布局下当边的形状是折线时,子树中折线段分叉的位置。
|
||||
edgeShape: "curve", // 树图在 正交布局 下,边的形状。分别有曲线和折线两种,对应的取值是 curve 和 polyline.
|
||||
orient: "TB",
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
this.chart.setOption(option);
|
||||
},
|
||||
convertToEChartsTree(node) {
|
||||
const echartsNode = {
|
||||
name: node.name,
|
||||
symbol: node.symbol,
|
||||
symbolSize: [60, 40],
|
||||
itemStyle: {
|
||||
color: node.color,
|
||||
},
|
||||
label: {
|
||||
formatter: `{a|${node.name}}\n{b|Custom Text}`,
|
||||
rich: {
|
||||
a: {
|
||||
fontSize: 12,
|
||||
color: node.labelColor || "#fff", // 使用节点自定义的 label 颜色
|
||||
lineHeight: 14,
|
||||
},
|
||||
b: {
|
||||
fontSize: 10,
|
||||
color: "#aaa",
|
||||
lineHeight: 12,
|
||||
},
|
||||
},
|
||||
},
|
||||
children: [],
|
||||
};
|
||||
|
||||
for (const child of node.children) {
|
||||
const childNode = this.convertToEChartsTree(child);
|
||||
echartsNode.children.push(childNode);
|
||||
|
||||
if (child.lineColor) {
|
||||
childNode.lineStyle = {
|
||||
color: child.lineColor,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
return echartsNode;
|
||||
},
|
||||
},
|
||||
beforeDestroy() {
|
||||
if (this.chart) {
|
||||
this.chart.dispose();
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/* 根据需要添加样式 */
|
||||
</style>
|
@ -1,164 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="component-wrapper">
|
||||
<vue-okr-tree
|
||||
:data="testData"
|
||||
show-collapsable
|
||||
default-expand-all
|
||||
:node-btn-content="renderContent"
|
||||
></vue-okr-tree>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { VueOkrTree } from "@/components/VueOkrTree/index.js";
|
||||
import _ from "lodash";
|
||||
export default {
|
||||
components: {
|
||||
VueOkrTree,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
testData: [
|
||||
{
|
||||
label: "xxx科技有有限公司",
|
||||
content: "这是一个有活力的公司",
|
||||
nodeDsc: "智",
|
||||
iconCls: "icon-yumen",
|
||||
nodeBorderColor: "#ddd",
|
||||
children: [
|
||||
{
|
||||
label: "产品研发部",
|
||||
content: "这是一个有活力的产品研发部",
|
||||
nodeDsc: "材",
|
||||
iconCls: "icon-huomen",
|
||||
nodeBorderColor: "#000",
|
||||
children: [
|
||||
{
|
||||
label: "研发-前端",
|
||||
content: "这是一个有活力的研发-前端",
|
||||
nodeBorderColor: "black",
|
||||
},
|
||||
{
|
||||
label: "研发-后端",
|
||||
content: "这是一个有活力的研发-后端",
|
||||
nodeShapeType: "trigle",
|
||||
nodeBorderColor: "black",
|
||||
nodeBorderColor: "red",
|
||||
nodeFontColor: "#00FF00",
|
||||
},
|
||||
{
|
||||
label: "UI 设计",
|
||||
content: "这是一个有活力的UI 设计",
|
||||
nodeShapeType: "trigleReverse",
|
||||
nodeBorderColor: "red",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "销售部",
|
||||
content: "这是一个有活力的销售部",
|
||||
nodeDsc: "慧",
|
||||
iconCls: "icon-jinmen",
|
||||
nodeBorderColor: "#00FF00",
|
||||
children: [
|
||||
{
|
||||
label: "销售一部",
|
||||
content: "这是一个有活力的销售一部",
|
||||
nodeBorderColor: "#FF0000",
|
||||
nodeShapeType: "circle",
|
||||
nodeFontColor: "#00FF00",
|
||||
nodeBorderColor: "red",
|
||||
},
|
||||
{
|
||||
label: "销售二部",
|
||||
content: "这是一个有活力的销售二部",
|
||||
nodeBorderColor: "red",
|
||||
nodeShapeType: "diamond",
|
||||
nodeBorderColor: "red",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "财务部",
|
||||
content: "这是一个有活力的财务部",
|
||||
nodeBorderColor: "#FF0000",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
// renderContent(h, node) {
|
||||
// console.log("h", h);
|
||||
// console.log("node", node);
|
||||
// let des = node.data.nodeDsc + "";
|
||||
// return <div class="org-chart-node-btn-text">撒</div>;
|
||||
// },
|
||||
renderContent(h, node) {
|
||||
console.log("h", h);
|
||||
console.log("node", node);
|
||||
let des = node.data.nodeDsc;
|
||||
let iconCls = node.data.iconCls;
|
||||
if (iconCls) {
|
||||
return this.$createElement(
|
||||
"p",
|
||||
{
|
||||
class: "org-chart-node-btn-text iconfont " + iconCls,
|
||||
},
|
||||
""
|
||||
);
|
||||
} else if (des) {
|
||||
return this.$createElement(
|
||||
"p",
|
||||
{
|
||||
class: "org-chart-node-btn-text",
|
||||
},
|
||||
des
|
||||
);
|
||||
} else {
|
||||
return <div class="org-chart-node-btn-text"></div>;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import '@/theme/index.scss';
|
||||
.component-wrapper {
|
||||
@include font_color(fontPrimary);
|
||||
}
|
||||
.org-chart-node-label .org-chart-node-btn {
|
||||
border-color: transparent !important;
|
||||
box-shadow: none !important;
|
||||
/* margin-top: 20px !important; */
|
||||
}
|
||||
.org-chart-node-children {
|
||||
/* padding-top: 40px !important; */
|
||||
}
|
||||
.org-chart-node-btn-text.iconfont.icon-connect {
|
||||
font-size: 18px;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
top: -12px;
|
||||
}
|
||||
/**按钮文 */
|
||||
.org-chart-node-btn-text {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: #fff;
|
||||
border-radius: 50%;
|
||||
font-size: 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #909090;
|
||||
z-index: 2;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,301 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container image-background">
|
||||
<div class="content-but">
|
||||
<div
|
||||
v-if="refresh"
|
||||
class="button-start"
|
||||
@click="stopRefresh"
|
||||
>暂停刷新</div>
|
||||
<div
|
||||
v-else
|
||||
class="button-stop"
|
||||
@click="startRefresh"
|
||||
>自动刷新</div>
|
||||
</div>
|
||||
<el-table
|
||||
class="tableCss"
|
||||
v-loading="loading"
|
||||
:data="dataList"
|
||||
:row-class-name="tableRowClassName"
|
||||
header-row-class-name="header-row"
|
||||
>
|
||||
<el-table-column
|
||||
label="序号"
|
||||
type="index"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.$index + 1}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="时间"
|
||||
align="center"
|
||||
key="insertTime"
|
||||
prop="insertTime"
|
||||
width="200"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="4μm颗粒度"
|
||||
align="center"
|
||||
key="iPM4"
|
||||
prop="iPM4"
|
||||
/>
|
||||
<el-table-column
|
||||
label="6μm颗粒度"
|
||||
align="center"
|
||||
key="iPM6"
|
||||
prop="iPM6"
|
||||
/>
|
||||
<el-table-column
|
||||
label="14μm颗粒度"
|
||||
align="center"
|
||||
key="iPM14"
|
||||
prop="iPM14"
|
||||
/>
|
||||
<el-table-column
|
||||
label="21μm颗粒度"
|
||||
align="center"
|
||||
key="iPM21"
|
||||
prop="iPM21"
|
||||
show-overflow-tooltip="false"
|
||||
/>
|
||||
<el-table-column
|
||||
label="进油油液温度"
|
||||
align="center"
|
||||
key="rPT1"
|
||||
prop="rPT1"
|
||||
show-overflow-tooltip="false"
|
||||
/>
|
||||
<el-table-column
|
||||
label="回油油液温度"
|
||||
align="center"
|
||||
key="rPT2"
|
||||
prop="rPT2"
|
||||
show-overflow-tooltip="false"
|
||||
/>
|
||||
<el-table-column
|
||||
label="进油压力"
|
||||
align="center"
|
||||
key="rSP1"
|
||||
prop="rSP1"
|
||||
show-overflow-tooltip="false"
|
||||
/>
|
||||
<el-table-column
|
||||
label="相对湿度"
|
||||
align="center"
|
||||
key="rRH"
|
||||
prop="rRH"
|
||||
show-overflow-tooltip="false"
|
||||
/>
|
||||
<el-table-column
|
||||
label="油液粘度"
|
||||
align="center"
|
||||
key="rU"
|
||||
prop="rU"
|
||||
show-overflow-tooltip="false"
|
||||
/>
|
||||
<el-table-column
|
||||
label="油液密度"
|
||||
align="center"
|
||||
show-overflow-tooltip="false"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.rp == undefined || scope.row.rp == null ? "0" : scope.row.rp}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="X1轴震动"
|
||||
align="center"
|
||||
key="rX1"
|
||||
prop="rX1"
|
||||
show-overflow-tooltip="false"
|
||||
/>
|
||||
<el-table-column
|
||||
label="X2轴震动"
|
||||
align="center"
|
||||
key="rX2"
|
||||
prop="rX2"
|
||||
show-overflow-tooltip="false"
|
||||
/>
|
||||
<el-table-column
|
||||
label="Y1轴震动"
|
||||
align="center"
|
||||
key="rY1"
|
||||
prop="rY1"
|
||||
show-overflow-tooltip="false"
|
||||
/>
|
||||
<el-table-column
|
||||
label="Y2轴震动"
|
||||
align="center"
|
||||
key="rY2"
|
||||
prop="rY2"
|
||||
show-overflow-tooltip="false"
|
||||
/>
|
||||
<el-table-column
|
||||
label="z轴震动"
|
||||
align="center"
|
||||
key="rZ"
|
||||
prop="rZ"
|
||||
show-overflow-tooltip="false"
|
||||
/>
|
||||
<el-table-column
|
||||
label="负载"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.rL == undefined || scope.row.rL == null ? "0" : scope.row.rL}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="车速"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.rS == undefined || scope.row.rS == null ? "0" : scope.row.rS}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { dataList } from "@/api/industrial/dataLog";
|
||||
export default {
|
||||
name: "dataLog",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
dataList: [],
|
||||
refresh: false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询参数列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
dataList(this.queryParams).then((response) => {
|
||||
this.dataList = response.data;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
if (rowIndex % 2 === 0) {
|
||||
return "color-row";
|
||||
}
|
||||
return "";
|
||||
},
|
||||
startRefresh() {
|
||||
this.refresh = true;
|
||||
this.getDataTimer = setInterval(() => {
|
||||
this.getList();
|
||||
}, 1000);
|
||||
},
|
||||
stopRefresh() {
|
||||
clearInterval(this.getDataTimer);
|
||||
this.refresh = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@import '@/theme/index.scss';
|
||||
.color-row {
|
||||
@include background_color(tableRowBackgroundColor);
|
||||
}
|
||||
.header-row {
|
||||
background: linear-gradient(180deg, #0b2357 0%, #2094dc 48%, #0b2357 100%);
|
||||
opacity: 1;
|
||||
}
|
||||
.header-row .cell {
|
||||
@include font_color(fontPrimary);
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
@import '@/theme/index.scss';
|
||||
.image-background {
|
||||
@include background_bg(homeBackgroundImage);
|
||||
height: 100%;
|
||||
padding-top: 0px;
|
||||
}
|
||||
.content {
|
||||
max-width: 1400px;
|
||||
margin: auto;
|
||||
}
|
||||
.success {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin-right: 10px;
|
||||
box-shadow: 0px 0px 6px 0px #0ddf7a, 0px 0px 10px 0px #0ddf7a;
|
||||
opacity: 1;
|
||||
border: 2px solid #0ddf7a;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.fail {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin-right: 10px;
|
||||
box-shadow: 0px 0px 6px 0px #ff473e, 0px 0px 10px 0px #ff473e;
|
||||
opacity: 1;
|
||||
border: 2px solid #ff473e;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.data-status-wrapper {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
span {
|
||||
position: relative;
|
||||
top: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.content-but {
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
float: right;
|
||||
padding-right: 50px;
|
||||
}
|
||||
|
||||
.button-start {
|
||||
width: 100px;
|
||||
height: 32px;
|
||||
background: linear-gradient(180deg, #f18c41 0%, #b94e00 100%);
|
||||
border-radius: 2px 2px 2px 2px;
|
||||
opacity: 0.9;
|
||||
border: 1px solid #f1bf23;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.button-stop {
|
||||
width: 100px;
|
||||
height: 32px;
|
||||
background: linear-gradient(180deg, #3fbaff 0%, #0a4e83 100%);
|
||||
border-radius: 2px 2px 2px 2px;
|
||||
opacity: 0.9;
|
||||
border: 1px solid #3fbaff;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
@ -1,234 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container image-background">
|
||||
<el-row :gutter="10">
|
||||
<el-col
|
||||
:span="6"
|
||||
class="content"
|
||||
v-for="(item, index) in paraConfigList"
|
||||
:key="index"
|
||||
>
|
||||
<div class="content-header">
|
||||
<div class="img">
|
||||
<span style="font-weight: bold;font-size:17px">{{item.name}}</span>
|
||||
({{item.unit}})
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-border">
|
||||
<div class="content-border-div">
|
||||
<div class="content-border-left">
|
||||
<img src="../../../../assets/images/industrial/para_1.png">
|
||||
实际值
|
||||
</div>
|
||||
<div class="content-border-right">
|
||||
{{item.realityValue}}
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="content-border-div"
|
||||
style="margin-top:15px;"
|
||||
>
|
||||
<div class="content-border-left">
|
||||
<img src="../../../../assets/images/industrial/para_2.png">
|
||||
合理范围
|
||||
</div>
|
||||
<div class="content-border-right">
|
||||
{{item.referenceName}}
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="content-border-div"
|
||||
style="margin-top:15px;"
|
||||
>
|
||||
<div class="content-border-left">
|
||||
<img src="../../../../assets/images/industrial/para_3.png">
|
||||
报警管理
|
||||
</div>
|
||||
<div class="content-border-right">
|
||||
<el-tooltip
|
||||
class="item"
|
||||
effect="dark"
|
||||
:content="item.alarmDetail == undefined ? item.name + '报警' : item.alarmDetail"
|
||||
placement="bottom"
|
||||
>
|
||||
<div
|
||||
v-if="item.comResult == false"
|
||||
class="text-overflow"
|
||||
>
|
||||
{{item.alarmDetail == undefined ? item.name + '报警' : item.alarmDetail}}
|
||||
</div>
|
||||
</el-tooltip>
|
||||
|
||||
<div v-if="item.comResult != false">
|
||||
正常
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="content-border-div"
|
||||
style="margin-top:15px;"
|
||||
>
|
||||
<div
|
||||
class="content-border-button cursor-div"
|
||||
v-if="item.comResult == false"
|
||||
@click="$router.push(`/alarm?id=${item.alarmId}`)"
|
||||
>
|
||||
<div class="fail"></div>
|
||||
<span>数据异常</span>
|
||||
</div>
|
||||
<div
|
||||
class="content-border-button"
|
||||
v-else
|
||||
>
|
||||
<div class="success"></div>
|
||||
<span>数据正常</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { cydgdataRealTime } from "@/api/industrial/paraConfig";
|
||||
export default {
|
||||
name: "detection",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
paraConfigList: [],
|
||||
// 定时任务
|
||||
intervalTask: null,
|
||||
};
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.intervalTask);
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.intervalTask = setInterval(() => {
|
||||
// 查询数据
|
||||
this.getList();
|
||||
}, 1000);
|
||||
},
|
||||
methods: {
|
||||
/** 查询参数列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
cydgdataRealTime().then((response) => {
|
||||
this.paraConfigList = response.data;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@import '@/theme/index.scss';
|
||||
.image-background {
|
||||
@include background_bg(homeBackgroundImage);
|
||||
padding-bottom: 50px;
|
||||
padding-top: 0px;
|
||||
}
|
||||
.content {
|
||||
height: 290px;
|
||||
padding-top: 20px;
|
||||
margin-top: 15px;
|
||||
.content-header {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.img {
|
||||
width: 260px;
|
||||
height: 40px;
|
||||
background-image: url(../../../../assets/images/industrial/header.png);
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.content-border {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
border: 1px #2f4a95eb solid;
|
||||
margin-top: -20px;
|
||||
padding: 50px 15px 15px 15px;
|
||||
.content-border-div {
|
||||
width: 100%;
|
||||
.content-border-left {
|
||||
height: 40px;
|
||||
width: 48%;
|
||||
float: left;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-left: 20px !important;
|
||||
background-color: #0b2d57;
|
||||
opacity: 0.7;
|
||||
margin-right: 3%;
|
||||
img {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.content-border-right {
|
||||
height: 40px;
|
||||
width: 48%;
|
||||
padding-right: 6px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-left: 20px !important;
|
||||
background-color: #13345d;
|
||||
color: #80d1ff;
|
||||
.text-overflow {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
-o-text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
.content-border-button {
|
||||
width: 50%;
|
||||
margin-left: 25%;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border: 1px #2f4a95eb dashed;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.success {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin-right: 10px;
|
||||
box-shadow: 0px 0px 6px 0px #0ddf7a, 0px 0px 10px 0px #0ddf7a;
|
||||
opacity: 1;
|
||||
border: 2px solid #0ddf7a;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.fail {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin-right: 10px;
|
||||
box-shadow: 0px 0px 6px 0px #ff473e, 0px 0px 10px 0px #ff473e;
|
||||
opacity: 1;
|
||||
border: 2px solid #ff473e;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.cursor-div {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
@ -1,191 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container image-background">
|
||||
<div class="content">
|
||||
<el-table
|
||||
class="tableCss"
|
||||
v-loading="loading"
|
||||
:data="paraConfigList"
|
||||
:row-class-name="tableRowClassName"
|
||||
header-row-class-name="header-row"
|
||||
>
|
||||
<el-table-column
|
||||
label="名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
width="240"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单位"
|
||||
align="center"
|
||||
key="unit"
|
||||
prop="unit"
|
||||
:show-overflow-tooltip="true"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
label="实际值"
|
||||
align="center"
|
||||
key="realityValue"
|
||||
prop="realityValue"
|
||||
width="100"
|
||||
:show-overflow-tooltip="false"
|
||||
/>
|
||||
<el-table-column
|
||||
label="数据状态"
|
||||
align="center"
|
||||
width="140"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
v-if="scope.row.comResult == false"
|
||||
class="data-status-wrapper"
|
||||
>
|
||||
<div class="fail"></div>
|
||||
<span>数据异常</span>
|
||||
</div>
|
||||
<div
|
||||
v-else
|
||||
class="data-status-wrapper"
|
||||
>
|
||||
<div class="success"></div>
|
||||
<span>数据正常</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="合理范围"
|
||||
align="center"
|
||||
key="referenceName"
|
||||
prop="referenceName"
|
||||
:show-overflow-tooltip="true"
|
||||
width="180"
|
||||
/>
|
||||
<el-table-column
|
||||
label="报警管理"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
class="cursor-div"
|
||||
v-if="scope.row.comResult == false"
|
||||
@click="$router.push(`/alarm?id=${scope.row.alarmId}`)"
|
||||
>
|
||||
{{scope.row.alarmDetail == undefined ? scope.row.name + '报警' : scope.row.alarmDetail}}
|
||||
</div>
|
||||
<div v-else>
|
||||
正常
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { cydgdataRealTime } from "@/api/industrial/paraConfig";
|
||||
export default {
|
||||
name: "detection",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
paraConfigList: [],
|
||||
// 定时任务
|
||||
intervalTask: null,
|
||||
};
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.intervalTask);
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.intervalTask = setInterval(() => {
|
||||
// 查询数据
|
||||
this.getList();
|
||||
}, 1000);
|
||||
},
|
||||
methods: {
|
||||
/** 查询参数列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
cydgdataRealTime().then((response) => {
|
||||
this.paraConfigList = response.data;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
if (rowIndex % 2 === 0) {
|
||||
return "color-row";
|
||||
}
|
||||
return "";
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@import '@/theme/index.scss';
|
||||
.color-row {
|
||||
@include background_color(tableRowBackgroundColor);
|
||||
}
|
||||
.header-row {
|
||||
background: linear-gradient(180deg, #0b2357 0%, #2094dc 48%, #0b2357 100%);
|
||||
opacity: 1;
|
||||
}
|
||||
.header-row .cell {
|
||||
color: white !important;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
@import '@/theme/index.scss';
|
||||
.image-background {
|
||||
@include background_bg(homeBackgroundImage);
|
||||
// height: 960px;
|
||||
}
|
||||
.content {
|
||||
max-width: 1400px;
|
||||
margin: auto;
|
||||
}
|
||||
.success {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin-right: 10px;
|
||||
box-shadow: 0px 0px 6px 0px #0ddf7a, 0px 0px 10px 0px #0ddf7a;
|
||||
opacity: 1;
|
||||
border: 2px solid #0ddf7a;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.fail {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin-right: 10px;
|
||||
box-shadow: 0px 0px 6px 0px #ff473e, 0px 0px 10px 0px #ff473e;
|
||||
opacity: 1;
|
||||
border: 2px solid #ff473e;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.data-status-wrapper {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
span {
|
||||
position: relative;
|
||||
top: 2px;
|
||||
}
|
||||
}
|
||||
.cursor-div {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
@ -1,234 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container image-background">
|
||||
<el-row :gutter="10">
|
||||
<el-col
|
||||
:span="6"
|
||||
class="content"
|
||||
v-for="(item, index) in paraConfigList"
|
||||
:key="index"
|
||||
>
|
||||
<div class="content-header">
|
||||
<div class="img">
|
||||
<span style="font-weight: bold;font-size:17px">{{item.name}}</span>
|
||||
({{item.unit}})
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-border">
|
||||
<div class="content-border-div">
|
||||
<div class="content-border-left">
|
||||
<img src="../../../../assets/images/industrial/para_1.png">
|
||||
实际值
|
||||
</div>
|
||||
<div class="content-border-right">
|
||||
{{item.realityValue}}
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="content-border-div"
|
||||
style="margin-top:15px;"
|
||||
>
|
||||
<div class="content-border-left">
|
||||
<img src="../../../../assets/images/industrial/para_2.png">
|
||||
合理范围
|
||||
</div>
|
||||
<div class="content-border-right">
|
||||
{{item.referenceName}}
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="content-border-div"
|
||||
style="margin-top:15px;"
|
||||
>
|
||||
<div class="content-border-left">
|
||||
<img src="../../../../assets/images/industrial/para_3.png">
|
||||
报警管理
|
||||
</div>
|
||||
<div class="content-border-right">
|
||||
<el-tooltip
|
||||
class="item"
|
||||
effect="dark"
|
||||
:content="item.alarmDetail == undefined ? item.name + '报警' : item.alarmDetail"
|
||||
placement="bottom"
|
||||
>
|
||||
<div
|
||||
v-if="item.comResult == false"
|
||||
class="text-overflow"
|
||||
>
|
||||
{{item.alarmDetail == undefined ? item.name + '报警' : item.alarmDetail}}
|
||||
</div>
|
||||
</el-tooltip>
|
||||
|
||||
<div v-if="item.comResult != false">
|
||||
正常
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="content-border-div"
|
||||
style="margin-top:15px;"
|
||||
>
|
||||
<div
|
||||
class="content-border-button cursor-div"
|
||||
v-if="item.comResult == false"
|
||||
@click="$router.push(`/alarm?id=${item.alarmId}`)"
|
||||
>
|
||||
<div class="fail"></div>
|
||||
<span>数据异常</span>
|
||||
</div>
|
||||
<div
|
||||
class="content-border-button"
|
||||
v-else
|
||||
>
|
||||
<div class="success"></div>
|
||||
<span>数据正常</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { zgdgBottodataRealTime } from "@/api/industrial/paraConfig";
|
||||
export default {
|
||||
name: "detection",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
paraConfigList: [],
|
||||
// 定时任务
|
||||
intervalTask: null,
|
||||
};
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.intervalTask);
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.intervalTask = setInterval(() => {
|
||||
// 查询数据
|
||||
this.getList();
|
||||
}, 1000);
|
||||
},
|
||||
methods: {
|
||||
/** 查询参数列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
zgdgBottodataRealTime().then((response) => {
|
||||
this.paraConfigList = response.data;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@import '@/theme/index.scss';
|
||||
.image-background {
|
||||
@include background_bg(homeBackgroundImage);
|
||||
padding-bottom: 50px;
|
||||
padding-top: 0px;
|
||||
}
|
||||
.content {
|
||||
height: 290px;
|
||||
padding-top: 20px;
|
||||
margin-top: 15px;
|
||||
.content-header {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.img {
|
||||
width: 260px;
|
||||
height: 40px;
|
||||
background-image: url(../../../../assets/images/industrial/header.png);
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.content-border {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
border: 1px #2f4a95eb solid;
|
||||
margin-top: -20px;
|
||||
padding: 50px 15px 15px 15px;
|
||||
.content-border-div {
|
||||
width: 100%;
|
||||
.content-border-left {
|
||||
height: 40px;
|
||||
width: 48%;
|
||||
float: left;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-left: 20px !important;
|
||||
background-color: #0b2d57;
|
||||
opacity: 0.7;
|
||||
margin-right: 3%;
|
||||
img {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.content-border-right {
|
||||
height: 40px;
|
||||
width: 48%;
|
||||
padding-right: 6px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-left: 20px !important;
|
||||
background-color: #13345d;
|
||||
color: #80d1ff;
|
||||
.text-overflow {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
-o-text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
.content-border-button {
|
||||
width: 50%;
|
||||
margin-left: 25%;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border: 1px #2f4a95eb dashed;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.success {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin-right: 10px;
|
||||
box-shadow: 0px 0px 6px 0px #0ddf7a, 0px 0px 10px 0px #0ddf7a;
|
||||
opacity: 1;
|
||||
border: 2px solid #0ddf7a;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.fail {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin-right: 10px;
|
||||
box-shadow: 0px 0px 6px 0px #ff473e, 0px 0px 10px 0px #ff473e;
|
||||
opacity: 1;
|
||||
border: 2px solid #ff473e;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.cursor-div {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
@ -1,191 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container image-background">
|
||||
<div class="content">
|
||||
<el-table
|
||||
class="tableCss"
|
||||
v-loading="loading"
|
||||
:data="paraConfigList"
|
||||
:row-class-name="tableRowClassName"
|
||||
header-row-class-name="header-row"
|
||||
>
|
||||
<el-table-column
|
||||
label="名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
width="240"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单位"
|
||||
align="center"
|
||||
key="unit"
|
||||
prop="unit"
|
||||
:show-overflow-tooltip="true"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
label="实际值"
|
||||
align="center"
|
||||
key="realityValue"
|
||||
prop="realityValue"
|
||||
width="100"
|
||||
:show-overflow-tooltip="false"
|
||||
/>
|
||||
<el-table-column
|
||||
label="数据状态"
|
||||
align="center"
|
||||
width="140"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
v-if="scope.row.comResult == false"
|
||||
class="data-status-wrapper"
|
||||
>
|
||||
<div class="fail"></div>
|
||||
<span>数据异常</span>
|
||||
</div>
|
||||
<div
|
||||
v-else
|
||||
class="data-status-wrapper"
|
||||
>
|
||||
<div class="success"></div>
|
||||
<span>数据正常</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="合理范围"
|
||||
align="center"
|
||||
key="referenceName"
|
||||
prop="referenceName"
|
||||
:show-overflow-tooltip="true"
|
||||
width="180"
|
||||
/>
|
||||
<el-table-column
|
||||
label="报警管理"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
class="cursor-div"
|
||||
v-if="scope.row.comResult == false"
|
||||
@click="$router.push(`/alarm?id=${scope.row.alarmId}`)"
|
||||
>
|
||||
{{scope.row.alarmDetail == undefined ? scope.row.name + '报警' : scope.row.alarmDetail}}
|
||||
</div>
|
||||
<div v-else>
|
||||
正常
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { zgdgBottodataRealTime } from "@/api/industrial/paraConfig";
|
||||
export default {
|
||||
name: "detection",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
paraConfigList: [],
|
||||
// 定时任务
|
||||
intervalTask: null,
|
||||
};
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.intervalTask);
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.intervalTask = setInterval(() => {
|
||||
// 查询数据
|
||||
this.getList();
|
||||
}, 1000);
|
||||
},
|
||||
methods: {
|
||||
/** 查询参数列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
zgdgBottodataRealTime().then((response) => {
|
||||
this.paraConfigList = response.data;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
if (rowIndex % 2 === 0) {
|
||||
return "color-row";
|
||||
}
|
||||
return "";
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@import '@/theme/index.scss';
|
||||
.color-row {
|
||||
@include background_color(tableRowBackgroundColor);
|
||||
}
|
||||
.header-row {
|
||||
background: linear-gradient(180deg, #0b2357 0%, #2094dc 48%, #0b2357 100%);
|
||||
opacity: 1;
|
||||
}
|
||||
.header-row .cell {
|
||||
color: white !important;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
@import '@/theme/index.scss';
|
||||
.image-background {
|
||||
@include background_bg(homeBackgroundImage);
|
||||
// height: 960px;
|
||||
}
|
||||
.content {
|
||||
max-width: 1400px;
|
||||
margin: auto;
|
||||
}
|
||||
.success {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin-right: 10px;
|
||||
box-shadow: 0px 0px 6px 0px #0ddf7a, 0px 0px 10px 0px #0ddf7a;
|
||||
opacity: 1;
|
||||
border: 2px solid #0ddf7a;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.fail {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin-right: 10px;
|
||||
box-shadow: 0px 0px 6px 0px #ff473e, 0px 0px 10px 0px #ff473e;
|
||||
opacity: 1;
|
||||
border: 2px solid #ff473e;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.data-status-wrapper {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
span {
|
||||
position: relative;
|
||||
top: 2px;
|
||||
}
|
||||
}
|
||||
.cursor-div {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
@ -1,234 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container image-background">
|
||||
<el-row :gutter="10">
|
||||
<el-col
|
||||
:span="6"
|
||||
class="content"
|
||||
v-for="(item, index) in paraConfigList"
|
||||
:key="index"
|
||||
>
|
||||
<div class="content-header">
|
||||
<div class="img">
|
||||
<span style="font-weight: bold;font-size:17px">{{item.name}}</span>
|
||||
({{item.unit}})
|
||||
</div>
|
||||
</div>
|
||||
<div class="content-border">
|
||||
<div class="content-border-div">
|
||||
<div class="content-border-left">
|
||||
<img src="../../../../assets/images/industrial/para_1.png">
|
||||
实际值
|
||||
</div>
|
||||
<div class="content-border-right">
|
||||
{{item.realityValue}}
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="content-border-div"
|
||||
style="margin-top:15px;"
|
||||
>
|
||||
<div class="content-border-left">
|
||||
<img src="../../../../assets/images/industrial/para_2.png">
|
||||
合理范围
|
||||
</div>
|
||||
<div class="content-border-right">
|
||||
{{item.referenceName}}
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="content-border-div"
|
||||
style="margin-top:15px;"
|
||||
>
|
||||
<div class="content-border-left">
|
||||
<img src="../../../../assets/images/industrial/para_3.png">
|
||||
报警管理
|
||||
</div>
|
||||
<div class="content-border-right">
|
||||
<el-tooltip
|
||||
class="item"
|
||||
effect="dark"
|
||||
:content="item.alarmDetail == undefined ? item.name + '报警' : item.alarmDetail"
|
||||
placement="bottom"
|
||||
>
|
||||
<div
|
||||
v-if="item.comResult == false"
|
||||
class="text-overflow"
|
||||
>
|
||||
{{item.alarmDetail == undefined ? item.name + '报警' : item.alarmDetail}}
|
||||
</div>
|
||||
</el-tooltip>
|
||||
|
||||
<div v-if="item.comResult != false">
|
||||
正常
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="content-border-div"
|
||||
style="margin-top:15px;"
|
||||
>
|
||||
<div
|
||||
class="content-border-button cursor-div"
|
||||
v-if="item.comResult == false"
|
||||
@click="$router.push(`/alarm?id=${item.alarmId}`)"
|
||||
>
|
||||
<div class="fail"></div>
|
||||
<span>数据异常</span>
|
||||
</div>
|
||||
<div
|
||||
class="content-border-button"
|
||||
v-else
|
||||
>
|
||||
<div class="success"></div>
|
||||
<span>数据正常</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { zgdgBottodataRealTime } from "@/api/industrial/paraConfig";
|
||||
export default {
|
||||
name: "detection",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
paraConfigList: [],
|
||||
// 定时任务
|
||||
intervalTask: null,
|
||||
};
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.intervalTask);
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.intervalTask = setInterval(() => {
|
||||
// 查询数据
|
||||
this.getList();
|
||||
}, 1000);
|
||||
},
|
||||
methods: {
|
||||
/** 查询参数列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
zgdgBottodataRealTime().then((response) => {
|
||||
this.paraConfigList = response.data;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@import '@/theme/index.scss';
|
||||
.image-background {
|
||||
@include background_bg(homeBackgroundImage);
|
||||
padding-bottom: 50px;
|
||||
padding-top: 0px;
|
||||
}
|
||||
.content {
|
||||
height: 290px;
|
||||
padding-top: 20px;
|
||||
margin-top: 15px;
|
||||
.content-header {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
position: relative;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.img {
|
||||
width: 260px;
|
||||
height: 40px;
|
||||
background-image: url(../../../../assets/images/industrial/header.png);
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.content-border {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
border: 1px #2f4a95eb solid;
|
||||
margin-top: -20px;
|
||||
padding: 50px 15px 15px 15px;
|
||||
.content-border-div {
|
||||
width: 100%;
|
||||
.content-border-left {
|
||||
height: 40px;
|
||||
width: 48%;
|
||||
float: left;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-left: 20px !important;
|
||||
background-color: #0b2d57;
|
||||
opacity: 0.7;
|
||||
margin-right: 3%;
|
||||
img {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
.content-border-right {
|
||||
height: 40px;
|
||||
width: 48%;
|
||||
padding-right: 6px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-left: 20px !important;
|
||||
background-color: #13345d;
|
||||
color: #80d1ff;
|
||||
.text-overflow {
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
-o-text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
.content-border-button {
|
||||
width: 50%;
|
||||
margin-left: 25%;
|
||||
height: 40px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border: 1px #2f4a95eb dashed;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.success {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin-right: 10px;
|
||||
box-shadow: 0px 0px 6px 0px #0ddf7a, 0px 0px 10px 0px #0ddf7a;
|
||||
opacity: 1;
|
||||
border: 2px solid #0ddf7a;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.fail {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin-right: 10px;
|
||||
box-shadow: 0px 0px 6px 0px #ff473e, 0px 0px 10px 0px #ff473e;
|
||||
opacity: 1;
|
||||
border: 2px solid #ff473e;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.cursor-div {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
@ -1,191 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container image-background">
|
||||
<div class="content">
|
||||
<el-table
|
||||
class="tableCss"
|
||||
v-loading="loading"
|
||||
:data="paraConfigList"
|
||||
:row-class-name="tableRowClassName"
|
||||
header-row-class-name="header-row"
|
||||
>
|
||||
<el-table-column
|
||||
label="名称"
|
||||
align="center"
|
||||
key="name"
|
||||
prop="name"
|
||||
:show-overflow-tooltip="true"
|
||||
width="240"
|
||||
/>
|
||||
<el-table-column
|
||||
label="单位"
|
||||
align="center"
|
||||
key="unit"
|
||||
prop="unit"
|
||||
:show-overflow-tooltip="true"
|
||||
width="100"
|
||||
/>
|
||||
<el-table-column
|
||||
label="实际值"
|
||||
align="center"
|
||||
key="realityValue"
|
||||
prop="realityValue"
|
||||
width="100"
|
||||
:show-overflow-tooltip="false"
|
||||
/>
|
||||
<el-table-column
|
||||
label="数据状态"
|
||||
align="center"
|
||||
width="140"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
v-if="scope.row.comResult == false"
|
||||
class="data-status-wrapper"
|
||||
>
|
||||
<div class="fail"></div>
|
||||
<span>数据异常</span>
|
||||
</div>
|
||||
<div
|
||||
v-else
|
||||
class="data-status-wrapper"
|
||||
>
|
||||
<div class="success"></div>
|
||||
<span>数据正常</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="合理范围"
|
||||
align="center"
|
||||
key="referenceName"
|
||||
prop="referenceName"
|
||||
:show-overflow-tooltip="true"
|
||||
width="180"
|
||||
/>
|
||||
<el-table-column
|
||||
label="报警管理"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<div
|
||||
class="cursor-div"
|
||||
v-if="scope.row.comResult == false"
|
||||
@click="$router.push(`/alarm?id=${scope.row.alarmId}`)"
|
||||
>
|
||||
{{scope.row.alarmDetail == undefined ? scope.row.name + '报警' : scope.row.alarmDetail}}
|
||||
</div>
|
||||
<div v-else>
|
||||
正常
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { zgdgBottodataRealTime } from "@/api/industrial/paraConfig";
|
||||
export default {
|
||||
name: "detection",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
paraConfigList: [],
|
||||
// 定时任务
|
||||
intervalTask: null,
|
||||
};
|
||||
},
|
||||
beforeDestroy() {
|
||||
clearInterval(this.intervalTask);
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.intervalTask = setInterval(() => {
|
||||
// 查询数据
|
||||
this.getList();
|
||||
}, 1000);
|
||||
},
|
||||
methods: {
|
||||
/** 查询参数列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
zgdgBottodataRealTime().then((response) => {
|
||||
this.paraConfigList = response.data;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
tableRowClassName({ row, rowIndex }) {
|
||||
if (rowIndex % 2 === 0) {
|
||||
return "color-row";
|
||||
}
|
||||
return "";
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
@import '@/theme/index.scss';
|
||||
.color-row {
|
||||
@include background_color(tableRowBackgroundColor);
|
||||
}
|
||||
.header-row {
|
||||
background: linear-gradient(180deg, #0b2357 0%, #2094dc 48%, #0b2357 100%);
|
||||
opacity: 1;
|
||||
}
|
||||
.header-row .cell {
|
||||
color: white !important;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="scss">
|
||||
@import '@/theme/index.scss';
|
||||
.image-background {
|
||||
@include background_bg(homeBackgroundImage);
|
||||
// height: 960px;
|
||||
}
|
||||
.content {
|
||||
max-width: 1400px;
|
||||
margin: auto;
|
||||
}
|
||||
.success {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin-right: 10px;
|
||||
box-shadow: 0px 0px 6px 0px #0ddf7a, 0px 0px 10px 0px #0ddf7a;
|
||||
opacity: 1;
|
||||
border: 2px solid #0ddf7a;
|
||||
border-radius: 12px;
|
||||
}
|
||||
.fail {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
margin-right: 10px;
|
||||
box-shadow: 0px 0px 6px 0px #ff473e, 0px 0px 10px 0px #ff473e;
|
||||
opacity: 1;
|
||||
border: 2px solid #ff473e;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.data-status-wrapper {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
span {
|
||||
position: relative;
|
||||
top: 2px;
|
||||
}
|
||||
}
|
||||
.cursor-div {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
Before Width: | Height: | Size: 323 KiB |
@ -1,30 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container image-background">
|
||||
<img
|
||||
src="./index.png"
|
||||
style="width:85%;"
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "alarm",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
};
|
||||
},
|
||||
created() {},
|
||||
methods: {},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@import '@/theme/index.scss';
|
||||
.image-background {
|
||||
@include background_bg(homeBackgroundImage);
|
||||
height: 960px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
Before Width: | Height: | Size: 2.2 MiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 8.0 KiB |
@ -1,875 +0,0 @@
|
||||
<template>
|
||||
<div class="test-screen-wrapper background-frame">
|
||||
<div id="testScreen"></div>
|
||||
<div class="side-part-wrapper">
|
||||
<div class="side-top-title background-frame">
|
||||
<span>油膜轴承系统油膜厚度特性</span>
|
||||
</div>
|
||||
<div class="side-card-item background-frame">
|
||||
<div class="side-card-item-title">油膜厚度X轴位置跳动</div>
|
||||
<div
|
||||
class="chart-ins"
|
||||
id="left1"
|
||||
></div>
|
||||
</div>
|
||||
<div class="side-card-item background-frame">
|
||||
<div class="side-card-item-title">油膜厚度Y轴位置跳动</div>
|
||||
<div
|
||||
class="chart-ins"
|
||||
id="left2"
|
||||
></div>
|
||||
</div>
|
||||
<div class="side-card-item background-frame">
|
||||
<div class="side-card-item-title">油膜厚度Z轴位置跳动</div>
|
||||
<div
|
||||
class="chart-ins"
|
||||
id="left3"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="middle-part-wrapper">
|
||||
<div class="mainImg-wrapper">
|
||||
<div class="load-no">
|
||||
<div class="load-no-empty">
|
||||
<img
|
||||
v-show="emptyStatus"
|
||||
src="./empty.png"
|
||||
>
|
||||
<img
|
||||
v-show="!emptyStatus"
|
||||
@click="handleStatus('stop')"
|
||||
src="./empty_no.png"
|
||||
>
|
||||
</div>
|
||||
<div class="load-no-load">
|
||||
<img
|
||||
v-show="loadStatus"
|
||||
src="./load.png"
|
||||
>
|
||||
<img
|
||||
v-show="!loadStatus"
|
||||
@click="handleStatus('start')"
|
||||
src="./load_no.png"
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div id="middleImg"></div> -->
|
||||
<div class="device-card background-frame">
|
||||
<div class="device-card-content">
|
||||
<div class="device-card-title">{{ equconfig.equMode }}</div>
|
||||
<div
|
||||
class="device-card-content-item"
|
||||
style="margin-top: 6px;"
|
||||
>
|
||||
<div class="device-card-content-label">设备型号</div>
|
||||
<div class="device-card-content-value">{{ equconfig.equName }}</div>
|
||||
</div>
|
||||
<div class="device-card-content-item">
|
||||
<div class="device-card-content-label">设备状态</div>
|
||||
<div class="device-card-content-value">{{ equconfig.equStatus }}</div>
|
||||
</div>
|
||||
<div class="device-card-content-item">
|
||||
<div class="device-card-content-label">安装位置</div>
|
||||
<div class="device-card-content-value">{{ equconfig.equPlace }}</div>
|
||||
</div>
|
||||
<div class="device-card-content-item">
|
||||
<div class="device-card-content-label">维修记录</div>
|
||||
<div class="device-card-content-value">{{ equconfig.equDate }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="middle-bottom-wrapper">
|
||||
<div class="middle-bottom-item background-frame">
|
||||
<div class="middle-bottom-item-title">油液颗粒度特性</div>
|
||||
<div
|
||||
class="chart-ins"
|
||||
id="middle1"
|
||||
></div>
|
||||
</div>
|
||||
<div class="middle-bottom-item background-frame">
|
||||
<div class="middle-bottom-item-title">油液温压特性</div>
|
||||
<div class="extra-chart-container">
|
||||
<div
|
||||
class="extra-chart"
|
||||
id="middle21"
|
||||
></div>
|
||||
<div
|
||||
class="extra-chart"
|
||||
id="middle22"
|
||||
></div>
|
||||
<div
|
||||
class="extra-chart"
|
||||
id="middle23"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="side-part-wrapper">
|
||||
<div class="side-top-title background-frame">
|
||||
<span>油膜轴承系统油品特性</span>
|
||||
</div>
|
||||
<div class="side-card-item background-frame">
|
||||
<div class="side-card-item-title">轧机油膜油温参数</div>
|
||||
<div
|
||||
class="chart-ins"
|
||||
id="right1"
|
||||
></div>
|
||||
</div>
|
||||
<div class="side-card-item background-frame">
|
||||
<div class="side-card-item-title">轧机油膜粘度参数</div>
|
||||
<div
|
||||
class="chart-ins"
|
||||
id="right2"
|
||||
></div>
|
||||
</div>
|
||||
<div class="side-card-item background-frame">
|
||||
<div class="side-card-item-title">轧机油膜湿度参数</div>
|
||||
<div
|
||||
class="chart-ins"
|
||||
id="right3"
|
||||
></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { merge, isArray } from "lodash";
|
||||
import * as echarts from "echarts";
|
||||
import { listData } from "@/api/testScreen/testScreen.js";
|
||||
import ThreeFrame from '@/utils/three/index';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
equconfig: {
|
||||
equMode: "",
|
||||
},
|
||||
leftChartIns1: null,
|
||||
leftChartIns2: null,
|
||||
leftChartIns3: null,
|
||||
middleChatIns1: null,
|
||||
middleChatIns21: null,
|
||||
middleChatIns22: null,
|
||||
middleChatIns23: null,
|
||||
rightChartIns1: null,
|
||||
rightChartIns2: null,
|
||||
rightChartIns3: null,
|
||||
XDATA: [],
|
||||
//空载状态
|
||||
emptyStatus: true,
|
||||
//负载状态
|
||||
loadStatus: false,
|
||||
setInterval: null,
|
||||
|
||||
threeIns: null,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.initCharts();
|
||||
this.setInterval = setInterval(() => {
|
||||
this.initCharts();
|
||||
}, 2000);
|
||||
this.initThreeIns();
|
||||
},
|
||||
beforeRouteLeave(to, from, next) {
|
||||
clearInterval(this.setInterval);
|
||||
next();
|
||||
},
|
||||
created() {
|
||||
// this.statusRefresh();
|
||||
},
|
||||
methods: {
|
||||
initThreeIns() {
|
||||
const targetElement = document.getElementById('testScreen');
|
||||
this.threeIns = new ThreeFrame({ targetElement });
|
||||
},
|
||||
handleStatus(status) {
|
||||
if (status === 'stop') {
|
||||
// 停止动画
|
||||
this.emptyStatus = true;
|
||||
this.loadStatus = false;
|
||||
if (this.threeIns && this.threeIns.action) {
|
||||
this.threeIns.action.paused = true;
|
||||
this.threeIns.isAnimationPlaying = false;
|
||||
}
|
||||
}
|
||||
if (status === 'start') {
|
||||
// 开始动画
|
||||
this.emptyStatus = false;
|
||||
this.loadStatus = true;
|
||||
if (this.threeIns && this.threeIns.action) {
|
||||
this.threeIns.action.paused = false;
|
||||
this.threeIns.isAnimationPlaying = true;
|
||||
}
|
||||
}
|
||||
},
|
||||
statusRefresh() {
|
||||
setTimeout(() => {
|
||||
this.emptyStatus = false;
|
||||
this.loadStatus = true;
|
||||
if (this.threeIns && this.threeIns.action) {
|
||||
this.threeIns.action.paused = false;
|
||||
this.threeIns.isAnimationPlaying = true;
|
||||
}
|
||||
}, 10000);
|
||||
},
|
||||
async initCharts() {
|
||||
const { data } = await listData();
|
||||
const {
|
||||
equConfig,
|
||||
xData,
|
||||
rX1,
|
||||
rX2,
|
||||
rY1,
|
||||
rY2,
|
||||
rZ,
|
||||
iPM4,
|
||||
iPM6,
|
||||
iPM14,
|
||||
iPM21,
|
||||
rPT1,
|
||||
rPT2,
|
||||
rU,
|
||||
rRH,
|
||||
oil,
|
||||
} = data;
|
||||
this.equconfig = equConfig;
|
||||
this.XDATA = xData;
|
||||
this.initLeftChart1(rX1, rX2);
|
||||
this.initLeftChart2(rY1, rY2);
|
||||
this.initLeftChart3(rZ);
|
||||
this.initMiddleChart1(iPM4, iPM6, iPM14, iPM21);
|
||||
this.initMiddleChart2(oil);
|
||||
this.initRightChart1(rPT1, rPT2);
|
||||
this.initRightChart2(rU);
|
||||
this.initRightChart3(rRH);
|
||||
},
|
||||
initLeftChart1(rX1, rX2) {
|
||||
const chartDom = document.getElementById("left1");
|
||||
this.leftChartIns1 = echarts.init(chartDom, "defalut");
|
||||
this.leftChartIns1.setOption(
|
||||
this.generateOptions({
|
||||
yAxis: { name: "单位:μm" },
|
||||
series: [
|
||||
{
|
||||
name: "X1轴",
|
||||
type: "line",
|
||||
data: rX1,
|
||||
symbol: "none",
|
||||
},
|
||||
{
|
||||
name: "X2轴",
|
||||
type: "line",
|
||||
data: rX2,
|
||||
symbol: "none",
|
||||
},
|
||||
],
|
||||
}),
|
||||
true,
|
||||
true
|
||||
);
|
||||
window.addEventListener("resize", () => {
|
||||
this.leftChartIns1 && this.leftChartIns1.resize();
|
||||
});
|
||||
},
|
||||
initLeftChart2(rY1, rY2) {
|
||||
const chartDom = document.getElementById("left2");
|
||||
this.leftChartIns2 = echarts.init(chartDom, "defalut");
|
||||
this.leftChartIns2.setOption(
|
||||
this.generateOptions({
|
||||
yAxis: { name: "单位:μm" },
|
||||
series: [
|
||||
{
|
||||
name: "Y1轴",
|
||||
type: "line",
|
||||
data: rY1,
|
||||
symbol: "none",
|
||||
},
|
||||
{
|
||||
name: "Y2轴",
|
||||
type: "line",
|
||||
data: rY2,
|
||||
symbol: "none",
|
||||
},
|
||||
],
|
||||
}),
|
||||
true,
|
||||
true
|
||||
);
|
||||
window.addEventListener("resize", () => {
|
||||
this.leftChartIns2 && this.leftChartIns2.resize();
|
||||
});
|
||||
},
|
||||
initLeftChart3(rZ) {
|
||||
const chartDom = document.getElementById("left3");
|
||||
this.leftChartIns3 = echarts.init(chartDom, "defalut");
|
||||
this.leftChartIns3.setOption(
|
||||
this.generateOptions({
|
||||
yAxis: { name: "单位:μm" },
|
||||
series: [
|
||||
{
|
||||
name: "Z轴",
|
||||
type: "line",
|
||||
data: rZ,
|
||||
symbol: "none",
|
||||
},
|
||||
],
|
||||
}),
|
||||
true,
|
||||
true
|
||||
);
|
||||
window.addEventListener("resize", () => {
|
||||
this.leftChartIns3 && this.leftChartIns3.resize();
|
||||
});
|
||||
},
|
||||
initMiddleChart1(iPM4, iPM6, iPM14, iPM21) {
|
||||
const chartDom = document.getElementById("middle1");
|
||||
this.middleChatIns1 = echarts.init(chartDom, "defalut");
|
||||
this.middleChatIns1.setOption(
|
||||
this.generateOptions({
|
||||
yAxis: { name: "单位:个/100 ml" },
|
||||
series: [
|
||||
{
|
||||
name: "4μm",
|
||||
type: "line",
|
||||
data: iPM4,
|
||||
symbol: "none",
|
||||
},
|
||||
{
|
||||
name: "6μm",
|
||||
type: "line",
|
||||
data: iPM6,
|
||||
symbol: "none",
|
||||
},
|
||||
{
|
||||
name: "14μm",
|
||||
type: "line",
|
||||
data: iPM14,
|
||||
symbol: "none",
|
||||
},
|
||||
{
|
||||
name: "21μm",
|
||||
type: "line",
|
||||
data: iPM21,
|
||||
symbol: "none",
|
||||
},
|
||||
],
|
||||
}),
|
||||
true,
|
||||
true
|
||||
);
|
||||
window.addEventListener("resize", () => {
|
||||
this.middleChatIns1 && this.middleChatIns1.resize();
|
||||
});
|
||||
},
|
||||
initMiddleChart2(oil) {
|
||||
const { rPT1, rPT2, rSP1 } = oil;
|
||||
const middle21 = document.getElementById("middle21");
|
||||
this.middleChatIns21 = echarts.init(middle21);
|
||||
this.middleChatIns21.setOption(
|
||||
this.generateGaugeOption({
|
||||
color: "0DDF7A",
|
||||
name: "油液压力",
|
||||
value: parseFloat(rSP1).toFixed(2),
|
||||
limit: 0.8,
|
||||
detail: "{value}\n (bar)",
|
||||
}),
|
||||
true,
|
||||
true
|
||||
);
|
||||
window.addEventListener("resize", () => {
|
||||
this.middleChatIns21 && this.middleChatIns21.resize();
|
||||
});
|
||||
|
||||
const middle22 = document.getElementById("middle22");
|
||||
this.middleChatIns22 = echarts.init(middle22);
|
||||
this.middleChatIns22.setOption(
|
||||
this.generateGaugeOption({
|
||||
color: "109CFB",
|
||||
name: "进油温度",
|
||||
value: parseFloat(rPT1).toFixed(2),
|
||||
limit: 35,
|
||||
detail: "{value}\n (℃)",
|
||||
}),
|
||||
true,
|
||||
true
|
||||
);
|
||||
window.addEventListener("resize", () => {
|
||||
this.middleChatIns22 && this.middleChatIns22.resize();
|
||||
});
|
||||
|
||||
const middle23 = document.getElementById("middle23");
|
||||
this.middleChatIns23 = echarts.init(middle23);
|
||||
this.middleChatIns23.setOption(
|
||||
this.generateGaugeOption({
|
||||
color: "FFD03F",
|
||||
name: "回油温度",
|
||||
value: parseFloat(rPT2).toFixed(2),
|
||||
limit: 65,
|
||||
detail: "{value}\n (℃)",
|
||||
}),
|
||||
true,
|
||||
true
|
||||
);
|
||||
window.addEventListener("resize", () => {
|
||||
this.middleChatIns23 && this.middleChatIns23.resize();
|
||||
});
|
||||
},
|
||||
initRightChart1(rPT1, rPT2) {
|
||||
const chartDom = document.getElementById("right1");
|
||||
this.rightChartIns1 = echarts.init(chartDom, "defalut");
|
||||
this.rightChartIns1.setOption(
|
||||
this.generateOptions({
|
||||
yAxis: { name: "单位:℃" },
|
||||
series: [
|
||||
{
|
||||
name: "进油",
|
||||
type: "line",
|
||||
data: rPT1,
|
||||
symbol: "none",
|
||||
},
|
||||
{
|
||||
name: "回油",
|
||||
type: "line",
|
||||
data: rPT2,
|
||||
symbol: "none",
|
||||
},
|
||||
],
|
||||
}),
|
||||
true,
|
||||
true
|
||||
);
|
||||
window.addEventListener("resize", () => {
|
||||
this.rightChartIns1 && this.rightChartIns1.resize();
|
||||
});
|
||||
},
|
||||
initRightChart2(rU) {
|
||||
const chartDom = document.getElementById("right2");
|
||||
this.rightChartIns2 = echarts.init(chartDom, "defalut");
|
||||
this.rightChartIns2.setOption(
|
||||
this.generateOptions({
|
||||
yAxis: { name: "单位:u" },
|
||||
series: [
|
||||
{
|
||||
name: "油液粘度",
|
||||
type: "line",
|
||||
data: rU,
|
||||
symbol: "none",
|
||||
},
|
||||
],
|
||||
}),
|
||||
true,
|
||||
true
|
||||
);
|
||||
window.addEventListener("resize", () => {
|
||||
this.rightChartIns2 && this.rightChartIns2.resize();
|
||||
});
|
||||
},
|
||||
initRightChart3(rRH) {
|
||||
const chartDom = document.getElementById("right3");
|
||||
this.rightChartIns3 = echarts.init(chartDom, "defalut");
|
||||
this.rightChartIns3.setOption(
|
||||
this.generateOptions({
|
||||
yAxis: { name: "单位:ρ" },
|
||||
series: [
|
||||
{
|
||||
name: "油膜湿度",
|
||||
type: "line",
|
||||
data: rRH,
|
||||
symbol: "none",
|
||||
},
|
||||
],
|
||||
}),
|
||||
true,
|
||||
true
|
||||
);
|
||||
window.addEventListener("resize", () => {
|
||||
this.rightChartIns3 && this.rightChartIns3.resize();
|
||||
});
|
||||
},
|
||||
generateOptions(option = {}) {
|
||||
return merge(
|
||||
{
|
||||
color: ["#306fff", "#30c9c9", "#f7ad08", "#93beff"],
|
||||
tooltip: {
|
||||
show: true,
|
||||
trigger: "axis",
|
||||
},
|
||||
xAxis: {
|
||||
show: true,
|
||||
name: "",
|
||||
nameLocation: "end", // 坐标轴名称及显示位置,可以时start和middle
|
||||
nameTextStyle: {
|
||||
// 坐标轴名称的样式
|
||||
color: "#9b9ba4",
|
||||
},
|
||||
nameGap: 15, // 坐标轴名称与轴线的距离
|
||||
inverse: false, // 是否反向坐标轴
|
||||
axisLabel: {
|
||||
// 刻度标签的样式
|
||||
hideOverlap: true, // 隐藏重叠的标签
|
||||
color: "#9b9ba4",
|
||||
},
|
||||
axisLine: {
|
||||
show: false,
|
||||
},
|
||||
position: "bottom",
|
||||
offset: 0, // 相对正常位置的偏移
|
||||
type: "category", // 类目轴,也可以是time, value, 对数轴log
|
||||
data: this.XDATA,
|
||||
},
|
||||
yAxis: {
|
||||
name: "",
|
||||
nameTextStyle: {
|
||||
// 坐标轴名称的样式
|
||||
color: "#9b9ba4",
|
||||
},
|
||||
axisLabel: {
|
||||
// 刻度标签的样式
|
||||
hideOverlap: true, // 隐藏重叠的标签
|
||||
color: "#9b9ba4",
|
||||
},
|
||||
axisLine: {
|
||||
show: false,
|
||||
},
|
||||
minorTick: {
|
||||
// 坐标轴刻度线相关配置
|
||||
show: false,
|
||||
},
|
||||
splitLine: {
|
||||
// 坐标轴在grid区域中的分割线
|
||||
show: true,
|
||||
lineStyle: {
|
||||
type: "dashed",
|
||||
color: "rgba(255, 255, 255, 0.3)",
|
||||
},
|
||||
},
|
||||
},
|
||||
legend: {
|
||||
show: true,
|
||||
// 图例配置
|
||||
orient: "horizontal", // horizontal水平布局, vertical垂直布局
|
||||
top: "20",
|
||||
right: "30",
|
||||
// backgroundColor: "#000000",
|
||||
// borderColor: "#ccc",
|
||||
// borderWidth: 0,
|
||||
padding: 5,
|
||||
itemGap: 10, // 各个item之间的距离
|
||||
itemWidth: 10, // 图例图形宽度
|
||||
itemHeight: 10, // 图例图形高度
|
||||
borderRadius: 10,
|
||||
textStyle: {
|
||||
color: "#d7d8db",
|
||||
fontSize: 9,
|
||||
},
|
||||
lineStyle: {
|
||||
type: "dotted",
|
||||
opacity: 0,
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
left: "10%",
|
||||
top: "16%",
|
||||
right: "6%",
|
||||
bottom: "14%",
|
||||
},
|
||||
},
|
||||
option,
|
||||
(objVal, srcVal) => {
|
||||
if (isArray(objVal)) return srcVal;
|
||||
}
|
||||
);
|
||||
},
|
||||
generateGaugeOption(
|
||||
option = {
|
||||
color: "0DDF7A",
|
||||
name: "",
|
||||
value: 0,
|
||||
limit: 1,
|
||||
}
|
||||
) {
|
||||
return merge(
|
||||
{
|
||||
series: [
|
||||
//(中间有背景颜色那块,刻度,数字 指针)
|
||||
{
|
||||
type: "gauge",
|
||||
center: ["50%", "50%"],
|
||||
radius: "80%", // 1行3个
|
||||
splitNumber: 10,
|
||||
min: 0,
|
||||
max: option.limit,
|
||||
startAngle: 220,
|
||||
endAngle: -40,
|
||||
|
||||
//刻度样式
|
||||
axisLine: {
|
||||
show: true,
|
||||
roundCap: true,
|
||||
lineStyle: {
|
||||
width: 20,
|
||||
color: [
|
||||
[
|
||||
1,
|
||||
new echarts.graphic.LinearGradient(0, 0, 1, 0, [
|
||||
{
|
||||
offset: 0,
|
||||
color: "#" + option.color,
|
||||
},
|
||||
{
|
||||
offset: 0.5,
|
||||
color: "#" + option.color,
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: "#" + option.color,
|
||||
},
|
||||
]),
|
||||
],
|
||||
],
|
||||
},
|
||||
},
|
||||
axisLabel: {
|
||||
show: false,
|
||||
// distance: 20,
|
||||
// textStyle: {
|
||||
// color:'#fff',
|
||||
// fontSize: '10',
|
||||
// }
|
||||
},
|
||||
axisTick: {
|
||||
distance: -20,
|
||||
lineStyle: {
|
||||
color: "#fff",
|
||||
width: 1,
|
||||
},
|
||||
length: 6,
|
||||
},
|
||||
splitLine: {
|
||||
length: 10,
|
||||
distance: -20,
|
||||
lineStyle: {
|
||||
color: "#fff",
|
||||
width: 2,
|
||||
},
|
||||
},
|
||||
pointer: {
|
||||
show: true,
|
||||
length: "102%",
|
||||
width: 5,
|
||||
},
|
||||
itemStyle: {
|
||||
color: "#c3e5fc",
|
||||
opacity: 0.6,
|
||||
},
|
||||
title: {
|
||||
color: "#fff",
|
||||
},
|
||||
detail: {
|
||||
offsetCenter: ["0%", "70%"],
|
||||
fontSize: 22,
|
||||
color: "#fff",
|
||||
formatter: option.detail,
|
||||
},
|
||||
data: [
|
||||
{
|
||||
value: option.value,
|
||||
name: option.name,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
{},
|
||||
(objVal, srcVal) => {
|
||||
if (isArray(objVal)) return srcVal;
|
||||
}
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@import '@/theme/index.scss';
|
||||
@font-face {
|
||||
font-family: "BIAOTI";
|
||||
src: url(../../assets/biaoti.ttf);
|
||||
}
|
||||
.background-frame {
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.test-screen-wrapper {
|
||||
width: 100%;
|
||||
height: calc(100vh - 100px);
|
||||
font-family: "BIAOTI";
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
@include background_bg(homeBackgroundImage);
|
||||
$SIDE_PART_WIDTH: 23%;
|
||||
.side-part-wrapper {
|
||||
width: $SIDE_PART_WIDTH;
|
||||
height: 100%;
|
||||
padding: 8px 12px 20px 14px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
position: relative;
|
||||
z-index: 20;
|
||||
.side-top-title {
|
||||
width: 100%;
|
||||
height: 6%;
|
||||
background-image: url(./topTitleBg.png);
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
span {
|
||||
position: relative;
|
||||
top: -8px;
|
||||
font-size: 22px;
|
||||
}
|
||||
}
|
||||
.side-card-item {
|
||||
width: 100%;
|
||||
height: 30%;
|
||||
background-image: url(./cardItemTitle.png);
|
||||
.side-card-item-title {
|
||||
position: relative;
|
||||
top: -5px;
|
||||
left: 36px;
|
||||
font-size: 18px;
|
||||
}
|
||||
.chart-ins {
|
||||
width: 100%;
|
||||
height: calc(100% - 28px);
|
||||
position: relative;
|
||||
top: 3px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.middle-part-wrapper {
|
||||
width: calc(100% - #{$SIDE_PART_WIDTH + $SIDE_PART_WIDTH});
|
||||
height: 100%;
|
||||
position: relative;
|
||||
z-index: 20;
|
||||
.mainImg-wrapper {
|
||||
width: 100%;
|
||||
height: 69%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
#middleImg {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
transform: scale(1.2);
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: auto 100%;
|
||||
background-image: url(./product.png);
|
||||
}
|
||||
.device-card {
|
||||
position: absolute;
|
||||
top: -170px;
|
||||
left: 20px;
|
||||
width: 300px;
|
||||
height: 400px;
|
||||
background-image: url(./deviceCard.png);
|
||||
.device-card-content {
|
||||
margin-top: calc(50% + 43px);
|
||||
width: 100%;
|
||||
height: 50%;
|
||||
padding: 18px 10px;
|
||||
.device-card-title {
|
||||
padding: 4px 18px;
|
||||
font-size: 20px;
|
||||
}
|
||||
.device-card-content-item {
|
||||
display: flex;
|
||||
padding: 4px 10px;
|
||||
.device-card-content-label {
|
||||
width: 80px;
|
||||
}
|
||||
.device-card-content-value {
|
||||
padding-left: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.middle-bottom-wrapper {
|
||||
width: 100%;
|
||||
height: 29%;
|
||||
padding: 0 12px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.middle-bottom-item {
|
||||
width: calc(50% - 4px);
|
||||
height: 100%;
|
||||
background-image: url(./cardItemTitle.png);
|
||||
.middle-bottom-item-title {
|
||||
position: relative;
|
||||
top: -5px;
|
||||
left: 36px;
|
||||
font-size: 18px;
|
||||
}
|
||||
.chart-ins {
|
||||
width: 100%;
|
||||
height: calc(100% - 30px);
|
||||
position: relative;
|
||||
top: 3px;
|
||||
}
|
||||
.extra-chart-container {
|
||||
width: 100%;
|
||||
height: 90%;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
.extra-chart {
|
||||
width: 32%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.load-no {
|
||||
position: absolute;
|
||||
height: 40px;
|
||||
width: 260px;
|
||||
z-index: 99;
|
||||
right: 10px;
|
||||
top: 30px;
|
||||
.load-no-load {
|
||||
width: 120px;
|
||||
height: 100%;
|
||||
float: left;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.load-no-empty {
|
||||
width: 120px;
|
||||
height: 100%;
|
||||
float: left;
|
||||
margin-right: 20px;
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#testScreen {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
z-index: 2;
|
||||
}
|
||||
</style>
|
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 605 KiB |
Before Width: | Height: | Size: 20 KiB |
@ -1,417 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="报警点" prop="location">
|
||||
<el-input
|
||||
v-model="queryParams.location"
|
||||
placeholder="请输入报警点"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警类型" prop="alarmType">
|
||||
<el-input
|
||||
v-model="queryParams.alarmType"
|
||||
placeholder="请输入报警类型"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警等级" prop="level">
|
||||
<el-input
|
||||
v-model="queryParams.level"
|
||||
placeholder="请输入报警等级"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警指标" prop="indicator">
|
||||
<el-input
|
||||
v-model="queryParams.indicator"
|
||||
placeholder="请输入报警指标"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警时间">
|
||||
<el-date-picker
|
||||
v-model="daterangeAlarmTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="最新报警时间" prop="alarmLastTime">
|
||||
<el-date-picker clearable
|
||||
v-model="queryParams.alarmLastTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择最新报警时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备ID" prop="equipId">
|
||||
<el-input
|
||||
v-model="queryParams.equipId"
|
||||
placeholder="请输入设备ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="测点ID" prop="measureId">
|
||||
<el-input
|
||||
v-model="queryParams.measureId"
|
||||
placeholder="请输入测点ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['measure:alarm:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['measure:alarm:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['measure:alarm:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['measure:alarm:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="alarmList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="报警点" align="center" prop="location" />
|
||||
<el-table-column label="报警类型" align="center" prop="alarmType" />
|
||||
<el-table-column label="报警等级" align="center" prop="level" />
|
||||
<el-table-column label="报警指标" align="center" prop="indicator" />
|
||||
<el-table-column label="报警值" align="center" prop="alarmValue" />
|
||||
<el-table-column label="报警时间" align="center" prop="alarmTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.alarmTime, '{y}-{m}-{d} {h}:{mi}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="最新报警时间" align="center" prop="alarmLastTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.alarmLastTime, '{y}-{m}-{d} {h}:{mi}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注信息" align="center" prop="remark" />
|
||||
<el-table-column label="设备ID" align="center" prop="equipId" />
|
||||
<el-table-column label="测点ID" align="center" prop="measureId" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['measure:alarm:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['measure:alarm:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改报警管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="报警点" prop="location">
|
||||
<el-input v-model="form.location" placeholder="请输入报警点" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报警类型" prop="alarmType">
|
||||
<el-select v-model="form.alarmType" clearable placeholder="请选择报警类型">
|
||||
<el-option
|
||||
v-for="item in alarmTypeOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警等级" prop="level">
|
||||
<el-select v-model="form.level" clearable placeholder="请选择报警等级">
|
||||
<el-option
|
||||
v-for="item in levelOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警指标" prop="indicator">
|
||||
<el-input v-model="form.indicator" placeholder="请输入报警指标" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报警值" prop="alarmValue">
|
||||
<el-input v-model="form.alarmValue" placeholder="请输入报警值" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报警时间" prop="alarmTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.alarmTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择报警时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="最新报警时间" prop="alarmLastTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.alarmLastTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择最新报警时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注信息" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注信息" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备ID" prop="equipId">
|
||||
<el-input v-model="form.equipId" placeholder="请输入设备ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="测点ID" prop="measureId">
|
||||
<el-input v-model="form.measureId" placeholder="请输入测点ID" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listAlarm, getAlarm, delAlarm, addAlarm, updateAlarm } from "@/api/warn/alarm";
|
||||
|
||||
export default {
|
||||
name: "Alarm",
|
||||
data() {
|
||||
return {
|
||||
alarmTypeOptions: [{
|
||||
value: '智能报警',
|
||||
label: '智能报警'
|
||||
}, {
|
||||
value: '手动报警',
|
||||
label: '手动报警'
|
||||
}],
|
||||
levelOptions: [{
|
||||
value: '1级',
|
||||
label: '1级'
|
||||
}, {
|
||||
value: '2级',
|
||||
label: '2级'
|
||||
}, {
|
||||
value: '3级',
|
||||
label: '3级'
|
||||
}, {
|
||||
value: '4级',
|
||||
label: '4级'
|
||||
}, {
|
||||
value: '5级',
|
||||
label: '5级'
|
||||
}],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 报警管理表格数据
|
||||
alarmList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 测点ID时间范围
|
||||
daterangeAlarmTime: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
location: null,
|
||||
alarmType: null,
|
||||
level: null,
|
||||
indicator: null,
|
||||
alarmTime: null,
|
||||
alarmLastTime: null,
|
||||
equipId: null,
|
||||
measureId: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询报警管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
if (null != this.daterangeAlarmTime && '' != this.daterangeAlarmTime) {
|
||||
this.queryParams.params["beginAlarmTime"] = this.daterangeAlarmTime[0];
|
||||
this.queryParams.params["endAlarmTime"] = this.daterangeAlarmTime[1];
|
||||
}
|
||||
listAlarm(this.queryParams).then(response => {
|
||||
this.alarmList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
location: null,
|
||||
alarmType: null,
|
||||
level: null,
|
||||
indicator: null,
|
||||
alarmTime: null,
|
||||
alarmLastTime: null,
|
||||
remark: null,
|
||||
equipId: null,
|
||||
measureId: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.daterangeAlarmTime = [];
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加报警管理";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getAlarm(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改报警管理";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateAlarm(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addAlarm(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除报警管理编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delAlarm(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('measure/alarm/export', {
|
||||
...this.queryParams
|
||||
}, `alarm_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,425 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="故障名称" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入故障名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="故障类型" prop="downType">
|
||||
<el-input
|
||||
v-model="queryParams.downType"
|
||||
placeholder="请输入故障类型"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="故障时间">
|
||||
<el-date-picker
|
||||
v-model="daterangeDownTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备ID" prop="equipId">
|
||||
<el-input
|
||||
v-model="queryParams.equipId"
|
||||
placeholder="请输入设备ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="故障类型ID" prop="typeId">
|
||||
<el-input
|
||||
v-model="queryParams.typeId"
|
||||
placeholder="请输入故障类型ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="诊断时间">
|
||||
<el-date-picker
|
||||
v-model="daterangeDiagTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="诊断结论" prop="diagResult">
|
||||
<el-input
|
||||
v-model="queryParams.diagResult"
|
||||
placeholder="请输入诊断结论"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="诊断建议" prop="advice">
|
||||
<el-input
|
||||
v-model="queryParams.advice"
|
||||
placeholder="请输入诊断建议"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="故障状态" prop="downStatus">
|
||||
<el-select v-model="queryParams.downStatus" placeholder="请选择故障状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.breakdown_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="故障部位" prop="downLocation">
|
||||
<el-input
|
||||
v-model="queryParams.downLocation"
|
||||
placeholder="请输入故障部位"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['observe:breakdown:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['observe:breakdown:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['observe:breakdown:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['observe:breakdown:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="breakdownList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="故障名称" align="center" prop="name" />-->
|
||||
<el-table-column label="故障部位" align="center" prop="downLocation" />
|
||||
<el-table-column label="故障类型" align="center" prop="downType" />
|
||||
<el-table-column label="故障时间" align="center" prop="downTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.downTime, '{y}-{m}-{d} {h}:{mi}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="设备ID" align="center" prop="equipId" />
|
||||
<el-table-column label="故障类型ID" align="center" prop="typeId" />
|
||||
<el-table-column label="诊断时间" align="center" prop="diagTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.diagTime, '{y}-{m}-{d} {h}:{mi}:{s}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="诊断结论" align="center" prop="diagResult" />
|
||||
<el-table-column label="诊断建议" align="center" prop="advice" />
|
||||
<el-table-column label="故障状态" align="center" prop="downStatus">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.breakdown_status" :value="scope.row.downStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['observe:breakdown:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['observe:breakdown:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改故障信息管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="故障部位" prop="downLocation">
|
||||
<el-input v-model="form.downLocation" placeholder="请输入故障部位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="故障名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入故障名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="故障类型" prop="downType">
|
||||
<el-input v-model="form.downType" placeholder="请输入故障类型" />
|
||||
</el-form-item>
|
||||
<el-form-item label="故障时间" prop="downTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.downTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择故障时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备ID" prop="equipId">
|
||||
<el-input v-model="form.equipId" placeholder="请输入设备ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="故障类型ID" prop="typeId">
|
||||
<el-input v-model="form.typeId" placeholder="请输入故障类型ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="诊断时间" prop="diagTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.diagTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
placeholder="请选择诊断时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="诊断结论" prop="diagResult">
|
||||
<el-input v-model="form.diagResult" placeholder="请输入诊断结论" />
|
||||
</el-form-item>
|
||||
<el-form-item label="诊断建议" prop="advice">
|
||||
<el-input v-model="form.advice" placeholder="请输入诊断建议" />
|
||||
</el-form-item>
|
||||
<el-form-item label="故障状态">
|
||||
<el-radio-group v-model="form.downStatus">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.breakdown_status"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{ dict.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listBreakdown, getBreakdown, delBreakdown, addBreakdown, updateBreakdown } from "@/api/warn/breakdown";
|
||||
|
||||
export default {
|
||||
name: "Breakdown",
|
||||
dicts: ['breakdown_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 故障信息管理表格数据
|
||||
breakdownList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 故障部位时间范围
|
||||
daterangeDownTime: [],
|
||||
// 故障部位时间范围
|
||||
daterangeDiagTime: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
name: null,
|
||||
downType: null,
|
||||
downTime: null,
|
||||
equipId: null,
|
||||
typeId: null,
|
||||
diagTime: null,
|
||||
diagResult: null,
|
||||
advice: null,
|
||||
downStatus: null,
|
||||
downLocation: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询故障信息管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
if (null != this.daterangeDownTime && '' != this.daterangeDownTime) {
|
||||
this.queryParams.params["beginDownTime"] = this.daterangeDownTime[0];
|
||||
this.queryParams.params["endDownTime"] = this.daterangeDownTime[1];
|
||||
}
|
||||
if (null != this.daterangeDiagTime && '' != this.daterangeDiagTime) {
|
||||
this.queryParams.params["beginDiagTime"] = this.daterangeDiagTime[0];
|
||||
this.queryParams.params["endDiagTime"] = this.daterangeDiagTime[1];
|
||||
}
|
||||
listBreakdown(this.queryParams).then(response => {
|
||||
this.breakdownList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
name: null,
|
||||
downType: null,
|
||||
downTime: null,
|
||||
equipId: null,
|
||||
typeId: null,
|
||||
diagTime: null,
|
||||
diagResult: null,
|
||||
advice: null,
|
||||
downStatus: "0",
|
||||
downLocation: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.daterangeDownTime = [];
|
||||
this.daterangeDiagTime = [];
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加故障信息管理";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getBreakdown(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改故障信息管理";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateBreakdown(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addBreakdown(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除故障信息管理编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delBreakdown(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('observe/breakdown/export', {
|
||||
...this.queryParams
|
||||
}, `breakdown_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,488 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||
<el-form-item label="设备编号" prop="equipCode">
|
||||
<el-input
|
||||
v-model="queryParams.equipCode"
|
||||
placeholder="请输入设备编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备ID" prop="equipId">
|
||||
<el-input
|
||||
v-model="queryParams.equipId"
|
||||
placeholder="请输入设备ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="测点ID" prop="measureId">
|
||||
<el-input
|
||||
v-model="queryParams.measureId"
|
||||
placeholder="请输入测点ID"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="测点名称" prop="measureName">
|
||||
<el-input
|
||||
v-model="queryParams.measureName"
|
||||
placeholder="请输入测点名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="指标名称" prop="indicatorName">
|
||||
<el-input
|
||||
v-model="queryParams.indicatorName"
|
||||
placeholder="请输入指标名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-input
|
||||
v-model="queryParams.unit"
|
||||
placeholder="请输入单位"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警值低" prop="alarmMin">
|
||||
<el-input
|
||||
v-model="queryParams.alarmMin"
|
||||
placeholder="请输入报警值低"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="报警值高" prop="alarmMax">
|
||||
<el-input
|
||||
v-model="queryParams.alarmMax"
|
||||
placeholder="请输入报警值高"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="预警状态" prop="status">
|
||||
<el-input
|
||||
v-model="queryParams.status"
|
||||
placeholder="请输入预警状态"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input
|
||||
v-model="queryParams.remark"
|
||||
placeholder="请输入备注"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="equipName">
|
||||
<el-input
|
||||
v-model="queryParams.equipName"
|
||||
placeholder="请输入设备名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="规则类型" prop="ruleType">
|
||||
<el-input
|
||||
v-model="queryParams.ruleType"
|
||||
placeholder="请输入规则类型"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:rules:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:rules:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:rules:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:rules:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="info"
|
||||
plain
|
||||
icon="el-icon-upload2"
|
||||
size="mini"
|
||||
@click="handleImport"
|
||||
v-hasPermi="['system:rules:export']"
|
||||
>导入</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="rulesList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="设备编号" align="center" prop="equipCode" />
|
||||
<el-table-column label="设备ID" align="center" prop="equipId" />
|
||||
<el-table-column label="设备名称" align="center" prop="equipName" />
|
||||
<el-table-column label="测点ID" align="center" prop="measureId" />
|
||||
<el-table-column label="测点名称" align="center" prop="measureName" />
|
||||
<el-table-column label="指标名称" align="center" prop="indicatorName" />
|
||||
<el-table-column label="单位" align="center" prop="unit" />
|
||||
<el-table-column label="报警类型" align="center" prop="warnType" />
|
||||
<el-table-column label="报警值低" align="center" prop="alarmMin" />
|
||||
<el-table-column label="报警值高" align="center" prop="alarmMax" />
|
||||
<el-table-column label="预警状态" align="center" prop="status" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="规则类型" align="center" prop="ruleType" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:rules:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:rules:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改预警规则管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item label="设备编号" prop="equipCode">
|
||||
<el-input v-model="form.equipCode" placeholder="请输入设备编号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备ID" prop="equipId">
|
||||
<el-input v-model="form.equipId" placeholder="请输入设备ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="设备名称" prop="equipName">
|
||||
<el-input v-model="form.equipName" placeholder="请输入设备名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="测点ID" prop="measureId">
|
||||
<el-input v-model="form.measureId" placeholder="请输入测点ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="测点名称" prop="measureName">
|
||||
<el-input v-model="form.measureName" placeholder="请输入测点名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="指标名称" prop="indicatorName">
|
||||
<el-input v-model="form.indicatorName" placeholder="请输入指标名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-input v-model="form.unit" placeholder="请输入单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报警类型" prop="warnType">
|
||||
<el-input v-model="form.warnType" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报警值低" prop="alarmMin">
|
||||
<el-input v-model="form.alarmMin" placeholder="请输入报警值低" />
|
||||
</el-form-item>
|
||||
<el-form-item label="报警值高" prop="alarmMax">
|
||||
<el-input v-model="form.alarmMax" placeholder="请输入报警值高" />
|
||||
</el-form-item>
|
||||
<el-form-item label="预警状态" prop="status">
|
||||
<el-input v-model="form.status" placeholder="请输入预警状态" />
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="规则类型" prop="ruleType">
|
||||
<el-input v-model="form.ruleType" placeholder="请输入规则类型" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 规则导入对话框 -->
|
||||
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
||||
<el-upload
|
||||
ref="upload"
|
||||
:limit="1"
|
||||
accept=".xlsx, .xls"
|
||||
:headers="upload.headers"
|
||||
:action="upload.url + '?updateSupport=' + upload.updateSupport"
|
||||
:disabled="upload.isUploading"
|
||||
:on-progress="handleFileUploadProgress"
|
||||
:on-success="handleFileSuccess"
|
||||
:auto-upload="false"
|
||||
drag
|
||||
>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
<div class="el-upload__tip text-center" slot="tip">
|
||||
<!-- <div class="el-upload__tip" slot="tip">-->
|
||||
<!-- <el-checkbox v-model="upload.updateSupport" /> 是否更新已经存在的用户数据-->
|
||||
<!-- </div>-->
|
||||
<span>仅允许导入xls、xlsx格式文件。</span>
|
||||
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;" @click="importTemplate">下载模板</el-link>
|
||||
</div>
|
||||
</el-upload>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||||
<el-button @click="upload.open = false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listRules, getRules, delRules, addRules, updateRules } from "@/api/warn/rules";
|
||||
import { getToken } from "@/utils/auth";
|
||||
|
||||
export default {
|
||||
name: "Rules",
|
||||
data() {
|
||||
return {
|
||||
// 规则导入参数
|
||||
upload: {
|
||||
// 是否显示弹出层(用户导入)
|
||||
open: false,
|
||||
// 弹出层标题(用户导入)
|
||||
title: "",
|
||||
// 是否禁用上传
|
||||
isUploading: false,
|
||||
// 是否更新已经存在的用户数据
|
||||
updateSupport: 0,
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
// 上传的地址
|
||||
url: process.env.VUE_APP_BASE_API + "/system/rules/import/rules"
|
||||
},
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 预警规则管理表格数据
|
||||
rulesList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
equipCode: null,
|
||||
equipId: null,
|
||||
measureId: null,
|
||||
measureName: null,
|
||||
indicatorName: null,
|
||||
unit: null,
|
||||
warnType: null,
|
||||
alarmMin: null,
|
||||
alarmMax: null,
|
||||
status: null,
|
||||
remark: null,
|
||||
equipName: null,
|
||||
ruleType: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询预警规则管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listRules(this.queryParams).then(response => {
|
||||
this.rulesList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
equipCode: null,
|
||||
equipId: null,
|
||||
measureId: null,
|
||||
measureName: null,
|
||||
indicatorName: null,
|
||||
unit: null,
|
||||
warnType: null,
|
||||
alarmMin: null,
|
||||
alarmMax: null,
|
||||
status: null,
|
||||
remark: null,
|
||||
equipName: null,
|
||||
ruleType: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加预警规则管理";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getRules(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改预警规则管理";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateRules(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addRules(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除预警规则管理编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delRules(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/rules/export', {
|
||||
...this.queryParams
|
||||
}, `rules_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
/** 导入按钮操作 */
|
||||
handleImport() {
|
||||
this.upload.title = "规则导入";
|
||||
this.upload.open = true;
|
||||
},
|
||||
/** 下载模板操作 */
|
||||
importTemplate() {
|
||||
this.download('system/rules/importTemplate', {
|
||||
}, `rule_template_${new Date().getTime()}.xlsx`)
|
||||
},
|
||||
// 文件上传中处理
|
||||
handleFileUploadProgress(event, file, fileList) {
|
||||
this.upload.isUploading = true;
|
||||
},
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
this.upload.open = false;
|
||||
this.upload.isUploading = false;
|
||||
this.$refs.upload.clearFiles();
|
||||
this.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true });
|
||||
this.getList();
|
||||
},
|
||||
// 提交上传文件
|
||||
submitFileForm() {
|
||||
this.$refs.upload.submit();
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -1,110 +0,0 @@
|
||||
<template>
|
||||
<div class="swiper-container">
|
||||
<div
|
||||
class="swiper-wrapper"
|
||||
:style="{flexDirection:`${vertical?'column':'row'}`}"
|
||||
>
|
||||
<!-- translateY 竖向移动轮播 -->
|
||||
<!-- translateX 横向移动轮播 -->
|
||||
<!-- vertical -->
|
||||
<div
|
||||
class="swiper-slide"
|
||||
:style="[{transform:`${animate?vertical?'translateY(-100%)':'translateX(-100%)':'none'}`},{transition: `${animate?'all 1.5s':'none'}`}]"
|
||||
v-for="(item,index) in list"
|
||||
:key="index"
|
||||
>
|
||||
<el-col
|
||||
:span="16"
|
||||
style="text-align:left;overflow: hidden;"
|
||||
>{{item?item.alarmDetail:''}}</el-col>
|
||||
<el-col
|
||||
:span="8"
|
||||
style="text-align:right"
|
||||
>{{item?item.alarmTime:''}}</el-col>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
duration: {
|
||||
//滚动时长
|
||||
type: Number,
|
||||
default: 4000,
|
||||
},
|
||||
vertical: {
|
||||
//是否纵向
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
showData: {
|
||||
type: Array,
|
||||
default: [],
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
timer: null,
|
||||
animate: false,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
time() {},
|
||||
},
|
||||
watch: {
|
||||
showData: {
|
||||
handler: function () {
|
||||
this.list = this.showData;
|
||||
if (this.list && this.list.length == 1 && this.list[0]) {
|
||||
let item = this.list[0];
|
||||
this.list = [item, item];
|
||||
}
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.timer = setInterval(this.scroll, this.duration);
|
||||
},
|
||||
methods: {
|
||||
scroll() {
|
||||
this.animate = true; // 因为在消息向上滚动的时候需要添加css3过渡动画,所以这里需要设置true
|
||||
setTimeout(() => {
|
||||
this.list.push(this.list.shift()); //删除数组的第一个元素并添加到数组的最后一项
|
||||
this.animate = false; //滑动完成后取消过渡动画,实现无缝滚动
|
||||
}, this.duration / 4); //滑动item项必须要在每次轮播开始前,所以时间必须比duration短
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.swiper-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
// height: 200px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.swiper-wrapper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
padding: 0.3% 3% 0 2%;
|
||||
color: red;
|
||||
font-weight: 400;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.swiper-slide {
|
||||
// width: 300px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|