Commit 3a9f02d9 authored by 王晓倩's avatar 王晓倩

Merge remote-tracking branch 'origin/master'

parents a3ffc349 d10cd854
package com.zehong.web.controller.complainDeal; package com.zehong.web.controller.complainDeal;
import java.util.Date;
import java.util.List; import java.util.List;
import com.zehong.common.core.domain.model.LoginUser;
import com.zehong.framework.web.service.TokenService;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -20,6 +24,8 @@ import com.zehong.system.service.ITComplainDealService; ...@@ -20,6 +24,8 @@ import com.zehong.system.service.ITComplainDealService;
import com.zehong.common.utils.poi.ExcelUtil; import com.zehong.common.utils.poi.ExcelUtil;
import com.zehong.common.core.page.TableDataInfo; import com.zehong.common.core.page.TableDataInfo;
import javax.servlet.http.HttpServletRequest;
/** /**
* 投诉处置Controller * 投诉处置Controller
* *
...@@ -32,14 +38,20 @@ public class TComplainDealController extends BaseController ...@@ -32,14 +38,20 @@ public class TComplainDealController extends BaseController
{ {
@Autowired @Autowired
private ITComplainDealService tComplainDealService; private ITComplainDealService tComplainDealService;
@Autowired
private TokenService tokenService;
/** /**
* 查询投诉处置列表 * 查询投诉处置列表
*/ */
@PreAuthorize("@ss.hasPermi('complainDeal:complainDeal:list')") @PreAuthorize("@ss.hasPermi('complainDeal:complainDeal:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(TComplainDeal tComplainDeal) public TableDataInfo list(TComplainDeal tComplainDeal, HttpServletRequest request)
{ {
LoginUser loginUser = tokenService.getLoginUser(request);
if(loginUser.getUser().getDeptId()!=-2){
tComplainDeal.setComplainAssignEnterproseId(loginUser.getUser().getDeptId());
}
startPage(); startPage();
List<TComplainDeal> list = tComplainDealService.selectTComplainDealList(tComplainDeal); List<TComplainDeal> list = tComplainDealService.selectTComplainDealList(tComplainDeal);
return getDataTable(list); return getDataTable(list);
...@@ -87,6 +99,9 @@ public class TComplainDealController extends BaseController ...@@ -87,6 +99,9 @@ public class TComplainDealController extends BaseController
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody TComplainDeal tComplainDeal) public AjaxResult edit(@RequestBody TComplainDeal tComplainDeal)
{ {
if(tComplainDeal.getComplainStatus().equals("2")){
tComplainDeal.setDealTime(new Date());
}
return toAjax(tComplainDealService.updateTComplainDeal(tComplainDeal)); return toAjax(tComplainDealService.updateTComplainDeal(tComplainDeal));
} }
...@@ -100,4 +115,12 @@ public class TComplainDealController extends BaseController ...@@ -100,4 +115,12 @@ public class TComplainDealController extends BaseController
{ {
return toAjax(tComplainDealService.deleteTComplainDealByIds(complainDealIds)); return toAjax(tComplainDealService.deleteTComplainDealByIds(complainDealIds));
} }
@GetMapping("/getuserList/{enterproseId}")
public AjaxResult selectUserByenterproseId(@PathVariable("enterproseId") String enterproseId)
{
return AjaxResult.success(tComplainDealService.selectUserByenterproseId(enterproseId));
}
} }
...@@ -3,6 +3,7 @@ package com.zehong.web.controller.supervise; ...@@ -3,6 +3,7 @@ package com.zehong.web.controller.supervise;
import java.util.List; import java.util.List;
import com.zehong.system.domain.Listaw; import com.zehong.system.domain.Listaw;
import com.zehong.system.domain.TDetailInfoList;
import com.zehong.system.domain.TDeviceInfoS; import com.zehong.system.domain.TDeviceInfoS;
import com.zehong.system.service.ITEmployedPeopleInfoService; import com.zehong.system.service.ITEmployedPeopleInfoService;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
...@@ -80,7 +81,7 @@ public class TDeviceInfoController extends BaseController ...@@ -80,7 +81,7 @@ public class TDeviceInfoController extends BaseController
tDeviceInfoService.insertTDeviceInfo(listaw.gettDeviceInfo()); tDeviceInfoService.insertTDeviceInfo(listaw.gettDeviceInfo());
if (!"null".equals(listaw.gettDeviceInfoS())){ if (!"null".equals(listaw.gettDeviceInfoS())){
//将关联设备信息与设备进行绑定 //将关联设备信息与设备进行绑定
tDeviceInfoService.updatetRelationDeviceDetailInfo(listaw.gettDeviceInfoS(),listaw.gettDeviceInfo().getDeviceId()); tDeviceInfoService.updatetRelationDeviceDetailInfo(listaw.gettDeviceInfoS(),listaw.gettDeviceInfo().getDeviceId(),listaw.gettDeviceInfo().getRelationDeviceType());
} }
TDeviceInfo tDeviceInfo = new TDeviceInfo(); TDeviceInfo tDeviceInfo = new TDeviceInfo();
//根据企业id查询企业名称 //根据企业id查询企业名称
...@@ -173,12 +174,12 @@ public class TDeviceInfoController extends BaseController ...@@ -173,12 +174,12 @@ public class TDeviceInfoController extends BaseController
/** /**
* 查询设备已经关联的关联设备接口 * 查询设备已经关联的关联设备接口
* @param id * @param tDetailInfoList
* @return * @return
*/ */
@RequestMapping("/selectDetailInfoList") @RequestMapping("/selectDetailInfoList")
public TableDataInfo selectDetailInfoList(@RequestBody int id){ public TableDataInfo selectDetailInfoList(@RequestBody TDetailInfoList tDetailInfoList){
List<TDeviceInfoS> tDeviceInfoS = tDeviceInfoService.selectDetailInfoList(id); List<TDeviceInfoS> tDeviceInfoS = tDeviceInfoService.selectDetailInfoList(tDetailInfoList.getId(),tDetailInfoList.getRelationDeviceType());
return getDataTable(tDeviceInfoS); return getDataTable(tDeviceInfoS);
} }
...@@ -188,9 +189,15 @@ public class TDeviceInfoController extends BaseController ...@@ -188,9 +189,15 @@ public class TDeviceInfoController extends BaseController
*/ */
@RequestMapping("/updateDetailInfoList") @RequestMapping("/updateDetailInfoList")
public void updateDetailInfoList(@RequestBody Listaw listaw){ public void updateDetailInfoList(@RequestBody Listaw listaw){
Long id;
if (null!=listaw.gettDeviceInfo().getDeviceId()){
id=listaw.gettDeviceInfo().getDeviceId();
}else {
id=listaw.gettDeviceInfo().getSiteStationId();
}
if (!"null".equals(listaw.gettDeviceInfoS())){ if (!"null".equals(listaw.gettDeviceInfoS())){
//将关联设备信息与设备进行绑定 //将关联设备信息与设备进行绑定
tDeviceInfoService.updatetRelationDeviceDetailInfo(listaw.gettDeviceInfoS(),listaw.gettDeviceInfo().getDeviceId()); tDeviceInfoService.updatetRelationDeviceDetailInfo(listaw.gettDeviceInfoS(),id,listaw.gettDeviceInfo().getRelationDeviceType());
} }
} }
......
package com.zehong.web.controller.supervise; package com.zehong.web.controller.supervise;
import java.util.List; import java.util.List;
import com.zehong.system.domain.TTSiteStationInfoList;
import com.zehong.system.service.ITDeviceInfoService;
import com.zehong.system.service.ITEmployedPeopleInfoService; import com.zehong.system.service.ITEmployedPeopleInfoService;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -35,6 +38,9 @@ public class TSiteStationInfoController extends BaseController { ...@@ -35,6 +38,9 @@ public class TSiteStationInfoController extends BaseController {
@Autowired @Autowired
private ITEmployedPeopleInfoService tEmployedPeopleInfoService; private ITEmployedPeopleInfoService tEmployedPeopleInfoService;
@Autowired
private ITDeviceInfoService tDeviceInfoService;
/** /**
* 查询场站信息列表 * 查询场站信息列表
*/ */
...@@ -76,12 +82,16 @@ public class TSiteStationInfoController extends BaseController { ...@@ -76,12 +82,16 @@ public class TSiteStationInfoController extends BaseController {
@PreAuthorize("@ss.hasPermi('supervise:station:add')") @PreAuthorize("@ss.hasPermi('supervise:station:add')")
@Log(title = "场站信息", businessType = BusinessType.INSERT) @Log(title = "场站信息", businessType = BusinessType.INSERT)
@PostMapping @PostMapping
public AjaxResult add(@RequestBody TSiteStationInfo tSiteStationInfo) public void add(@RequestBody TTSiteStationInfoList tSiteStationInfos)
{ {
//根据企业id查询企业名称 //根据企业id查询企业名称
String EnterpriseName = tEmployedPeopleInfoService.selectEnterpriseName(tSiteStationInfo.getBeyondEnterpriseId()); String EnterpriseName = tEmployedPeopleInfoService.selectEnterpriseName(tSiteStationInfos.gettDeviceInfo().getBeyondEnterpriseId());
tSiteStationInfo.setBeyondEnterpriseName(EnterpriseName); tSiteStationInfos.gettDeviceInfo().setBeyondEnterpriseName(EnterpriseName);
return toAjax(tSiteStationInfoService.insertTSiteStationInfo(tSiteStationInfo)); tSiteStationInfoService.insertTSiteStationInfo(tSiteStationInfos.gettDeviceInfo());
if (!"null".equals(tSiteStationInfos.gettDeviceInfoS())){
//将关联设备信息与设备进行绑定
tDeviceInfoService.updatetRelationDeviceDetailInfo(tSiteStationInfos.gettDeviceInfoS(),tSiteStationInfos.gettDeviceInfo().getSiteStationId(),tSiteStationInfos.gettDeviceInfo().getRelationDeviceType());
}
} }
/** /**
......
package com.zehong.system.domain; package com.zehong.system.domain;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.zehong.common.annotation.Excel; import com.zehong.common.annotation.Excel;
import com.zehong.common.core.domain.BaseEntity; import com.zehong.common.core.domain.BaseEntity;
import java.util.Date;
/** /**
* 投诉处置对象 t_complain_deal * 投诉处置对象 t_complain_deal
* *
...@@ -34,8 +37,11 @@ public class TComplainDeal extends BaseEntity ...@@ -34,8 +37,11 @@ public class TComplainDeal extends BaseEntity
@Excel(name = "转办记录") @Excel(name = "转办记录")
private String transferRecord; private String transferRecord;
@Excel(name = "反馈事件")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date dealTime;
/** 办理情况 */ /** 办理情况 */
@Excel(name = "办理情况") @Excel(name = "办理反馈情况")
private String dealCondition; private String dealCondition;
/** 指派单位名称 */ /** 指派单位名称 */
...@@ -47,12 +53,12 @@ public class TComplainDeal extends BaseEntity ...@@ -47,12 +53,12 @@ public class TComplainDeal extends BaseEntity
private Long complainAssignEnterproseId; private Long complainAssignEnterproseId;
/** 指派人 */ /** 指派人 */
@Excel(name = "指派人") @Excel(name = "指派人id")
private String complainAssignManId; private Long complainAssignManId;
/** 指派人id */ /** 指派人id */
@Excel(name = "指派人id") @Excel(name = "指派人")
private Long complainAssignMan; private String complainAssignMan;
/** 任务状态:1.派发中 2.反馈 3.归档 */ /** 任务状态:1.派发中 2.反馈 3.归档 */
@Excel(name = "任务状态:1.派发中 2.反馈 3.归档") @Excel(name = "任务状态:1.派发中 2.反馈 3.归档")
...@@ -138,21 +144,21 @@ public class TComplainDeal extends BaseEntity ...@@ -138,21 +144,21 @@ public class TComplainDeal extends BaseEntity
{ {
return complainAssignEnterproseId; return complainAssignEnterproseId;
} }
public void setComplainAssignManId(String complainAssignManId) public void setComplainAssignManId(Long complainAssignManId)
{ {
this.complainAssignManId = complainAssignManId; this.complainAssignManId = complainAssignManId;
} }
public String getComplainAssignManId() public Long getComplainAssignManId()
{ {
return complainAssignManId; return complainAssignManId;
} }
public void setComplainAssignMan(Long complainAssignMan) public void setComplainAssignMan(String complainAssignMan)
{ {
this.complainAssignMan = complainAssignMan; this.complainAssignMan = complainAssignMan;
} }
public Long getComplainAssignMan() public String getComplainAssignMan()
{ {
return complainAssignMan; return complainAssignMan;
} }
...@@ -184,6 +190,14 @@ public class TComplainDeal extends BaseEntity ...@@ -184,6 +190,14 @@ public class TComplainDeal extends BaseEntity
return remarks; return remarks;
} }
public Date getDealTime() {
return dealTime;
}
public void setDealTime(Date dealTime) {
this.dealTime = dealTime;
}
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......
package com.zehong.system.domain;
public class TDetailInfoList {
private int id;
private String relationDeviceType;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getRelationDeviceType() {
return relationDeviceType;
}
public void setRelationDeviceType(String relationDeviceType) {
this.relationDeviceType = relationDeviceType;
}
@Override
public String toString() {
return "TDetailInfoList{" +
"id=" + id +
", relationDeviceType='" + relationDeviceType + '\'' +
'}';
}
}
...@@ -21,6 +21,9 @@ public class TDeviceInfo extends BaseEntity ...@@ -21,6 +21,9 @@ public class TDeviceInfo extends BaseEntity
/** 设备id */ /** 设备id */
private Long deviceId; private Long deviceId;
/** 场站id*/
private Long siteStationId;
/** 设备名称 */ /** 设备名称 */
@Excel(name = "设备名称") @Excel(name = "设备名称")
private String deviceName; private String deviceName;
...@@ -81,6 +84,26 @@ public class TDeviceInfo extends BaseEntity ...@@ -81,6 +84,26 @@ public class TDeviceInfo extends BaseEntity
/** 备注 */ /** 备注 */
private String remarks; private String remarks;
/** 关联设备类型 1设备 2场站*/
private String relationDeviceType;
public Long getSiteStationId() {
return siteStationId;
}
public void setSiteStationId(Long siteStationId) {
this.siteStationId = siteStationId;
}
public String getRelationDeviceType() {
return relationDeviceType;
}
public void setRelationDeviceType(String relationDeviceType) {
this.relationDeviceType = relationDeviceType;
}
public void setDeviceId(Long deviceId) public void setDeviceId(Long deviceId)
{ {
this.deviceId = deviceId; this.deviceId = deviceId;
...@@ -240,28 +263,26 @@ public class TDeviceInfo extends BaseEntity ...@@ -240,28 +263,26 @@ public class TDeviceInfo extends BaseEntity
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return "TDeviceInfo{" +
.append("deviceId", getDeviceId()) "deviceId=" + deviceId +
.append("deviceName", getDeviceName()) ", siteStationId=" + siteStationId +
.append("deviceCode", getDeviceCode()) ", deviceName='" + deviceName + '\'' +
.append("deviceAddr", getDeviceAddr()) ", deviceCode='" + deviceCode + '\'' +
.append("deviceModel", getDeviceModel()) ", deviceAddr='" + deviceAddr + '\'' +
.append("deviceType", getDeviceType()) ", deviceModel='" + deviceModel + '\'' +
.append("beyondEnterpriseId", getBeyondEnterpriseId()) ", deviceType='" + deviceType + '\'' +
.append("beyondEnterpriseName", getBeyondEnterpriseName()) ", beyondEnterpriseId=" + beyondEnterpriseId +
.append("longitude", getLongitude()) ", beyondEnterpriseName='" + beyondEnterpriseName + '\'' +
.append("latitude", getLatitude()) ", longitude='" + longitude + '\'' +
.append("iconUrl", getIconUrl()) ", latitude='" + latitude + '\'' +
.append("linkman", getLinkman()) ", iconUrl='" + iconUrl + '\'' +
.append("phone", getPhone()) ", linkman='" + linkman + '\'' +
.append("installationTime", getInstallationTime()) ", phone='" + phone + '\'' +
.append("inspectionTime", getInspectionTime()) ", installationTime=" + installationTime +
.append("createBy", getCreateBy()) ", inspectionTime=" + inspectionTime +
.append("createTime", getCreateTime()) ", isDel='" + isDel + '\'' +
.append("updateBy", getUpdateBy()) ", remarks='" + remarks + '\'' +
.append("updateTime", getUpdateTime()) ", relationDeviceType='" + relationDeviceType + '\'' +
.append("isDel", getIsDel()) '}';
.append("remarks", getRemarks())
.toString();
} }
} }
...@@ -57,6 +57,21 @@ public class TSiteStationInfo extends BaseEntity ...@@ -57,6 +57,21 @@ public class TSiteStationInfo extends BaseEntity
@Excel(name = "备注") @Excel(name = "备注")
private String remarks; private String remarks;
/** 关联设备类型 1设备 2场站*/
private String relationDeviceType;
public static long getSerialVersionUID() {
return serialVersionUID;
}
public String getRelationDeviceType() {
return relationDeviceType;
}
public void setRelationDeviceType(String relationDeviceType) {
this.relationDeviceType = relationDeviceType;
}
public void setSiteStationId(Long siteStationId) public void setSiteStationId(Long siteStationId)
{ {
this.siteStationId = siteStationId; this.siteStationId = siteStationId;
...@@ -159,22 +174,19 @@ public class TSiteStationInfo extends BaseEntity ...@@ -159,22 +174,19 @@ public class TSiteStationInfo extends BaseEntity
@Override @Override
public String toString() { public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) return "TSiteStationInfo{" +
.append("siteStationId", getSiteStationId()) "siteStationId=" + siteStationId +
.append("siteStationType", getSiteStationType()) ", siteStationType='" + siteStationType + '\'' +
.append("siteStationName", getSiteStationName()) ", siteStationName='" + siteStationName + '\'' +
.append("buildDate", getBuildDate()) ", buildDate='" + buildDate + '\'' +
.append("buildUnit", getBuildUnit()) ", buildUnit='" + buildUnit + '\'' +
.append("beyondEnterpriseId", getBeyondEnterpriseId()) ", beyondEnterpriseId=" + beyondEnterpriseId +
.append("beyondEnterpriseName", getBeyondEnterpriseName()) ", beyondEnterpriseName='" + beyondEnterpriseName + '\'' +
.append("longitude", getLongitude()) ", longitude=" + longitude +
.append("latitude", getLatitude()) ", latitude=" + latitude +
.append("createBy", getCreateBy()) ", isDel='" + isDel + '\'' +
.append("createTime", getCreateTime()) ", remarks='" + remarks + '\'' +
.append("updateBy", getUpdateBy()) ", relationDeviceType='" + relationDeviceType + '\'' +
.append("updateTime", getUpdateTime()) '}';
.append("isDel", getIsDel())
.append("remarks", getRemarks())
.toString();
} }
} }
package com.zehong.system.domain;
import java.util.List;
public class TTSiteStationInfoList {
private TSiteStationInfo tDeviceInfo;
private List<TDeviceInfoS> tDeviceInfoS;
public TSiteStationInfo gettDeviceInfo() {
return tDeviceInfo;
}
public void settDeviceInfo(TSiteStationInfo tDeviceInfo) {
this.tDeviceInfo = tDeviceInfo;
}
public List<TDeviceInfoS> gettDeviceInfoS() {
return tDeviceInfoS;
}
public void settDeviceInfoS(List<TDeviceInfoS> tDeviceInfoS) {
this.tDeviceInfoS = tDeviceInfoS;
}
@Override
public String toString() {
return "TTSiteStationInfoList{" +
"tDeviceInfo=" + tDeviceInfo +
", tDeviceInfoS=" + tDeviceInfoS +
'}';
}
}
package com.zehong.system.mapper; package com.zehong.system.mapper;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Objects;
import com.zehong.system.domain.TComplainDeal; import com.zehong.system.domain.TComplainDeal;
import org.apache.ibatis.annotations.Param;
/** /**
* 投诉处置Mapper接口 * 投诉处置Mapper接口
...@@ -58,4 +62,11 @@ public interface TComplainDealMapper ...@@ -58,4 +62,11 @@ public interface TComplainDealMapper
* @return 结果 * @return 结果
*/ */
public int deleteTComplainDealByIds(Long[] complainDealIds); public int deleteTComplainDealByIds(Long[] complainDealIds);
/**
* 查询公司下用户
* @param enterproseId
* @return
*/
public List<Map<String,Object>> selectUserByenterproseId(@Param("enterproseId")String enterproseId);
} }
...@@ -96,14 +96,14 @@ public interface TDeviceInfoMapper ...@@ -96,14 +96,14 @@ public interface TDeviceInfoMapper
* 将关联设备信息与设备进行绑定 * 将关联设备信息与设备进行绑定
* @param gettDeviceInfoS * @param gettDeviceInfoS
*/ */
void updatetRelationDeviceDetailInfo(@Param("gettDeviceInfoS")List<TDeviceInfoS> gettDeviceInfoS,@Param("id") Long id); void updatetRelationDeviceDetailInfo(@Param("gettDeviceInfoS")List<TDeviceInfoS> gettDeviceInfoS,@Param("id") Long id,@Param("relationDevicetype") String relationDevicetype);
/** /**
* 查询设备已经关联的关联设备 * 查询设备已经关联的关联设备
* @param id * @param id
* @return * @return
*/ */
List<TDeviceInfoS> selectDetailInfoList(int id); List<TDeviceInfoS> selectDetailInfoList(@Param("id")int id,@Param("relationDeviceType")String relationDeviceType);
/** /**
* 解绑 设备与关联设备关系 * 解绑 设备与关联设备关系
......
package com.zehong.system.service; package com.zehong.system.service;
import java.util.List; import java.util.List;
import java.util.Map;
import com.zehong.system.domain.TComplainDeal; import com.zehong.system.domain.TComplainDeal;
/** /**
...@@ -58,4 +60,6 @@ public interface ITComplainDealService ...@@ -58,4 +60,6 @@ public interface ITComplainDealService
* @return 结果 * @return 结果
*/ */
public int deleteTComplainDealById(Long complainDealId); public int deleteTComplainDealById(Long complainDealId);
public List<Map<String,Object>> selectUserByenterproseId(String enterproseId);
} }
...@@ -96,14 +96,14 @@ public interface ITDeviceInfoService ...@@ -96,14 +96,14 @@ public interface ITDeviceInfoService
* 将关联设备信息与设备进行绑定 * 将关联设备信息与设备进行绑定
* @param gettDeviceInfoS * @param gettDeviceInfoS
*/ */
void updatetRelationDeviceDetailInfo(@Param("gettDeviceInfoS") List<TDeviceInfoS> gettDeviceInfoS,@Param("id") Long id); void updatetRelationDeviceDetailInfo(@Param("gettDeviceInfoS") List<TDeviceInfoS> gettDeviceInfoS,@Param("id") Long id,@Param("relationDevicetype") String relationDevicetype);
/** /**
* 查询设备已经关联的关联设备 * 查询设备已经关联的关联设备
* @param id * @param id
* @return * @return
*/ */
List<TDeviceInfoS> selectDetailInfoList(int id); List<TDeviceInfoS> selectDetailInfoList(@Param("id") int id,@Param("relationDeviceType")String relationDeviceType);
/** /**
* 解绑 设备与关联设备关系 * 解绑 设备与关联设备关系
......
package com.zehong.system.service.impl; package com.zehong.system.service.impl;
import java.util.List; import java.util.List;
import java.util.Map;
import com.zehong.common.utils.DateUtils; import com.zehong.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -93,4 +95,8 @@ public class TComplainDealServiceImpl implements ITComplainDealService ...@@ -93,4 +95,8 @@ public class TComplainDealServiceImpl implements ITComplainDealService
{ {
return tComplainDealMapper.deleteTComplainDealById(complainDealId); return tComplainDealMapper.deleteTComplainDealById(complainDealId);
} }
@Override
public List<Map<String,Object>> selectUserByenterproseId(String enterproseId){
return tComplainDealMapper.selectUserByenterproseId(enterproseId);
}
} }
...@@ -149,8 +149,8 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService ...@@ -149,8 +149,8 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
* @param gettDeviceInfoS * @param gettDeviceInfoS
*/ */
@Override @Override
public void updatetRelationDeviceDetailInfo(@Param("gettDeviceInfoS")List<TDeviceInfoS> gettDeviceInfoS,@Param("id") Long id) { public void updatetRelationDeviceDetailInfo(@Param("gettDeviceInfoS")List<TDeviceInfoS> gettDeviceInfoS,@Param("id") Long id,@Param("relationDevicetype") String relationDevicetype) {
tDeviceInfoMapper.updatetRelationDeviceDetailInfo(gettDeviceInfoS,id); tDeviceInfoMapper.updatetRelationDeviceDetailInfo(gettDeviceInfoS,id,relationDevicetype);
} }
/** /**
...@@ -159,8 +159,8 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService ...@@ -159,8 +159,8 @@ public class TDeviceInfoServiceImpl implements ITDeviceInfoService
* @return * @return
*/ */
@Override @Override
public List<TDeviceInfoS> selectDetailInfoList(int id) { public List<TDeviceInfoS> selectDetailInfoList(@Param("id") int id,@Param("relationDeviceType")String relationDeviceType) {
List<TDeviceInfoS> tDeviceInfoS = tDeviceInfoMapper.selectDetailInfoList(id); List<TDeviceInfoS> tDeviceInfoS = tDeviceInfoMapper.selectDetailInfoList(id,relationDeviceType);
return tDeviceInfoS; return tDeviceInfoS;
} }
......
package com.zehong.system.service.impl; package com.zehong.system.service.impl;
import java.util.List;
import com.zehong.common.utils.DateUtils; import com.zehong.common.utils.DateUtils;
import com.zehong.common.utils.SecurityUtils; import com.zehong.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired; import com.zehong.common.utils.StringUtils;
import org.springframework.stereotype.Service; import com.zehong.system.domain.TEnterpriseInfo;
import com.zehong.system.mapper.TWorkOrderMapper;
import com.zehong.system.domain.TWorkOrder; import com.zehong.system.domain.TWorkOrder;
import com.zehong.system.mapper.TEnterpriseInfoMapper;
import com.zehong.system.mapper.TWorkOrderMapper;
import com.zehong.system.service.ITWorkOrderService; import com.zehong.system.service.ITWorkOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* 燃气任务Service业务层处理 * 燃气任务Service业务层处理
...@@ -21,6 +25,9 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService ...@@ -21,6 +25,9 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
@Autowired @Autowired
private TWorkOrderMapper tWorkOrderMapper; private TWorkOrderMapper tWorkOrderMapper;
@Autowired
private TEnterpriseInfoMapper tEnterpriseInfoMapper;
/** /**
* 查询燃气任务 * 查询燃气任务
* *
...@@ -56,6 +63,21 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService ...@@ -56,6 +63,21 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
{ {
tWorkOrder.setCreateTime(DateUtils.getNowDate()); tWorkOrder.setCreateTime(DateUtils.getNowDate());
tWorkOrder.setCreateBy(SecurityUtils.getUsername()); tWorkOrder.setCreateBy(SecurityUtils.getUsername());
Long enterpriseId = SecurityUtils.getLoginUser().getUser().getDeptId();
if(null != enterpriseId){
if("-2".equals(enterpriseId.toString())){
tWorkOrder.setWorkCreateEnterpriseId("-2");
tWorkOrder.setWorkCreateEnterpriseName("政府部门");
}else{
TEnterpriseInfo enterpriseInfo = tEnterpriseInfoMapper.selectTEnterpriseInfoById(enterpriseId);
if(null != enterpriseInfo && StringUtils.isNotEmpty(enterpriseInfo.getEnterpriseName())){
tWorkOrder.setWorkCreateEnterpriseId(enterpriseId.toString());
tWorkOrder.setWorkCreateEnterpriseName(enterpriseInfo.getEnterpriseName());
}
}
}
return tWorkOrderMapper.insertTWorkOrder(tWorkOrder); return tWorkOrderMapper.insertTWorkOrder(tWorkOrder);
} }
...@@ -70,6 +92,9 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService ...@@ -70,6 +92,9 @@ public class TWorkOrderServiceImpl implements ITWorkOrderService
{ {
tWorkOrder.setUpdateTime(DateUtils.getNowDate()); tWorkOrder.setUpdateTime(DateUtils.getNowDate());
tWorkOrder.setUpdateBy(SecurityUtils.getUsername()); tWorkOrder.setUpdateBy(SecurityUtils.getUsername());
/*if(StringUtils.isNotEmpty(tWorkOrder.getIconUrl()) || StringUtils.isNotEmpty(tWorkOrder.getRectificationResult())){
tWorkOrder.setWorkStatus("2");
}*/
return tWorkOrderMapper.updateTWorkOrder(tWorkOrder); return tWorkOrderMapper.updateTWorkOrder(tWorkOrder);
} }
......
...@@ -10,6 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -10,6 +10,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="complainPhone" column="complain_phone" /> <result property="complainPhone" column="complain_phone" />
<result property="complainMatter" column="complain_matter" /> <result property="complainMatter" column="complain_matter" />
<result property="transferRecord" column="transfer_record" /> <result property="transferRecord" column="transfer_record" />
<result property="dealTime" column="deal_time" />
<result property="dealCondition" column="deal_condition" /> <result property="dealCondition" column="deal_condition" />
<result property="complainAssignEnterproseName" column="complain_assign_enterprose_name" /> <result property="complainAssignEnterproseName" column="complain_assign_enterprose_name" />
<result property="complainAssignEnterproseId" column="complain_assign_enterprose_id" /> <result property="complainAssignEnterproseId" column="complain_assign_enterprose_id" />
...@@ -25,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -25,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectTComplainDealVo"> <sql id="selectTComplainDealVo">
select complain_deal_id, complain_name, complain_phone, complain_matter, transfer_record, deal_condition, complain_assign_enterprose_name, complain_assign_enterprose_id, complain_assign_man_id, complain_assign_man, complain_status, create_by, create_time, update_by, update_time, is_del, remarks from t_complain_deal select complain_deal_id, complain_name, complain_phone, complain_matter, transfer_record, deal_time,deal_condition, complain_assign_enterprose_name, complain_assign_enterprose_id, complain_assign_man_id, complain_assign_man, complain_status, create_by, create_time, update_by, update_time, is_del, remarks from t_complain_deal
</sql> </sql>
<select id="selectTComplainDealList" parameterType="TComplainDeal" resultMap="TComplainDealResult"> <select id="selectTComplainDealList" parameterType="TComplainDeal" resultMap="TComplainDealResult">
...@@ -58,6 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -58,6 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="complainPhone != null">complain_phone,</if> <if test="complainPhone != null">complain_phone,</if>
<if test="complainMatter != null">complain_matter,</if> <if test="complainMatter != null">complain_matter,</if>
<if test="transferRecord != null">transfer_record,</if> <if test="transferRecord != null">transfer_record,</if>
<if test="dealTime !=null">deal_time,</if>
<if test="dealCondition != null">deal_condition,</if> <if test="dealCondition != null">deal_condition,</if>
<if test="complainAssignEnterproseName != null">complain_assign_enterprose_name,</if> <if test="complainAssignEnterproseName != null">complain_assign_enterprose_name,</if>
<if test="complainAssignEnterproseId != null">complain_assign_enterprose_id,</if> <if test="complainAssignEnterproseId != null">complain_assign_enterprose_id,</if>
...@@ -76,6 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -76,6 +78,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="complainPhone != null">#{complainPhone},</if> <if test="complainPhone != null">#{complainPhone},</if>
<if test="complainMatter != null">#{complainMatter},</if> <if test="complainMatter != null">#{complainMatter},</if>
<if test="transferRecord != null">#{transferRecord},</if> <if test="transferRecord != null">#{transferRecord},</if>
<if test="dealTime != null">#{dealTime},</if>
<if test="dealCondition != null">#{dealCondition},</if> <if test="dealCondition != null">#{dealCondition},</if>
<if test="complainAssignEnterproseName != null">#{complainAssignEnterproseName},</if> <if test="complainAssignEnterproseName != null">#{complainAssignEnterproseName},</if>
<if test="complainAssignEnterproseId != null">#{complainAssignEnterproseId},</if> <if test="complainAssignEnterproseId != null">#{complainAssignEnterproseId},</if>
...@@ -98,6 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -98,6 +101,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="complainPhone != null">complain_phone = #{complainPhone},</if> <if test="complainPhone != null">complain_phone = #{complainPhone},</if>
<if test="complainMatter != null">complain_matter = #{complainMatter},</if> <if test="complainMatter != null">complain_matter = #{complainMatter},</if>
<if test="transferRecord != null">transfer_record = #{transferRecord},</if> <if test="transferRecord != null">transfer_record = #{transferRecord},</if>
<if test="dealTime != null">deal_time = #{dealTime},</if>
<if test="dealCondition != null">deal_condition = #{dealCondition},</if> <if test="dealCondition != null">deal_condition = #{dealCondition},</if>
<if test="complainAssignEnterproseName != null">complain_assign_enterprose_name = #{complainAssignEnterproseName},</if> <if test="complainAssignEnterproseName != null">complain_assign_enterprose_name = #{complainAssignEnterproseName},</if>
<if test="complainAssignEnterproseId != null">complain_assign_enterprose_id = #{complainAssignEnterproseId},</if> <if test="complainAssignEnterproseId != null">complain_assign_enterprose_id = #{complainAssignEnterproseId},</if>
...@@ -124,4 +128,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -124,4 +128,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
#{complainDealId} #{complainDealId}
</foreach> </foreach>
</delete> </delete>
<select id="selectUserByenterproseId" resultType="java.util.HashMap">
SELECT user_id as id ,nick_name as nickName FROM sys_user
WHERE del_flag!=2 and dept_id = #{enterproseId}
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -176,7 +176,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -176,7 +176,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--查询设备已经关联的关联设备--> <!--查询设备已经关联的关联设备-->
<select id="selectDetailInfoList" resultMap="TDeviceInfoResultS"> <select id="selectDetailInfoList" resultMap="TDeviceInfoResultS">
select relation_device_detail_id,relation_device_id,device_name,device_model,iot_no,remarks, (CASE device_type WHEN '1' THEN '压力表' WHEN '2' THEN '流量计' end) as device_type select relation_device_detail_id,relation_device_id,device_name,device_model,iot_no,remarks, (CASE device_type WHEN '1' THEN '压力表' WHEN '2' THEN '流量计' end) as device_type
from t_relation_device_detail_info where relation_device_id=#{id} from t_relation_device_detail_info where relation_device_id=#{id} and relation_device_type=#{relationDeviceType}
</select> </select>
<!--关联设备数据删除接口--> <!--关联设备数据删除接口-->
...@@ -195,7 +195,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -195,7 +195,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--将关联设备信息与设备进行绑定--> <!--将关联设备信息与设备进行绑定-->
<update id="updatetRelationDeviceDetailInfo" parameterType="java.util.List"> <update id="updatetRelationDeviceDetailInfo" parameterType="java.util.List">
update t_relation_device_detail_info set relation_device_id = #{id} update t_relation_device_detail_info set relation_device_id = #{id} ,relation_device_type =#{relationDevicetype}
where where
relation_device_detail_id in relation_device_detail_id in
<foreach collection="gettDeviceInfoS" item="items" index="key" open="(" separator="," close=")"> <foreach collection="gettDeviceInfoS" item="items" index="key" open="(" separator="," close=")">
...@@ -205,7 +205,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -205,7 +205,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<!--解绑 设备与关联设备关系--> <!--解绑 设备与关联设备关系-->
<update id="deleteDeviceDetailInfo"> <update id="deleteDeviceDetailInfo">
update t_relation_device_detail_info set relation_device_id='0' where relation_device_detail_id=#{deviceId} update t_relation_device_detail_info set relation_device_id=NULL where relation_device_detail_id=#{deviceId}
</update> </update>
</mapper> </mapper>
...@@ -34,39 +34,71 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -34,39 +34,71 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectTWorkOrderVo"> <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 SELECT
workOrder.work_id,
workOrder.work_title,
workOrder.work_type,
workOrder.work_content,
workOrder.work_create_enterprise_name,
workOrder.work_create_enterprise_id,
info.enterprise_name AS work_assign_enterprose_name,
workOrder.work_assign_enterprose_id,
workOrder.work_assign_man_id,
usr.user_name AS work_assign_man,
workOrder.work_status,
workOrder.inspection_date,
workOrder.inspection_route,
workOrder.problem_description,
workOrder.icon_url,
workOrder.rectification_plan,
workOrder.rectification_result,
workOrder.responsible_unit,
workOrder.responsible_person,
workOrder.expiry_date,
workOrder.create_by,
workOrder.create_time,
workOrder.update_by,
workOrder.update_time,
workOrder.is_del,
workOrder.remarks
FROM
t_work_order workOrder
LEFT JOIN sys_user usr ON usr.user_id = workOrder.work_assign_man_id
LEFT JOIN t_enterprise_info info ON info.enterprise_id = workOrder.work_assign_enterprose_id
</sql> </sql>
<select id="selectTWorkOrderList" parameterType="TWorkOrder" resultMap="TWorkOrderResult"> <select id="selectTWorkOrderList" parameterType="TWorkOrder" resultMap="TWorkOrderResult">
<include refid="selectTWorkOrderVo"/> <include refid="selectTWorkOrderVo"/>
<where> <where>
<if test="workTitle != null and workTitle != ''"> and work_title like concat('%', #{workTitle}, '%')</if> <if test="workTitle != null and workTitle != ''"> and workOrder.work_title like concat('%', #{workTitle}, '%')</if>
<if test="workType != null and workType != ''"> and work_type = #{workType}</if> <if test="workType != null and workType != ''"> and workOrder.work_type = #{workType}</if>
<if test="workContent != null and workContent != ''"> and work_content = #{workContent}</if> <if test="workContent != null and workContent != ''"> and workOrder.work_content = #{workContent}</if>
<if test="workCreateEnterpriseName != null and workCreateEnterpriseName != ''"> and work_create_enterprise_name like concat('%', #{workCreateEnterpriseName}, '%')</if> <if test="workCreateEnterpriseName != null and workCreateEnterpriseName != ''"> and workOrder.work_create_enterprise_name like concat('%', #{workCreateEnterpriseName}, '%')</if>
<if test="workCreateEnterpriseId != null and workCreateEnterpriseId != ''"> and work_create_enterprise_id = #{workCreateEnterpriseId}</if> <if test="workCreateEnterpriseId != null and workCreateEnterpriseId != ''"> and workOrder.work_create_enterprise_id = #{workCreateEnterpriseId}</if>
<if test="workAssignEnterproseName != null and workAssignEnterproseName != ''"> and work_assign_enterprose_name like concat('%', #{workAssignEnterproseName}, '%')</if> <if test="workAssignEnterproseName != null and workAssignEnterproseName != ''"> and info.work_assign_enterprose_name like concat('%', #{workAssignEnterproseName}, '%')</if>
<if test="workAssignEnterproseId != null "> and work_assign_enterprose_id = #{workAssignEnterproseId}</if> <if test="workAssignEnterproseId != null "> and workOrder.work_assign_enterprose_id = #{workAssignEnterproseId}</if>
<if test="workAssignManId != null "> and work_assign_man_id = #{workAssignManId}</if> <if test="workAssignManId != null "> and workOrder.work_assign_man_id = #{workAssignManId}</if>
<if test="workAssignMan != null and workAssignMan != ''"> and work_assign_man = #{workAssignMan}</if> <if test="workAssignMan != null and workAssignMan != ''"> and user.work_assign_man = #{workAssignMan}</if>
<if test="workStatus != null and workStatus != ''"> and work_status = #{workStatus}</if> <if test="workStatus != null and workStatus != ''"> and workOrder.work_status = #{workStatus}</if>
<if test="inspectionDate != null "> and inspection_date = #{inspectionDate}</if> <if test="inspectionDate != null "> and workOrder.inspection_date = #{inspectionDate}</if>
<if test="inspectionRoute != null and inspectionRoute != ''"> and inspection_route = #{inspectionRoute}</if> <if test="inspectionRoute != null and inspectionRoute != ''"> and workOrder.inspection_route = #{inspectionRoute}</if>
<if test="problemDescription != null and problemDescription != ''"> and problem_description = #{problemDescription}</if> <if test="problemDescription != null and problemDescription != ''"> and workOrder.problem_description = #{problemDescription}</if>
<if test="iconUrl != null and iconUrl != ''"> and icon_url = #{iconUrl}</if> <if test="iconUrl != null and iconUrl != ''"> and workOrder.icon_url = #{iconUrl}</if>
<if test="rectificationPlan != null and rectificationPlan != ''"> and rectification_plan = #{rectificationPlan}</if> <if test="rectificationPlan != null and rectificationPlan != ''"> and workOrder.rectification_plan = #{rectificationPlan}</if>
<if test="rectificationResult != null and rectificationResult != ''"> and rectification_result = #{rectificationResult}</if> <if test="rectificationResult != null and rectificationResult != ''"> and workOrder.rectification_result = #{rectificationResult}</if>
<if test="responsibleUnit != null and responsibleUnit != ''"> and responsible_unit = #{responsibleUnit}</if> <if test="responsibleUnit != null and responsibleUnit != ''"> and workOrder.responsible_unit = #{responsibleUnit}</if>
<if test="responsiblePerson != null and responsiblePerson != ''"> and responsible_person = #{responsiblePerson}</if> <if test="responsiblePerson != null and responsiblePerson != ''"> and workOrder.responsible_person = #{responsiblePerson}</if>
<if test="expiryDate != null "> and expiry_date = #{expiryDate}</if> <if test="expiryDate != null "> and workOrder.expiry_date = #{expiryDate}</if>
<if test="isDel != null and isDel != ''"> and is_del = #{isDel}</if> <if test="isDel != null and isDel != ''"> and workOrder.is_del = #{isDel}</if>
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if> <if test="remarks != null and remarks != ''"> and workOrder.remarks = #{remarks}</if>
</where> </where>
ORDER BY workOrder.create_time DESC
</select> </select>
<select id="selectTWorkOrderById" parameterType="Long" resultMap="TWorkOrderResult"> <select id="selectTWorkOrderById" parameterType="Long" resultMap="TWorkOrderResult">
<include refid="selectTWorkOrderVo"/> <include refid="selectTWorkOrderVo"/>
where work_id = #{workId} where workOrder.work_id = #{workId}
</select> </select>
<insert id="insertTWorkOrder" parameterType="TWorkOrder" useGeneratedKeys="true" keyProperty="workId"> <insert id="insertTWorkOrder" parameterType="TWorkOrder" useGeneratedKeys="true" keyProperty="workId">
...@@ -137,6 +169,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -137,6 +169,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="workCreateEnterpriseId != null">work_create_enterprise_id = #{workCreateEnterpriseId},</if> <if test="workCreateEnterpriseId != null">work_create_enterprise_id = #{workCreateEnterpriseId},</if>
<if test="workAssignEnterproseName != null">work_assign_enterprose_name = #{workAssignEnterproseName},</if> <if test="workAssignEnterproseName != null">work_assign_enterprose_name = #{workAssignEnterproseName},</if>
<if test="workAssignEnterproseId != null">work_assign_enterprose_id = #{workAssignEnterproseId},</if> <if test="workAssignEnterproseId != null">work_assign_enterprose_id = #{workAssignEnterproseId},</if>
<if test="workAssignManId == null and workAssignMan == ''">work_assign_man_id = null,</if>
<if test="workAssignManId != null">work_assign_man_id = #{workAssignManId},</if> <if test="workAssignManId != null">work_assign_man_id = #{workAssignManId},</if>
<if test="workAssignMan != null">work_assign_man = #{workAssignMan},</if> <if test="workAssignMan != null">work_assign_man = #{workAssignMan},</if>
<if test="workStatus != null">work_status = #{workStatus},</if> <if test="workStatus != null">work_status = #{workStatus},</if>
......
{ {
"name": "zehong", "name": "zehong",
"version": "3.5.0", "version": "3.5.0",
"description": "泽宏管理系统", "description": "智慧管网管理系统",
"author": "泽宏", "author": "泽宏",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
......
...@@ -51,3 +51,10 @@ export function exportComplainDeal(query) { ...@@ -51,3 +51,10 @@ export function exportComplainDeal(query) {
params: query params: query
}) })
} }
export function getUserList(cId) {
return request({
url: '/complainDeal/getuserList/' + cId,
method: 'get'
})
}
...@@ -56,6 +56,9 @@ ...@@ -56,6 +56,9 @@
.el-dialog:not(.is-fullscreen) { .el-dialog:not(.is-fullscreen) {
margin-top: 6vh !important; margin-top: 6vh !important;
} }
.el-dialog__header{
border-bottom:1px solid #cccccc;
}
.bigwindow { .bigwindow {
// 全局表格样式 // 全局表格样式
.el-table { .el-table {
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<div @click="pos" class="positionBtn pos"> <div @click="pos" class="positionBtn pos">
<el-button type="primary" size="mini" icon="el-icon-position" <el-button type="primary" size="mini" icon="el-icon-position"
>定位</el-button > 确定 </el-button
> >
</div> </div>
</template> </template>
...@@ -78,6 +78,7 @@ export default { ...@@ -78,6 +78,7 @@ export default {
if (newValue) { if (newValue) {
this.init(); this.init();
} else { } else {
this.map.destroy(); this.map.destroy();
this.searchinput=""; this.searchinput="";
} }
...@@ -101,10 +102,11 @@ export default { ...@@ -101,10 +102,11 @@ export default {
this.map.mouseAddMarker(); this.map.mouseAddMarker();
} }
} else { } else {
console.log(this.pipePath.length)
if (this.pipePath.length > 0) { if (this.pipePath.length > 0) {
this.map.addPipeLine({ path: this.pipePath }); this.map.addPipeLine({ path: this.pipePath });
} else { } else {
this.mouseAddPipeline(); this.map.mouseAddPipeline();
} }
} }
}); });
...@@ -119,7 +121,6 @@ export default { ...@@ -119,7 +121,6 @@ export default {
pos() { pos() {
this.path = this.map.getPath(); this.path = this.map.getPath();
this.$emit("getPath", this.path); this.$emit("getPath", this.path);
console.log(this.path);
if (this.path?.length > 0) { if (this.path?.length > 0) {
this.$emit("update:dialogVisible", false); this.$emit("update:dialogVisible", false);
} }
......
...@@ -35,7 +35,7 @@ export default { ...@@ -35,7 +35,7 @@ export default {
}, },
data() { data() {
return { return {
title: '泽宏管理系统', title: '智慧管网管理系统',
logo: logoImg logo: logoImg
} }
} }
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2022-01-07 11:29:13 * @Date: 2022-01-07 11:29:13
* @LastEditTime: 2022-02-17 11:35:38 * @LastEditTime: 2022-02-18 17:29:27
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
* @FilePath: /gassafety-progress/gassafetyprogress-web/src/main.js * @FilePath: /gassafety-progress/gassafetyprogress-web/src/main.js
*/ */
import Vue from 'vue' import Vue from "vue";
import Cookies from 'js-cookie' import Cookies from "js-cookie";
import Element from 'element-ui' import Element from "element-ui";
import './assets/styles/element-variables.scss' import "./assets/styles/element-variables.scss";
import '@/assets/styles/index.scss' // global css import "@/assets/styles/index.scss"; // global css
import '@/assets/styles/zehong.scss' // zehong css import "@/assets/styles/zehong.scss"; // zehong css
import './assets/css/font.css' import "./assets/css/font.css";
import './assets/styles/all.scss' import "./assets/styles/all.scss";
import App from './App' import App from "./App";
import store from './store' import store from "./store";
import router from './router' import router from "./router";
import permission from './directive/permission' import permission from "./directive/permission";
import * as echarts from 'echarts' import * as echarts from "echarts";
import './assets/icons' // icon import "./assets/icons"; // icon
import './permission' // permission control import "./permission"; // permission control
import { getDicts } from "@/api/system/dict/data"; import { getDicts } from "@/api/system/dict/data";
import { getConfigKey } from "@/api/system/config"; import { getConfigKey } from "@/api/system/config";
import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, download, handleTree } from "@/utils/zehong"; import {
parseTime,
resetForm,
addDateRange,
selectDictLabel,
selectDictLabels,
download,
handleTree,
} from "@/utils/zehong";
import Pagination from "@/components/Pagination"; import Pagination from "@/components/Pagination";
// 自定义表格工具扩展 // 自定义表格工具扩展
import RightToolbar from "@/components/RightToolbar" import RightToolbar from "@/components/RightToolbar";
// 全局方法挂载 // 全局方法挂载
Vue.prototype.$echarts = echarts Vue.prototype.$echarts = echarts;
Vue.prototype.$Vue = Vue; Vue.prototype.$Vue = Vue;
Vue.prototype.getDicts = getDicts Vue.prototype.getDicts = getDicts;
Vue.prototype.getConfigKey = getConfigKey Vue.prototype.getConfigKey = getConfigKey;
Vue.prototype.parseTime = parseTime Vue.prototype.parseTime = parseTime;
Vue.prototype.resetForm = resetForm Vue.prototype.resetForm = resetForm;
Vue.prototype.addDateRange = addDateRange Vue.prototype.addDateRange = addDateRange;
Vue.prototype.selectDictLabel = selectDictLabel Vue.prototype.selectDictLabel = selectDictLabel;
Vue.prototype.selectDictLabels = selectDictLabels Vue.prototype.selectDictLabels = selectDictLabels;
Vue.prototype.download = download Vue.prototype.download = download;
Vue.prototype.handleTree = handleTree Vue.prototype.handleTree = handleTree;
Vue.prototype.msgSuccess = function (msg) { Vue.prototype.msgSuccess = function (msg) {
this.$message({ showClose: true, message: msg, type: "success" }); this.$message({ showClose: true, message: msg, type: "success" });
} };
Vue.prototype.msgError = function (msg) { Vue.prototype.msgError = function (msg) {
this.$message({ showClose: true, message: msg, type: "error" }); this.$message({ showClose: true, message: msg, type: "error" });
} };
Vue.prototype.msgInfo = function (msg) { Vue.prototype.msgInfo = function (msg) {
this.$message.info(msg); this.$message.info(msg);
} };
// 全局组件挂载 // 全局组件挂载
Vue.component('Pagination', Pagination) Vue.component("Pagination", Pagination);
Vue.component('RightToolbar', RightToolbar) Vue.component("RightToolbar", RightToolbar);
Vue.use(permission) Vue.use(permission);
/** /**
* If you don't want to use mock-server * If you don't want to use mock-server
...@@ -72,16 +79,19 @@ Vue.use(permission) ...@@ -72,16 +79,19 @@ Vue.use(permission)
* Currently MockJs will be used in the production environment, * Currently MockJs will be used in the production environment,
* please remove it before going online! ! ! * please remove it before going online! ! !
*/ */
// dialog只允许点关闭或者取消按钮关闭
Element.Dialog.props.closeOnClickModal = false;
Element.Dialog.props.closeOnPressEscape = false;
Vue.use(Element, { Vue.use(Element, {
size: Cookies.get('size') || 'medium' // set element-ui default size size: Cookies.get("size") || "medium", // set element-ui default size
}) });
console.log(Element);
Vue.config.productionTip = false Vue.config.productionTip = false;
new Vue({ new Vue({
el: '#app', el: "#app",
router, router,
store, store,
render: h => h(App) render: (h) => h(App),
}) });
module.exports = { module.exports = {
title: '泽宏管理系统', title: '智慧管网管理系统',
/** /**
* 侧边栏主题 深色主题theme-dark,浅色主题theme-light * 侧边栏主题 深色主题theme-dark,浅色主题theme-light
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="投诉人姓名" prop="complainName"> <el-form-item label="投诉人" prop="complainName">
<el-input <el-input
v-model="queryParams.complainName" v-model="queryParams.complainName"
placeholder="请输入投诉人姓名" placeholder="请输入投诉人姓名"
...@@ -10,101 +10,40 @@ ...@@ -10,101 +10,40 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="投诉人电话" prop="complainPhone">
<el-input <el-form-item label="指派单位" prop="complainAssignEnterproseId" v-if="deptId==-2" >
v-model="queryParams.complainPhone" <el-select v-model="queryParams.complainAssignEnterproseId" placeholder="请选择预案等级" clearable size="small">
placeholder="请输入投诉人电话" <el-option
clearable v-for = "dict in enterpriseList"
size="small" :key = "dict.enterpriseId"
@keyup.enter.native="handleQuery" :label = "dict.enterpriseName"
/> :value = "dict.enterpriseId"
</el-form-item>
<el-form-item label="投诉事项" prop="complainMatter">
<el-input
v-model="queryParams.complainMatter"
placeholder="请输入投诉事项"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="转办记录" prop="transferRecord">
<el-input
v-model="queryParams.transferRecord"
placeholder="请输入转办记录"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="办理情况" prop="dealCondition">
<el-input
v-model="queryParams.dealCondition"
placeholder="请输入办理情况"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="指派单位名称" prop="complainAssignEnterproseName">
<el-input
v-model="queryParams.complainAssignEnterproseName"
placeholder="请输入指派单位名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="指派单位id" prop="complainAssignEnterproseId">
<el-input
v-model="queryParams.complainAssignEnterproseId"
placeholder="请输入指派单位id"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="指派人" prop="complainAssignManId">
<el-input
v-model="queryParams.complainAssignManId"
placeholder="请输入指派人"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="指派人id" prop="complainAssignMan">
<el-input
v-model="queryParams.complainAssignMan"
placeholder="请输入指派人id"
clearable
size="small"
@keyup.enter.native="handleQuery"
/> />
</el-form-item>
<el-form-item label="任务状态:1.派发中 2.反馈 3.归档" prop="complainStatus">
<el-select v-model="queryParams.complainStatus" placeholder="请选择任务状态:1.派发中 2.反馈 3.归档" clearable size="small">
<el-option label="请选择字典生成" value="" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="是否删除(0正常,1删除)" prop="isDel">
<el-input <!--<el-form-item label="指派人" prop="complainAssignManId">-->
v-model="queryParams.isDel" <!--<el-select v-model="queryParams.complainAssignManId" placeholder="请选择预案等级" clearable size="small">-->
placeholder="请输入是否删除(0正常,1删除)" <!--<el-option-->
clearable <!--v-for = "dict in userList"-->
size="small" <!--:key = "dict.id"-->
@keyup.enter.native="handleQuery" <!--:label = "dict.nickName"-->
/> <!--:value = "dict.id"-->
</el-form-item> <!--/>-->
<el-form-item label="备注" prop="remarks"> <!--</el-select>-->
<el-input <!--</el-form-item>-->
v-model="queryParams.remarks" <el-form-item label="任务状态" prop="complainStatus">
placeholder="请输入备注" <el-select v-model="queryParams.complainStatus" placeholder="请选择任务状态" clearable size="small">
clearable <el-option
size="small" v-for="dict in taskStateOptions"
@keyup.enter.native="handleQuery" :key="dict.dictValue"
/> :label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
...@@ -115,6 +54,7 @@ ...@@ -115,6 +54,7 @@
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="primary" type="primary"
v-if="deptId==-2"
plain plain
icon="el-icon-plus" icon="el-icon-plus"
size="mini" size="mini"
...@@ -122,28 +62,7 @@ ...@@ -122,28 +62,7 @@
v-hasPermi="['complainDeal:complainDeal:add']" v-hasPermi="['complainDeal:complainDeal:add']"
>新增</el-button> >新增</el-button>
</el-col> </el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['complainDeal:complainDeal: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="['complainDeal:complainDeal:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
...@@ -159,29 +78,59 @@ ...@@ -159,29 +78,59 @@
</el-row> </el-row>
<el-table v-loading="loading" :data="complainDealList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="complainDealList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <!--<el-table-column label="投诉处置id" align="center" prop="complainDealId" />-->
<el-table-column label="投诉处置id" align="center" prop="complainDealId" />
<el-table-column label="投诉人姓名" align="center" prop="complainName" /> <el-table-column label="投诉人姓名" align="center" prop="complainName" />
<el-table-column label="投诉人电话" align="center" prop="complainPhone" /> <el-table-column label="投诉人电话" align="center" prop="complainPhone" />
<el-table-column label="投诉事项" align="center" prop="complainMatter" /> <el-table-column label="投诉事项" align="center" prop="complainMatter" />
<el-table-column label="转办记录" align="center" prop="transferRecord" /> <!--<el-table-column label="反馈内容" align="center" prop="dealCondition" />-->
<el-table-column label="办理情况" align="center" prop="dealCondition" />
<el-table-column label="指派单位名称" align="center" prop="complainAssignEnterproseName" /> <el-table-column label="指派单位名称" align="center" prop="complainAssignEnterproseName" />
<el-table-column label="指派单位id" align="center" prop="complainAssignEnterproseId" /> <el-table-column label="指派人" align="center" prop="complainAssignMan" />
<el-table-column label="指派人" align="center" prop="complainAssignManId" /> <el-table-column label="任务状态" align="center" prop="complainStatus" :formatter="taskStateFormat" />
<el-table-column label="指派人id" align="center" prop="complainAssignMan" /> <el-table-column label="创建时间" align="center" prop="createTime" width="180">
<el-table-column label="任务状态:1.派发中 2.反馈 3.归档" align="center" prop="complainStatus" />
<el-table-column label="是否删除(0正常,1删除)" align="center" prop="isDel" />
<el-table-column label="备注" align="center" prop="remarks" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="反馈时间" align="center" prop="dealTime" width="180" >
<!--<template slot-scope="scope">-->
<!--<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>-->
<!--</template>-->
</el-table-column>
<el-table-column label="备注" align="center" prop="remarks" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200">
<template slot-scope="scope" >
<el-button
size="mini"
v-if="scope.row.complainStatus==1"
style="color: red"
type="text"
icon="el-icon-edit"
@click="handlefankui(scope.row)"
v-hasPermi="['complainDeal:complainDeal:edit']"
>反馈</el-button>
<el-button
size="mini"
v-if="scope.row.complainStatus==2 && deptId==-2"
style="color: #30B46B"
type="text"
icon="el-icon-edit"
@click="handlegui(scope.row)"
v-hasPermi="['complainDeal:complainDeal:edit']"
>归档</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
v-if="scope.row.complainStatus==1 && deptId==-2"
icon="el-icon-edit" icon="el-icon-edit"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
v-hasPermi="['complainDeal:complainDeal:edit']" v-hasPermi="['complainDeal:complainDeal:edit']"
>修改</el-button> >修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-document-copy"
@click="handleDtail(scope.row)"
>详情</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
...@@ -202,45 +151,64 @@ ...@@ -202,45 +151,64 @@
/> />
<!-- 添加或修改投诉处置对话框 --> <!-- 添加或修改投诉处置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<div class="division">
<div style="width: 50%;">
<el-form-item label="投诉人姓名" prop="complainName"> <el-form-item label="投诉人姓名" prop="complainName">
<el-input v-model="form.complainName" placeholder="请输入投诉人姓名" /> <el-input v-model="form.complainName" placeholder="请输入投诉人姓名" :disabled="readonly"/>
</el-form-item>
<el-form-item label="投诉人电话" prop="complainPhone">
<el-input v-model="form.complainPhone" placeholder="请输入投诉人电话" />
</el-form-item>
<el-form-item label="投诉事项" prop="complainMatter">
<el-input v-model="form.complainMatter" placeholder="请输入投诉事项" />
</el-form-item> </el-form-item>
<el-form-item label="转办记录" prop="transferRecord"> <el-form-item label="指派单位" prop="complainAssignEnterproseId" >
<el-input v-model="form.transferRecord" placeholder="请输入转办记录" /> <el-select style="width: 100%" v-model="form.complainAssignEnterproseName" placeholder="请选择预案等级" @change="qiyechang" :disabled="readonly">
</el-form-item> <el-option
<el-form-item label="办理情况" prop="dealCondition"> v-for = "dict in enterpriseList"
<el-input v-model="form.dealCondition" placeholder="请输入办理情况" /> :key = "dict.enterpriseId"
</el-form-item> :label = "dict.enterpriseName"
<el-form-item label="指派单位名称" prop="complainAssignEnterproseName"> :value = "dict.enterpriseId"
<el-input v-model="form.complainAssignEnterproseName" placeholder="请输入指派单位名称" /> />
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="指派单位id" prop="complainAssignEnterproseId">
<el-input v-model="form.complainAssignEnterproseId" placeholder="请输入指派单位id" /> </div>
<div style="width: 50%;">
<el-form-item label="投诉人电话" prop="complainPhone">
<el-input v-model="form.complainPhone" placeholder="请输入投诉人电话" :disabled="readonly"/>
</el-form-item> </el-form-item>
<el-form-item label="指派人" prop="complainAssignManId"> <el-form-item label="指派人" prop="complainAssignManId">
<el-input v-model="form.complainAssignManId" placeholder="请输入指派人" /> <el-select v-model="form.complainAssignMan" placeholder="请选择预案等级" clearable style = "width: 100%" @change="manChang" :disabled="readonly">
<el-option
v-for = "dict in peopleList"
:key = "dict.id"
:label = "dict.nickName"
:value = "dict.id"
/>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="指派人id" prop="complainAssignMan">
<el-input v-model="form.complainAssignMan" placeholder="请输入指派人id" /> </div>
</div>
<el-form-item label="投诉事项" prop="complainMatter">
<el-input v-model="form.complainMatter" type = "textarea" placeholder="请输入投诉事项" :disabled="readonly"/>
</el-form-item> </el-form-item>
<el-form-item label="任务状态:1.派发中 2.反馈 3.归档"> <el-form-item label="反馈内容" prop="dealCondition" :style="display">
<el-radio-group v-model="form.complainStatus"> <el-input v-model="form.dealCondition" type = "textarea" placeholder="请输入办理情况" :disabled="readonly"/>
<el-radio label="1">请选择字典生成</el-radio>
</el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="是否删除(0正常,1删除)" prop="isDel"> <el-form-item label="转办记录" prop="transferRecord" :style="display">
<el-input v-model="form.isDel" placeholder="请输入是否删除(0正常,1删除)" /> <el-input v-model="form.transferRecord" type="textarea" placeholder="请输入转办记录" :disabled="readonly"/>
</el-form-item>
<el-form-item label="任务状态" :style="display">
<el-select v-model="form.complainStatus" placeholder="请选择任务状态" :disabled="readonly">
<el-option
v-for="dict in taskStateOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remarks"> <el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" placeholder="请输入备注" /> <el-input v-model="form.remarks" type="textarea" placeholder="请输入备注" :disabled="readonly"/>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -248,12 +216,29 @@ ...@@ -248,12 +216,29 @@
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog title="反馈内容" :visible.sync="dialogFormVisible" width="600px">
<el-form :model="form2">
<div style="width: 100%;min-height: 100px;margin-top: -20px">
<el-form-item label="投诉事项" prop="complainMatter">
<textarea class="inputstyle1" v-model="form2.complainMatter" readonly></textarea>
</el-form-item>
</div>
<el-form-item label="反馈" style = "margin-top: -15px;">
<textarea class="inputstyle" v-model="form2.concent" type ="textarea" ></textarea>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer" style="margin-top: -30px;">
<el-button @click="dialogFormVisible = false"> </el-button>
<el-button type="primary" @click="submint2"> </el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { listComplainDeal, getComplainDeal, delComplainDeal, addComplainDeal, updateComplainDeal, exportComplainDeal } from "@/api/complainDeal/complainDeal"; import { listComplainDeal, getComplainDeal, delComplainDeal, addComplainDeal, updateComplainDeal, exportComplainDeal,getUserList } from "@/api/complainDeal/complainDeal";
import {enterpriseList} from "@/api/system/eventInfo";
import { getUserProfile } from "@/api/system/user";
export default { export default {
name: "ComplainDeal", name: "ComplainDeal",
components: { components: {
...@@ -276,10 +261,17 @@ export default { ...@@ -276,10 +261,17 @@ export default {
total: 0, total: 0,
// 投诉处置表格数据 // 投诉处置表格数据
complainDealList: [], complainDealList: [],
enterpriseList:[],
peopleList:[],
readonly:false,
display:"display:none",
// 投书状态类型:1.派发中 2.反馈 3.归档
taskStateOptions: [],
// 弹出层标题 // 弹出层标题
title: "", title: "",
// 是否显示弹出层 // 是否显示弹出层
open: false, open: false,
dialogFormVisible:false,
// 查询参数 // 查询参数
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
...@@ -298,17 +290,50 @@ export default { ...@@ -298,17 +290,50 @@ export default {
remarks: null remarks: null
}, },
// 表单参数 // 表单参数
form: {}, form: {
peopleList:[],
},
form2:{
complainDealId:'',
complainMatter:'',
concent:'',
},
//身份
deptId:'',
// 表单校验 // 表单校验
rules: { rules: {
complainName: [
{ required: true, message: "投诉人不能为空", trigger: "blur" }
],
complainPhone: [
{ required: true, message: "投诉人电话不能为空", trigger: "blur" }
],
complainMatter: [
{ required: true, message: "投诉事项不能为空", trigger: "blur" }
],
complainAssignEnterproseId: [
{ required: true, message: "指派单位不能为空", trigger: "blur" }
],
} }
}; };
}, },
created() { created() {
this.getList(); this.getList();
console.log("===============================") this.getUser();
this.getEnterpriseList();
this.getDicts("task_state").then(response => {
this.taskStateOptions = response.data;
});
}, },
methods: { methods: {
//获取deptId
getUser() {
getUserProfile().then(response => {
this.user = response.data;
this.deptId = response.data.deptId;
//console.log(this.deptId)
});
},
/** 查询投诉处置列表 */ /** 查询投诉处置列表 */
getList() { getList() {
this.loading = true; this.loading = true;
...@@ -318,6 +343,36 @@ export default { ...@@ -318,6 +343,36 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
//公司列表
getEnterpriseList() {
console.log(this.uploadImgUrl)
enterpriseList(this.queryParams).then(response => {
this.enterpriseList = response.data;
});
},
qiyechang(value){
this.form.complainAssignMan="";
let obj = {};
obj = this.enterpriseList.find((item)=>{
return item.enterpriseId === value;
});
this.form.complainAssignEnterproseName = obj.enterpriseName;
this.form.complainAssignEnterproseId = value;
getUserList(value).then(response => {
console.log(response.data)
//console.log(this.peopleList)
this.peopleList=response.data;
});
},
manChang(value){
let obj = {};
obj = this.peopleList.find((item)=>{
return item.id === value;
});
this.form.complainAssignManId === value;
this.form.complainAssignMan = obj.nickName;
console.log(this.form);
},
// 取消按钮 // 取消按钮
cancel() { cancel() {
this.open = false; this.open = false;
...@@ -336,7 +391,7 @@ export default { ...@@ -336,7 +391,7 @@ export default {
complainAssignEnterproseId: null, complainAssignEnterproseId: null,
complainAssignManId: null, complainAssignManId: null,
complainAssignMan: null, complainAssignMan: null,
complainStatus: "0", complainStatus: "1",
createBy: null, createBy: null,
createTime: null, createTime: null,
updateBy: null, updateBy: null,
...@@ -362,14 +417,31 @@ export default { ...@@ -362,14 +417,31 @@ export default {
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
taskStateFormat(row, column) {
var status = this.selectDictLabel(this.taskStateOptions, row.complainStatus);
if(status=='派发中'){
return <p style='color: #ff4949'>派发中</p>
}else if(status=="已反馈"){
return <p style='color: #1890ff'>已反馈</p>
}else{
return <p style='color: #30B46B'>已归档</p>
}
return this.selectDictLabel(this.taskStateOptions, row.complainStatus);
},
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.display="display:none";
this.readonly = false;
this.peopleList=[];
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "添加投诉处置"; this.title = "添加投诉处置";
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.display="display:none";
this.readonly = false;
this.peopleList=[];
this.reset(); this.reset();
const complainDealId = row.complainDealId || this.ids const complainDealId = row.complainDealId || this.ids
getComplainDeal(complainDealId).then(response => { getComplainDeal(complainDealId).then(response => {
...@@ -398,10 +470,22 @@ export default { ...@@ -398,10 +470,22 @@ export default {
} }
}); });
}, },
//详情
handleDtail(row) {
this.display="display:";
this.readonly = true;
this.reset();
const complainDealId = row.complainDealId || this.ids
getComplainDeal(complainDealId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改投诉处置";
});
},
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const complainDealIds = row.complainDealId || this.ids; const complainDealIds = row.complainDealId || this.ids;
this.$confirm('是否确认删除投诉处置编号为"' + complainDealIds + '"的数据项?', "警告", { this.$confirm('是否确认删除选中的投诉处置数据项?', "警告", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning" type: "warning"
...@@ -412,6 +496,37 @@ export default { ...@@ -412,6 +496,37 @@ export default {
this.msgSuccess("删除成功"); this.msgSuccess("删除成功");
}).catch(() => {}); }).catch(() => {});
}, },
//归档
handlegui(row) {
const complainDealIds = row.complainDealId || this.ids;
this.$confirm('是否确认归档选中的投诉处置数据项?', "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "success"
}).then(() => {
var a = {"complainDealId":complainDealIds,"complainStatus":3}
return updateComplainDeal(a);
}).then(() => {
this.msgSuccess("归档成功");
this.getList();
}).catch(() => {});
},
//反馈
handlefankui(row){
this.form2.concent="";
this.dialogFormVisible = true;
this.form2.complainDealId=row.complainDealId;
this.form2.complainMatter = row.complainMatter;
},
//提交反馈信息
submint2(){
var a = {"complainDealId":this.form2.complainDealId,"complainStatus":2,"dealCondition":this.form2.concent}
updateComplainDeal(a).then(response => {
this.msgSuccess("修改成功");
this.dialogFormVisible = false;
this.getList();
});
},
/** 导出按钮操作 */ /** 导出按钮操作 */
handleExport() { handleExport() {
const queryParams = this.queryParams; const queryParams = this.queryParams;
...@@ -430,3 +545,26 @@ export default { ...@@ -430,3 +545,26 @@ export default {
} }
}; };
</script> </script>
<style>
.division{
display:flex;
flex-direction:row;
justify-content:flex-start;
}
.inputstyle{
min-height: 200px;
max-height: 300px;
width: 100%;
border-color: 0.5px #99a9bf;
outline:none;
}
.inputstyle1{
min-height: 50px;
max-height: 200px;
width: 100%;
border : none;
resize:none;
outline:none;
}
</style>
...@@ -96,10 +96,10 @@ ...@@ -96,10 +96,10 @@
<el-table-column label="指派人" align="center" prop="workAssignMan" /> <el-table-column label="指派人" align="center" prop="workAssignMan" />
<el-table-column label="任务状态" align="center" prop="workStatus"> <el-table-column label="任务状态" align="center" prop="workStatus">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.workStatus == 0">派发中</span> <span v-if="scope.row.workStatus == 0" style='color: #ff4949'>派发中</span>
<span v-if="scope.row.workStatus == 1">已接单</span> <span v-if="scope.row.workStatus == 1" style="color: mediumblue">已接单</span>
<span v-if="scope.row.workStatus == 2">已反馈</span> <span v-if="scope.row.workStatus == 2" style='color: #1890ff'>已反馈</span>
<span v-if="scope.row.workStatus == 3">已归档</span> <span v-if="scope.row.workStatus == 3" style='color: #30B46B'>已归档</span>
</template> </template>
</el-table-column>> </el-table-column>>
<!--<el-table-column label="巡检时间" align="center" prop="inspectionDate" width="180"> <!--<el-table-column label="巡检时间" align="center" prop="inspectionDate" width="180">
...@@ -132,8 +132,9 @@ ...@@ -132,8 +132,9 @@
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="workDetail(scope.row)" @click="workDetail(scope.row)"
v-hasPermi="['system:order:edit']"
>详情</el-button> >详情</el-button>
<el-button <el-button v-if="scope.row.workStatus == '0' || scope.row.workStatus == '1'"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
...@@ -147,29 +148,33 @@ ...@@ -147,29 +148,33 @@
@click="handleDelete(scope.row)" @click="handleDelete(scope.row)"
v-hasPermi="['system:order:remove']" v-hasPermi="['system:order:remove']"
>删除</el-button> >删除</el-button>
<el-button v-if="(('enterprise'== roleType && (scope.row.workAssignManId == '' || scope.row.workAssignManId == null)) || ('zhengfu'== roleType && (scope.row.workAssignEnterproseId == '' || scope.row.workAssignEnterproseId == null))) && scope.row.workStatus == '0'" <el-button v-if=" (('enterprise'== roleType && (scope.row.workAssignManId == '' || scope.row.workAssignManId == null)) || ('zhengfu'== roleType && (scope.row.workAssignEnterproseId == '' || scope.row.workAssignEnterproseId == null))) && scope.row.workStatus == '0'"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="workIssue(scope.row)" @click="workIssue(scope.row)"
v-hasPermi="['system:order:edit']"
>任务下发</el-button> >任务下发</el-button>
<el-button v-if=" 'inpector'== roleType && scope.row.workStatus == '0'" <el-button v-if=" 'inpector'== roleType && scope.row.workStatus == '0'"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="takingOrder(scope.row)" @click="takingOrder(scope.row)"
v-hasPermi="['system:order:edit']"
>接单</el-button> >接单</el-button>
<el-button v-if="'zhengfu'!= roleType && scope.row.workStatus == '1'" <el-button v-if="'zhengfu'!= roleType && (scope.row.workStatus == '0' || scope.row.workStatus == '1')"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="feedbookWork(scope.row)" @click="feedbookWork(scope.row)"
v-hasPermi="['system:order:edit']"
>反馈</el-button> >反馈</el-button>
<el-button v-if="'zhengfu'!= roleType && scope.row.workStatus == '2'" <el-button v-if="'zhengfu'!= roleType && scope.row.workStatus == '2'"
size="mini" size="mini"
type="text" type="text"
icon="el-icon-edit" icon="el-icon-edit"
@click="sortWork(scope.row)" @click="sortWork(scope.row)"
v-hasPermi="['system:order:edit']"
>归档</el-button> >归档</el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -225,7 +230,7 @@ ...@@ -225,7 +230,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="指派人" prop="workAssignMan"> <el-form-item label="指派人" prop="workAssignMan">
<!--<el-input v-model="form.workAssignManId" placeholder="请输入指派人" />--> <!--<el-input v-model="form.workAssignManId" placeholder="请输入指派人" />-->
<el-select v-model="form.workAssignManId" placeholder="请输入指派人" style="width: 350px" @change="selectInspection($event,'edit')" :disabled="isDetail"> <el-select v-model="form.workAssignManId" placeholder="请输入指派人" style="width: 350px" @change="selectInspection($event,'edit')" :disabled="isDetail" clearable>
<el-option <el-option
v-for="item in inspectors" v-for="item in inspectors"
:key="item.userId " :key="item.userId "
...@@ -237,7 +242,7 @@ ...@@ -237,7 +242,7 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12" v-show="isDetail">
<el-form-item label="创建单位" prop="inspectionDate"> <el-form-item label="创建单位" prop="inspectionDate">
<el-input v-model="form.workCreateEnterpriseName" placeholder="请输入创建单位名称" :disabled="isDetail"/> <el-input v-model="form.workCreateEnterpriseName" placeholder="请输入创建单位名称" :disabled="isDetail"/>
</el-form-item> </el-form-item>
...@@ -377,8 +382,8 @@ ...@@ -377,8 +382,8 @@
</el-col> </el-col>
</el-row> </el-row>
<el-form-item label="整改方案" prop="rectificationPlan" v-show="feedBookForm.workType=='3'"> <el-form-item label="整改方案" prop="rectificationPlan" v-if="feedBookForm.workType=='3'">
<el-input v-model="form.rectificationPlan" type="textarea" placeholder="请输入整改方案" /> <el-input v-model="feedBookForm.rectificationPlan" type="textarea" placeholder="请输入整改方案" />
</el-form-item> </el-form-item>
<el-form-item label="反馈图片" prop="iconUrl"> <el-form-item label="反馈图片" prop="iconUrl">
...@@ -387,13 +392,12 @@ ...@@ -387,13 +392,12 @@
@resFun="getFileInfo" @resFun="getFileInfo"
@remove="listRemove" @remove="listRemove"
:fileArr="fileList" :fileArr="fileList"
:readOnly= "isDetail"
/> />
<el-input v-show="false" disabled v-model="form.iconUrl"></el-input> <el-input v-show="false" disabled v-model="feedBookForm.iconUrl"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="反馈信息" prop="rectificationResult"> <el-form-item label="反馈信息" prop="rectificationResult">
<el-input v-model="form.rectificationResult" type="textarea" placeholder="反馈信息" /> <el-input v-model="feedBookForm.rectificationResult" type="textarea" placeholder="反馈信息" />
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -510,16 +514,18 @@ export default { ...@@ -510,16 +514,18 @@ export default {
//反馈校验 //反馈校验
feedBookRules: { feedBookRules: {
iconUrl: [ iconUrl: [
{ required: true, message: "指派单位", trigger: "blur" } { required: true, message: "反馈图片", trigger: "change" }
], ],
rectificationResult: [ rectificationResult:[
{ required: true, message: "指派人", trigger: "blur" } { required: true, message: "反馈信息", trigger: "blur" }
] ]
}, },
roleType: "zhengfu", roleType: "zhengfu",
workForm:{}, workForm:{},
workOpen: false, workOpen: false,
feedBookForm: {}, feedBookForm: {
iconUrl: ""
},
feedBookOpen: false feedBookOpen: false
}; };
}, },
...@@ -681,7 +687,8 @@ export default { ...@@ -681,7 +687,8 @@ export default {
}).catch(() => {}); }).catch(() => {});
}, },
getFileInfo(res){ getFileInfo(res){
this.form.iconUrl = res.url; this.feedBookForm.iconUrl = res.url;
//this.$set(this.feedBookForm,'iconUrl',res.url)
}, },
listRemove(e) { listRemove(e) {
this.form.iconUrl = ""; this.form.iconUrl = "";
...@@ -706,19 +713,28 @@ export default { ...@@ -706,19 +713,28 @@ export default {
selectworkAssignEnterprose(enterpriseId){ selectworkAssignEnterprose(enterpriseId){
this.form.workAssignManId = ""; this.form.workAssignManId = "";
this.workForm.workAssignManId = ""; this.workForm.workAssignManId = "";
this.workForm.workAssignMan="";
this.form.workAssignMan = "";
this.getInspectionUserList(enterpriseId); this.getInspectionUserList(enterpriseId);
let enterpriseName = this.enterprises.find(val=>val.enterpriseId == enterpriseId).enterpriseName; let enterpriseName = this.enterprises.find(val=>val.enterpriseId == enterpriseId).enterpriseName;
this.form.workAssignEnterproseName = enterpriseName; this.form.workAssignEnterproseName = enterpriseName;
}, },
//获取指派人 //获取指派人
selectInspection(userId,type){ selectInspection(userId,type){
if(userId){
let userName = this.inspectors.find(val=>val.userId == userId).userName; let userName = this.inspectors.find(val=>val.userId == userId).userName;
if("edit" == type){ if("edit" == type){
this.form.workAssignMan = userName; this.form.workAssignMan = userName;
}else{ }else{
this.workForm.workAssignMan = userName; this.workForm.workAssignMan = userName;
} }
}else{
if("edit" == type){
this.form.workAssignMan = "";
}else{
this.workForm.workAssignMan = "";
}
}
}, },
/*//选择任务类型 /*//选择任务类型
selectWorkType(workType){ selectWorkType(workType){
...@@ -730,17 +746,19 @@ export default { ...@@ -730,17 +746,19 @@ export default {
},*/ },*/
//详情 //详情
workDetail(row){ workDetail(row){
getOrder(row.workId).then(response => {
this.isDetail=true; this.isDetail=true;
this.open = true; this.open = true;
this.title = "燃气任务详情"; this.title = "燃气任务详情";
this.form = response.data;
this.form = row;
this.getEnterpriseLists(); this.getEnterpriseLists();
this.getInspectionUserList(row.workAssignEnterproseId); this.getInspectionUserList(response.data.workAssignEnterproseId);
});
}, },
//任务下发 //任务下发
workIssue(row){ workIssue(row){
this.title = "任务下发"; this.title = "任务下发";
this.workForm = {};
this.workForm.workId = row.workId; this.workForm.workId = row.workId;
this.workForm.workTitle = row.workTitle; this.workForm.workTitle = row.workTitle;
this.workForm.workType = row.workType; this.workForm.workType = row.workType;
...@@ -748,10 +766,10 @@ export default { ...@@ -748,10 +766,10 @@ export default {
this.workForm.workAssignEnterproseId = row.workAssignEnterproseId; this.workForm.workAssignEnterproseId = row.workAssignEnterproseId;
this.workForm.workAssignEnterproseName = row.workAssignEnterproseName; this.workForm.workAssignEnterproseName = row.workAssignEnterproseName;
} }
if(row.workAssignManId){ /* if(row.workAssignManId){
this.workForm.workAssignManId = row.workAssignManId; this.workForm.workAssignManId = row.workAssignManId;
this.workForm.workAssignMan = row.workAssignMan; this.workForm.workAssignMan = row.workAssignMan;
} }*/
//this.workForm = row; //this.workForm = row;
this.workForm.workStatus = '1'; this.workForm.workStatus = '1';
this.workOpen = true; this.workOpen = true;
...@@ -780,18 +798,19 @@ export default { ...@@ -780,18 +798,19 @@ export default {
feedbookWork(row){ feedbookWork(row){
this.title = "反馈信息"; this.title = "反馈信息";
this.feedBookOpen = true; this.feedBookOpen = true;
//this.feedBookForm = {};
this.feedBookForm.workId = row.workId; this.feedBookForm.workId = row.workId;
this.feedBookForm.workTitle = row.workTitle; this.feedBookForm.workTitle = row.workTitle;
this.feedBookForm.workType = row.workType; this.feedBookForm.workType = row.workType;
if(row.iconUrl){ /*if(row.iconUrl){
this.feedBookForm.iconUrl = row.iconUrl; this.feedBookForm.iconUrl = row.iconUrl;
} }*/
if(row.rectificationPlan){ /*if(row.rectificationPlan){
this.feedBookForm.rectificationPlan = row.rectificationPlan; this.feedBookForm.rectificationPlan = row.rectificationPlan;
} }
if(row.rectificationResult){ if(row.rectificationResult){
this.feedBookForm.rectificationResult = row.rectificationResult; this.feedBookForm.rectificationResult = row.rectificationResult;
} }*/
//this.feedBookForm = row; //this.feedBookForm = row;
this.getEnterpriseLists(); this.getEnterpriseLists();
}, },
...@@ -837,7 +856,7 @@ export default { ...@@ -837,7 +856,7 @@ export default {
this.$refs["feedBookForm"].validate(valid => { this.$refs["feedBookForm"].validate(valid => {
if (valid) { if (valid) {
if (this.feedBookForm.workId != null) { if (this.feedBookForm.workId != null) {
this.feedBookForm.workStatus = '2'; //this.feedBookForm.workStatus = '2';
updateOrder(this.feedBookForm).then(response => { updateOrder(this.feedBookForm).then(response => {
this.msgSuccess("反馈成功"); this.msgSuccess("反馈成功");
this.feedBookOpen = false; this.feedBookOpen = false;
......
...@@ -19,15 +19,15 @@ ...@@ -19,15 +19,15 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="所在地址" prop="deviceAddr"> <!-- <el-form-item label="所在地址" prop="deviceAddr">-->
<el-input <!-- <el-input-->
v-model="queryParams.deviceAddr" <!-- v-model="queryParams.deviceAddr"-->
placeholder="请输入所在地址" <!-- placeholder="请输入所在地址"-->
clearable <!-- clearable-->
size="small" <!-- size="small"-->
@keyup.enter.native="handleQuery" <!-- @keyup.enter.native="handleQuery"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
...@@ -124,7 +124,7 @@ ...@@ -124,7 +124,7 @@
/> />
<!--选择关联设备弹出框--> <!--选择关联设备弹出框-->
<el-dialog title="选择关联设备" :visible.sync="dialogTableVisible" formLabelWidth="160px"> <el-dialog title="选择关联设备" width="1100px" :visible.sync="dialogTableVisible" formLabelWidth="160px">
<template> <template>
<el-form :model="dateQueryParams" ref="queryForm" :inline="true" v-show="showSearch" > <el-form :model="dateQueryParams" ref="queryForm" :inline="true" v-show="showSearch" >
<el-form-item label="设备名称" prop="deviceName"> <el-form-item label="设备名称" prop="deviceName">
...@@ -282,7 +282,6 @@ ...@@ -282,7 +282,6 @@
</el-dialog> </el-dialog>
<!-- 添加或修改设备信息对话框 --> <!-- 添加或修改设备信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="780px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="780px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="120px">
...@@ -334,20 +333,37 @@ ...@@ -334,20 +333,37 @@
</el-col> </el-col>
</el-row> </el-row>
<!-- <el-row>-->
<!-- <el-col :span="11">-->
<!-- <el-form-item label="经度" prop="longitude">-->
<!-- <el-input v-model="form.longitude" placeholder="请输入经度" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="11">-->
<!-- <el-form-item label="纬度" prop="latitude">-->
<!-- <el-input v-model="form.latitude" placeholder="请输入纬度" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row> <el-row>
<el-col :span="11"> <el-col :span="23">
<el-form-item label="经度" prop="longitude"> <el-form-item label="经纬度坐标" prop="longitude">
<el-col :span="9">
<el-input v-model="form.longitude" placeholder="请输入经度" /> <el-input v-model="form.longitude" placeholder="请输入经度" />
</el-form-item>
</el-col> </el-col>
<el-col :span="9" style="margin-left: 10px">
<el-col :span="11"> <el-input v-model="form.latitude" placeholder="请输入纬度"/>
<el-form-item label="纬度" prop="latitude"> </el-col>
<el-input v-model="form.latitude" placeholder="请输入纬度" /> <el-col :span="3" style="margin-left: 30px">
<el-button type="primary" plain @click="MapdialogFun">选择经纬度</el-button>
</el-col>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="22"> <el-col :span="22">
<el-form-item label="设备图片路径" prop="iconUrl"> <el-form-item label="设备图片路径" prop="iconUrl">
...@@ -428,16 +444,25 @@ ...@@ -428,16 +444,25 @@
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<GetPos
:dialogVisible.sync="dialogTableVisibles"
device=""
:devicePos="devicePos"
@close="dialogcancelFun"
@getPath="getPath"
/>
</div> </div>
</template> </template>
<script> <script>
import { listDevice, getDevice, delDevice, addDevice, updateDevice, exportDevice, selectTEnterprise,getDdeviceDetailInfo,addDetailInfos,deleteDetailInfo,deleteeListDetailInfo,selectDetailInfoList,deleteDeviceDetailInfo,updateDetailInfoLists} from "@/api/regulation/device"; import { listDevice, getDevice, delDevice, addDevice, updateDevice, exportDevice, selectTEnterprise,getDdeviceDetailInfo,addDetailInfos,deleteDetailInfo,deleteeListDetailInfo,selectDetailInfoList,deleteDeviceDetailInfo,updateDetailInfoLists} from "@/api/regulation/device";
import GetPos from '@/components/GetPos';
import { EditorMap } from "@/utils/mapClass/getPath.js";
export default { export default {
name: "Device", name: "Device",
components: { components: {
GetPos
}, },
data() { data() {
return { return {
...@@ -451,6 +476,10 @@ export default { ...@@ -451,6 +476,10 @@ export default {
multipleSelection: [], multipleSelection: [],
dialogTableVisible: false, dialogTableVisible: false,
dialogFormVisible: false, dialogFormVisible: false,
/**--------------地图使用数据---------------*/
dialogTableVisibles: false,
devicePos: [],
/**--------------地图使用数据---------------*/
form: { form: {
name: '', name: '',
region: '', region: '',
...@@ -459,7 +488,7 @@ export default { ...@@ -459,7 +488,7 @@ export default {
delivery: false, delivery: false,
type: [], type: [],
resource: '', resource: '',
desc: '' desc: '',
}, },
formLabelWidth: '120px', formLabelWidth: '120px',
/*添加关联设备*/ /*添加关联设备*/
...@@ -566,9 +595,6 @@ export default { ...@@ -566,9 +595,6 @@ export default {
iotNo:[ iotNo:[
{ required: true, message: "请输入联网编号", trigger: "blur" }, { required: true, message: "请输入联网编号", trigger: "blur" },
], ],
remarksn:[
{ required: true, message: "请输入备注", trigger: "blur" },
],
}, },
}; };
}, },
...@@ -627,7 +653,8 @@ export default { ...@@ -627,7 +653,8 @@ export default {
updateBy: null, updateBy: null,
updateTime: null, updateTime: null,
isDel: null, isDel: null,
remarks: null remarks: null,
relationDeviceType:'1',
}; };
this.resetForm("form"); this.resetForm("form");
}, },
...@@ -695,9 +722,12 @@ export default { ...@@ -695,9 +722,12 @@ export default {
this.test = response.data; this.test = response.data;
}); });
const deviceId = row.deviceId || this.ids const deviceId = row.deviceId || this.ids
var tDeviceInfon={
id:deviceId,
relationDeviceType:'1'
}
//查询关联设备信息数据 //查询关联设备信息数据
selectDetailInfoList(deviceId).then(response => { selectDetailInfoList(JSON.stringify(tDeviceInfon)).then(response => {
this.DetailInfoList = response.rows; this.DetailInfoList = response.rows;
this.loadings = false; this.loadings = false;
}); });
...@@ -768,6 +798,7 @@ export default { ...@@ -768,6 +798,7 @@ export default {
this.getList(); this.getList();
}); });
if ( this.datalist !=null){ if ( this.datalist !=null){
this.form.relationDeviceType='1';
var tDeviceInfon={ var tDeviceInfon={
tDeviceInfo:this.form, tDeviceInfo:this.form,
tDeviceInfoS:this.datalist tDeviceInfoS:this.datalist
...@@ -779,11 +810,12 @@ export default { ...@@ -779,11 +810,12 @@ export default {
}); });
} }
} else { } else {
alert("走的新增")
if (valid) { if (valid) {
//获取已经选中的下级设备id //获取已经选中的下级设备id
const deviceIds = this.ids; const deviceIds = this.ids;
// alert(deviceIds) // alert(deviceIds)
this.form.relationDeviceType='1';
var tDeviceInfon={ var tDeviceInfon={
tDeviceInfo:this.form, tDeviceInfo:this.form,
tDeviceInfoS:this.datalist tDeviceInfoS:this.datalist
...@@ -878,13 +910,6 @@ export default { ...@@ -878,13 +910,6 @@ export default {
//获取已经选中的下级设备id //获取已经选中的下级设备id
const deviceIds = this.ids; const deviceIds = this.ids;
const li=this.datalist; const li=this.datalist;
this.$confirm('是否确认添加关联设备信息?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
}).then(() => {
if (this.form.deviceId != null) { if (this.form.deviceId != null) {
//修改 //修改
this.DetailInfoList=this.DetailInfoList.concat(this.datalist) this.DetailInfoList=this.DetailInfoList.concat(this.datalist)
...@@ -905,7 +930,6 @@ export default { ...@@ -905,7 +930,6 @@ export default {
this.dialogTableVisible=false this.dialogTableVisible=false
this.msgSuccess("添加成功"); this.msgSuccess("添加成功");
} }
}).catch(() => {});
}, },
/** /**
* 选择关联设备查询方法 * 选择关联设备查询方法
...@@ -920,6 +944,32 @@ export default { ...@@ -920,6 +944,32 @@ export default {
//打开选择关联设备弹出框 //打开选择关联设备弹出框
this.dialogTableVisible = true this.dialogTableVisible = true
}); });
},
/**
* 经纬度坐标方法
*/
MapdialogFun() {
this.dialogTableVisibles = true;
},
/**
* 地图关闭方法
*/
dialogcancelFun() {
this.dialogTableVisibles = false;
},
/**
* 经纬度 选择
* @param res
*/
getPath(res){
console.log("res", res);
console.log(this.form.longitude, this.form.latitude);
//确认选择经纬度
this.form.longitude = res[0];
this.form.latitude = res[1];
} }
} }
}; };
......
...@@ -148,16 +148,32 @@ ...@@ -148,16 +148,32 @@
</el-col> </el-col>
</el-row> </el-row>
<!-- <el-row>-->
<!-- <el-col :span="11">-->
<!-- <el-form-item label="经度" prop="longitude">-->
<!-- <el-input v-model="form.longitude" placeholder="请输入经度" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="11">-->
<!-- <el-form-item label="纬度" prop="latitude">-->
<!-- <el-input v-model="form.latitude" placeholder="请输入纬度" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row> <el-row>
<el-col :span="11"> <el-col :span="23">
<el-form-item label="经度" prop="longitude"> <el-form-item label="经纬度坐标" prop="longitude">
<el-col :span="9">
<el-input v-model="form.longitude" placeholder="请输入经度" /> <el-input v-model="form.longitude" placeholder="请输入经度" />
</el-form-item>
</el-col> </el-col>
<el-col :span="9" style="margin-left: 10px">
<el-col :span="11"> <el-input v-model="form.latitude" placeholder="请输入纬度"/>
<el-form-item label="纬度" prop="latitude"> </el-col>
<el-input v-model="form.latitude" placeholder="请输入纬度" /> <el-col :span="3" style="margin-left: 30px">
<el-button type="primary" plain @click="MapdialogFun">选择经纬度</el-button>
</el-col>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -198,18 +214,31 @@ ...@@ -198,18 +214,31 @@
<el-button @click="cancel">取 消</el-button> <el-button @click="cancel">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
<GetPos
:dialogVisible.sync="dialogTableVisibles"
device=""
:devicePos="devicePos"
@close="dialogcancelFun"
@getPath="getPath"
/>
</div> </div>
</template> </template>
<script> <script>
import { listUser, getUser, delUser, addUser, updateUser, exportUser } from "@/api/regulation/user"; import { listUser, getUser, delUser, addUser, updateUser, exportUser } from "@/api/regulation/user";
import GetPos from '@/components/GetPos';
export default { export default {
name: "User", name: "User",
components: { components: {
GetPos
}, },
data() { data() {
return { return {
/**--------------地图使用数据---------------*/
dialogTableVisibles: false,
devicePos: [],
/**--------------地图使用数据---------------*/
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 导出遮罩层 // 导出遮罩层
...@@ -372,6 +401,27 @@ export default { ...@@ -372,6 +401,27 @@ export default {
this.download(response.msg); this.download(response.msg);
this.exportLoading = false; this.exportLoading = false;
}).catch(() => {}); }).catch(() => {});
},
/**
* 经纬度坐标方法
*/
MapdialogFun() {
this.dialogTableVisibles = true;
},
/**
* 地图关闭方法
*/
dialogcancelFun() {
this.dialogTableVisibles = false;
},
/**
* 经纬度 选择
* @param res
*/
getPath(res){
//确认选择经纬度
this.form.longitude = res[0];
this.form.latitude = res[1];
} }
} }
}; };
......
<template> <template>
<div class="app-container"> <div class="app-container">
<GetPos
:dialogVisible.sync="dialogVisible"
device="pipe"
@close="dialogVisible=false"
@getPath="getPath"
:pipePath="this.coordinateslist"
/>
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="管道长度" prop="pipeLength"> <el-form-item label="管道长度" prop="pipeLength">
<el-input <el-input
...@@ -19,15 +27,15 @@ ...@@ -19,15 +27,15 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="压力" prop="pipePressure"> <!-- <el-form-item label="压力" prop="pipePressure">-->
<el-input <!-- <el-input-->
v-model="queryParams.pipePressure" <!-- v-model="queryParams.pipePressure"-->
placeholder="请输入压力" <!-- placeholder="请输入压力"-->
clearable <!-- clearable-->
size="small" <!-- size="small"-->
@keyup.enter.native="handleQuery" <!-- @keyup.enter.native="handleQuery"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
...@@ -92,7 +100,7 @@ ...@@ -92,7 +100,7 @@
<el-table-column label="建设年代" align="center" prop="buildDate" /> <el-table-column label="建设年代" align="center" prop="buildDate" />
<el-table-column label="建设单位" align="center" prop="buildUnit" /> <el-table-column label="建设单位" align="center" prop="buildUnit" />
<el-table-column label="权属单位" align="center" prop="beyondEnterpriseName" /> <el-table-column label="权属单位" align="center" prop="beyondEnterpriseName" />
<el-table-column label="坐标" align="center" prop="coordinates" /> <!-- <el-table-column label="坐标" align="center" prop="coordinates" />-->
<el-table-column label="备注" align="center" prop="remarks" /> <el-table-column label="备注" align="center" prop="remarks" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
...@@ -210,12 +218,18 @@ ...@@ -210,12 +218,18 @@
<el-row> <el-row>
<el-col :span="22"> <el-col :span="18">
<el-form-item label="坐标" prop="coordinates"> <el-form-item label="坐标" prop="coordinates">
<el-input v-model="form.coordinates" type="textarea" placeholder="请输入坐标" /> <el-input v-model="form.coordinates" type="textarea" placeholder="请输入坐标" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="3" style="margin-left: 30px">
<el-button type="primary" plain @click="MapdialogFun">选择坐标</el-button>
</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="22"> <el-col :span="22">
<el-form-item label="备注" prop="remarks"> <el-form-item label="备注" prop="remarks">
...@@ -236,13 +250,17 @@ ...@@ -236,13 +250,17 @@
<script> <script>
import { listPipe, getPipe, delPipe, addPipe, updatePipe, exportPipe, selectTEnterprise} from "@/api/regulation/pipe"; import { listPipe, getPipe, delPipe, addPipe, updatePipe, exportPipe, selectTEnterprise} from "@/api/regulation/pipe";
import GetPos from '@/components/GetPos';
export default { export default {
name: "Pipe", name: "Pipe",
components: { components: {
GetPos
}, },
data() { data() {
return { return {
dialogVisible:false,
//地图管径回显数据
coordinateslist:null,
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 导出遮罩层 // 导出遮罩层
...@@ -283,6 +301,7 @@ export default { ...@@ -283,6 +301,7 @@ export default {
coordinates: null, coordinates: null,
isDel: null, isDel: null,
remarks: null remarks: null
}, },
// 表单参数 // 表单参数
form: {}, form: {},
...@@ -376,6 +395,7 @@ export default { ...@@ -376,6 +395,7 @@ export default {
selectTEnterprise().then(response => { selectTEnterprise().then(response => {
this.test = response.data; this.test = response.data;
}); });
this.coordinateslist+=JSON.parse(null);
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "添加管道信息"; this.title = "添加管道信息";
...@@ -390,6 +410,10 @@ export default { ...@@ -390,6 +410,10 @@ export default {
const pipeId = row.pipeId || this.ids const pipeId = row.pipeId || this.ids
getPipe(pipeId).then(response => { getPipe(pipeId).then(response => {
this.form = response.data; this.form = response.data;
const text=this.form.coordinates
console.log(text)
this.coordinateslist=JSON.parse(text);
this.open = true; this.open = true;
this.title = "修改管道信息"; this.title = "修改管道信息";
}); });
...@@ -442,6 +466,27 @@ export default { ...@@ -442,6 +466,27 @@ export default {
this.download(response.msg); this.download(response.msg);
this.exportLoading = false; this.exportLoading = false;
}).catch(() => {}); }).catch(() => {});
},
/**管道信息 选择管道提交数据方法*/
getPath(e){
// for (let i=0;i<e.length;i++){
// console.log(e[i])
// coordinates.push(e[i])
// }
var a = '['
for (var i in e) {
if (i == e.length - 1) {
a += '[' + e[i].toString()+']'
} else {
a += '[' + e[i].toString()+'],'
}
}
a += ']'
this.form.coordinates=a;
},
/** 管道打开方法*/
MapdialogFun(){
this.dialogVisible=true;
} }
} }
}; };
......
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="108px">
<el-form-item label="场站名称" prop="siteStationName"> <el-form-item label="场站名称" prop="siteStationName" label-width="70px">
<el-input <el-input
v-model="queryParams.siteStationName" v-model="queryParams.siteStationName"
placeholder="请输入场站名称" placeholder="请输入场站名称"
...@@ -19,15 +19,15 @@ ...@@ -19,15 +19,15 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="备注" label-width="50px" prop="remarks"> <!-- <el-form-item label="备注" label-width="40px" prop="remarks">-->
<el-input <!-- <el-input-->
v-model="queryParams.remarks" <!-- v-model="queryParams.remarks"-->
placeholder="请输入备注" <!-- placeholder="请输入备注"-->
clearable <!-- clearable-->
size="small" <!-- size="small"-->
@keyup.enter.native="handleQuery" <!-- @keyup.enter.native="handleQuery"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
...@@ -125,8 +125,8 @@ ...@@ -125,8 +125,8 @@
/> />
<!-- 添加或修改场站信息对话框 --> <!-- 添加或修改场站信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="780px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="90px">
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
...@@ -142,8 +142,11 @@ ...@@ -142,8 +142,11 @@
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="场站名称" prop="siteStationName"> <el-form-item label="权属单位" prop="beyondEnterpriseName">
<el-input v-model="form.siteStationName" placeholder="请输入场站名称" /> <el-select v-model="form.beyondEnterpriseId" placeholder="请在下拉框中选择权属单位" maxlength="255" :disabled="false" clearable>
<el-option v-for="item in test" :key="item.enterpriseId" :label="item.enterpriseName" :value="item.enterpriseId">
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
...@@ -173,56 +176,279 @@ ...@@ -173,56 +176,279 @@
<!-- <el-input v-model="form.beyondEnterpriseName" placeholder="请输入权属单位名称" />--> <!-- <el-input v-model="form.beyondEnterpriseName" placeholder="请输入权属单位名称" />-->
<!-- </el-form-item>--> <!-- </el-form-item>-->
<!-- <el-row>-->
<!-- <el-col :span="11">-->
<!-- <el-form-item label="经度" prop="longitude">-->
<!-- <el-input v-model="form.longitude" placeholder="请输入经度" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="11">-->
<!-- <el-form-item label="纬度" prop="latitude">-->
<!-- <el-input v-model="form.latitude" placeholder="请输入纬度" />-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row> <el-row>
<el-col :span="11"> <el-col :span="23">
<el-form-item label="经度" prop="longitude"> <el-form-item label="经纬度坐标" prop="longitude">
<el-col :span="9">
<el-input v-model="form.longitude" placeholder="请输入经度" /> <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-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="场站名称" prop="siteStationName">
<el-input v-model="form.siteStationName" placeholder="请输入场站名称" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="22">
<el-form-item label="备注" prop="remarks">
<el-input v-model="form.remarks" type="textarea" placeholder="请输入备注" />
</el-form-item>
</el-col>
</el-row>
</el-form>
<h3>关联设备</h3>
<el-table v-loading="loadings" ref="multipleTable" :data="DetailInfoList" tooltip-effect="dark" style="width: 100%" max-height="250" @selection-change="tableDataSelectionChange">
<el-table-column label="设备名称" align="center" prop="deviceName" />
<el-table-column label="设备型号" align="center" prop="deviceModel" />
<el-table-column label="设备类型" align="center" prop="deviceType" />
<el-table-column label="物联网编号" align="center" prop="iotNo" />
<el-table-column label="备注" align="center" prop="remarksn" />
<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-delete"
@click="deleteDataListilInfo(scope.row,scope.$index)"
v-hasPermi="['device:device:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="selectDataListInfo">选择关联设备</el-button>
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!--选择关联设备弹出框-->
<el-dialog title="选择关联设备" width="1100px" :visible.sync="dialogTableVisible" >
<template>
<el-form :model="dateQueryParams" ref="queryForm" :inline="true" v-show="showSearch" >
<el-form-item label="设备名称" prop="deviceName" >
<el-input
v-model="dateQueryParams.deviceName"
placeholder="请输入设备名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="设备型号" prop="deviceCode">
<el-input
v-model="dateQueryParams.deviceModel"
placeholder="请输入设备型号"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="物联网编号" prop="deviceAddr">
<el-input
v-model="dateQueryParams.iotNo"
placeholder="请输入物联网编号"
clearable
size="small"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQueryData">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQueryDate">重置</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="dialogFormVisible = true"
v-hasPermi="['device:device:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="deleteListDetailInfo"
v-hasPermi="['device:device:remove']"
>删除</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getDataList"></right-toolbar>
</el-row>
<el-table v-loading="loadings" ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%" max-height="250" @selection-change="tableDataSelectionChange">
<el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column label="设备名称" align="center" prop="deviceName" />
<el-table-column label="设备型号" align="center" prop="deviceModel" />
<el-table-column label="设备类型" align="center" prop="deviceType" />
<el-table-column label="物联网编号" align="center" prop="iotNo" />
<el-table-column label="备注" align="center" prop="remarksn" />
<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-delete"
@click="deleteDetailInfo(scope.row)"
v-hasPermi="['device:device:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="insertListDetailInfo"> </el-button>
<el-button @click="dialogTableVisible=false"> </el-button>
</div>
</template>
</el-dialog>
<!-------------------------------------------------------------------------------------------------------------------------->
<!--添加关联设备弹出框-->
<el-dialog title="添加关联设备" :visible.sync="dialogFormVisible">
<el-form ref="formDetailInfo" :model="formDetailInfo" :rules="formDetailInfoRules" label-width="95px" style="height: 230px">
<el-row>
<el-col :span="11">
<el-form-item label="设备名称" prop="deviceName">
<el-input v-model="formDetailInfo.deviceName" placeholder="请输入设备名称" autocomplete="off"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="纬度" prop="latitude"> <el-form-item label="设备型号" prop="deviceModel">
<el-input v-model="form.latitude" placeholder="请输入纬度" /> <el-input v-model="formDetailInfo.deviceModel" placeholder="请输入设备型号" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="11"> <el-col :span="11">
<el-form-item label="权属单位" prop="beyondEnterpriseName"> <el-form-item label="设备类型" prop="deviceType">
<el-select v-model="form.beyondEnterpriseId" placeholder="请在下拉框中选择权属单位" maxlength="255" :disabled="false" clearable> <el-select v-model="formDetailInfo.deviceType" placeholder="请选择设备类型">
<el-option v-for="item in test" :key="item.enterpriseId" :label="item.enterpriseName" :value="item.enterpriseId"> <el-option label="压力表" value="1" />
</el-option> <el-option label="流量计" value="2" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11">
<el-form-item label="物联网编号" prop="iotNo" >
<el-input v-model="formDetailInfo.iotNo" placeholder="请输入物联网编号" />
</el-form-item>
</el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="22"> <el-col :span="22">
<el-form-item label="备注" prop="remarks"> <el-form-item label="备注" prop="remarksn">
<el-input v-model="form.remarks" type="textarea" placeholder="请输入备注" /> <el-input v-model="formDetailInfo.remarksn" type="textarea" placeholder="请输入备注" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="addDetailInfo"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="dialogFormVisible=false"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<GetPos
:dialogVisible.sync="dialogTableVisibles"
device=""
:devicePos="devicePos"
@close="dialogcancelFun"
@getPath="getPath"
/>
</div> </div>
</template> </template>
<script> <script>
import { listStation, getStation, delStation, addStation, updateStation, exportStation ,selectTEnterprise} from "@/api/regulation/station"; import { listStation, getStation, delStation, addStation, updateStation, exportStation ,selectTEnterprise} from "@/api/regulation/station";
import { getDdeviceDetailInfo,addDetailInfos,deleteDetailInfo,deleteeListDetailInfo,selectDetailInfoList,deleteDeviceDetailInfo,updateDetailInfoLists} from "@/api/regulation/device";
import GetPos from '@/components/GetPos';
export default { export default {
name: "Station", name: "Station",
components: { components: {
GetPos
}, },
data() { data() {
return { return {
/**-------------------弹出框所用数据-------------------------------*/
//下级设备数据数组
tableData: [],
//下级数据的遮罩层
loadings:true,
//存储已被选中的下级数据id
DetailInfoListId :[],
//存储已经选中的下级关联数据
DetailInfoList:[],
dialogTableVisible: false,
//添加关联设备弹出层控制
dialogFormVisible: false,
/*添加关联设备*/
formDetailInfo:{
relationDeviceDetailId:'',
deviceName: '',
deviceModel:'',
deviceType:'',
iotNo:'',
remarksn:''
},
//关联设备下级数据 表单校验
formDetailInfoRules:{
deviceName:[
{ required: true, message: "请输入设备名称", trigger: "blur" },
],
deviceModel:[
{ required: true, message: "请输入设备型号", trigger: "blur" },
],
deviceType:[
{ required: true, message: "请选择设备类型", trigger: "blur" },
],
iotNo:[
{ required: true, message: "请输入联网编号", trigger: "blur" },
],
},
/**-------------------弹出框所用数据-------------------------------*/
/**--------------地图使用数据---------------*/
dialogTableVisibles: false,
devicePos: [],
/**--------------地图使用数据---------------*/
// 遮罩层 // 遮罩层
loading: true, loading: true,
// 导出遮罩层 // 导出遮罩层
...@@ -253,6 +479,12 @@ export default { ...@@ -253,6 +479,12 @@ export default {
beyondEnterpriseName: null, beyondEnterpriseName: null,
remarks: null remarks: null
}, },
// 查询参数
dateQueryParams: {
deviceName: null,
deviceModel: null,
iotNo: null,
},
// 表单参数 // 表单参数
form: {}, form: {},
// 动态下拉 // 动态下拉
...@@ -316,7 +548,8 @@ export default { ...@@ -316,7 +548,8 @@ export default {
updateBy: null, updateBy: null,
updateTime: null, updateTime: null,
isDel: null, isDel: null,
remarks: null remarks: null,
relationDeviceType:'2',
}; };
this.resetForm("form"); this.resetForm("form");
}, },
...@@ -342,6 +575,17 @@ export default { ...@@ -342,6 +575,17 @@ export default {
selectTEnterprise().then(response => { selectTEnterprise().then(response => {
this.test = response.data; this.test = response.data;
}); });
//清空关联设备数据
this.DetailInfoList=''
this.loadings = true;
//查询下级设备数据
getDdeviceDetailInfo(this.dateQueryParams).then(response => {
//下级设备数据 到时候换成下级数据
this.tableData = response.rows;
this.detailTotal = response.total;
this.loadings = false;
});
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "添加场站信息"; this.title = "添加场站信息";
...@@ -352,6 +596,18 @@ export default { ...@@ -352,6 +596,18 @@ export default {
selectTEnterprise().then(response => { selectTEnterprise().then(response => {
this.test = response.data; this.test = response.data;
}); });
const deviceId = row.siteStationId || this.ids
var tDeviceInfon={
id:deviceId,
relationDeviceType:'2' //设置关联设备类型
}
//查询关联设备信息数据
selectDetailInfoList(JSON.stringify(tDeviceInfon)).then(response => {
this.DetailInfoList = response.rows;
this.loadings = false;
});
this.reset(); this.reset();
const siteStationId = row.siteStationId || this.ids const siteStationId = row.siteStationId || this.ids
getStation(siteStationId).then(response => { getStation(siteStationId).then(response => {
...@@ -360,26 +616,28 @@ export default { ...@@ -360,26 +616,28 @@ export default {
this.title = "修改场站信息"; this.title = "修改场站信息";
}); });
}, },
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => { /** 原提交按钮 */
if (valid) { // submitForm() {
if (this.form.siteStationId != null) { // this.$refs["form"].validate(valid => {
updateStation(this.form).then(response => { // if (valid) {
this.msgSuccess("修改成功"); // if (this.form.siteStationId != null) {
this.open = false; // updateStation(this.form).then(response => {
this.getList(); // this.msgSuccess("修改成功");
}); // this.open = false;
} else { // this.getList();
addStation(this.form).then(response => { // });
this.msgSuccess("新增成功"); // } else {
this.open = false; // addStation(this.form).then(response => {
this.getList(); // this.msgSuccess("新增成功");
}); // this.open = false;
} // this.getList();
} // });
}); // }
}, // }
// });
// },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const siteStationIds = row.siteStationId || this.ids; const siteStationIds = row.siteStationId || this.ids;
...@@ -408,7 +666,230 @@ export default { ...@@ -408,7 +666,230 @@ export default {
this.download(response.msg); this.download(response.msg);
this.exportLoading = false; this.exportLoading = false;
}).catch(() => {}); }).catch(() => {});
},
/**-------------------后加入弹出框方法----------------------*/
/**
* 选择关联设备查询方法
*/
selectDataListInfo(){
//查询下级设备数据
getDdeviceDetailInfo(this.dateQueryParams).then(response => {
//下级设备数据 到时候换成下级数据
this.tableData = response.rows;
this.detailTotal = response.total;
this.loadings = false;
//打开选择关联设备弹出框
this.dialogTableVisible = true
});
},
/**
*查询下级数据列表方法
* */
getDataList(){
this.loadings = true;
// console.log(this.dateQueryParams)
//查询下级设备数据
getDdeviceDetailInfo(this.dateQueryParams).then(response => {
//下级设备数据 到时候换成下级数据
this.tableData = response.rows;
this.detailTotal = response.total;
this.loadings = false;
});
},
/**关联设备添加方法*/
addDetailInfo(){
this.$refs["formDetailInfo"].validate(valid => {
if (valid) {
addDetailInfos(this.formDetailInfo).then(response => {
// this.tableData.push(this.formDetailInfo)
//关闭弹出层
this.dialogFormVisible = false;
//数据表单重置
this.formDetailInfo={
deviceName: null,
deviceModel:null,
deviceType:null,
iotNo:null,
remarksn:null
};
this.getDataList();
this.msgSuccess("新增成功");
});
}
});
},
/**添加关联设备与设备绑定的数据 (存储到数组中)*/
insertListDetailInfo(row){
//获取已经选中的下级设备id
const deviceIds = this.ids;
const li=this.datalist;
if (this.form.siteStationId != null) {
//修改
this.DetailInfoList=this.DetailInfoList.concat(this.datalist)
//添加到数组中 以便下次使用
this.DetailInfoListId.push(deviceIds);
// alert(this.DetailInfoListId)
this.dialogTableVisible=false
this.msgSuccess("添加成功");
}else {
//添加
// this.DetailInfoList.push(this.datalist)
//清空数组数据 将之前的数据清空
this.DetailInfoListId.splice(row);
this.DetailInfoList=this.datalist;
//添加到数组中 以便下次使用
this.DetailInfoListId.push(deviceIds);
// alert(this.DetailInfoListId)
this.dialogTableVisible=false
this.msgSuccess("添加成功");
}
},
/**关联设备单条删除方法*/
deleteDetailInfo(row){
const deviceIds = row.relationDeviceDetailId;
this.$confirm('是否确认删除设备信息编号为"' + deviceIds + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return deleteDetailInfo(deviceIds);
}).then(() => {
// this.tableData.splice(index,1);
this.getDataList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/**
* 批量删除关联设备方法
* @param row
*/
deleteListDetailInfo(row){
const deviceIds = this.ids;
this.$confirm('是否确认删除设备信息编号为"' + deviceIds + '"的数据项?', "警告", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning"
}).then(function() {
return deleteeListDetailInfo(deviceIds);
}).then(() => {
this.getDataList();
this.msgSuccess("删除成功");
}).catch(() => {});
},
/**关联设备已经选中数据删除方法*/
deleteDataListilInfo(row,index){
const deviceIds = row.relationDeviceDetailId;
//判断form表单是否有id来验证是修改的删除还是添加的删除
if (this.form.siteStationId != null) {
deleteDeviceDetailInfo(deviceIds).then(response => {
this.msgSuccess("删除成功");
this.DetailInfoList.splice(index,1);
});
}else {
this.DetailInfoList.splice(index,1);
this.msgSuccess("删除成功");
}
},
/**提交数据方法*/
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.siteStationId != null) {
updateStation(this.form).then(response => {
this.msgSuccess("修改成功");
this.open = false;
this.getList();
});
if ( this.datalist !=null){
this.form.relationDeviceType='2';
var tDeviceInfon={
tDeviceInfo:this.form,
tDeviceInfoS:this.datalist
}
//重新绑定修改后的关联设备
updateDetailInfoLists(JSON.stringify(tDeviceInfon)).then(response => {
this.open = false;
this.getList();
});
}
} else {
if (valid) {
//获取已经选中的下级设备id
const deviceIds = this.ids;
// alert(deviceIds)
this.form.relationDeviceType='2';
var tDeviceInfon={
tDeviceInfo:this.form,
tDeviceInfoS:this.datalist
}
addStation(JSON.stringify(tDeviceInfon)).then(response => {
this.msgSuccess("新增成功");
this.open = false;
this.getList();
});
} else {
console.log('error submit!!');
return false;
}
}
} }
});
},
//关联数据多选框选中数据
tableDataSelectionChange(selection){
this.ids = selection.map(item => item.relationDeviceDetailId)
this.datalist=selection.map(item => item)
//按钮 非选中禁用
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 下级数据搜索*/
handleQueryData(){
this.getDataList();
},
/** 下级数据重置按钮操作 搜索框重置*/
resetQueryDate(){
this.dateQueryParams={
deviceName: null,
deviceModel: null,
iotNo: null,
}
},
/**
* 经纬度坐标方法
*/
MapdialogFun() {
this.dialogTableVisibles = true;
},
/**
* 地图关闭方法
*/
dialogcancelFun() {
this.dialogTableVisibles = false;
},
/**
* 经纬度 选择
* @param res
*/
getPath(res){
//确认选择经纬度
this.form.longitude = res[0];
this.form.latitude = res[1];
}
} }
}; };
</script> </script>
...@@ -19,15 +19,15 @@ ...@@ -19,15 +19,15 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remarks"> <!-- <el-form-item label="备注" prop="remarks">-->
<el-input <!-- <el-input-->
v-model="queryParams.remarks" <!-- v-model="queryParams.remarks"-->
placeholder="请输入备注" <!-- placeholder="请输入备注"-->
clearable <!-- clearable-->
size="small" <!-- size="small"-->
@keyup.enter.native="handleQuery" <!-- @keyup.enter.native="handleQuery"-->
/> <!-- />-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item> <el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> <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-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
......
...@@ -66,28 +66,6 @@ ...@@ -66,28 +66,6 @@
v-hasPermi="['system:eventInfo:add']" v-hasPermi="['system:eventInfo:add']"
>新增</el-button> >新增</el-button>
</el-col> </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:eventInfo: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:eventInfo:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
...@@ -103,7 +81,7 @@ ...@@ -103,7 +81,7 @@
</el-row> </el-row>
<el-table v-loading="loading" :data="eventInfoList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="eventInfoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <!--<el-table-column type="selection" width="55" align="center" />-->
<!--<el-table-column label="事件id" align="center" prop="eventId" />--> <!--<el-table-column label="事件id" align="center" prop="eventId" />-->
<el-table-column label="事件名称" align="center" prop="eventTitle" /> <el-table-column label="事件名称" align="center" prop="eventTitle" />
<el-table-column label="所属企业" align="center" prop="beyondEnterpriseName" /> <el-table-column label="所属企业" align="center" prop="beyondEnterpriseName" />
...@@ -116,9 +94,21 @@ ...@@ -116,9 +94,21 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="报案人" align="center" prop="reportPerson" /> <el-table-column label="报案人" align="center" prop="reportPerson" />
<el-table-column label="事件处置信息" align="center" prop="eventDeal" /> <el-table-column label="附件" align="center" prop="iconUrl" width="150px">
<el-table-column label="事件评估信息" align="center" prop="eventAssessment" /> <template slot-scope="scope">
<el-table-column label="备注" align="center" prop="remarks" /> <span
class="dbtn"
@click="checkFile(scope.row.iconUrl)"
v-if="scope.row.iconUrl != null && scope.row.iconUrl!=''"
>
<i class="el-icon el-icon-view"></i>查看/下载
</span>
<span v-else>-</span>
</template>
</el-table-column>
<!--<el-table-column label="事件处置信息" align="center" prop="eventDeal" />-->
<!--<el-table-column label="事件评估信息" align="center" prop="eventAssessment" />-->
<!--<el-table-column label="备注" align="center" prop="remarks" />-->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
...@@ -134,7 +124,6 @@ ...@@ -134,7 +124,6 @@
icon="el-icon-document-copy" icon="el-icon-document-copy"
@click="handleDtail(scope.row)" @click="handleDtail(scope.row)"
>详情</el-button> >详情</el-button>
<el-button
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
...@@ -216,10 +205,10 @@ ...@@ -216,10 +205,10 @@
</el-form-item> </el-form-item>
</div> </div>
</div> </div>
<el-form-item label="事件处置信息" prop="eventDeal" style="width: 60%"> <el-form-item label="事件处置信息" prop="eventDeal" style="width: 95%">
<el-input v-model="form.eventDeal" type="textarea" placeholder="请输入事件处置信息" :disabled="readonly"/> <el-input v-model="form.eventDeal" type="textarea" placeholder="请输入事件处置信息" :disabled="readonly"/>
</el-form-item> </el-form-item>
<el-form-item label="事件评估信息" prop="eventAssessment" style="width: 60%"> <el-form-item label="事件评估信息" prop="eventAssessment" style="width: 95%">
<el-input v-model="form.eventAssessment" type="textarea" placeholder="请输入事件评估信息" :disabled="readonly"/> <el-input v-model="form.eventAssessment" type="textarea" placeholder="请输入事件评估信息" :disabled="readonly"/>
</el-form-item> </el-form-item>
<el-form-item label="事件附件" prop="iconUrl" :style="display" > <el-form-item label="事件附件" prop="iconUrl" :style="display" >
...@@ -237,7 +226,7 @@ ...@@ -237,7 +226,7 @@
<span <span
class="dbtn" class="dbtn"
@click="checkFile(form.iconUrl)" @click="checkFile(form.iconUrl)"
v-if="form.iconUrl != ''" v-if="form.iconUrl!=null && form.iconUrl != ''"
> >
<i class="el-icon el-icon-view"></i>查看/下载 <i class="el-icon el-icon-view"></i>查看/下载
</span> </span>
...@@ -382,7 +371,7 @@ export default { ...@@ -382,7 +371,7 @@ export default {
let obj = {}; let obj = {};
obj = this.enterpriseList.find((item)=>{ obj = this.enterpriseList.find((item)=>{
return item.enterpriseId === value; return item.enterpriseId === value;
}); ``});
this.form.beyondEnterpriseName = obj.enterpriseName; this.form.beyondEnterpriseName = obj.enterpriseName;
this.form.beyondEnterpriseId = value; this.form.beyondEnterpriseId = value;
}, },
......
...@@ -57,28 +57,28 @@ ...@@ -57,28 +57,28 @@
v-hasPermi="['system:planInfo:add']" v-hasPermi="['system:planInfo:add']"
>新增</el-button> >新增</el-button>
</el-col> </el-col>
<el-col :span="1.5"> <!--<el-col :span="1.5">-->
<el-button <!--<el-button-->
type="success" <!--type="success"-->
plain <!--plain-->
icon="el-icon-edit" <!--icon="el-icon-edit"-->
size="mini" <!--size="mini"-->
:disabled="single" <!--:disabled="single"-->
@click="handleUpdate" <!--@click="handleUpdate"-->
v-hasPermi="['system:planInfo:edit']" <!--v-hasPermi="['system:planInfo:edit']"-->
>修改</el-button> <!--&gt;修改</el-button>-->
</el-col> <!--</el-col>-->
<el-col :span="1.5"> <!--<el-col :span="1.5">-->
<el-button <!--<el-button-->
type="danger" <!--type="danger"-->
plain <!--plain-->
icon="el-icon-delete" <!--icon="el-icon-delete"-->
size="mini" <!--size="mini"-->
:disabled="multiple" <!--:disabled="multiple"-->
@click="handleDelete" <!--@click="handleDelete"-->
v-hasPermi="['system:planInfo:remove']" <!--v-hasPermi="['system:planInfo:remove']"-->
>删除</el-button> <!--&gt;删除</el-button>-->
</el-col> <!--</el-col>-->
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="warning" type="warning"
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
</el-row> </el-row>
<el-table v-loading="loading" :data="planInfoList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="planInfoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" /> <!--<el-table-column type="selection" width="25" align="center" />-->
<!--<el-table-column label="预案id" align="center" prop="planId" />--> <!--<el-table-column label="预案id" align="center" prop="planId" />-->
<el-table-column label="预案标题" align="center" prop="planTitle" /> <el-table-column label="预案标题" align="center" prop="planTitle" />
<el-table-column label="所属企业名称" align="center" prop="beyondEnterpriseName" /> <el-table-column label="所属企业名称" align="center" prop="beyondEnterpriseName" />
...@@ -102,12 +102,12 @@ ...@@ -102,12 +102,12 @@
<el-table-column label="预案等级" align="center" prop="planLevel" :formatter="planLevelFormat"/> <el-table-column label="预案等级" align="center" prop="planLevel" :formatter="planLevelFormat"/>
<!--<el-table-column label="应急方案" align="center" prop="planContents" />--> <!--<el-table-column label="应急方案" align="center" prop="planContents" />-->
<el-table-column label="应急设备及车辆" align="center" prop="planEquipment" /> <el-table-column label="应急设备及车辆" align="center" prop="planEquipment" />
<el-table-column label="方案附件" align="center" prop="dealPlanUrl" width="150px"> <el-table-column label="方案附件" align="center" prop="iconUrl" width="150px">
<template slot-scope="scope"> <template slot-scope="scope">
<span <span
class="dbtn" class="dbtn"
@click="checkFile(scope.row.iconUrl)" @click="checkFile(scope.row.iconUrl)"
v-if="scope.row.iconUrl != ''" v-if="scope.row.iconUrl != null && scope.row.iconUrl!=''"
> >
<i class="el-icon el-icon-view"></i>查看/下载 <i class="el-icon el-icon-view"></i>查看/下载
</span> </span>
...@@ -216,7 +216,7 @@ ...@@ -216,7 +216,7 @@
<span <span
class="dbtn" class="dbtn"
@click="checkFile(form.iconUrl)" @click="checkFile(form.iconUrl)"
v-if="form.iconUrl != ''" v-if="form.iconUrl!=null && form.iconUrl != ''"
> >
<i class="el-icon el-icon-view"></i>查看/下载 <i class="el-icon el-icon-view"></i>查看/下载
</span> </span>
...@@ -346,7 +346,6 @@ export default { ...@@ -346,7 +346,6 @@ export default {
}); });
}, },
qiyechang(value){ qiyechang(value){
console.log(value)
let obj = {}; let obj = {};
obj = this.enterpriseList.find((item)=>{ obj = this.enterpriseList.find((item)=>{
return item.enterpriseId === value; return item.enterpriseId === value;
...@@ -475,11 +474,8 @@ export default { ...@@ -475,11 +474,8 @@ export default {
this.title = "修改应急预案"; this.title = "修改应急预案";
if(this.form.iconUrl!=null||this.form.iconUrl==""){ if(this.form.iconUrl!=null||this.form.iconUrl==""){
this.fileList = [{name: 'file', url:uploadfile}]; this.fileList = [{name: 'file', url:uploadfile}];
this.$nextTick(()=>{
document.getElementsByClassName("el-upload--picture-card")[0].style.display="none"
document.getElementById("yesbutton").style.display="" ;
})
} }
document.getElementById("yesbutton").style.display="" ;
document.getElementById("fujian").style.display="" document.getElementById("fujian").style.display=""
document.getElementById("fujianxia").style.display="none" document.getElementById("fujianxia").style.display="none"
}); });
......
...@@ -6,7 +6,7 @@ function resolve(dir) { ...@@ -6,7 +6,7 @@ function resolve(dir) {
return path.join(__dirname, dir) return path.join(__dirname, dir)
} }
const name = defaultSettings.title || '泽宏管理系统' // 标题 const name = defaultSettings.title || '智慧管网管理系统' // 标题
const port = process.env.port || process.env.npm_config_port || 80 // 端口 const port = process.env.port || process.env.npm_config_port || 80 // 端口
...@@ -34,7 +34,7 @@ module.exports = { ...@@ -34,7 +34,7 @@ module.exports = {
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
target: `http://222.223.203.154:8092/gassafety`, target: `http://localhost:8903/gassafety`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: '' ['^' + process.env.VUE_APP_BASE_API]: ''
......
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