Commit 7e36795d authored by jianqian's avatar jianqian

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	gassafety-admin/src/main/java/com/zehong/web/controller/workOrder/TWorkOrderController.java
#	gassafety-system/src/main/java/com/zehong/system/service/ITWorkOrderService.java
#	gassafety-system/src/main/java/com/zehong/system/service/impl/TWorkOrderServiceImpl.java
parents 2ba9fc54 eab2a150
......@@ -2,6 +2,7 @@ package com.zehong.web.controller.dataMonitoring;
import java.util.List;
import com.github.pagehelper.PageInfo;
import com.zehong.system.domain.form.DeviceAlarmForm;
import com.zehong.system.domain.vo.DeviceAlarmVo;
import org.springframework.security.access.prepost.PreAuthorize;
......@@ -44,14 +45,14 @@ public class TDeviceAlarmController extends BaseController
public TableDataInfo list(DeviceAlarmForm deviceAlarmForm) throws Exception
{
startPage();
List<DeviceAlarmVo> list = null;
PageInfo<DeviceAlarmVo> page = null;
try {
list = tDeviceAlarmService.selectTDeviceAlarmList(deviceAlarmForm);
page = tDeviceAlarmService.selectTDeviceAlarmPage(deviceAlarmForm);
} catch (Exception e) {
e.printStackTrace();
throw new Exception("查询报警信息列表出错");
}
return getDataTable(list);
return getDataTable(page);
}
/**
......
......@@ -2,6 +2,7 @@ package com.zehong.web.controller.dataMonitoring;
import java.util.List;
import com.github.pagehelper.PageInfo;
import com.zehong.system.domain.form.DeviceReportDataForm;
import com.zehong.system.domain.vo.DeviceReportDataVo;
import org.springframework.security.access.prepost.PreAuthorize;
......@@ -44,8 +45,8 @@ public class TDeviceReportDataController extends BaseController
public TableDataInfo list(DeviceReportDataForm deviceReportDataForm)
{
startPage();
List<DeviceReportDataVo> list = tDeviceReportDataService.selectTDeviceReportDataList(deviceReportDataForm);
return getDataTable(list);
PageInfo<DeviceReportDataVo> page = tDeviceReportDataService.selectTDeviceReportDataPage(deviceReportDataForm);
return getDataTable(page);
}
/**
......@@ -56,8 +57,8 @@ public class TDeviceReportDataController extends BaseController
public TableDataInfo realtimeList(DeviceReportDataForm deviceReportDataForm)
{
startPage();
List<DeviceReportDataVo> list = tDeviceReportDataService.selectRealtimeDataList(deviceReportDataForm);
return getDataTable(list);
PageInfo<DeviceReportDataVo> page = tDeviceReportDataService.selectRealtimeDataPage(deviceReportDataForm);
return getDataTable(page);
}
/**
......
package com.zehong.web.controller.device;
import com.github.pagehelper.PageInfo;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
......@@ -37,8 +38,8 @@ public class TDeviceInfoController extends BaseController
public TableDataInfo list(TDeviceInfo tDeviceInfo)
{
startPage();
List<DeviceInfoVo> list = tDeviceInfoService.selectTDeviceInfoList(tDeviceInfo);
return getDataTable(list);
PageInfo<DeviceInfoVo> page = tDeviceInfoService.selectTDeviceInfoPage(tDeviceInfo);
return getDataTable(page);
}
/**
......
......@@ -2,6 +2,7 @@ package com.zehong.web.controller.device;
import java.util.List;
import com.github.pagehelper.PageInfo;
import com.zehong.system.domain.form.RelationTMonitorDevice;
import com.zehong.system.domain.form.TMonitorDeviceFrom;
import com.zehong.system.service.ITDeviceInfoService;
......@@ -52,13 +53,13 @@ public class TMonitorDeviceController extends BaseController
public TableDataInfo list(TMonitorDevice tMonitorDevice)
{
startPage();
List<TMonitorDevice> list = tMonitorDeviceService.selectTMonitorDeviceList(tMonitorDevice);
for(TMonitorDevice device: list){
PageInfo<TMonitorDevice> page = tMonitorDeviceService.selectTMonitorDevicePage(tMonitorDevice);
for(TMonitorDevice device: page.getList()){
device.setDeviceName(itDeviceInfoService.selectTDeviceInfoById(device.getDeviceId().intValue()).getDeviceName());
device.setRelationDeviceName(itDeviceInfoService.selectTDeviceInfoById(device.getRelationDeviceId().intValue()).getDeviceName());
device.setRelationPipeName(tPipeService.selectTPipeById(device.getRelationPipeId().intValue()).getPipeName());
}
return getDataTable(list);
return getDataTable(page);
}
/**
......
package com.zehong.web.controller.device;
import com.github.pagehelper.PageInfo;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
......@@ -36,8 +37,8 @@ public class TPipeController extends BaseController
public TableDataInfo list(TPipe tPipe)
{
startPage();
List<PipeVo> list = tPipeService.selectTPipeList(tPipe);
return getDataTable(list);
PageInfo<PipeVo> page = tPipeService.selectTPipePage(tPipe);
return getDataTable(page);
}
......
package com.zehong.web.controller.deviceInspection;
import java.util.List;
import com.zehong.system.domain.form.InspectionPlanForm;
import com.zehong.system.domain.vo.InspectionPlanVo;
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.github.pagehelper.PageInfo;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.TInspectionPlan;
import com.zehong.system.domain.form.InspectionPlanForm;
import com.zehong.system.domain.vo.InspectionPlanVo;
import com.zehong.system.service.ITInspectionPlanService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 巡检计划Controller
......@@ -44,8 +38,8 @@ public class TInspectionPlanController extends BaseController
public TableDataInfo list(InspectionPlanForm inspectionPlanForm)
{
startPage();
List<TInspectionPlan> list = tInspectionPlanService.selectTInspectionPlanList(inspectionPlanForm);
return getDataTable(list);
PageInfo<TInspectionPlan> page = tInspectionPlanService.selectTInspectionPlanPage(inspectionPlanForm);
return getDataTable(page);
}
/**
......
......@@ -2,6 +2,7 @@ package com.zehong.web.controller.riskManagement;
import java.util.List;
import com.github.pagehelper.PageInfo;
import com.zehong.system.domain.form.HiddenTroubleForm;
import com.zehong.system.domain.vo.HiddenTroubleVo;
import org.springframework.security.access.prepost.PreAuthorize;
......@@ -44,8 +45,8 @@ public class THiddenTroubleController extends BaseController
public TableDataInfo list(HiddenTroubleForm hiddenTroubleForm)
{
startPage();
List<HiddenTroubleVo> list = tHiddenTroubleService.selectTHiddenTroubleList(hiddenTroubleForm);
return getDataTable(list);
PageInfo<HiddenTroubleVo> page = tHiddenTroubleService.selectTHiddenTroublePage(hiddenTroubleForm);
return getDataTable(page);
}
/**
......
package com.zehong.web.controller.workOrder;
import com.github.pagehelper.PageInfo;
import java.util.List;
import java.util.Map;
......@@ -18,11 +19,19 @@ import org.springframework.web.bind.annotation.*;
import com.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.core.page.TableDataInfo;
import com.zehong.common.enums.BusinessType;
import com.zehong.common.utils.DateUtils;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.system.domain.TWorkOrder;
import com.zehong.system.domain.form.TWorkOrderForm;
import com.zehong.system.domain.vo.WorkOrderVo;
import com.zehong.system.service.ITWorkOrderService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 工单基础信息Controller
......@@ -45,14 +54,14 @@ public class TWorkOrderController extends BaseController
public TableDataInfo list(TWorkOrderForm tWorkOrderForm,Integer pageNum, Integer pageSize) throws Exception
{
startPage();
List<WorkOrderVo> list = null;
PageInfo<WorkOrderVo> page = null;
try {
list = tWorkOrderService.selectTWorkOrderList(tWorkOrderForm);
page = tWorkOrderService.selectTWorkOrderPage(tWorkOrderForm);
} catch (Exception e) {
e.printStackTrace();
throw new Exception("查询工单基础信息列表失败");
}
return getDataTable(list);
return getDataTable(page);
}
/**
......
package com.zehong.common.utils;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.BeanUtils;
/**
* @description:github Pagehelper工具
* @Author:yuyufeng
* @Date:2019/7/22 10:38
*/
public class PageInfoUtil {
public static <P, D> PageInfo<D> pageInfo2PageInfoDTO(PageInfo<P> pageInfoPO, Class<D> dClass) {
Page<D> page = new Page<>(pageInfoPO.getPageNum(), pageInfoPO.getPageSize());
page.setTotal(pageInfoPO.getTotal());
for (P p : pageInfoPO.getList()) {
D d = null;
try {
d = dClass.newInstance();
} catch (InstantiationException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
BeanUtils.copyProperties(p, d);
page.add(d);
}
return new PageInfo<>(page);
}
}
......@@ -18,6 +18,7 @@ import com.zehong.common.enums.BusinessType;
import ${packageName}.domain.${ClassName};
import ${packageName}.service.I${ClassName}Service;
import com.zehong.common.utils.poi.ExcelUtil;
import com.github.pagehelper.PageInfo;
#if($table.crud || $table.sub)
import com.zehong.common.core.page.TableDataInfo;
#elseif($table.tree)
......@@ -45,7 +46,7 @@ public class ${ClassName}Controller extends BaseController
public TableDataInfo list(${ClassName} ${className})
{
startPage();
List<${ClassName}> list = ${className}Service.select${ClassName}List(${className});
PageInfo<${ClassName}> list = ${className}Service.select${ClassName}Page(${className});
return getDataTable(list);
}
#elseif($table.tree)
......
......@@ -2,6 +2,7 @@ package ${packageName}.service;
import java.util.List;
import ${packageName}.domain.${ClassName};
import com.github.pagehelper.PageInfo;
/**
* ${functionName}Service接口
......@@ -27,6 +28,14 @@ public interface I${ClassName}Service
*/
public List<${ClassName}> select${ClassName}List(${ClassName} ${className});
/**
* 查询${functionName}分页列表
*
* @param ${className} ${functionName}
* @return ${functionName}分页集合
*/
public PageInfo<${ClassName}> select${ClassName}Page(${ClassName} ${className});
/**
* 新增${functionName}
*
......
......@@ -3,6 +3,7 @@ package ${packageName}.service.impl;
import java.util.List;
#foreach ($column in $columns)
#if($column.javaField == 'createTime' || $column.javaField == 'updateTime')
import com.github.pagehelper.PageInfo;
import com.zehong.common.utils.DateUtils;
#break
#end
......@@ -18,6 +19,7 @@ import ${packageName}.domain.${subClassName};
import ${packageName}.mapper.${ClassName}Mapper;
import ${packageName}.domain.${ClassName};
import ${packageName}.service.I${ClassName}Service;
import com.github.pagehelper.PageInfo;
/**
* ${functionName}Service业务层处理
......@@ -55,6 +57,18 @@ public class ${ClassName}ServiceImpl implements I${ClassName}Service
return ${className}Mapper.select${ClassName}List(${className});
}
/**
* 查询${functionName}分页列表
*
* @param ${className} ${functionName}
* @return ${functionName}
*/
@Override
public PageInfo<${ClassName}> select${ClassName}Page(${ClassName} ${className})
{
return new PageInfo(${className}Mapper.select${ClassName}List(${className}));
}
/**
* 新增${functionName}
*
......
package com.zehong.system.service;
import java.util.List;
import com.github.pagehelper.PageInfo;
import com.zehong.system.domain.TDeviceAlarm;
import com.zehong.system.domain.form.DeviceAlarmForm;
import com.zehong.system.domain.vo.DeviceAlarmVo;
......@@ -27,7 +29,7 @@ public interface ITDeviceAlarmService
* @param deviceAlarmForm 报警信息
* @return 报警信息集合
*/
public List<DeviceAlarmVo> selectTDeviceAlarmList(DeviceAlarmForm deviceAlarmForm) throws Exception;
public PageInfo<DeviceAlarmVo> selectTDeviceAlarmPage(DeviceAlarmForm deviceAlarmForm) throws Exception;
/**
* 新增报警信息
......
......@@ -3,6 +3,7 @@ package com.zehong.system.service;
import java.util.List;
import java.util.Map;
import com.github.pagehelper.PageInfo;
import com.zehong.system.domain.TDeviceInfo;
import com.zehong.system.domain.vo.DeviceInfoVo;
......@@ -30,6 +31,14 @@ public interface ITDeviceInfoService
*/
public List<DeviceInfoVo> selectTDeviceInfoList(TDeviceInfo tDeviceInfo);
/**
* 查询设备信息列表
*
* @param tDeviceInfo 设备信息
* @return 设备信息集合
*/
public PageInfo<DeviceInfoVo> selectTDeviceInfoPage(TDeviceInfo tDeviceInfo);
/**
* 构建前端所需要下拉树结构
*
......
package com.zehong.system.service;
import java.util.List;
import com.github.pagehelper.PageInfo;
import com.zehong.system.domain.TDeviceReportData;
import com.zehong.system.domain.form.DeviceReportDataForm;
import com.zehong.system.domain.vo.DeviceReportDataVo;
......@@ -29,6 +31,14 @@ public interface ITDeviceReportDataService
*/
public List<DeviceReportDataVo> selectTDeviceReportDataList(DeviceReportDataForm deviceReportDataForm);
/**
* 查询设备监控列表
*
* @param deviceReportDataForm 设备监控
* @return 设备监控集合
*/
public PageInfo<DeviceReportDataVo> selectTDeviceReportDataPage(DeviceReportDataForm deviceReportDataForm);
/**
* 查询设备监控实时数据
*
......@@ -37,6 +47,14 @@ public interface ITDeviceReportDataService
*/
public List<DeviceReportDataVo> selectRealtimeDataList(DeviceReportDataForm deviceReportDataForm);
/**
* 查询设备监控实时数据
*
* @param deviceReportDataForm 设备监控
* @return 设备监控
*/
public PageInfo<DeviceReportDataVo> selectRealtimeDataPage(DeviceReportDataForm deviceReportDataForm);
/**
* 新增设备监控
*
......
package com.zehong.system.service;
import java.util.List;
import com.github.pagehelper.PageInfo;
import com.zehong.system.domain.THiddenTrouble;
import com.zehong.system.domain.form.HiddenTroubleForm;
import com.zehong.system.domain.vo.HiddenTroubleVo;
......@@ -29,6 +31,15 @@ public interface ITHiddenTroubleService
*/
public List<HiddenTroubleVo> selectTHiddenTroubleList(HiddenTroubleForm hiddenTroubleForm);
/**
* 查询隐患信息列表
*
* @param hiddenTroubleForm 隐患信息
* @return 隐患信息集合
*/
public PageInfo<HiddenTroubleVo> selectTHiddenTroublePage(HiddenTroubleForm hiddenTroubleForm);
/**
* 地图显示隐患信息列表
*
......
package com.zehong.system.service;
import java.util.List;
import com.github.pagehelper.PageInfo;
import com.zehong.system.domain.TInspectionPlan;
import com.zehong.system.domain.form.InspectionPlanForm;
import com.zehong.system.domain.vo.InspectionPlanVo;
......@@ -29,6 +31,14 @@ public interface ITInspectionPlanService
*/
public List<TInspectionPlan> selectTInspectionPlanList(InspectionPlanForm inspectionPlanForm);
/**
* 查询巡检计划列表
*
* @param inspectionPlanForm 巡检计划
* @return 巡检计划集合
*/
public PageInfo<TInspectionPlan> selectTInspectionPlanPage(InspectionPlanForm inspectionPlanForm);
/**
* 新增巡检计划
*
......
package com.zehong.system.service;
import java.util.List;
import com.github.pagehelper.PageInfo;
import com.zehong.system.domain.TMonitorDevice;
/**
......@@ -27,6 +29,15 @@ public interface ITMonitorDeviceService
*/
public List<TMonitorDevice> selectTMonitorDeviceList(TMonitorDevice tMonitorDevice);
/**
* 查询设备监控列表
*
* @param tMonitorDevice 设备监控
* @return 设备监控集合
*/
public PageInfo<TMonitorDevice> selectTMonitorDevicePage(TMonitorDevice tMonitorDevice);
/**
* 新增设备监控
*
......
package com.zehong.system.service;
import java.util.List;
import com.github.pagehelper.PageInfo;
import com.zehong.system.domain.TPipe;
import com.zehong.system.domain.vo.PipeVo;
......@@ -28,6 +30,14 @@ public interface ITPipeService
*/
public List<PipeVo> selectTPipeList(TPipe tPipe);
/**
* 查询管道信息列表
*
* @param tPipe 管道信息
* @return 管道信息集合
*/
public PageInfo<PipeVo> selectTPipePage(TPipe tPipe);
/**
* 统计管道总长度
* @param
......
......@@ -3,6 +3,8 @@ package com.zehong.system.service;
import java.util.List;
import java.util.Map;
import com.github.pagehelper.PageInfo;
import com.github.pagehelper.PageInfo;
import com.zehong.system.domain.TWorkOrder;
import com.zehong.system.domain.form.TWorkOrderForm;
......@@ -35,6 +37,14 @@ public interface ITWorkOrderService
*/
public List<WorkOrderVo> selectTWorkOrderList(TWorkOrderForm tWorkOrderForm) throws Exception;
/**
* 查询工单基础信息列表
*
* @param tWorkOrderForm 工单基础信息表单
* @return 工单基础信息集合
*/
public PageInfo<WorkOrderVo> selectTWorkOrderPage(TWorkOrderForm tWorkOrderForm) throws Exception;
/**
* 查询代办订单
* @return
......
package com.zehong.system.service.impl;
import java.util.ArrayList;
import java.util.List;
import com.github.pagehelper.PageInfo;
import com.zehong.common.core.domain.entity.SysDictData;
import com.zehong.common.utils.DateUtils;
import com.zehong.common.utils.PageInfoUtil;
import com.zehong.common.utils.StringUtils;
import com.zehong.system.domain.TDeviceAlarm;
import com.zehong.system.domain.TDeviceInfo;
import com.zehong.system.domain.TDeviceReportData;
import com.zehong.system.domain.TPipe;
import com.zehong.system.domain.form.DeviceAlarmForm;
import com.zehong.system.domain.vo.DeviceAlarmVo;
import com.zehong.system.mapper.TDeviceAlarmMapper;
import com.zehong.system.mapper.TDeviceInfoMapper;
import com.zehong.system.mapper.TDeviceReportDataMapper;
import com.zehong.system.mapper.TPipeMapper;
import com.zehong.system.service.ISysDictTypeService;
import com.zehong.system.service.ITDeviceAlarmService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TDeviceAlarmMapper;
import com.zehong.system.domain.TDeviceAlarm;
import com.zehong.system.service.ITDeviceAlarmService;
import java.util.ArrayList;
import java.util.List;
/**
* 报警信息Service业务层处理
......@@ -116,31 +118,23 @@ public class TDeviceAlarmServiceImpl implements ITDeviceAlarmService
* @return 报警信息
*/
@Override
public List<DeviceAlarmVo> selectTDeviceAlarmList(DeviceAlarmForm deviceAlarmForm) throws Exception
public PageInfo<DeviceAlarmVo> selectTDeviceAlarmPage(DeviceAlarmForm deviceAlarmForm) throws Exception
{
List<DeviceAlarmVo> list = new ArrayList<>();
List<TDeviceAlarm> deviceAlarmList = new ArrayList<>();
PageInfo<TDeviceAlarm> deviceAlarmList = new PageInfo<>();
if(deviceAlarmForm.getDeviceCode() != null){
List<TDeviceAlarm> pipeList = tDeviceAlarmMapper.selectTDeviceAlarmByPipeCode(deviceAlarmForm);
List<TDeviceAlarm> deviceList = tDeviceAlarmMapper.selectTDeviceAlarmByDeviceCode(deviceAlarmForm);
if(pipeList.size() != 0){
deviceAlarmList.addAll(pipeList);
}
if(deviceList.size() != 0){
deviceAlarmList.addAll(deviceList);
}
setDeviceInfo(deviceAlarmList,pipeList);
setDeviceInfo(deviceAlarmList,deviceList);
} else {
deviceAlarmList = tDeviceAlarmMapper.selectTDeviceAlarmList(deviceAlarmForm);
deviceAlarmList = new PageInfo(tDeviceAlarmMapper.selectTDeviceAlarmList(deviceAlarmForm));
}
if(deviceAlarmList.size() != 0) {
for (TDeviceAlarm alarm : deviceAlarmList) {
DeviceAlarmVo deviceAlarmVo = new DeviceAlarmVo();
BeanUtils.copyProperties(alarm, deviceAlarmVo);
if ("0".equals(alarm.getDeviceType())) {
TPipe pipe = tPipeMapper.selectTPipeById(alarm.getDeviceId());
PageInfo<DeviceAlarmVo> pageVo = PageInfoUtil.pageInfo2PageInfoDTO(deviceAlarmList,DeviceAlarmVo.class);
if(pageVo.getList().size() != 0) {
for (DeviceAlarmVo deviceAlarmVo : pageVo.getList()) {
if ("0".equals(deviceAlarmVo.getDeviceType())) {
TPipe pipe = tPipeMapper.selectTPipeById(deviceAlarmVo.getDeviceId());
if (pipe != null) {
deviceAlarmVo.setDeviceCode(pipe.getPipeCode());
deviceAlarmVo.setDeviceName(pipe.getPipeName());
......@@ -150,7 +144,7 @@ public class TDeviceAlarmServiceImpl implements ITDeviceAlarmService
deviceAlarmVo.setPipeList(pipeList);
}
} else {
TDeviceInfo deviceInfo = tDeviceInfoMapper.selectTDeviceInfoById(alarm.getDeviceId());
TDeviceInfo deviceInfo = tDeviceInfoMapper.selectTDeviceInfoById(deviceAlarmVo.getDeviceId());
if (deviceInfo != null) {
deviceAlarmVo.setDeviceCode(deviceInfo.getDeviceCode());
deviceAlarmVo.setDeviceName(deviceInfo.getDeviceName());
......@@ -161,29 +155,39 @@ public class TDeviceAlarmServiceImpl implements ITDeviceAlarmService
}
}
if (StringUtils.isNotEmpty(alarm.getAlarmType())) {
if (StringUtils.isNotEmpty(deviceAlarmVo.getAlarmType())) {
List<SysDictData> sysDictDataList = iSysDictTypeService.selectDictDataByType("t_alarm_type");
for (SysDictData sysDictData : sysDictDataList) {
if (alarm.getAlarmType().equals(sysDictData.getDictValue())) {
if (deviceAlarmVo.getAlarmType().equals(sysDictData.getDictValue())) {
deviceAlarmVo.setAlarmType(sysDictData.getDictLabel());
}
}
}
if (StringUtils.isNotEmpty(alarm.getDeviceType())) {
if (StringUtils.isNotEmpty(deviceAlarmVo.getDeviceType())) {
List<SysDictData> sysDictDataList = iSysDictTypeService.selectDictDataByType("t_trouble_device_type");
for (SysDictData sysDictData : sysDictDataList) {
if (alarm.getDeviceType().equals(sysDictData.getDictValue())) {
if (deviceAlarmVo.getDeviceType().equals(sysDictData.getDictValue())) {
deviceAlarmVo.setDeviceType(sysDictData.getDictLabel());
}
}
}
list.add(deviceAlarmVo);
}
}
return list;
return pageVo;
}
private void setDeviceInfo(PageInfo<TDeviceAlarm> deviceAlarmList,List<TDeviceAlarm> list){
if(list.size() != 0){
if(null != deviceAlarmList.getList() && !deviceAlarmList.getList().isEmpty()){
deviceAlarmList.getList().addAll(list);
deviceAlarmList.setTotal(deviceAlarmList.getTotal() + list.size());
}else{
deviceAlarmList.setList(list);
deviceAlarmList.setTotal(list.size());
}
}
}
/**
......
package com.zehong.system.service.impl;
import com.github.pagehelper.PageInfo;
import com.zehong.common.utils.PageInfoUtil;
import com.zehong.system.domain.TDeviceInfo;
import com.zehong.system.domain.TPipe;
import com.zehong.system.domain.vo.DeviceInfoVo;
......@@ -76,6 +78,29 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
return list;
}
/**
* 查询设备信息列表
*
* @param tDeviceInfo 设备信息
* @return 设备信息
*/
@Override
public PageInfo<DeviceInfoVo> selectTDeviceInfoPage(TDeviceInfo tDeviceInfo)
{
List<TDeviceInfo> deviceInfoList = tDeviceInfoMapper.selectTDeviceInfoList(tDeviceInfo);
PageInfo<DeviceInfoVo> pageVo = PageInfoUtil.pageInfo2PageInfoDTO(new PageInfo(deviceInfoList),DeviceInfoVo.class);
if(pageVo.getList().size() != 0){
for(DeviceInfoVo device : pageVo.getList()){
TPipe pipe = tPipeMapper.selectTPipeById(device.getPipeId());
device.setPipeName(pipe.getPipeName());
}
}
return pageVo;
}
/**
* 构建前端所需要下拉树结构
*
......
package com.zehong.system.service.impl;
import java.util.List;
import com.github.pagehelper.PageInfo;
import com.zehong.common.utils.DateUtils;
import com.zehong.system.domain.TDeviceInfo;
import com.zehong.system.domain.form.DeviceReportDataForm;
......@@ -70,6 +72,16 @@ public class TDeviceReportDataServiceImpl implements ITDeviceReportDataService
return tDeviceReportDataMapper.selectTDeviceReportDataList(deviceReportDataForm);
}
/**
* 查询设备监控列表
*
* @param deviceReportDataForm 设备监控
* @return 设备监控集合
*/
public PageInfo<DeviceReportDataVo> selectTDeviceReportDataPage(DeviceReportDataForm deviceReportDataForm){
return new PageInfo(tDeviceReportDataMapper.selectTDeviceReportDataList(deviceReportDataForm));
}
/**
* 查询设备监控实时数据
*
......@@ -82,6 +94,18 @@ public class TDeviceReportDataServiceImpl implements ITDeviceReportDataService
return tDeviceReportDataMapper.selectRealtimeDataList(deviceReportDataForm);
}
/**
* 查询设备监控实时数据
*
* @param deviceReportDataForm 设备监控
* @return 设备监控
*/
@Override
public PageInfo<DeviceReportDataVo> selectRealtimeDataPage(DeviceReportDataForm deviceReportDataForm)
{
return new PageInfo(tDeviceReportDataMapper.selectRealtimeDataList(deviceReportDataForm));
}
/**
* 新增设备监控
*
......
package com.zehong.system.service.impl;
import java.util.ArrayList;
import java.util.List;
import com.github.pagehelper.PageInfo;
import com.zehong.common.core.domain.entity.SysDictData;
import com.zehong.common.core.domain.entity.SysUser;
import com.zehong.common.utils.DateUtils;
import com.zehong.common.utils.PageInfoUtil;
import com.zehong.common.utils.StringUtils;
import com.zehong.system.domain.*;
import com.zehong.system.domain.form.HiddenTroubleForm;
import com.zehong.system.domain.vo.HiddenTroubleVo;
import com.zehong.system.mapper.*;
import com.zehong.system.service.ISysDictTypeService;
import com.zehong.system.service.ITHiddenTroubleService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.service.ITHiddenTroubleService;
import java.util.ArrayList;
import java.util.List;
/**
* 隐患信息Service业务层处理
......@@ -111,6 +113,30 @@ public class THiddenTroubleServiceImpl implements ITHiddenTroubleService
return list;
}
/**
* 查询隐患信息列表
*
* @param hiddenTroubleForm 隐患信息
* @return 隐患信息
*/
@Override
public PageInfo<HiddenTroubleVo> selectTHiddenTroublePage(HiddenTroubleForm hiddenTroubleForm)
{
List<THiddenTrouble> tHiddenTroubleList = tHiddenTroubleMapper.selectTHiddenTroubleList(hiddenTroubleForm);
PageInfo<HiddenTroubleVo> pageVo = PageInfoUtil.pageInfo2PageInfoDTO(new PageInfo<>(tHiddenTroubleList),HiddenTroubleVo.class);
if(pageVo.getList().size() != 0) {
for (HiddenTroubleVo hiddenTroubleVo : pageVo.getList()) {
SysUser sysUser = sysUserMapper.selectUserById(hiddenTroubleVo.getReportMan());
if(sysUser != null) {
hiddenTroubleVo.setReportManName(sysUser.getNickName());
}
}
}
return pageVo;
}
/**
* 地图显示隐患信息列表
*
......
package com.zehong.system.service.impl;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.github.pagehelper.PageInfo;
import com.zehong.common.core.domain.entity.SysDictData;
import com.zehong.common.core.domain.entity.SysUser;
import com.zehong.common.utils.DateUtils;
......@@ -15,10 +11,15 @@ import com.zehong.system.domain.vo.InspectionDataVo;
import com.zehong.system.domain.vo.InspectionPlanVo;
import com.zehong.system.mapper.*;
import com.zehong.system.service.ISysDictTypeService;
import com.zehong.system.service.ITInspectionPlanService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.service.ITInspectionPlanService;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* 巡检计划Service业务层处理
......@@ -131,6 +132,18 @@ public class TInspectionPlanServiceImpl implements ITInspectionPlanService
return tInspectionPlanMapper.selectTInspectionPlanList(inspectionPlanForm);
}
/**
* 查询巡检计划列表
*
* @param inspectionPlanForm 巡检计划
* @return 巡检计划
*/
@Override
public PageInfo<TInspectionPlan> selectTInspectionPlanPage(InspectionPlanForm inspectionPlanForm)
{
return new PageInfo(tInspectionPlanMapper.selectTInspectionPlanList(inspectionPlanForm));
}
/**
* 新增巡检计划
*
......
package com.zehong.system.service.impl;
import java.util.List;
import com.github.pagehelper.PageInfo;
import com.zehong.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -44,6 +46,18 @@ public class TMonitorDeviceServiceImpl implements ITMonitorDeviceService
return tMonitorDeviceMapper.selectTMonitorDeviceList(tMonitorDevice);
}
/**
* 查询设备监控列表
*
* @param tMonitorDevice 设备监控
* @return 设备监控
*/
@Override
public PageInfo<TMonitorDevice> selectTMonitorDevicePage(TMonitorDevice tMonitorDevice)
{
return new PageInfo(tMonitorDeviceMapper.selectTMonitorDeviceList(tMonitorDevice));
}
/**
* 新增设备监控
*
......
package com.zehong.system.service.impl;
import java.util.ArrayList;
import java.util.List;
import com.zehong.common.core.domain.entity.SysDictData;
import com.zehong.common.utils.StringUtils;
import com.github.pagehelper.PageInfo;
import com.zehong.common.utils.PageInfoUtil;
import com.zehong.system.domain.TDeviceInfo;
import com.zehong.system.domain.TPipe;
import com.zehong.system.domain.vo.PipeVo;
import com.zehong.system.mapper.TDeviceInfoMapper;
import com.zehong.system.service.ISysDictTypeService;
import com.zehong.system.mapper.TPipeMapper;
import com.zehong.system.service.ITPipeService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TPipeMapper;
import com.zehong.system.domain.TPipe;
import com.zehong.system.service.ITPipeService;
import java.util.ArrayList;
import java.util.List;
/**
* 管道信息Service业务层处理
......@@ -79,6 +78,29 @@ public class TPipeServiceImpl implements ITPipeService
return list;
}
/**
* 查询管道信息列表
*
* @param tPipe 管道信息
* @return 管道信息
*/
@Override
public PageInfo<PipeVo> selectTPipePage(TPipe tPipe)
{
List<PipeVo> list = new ArrayList<>();
List<TPipe> tPipeList = tPipeMapper.selectTPipeList(tPipe);
PageInfo<PipeVo> pageVo = PageInfoUtil.pageInfo2PageInfoDTO(new PageInfo(tPipeList),PipeVo.class);
if(pageVo.getList().size() != 0){
for(PipeVo pipe : pageVo.getList()){
List<TDeviceInfo> deviceInfoList = tDeviceInfoMapper.selectTDeviceInfoByPipeId(pipe.getPipeId());
if(deviceInfoList.size() != 0) {
pipe.setDeviceInfoList(deviceInfoList);
}
}
}
return pageVo;
}
/**
* 统计管道总长度
* @return
......
......@@ -4,19 +4,23 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import com.github.pagehelper.PageInfo;
import com.github.pagehelper.PageInfo;
import com.zehong.common.core.domain.entity.SysUser;
import com.zehong.common.utils.DateUtils;
import com.zehong.common.utils.PageInfoUtil;
import com.zehong.system.domain.*;
import com.zehong.system.domain.form.TWorkOrderForm;
import com.zehong.system.domain.vo.InspectionPlanVo;
import com.zehong.system.domain.vo.OrderFeedbackVo;
import com.zehong.system.domain.vo.WorkOrderVo;
import com.zehong.system.mapper.*;
import com.zehong.system.service.ITWorkOrderService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.service.ITWorkOrderService;
import java.util.ArrayList;
import java.util.List;
/**
* 工单基础信息Service业务层处理
......@@ -220,6 +224,37 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
return workOrderVoList;
}
/**
* 查询工单基础信息列表
*
* @param tWorkOrderForm 工单基础信息
* @return 工单基础信息
*/
@Override
public PageInfo<WorkOrderVo> selectTWorkOrderPage(TWorkOrderForm tWorkOrderForm) throws Exception
{
List<TWorkOrder> workOrderList = tWorkOrderMapper.selectTWorkOrderList(tWorkOrderForm);
PageInfo<WorkOrderVo> pageVo = PageInfoUtil.pageInfo2PageInfoDTO(new PageInfo<>(workOrderList),WorkOrderVo.class);
if(pageVo.getList().size() != 0){
for(WorkOrderVo workOrder : pageVo.getList()){
// 获取巡检员姓名
SysUser appointInspector = sysUserMapper.selectUserById(workOrder.getAppointInspector());
workOrder.setAppointInspectorName(appointInspector.getNickName());
if(workOrder.getActualInspector() != workOrder.getAppointInspector() && workOrder.getActualInspector() != null){
SysUser actualInspector = sysUserMapper.selectUserById(workOrder.getActualInspector());
workOrder.setActualInspectorName(actualInspector.getNickName());
} else {
workOrder.setActualInspectorName(appointInspector.getNickName());
}
}
}
return pageVo;
}
/**
* 代办工单
* @param userId
......
#app {
.main-container {
min-height: 100%;
transition: margin-left .28s;
transition: margin-left 0.28s;
margin-left: $sideBarWidth;
position: relative;
}
.sidebar-container {
-webkit-transition: width .28s;
-webkit-transition: width 0.28s;
transition: width 0.28s;
width: $sideBarWidth !important;
background-color: #053B6A;
background-color: #053b6a;
height: 100%;
position: fixed;
font-size: 0px;
......@@ -20,28 +19,44 @@
left: 0;
z-index: 1001;
overflow: hidden;
-webkit-box-shadow: 2px 0 6px rgba(0,21,41,.35);
box-shadow: 2px 0 6px rgba(0,21,41,.35);
.el-menu-item{
-webkit-box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
box-shadow: 2px 0 6px rgba(0, 21, 41, 0.35);
.el-menu-item {
padding: 0px !important;
margin-top: 5px;
height: 84px;
line-height: 30px !important;
text-align: center;
.svg-icon{
.svg-icon {
margin-top: 10px;
font-size: 30px;
// width: 30px !important;
}
}
reset element-ui css
.horizontal-collapse-transition {
transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
reset element-ui css .horizontal-collapse-transition {
transition: 0s width ease-in-out, 0s padding-left ease-in-out,
0s padding-right ease-in-out;
}
.scrollbar-wrapper {
overflow-x: hidden !important;
.el-menu-item:focus,
.is-active {
outline: none;
// background-image: url(/static/img/item-background.0ec28f27.png);
background-repeat: no-repeat;
background-size: 100% 100%;
/* background: rgba(0, 0, 0, 0); */
color: #31eaea !important;
}
.el-menu-item:hover {
outline: none;
// background-image: url(/static/img/item-background.0ec28f27.png);
background-repeat: no-repeat;
background-size: 100% 100%;
/* background: rgba(0, 0, 0, 0); */
color: #31eaea !important;
}
}
.el-scrollbar__bar.is-vertical {
......@@ -73,13 +88,14 @@
}
.el-menu {
background-color: #053B6A;
background-color: #053b6a;
border: none;
height: 100%;
width: 100% !important;
}
.el-menu-item, .el-submenu__title {
.el-menu-item,
.el-submenu__title {
overflow: hidden !important;
text-overflow: ellipsis !important;
// white-space: nowrap !important;
......@@ -97,7 +113,7 @@
color: #fff !important;
}
& .nest-menu .el-submenu>.el-submenu__title,
& .nest-menu .el-submenu > .el-submenu__title,
& .el-submenu .el-menu-item {
min-width: $sideBarWidth !important;
......@@ -106,9 +122,9 @@
}
}
& .theme-dark .nest-menu .el-submenu>.el-submenu__title,
& .theme-dark .nest-menu .el-submenu > .el-submenu__title,
& .theme-dark .el-submenu .el-menu-item {
background-color: #053B6A !important;
background-color: #053b6a !important;
&:hover {
background-color: rgba(0, 0, 0, 0.06) !important;
......@@ -141,20 +157,19 @@
.el-submenu {
overflow: hidden;
&>.el-submenu__title {
& > .el-submenu__title {
padding: 0 0 !important;
.svg-icon {
margin-left: 20px;
}
}
}
.el-menu--collapse {
.el-submenu {
&>.el-submenu__title {
&>span {
& > .el-submenu__title {
& > span {
height: 0;
width: 0;
overflow: hidden;
......@@ -177,7 +192,7 @@
}
.sidebar-container {
transition: transform .28s;
transition: transform 0.28s;
width: $sideBarWidth !important;
}
......@@ -191,7 +206,6 @@
}
.withoutAnimation {
.main-container,
.sidebar-container {
transition: none;
......@@ -201,13 +215,13 @@
// when menu collapsed
.el-menu--vertical {
&>.el-menu {
& > .el-menu {
.svg-icon {
margin-right: 16px;
}
}
.nest-menu .el-submenu>.el-submenu__title,
.nest-menu .el-submenu > .el-submenu__title,
.el-menu-item {
&:hover {
// you can use $subMenuHover
......@@ -216,7 +230,7 @@
}
// the scroll bar appears when the subMenu is too long
>.el-menu--popup {
> .el-menu--popup {
max-height: 100vh;
overflow-y: auto;
......
......@@ -209,7 +209,7 @@ export default {
<style lang="scss" scoped>
.wrapper {
width: 406px;
max-height: 430px;
max-height: 500px;
background: #fff;
border-radius: 4px;
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
......
......@@ -181,7 +181,7 @@ export default {
<style lang="scss" scoped>
.wrapper {
width: 406px;
max-height: 430px;
max-height: 500px;
background: #fff;
border-radius: 4px;
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
......
......@@ -184,7 +184,7 @@ export default {
<style lang="scss" scoped>
.wrapper {
width: 406px;
max-height: 430px;
max-height: 500px;
background: #fff;
border-radius: 4px;
box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16);
......
......@@ -4,9 +4,13 @@
<svg-icon class-name="size-icon" icon-class="size" />
</div>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="item of sizeOptions" :key="item.value" :disabled="size===item.value" :command="item.value">
{{
item.label }}
<el-dropdown-item
v-for="item of sizeOptions"
:key="item.value"
:disabled="size === item.value"
:command="item.value"
>
{{ item.label }}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
......@@ -17,41 +21,40 @@ export default {
data() {
return {
sizeOptions: [
{ label: 'Default', value: 'default' },
{ label: 'Medium', value: 'medium' },
{ label: 'Small', value: 'small' },
{ label: 'Mini', value: 'mini' }
]
}
{ label: "Default", value: "default" },
{ label: "Medium", value: "medium" },
{ label: "Small", value: "small" },
{ label: "Mini", value: "mini" },
],
};
},
computed: {
size() {
return this.$store.getters.size
}
return this.$store.getters.size;
},
},
methods: {
handleSetSize(size) {
this.$ELEMENT.size = size
this.$store.dispatch('app/setSize', size)
this.refreshView()
this.$ELEMENT.size = size;
this.$store.dispatch("app/setSize", size);
this.refreshView();
this.$message({
message: 'Switch Size Success',
type: 'success'
})
message: "Switch Size Success",
type: "success",
});
},
refreshView() {
// In order to make the cached page re-rendered
this.$store.dispatch('tagsView/delAllCachedViews', this.$route)
this.$store.dispatch("tagsView/delAllCachedViews", this.$route);
const { fullPath } = this.$route
const { fullPath } = this.$route;
this.$nextTick(() => {
this.$router.replace({
path: '/redirect' + fullPath
})
})
}
}
}
path: "/redirect" + fullPath,
});
});
},
},
};
</script>
......@@ -20,10 +20,16 @@
</template>
<!-- 顶部菜单超出数量折叠 -->
<el-submenu index="more" v-if="topMenus.length > visibleNumber">
<!-- <div> -->
<el-submenu
class="onlyNavTio"
index="more"
v-if="topMenus.length > visibleNumber"
>
<template slot="title">更多菜单</template>
<template v-for="(item, index) in topMenus">
<el-menu-item
class="navTopBar"
:index="item.path"
:key="index"
v-if="index >= visibleNumber"
......@@ -32,6 +38,7 @@
>
</template>
</el-submenu>
<!-- </div> -->
</el-menu>
</template>
......@@ -225,6 +232,45 @@ export default {
}
}
// 》〉》〉》导航的样式调整
.navTopBar {
// background-color: red !important;
width: 110px !important;
background-color: #053b6a !important;
text-align: center !important;
color: #fff !important;
&:hover {
color: #fff !important;
outline: none;
background-image: url("../../assets/logo/item-background.png");
background-repeat: no-repeat;
background-size: 100% 100%;
/* background: rgba(0, 0, 0, 0); */
color: #31eaea !important;
}
}
.navTopBar:focus,
.navTopBar.is-active {
outline: none;
background-image: url("../../assets/logo/item-background.png");
background-repeat: no-repeat;
background-size: 100% 100%;
/* background: rgba(0, 0, 0, 0); */
color: #31eaea !important;
}
.el-menu--popup {
z-index: 100;
min-width: 120px;
border: none;
padding: 5px;
border-radius: 2px;
-webkit-box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
background-color: #053b6a;
}
// 》〉》〉》导航的样式
.el-menu--horizontal > .el-menu-item.is-active {
border-bottom: 3px solid #{"var(--theme)"};
/* box-shadow: inset 2px 2px 20px #5CD9D4; */
......@@ -235,8 +281,8 @@ export default {
.el-menu--horizontal > .el-submenu .el-submenu__title {
height: 50px !important;
line-height: 50px !important;
border:none !important;
margin-left:15px;
border: none !important;
margin-left: 15px;
}
.el-menu--horizontal > .el-menu-item:not(.is-disabled):hover,
.el-menu--horizontal > .el-menu-item:not(.is-disabled):focus {
......@@ -258,7 +304,7 @@ export default {
rgba(0, 0, 0, 0) 100%
);
}
.submenu-title-noDropdown{
.submenu-title-noDropdown {
color: rgb(5 59 106) !important;
font-weight: 900 !important;
}
......
<template>
<div v-if="!item.hidden">
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
<template
v-if="
hasOneShowingChild(item.children, item) &&
(!onlyOneChild.children || onlyOneChild.noShowingChildren) &&
!item.alwaysShow
"
>
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path)">
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)"/><br>
<el-menu-item
:index="resolvePath(onlyOneChild.path)"
:class="{ 'submenu-title-noDropdown': !isNest }"
>
<item
:icon="onlyOneChild.meta.icon || (item.meta && item.meta.icon)"
/><br />
<!-- <item :title="onlyOneChild.meta.title" /> -->
{{onlyOneChild.meta.title}}
{{ onlyOneChild.meta.title }}
</el-menu-item>
</app-link>
</template>
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
<el-submenu
v-else
ref="subMenu"
:index="resolvePath(item.path)"
popper-append-to-body
>
<template slot="title">
<item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
<item
v-if="item.meta"
:icon="item.meta && item.meta.icon"
:title="item.meta.title"
/>
</template>
<sidebar-item
v-for="child in item.children"
......@@ -27,135 +47,142 @@
</template>
<script>
import path from 'path'
import { isExternal } from '@/utils/validate'
import Item from './Item'
import AppLink from './Link'
import FixiOSBug from './FixiOSBug'
import path from "path";
import { isExternal } from "@/utils/validate";
import Item from "./Item";
import AppLink from "./Link";
import FixiOSBug from "./FixiOSBug";
export default {
name: 'SidebarItem',
name: "SidebarItem",
components: { Item, AppLink },
mixins: [FixiOSBug],
props: {
// route object
item: {
type: Object,
required: true
required: true,
},
isNest: {
type: Boolean,
default: false
default: false,
},
basePath: {
type: String,
default: ''
}
default: "",
},
},
data() {
this.onlyOneChild = null
return {}
this.onlyOneChild = null;
return {};
},
methods: {
hasOneShowingChild(children = [], parent) {
if (!children) {
children = [];
}
const showingChildren = children.filter(item => {
const showingChildren = children.filter((item) => {
if (item.hidden) {
return false
return false;
} else {
// Temp set(will be used if only has one showing child)
this.onlyOneChild = item
return true
this.onlyOneChild = item;
return true;
}
})
});
// When there is only one child router, the child router is displayed by default
if (showingChildren.length === 1) {
return true
return true;
}
// Show parent if there are no child router to display
if (showingChildren.length === 0) {
this.onlyOneChild = { ... parent, path: '', noShowingChildren: true }
return true
this.onlyOneChild = { ...parent, path: "", noShowingChildren: true };
return true;
}
return false
return false;
},
resolvePath(routePath) {
if (isExternal(routePath)) {
return routePath
return routePath;
}
if (isExternal(this.basePath)) {
return this.basePath
}
return path.resolve(this.basePath, routePath)
return this.basePath;
}
}
}
return path.resolve(this.basePath, routePath);
},
},
};
</script>
<style lang="scss">
#app .sidebar-container .submenu-title-noDropdown:hover, #app .sidebar-container .el-submenu__title:hover {
#app .sidebar-container .submenu-title-noDropdown:hover,
#app .sidebar-container .el-submenu__title:hover {
/* box-shadow: inset 2px 2px 20px #5CD9D4; */
background: rgba(0, 0, 0, 0);
}
#app .sidebar-container .el-menu-item, #app .sidebar-container .el-submenu__title {
#app .sidebar-container .el-menu-item,
#app .sidebar-container .el-submenu__title {
overflow: hidden !important;
text-overflow: ellipsis !important;
background: rgba(0, 0, 0, 0);
}
.el-menu-item:hover {
// 顶部导航的样式
.navbar {
.el-menu-item:hover {
outline: none;
background-image: url("../../../assets/logo/item-background.png");
background-repeat: no-repeat;
background-size: 100% 100%;
/* background: rgba(0, 0, 0, 0); */
color: #31EAEA !important;
}
.el-menu-item:focus,.is-active {
color: #31eaea !important;
}
.el-menu-item:focus,
.is-active {
outline: none;
background-image: url("../../../assets/logo/item-background.png");
background-repeat: no-repeat;
background-size: 100% 100%;
/* background: rgba(0, 0, 0, 0); */
color: #31EAEA !important;
}
.el-menu--horizontal > .el-submenu .el-submenu__title:hover {
color: #31eaea !important;
}
.el-menu--horizontal > .el-submenu .el-submenu__title:hover {
background-color: rgba(0, 0, 0, 0);
color: #fff;
background-image: url("../../../assets/logo/item-background.png");
background-repeat: no-repeat;
background-size: 100% 100%;
}
.el-menu--horizontal > .el-submenu .el-submenu__title {
}
.el-menu--horizontal > .el-submenu .el-submenu__title {
height: 50px !important;
line-height: 50px !important;
margin-top: 15px;
font-size: 22px;
font-weight: 600;
color: #fff;
}
.el-menu--horizontal > .el-submenu:focus .el-submenu__title, .el-menu--horizontal > .el-submenu:hover .el-submenu__title {
}
.el-menu--horizontal > .el-submenu:focus .el-submenu__title,
.el-menu--horizontal > .el-submenu:hover .el-submenu__title {
color: #fff;
}
.el-menu--horizontal > .el-submenu.is-active .el-submenu__title {
}
.el-menu--horizontal > .el-submenu.is-active .el-submenu__title {
border-bottom: 0px solid;
color: #fff;
}
.el-submenu__title i {
}
.el-submenu__title i {
color: #fff;
}
.el-menu--horizontal .el-menu .el-menu-item, .el-menu--horizontal .el-menu .el-submenu__title {
background-color: #053B6A;
}
.el-menu--horizontal .el-menu .el-menu-item,
.el-menu--horizontal .el-menu .el-submenu__title {
background-color: #053b6a;
float: none;
height: 36px;
line-height: 36px;
padding: 0;
color: #fff;
}
.el-menu--popup {
}
.el-menu--popup {
z-index: 100;
min-width: 120px;
border: none;
......@@ -163,6 +190,9 @@ export default {
border-radius: 2px;
-webkit-box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
background-color: #053B6A;
background-color: #053b6a;
}
}
// 》〉》〉》〉顶部导航的样式
</style>
\ No newline at end of file
......@@ -112,6 +112,10 @@ class gaodeMap {
this.view.drawerOpacity = true;
}
}
// 每次地图移动结束,就让地图可以缩放
let options = this.myMap.getStatus();
options.scrollWheel = true;
this.myMap.setStatus(options);
});
this.districtBoundaries();
......@@ -587,7 +591,10 @@ class gaodeMap {
// 当选择的是新建的时候,线是点不了的
if (this.lineType == 1 || this.view.targetNum == 1) return;
if((this.view.targetNum==2||this.view.targetNum==3)&&e.type=="mouseover"){
if (
(this.view.targetNum == 2 || this.view.targetNum == 3) &&
e.type == "mouseover"
) {
this.polyLinesColorClear(polyline);
}
// 上方导航的高
......
......@@ -117,6 +117,7 @@ class gaodeMap {
if (this.handleInfoWindowOpenFunc) {
this.handleInfoWindowOpenFunc();
this.handleInfoWindowOpenFunc = null;
this.leftListClick=false;
}
// 刚进入页面的时候只调用一次,让左侧的抽屉在地图移动完之后显示
......
......@@ -71,7 +71,7 @@
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="deviceAlarmList.slice((pageNum-1)*pageSize,pageNum*pageSize)" @selection-change="handleSelectionChange" >
<el-table v-loading="loading" :data="deviceAlarmList" @selection-change="handleSelectionChange" >
<el-table-column label="设备名称" align="center" prop="deviceName" width="280px"/>
<el-table-column label="设备编号" align="center" prop="deviceCode" width="240px"/>
<el-table-column label="设备类型" align="center" prop="deviceType"/>
......@@ -120,8 +120,8 @@
<pagination
v-show="total>0"
:total="total"
:page.sync="pageNum"
:limit.sync="pageSize"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList" />
<!-- 添加工单信息对话框 -->
......@@ -187,8 +187,6 @@ export default {
showSearch: true,
// 总条数
total: 0,
pageNum: 1,
pageSize: 10,
// 报警信息表格数据
deviceAlarmList: [],
// 报警类型字典
......@@ -212,6 +210,8 @@ export default {
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
deviceCode: null,
orderId: null,
alarmType: null,
......@@ -292,7 +292,7 @@ export default {
},
/** 搜索按钮操作 */
handleQuery() {
this.pageNum = 1;
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
......
......@@ -26,7 +26,7 @@
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="dataList.slice((pageNum-1)*pageSize,pageNum*pageSize)" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="设备名称" align="center" prop="deviceName" />
<el-table-column label="设备编号" align="center" prop="deviceCode" />
......@@ -62,8 +62,8 @@
<pagination
v-show="total>0"
:total="total"
:page.sync="pageNum"
:limit.sync="pageSize"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
......@@ -93,8 +93,6 @@ export default {
showSearch: true,
// 总条数
total: 0,
pageNum: 1,
pageSize: 10,
// 设备监控表格数据
dataList: [],
// 处理状态字典
......@@ -108,6 +106,8 @@ export default {
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
deviceNum: null,
standardConditionAccumulation: null,
workingConditionAccumulation: null,
......@@ -134,6 +134,7 @@ export default {
/** 查询设备监控列表 */
getList() {
this.loading = true;
console.log();
realtimeData(this.queryParams).then(response => {
this.dataList = response.rows;
this.total = response.total;
......@@ -167,7 +168,7 @@ export default {
},
/** 搜索按钮操作 */
handleQuery() {
this.pageNum = 1;
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
......
......@@ -47,7 +47,7 @@
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="dataList.slice((pageNum-1)*pageSize,pageNum*pageSize)" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
<el-table-column label="设备名称" align="center" prop="deviceName" />
<el-table-column label="设备编号" align="center" prop="deviceCode" />
<el-table-column label="设备类型" align="center" prop="deviceType" >
......@@ -71,8 +71,8 @@
<pagination
v-show="total>0"
:total="total"
:page.sync="pageNum"
:limit.sync="pageSize"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
......@@ -102,8 +102,6 @@ export default {
showSearch: true,
// 总条数
total: 0,
pageNum: 1,
pageSize: 10,
// 设备监控表格数据
dataList: [],
// 处理状态字典
......@@ -117,6 +115,8 @@ export default {
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
deviceNum: null,
standardConditionAccumulation: null,
workingConditionAccumulation: null,
......@@ -178,7 +178,7 @@ export default {
},
/** 搜索按钮操作 */
handleQuery() {
this.pageNum = 1;
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
......
......@@ -82,7 +82,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="deviceInfoList.slice((pageNum-1)*pageSize,pageNum*pageSize)" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="deviceInfoList" @selection-change="handleSelectionChange">
<el-table-column label="设备名称" align="center" prop="deviceName" width="240px"/>
<el-table-column label="所属管道" align="center" prop="pipeName" width="240px"/>
<el-table-column label="设备编号" align="center" prop="deviceCode" width="240px"/>
......@@ -133,8 +133,8 @@
<pagination
v-show="total>0"
:total="total"
:page.sync="pageNum"
:limit.sync="pageSize"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
......@@ -314,8 +314,6 @@
showSearch: true,
// 总条数
total: 0,
pageNum: 1,
pageSize: 10,
// 设备信息表格数据
deviceInfoList: [],
// 弹出层标题
......@@ -333,6 +331,8 @@
typeOptions: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
enterpriseId: null,
deviceName: null,
deviceCode: null,
......@@ -459,7 +459,7 @@
},
/** 搜索按钮操作 */
handleQuery() {
this.pageNum = 1;
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
......
......@@ -118,7 +118,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="deviceList.slice((pageNum-1)*pageSize,pageNum*pageSize)" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="deviceList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="设备监控id" align="center" prop="monitorId" />
<el-table-column label="设备" align="center" prop="deviceName" />
......@@ -150,8 +150,8 @@
<pagination
v-show="total>0"
:total="total"
:page.sync="pageNum"
:limit.sync="pageSize"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
......@@ -295,8 +295,6 @@ export default {
showSearch: true,
// 总条数
total: 0,
pageNum: 1,
pageSize: 10,
// 设备监控表格数据
deviceList: [],
// 弹出层标题
......@@ -305,6 +303,8 @@ export default {
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
deviceId: null,
deviceThreshold: null,
relationPipeId: null,
......@@ -362,7 +362,7 @@ export default {
},
/** 搜索按钮操作 */
handleQuery() {
this.pageNum = 1;
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
......
......@@ -777,7 +777,6 @@ export default {
iten.infoPath = [a.toFixed(6), b.toFixed(6)];
} else {
path = [iten.path[0], iten.path[1] - 0.06];
}
this.gaoMap.panTo(path);
}
......@@ -838,7 +837,7 @@ export default {
lnglat: iten.path,
};
// 如果是原地不动,就直接执行
if (iten.path[0] == lng && iten.path[1] >= (lat + 0.06)-0.000001) {
if (iten.path[0] == lng && iten.path[1] >= lat + 0.06 - 0.000001) {
console.log("9999999999");
this.gaoMap.infoOpen(e);
return;
......@@ -1231,10 +1230,10 @@ input[type="radio"] {
// border-right: none;
flex: 1;
text-align: center;
margin-left:10px;
margin-left: 10px;
}
.code {
width: 112px;
width: 100px;
text-align: center;
}
}
......
......@@ -82,7 +82,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="pipeList.slice((pageNum-1)*pageSize,pageNum*pageSize)" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="pipeList" @selection-change="handleSelectionChange">
<el-table-column label="管道名称" align="center" prop="pipeName" width="280px"/>
<el-table-column label="管道编号" align="center" prop="pipeCode" width="240px"/>
<el-table-column label="管道类型" align="center" prop="pipeType" >
......@@ -138,8 +138,8 @@
<pagination
v-show="total>0"
:total="total"
:page.sync="pageNum"
:limit.sync="pageSize"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
......@@ -274,8 +274,6 @@
showSearch: true,
// 总条数
total: 0,
pageNum: 1,
pageSize: 10,
// 管道信息表格数据
pipeList: [],
// 弹出层标题
......@@ -294,6 +292,8 @@
pressureOptions: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
enterpriseId: null,
pipeName: null,
pipeAddr: null,
......@@ -410,7 +410,7 @@
},
/** 搜索按钮操作 */
handleQuery() {
this.pageNum = 1;
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
......
......@@ -41,7 +41,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="inspectionPlanList.slice((pageNum-1)*pageSize,pageNum*pageSize)" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="inspectionPlanList" @selection-change="handleSelectionChange">
<el-table-column label="序号" type="index" align="center" prop="planName"/>
<el-table-column label="巡检计划名称" align="center" prop="planName"/>
<el-table-column label="计划时间" align="center" prop="startTime" width="280">
......@@ -108,8 +108,8 @@
<pagination
v-show="total>0"
:total="total"
:page.sync="pageNum"
:limit.sync="pageSize"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
......@@ -234,8 +234,6 @@
showSearch: true,
// 总条数
total: 0,
pageNum: 1,
pageSize: 10,
// 巡检计划表格数据
inspectionPlanList: [],
// 计划状态字典
......@@ -261,6 +259,8 @@
open2: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
planName: null,
orderId: null,
startTime: null,
......@@ -373,7 +373,7 @@
},
/** 搜索按钮操作 */
handleQuery() {
this.pageNum = 1;
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
......
......@@ -28,9 +28,10 @@
style="width: 100%"
height="170"
>
<el-table-column prop="deviceCode" label="编号" width="100">
<el-table-column prop="deviceCode" label="设备编号" width="100">
</el-table-column>
<el-table-column prop="deviceName" label="名称" width="">
<el-table-column prop="deviceName" label="设备名称" width="">
</el-table-column>
<el-table-column prop="alarmType" label="报警类型" width="80">
</el-table-column>
......@@ -270,7 +271,7 @@ export default {
flex-wrap: wrap;
// justify-content: space-between;
align-content: flex-start;
margin-top: 7px;
// margin-top: 7px;
& > .right-content {
background-color: #fff;
width: 238px;
......
......@@ -603,8 +603,9 @@ export default {
item;
// 获取polyLine
const device = this.gaoMap.markers.filter((item) => {
const id = item.getExtData().deviceId;
return deviceId == id;
const { deviceId: id, troubleId } = item.getExtData();
// 因为隐患也有 deviceId,为了防止隐患直接遍成报警状态,所以要排除隐患,没有troubleId的就不是隐患
return !troubleId && deviceId == id;
})[0];
if (device) {
const options = device.getExtData();
......@@ -1636,7 +1637,6 @@ input[type="radio"] {
color: #053b6a;
font-weight: 600;
}
}
.deviceList {
cursor: pointer;
......@@ -1667,7 +1667,6 @@ input[type="radio"] {
white-space: nowrap;
// border-right: 1px solid #cccccc;
}
}
.no {
width: 25px;
......@@ -1677,10 +1676,10 @@ input[type="radio"] {
// border-right: none;
flex: 1;
text-align: center;
margin-left:10px;
margin-left: 10px;
}
.code {
width: 112px;
width: 100px;
text-align: center;
}
}
......
......@@ -67,7 +67,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="hiddenTroubleList.slice((pageNum-1)*pageSize,pageNum*pageSize)" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="hiddenTroubleList" @selection-change="handleSelectionChange">
<el-table-column label="隐患名称" align="center" prop="troubleName" width="400px"/>
<el-table-column label="隐患类型" align="center" prop="troubleType" >
<template slot-scope="scope">
......@@ -142,8 +142,8 @@
<pagination
v-show="total>0"
:total="total"
:page.sync="pageNum"
:limit.sync="pageSize"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
......@@ -325,8 +325,6 @@ export default {
showSearch: true,
// 总条数
total: 0,
pageNum: 1,
pageSize: 10,
// 隐患信息表格数据
hiddenTroubleList: [],
// 隐患类型字典
......@@ -368,6 +366,8 @@ export default {
open2: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
troubleName: null,
troubleType: null,
deviceId: null,
......@@ -532,7 +532,7 @@ export default {
},
/** 搜索按钮操作 */
handleQuery() {
this.pageNum = 1;
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
......
......@@ -57,7 +57,7 @@
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="basicsInfoList.slice((pageNum-1)*pageSize,pageNum*pageSize)" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="basicsInfoList" @selection-change="handleSelectionChange">
<el-table-column label="工单编号" align="center" prop="orderId" />
<el-table-column label="工单名称" align="center" prop="orderName" width="350px"/>
<el-table-column label="工单类型" align="center" prop="orderType" >
......@@ -118,8 +118,8 @@
<pagination
v-show="total>0"
:total="total"
:page.sync="pageNum"
:limit.sync="pageSize"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
......@@ -194,8 +194,6 @@ export default {
showSearch: true,
// 总条数
total: 0,
pageNum: 1,
pageSize: 10,
// 工单基础信息表格数据
basicsInfoList: [],
// 弹出层标题
......@@ -212,6 +210,8 @@ export default {
ordertypeOptions: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
orderId: null,
orderType: null,
orderName: null,
......@@ -286,7 +286,7 @@ export default {
},
/** 搜索按钮操作 */
handleQuery() {
this.pageNum = 1;
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
......
......@@ -57,7 +57,7 @@
</el-form-item>
</el-form>
<el-table v-loading="loading" :data="basicsInfoList.slice((pageNum-1)*pageSize,pageNum*pageSize)" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :data="basicsInfoList" @selection-change="handleSelectionChange">
<el-table-column label="工单编号" align="center" prop="orderId" />
<el-table-column label="工单名称" align="center" prop="orderName" width="350px"/>
<el-table-column label="工单类型" align="center" prop="orderType" >
......@@ -117,8 +117,8 @@
<pagination
v-show="total>0"
:total="total"
:page.sync="pageNum"
:limit.sync="pageSize"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
......@@ -209,8 +209,6 @@
showSearch: true,
// 总条数
total: 0,
pageNum: 1,
pageSize: 10,
// 工单基础信息表格数据
basicsInfoList: [],
// 弹出层标题
......@@ -230,6 +228,8 @@
fileIndex: 0,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
orderId: null,
orderType: null,
orderName: null,
......@@ -312,7 +312,7 @@
},
/** 搜索按钮操作 */
handleQuery() {
this.pageNum = 1;
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment