Commit 36dbbe5e authored by xulihui's avatar xulihui

新增预警到期时间,无预警单位查看,新增老旧网管改造及进度

parent 83c4657f
package com.zehong.web.controller.energency;
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.TEmergencyResources;
import com.zehong.system.service.ITEmergencyResourcesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* 应急资源Controller
*
* @author zehong
* @date 2025-06-16
*/
@RestController
@RequestMapping("/system/resources")
public class TEmergencyResourcesController extends BaseController
{
@Autowired
private ITEmergencyResourcesService tEmergencyResourcesService;
/**
* 查询应急资源列表
*/
@GetMapping("/list")
public TableDataInfo list(TEmergencyResources tEmergencyResources)
{
startPage();
List<TEmergencyResources> list = tEmergencyResourcesService.selectTEmergencyResourcesList(tEmergencyResources);
return getDataTable(list);
}
/**
* 导出应急资源列表
*/
@Log(title = "应急资源", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TEmergencyResources tEmergencyResources)
{
List<TEmergencyResources> list = tEmergencyResourcesService.selectTEmergencyResourcesList(tEmergencyResources);
ExcelUtil<TEmergencyResources> util = new ExcelUtil<TEmergencyResources>(TEmergencyResources.class);
return util.exportExcel(list, "应急资源数据");
}
/**
* 获取应急资源详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tEmergencyResourcesService.selectTEmergencyResourcesById(id));
}
/**
* 新增应急资源
*/
@Log(title = "应急资源", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TEmergencyResources tEmergencyResources)
{
return toAjax(tEmergencyResourcesService.insertTEmergencyResources(tEmergencyResources));
}
/**
* 修改应急资源
*/
@Log(title = "应急资源", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TEmergencyResources tEmergencyResources)
{
return toAjax(tEmergencyResourcesService.updateTEmergencyResources(tEmergencyResources));
}
/**
* 删除应急资源
*/
@Log(title = "应急资源", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tEmergencyResourcesService.deleteTEmergencyResourcesByIds(ids));
}
}
\ No newline at end of file
package com.zehong.web.controller.oldpipesystem;
import java.util.List;
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.zehong.common.annotation.Log;
import com.zehong.common.core.controller.BaseController;
import com.zehong.common.core.domain.AjaxResult;
import com.zehong.common.enums.BusinessType;
import com.zehong.system.domain.TPipeOldPlanProgress;
import com.zehong.system.service.ITPipeOldPlanProgressService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 管线改造进度Controller
*
* @author zehong
* @date 2026-02-10
*/
@RestController
@RequestMapping("/system/progress")
public class TPipeOldPlanProgressController extends BaseController
{
@Autowired
private ITPipeOldPlanProgressService tPipeOldPlanProgressService;
/**
* 查询管线改造进度列表
*/
@GetMapping("/list")
public TableDataInfo list(TPipeOldPlanProgress tPipeOldPlanProgress)
{
startPage();
List<TPipeOldPlanProgress> list = tPipeOldPlanProgressService.selectTPipeOldPlanProgressList(tPipeOldPlanProgress);
return getDataTable(list);
}
/**
* 导出管线改造进度列表
*/
@Log(title = "管线改造进度", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TPipeOldPlanProgress tPipeOldPlanProgress)
{
List<TPipeOldPlanProgress> list = tPipeOldPlanProgressService.selectTPipeOldPlanProgressList(tPipeOldPlanProgress);
ExcelUtil<TPipeOldPlanProgress> util = new ExcelUtil<TPipeOldPlanProgress>(TPipeOldPlanProgress.class);
return util.exportExcel(list, "管线改造进度数据");
}
/**
* 获取管线改造进度详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(tPipeOldPlanProgressService.selectTPipeOldPlanProgressById(id));
}
/**
* 新增管线改造进度
*/
@Log(title = "管线改造进度", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TPipeOldPlanProgress tPipeOldPlanProgress)
{
return toAjax(tPipeOldPlanProgressService.insertTPipeOldPlanProgress(tPipeOldPlanProgress));
}
/**
* 修改管线改造进度
*/
@Log(title = "管线改造进度", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TPipeOldPlanProgress tPipeOldPlanProgress)
{
return toAjax(tPipeOldPlanProgressService.updateTPipeOldPlanProgress(tPipeOldPlanProgress));
}
/**
* 删除管线改造进度
*/
@Log(title = "管线改造进度", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(tPipeOldPlanProgressService.deleteTPipeOldPlanProgressByIds(ids));
}
}
\ No newline at end of file
package com.zehong.web.controller.operationMonitor;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.zehong.common.constant.HttpStatus;
import com.zehong.common.core.page.PageDomain;
import com.zehong.common.core.page.TableSupport;
import com.zehong.common.core.redis.RedisCache;
import com.zehong.system.domain.TConfiguration;
import com.zehong.system.domain.TDeviceInfo;
import com.zehong.system.domain.TDeviceInfoS;
import com.zehong.system.service.ITDeviceInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
......@@ -31,6 +45,10 @@ public class TDeviceReportDataController extends BaseController
{
@Autowired
private ITDeviceReportDataService tDeviceReportDataService;
@Autowired
private ITDeviceInfoService tDeviceInfoService;
@Autowired
private RedisCache redisCache;
/**
* 查询设备监控列表
......@@ -43,6 +61,85 @@ public class TDeviceReportDataController extends BaseController
return getDataTable(list);
}
@GetMapping("/redisList")
public TableDataInfo redisList(TDeviceInfoS tDeviceInfos)
{
List<TDeviceInfoS> tDeviceInfoS = tDeviceInfoService.selectDetailInfoAll(tDeviceInfos);
List<TConfiguration> list = new ArrayList<>();
for (TDeviceInfoS tDeviceInfo : tDeviceInfoS) {
JSONObject devicesReport = redisCache.getCacheMapValue("devices_report", tDeviceInfo.getIotNo());
if(devicesReport!=null){
if(tDeviceInfo.getDeviceType().equals("探测器")){
System.out.println(devicesReport);
TConfiguration tConfiguration = new TConfiguration();
tConfiguration.setNumber(tDeviceInfo.getIotNo());
tConfiguration.setDetectorName(tDeviceInfo.getDeviceName());
tConfiguration.setDetectionMedium(tDeviceInfo.getDetectionMedium());
List<TDeviceInfo> tDeviceInfoList = new ArrayList<>();
if(tDeviceInfo.getRelationDeviceId()!=null){
TDeviceInfo tDeviceInfo1 = new TDeviceInfo();
tDeviceInfo1.setDeviceId(Long.valueOf(tDeviceInfo.getRelationDeviceId()));
tDeviceInfoList = tDeviceInfoService.selectTDeviceInfoList(tDeviceInfo1);
}
if (tDeviceInfoList != null && tDeviceInfoList.size() > 0) {
tConfiguration.setBeyondDevicename(tDeviceInfoList.get(0).getDeviceName());//所属设备名称
}
tConfiguration.setStatus(devicesReport.get("status").toString());
tConfiguration.setTime(devicesReport.get("time").toString());
list.add(tConfiguration);
}else{
ObjectMapper mapper = new ObjectMapper();
try {
TConfiguration tConfiguration = mapper.convertValue(devicesReport, TConfiguration.class);
List<TDeviceInfo> tDeviceInfoList = new ArrayList<>();
if(tDeviceInfo.getRelationDeviceId()!=null){
TDeviceInfo tDeviceInfo1 = new TDeviceInfo();
tDeviceInfo1.setDeviceId(Long.valueOf(tDeviceInfo.getRelationDeviceId()));
tDeviceInfoList = tDeviceInfoService.selectTDeviceInfoList(tDeviceInfo1);
}
if (tDeviceInfoList != null && tDeviceInfoList.size() > 0) {
tConfiguration.setBeyondDevicename(tDeviceInfoList.get(0).getDeviceName());//所属设备名称
}
tConfiguration.setDetectorName(tDeviceInfo.getDeviceName());//设备名称
if("2".equals(tDeviceInfos.getDeviceType())){
tConfiguration.setValue(tConfiguration.getValue()+tDeviceInfo.getRemarksn());
}
list.add(tConfiguration);
} catch (IllegalArgumentException e) {
// 处理转换错误
}
}
}
}
List<TConfiguration> page = new ArrayList<>();
if(list.size()>0){
List<TConfiguration> sortedList = list.stream()
.sorted(Comparator.comparing(TConfiguration::getTime).reversed())
.collect(Collectors.toList());
PageDomain pageDomain = TableSupport.buildPageRequest();
Integer pageNum = pageDomain.getPageNum();
Integer pageSize = pageDomain.getPageSize();
if (pageNum > 0) {
int fromIndex = (pageNum - 1) * pageSize;
int toIndex = fromIndex + pageSize;
if (fromIndex >= sortedList.size()) {
System.out.println("Page out of bounds.");
} else {
page = sortedList.subList(fromIndex, Math.min(toIndex, sortedList.size()));
System.out.println("Page " + pageNum + " : " + page);
}
}
}
TableDataInfo rspData = new TableDataInfo();
rspData.setCode(HttpStatus.SUCCESS);
rspData.setMsg("查询成功");
rspData.setRows(page);
rspData.setTotal(list.size());
return rspData;
}
/**
* 导出设备监控列表
*/
......
package com.zehong.web.controller.task;
import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import com.zehong.common.utils.StringUtils;
import com.zehong.system.domain.TEnterpriseInfo;
import com.zehong.system.domain.TWorkTaskPatrol;
import com.zehong.system.service.ITEnterpriseInfoService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
......@@ -33,6 +42,9 @@ public class TLinePatrolController extends BaseController
@Autowired
private ITLinePatrolService tLinePatrolService;
@Autowired
private ITEnterpriseInfoService tEnterpriseInfoService;
/**
* 查询巡线列表
*/
......@@ -94,4 +106,32 @@ public class TLinePatrolController extends BaseController
{
return toAjax(tLinePatrolService.deleteTLinePatrolByIds(ids));
}
@GetMapping("/getPatrolChars/{year}")
public AjaxResult getPatrolChars(@PathVariable("year") String year)
{
if("".equals(year) || year==null){
Calendar calendar = Calendar.getInstance();
year = String.valueOf(calendar.get(Calendar.YEAR)) + '-';
}
List<TLinePatrol> list = tLinePatrolService.selectTLinePatrolList(new TLinePatrol());
String finalYear = year;
list.removeIf(e->!e.getLinePatrolTime().contains(finalYear));
Map<String, List<TLinePatrol>> collect = list.stream().collect(Collectors.groupingBy(e -> e.getBeyondEnterpriseName()));
List<TEnterpriseInfo> tEnterpriseInfoList = tEnterpriseInfoService.selectTEnterpriseInfoList(new TEnterpriseInfo());
String[] enterpriseName = tEnterpriseInfoList.stream()
.map(TEnterpriseInfo::getEnterpriseName)
.toArray(String[]::new);
int[] numbers = new int[enterpriseName.length];
for (int i = 0; i < enterpriseName.length; i++) {
List<TLinePatrol> tLinePatrols = collect.get(enterpriseName[i]);
Integer num = tLinePatrols==null? 0 : tLinePatrols.size();
numbers[i] = num;
}
HashMap resultMap = new HashMap();
resultMap.put("enterpriseName",enterpriseName);
resultMap.put("numbers",numbers);
return AjaxResult.success(resultMap);
}
}
\ No newline at end of file
package com.zehong.system.controller;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
import com.zehong.system.domain.TEnterpriseInfo;
import com.zehong.system.service.ITEnterpriseInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
......@@ -31,6 +37,8 @@ public class TPlanInfoController extends BaseController
{
@Autowired
private ITPlanInfoService tPlanInfoService;
@Autowired
private ITEnterpriseInfoService tEnterpriseInfoService;
/**
* 查询应急预案列表
......@@ -106,4 +114,23 @@ public class TPlanInfoController extends BaseController
{
return AjaxResult.success(tPlanInfoService.transferEnterpriseList(complainDealId));
}
@GetMapping("/getlackenterprise")
public AjaxResult getlackenterprise()
{
List<TPlanInfo> list = tPlanInfoService.selectTPlanInfoList(new TPlanInfo());
Map<String, List<TPlanInfo>> collect = list.stream().collect(Collectors.groupingBy(e -> e.getBeyondEnterpriseId()));
//List<Map<String, Object>> maps = tPlanInfoService.selectEnterprise();
List<TEnterpriseInfo> tEnterpriseInfoList = tEnterpriseInfoService.selectTEnterpriseInfoList(new TEnterpriseInfo());
/*List<String> missingIds = maps.stream()
.map(map -> (String) map.get("enterpriseId"))
.filter(Objects::nonNull) // 过滤掉null值
.filter(enterpriseId -> !collect.containsKey(enterpriseId))
.collect(Collectors.toList());*/
List<TEnterpriseInfo> missingEnterprises = tEnterpriseInfoList.stream()
.filter(enterprise -> enterprise.getEnterpriseId() != null)
.filter(enterprise -> !collect.containsKey(enterprise.getEnterpriseId()))
.collect(Collectors.toList());
return AjaxResult.success(missingEnterprises);
}
}
package com.zehong.system.domain;
import com.zehong.common.core.domain.BaseEntity;
import lombok.Data;
/**
* 组态封装类
*/
@Data
public class TConfiguration extends BaseEntity {
/**
* 互联网ID
*/
private String number;
/**
* 状态
*/
private String status;
/**
* 上报时间
*/
private String time;
/**
* 上报值
*/
private String value;
/*
* 设备名称
* */
private String detectorName;
/**所属设备名称*/
private String beyondDevicename;
/**
* 探测介质
*/
private String detectionMedium;
}
package com.zehong.system.domain;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 应急资源对象 t_emergency_resources
*
* @author zehong
* @date 2025-06-16
*/
public class TEmergencyResources extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 资源名称 */
@Excel(name = "资源名称")
private String resourceName;
/** 资源类型 */
@Excel(name = "资源类型")
private String resourceType;
/** 经度 */
@Excel(name = "经度")
private String longitude;
/** 纬度 */
@Excel(name = "纬度")
private String latitude;
/** 联系人 */
@Excel(name = "联系人")
private String contacts;
/** 联系电话 */
@Excel(name = "联系电话")
private String contactNumber;
/** 资源描述 */
@Excel(name = "资源描述")
private String resourceDescription;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setResourceName(String resourceName)
{
this.resourceName = resourceName;
}
public String getResourceName()
{
return resourceName;
}
public void setResourceType(String resourceType)
{
this.resourceType = resourceType;
}
public String getResourceType()
{
return resourceType;
}
public void setLongitude(String longitude)
{
this.longitude = longitude;
}
public String getLongitude()
{
return longitude;
}
public void setLatitude(String latitude)
{
this.latitude = latitude;
}
public String getLatitude()
{
return latitude;
}
public void setContacts(String contacts)
{
this.contacts = contacts;
}
public String getContacts()
{
return contacts;
}
public void setContactNumber(String contactNumber)
{
this.contactNumber = contactNumber;
}
public String getContactNumber()
{
return contactNumber;
}
public void setResourceDescription(String resourceDescription)
{
this.resourceDescription = resourceDescription;
}
public String getResourceDescription()
{
return resourceDescription;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("resourceName", getResourceName())
.append("resourceType", getResourceType())
.append("longitude", getLongitude())
.append("latitude", getLatitude())
.append("contacts", getContacts())
.append("contactNumber", getContactNumber())
.append("resourceDescription", getResourceDescription())
.toString();
}
}
\ No newline at end of file
......@@ -22,6 +22,10 @@ public class TPipeOldPlanProcess extends BaseEntity
/** id */
private Long fOldPlanProcessId;
/*计划编号,唯一,用于关联进度
* */
private String serialNumber;
/** uuid:省平台对接必传参数 */
private String fUuid;
......@@ -132,6 +136,17 @@ public class TPipeOldPlanProcess extends BaseEntity
@Excel(name = "上报省厅时间")
private Date govUploadTime;
/** 坐标 */
private String coordinates;
public String getCoordinates() {
return coordinates;
}
public void setCoordinates(String coordinates) {
this.coordinates = coordinates;
}
public String getEnterpriseName() {
return enterpriseName;
}
......@@ -181,7 +196,16 @@ public class TPipeOldPlanProcess extends BaseEntity
{
return fOldPlanProcessId;
}
public void setfUuid(String fUuid)
public String getSerialNumber() {
return serialNumber;
}
public void setSerialNumber(String serialNumber) {
this.serialNumber = serialNumber;
}
public void setfUuid(String fUuid)
{
this.fUuid = fUuid;
}
......
package com.zehong.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 管线改造进度对象 t_pipe_old_plan_progress
*
* @author zehong
* @date 2026-02-10
*/
public class TPipeOldPlanProgress extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 主键 */
private Long id;
/** 计划表编号 */
@Excel(name = "计划表编号")
private String serialNumber;
/** 开始时间 */
@Excel(name = "开始时间")
private String startTime;
/** 结束时间 */
@Excel(name = "结束时间")
private String endTime;
/** 建设内容 */
@Excel(name = "建设内容")
private String constructionContent;
/** 坐标 */
private String coordinates;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setSerialNumber(String serialNumber)
{
this.serialNumber = serialNumber;
}
public String getSerialNumber()
{
return serialNumber;
}
public void setStartTime(String startTime)
{
this.startTime = startTime;
}
public String getStartTime()
{
return startTime;
}
public void setEndTime(String endTime)
{
this.endTime = endTime;
}
public String getEndTime()
{
return endTime;
}
public void setConstructionContent(String constructionContent)
{
this.constructionContent = constructionContent;
}
public String getConstructionContent()
{
return constructionContent;
}
public void setCoordinates(String coordinates)
{
this.coordinates = coordinates;
}
public String getCoordinates()
{
return coordinates;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("serialNumber", getSerialNumber())
.append("startTime", getStartTime())
.append("endTime", getEndTime())
.append("constructionContent", getConstructionContent())
.append("coordinates", getCoordinates())
.append("createTime", getCreateTime())
.append("remark", getRemark())
.toString();
}
}
\ No newline at end of file
package com.zehong.system.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
import java.util.Date;
/**
* 应急预案对象 t_plan_info
*
......@@ -45,6 +48,10 @@ public class TPlanInfo extends BaseEntity
@Excel(name = "应急设备及车辆")
private String planEquipment;
/*到期时间*/
@JsonFormat(pattern = "yyyy-MM-dd")
private Date endTime;
/** 图片路径 */
private String iconUrl;
......@@ -127,7 +134,16 @@ public class TPlanInfo extends BaseEntity
{
return planEquipment;
}
public void setIconUrl(String iconUrl)
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public void setIconUrl(String iconUrl)
{
this.iconUrl = iconUrl;
}
......
......@@ -99,6 +99,12 @@ public interface TDeviceInfoMapper
*/
List<TDeviceInfoS> selectDetailInfo(TDeviceInfoS tDeviceInfos);
/**
* 查询所有设备信息
* @return
*/
List<TDeviceInfoS> selectDetailInfoAll(TDeviceInfoS tDeviceInfos);
/**
* 关联设备数据删除接口
* @param deviceIds
......
package com.zehong.system.mapper;
import com.zehong.system.domain.TEmergencyResources;
import java.util.List;
/**
* 应急资源Mapper接口
*
* @author zehong
* @date 2025-06-16
*/
public interface TEmergencyResourcesMapper
{
/**
* 查询应急资源
*
* @param id 应急资源ID
* @return 应急资源
*/
public TEmergencyResources selectTEmergencyResourcesById(Long id);
/**
* 查询应急资源列表
*
* @param tEmergencyResources 应急资源
* @return 应急资源集合
*/
public List<TEmergencyResources> selectTEmergencyResourcesList(TEmergencyResources tEmergencyResources);
/**
* 新增应急资源
*
* @param tEmergencyResources 应急资源
* @return 结果
*/
public int insertTEmergencyResources(TEmergencyResources tEmergencyResources);
/**
* 修改应急资源
*
* @param tEmergencyResources 应急资源
* @return 结果
*/
public int updateTEmergencyResources(TEmergencyResources tEmergencyResources);
/**
* 删除应急资源
*
* @param id 应急资源ID
* @return 结果
*/
public int deleteTEmergencyResourcesById(Long id);
/**
* 批量删除应急资源
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteTEmergencyResourcesByIds(Long[] ids);
}
\ No newline at end of file
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TPipeOldPlanProgress;
/**
* 管线改造进度Mapper接口
*
* @author zehong
* @date 2026-02-10
*/
public interface TPipeOldPlanProgressMapper
{
/**
* 查询管线改造进度
*
* @param id 管线改造进度ID
* @return 管线改造进度
*/
public TPipeOldPlanProgress selectTPipeOldPlanProgressById(Long id);
/**
* 查询管线改造进度列表
*
* @param tPipeOldPlanProgress 管线改造进度
* @return 管线改造进度集合
*/
public List<TPipeOldPlanProgress> selectTPipeOldPlanProgressList(TPipeOldPlanProgress tPipeOldPlanProgress);
/**
* 新增管线改造进度
*
* @param tPipeOldPlanProgress 管线改造进度
* @return 结果
*/
public int insertTPipeOldPlanProgress(TPipeOldPlanProgress tPipeOldPlanProgress);
/**
* 修改管线改造进度
*
* @param tPipeOldPlanProgress 管线改造进度
* @return 结果
*/
public int updateTPipeOldPlanProgress(TPipeOldPlanProgress tPipeOldPlanProgress);
/**
* 删除管线改造进度
*
* @param id 管线改造进度ID
* @return 结果
*/
public int deleteTPipeOldPlanProgressById(Long id);
/**
* 批量删除管线改造进度
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteTPipeOldPlanProgressByIds(Long[] ids);
}
\ No newline at end of file
......@@ -97,6 +97,8 @@ public interface ITDeviceInfoService
*/
List<TDeviceInfoS> selectDetailInfo(TDeviceInfoS tDeviceInfos);
List<TDeviceInfoS> selectDetailInfoAll(TDeviceInfoS tDeviceInfos);
/**
* 关联设备数据删除接口
* @param deviceIds
......
package com.zehong.system.service;
import com.zehong.system.domain.TEmergencyResources;
import java.util.List;
/**
* 应急资源Service接口
*
* @author zehong
* @date 2025-06-16
*/
public interface ITEmergencyResourcesService
{
/**
* 查询应急资源
*
* @param id 应急资源ID
* @return 应急资源
*/
public TEmergencyResources selectTEmergencyResourcesById(Long id);
/**
* 查询应急资源列表
*
* @param tEmergencyResources 应急资源
* @return 应急资源集合
*/
public List<TEmergencyResources> selectTEmergencyResourcesList(TEmergencyResources tEmergencyResources);
/**
* 新增应急资源
*
* @param tEmergencyResources 应急资源
* @return 结果
*/
public int insertTEmergencyResources(TEmergencyResources tEmergencyResources);
/**
* 修改应急资源
*
* @param tEmergencyResources 应急资源
* @return 结果
*/
public int updateTEmergencyResources(TEmergencyResources tEmergencyResources);
/**
* 批量删除应急资源
*
* @param ids 需要删除的应急资源ID
* @return 结果
*/
public int deleteTEmergencyResourcesByIds(Long[] ids);
/**
* 删除应急资源信息
*
* @param id 应急资源ID
* @return 结果
*/
public int deleteTEmergencyResourcesById(Long id);
}
\ No newline at end of file
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TPipeOldPlanProgress;
/**
* 管线改造进度Service接口
*
* @author zehong
* @date 2026-02-10
*/
public interface ITPipeOldPlanProgressService
{
/**
* 查询管线改造进度
*
* @param id 管线改造进度ID
* @return 管线改造进度
*/
public TPipeOldPlanProgress selectTPipeOldPlanProgressById(Long id);
/**
* 查询管线改造进度列表
*
* @param tPipeOldPlanProgress 管线改造进度
* @return 管线改造进度集合
*/
public List<TPipeOldPlanProgress> selectTPipeOldPlanProgressList(TPipeOldPlanProgress tPipeOldPlanProgress);
/**
* 新增管线改造进度
*
* @param tPipeOldPlanProgress 管线改造进度
* @return 结果
*/
public int insertTPipeOldPlanProgress(TPipeOldPlanProgress tPipeOldPlanProgress);
/**
* 修改管线改造进度
*
* @param tPipeOldPlanProgress 管线改造进度
* @return 结果
*/
public int updateTPipeOldPlanProgress(TPipeOldPlanProgress tPipeOldPlanProgress);
/**
* 批量删除管线改造进度
*
* @param ids 需要删除的管线改造进度ID
* @return 结果
*/
public int deleteTPipeOldPlanProgressByIds(Long[] ids);
/**
* 删除管线改造进度信息
*
* @param id 管线改造进度ID
* @return 结果
*/
public int deleteTPipeOldPlanProgressById(Long id);
}
\ No newline at end of file
......@@ -430,6 +430,12 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
return tDeviceInfoS;
}
@Override
public List<TDeviceInfoS> selectDetailInfoAll(TDeviceInfoS tDeviceInfos) {
List<TDeviceInfoS> tDeviceInfoS = tDeviceInfoMapper.selectDetailInfoAll(tDeviceInfos);
return tDeviceInfoS;
}
/**
* 关联设备数据删除接口
* @param deviceIds
......
package com.zehong.system.service.impl;
import com.zehong.system.domain.TEmergencyResources;
import com.zehong.system.mapper.TEmergencyResourcesMapper;
import com.zehong.system.service.ITEmergencyResourcesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* 应急资源Service业务层处理
*
* @author zehong
* @date 2025-06-16
*/
@Service
public class TEmergencyResourcesServiceImpl implements ITEmergencyResourcesService
{
@Autowired
private TEmergencyResourcesMapper tEmergencyResourcesMapper;
/**
* 查询应急资源
*
* @param id 应急资源ID
* @return 应急资源
*/
@Override
public TEmergencyResources selectTEmergencyResourcesById(Long id)
{
return tEmergencyResourcesMapper.selectTEmergencyResourcesById(id);
}
/**
* 查询应急资源列表
*
* @param tEmergencyResources 应急资源
* @return 应急资源
*/
@Override
public List<TEmergencyResources> selectTEmergencyResourcesList(TEmergencyResources tEmergencyResources)
{
return tEmergencyResourcesMapper.selectTEmergencyResourcesList(tEmergencyResources);
}
/**
* 新增应急资源
*
* @param tEmergencyResources 应急资源
* @return 结果
*/
@Override
public int insertTEmergencyResources(TEmergencyResources tEmergencyResources)
{
return tEmergencyResourcesMapper.insertTEmergencyResources(tEmergencyResources);
}
/**
* 修改应急资源
*
* @param tEmergencyResources 应急资源
* @return 结果
*/
@Override
public int updateTEmergencyResources(TEmergencyResources tEmergencyResources)
{
return tEmergencyResourcesMapper.updateTEmergencyResources(tEmergencyResources);
}
/**
* 批量删除应急资源
*
* @param ids 需要删除的应急资源ID
* @return 结果
*/
@Override
public int deleteTEmergencyResourcesByIds(Long[] ids)
{
return tEmergencyResourcesMapper.deleteTEmergencyResourcesByIds(ids);
}
/**
* 删除应急资源信息
*
* @param id 应急资源ID
* @return 结果
*/
@Override
public int deleteTEmergencyResourcesById(Long id)
{
return tEmergencyResourcesMapper.deleteTEmergencyResourcesById(id);
}
}
\ No newline at end of file
package com.zehong.system.service.impl;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TPipeOldPlanProgressMapper;
import com.zehong.system.domain.TPipeOldPlanProgress;
import com.zehong.system.service.ITPipeOldPlanProgressService;
/**
* 管线改造进度Service业务层处理
*
* @author zehong
* @date 2026-02-10
*/
@Service
public class TPipeOldPlanProgressServiceImpl implements ITPipeOldPlanProgressService
{
@Autowired
private TPipeOldPlanProgressMapper tPipeOldPlanProgressMapper;
/**
* 查询管线改造进度
*
* @param id 管线改造进度ID
* @return 管线改造进度
*/
@Override
public TPipeOldPlanProgress selectTPipeOldPlanProgressById(Long id)
{
return tPipeOldPlanProgressMapper.selectTPipeOldPlanProgressById(id);
}
/**
* 查询管线改造进度列表
*
* @param tPipeOldPlanProgress 管线改造进度
* @return 管线改造进度
*/
@Override
public List<TPipeOldPlanProgress> selectTPipeOldPlanProgressList(TPipeOldPlanProgress tPipeOldPlanProgress)
{
return tPipeOldPlanProgressMapper.selectTPipeOldPlanProgressList(tPipeOldPlanProgress);
}
/**
* 新增管线改造进度
*
* @param tPipeOldPlanProgress 管线改造进度
* @return 结果
*/
@Override
public int insertTPipeOldPlanProgress(TPipeOldPlanProgress tPipeOldPlanProgress)
{
tPipeOldPlanProgress.setCreateTime(DateUtils.getNowDate());
return tPipeOldPlanProgressMapper.insertTPipeOldPlanProgress(tPipeOldPlanProgress);
}
/**
* 修改管线改造进度
*
* @param tPipeOldPlanProgress 管线改造进度
* @return 结果
*/
@Override
public int updateTPipeOldPlanProgress(TPipeOldPlanProgress tPipeOldPlanProgress)
{
return tPipeOldPlanProgressMapper.updateTPipeOldPlanProgress(tPipeOldPlanProgress);
}
/**
* 批量删除管线改造进度
*
* @param ids 需要删除的管线改造进度ID
* @return 结果
*/
@Override
public int deleteTPipeOldPlanProgressByIds(Long[] ids)
{
return tPipeOldPlanProgressMapper.deleteTPipeOldPlanProgressByIds(ids);
}
/**
* 删除管线改造进度信息
*
* @param id 管线改造进度ID
* @return 结果
*/
@Override
public int deleteTPipeOldPlanProgressById(Long id)
{
return tPipeOldPlanProgressMapper.deleteTPipeOldPlanProgressById(id);
}
}
\ No newline at end of file
......@@ -297,7 +297,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--查询无绑定的 关联设备信息-->
<select id="selectDetailInfo" resultMap="TDeviceInfoResultS">
select relation_device_detail_id,detection_medium,relation_device_id,device_name,device_model,iot_no,remarks, (CASE device_type WHEN '1' THEN '压力表' WHEN '2' THEN '流量计' WHEN '3' THEN '探测器' end) as device_type
select relation_device_detail_id,detection_medium,relation_device_id,device_name,device_model,iot_no,remarks, (CASE device_type WHEN '1' THEN '压力表' WHEN '2' THEN '流量计' WHEN '3' THEN '探测器' WHEN '4' THEN '温度计' end) as device_type
from t_relation_device_detail_info where is_del='0' and relation_device_id is null
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
<if test="deviceModel != null and deviceModel != ''"> and device_model like concat('%', #{deviceModel}, '%')</if>
......@@ -306,9 +306,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by relation_device_detail_id desc
</select>
<select id="selectDetailInfoAll" resultMap="TDeviceInfoResultS">
SELECT
relation.relation_device_detail_id,
relation.detection_medium,
relation.relation_device_id,
relation.device_name,
relation.device_model,
relation.iot_no,
relation.remarks,
( CASE relation.device_type WHEN '1' THEN '压力表' WHEN '2' THEN '流量计' WHEN '3' THEN '探测器' WHEN '4' THEN '温度计' END ) AS device_type ,
CONCAT(device.device_name, '#', device.device_addr) AS deviceAddr
FROM
t_relation_device_detail_info relation
LEFT JOIN t_device_info device ON device.device_id = relation.relation_device_id where relation.is_del='0'
<if test="deviceName != null and deviceName != ''"> and relation.device_name like concat('%', #{deviceName}, '%')</if>
<if test="deviceType != null and deviceType != ''"> and relation.device_type like concat('%', #{deviceType}, '%')</if>
<if test="deviceModel != null and deviceModel != ''"> and relation.device_model like concat('%', #{deviceModel}, '%')</if>
<if test="iotNo != null and iotNo != ''"> and relation.iot_no like concat('%', #{iotNo}, '%')</if>
group by relation.relation_device_detail_id desc
</select>
<!--查询设备已经关联的关联设备-->
<select id="selectDetailInfoList" resultMap="TDeviceInfoResultS">
select relation_device_detail_id,detection_medium,relation_device_id,device_name,device_model,iot_no,remarks, (CASE device_type WHEN '1' THEN '压力表' WHEN '2' THEN '流量计' WHEN '3' THEN '探测器' end) as device_type
select relation_device_detail_id,detection_medium,relation_device_id,device_name,device_model,iot_no,remarks, (CASE device_type WHEN '1' THEN '压力表' WHEN '2' THEN '流量计' WHEN '3' THEN '探测器' WHEN '4' THEN '温度计' end) as device_type
from t_relation_device_detail_info where relation_device_id=#{id} and relation_device_type=#{relationDeviceType}
</select>
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.TEmergencyResourcesMapper">
<resultMap type="com.zehong.system.domain.TEmergencyResources" id="TEmergencyResourcesResult">
<result property="id" column="id" />
<result property="resourceName" column="resource_name" />
<result property="resourceType" column="resource_type" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="contacts" column="contacts" />
<result property="contactNumber" column="contact_number" />
<result property="resourceDescription" column="resource_description" />
</resultMap>
<sql id="selectTEmergencyResourcesVo">
select id, resource_name, resource_type, longitude, latitude, contacts, contact_number, resource_description from t_emergency_resources
</sql>
<select id="selectTEmergencyResourcesList" parameterType="com.zehong.system.domain.TEmergencyResources" resultMap="TEmergencyResourcesResult">
<include refid="selectTEmergencyResourcesVo"/>
<where>
<if test="resourceName != null and resourceName != ''"> and resource_name like concat('%', #{resourceName}, '%')</if>
<if test="resourceType != null and resourceType != ''"> and resource_type = #{resourceType}</if>
<if test="contacts != null and contacts != ''"> and contacts = #{contacts}</if>
</where>
</select>
<select id="selectTEmergencyResourcesById" parameterType="Long" resultMap="TEmergencyResourcesResult">
<include refid="selectTEmergencyResourcesVo"/>
where id = #{id}
</select>
<insert id="insertTEmergencyResources" parameterType="com.zehong.system.domain.TEmergencyResources" useGeneratedKeys="true" keyProperty="id">
insert into t_emergency_resources
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="resourceName != null">resource_name,</if>
<if test="resourceType != null">resource_type,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="contacts != null">contacts,</if>
<if test="contactNumber != null">contact_number,</if>
<if test="resourceDescription != null">resource_description,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="resourceName != null">#{resourceName},</if>
<if test="resourceType != null">#{resourceType},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="contacts != null">#{contacts},</if>
<if test="contactNumber != null">#{contactNumber},</if>
<if test="resourceDescription != null">#{resourceDescription},</if>
</trim>
</insert>
<update id="updateTEmergencyResources" parameterType="com.zehong.system.domain.TEmergencyResources">
update t_emergency_resources
<trim prefix="SET" suffixOverrides=",">
<if test="resourceName != null">resource_name = #{resourceName},</if>
<if test="resourceType != null">resource_type = #{resourceType},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="contacts != null">contacts = #{contacts},</if>
<if test="contactNumber != null">contact_number = #{contactNumber},</if>
<if test="resourceDescription != null">resource_description = #{resourceDescription},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTEmergencyResourcesById" parameterType="Long">
delete from t_emergency_resources where id = #{id}
</delete>
<delete id="deleteTEmergencyResourcesByIds" parameterType="String">
delete from t_emergency_resources where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
......@@ -31,6 +31,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="govUploadState" column="f_gov_upload_state" />
<result property="govUploadTime" column="f_gov_upload_time" />
<result property="coordinates" column="coordinates" />
<result property="serialNumber" column="serial_number" />
</resultMap>
<sql id="selectTPipeOldPlanProcessVo">
......@@ -58,7 +60,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
process.f_upload_type,
process.f_upload_time,
process.f_gov_upload_state,
process.f_gov_upload_time
process.f_gov_upload_time,
process.coordinates,
process.serial_number
from t_pipe_old_plan_process process left join t_enterprise_info enterprise on process.f_enterprise_id = enterprise.enterprise_id
</sql>
......@@ -186,6 +190,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="govUploadState != null">f_gov_upload_state,</if>
<if test="govUploadTime != null">f_gov_upload_time,</if>
<if test="coordinates != null">coordinates,</if>
<if test="serialNumber != null">serial_number,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="fUuid != null and fUuid != ''">#{fUuid},</if>
......@@ -212,6 +218,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="govUploadState != null">#{govUploadState},</if>
<if test="govUploadTime != null">#{govUploadTime},</if>
<if test="coordinates != null">#{coordinates},</if>
<if test="serialNumber != null">#{serialNumber},</if>
</trim>
</insert>
......@@ -242,6 +250,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="govUploadState != null">f_gov_upload_state = #{govUploadState},</if>
<if test="govUploadTime != null">f_gov_upload_time = #{govUploadTime},</if>
<if test="coordinates != null">coordinates = #{coordinates},</if>
<if test="serialNumber != null">serial_number = #{serialNumber},</if>
</trim>
where f_old_plan_process_id = #{fOldPlanProcessId}
</update>
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.TPipeOldPlanProgressMapper">
<resultMap type="com.zehong.system.domain.TPipeOldPlanProgress" id="TPipeOldPlanProgressResult">
<result property="id" column="id" />
<result property="serialNumber" column="serial_number" />
<result property="startTime" column="start_time" />
<result property="endTime" column="end_time" />
<result property="constructionContent" column="construction_content" />
<result property="coordinates" column="coordinates" />
<result property="createTime" column="create_time" />
<result property="remark" column="remark" />
</resultMap>
<sql id="selectTPipeOldPlanProgressVo">
select id, serial_number, start_time, end_time, construction_content, coordinates, create_time, remark from t_pipe_old_plan_progress
</sql>
<select id="selectTPipeOldPlanProgressList" parameterType="com.zehong.system.domain.TPipeOldPlanProgress" resultMap="TPipeOldPlanProgressResult">
<include refid="selectTPipeOldPlanProgressVo"/>
<where>
<if test="id != null "> and id = #{id}</if>
<if test="serialNumber != null and serialNumber != ''"> and serial_number = #{serialNumber}</if>
<if test="startTime != null and startTime != ''"> and start_time = #{startTime}</if>
<if test="endTime != null and endTime != ''"> and end_time = #{endTime}</if>
<if test="createTime != null "> and create_time = #{createTime}</if>
</where>
</select>
<select id="selectTPipeOldPlanProgressById" parameterType="Long" resultMap="TPipeOldPlanProgressResult">
<include refid="selectTPipeOldPlanProgressVo"/>
where id = #{id}
</select>
<insert id="insertTPipeOldPlanProgress" parameterType="com.zehong.system.domain.TPipeOldPlanProgress">
insert into t_pipe_old_plan_progress
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="serialNumber != null">serial_number,</if>
<if test="startTime != null">start_time,</if>
<if test="endTime != null">end_time,</if>
<if test="constructionContent != null">construction_content,</if>
<if test="coordinates != null">coordinates,</if>
<if test="createTime != null">create_time,</if>
<if test="remark != null">remark,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="serialNumber != null">#{serialNumber},</if>
<if test="startTime != null">#{startTime},</if>
<if test="endTime != null">#{endTime},</if>
<if test="constructionContent != null">#{constructionContent},</if>
<if test="coordinates != null">#{coordinates},</if>
<if test="createTime != null">#{createTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateTPipeOldPlanProgress" parameterType="com.zehong.system.domain.TPipeOldPlanProgress">
update t_pipe_old_plan_progress
<trim prefix="SET" suffixOverrides=",">
<if test="serialNumber != null">serial_number = #{serialNumber},</if>
<if test="startTime != null">start_time = #{startTime},</if>
<if test="endTime != null">end_time = #{endTime},</if>
<if test="constructionContent != null">construction_content = #{constructionContent},</if>
<if test="coordinates != null">coordinates = #{coordinates},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="remark != null">remark = #{remark},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTPipeOldPlanProgressById" parameterType="Long">
delete from t_pipe_old_plan_progress where id = #{id}
</delete>
<delete id="deleteTPipeOldPlanProgressByIds" parameterType="String">
delete from t_pipe_old_plan_progress where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
......@@ -13,6 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="beyondEnterpriseName" column="beyond_enterprise_name" />
<result property="planContents" column="plan_contents" />
<result property="planEquipment" column="plan_equipment" />
<result property="endTime" column="end_time" />
<result property="iconUrl" column="icon_url" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
......@@ -23,7 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectTPlanInfoVo">
select plan_id, plan_title, plan_type, plan_level, beyond_enterprise_id, beyond_enterprise_name, plan_contents, plan_equipment, icon_url, create_by, create_time, update_by, update_time, is_del, remarks from t_plan_info
select plan_id, plan_title, plan_type, plan_level, beyond_enterprise_id, beyond_enterprise_name, plan_contents, plan_equipment,end_time, icon_url, create_by, create_time, update_by, update_time, is_del, remarks from t_plan_info
</sql>
<select id="selectTPlanInfoList" parameterType="TPlanInfo" resultMap="TPlanInfoResult">
......@@ -52,6 +53,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="beyondEnterpriseName != null">beyond_enterprise_name,</if>
<if test="planContents != null">plan_contents,</if>
<if test="planEquipment != null">plan_equipment,</if>
<if test="endTime != null">end_time,</if>
<if test="iconUrl != null">icon_url,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
......@@ -68,6 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="beyondEnterpriseName != null">#{beyondEnterpriseName},</if>
<if test="planContents != null">#{planContents},</if>
<if test="planEquipment != null">#{planEquipment},</if>
<if test="endTime != null">#{endTime},</if>
<if test="iconUrl != null">#{iconUrl},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
......@@ -88,6 +91,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="beyondEnterpriseName != null">beyond_enterprise_name = #{beyondEnterpriseName},</if>
<if test="planContents != null">plan_contents = #{planContents},</if>
<if test="planEquipment != null">plan_equipment = #{planEquipment},</if>
<if test="endTime != null">end_time = #{endTime},</if>
<if test="iconUrl != null">icon_url = #{iconUrl},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
......
import request from '@/utils/request'
// 查询应急资源列表
export function listResources(query) {
return request({
url: '/system/resources/list',
method: 'get',
params: query
})
}
// 查询应急资源详细
export function getResources(id) {
return request({
url: '/system/resources/' + id,
method: 'get'
})
}
// 新增应急资源
export function addResources(data) {
return request({
url: '/system/resources',
method: 'post',
data: data
})
}
// 修改应急资源
export function updateResources(data) {
return request({
url: '/system/resources',
method: 'put',
data: data
})
}
// 删除应急资源
export function delResources(id) {
return request({
url: '/system/resources/' + id,
method: 'delete'
})
}
// 导出应急资源
export function exportResources(query) {
return request({
url: '/system/resources/export',
method: 'get',
params: query
})
}
import request from '@/utils/request'
// 查询巡检事故列表
export function listAccident(query) {
return request({
url: '/system/accident/list',
method: 'get',
params: query
})
}
// 查询巡检事故详细
export function getAccident(id) {
return request({
url: '/system/accident/' + id,
method: 'get'
})
}
// 新增巡检事故
export function addAccident(data) {
return request({
url: '/system/accident',
method: 'post',
data: data
})
}
// 修改巡检事故
export function updateAccident(data) {
return request({
url: '/system/accident',
method: 'put',
data: data
})
}
// 删除巡检事故
export function delAccident(id) {
return request({
url: '/system/accident/' + id,
method: 'delete'
})
}
// 导出巡检事故
export function exportAccident(query) {
return request({
url: '/system/accident/export',
method: 'get',
params: query
})
}
import request from '@/utils/request'
// 查询巡线列表
export function listPatrol(query) {
return request({
url: '/line/patrol/list',
method: 'get',
params: query
})
}
// 查询巡线详细
export function getPatrol(id) {
return request({
url: '/line/patrol/' + id,
method: 'get'
})
}
// 新增巡线
export function addPatrol(data) {
return request({
url: '/line/patrol',
method: 'post',
data: data
})
}
// 修改巡线
export function updatePatrol(data) {
return request({
url: '/line/patrol',
method: 'put',
data: data
})
}
// 删除巡线
export function delPatrol(id) {
return request({
url: '/line/patrol/' + id,
method: 'delete'
})
}
// 导出巡线
export function exportPatrol(query) {
return request({
url: '/line/patrol/export',
method: 'get',
params: query
})
}
// 查询巡线柱状图数据
export function getPatrolChars(year) {
return request({
url: '/line/patrol/getPatrolChars/' + year,
method: 'get'
})
}
import request from '@/utils/request'
// 查询管线改造进度列表
export function listProgress(query) {
return request({
url: '/system/progress/list',
method: 'get',
params: query
})
}
// 查询管线改造进度详细
export function getProgress(id) {
return request({
url: '/system/progress/' + id,
method: 'get'
})
}
// 新增管线改造进度
export function addProgress(data) {
return request({
url: '/system/progress',
method: 'post',
data: data
})
}
// 修改管线改造进度
export function updateProgress(data) {
return request({
url: '/system/progress',
method: 'put',
data: data
})
}
// 删除管线改造进度
export function delProgress(id) {
return request({
url: '/system/progress/' + id,
method: 'delete'
})
}
// 导出管线改造进度
export function exportProgress(query) {
return request({
url: '/system/progress/export',
method: 'get',
params: query
})
}
......@@ -9,6 +9,14 @@ export function listData(query) {
})
}
export function redisList(query) {
return request({
url: '/system/data/redisList',
method: 'get',
params: query
})
}
// 查询设备监控详细
export function getData(deviceReportDataId) {
return request({
......@@ -50,4 +58,4 @@ export function exportData(query) {
method: 'get',
params: query
})
}
\ No newline at end of file
}
......@@ -9,6 +9,13 @@ export function listPlanInfo(query) {
})
}
export function getlackenterprise() {
return request({
url: '/system/planInfo/getlackenterprise',
method: 'get'
})
}
// 查询应急预案详细
export function getPlanInfo(planId) {
return request({
......
export function mapBound(city, map, maskFlag) {
console.log("city", city);
var district = new AMap.DistrictSearch({
extensions: "all", // 返回行政区边界坐标等具体信息
level: "district", // 设置查询行政区级别为 区
});
district.search(city, (status, result) => {
if (status === 'complete' && result.info === 'OK') {
var bounds = result.districtList[0].boundaries;
if (bounds) {
bounds.forEach(boundary => {
new AMap.Polyline({
map: map,
strokeWeight: 2,
strokeColor: "#09f",
strokeStyle: "dashed",
path: boundary,
});
});
if (maskFlag) {
let mask = new AMap.Polygon({
path: bounds[0], // 边界坐标点集合
strokeStyle: "dashed",
strokeWeight: 0, // 边框宽度,设为 0 表示没有边框
zIndex: 100, // 显示优先级,越大越靠上层
});
// 添加遮罩层到地图
map.add(mask);
}
}
} else {
console.error('Failed to search district:', result.info);
}
});
}
<template>
<div class="drawer">
<div :class="maskClass" @click="closeByMask"></div>
<div :class="mainClass" :style="mainStyle" class="main">
<div class="drawer-head">
<span>{{ title }}</span>
<!-- <span class="close-btn" v-show="closable" @click="closeByButton">X</span>-->
</div>
<div class="drawer-body">
<slot/>
</div>
<!-- <div class="switch" @click="display = !display">
<img v-if="display" src="@/assets/images/l.png" alt="" />
<img v-else src="@/assets/images/r.png" alt="" />
</div>-->
</div>
</div>
</template>
<script>
export default {
props: {
// 是否打开
/* display: {
type: Boolean
},*/
// 标题
title: {
type: String,
default: '标题'
},
// 是否显示关闭按钮
closable: {
type: Boolean,
default: true
},
// 是否显示遮罩
mask: {
type: Boolean,
default: true
},
// 是否点击遮罩关闭
maskClosable: {
type: Boolean,
default: true
},
// 宽度
width: {
type: String,
default: '400px'
},
// 是否在父级元素中打开
inner: {
type: Boolean,
default: false
}
},
data(){
return{
//抽屉是否收回
display: true
}
},
computed: {
maskClass: function () {
return {
'mask-show': (this.mask && this.display),
'mask-hide': !(this.mask && this.display),
'inner': this.inner
}
},
mainClass: function () {
return {
'main-show': this.display,
'main-hide': !this.display,
'inner': this.inner
}
},
mainStyle: function () {
return {
width: this.width,
left: this.display ? '0' : `-${+this.width.substr(0,this.width.length-2) + 20 }px`,
borderLeft: this.mask ? 'none' : '1px solid #eee'
}
}
},
mounted () {
this.display = true;
if (this.inner) {
let box = this.$el.parentNode
box.style.position = 'relative'
}
},
methods: {
closeByMask () {
this.maskClosable && this.$emit('update:display', false)
},
closeByButton () {
//this.$emit('update:display', false)
this.display = false;
}
}
}
</script>
<style lang="scss" scoped>
.drawer {
position: absolute;
top: 20px;
bottom:0;
z-index:99;
/* 遮罩 */
.mask-show {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 10;
background-color: rgba(0,0,0,.5);
opacity: 1;
transition: opacity .5s;
}
.mask-hide {
opacity: 0;
transition: opacity .5s;
}
/* 滑块 */
.main {
position: fixed;
z-index: 10;
top: 0;
height: 100%;
/* background: rgb(49 114 195 / 24%);*/
background: #FFFFFF;
transition: all 0.5s;
}
.main-show {
opacity: 1;
}
.main-hide {
opacity: 1;
}
/* 某个元素内部显示 */
.inner {
position: absolute;
}
/* 其他样式 */
.drawer-head {
display: flex;
justify-content: space-between;
height: 45px;
line-height: 45px;
padding: 0 15px;
font-size: 15px;
font-weight: bold;
/*background: rgb(87 114 153 / 44%);*/
background: #f8f8f9;
color:#515a6e;
/* border-bottom: 1px solid #eee;*/
.close-btn {
display: inline-block;
cursor: pointer;
height: 100%;
padding-left: 20px;
}
}
.drawer-body {
font-size: 14px;
padding: 15px;
padding-bottom:30px;
height: 100%;
width: 100%;
overflow-y: scroll;
overflow-x: scroll;
}
}
.switch {
position: absolute;
right: -33px;
top: 250px;
i {
background: #fff;
}
overflow: hidden;
cursor: pointer;
opacity: 1;
}
</style>
<template>
<div class="devicea-wrapper">
</div>
</template>
<script>
import moment from "moment";
export default {
data() {
return {
};
},
mounted() {
this.vueRoot.getCar(this.deviceData.carNum);
},
};
</script>
<style lang="scss" scoped>
</style>
<template>
<div class="drawer">
<div :class="maskClass" @click="closeByMask"></div>
<div :class="mainClass" :style="mainStyle" class="main">
<div class="drawer-head">
<span>{{ title }}</span>
<!-- <span class="close-btn" v-show="closable" @click="closeByButton">X</span>-->
</div>
<div class="drawer-body">
<slot/>
</div>
<!-- <div class="switch" @click="display = !display">
<img v-if="display" src="@/assets/images/l.png" alt="" />
<img v-else src="@/assets/images/r.png" alt="" />
</div>-->
</div>
</div>
</template>
<script>
export default {
props: {
// 是否打开
/* display: {
type: Boolean
},*/
// 标题
title: {
type: String,
default: '标题'
},
// 是否显示关闭按钮
closable: {
type: Boolean,
default: true
},
// 是否显示遮罩
mask: {
type: Boolean,
default: true
},
// 是否点击遮罩关闭
maskClosable: {
type: Boolean,
default: true
},
// 宽度
width: {
type: String,
default: '400px'
},
// 是否在父级元素中打开
inner: {
type: Boolean,
default: false
}
},
data(){
return{
//抽屉是否收回
display: true
}
},
computed: {
maskClass: function () {
return {
'mask-show': (this.mask && this.display),
'mask-hide': !(this.mask && this.display),
'inner': this.inner
}
},
mainClass: function () {
return {
'main-show': this.display,
'main-hide': !this.display,
'inner': this.inner
}
},
mainStyle: function () {
return {
width: this.width,
left: this.display ? '0' : `-${+this.width.substr(0,this.width.length-2) + 20 }px`,
borderLeft: this.mask ? 'none' : '1px solid #eee'
}
}
},
mounted () {
this.display = true;
if (this.inner) {
let box = this.$el.parentNode
box.style.position = 'relative'
}
},
methods: {
closeByMask () {
this.maskClosable && this.$emit('update:display', false)
},
closeByButton () {
//this.$emit('update:display', false)
this.display = false;
}
}
}
</script>
<style lang="scss" scoped>
.drawer {
position: absolute;
top: 20px;
bottom:0;
z-index:99;
/* 遮罩 */
.mask-show {
position: fixed;
top: 0;
left: 0;
width: 100%;
z-index: 10;
background-color: rgba(0,0,0,.5);
opacity: 1;
transition: opacity .5s;
}
.mask-hide {
opacity: 0;
transition: opacity .5s;
}
/* 滑块 */
.main {
position: fixed;
z-index: 10;
top: 0;
height: 100%;
/* background: rgb(49 114 195 / 24%);*/
background: #FFFFFF;
transition: all 0.5s;
}
.main-show {
opacity: 1;
}
.main-hide {
opacity: 1;
}
/* 某个元素内部显示 */
.inner {
position: absolute;
}
/* 其他样式 */
.drawer-head {
display: flex;
justify-content: space-between;
height: 45px;
line-height: 45px;
padding: 0 15px;
font-size: 15px;
font-weight: bold;
/*background: rgb(87 114 153 / 44%);*/
background: #f8f8f9;
color:#515a6e;
/* border-bottom: 1px solid #eee;*/
.close-btn {
display: inline-block;
cursor: pointer;
height: 100%;
padding-left: 20px;
}
}
.drawer-body {
font-size: 14px;
padding: 15px;
padding-bottom:30px;
height: 100%;
width: 100%;
overflow-y: scroll;
overflow-x: scroll;
}
}
.switch {
position: absolute;
right: -33px;
top: 250px;
i {
background: #fff;
}
overflow: hidden;
cursor: pointer;
opacity: 1;
}
</style>
<template>
<div class="gassVehicle gass-vehiche" >
<drawer title="事故信息" :inner="true" :width="drawerWidth" :mask="false">
<div class="scroll">
<el-row style="margin-bottom: 10px">
<el-col :span="14" style="margin-right: 30px">
<el-input
v-model="queryParams.accidentName"
placeholder="请输入事故名称"
clearable
size="small"
/>
</el-col>
<el-col :span="8">
<el-button type="primary" icon="el-icon-search" size="mini" @click="carInfoSearch()">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="infoList">
<el-table-column label="事故名称" align="center" prop="accidentName" />
<el-table-column label="事故发生时间" align="center" prop="happenDate">
<template slot-scope="scope">
<span>{{ scope.row.happenDate }}</span>
</template>
</el-table-column>
<el-table-column label="事故地点" align="center" prop="accidentLocation">
</el-table-column>
<el-table-column label="事故描述" align="center" prop="accidentDescription"/>
<el-table-column label="事故原因" align="center" prop="accidentReason" />
<el-table-column label="责任人" align="center" prop="obligationPerson" />
<el-table-column label="备注" align="center" prop="remark" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-map-location"
@click="getViewLocation(scope.row)"
>查看位置</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"
/>
</div>
</drawer>
<div id="map"></div>
</div>
</template>
<script>
import { getPipe} from "@/api/bigWindow/getDevice";
import drawer from "./component/drawer";
import { listAccident } from "@/api/inspectionWork/inspectionAccident";
import { mapBound } from "@/utils/mapClass/boundaryMap";
export default {
name: "InspectionAccident",
components: {
drawer
},
data() {
return {
tooltipVisible: false,
pipeTooltipVisible: false,
//地图
map: null,
recordMarkers: [],
drawerWidth: '800px',
// 遮罩层
loading: true,
// 总条数
total: 0,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
},
infoList: [],
form: {},
// 是否显示弹出层
open: false,
// 弹出层标题
title: "",
coordinateslist:[],
//轨迹回放
backOpen: false,
backForm:{
changeTime: 1,
beginTime: "",
endTime: "",
carNum: "",
vehicleId: ""
},
traceabilityAnalysisData:{},
traceabilityAnalysisShow:false,
rules: {
remark: [
{ required: true, message: "请输入备注", trigger: "blur" },
],
}
};
},
computed: {
},
created() {
this.getList();
this.getCoordinateslist();
},
mounted(){
this.map = new AMap.Map("map", {
center: [114.85,38.02],
zoom: 14,
});
mapBound('藁城区', this.map, false);
},
methods: {
getCoordinateslist(){
getPipe().then(response => {
console.log(response)
response.data.forEach(item => {
const text=item.path
if(text){
var polyline = new AMap.Polyline({
path: JSON.parse(text),
isOutline: true,
outlineColor: '#ffeeff',
borderWeight: 3,
strokeOpacity: 1,
// 折线样式还支持 'dashed'
strokeStyle: "solid",
// strokeStyle是dashed时有效
strokeDasharray: [10, 5],
lineJoin: 'round',
lineCap: 'round',
zIndex: 50,
strokeWeight: 4,
strokeColor: "#09f",
})
/*polyline.on('click', () => {
this.showpipeDetail(item);
});*/
this.map.add([polyline]);
}
})
/*console.log("this.coordinateslist",this.coordinateslist)
if (this.coordinateslist!=null && this.coordinateslist.length > 0) {
this.coordinateslist.forEach(item => {
this.map.addPipeLine({ path: item });
})
}*/
});
},
/** 查询报警信息 */
getList(){
this.loading = true;
listAccident(this.queryParams).then(response => {
this.infoList = response.rows;
console.log(this.infoList)
this.total = response.total;
this.loading = false;
});
},
/**获取设备位置*/
getViewLocation(row){
this.map.remove(this.recordMarkers);
if (row.longitude!=="" && row.latitude!="" && row.longitude!==undefined && row.latitude!==undefined){
let marker = new AMap.Marker({
icon: require("@/assets/firstimage/device/wxy.png"),
position: [row.longitude,row.latitude],
offset: new AMap.Pixel(-13, -30)
});
/*marker.on('click', () => {
this.showDetail(row);
});*/
console.log(this.map)
this.map.add(marker);
this.map.setCenter([row.longitude,row.latitude]);
this.recordMarkers.push(marker);
}else{
this.$message({
message: '当前设备未配置位置信息!',
type: 'warning'
});
}
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
vehicleId: null,
carNum: null,
brandModel: null,
vehicleType: null,
vehicleLoad: null,
vehicleSize: null,
vehicleLimt: null,
vehicleInspect: null,
beyondEnterpriseId: null,
personLiable: null,
phone: null,
isDel: null,
remarks: null
};
this.resetForm("form");
},
handleCurrentChangvale(val){
this.queryParams.pageNum = val;
this.getList();
},
carInfoSearch(){
this.queryParams.pageNum = 1;
this.getList();
},
resetQuery(){
this.queryParams.pageNum = 1;
this.queryParams.accidentName = null;
this.getList();
},
}
};
</script>
<style lang="scss" scoped>
.gassVehicle{
positoin:relative;
/*background-color: red;*/
height:calc(100vh - 50px);
padding:20px;
padding-bottom:0px;
}
#map{
/*position: fixed;*/
/*width:calc(100vw - 250px);*/
/*top:70px;*/
/*bottom:0;*/
height: 100%;
float: right;
width: calc(100vw - 1000px);
}
/*!* 表格最外边框 *!
.el-table --border, .el-table --group{
border: none;
}*/
.el-table{
background-color: #00afff !important;
}
</style>
<template>
<div class="app-container">
<GetPos
:dialogVisible.sync="dialogVisible"
device="pipe"
@close="dialogVisible=false"
@getPath="getPath"
:pipePath="this.coordinateslist"
/>
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="97px">
<el-form-item label="项目名称" prop="fProjectName">
<el-input
......@@ -112,9 +120,9 @@
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column :label="fUploadTypeLable" align="center" prop="fUploadType" :formatter="uploadStateFormat">
<el-table-column :label="fUploadTypeLable" align="center" prop="fUploadType" :formatter="uploadStateFormat">
</el-table-column>
<el-table-column :label="fUploadTimeLable" align="center" prop="fUploadTime" width="150" :formatter="uploadTimeFormat">
<el-table-column :label="fUploadTimeLable" align="center" prop="fUploadTime" width="150" :formatter="uploadTimeFormat">
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180">
<template slot-scope="scope">
......@@ -143,7 +151,7 @@
type="text"
@click="handleReport(scope.row)"
v-if="judgeUploadIsShow((scope.row))"
>上报</el-button>
>上报</el-button>
</template>
</el-table-column>
</el-table>
......@@ -168,7 +176,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="燃气企业" prop="beyondEnterpriseId">
<el-form-item label="燃气企业" prop="beyondEnterpriseId">
<el-select style="width: 100%;" :disabled="isDisabledEnterprise" v-model="form.beyondEnterpriseId" placeholder="请选择">
<el-option
v-for="item in enterprises"
......@@ -305,6 +313,17 @@
<el-input-number style="width: 100%;" v-model="form.fFundsDisbursementProgress" class="left-aligned-input" :controls="false" :min="0" :max="100" precision="2" placeholder="请输入资金拨付进度/百分比" />
</el-form-item>
</el-col>
<el-col :span="24">
<el-col :span="19">
<el-form-item label="坐标" prop="coordinates">
<el-input v-model="form.coordinates" type="textarea" placeholder="请输入坐标" />
</el-form-item>
</el-col>
<el-col :span="3" style="margin-left: 30px">
<el-button type="primary" plain @click="MapdialogFun">选择坐标</el-button>
</el-col>
</el-col>
</el-row>
</el-form>
......@@ -325,15 +344,20 @@ import DetailInfo from "./components/DetailInfo";
import{getInfo} from "@/api/login"
import { enterpriseLists } from "@/api/regulation/info";
import { getDefaultCountyList } from "@/api/area/county";
import GetPos from '@/components/GetPos';
"/";
export default {
name: "Process",
components: {
GetPos,
DetailInfo
},
data() {
return {
dialogVisible:false,
//地图管径回显数据
coordinateslist: null,
enterpriseName:"",
user:{},
isDisabledEnterprise: false,
......@@ -427,7 +451,7 @@ export default {
getEnterpriseLists(){
const param = {};
enterpriseLists(param).then(response => {
this.enterprises = response.rows;
this.enterprises = response.rows;
});
},
beyondEnterpriseFormat(row){
......@@ -439,7 +463,7 @@ export default {
this.loading = true;
// 企业查自己的数据
if (this.user.roleId == 5) {
this.queryParams.fEnterpriseId = this.$store.state.user.enterpriseId
this.queryParams.fEnterpriseId = this.$store.state.user.enterpriseId
this.queryParams.entUploadState = this.queryParams.fUploadType;
}
// 政府如果按照状态查的话,是查的 govUploadState
......@@ -461,9 +485,9 @@ export default {
this.open = false;
this.reset();
},
//判断 上报是否需要显示,上报分为企业上报 和 政府端上报
judgeUploadIsShow(row) {
judgeUploadIsShow(row) {
//角色 1 超级管理员 5 企业
let roleId = this.user.roleId;
......@@ -493,7 +517,7 @@ export default {
},
//上报状态动态展示
uploadStateFormat(row, column) {
uploadStateFormat(row, column) {
//角色 1 超级管理员 5 企业
let roleId = this.user.roleId;
if (roleId == 5) {
......@@ -502,15 +526,15 @@ export default {
return "未上报"
} else{
return "已上报"
}
} else {
}
} else {
this.fUploadTypeLable = "上报省厅状态"
if (row.govUploadState == '0') {
return "未上报"
} else{
return "已上报"
}
}
}
}
},
//上报时间动态展示
uploadTimeFormat(row, column) {
......@@ -571,12 +595,13 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
this.coordinateslist = null;
this.reset();
this.open = true;
this.title = "添加老旧管网改造计划";
// 说明是 企业在新增,直接赋值显示就行了。
if (this.enterprises.length == 1) {
this.form.beyondEnterpriseId = this.enterprises[0].enterpriseId
this.form.beyondEnterpriseId = this.enterprises[0].enterpriseId
this.isDisabledEnterprise = true;
}
},
......@@ -586,12 +611,18 @@ export default {
const fOldPlanProcessId = row.fOldPlanProcessId || this.ids
getProcess(fOldPlanProcessId).then(response => {
this.form = response.data;
const text=this.form.coordinates
if(text){
this.coordinateslist=JSON.parse(text);
}
this.open = true;
this.title = "修改老旧管网改造计划";
// 说明是 企业在新增,直接赋值显示就行了。
if (this.enterprises.length == 1) {
this.form.beyondEnterpriseId = this.enterprises[0].enterpriseId
this.form.beyondEnterpriseId = this.enterprises[0].enterpriseId
this.isDisabledEnterprise = true;
}
});
......@@ -641,10 +672,10 @@ export default {
type: "warning"
}).then(() => {
this.exportLoading = true;
// 企业查自己的数据
if (this.user.roleId == 5) {
this.queryParams.fEnterpriseId = this.$store.state.user.enterpriseId
this.queryParams.fEnterpriseId = this.$store.state.user.enterpriseId
}
// 政府如果按照状态查的话,是查的 govUploadState
if (this.user.roleId == 3) {
......@@ -667,14 +698,14 @@ export default {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return entReportPipeOldPlanProcess({fOldPlanProcessId : row.fOldPlanProcessId});
}).then(() => {
}).then(function() {
return entReportPipeOldPlanProcess({fOldPlanProcessId : row.fOldPlanProcessId});
}).then(() => {
this.getList();
this.msgSuccess("上报成功");
}).catch(() => {});
}
}
// 如果是 超级管理员或者 政府,并且 政府端上报状态为0
if (this.user.roleId == 3 && row.govUploadState == '0') {
......@@ -683,13 +714,34 @@ export default {
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return reportPipeOldPlanProcess({fOldPlanProcessId : row.fOldPlanProcessId});
return reportPipeOldPlanProcess({fOldPlanProcessId : row.fOldPlanProcessId});
}).then(() => {
this.getList();
this.msgSuccess("上报成功");
}).catch(() => {});
}
},
/**管道信息 选择管道提交数据方法*/
getPath(e){
// for (let i=0;i<e.length;i++){
// console.log(e[i])
// coordinates.push(e[i])
// }
var a = '['
for (var i in e) {
if (i == e.length - 1) {
a += '[' + e[i].toString()+']'
} else {
a += '[' + e[i].toString()+'],'
}
}
a += ']'
this.form.coordinates=a;
},
/** 管道打开方法*/
MapdialogFun(){
this.dialogVisible=true;
}
}
};
</script>
......@@ -699,4 +751,4 @@ export default {
text-align: left;
padding-left: 5px; /* 根据需要调整内边距 */
}
</style>
\ No newline at end of file
</style>
<template>
<el-dialog title="详情" :visible.sync="detailOpen" width="1200px" append-to-body destroy-on-close :close-on-click-modal="false">
<el-form label-width="170px">
<el-row class="el-row-table">
<el-col :span="14">
<el-col :span="12">
<el-form-item label="开始时间">
<span v-if="detailInfo.startTime">{{ detailInfo.startTime }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="结束时间" >
<span v-if="detailInfo.endTime">{{ detailInfo.endTime }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="上传时间" >
<span v-if="detailInfo.createTime">{{ detailInfo.createTime }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="建设内容" >
<span v-if="detailInfo.constructionContent">{{ detailInfo.constructionContent }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" >
<span v-if="detailInfo.remark">{{ detailInfo.remark }}</span>
<span v-else>-</span>
</el-form-item>
</el-col>
</el-col>
<el-col :span="9">
<div style="width: 100%;height: 390px; border: 1px solid rgb(218, 213, 213);margin-bottom: 10px;">
<div style="width: 100%;height: 100%" id="hiddenContainer"></div>
</div>
</el-col>
</el-row>
</el-form>
</el-dialog>
</template>
<script>
import {EditorMap} from "@/utils/mapClass/getPath";
import { listProgress, getProgress, delProgress, addProgress, updateProgress, exportProgress } from "@/api/oldpipesystem/progress";
export default {
name: "detail-info",
data(){
return{
map: null,
coordinateslist:[],
enterprises: [],
countyInfo: [],
detailInfo: {},
enterpriseName:"",
detailOpen: false,
fUploadTimeLable: "",
fUploadTypeLable: "",
fUploadType: "",
fUploadTime: null
}
},
created() {
},
methods:{
getDetailInfo(id){
getProgress(id).then(res =>{
if(res.code == 200 && res.data){
this.detailInfo = res.data;
this.detailOpen = true;
this.$nextTick(() => {
const path = eval(this.$store.state.user.systemSetting.map_center);
console.log("path",path);
const text=this.detailInfo.coordinates
if(text){
this.coordinateslist=JSON.parse(text);
this.map = new EditorMap("hiddenContainer", {center:path}, this);
this.map.addPipeLine({ path: this.coordinateslist });
}
});
}
})
}
}
}
</script>
<style scoped>
</style>
<template>
<el-dialog title="改造进度" :visible.sync="progressListOpen" width="1200px" append-to-body destroy-on-close :close-on-click-modal="false">
<el-table v-loading="loading" :data="progressList">
<!-- <el-table-column type="selection" width="55" align="center" />-->
<el-table-column label="开始时间" align="center" prop="startTime" />
<el-table-column label="结束时间" align="center" prop="endTime" />
<el-table-column label="建设内容" align="center" prop="constructionContent" />
<el-table-column label="创建时间" align="center" prop="createTime" width="200">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remark" />
<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="showProgress(scope.row)"
>查看完成管线</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"
/>
<!-- 详情 -->
<DetailInfo ref="detail"/>
</el-dialog>
</template>
<script>
import { listProgress, getProgress, delProgress, addProgress, updateProgress, exportProgress } from "@/api/oldpipesystem/progress";
import DetailInfo from "./DetailInfo";
export default {
name: "ProgressList",
components: {DetailInfo},
data(){
return{
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 管线改造进度表格数据
progressList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
progressListOpen: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
id: null,
serialNumber: null,
startTime: null,
endTime: null,
createTime: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
}
}
},
created() {
},
methods:{
getList(serialNumber){
this.progressListOpen = true;
this.loading = true;
this.queryParams.serialNumber = serialNumber;
listProgress(this.queryParams).then(response => {
this.progressList = response.rows;
this.total = response.total;
this.loading = false;
});
},
showProgress(row){
this.$refs.detail.getDetailInfo(row.id);
}
}
}
</script>
<style scoped>
</style>
This diff is collapsed.
......@@ -61,6 +61,14 @@
ref="detector">
</detector-tab>
</el-tab-pane>
<el-tab-pane label="温度计" name="fourth" key="fourth">
<thermometer-tab
:activeName="activeName"
:childrenQueryParams="queryParams"
v-if="activeName === 'fourth'"
ref="thermometer">
</thermometer-tab>
</el-tab-pane>
</el-tabs>
......@@ -73,12 +81,14 @@ import { enterpriseLists } from "@/api/regulation/info";
import detectorTab from "./detectorTab";
import flowmeterTab from "./flowmeterTab";
import pressureTab from "./pressureTab"
import thermometerTab from "./thermometerTab";
export default {
name: "Data",
components: {
detectorTab,
flowmeterTab,
pressureTab
pressureTab,
thermometerTab,
},
data() {
return {
......@@ -175,8 +185,10 @@ export default {
this.$refs.pressure.pressureHandleQuery();
}else if("second" == this.activeName){
this.$refs.flowmeter.flowmeterHandleQuery();
}else{
}else if("third" == this.activeName){
this.$refs.detector.detectorHandleQuery();
}else {
this.$refs.thermometer.thermometerQuery();
}
},
/** 重置按钮操作 */
......@@ -196,8 +208,10 @@ export default {
this.activeName = "first"
}else if("1" == tab.index){
this.activeName = "second"
}else{
}else if("2" == tab.index){
this.activeName = "third"
}else {
this.activeName = "fourth"
}
}
}
......
<template>
<div class="thermometerTab">
<el-table v-loading="loading" :data="childrenDataList">
<el-table-column label="所属设备名称" align="center" prop="beyondDevicename"/>
<el-table-column label="设备名称" align="center" prop="detectorName"/>
<el-table-column label="设备编号" align="center" prop="number"/>
<!-- <el-table-column label="所属企业" align="center" prop="beyondEnterpriseName"/>-->
<el-table-column label="温度(℃)" align="center" prop="value" />
<el-table-column label="上报时间" align="center" prop="time"/>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { redisList, getData, delData, addData, updateData, exportData } from "@/api/operationMonitor/data";
export default {
props:{
childrenQueryParams: {}
},
name: "ThermometerData",
components: {
},
data() {
return {
queryParams: {
pageNum: 1,
pageSize: 10
},
loading: true,
childrenDataList: [],
total: 0
};
},
created() {
this.getList();
},
methods: {
getList() {
this.loading = true;
/*this.childrenQueryParams.pageNum = this.queryParams.pageNum;
this.childrenQueryParams.pageSize = this.queryParams.pageSize;
this.childrenQueryParams.deviceType = '4';*/
this.queryParams.deviceType = '4';
this.queryParams.iotNo = this.childrenQueryParams.deviceNum;
this.queryParams.deviceName = this.childrenQueryParams.deviceName;
redisList(this.queryParams).then(response => {
this.childrenDataList = response.rows;
this.total = response.total;
this.loading = false;
});
},
thermometerQuery(){
this.queryParams.pageNum = 1;
this.getList();
}
}
};
</script>
<style>
.thermometerTab{
margin-bottom: 20px;
}
</style>
......@@ -8,84 +8,197 @@
-->
<template>
<div class="charsCom all-flex-h">
<div class="title">巡检巡查计划</div>
<div class="title">巡检巡查任务</div>
<div class="two all-flex">
<div class="left">
<div class="first">
<!--<span class="text">巡检年度计划</span>-->
<span class="text">巡检巡查任务</span>
<span>{{totalObj.taskTotal}}</span>
</div>
<div class="second all-flex">
<div class="left">泄露监测</div>
<div class="right">防腐层监测</div>
</div>
<div class="third all-flex">
<div class="left">0次</div>
<div class="right">0次</div>
</div>
<div class="first fourth">
<div class="">泄漏检测完成比例</div>
</div>
<div class="fifth">
<div class="contant">
<Chars></Chars>
</div>
</div>
</div>
<div class="right">
<div class="first">
<!--<span class="text">巡检完成情况</span>-->
<span class="text">入户安检任务</span>
<span>{{totalObj.taskFeedbackTotal}}</span>
</div>
<div class="second all-flex">
<div class="left">泄露监测</div>
<div class="right">防腐层监测</div>
</div>
<div class="third all-flex">
<div class="left">0次</div>
<div class="right">0次</div>
</div>
<div class="first fourth">
<div class="">防腐层检测完成比例</div>
</div>
<div class="fifth">
<div class="contant">
<Chars color="#00C3F1"></Chars>
</div>
</div>
</div>
<div id="chars" class="chars" style="width: 100%; height: 300px;"></div>
</div>
</div>
</template>
<script>
import Chars from "@/components/allCharsCom/Chars";
import { homepageStatistic } from "@/api/statistic/statisticAnalysis";
import { getPatrolChars } from "@/api/inspectionWork/linePatrol";
export default {
components: {
Chars,
},
data(){
return{
year:'2025-',
totalObj: {
taskTotal: 0,
taskFeedbackTotal: 0
}
},
chartInstance: null // 用于保存echarts实例
}
},
created(){
this.getStatiData();
this.getChars();
},
mounted() {
// 确保DOM渲染完成后再初始化图表
this.$nextTick(() => {
this.initChart();
});
},
beforeDestroy() {
// 组件销毁前销毁echarts实例,避免内存泄漏
if (this.chartInstance) {
this.chartInstance.dispose();
this.chartInstance = null;
}
// 移除窗口大小变化监听
window.removeEventListener('resize', this.handleResize);
},
methods:{
getStatiData() {
homepageStatistic().then(response => {
this.totalObj = response.data;
// 初始化图表
initChart() {
const chartDom = document.getElementById('chars');
if (!chartDom) {
console.error('图表容器未找到');
return;
}
try {
// 使用全局挂载的echarts
this.chartInstance = this.$echarts.init(chartDom);
// 初始空配置 - 竖向柱状图
const option = {
title: {
text: '各公司巡检次数统计',
left: 'center',
textStyle: {
fontSize: 16,
fontWeight: 'normal'
}
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
},
formatter: function(params) {
const data = params[0];
return `${data.name}<br/>巡检次数: ${data.value}`;
}
},
grid: {
left: '3%',
right: '4%',
bottom: '10%',
top: '15%',
containLabel: true
},
xAxis: {
type: 'category',
data: [],
axisLabel: {
fontSize: 12,
interval: 0,
rotate: 30, // 如果公司名称太长,可以旋转角度
width: 80,
overflow: 'truncate'
},
axisTick: {
show: false
}
},
yAxis: {
type: 'value',
name: '巡检次数',
axisLabel: {
fontSize: 12
}
},
series: [
{
name: '巡检次数',
type: 'bar',
data: [],
itemStyle: {
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: '#188df0' },
{ offset: 0.5, color: '#1d8cf3' },
{ offset: 1, color: '#83bff6' }
])
},
emphasis: {
itemStyle: {
color: new this.$echarts.graphic.LinearGradient(0, 0, 0, 1, [
{ offset: 0, color: '#2378f7' },
{ offset: 0.7, color: '#2378f7' },
{ offset: 1, color: '#83bff6' }
])
}
},
barWidth: '50%',
label: {
show: true,
position: 'top',
formatter: '{c}'
}
}
]
};
this.chartInstance.setOption(option);
// 窗口大小改变时重绘图表
window.addEventListener('resize', this.handleResize);
} catch (error) {
console.error('初始化图表失败:', error);
}
},
// 处理窗口大小变化
handleResize() {
if (this.chartInstance) {
this.chartInstance.resize();
}
},
// 获取数据并更新图表
getChars() {
getPatrolChars(this.year).then(res =>{
if(res.code == 200){
console.log("res", res);
// 更新图表数据
this.updateChart(res.data);
}
}).catch(error => {
console.error("获取巡检数据失败:", error);
});
},
// 更新图表数据
updateChart(data) {
if (!this.chartInstance || !data) return;
// 对数据进行排序(从大到小)
const combined = data.enterpriseName.map((name, index) => ({
name,
value: data.numbers[index] || 0
}));
// 按巡检次数降序排序
combined.sort((a, b) => b.value - a.value);
// 提取排序后的数据
const sortedNames = combined.map(item => item.name);
const sortedValues = combined.map(item => item.value);
// 更新图表配置 - 竖向柱状图
const option = {
xAxis: {
data: sortedNames
},
series: [{
data: sortedValues
}]
};
this.chartInstance.setOption(option);
}
}
};
</script>
......@@ -111,8 +224,6 @@ export default {
> div {
font-size: 16px;
flex: 1;
// display: flex;
// flex-direction: column;
}
.left,
.right {
......@@ -136,7 +247,6 @@ export default {
margin-bottom: 19px;
> div {
// flex: 1;
text-align: center;
&.left {
......@@ -154,7 +264,6 @@ export default {
}
.fifth {
flex: 1;
// background: red;
padding-top: 5px;
.contant {
width: 120px;
......
......@@ -24,7 +24,7 @@
</el-input>
</div>
<div class="enter">
<el-button size="mini" @click="enter"
<el-button size="mini" @click="getList"
><span class="text">确认</span></el-button
>
</div>
......@@ -36,7 +36,7 @@
</div>
</div>
<div class="middle-wrapper flex">
<!-- <div class="middle-wrapper flex">
<div class="left">
<el-select
v-model="searchData.unt"
......@@ -53,57 +53,27 @@
</el-option>
</el-select>
</div>
<div class="middle">
<el-select
v-model="searchData.type"
placeholder="任务类型"
size="mini"
>
<el-option
v-for="item in type"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
<div class="right">
<el-select
v-model="searchData.state"
placeholder="任务状态"
<el-date-picker
style="width: 100%"
v-model="searchData.value"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="['00:00:00', '23:59:59']"
size="mini"
value-format="yyyy-MM-dd"
>
<el-option
v-for="item in state"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-date-picker>
</div>
</div>
</div>-->
<div class="bottom-wrapper">
<el-date-picker
style="width: 100%"
v-model="searchData.value"
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
:default-time="['00:00:00', '23:59:59']"
size="mini"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</div>
</div>
</div>
<div class="bottom all-flex-h">
<div ref="table" class="table">
<el-table
<!-- <el-table
v-loading="loading"
:data="
tableData.filter((item, index) => {
......@@ -152,18 +122,37 @@
>
</template>
</el-table-column>
</el-table>-->
<el-table v-loading="loading" :data="infoList">
<el-table-column label="任务名称" align="center" prop="taskName" />
<el-table-column label="巡线时间" align="center" prop="linePatrolTime">
<template slot-scope="scope">
<span>{{ scope.row.linePatrolTime }}</span>
</template>
</el-table-column>
<el-table-column label="巡线人员" align="center" prop="linePatrolPerson">
</el-table-column>
<el-table-column label="单位名称" align="center" prop="beyondEnterpriseName"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="150">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-map-location"
@click="getTravel(scope.row)"
>查看轨迹</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div class="page">
<pagination
style="width: 100%; padding: 0px !important"
:small="true"
:total="tableData.length"
:page="page"
:limit.sync="limit"
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
layout="prev, pager, next, jumper"
/>
</div>
</div>
</div>
......@@ -175,6 +164,13 @@ import { XjxcMap } from "@/utils/mapClass/xjxcmap";
import Null from "@/components/bigWindow/Null";
import moment from "moment";
import Pipe from "./Pipe.vue";
import { listPatrol } from "@/api/inspectionWork/linePatrol";
import {listAccident} from "@/api/inspectionWork/inspectionAccident";
import {getLastLocation} from "@/api/operationMonitor/vehicleInfo";
import MapCar from "@/views/operationMonitor/gassVehicle/component/MapCar.vue";
import {getVehicleLocations} from "@/api/operationMonitor/vehicleLocationInfo";
import NullVUe from "@/components/bigWindow/Null.vue";
import {getPipe} from "@/api/bigWindow/getDevice";
let arr = [
// {
......@@ -371,6 +367,16 @@ export default {
state: "",
value: [],
},
infoList: [],
// 总条数
total: 0,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
taskName:"",
beyondEnterpriseId:""
},
tableScrollH: 100,
// 表格数据
tableData: arr,
......@@ -380,11 +386,12 @@ export default {
},
mounted() {
this.mapInit();
this.$nextTick(() => {
/*this.$nextTick(() => {
const dom = document.getElementsByClassName("t")[0];
dom.style.height = this.$refs.table.getBoundingClientRect().height + "px";
});
console.log(moment("2022-11-29").valueOf());
console.log(moment("2022-11-29").valueOf());*/
this.getList();
},
methods: {
mapInit() {
......@@ -399,9 +406,9 @@ export default {
state: "",
value: [],
};
this.enter();
this.getList();
},
enter() {
getList() {
this.loading = true;
this.map.infowindowClose();
this.target = null;
......@@ -410,36 +417,52 @@ export default {
setTimeout(() => {
this.page = 1;
const { task, unt, type, state, value } = this.searchData;
this.tableData = arr.filter((item) => {
const a = item.name.indexOf(task) >= 0;
const b = unt ? item.unt == unt : true;
const c = type ? item.type == type : true;
const d = state ? item.state == state : true;
const e =
value.length > 0
? Array.isArray(item.value) &&
moment(value[0]).valueOf() <= moment(item.value[0]).valueOf()
: true;
const f =
value.length > 0
? Array.isArray(item.value) &&
moment(value[1]).valueOf() >= moment(item.value[1]).valueOf()
: true;
this.queryParams.taskName = task;
this.queryParams.beyondEnterpriseId = unt;
return a && b && c && d && e && f;
listPatrol(this.queryParams).then(response => {
this.infoList = response.rows;
console.log(this.infoList)
this.total = response.total;
this.loading = false;
});
this.loading = false;
}, 200);
},
getList(e) {
console.log(e);
this.loading = true;
setTimeout(() => {
this.page = e.page;
this.loading = false;
}, 200);
/**获取车辆轨迹操作*/
getTravel(row){
if (row.coordinates) {
try {
const path = JSON.parse(row.coordinates);
// 清除之前的轨迹
this.map.remove();
const polylineData = {
path: JSON.stringify(path),
iconType: 0, // 与 XjxcMap 中的 iconType3 对应
pipePressure: 4,
strokeWeight: 4,
title: row.taskName || "巡检轨迹"
};
// 添加折线到地图(null 表示不需要组件)
this.map.addPipeLine(polylineData, null);
// 调整地图视野
const middleIndex = Math.floor(path.length / 2);
this.map.map.panTo(path[middleIndex]);
} catch (error) {
console.error('轨迹数据解析失败:', error);
this.msgError("轨迹数据格式错误");
}
} else {
this.msgError("暂无轨迹数据");
}
},
mapDo(data) {
// 暂无信息
if (!Array.isArray(eval(data.path))) {
......@@ -504,7 +527,7 @@ export default {
width: 100%;
margin-bottom: 6px;
> div {
width: 150px;
//width: 150px;
// background: red;
}
}
......@@ -521,7 +544,7 @@ export default {
justify-content: space-between;
.table {
flex: 1;
background-color: red;
//background-color: red;
.target {
color: #ffc337;
font-weight: 600;
......
......@@ -10,14 +10,14 @@
<div class="charsCom all-flex-h">
<div class="title">第三方施工情况</div>
<div class="two flex">
<div class="left">已备案</div>
<div class="left">未开工</div>
<div class="middle">已完成</div>
<div class="right">进行中</div>
</div>
<div class="three flex">
<div class="left zzz">0</div>
<div class="middle zzz">0</div>
<div class="right zzz">0</div>
<div class="left zzz">{{ inforList.filter(item => item.fConstructionStatus === "1").length }}</div>
<div class="middle zzz">{{ inforList.filter(item => item.fConstructionStatus === "3").length }}</div>
<div class="right zzz">{{ inforList.filter(item => item.fConstructionStatus === "2").length }}</div>
</div>
<div class="four all-flex-h">
......@@ -27,19 +27,28 @@
<div>施工描述</div>
</div>
<div class="scroll-wrapper">
<Scroll :dataList="arr">
<div v-if="loading" class="loading">加载中...</div>
<Scroll v-else-if="inforList.length > 0" :dataList="inforList">
<template v-slot="{ dataList }">
<ScroItem v-for="(item,index) in dataList" :key="item.companyName+index" :data="item" :index="index"/>
<ScroItem
v-for="(item, index) in dataList"
:key="item.fConGasProInforId"
:data="item"
:index="index"
/>
</template>
</Scroll>
<div v-else class="no-data">暂无数据</div>
</div>
</div>
</div>
</template>
<script>
import { listInfor } from "@/api/thirdbuild/project";
import Scroll from "./Scroll";
import ScroItem from "./ScroItem";
import {getInfo} from "@/api/login";
export default {
components: {
Scroll,
......@@ -47,6 +56,23 @@ export default {
},
data() {
return {
notStarted:0,
completed:0,
inProgress:0,
loading: false,
user:{},
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
fProjectCode: null,
fProjectNo: null,
fProjectName: null,
fPipePress: null,
fCompanyInfoId: null,
fUploadType:null,
},
inforList:[],
arr: [
// {
// companyName: "中燃祥科",
......@@ -123,6 +149,34 @@ export default {
};
},
mounted() {},
created() {
this.getuserInfo();
},
methods: {
getuserInfo(){
getInfo().then(response => {
this.user = response.user.roles[0]
this.getList();
});
},
getList() {
this.loading = true;
// 企业查自己的数据
if (this.user.roleId == 5) {
this.queryParams.fCompanyInfoId = this.$store.state.user.enterpriseId
this.queryParams.entUploadState = this.queryParams.fUploadType;
}
// 政府如果按照状态查的话,是查的 govUploadState
if (this.user.roleId == 3) {
this.queryParams.govUploadState = this.queryParams.fUploadType;
}
listInfor(this.queryParams).then(response => {
this.inforList = response.rows;
console.log("inforList",this.inforList)
this.loading = false;
});
},
},
};
</script>
......@@ -190,4 +244,13 @@ export default {
// position:relative;
}
}
.loading, .no-data {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
color: #999;
font-size: 14px;
}
</style>
......@@ -8,9 +8,9 @@
-->
<template>
<div class="top flex" :class="[{ n: index % 2 == 0, n2: index % 2 == 1 }]">
<div class="left zzz" :title="data.companyName">{{ data.companyName }}</div>
<div class="zzz" :title="data.time">{{ data.time }}</div>
<div class="zzz" :title="data.text">{{ data.text }}</div>
<div class="left zzz" :title="data.fConstructDepartment">{{ data.fConstructDepartment }}</div>
<div class="zzz" :title="data.fConstructionEnd">{{ data.fConstructionEnd }}</div>
<div class="zzz" :title="data.fRemark || ''">{{ data.fRemark || '' }}</div>
</div>
</template>
......@@ -50,4 +50,4 @@ export default {
}
}
}
</style>
\ No newline at end of file
</style>
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