Commit e3ea7958 authored by zhangjianqian's avatar zhangjianqian

Merge remote-tracking branch 'origin/master'

parents 72ac26fc e9348f82
......@@ -74,8 +74,8 @@ public class CommonController
// 上传文件路径
String filePath = GassafetyProgressConfig.getUploadPath();
// 上传并返回新文件名称
String fileName = FileUploadUtils.upload(filePath, file);
String url = serverConfig.getUrl() + fileName;
String fileName = file.getOriginalFilename();
String url = serverConfig.getUrl() + FileUploadUtils.upload(filePath, file);
AjaxResult ajax = AjaxResult.success();
ajax.put("fileName", fileName);
ajax.put("url", url);
......
package com.zehong.web.controller.operationMonitor;
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.TWorkOrder;
import com.zehong.system.service.ITWorkOrderService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 燃气任务Controller
*
* @author zehong
* @date 2022-02-10
*/
@RestController
@RequestMapping("/system/order")
public class TWorkOrderController extends BaseController
{
@Autowired
private ITWorkOrderService tWorkOrderService;
/**
* 查询燃气任务列表
*/
@PreAuthorize("@ss.hasPermi('system:order:list')")
@GetMapping("/list")
public TableDataInfo list(TWorkOrder tWorkOrder)
{
startPage();
List<TWorkOrder> list = tWorkOrderService.selectTWorkOrderList(tWorkOrder);
return getDataTable(list);
}
/**
* 导出燃气任务列表
*/
@PreAuthorize("@ss.hasPermi('system:order:export')")
@Log(title = "燃气任务", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TWorkOrder tWorkOrder)
{
List<TWorkOrder> list = tWorkOrderService.selectTWorkOrderList(tWorkOrder);
ExcelUtil<TWorkOrder> util = new ExcelUtil<TWorkOrder>(TWorkOrder.class);
return util.exportExcel(list, "燃气任务数据");
}
/**
* 获取燃气任务详细信息
*/
@PreAuthorize("@ss.hasPermi('system:order:query')")
@GetMapping(value = "/{workId}")
public AjaxResult getInfo(@PathVariable("workId") Long workId)
{
return AjaxResult.success(tWorkOrderService.selectTWorkOrderById(workId));
}
/**
* 新增燃气任务
*/
@PreAuthorize("@ss.hasPermi('system:order:add')")
@Log(title = "燃气任务", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TWorkOrder tWorkOrder)
{
return toAjax(tWorkOrderService.insertTWorkOrder(tWorkOrder));
}
/**
* 修改燃气任务
*/
@PreAuthorize("@ss.hasPermi('system:order:edit')")
@Log(title = "燃气任务", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TWorkOrder tWorkOrder)
{
return toAjax(tWorkOrderService.updateTWorkOrder(tWorkOrder));
}
/**
* 删除燃气任务
*/
@PreAuthorize("@ss.hasPermi('system:order:remove')")
@Log(title = "燃气任务", businessType = BusinessType.DELETE)
@DeleteMapping("/{workIds}")
public AjaxResult remove(@PathVariable Long[] workIds)
{
return toAjax(tWorkOrderService.deleteTWorkOrderByIds(workIds));
}
}
package com.zehong.web.controller.standingBook;
import java.util.List;
import com.zehong.system.domain.form.THiddenDangerStandingBookForm;
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.THiddenDangerStandingBook;
import com.zehong.system.service.ITHiddenDangerStandingBookService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 隐患整治台账Controller
*
* @author zehong
* @date 2022-02-09
*/
@RestController
@RequestMapping("/standingBook/hidden")
public class THiddenDangerStandingBookController extends BaseController
{
@Autowired
private ITHiddenDangerStandingBookService tHiddenDangerStandingBookService;
/**
* 查询隐患整治台账列表
*/
@PreAuthorize("@ss.hasPermi('standingBook:hidden:list')")
@GetMapping("/list")
public TableDataInfo list(THiddenDangerStandingBookForm tHiddenDangerStandingBook)
{
startPage();
List<THiddenDangerStandingBook> list = tHiddenDangerStandingBookService.selectTHiddenDangerStandingBookList(tHiddenDangerStandingBook);
return getDataTable(list);
}
/**
* 导出隐患整治台账列表
*/
@PreAuthorize("@ss.hasPermi('standingBook:hidden:export')")
@Log(title = "隐患整治台账", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(THiddenDangerStandingBookForm tHiddenDangerStandingBook)
{
List<THiddenDangerStandingBook> list = tHiddenDangerStandingBookService.selectTHiddenDangerStandingBookList(tHiddenDangerStandingBook);
ExcelUtil<THiddenDangerStandingBook> util = new ExcelUtil<THiddenDangerStandingBook>(THiddenDangerStandingBook.class);
return util.exportExcel(list, "隐患整治台账数据");
}
/**
* 获取隐患整治台账详细信息
*/
@PreAuthorize("@ss.hasPermi('standingBook:hidden:query')")
@GetMapping(value = "/{hiddenId}")
public AjaxResult getInfo(@PathVariable("hiddenId") Long hiddenId)
{
return AjaxResult.success(tHiddenDangerStandingBookService.selectTHiddenDangerStandingBookById(hiddenId));
}
/**
* 新增隐患整治台账
*/
@PreAuthorize("@ss.hasPermi('standingBook:hidden:add')")
@Log(title = "隐患整治台账", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody THiddenDangerStandingBook tHiddenDangerStandingBook)
{
return toAjax(tHiddenDangerStandingBookService.insertTHiddenDangerStandingBook(tHiddenDangerStandingBook));
}
/**
* 修改隐患整治台账
*/
@PreAuthorize("@ss.hasPermi('standingBook:hidden:edit')")
@Log(title = "隐患整治台账", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody THiddenDangerStandingBook tHiddenDangerStandingBook)
{
return toAjax(tHiddenDangerStandingBookService.updateTHiddenDangerStandingBook(tHiddenDangerStandingBook));
}
/**
* 删除隐患整治台账
*/
@PreAuthorize("@ss.hasPermi('standingBook:hidden:remove')")
@Log(title = "隐患整治台账", businessType = BusinessType.DELETE)
@DeleteMapping("/{hiddenIds}")
public AjaxResult remove(@PathVariable Long[] hiddenIds)
{
return toAjax(tHiddenDangerStandingBookService.deleteTHiddenDangerStandingBookByIds(hiddenIds));
}
}
package com.zehong.web.controller.standingBook;
import java.util.List;
import com.zehong.system.domain.form.TSafeEquipmentStandingBookForm;
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.TSafeEquipmentStandingBook;
import com.zehong.system.service.ITSafeEquipmentStandingBookService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 用户加装安全装置台账Controller
*
* @author zehong
* @date 2022-02-09
*/
@RestController
@RequestMapping("/standingBook/equipment")
public class TSafeEquipmentStandingBookController extends BaseController
{
@Autowired
private ITSafeEquipmentStandingBookService tSafeEquipmentStandingBookService;
/**
* 查询用户加装安全装置台账列表
*/
@PreAuthorize("@ss.hasPermi('standingBook:equipment:list')")
@GetMapping("/list")
public TableDataInfo list(TSafeEquipmentStandingBookForm tSafeEquipmentStandingBook)
{
startPage();
List<TSafeEquipmentStandingBook> list = tSafeEquipmentStandingBookService.selectTSafeEquipmentStandingBookList(tSafeEquipmentStandingBook);
return getDataTable(list);
}
/**
* 导出用户加装安全装置台账列表
*/
@PreAuthorize("@ss.hasPermi('standingBook:equipment:export')")
@Log(title = "用户加装安全装置台账", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TSafeEquipmentStandingBookForm tSafeEquipmentStandingBook)
{
List<TSafeEquipmentStandingBook> list = tSafeEquipmentStandingBookService.selectTSafeEquipmentStandingBookList(tSafeEquipmentStandingBook);
ExcelUtil<TSafeEquipmentStandingBook> util = new ExcelUtil<TSafeEquipmentStandingBook>(TSafeEquipmentStandingBook.class);
return util.exportExcel(list, "用户加装安全装置台账数据");
}
/**
* 获取用户加装安全装置台账详细信息
*/
@PreAuthorize("@ss.hasPermi('standingBook:equipment:query')")
@GetMapping(value = "/{safeEquipmentId}")
public AjaxResult getInfo(@PathVariable("safeEquipmentId") Long safeEquipmentId)
{
return AjaxResult.success(tSafeEquipmentStandingBookService.selectTSafeEquipmentStandingBookById(safeEquipmentId));
}
/**
* 新增用户加装安全装置台账
*/
@PreAuthorize("@ss.hasPermi('standingBook:equipment:add')")
@Log(title = "用户加装安全装置台账", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TSafeEquipmentStandingBook tSafeEquipmentStandingBook)
{
return toAjax(tSafeEquipmentStandingBookService.insertTSafeEquipmentStandingBook(tSafeEquipmentStandingBook));
}
/**
* 修改用户加装安全装置台账
*/
@PreAuthorize("@ss.hasPermi('standingBook:equipment:edit')")
@Log(title = "用户加装安全装置台账", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TSafeEquipmentStandingBook tSafeEquipmentStandingBook)
{
return toAjax(tSafeEquipmentStandingBookService.updateTSafeEquipmentStandingBook(tSafeEquipmentStandingBook));
}
/**
* 删除用户加装安全装置台账
*/
@PreAuthorize("@ss.hasPermi('standingBook:equipment:remove')")
@Log(title = "用户加装安全装置台账", businessType = BusinessType.DELETE)
@DeleteMapping("/{safeEquipmentIds}")
public AjaxResult remove(@PathVariable Long[] safeEquipmentIds)
{
return toAjax(tSafeEquipmentStandingBookService.deleteTSafeEquipmentStandingBookByIds(safeEquipmentIds));
}
}
package com.zehong.web.controller.standingBook;
import java.util.List;
import com.zehong.system.domain.form.TTroubleStandingBookForm;
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.TTroubleStandingBook;
import com.zehong.system.service.ITTroubleStandingBookService;
import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo;
/**
* 事故台账Controller
*
* @author zehong
* @date 2022-02-09
*/
@RestController
@RequestMapping("/standingBook/trouble")
public class TTroubleStandingBookController extends BaseController
{
@Autowired
private ITTroubleStandingBookService tTroubleStandingBookService;
/**
* 查询事故台账列表
*/
@PreAuthorize("@ss.hasPermi('standingBook:trouble:list')")
@GetMapping("/list")
public TableDataInfo list(TTroubleStandingBookForm tTroubleStandingBook)
{
startPage();
List<TTroubleStandingBook> list = tTroubleStandingBookService.selectTTroubleStandingBookList(tTroubleStandingBook);
return getDataTable(list);
}
/**
* 导出事故台账列表
*/
@PreAuthorize("@ss.hasPermi('standingBook:trouble:export')")
@Log(title = "事故台账", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(TTroubleStandingBookForm tTroubleStandingBook)
{
List<TTroubleStandingBook> list = tTroubleStandingBookService.selectTTroubleStandingBookList(tTroubleStandingBook);
ExcelUtil<TTroubleStandingBook> util = new ExcelUtil<TTroubleStandingBook>(TTroubleStandingBook.class);
return util.exportExcel(list, "事故台账数据");
}
/**
* 获取事故台账详细信息
*/
@PreAuthorize("@ss.hasPermi('standingBook:trouble:query')")
@GetMapping(value = "/{troubleId}")
public AjaxResult getInfo(@PathVariable("troubleId") Long troubleId)
{
return AjaxResult.success(tTroubleStandingBookService.selectTTroubleStandingBookById(troubleId));
}
/**
* 新增事故台账
*/
@PreAuthorize("@ss.hasPermi('standingBook:trouble:add')")
@Log(title = "事故台账", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody TTroubleStandingBook tTroubleStandingBook)
{
return toAjax(tTroubleStandingBookService.insertTTroubleStandingBook(tTroubleStandingBook));
}
/**
* 修改事故台账
*/
@PreAuthorize("@ss.hasPermi('standingBook:trouble:edit')")
@Log(title = "事故台账", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody TTroubleStandingBook tTroubleStandingBook)
{
return toAjax(tTroubleStandingBookService.updateTTroubleStandingBook(tTroubleStandingBook));
}
/**
* 删除事故台账
*/
@PreAuthorize("@ss.hasPermi('standingBook:trouble:remove')")
@Log(title = "事故台账", businessType = BusinessType.DELETE)
@DeleteMapping("/{troubleIds}")
public AjaxResult remove(@PathVariable Long[] troubleIds)
{
return toAjax(tTroubleStandingBookService.deleteTTroubleStandingBookByIds(troubleIds));
}
}
......@@ -22,6 +22,10 @@
<groupId>com.zehong</groupId>
<artifactId>gassafetyprogress-common</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
</dependencies>
......
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_hidden_danger_standing_book
*
* @author zehong
* @date 2022-02-09
*/
public class THiddenDangerStandingBook extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 隐患id */
private Long hiddenId;
/** 隐患名称 */
@Excel(name = "隐患名称")
private String hiddenTitle;
/** 隐患内容 */
@Excel(name = "隐患内容")
private String hiddenContent;
/** 隐患位置 */
@Excel(name = "隐患位置")
private String hiddenLocation;
/** 经度 */
private BigDecimal longitude;
/** 纬度 */
private BigDecimal latitude;
/** 隐患类型 */
@Excel(name = "隐患类型")
private String hiddenType;
/** 隐患发现人员 */
@Excel(name = "隐患发现人员")
private String hiddenFindPeople;
/** 发现时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "发现时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date hiddenFindDate;
/** 处理方案 */
@Excel(name = "处理方案")
private String dealPlan;
/** 方案路径 */
private String dealPlanUrl;
/** 整治情况 */
@Excel(name = "整治情况")
private String remediation;
/** 是否删除(0正常,1删除) */
@Excel(name = "是否删除(0正常,1删除)")
private String isDel;
/** 备注 */
@Excel(name = "备注")
private String remarks;
public void setHiddenId(Long hiddenId)
{
this.hiddenId = hiddenId;
}
public Long getHiddenId()
{
return hiddenId;
}
public void setHiddenTitle(String hiddenTitle)
{
this.hiddenTitle = hiddenTitle;
}
public String getHiddenTitle()
{
return hiddenTitle;
}
public void setHiddenContent(String hiddenContent)
{
this.hiddenContent = hiddenContent;
}
public String getHiddenContent()
{
return hiddenContent;
}
public void setHiddenLocation(String hiddenLocation)
{
this.hiddenLocation = hiddenLocation;
}
public String getHiddenLocation()
{
return hiddenLocation;
}
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 setHiddenType(String hiddenType)
{
this.hiddenType = hiddenType;
}
public String getHiddenType()
{
return hiddenType;
}
public void setHiddenFindPeople(String hiddenFindPeople)
{
this.hiddenFindPeople = hiddenFindPeople;
}
public String getHiddenFindPeople()
{
return hiddenFindPeople;
}
public void setHiddenFindDate(Date hiddenFindDate)
{
this.hiddenFindDate = hiddenFindDate;
}
public Date getHiddenFindDate()
{
return hiddenFindDate;
}
public void setDealPlan(String dealPlan)
{
this.dealPlan = dealPlan;
}
public String getDealPlan()
{
return dealPlan;
}
public String getDealPlanUrl() {
return dealPlanUrl;
}
public void setDealPlanUrl(String dealPlanUrl) {
this.dealPlanUrl = dealPlanUrl;
}
public void setRemediation(String remediation)
{
this.remediation = remediation;
}
public String getRemediation()
{
return remediation;
}
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("hiddenId", getHiddenId())
.append("hiddenTitle", getHiddenTitle())
.append("hiddenContent", getHiddenContent())
.append("hiddenLocation", getHiddenLocation())
.append("hiddenType", getHiddenType())
.append("hiddenFindPeople", getHiddenFindPeople())
.append("hiddenFindDate", getHiddenFindDate())
.append("dealPlan", getDealPlan())
.append("remediation", getRemediation())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("isDel", getIsDel())
.append("remarks", getRemarks())
.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_safe_equipment_standing_book
*
* @author zehong
* @date 2022-02-09
*/
public class TSafeEquipmentStandingBook extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 安全装置台账id */
private Long safeEquipmentId;
/** 用户名称 */
@Excel(name = "用户名称")
private String userName;
/** 用户编号 */
@Excel(name = "用户编号")
private String userNo;
/** 用户详细地址 */
@Excel(name = "用户详细地址")
private String userAddress;
/** 身份证号 */
@Excel(name = "身份证号")
private String idCard;
/** 联系电话 */
@Excel(name = "联系电话")
private String linkMobile;
/** 安装时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "安装时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date installTime;
/** 品牌名称 */
@Excel(name = "品牌名称")
private String brandName;
/** 是否删除(0正常,1删除) */
@Excel(name = "是否删除(0正常,1删除)")
private String isDel;
/** 备注 */
@Excel(name = "备注")
private String remarks;
public void setSafeEquipmentId(Long safeEquipmentId)
{
this.safeEquipmentId = safeEquipmentId;
}
public Long getSafeEquipmentId()
{
return safeEquipmentId;
}
public void setUserName(String userName)
{
this.userName = userName;
}
public String getUserName()
{
return userName;
}
public void setUserNo(String userNo)
{
this.userNo = userNo;
}
public String getUserNo()
{
return userNo;
}
public void setUserAddress(String userAddress)
{
this.userAddress = userAddress;
}
public String getUserAddress()
{
return userAddress;
}
public void setIdCard(String idCard)
{
this.idCard = idCard;
}
public String getIdCard()
{
return idCard;
}
public void setLinkMobile(String linkMobile)
{
this.linkMobile = linkMobile;
}
public String getLinkMobile()
{
return linkMobile;
}
public void setInstallTime(Date installTime)
{
this.installTime = installTime;
}
public Date getInstallTime()
{
return installTime;
}
public void setBrandName(String brandName)
{
this.brandName = brandName;
}
public String getBrandName()
{
return brandName;
}
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("safeEquipmentId", getSafeEquipmentId())
.append("userName", getUserName())
.append("userNo", getUserNo())
.append("userAddress", getUserAddress())
.append("idCard", getIdCard())
.append("linkMobile", getLinkMobile())
.append("installTime", getInstallTime())
.append("brandName", getBrandName())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.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_trouble_standing_book
*
* @author zehong
* @date 2022-02-09
*/
public class TTroubleStandingBook extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 事故id */
private Long troubleId;
/** 事故名称 */
@Excel(name = "事故名称")
private String troubleName;
/** 事故地点 */
@Excel(name = "事故地点")
private String troubleLocation;
/** 经度 */
private BigDecimal longitude;
/** 纬度 */
private BigDecimal latitude;
/** 事故类型:1.生产安全事故 2.非生产安全事故 */
@Excel(name = "事故类型:1.生产安全事故 2.非生产安全事故")
private String troubleType;
/** 简要经过 */
@Excel(name = "简要经过")
private String briefProcess;
/** 事故原因 */
@Excel(name = "事故原因")
private String troubleReason;
/** 责任单位 */
@Excel(name = "责任单位")
private String responsibleUnit;
/** 责任人员 */
@Excel(name = "责任人员")
private String responsiblePeople;
/** 是否处理:1.已处理 2.未处理 */
@Excel(name = "是否处理:1.已处理 2.未处理")
private String isDeal;
/** 处理完成时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "处理完成时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date dealDate;
/** 是否删除(0正常,1删除) */
@Excel(name = "是否删除(0正常,1删除)")
private String isDel;
/** 备注 */
@Excel(name = "备注")
private String remarks;
public void setTroubleId(Long troubleId)
{
this.troubleId = troubleId;
}
public Long getTroubleId()
{
return troubleId;
}
public void setTroubleName(String troubleName)
{
this.troubleName = troubleName;
}
public String getTroubleName()
{
return troubleName;
}
public void setTroubleLocation(String troubleLocation)
{
this.troubleLocation = troubleLocation;
}
public String getTroubleLocation()
{
return troubleLocation;
}
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 setTroubleType(String troubleType)
{
this.troubleType = troubleType;
}
public String getTroubleType()
{
return troubleType;
}
public void setBriefProcess(String briefProcess)
{
this.briefProcess = briefProcess;
}
public String getBriefProcess()
{
return briefProcess;
}
public void setTroubleReason(String troubleReason)
{
this.troubleReason = troubleReason;
}
public String getTroubleReason()
{
return troubleReason;
}
public void setResponsibleUnit(String responsibleUnit)
{
this.responsibleUnit = responsibleUnit;
}
public String getResponsibleUnit()
{
return responsibleUnit;
}
public void setResponsiblePeople(String responsiblePeople)
{
this.responsiblePeople = responsiblePeople;
}
public String getResponsiblePeople()
{
return responsiblePeople;
}
public void setIsDeal(String isDeal)
{
this.isDeal = isDeal;
}
public String getIsDeal()
{
return isDeal;
}
public void setDealDate(Date dealDate)
{
this.dealDate = dealDate;
}
public Date getDealDate()
{
return dealDate;
}
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("troubleId", getTroubleId())
.append("troubleName", getTroubleName())
.append("troubleLocation", getTroubleLocation())
.append("troubleType", getTroubleType())
.append("briefProcess", getBriefProcess())
.append("troubleReason", getTroubleReason())
.append("responsibleUnit", getResponsibleUnit())
.append("responsiblePeople", getResponsiblePeople())
.append("isDeal", getIsDeal())
.append("dealDate", getDealDate())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("isDel", getIsDel())
.append("remarks", getRemarks())
.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_work_order
*
* @author zehong
* @date 2022-02-10
*/
public class TWorkOrder extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 任务id */
private Long workId;
/** 任务标题 */
@Excel(name = "任务标题")
private String workTitle;
/** 任务类型:1.入户安检 2.巡检 3.报警巡查 4.其他 */
@Excel(name = "任务类型:1.入户安检 2.巡检 3.报警巡查 4.其他")
private String workType;
/** 任务内容 */
@Excel(name = "任务内容")
private String workContent;
/** 创建单位名称 */
@Excel(name = "创建单位名称")
private String workCreateEnterpriseName;
/** 创建单位id */
@Excel(name = "创建单位id")
private String workCreateEnterpriseId;
/** 指派单位名称 */
@Excel(name = "指派单位名称")
private String workAssignEnterproseName;
/** 指派单位id */
@Excel(name = "指派单位id")
private Long workAssignEnterproseId;
/** 指派人 */
@Excel(name = "指派人")
private Long workAssignManId;
/** 指派人id */
@Excel(name = "指派人id")
private String workAssignMan;
/** 任务状态:1.派发中 2.反馈 3.归档 */
@Excel(name = "任务状态:1.派发中 2.反馈 3.归档")
private String workStatus;
/** 巡检时间 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "巡检时间", width = 30, dateFormat = "yyyy-MM-dd")
private Date inspectionDate;
/** 巡检路线 */
@Excel(name = "巡检路线")
private String inspectionRoute;
/** 问题描述 */
@Excel(name = "问题描述")
private String problemDescription;
/** 图片路径 */
@Excel(name = "图片路径")
private String iconUrl;
/** 整改方案 */
@Excel(name = "整改方案")
private String rectificationPlan;
/** 整改结果 */
@Excel(name = "整改结果")
private String rectificationResult;
/** 责任单位 */
@Excel(name = "责任单位")
private String responsibleUnit;
/** 责任人员 */
@Excel(name = "责任人员")
private String responsiblePerson;
/** 截止日期 */
@JsonFormat(pattern = "yyyy-MM-dd")
@Excel(name = "截止日期", width = 30, dateFormat = "yyyy-MM-dd")
private Date expiryDate;
/** 是否删除(0正常,1删除) */
@Excel(name = "是否删除(0正常,1删除)")
private String isDel;
/** 备注 */
@Excel(name = "备注")
private String remarks;
public void setWorkId(Long workId)
{
this.workId = workId;
}
public Long getWorkId()
{
return workId;
}
public void setWorkTitle(String workTitle)
{
this.workTitle = workTitle;
}
public String getWorkTitle()
{
return workTitle;
}
public void setWorkType(String workType)
{
this.workType = workType;
}
public String getWorkType()
{
return workType;
}
public void setWorkContent(String workContent)
{
this.workContent = workContent;
}
public String getWorkContent()
{
return workContent;
}
public void setWorkCreateEnterpriseName(String workCreateEnterpriseName)
{
this.workCreateEnterpriseName = workCreateEnterpriseName;
}
public String getWorkCreateEnterpriseName()
{
return workCreateEnterpriseName;
}
public void setWorkCreateEnterpriseId(String workCreateEnterpriseId)
{
this.workCreateEnterpriseId = workCreateEnterpriseId;
}
public String getWorkCreateEnterpriseId()
{
return workCreateEnterpriseId;
}
public void setWorkAssignEnterproseName(String workAssignEnterproseName)
{
this.workAssignEnterproseName = workAssignEnterproseName;
}
public String getWorkAssignEnterproseName()
{
return workAssignEnterproseName;
}
public void setWorkAssignEnterproseId(Long workAssignEnterproseId)
{
this.workAssignEnterproseId = workAssignEnterproseId;
}
public Long getWorkAssignEnterproseId()
{
return workAssignEnterproseId;
}
public void setWorkAssignManId(Long workAssignManId)
{
this.workAssignManId = workAssignManId;
}
public Long getWorkAssignManId()
{
return workAssignManId;
}
public void setWorkAssignMan(String workAssignMan)
{
this.workAssignMan = workAssignMan;
}
public String getWorkAssignMan()
{
return workAssignMan;
}
public void setWorkStatus(String workStatus)
{
this.workStatus = workStatus;
}
public String getWorkStatus()
{
return workStatus;
}
public void setInspectionDate(Date inspectionDate)
{
this.inspectionDate = inspectionDate;
}
public Date getInspectionDate()
{
return inspectionDate;
}
public void setInspectionRoute(String inspectionRoute)
{
this.inspectionRoute = inspectionRoute;
}
public String getInspectionRoute()
{
return inspectionRoute;
}
public void setProblemDescription(String problemDescription)
{
this.problemDescription = problemDescription;
}
public String getProblemDescription()
{
return problemDescription;
}
public void setIconUrl(String iconUrl)
{
this.iconUrl = iconUrl;
}
public String getIconUrl()
{
return iconUrl;
}
public void setRectificationPlan(String rectificationPlan)
{
this.rectificationPlan = rectificationPlan;
}
public String getRectificationPlan()
{
return rectificationPlan;
}
public void setRectificationResult(String rectificationResult)
{
this.rectificationResult = rectificationResult;
}
public String getRectificationResult()
{
return rectificationResult;
}
public void setResponsibleUnit(String responsibleUnit)
{
this.responsibleUnit = responsibleUnit;
}
public String getResponsibleUnit()
{
return responsibleUnit;
}
public void setResponsiblePerson(String responsiblePerson)
{
this.responsiblePerson = responsiblePerson;
}
public String getResponsiblePerson()
{
return responsiblePerson;
}
public void setExpiryDate(Date expiryDate)
{
this.expiryDate = expiryDate;
}
public Date getExpiryDate()
{
return expiryDate;
}
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("workId", getWorkId())
.append("workTitle", getWorkTitle())
.append("workType", getWorkType())
.append("workContent", getWorkContent())
.append("workCreateEnterpriseName", getWorkCreateEnterpriseName())
.append("workCreateEnterpriseId", getWorkCreateEnterpriseId())
.append("workAssignEnterproseName", getWorkAssignEnterproseName())
.append("workAssignEnterproseId", getWorkAssignEnterproseId())
.append("workAssignManId", getWorkAssignManId())
.append("workAssignMan", getWorkAssignMan())
.append("workStatus", getWorkStatus())
.append("inspectionDate", getInspectionDate())
.append("inspectionRoute", getInspectionRoute())
.append("problemDescription", getProblemDescription())
.append("iconUrl", getIconUrl())
.append("rectificationPlan", getRectificationPlan())
.append("rectificationResult", getRectificationResult())
.append("responsibleUnit", getResponsibleUnit())
.append("responsiblePerson", getResponsiblePerson())
.append("expiryDate", getExpiryDate())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("isDel", getIsDel())
.append("remarks", getRemarks())
.toString();
}
}
package com.zehong.system.domain.form;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
/**
* 隐患整治台账对象 t_hidden_danger_standing_book
*
* @author zehong
* @date 2022-02-09
*/
@Data
public class THiddenDangerStandingBookForm
{
/** 隐患名称 */
private String hiddenTitle;
/** 隐患类型 */
private String hiddenType;
/** 发现起始时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date hiddenFindDateStart;
/** 发现截止时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date hiddenFindDateEnd;
}
package com.zehong.system.domain.form;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
/**
* 用户加装安全装置台账对象 t_safe_equipment_standing_book
*
* @author zehong
* @date 2022-02-09
*/
@Data
public class TSafeEquipmentStandingBookForm
{
/** 用户名称 */
private String userName;
/** 联系电话 */
private String linkMobile;
/** 安装起始时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date installTimeStart;
/** 安装截止时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date installTimeEnd;
}
package com.zehong.system.domain.form;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.util.Date;
/**
* 事故台账对象 t_trouble_standing_book
*
* @author zehong
* @date 2022-02-09
*/
@Data
public class TTroubleStandingBookForm
{
/** 事故名称 */
private String troubleName;
/** 事故类型:1.生产安全事故 2.非生产安全事故 */
private String troubleType;
/** 是否处理:1.已处理 2.未处理 */
private String isDeal;
/** 处理完成起始时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date dealDateStart;
/** 处理完成截止时间 */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date dealDateEnd;
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.THiddenDangerStandingBook;
import com.zehong.system.domain.form.THiddenDangerStandingBookForm;
/**
* 隐患整治台账Mapper接口
*
* @author zehong
* @date 2022-02-09
*/
public interface THiddenDangerStandingBookMapper
{
/**
* 查询隐患整治台账
*
* @param hiddenId 隐患整治台账ID
* @return 隐患整治台账
*/
public THiddenDangerStandingBook selectTHiddenDangerStandingBookById(Long hiddenId);
/**
* 查询隐患整治台账列表
*
* @param tHiddenDangerStandingBook 隐患整治台账
* @return 隐患整治台账集合
*/
public List<THiddenDangerStandingBook> selectTHiddenDangerStandingBookList(THiddenDangerStandingBookForm tHiddenDangerStandingBook);
/**
* 新增隐患整治台账
*
* @param tHiddenDangerStandingBook 隐患整治台账
* @return 结果
*/
public int insertTHiddenDangerStandingBook(THiddenDangerStandingBook tHiddenDangerStandingBook);
/**
* 修改隐患整治台账
*
* @param tHiddenDangerStandingBook 隐患整治台账
* @return 结果
*/
public int updateTHiddenDangerStandingBook(THiddenDangerStandingBook tHiddenDangerStandingBook);
/**
* 删除隐患整治台账
*
* @param hiddenId 隐患整治台账ID
* @return 结果
*/
public int deleteTHiddenDangerStandingBookById(Long hiddenId);
/**
* 批量删除隐患整治台账
*
* @param hiddenIds 需要删除的数据ID
* @return 结果
*/
public int deleteTHiddenDangerStandingBookByIds(Long[] hiddenIds);
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TSafeEquipmentStandingBook;
import com.zehong.system.domain.form.TSafeEquipmentStandingBookForm;
/**
* 用户加装安全装置台账Mapper接口
*
* @author zehong
* @date 2022-02-09
*/
public interface TSafeEquipmentStandingBookMapper
{
/**
* 查询用户加装安全装置台账
*
* @param safeEquipmentId 用户加装安全装置台账ID
* @return 用户加装安全装置台账
*/
public TSafeEquipmentStandingBook selectTSafeEquipmentStandingBookById(Long safeEquipmentId);
/**
* 查询用户加装安全装置台账列表
*
* @param tSafeEquipmentStandingBook 用户加装安全装置台账
* @return 用户加装安全装置台账集合
*/
public List<TSafeEquipmentStandingBook> selectTSafeEquipmentStandingBookList(TSafeEquipmentStandingBookForm tSafeEquipmentStandingBook);
/**
* 新增用户加装安全装置台账
*
* @param tSafeEquipmentStandingBook 用户加装安全装置台账
* @return 结果
*/
public int insertTSafeEquipmentStandingBook(TSafeEquipmentStandingBook tSafeEquipmentStandingBook);
/**
* 修改用户加装安全装置台账
*
* @param tSafeEquipmentStandingBook 用户加装安全装置台账
* @return 结果
*/
public int updateTSafeEquipmentStandingBook(TSafeEquipmentStandingBook tSafeEquipmentStandingBook);
/**
* 删除用户加装安全装置台账
*
* @param safeEquipmentId 用户加装安全装置台账ID
* @return 结果
*/
public int deleteTSafeEquipmentStandingBookById(Long safeEquipmentId);
/**
* 批量删除用户加装安全装置台账
*
* @param safeEquipmentIds 需要删除的数据ID
* @return 结果
*/
public int deleteTSafeEquipmentStandingBookByIds(Long[] safeEquipmentIds);
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TTroubleStandingBook;
import com.zehong.system.domain.form.TTroubleStandingBookForm;
/**
* 事故台账Mapper接口
*
* @author zehong
* @date 2022-02-09
*/
public interface TTroubleStandingBookMapper
{
/**
* 查询事故台账
*
* @param troubleId 事故台账ID
* @return 事故台账
*/
public TTroubleStandingBook selectTTroubleStandingBookById(Long troubleId);
/**
* 查询事故台账列表
*
* @param tTroubleStandingBook 事故台账
* @return 事故台账集合
*/
public List<TTroubleStandingBook> selectTTroubleStandingBookList(TTroubleStandingBookForm tTroubleStandingBook);
/**
* 新增事故台账
*
* @param tTroubleStandingBook 事故台账
* @return 结果
*/
public int insertTTroubleStandingBook(TTroubleStandingBook tTroubleStandingBook);
/**
* 修改事故台账
*
* @param tTroubleStandingBook 事故台账
* @return 结果
*/
public int updateTTroubleStandingBook(TTroubleStandingBook tTroubleStandingBook);
/**
* 删除事故台账
*
* @param troubleId 事故台账ID
* @return 结果
*/
public int deleteTTroubleStandingBookById(Long troubleId);
/**
* 批量删除事故台账
*
* @param troubleIds 需要删除的数据ID
* @return 结果
*/
public int deleteTTroubleStandingBookByIds(Long[] troubleIds);
}
package com.zehong.system.mapper;
import java.util.List;
import com.zehong.system.domain.TWorkOrder;
/**
* 燃气任务Mapper接口
*
* @author zehong
* @date 2022-02-10
*/
public interface TWorkOrderMapper
{
/**
* 查询燃气任务
*
* @param workId 燃气任务ID
* @return 燃气任务
*/
public TWorkOrder selectTWorkOrderById(Long workId);
/**
* 查询燃气任务列表
*
* @param tWorkOrder 燃气任务
* @return 燃气任务集合
*/
public List<TWorkOrder> selectTWorkOrderList(TWorkOrder tWorkOrder);
/**
* 新增燃气任务
*
* @param tWorkOrder 燃气任务
* @return 结果
*/
public int insertTWorkOrder(TWorkOrder tWorkOrder);
/**
* 修改燃气任务
*
* @param tWorkOrder 燃气任务
* @return 结果
*/
public int updateTWorkOrder(TWorkOrder tWorkOrder);
/**
* 删除燃气任务
*
* @param workId 燃气任务ID
* @return 结果
*/
public int deleteTWorkOrderById(Long workId);
/**
* 批量删除燃气任务
*
* @param workIds 需要删除的数据ID
* @return 结果
*/
public int deleteTWorkOrderByIds(Long[] workIds);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.THiddenDangerStandingBook;
import com.zehong.system.domain.form.THiddenDangerStandingBookForm;
/**
* 隐患整治台账Service接口
*
* @author zehong
* @date 2022-02-09
*/
public interface ITHiddenDangerStandingBookService
{
/**
* 查询隐患整治台账
*
* @param hiddenId 隐患整治台账ID
* @return 隐患整治台账
*/
public THiddenDangerStandingBook selectTHiddenDangerStandingBookById(Long hiddenId);
/**
* 查询隐患整治台账列表
*
* @param tHiddenDangerStandingBook 隐患整治台账
* @return 隐患整治台账集合
*/
public List<THiddenDangerStandingBook> selectTHiddenDangerStandingBookList(THiddenDangerStandingBookForm tHiddenDangerStandingBook);
/**
* 新增隐患整治台账
*
* @param tHiddenDangerStandingBook 隐患整治台账
* @return 结果
*/
public int insertTHiddenDangerStandingBook(THiddenDangerStandingBook tHiddenDangerStandingBook);
/**
* 修改隐患整治台账
*
* @param tHiddenDangerStandingBook 隐患整治台账
* @return 结果
*/
public int updateTHiddenDangerStandingBook(THiddenDangerStandingBook tHiddenDangerStandingBook);
/**
* 批量删除隐患整治台账
*
* @param hiddenIds 需要删除的隐患整治台账ID
* @return 结果
*/
public int deleteTHiddenDangerStandingBookByIds(Long[] hiddenIds);
/**
* 删除隐患整治台账信息
*
* @param hiddenId 隐患整治台账ID
* @return 结果
*/
public int deleteTHiddenDangerStandingBookById(Long hiddenId);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TSafeEquipmentStandingBook;
import com.zehong.system.domain.form.TSafeEquipmentStandingBookForm;
/**
* 用户加装安全装置台账Service接口
*
* @author zehong
* @date 2022-02-09
*/
public interface ITSafeEquipmentStandingBookService
{
/**
* 查询用户加装安全装置台账
*
* @param safeEquipmentId 用户加装安全装置台账ID
* @return 用户加装安全装置台账
*/
public TSafeEquipmentStandingBook selectTSafeEquipmentStandingBookById(Long safeEquipmentId);
/**
* 查询用户加装安全装置台账列表
*
* @param tSafeEquipmentStandingBook 用户加装安全装置台账
* @return 用户加装安全装置台账集合
*/
public List<TSafeEquipmentStandingBook> selectTSafeEquipmentStandingBookList(TSafeEquipmentStandingBookForm tSafeEquipmentStandingBook);
/**
* 新增用户加装安全装置台账
*
* @param tSafeEquipmentStandingBook 用户加装安全装置台账
* @return 结果
*/
public int insertTSafeEquipmentStandingBook(TSafeEquipmentStandingBook tSafeEquipmentStandingBook);
/**
* 修改用户加装安全装置台账
*
* @param tSafeEquipmentStandingBook 用户加装安全装置台账
* @return 结果
*/
public int updateTSafeEquipmentStandingBook(TSafeEquipmentStandingBook tSafeEquipmentStandingBook);
/**
* 批量删除用户加装安全装置台账
*
* @param safeEquipmentIds 需要删除的用户加装安全装置台账ID
* @return 结果
*/
public int deleteTSafeEquipmentStandingBookByIds(Long[] safeEquipmentIds);
/**
* 删除用户加装安全装置台账信息
*
* @param safeEquipmentId 用户加装安全装置台账ID
* @return 结果
*/
public int deleteTSafeEquipmentStandingBookById(Long safeEquipmentId);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TTroubleStandingBook;
import com.zehong.system.domain.form.TTroubleStandingBookForm;
/**
* 事故台账Service接口
*
* @author zehong
* @date 2022-02-09
*/
public interface ITTroubleStandingBookService
{
/**
* 查询事故台账
*
* @param troubleId 事故台账ID
* @return 事故台账
*/
public TTroubleStandingBook selectTTroubleStandingBookById(Long troubleId);
/**
* 查询事故台账列表
*
* @param tTroubleStandingBook 事故台账
* @return 事故台账集合
*/
public List<TTroubleStandingBook> selectTTroubleStandingBookList(TTroubleStandingBookForm tTroubleStandingBook);
/**
* 新增事故台账
*
* @param tTroubleStandingBook 事故台账
* @return 结果
*/
public int insertTTroubleStandingBook(TTroubleStandingBook tTroubleStandingBook);
/**
* 修改事故台账
*
* @param tTroubleStandingBook 事故台账
* @return 结果
*/
public int updateTTroubleStandingBook(TTroubleStandingBook tTroubleStandingBook);
/**
* 批量删除事故台账
*
* @param troubleIds 需要删除的事故台账ID
* @return 结果
*/
public int deleteTTroubleStandingBookByIds(Long[] troubleIds);
/**
* 删除事故台账信息
*
* @param troubleId 事故台账ID
* @return 结果
*/
public int deleteTTroubleStandingBookById(Long troubleId);
}
package com.zehong.system.service;
import java.util.List;
import com.zehong.system.domain.TWorkOrder;
/**
* 燃气任务Service接口
*
* @author zehong
* @date 2022-02-10
*/
public interface ITWorkOrderService
{
/**
* 查询燃气任务
*
* @param workId 燃气任务ID
* @return 燃气任务
*/
public TWorkOrder selectTWorkOrderById(Long workId);
/**
* 查询燃气任务列表
*
* @param tWorkOrder 燃气任务
* @return 燃气任务集合
*/
public List<TWorkOrder> selectTWorkOrderList(TWorkOrder tWorkOrder);
/**
* 新增燃气任务
*
* @param tWorkOrder 燃气任务
* @return 结果
*/
public int insertTWorkOrder(TWorkOrder tWorkOrder);
/**
* 修改燃气任务
*
* @param tWorkOrder 燃气任务
* @return 结果
*/
public int updateTWorkOrder(TWorkOrder tWorkOrder);
/**
* 批量删除燃气任务
*
* @param workIds 需要删除的燃气任务ID
* @return 结果
*/
public int deleteTWorkOrderByIds(Long[] workIds);
/**
* 删除燃气任务信息
*
* @param workId 燃气任务ID
* @return 结果
*/
public int deleteTWorkOrderById(Long workId);
}
package com.zehong.system.service.impl;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import com.zehong.system.domain.form.THiddenDangerStandingBookForm;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.THiddenDangerStandingBookMapper;
import com.zehong.system.domain.THiddenDangerStandingBook;
import com.zehong.system.service.ITHiddenDangerStandingBookService;
/**
* 隐患整治台账Service业务层处理
*
* @author zehong
* @date 2022-02-09
*/
@Service
public class THiddenDangerStandingBookServiceImpl implements ITHiddenDangerStandingBookService
{
@Autowired
private THiddenDangerStandingBookMapper tHiddenDangerStandingBookMapper;
/**
* 查询隐患整治台账
*
* @param hiddenId 隐患整治台账ID
* @return 隐患整治台账
*/
@Override
public THiddenDangerStandingBook selectTHiddenDangerStandingBookById(Long hiddenId)
{
return tHiddenDangerStandingBookMapper.selectTHiddenDangerStandingBookById(hiddenId);
}
/**
* 查询隐患整治台账列表
*
* @param tHiddenDangerStandingBook 隐患整治台账
* @return 隐患整治台账
*/
@Override
public List<THiddenDangerStandingBook> selectTHiddenDangerStandingBookList(THiddenDangerStandingBookForm tHiddenDangerStandingBook)
{
return tHiddenDangerStandingBookMapper.selectTHiddenDangerStandingBookList(tHiddenDangerStandingBook);
}
/**
* 新增隐患整治台账
*
* @param tHiddenDangerStandingBook 隐患整治台账
* @return 结果
*/
@Override
public int insertTHiddenDangerStandingBook(THiddenDangerStandingBook tHiddenDangerStandingBook)
{
tHiddenDangerStandingBook.setCreateTime(DateUtils.getNowDate());
return tHiddenDangerStandingBookMapper.insertTHiddenDangerStandingBook(tHiddenDangerStandingBook);
}
/**
* 修改隐患整治台账
*
* @param tHiddenDangerStandingBook 隐患整治台账
* @return 结果
*/
@Override
public int updateTHiddenDangerStandingBook(THiddenDangerStandingBook tHiddenDangerStandingBook)
{
tHiddenDangerStandingBook.setUpdateTime(DateUtils.getNowDate());
return tHiddenDangerStandingBookMapper.updateTHiddenDangerStandingBook(tHiddenDangerStandingBook);
}
/**
* 批量删除隐患整治台账
*
* @param hiddenIds 需要删除的隐患整治台账ID
* @return 结果
*/
@Override
public int deleteTHiddenDangerStandingBookByIds(Long[] hiddenIds)
{
return tHiddenDangerStandingBookMapper.deleteTHiddenDangerStandingBookByIds(hiddenIds);
}
/**
* 删除隐患整治台账信息
*
* @param hiddenId 隐患整治台账ID
* @return 结果
*/
@Override
public int deleteTHiddenDangerStandingBookById(Long hiddenId)
{
return tHiddenDangerStandingBookMapper.deleteTHiddenDangerStandingBookById(hiddenId);
}
}
package com.zehong.system.service.impl;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import com.zehong.system.domain.form.TSafeEquipmentStandingBookForm;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TSafeEquipmentStandingBookMapper;
import com.zehong.system.domain.TSafeEquipmentStandingBook;
import com.zehong.system.service.ITSafeEquipmentStandingBookService;
/**
* 用户加装安全装置台账Service业务层处理
*
* @author zehong
* @date 2022-02-09
*/
@Service
public class TSafeEquipmentStandingBookServiceImpl implements ITSafeEquipmentStandingBookService
{
@Autowired
private TSafeEquipmentStandingBookMapper tSafeEquipmentStandingBookMapper;
/**
* 查询用户加装安全装置台账
*
* @param safeEquipmentId 用户加装安全装置台账ID
* @return 用户加装安全装置台账
*/
@Override
public TSafeEquipmentStandingBook selectTSafeEquipmentStandingBookById(Long safeEquipmentId)
{
return tSafeEquipmentStandingBookMapper.selectTSafeEquipmentStandingBookById(safeEquipmentId);
}
/**
* 查询用户加装安全装置台账列表
*
* @param tSafeEquipmentStandingBook 用户加装安全装置台账
* @return 用户加装安全装置台账
*/
@Override
public List<TSafeEquipmentStandingBook> selectTSafeEquipmentStandingBookList(TSafeEquipmentStandingBookForm tSafeEquipmentStandingBook)
{
return tSafeEquipmentStandingBookMapper.selectTSafeEquipmentStandingBookList(tSafeEquipmentStandingBook);
}
/**
* 新增用户加装安全装置台账
*
* @param tSafeEquipmentStandingBook 用户加装安全装置台账
* @return 结果
*/
@Override
public int insertTSafeEquipmentStandingBook(TSafeEquipmentStandingBook tSafeEquipmentStandingBook)
{
tSafeEquipmentStandingBook.setCreateTime(DateUtils.getNowDate());
return tSafeEquipmentStandingBookMapper.insertTSafeEquipmentStandingBook(tSafeEquipmentStandingBook);
}
/**
* 修改用户加装安全装置台账
*
* @param tSafeEquipmentStandingBook 用户加装安全装置台账
* @return 结果
*/
@Override
public int updateTSafeEquipmentStandingBook(TSafeEquipmentStandingBook tSafeEquipmentStandingBook)
{
tSafeEquipmentStandingBook.setUpdateTime(DateUtils.getNowDate());
return tSafeEquipmentStandingBookMapper.updateTSafeEquipmentStandingBook(tSafeEquipmentStandingBook);
}
/**
* 批量删除用户加装安全装置台账
*
* @param safeEquipmentIds 需要删除的用户加装安全装置台账ID
* @return 结果
*/
@Override
public int deleteTSafeEquipmentStandingBookByIds(Long[] safeEquipmentIds)
{
return tSafeEquipmentStandingBookMapper.deleteTSafeEquipmentStandingBookByIds(safeEquipmentIds);
}
/**
* 删除用户加装安全装置台账信息
*
* @param safeEquipmentId 用户加装安全装置台账ID
* @return 结果
*/
@Override
public int deleteTSafeEquipmentStandingBookById(Long safeEquipmentId)
{
return tSafeEquipmentStandingBookMapper.deleteTSafeEquipmentStandingBookById(safeEquipmentId);
}
}
package com.zehong.system.service.impl;
import java.util.List;
import com.zehong.common.utils.DateUtils;
import com.zehong.system.domain.form.TTroubleStandingBookForm;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zehong.system.mapper.TTroubleStandingBookMapper;
import com.zehong.system.domain.TTroubleStandingBook;
import com.zehong.system.service.ITTroubleStandingBookService;
/**
* 事故台账Service业务层处理
*
* @author zehong
* @date 2022-02-09
*/
@Service
public class TTroubleStandingBookServiceImpl implements ITTroubleStandingBookService
{
@Autowired
private TTroubleStandingBookMapper tTroubleStandingBookMapper;
/**
* 查询事故台账
*
* @param troubleId 事故台账ID
* @return 事故台账
*/
@Override
public TTroubleStandingBook selectTTroubleStandingBookById(Long troubleId)
{
return tTroubleStandingBookMapper.selectTTroubleStandingBookById(troubleId);
}
/**
* 查询事故台账列表
*
* @param tTroubleStandingBook 事故台账
* @return 事故台账
*/
@Override
public List<TTroubleStandingBook> selectTTroubleStandingBookList(TTroubleStandingBookForm tTroubleStandingBook)
{
return tTroubleStandingBookMapper.selectTTroubleStandingBookList(tTroubleStandingBook);
}
/**
* 新增事故台账
*
* @param tTroubleStandingBook 事故台账
* @return 结果
*/
@Override
public int insertTTroubleStandingBook(TTroubleStandingBook tTroubleStandingBook)
{
tTroubleStandingBook.setCreateTime(DateUtils.getNowDate());
return tTroubleStandingBookMapper.insertTTroubleStandingBook(tTroubleStandingBook);
}
/**
* 修改事故台账
*
* @param tTroubleStandingBook 事故台账
* @return 结果
*/
@Override
public int updateTTroubleStandingBook(TTroubleStandingBook tTroubleStandingBook)
{
tTroubleStandingBook.setUpdateTime(DateUtils.getNowDate());
return tTroubleStandingBookMapper.updateTTroubleStandingBook(tTroubleStandingBook);
}
/**
* 批量删除事故台账
*
* @param troubleIds 需要删除的事故台账ID
* @return 结果
*/
@Override
public int deleteTTroubleStandingBookByIds(Long[] troubleIds)
{
return tTroubleStandingBookMapper.deleteTTroubleStandingBookByIds(troubleIds);
}
/**
* 删除事故台账信息
*
* @param troubleId 事故台账ID
* @return 结果
*/
@Override
public int deleteTTroubleStandingBookById(Long troubleId)
{
return tTroubleStandingBookMapper.deleteTTroubleStandingBookById(troubleId);
}
}
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.TWorkOrderMapper;
import com.zehong.system.domain.TWorkOrder;
import com.zehong.system.service.ITWorkOrderService;
/**
* 燃气任务Service业务层处理
*
* @author zehong
* @date 2022-02-10
*/
@Service
public class TWorkOrderServiceImpl implements ITWorkOrderService
{
@Autowired
private TWorkOrderMapper tWorkOrderMapper;
/**
* 查询燃气任务
*
* @param workId 燃气任务ID
* @return 燃气任务
*/
@Override
public TWorkOrder selectTWorkOrderById(Long workId)
{
return tWorkOrderMapper.selectTWorkOrderById(workId);
}
/**
* 查询燃气任务列表
*
* @param tWorkOrder 燃气任务
* @return 燃气任务
*/
@Override
public List<TWorkOrder> selectTWorkOrderList(TWorkOrder tWorkOrder)
{
return tWorkOrderMapper.selectTWorkOrderList(tWorkOrder);
}
/**
* 新增燃气任务
*
* @param tWorkOrder 燃气任务
* @return 结果
*/
@Override
public int insertTWorkOrder(TWorkOrder tWorkOrder)
{
tWorkOrder.setCreateTime(DateUtils.getNowDate());
return tWorkOrderMapper.insertTWorkOrder(tWorkOrder);
}
/**
* 修改燃气任务
*
* @param tWorkOrder 燃气任务
* @return 结果
*/
@Override
public int updateTWorkOrder(TWorkOrder tWorkOrder)
{
tWorkOrder.setUpdateTime(DateUtils.getNowDate());
return tWorkOrderMapper.updateTWorkOrder(tWorkOrder);
}
/**
* 批量删除燃气任务
*
* @param workIds 需要删除的燃气任务ID
* @return 结果
*/
@Override
public int deleteTWorkOrderByIds(Long[] workIds)
{
return tWorkOrderMapper.deleteTWorkOrderByIds(workIds);
}
/**
* 删除燃气任务信息
*
* @param workId 燃气任务ID
* @return 结果
*/
@Override
public int deleteTWorkOrderById(Long workId)
{
return tWorkOrderMapper.deleteTWorkOrderById(workId);
}
}
<?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.THiddenDangerStandingBookMapper">
<resultMap type="THiddenDangerStandingBook" id="THiddenDangerStandingBookResult">
<result property="hiddenId" column="hidden_id" />
<result property="hiddenTitle" column="hidden_title" />
<result property="hiddenContent" column="hidden_content" />
<result property="hiddenLocation" column="hidden_location" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="hiddenType" column="hidden_type" />
<result property="hiddenFindPeople" column="hidden_find_people" />
<result property="hiddenFindDate" column="hidden_find_date" />
<result property="dealPlan" column="deal_plan" />
<result property="dealPlanUrl" column="deal_plan_url" />
<result property="remediation" column="remediation" />
<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="selectTHiddenDangerStandingBookVo">
select hidden_id, hidden_title, hidden_content, hidden_location, longitude, latitude, hidden_type, hidden_find_people, hidden_find_date, deal_plan, deal_plan_url, remediation, create_by, create_time, update_by, update_time, is_del, remarks from t_hidden_danger_standing_book
</sql>
<select id="selectTHiddenDangerStandingBookList" parameterType="THiddenDangerStandingBookForm" resultMap="THiddenDangerStandingBookResult">
<include refid="selectTHiddenDangerStandingBookVo"/>
<where> is_del = '0'
<if test="hiddenTitle != null and hiddenTitle != ''"> and hidden_title like concat('%', #{hiddenTitle}, '%')</if>
<if test="hiddenType != null and hiddenType != ''"> and hidden_type = #{hiddenType}</if>
<if test="hiddenFindDateStart != null "> and hidden_find_date &gt;= #{hiddenFindDateStart}</if>
<if test="hiddenFindDateEnd != null "> and hidden_find_date &lt;= #{hiddenFindDateEnd}</if>
</where>
</select>
<select id="selectTHiddenDangerStandingBookById" parameterType="Long" resultMap="THiddenDangerStandingBookResult">
<include refid="selectTHiddenDangerStandingBookVo"/>
where hidden_id = #{hiddenId}
</select>
<insert id="insertTHiddenDangerStandingBook" parameterType="THiddenDangerStandingBook" useGeneratedKeys="true" keyProperty="hiddenId">
insert into t_hidden_danger_standing_book
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="hiddenTitle != null">hidden_title,</if>
<if test="hiddenContent != null">hidden_content,</if>
<if test="hiddenLocation != null">hidden_location,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="hiddenType != null">hidden_type,</if>
<if test="hiddenFindPeople != null">hidden_find_people,</if>
<if test="hiddenFindDate != null">hidden_find_date,</if>
<if test="dealPlan != null">deal_plan,</if>
<if test="dealPlanUrl != null">deal_plan_url,</if>
<if test="remediation != null">remediation,</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="hiddenTitle != null">#{hiddenTitle},</if>
<if test="hiddenContent != null">#{hiddenContent},</if>
<if test="hiddenLocation != null">#{hiddenLocation},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="hiddenType != null">#{hiddenType},</if>
<if test="hiddenFindPeople != null">#{hiddenFindPeople},</if>
<if test="hiddenFindDate != null">#{hiddenFindDate},</if>
<if test="dealPlan != null">#{dealPlan},</if>
<if test="dealPlanUrl != null">#{dealPlanUrl},</if>
<if test="remediation != null">#{remediation},</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="updateTHiddenDangerStandingBook" parameterType="THiddenDangerStandingBook">
update t_hidden_danger_standing_book
<trim prefix="SET" suffixOverrides=",">
<if test="hiddenTitle != null">hidden_title = #{hiddenTitle},</if>
<if test="hiddenContent != null">hidden_content = #{hiddenContent},</if>
<if test="hiddenLocation != null">hidden_location = #{hiddenLocation},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="hiddenType != null">hidden_type = #{hiddenType},</if>
<if test="hiddenFindPeople != null">hidden_find_people = #{hiddenFindPeople},</if>
<if test="hiddenFindDate != null">hidden_find_date = #{hiddenFindDate},</if>
<if test="dealPlan != null">deal_plan = #{dealPlan},</if>
<if test="dealPlanUrl != null">deal_plan_url = #{dealPlanUrl},</if>
<if test="remediation != null">remediation = #{remediation},</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 hidden_id = #{hiddenId}
</update>
<delete id="deleteTHiddenDangerStandingBookById" parameterType="Long">
delete from t_hidden_danger_standing_book where hidden_id = #{hiddenId}
</delete>
<delete id="deleteTHiddenDangerStandingBookByIds" parameterType="String">
delete from t_hidden_danger_standing_book where hidden_id in
<foreach item="hiddenId" collection="array" open="(" separator="," close=")">
#{hiddenId}
</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.TSafeEquipmentStandingBookMapper">
<resultMap type="TSafeEquipmentStandingBook" id="TSafeEquipmentStandingBookResult">
<result property="safeEquipmentId" column="safe_equipment_id" />
<result property="userName" column="user_name" />
<result property="userNo" column="user_no" />
<result property="userAddress" column="user_address" />
<result property="idCard" column="id_card" />
<result property="linkMobile" column="link_mobile" />
<result property="installTime" column="install_time" />
<result property="brandName" column="brand_name" />
<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="selectTSafeEquipmentStandingBookVo">
select safe_equipment_id, user_name, user_no, user_address, id_card, link_mobile, install_time, brand_name, create_by, create_time, update_by, update_time, is_del, remarks from t_safe_equipment_standing_book
</sql>
<select id="selectTSafeEquipmentStandingBookList" parameterType="TSafeEquipmentStandingBookForm" resultMap="TSafeEquipmentStandingBookResult">
<include refid="selectTSafeEquipmentStandingBookVo"/>
<where> is_del = '0'
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
<if test="linkMobile != null and linkMobile != ''"> and link_mobile like concat('%', #{linkMobile}, '%')</if>
<if test="installTimeStart != null "> and install_time &gt;= #{installTimeStart}</if>
<if test="installTimeEnd != null "> and install_time &lt;= #{installTimeEnd}</if>
</where>
</select>
<select id="selectTSafeEquipmentStandingBookById" parameterType="Long" resultMap="TSafeEquipmentStandingBookResult">
<include refid="selectTSafeEquipmentStandingBookVo"/>
where safe_equipment_id = #{safeEquipmentId}
</select>
<insert id="insertTSafeEquipmentStandingBook" parameterType="TSafeEquipmentStandingBook" useGeneratedKeys="true" keyProperty="safeEquipmentId">
insert into t_safe_equipment_standing_book
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userName != null">user_name,</if>
<if test="userNo != null">user_no,</if>
<if test="userAddress != null">user_address,</if>
<if test="idCard != null">id_card,</if>
<if test="linkMobile != null">link_mobile,</if>
<if test="installTime != null">install_time,</if>
<if test="brandName != null">brand_name,</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="userName != null">#{userName},</if>
<if test="userNo != null">#{userNo},</if>
<if test="userAddress != null">#{userAddress},</if>
<if test="idCard != null">#{idCard},</if>
<if test="linkMobile != null">#{linkMobile},</if>
<if test="installTime != null">#{installTime},</if>
<if test="brandName != null">#{brandName},</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="updateTSafeEquipmentStandingBook" parameterType="TSafeEquipmentStandingBook">
update t_safe_equipment_standing_book
<trim prefix="SET" suffixOverrides=",">
<if test="userName != null">user_name = #{userName},</if>
<if test="userNo != null">user_no = #{userNo},</if>
<if test="userAddress != null">user_address = #{userAddress},</if>
<if test="idCard != null">id_card = #{idCard},</if>
<if test="linkMobile != null">link_mobile = #{linkMobile},</if>
<if test="installTime != null">install_time = #{installTime},</if>
<if test="brandName != null">brand_name = #{brandName},</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 safe_equipment_id = #{safeEquipmentId}
</update>
<delete id="deleteTSafeEquipmentStandingBookById" parameterType="Long">
delete from t_safe_equipment_standing_book where safe_equipment_id = #{safeEquipmentId}
</delete>
<delete id="deleteTSafeEquipmentStandingBookByIds" parameterType="String">
delete from t_safe_equipment_standing_book where safe_equipment_id in
<foreach item="safeEquipmentId" collection="array" open="(" separator="," close=")">
#{safeEquipmentId}
</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.TTroubleStandingBookMapper">
<resultMap type="TTroubleStandingBook" id="TTroubleStandingBookResult">
<result property="troubleId" column="trouble_id" />
<result property="troubleName" column="trouble_name" />
<result property="troubleLocation" column="trouble_location" />
<result property="longitude" column="longitude" />
<result property="latitude" column="latitude" />
<result property="troubleType" column="trouble_type" />
<result property="briefProcess" column="brief_process" />
<result property="troubleReason" column="trouble_reason" />
<result property="responsibleUnit" column="responsible_unit" />
<result property="responsiblePeople" column="responsible_people" />
<result property="isDeal" column="is_deal" />
<result property="dealDate" column="deal_date" />
<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="selectTTroubleStandingBookVo">
select trouble_id, trouble_name, trouble_location, longitude, latitude, trouble_type, brief_process, trouble_reason, responsible_unit, responsible_people, is_deal, deal_date, create_by, create_time, update_by, update_time, is_del, remarks from t_trouble_standing_book
</sql>
<select id="selectTTroubleStandingBookList" parameterType="TTroubleStandingBookForm" resultMap="TTroubleStandingBookResult">
<include refid="selectTTroubleStandingBookVo"/>
<where> is_del = '0'
<if test="troubleName != null and troubleName != ''"> and trouble_name like concat('%', #{troubleName}, '%')</if>
<if test="troubleType != null and troubleType != ''"> and trouble_type = #{troubleType}</if>
<if test="isDeal != null and isDeal != ''"> and is_deal = #{isDeal}</if>
<if test="dealDateStart != null "> and deal_date &gt;= #{dealDateStart}</if>
<if test="dealDateEnd != null "> and deal_date &lt;= #{dealDateEnd}</if>
</where>
</select>
<select id="selectTTroubleStandingBookById" parameterType="Long" resultMap="TTroubleStandingBookResult">
<include refid="selectTTroubleStandingBookVo"/>
where trouble_id = #{troubleId}
</select>
<insert id="insertTTroubleStandingBook" parameterType="TTroubleStandingBook" useGeneratedKeys="true" keyProperty="troubleId">
insert into t_trouble_standing_book
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="troubleName != null">trouble_name,</if>
<if test="troubleLocation != null">trouble_location,</if>
<if test="longitude != null">longitude,</if>
<if test="latitude != null">latitude,</if>
<if test="troubleType != null">trouble_type,</if>
<if test="briefProcess != null">brief_process,</if>
<if test="troubleReason != null">trouble_reason,</if>
<if test="responsibleUnit != null">responsible_unit,</if>
<if test="responsiblePeople != null">responsible_people,</if>
<if test="isDeal != null">is_deal,</if>
<if test="dealDate != null">deal_date,</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="troubleName != null">#{troubleName},</if>
<if test="troubleLocation != null">#{troubleLocation},</if>
<if test="longitude != null">#{longitude},</if>
<if test="latitude != null">#{latitude},</if>
<if test="troubleType != null">#{troubleType},</if>
<if test="briefProcess != null">#{briefProcess},</if>
<if test="troubleReason != null">#{troubleReason},</if>
<if test="responsibleUnit != null">#{responsibleUnit},</if>
<if test="responsiblePeople != null">#{responsiblePeople},</if>
<if test="isDeal != null">#{isDeal},</if>
<if test="dealDate != null">#{dealDate},</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="updateTTroubleStandingBook" parameterType="TTroubleStandingBook">
update t_trouble_standing_book
<trim prefix="SET" suffixOverrides=",">
<if test="troubleName != null">trouble_name = #{troubleName},</if>
<if test="troubleLocation != null">trouble_location = #{troubleLocation},</if>
<if test="longitude != null">longitude = #{longitude},</if>
<if test="latitude != null">latitude = #{latitude},</if>
<if test="troubleType != null">trouble_type = #{troubleType},</if>
<if test="briefProcess != null">brief_process = #{briefProcess},</if>
<if test="troubleReason != null">trouble_reason = #{troubleReason},</if>
<if test="responsibleUnit != null">responsible_unit = #{responsibleUnit},</if>
<if test="responsiblePeople != null">responsible_people = #{responsiblePeople},</if>
<if test="isDeal != null">is_deal = #{isDeal},</if>
<if test="dealDate != null">deal_date = #{dealDate},</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 trouble_id = #{troubleId}
</update>
<delete id="deleteTTroubleStandingBookById" parameterType="Long">
delete from t_trouble_standing_book where trouble_id = #{troubleId}
</delete>
<delete id="deleteTTroubleStandingBookByIds" parameterType="String">
delete from t_trouble_standing_book where trouble_id in
<foreach item="troubleId" collection="array" open="(" separator="," close=")">
#{troubleId}
</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.TWorkOrderMapper">
<resultMap type="TWorkOrder" id="TWorkOrderResult">
<result property="workId" column="work_id" />
<result property="workTitle" column="work_title" />
<result property="workType" column="work_type" />
<result property="workContent" column="work_content" />
<result property="workCreateEnterpriseName" column="work_create_enterprise_name" />
<result property="workCreateEnterpriseId" column="work_create_enterprise_id" />
<result property="workAssignEnterproseName" column="work_assign_enterprose_name" />
<result property="workAssignEnterproseId" column="work_assign_enterprose_id" />
<result property="workAssignManId" column="work_assign_man_id" />
<result property="workAssignMan" column="work_assign_man" />
<result property="workStatus" column="work_status" />
<result property="inspectionDate" column="inspection_date" />
<result property="inspectionRoute" column="inspection_route" />
<result property="problemDescription" column="problem_description" />
<result property="iconUrl" column="icon_url" />
<result property="rectificationPlan" column="rectification_plan" />
<result property="rectificationResult" column="rectification_result" />
<result property="responsibleUnit" column="responsible_unit" />
<result property="responsiblePerson" column="responsible_person" />
<result property="expiryDate" column="expiry_date" />
<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="selectTWorkOrderVo">
select work_id, work_title, work_type, work_content, work_create_enterprise_name, work_create_enterprise_id, work_assign_enterprose_name, work_assign_enterprose_id, work_assign_man_id, work_assign_man, work_status, inspection_date, inspection_route, problem_description, icon_url, rectification_plan, rectification_result, responsible_unit, responsible_person, expiry_date, create_by, create_time, update_by, update_time, is_del, remarks from t_work_order
</sql>
<select id="selectTWorkOrderList" parameterType="TWorkOrder" resultMap="TWorkOrderResult">
<include refid="selectTWorkOrderVo"/>
<where>
<if test="workTitle != null and workTitle != ''"> and work_title = #{workTitle}</if>
<if test="workType != null and workType != ''"> and work_type = #{workType}</if>
<if test="workContent != null and workContent != ''"> and work_content = #{workContent}</if>
<if test="workCreateEnterpriseName != null and workCreateEnterpriseName != ''"> and work_create_enterprise_name like concat('%', #{workCreateEnterpriseName}, '%')</if>
<if test="workCreateEnterpriseId != null and workCreateEnterpriseId != ''"> and work_create_enterprise_id = #{workCreateEnterpriseId}</if>
<if test="workAssignEnterproseName != null and workAssignEnterproseName != ''"> and work_assign_enterprose_name like concat('%', #{workAssignEnterproseName}, '%')</if>
<if test="workAssignEnterproseId != null "> and work_assign_enterprose_id = #{workAssignEnterproseId}</if>
<if test="workAssignManId != null "> and work_assign_man_id = #{workAssignManId}</if>
<if test="workAssignMan != null and workAssignMan != ''"> and work_assign_man = #{workAssignMan}</if>
<if test="workStatus != null and workStatus != ''"> and work_status = #{workStatus}</if>
<if test="inspectionDate != null "> and inspection_date = #{inspectionDate}</if>
<if test="inspectionRoute != null and inspectionRoute != ''"> and inspection_route = #{inspectionRoute}</if>
<if test="problemDescription != null and problemDescription != ''"> and problem_description = #{problemDescription}</if>
<if test="iconUrl != null and iconUrl != ''"> and icon_url = #{iconUrl}</if>
<if test="rectificationPlan != null and rectificationPlan != ''"> and rectification_plan = #{rectificationPlan}</if>
<if test="rectificationResult != null and rectificationResult != ''"> and rectification_result = #{rectificationResult}</if>
<if test="responsibleUnit != null and responsibleUnit != ''"> and responsible_unit = #{responsibleUnit}</if>
<if test="responsiblePerson != null and responsiblePerson != ''"> and responsible_person = #{responsiblePerson}</if>
<if test="expiryDate != null "> and expiry_date = #{expiryDate}</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="selectTWorkOrderById" parameterType="Long" resultMap="TWorkOrderResult">
<include refid="selectTWorkOrderVo"/>
where work_id = #{workId}
</select>
<insert id="insertTWorkOrder" parameterType="TWorkOrder" useGeneratedKeys="true" keyProperty="workId">
insert into t_work_order
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="workTitle != null">work_title,</if>
<if test="workType != null">work_type,</if>
<if test="workContent != null">work_content,</if>
<if test="workCreateEnterpriseName != null">work_create_enterprise_name,</if>
<if test="workCreateEnterpriseId != null">work_create_enterprise_id,</if>
<if test="workAssignEnterproseName != null">work_assign_enterprose_name,</if>
<if test="workAssignEnterproseId != null">work_assign_enterprose_id,</if>
<if test="workAssignManId != null">work_assign_man_id,</if>
<if test="workAssignMan != null">work_assign_man,</if>
<if test="workStatus != null">work_status,</if>
<if test="inspectionDate != null">inspection_date,</if>
<if test="inspectionRoute != null">inspection_route,</if>
<if test="problemDescription != null">problem_description,</if>
<if test="iconUrl != null">icon_url,</if>
<if test="rectificationPlan != null">rectification_plan,</if>
<if test="rectificationResult != null">rectification_result,</if>
<if test="responsibleUnit != null">responsible_unit,</if>
<if test="responsiblePerson != null">responsible_person,</if>
<if test="expiryDate != null">expiry_date,</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="workTitle != null">#{workTitle},</if>
<if test="workType != null">#{workType},</if>
<if test="workContent != null">#{workContent},</if>
<if test="workCreateEnterpriseName != null">#{workCreateEnterpriseName},</if>
<if test="workCreateEnterpriseId != null">#{workCreateEnterpriseId},</if>
<if test="workAssignEnterproseName != null">#{workAssignEnterproseName},</if>
<if test="workAssignEnterproseId != null">#{workAssignEnterproseId},</if>
<if test="workAssignManId != null">#{workAssignManId},</if>
<if test="workAssignMan != null">#{workAssignMan},</if>
<if test="workStatus != null">#{workStatus},</if>
<if test="inspectionDate != null">#{inspectionDate},</if>
<if test="inspectionRoute != null">#{inspectionRoute},</if>
<if test="problemDescription != null">#{problemDescription},</if>
<if test="iconUrl != null">#{iconUrl},</if>
<if test="rectificationPlan != null">#{rectificationPlan},</if>
<if test="rectificationResult != null">#{rectificationResult},</if>
<if test="responsibleUnit != null">#{responsibleUnit},</if>
<if test="responsiblePerson != null">#{responsiblePerson},</if>
<if test="expiryDate != null">#{expiryDate},</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="updateTWorkOrder" parameterType="TWorkOrder">
update t_work_order
<trim prefix="SET" suffixOverrides=",">
<if test="workTitle != null">work_title = #{workTitle},</if>
<if test="workType != null">work_type = #{workType},</if>
<if test="workContent != null">work_content = #{workContent},</if>
<if test="workCreateEnterpriseName != null">work_create_enterprise_name = #{workCreateEnterpriseName},</if>
<if test="workCreateEnterpriseId != null">work_create_enterprise_id = #{workCreateEnterpriseId},</if>
<if test="workAssignEnterproseName != null">work_assign_enterprose_name = #{workAssignEnterproseName},</if>
<if test="workAssignEnterproseId != null">work_assign_enterprose_id = #{workAssignEnterproseId},</if>
<if test="workAssignManId != null">work_assign_man_id = #{workAssignManId},</if>
<if test="workAssignMan != null">work_assign_man = #{workAssignMan},</if>
<if test="workStatus != null">work_status = #{workStatus},</if>
<if test="inspectionDate != null">inspection_date = #{inspectionDate},</if>
<if test="inspectionRoute != null">inspection_route = #{inspectionRoute},</if>
<if test="problemDescription != null">problem_description = #{problemDescription},</if>
<if test="iconUrl != null">icon_url = #{iconUrl},</if>
<if test="rectificationPlan != null">rectification_plan = #{rectificationPlan},</if>
<if test="rectificationResult != null">rectification_result = #{rectificationResult},</if>
<if test="responsibleUnit != null">responsible_unit = #{responsibleUnit},</if>
<if test="responsiblePerson != null">responsible_person = #{responsiblePerson},</if>
<if test="expiryDate != null">expiry_date = #{expiryDate},</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 work_id = #{workId}
</update>
<delete id="deleteTWorkOrderById" parameterType="Long">
delete from t_work_order where work_id = #{workId}
</delete>
<delete id="deleteTWorkOrderByIds" parameterType="String">
delete from t_work_order where work_id in
<foreach item="workId" collection="array" open="(" separator="," close=")">
#{workId}
</foreach>
</delete>
</mapper>
\ No newline at end of file
......@@ -8,6 +8,7 @@
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= webpackConfig.name %></title>
<!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
<script src="https://webapi.amap.com/maps?v=2.0&key=eed7ca3167f765467aa377fa78e61ece&plugin=Map3D,AMap.DistrictSearch,AMap.Scale,AMap.OverView,AMap.ToolBar,AMap.MouseTool,AMap.ControlBar,AMap.CircleEditor,AMap.PolyEditor"></script>
<style>
html,
body,
......
import request from '@/utils/request'
// 查询燃气任务列表
export function listOrder(query) {
return request({
url: '/system/order/list',
method: 'get',
params: query
})
}
// 查询燃气任务详细
export function getOrder(workId) {
return request({
url: '/system/order/' + workId,
method: 'get'
})
}
// 新增燃气任务
export function addOrder(data) {
return request({
url: '/system/order',
method: 'post',
data: data
})
}
// 修改燃气任务
export function updateOrder(data) {
return request({
url: '/system/order',
method: 'put',
data: data
})
}
// 删除燃气任务
export function delOrder(workId) {
return request({
url: '/system/order/' + workId,
method: 'delete'
})
}
// 导出燃气任务
export function exportOrder(query) {
return request({
url: '/system/order/export',
method: 'get',
params: query
})
}
\ No newline at end of file
import request from '@/utils/request'
// 查询用户加装安全装置台账列表
export function listEquipment(query) {
return request({
url: '/standingBook/equipment/list',
method: 'get',
params: query
})
}
// 查询用户加装安全装置台账详细
export function getEquipment(safeEquipmentId) {
return request({
url: '/standingBook/equipment/' + safeEquipmentId,
method: 'get'
})
}
// 新增用户加装安全装置台账
export function addEquipment(data) {
return request({
url: '/standingBook/equipment',
method: 'post',
data: data
})
}
// 修改用户加装安全装置台账
export function updateEquipment(data) {
return request({
url: '/standingBook/equipment',
method: 'put',
data: data
})
}
// 删除用户加装安全装置台账
export function delEquipment(safeEquipmentId) {
return request({
url: '/standingBook/equipment/' + safeEquipmentId,
method: 'delete'
})
}
// 导出用户加装安全装置台账
export function exportEquipment(query) {
return request({
url: '/standingBook/equipment/export',
method: 'get',
params: query
})
}
\ No newline at end of file
import request from '@/utils/request'
// 查询隐患整治台账列表
export function listHidden(query) {
return request({
url: '/standingBook/hidden/list',
method: 'get',
params: query
})
}
// 查询隐患整治台账详细
export function getHidden(hiddenId) {
return request({
url: '/standingBook/hidden/' + hiddenId,
method: 'get'
})
}
// 新增隐患整治台账
export function addHidden(data) {
return request({
url: '/standingBook/hidden',
method: 'post',
data: data
})
}
// 修改隐患整治台账
export function updateHidden(data) {
return request({
url: '/standingBook/hidden',
method: 'put',
data: data
})
}
// 删除隐患整治台账
export function delHidden(hiddenId) {
return request({
url: '/standingBook/hidden/' + hiddenId,
method: 'delete'
})
}
// 导出隐患整治台账
export function exportHidden(query) {
return request({
url: '/standingBook/hidden/export',
method: 'get',
params: query
})
}
\ No newline at end of file
import request from '@/utils/request'
// 查询事故台账列表
export function listTrouble(query) {
return request({
url: '/standingBook/trouble/list',
method: 'get',
params: query
})
}
// 查询事故台账详细
export function getTrouble(troubleId) {
return request({
url: '/standingBook/trouble/' + troubleId,
method: 'get'
})
}
// 新增事故台账
export function addTrouble(data) {
return request({
url: '/standingBook/trouble',
method: 'post',
data: data
})
}
// 修改事故台账
export function updateTrouble(data) {
return request({
url: '/standingBook/trouble',
method: 'put',
data: data
})
}
// 删除事故台账
export function delTrouble(troubleId) {
return request({
url: '/standingBook/trouble/' + troubleId,
method: 'delete'
})
}
// 导出事故台账
export function exportTrouble(query) {
return request({
url: '/standingBook/trouble/export',
method: 'get',
params: query
})
}
\ No newline at end of file
<svg id="组_2449" data-name="组 2449" xmlns="http://www.w3.org/2000/svg" width="23" height="33.9" viewBox="0 0 23 33.9">
<g id="路径_186" data-name="路径 186" fill="none">
<path d="M11.5,0A11.5,11.5,0,0,1,23,11.5c0,6.351-11.6,18.226-11.5,18.3S0,17.851,0,11.5A11.5,11.5,0,0,1,11.5,0Z" stroke="none"/>
<path d="M 11.5 0.9999942779541016 C 5.71027946472168 0.9999942779541016 1 5.710294723510742 1 11.50003433227539 C 1 15.44047451019287 6.295700073242188 22.62868881225586 11.47670364379883 28.30246925354004 C 12.68497562408447 26.95181846618652 15.33078575134277 23.97880172729492 17.65543937683105 20.72857475280762 C 19.63740921020508 17.95747375488281 22 14.10698509216309 22 11.50003433227539 C 22 5.710294723510742 17.28972053527832 0.9999942779541016 11.5 0.9999942779541016 M 11.5 -5.7220458984375e-06 C 17.85127067565918 -5.7220458984375e-06 23 5.148744583129883 23 11.50003433227539 C 23 17.82767868041992 11.48916530609131 29.63789367675781 11.49940204620361 29.80171203613281 C 11.36462783813477 29.63816833496094 0 17.78736114501953 0 11.50003433227539 C 0 5.148744583129883 5.14872932434082 -5.7220458984375e-06 11.5 -5.7220458984375e-06 Z M 11.49940204620361 29.80171203613281 C 11.50076866149902 29.80337142944336 11.50098419189453 29.80383491516113 11.5 29.80305480957031 C 11.49963855743408 29.80276870727539 11.49944019317627 29.80232429504395 11.49940204620361 29.80171203613281 Z" stroke="none" fill="#7bf8f4"/>
</g>
<path id="多边形_33" data-name="多边形 33" d="M4.471,0,8.941,5.961H0Z" transform="translate(16.094 29.804) rotate(180)" fill="#7bf8f4"/>
<path id="路径_966" data-name="路径 966" d="M99.476,156.616a6.028,6.028,0,0,1-1.622,2.267.9.9,0,0,1-.583.252.8.8,0,0,1-.567-.236.765.765,0,0,1-.236-.535.705.705,0,0,1,.236-.535,6.035,6.035,0,0,0,1.748-4.377A5.726,5.726,0,0,0,96.7,149.2a6.645,6.645,0,0,0-9.085.016,5.836,5.836,0,0,0-1.763,4.283,6.134,6.134,0,0,0,1.952,4.346.765.765,0,0,1,.236.535.705.705,0,0,1-.236.535.748.748,0,0,1-.567.236.8.8,0,0,1-.567-.236,7.414,7.414,0,0,1-2.047-2.724,7.528,7.528,0,0,1,1.748-8.266,7.836,7.836,0,0,1,2.629-1.685,9.392,9.392,0,0,1,6.361-.063,6.113,6.113,0,0,1,2.141,1.26c2.866,2.425,3.023,5.9,2.047,8.943Zm-7.337-7.684a4.366,4.366,0,0,0-4.377,4.267.5.5,0,0,1-.236.5.527.527,0,0,1-.567,0,.513.513,0,0,1-.236-.5,5.254,5.254,0,0,1,1.575-3.684,5.533,5.533,0,0,1,7.7,0,5.208,5.208,0,0,1,1.606,3.732.5.5,0,0,1-.236.5.527.527,0,0,1-.567,0,.513.513,0,0,1-.236-.5,4.382,4.382,0,0,0-4.424-4.314Zm.913,5.4a1.113,1.113,0,0,1-1.559-.047,1.054,1.054,0,0,1-.268-1.149l-1.212-1.2a.418.418,0,0,1,0-.6.479.479,0,0,1,.63,0l1.228,1.2a1.162,1.162,0,0,1,1.2.268,1.024,1.024,0,0,1,.331.771A1.093,1.093,0,0,1,93.052,154.333Zm.016-.016" transform="translate(-80.582 -142.727)" fill="#7bf8f4"/>
</svg>
......@@ -189,3 +189,7 @@ aside {
.multiselect--active {
z-index: 1000 !important;
}
.amap-sug-result{
z-index:999999;
}
......@@ -3,29 +3,55 @@
<el-upload
:action="uploadFileUrl"
:before-upload="handleBeforeUpload"
:file-list="fileList"
:file-list="fileArr"
:limit="1"
:list-type="listType"
:on-error="handleUploadError"
:on-exceed="handleExceed"
:on-success="handleUploadSuccess"
:show-file-list="false"
:on-remove="handleRemove"
:on-preview="handleFileClick"
:on-change="fileChange"
:show-file-list="true"
:headers="headers"
class="upload-file-uploader"
:class="{ hide: fileArr.length>0 ||addShow }"
ref="upload"
>
<!-- 上传按钮 -->
<el-button size="mini" type="primary">选取文件</el-button>
<el-button plain type="primary">选取文件</el-button>
<!--<i class="el-icon-plus"></i>-->
<!-- 上传提示 -->
<div class="el-upload__tip" slot="tip" v-if="showTip">
请上传
<template v-if="fileSize"> 大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b> </template>
<template v-if="fileType"> 格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>
的文件
<template v-if="fileSize">
大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b>
</template>
<template v-if="fileType">
格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b>
</template>
的文件,且不超过一个
</div>
</el-upload>
<el-image v-show="false"
id="img"
ref="previewImg"
:src="dialogImageUrl"
:preview-src-list="bigImageArr"
:z-index="9999999"
></el-image>
<!-- <el-dialog
:center="true"
width="50%"
:modal="modal"
:visible.sync="dialogVisible"
>
<img :src="dialogImageUrl" alt="" />
</el-dialog> -->
<!-- 文件列表 -->
<transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
<!-- <transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
<li :key="file.uid" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in list">
<el-link :href="file.url" :underline="false" target="_blank">
<span class="el-icon-document"> {{ getFileName(file.name) }} </span>
......@@ -34,146 +60,203 @@
<el-link :underline="false" @click="handleDelete(index)" type="danger">删除</el-link>
</div>
</li>
</transition-group>
</transition-group> -->
</div>
</template>
<script>
import { getToken } from "@/utils/auth";
import { getToken } from "@/utils/auth";
export default {
props: {
// 值
value: [String, Object, Array],
// 大小限制(MB)
fileSize: {
type: Number,
default: 5,
export default {
props: {
// 值
value: [String, Object, Array],
listType: {
type: String,
defaule: "text",
},
// 大小限制(MB)
fileSize: {
type: Number,
default: 5,
},
fileArr: {
type: Array,
default: [],
},
// 文件类型, 例如['png', 'jpg', 'jpeg']
fileType: {
type: Array,
default: () => ["doc", "xls", "ppt", "txt", "pdf"],
},
// 是否显示提示
isShowTip: {
type: Boolean,
default: true,
},
},
// 文件类型, 例如['png', 'jpg', 'jpeg']
fileType: {
type: Array,
default: () => ["doc", "xls", "ppt", "txt", "pdf"],
data() {
return {
uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
headers: {
Authorization: "Bearer " + getToken(),
},
fileList: [],
modal: false,
dialogVisible: false,
dialogImageUrl: "",
addShow: true,
};
},
// 是否显示提示
isShowTip: {
type: Boolean,
default: true
}
},
data() {
return {
uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
headers: {
Authorization: "Bearer " + getToken(),
},
fileList: [],
};
},
computed: {
// 是否显示提示
showTip() {
return this.isShowTip && (this.fileType || this.fileSize);
computed: {
// 是否显示提示
showTip() {
return this.isShowTip && (this.fileType || this.fileSize);
},
// 列表
list() {
let temp = 1;
if (this.value) {
// 首先将值转为数组
const list = Array.isArray(this.value) ? this.value : [this.value];
// 然后将数组转为对象数组
return list.map((item) => {
if (typeof item === "string") {
item = { name: item, url: item };
}
item.uid = item.uid || new Date().getTime() + temp++;
return item;
});
} else {
this.fileList = [];
return [];
}
},
bigImageArr() {
return [this.dialogImageUrl]
},
},
// 列表
list() {
let temp = 1;
if (this.value) {
// 首先将值转为数组
const list = Array.isArray(this.value) ? this.value : [this.value];
// 然后将数组转为对象数组
return list.map((item) => {
if (typeof item === "string") {
item = { name: item, url: item };
methods: {
// 上传前校检格式和大小
handleBeforeUpload(file) {
// 校检文件类型
if (this.fileType) {
let fileExtension = "";
if (file.name.lastIndexOf(".") > -1) {
fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1);
}
const isTypeOk = this.fileType.some((type) => {
if (file.type.indexOf(type) > -1) return true;
if (fileExtension && fileExtension.indexOf(type) > -1) return true;
return false;
});
if (!isTypeOk) {
this.$message.error(
`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`
);
return false;
}
item.uid = item.uid || new Date().getTime() + temp++;
return item;
});
} else {
this.fileList = [];
return [];
}
},
},
methods: {
// 上传前校检格式和大小
handleBeforeUpload(file) {
// 校检文件类型
if (this.fileType) {
let fileExtension = "";
if (file.name.lastIndexOf(".") > -1) {
fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1);
}
const isTypeOk = this.fileType.some((type) => {
if (file.type.indexOf(type) > -1) return true;
if (fileExtension && fileExtension.indexOf(type) > -1) return true;
return false;
});
if (!isTypeOk) {
this.$message.error(`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`);
return false;
// 校检文件大小
if (this.fileSize) {
const isLt = file.size / 1024 / 1024 < this.fileSize;
if (!isLt) {
this.$message.error(`上传文件大小不能超过 ${this.fileSize} MB!`);
return false;
}
}
}
// 校检文件大小
if (this.fileSize) {
const isLt = file.size / 1024 / 1024 < this.fileSize;
if (!isLt) {
this.$message.error(`上传文件大小不能超过 ${this.fileSize} MB!`);
return false;
return true;
},
// 文件个数超出
handleExceed() {
this.$message.error(`只允许上传单个文件`);
},
// 上传失败
handleUploadError(err) {
this.$message.error("上传失败, 请重试");
},
// 上传成功回调
handleUploadSuccess(res, file) {
this.$message.success("上传成功");
this.$emit("resFun", res);
},
// 文件列表移除文件
handleRemove(file, fileList) {
console.log("列表移除", file, fileList);
this.addShow = fileList.length > 0 ? true : false;
this.$emit("remove", file);
},
// 删除文件
handleDelete(index) {
this.fileList.splice(index, 1);
this.$emit("input", "");
// let that = this,
// param;
// param = file.response ? file.response.fileName.replace(/\\/g, "%")
// : file.response.url.replace(/\\/g, "%").slice(9);
// $.ajax({
// type: "GET",
// url: process.env.VUE_APP_BASE_API + "/common/deleteFile",
// data: {savePath: param},
// dataType: "json",
// success: function(data){
// if (data) that.$message.success("删除成功");
// else return false;
// }
// });
},
handleFileClick(file, fileList) {
this.dialogImageUrl = file.response ? file.response.url : file.url;
// this.dialogImageUrl =if(this.fileArr) this.fileArr[0].url;
// this.dialogVisible = true;
this.$refs.previewImg.showViewer = false;
console.log(file);
// console.log(file.response.url)
},
// 获取文件名称
getFileName(name) {
if (name.lastIndexOf("/") > -1) {
return name.slice(name.lastIndexOf("/") + 1).toLowerCase();
} else {
return "";
}
}
return true;
},
// 文件个数超出
handleExceed() {
this.$message.error(`只允许上传单个文件`);
},
// 上传失败
handleUploadError(err) {
this.$message.error("上传失败, 请重试");
},
// 上传成功回调
handleUploadSuccess(res, file) {
this.$message.success("上传成功");
this.$emit("input", res.url);
},
// 当改变列表改变时
fileChange(file, fileList) {
this.addShow = fileList.length > 0 ? true : false;
},
},
// 删除文件
handleDelete(index) {
this.fileList.splice(index, 1);
this.$emit("input", '');
created() {
// this.fileList = this.list;
this.addShow = this.fileArr.length > 0 ? true : false;
},
// 获取文件名称
getFileName(name) {
if (name.lastIndexOf("/") > -1) {
return name.slice(name.lastIndexOf("/") + 1).toLowerCase();
} else {
return "";
}
}
},
created() {
this.fileList = this.list;
},
};
};
</script>
<style scoped lang="scss">
.upload-file-uploader {
margin-bottom: 5px;
}
.upload-file-list .el-upload-list__item {
border: 1px solid #e4e7ed;
line-height: 2;
margin-bottom: 10px;
position: relative;
}
.upload-file-list .ele-upload-list__item-content {
display: flex;
justify-content: space-between;
align-items: center;
color: inherit;
}
.ele-upload-list__item-content-action .el-link {
margin-right: 10px;
}
</style>
\ No newline at end of file
img {
width: 100%;
}
.upload-file-uploader {
margin-bottom: 5px;
}
.upload-file-list .el-upload-list__item {
border: 1px solid #e4e7ed;
line-height: 2;
margin-bottom: 10px;
position: relative;
}
.upload-file-list .ele-upload-list__item-content {
display: flex;
justify-content: space-between;
align-items: center;
color: inherit;
}
.ele-upload-list__item-content-action .el-link {
margin-right: 10px;
}
</style>
<!--
* @Author: your name
* @Date: 2022-02-12 11:07:10
* @LastEditTime: 2022-02-12 15:13:41
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/components/GetPos.vue/index.vue
-->
<template>
<el-dialog
class="getpos"
title="定位"
:visible.sync="dialogVisible"
width="60%"
:before-close="handleClose"
>
<div class="search-wrapper pos">
<el-input
v-model="searchinput"
class="searchinput"
placeholder="请输入内容"
size="mini"
style="width: 150px"
ref="input"
></el-input>
</div>
<div @click="pos" class="positionBtn pos">
<el-button type="primary" size="mini" icon="el-icon-position"
>定位</el-button
>
</div>
<div id="getposmap"></div>
</el-dialog>
</template>
<script>
import { EditorMap } from "./untils/getPath.js";
export default {
props: {
//管道路径,二维数组
pipePath: {
type: Array,
default: () => [],
},
// marker位置,数组
devicePos: {
type: Array,
default: () => [],
},
// 设备类型,管道传pipe,marker就不用传值
device: {
type: String,
default: "",
},
// 显示隐藏
dialogVisible:{
type:Boolean,
default:false,
}
},
data() {
return {
// dialogVisible: false,
map: null,
searchinput: "",
};
},
watch: {
dialogVisible(newValue) {
if (newValue) {
this.init();
} else {
this.map.destroy();
}
this.$nextTick(() => {
const input = this.$refs.input.$refs.input;
this.map.positionSearch(input);
});
},
},
mounted() {
},
methods: {
init() {
this.$nextTick(() => {
this.map = new EditorMap("getposmap", {}, this);
// 如果不传值就是设备,传pipe就是管道
if (this.device == "") {
// 如果传了路径就创建一个marker,如果没传就直接激活手动创建
if (this.devicePos.length > 0) {
this.map.addDevice({path:this.devicePos});
} else {
this.map.mouseAddMarker();
}
} else {
if (this.pipePath.length > 0) {
this.map.addPipeLine({path:this.pipePath});
} else {
this.mouseAddPipeline();
}
}
});
},
handleClose() {
this.$emit("close")
},
open() {
this.dialogVisible = true;
},
// 返回坐标
pos() {
this.path = this.map.getPath();
this.$emit("getPath", this.path);
console.log(this.path)
if (this.path?.length > 0) {
this.$emit("update:dialogVisible", false);
}
},
},
};
</script>
<style lang="scss" scoped>
.search-wrapper {
left: 30px;
}
.positionBtn {
right: 30px;
}
.pos {
position: absolute;
top: 90px;
z-index: 20;
}
#getposmap {
width: 100%;
height: 500px;
}
</style>
/*
* @Author: your name
* @Date: 2022-01-11 13:45:12
* @LastEditTime: 2022-02-12 15:13:52
* @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /test/hello-world/src/untils/mapClass.js
*/
// 编辑类
// 在地图上新增的设备可以直接编辑,
// 已经保存完成的设备需要点编辑才可以编辑
export class EditorMap {
// 地图的对象实例
map = null;
// 父vue的实例
vue = null;
// 操作 新建,编辑,删除,编辑跟删除只对已经在图上的设备有效 默认值:0, 新建:1,编辑:2, 删除: 3。
// 新建的时候会把未保存的线条清空
control = 0;
// 鼠标事件对象,用来将点跟线上图
mousetool = null;
// 当前正在手动绘制的对象
nowMouseTarget = null;
// 当线mousetool线被按下的时候的flag 当线被按下的时候为true,就不询问是否删除了
mosueToolPolineDownFlag = false;
// 绘制marer的时候的配置,在绘制完挂载事件的时候需要使用
mouseToolMarkerOptions = null;
// 绘制poline的时候的配置,在绘制完挂载事件的时候需要使用
mouseToolPolineOptions = null;
constructor(contaienr, config = {}, vue) {
this.map = new AMap.Map(contaienr, {
viewMode: "3D",
center: [116.397083, 39.874531],
layers: [AMap.createDefaultLayer()], // layers 字段为空或者不赋值将会自动创建默认底图。
zoom: 12,
...config,
});
this.vue = vue;
this.init();
}
init() {
// 地图事件
this.mapEvent();
// 手动点线上图准备,编辑模式
this.mouseAddDevice();
window.func = () => {
this.getPath();
};
// this.mouseAddMarker();
// this.mouseAddPipeline();
}
// map的事件监听
mapEvent() {
this.map.on("click", () => {
// mousetool对象画出的对象的操作
// 如果有手动绘制对象,要手动清楚一下,因为画线的时候不好清除旧线,这其实是用来清楚旧线的
// 当画出来的线被mousedown,不删除,但是mouseToolPipeLineFlag要归位,在移出线的时候统一归位
// 如果对象是marker,直接删除
if (this.nowMouseTarget?.type == "AMap.Marker") {
console.log("???");
this.mouseToolDrawClear();
} else {
// 当地图上已经画了线,并且没有点在线上,询问是否删除
if (this.nowMouseTarget && !this.mosueToolPolineDownFlag) {
this.confirm("是否重新绘制管道", { type: "warning" })
.then(() => {
// 删除原来的线
this.mouseToolDrawClear();
// 鼠标事件开启,并且赋值原来的属性,this.mouseToolMarkerOptions是开启绘制的时候记录的
this.mousetool.polyline(this.mouseToolPolineOptions);
})
.catch(() => {});
}
}
});
this.map.on("moveend", () => {
console.log("地图停止移动");
if (this.flag) {
console.log("弹框");
this.flag = false;
}
});
window.panTo = () => {
this.flag = true;
this.map.panTo([116.428285, 39.886129]);
};
}
// 弹框工具
confirm(message, obj) {
return this.vue.$confirm(message, obj);
}
// 改变操作状态
changeControl(num) {
this.control = num;
}
// 点线编辑上图准备
mouseAddDevice() {
this.map.plugin(["AMap.MouseTool"], () => {
this.mousetool = new AMap.MouseTool(this.map);
});
// 挂载绘制结束的事件
this.mouseDrawEvent();
}
// 点或者线上图结束后触发的事件
mouseDrawEvent() {
this.mousetool.on("draw", (e) => {
const target = e.obj;
// console.log([target._position.lng, target._position.lat]);
const { type: targetType } = target;
// 当这个点是marker的时候
if (targetType == "AMap.Marker") {
this.mouseToolMarkerEvent(target);
} else {
// 如果是线,挂上编辑
this.lineEditor(target);
this.mousetool.close();
this.mouseToolPolineEvent(target);
console.log(targetType, "当前对象是管道");
}
this.nowMouseTarget = target;
});
}
// 绘制marker结束后,在marker身上添加的事件
mouseToolMarkerEvent(target) {
// 由于画出来的marker点击会换位置,所以当移入的时候删除绘制事件,移出去在增加绘制事件
target.on("mouseover", (e) => {
// 鼠标事件关闭
this.mousetool.close(false);
});
target.on("mouseout", (e) => {
// 这里不方便获取原来的属性,因为position不好解决,还是设置一个值吧
// 鼠标事件开启,并且赋值原来的属性,this.mouseToolMarkerOptions是开启绘制的时候记录的
this.mousetool.marker(this.mouseToolMarkerOptions);
});
// 点
target.on("click", (e) => {
// 弹框
});
}
// 挂上线以及线的事件
lineEditor(line) {
// line.editor && line.editor.close();
// 当前点击次数,1次为编辑,2次为弹框
line.editorNum = 0;
line.editor = new AMap.PolyEditor(this.map, line);
}
// 绘制管道的时候,挂载的事件
mouseToolPolineEvent(target) {
// 线按下的时候会变成编辑,mousetool事件会清空 移出线的时候 在把polyline事件加上
target.on("mouseover", (e) => {
// 鼠标事件关闭
// this.mousetool.close(false);
});
target.on("mouseout", (e) => {
// 有时候按在线上移动地图,map点击事件中mosueToolPolineDownFlag无法归位,在这里归位
this.mosueToolPolineDownFlag = false;
// 鼠标事件开启,并且赋值原来的属性,this.mouseToolMarkerOptions是开启绘制的时候记录的
// this.mousetool.polyline(this.mouseToolPolineOptions);
});
// 线
target.on("mousedown", (e) => {
const line = e.target;
// mosueTool按下的flag,按在线上,不询问是否删除
this.mosueToolPolineDownFlag = true;
// 按下的时候要关闭事件
this.mousetool.close(false);
// 如果当前状态不是编辑,则进入编辑状态
if (line.editorNum < 1) {
// 打开并且++
line.editor.open();
line.editorNum++;
} else {
// 这里就要弹框了
console.log(line.getPath());
}
});
}
// 设备点击上图开启
mouseAddMarker(markerObj = {}) {
// 清空已经绘制完的对象
this.mousetoolClose(true);
// 记录一下配置项,在挂载点击的时候,需要使用
this.mouseToolMarkerOptions = {
draggable: true,
...markerObj,
};
this.mousetool.marker(this.mouseToolMarkerOptions);
}
// 管线点击上图开启
mouseAddPipeline(pipeObj = {}) {
this.mousetoolClose(true);
// 开始画线
this.mosuetoolPolineFlag = true;
this.mouseToolPolineOptions = {
strokeWeight: 5,
...pipeObj,
};
this.mousetool.polyline(this.mouseToolPolineOptions);
}
// 手动清除map上绘制的对象
mouseToolDrawClear() {
if (this.nowMouseTarget) {
this.map.remove(this.nowMouseTarget);
// 如果有editor,则关闭
this.nowMouseTarget.editor && this.nowMouseTarget.editor.close();
this.nowMouseTarget = null;
}
}
// 关闭点击上图事件 true清除之前绘制的图像,false 仅关闭上图事件
mousetoolClose(boolean) {
// 清空地图上的绘制对象的同时,也要清楚这个nowMouseTarget控制对象
if (this.nowMouseTarget) {
// 如果有editor,则关闭
this.nowMouseTarget.editor && this.nowMouseTarget.editor.close();
this.nowMouseTarget = null;
}
this.mousetool.close(boolean);
}
/**
*
*
*
*
*
*
* 地图上add设备
*
*
* @description:
* @param {*} deviceData marker的数据
* @param {*} compontent marker点击弹出的infowindow的组件
* @return {*}
*/
addDevice(deviceData) {
const { path } = deviceData;
let device = this.createMarker({
map: this.map,
anchor: "bottom-center",
icon: require("@/assets/mapImages/yalibiao.svg"),
position: path,
extData: deviceData,
});
// 当前设备
this.mouseAddMarker();
this.nowMouseTarget = device;
this.setCenter(path);
// 设备的事件函数
// this.deviceEvent(device, compontent);
}
deviceEvent(device, compontent) {
device.on("click", (e) => {
const target = e.target;
// 如果control==0就是默认值,没有使用123功能,就显示infowindow
if (this.control == 0) {
// this.markerClick(target, compontent);
} else if (this.control == 2) {
// 2是已经上图的设备拥有的编辑功能
} else if (this.control == 3) {
// 3是删除操作
}
});
}
// 创建marker
createMarker(MarkerOptions) {
return new AMap.Marker(MarkerOptions);
}
// 地图上add管道
addPipeLine(objData) {
const { path } = objData;
const pipe = this.createPipeLine({
path,
strokeWeight: 4,
strokeColor: "#000",
extData: objData,
cursor: "pointer",
});
this.map.add(pipe);
this.setCenter(path[0]);
// 当前设备
this.nowMouseTarget = pipe;
}
createPipeLine(pipeLineOptions) {
return new AMap.Polyline(pipeLineOptions);
}
setCenter(path) {
this.map.setCenter(path, true);
}
// 获取路径
getPath() {
if(!this.nowMouseTarget) return;
if (this.nowMouseTarget.type == "AMap.Marker") {
const { lng, lat } = this.nowMouseTarget.getPosition();
return [lng, lat];
} else {
return this.nowMouseTarget?.getPath().map((item) => [item.lng, item.lat]);
}
}
// 搜索位置
positionSearch(id) {
// id 为搜索框id
var autoOptions = {
input: id,
};
AMap.plugin(["AMap.PlaceSearch", "AMap.AutoComplete"], ()=> {
var auto = new AMap.AutoComplete(autoOptions);
var placeSearch = new AMap.PlaceSearch({
map: this.map,
}); //构造地点查询类
auto.on("select", select); //注册监听,当选中某条记录时会触发
function select(e) {
console.log(e)
placeSearch.setCity(e.poi.adcode);
placeSearch.search(e.poi.name); //关键字查询查询
}
});
}
// 销毁map
destroy(){
this.map.destroy();
}
}
<template>
<div class="upload-file">
<el-upload
:action="uploadFileUrl"
:before-upload="handleBeforeUpload"
:file-list="fileArr"
:limit="1"
:list-type="listType"
:on-error="handleUploadError"
:on-exceed="handleExceed"
:on-success="handleUploadSuccess"
:on-remove="handleRemove"
:on-preview="handleFileClick"
:on-change="fileChange"
:show-file-list="true"
:headers="headers"
class="upload-file-uploader"
:class="{ hide: fileArr.length>0 ||addShow }"
ref="upload"
>
<!-- 上传按钮 -->
<!-- <el-button size="mini" icon="" type="primary"></el-button> -->
<i class="el-icon-plus"></i>
<!-- 上传提示 -->
<div class="el-upload__tip" slot="tip" v-if="showTip">
请上传
<template v-if="fileSize">
大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b>
</template>
<template v-if="fileType">
格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b>
</template>
的文件
</div>
</el-upload>
<el-image v-show="false"
id="img"
ref="previewImg"
:src="dialogImageUrl"
:preview-src-list="bigImageArr"
:z-index="9999999"
></el-image>
<!-- <el-dialog
:center="true"
width="50%"
:modal="modal"
:visible.sync="dialogVisible"
>
<img :src="dialogImageUrl" alt="" />
</el-dialog> -->
<!-- 文件列表 -->
<!-- <transition-group class="upload-file-list el-upload-list el-upload-list--text" name="el-fade-in-linear" tag="ul">
<li :key="file.uid" class="el-upload-list__item ele-upload-list__item-content" v-for="(file, index) in list">
<el-link :href="file.url" :underline="false" target="_blank">
<span class="el-icon-document"> {{ getFileName(file.name) }} </span>
</el-link>
<div class="ele-upload-list__item-content-action">
<el-link :underline="false" @click="handleDelete(index)" type="danger">删除</el-link>
</div>
</li>
</transition-group> -->
</div>
</template>
<script>
import { getToken } from "@/utils/auth";
export default {
props: {
// 值
value: [String, Object, Array],
listType: {
type: String,
defaule: "text",
},
// 大小限制(MB)
fileSize: {
type: Number,
default: 5,
},
fileArr: {
type: Array,
default: [],
},
// 文件类型, 例如['png', 'jpg', 'jpeg']
fileType: {
type: Array,
// default: () => ["doc", "xls", "ppt", "txt", "pdf", "png", "jpg", "jpeg"],
default: () => ["png", "jpg", "jpeg", "gif"],
},
// 是否显示提示
isShowTip: {
type: Boolean,
default: true,
},
},
data() {
return {
uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
headers: {
Authorization: "Bearer " + getToken(),
},
fileList: [],
modal: false,
dialogVisible: false,
dialogImageUrl: "",
addShow: true,
};
},
computed: {
// 是否显示提示
showTip() {
return this.isShowTip && (this.fileType || this.fileSize);
},
// 列表
list() {
let temp = 1;
if (this.value) {
// 首先将值转为数组
const list = Array.isArray(this.value) ? this.value : [this.value];
// 然后将数组转为对象数组
return list.map((item) => {
if (typeof item === "string") {
item = { name: item, url: item };
}
item.uid = item.uid || new Date().getTime() + temp++;
return item;
});
} else {
this.fileList = [];
return [];
}
},
bigImageArr() {
return [this.dialogImageUrl]
},
},
methods: {
// 上传前校检格式和大小
handleBeforeUpload(file) {
// 校检文件类型
if (this.fileType) {
let fileExtension = "";
if (file.name.lastIndexOf(".") > -1) {
fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1);
}
const isTypeOk = this.fileType.some((type) => {
if (file.type.indexOf(type) > -1) return true;
if (fileExtension && fileExtension.indexOf(type) > -1) return true;
return false;
});
if (!isTypeOk) {
this.$message.error(
`文件格式不正确, 请上传${this.fileType.join("/")}格式文件!`
);
return false;
}
}
// 校检文件大小
if (this.fileSize) {
const isLt = file.size / 1024 / 1024 < this.fileSize;
if (!isLt) {
this.$message.error(`上传文件大小不能超过 ${this.fileSize} MB!`);
return false;
}
}
return true;
},
// 文件个数超出
handleExceed() {
this.$message.error(`只允许上传单个文件`);
},
// 上传失败
handleUploadError(err) {
this.$message.error("上传失败, 请重试");
},
// 上传成功回调
handleUploadSuccess(res, file) {
this.$message.success("上传成功");
this.$emit("resFun", res);
},
// 文件列表移除文件
handleRemove(file, fileList) {
console.log("列表移除", file, fileList);
this.addShow = fileList.length > 0 ? true : false;
this.$emit("remove", file);
},
// 删除文件
handleDelete(index) {
this.fileList.splice(index, 1);
this.$emit("input", "");
// let that = this,
// param;
// param = file.response ? file.response.fileName.replace(/\\/g, "%")
// : file.response.url.replace(/\\/g, "%").slice(9);
// $.ajax({
// type: "GET",
// url: process.env.VUE_APP_BASE_API + "/common/deleteFile",
// data: {savePath: param},
// dataType: "json",
// success: function(data){
// if (data) that.$message.success("删除成功");
// else return false;
// }
// });
},
handleFileClick(file, fileList) {
this.dialogImageUrl = file.response ? file.response.url : file.url;
// this.dialogImageUrl =if(this.fileArr) this.fileArr[0].url;
// this.dialogVisible = true;
this.$refs.previewImg.showViewer = true;
console.log(file);
// console.log(file.response.url)
},
// 获取文件名称
getFileName(name) {
if (name.lastIndexOf("/") > -1) {
return name.slice(name.lastIndexOf("/") + 1).toLowerCase();
} else {
return "";
}
},
// 当改变列表改变时
fileChange(file, fileList) {
this.addShow = fileList.length > 0 ? true : false;
},
},
created() {
// this.fileList = this.list;
this.addShow = this.fileArr.length > 0 ? true : false;
},
};
</script>
<style scoped lang="scss">
img {
width: 100%;
}
.upload-file-uploader {
margin-bottom: 5px;
}
.upload-file-list .el-upload-list__item {
border: 1px solid #e4e7ed;
line-height: 2;
margin-bottom: 10px;
position: relative;
}
.upload-file-list .ele-upload-list__item-content {
display: flex;
justify-content: space-between;
align-items: center;
color: inherit;
}
.ele-upload-list__item-content-action .el-link {
margin-right: 10px;
}
</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="workTitle">
<el-input
v-model="queryParams.workTitle"
placeholder="请输入任务标题"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="任务类型" prop="workType">
<el-select v-model="queryParams.workType" placeholder="请选择任务类型" clearable size="small">
<el-option label="入户安检" value="1" />
<el-option label="巡检" value="2" />
<el-option label="报警巡查" value="3" />
<el-option label="其他" value="4" />
</el-select>
</el-form-item>
<el-form-item label="任务状态" prop="workStatus">
<el-select v-model="queryParams.workStatus" placeholder="请选择任务状态" clearable size="small">
<el-option label="派发中" value="1" />
<el-option label="反馈" value="2" />
<el-option label="归档" value="3" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:order:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:order:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:order: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="['system:order:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="orderList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="任务标题" align="center" prop="workTitle" />
<el-table-column label="任务类型" align="center" prop="workType" />
<el-table-column label="任务内容" align="center" prop="workContent" />
<el-table-column label="创建单位" align="center" prop="workCreateEnterpriseName" />
<el-table-column label="指派单位" align="center" prop="workAssignEnterproseName" />
<el-table-column label="指派人" align="center" prop="workAssignManId" />
<el-table-column label="任务状态" align="center" prop="workStatus" />
<el-table-column label="巡检时间" align="center" prop="inspectionDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.inspectionDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="巡检路线" align="center" prop="inspectionRoute" />
<el-table-column label="问题描述" align="center" prop="problemDescription" />
<el-table-column label="问题图片" align="center" prop="pictureUrl" style="text-align:center;">
<template slot-scope="scope">
<img :src="scope.row.iconUrl" style="width: 20%;vertical-align:middle;cursor:pointer;" @click="showPicture(scope.row)"/>
<el-image :ref="'a'+scope.row.workId" :src="scope.row.iconUrl" v-show="false" :preview-src-list="[scope.row.iconUrl]" v-if="scope.row.iconUrl != '' && scope.row.iconUrl != null"></el-image>
</template>
</el-table-column>
<!--<el-table-column label="图片路径" align="center" prop="iconUrl" />-->
<el-table-column label="整改方案" align="center" prop="rectificationPlan" />
<el-table-column label="整改结果" align="center" prop="rectificationResult" />
<el-table-column label="责任单位" align="center" prop="responsibleUnit" />
<el-table-column label="责任人员" align="center" prop="responsiblePerson" />
<el-table-column label="截止日期" align="center" prop="expiryDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.expiryDate, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button v-if="'admin'==$store.state.user.roles[0] && scope.row.workAssignMan == null && scope.row.workStatus == '1'"
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:order:edit']"
>任务下发</el-button>
<el-button v-if="'admin'==$store.state.user.roles[0] && scope.row.workStatus == '1'"
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:order:edit']"
>接单</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:order:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:order: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="900px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-col :span="12">
<el-form-item label="任务标题" prop="workTitle">
<el-input v-model="form.workTitle" placeholder="请输入任务标题" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="任务类型" prop="workType">
<el-select v-model="form.workType" placeholder="请选择任务类型" style="width: 350px">
<el-option label="入户安检" value="1" />
<el-option label="巡检" value="2" />
<el-option label="报警巡查" value="3" />
<el-option label="其他" value="4" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="任务内容">
<editor v-model="form.workContent" :min-height="192"/>
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="指派单位" prop="workAssignEnterproseName">
<el-input v-model="form.workAssignEnterproseName" placeholder="请输入指派单位名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="指派人" prop="workAssignManId">
<el-input v-model="form.workAssignManId" placeholder="请输入指派人" />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="巡检时间" prop="inspectionDate">
<el-date-picker clearable size="small"
v-model="form.inspectionDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择巡检时间" style="width: 350px">
</el-date-picker>
</el-form-item>
<el-form-item label="巡检路线" prop="inspectionRoute">
<el-input v-model="form.inspectionRoute" type="textarea" placeholder="请输入巡检路线" />
</el-form-item>
<el-form-item label="问题描述" prop="problemDescription">
<el-input v-model="form.problemDescription" type="textarea" placeholder="请输入问题描述" />
</el-form-item>
<el-form-item label="问题图片" prop="iconUrl">
<MyFileUpload
listType="picture-card"
@resFun="getFileInfo"
@remove="listRemove"
:fileArr="fileList"
/>
<el-input v-show="false" disabled v-model="form.iconUrl"></el-input>
</el-form-item>
<el-form-item label="整改方案" prop="rectificationPlan">
<el-input v-model="form.rectificationPlan" type="textarea" placeholder="请输入整改方案" />
</el-form-item>
<el-form-item label="整改结果" prop="rectificationResult">
<el-input v-model="form.rectificationResult" type="textarea" placeholder="请输入整改结果" />
</el-form-item>
<el-row>
<el-col :span="12">
<el-form-item label="责任单位" prop="responsibleUnit">
<el-input v-model="form.responsibleUnit" placeholder="请输入责任单位" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="责任人员" prop="responsiblePerson">
<el-input v-model="form.responsiblePerson" placeholder="请输入责任人员" />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="截止日期" prop="expiryDate">
<el-date-picker clearable size="small"
v-model="form.expiryDate"
type="date"
value-format="yyyy-MM-dd"
placeholder="选择截止日期" style="width: 350px">
</el-date-picker>
</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 { listOrder, getOrder, delOrder, addOrder, updateOrder, exportOrder } from "@/api/operationMonitor/order";
import Editor from '@/components/Editor';
import MyFileUpload from '@/components/MyFileUpload';
export default {
name: "Order",
components: {
Editor,
MyFileUpload
},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 燃气任务表格数据
orderList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 上传文件列表
fileList: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
workTitle: null,
workType: null,
workContent: null,
workCreateEnterpriseName: null,
workCreateEnterpriseId: null,
workAssignEnterproseName: null,
workAssignEnterproseId: null,
workAssignManId: null,
workAssignMan: null,
workStatus: null,
inspectionDate: null,
inspectionRoute: null,
problemDescription: null,
iconUrl: null,
rectificationPlan: null,
rectificationResult: null,
responsibleUnit: null,
responsiblePerson: null,
expiryDate: null,
isDel: null,
remarks: null
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询燃气任务列表 */
getList() {
this.loading = true;
listOrder(this.queryParams).then(response => {
this.orderList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
workId: null,
workTitle: null,
workType: null,
workContent: null,
workCreateEnterpriseName: null,
workCreateEnterpriseId: null,
workAssignEnterproseName: null,
workAssignEnterproseId: null,
workAssignManId: null,
workAssignMan: null,
workStatus: "0",
inspectionDate: null,
inspectionRoute: null,
problemDescription: null,
iconUrl: null,
rectificationPlan: null,
rectificationResult: null,
responsibleUnit: null,
responsiblePerson: null,
expiryDate: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
isDel: null,
remarks: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.workId)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加燃气任务";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const workId = row.workId || this.ids
getOrder(workId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改燃气任务";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.workId != null) {
updateOrder(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addOrder(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const workIds = row.workId || this.ids;
this.$confirm('是否确认删除燃气任务编号为"' + workIds + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return delOrder(workIds);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有燃气任务数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportOrder(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
},
getFileInfo(res){
this.form.iconUrl = res.url;
},
listRemove(e) {
this.form.iconUrl = "";
this.fileList = [];
},
showPicture(row){
this.$refs['a'+row.workId].showViewer = true;
}
}
};
</script>
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="用户名称" prop="userName">
<el-input
v-model="queryParams.userName"
placeholder="请输入用户名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!--<el-form-item label="身份证号" prop="idCard">
<el-input
v-model="queryParams.idCard"
placeholder="请输入身份证号"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>-->
<el-form-item label="联系电话" prop="linkMobile">
<el-input
v-model="queryParams.linkMobile"
placeholder="请输入联系电话"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="安装时间" prop="installTime">
<el-date-picker clearable size="small"
v-model="queryParams.installTimeStart"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择起始时间">
</el-date-picker><span style="color: #bebfc3"> - </span>
<el-date-picker clearable size="small"
v-model="queryParams.installTimeEnd"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择截止时间">
</el-date-picker>
</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="['standingBook:equipment:add']"
>新增</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="['standingBook:equipment:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="equipmentList" >
<el-table-column label="用户名称" align="center" prop="userName" width="220px"/>
<el-table-column label="身份证号" align="center" prop="idCard"/>
<el-table-column label="联系电话" align="center" prop="linkMobile"/>
<el-table-column label="详细地址" align="center" prop="userAddress" width="380px"/>
<el-table-column label="安装时间" align="center" prop="installTime"/>
<el-table-column label="品牌名称" align="center" prop="brandName" width="130px"/>
<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="['standingBook:equipment:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="showDetail(scope.row)"
v-hasPermi="['standingBook:equipment:query']"
>详情</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['standingBook:equipment: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="800px" append-to-body @cancel="cancel">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<el-col :span="11">
<el-form-item label="用户名称" prop="userName">
<el-input v-model="form.userName" placeholder="请输入用户名称"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="用户编号" prop="userNo">
<el-input v-model="form.userNo" placeholder="请输入用户编号"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="身份证号" prop="idCard">
<el-input v-model="form.idCard" placeholder="请输入身份证号" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系电话" prop="linkMobile">
<el-input v-model="form.linkMobile" placeholder="请输入联系电话" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="详细地址" prop="userAddress">
<el-input type="textarea" v-model="form.userAddress" placeholder="请输入详细地址"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="品牌名称" prop="brandName">
<el-input v-model="form.brandName" placeholder="请输入品牌名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="安装时间" prop="installTime">
<el-date-picker clearable size="small"
v-model="form.installTime"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择安装时间"
style="width: 100%">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="备注信息" prop="remarks">
<el-input type="textarea" v-model="form.remarks" 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 { listEquipment, getEquipment, delEquipment, addEquipment, updateEquipment, exportEquipment } from "@/api/standingBook/equipment";
export default {
name: "Equipment",
components: {
},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 用户加装安全装置台账表格数据
equipmentList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
userName: null,
idCard: null,
linkMobile: null,
installTimeStart: null,
installTimeEnd: null
},
// 表单参数
form: {},
// 表单校验
rules: {
userName: [
{ required: true, message: "请输入用户名称", trigger: "blur" },
],
userAddress: [
{ required: true, message: "请输入详细地址", trigger: "blur" },
],
linkMobile: [
{ required: true, message: "请输入联系电话", trigger: "blur" },
{ min: 11, max: 11, message: "长度11位", trigger: "blur" },
],
idCard: [
{ required: true, message: "请输入身份证号", trigger: "blur" },
{ min: 18, max: 18, message: "长度18位", trigger: "blur" },
],
installTime: [
{ required: true, message: "选择安装时间", trigger: "change" },
],
}
};
},
created() {
this.getList();
},
methods: {
/** 查询用户加装安全装置台账列表 */
getList() {
this.loading = true;
listEquipment(this.queryParams).then(response => {
this.equipmentList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
safeEquipmentId: null,
userName: null,
userNo: null,
userAddress: null,
idCard: null,
linkMobile: null,
installTime: null,
brandName: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
isDel: null,
remarks: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加用户加装安全装置台账";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
getEquipment(row.safeEquipmentId).then(response => {
console.log("data",response.data);
this.form = response.data;
this.open = true;
this.title = "修改用户加装安全装置台账";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.safeEquipmentId != null) {
updateEquipment(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addEquipment(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
// const safeEquipmentIds = row.safeEquipmentId || this.ids;
row.isDel = "1";
this.$confirm('是否确认删除"' + row.userName + '"的台账?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return updateEquipment(row);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有用户加装安全装置台账数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportEquipment(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
},
/** 详细信息跳转 */
showDetail(row) {
this.$router.push({
path: '/standingBook/equipmentDetail',
query: {
safeEquipmentId: row.safeEquipmentId
}
})
},
}
};
</script>
<template>
<div class="app-container">
<!--<el-row>
<el-col :span="24" style="padding-left: 15px;margin-bottom: -10px;">
<div style="height: 45px;" @click="$router.go(-1)">
<el-button size="medium" type="text" style="font-size: 18px; color: rgb(7, 63, 112);float: left;">返回
</el-button>
</div>
</el-col>
</el-row>-->
<el-row style="width: 100%;height: 40px;">
<el-col :span="24">
<div style="">
<ul>
<li style="list-style: none;font-weight: 900;font-size: 20px;color: #053b6a;">燃气用户加装安全装置台账详情</li>
</ul>
</div>
</el-col>
</el-row>
<el-row style="width: 100%;padding: 20px;">
<el-form ref="form" v-model="form" label-width="100px" style="width: 100%;">
<el-row>
<el-col :span="6">
<el-form-item label="用户名称:" prop="userName">
<font>{{form.userName}}</font>
</el-form-item>
<el-form-item label="身份证号:" prop="idCard">
<font>{{form.idCard}}</font>
</el-form-item>
<el-form-item label="品牌名称:" prop="brandName">
<font v-if="form.brandName != '' && form.brandName != null">{{form.brandName}}</font>
<font v-else> - </font>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="用户编号:" prop="userNo">
<font v-if="form.userNo != '' && form.userNo != null">{{form.userNo}}</font>
<font v-else> - </font>
</el-form-item>
<el-form-item label="联系电话:" prop="linkMobile">
<font>{{form.linkMobile}}</font>
</el-form-item>
<el-form-item label="安装时间:" prop="installTime">
<font>{{form.installTime}}</font>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-form-item label="详细地址:" prop="userAddress">
<font>{{form.userAddress}}</font>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="备注信息:" prop="remarks">
<font v-if="form.remarks != '' && form.remarks != null">{{form.remarks}}</font>
<font v-else> - </font>
</el-form-item>
</el-row>
</el-form>
</el-row>
</div>
</template>
<script>
import { getEquipment } from "@/api/standingBook/equipment";
export default {
name: "equipmentDetail",
components: {
},
data() {
return {
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
// 如果是跳转来的,则接受初始化参数
this.safeEquipmentId = this.$route.query.safeEquipmentId;
},
mounted() {
this.getDetail();
},
methods: {
getDetail() {
getEquipment(this.safeEquipmentId).then(response => {
this.form = response.data;
console.log(this.form, "this.form")
const obj =this.form;
});
},
}
}
</script>
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="80px">
<el-form-item label="隐患名称" prop="hiddenTitle">
<el-input
v-model="queryParams.hiddenTitle"
placeholder="请输入隐患名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="隐患类型" prop="hiddenType">
<el-select v-model="queryParams.hiddenType" placeholder="请选择隐患类型" clearable size="small">
<el-option
v-for="dict in typeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="发现时间" prop="hiddenFindDate">
<el-date-picker clearable size="small"
v-model="queryParams.hiddenFindDateStart"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择起始时间">
</el-date-picker><span style="color: #bebfc3"> - </span>
<el-date-picker clearable size="small"
v-model="queryParams.hiddenFindDateEnd"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择截止时间">
</el-date-picker>
</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="['standingBook:hidden:add']"
>新增</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="['standingBook:hidden:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="hiddenList" >
<el-table-column label="隐患名称" align="center" prop="hiddenTitle" width="200px"/>
<el-table-column label="隐患等级" align="center" prop="hiddenType" width="150px">
<template slot-scope="scope">
<span v-if="scope.row.hiddenType == '1'">一级隐患</span>
<span v-if="scope.row.hiddenType == '2'">二级隐患</span>
<span v-if="scope.row.hiddenType == '3'">三级隐患</span>
</template>
</el-table-column>
<el-table-column label="隐患位置" align="center" prop="hiddenLocation" width="300px"/>
<el-table-column label="隐患发现人员" align="center" prop="hiddenFindPeople" width="150px"/>
<el-table-column label="发现时间" align="center" prop="hiddenFindDate" width="150px"/>
<el-table-column label="处理方案" align="center" prop="dealPlanUrl" width="150px">
<template slot-scope="scope">
<span
class="dbtn"
@click="checkFile(scope.row.dealPlanUrl)"
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="remediation" width="180px">
<template slot-scope="scope">
<span v-if="scope.row.remediation != '' && scope.row.remediation != null">{{ scope.row.remediation }}</span>
<span v-else>-</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['standingBook:hidden:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="showDetail(scope.row)"
v-hasPermi="['standingBook:hidden:query']"
>详情</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['standingBook:hidden: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="800px" append-to-body @cancel="cancel">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<el-col :span="11">
<el-form-item label="隐患名称" prop="hiddenTitle">
<el-input v-model="form.hiddenTitle" placeholder="请输入隐患名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="隐患等级" prop="hiddenType">
<el-select v-model="form.hiddenType" placeholder="请选择隐患等级" style="width: 100%">
<el-option
v-for="dict in typeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="隐患内容" prop="hiddenContent">
<el-input type="textarea" v-model="form.hiddenContent" placeholder="请输入隐患内容"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="隐患位置" prop="hiddenLocation">
<el-input v-model="form.hiddenLocation" placeholder="请输入隐患位置" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="经纬度坐标" prop="longitude">
<el-row>
<el-col :span="9">
<el-input v-model="form.longitude" placeholder="请输入经度" />
</el-col>
<el-col :span="9" style="margin-left: 10px">
<el-input v-model="form.latitude" placeholder="请输入纬度"/>
</el-col>
<el-col :span="3" style="margin-left: 30px">
<el-button type="primary" plain @click="MapdialogFun">选择经纬度</el-button>
</el-col>
</el-row>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="隐患发现人员" prop="hiddenFindPeople">
<el-input v-model="form.hiddenFindPeople" placeholder="请输入隐患发现人员" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="发现时间" prop="hiddenFindDate">
<el-date-picker clearable size="small"
v-model="form.hiddenFindDate"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择发现时间"
style="width: 100%">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="处理方案" prop="dealPlan">
<FileUpload
listType="picture"
@resFun="getFileInfo"
@remove="listRemove"
:fileArr="fileList"
/>
<el-input v-show="false" disabled v-model="form.dealPlan"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="整治情况" prop="remediation">
<el-input v-model="form.remediation" placeholder="请输入整治情况" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="备注信息" prop="remarks">
<el-input type="textarea" v-model="form.remarks" 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>
<GetPos
:dialogVisible.sync="dialogTableVisible"
device=""
:devicePos="devicePos"
@close="dialogcancelFun"
@getPath="getPath"
/>
</div>
</template>
<script>
import { listHidden, getHidden, delHidden, addHidden, updateHidden, exportHidden } from "@/api/standingBook/hidden";
import Editor from '@/components/Editor';
import FileUpload from '@/components/FileUpload';
import GetPos from '@/components/GetPos';
let uploadfile = require("@/assets/uploadfile.png");
export default {
name: "Hidden",
components: {
Editor,
FileUpload,
GetPos
},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 隐患整治台账表格数据
hiddenList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 隐患类型字典
typeOptions: [],
// 上传文件列表
fileList: [],
// 地图
dialogTableVisible: false,
devicePos: [],
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
hiddenTitle: null,
hiddenType: null,
hiddenFindDateStart: null,
hiddenFindDateEnd: null
},
// 表单参数
form: {},
// 表单校验
rules: {
hiddenTitle: [
{ required: true, message: "请输入隐患名称", trigger: "blur" },
],
hiddenType: [
{ required: true, message: "请选择隐患等级", trigger: "blur" },
],
hiddenContent: [
{ required: true, message: "请输入隐患内容", trigger: "blur" },
],
hiddenLocation: [
{ required: true, message: "请输入经纬度", trigger: "blur" },
],
longitude: [
{ required: true, message: "请输入经纬度", trigger: "blur" },
],
hiddenFindPeople: [
{ required: true, message: "请输入隐患发现人员", trigger: "blur" },
],
hiddenFindDate: [
{ required: true, message: "请选择发现时间", trigger: "change" },
],
dealPlan: [
{ required: true, message: "请上传文件", trigger: "change" },
],
}
};
},
created() {
this.getList();
this.getDicts("t_hidden_type").then(response => {
this.typeOptions = response.data;
});
},
methods: {
/** 查询隐患整治台账列表 */
getList() {
this.loading = true;
listHidden(this.queryParams).then(response => {
this.hiddenList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
this.fileList = [];
},
// 表单重置
reset() {
this.form = {
hiddenId: null,
hiddenTitle: null,
hiddenContent: null,
hiddenLocation: null,
hiddenType: null,
hiddenFindPeople: null,
hiddenFindDate: null,
dealPlan: null,
remediation: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
isDel: null,
remarks: null
};
this.resetForm("form");
this.fileList = [];
this.devicePos = [];
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加隐患整治台账";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const hiddenId = row.hiddenId || this.ids
getHidden(hiddenId).then(response => {
this.form = response.data;
if (this.form.dealPlan) {
this.fileList.push({
name: this.form.dealPlan,
url: uploadfile,
});
}
this.devicePos = [this.form.longitude, this.form.latitude];
this.open = true;
this.title = "修改隐患整治台账";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.hiddenId != null) {
updateHidden(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addHidden(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
// const hiddenIds = row.hiddenId || this.ids;
row.isDel = "1";
this.$confirm('是否确认删除"' + row.hiddenTitle + '"的台账?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return updateHidden(row);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有隐患整治台账数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportHidden(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
},
/** 详细信息跳转 */
showDetail(row) {
this.$router.push({
path: '/standingBook/hiddenDetail',
query: {
hiddenId: row.hiddenId
}
})
},
checkFile(url) {
window.open(url,'_blank');
},
getFileInfo(res){
this.form.dealPlan = res.fileName;
this.form.dealPlanUrl = res.url;
this.fileList.push({
name: res.fileName,
url: uploadfile,
});
},
listRemove(e) {
this.form.dealPlan = "";
this.fileList = [];
},
MapdialogFun() {
this.dialogTableVisible = true;
// this.devicePos = [this.form.longitude, this.form.latitude];
console.log("devicePos",this.devicePos)
},
dialogcancelFun() {
this.dialogTableVisible = false;
},
getPath(res){
//确认选择经纬度
this.form.longitude = res[0];
this.form.latitude = res[1];
}
}
};
</script>
<style>
.dbtn {
display: inline-block;
padding: 2px 5px;
cursor: pointer;
border-radius: 3px;
border-style: solid;
border-width: 0;
color: rgb(48, 180, 107);
font-size: 9px;
}
.dbtn:hover {
border-width: 1px;
border-color: rgb(48, 180, 107);
}
</style>
<template>
<div class="app-container">
<!--<el-row>
<el-col :span="24" style="padding-left: 15px;margin-bottom: -10px;">
<div style="height: 45px;" @click="$router.go(-1)">
<el-button size="medium" type="text" style="font-size: 18px; color: rgb(7, 63, 112);float: left;">返回
</el-button>
</div>
</el-col>
</el-row>-->
<el-row style="width: 100%;height: 40px;">
<el-col :span="24">
<div style="">
<ul>
<li style="list-style: none;font-weight: 900;font-size: 20px;color: #053b6a;">隐患整治台账详情</li>
</ul>
</div>
</el-col>
</el-row>
<el-row style="width: 100%;padding: 20px;">
<el-form ref="form" v-model="form" label-width="120px" style="width: 100%;">
<el-row>
<el-col :span="6">
<el-form-item label="隐患名称:" prop="hiddenTitle">
<font>{{form.hiddenTitle}}</font>
</el-form-item>
<el-form-item label="隐患发现人员:" prop="hiddenFindPeople">
<font>{{form.hiddenFindPeople}}</font>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="隐患等级:" prop="hiddenType">
<font v-if="form.hiddenType == '1'">一级隐患</font>
<font v-if="form.hiddenType == '2'">二级隐患</font>
<font v-if="form.hiddenType == '3'">三级隐患</font>
</el-form-item>
<el-form-item label="发现时间:" prop="hiddenFindDate">
<font>{{form.hiddenFindDate}}</font>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-form-item label="隐患位置:" prop="hiddenLocation">
<font>{{form.hiddenLocation}}</font>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="隐患内容:" prop="hiddenContent">
<font>{{form.hiddenContent}}</font>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="整治情况:" prop="remediation">
<font v-if="form.remediation != '' && form.remediation != null">{{form.remediation}}</font>
<font v-else> - </font>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="备注信息:" prop="remarks">
<font v-if="form.remarks != '' && form.remarks != null">{{form.remarks}}</font>
<font v-else> - </font>
</el-form-item>
</el-row>
</el-form>
</el-row>
</div>
</template>
<script>
import { getHidden } from "@/api/standingBook/hidden";
export default {
name: "hiddenDetail",
components: {
},
data() {
return {
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
// 如果是跳转来的,则接受初始化参数
this.hiddenId = this.$route.query.hiddenId;
},
mounted() {
this.getDetail();
},
methods: {
getDetail() {
getHidden(this.hiddenId).then(response => {
this.form = response.data;
console.log(this.form, "this.form")
const obj =this.form;
});
},
}
}
</script>
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
<!--<el-form-item label="事故名称" prop="troubleName">
<el-input
v-model="queryParams.troubleName"
placeholder="请输入事故名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>-->
<el-form-item label="事故类型" prop="troubleType">
<el-select v-model="queryParams.troubleType" placeholder="请选择事故类型" clearable size="small">
<el-option
v-for="dict in troubleTypeOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="是否处理" prop="isDeal">
<el-select v-model="queryParams.isDeal" placeholder="请选择事故类型" clearable size="small">
<el-option
v-for="dict in isDealOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="处理完成时间" prop="dealDate">
<el-date-picker clearable size="small"
v-model="queryParams.dealDateStart"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择起始时间">
</el-date-picker><span style="color: #bebfc3"> - </span>
<el-date-picker clearable size="small"
v-model="queryParams.dealDateEnd"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="请选择截止时间">
</el-date-picker>
</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="['standingBook:trouble:add']"
>新增</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="['standingBook:trouble:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="troubleList" >
<el-table-column label="事故名称" align="center" prop="troubleName" width="200px"/>
<el-table-column label="事故类型" align="center" prop="troubleType" width="180px">
<template slot-scope="scope">
<span v-if="scope.row.troubleType == 1">生产安全事故</span>
<span v-if="scope.row.troubleType == 2">非生产安全事故</span>
</template>
</el-table-column>
<el-table-column label="事故地点" align="center" prop="troubleLocation" width="300px"/>
<el-table-column label="责任单位" align="center" prop="responsibleUnit" />
<el-table-column label="责任人员" align="center" prop="responsiblePeople" />
<el-table-column label="是否处理" align="center" prop="isDeal" width="120px">
<template slot-scope="scope">
<span v-if="scope.row.isDeal == 1">已处理</span>
<span v-if="scope.row.isDeal == 2">未处理</span>
</template>
</el-table-column>
<el-table-column label="处理完成时间" align="center" prop="dealDate" width="180px"/>
<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="['standingBook:trouble:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="showDetail(scope.row)"
v-hasPermi="['standingBook:trouble:query']"
>详情</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['standingBook:trouble: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="800px" append-to-body @cancel="cancel">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<el-col :span="11">
<el-form-item label="事故名称" prop="troubleName">
<el-input v-model="form.troubleName" placeholder="请输入事故名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="事故类型" prop="troubleType">
<el-select v-model="form.troubleType" placeholder="请选择事故类型" style="width: 100%">
<el-option label="生产安全事故" value="1" />
<el-option label="非生产安全事故" value="2" />
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="事故地点" prop="troubleLocation">
<el-input v-model="form.troubleLocation" placeholder="请输入事故地点" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="经纬度坐标" prop="longitude">
<el-row>
<el-col :span="9">
<el-input v-model="form.longitude" placeholder="请输入经度" />
</el-col>
<el-col :span="9" style="margin-left: 10px">
<el-input v-model="form.latitude" placeholder="请输入纬度"/>
</el-col>
<el-col :span="3" style="margin-left: 30px">
<el-button type="primary" plain @click="MapdialogFun">选择经纬度</el-button>
</el-col>
</el-row>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="事故原因" prop="troubleReason">
<el-input v-model="form.troubleReason" placeholder="请输入事故原因" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="简要经过" prop="briefProcess">
<el-input type="textarea" v-model="form.briefProcess" placeholder="请输入简要经过" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="责任单位" prop="responsibleUnit">
<el-input v-model="form.responsibleUnit" placeholder="请输入责任单位" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="责任人员" prop="responsiblePeople">
<el-input v-model="form.responsiblePeople" placeholder="请输入责任人员" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="11">
<el-form-item label="是否处理" prop="isDeal">
<el-select v-model="form.isDeal" placeholder="请选择处理结果">
<el-option label="已处理" value="1" />
<el-option label="未处理" value="2" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="处理完成时间" prop="dealDate">
<el-date-picker clearable size="small"
v-model="form.dealDate"
type="datetime"
value-format="yyyy-MM-dd HH:mm:ss"
placeholder="选择处理完成时间"
style="width: 100%">
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="23">
<el-form-item label="备注信息" prop="remarks">
<el-input type="textarea" v-model="form.remarks" 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>
<GetPos
:dialogVisible.sync="dialogTableVisible"
device=""
:devicePos="devicePos"
@close="dialogcancelFun"
@getPath="getPath"
/>
</div>
</template>
<script>
import { listTrouble, getTrouble, delTrouble, addTrouble, updateTrouble, exportTrouble } from "@/api/standingBook/trouble";
import GetPos from '@/components/GetPos';
export default {
name: "Trouble",
components: {
GetPos
},
data() {
return {
// 遮罩层
loading: true,
// 导出遮罩层
exportLoading: false,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 事故台账表格数据
troubleList: [],
// 数据字典类型
troubleTypeOptions: [],
isDealOptions: [],
// 地图
dialogTableVisible: false,
devicePos: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
troubleName: null,
troubleType: null,
isDeal: null,
dealDateStart: null,
dealDateEnd: null
},
// 表单参数
form: {},
// 表单校验
rules: {
troubleName: [
{ required: true, message: "请输入事故名称", trigger: "blur" },
],
troubleType: [
{ required: true, message: "请输入事故类型", trigger: "blur" },
],
troubleLocation: [
{ required: true, message: "请输入事故地点", trigger: "blur" },
],
longitude: [
{ required: true, message: "请输入经纬度", trigger: "blur" },
],
troubleReason: [
{ required: true, message: "请输入事故原因", trigger: "blur" },
],
responsibleUnit: [
{ required: true, message: "请输入责任单位", trigger: "blur" },
],
responsiblePeople: [
{ required: true, message: "请输入责任人员", trigger: "blur" },
],
}
};
},
created() {
this.getList();
this.getDicts("t_trouble_type").then(response => {
this.troubleTypeOptions = response.data;
});
this.getDicts("t_is_deal").then(response => {
this.isDealOptions = response.data;
});
},
methods: {
/** 查询事故台账列表 */
getList() {
this.loading = true;
listTrouble(this.queryParams).then(response => {
this.troubleList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
troubleId: null,
troubleName: null,
troubleLocation: null,
troubleType: null,
briefProcess: null,
troubleReason: null,
responsibleUnit: null,
responsiblePeople: null,
isDeal: null,
dealDate: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
isDel: null,
remarks: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加事故台账";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const troubleId = row.troubleId || this.ids
getTrouble(troubleId).then(response => {
this.form = response.data;
this.devicePos = [this.form.longitude, this.form.latitude];
this.open = true;
this.title = "修改事故台账";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.troubleId != null) {
updateTrouble(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addTrouble(this.form).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
// const troubleIds = row.troubleId || this.ids;
row.isDel = "1";
this.$confirm('是否确认删除"' + row.troubleName + '"的台账?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return updateTrouble(row);
}).then(() => {
this.getList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$confirm('是否确认导出所有事故台账数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
this.exportLoading = true;
return exportTrouble(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
},
/** 详细信息跳转 */
showDetail(row) {
this.$router.push({
path: '/standingBook/troubleDetail',
query: {
troubleId: row.troubleId
}
})
},
MapdialogFun() {
this.dialogTableVisible = true;
},
dialogcancelFun() {
this.dialogTableVisible = false;
},
getPath(res){
//确认选择经纬度
this.form.longitude = res[0];
this.form.latitude = res[1];
}
}
};
</script>
<template>
<div class="app-container">
<!--<el-row>
<el-col :span="24" style="padding-left: 15px;margin-bottom: -10px;">
<div style="height: 45px;" @click="$router.go(-1)">
<el-button size="medium" type="text" style="font-size: 18px; color: rgb(7, 63, 112);float: left;">返回
</el-button>
</div>
</el-col>
</el-row>-->
<el-row style="width: 100%;height: 40px;">
<el-col :span="24">
<div style="">
<ul>
<li style="list-style: none;font-weight: 900;font-size: 20px;color: #053b6a;">燃气事故台账详情</li>
</ul>
</div>
</el-col>
</el-row>
<el-row style="width: 100%;padding: 20px;">
<el-form ref="form" v-model="form" label-width="120px" style="width: 100%;">
<el-row>
<el-col :span="6">
<el-form-item label="事故名称:" prop="troubleName">
<font>{{form.troubleName}}</font>
</el-form-item>
<el-form-item label="事故原因:" prop="troubleReason">
<font>{{form.troubleReason}}</font>
</el-form-item>
<el-form-item label="责任单位:" prop="responsibleUnit">
<font v-if="form.responsibleUnit != '' && form.responsibleUnit != null">{{form.responsibleUnit}}</font>
<font v-else> - </font>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="事故类型:" prop="troubleType">
<font v-if="form.troubleType == '1'">安全生产事故</font>
<font v-if="form.troubleType == '2'">非生产安全事故</font>
</el-form-item>
<el-form-item label="事故地点:" prop="troubleLocation">
<font>{{form.troubleLocation}}</font>
</el-form-item>
<el-form-item label="责任人员:" prop="responsiblePeople">
<font v-if="form.responsiblePeople != '' && form.responsiblePeople != null">{{form.responsiblePeople}}</font>
<font v-else> - </font>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-form-item label="简要经过:" prop="briefProcess">
<font v-if="form.briefProcess != '' && form.briefProcess != null">{{form.briefProcess}}</font>
<font v-else> - </font>
</el-form-item>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item label="是否处理:" prop="isDeal">
<font>{{form.isDeal}}</font>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="处理完成时间:" prop="dealDate">
<font>{{form.dealDate}}</font>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-form-item label="备注信息:" prop="remarks">
<font v-if="form.remarks != '' && form.remarks != null">{{form.remarks}}</font>
<font v-else> - </font>
</el-form-item>
</el-row>
</el-form>
</el-row>
</div>
</template>
<script>
import { getTrouble } from "@/api/standingBook/trouble";
export default {
name: "troubleDetail",
components: {
},
data() {
return {
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
created() {
// 如果是跳转来的,则接受初始化参数
this.troubleId = this.$route.query.troubleId;
},
mounted() {
this.getDetail();
},
methods: {
getDetail() {
getTrouble(this.troubleId).then(response => {
this.form = response.data;
console.log(this.form, "this.form")
const obj =this.form;
});
},
}
}
</script>
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