Commit 057adffb authored by yaqizhang's avatar yaqizhang

解决冲突

parents 9d114ee3 00274a32
package com.zehong.web.controller.operationMonitor;
import java.util.List;
import com.zehong.system.domain.TVehicleLocationInfo;
import com.zehong.system.service.ITVehicleLocationInfoService;
import io.jsonwebtoken.lang.Collections;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
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.enums.BusinessType;
import com.zehong.system.domain.TVehicleInfo;
import com.zehong.system.service.ITVehicleInfoService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 燃气车辆信息Controller
*
* @author zehong
* @date 2022-03-17
*/
@RestController
@RequestMapping("/system/vehicleInfo")
public class TVehicleInfoController extends BaseController
{
@Autowired
private ITVehicleInfoService tVehicleInfoService;
@Autowired
private ITVehicleLocationInfoService itVehicleLocationInfoService;
/**
* 查询燃气车辆信息列表
*/
@PreAuthorize("@ss.hasPermi('system:vehicleInfo:list')")
@GetMapping("/list")
public TableDataInfo list(TVehicleInfo tVehicleInfo)
{
startPage();
List<TVehicleInfo> list = tVehicleInfoService.selectTVehicleInfoList(tVehicleInfo);
return getDataTable(list);
}
/**
* 查询车辆最终位置
* @param vehicleId 车辆信息id
* @return
*/
@GetMapping("/getLastLocation")
public AjaxResult getLastLocation(@RequestParam(value="vehicleId") Long vehicleId){
//获取车辆信息
TVehicleInfo tVehicleInfo = tVehicleInfoService.selectTVehicleInfoById(vehicleId);
//获取最后位置信息
TVehicleLocationInfo tVehicleLocationInfo = new TVehicleLocationInfo();
tVehicleLocationInfo.setCarNum(tVehicleInfo.getCarNum());
tVehicleLocationInfo.setLast(true);
List<TVehicleLocationInfo> tVehicleLocationInfoList=itVehicleLocationInfoService.selectTVehicleLocationInfoList(tVehicleLocationInfo);
//车辆最后位置
if(!Collections.isEmpty(tVehicleLocationInfoList) && tVehicleLocationInfoList.size() > 0){
tVehicleInfo.setLongitude(tVehicleLocationInfoList.get(0).getLongitude());
tVehicleInfo.setLatitude(tVehicleLocationInfoList.get(0).getLatitude());
}
return AjaxResult.success(tVehicleInfo);
}
/**
* 导出燃气车辆信息列表
*/
@PreAuthorize("@ss.hasPermi('system:vehicleInfo:export')")
@Log(title = "燃气车辆信息", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TVehicleInfo tVehicleInfo)
{
List<TVehicleInfo> list = tVehicleInfoService.selectTVehicleInfoList(tVehicleInfo);
ExcelUtil<TVehicleInfo> util = new ExcelUtil<TVehicleInfo>(TVehicleInfo.class);
return util.exportExcel(list, "燃气车辆信息数据");
}
/**
* 获取燃气车辆信息详细信息
*/
@PreAuthorize("@ss.hasPermi('system:vehicleInfo:query')")
@GetMapping(value = "/{vehicleId}")
public AjaxResult getInfo(@PathVariable("vehicleId") Long vehicleId)
{
return AjaxResult.success(tVehicleInfoService.selectTVehicleInfoById(vehicleId));
}
/**
* 新增燃气车辆信息
*/
@PreAuthorize("@ss.hasPermi('system:vehicleInfo:add')")
@Log(title = "燃气车辆信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TVehicleInfo tVehicleInfo)
{
return toAjax(tVehicleInfoService.insertTVehicleInfo(tVehicleInfo));
}
/**
* 修改燃气车辆信息
*/
@PreAuthorize("@ss.hasPermi('system:vehicleInfo:edit')")
@Log(title = "燃气车辆信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TVehicleInfo tVehicleInfo)
{
return toAjax(tVehicleInfoService.updateTVehicleInfo(tVehicleInfo));
}
/**
* 删除燃气车辆信息
*/
@PreAuthorize("@ss.hasPermi('system:vehicleInfo:remove')")
@Log(title = "燃气车辆信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{vehicleIds}")
public AjaxResult remove(@PathVariable Long[] vehicleIds)
{
return toAjax(tVehicleInfoService.deleteTVehicleInfoByIds(vehicleIds));
}
}
package com.zehong.web.controller.operationMonitor;
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.TVehicleLocationInfo;
import com.zehong.system.service.ITVehicleLocationInfoService;
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
*
* @author zehong
* @date 2022-03-17
*/
@RestController
@RequestMapping("/system/vehicleLocationInfo")
public class TVehicleLocationInfoController extends BaseController
{
@Autowired
private ITVehicleLocationInfoService tVehicleLocationInfoService;
/**
* 查询燃气车辆位置信息列表
*/
@PreAuthorize("@ss.hasPermi('system:vehicleLocationInfo:list')")
@GetMapping("/list")
public TableDataInfo list(TVehicleLocationInfo tVehicleLocationInfo)
{
startPage();
List<TVehicleLocationInfo> list = tVehicleLocationInfoService.selectTVehicleLocationInfoList(tVehicleLocationInfo);
return getDataTable(list);
}
/**
* 获取车辆位置信息
* @param tVehicleLocationInfo
* @return
*/
@GetMapping("/getVehicleLocations")
public AjaxResult getVehicleLocations(TVehicleLocationInfo tVehicleLocationInfo){
return AjaxResult.success( tVehicleLocationInfoService.selectTVehicleLocationInfoList(tVehicleLocationInfo));
}
/**
* 导出燃气车辆位置信息列表
*/
@PreAuthorize("@ss.hasPermi('system:vehicleLocationInfo:export')")
@Log(title = "燃气车辆位置信息", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TVehicleLocationInfo tVehicleLocationInfo)
{
List<TVehicleLocationInfo> list = tVehicleLocationInfoService.selectTVehicleLocationInfoList(tVehicleLocationInfo);
ExcelUtil<TVehicleLocationInfo> util = new ExcelUtil<TVehicleLocationInfo>(TVehicleLocationInfo.class);
return util.exportExcel(list, "燃气车辆位置信息数据");
}
/**
* 获取燃气车辆位置信息详细信息
*/
@PreAuthorize("@ss.hasPermi('system:vehicleLocationInfo:query')")
@GetMapping(value = "/{vehicleLocationId}")
public AjaxResult getInfo(@PathVariable("vehicleLocationId") Long vehicleLocationId)
{
return AjaxResult.success(tVehicleLocationInfoService.selectTVehicleLocationInfoById(vehicleLocationId));
}
/**
* 新增燃气车辆位置信息
*/
@PreAuthorize("@ss.hasPermi('system:vehicleLocationInfo:add')")
@Log(title = "燃气车辆位置信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TVehicleLocationInfo tVehicleLocationInfo)
{
return toAjax(tVehicleLocationInfoService.insertTVehicleLocationInfo(tVehicleLocationInfo));
}
/**
* 修改燃气车辆位置信息
*/
@PreAuthorize("@ss.hasPermi('system:vehicleLocationInfo:edit')")
@Log(title = "燃气车辆位置信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TVehicleLocationInfo tVehicleLocationInfo)
{
return toAjax(tVehicleLocationInfoService.updateTVehicleLocationInfo(tVehicleLocationInfo));
}
/**
* 删除燃气车辆位置信息
*/
@PreAuthorize("@ss.hasPermi('system:vehicleLocationInfo:remove')")
@Log(title = "燃气车辆位置信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{vehicleLocationIds}")
public AjaxResult remove(@PathVariable Long[] vehicleLocationIds)
{
return toAjax(tVehicleLocationInfoService.deleteTVehicleLocationInfoByIds(vehicleLocationIds));
}
}
......@@ -54,7 +54,7 @@ public class PipeInterfaceController extends BaseController {
/**
* 调压箱数据查询接口
* 调压箱数据查询接口 使用中
* @return
*/
@RequestBody
......@@ -65,22 +65,25 @@ public class PipeInterfaceController extends BaseController {
List<DeviceData> list=new ArrayList<>();
//调压箱数据查询方法
List<DeviceData> deviceData = iPipeInterfaceService.selectDeviceData();
//查询下级全部数据方法
List<PressureFlow> pressureFlows1 = iPipeInterfaceService.selectPressureFlows("1");
// //查询下级全部数据方法
// List<PressureFlow> pressureFlows1 = iPipeInterfaceService.selectPressureFlows("1");
// for (int i=0;i<deviceData.size();i++){
// boolean bo=false;
// for (int s=0;s<pressureFlows1.size();s++){
// if (pressureFlows1.get(s).getDeviceId().equals(deviceData.get(i).getDeviceId())){
// bo=true;
// break;
// }
// }
// if (bo){
// deviceData.get(i).setIconType(2);
// list.add(deviceData.get(i));
// }
// }
for (int i=0;i<deviceData.size();i++){
boolean bo=false;
for (int s=0;s<pressureFlows1.size();s++){
if (pressureFlows1.get(s).getDeviceId().equals(deviceData.get(i).getDeviceId())){
bo=true;
break;
}
}
if (bo){
deviceData.get(i).setIconType(2);
list.add(deviceData.get(i));
}
}
deviceList.setData(list);
return deviceList;
}
......@@ -302,7 +305,7 @@ public class PipeInterfaceController extends BaseController {
/**
* 场站信息查询接口
* 场站信息查询接口 使用中
* @return
*/
@RequestBody
......@@ -311,24 +314,29 @@ public class PipeInterfaceController extends BaseController {
TSiteStationInfoDataList tSiteStationInfoDataList=new TSiteStationInfoDataList();
//场站信息查询方法
List<TSiteStationInfoData> tSiteStationInfoData = iPipeInterfaceService.selectTSiteStationInfoData();
//查询下级全部数据方法
List<PressureFlow> pressureFlows1 = iPipeInterfaceService.selectPressureFlows("2");
List<TSiteStationInfoData> list=new ArrayList<>();
// //查询下级全部数据方法
// List<PressureFlow> pressureFlows1 = iPipeInterfaceService.selectPressureFlows("2");
// for (int i=0;i<tSiteStationInfoData.size();i++){
// boolean bo=false;
// for (int s=0;s<pressureFlows1.size();s++){
// if (pressureFlows1.get(s).getDeviceId()!=null){
// if (pressureFlows1.get(s).getDeviceId().equals(tSiteStationInfoData.get(i).getSiteStationId())){
// bo=true;
// break;
// }
// }
// }
// if (bo){
// tSiteStationInfoData.get(i).setIconType(4);
// list.add(tSiteStationInfoData.get(i));
// }
// }
for (int i=0;i<tSiteStationInfoData.size();i++){
boolean bo=false;
for (int s=0;s<pressureFlows1.size();s++){
if (pressureFlows1.get(s).getDeviceId()!=null){
if (pressureFlows1.get(s).getDeviceId().equals(tSiteStationInfoData.get(i).getSiteStationId())){
bo=true;
break;
}
}
}
if (bo){
tSiteStationInfoData.get(i).setIconType(4);
list.add(tSiteStationInfoData.get(i));
}
}
tSiteStationInfoDataList.setData(list);
return tSiteStationInfoDataList;
}
......@@ -531,7 +539,7 @@ public class PipeInterfaceController extends BaseController {
/**
* 阀门数据查询接口
* 阀门数据查询接口 使用中
* @return
*/
@RequestBody
......@@ -542,21 +550,25 @@ public class PipeInterfaceController extends BaseController {
List<DeviceData> list =new ArrayList<>();
//查询阀门井数据
List<DeviceData> pipeDates = iPipeInterfaceService.selectvalveData();
//查询下级全部数据方法
List<PressureFlow> pressureFlows1 = iPipeInterfaceService.selectPressureFlows("1");
// //查询下级全部数据方法
// List<PressureFlow> pressureFlows1 = iPipeInterfaceService.selectPressureFlows("1");
// for (int i=0;i<pipeDates.size();i++){
// boolean bo=false;
// for (int s=0;s<pressureFlows1.size();s++){
// if (pressureFlows1.get(s).getDeviceId().equals(pipeDates.get(i).getDeviceId())){
// bo=true;
// break;
// }
// }
// if (bo){
// pipeDates.get(i).setIconType(3);
// list.add(pipeDates.get(i));
// }
// }
for (int i=0;i<pipeDates.size();i++){
boolean bo=false;
for (int s=0;s<pressureFlows1.size();s++){
if (pressureFlows1.get(s).getDeviceId().equals(pipeDates.get(i).getDeviceId())){
bo=true;
break;
}
}
if (bo){
pipeDates.get(i).setIconType(3);
list.add(pipeDates.get(i));
}
}
deviceDataList.setData(list);
return deviceDataList;
}
......
package com.zehong.web.controller.supervise;
import java.io.File;
import java.util.List;
import com.zehong.common.config.GassafetyProgressConfig;
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.TProjectInfo;
import com.zehong.system.service.ITProjectInfoService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 工程项目信息Controller
*
* @author zehong
* @date 2022-03-16
*/
@RestController
@RequestMapping("/project/info")
public class TProjectInfoController extends BaseController
{
@Autowired
private ITProjectInfoService tProjectInfoService;
/**
* 查询工程项目信息列表
*/
@PreAuthorize("@ss.hasPermi('project:info:list')")
@GetMapping("/list")
public TableDataInfo list(TProjectInfo tProjectInfo)
{
startPage();
List<TProjectInfo> list = tProjectInfoService.selectTProjectInfoList(tProjectInfo);
return getDataTable(list);
}
/**
* 导出工程项目信息列表
*/
@PreAuthorize("@ss.hasPermi('project:info:export')")
@Log(title = "工程项目信息", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TProjectInfo tProjectInfo)
{
List<TProjectInfo> list = tProjectInfoService.selectTProjectInfoList(tProjectInfo);
ExcelUtil<TProjectInfo> util = new ExcelUtil<TProjectInfo>(TProjectInfo.class);
return util.exportExcel(list, "工程项目信息数据");
}
/**
* 获取工程项目信息详细信息
*/
@PreAuthorize("@ss.hasPermi('project:info:query')")
@GetMapping(value = "/{projectId}")
public AjaxResult getInfo(@PathVariable("projectId") Long projectId)
{
return AjaxResult.success(tProjectInfoService.selectTProjectInfoById(projectId));
}
/**
* 新增工程项目信息
*/
@PreAuthorize("@ss.hasPermi('project:info:add')")
@Log(title = "工程项目信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TProjectInfo tProjectInfo)
{
//查询是否已经有重复的年份数据
List<TProjectInfo> tProjectInfos = tProjectInfoService.selectSameYear(tProjectInfo.getProjectYear());
//说明有重复的年份 将重复的年份删除
if (tProjectInfos.size()!=0){
//重复年份删除方法
tProjectInfoService.deleteisSameYear(tProjectInfo.getProjectYear());
}
return toAjax(tProjectInfoService.insertTProjectInfo(tProjectInfo));
}
/**
* 修改工程项目信息
*/
@PreAuthorize("@ss.hasPermi('project:info:edit')")
@Log(title = "工程项目信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TProjectInfo tProjectInfo)
{
//查询修改文件之前的路径
TProjectInfo tProjectInfos = tProjectInfoService.selectNearbyAddress(tProjectInfo.getProjectId());
if (tProjectInfos.getNearbyAddress()!=null){
// 上传文件路径
String filePath = GassafetyProgressConfig.getUploadPath();
String[] strs = tProjectInfos.getNearbyAddress().split("upload");
//删除
File file = new File(filePath+strs[1].toString());
// 上传文件路径
if(file.isFile()){
file.delete();
}
}
return toAjax(tProjectInfoService.updateTProjectInfo(tProjectInfo));
}
/**
* 删除工程项目信息
*/
@PreAuthorize("@ss.hasPermi('project:info:remove')")
@Log(title = "工程项目信息", businessType = BusinessType.DELETE)
@DeleteMapping("/{projectIds}")
public AjaxResult remove(@PathVariable Long[] projectIds)
{
return toAjax(tProjectInfoService.deleteTProjectInfoByIds(projectIds));
}
}
package com.zehong.system.controller;
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.TEmergencyDevice;
import com.zehong.system.service.ITEmergencyDeviceService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 应急设备Controller
*
* @author zehong
* @date 2022-03-17
*/
@RestController
@RequestMapping("/system/device")
public class TEmergencyDeviceController extends BaseController
{
@Autowired
private ITEmergencyDeviceService tEmergencyDeviceService;
/**
* 查询应急设备列表
*/
@GetMapping("/list")
public TableDataInfo list(TEmergencyDevice tEmergencyDevice)
{
startPage();
List<TEmergencyDevice> list = tEmergencyDeviceService.selectTEmergencyDeviceList(tEmergencyDevice);
return getDataTable(list);
}
/**
* 导出应急设备列表
*/
@Log(title = "应急设备", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TEmergencyDevice tEmergencyDevice)
{
List<TEmergencyDevice> list = tEmergencyDeviceService.selectTEmergencyDeviceList(tEmergencyDevice);
ExcelUtil<TEmergencyDevice> util = new ExcelUtil<TEmergencyDevice>(TEmergencyDevice.class);
return util.exportExcel(list, "应急设备数据");
}
/**
* 获取应急设备详细信息
*/
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return AjaxResult.success(tEmergencyDeviceService.selectTEmergencyDeviceById(id));
}
/**
* 新增应急设备
*/
@Log(title = "应急设备", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TEmergencyDevice tEmergencyDevice)
{
return toAjax(tEmergencyDeviceService.insertTEmergencyDevice(tEmergencyDevice));
}
/**
* 修改应急设备
*/
@Log(title = "应急设备", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TEmergencyDevice tEmergencyDevice)
{
return toAjax(tEmergencyDeviceService.updateTEmergencyDevice(tEmergencyDevice));
}
/**
* 删除应急设备
*/
@Log(title = "应急设备", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(tEmergencyDeviceService.deleteTEmergencyDeviceByIds(ids));
}
}
package com.zehong.system.controller;
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.TEventHandle;
import com.zehong.system.service.ITEventHandleService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 事件处置Controller
*
* @author zehong
* @date 2022-03-19
*/
@RestController
@RequestMapping("/system/handle")
public class TEventHandleController extends BaseController
{
@Autowired
private ITEventHandleService tEventHandleService;
/**
* 查询事件处置列表
*/
//@PreAuthorize("@ss.hasPermi('system:handle:list')")
@GetMapping("/list")
public TableDataInfo list(TEventHandle tEventHandle)
{
startPage();
List<TEventHandle> list = tEventHandleService.selectTEventHandleList(tEventHandle);
return getDataTable(list);
}
/**
* 导出事件处置列表
*/
//@PreAuthorize("@ss.hasPermi('system:handle:export')")
@Log(title = "事件处置", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TEventHandle tEventHandle)
{
List<TEventHandle> list = tEventHandleService.selectTEventHandleList(tEventHandle);
ExcelUtil<TEventHandle> util = new ExcelUtil<TEventHandle>(TEventHandle.class);
return util.exportExcel(list, "事件处置数据");
}
/**
* 获取事件处置详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:handle:query')")
@GetMapping(value = "/{handleId}")
public AjaxResult getInfo(@PathVariable("handleId") Long handleId)
{
return AjaxResult.success(tEventHandleService.selectTEventHandleById(handleId));
}
/**
* 新增事件处置
*/
//@PreAuthorize("@ss.hasPermi('system:handle:add')")
@Log(title = "事件处置", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TEventHandle tEventHandle)
{
return toAjax(tEventHandleService.insertTEventHandle(tEventHandle));
}
/**
* 修改事件处置
*/
//@PreAuthorize("@ss.hasPermi('system:handle:edit')")
@Log(title = "事件处置", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TEventHandle tEventHandle)
{
return toAjax(tEventHandleService.updateTEventHandle(tEventHandle));
}
/**
* 删除事件处置
*/
//@PreAuthorize("@ss.hasPermi('system:handle:remove')")
@Log(title = "事件处置", businessType = BusinessType.DELETE)
@DeleteMapping("/{handleIds}")
public AjaxResult remove(@PathVariable Long[] handleIds)
{
return toAjax(tEventHandleService.deleteTEventHandleByIds(handleIds));
}
}
package com.zehong.system.controller;
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.TEventReceive;
import com.zehong.system.service.ITEventReceiveService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 事件接报Controller
*
* @author zehong
* @date 2022-03-18
*/
@RestController
@RequestMapping("/system/receive")
public class TEventReceiveController extends BaseController
{
@Autowired
private ITEventReceiveService tEventReceiveService;
/**
* 查询事件接报列表
*/
//@PreAuthorize("@ss.hasPermi('system:receive:list')")
@GetMapping("/list")
public TableDataInfo list(TEventReceive tEventReceive)
{
startPage();
List<TEventReceive> list = tEventReceiveService.selectTEventReceiveList(tEventReceive);
return getDataTable(list);
}
/**
* 导出事件接报列表
*/
//@PreAuthorize("@ss.hasPermi('system:receive:export')")
@Log(title = "事件接报", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TEventReceive tEventReceive)
{
List<TEventReceive> list = tEventReceiveService.selectTEventReceiveList(tEventReceive);
ExcelUtil<TEventReceive> util = new ExcelUtil<TEventReceive>(TEventReceive.class);
return util.exportExcel(list, "事件接报数据");
}
/**
* 获取事件接报详细信息
*/
//@PreAuthorize("@ss.hasPermi('system:receive:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return AjaxResult.success(tEventReceiveService.selectTEventReceiveById(id));
}
/**
* 新增事件接报
*/
//@PreAuthorize("@ss.hasPermi('system:receive:add')")
@Log(title = "事件接报", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TEventReceive tEventReceive)
{
return toAjax(tEventReceiveService.insertTEventReceive(tEventReceive));
}
/**
* 修改事件接报
*/
//@PreAuthorize("@ss.hasPermi('system:receive:edit')")
@Log(title = "事件接报", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TEventReceive tEventReceive)
{
return toAjax(tEventReceiveService.updateTEventReceive(tEventReceive));
}
/**
* 删除事件接报
*/
//@PreAuthorize("@ss.hasPermi('system:receive:remove')")
@Log(title = "事件接报", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(tEventReceiveService.deleteTEventReceiveByIds(ids));
}
}
......@@ -30,6 +30,8 @@ public class DeviceData {
private int iconType;
private String iconUrl;
//下级设备数据封装类数组
private List<SubordinateEquipmentList> subordinateEquipmentList;
......@@ -87,6 +89,13 @@ public class DeviceData {
//探测器报警中
private int detectorInAlarm;
public String getIconUrl() {
return iconUrl;
}
public void setIconUrl(String iconUrl) {
this.iconUrl = iconUrl;
}
public List<SubordinateEquipmentList> getSubordinateEquipmentList() {
return subordinateEquipmentList;
......@@ -351,6 +360,7 @@ public class DeviceData {
", pressureFlows=" + pressureFlows +
", beyondEnterpriseName='" + beyondEnterpriseName + '\'' +
", iconType=" + iconType +
", iconUrl='" + iconUrl + '\'' +
", subordinateEquipmentList=" + subordinateEquipmentList +
", numberPressureGauges=" + numberPressureGauges +
", onlineEquipment=" + onlineEquipment +
......
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_emergency_device
*
* @author zehong
* @date 2022-03-21
*/
public class TEmergencyDevice extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** id */
private String id;
/** 1救援队伍 2救援物资 3救援车辆 4医院 */
@Excel(name = "1救援队伍 2救援物资 3救援车辆 4医院")
private Integer deviceType;
/** 设备名称 */
@Excel(name = "设备名称")
private String deviceName;
/** 经度 */
@Excel(name = "经度")
private String longitude;
/** 纬度 */
@Excel(name = "纬度")
private String latitude;
/** 联系人 */
@Excel(name = "联系人")
private String contacts;
/** 联系电话 */
@Excel(name = "联系电话")
private String phone;
/** 详细地址 */
@Excel(name = "详细地址")
private String address;
/** 简介 */
@Excel(name = "简介")
private String introduce;
/** 0未删除 1已删除 */
@Excel(name = "0未删除 1已删除")
private Integer isDel;
public void setId(String id)
{
this.id = id;
}
public String getId()
{
return id;
}
public void setDeviceType(Integer deviceType)
{
this.deviceType = deviceType;
}
public Integer getDeviceType()
{
return deviceType;
}
public void setDeviceName(String deviceName)
{
this.deviceName = deviceName;
}
public String getDeviceName()
{
return deviceName;
}
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 setPhone(String phone)
{
this.phone = phone;
}
public String getPhone()
{
return phone;
}
public void setAddress(String address)
{
this.address = address;
}
public String getAddress()
{
return address;
}
public void setIntroduce(String introduce)
{
this.introduce = introduce;
}
public String getIntroduce()
{
return introduce;
}
public void setIsDel(Integer isDel)
{
this.isDel = isDel;
}
public Integer getIsDel()
{
return isDel;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("deviceType", getDeviceType())
.append("deviceName", getDeviceName())
.append("longitude", getLongitude())
.append("latitude", getLatitude())
.append("contacts", getContacts())
.append("phone", getPhone())
.append("address", getAddress())
.append("introduce", getIntroduce())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.append("isDel", getIsDel())
.toString();
}
}
package com.zehong.system.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 事件处置对象 t_event_handle
*
* @author zehong
* @date 2022-03-19
*/
public class TEventHandle extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** id */
private Long handleId;
/** 事件id */
@Excel(name = "事件id")
private Long eventId;
/** 企业id */
@Excel(name = "企业id")
private Long enterpriseId;
/** 企业名称 */
@Excel(name = "企业名称")
private String enterpriseName;
/** 处置信息 */
@Excel(name = "处置信息")
private String management;
private String managementEvent;
/** 应急预案id */
@Excel(name = "应急预案id")
private Long planId;
@Excel(name = "应急预案标题")
private String planTitle;
@Excel(name = "应急预案附件地址")
private String planUrl;
/** 指导意见 */
@Excel(name = "指导意见")
private String guidanceOpinion;
/** 指导时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "指导时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date guidanceTime;
/** 0未删除 1已删除 */
private Integer isDel;
public String getPlanTitle() {
return planTitle;
}
public void setPlanTitle(String planTitle) {
this.planTitle = planTitle;
}
public String getPlanUrl() {
return planUrl;
}
public void setPlanUrl(String planUrl) {
this.planUrl = planUrl;
}
public String getManagementEvent() {
return managementEvent;
}
public void setManagementEvent(String managementEvent) {
this.managementEvent = managementEvent;
}
public void setHandleId(Long handleId)
{
this.handleId = handleId;
}
public Long getHandleId()
{
return handleId;
}
public void setEventId(Long eventId)
{
this.eventId = eventId;
}
public Long getEventId()
{
return eventId;
}
public void setEnterpriseId(Long enterpriseId)
{
this.enterpriseId = enterpriseId;
}
public Long getEnterpriseId()
{
return enterpriseId;
}
public void setEnterpriseName(String enterpriseName)
{
this.enterpriseName = enterpriseName;
}
public String getEnterpriseName()
{
return enterpriseName;
}
public void setManagement(String management)
{
this.management = management;
}
public String getManagement()
{
return management;
}
public void setPlanId(Long planId)
{
this.planId = planId;
}
public Long getPlanId()
{
return planId;
}
public void setGuidanceOpinion(String guidanceOpinion)
{
this.guidanceOpinion = guidanceOpinion;
}
public String getGuidanceOpinion()
{
return guidanceOpinion;
}
public void setGuidanceTime(Date guidanceTime)
{
this.guidanceTime = guidanceTime;
}
public Date getGuidanceTime()
{
return guidanceTime;
}
public void setIsDel(Integer isDel)
{
this.isDel = isDel;
}
public Integer getIsDel()
{
return isDel;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("handleId", getHandleId())
.append("eventId", getEventId())
.append("enterpriseId", getEnterpriseId())
.append("enterpriseName", getEnterpriseName())
.append("management", getManagement())
.append("planId", getPlanId())
.append("guidanceOpinion", getGuidanceOpinion())
.append("guidanceTime", getGuidanceTime())
.append("isDel", getIsDel())
.append("createTime", getCreateTime())
.toString();
}
}
package com.zehong.system.domain;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 事件接报对象 t_event_receive
*
* @author zehong
* @date 2022-03-18
*/
public class TEventReceive extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Integer id;
/** 事件名称 */
@Excel(name = "事件名称")
private String eventName;
/** 事件类型 1水灾 2火灾 3突发 */
@Excel(name = "事件类型 1水灾 2火灾 3突发")
private Integer eventType;
/** 事件等级 1级 2级 3级 */
@Excel(name = "事件等级 1级 2级 3级")
private Integer eventGrade;
/** 事发地点 */
@Excel(name = "事发地点")
private String address;
/** 经度 */
private String longitude;
/** 纬度 */
private String latitude;
/** 报案人 */
@Excel(name = "报案人")
private String informant;
/** 报案时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "报案时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date inforTime;
/** 报案人电话 */
@Excel(name = "报案人电话")
private String informantPhone;
/** 事件描述 */
@Excel(name = "事件描述")
private String describe;
/** 指派公司id */
@Excel(name = "指派公司id")
private Integer enterpriseId;
/** 指派公司名称 */
@Excel(name = "指派公司名称")
private String enterpriseName;
/** 备注 */
private String remarks;
/** 0未删除 1已删除 */
private Integer isDel;
@Excel(name = "状态")
private Integer status;
public void setId(Integer id)
{
this.id = id;
}
public Integer getId()
{
return id;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public void setEventName(String eventName)
{
this.eventName = eventName;
}
public String getEventName()
{
return eventName;
}
public void setEventType(Integer eventType)
{
this.eventType = eventType;
}
public Integer getEventType()
{
return eventType;
}
public void setEventGrade(Integer eventGrade)
{
this.eventGrade = eventGrade;
}
public Integer getEventGrade()
{
return eventGrade;
}
public void setAddress(String address)
{
this.address = address;
}
public String getAddress()
{
return address;
}
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 setInformant(String informant)
{
this.informant = informant;
}
public String getInformant()
{
return informant;
}
public void setInforTime(Date inforTime)
{
this.inforTime = inforTime;
}
public Date getInforTime()
{
return inforTime;
}
public void setInformantPhone(String informantPhone)
{
this.informantPhone = informantPhone;
}
public String getInformantPhone()
{
return informantPhone;
}
public void setDescribe(String describe)
{
this.describe = describe;
}
public String getDescribe()
{
return describe;
}
public void setEnterpriseId(Integer enterpriseId)
{
this.enterpriseId = enterpriseId;
}
public Integer getEnterpriseId()
{
return enterpriseId;
}
public void setEnterpriseName(String enterpriseName)
{
this.enterpriseName = enterpriseName;
}
public String getEnterpriseName()
{
return enterpriseName;
}
public void setRemarks(String remarks)
{
this.remarks = remarks;
}
public String getRemarks()
{
return remarks;
}
public void setIsDel(Integer isDel)
{
this.isDel = isDel;
}
public Integer getIsDel()
{
return isDel;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("eventName", getEventName())
.append("eventType", getEventType())
.append("eventGrade", getEventGrade())
.append("address", getAddress())
.append("longitude", getLongitude())
.append("latitude", getLatitude())
.append("informant", getInformant())
.append("inforTime", getInforTime())
.append("informantPhone", getInformantPhone())
.append("describe", getDescribe())
.append("enterpriseId", getEnterpriseId())
.append("enterpriseName", getEnterpriseName())
.append("remarks", getRemarks())
.append("isDel", getIsDel())
.append("createTime", getCreateTime())
.toString();
}
}
package com.zehong.system.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 工程项目信息对象 t_project_info
*
* @author zehong
* @date 2022-03-16
*/
public class TProjectInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 工程项目主键ID */
private Long projectId;
/** 工程项目年度 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "工程项目年度", width = 30, dateFormat = "yyyy-MM-dd")
private Date projectYear;
/** 门站地址 */
@Excel(name = "门站地址")
private String gateStationAddress;
/** 门站金额 */
@Excel(name = "门站金额")
private BigDecimal gateStationInvestment;
/** 门站数量 */
@Excel(name = "门站数量")
private Long numberGateStations;
/** 管道长度 */
@Excel(name = "管道长度")
private Long pipeLength;
/** 管道金额 */
@Excel(name = "管道金额")
private BigDecimal pipeInvestment;
/** 附件地址 */
private String nearbyAddress;
/** 是否删除(0正常,1删除) */
private String isDel;
/** 备注 */
@Excel(name = "备注")
private String remarks;
public void setProjectId(Long projectId)
{
this.projectId = projectId;
}
public Long getProjectId()
{
return projectId;
}
public void setProjectYear(Date projectYear)
{
this.projectYear = projectYear;
}
public Date getProjectYear()
{
return projectYear;
}
public void setGateStationAddress(String gateStationAddress)
{
this.gateStationAddress = gateStationAddress;
}
public String getGateStationAddress()
{
return gateStationAddress;
}
public void setGateStationInvestment(BigDecimal gateStationInvestment)
{
this.gateStationInvestment = gateStationInvestment;
}
public BigDecimal getGateStationInvestment()
{
return gateStationInvestment;
}
public void setNumberGateStations(Long numberGateStations)
{
this.numberGateStations = numberGateStations;
}
public Long getNumberGateStations()
{
return numberGateStations;
}
public void setPipeLength(Long pipeLength)
{
this.pipeLength = pipeLength;
}
public Long getPipeLength()
{
return pipeLength;
}
public void setPipeInvestment(BigDecimal pipeInvestment)
{
this.pipeInvestment = pipeInvestment;
}
public BigDecimal getPipeInvestment()
{
return pipeInvestment;
}
public void setNearbyAddress(String nearbyAddress)
{
this.nearbyAddress = nearbyAddress;
}
public String getNearbyAddress()
{
return nearbyAddress;
}
public void setIsDel(String isDel)
{
this.isDel = isDel;
}
public String getIsDel()
{
return isDel;
}
public void setRemarks(String remarks)
{
this.remarks = remarks;
}
public String getRemarks()
{
return remarks;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("projectId", getProjectId())
.append("projectYear", getProjectYear())
.append("gateStationAddress", getGateStationAddress())
.append("gateStationInvestment", getGateStationInvestment())
.append("numberGateStations", getNumberGateStations())
.append("pipeLength", getPipeLength())
.append("pipeInvestment", getPipeInvestment())
.append("nearbyAddress", getNearbyAddress())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("isDel", getIsDel())
.append("remarks", getRemarks())
.toString();
}
}
......@@ -22,6 +22,8 @@ public class TSiteStationInfoData {
private String buildCompany;
private String powerCompany;
private String pictureAddress;
//流量计数组
private List<PressureFlow> pressureFlows;
......@@ -86,6 +88,14 @@ public class TSiteStationInfoData {
//探测器报警中
private int detectorInAlarm;
public String getPictureAddress() {
return pictureAddress;
}
public void setPictureAddress(String pictureAddress) {
this.pictureAddress = pictureAddress;
}
public List<SubordinateEquipmentList> getSubordinateEquipmentList() {
return subordinateEquipmentList;
}
......@@ -357,6 +367,7 @@ public class TSiteStationInfoData {
", buildyear='" + buildyear + '\'' +
", buildCompany='" + buildCompany + '\'' +
", powerCompany='" + powerCompany + '\'' +
", pictureAddress='" + pictureAddress + '\'' +
", pressureFlows=" + pressureFlows +
", subordinateEquipmentList=" + subordinateEquipmentList +
", iconType=" + iconType +
......
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;
import java.math.BigDecimal;
/**
* 燃气车辆信息对象 t_vehicle_info
*
* @author zehong
* @date 2022-03-17
*/
public class TVehicleInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 车辆id */
private Long vehicleId;
/** 车牌号 */
@Excel(name = "车牌号")
private String carNum;
/** 品牌型号 */
@Excel(name = "品牌型号")
private String brandModel;
/** 车辆类型: 1.罐车 2.卡车 */
@Excel(name = "车辆类型: 1.罐车 2.卡车")
private String vehicleType;
/** 车辆载重 */
@Excel(name = "车辆载重")
private String vehicleLoad;
/** 车辆大小 */
@Excel(name = "车辆大小")
private String vehicleSize;
/** 车辆限乘 */
@Excel(name = "车辆限乘")
private String vehicleLimt;
/** 车辆检测信息 */
@Excel(name = "车辆检测信息")
private String vehicleInspect;
/** 所属企业 */
@Excel(name = "所属企业")
private String beyondEnterpriseId;
/** 责任人 */
@Excel(name = "责任人")
private String personLiable;
/** 联系电话 */
@Excel(name = "联系电话")
private String phone;
/** 是否删除(0正常,1删除) */
@Excel(name = "是否删除(0正常,1删除)")
private String isDel;
/** 备注 */
@Excel(name = "备注")
private String remarks;
/**
* 经度
*/
private BigDecimal longitude;
/**
* 纬度
*/
private BigDecimal latitude;
public BigDecimal getLongitude() {
return longitude;
}
public void setLongitude(BigDecimal longitude) {
this.longitude = longitude;
}
public BigDecimal getLatitude() {
return latitude;
}
public void setLatitude(BigDecimal latitude) {
this.latitude = latitude;
}
public void setVehicleId(Long vehicleId)
{
this.vehicleId = vehicleId;
}
public Long getVehicleId()
{
return vehicleId;
}
public void setCarNum(String carNum)
{
this.carNum = carNum;
}
public String getCarNum()
{
return carNum;
}
public void setBrandModel(String brandModel)
{
this.brandModel = brandModel;
}
public String getBrandModel()
{
return brandModel;
}
public void setVehicleType(String vehicleType)
{
this.vehicleType = vehicleType;
}
public String getVehicleType()
{
return vehicleType;
}
public void setVehicleLoad(String vehicleLoad)
{
this.vehicleLoad = vehicleLoad;
}
public String getVehicleLoad()
{
return vehicleLoad;
}
public void setVehicleSize(String vehicleSize)
{
this.vehicleSize = vehicleSize;
}
public String getVehicleSize()
{
return vehicleSize;
}
public void setVehicleLimt(String vehicleLimt)
{
this.vehicleLimt = vehicleLimt;
}
public String getVehicleLimt()
{
return vehicleLimt;
}
public void setVehicleInspect(String vehicleInspect)
{
this.vehicleInspect = vehicleInspect;
}
public String getVehicleInspect()
{
return vehicleInspect;
}
public void setBeyondEnterpriseId(String beyondEnterpriseId)
{
this.beyondEnterpriseId = beyondEnterpriseId;
}
public String getBeyondEnterpriseId()
{
return beyondEnterpriseId;
}
public void setPersonLiable(String personLiable)
{
this.personLiable = personLiable;
}
public String getPersonLiable()
{
return personLiable;
}
public void setPhone(String phone)
{
this.phone = phone;
}
public String getPhone()
{
return phone;
}
public void setIsDel(String isDel)
{
this.isDel = isDel;
}
public String getIsDel()
{
return isDel;
}
public void setRemarks(String remarks)
{
this.remarks = remarks;
}
public String getRemarks()
{
return remarks;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("vehicleId", getVehicleId())
.append("carNum", getCarNum())
.append("brandModel", getBrandModel())
.append("vehicleType", getVehicleType())
.append("vehicleLoad", getVehicleLoad())
.append("vehicleSize", getVehicleSize())
.append("vehicleLimt", getVehicleLimt())
.append("vehicleInspect", getVehicleInspect())
.append("beyondEnterpriseId", getBeyondEnterpriseId())
.append("personLiable", getPersonLiable())
.append("phone", getPhone())
.append("isDel", getIsDel())
.append("remarks", getRemarks())
.toString();
}
}
package com.zehong.system.domain;
import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
/**
* 燃气车辆位置信息对象 t_vehicle_location_info
*
* @author zehong
* @date 2022-03-17
*/
public class TVehicleLocationInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 车辆id */
private Long vehicleLocationId;
/** 车牌号 */
@Excel(name = "车牌号")
private String carNum;
/** 经度 */
@Excel(name = "经度")
private BigDecimal longitude;
/** 纬度 */
@Excel(name = "纬度")
private BigDecimal latitude;
/** 创建时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date reportTime;
/** 是否删除(0正常,1删除) */
@Excel(name = "是否删除(0正常,1删除)")
private String isDel;
/** 备注 */
@Excel(name = "备注")
private String remarks;
/**是否获取最后一次位置*/
private boolean isLast;
/**位置查询开始时间*/
private Date beginTime;
/**位置查询结束时间*/
private Date endTime;
public Date getBeginTime() {
return beginTime;
}
public void setBeginTime(Date beginTime) {
this.beginTime = beginTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public boolean isLast() {
return isLast;
}
public void setLast(boolean last) {
isLast = last;
}
public void setVehicleLocationId(Long vehicleLocationId)
{
this.vehicleLocationId = vehicleLocationId;
}
public Long getVehicleLocationId()
{
return vehicleLocationId;
}
public void setCarNum(String carNum)
{
this.carNum = carNum;
}
public String getCarNum()
{
return carNum;
}
public void setLongitude(BigDecimal longitude)
{
this.longitude = longitude;
}
public BigDecimal getLongitude()
{
return longitude;
}
public void setLatitude(BigDecimal latitude)
{
this.latitude = latitude;
}
public BigDecimal getLatitude()
{
return latitude;
}
public void setReportTime(Date reportTime)
{
this.reportTime = reportTime;
}
public Date getReportTime()
{
return reportTime;
}
public void setIsDel(String isDel)
{
this.isDel = isDel;
}
public String getIsDel()
{
return isDel;
}
public void setRemarks(String remarks)
{
this.remarks = remarks;
}
public String getRemarks()
{
return remarks;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("vehicleLocationId", getVehicleLocationId())
.append("carNum", getCarNum())
.append("longitude", getLongitude())
.append("latitude", getLatitude())
.append("reportTime", getReportTime())
.append("isDel", getIsDel())
.append("remarks", getRemarks())
.toString();
}
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TEmergencyDevice;
/**
* 应急设备Mapper接口
*
* @author zehong
* @date 2022-03-17
*/
public interface TEmergencyDeviceMapper
{
/**
* 查询应急设备
*
* @param id 应急设备ID
* @return 应急设备
*/
public TEmergencyDevice selectTEmergencyDeviceById(String id);
/**
* 查询应急设备列表
*
* @param tEmergencyDevice 应急设备
* @return 应急设备集合
*/
public List<TEmergencyDevice> selectTEmergencyDeviceList(TEmergencyDevice tEmergencyDevice);
/**
* 新增应急设备
*
* @param tEmergencyDevice 应急设备
* @return 结果
*/
public int insertTEmergencyDevice(TEmergencyDevice tEmergencyDevice);
/**
* 修改应急设备
*
* @param tEmergencyDevice 应急设备
* @return 结果
*/
public int updateTEmergencyDevice(TEmergencyDevice tEmergencyDevice);
/**
* 删除应急设备
*
* @param id 应急设备ID
* @return 结果
*/
public int deleteTEmergencyDeviceById(String id);
/**
* 批量删除应急设备
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteTEmergencyDeviceByIds(String[] ids);
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TEventHandle;
/**
* 事件处置Mapper接口
*
* @author zehong
* @date 2022-03-19
*/
public interface TEventHandleMapper
{
/**
* 查询事件处置
*
* @param handleId 事件处置ID
* @return 事件处置
*/
public TEventHandle selectTEventHandleById(Long handleId);
/**
* 查询事件处置列表
*
* @param tEventHandle 事件处置
* @return 事件处置集合
*/
public List<TEventHandle> selectTEventHandleList(TEventHandle tEventHandle);
/**
* 新增事件处置
*
* @param tEventHandle 事件处置
* @return 结果
*/
public int insertTEventHandle(TEventHandle tEventHandle);
/**
* 修改事件处置
*
* @param tEventHandle 事件处置
* @return 结果
*/
public int updateTEventHandle(TEventHandle tEventHandle);
/**
* 删除事件处置
*
* @param handleId 事件处置ID
* @return 结果
*/
public int deleteTEventHandleById(Long handleId);
/**
* 批量删除事件处置
*
* @param handleIds 需要删除的数据ID
* @return 结果
*/
public int deleteTEventHandleByIds(Long[] handleIds);
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TEventReceive;
/**
* 事件接报Mapper接口
*
* @author zehong
* @date 2022-03-18
*/
public interface TEventReceiveMapper
{
/**
* 查询事件接报
*
* @param id 事件接报ID
* @return 事件接报
*/
public TEventReceive selectTEventReceiveById(String id);
/**
* 查询事件接报列表
*
* @param tEventReceive 事件接报
* @return 事件接报集合
*/
public List<TEventReceive> selectTEventReceiveList(TEventReceive tEventReceive);
/**
* 新增事件接报
*
* @param tEventReceive 事件接报
* @return 结果
*/
public int insertTEventReceive(TEventReceive tEventReceive);
/**
* 修改事件接报
*
* @param tEventReceive 事件接报
* @return 结果
*/
public int updateTEventReceive(TEventReceive tEventReceive);
/**
* 删除事件接报
*
* @param id 事件接报ID
* @return 结果
*/
public int deleteTEventReceiveById(String id);
/**
* 批量删除事件接报
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteTEventReceiveByIds(String[] ids);
}
package com.zehong.system.mapper;
import java.util.Date;
import java.util.List;
import com.zehong.system.domain.TProjectInfo;
/**
* 工程项目信息Mapper接口
*
* @author zehong
* @date 2022-03-16
*/
public interface TProjectInfoMapper
{
/**
* 查询工程项目信息
*
* @param projectId 工程项目信息ID
* @return 工程项目信息
*/
public TProjectInfo selectTProjectInfoById(Long projectId);
/**
* 查询工程项目信息列表
*
* @param tProjectInfo 工程项目信息
* @return 工程项目信息集合
*/
public List<TProjectInfo> selectTProjectInfoList(TProjectInfo tProjectInfo);
/**
* 新增工程项目信息
*
* @param tProjectInfo 工程项目信息
* @return 结果
*/
public int insertTProjectInfo(TProjectInfo tProjectInfo);
/**
* 修改工程项目信息
*
* @param tProjectInfo 工程项目信息
* @return 结果
*/
public int updateTProjectInfo(TProjectInfo tProjectInfo);
/**
* 删除工程项目信息
*
* @param projectId 工程项目信息ID
* @return 结果
*/
public int deleteTProjectInfoById(Long projectId);
/**
* 批量删除工程项目信息
*
* @param projectIds 需要删除的数据ID
* @return 结果
*/
public int deleteTProjectInfoByIds(Long[] projectIds);
/**
* 查询是否已经有重复的年份数据
* @param projectYear
* @return
*/
List<TProjectInfo> selectSameYear(Date projectYear);
/**
* 重复年份删除方法
* @param isSameYear
*/
void deleteisSameYear(Date isSameYear);
/**
* 查询修改文件之前的路径
* @param projectId
* @return
*/
TProjectInfo selectNearbyAddress(Long projectId);
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TVehicleInfo;
/**
* 燃气车辆信息Mapper接口
*
* @author zehong
* @date 2022-03-17
*/
public interface TVehicleInfoMapper
{
/**
* 查询燃气车辆信息
*
* @param vehicleId 燃气车辆信息ID
* @return 燃气车辆信息
*/
public TVehicleInfo selectTVehicleInfoById(Long vehicleId);
/**
* 查询燃气车辆信息列表
*
* @param tVehicleInfo 燃气车辆信息
* @return 燃气车辆信息集合
*/
public List<TVehicleInfo> selectTVehicleInfoList(TVehicleInfo tVehicleInfo);
/**
* 新增燃气车辆信息
*
* @param tVehicleInfo 燃气车辆信息
* @return 结果
*/
public int insertTVehicleInfo(TVehicleInfo tVehicleInfo);
/**
* 修改燃气车辆信息
*
* @param tVehicleInfo 燃气车辆信息
* @return 结果
*/
public int updateTVehicleInfo(TVehicleInfo tVehicleInfo);
/**
* 删除燃气车辆信息
*
* @param vehicleId 燃气车辆信息ID
* @return 结果
*/
public int deleteTVehicleInfoById(Long vehicleId);
/**
* 批量删除燃气车辆信息
*
* @param vehicleIds 需要删除的数据ID
* @return 结果
*/
public int deleteTVehicleInfoByIds(Long[] vehicleIds);
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TVehicleLocationInfo;
/**
* 燃气车辆位置信息Mapper接口
*
* @author zehong
* @date 2022-03-17
*/
public interface TVehicleLocationInfoMapper
{
/**
* 查询燃气车辆位置信息
*
* @param vehicleLocationId 燃气车辆位置信息ID
* @return 燃气车辆位置信息
*/
public TVehicleLocationInfo selectTVehicleLocationInfoById(Long vehicleLocationId);
/**
* 查询燃气车辆位置信息列表
*
* @param tVehicleLocationInfo 燃气车辆位置信息
* @return 燃气车辆位置信息集合
*/
public List<TVehicleLocationInfo> selectTVehicleLocationInfoList(TVehicleLocationInfo tVehicleLocationInfo);
/**
* 新增燃气车辆位置信息
*
* @param tVehicleLocationInfo 燃气车辆位置信息
* @return 结果
*/
public int insertTVehicleLocationInfo(TVehicleLocationInfo tVehicleLocationInfo);
/**
* 修改燃气车辆位置信息
*
* @param tVehicleLocationInfo 燃气车辆位置信息
* @return 结果
*/
public int updateTVehicleLocationInfo(TVehicleLocationInfo tVehicleLocationInfo);
/**
* 删除燃气车辆位置信息
*
* @param vehicleLocationId 燃气车辆位置信息ID
* @return 结果
*/
public int deleteTVehicleLocationInfoById(Long vehicleLocationId);
/**
* 批量删除燃气车辆位置信息
*
* @param vehicleLocationIds 需要删除的数据ID
* @return 结果
*/
public int deleteTVehicleLocationInfoByIds(Long[] vehicleLocationIds);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TEmergencyDevice;
/**
* 应急设备Service接口
*
* @author zehong
* @date 2022-03-17
*/
public interface ITEmergencyDeviceService
{
/**
* 查询应急设备
*
* @param id 应急设备ID
* @return 应急设备
*/
public TEmergencyDevice selectTEmergencyDeviceById(String id);
/**
* 查询应急设备列表
*
* @param tEmergencyDevice 应急设备
* @return 应急设备集合
*/
public List<TEmergencyDevice> selectTEmergencyDeviceList(TEmergencyDevice tEmergencyDevice);
/**
* 新增应急设备
*
* @param tEmergencyDevice 应急设备
* @return 结果
*/
public int insertTEmergencyDevice(TEmergencyDevice tEmergencyDevice);
/**
* 修改应急设备
*
* @param tEmergencyDevice 应急设备
* @return 结果
*/
public int updateTEmergencyDevice(TEmergencyDevice tEmergencyDevice);
/**
* 批量删除应急设备
*
* @param ids 需要删除的应急设备ID
* @return 结果
*/
public int deleteTEmergencyDeviceByIds(String[] ids);
/**
* 删除应急设备信息
*
* @param id 应急设备ID
* @return 结果
*/
public int deleteTEmergencyDeviceById(String id);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TEventHandle;
/**
* 事件处置Service接口
*
* @author zehong
* @date 2022-03-19
*/
public interface ITEventHandleService
{
/**
* 查询事件处置
*
* @param handleId 事件处置ID
* @return 事件处置
*/
public TEventHandle selectTEventHandleById(Long handleId);
/**
* 查询事件处置列表
*
* @param tEventHandle 事件处置
* @return 事件处置集合
*/
public List<TEventHandle> selectTEventHandleList(TEventHandle tEventHandle);
/**
* 新增事件处置
*
* @param tEventHandle 事件处置
* @return 结果
*/
public int insertTEventHandle(TEventHandle tEventHandle);
/**
* 修改事件处置
*
* @param tEventHandle 事件处置
* @return 结果
*/
public int updateTEventHandle(TEventHandle tEventHandle);
/**
* 批量删除事件处置
*
* @param handleIds 需要删除的事件处置ID
* @return 结果
*/
public int deleteTEventHandleByIds(Long[] handleIds);
/**
* 删除事件处置信息
*
* @param handleId 事件处置ID
* @return 结果
*/
public int deleteTEventHandleById(Long handleId);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TEventReceive;
/**
* 事件接报Service接口
*
* @author zehong
* @date 2022-03-18
*/
public interface ITEventReceiveService
{
/**
* 查询事件接报
*
* @param id 事件接报ID
* @return 事件接报
*/
public TEventReceive selectTEventReceiveById(String id);
/**
* 查询事件接报列表
*
* @param tEventReceive 事件接报
* @return 事件接报集合
*/
public List<TEventReceive> selectTEventReceiveList(TEventReceive tEventReceive);
/**
* 新增事件接报
*
* @param tEventReceive 事件接报
* @return 结果
*/
public int insertTEventReceive(TEventReceive tEventReceive);
/**
* 修改事件接报
*
* @param tEventReceive 事件接报
* @return 结果
*/
public int updateTEventReceive(TEventReceive tEventReceive);
/**
* 批量删除事件接报
*
* @param ids 需要删除的事件接报ID
* @return 结果
*/
public int deleteTEventReceiveByIds(String[] ids);
/**
* 删除事件接报信息
*
* @param id 事件接报ID
* @return 结果
*/
public int deleteTEventReceiveById(String id);
}
package com.zehong.system.service;
import java.util.Date;
import java.util.List;
import com.zehong.system.domain.TProjectInfo;
/**
* 工程项目信息Service接口
*
* @author zehong
* @date 2022-03-16
*/
public interface ITProjectInfoService
{
/**
* 查询工程项目信息
*
* @param projectId 工程项目信息ID
* @return 工程项目信息
*/
public TProjectInfo selectTProjectInfoById(Long projectId);
/**
* 查询工程项目信息列表
*
* @param tProjectInfo 工程项目信息
* @return 工程项目信息集合
*/
public List<TProjectInfo> selectTProjectInfoList(TProjectInfo tProjectInfo);
/**
* 新增工程项目信息
*
* @param tProjectInfo 工程项目信息
* @return 结果
*/
public int insertTProjectInfo(TProjectInfo tProjectInfo);
/**
* 修改工程项目信息
*
* @param tProjectInfo 工程项目信息
* @return 结果
*/
public int updateTProjectInfo(TProjectInfo tProjectInfo);
/**
* 批量删除工程项目信息
*
* @param projectIds 需要删除的工程项目信息ID
* @return 结果
*/
public int deleteTProjectInfoByIds(Long[] projectIds);
/**
* 删除工程项目信息信息
*
* @param projectId 工程项目信息ID
* @return 结果
*/
public int deleteTProjectInfoById(Long projectId);
/**
* 查询是否已经有重复的年份数据
* @param projectYear
* @return
*/
List<TProjectInfo> selectSameYear(Date projectYear);
/**
* 重复年份删除方法
* @param isSameYear
*/
void deleteisSameYear(Date isSameYear);
/**
* 查询修改文件之前的路径
* @param projectId
*/
TProjectInfo selectNearbyAddress(Long projectId);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TVehicleInfo;
/**
* 燃气车辆信息Service接口
*
* @author zehong
* @date 2022-03-17
*/
public interface ITVehicleInfoService
{
/**
* 查询燃气车辆信息
*
* @param vehicleId 燃气车辆信息ID
* @return 燃气车辆信息
*/
public TVehicleInfo selectTVehicleInfoById(Long vehicleId);
/**
* 查询燃气车辆信息列表
*
* @param tVehicleInfo 燃气车辆信息
* @return 燃气车辆信息集合
*/
public List<TVehicleInfo> selectTVehicleInfoList(TVehicleInfo tVehicleInfo);
/**
* 新增燃气车辆信息
*
* @param tVehicleInfo 燃气车辆信息
* @return 结果
*/
public int insertTVehicleInfo(TVehicleInfo tVehicleInfo);
/**
* 修改燃气车辆信息
*
* @param tVehicleInfo 燃气车辆信息
* @return 结果
*/
public int updateTVehicleInfo(TVehicleInfo tVehicleInfo);
/**
* 批量删除燃气车辆信息
*
* @param vehicleIds 需要删除的燃气车辆信息ID
* @return 结果
*/
public int deleteTVehicleInfoByIds(Long[] vehicleIds);
/**
* 删除燃气车辆信息信息
*
* @param vehicleId 燃气车辆信息ID
* @return 结果
*/
public int deleteTVehicleInfoById(Long vehicleId);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TVehicleLocationInfo;
/**
* 燃气车辆位置信息Service接口
*
* @author zehong
* @date 2022-03-17
*/
public interface ITVehicleLocationInfoService
{
/**
* 查询燃气车辆位置信息
*
* @param vehicleLocationId 燃气车辆位置信息ID
* @return 燃气车辆位置信息
*/
public TVehicleLocationInfo selectTVehicleLocationInfoById(Long vehicleLocationId);
/**
* 查询燃气车辆位置信息列表
*
* @param tVehicleLocationInfo 燃气车辆位置信息
* @return 燃气车辆位置信息集合
*/
public List<TVehicleLocationInfo> selectTVehicleLocationInfoList(TVehicleLocationInfo tVehicleLocationInfo);
/**
* 新增燃气车辆位置信息
*
* @param tVehicleLocationInfo 燃气车辆位置信息
* @return 结果
*/
public int insertTVehicleLocationInfo(TVehicleLocationInfo tVehicleLocationInfo);
/**
* 修改燃气车辆位置信息
*
* @param tVehicleLocationInfo 燃气车辆位置信息
* @return 结果
*/
public int updateTVehicleLocationInfo(TVehicleLocationInfo tVehicleLocationInfo);
/**
* 批量删除燃气车辆位置信息
*
* @param vehicleLocationIds 需要删除的燃气车辆位置信息ID
* @return 结果
*/
public int deleteTVehicleLocationInfoByIds(Long[] vehicleLocationIds);
/**
* 删除燃气车辆位置信息信息
*
* @param vehicleLocationId 燃气车辆位置信息ID
* @return 结果
*/
public int deleteTVehicleLocationInfoById(Long vehicleLocationId);
}
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.TEmergencyDeviceMapper;
import com.zehong.system.domain.TEmergencyDevice;
import com.zehong.system.service.ITEmergencyDeviceService;
/**
* 应急设备Service业务层处理
*
* @author zehong
* @date 2022-03-17
*/
@Service
public class TEmergencyDeviceServiceImpl implements ITEmergencyDeviceService
{
@Autowired
private TEmergencyDeviceMapper tEmergencyDeviceMapper;
/**
* 查询应急设备
*
* @param id 应急设备ID
* @return 应急设备
*/
@Override
public TEmergencyDevice selectTEmergencyDeviceById(String id)
{
return tEmergencyDeviceMapper.selectTEmergencyDeviceById(id);
}
/**
* 查询应急设备列表
*
* @param tEmergencyDevice 应急设备
* @return 应急设备
*/
@Override
public List<TEmergencyDevice> selectTEmergencyDeviceList(TEmergencyDevice tEmergencyDevice)
{
return tEmergencyDeviceMapper.selectTEmergencyDeviceList(tEmergencyDevice);
}
/**
* 新增应急设备
*
* @param tEmergencyDevice 应急设备
* @return 结果
*/
@Override
public int insertTEmergencyDevice(TEmergencyDevice tEmergencyDevice)
{
tEmergencyDevice.setCreateTime(DateUtils.getNowDate());
return tEmergencyDeviceMapper.insertTEmergencyDevice(tEmergencyDevice);
}
/**
* 修改应急设备
*
* @param tEmergencyDevice 应急设备
* @return 结果
*/
@Override
public int updateTEmergencyDevice(TEmergencyDevice tEmergencyDevice)
{
tEmergencyDevice.setUpdateTime(DateUtils.getNowDate());
return tEmergencyDeviceMapper.updateTEmergencyDevice(tEmergencyDevice);
}
/**
* 批量删除应急设备
*
* @param ids 需要删除的应急设备ID
* @return 结果
*/
@Override
public int deleteTEmergencyDeviceByIds(String[] ids)
{
return tEmergencyDeviceMapper.deleteTEmergencyDeviceByIds(ids);
}
/**
* 删除应急设备信息
*
* @param id 应急设备ID
* @return 结果
*/
@Override
public int deleteTEmergencyDeviceById(String id)
{
return tEmergencyDeviceMapper.deleteTEmergencyDeviceById(id);
}
}
package com.zehong.system.service.impl;
import java.util.Date;
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.TEventHandleMapper;
import com.zehong.system.domain.TEventHandle;
import com.zehong.system.service.ITEventHandleService;
/**
* 事件处置Service业务层处理
*
* @author zehong
* @date 2022-03-19
*/
@Service
public class TEventHandleServiceImpl implements ITEventHandleService
{
@Autowired
private TEventHandleMapper tEventHandleMapper;
/**
* 查询事件处置
*
* @param handleId 事件处置ID
* @return 事件处置
*/
@Override
public TEventHandle selectTEventHandleById(Long handleId)
{
return tEventHandleMapper.selectTEventHandleById(handleId);
}
/**
* 查询事件处置列表
*
* @param tEventHandle 事件处置
* @return 事件处置
*/
@Override
public List<TEventHandle> selectTEventHandleList(TEventHandle tEventHandle)
{
return tEventHandleMapper.selectTEventHandleList(tEventHandle);
}
/**
* 新增事件处置
*
* @param tEventHandle 事件处置
* @return 结果
*/
@Override
public int insertTEventHandle(TEventHandle tEventHandle)
{
tEventHandle.setCreateTime(DateUtils.getNowDate());
return tEventHandleMapper.insertTEventHandle(tEventHandle);
}
/**
* 修改事件处置
*
* @param tEventHandle 事件处置
* @return 结果
*/
@Override
public int updateTEventHandle(TEventHandle tEventHandle)
{
tEventHandle.setGuidanceTime(new Date());
return tEventHandleMapper.updateTEventHandle(tEventHandle);
}
/**
* 批量删除事件处置
*
* @param handleIds 需要删除的事件处置ID
* @return 结果
*/
@Override
public int deleteTEventHandleByIds(Long[] handleIds)
{
return tEventHandleMapper.deleteTEventHandleByIds(handleIds);
}
/**
* 删除事件处置信息
*
* @param handleId 事件处置ID
* @return 结果
*/
@Override
public int deleteTEventHandleById(Long handleId)
{
return tEventHandleMapper.deleteTEventHandleById(handleId);
}
}
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.TEventReceiveMapper;
import com.zehong.system.domain.TEventReceive;
import com.zehong.system.service.ITEventReceiveService;
/**
* 事件接报Service业务层处理
*
* @author zehong
* @date 2022-03-18
*/
@Service
public class TEventReceiveServiceImpl implements ITEventReceiveService
{
@Autowired
private TEventReceiveMapper tEventReceiveMapper;
/**
* 查询事件接报
*
* @param id 事件接报ID
* @return 事件接报
*/
@Override
public TEventReceive selectTEventReceiveById(String id)
{
return tEventReceiveMapper.selectTEventReceiveById(id);
}
/**
* 查询事件接报列表
*
* @param tEventReceive 事件接报
* @return 事件接报
*/
@Override
public List<TEventReceive> selectTEventReceiveList(TEventReceive tEventReceive)
{
return tEventReceiveMapper.selectTEventReceiveList(tEventReceive);
}
/**
* 新增事件接报
*
* @param tEventReceive 事件接报
* @return 结果
*/
@Override
public int insertTEventReceive(TEventReceive tEventReceive)
{
if(tEventReceive.getEnterpriseId()!=null){
tEventReceive.setStatus(2);
}
tEventReceive.setCreateTime(DateUtils.getNowDate());
return tEventReceiveMapper.insertTEventReceive(tEventReceive);
}
/**
* 修改事件接报
*
* @param tEventReceive 事件接报
* @return 结果
*/
@Override
public int updateTEventReceive(TEventReceive tEventReceive)
{
return tEventReceiveMapper.updateTEventReceive(tEventReceive);
}
/**
* 批量删除事件接报
*
* @param ids 需要删除的事件接报ID
* @return 结果
*/
@Override
public int deleteTEventReceiveByIds(String[] ids)
{
return tEventReceiveMapper.deleteTEventReceiveByIds(ids);
}
/**
* 删除事件接报信息
*
* @param id 事件接报ID
* @return 结果
*/
@Override
public int deleteTEventReceiveById(String id)
{
return tEventReceiveMapper.deleteTEventReceiveById(id);
}
}
package com.zehong.system.service.impl;
import java.util.Date;
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.TProjectInfoMapper;
import com.zehong.system.domain.TProjectInfo;
import com.zehong.system.service.ITProjectInfoService;
/**
* 工程项目信息Service业务层处理
*
* @author zehong
* @date 2022-03-16
*/
@Service
public class TProjectInfoServiceImpl implements ITProjectInfoService
{
@Autowired
private TProjectInfoMapper tProjectInfoMapper;
/**
* 查询工程项目信息
*
* @param projectId 工程项目信息ID
* @return 工程项目信息
*/
@Override
public TProjectInfo selectTProjectInfoById(Long projectId)
{
return tProjectInfoMapper.selectTProjectInfoById(projectId);
}
/**
* 查询工程项目信息列表
*
* @param tProjectInfo 工程项目信息
* @return 工程项目信息
*/
@Override
public List<TProjectInfo> selectTProjectInfoList(TProjectInfo tProjectInfo)
{
return tProjectInfoMapper.selectTProjectInfoList(tProjectInfo);
}
/**
* 新增工程项目信息
*
* @param tProjectInfo 工程项目信息
* @return 结果
*/
@Override
public int insertTProjectInfo(TProjectInfo tProjectInfo)
{
tProjectInfo.setCreateTime(DateUtils.getNowDate());
return tProjectInfoMapper.insertTProjectInfo(tProjectInfo);
}
/**
* 修改工程项目信息
*
* @param tProjectInfo 工程项目信息
* @return 结果
*/
@Override
public int updateTProjectInfo(TProjectInfo tProjectInfo)
{
tProjectInfo.setUpdateTime(DateUtils.getNowDate());
return tProjectInfoMapper.updateTProjectInfo(tProjectInfo);
}
/**
* 批量删除工程项目信息
*
* @param projectIds 需要删除的工程项目信息ID
* @return 结果
*/
@Override
public int deleteTProjectInfoByIds(Long[] projectIds)
{
return tProjectInfoMapper.deleteTProjectInfoByIds(projectIds);
}
/**
* 删除工程项目信息信息
*
* @param projectId 工程项目信息ID
* @return 结果
*/
@Override
public int deleteTProjectInfoById(Long projectId)
{
return tProjectInfoMapper.deleteTProjectInfoById(projectId);
}
/**
* 查询是否已经有重复的年份数据
* @param projectYear
* @return
*/
@Override
public List<TProjectInfo> selectSameYear(Date projectYear) {
List<TProjectInfo> tProjectInfos = tProjectInfoMapper.selectSameYear(projectYear);
return tProjectInfos;
}
/**
* 重复年份删除方法
* @param isSameYear
*/
@Override
public void deleteisSameYear(Date isSameYear) {
tProjectInfoMapper.deleteisSameYear(isSameYear);
}
/**
* 查询修改文件之前的路径
* @param projectId
* @return
*/
@Override
public TProjectInfo selectNearbyAddress(Long projectId) {
TProjectInfo tProjectInfo = tProjectInfoMapper.selectNearbyAddress(projectId);
return tProjectInfo;
}
}
package com.zehong.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TVehicleInfoMapper;
import com.zehong.system.domain.TVehicleInfo;
import com.zehong.system.service.ITVehicleInfoService;
/**
* 燃气车辆信息Service业务层处理
*
* @author zehong
* @date 2022-03-17
*/
@Service
public class TVehicleInfoServiceImpl implements ITVehicleInfoService
{
@Autowired
private TVehicleInfoMapper tVehicleInfoMapper;
/**
* 查询燃气车辆信息
*
* @param vehicleId 燃气车辆信息ID
* @return 燃气车辆信息
*/
@Override
public TVehicleInfo selectTVehicleInfoById(Long vehicleId)
{
return tVehicleInfoMapper.selectTVehicleInfoById(vehicleId);
}
/**
* 查询燃气车辆信息列表
*
* @param tVehicleInfo 燃气车辆信息
* @return 燃气车辆信息
*/
@Override
public List<TVehicleInfo> selectTVehicleInfoList(TVehicleInfo tVehicleInfo)
{
return tVehicleInfoMapper.selectTVehicleInfoList(tVehicleInfo);
}
/**
* 新增燃气车辆信息
*
* @param tVehicleInfo 燃气车辆信息
* @return 结果
*/
@Override
public int insertTVehicleInfo(TVehicleInfo tVehicleInfo)
{
return tVehicleInfoMapper.insertTVehicleInfo(tVehicleInfo);
}
/**
* 修改燃气车辆信息
*
* @param tVehicleInfo 燃气车辆信息
* @return 结果
*/
@Override
public int updateTVehicleInfo(TVehicleInfo tVehicleInfo)
{
return tVehicleInfoMapper.updateTVehicleInfo(tVehicleInfo);
}
/**
* 批量删除燃气车辆信息
*
* @param vehicleIds 需要删除的燃气车辆信息ID
* @return 结果
*/
@Override
public int deleteTVehicleInfoByIds(Long[] vehicleIds)
{
return tVehicleInfoMapper.deleteTVehicleInfoByIds(vehicleIds);
}
/**
* 删除燃气车辆信息信息
*
* @param vehicleId 燃气车辆信息ID
* @return 结果
*/
@Override
public int deleteTVehicleInfoById(Long vehicleId)
{
return tVehicleInfoMapper.deleteTVehicleInfoById(vehicleId);
}
}
package com.zehong.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TVehicleLocationInfoMapper;
import com.zehong.system.domain.TVehicleLocationInfo;
import com.zehong.system.service.ITVehicleLocationInfoService;
/**
* 燃气车辆位置信息Service业务层处理
*
* @author zehong
* @date 2022-03-17
*/
@Service
public class TVehicleLocationInfoServiceImpl implements ITVehicleLocationInfoService
{
@Autowired
private TVehicleLocationInfoMapper tVehicleLocationInfoMapper;
/**
* 查询燃气车辆位置信息
*
* @param vehicleLocationId 燃气车辆位置信息ID
* @return 燃气车辆位置信息
*/
@Override
public TVehicleLocationInfo selectTVehicleLocationInfoById(Long vehicleLocationId)
{
return tVehicleLocationInfoMapper.selectTVehicleLocationInfoById(vehicleLocationId);
}
/**
* 查询燃气车辆位置信息列表
*
* @param tVehicleLocationInfo 燃气车辆位置信息
* @return 燃气车辆位置信息
*/
@Override
public List<TVehicleLocationInfo> selectTVehicleLocationInfoList(TVehicleLocationInfo tVehicleLocationInfo)
{
return tVehicleLocationInfoMapper.selectTVehicleLocationInfoList(tVehicleLocationInfo);
}
/**
* 新增燃气车辆位置信息
*
* @param tVehicleLocationInfo 燃气车辆位置信息
* @return 结果
*/
@Override
public int insertTVehicleLocationInfo(TVehicleLocationInfo tVehicleLocationInfo)
{
return tVehicleLocationInfoMapper.insertTVehicleLocationInfo(tVehicleLocationInfo);
}
/**
* 修改燃气车辆位置信息
*
* @param tVehicleLocationInfo 燃气车辆位置信息
* @return 结果
*/
@Override
public int updateTVehicleLocationInfo(TVehicleLocationInfo tVehicleLocationInfo)
{
return tVehicleLocationInfoMapper.updateTVehicleLocationInfo(tVehicleLocationInfo);
}
/**
* 批量删除燃气车辆位置信息
*
* @param vehicleLocationIds 需要删除的燃气车辆位置信息ID
* @return 结果
*/
@Override
public int deleteTVehicleLocationInfoByIds(Long[] vehicleLocationIds)
{
return tVehicleLocationInfoMapper.deleteTVehicleLocationInfoByIds(vehicleLocationIds);
}
/**
* 删除燃气车辆位置信息信息
*
* @param vehicleLocationId 燃气车辆位置信息ID
* @return 结果
*/
@Override
public int deleteTVehicleLocationInfoById(Long vehicleLocationId)
{
return tVehicleLocationInfoMapper.deleteTVehicleLocationInfoById(vehicleLocationId);
}
}
......@@ -30,6 +30,7 @@
<result property="companyType" column="device_id" />
<result property="beyondEnterpriseName" column="beyond_enterprise_name" />
<result property="companyType" column="beyond_enterprise_id" />
<result property="iconUrl" column="icon_url" />
</resultMap>
<!--下级设备数据-->
......@@ -52,6 +53,7 @@
<result property="buildCompany" column="build_unit" />
<result property="powerCompany" column="beyond_enterprise_name" />
<result property="companyType" column="beyond_enterprise_id" />
<result property="pictureAddress" column="picture_address" />
</resultMap>
<!--监控数据-->
......@@ -109,7 +111,7 @@
<!--调压箱数据查询方法-->
<select id="selectDeviceData" resultMap="DeviceDateResult">
select beyond_enterprise_id,device_id,device_type,device_name,device_code,device_addr,longitude,latitude,beyond_enterprise_name from t_device_info
select beyond_enterprise_id,icon_url,device_id,device_type,device_name,device_code,device_addr,longitude,latitude,beyond_enterprise_name from t_device_info
where device_type='2' and is_del='0'
</select>
......@@ -121,7 +123,7 @@
<!--场站信息查询方法-->
<select id="selectTSiteStationInfoData" resultMap="TSiteStationInfoDataResult">
select beyond_enterprise_id,site_station_id,site_station_name,site_station_type,longitude,latitude,create_time,build_unit,beyond_enterprise_name
select beyond_enterprise_id,picture_address,site_station_id,site_station_name,site_station_type,longitude,latitude,create_time,build_unit,beyond_enterprise_name
from t_site_station_info where is_del='0'
</select>
......@@ -150,7 +152,7 @@
<!--查询阀门井数据-->
<select id="selectvalveData" resultMap="DeviceDateResult">
select beyond_enterprise_id,device_id,device_type,device_name,device_code,device_addr,longitude,latitude,beyond_enterprise_name from t_device_info
select beyond_enterprise_id,device_id,icon_url,device_type,device_name,device_code,device_addr,longitude,latitude,beyond_enterprise_name from t_device_info
where device_type='1' and is_del='0'
</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.TEmergencyDeviceMapper">
<resultMap type="TEmergencyDevice" id="TEmergencyDeviceResult">
<result property="id" column="id" />
<result property="deviceType" column="device_type" />
<result property="deviceName" column="device_name" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="contacts" column="contacts" />
<result property="phone" column="phone" />
<result property="address" column="address" />
<result property="introduce" column="introduce" />
<result property="createTime" column="create_time" />
<result property="updateTime" column="update_time" />
<result property="isDel" column="is_del" />
</resultMap>
<sql id="selectTEmergencyDeviceVo">
select id, device_type, device_name, longitude, latitude, contacts, phone, address, introduce, create_time, update_time, is_del from t_emergency_device
</sql>
<select id="selectTEmergencyDeviceList" parameterType="TEmergencyDevice" resultMap="TEmergencyDeviceResult">
<include refid="selectTEmergencyDeviceVo"/>
<where>
<if test="deviceType != null "> and device_type = #{deviceType}</if>
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
<if test="longitude != null and longitude != ''"> and longitude = #{longitude}</if>
<if test="latitude != null and latitude != ''"> and latitude = #{latitude}</if>
<if test="address != null and address != ''"> and address = #{address}</if>
</where>
</select>
<select id="selectTEmergencyDeviceById" parameterType="String" resultMap="TEmergencyDeviceResult">
<include refid="selectTEmergencyDeviceVo"/>
where id = #{id}
</select>
<insert id="insertTEmergencyDevice" parameterType="TEmergencyDevice">
insert into t_emergency_device
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="deviceType != null">device_type,</if>
<if test="deviceName != null">device_name,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="contacts != null">contacts,</if>
<if test="phone != null">phone,</if>
<if test="address != null">address,</if>
<if test="introduce != null">introduce,</if>
<if test="createTime != null">create_time,</if>
<if test="updateTime != null">update_time,</if>
<if test="isDel != null">is_del,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="deviceType != null">#{deviceType},</if>
<if test="deviceName != null">#{deviceName},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="contacts != null">#{contacts},</if>
<if test="phone != null">#{phone},</if>
<if test="address != null">#{address},</if>
<if test="introduce != null">#{introduce},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="isDel != null">#{isDel},</if>
</trim>
</insert>
<update id="updateTEmergencyDevice" parameterType="TEmergencyDevice">
update t_emergency_device
<trim prefix="SET" suffixOverrides=",">
<if test="deviceType != null">device_type = #{deviceType},</if>
<if test="deviceName != null">device_name = #{deviceName},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="contacts != null">contacts = #{contacts},</if>
<if test="phone != null">phone = #{phone},</if>
<if test="address != null">address = #{address},</if>
<if test="introduce != null">introduce = #{introduce},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="isDel != null">is_del = #{isDel},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTEmergencyDeviceById" parameterType="String">
delete from t_emergency_device where id = #{id}
</delete>
<delete id="deleteTEmergencyDeviceByIds" parameterType="String">
delete from t_emergency_device where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?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.TEventHandleMapper">
<resultMap type="TEventHandle" id="TEventHandleResult">
<result property="handleId" column="handle_id" />
<result property="eventId" column="event_id" />
<result property="enterpriseId" column="enterprise_id" />
<result property="enterpriseName" column="enterprise_name" />
<result property="management" column="management" />
<result property="managementEvent" column="management_event" />
<result property="planId" column="plan_id" />
<result property="planTitle" column="plan_title" />
<result property="planUrl" column="plan_url" />
<result property="guidanceOpinion" column="guidance_opinion" />
<result property="guidanceTime" column="guidance_time" />
<result property="isDel" column="is_del" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectTEventHandleVo">
select handle_id, event_id, enterprise_id, enterprise_name, management,management_event, plan_id,plan_title,plan_url, guidance_opinion, guidance_time, is_del, create_time from t_event_handle
</sql>
<select id="selectTEventHandleList" parameterType="TEventHandle" resultMap="TEventHandleResult">
<include refid="selectTEventHandleVo"/>
<where>
<if test="eventId != null "> and event_id = #{eventId}</if>
</where>
</select>
<select id="selectTEventHandleById" parameterType="Long" resultMap="TEventHandleResult">
<include refid="selectTEventHandleVo"/>
where handle_id = #{handleId}
</select>
<insert id="insertTEventHandle" parameterType="TEventHandle" useGeneratedKeys="true" keyProperty="handleId">
insert into t_event_handle
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="eventId != null">event_id,</if>
<if test="enterpriseId != null">enterprise_id,</if>
<if test="enterpriseName != null">enterprise_name,</if>
<if test="management != null">management,</if>
<if test="managementEvent != null">management_event,</if>
<if test="planId != null">plan_id,</if>
<if test="planTitle != null">plan_title,</if>
<if test="planUrl != null">plan_url,</if>
<if test="guidanceOpinion != null">guidance_opinion,</if>
<if test="guidanceTime != null">guidance_time,</if>
<if test="isDel != null">is_del,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="eventId != null">#{eventId},</if>
<if test="enterpriseId != null">#{enterpriseId},</if>
<if test="enterpriseName != null">#{enterpriseName},</if>
<if test="management != null">#{management},</if>
<if test="managementEvent != null">#{managementEvent},</if>
<if test="planId != null">#{planId},</if>
<if test="planTitle != null">#{planTitle},</if>
<if test="planUrl != null">#{planUrl},</if>
<if test="guidanceOpinion != null">#{guidanceOpinion},</if>
<if test="guidanceTime != null">#{guidanceTime},</if>
<if test="isDel != null">#{isDel},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateTEventHandle" parameterType="TEventHandle">
update t_event_handle
<trim prefix="SET" suffixOverrides=",">
<if test="eventId != null">event_id = #{eventId},</if>
<if test="enterpriseId != null">enterprise_id = #{enterpriseId},</if>
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
<if test="management != null">management = #{management},</if>
<if test="managementEvent != null">management_event = #{managementEvent},</if>
<if test="planId != null">plan_id = #{planId},</if>
<if test="planTitle != null">plan_title = #{planTitle},</if>
<if test="planUrl != null">plan_url = #{planUrl},</if>
<if test="guidanceOpinion != null">guidance_opinion = #{guidanceOpinion},</if>
<if test="guidanceTime != null">guidance_time = #{guidanceTime},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where handle_id = #{handleId}
</update>
<delete id="deleteTEventHandleById" parameterType="Long">
delete from t_event_handle where handle_id = #{handleId}
</delete>
<delete id="deleteTEventHandleByIds" parameterType="String">
delete from t_event_handle where handle_id in
<foreach item="handleId" collection="array" open="(" separator="," close=")">
#{handleId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?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.TEventReceiveMapper">
<resultMap type="TEventReceive" id="TEventReceiveResult">
<result property="id" column="id" />
<result property="eventName" column="event_name" />
<result property="eventType" column="event_type" />
<result property="eventGrade" column="event_grade" />
<result property="address" column="address" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="informant" column="informant" />
<result property="inforTime" column="infor_time" />
<result property="informantPhone" column="informant_phone" />
<result property="describe" column="describe" />
<result property="status" column="status" />
<result property="enterpriseId" column="enterprise_id" />
<result property="enterpriseName" column="enterprise_name" />
<result property="remarks" column="remarks" />
<result property="isDel" column="is_del" />
<result property="createTime" column="create_time" />
</resultMap>
<sql id="selectTEventReceiveVo">
select id, event_name, event_type, event_grade, address, longitude, latitude, informant, infor_time, informant_phone, `describe`, `status`,enterprise_id, enterprise_name, remarks, is_del, create_time from t_event_receive
</sql>
<select id="selectTEventReceiveList" parameterType="TEventReceive" resultMap="TEventReceiveResult">
<include refid="selectTEventReceiveVo"/>
<where>
<if test="eventName != null and eventName != ''"> and event_name like concat('%', #{eventName}, '%')</if>
<if test="eventType != null "> and event_type = #{eventType}</if>
<if test="eventGrade != null "> and event_grade = #{eventGrade}</if>
<if test="enterpriseId != null and enterpriseId != ''"> and enterprise_id = #{enterpriseId}</if>
<if test="status != null and status!=5"> and status = #{status}</if>
<if test="status ==5"> and status !=4 </if>
and is_del = 0
</where>
order by infor_time
</select>
<select id="selectTEventReceiveById" parameterType="String" resultMap="TEventReceiveResult">
<include refid="selectTEventReceiveVo"/>
where id = #{id}
</select>
<insert id="insertTEventReceive" parameterType="TEventReceive">
insert into t_event_receive
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="eventName != null">event_name,</if>
<if test="eventType != null">event_type,</if>
<if test="eventGrade != null">event_grade,</if>
<if test="address != null">address,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="informant != null">informant,</if>
<if test="inforTime != null">infor_time,</if>
<if test="informantPhone != null">informant_phone,</if>
<if test="describe != null">`describe`,</if>
<if test="status != null">`status`,</if>
<if test="enterpriseId != null">enterprise_id,</if>
<if test="enterpriseName != null">enterprise_name,</if>
<if test="remarks != null">remarks,</if>
<if test="isDel != null">is_del,</if>
<if test="createTime != null">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="eventName != null">#{eventName},</if>
<if test="eventType != null">#{eventType},</if>
<if test="eventGrade != null">#{eventGrade},</if>
<if test="address != null">#{address},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="informant != null">#{informant},</if>
<if test="inforTime != null">#{inforTime},</if>
<if test="informantPhone != null">#{informantPhone},</if>
<if test="describe != null">#{describe},</if>
<if test="status != null">#{status},</if>
<if test="enterpriseId != null">#{enterpriseId},</if>
<if test="enterpriseName != null">#{enterpriseName},</if>
<if test="remarks != null">#{remarks},</if>
<if test="isDel != null">#{isDel},</if>
<if test="createTime != null">#{createTime},</if>
</trim>
</insert>
<update id="updateTEventReceive" parameterType="TEventReceive">
update t_event_receive
<trim prefix="SET" suffixOverrides=",">
<if test="eventName != null">event_name = #{eventName},</if>
<if test="eventType != null">event_type = #{eventType},</if>
<if test="eventGrade != null">event_grade = #{eventGrade},</if>
<if test="address != null">address = #{address},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="informant != null">informant = #{informant},</if>
<if test="inforTime != null">infor_time = #{inforTime},</if>
<if test="informantPhone != null">informant_phone = #{informantPhone},</if>
<if test="describe != null">`describe` = #{describe},</if>
<if test="status != null">`status` = #{status},</if>
<if test="enterpriseId != null">enterprise_id = #{enterpriseId},</if>
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
<if test="remarks != null">remarks = #{remarks},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="createTime != null">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteTEventReceiveById" parameterType="String">
delete from t_event_receive where id = #{id}
</delete>
<delete id="deleteTEventReceiveByIds" parameterType="String">
delete from t_event_receive where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?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.TProjectInfoMapper">
<resultMap type="TProjectInfo" id="TProjectInfoResult">
<result property="projectId" column="project_id" />
<result property="projectYear" column="project_year" />
<result property="gateStationAddress" column="gate_station_address" />
<result property="gateStationInvestment" column="gate_station_investment" />
<result property="numberGateStations" column="number_gate_stations" />
<result property="pipeLength" column="pipe_length" />
<result property="pipeInvestment" column="pipe_investment" />
<result property="nearbyAddress" column="nearby_address" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="isDel" column="is_del" />
<result property="remarks" column="remarks" />
</resultMap>
<sql id="selectTProjectInfoVo">
select project_id, project_year, gate_station_address, gate_station_investment, number_gate_stations, pipe_length, pipe_investment, nearby_address, create_by, create_time, update_by, update_time, is_del, remarks from t_project_info
</sql>
<select id="selectTProjectInfoList" parameterType="TProjectInfo" resultMap="TProjectInfoResult">
<include refid="selectTProjectInfoVo"/>
<where>
is_del='0'
<if test="projectYear != null "> and project_year = #{projectYear}</if>
<if test="gateStationAddress != null and gateStationAddress != ''"> and gate_station_address = #{gateStationAddress}</if>
<if test="gateStationInvestment != null "> and gate_station_investment = #{gateStationInvestment}</if>
<if test="numberGateStations != null "> and number_gate_stations = #{numberGateStations}</if>
<if test="pipeLength != null "> and pipe_length = #{pipeLength}</if>
<if test="pipeInvestment != null "> and pipe_investment = #{pipeInvestment}</if>
<if test="nearbyAddress != null and nearbyAddress != ''"> and nearby_address = #{nearbyAddress}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where>
group by project_id desc
</select>
<select id="selectTProjectInfoById" parameterType="Long" resultMap="TProjectInfoResult">
<include refid="selectTProjectInfoVo"/>
where project_id = #{projectId} and is_del='0'
</select>
<insert id="insertTProjectInfo" parameterType="TProjectInfo" useGeneratedKeys="true" keyProperty="projectId">
insert into t_project_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="projectYear != null">project_year,</if>
<if test="gateStationAddress != null">gate_station_address,</if>
<if test="gateStationInvestment != null">gate_station_investment,</if>
<if test="numberGateStations != null">number_gate_stations,</if>
<if test="pipeLength != null">pipe_length,</if>
<if test="pipeInvestment != null">pipe_investment,</if>
<if test="nearbyAddress != null">nearby_address,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
<if test="isDel != null">is_del,</if>
<if test="remarks != null">remarks,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="projectYear != null">#{projectYear},</if>
<if test="gateStationAddress != null">#{gateStationAddress},</if>
<if test="gateStationInvestment != null">#{gateStationInvestment},</if>
<if test="numberGateStations != null">#{numberGateStations},</if>
<if test="pipeLength != null">#{pipeLength},</if>
<if test="pipeInvestment != null">#{pipeInvestment},</if>
<if test="nearbyAddress != null">#{nearbyAddress},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="isDel != null">#{isDel},</if>
<if test="remarks != null">#{remarks},</if>
</trim>
</insert>
<update id="updateTProjectInfo" parameterType="TProjectInfo">
update t_project_info
<trim prefix="SET" suffixOverrides=",">
<if test="projectYear != null">project_year = #{projectYear},</if>
<if test="gateStationAddress != null">gate_station_address = #{gateStationAddress},</if>
<if test="gateStationInvestment != null">gate_station_investment = #{gateStationInvestment},</if>
<if test="numberGateStations != null">number_gate_stations = #{numberGateStations},</if>
<if test="pipeLength != null">pipe_length = #{pipeLength},</if>
<if test="pipeInvestment != null">pipe_investment = #{pipeInvestment},</if>
<if test="nearbyAddress != null">nearby_address = #{nearbyAddress},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="remarks != null">remarks = #{remarks},</if>
</trim>
where project_id = #{projectId}
</update>
<update id="deleteTProjectInfoById" parameterType="Long">
update t_project_info set is_del='1' where project_id = #{projectId}
</update>
<update id="deleteTProjectInfoByIds" parameterType="String">
update t_project_info set is_del='1' where project_id in
<foreach item="projectId" collection="array" open="(" separator="," close=")">
#{projectId}
</foreach>
</update>
<!--查询是否已经有重复的年份数据-->
<select id="selectSameYear" resultMap="TProjectInfoResult">
select project_id from t_project_info where project_year=#{projectYear}
</select>
<!--重复年份删除方法-->
<update id="deleteisSameYear">
update t_project_info set is_del='1' where project_year=#{isSameYear}
</update>
<!--查询修改文件之前的路径-->
<select id="selectNearbyAddress" resultMap="TProjectInfoResult">
select nearby_address from t_project_info where project_id=#{projectId}
</select>
</mapper>
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.zehong.system.mapper.TVehicleInfoMapper">
<resultMap type="TVehicleInfo" id="TVehicleInfoResult">
<result property="vehicleId" column="vehicle_id" />
<result property="carNum" column="car_num" />
<result property="brandModel" column="brand_model" />
<result property="vehicleType" column="vehicle_type" />
<result property="vehicleLoad" column="vehicle_load" />
<result property="vehicleSize" column="vehicle_size" />
<result property="vehicleLimt" column="vehicle_limt" />
<result property="vehicleInspect" column="vehicle_inspect" />
<result property="beyondEnterpriseId" column="beyond_enterprise_id" />
<result property="personLiable" column="person_liable" />
<result property="phone" column="phone" />
<result property="isDel" column="is_del" />
<result property="remarks" column="remarks" />
</resultMap>
<sql id="selectTVehicleInfoVo">
select vehicle_id, car_num, brand_model, vehicle_type, vehicle_load, vehicle_size, vehicle_limt, vehicle_inspect, beyond_enterprise_id, person_liable, phone, is_del, remarks from t_vehicle_info
</sql>
<select id="selectTVehicleInfoList" parameterType="TVehicleInfo" resultMap="TVehicleInfoResult">
<include refid="selectTVehicleInfoVo"/>
<where>
<if test="carNum != null and carNum != ''"> and car_num like concat('%', #{carNum}, '%') </if>
<if test="brandModel != null and brandModel != ''"> and brand_model = #{brandModel}</if>
<if test="vehicleType != null and vehicleType != ''"> and vehicle_type = #{vehicleType}</if>
<if test="vehicleLoad != null and vehicleLoad != ''"> and vehicle_load = #{vehicleLoad}</if>
<if test="vehicleSize != null and vehicleSize != ''"> and vehicle_size = #{vehicleSize}</if>
<if test="vehicleLimt != null and vehicleLimt != ''"> and vehicle_limt = #{vehicleLimt}</if>
<if test="vehicleInspect != null and vehicleInspect != ''"> and vehicle_inspect = #{vehicleInspect}</if>
<if test="beyondEnterpriseId != null and beyondEnterpriseId != ''"> and beyond_enterprise_id = #{beyondEnterpriseId}</if>
<if test="personLiable != null and personLiable != ''"> and person_liable = #{personLiable}</if>
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where>
</select>
<select id="selectTVehicleInfoById" parameterType="Long" resultMap="TVehicleInfoResult">
<include refid="selectTVehicleInfoVo"/>
where vehicle_id = #{vehicleId}
</select>
<insert id="insertTVehicleInfo" parameterType="TVehicleInfo" useGeneratedKeys="true" keyProperty="vehicleId">
insert into t_vehicle_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="carNum != null">car_num,</if>
<if test="brandModel != null">brand_model,</if>
<if test="vehicleType != null">vehicle_type,</if>
<if test="vehicleLoad != null">vehicle_load,</if>
<if test="vehicleSize != null">vehicle_size,</if>
<if test="vehicleLimt != null">vehicle_limt,</if>
<if test="vehicleInspect != null">vehicle_inspect,</if>
<if test="beyondEnterpriseId != null">beyond_enterprise_id,</if>
<if test="personLiable != null">person_liable,</if>
<if test="phone != null">phone,</if>
<if test="isDel != null">is_del,</if>
<if test="remarks != null">remarks,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="carNum != null">#{carNum},</if>
<if test="brandModel != null">#{brandModel},</if>
<if test="vehicleType != null">#{vehicleType},</if>
<if test="vehicleLoad != null">#{vehicleLoad},</if>
<if test="vehicleSize != null">#{vehicleSize},</if>
<if test="vehicleLimt != null">#{vehicleLimt},</if>
<if test="vehicleInspect != null">#{vehicleInspect},</if>
<if test="beyondEnterpriseId != null">#{beyondEnterpriseId},</if>
<if test="personLiable != null">#{personLiable},</if>
<if test="phone != null">#{phone},</if>
<if test="isDel != null">#{isDel},</if>
<if test="remarks != null">#{remarks},</if>
</trim>
</insert>
<update id="updateTVehicleInfo" parameterType="TVehicleInfo">
update t_vehicle_info
<trim prefix="SET" suffixOverrides=",">
<if test="carNum != null">car_num = #{carNum},</if>
<if test="brandModel != null">brand_model = #{brandModel},</if>
<if test="vehicleType != null">vehicle_type = #{vehicleType},</if>
<if test="vehicleLoad != null">vehicle_load = #{vehicleLoad},</if>
<if test="vehicleSize != null">vehicle_size = #{vehicleSize},</if>
<if test="vehicleLimt != null">vehicle_limt = #{vehicleLimt},</if>
<if test="vehicleInspect != null">vehicle_inspect = #{vehicleInspect},</if>
<if test="beyondEnterpriseId != null">beyond_enterprise_id = #{beyondEnterpriseId},</if>
<if test="personLiable != null">person_liable = #{personLiable},</if>
<if test="phone != null">phone = #{phone},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="remarks != null">remarks = #{remarks},</if>
</trim>
where vehicle_id = #{vehicleId}
</update>
<delete id="deleteTVehicleInfoById" parameterType="Long">
delete from t_vehicle_info where vehicle_id = #{vehicleId}
</delete>
<delete id="deleteTVehicleInfoByIds" parameterType="String">
delete from t_vehicle_info where vehicle_id in
<foreach item="vehicleId" collection="array" open="(" separator="," close=")">
#{vehicleId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
<?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.TVehicleLocationInfoMapper">
<resultMap type="TVehicleLocationInfo" id="TVehicleLocationInfoResult">
<result property="vehicleLocationId" column="vehicle_location_id" />
<result property="carNum" column="car_num" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="reportTime" column="report_time" />
<result property="isDel" column="is_del" />
<result property="remarks" column="remarks" />
</resultMap>
<sql id="selectTVehicleLocationInfoVo">
select vehicle_location_id, car_num, longitude, latitude, report_time, is_del, remarks from t_vehicle_location_info
</sql>
<select id="selectTVehicleLocationInfoList" parameterType="TVehicleLocationInfo" resultMap="TVehicleLocationInfoResult">
<include refid="selectTVehicleLocationInfoVo"/>
<where>
<if test="carNum != null and carNum != ''"> and car_num = #{carNum}</if>
<if test="longitude != null "> and longitude = #{longitude}</if>
<if test="latitude != null "> and latitude = #{latitude}</if>
<if test="beginTime != null and endTime!= null"> and report_time BETWEEN #{ beginTime } AND #{ endTime }</if>
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
</where>
ORDER BY report_time DESC
<if test="isLast">
limit 1
</if>
</select>
<select id="selectTVehicleLocationInfoById" parameterType="Long" resultMap="TVehicleLocationInfoResult">
<include refid="selectTVehicleLocationInfoVo"/>
where vehicle_location_id = #{vehicleLocationId}
</select>
<insert id="insertTVehicleLocationInfo" parameterType="TVehicleLocationInfo" useGeneratedKeys="true" keyProperty="vehicleLocationId">
insert into t_vehicle_location_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="carNum != null">car_num,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="reportTime != null">report_time,</if>
<if test="isDel != null">is_del,</if>
<if test="remarks != null">remarks,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="carNum != null">#{carNum},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="reportTime != null">#{reportTime},</if>
<if test="isDel != null">#{isDel},</if>
<if test="remarks != null">#{remarks},</if>
</trim>
</insert>
<update id="updateTVehicleLocationInfo" parameterType="TVehicleLocationInfo">
update t_vehicle_location_info
<trim prefix="SET" suffixOverrides=",">
<if test="carNum != null">car_num = #{carNum},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="reportTime != null">report_time = #{reportTime},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="remarks != null">remarks = #{remarks},</if>
</trim>
where vehicle_location_id = #{vehicleLocationId}
</update>
<delete id="deleteTVehicleLocationInfoById" parameterType="Long">
delete from t_vehicle_location_info where vehicle_location_id = #{vehicleLocationId}
</delete>
<delete id="deleteTVehicleLocationInfoByIds" parameterType="String">
delete from t_vehicle_location_info where vehicle_location_id in
<foreach item="vehicleLocationId" collection="array" open="(" separator="," close=")">
#{vehicleLocationId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
......@@ -46,6 +46,7 @@
"js-beautify": "1.13.0",
"js-cookie": "2.2.1",
"jsencrypt": "3.0.0-rc.1",
"moment": "^2.29.1",
"nprogress": "0.2.0",
"quill": "1.3.7",
"screenfull": "5.0.2",
......
import request from '@/utils/request'
// 查询燃气车辆信息列表
export function listInfo(query) {
return request({
url: '/system/vehicleInfo/list',
method: 'get',
params: query
})
}
//获取车辆最终位置
export function getLastLocation(query){
return request({
url: '/system/vehicleInfo/getLastLocation',
method: 'get',
params: query
})
}
// 查询燃气车辆信息详细
export function getInfo(vehicleId) {
return request({
url: '/system/vehicleInfo/' + vehicleId,
method: 'get'
})
}
// 新增燃气车辆信息
export function addInfo(data) {
return request({
url: '/system/vehicleInfo',
method: 'post',
data: data
})
}
// 修改燃气车辆信息
export function updateInfo(data) {
return request({
url: '/system/vehicleInfo',
method: 'put',
data: data
})
}
// 删除燃气车辆信息
export function delInfo(vehicleId) {
return request({
url: '/system/vehicleInfo/' + vehicleId,
method: 'delete'
})
}
// 导出燃气车辆信息
export function exportInfo(query) {
return request({
url: '/system/vehicleInfo/export',
method: 'get',
params: query
})
}
import request from '@/utils/request'
// 查询燃气车辆位置信息列表
export function listInfo(query) {
return request({
url: '/system/vehicleLocationInfo/list',
method: 'get',
params: query
})
}
//获取车辆位置信息
export function getVehicleLocations(query){
return request({
url: '/system/vehicleLocationInfo/getVehicleLocations',
method: 'get',
params: query
})
}
// 查询燃气车辆位置信息详细
export function getInfo(vehicleLocationId) {
return request({
url: '/system/vehicleLocationInfo/' + vehicleLocationId,
method: 'get'
})
}
// 新增燃气车辆位置信息
export function addInfo(data) {
return request({
url: '/system/vehicleLocationInfo',
method: 'post',
data: data
})
}
// 修改燃气车辆位置信息
export function updateInfo(data) {
return request({
url: '/system/vehicleLocationInfo',
method: 'put',
data: data
})
}
// 删除燃气车辆位置信息
export function delInfo(vehicleLocationId) {
return request({
url: '/system/vehicleLocationInfo/' + vehicleLocationId,
method: 'delete'
})
}
// 导出燃气车辆位置信息
export function exportInfo(query) {
return request({
url: '/system/vehicleLocationInfo/export',
method: 'get',
params: query
})
}
import request from '@/utils/request'
// 查询工程项目信息列表
export function listInfo(query) {
return request({
url: '/project/info/list',
method: 'get',
params: query
})
}
// 查询工程项目信息详细
export function getInfo(projectId) {
return request({
url: '/project/info/' + projectId,
method: 'get'
})
}
// 新增工程项目信息
export function addInfo(data) {
return request({
url: '/project/info',
method: 'post',
data: data
})
}
// 修改工程项目信息
export function updateInfo(data) {
return request({
url: '/project/info',
method: 'put',
data: data
})
}
// 删除工程项目信息
export function delInfo(projectId) {
return request({
url: '/project/info/' + projectId,
method: 'delete'
})
}
// 导出工程项目信息
export function exportInfo(query) {
return request({
url: '/project/info/export',
method: 'get',
params: query
})
}
\ No newline at end of file
import request from '@/utils/request'
// 查询应急设备列表
export function listDevice(query) {
return request({
url: '/system/device/list',
method: 'get',
params: query
})
}
// 查询应急设备详细
export function getDevice(id) {
return request({
url: '/system/device/' + id,
method: 'get'
})
}
// 新增应急设备
export function addDevice(data) {
return request({
url: '/system/device',
method: 'post',
data: data
})
}
// 修改应急设备
export function updateDevice(data) {
return request({
url: '/system/device',
method: 'put',
data: data
})
}
// 删除应急设备
export function delDevice(id) {
return request({
url: '/system/device/' + id,
method: 'delete'
})
}
// 导出应急设备
export function exportDevice(query) {
return request({
url: '/system/device/export',
method: 'get',
params: query
})
}
\ No newline at end of file
import request from '@/utils/request'
// 查询事件处置列表
export function listHandle(query) {
return request({
url: '/system/handle/list',
method: 'get',
params: query
})
}
// 查询事件处置详细
export function getHandle(handleId) {
return request({
url: '/system/handle/' + handleId,
method: 'get'
})
}
// 新增事件处置
export function addHandle(data) {
return request({
url: '/system/handle',
method: 'post',
data: data
})
}
// 修改事件处置
export function updateHandle(data) {
return request({
url: '/system/handle',
method: 'put',
data: data
})
}
// 删除事件处置
export function delHandle(handleId) {
return request({
url: '/system/handle/' + handleId,
method: 'delete'
})
}
// 导出事件处置
export function exportHandle(query) {
return request({
url: '/system/handle/export',
method: 'get',
params: query
})
}
\ No newline at end of file
import request from '@/utils/request'
// 查询事件接报列表
export function listReceive(query) {
return request({
url: '/system/receive/list',
method: 'get',
params: query
})
}
// 查询事件接报详细
export function getReceive(id) {
return request({
url: '/system/receive/' + id,
method: 'get'
})
}
// 新增事件接报
export function addReceive(data) {
return request({
url: '/system/receive',
method: 'post',
data: data
})
}
// 修改事件接报
export function updateReceive(data) {
return request({
url: '/system/receive',
method: 'put',
data: data
})
}
// 删除事件接报
export function delReceive(id) {
return request({
url: '/system/receive/' + id,
method: 'delete'
})
}
// 导出事件接报
export function exportReceive(query) {
return request({
url: '/system/receive/export',
method: 'get',
params: query
})
}
\ No newline at end of file
......@@ -667,3 +667,11 @@
.el-badge__content {
padding: 0 2px !important;
}
//去除高德logo
.amap-logo{
display: none;
opacity:0 !important;
}
.amap-copyright {
opacity:0;
}
.gass-vehiche {
.el-table {
background-color: rgba(0, 0, 0, 0) !important;
.el-table__body {
width: 100% !important;
}
&::before {
height: 0px !important;
}
td {
border-bottom: none !important;
}
.el-table__header-wrapper,
.el-table__fixed-header-wrapper {
tr {
background-color: #213b52 !important;
}
th {
word-break: break-word;
background-color: #213b52 !important;
color: rgba(123, 248, 244, 1);
height: 30px;
font-size: 13px;
padding: 0;
&.is-leaf {
border-bottom: none;
}
}
}
.el-table__body-wrapper {
.el-table__row:nth-child(2n + 1) {
background-color: #213b52;
&:hover td {
background-color: #7bf8f430 !important;
}
td {
.cell {
// color: #525252;
color: rgba(123, 248, 244, 1);
}
}
}
.el-table__row:nth-child(2n) {
background-color:#063157 !important;
&:hover td {
background-color: #7bf8f430 !important;
}
td {
background-color: #213b52 !important;
.cell {
color: #fff;
}
}
}
}
.el-table__body-wrapper {
.el-button [class*="el-icon-"] + span {
// margin-left: 1px;
}
}
}
// 滚动条样式
.drawer{
::-webkit-scrollbar {
width: 10px;
background: #012a53;
position: absolute;
top: 0;
//display:none
}
::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
// border-radius: 10px;
// box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
background: #cccccccc;
border-radius: 8px;
}
::-webkit-scrollbar-track {
/*滚动条里面轨道*/
// box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
// border-radius: 10px;
// background-color: red;
}
::-webkit-scrollbar-button:start {
// overflow: hidden;
}
::-webkit-scrollbar-button:end {
// overflow: hidden;
}
}
.el-pagination {
button:disabled {
background-color: rgba(0, 0, 0, 0);
}
.el-pager li {
background-color: rgba(0, 0, 0, 0);
color: #fff;
cursor: pointer;
&.active {
color: #1890ff;
}
&:hover {
color: #7bf8f4;
}
}
.btn-prev,
.el-pagination .btn-next {
background-color: rgba(0, 0, 0, 0);
}
}
.el-pagination .btn-prev,
.el-pagination .btn-next {
background-color: rgba(0, 0, 0, 0);
}
// 禁用状态的左箭头
button[disabled] {
&:hover {
.el-icon-arrow-left,
.el-icon-arrow-right {
&::before {
color: #909399 !important;
}
}
}
.el-icon-arrow-left,
.el-icon-arrow-right {
&::before {
color: #909399;
}
}
}
button {
&:hover {
.el-icon-arrow-left,
.el-icon-arrow-right {
&::before {
color: #7bf8f4 !important;
}
}
}
}
// 平常状态下的
.el-icon-arrow-left,
.el-icon-arrow-right {
&::before {
color: #ffffff;
}
}
.el-pagination__jump {
color: #fff;
}
.el-input__inner {
background-color: rgba(0, 0, 0, 0);
border-color: #1890ff;
//color: #fff;
}
}
<!--
* @Author: your name
* @Date: 2022-01-26 10:52:10
* @LastEditTime: 2022-02-17 10:11:35
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/components/PipeColor.vue
-->
<template>
<div>
<!-- <div class="pipePressure">
<div style="float: left;margin-right: 5px;">
<div class="hasColorBox">
<img src="../../assets/image/bigtyx.svg" alt="">
调压箱
</div>
<div class="hasColorBox">
<img src="../../assets/image/bigfmj.svg" alt="">
阀门井
</div>
<div class="hasColorBox">
<img src="../../assets/image/bigcz.svg" alt="">
厂站
</div>
<div class="hasColorBox">
<img src="../../assets/image/biguser.svg" alt="">
用户
</div>
<div class="hasColorBox">
<img src="../../assets/image/bigjk.svg" alt="">
监控
</div>
</div>
<div>
<div class="hasColorBox" :style="{ color: pipeColor[`1`] }">
<div :style="{ backgroundColor: pipeColor[`1`] }"></div>
低压管线
</div>
<div class="hasColorBox" :style="{ color: pipeColor[`2`] }">
<div :style="{ backgroundColor: pipeColor[`2`] }"></div>
中压管线
</div>
<div class="hasColorBox" :style="{ color: pipeColor[`3`] }">
<div :style="{ backgroundColor: pipeColor[`3`] }"></div>
次高压管线
</div>
<div class="hasColorBox" :style="{ color: pipeColor[`4`] }">
<div :style="{ backgroundColor: pipeColor[`4`] }"></div>
高压管线
</div>
</div>
</div> -->
<div class="mapChange">
<div :class="{ active: mapStyle }" @click="mapChange(2)">全景地图</div>
<div :class="{ active: !mapStyle }" @click="mapChange(1)">卫星地图</div>
</div>
</div>
</template>
<script>
import { pipeColor } from "@/utils/mapClass/config.js";
export default {
data() {
downIcon: true;
return {
pipeColor,
mapStyle:true,
};
},
methods: {
// 更改卫星图
mapChange(num) {
if (num == 1) {
this.mapStyle = false;
} else {
this.mapStyle = true;
}
this.$parent.map.changeMap(this.mapStyle);
},
},
};
</script>
<style lang="scss" scoped>
.pipePressure {
width: 180px;
height: auto;
border: 1px solid #a5a5a5;
background-color: #112238b3;
position: fixed;
color: rgb(205, 219, 228);
left: 460px;
bottom: 20px;
padding: 5px;
font-size: 14px;
// background: rgba(6, 29, 51, 0.8);
.hasColorBox {
// border: 1px solid #053b6a;
padding: 2px 5px;
margin-bottom: 5px;
& > div {
display: inline-block;
width: 10px;
height: 10px;
}
}
}
.hasColorBox>img{
width: 14px;
}
.mapChange {
left: 10px;
top: 20px;
color: #fff;
padding: 5px;
position: absolute;
display: flex;
z-index: 9999;
div {
border: 1px solid #339CC9;
padding: 3px 6px;
margin-left: 8px;
color: #339CC9;
cursor: pointer;
font-size: 14px;
&.active,
&:hover
{
background-color: #053B6A ;
color: #2CD5DB;
}
}
}
</style>
<!--
* @Author: your name
* @Date: 2022-01-26 20:07:52
* @LastEditTime: 2022-03-08 16:16:39
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/views/components/deviceA.vue
-->
<template>
<div class="devicea-wrapper">
<div class="title">
{{deviceData.deviceName}}
</div>
<div class="close" @click="close">
<img src="@/assets/mapImages/closeBtn.png" alt="" />
</div>
<div class="top flex">
</div>
<div class="middle">
<div class="left">
<div>联系人:</div>
</div>
<div v-unValue title="123" class="right">
{{ deviceData.contacts }}
</div>
</div>
<div class="middle">
<div class="left">
<div>联系电话:</div>
</div>
<div v-unValue title="123" class="right">
{{ deviceData.phone }}
</div>
</div>
<div class="middle">
<div class="left">
<div>设施地址:</div>
</div>
<div v-unValue title="123" class="right">
{{ deviceData.address }}
</div>
</div>
<div class="middle">
<div class="left">
<div>简介:</div>
</div>
<div v-unValue title="123" class="right">
{{ deviceData.introduce }}
</div>
</div>
</div>
</template>
<script>
import { companyType, deviceType } from "@/utils/mapClass/config.js";
export default {
data() {
return {
companyType,
deviceType,
profile: "暂无备注",
};
},
computed: {
prodTest() {
return this.vueRoot.$store.state.user.systemSetting.prod_test;
},
company() {
return this.vueRoot.$store.state.bigWindowCompany.company;
},
},
mounted() {
// 如果不是测试,而是真数据,就要用帧数据的东西
if (this.prodTest != "test") {
this.companyType = {};
this.company.forEach((item) => {
this.companyType[item.conpanyId] = item.companyName;
});
}
console.log(this.deviceData);
},
methods: {
close() {
this.mapClass.infowindowClose();
},
btnClick() {
// this.vueRoot.centerDataFunc(this.deviceData.pressureFlows);
},
},
};
</script>
<style lang="scss" scoped>
.devicea-wrapper {
background-color: rgba(9, 18, 32, 0.6);
padding: 10px;
position: relative;
width: 500px;
.title {
// padding-top: 10px;
// padding-left: 10px;
font-size: 14px;
line-height: 14px;
color: #ffffff;
}
.close {
position: absolute;
right: 10px;
top: 5px;
cursor: pointer;
}
.top {
margin-top: 10px;
// margin-bottom: 10px;
border: 1px solid #cccccc;
box-sizing: border-box;
.group {
height: 30px;
flex: 1;
display: flex;
justify-content: space-between;
box-sizing: border-box;
div {
flex: 1;
box-sizing: border-box;
border-right: 1px solid #cccccc;
text-align: center;
font-size: 14px;
color: #ffffff;
line-height: 30px;
padding: 0 5px;
&.last {
border-right: none;
}
}
.left {
text-align: right;
background-color: rgba(255, 255, 255, 0.1);
}
}
}
.middle {
display: flex;
border: 1px solid #cccccc;
border-top: none;
& > div {
box-sizing: border-box;
border-right: 1px solid #cccccc;
text-align: center;
font-size: 14px;
color: #ffffff;
line-height: 30px;
padding: 0 5px;
&.left {
width: 113px;
display: flex;
align-items: center;
background-color: rgba(255, 255, 255, 0.1);
div {
text-align: right;
flex: 1;
}
}
&.right {
border: none;
flex: 1;
text-align: left;
text-indent: 2em;
line-height: normal;
padding: 5px;
}
}
}
.foot {
width: 100%;
padding: 5px;
border: 1px solid #ffffff;
box-sizing: border-box;
font-size: 14px;
color: #ffffff;
text-indent: 2em;
margin-bottom: 10px;
}
.flex {
display: flex;
justify-content: space-between;
}
}
</style>
<template>
<div class="test-5" style="height: 100%;overflow:auto;overflow-x:hidden">
<!-- 预警信息 -->
<div>
<div class="item1">
<span class="dot">
<span class="dot-inner"></span>
</span>
<span
style="letter-spacing: 3px; color: #cddbe4; cursor: pointer"
>事件接报列表</span
>
</div>
<div style="width: 100%" v-for="item in receiveList">
<div class="el-form-div title-div">
<div v-if="item.status==1" style="width: 80%;margin-left: 5px;">未指派</div>
<div v-if="item.status==2" style="width: 80%;margin-left: 5px;">待处置</div>
<div v-if="item.status==3" style="width: 80%;margin-left: 5px;">已处置</div>
<div v-if="item.status==4" style="width: 80%;margin-left: 5px;">已完结</div>
<div style="height:30px;color: red;cursor:pointer;" v-if="userType==-2" @click="handleDelete(item.id)">取消事件</div>
</div>
<div class="content-div" style="margin-top: -5px;">事件名称:{{item.eventName}}</div>
<div class="content-div">发生时间:{{item.inforTime}}</div>
<div class="content-div">事件地点:{{item.address}}</div>
<div class="el-form-div">
<div v-if="item.status==3 && userType==-2" class="button-div" @click="endevent(item.id)">事件结案</div>
<div v-if="item.status==3 && userType==-2" class="button-div" @click="showList(item.id)" >预案指引</div>
<div v-if="item.status==1 && userType==-2" class="button-div" @click="assignTask(item)">任务指派</div>
<div v-if="userType!=-2" class="button-div" @click="showList(item.id)">信息处置</div>
</div>
</div>
</div>
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
<el-row v-if="userType!=-2" :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
>新增</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :data="handleList" >
<el-table-column label="处置信息" align="center" prop="management" />
<el-table-column label="处置附件" align="center" prop="managementEvent" width="150px">
<template slot-scope="scope">
<span
class="dbtn"
@click="checkFile(scope.row.managementEvent)"
v-if="scope.row.managementEvent != null && scope.row.managementEvent!=''"
>
<i class="el-icon el-icon-view"></i>查看/下载
</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="指导意见" align="center" prop="guidanceOpinion" />
<el-table-column label="指导方案" align="center" prop="planUrl" >
<template slot-scope="scope">
<span
class="dbtn"
@click="checkFile(scope.row.planUrl)"
v-if="scope.row.planUrl != null && scope.row.planUrl!=''"
>
<i class="el-icon el-icon-view"></i>查看/下载
</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="指导时间" align="center" prop="guidanceTime" width="180">
<!--<template slot-scope="scope">-->
<!--<span>{{ parseTime(scope.row.guidanceTime, '{y}-{m}-{d}') }}</span>-->
<!--</template>-->
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="100">
<template slot-scope="scope">
<!--<el-button-->
<!--size="mini"-->
<!--type="text"-->
<!--icon="el-icon-edit"-->
<!--@click="handleUpdate(scope.row)"-->
<!--v-hasPermi="['system:handle:edit']"-->
<!--&gt;修改</el-button>-->
<el-button
v-if="userType==-2"
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
>预案指引</el-button>
<el-button
v-if="userType!=-2"
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete2(scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams2.pageNum"
:limit.sync="queryParams2.pageSize"
@pagination="getHandleList"
/>
</el-dialog>
<!-- 添加或修改事件处置对话框 -->
<el-dialog :title="title2" :visible.sync="open2" width="550px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="处置信息" prop="management">
<el-input v-model="form.management" type="textarea" :disabled="readonly1" placeholder="请输入处置信息" />
</el-form-item>
<el-form-item label="指导意见" prop="guidanceOpinion" :style="display2">
<el-input v-model="form.guidanceOpinion" type="textarea" placeholder="请输入指导意见" />
</el-form-item>
<el-form-item label="应急预案" prop="planId" :style="display2">
<el-select v-model="form.planId" placeholder="请选择预案等级" @change="fananchange" >
<el-option
v-for = "dict in planInfoList"
:key = "dict.planId"
:label = "dict.planTitle"
:value = "dict.planId"
/>
</el-select>
</el-form-item>
<el-form-item label="处置附件" prop="managementEvent" :style="display">
<FileUpload
listType="picture"
@resFun="getFileInfo"
@remove="listRemove"
:fileArr="fileList"
/>
<el-input v-show="false" disabled v-model="form.managementEvent"></el-input>
<!--<el-input v-model="form.iconUrl" type="textarea" placeholder="请输入内容" />-->
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listReceive, getReceive, delReceive, addReceive, updateReceive } from "@/api/system/receive";
import { listHandle, getHandle, delHandle, addHandle, updateHandle, exportHandle } from "@/api/system/handle";
import { listPlanInfo } from "@/api/system/planInfo";
import { getUserProfile } from "@/api/system/user";
import FileUpload from '@/components/FileUpload';
let uploadfile = require("@/assets/uploadfile.png");
// 当不轮播时候的刷新时间
export default {
components: {
// RightPic,
FileUpload
},
data() {
return {
// 是否显示弹出层
open: false,
open2: false,
fileList:[],
receiveList:[],
userType:"",
readonly1:false,
display:"display:none",
display2:"",
//方案列表
planInfoList:[],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 100,
status:5,
enterpriseId:""
},
form:'',
// 遮罩层
loading: true,
title:"",
title2:"",
// 总条数
total: 0,
// 事件处置表格数据
handleList: [],
// 查询参数
queryParams2: {
pageNum: 1,
pageSize: 10,
eventId: null,
},
// 表单校验
rules: {
management: [
{ required: true, message: "请输入处置信息", trigger: "blur" },
],
}
};
},
mounted() {
// this.$nextTick(()=>{
// this.getScrollHeight();
// })
getUserProfile().then(response => {
this.userType = response.data.deptId;
if(this.userType!=-2){
this.queryParams.enterpriseId = response.data.deptId;
}
this.getList();
});
},
methods: {
/** 查询事件接报列表 */
getList() {
listReceive(this.queryParams).then(response => {
this.receiveList = response.rows;
//this.total = response.total;
console.log(this.receiveList)
});
},
//获取事件处置列表
getHandleList() {
this.loading = true;
listHandle(this.queryParams2).then(response => {
this.handleList = response.rows;
this.total = response.total;
this.loading = false;
});
},
showList(id) {
this.open = true;
this.title = "事件处置";
this.queryParams2.eventId= id
this.getHandleList();
},
choice(val) {
console.log(val)
this.getList();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.readonly1=false;
this.display="";
this.display2="display:none";
this.open2 = true;
this.title2 = "添加事件处置";
this.form.eventId = this.queryParams2.eventId
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
this.readonly1=true;
this.display="display:none";
this.display2="";
this.form = row;
this.open2 = true;
this.title2 = "预案指引";
this.yuanList();
},
yuanList(){
var params ={pageNum: 1,
pageSize: 1000};
listPlanInfo(params).then(response => {
this.planInfoList = response.rows;
});
},
fananchange(value){
let obj = {};
obj = this.planInfoList.find((item)=>{
return item.planId === value;
``});
this.form.planTitle = obj.planTitle;
this.form.planUrl = obj.iconUrl;
this.form.planId = value;
},
// 表单重置
reset() {
this.form = {
handleId: null,
eventId: null,
enterpriseId: null,
enterpriseName: null,
management: null,
managementEvent:null,
planId: null,
planTitle:'',
planUrl:'',
guidanceOpinion: null,
};
this.resetForm("form");
},
/** 提交按钮 处置信息*/
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.handleId != null) {
updateHandle(this.form).then(response => {
this.msgSuccess("修改成功");
this.open2 = false;
this.getHandleList();
});
} else {
addHandle(this.form).then(response => {
this.msgSuccess("新增成功");
this.open2 = false;
this.getHandleList();
this.upReceive(this.form.eventId);
});
}
}
});
},
upReceive(id){
var receiveform = {id:id,status:3}
updateReceive(receiveform).then(response => {
});
},
updateend(id){
var receiveform = {id:id,status:4}
updateReceive(receiveform).then(response => {
});
},
// 取消按钮
cancel() {
this.open2 = false;
this.reset();
},
endevent(id){
var that = this;
this.$confirm('是否确认事件结案?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return that.updateend(id);
}).then(() => {
this.getList();
this.msgSuccess("处理成功");
}).catch(() => {});
},
/** 删除按钮操作 */
handleDelete2(row) {
const handleIds = row.handleId || this.ids;
this.$confirm('是否确认删除事件处置数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delHandle(handleIds);
}).then(() => {
this.getHandleList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 删除按钮操作 */
handleDelete(id) {
this.$confirm('是否确认取消事件接报数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delReceive(id);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
assignTask(item){
this.$parent.handleUpdate(item);
},
//上传
getFileInfo(res){
//this.form.dealPlan = res.fileName;
this.form.managementEvent = res.url;
this.fileList.push({
name: res.fileName,
url: uploadfile,
});
},
listRemove(e) {
this.form.managementEvent = "";
this.fileList = [];
},
checkFile(url) {
window.open(url,'_blank');
},
},
};
</script>
<style lang="scss" scoped>
.item1 {
width: 93%;
height: 30px;
font-size: 18px;
line-height: 30px;
padding-left: 10px;
font-weight: 700;
font-style: italic;
margin-left: 10px;
background-image: linear-gradient(
to left,
#112238,
rgb(49 151 195 / 70%) 50%,
#112238
);
}
.dot {
display: inline-block;
position: relative;
width: 10px;
height: 10px;
background: rgb(30, 185, 190);
border-radius: 50%;
margin-right: 10px;
margin-left: 10px;
margin-bottom: 2px;
}
.dot-inner {
background: #44d7dc;
position: absolute;
top: 0;
left: 0;
box-sizing: border-box;
display: block;
width: 100%;
height: 100%;
border-radius: 50%;
-webkit-animation: vabDot 1.2s ease-in-out infinite;
animation: vabDot 1.2s ease-in-out infinite;
}
.content-div{
color: white;
font-size: 30;
height: 40px;
line-height: 50px;
margin-left: 10px;
}
.el-form-div{
display:flex;
flex-direction:row;
justify-content:flex-start;
width: 100%;
}
.button-div{
cursor:pointer;
color: #339CC9;
margin-bottom: 5px;
border-radius: 2px;
width: 100px;
border: 1px solid #339CC9;
height: 25px;
line-height: 25px;
text-align: center;
font-size: 15;
margin-left: 15%;
margin-top: 10px;
}
.title-div{
width: 100%;
margin-left: 10px;
border-left: 5px solid #e6a700;
border-bottom: 2px solid #1c84c6;
border-top: 1px solid #1c84c6;
height: 30px;
color: white;
line-height: 30px;
}
.test-5::-webkit-scrollbar {
/*滚动条整体样式*/
width : 10px; /*高宽分别对应横竖滚动条的尺寸*/
height: 1px;
}
.test-5::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius : 10px;
background-color: #1c84c6;
background-image: -webkit-linear-gradient(
45deg,
rgba(255, 255, 255, 0.2) 25%,
transparent 25%,
transparent 50%,
rgba(255, 255, 255, 0.2) 50%,
rgba(255, 255, 255, 0.2) 75%,
transparent 75%,
transparent
);
}
.dbtn {
display: inline-block;
line-height: normal;
padding-left: 2px;
padding-right: 2px;
cursor: pointer;
border-radius: 3px;
border-style: solid;
border-width: 0;
color: rgb(48, 180, 107);
}
.test-5::-webkit-scrollbar-track {
/*滚动条里面轨道*/
box-shadow : inset 0 0 5px rgba(0, 0, 0, 0.2);
background : #112238;
border-radius: 10px;
}
::v-deep .el-dialog:not(.is-fullscreen) {
margin-top: 13vh !important;
min-height: 500px;
}
</style>
......@@ -17,6 +17,8 @@ import "@/assets/styles/index.scss"; // global css
import "@/assets/styles/zehong.scss"; // zehong css
import "./assets/css/font.css";
import "./assets/styles/all.scss";
//燃气车辆信息页面表格
import "./assets/styles/gassVehiche.scss";
import App from "./App";
import store from "./store";
......
......@@ -31,6 +31,11 @@ export const svgUrl = {
6: require("@/assets/image/user1.svg"),
7: require("@/assets/image/zrxk.svg"),
8: require("@/assets/image/zcrq.svg"),
9: require("@/assets/image/car.png"),
10: require("@/assets/mapImages/mark02.png"),
11: require("@/assets/mapImages/mark03.png"),
12: require("@/assets/mapImages/mark04.png"),
13: require("@/assets/mapImages/mark01.png"),
};
export const svgAlarm = {
2: require("@/assets/mapImages/tyxAlarm.svg"),
......
/*
* @Author: your name
* @Date: 2022-01-11 13:45:12
* @LastEditTime: 2022-03-16 15:06:43
* @LastEditTime: 2022-03-21 08:57:08
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/utils/mapClass.js
......@@ -79,7 +79,7 @@ export class EditorMap {
// 获取朝阳区的边界信息
var bounds = result.districtList[0].boundaries;
var polygons = [];
console.log("boundsboundsboundsboundsbounds",bounds)
console.log("boundsboundsboundsboundsbounds", bounds);
if (bounds) {
for (var i = 0, l = bounds.length; i < l; i++) {
......@@ -97,7 +97,7 @@ export class EditorMap {
strokeWeight: 4,
strokeColor: "#09f",
path: bounds[i],
})
});
// polygons.push(polygon);
}
}
......@@ -407,6 +407,7 @@ export class EditorMap {
createMarker(MarkerOptions) {
return new AMap.Marker(MarkerOptions);
}
// 地图上add管道
addPipeLine(objData, component) {
const { path, pipePressure, iconType } = objData;
......@@ -670,4 +671,72 @@ export class EditorMap {
}
}
}
// 轨迹回放
/**
* @description:
* @param {*} vehicleId 设备id
* @param {*} path 轨迹回访率丼
* @return {*}
*/
backTrack(vehicleId, path) {
this.infowindowClose();
AMap.plugin("AMap.MoveAnimation", () => {
let marker = this.allDevice[9].filter(item => item.getExtData().vehicleId == vehicleId)[0];
// 绘制轨迹
marker.polyline = new AMap.Polyline({
map: this.map,
path,
showDir: true,
strokeColor: "#28F", //线颜色
// strokeOpacity: 1, //线透明度
strokeWeight: 6, //线宽
// strokeStyle: "solid" //线样式
});
marker.passedPolyline = new AMap.Polyline({
map: this.map,
strokeColor: "#AF5", //线颜色
strokeWeight: 6, //线宽
});
marker.on("moving", (e) => {
marker.passedPolyline.setPath(e.passedPath);
// this.map.setCenter(e.target.getPosition(), true);
});
marker.moveAlong(path , {
// 每一段的时长
duration: 8000,//可根据实际采集时间间隔设置
// JSAPI2.0 是否延道路自动设置角度在 moveAlong 里设置
autoRotation: true,
});
});
}
clearbackTrack(vehicleId) {
// let marker = this.allDevice[9].filter(
// (item) => item.getExtData().vehicleId == vehicleId
// )[0];
this.allDevice["9"]?.forEach(item=>{
if (item) {
// 停止运动
item.stopMove();
if(item.polyline){
this.map.remove(item.polyline);
}
if(item.passedPolyline){
this.map.remove(item.passedPolyline);
}
this.map.remove(item);
}
})
// 最后把数组清空
this.allDevice["9"]=[];
this.infowindowClose();
}
}
<!--
* @Author: your name
* @Date: 2022-01-11 13:44:17
* @LastEditTime: 2022-03-10 09:12:48
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/views/Home.vue
-->
<template>
<div class="home bigwindow">
<!--<div class="goSystem" @click="$router.push('/index')">进入管理系统</div>-->
<div id="map"></div>
<!-- <Center :show="show" :centerData="centerData" /> -->
<UserCenter
:title="centerTitle"
:show="userCenterShow"
ref="userCenter"
:detcetorList="detcetorList"
:userId="centerUserId"
:total="centerTotal"
:pageSize="20"
/>
<OtherCenter
:title="centerTitle"
:show="otherCenterShow"
ref="otherCenter"
:detcetorList="detcetorList"
:userId="centerUserId"
:total="centerTotal"
:pageSize="20"
/>
<PipeColor />
<!-- 底部按钮 -->
<div class="home-div">
<img src="@/assets/mapinages/bottombanner.png" alt="" style="" />
<div class="listingsSty fangy">
<div
@click="allCompany"
:class="selarr.length == companyLength ? 'active' : ''"
class="firsty"
>
全部
</div>
<div
class="firsty"
:class="selarr.indexOf(item.val) >= 0 ? 'active' : ''"
v-for="(item, index) in typeList"
:key="item.val"
@click="sel(index, item)"
>
{{ item.name }}
</div>
</div>
</div>
<div class="event_div" @click="handleAdd">
事件接报
</div>
<!-- 设备按钮 -->
<div class="typelist-div">
<div
class="list"
v-for="(item, index) in arr"
:key="index"
:class="selarr1.indexOf(item.val) >= 0 ? 'active' : ''"
@click="sel1(index, item)"
>
<img
:src="item.imgurl"
style="margin-top: 2px; float: left; margin-right: 3px"
/>
{{ item.name }}
</div>
</div>
<div class="typelist-div2">
<div
class="list"
style="width: 146px;height: 40px;line-height: 30px;margin-top: 1px;"
v-for="(item, index) in arr2"
:key="index"
:class="selarr1.indexOf(item.val) >= 0 ? 'active' : ''"
@click="sel1(index, item)"
>
<img
:src="item.imgurl"
style="margin-top: 3px; float: left; margin-right: 3px;width: 26px"
/>
{{ item.name }}
</div>
</div>
<!--&lt;!&ndash; 左边 &ndash;&gt;-->
<!--<div class="leftbar">-->
<!--<leftBar ref="mychild2"></leftBar>-->
<!--</div>-->
<!-- 右边 -->
<div class="rightbar">
<rightBar ref="mychild"></rightBar>
</div>
<!-- 添加或修改事件接报对话框 -->
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<div class="el-form-div">
<div style="width: 50%">
<el-form-item label="事件名称" prop="eventName">
<el-input v-model="form.eventName" :disabled="readonly" placeholder="请输入事件名称" />
</el-form-item>
<el-form-item label="事件类型" prop="eventType">
<el-select v-model="form.eventType" placeholder="请选择事件类型" style="width: 100%" :disabled="readonly">
<el-option
v-for="dict in eventTypeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="parseInt(dict.dictValue)"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="事件等级">
<el-radio-group v-model="form.eventGrade">
<el-radio
:disabled="readonly"
v-for="dict in eventGradeOptions"
:key="dict.dictValue"
:label="parseInt(dict.dictValue)"
>{{dict.dictLabel}}</el-radio>
</el-radio-group>
</el-form-item>
</div>
<div style="width: 50%">
<el-form-item label="报案人" prop="informant" >
<el-input v-model="form.informant" placeholder="请输入报案人" :disabled="readonly"/>
</el-form-item>
<el-form-item label="案发时间" prop="inforTime" >
<el-date-picker clearable size="small"
:disabled="readonly"
v-model="form.inforTime"
type="datetime"
style="width: 100%"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择报案时间">
</el-date-picker>
</el-form-item>
<el-form-item label="报案人电话" prop="informantPhone">
<el-input v-model="form.informantPhone" placeholder="请输入报案人电话" :disabled="readonly"/>
</el-form-item>
</div>
</div>
<el-form-item label="事发地点" prop="address">
<el-input v-model="form.address" placeholder="请输入事发地点" :disabled="readonly"/>
</el-form-item>
<el-form-item label="经度" prop="longitude">
<div class="el-form-div">
<el-input v-model="form.longitude" placeholder="请输入经度" style="width: 120px" :disabled="readonly"/>
<el-input v-model="form.latitude" placeholder="请输入纬度" style="width: 120px;margin-left: 10px;" :disabled="readonly"/>
<el-button type="primary" style="margin-left: 10px;" plain @click="MapdialogFun">选择经纬度</el-button>
</div>
</el-form-item>
<el-form-item label="事件描述" prop="describe">
<el-input v-model="form.describe" type="textarea" placeholder="请输入事件描述" :disabled="readonly"/>
</el-form-item>
<el-form-item label="所属企业" prop="enterpriseId">
<el-select v-model="form.enterpriseName" placeholder="请选择预案等级" @change="qiyechang" >
<el-option
v-for = "dict in enterpriseList"
:key = "dict.enterpriseId"
:label = "dict.enterpriseName"
:value = "dict.enterpriseId"
/>
</el-select>
<!--<el-input v-model="form.beyondEnterpriseId" placeholder="请输入所属企业" />-->
</el-form-item>
<!--<el-form-item label="指派公司id" prop="enterpriseId">-->
<!--<el-input v-model="form.enterpriseId" placeholder="请输入指派公司id" />-->
<!--</el-form-item>-->
<!--<el-form-item label="指派公司名称" prop="enterpriseName">-->
<!--<el-input v-model="form.enterpriseName" placeholder="请输入指派公司名称" />-->
<!--</el-form-item>-->
<el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" placeholder="请输入备注" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">确 定</el-button>
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<GetPos
:dialogVisible.sync="dialogTableVisible"
device=""
:devicePos="devicePos"
@close="dialogcancelFun"
@getPath="getPath"
/>
</div>
</template>
<script>
// @ is an alias to /src
import { EditorMap } from "@/utils/mapClass/map";
import { mapGetters, mapActions } from "vuex";
import { listDetectorInfo } from "@/api/detector/detectorInfo";
import { detectorUserList } from "@/api/detector/detectorUser";
import { listReceive, getReceive, delReceive, addReceive, updateReceive } from "@/api/system/receive";
import {
pipeData,
tiaoyaxiang,
famen,
changzhan,
jiankong,
user,
alarmtime,
} from "@/utils/mapClass/config.js";
import {
getPipe,
getTyx,
getFm,
getCz,
getVideo,
getUser,
getEnterprise,
userAlarm,
getTcqDevice,
} from "@/api/bigWindow/getDevice";
import { listDevice } from "@/api/system/device";
import Line from "@/components/bigWindow/Line.vue";
import VideoView from "@/components/bigWindow/VideoView.vue";
import Device from "@/components/bigWindow/Device.vue";
import Cz from "@/components/bigWindow/Cz.vue";
import User from "@/components/bigWindow/User.vue";
import UserCenter from "@/components/bigWindow/UserCenter.vue";
import OtherCenter from "@/components/bigWindow/OtherCenter.vue";
import Company from "@/components/bigWindow/Company.vue";
import PipeColor from "@/components/emergency/PipeColor.vue";
import GetPos from '@/components/GetPos';
import rightBar from "@/components/emergency/rightBar.vue";
import deviceMaterial from "@/components/emergency/deviceMaterial.vue";
export default {
name: "Home",
components: {
GetPos,
rightBar,
// Center,
UserCenter,
OtherCenter,
PipeColor,
deviceMaterial,
},
data() {
return {
// 是否显示弹出层
open: false,
// 事件类型 1水灾 2火灾 3突发字典
eventTypeOptions: [],
// 事件等级 1级 2级 3级字典
eventGradeOptions: [],
// 弹出层标题
title: "",
//选择经纬度
dialogTableVisible:false,
devicePos:[],
deviceList:[],
enterpriseList:[],
map: null,
show: false,
readonly:true,
// centerData: null,
selarr: [1, 2, 3],
weather: "",
lower: "",
higher: "",
nowDate: "",
nowweek: "",
nowtime: "", // 当前日期
typeList: [
{
val: 1,
name: "中燃翔科",
},
{
val: 2,
name: "中诚然气",
},
{
val: 3,
name: "中燃韵科",
},
],
// 2:"调压箱",
// 3:"阀门",
// 4:"厂站",
// 5:"监控",
// 6:"用户",
arr: [
{
val: 2,
ischeck: false,
imgurl: require("@/assets/image/tyxsub.svg"),
name: "调压箱",
},
{
val: 3,
ischeck: false,
imgurl: require("@/assets/image/fmjsub.svg"),
name: "阀门井",
},
{
val: 4,
ischeck: false,
imgurl: require("@/assets/image/czsub.svg"),
name: "场 站",
},
{
val: 6,
ischeck: false,
imgurl: require("@/assets/image/usersub.svg"),
name: "用 户",
},
{
val: 5,
ischeck: false,
imgurl: require("@/assets/image/jksub.svg"),
name: "监 控",
},
],
arr2: [
{
val: 10,
ischeck: false,
imgurl: require("@/assets/image/tyxsub.svg"),
name: "救援队伍",
},
{
val: 11,
ischeck: false,
imgurl: require("@/assets/image/fmjsub.svg"),
name: "救援物资",
},
{
val: 12,
ischeck: false,
imgurl: require("@/assets/image/czsub.svg"),
name: "救援车辆",
},
{
val: 13,
ischeck: false,
imgurl: require("@/assets/image/usersub.svg"),
name: "医 院",
},
],
selarr1: [],
// 用户的center数据
detcetorList: [],
centerUserId: null,
centerTotal: null,
userCenterShow: false,
centerTitle: "",
// 其他设备的center数据
// 除了这个值,用来显示隐藏,其他值与user共用
otherCenterShow: false,
// 报警轮询timer
alarmTimer: null,
// 表单参数
form: {},
// 表单校验
rules: {
eventName: [
{ required: true, message: "请输入事件名称", trigger: "blur" }
],
eventType: [
{ required: true, message: "请选择事件类型", trigger: "blur" }
],
informant: [
{ required: true, message: "请输入报案人", trigger: "blur" }
],
inforTime: [
{ required: true, message: "请输入案发时间", trigger: "blur" }
],
informantPhone: [
{ required: true, message: "请输入报案人电话", trigger: "blur" }
],
longitude: [
{ required: true, message: "请输入经纬度", trigger: "blur" }
],
}
};
},
computed: {
...mapGetters(["company", "systemSetting"]),
companyLength() {
return this.typeList.length;
},
},
watch: {
selarr(newValue) {
if (newValue.length == this.companyLength) {
// this.$refs.mychild2.choice(0);
}
},
},
created() {
//this.getList();
this.getDicts("event_type").then(response => {
this.eventTypeOptions = response.data;
});
this.getDicts("event_grade").then(response => {
this.eventGradeOptions = response.data;
});
},
async mounted() {
this.getList();
// console.log(99999999999999)
// getPipe().then(res=>{
// console.log("成功成功成功成功成功成功成功成功成功成功成功成功成功成功成功成功成功成功成功成功",res)
// }).catch(res=>{
// console.log(123)
// })
// return;
const path = eval(this.systemSetting.map_center);
this.map = new EditorMap(
"map",
{
center: path,
mapStyle: "amap://styles/f71d3a3d73e14f5b2bf5508bf1411758",
zoom: 14.5,
},
this
);
// 这是测试,用本地数据
if (this.systemSetting.prod_test === "test") {
this.addPipeLine(pipeData, Line);
this.addDevice(tiaoyaxiang, Device);
this.addDevice(famen, Device);
this.addDevice(changzhan, Cz);
this.addDevice(user, User);
this.addDevice(jiankong, VideoView);
} else {
// 调用状态管理器方法获取公司信息每次都要调取,因为每次进来都是更新的
this.GetCompany();
this.typeList = this.company.map((item) => ({
val: item.conpanyId,
name: item.companyName,
}));
var allarr = this.arr.concat(this.arr2);
this.selarr = this.company.map((item) => item.conpanyId);
this.selarr1 = allarr.map((item) => item.val);
this.arr.forEach((item) => (item.ischeck = true));
// getPipe() getTyx() getFm() getCz() getVideo() getUser()
await this.goMap(getEnterprise, this.addDevice, Company);
this.goMap(getPipe, this.addPipeLine, Line);
this.goMap(getTyx, this.addDevice, Device);
this.goMap(getFm, this.addDevice, Device);
this.goMap(getCz, this.addDevice, Cz);
this.goMap(getVideo, this.addDevice, VideoView);
// 用户要等一下 因为有报警数据
this.goMap(detectorUserList, this.addDevice, User).then((res) => {
// 先查一下,然后开启定时器
this.userAlarm();
this.alarmTimer = setInterval(() => {
this.userAlarm();
// console.log("查询报警");
}, alarmtime);
});
}
this.currentTime();
// this.$refs.mychild.choice(this.selarr);
// this.$refs.mychild2.choice(this.selarr);
},
methods: {
/** 查询应急设备列表 */
getList() {
var params = {
"pageNum": 1,
"pageSize": 1000
};
listDevice(params).then(response => {
response.rows.forEach((item) => {
item.iconType = item.deviceType+9;
});
this.deviceList = response.rows;
//console.log(this.deviceList)
this.addDevice({"data":this.deviceList},deviceMaterial)
this.arr2.forEach((item) => (item.ischeck = true));
});
},
/** 新增按钮操作 */
handleAdd() {
this.readonly=false;
this.reset();
this.open = true;
this.title = "添加事件接报";
},
qiyechang(value){
let obj = {};
obj = this.enterpriseList.find((item)=>{
return item.enterpriseId === value;
``});
this.form.enterpriseName = obj.enterpriseName;
this.form.enterpriseId = value;
},
/** 修改按钮操作 */
handleUpdate(row) {
this.readonly=true;
this.reset();
const id = row.id || this.ids
getReceive(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改事件接报";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
this.form.status = 2;
updateReceive(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.$refs.mychild.choice(0);
});
} else {
addReceive(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.$refs.mychild.choice(0);
});
}
}
});
},
//选择经纬度
MapdialogFun() {
this.dialogTableVisible = true;
},
dialogcancelFun() {
this.dialogTableVisible = false;
},
getPath(res){
console.log("res", res);
console.log(this.form.longitude, this.form.latitude);
//确认选择经纬度
this.form.longitude = res[0];
this.form.latitude = res[1];
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
eventName: null,
eventType: null,
eventGrade: 0,
address: null,
longitude: null,
latitude: null,
informant: null,
inforTime: null,
informantPhone: null,
describe: null,
enterpriseId: null,
enterpriseName: null,
remarks: null,
isDel: null,
createTime: null
};
this.resetForm("form");
},
...mapActions({
GetCompany: "bigWindowCompany/GetCompany",
}),
// 管道上图
addPipeLine(data, component) {
for (let comp in data) {
data[comp].forEach((pipe) => {
this.map.addPipeLine(pipe, component);
});
}
},
// 设备上图
addDevice(data, component) {
//console.log(data,data)
for (let comp in data) {
data[comp].forEach((pipe) => {
this.map.addDevice(pipe, component);
});
}
},
goMap(httpFunc, addFunc, component) {
return httpFunc().then((res) => {
// 给用户加icontype
if (res.data && !res.data[0].iconType) {
res.data.forEach((item) => {
item.iconType = 6;
});
}
if(httpFunc==getEnterprise){
//console.log("000000000",res.data)
this.enterpriseList= res.data;
}
// 根据数据格式不同,赋值不同,如果是个数组,就用res,如果不是就用res.data
let config = {};
if (Array.isArray(res)) {
config = { data: res };
// 给视频设备的conpanyType变成null,因为视频不受企业控制
if (res[0].iconType == 5) {
res.forEach((item) => {
item.companyType = null;
});
}
} else {
config = { data: res.data };
}
//console.log("======", config);
addFunc(config, component);
return config.iconType;
});
},
userAlarm() {
userAlarm().then((res) => {
console.log("报警", res.data);
if (res.data.length > 0) {
// 报警
res.data.forEach((item) => {
this.map.deviceAlarm(item);
});
// 看看谁告消警
}
this.map.relieveAlarm(res.data);
});
},
myCenterShow(boolean) {
this.show = boolean;
},
// centerDataFunc(centerData) {
// this.centerData = centerData;
// console.log(centerData);
// this.show = true;
// },
allCompany() {
if (this.selarr.length == this.companyLength) {
this.selarr = [];
} else {
this.selarr = this.company.map((item) => item.conpanyId);
}
// this.map.companyFilter(this.selarr);
this.map.allfilter(this.selarr, this.selarr1);
this.map.infowindowClose();
this.show = false;
},
sel(index, item) {
this.map.infowindowClose();
this.show = false;
const ind = this.selarr.indexOf(item.val);
if (ind >= 0) {
this.selarr.splice(ind, 1);
if (item.val == 3) {
// this.$refs.mychild.choice(1);
// this.$refs.mychild2.choice(1);
} else {
// this.$refs.mychild.choice(item.val + 1);
// this.$refs.mychild2.choice(item.val + 1);
}
} else {
this.selarr.push(item.val);
// this.$refs.mychild.choice(item.val);
// this.$refs.mychild2.choice(item.val);
}
// this.map.companyFilter(this.selarr);
this.map.allfilter(this.selarr, this.selarr1);
},
sel1(index, item) {
const ind = this.selarr1.indexOf(item.val);
if (ind >= 0) {
this.selarr1.splice(ind, 1);
} else {
this.selarr1.push(item.val);
}
this.map.allfilter(this.selarr, this.selarr1);
},
//用户的设备center
getDetectorInfoList(httpFunc, queryParams, title) {
console.log(queryParams);
return httpFunc(queryParams).then((res) => {
// console.log("queryParams", res);
if (res.code == 200) {
this.detcetorList = res.rows;
this.centerUserId = queryParams.userId;
// 总数据
this.centerTotal = res.total;
// this.$refs.userCenter.fade = "fade";
this.otherCenterShow = false;
this.userCenterShow = true;
this.centerTitle = title;
// 传递回去
return res.code;
}
});
},
// 调压箱,阀门,场站睇下的设备
getTcqDevice(queryParams, title) {
console.log(queryParams);
return getTcqDevice(queryParams).then((res) => {
// console.log("queryParams", res);
console.log("resresresresreszzzzzzzzzzzzzzz", res);
this.detcetorList = res;
this.centerUserId = queryParams.devId;
// 总数据
this.centerTotal = res.length;
// this.$refs.userCenter.fade = "fade";
this.userCenterShow = false;
this.otherCenterShow = true;
this.centerTitle = title;
// 传递回去
return res.code;
});
},
currentTime() {
setInterval(() => {
this.formatDate();
}, 1000);
},
formatDate() {
let date = new Date();
let year = date.getFullYear(); // 年
let month = date.getMonth() + 1; // 月
let day = date.getDate(); // 日
let week = date.getDay(); // 星期
let weekArr = [
"星期日",
"星期一",
"星期二",
"星期三",
"星期四",
"星期五",
"星期六",
];
let hour = date.getHours(); // 时
hour = hour < 10 ? "0" + hour : hour; // 如果只有一位,则前面补零
let minute = date.getMinutes(); // 分
minute = minute < 10 ? "0" + minute : minute; // 如果只有一位,则前面补零
let second = date.getSeconds(); // 秒
second = second < 10 ? "0" + second : second; // 如果只有一位,则前面补零
this.nowtime = `${hour}:${minute}:${second}`;
this.nowweek = `${weekArr[week]}`;
this.nowDate = `${year}${month}${day}`;
},
},
// 销毁定时器
beforeDestroy() {
if (this.formatDate) {
clearInterval(this.formatDate); // 在Vue实例销毁前,清除时间定时器
}
// 报警
if (this.alarmTimer) {
clearInterval(this.alarmTimer);
}
},
};
</script>
<style lang="scss" scoped>
.home {
position: relative;
height: calc(100vh - 50px);
}
.goSystem {
position: fixed;
z-index: 9999;
top: 50px;
right: 20px;
font-size: 14px;
color: #18baff;
cursor: pointer;
padding: 3px 5px;
border: 1px solid #339cc9;
color: #339cc9;
&:hover {
background-color: #053b6a;
color: #2cd5db;
}
}
#map {
position: absolute;
top: 0px;
bottom: 0;
width: 100%;
}
.banner-test {
width: 100%;
height: 85px;
position: relative;
top: 0;
z-index: 999;
}
.banner-test img {
width: 100%;
height: 100%;
}
.leftbar {
width: 450px;
height: 90%;
position: fixed;
top: 10%;
left: 0;
background: #112238;
}
.rightbar {
width: 470px;
height: 90%;
position: fixed;
top: 50px;
right: 0;
background: #112238;
}
.home-div {
width: 50%;
height: 70px;
position: fixed;
bottom: 0;
margin-left: 20%;
// z-index: 1000;
img {
width: 100%;
height: 100%;
position: absolute;
z-index: -1;
}
}
.event_div{
position: fixed;
margin-left: 20%;
z-index:999;
width: 100px;
height: 50px;
color: white;
background: #053b6a;
line-height: 50px;
bottom: 50px;
text-align: center;
cursor:pointer;
}
.listingsSty {
/* height: 25px; */
// position: fixed;
/* border: 1px solid #fff; */
margin-left: 25%;
width: 50%;
display: flex;
justify-content: space-between;
padding-top: 25px;
// font-family: 'arialbd';
}
.firsty {
// width: 15%;
min-width: 80px;
height: 35px;
text-align: center;
line-height: 35px;
/* border: 1px solid #fff; */
color: #fff;
font-size: 16px;
// float: left;
// margin-left: 8%;
cursor: pointer;
// font-family: 'arialbd';
}
.active {
color: #2ee7e7;
background: url(../../assets/mapinages/background.png);
background-repeat: no-repeat;
background-size: 100% 100%;
font-size: 18px;
/*position:relative;*/
/*&::after{
width: 80px;
height: 50px;
z-index: -1;
content: " ";
position: absolute;
top: -7px;
left: 50%;
margin-left:-40px;
background: url(/img/bac1.0ec28f27.png);
background-repeat: no-repeat;
background-size: 100% 100%;
background-position: center;
color: aquamarine;
}*/
}
.weather-icon {
float: left;
width: 30px !important;
height: 30px !important;
margin-top: 10px !important;
margin-left: 10px !important;
padding-right: 5px;
}
.tttt {
background-image: -webkit-linear-gradient(
bottom,
rgb(134, 185, 233),
#ffffff
);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.typelist-div {
width: 450px;
height: 50px;
z-index: 9999;
position: fixed;
top: 0;
margin-top: 80px;
right: 450px;
}
.typelist-div2{
width: 150px;
height: 50px;
z-index: 9999;
position: fixed;
margin-top: 80px;
margin-left: 10px;
}
.list {
z-index: 9999;
float: left;
margin-left: 15px;
color: #fff;
line-height: auto;
text-align: center;
background: linear-gradient(86deg, #112238 0%, #086187 62%, #112238 100%);
box-shadow: inset 0px 1px 2px 1px #125c9b;
font-size: 14px;
padding: 5px 7px;
cursor: pointer;
}
.list.active {
background: linear-gradient(86deg, #112238 0%, #32a3d3 62%, #112238 100%);
box-shadow: inset 0px 1px 2px 1px #125c9b;
color: #2ee7e7;
font-size: 14px;
}
.el-form-div{
display:flex;
flex-direction:row;
justify-content:flex-start;
justify-content:flex-start;
width: 100%;
}
::v-deep .el-dialog:not(.is-fullscreen) {
margin-top: 13vh !important;
}
</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%);
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%);
color: white;
/* 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: -35px;
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.carNum"
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="carNum" />
<!--<el-table-column label="品牌型号" align="center" prop="brandModel" />-->
<!--<el-table-column label="车辆类型" align="center" prop="vehicleType">-->
<!--<template slot-scope="scope">-->
<!--<span v-if="scope.row.vehicleType == '1'">罐车</span>-->
<!--<span v-if="scope.row.vehicleType == '2'">卡车</span>-->
<!--</template>-->
<!--</el-table-column>-->
<!--<el-table-column label="车辆载重" align="center" prop="vehicleLoad" />-->
<!--<el-table-column label="车辆大小" align="center" prop="vehicleSize" />-->
<!--<el-table-column label="车辆限乘" align="center" prop="vehicleLimt" />-->
<!--<el-table-column label="车辆检测信息" align="center" prop="vehicleInspect" />-->
<el-table-column label="所属企业" align="center" prop="beyondEnterpriseId" />
<el-table-column label="责任人" align="center" prop="personLiable" />
<el-table-column label="联系电话" align="center" prop="phone" width="120"/>
<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-view"
@click="getVehicleInfo(scope.row)"
v-hasPermi="['system:info:edit']"
>车辆信息</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-map-location"
@click="getVehicleTravel(scope.row)"
v-hasPermi="['system:info:remove']"
>车辆轨迹</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
@current-change="handleCurrentChangvale"
:page-size="queryParams.pageSize"
layout="prev, pager, next, jumper"
:total="total"
:hide-on-single-page="total <= queryParams.pageSize"
:key="total + '' + queryParams.pageSize"
/>
</div>
</drawer>
<div id="map"></div>
<!-- 查询车辆信息 -->
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
<el-form ref="form" :model="form" label-width="100px">
<el-row>
<el-col :span="11">
<el-form-item label="车牌号" prop="carNum">
<el-input v-model="form.carNum" placeholder="请输入车牌号" :disabled="true"/>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="品牌型号" prop="brandModel">
<el-input v-model="form.brandModel" placeholder="请输入品牌型号" :disabled="true"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="车辆类型" prop="vehicleType">
<el-input value="罐车" v-if="form.vehicleType == '1'" :disabled="true"/>
<el-input value="卡车" v-if="form.vehicleType == '2'" :disabled="true"/>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="车辆载重" prop="vehicleLoad">
<el-input v-model="form.vehicleLoad" placeholder="请输入车辆载重" :disabled="true"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="车辆大小" prop="vehicleSize">
<el-input v-model="form.vehicleSize" placeholder="请输入车辆大小" :disabled="true"/>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="车辆限乘" prop="vehicleLimt">
<el-input v-model="form.vehicleLimt" placeholder="请输入车辆限乘" :disabled="true"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="车辆检测信息" prop="vehicleInspect">
<el-input v-model="form.vehicleInspect" placeholder="请输入车辆检测信息" :disabled="true"/>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="所属企业" prop="beyondEnterpriseId">
<el-input v-model="form.beyondEnterpriseId" placeholder="请输入所属企业" :disabled="true"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="责任人" prop="personLiable">
<el-input v-model="form.personLiable" placeholder="请输入责任人" :disabled="true"/>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="联系电话" prop="phone">
<el-input v-model="form.phone" placeholder="请输入联系电话" :disabled="true"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<!-- <el-button type="primary" @click="submitForm">确 定</el-button>-->
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>
<!--值班人员轨迹回放-->
<el-dialog
title="车辆轨迹回放"
:visible.sync="backOpen"
>
<el-form :model="backForm" ref="backForm" :rules="rules" label-width="120px">
<el-row>
<el-col :span="10">
<el-form-item label="车牌号" prop="carNum">
<!--<span>{{ backForm.carNum }}</span>-->
<el-input v-model="backForm.carNum" :disabled="true"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col>
<el-form-item label="请选择时间段" prop="changeTime">
<el-radio-group v-model="backForm.changeTime" @change="radioChange">
<el-radio :label="1">最近2小时</el-radio>
<el-radio :label="2">最近24小时</el-radio>
<el-radio :label="3">自定义时间段</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="选择开始时间:" prop="beginTime">
<el-date-picker
:disabled="backForm.changeTime != 3"
v-model="backForm.beginTime"
type="datetime"
placeholder="选择开始时间"
>
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="选择结束时间:" prop="endTime">
<el-date-picker
:disabled="backForm.changeTime != 3"
v-model="backForm.endTime"
type="datetime"
placeholder="选择结束时间"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="searchLocations()">确 定</el-button>
<el-button @click="backOpen = false">取 消</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import { getLastLocation ,listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo } from "@/api/operationMonitor/vehicleInfo";
import { getVehicleLocations } from "@/api/operationMonitor/vehicleLocationInfo";
import MapCar from "./component/MapCar";
import { EditorMap } from "@/utils/mapClass/map";
import { mapGetters, mapActions } from "vuex";
import drawer from "./component/drawer";
import moment from "moment";
export default {
name: "vechicle",
components: {
drawer
},
data() {
return {
//地图
map: null,
drawerWidth: '600px',
// 遮罩层
loading: true,
// 总条数
total: 0,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
carNum: null,
brandModel: null,
vehicleType: null,
vehicleLoad: null,
vehicleSize: null,
vehicleLimt: null,
vehicleInspect: null,
beyondEnterpriseId: null,
personLiable: null,
phone: null,
isDel: null,
remarks: null
},
// 燃气车辆信息表格数据
infoList: [],
form: {},
// 是否显示弹出层
open: false,
// 弹出层标题
title: "",
//轨迹回放
backOpen: false,
backForm:{
changeTime: 1,
beginTime: "",
endTime: "",
carNum: "",
vehicleId: ""
},
rules: {
changeTime: [
{
required: true,
message: "选择查询时间",
trigger: ["blur", "change"],
},
],
beginTime: [
{ required: true, message: "请输入开始时间", trigger: "blur" },
],
endTime: [
{ required: true, message: "请输入结束时间", trigger: "blur" },
],
}
};
},
computed: {
...mapGetters(["company", "systemSetting"])
},
created() {
this.getList();
},
mounted(){
const path = eval(this.systemSetting.map_center);
this.map = new EditorMap(
"map",
{
center: path,
mapStyle: "amap://styles/f71d3a3d73e14f5b2bf5508bf1411758",
zoom: 14.5,
},
this
);
},
methods: {
/** 查询燃气车辆信息列表 */
getList(){
this.loading = true;
listInfo(this.queryParams).then(response => {
this.infoList = response.rows;
this.total = response.total;
this.loading = false;
});
},
/** 获取车辆信息操作 */
getVehicleInfo(row){
this.reset();
const vehicleId = row.vehicleId || this.ids
getInfo(vehicleId).then(response => {
this.form = response.data;
this.open = true;
this.title = "查看燃气车辆信息";
});
},
/**获取车辆轨迹操作*/
getVehicleTravel(row){
let param = {};
param.vehicleId = row.vehicleId;
this.backForm.vehicleId = row.vehicleId;
return getLastLocation(param).then(res =>{
if(res){
if(res.data.longitude && res.data.latitude){
res.data.iconType = 9;
res.data.count=1;
this.map.clearbackTrack(param.vehicleId)
this.map.addDevice(res.data,MapCar);
this.map.map.panTo([res.data.longitude, res.data.latitude]);
}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");
},
radioChange(e) {
if (e == 1) {
this.backForm.beginTime = moment()
.subtract(2, "h")
.format("YYYY-MM-DD HH:mm:ss");
this.backForm.endTime = moment().format("YYYY-MM-DD HH:mm:ss");
} else if (e == 2) {
this.backForm.beginTime = moment()
.subtract(1, "d")
.format("YYYY-MM-DD HH:mm:ss");
this.backForm.endTime = moment().format("YYYY-MM-DD HH:mm:ss");
} else {
this.backForm.beginTime = "";
this.backForm.endTime = "";
}
},
getCar(carNum){
this.backOpen=true;
this.backForm.carNum =carNum;
this.backForm.beginTime = moment().subtract(2, "h").format("YYYY-MM-DD HH:mm:ss");
this.backForm.endTime = moment().format("YYYY-MM-DD HH:mm:ss");
},
handleCurrentChangvale(val){
this.queryParams.pageNum = val;
this.getList();
},
carInfoSearch(){
this.queryParams.pageNum = 1;
this.getList();
},
resetQuery(){
this.queryParams.pageNum = 1;
this.queryParams.carNum = null;
this.getList();
},
searchLocations(){
this.$refs.backForm.validate(async (valid) => {
if (valid) {
if (
moment(this.backForm.beginTime).valueOf() >
moment(this.backForm.endTime).valueOf()
) {
this.msgError("开始时间不能大于结束时间");
this.backForm.endTime = "";
return;
}
if (this.backForm.changeTime != 3) {
this.radioChange(this.backForm.changeTime);
} else {
this.backForm.beginTime = moment(this.backForm.beginTime).format(
"YYYY-MM-DD HH:mm:ss"
);
this.backForm.endTime = moment(this.backForm.endTime).format(
"YYYY-MM-DD HH:mm:ss"
);
}
if(this.map.allDevice[9][0].getExtData().count>1){
this.map.clearbackTrack();
await this.getVehicleTravel({vehicleId:this.backForm.vehicleId});
}else{
this.map.allDevice[9][0].getExtData().count++
}
getVehicleLocations(this.backForm).then(res =>{
let paths = [];
if(res.data.length == 1){
this.$message({
message: '抱歉当前车辆只能查看位置信息,无法形成轨迹!',
type: 'warning'
});
}else if(res.data.length == 0){
this.$message({
message: '抱歉该时段未查到当前车辆轨迹信息!',
type: 'warning'
});
}else{
res.data.forEach(item => {
paths.push([item.longitude,item.latitude]);
})
this.map.backTrack(this.backForm.vehicleId,paths);
this.backOpen = false;
}
})
}
});
},
sleep (time) {
return new Promise((resolve) => setTimeout(resolve, time));
}
}
};
</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%;
width: 100%;
}
/*!* 表格最外边框 *!
.el-table --border, .el-table --group{
border: none;
}*/
.el-table{
background-color: #00afff !important;
}
</style>
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="项目年度" prop="projectYear">
<el-date-picker clearable size="small"
v-model="queryParams.projectYear"
type="year"
value-format="yyyy-MM-dd"
placeholder="选择工程项目年度">
</el-date-picker>
</el-form-item>
<el-form-item label="门站地址" prop="gateStationAddress">
<el-input
v-model="queryParams.gateStationAddress"
placeholder="请输入门站地址"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['project:info:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['project:info:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['project:info:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
:loading="exportLoading"
@click="handleExport"
v-hasPermi="['project:info:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="工程项目年度" align="center" prop="projectYear" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.projectYear, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="门站地址" align="center" prop="gateStationAddress" />
<el-table-column label="门站金额" align="center" prop="gateStationInvestment" />
<el-table-column label="门站数量" align="center" prop="numberGateStations" />
<el-table-column label="管道长度" align="center" prop="pipeLength" />
<el-table-column label="管道金额" align="center" prop="pipeInvestment" />
<el-table-column label="附件" align="center" prop="nearbyAddress">
<template slot-scope="scope">
<span
class="dbtn"
@click="checkFile(scope.row.nearbyAddress)"
v-if="scope.row.dealPlan != ''"
>
<i class="el-icon el-icon-view"></i>查看/下载
</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="备注" align="center" prop="remarks" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['project:info:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['project:info:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改工程项目信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="780px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-col :span="11">
<el-form-item label="项目年度" prop="projectYear">
<el-date-picker style="width: 100%"
v-model="form.projectYear"
type="year"
placeholder="选择年"
value-format="yyyy-MM-dd">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="门站地址" prop="gateStationAddress">
<el-input v-model="form.gateStationAddress" placeholder="请输入门站地址" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="门站数量" prop="numberGateStations">
<el-input @change="numberGateStations()" v-model="form.numberGateStations" placeholder="请输入门站数量" />
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="门站金额" prop="gateStationInvestment">
<el-input :disabled="isGateStationDisabled" v-model="form.gateStationInvestment" placeholder="请输入门站金额" >
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="管道长度" prop="pipeLength">
<el-input @change="conduitGateStations()" v-model="form.pipeLength" placeholder="请输入管道长度" />
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="管道金额" prop="pipeInvestment">
<el-input :disabled="isPipelineAmount" v-model="form.pipeInvestment" placeholder="请输入管道金额" >
<template slot="append"></template>
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="附件" prop="nearbyAddress">
<FileUpload
listType="picture"
@resFun="getFileInfo"
@remove="listRemove"
:fileArr="fileList"
/>
<el-input v-show="false" disabled v-model="form.nearbyAddress"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" type="textarea" placeholder="请输入备注" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listInfo, getInfo, delInfo, addInfo, updateInfo, exportInfo } from "@/api/regulation/project";
import FileUpload from '@/components/FileUpload';
export default {
name: "Info",
components: {
FileUpload,
},
data() {
return {
// 上传文件列表
fileList: [],
//门站金额输入框是否输入
isGateStationDisabled:true,
//管道金额输入框是否输入
isPipelineAmount:true,
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 工程项目信息表格数据
infoList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
projectYear: null,
gateStationAddress: null,
gateStationInvestment: null,
numberGateStations: null,
pipeLength: null,
pipeInvestment: null,
nearbyAddress: null,
remarks: null
},
// 表单参数
form: {},
// 表单校验
rules: {
projectYear: [
{ required: true, message: "请选择项目年度", trigger: "blur" },
]
}
};
},
created() {
this.getList();
},
methods: {
/**文件上传方法*/
getFileInfo(res){
this.form.dealPlan = res.fileName;
this.form.nearbyAddress = res.url;
this.fileList.push({
name: res.fileName,
url: uploadfile,
});
},
listRemove(e) {
this.form.dealPlan = "";
this.fileList = [];
},
checkFile(url) {
window.open(url,'_blank');
},
//门站数量输入框监听事件
numberGateStations(){
if (this.form.numberGateStations){
this.isGateStationDisabled=false;
}else {
this.isGateStationDisabled=true;
}
},
//管道数量输入框监听事件
conduitGateStations(){
if (this.form.pipeLength){
this.isPipelineAmount=false;
}else {
this.isPipelineAmount=true;
}
},
/** 查询工程项目信息列表 */
getList() {
this.loading = true;
listInfo(this.queryParams).then(response => {
this.infoList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
this.fileList = [];
},
// 表单重置
reset() {
this.form = {
projectId: null,
projectYear: null,
gateStationAddress: null,
gateStationInvestment: null,
numberGateStations: null,
pipeLength: null,
pipeInvestment: null,
nearbyAddress: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
isDel: null,
remarks: null
};
this.resetForm("form");
this.fileList = [];
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.projectId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
//门站金额输入框是否输入
this.isGateStationDisabled=true,
//管道金额输入框是否输入
this.isPipelineAmount=true,
this.reset();
this.open = true;
this.title = "添加工程项目信息";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const projectId = row.projectId || this.ids
getInfo(projectId).then(response => {
this.form = response.data;
//文件回显
if (this.form.nearbyAddress) {
this.fileList.push({
name: '附件',
url: this.form.nearbyAddress,
});
}
this.open = true;
this.title = "修改工程项目信息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.projectId != null) {
updateInfo(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
//循环查询出来的列表 与添加的年份是否有相同的
let is_identical = 0;
for (let i = 0; i < this.infoList.length; i++) {
if (this.infoList[i].projectYear == this.form.projectYear) {
is_identical = 1;
}
}
//如果有相同的年份 弹出提示框 是否进行覆盖
if (is_identical == 1) {
this.$confirm('查询到已存在' + this.form.projectYear + '年份的数据,继续创建会自动覆盖之前的数据,是否创建', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
addInfo(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
this.reset();
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消'
});
});
}else {
//没有年份相同的就执行添加方法
addInfo(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
this.reset();
});
}
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const projectIds = row.projectId || this.ids;
this.$confirm('是否确认删除工程项目信息编号为"' + projectIds + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delInfo(projectIds);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有工程项目信息数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportInfo(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>
<style>
.dbtn {
display: inline-block;
line-height: normal;
padding-left: 2px;
padding-right: 2px;
cursor: pointer;
border-radius: 3px;
border-style: solid;
border-width: 0;
color: rgb(48, 180, 107);
}
.dbtn:hover {
border-width: 1px;
border-color: rgb(48, 180, 107);
}
</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