Commit 482744ae authored by yaqizhang's avatar yaqizhang

Merge branch 'master' of http://111.61.77.35:9999/gengdidi/gassafety into master

parents 3b49275b a4c08983
...@@ -6,6 +6,7 @@ import java.util.List; ...@@ -6,6 +6,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import com.zehong.common.core.domain.entity.SysUser; import com.zehong.common.core.domain.entity.SysUser;
import com.zehong.common.utils.StringUtils;
import com.zehong.system.domain.vo.TUserLocationVo; import com.zehong.system.domain.vo.TUserLocationVo;
import com.zehong.system.service.ISysUserService; import com.zehong.system.service.ISysUserService;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
...@@ -62,7 +63,8 @@ public class TUserLocationController extends BaseController ...@@ -62,7 +63,8 @@ public class TUserLocationController extends BaseController
*/ */
@GetMapping("/getInspectorLocations") @GetMapping("/getInspectorLocations")
public AjaxResult getInspectorLocations(TUserLocationVo tUserLocationVo){ public AjaxResult getInspectorLocations(TUserLocationVo tUserLocationVo){
if(null == tUserLocationVo.getUserId()){ //巡检人员初始化
if(null == tUserLocationVo.getUserId() && StringUtils.isEmpty(tUserLocationVo.getUserName())){
List<SysUser> inspectors = userService.selectInspectorList(); List<SysUser> inspectors = userService.selectInspectorList();
List<TUserLocation> inspectorLocations = new ArrayList<>(); List<TUserLocation> inspectorLocations = new ArrayList<>();
Map<String,Object> map = new HashMap<>(16); Map<String,Object> map = new HashMap<>(16);
...@@ -73,11 +75,18 @@ public class TUserLocationController extends BaseController ...@@ -73,11 +75,18 @@ public class TUserLocationController extends BaseController
} }
return AjaxResult.success(inspectorLocations); return AjaxResult.success(inspectorLocations);
} }
//查询巡检人员路线
if(StringUtils.isEmpty(tUserLocationVo.getUserName())){
Map<String,Object> map = new HashMap<>(16);
map.put("userId",tUserLocationVo.getUserId());
map.put("beginTime",tUserLocationVo.getBeginTime());
map.put("endTime",tUserLocationVo.getEndTime());
return AjaxResult.success(tUserLocationService.selectTUserLocationListByMap(map));
}
//搜索
Map<String,Object> map = new HashMap<>(16); Map<String,Object> map = new HashMap<>(16);
map.put("userId",tUserLocationVo.getUserId()); map.put("userName",tUserLocationVo.getUserName());
map.put("beginTime",tUserLocationVo.getBeginTime()); map.put("initInspectors","initInspectors");
map.put("endTime",tUserLocationVo.getEndTime());
return AjaxResult.success(tUserLocationService.selectTUserLocationListByMap(map)); return AjaxResult.success(tUserLocationService.selectTUserLocationListByMap(map));
} }
......
...@@ -45,6 +45,18 @@ public class THiddenTroubleController extends BaseController ...@@ -45,6 +45,18 @@ public class THiddenTroubleController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
/**
* 地图初始化隐患
* @param tHiddenTrouble
* @return
*/
@GetMapping("/getMapHiddenTroublelist")
public AjaxResult getMapHiddenTroublelist(THiddenTrouble tHiddenTrouble)
{
List<THiddenTrouble> list = tHiddenTroubleService.selectTHiddenTroubleList(tHiddenTrouble);
return AjaxResult.success(list);
}
/** /**
* 导出隐患信息列表 * 导出隐患信息列表
*/ */
...@@ -53,6 +65,7 @@ public class THiddenTroubleController extends BaseController ...@@ -53,6 +65,7 @@ public class THiddenTroubleController extends BaseController
@GetMapping("/export") @GetMapping("/export")
public AjaxResult export(THiddenTrouble tHiddenTrouble) public AjaxResult export(THiddenTrouble tHiddenTrouble)
{ {
tHiddenTrouble.setDealStatus("3");
List<THiddenTrouble> list = tHiddenTroubleService.selectTHiddenTroubleList(tHiddenTrouble); List<THiddenTrouble> list = tHiddenTroubleService.selectTHiddenTroubleList(tHiddenTrouble);
ExcelUtil<THiddenTrouble> util = new ExcelUtil<THiddenTrouble>(THiddenTrouble.class); ExcelUtil<THiddenTrouble> util = new ExcelUtil<THiddenTrouble>(THiddenTrouble.class);
return util.exportExcel(list, "隐患信息数据"); return util.exportExcel(list, "隐患信息数据");
......
...@@ -83,6 +83,10 @@ public class TDeviceInfo extends BaseEntity ...@@ -83,6 +83,10 @@ public class TDeviceInfo extends BaseEntity
@Excel(name = "最后巡检时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @Excel(name = "最后巡检时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date inspectionTime; private Date inspectionTime;
/** 是否删除 */
@Excel(name = "是否删除")
private String isDel;
/** 备注 */ /** 备注 */
@Excel(name = "备注") @Excel(name = "备注")
private String remarks; private String remarks;
...@@ -231,7 +235,16 @@ public class TDeviceInfo extends BaseEntity ...@@ -231,7 +235,16 @@ public class TDeviceInfo extends BaseEntity
{ {
return inspectionTime; return inspectionTime;
} }
public void setRemarks(String remarks)
public String getIsDel() {
return isDel;
}
public void setIsDel(String isDel) {
this.isDel = isDel;
}
public void setRemarks(String remarks)
{ {
this.remarks = remarks; this.remarks = remarks;
} }
......
...@@ -66,6 +66,10 @@ public class TPipe extends BaseEntity ...@@ -66,6 +66,10 @@ public class TPipe extends BaseEntity
@Excel(name = "最后巡检时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") @Excel(name = "最后巡检时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date inspectionTime; private Date inspectionTime;
/** 是否删除 */
@Excel(name = "是否删除")
private String isDel;
/** 备注 */ /** 备注 */
@Excel(name = "备注") @Excel(name = "备注")
private String remarks; private String remarks;
...@@ -178,7 +182,16 @@ public class TPipe extends BaseEntity ...@@ -178,7 +182,16 @@ public class TPipe extends BaseEntity
{ {
return inspectionTime; return inspectionTime;
} }
public void setRemarks(String remarks)
public String getIsDel() {
return isDel;
}
public void setIsDel(String isDel) {
this.isDel = isDel;
}
public void setRemarks(String remarks)
{ {
this.remarks = remarks; this.remarks = remarks;
} }
......
...@@ -33,6 +33,8 @@ public class TUserLocation extends BaseEntity ...@@ -33,6 +33,8 @@ public class TUserLocation extends BaseEntity
private String userName; private String userName;
private String phonenumber;
public String getUserName() { public String getUserName() {
return userName; return userName;
} }
...@@ -41,6 +43,14 @@ public class TUserLocation extends BaseEntity ...@@ -41,6 +43,14 @@ public class TUserLocation extends BaseEntity
this.userName = userName; this.userName = userName;
} }
public String getPhonenumber() {
return phonenumber;
}
public void setPhonenumber(String phonenumber) {
this.phonenumber = phonenumber;
}
public void setLocationId(Long locationId) public void setLocationId(Long locationId)
{ {
this.locationId = locationId; this.locationId = locationId;
......
...@@ -19,6 +19,16 @@ public class TUserLocationVo { ...@@ -19,6 +19,16 @@ public class TUserLocationVo {
*/ */
private Date endTime; private Date endTime;
private String userName;
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public Long getUserId() { public Long getUserId() {
return userId; return userId;
} }
......
...@@ -21,16 +21,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -21,16 +21,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="phone" column="phone" /> <result property="phone" column="phone" />
<result property="installationTime" column="installation_time" /> <result property="installationTime" column="installation_time" />
<result property="inspectionTime" column="inspection_time" /> <result property="inspectionTime" column="inspection_time" />
<result property="isDel" column="is_del" />
<result property="remarks" column="remarks" /> <result property="remarks" column="remarks" />
</resultMap> </resultMap>
<sql id="selectTDeviceInfoVo"> <sql id="selectTDeviceInfoVo">
select device_id, enterprise_id, pipe_code, device_name, device_code, device_addr, device_model, device_type, longitude, latitude, iot_no, icon_url, linkman, phone, installation_time, inspection_time, remarks from t_device_info select device_id, enterprise_id, pipe_code, device_name, device_code, device_addr, device_model, device_type, longitude, latitude, iot_no, icon_url, linkman, phone, installation_time, inspection_time, is_del, remarks from t_device_info
</sql> </sql>
<select id="selectTDeviceInfoList" parameterType="TDeviceInfo" resultMap="TDeviceInfoResult"> <select id="selectTDeviceInfoList" parameterType="TDeviceInfo" resultMap="TDeviceInfoResult">
<include refid="selectTDeviceInfoVo"/> <include refid="selectTDeviceInfoVo"/>
<where> <where>
is_del = '0'
<if test="enterpriseId != null and enterpriseId != 0 "> and enterprise_id = #{enterpriseId}</if> <if test="enterpriseId != null and enterpriseId != 0 "> and enterprise_id = #{enterpriseId}</if>
<if test="pipeCode != null "> and pipe_code = #{pipeCode}</if> <if test="pipeCode != null "> and pipe_code = #{pipeCode}</if>
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if> <if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if>
...@@ -62,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -62,6 +64,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="countDeviceByType" resultType="map"> <select id="countDeviceByType" resultType="map">
select count(device_id) number, device_type type from t_device_info select count(device_id) number, device_type type from t_device_info
where is_del = '0'
group by device_type group by device_type
</select> </select>
...@@ -124,6 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -124,6 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="installationTime != null">installation_time = #{installationTime},</if> <if test="installationTime != null">installation_time = #{installationTime},</if>
<if test="inspectionTime != null">inspection_time = #{inspectionTime},</if> <if test="inspectionTime != null">inspection_time = #{inspectionTime},</if>
<if test="remarks != null">remarks = #{remarks},</if> <if test="remarks != null">remarks = #{remarks},</if>
<if test="isDel != null">is_del = #{isDel},</if>
</trim> </trim>
where device_id = #{deviceId} where device_id = #{deviceId}
</update> </update>
......
...@@ -49,8 +49,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -49,8 +49,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql> </sql>
<select id="selectTDeviceReportDataList" parameterType="DeviceReportDataForm" resultMap="TDeviceReportDataResultVo"> <select id="selectTDeviceReportDataList" parameterType="DeviceReportDataForm" resultMap="TDeviceReportDataResultVo">
select t.report_time, t.device_report_data_id, t.device_num, t.standard_condition_accumulation, t.working_condition_accumulation, t.residual_quantity, t.standard_condition_flow, t.working_condition_flow, t.temperature, t.pressure, t.communication_status, t.device_status, t.create_time, t.update_time, select
d.device_id, d.device_name, d.device_code, d.device_type, d.device_model t.report_time,
t.device_report_data_id,
t.device_num,
t.standard_condition_accumulation,
t.working_condition_accumulation,
t.residual_quantity,
t.standard_condition_flow,
t.working_condition_flow,
t.temperature,
t.pressure,
t.communication_status,
t.create_time,
t.update_time,
d.device_id,
d.device_name,
d.device_code,
d.device_type,
d.device_model,
CASE (SELECT COUNT(DISTINCT alarm.device_id) FROM t_device_alarm alarm WHERE alarm.device_id = d.device_id AND alarm.end_time IS NULL)
WHEN 0 THEN '正常'
ELSE '报警'
END as device_status
from t_device_report_data t from t_device_report_data t
left join t_device_info d on t.device_num = d.iot_no left join t_device_info d on t.device_num = d.iot_no
<where> <where>
...@@ -64,10 +85,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -64,10 +85,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select> </select>
<select id="selectRealtimeDataList" parameterType="DeviceReportDataForm" resultMap="TDeviceReportDataResultVo"> <select id="selectRealtimeDataList" parameterType="DeviceReportDataForm" resultMap="TDeviceReportDataResultVo">
select max(t.report_time) report_time, t.device_report_data_id, t.device_num, t.standard_condition_accumulation, t.working_condition_accumulation, t.residual_quantity, t.standard_condition_flow, t.working_condition_flow, t.temperature, t.pressure, t.communication_status, t.device_status, t.create_time, t.update_time, select
d.device_id, d.device_name, d.device_code, d.device_type, d.device_model max(t.report_time) report_time,
t.device_report_data_id,
t.device_num,
t.standard_condition_accumulation,
t.working_condition_accumulation,
t.residual_quantity,
t.standard_condition_flow,
t.working_condition_flow,
t.temperature,
t.pressure,
t.communication_status,
t.create_time,
t.update_time,
d.device_id,
d.device_name,
d.device_code,
d.device_type,
d.device_model,
CASE (SELECT COUNT(DISTINCT alarm.device_id) FROM t_device_alarm alarm WHERE alarm.device_id = d.device_id AND alarm.end_time IS NULL)
WHEN 0 THEN '正常'
ELSE '报警'
END as device_status
from t_device_report_data t from t_device_report_data t
right join t_device_info d on t.device_num = d.iot_no LEFT JOIN t_device_info d on t.device_num = d.iot_no
<where> <where>
<if test="deviceCode != null "> and d.device_code like concat('%',#{deviceCode},'%')</if> <if test="deviceCode != null "> and d.device_code like concat('%',#{deviceCode},'%')</if>
<if test="deviceType != null "> and d.device_type = #{deviceType}</if> <if test="deviceType != null "> and d.device_type = #{deviceType}</if>
......
...@@ -17,16 +17,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -17,16 +17,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="iconUrl" column="icon_url" /> <result property="iconUrl" column="icon_url" />
<result property="installationTime" column="installation_time" /> <result property="installationTime" column="installation_time" />
<result property="inspectionTime" column="inspection_time" /> <result property="inspectionTime" column="inspection_time" />
<result property="isDel" column="is_del" />
<result property="remarks" column="remarks" /> <result property="remarks" column="remarks" />
</resultMap> </resultMap>
<sql id="selectTPipeVo"> <sql id="selectTPipeVo">
select pipe_id, enterprise_id, pipe_name, pipe_code, pipe_addr, coordinates, pipe_length, pipe_type, pipe_pressure, icon_url, installation_time, inspection_time, remarks from t_pipe select pipe_id, enterprise_id, pipe_name, pipe_code, pipe_addr, coordinates, pipe_length, pipe_type, pipe_pressure, icon_url, installation_time, inspection_time, is_del, remarks from t_pipe
</sql> </sql>
<select id="selectTPipeList" parameterType="TPipe" resultMap="TPipeResult"> <select id="selectTPipeList" parameterType="TPipe" resultMap="TPipeResult">
<include refid="selectTPipeVo"/> <include refid="selectTPipeVo"/>
<where> <where>
is_del = '0'
<if test="enterpriseId != null and enterpriseId != 0"> and enterprise_id = #{enterpriseId}</if> <if test="enterpriseId != null and enterpriseId != 0"> and enterprise_id = #{enterpriseId}</if>
<if test="pipeName != null and pipeName != ''"> and pipe_name like concat('%', #{pipeName}, '%')</if> <if test="pipeName != null and pipeName != ''"> and pipe_name like concat('%', #{pipeName}, '%')</if>
<if test="pipeCode != null and pipeCode != ''"> and pipe_code like concat('%', #{pipeCode}, '%')</if> <if test="pipeCode != null and pipeCode != ''"> and pipe_code like concat('%', #{pipeCode}, '%')</if>
...@@ -53,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -53,6 +55,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="countPipeLength" resultType="double"> <select id="countPipeLength" resultType="double">
select sum(pipe_length) from t_pipe select sum(pipe_length) from t_pipe
where is_del = '0'
</select> </select>
<insert id="insertTPipe" parameterType="TPipe" useGeneratedKeys="true" keyProperty="pipeId"> <insert id="insertTPipe" parameterType="TPipe" useGeneratedKeys="true" keyProperty="pipeId">
...@@ -101,6 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -101,6 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="iconUrl != null">icon_url = #{iconUrl},</if> <if test="iconUrl != null">icon_url = #{iconUrl},</if>
<if test="installationTime != null">installation_time = #{installationTime},</if> <if test="installationTime != null">installation_time = #{installationTime},</if>
<if test="inspectionTime != null">inspection_time = #{inspectionTime},</if> <if test="inspectionTime != null">inspection_time = #{inspectionTime},</if>
<if test="isDel != null">is_del = #{isDel},</if>
<if test="remarks != null">remarks = #{remarks},</if> <if test="remarks != null">remarks = #{remarks},</if>
</trim> </trim>
where pipe_id = #{pipeId} where pipe_id = #{pipeId}
......
...@@ -13,7 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -13,7 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectTUserLocationVo"> <sql id="selectTUserLocationVo">
select location.location_id, location.user_id, location.longitude, location.latitude, location.create_time,(SELECT sysU.user_name FROM sys_user sysU WHERE sysU.user_id = location.user_id) AS userName from t_user_location location select location.location_id, location.user_id, location.longitude, location.latitude, location.create_time,(SELECT sysU.user_name FROM sys_user sysU WHERE sysU.user_id = location.user_id) AS userName,(SELECT sysU.phonenumber FROM sys_user sysU WHERE sysU.user_id = location.user_id) AS phonenumber from t_user_location location
</sql> </sql>
<select id="selectTUserLocationList" parameterType="TUserLocation" resultMap="TUserLocationResult"> <select id="selectTUserLocationList" parameterType="TUserLocation" resultMap="TUserLocationResult">
...@@ -33,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -33,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="latitude != null "> and latitude = #{latitude}</if> <if test="latitude != null "> and latitude = #{latitude}</if>
<if test="beginTime != null and endTime != null"> and create_time BETWEEN #{beginTime} AND #{endTime}</if> <if test="beginTime != null and endTime != null"> and create_time BETWEEN #{beginTime} AND #{endTime}</if>
</where> </where>
<if test="userName !=null and userName != ''">HAVING userName LIKE concat('%', #{userName}, '%')</if>
ORDER BY create_time DESC ORDER BY create_time DESC
<if test="initInspectors == 'initInspectors'"> <if test="initInspectors == 'initInspectors'">
LIMIT 1 LIMIT 1
......
...@@ -9,6 +9,15 @@ export function listHiddenTrouble(query) { ...@@ -9,6 +9,15 @@ export function listHiddenTrouble(query) {
}) })
} }
//地图隐患初始化
export function getMapHiddenTroublelist(query) {
return request({
url: '/riskManagement/hiddenTrouble/getMapHiddenTroublelist',
method: 'get',
params: query
})
}
// 查询隐患信息详细 // 查询隐患信息详细
export function getHiddenTrouble(troubleId) { export function getHiddenTrouble(troubleId) {
return request({ return request({
...@@ -50,4 +59,4 @@ export function exportHiddenTrouble(query) { ...@@ -50,4 +59,4 @@ export function exportHiddenTrouble(query) {
method: 'get', method: 'get',
params: query params: query
}) })
} }
\ No newline at end of file
...@@ -83,6 +83,11 @@ ...@@ -83,6 +83,11 @@
<div> <div>
详细信息:<span>{{ alarmValue ? alarmValue : "-" }}</span> 详细信息:<span>{{ alarmValue ? alarmValue : "-" }}</span>
</div> </div>
<div v-if="!orderId">
工单编号:<span>{{
obj.polyline.getExtData().lineData.orderId
}}</span>
</div>
</div> </div>
<div @click.stop="stopPropatation" class="btn"> <div @click.stop="stopPropatation" class="btn">
<span @mousedown.stop="deviceMore"> <span @mousedown.stop="deviceMore">
...@@ -91,6 +96,9 @@ ...@@ -91,6 +96,9 @@
<span v-if="orderId" @mousedown.stop="createWork"> <span v-if="orderId" @mousedown.stop="createWork">
<el-button class="elbtn" type="primary">生成工单</el-button> <el-button class="elbtn" type="primary">生成工单</el-button>
</span> </span>
<span v-else @mousedown.stop="checkWork">
<el-button class="elbtn" type="primary">查看工单</el-button>
</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -151,29 +159,35 @@ export default { ...@@ -151,29 +159,35 @@ export default {
this.obj.polyline.getExtData().lineData.alarmId; this.obj.polyline.getExtData().lineData.alarmId;
this.obj.polyline.getExtData().lineData.view.$refs.CreateWork.open = true; this.obj.polyline.getExtData().lineData.view.$refs.CreateWork.open = true;
// 改变外层回调 // 改变外层回调
this.obj.polyline.getExtData().lineData.view.alarmObjChange({
this.obj.polyline.getExtData().lineData.view.CreateWorkCallBack = alarmId: this.obj.polyline.getExtData().lineData.alarmId,
this.CreateWorkCallBack; type: "pipe",
}, });
close() { // this.obj.polyline.getExtData().lineData.view.CreateWorkCallBack(this.CreateWorkCallBack)
this.obj.polyline.infoWindow.close();
}, },
CreateWorkCallBack() { checkWork() {
console.log("polylineCallBack"); this.obj.polyline.getExtData().class.view.$router.push({
const polyline = this.obj.polyline path: "/basicsInfo/detail",
.getExtData() query: {
.lineData.view.gaoMap.polyLines.filter((item) => { orderId: this.obj.polyline.getExtData().lineData.orderId,
return ( },
item.getExtData().lineData.alarmId == });
this.obj.polyline.getExtData().lineData.alarmId
);
})[0];
console.log("polyline.getExtData()", polyline.getExtData().lineData);
let options = polyline.getExtData();
// 暂时传值,到时候回重新刷新
options.lineData.orderId = "1";
polyline.setExtData(options);
}, },
// // CreateWorkCallBack(e) {
// // console.log("生成工单后传过来的参数", e);
// // const polyline = this.obj.polyline
// // .getExtData()
// // .lineData.view.gaoMap.polyLines.filter((item) => {
// // return (
// // item.getExtData().lineData.alarmId ==
// // this.obj.polyline.getExtData().lineData.alarmId
// // );
// // })[0];
// // let options = polyline.getExtData();
// // // 暂时传值,到时候回重新刷新
// // options.lineData.orderId = e;
// // polyline.setExtData(options);
// },
deviceMore() { deviceMore() {
console.log(this.obj.polyline.getExtData().lineData); console.log(this.obj.polyline.getExtData().lineData);
this.obj.polyline.getExtData().class.view.$router.push({ this.obj.polyline.getExtData().class.view.$router.push({
...@@ -183,6 +197,9 @@ export default { ...@@ -183,6 +197,9 @@ export default {
}, },
}); });
}, },
close() {
this.obj.polyline.infoWindow.close();
},
}, },
}; };
</script> </script>
......
...@@ -70,6 +70,9 @@ ...@@ -70,6 +70,9 @@
<div> <div>
详细信息:<span>{{ data.alarmValue ? data.alarmValue : "-" }}</span> 详细信息:<span>{{ data.alarmValue ? data.alarmValue : "-" }}</span>
</div> </div>
<div v-if="!orderId">
工单编号:<span>{{ data.orderId }}</span>
</div>
</div> </div>
<div class="btn"> <div class="btn">
<span @mousedown.stop="deviceMore"> <span @mousedown.stop="deviceMore">
...@@ -83,6 +86,9 @@ ...@@ -83,6 +86,9 @@
>生成工单</el-button >生成工单</el-button
> >
</span> </span>
<span v-else @mousedown.stop="checkWork">
<el-button class="elbtn" type="primary">查看工单</el-button>
</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -115,19 +121,24 @@ export default { ...@@ -115,19 +121,24 @@ export default {
this.data.view.$refs.CreateWork.open = true; this.data.view.$refs.CreateWork.open = true;
this.data.view.$refs.CreateWork.gaoMap = this.data.view.gaoMap; this.data.view.$refs.CreateWork.gaoMap = this.data.view.gaoMap;
// 改变外层回调 // 改变外层回调
this.data.view.CreateWorkCallBack = this.CreateWorkCallBack; // this.data.view.CreateWorkCallBack = this.CreateWorkCallBack;
}, this.data.view.alarmObjChange({
CreateWorkCallBack() { alarmId: this.data.alarmId,
// console.log("markerCallBack") type: "device",
const marker = this.data.view.gaoMap.markers.filter((item) => { });
return item.getExtData().alarmId == this.data.alarmId;
})[0];
// console.log("marer.getExtData()", marker.getExtData());
let options = marker.getExtData();
// 暂时传值,到时候回重新刷新
options.orderId = "1";
marker.setExtData(options);
}, },
// CreateWorkCallBack(e) {
// // console.log("生成工单后传过来的参数", e);
// // console.log("markerCallBack");
// const marker = this.data.view.gaoMap.markers.filter((item) => {
// return item.getExtData().alarmId == this.data.alarmId;
// })[0];
// console.log("marer.getExtData()", marker.getExtData());
// let options = marker.getExtData();
// // 暂时传值,到时候回重新刷新
// options.orderId = e;
// marker.setExtData(options);
// },
deviceMore() { deviceMore() {
this.data.view.$router.push({ this.data.view.$router.push({
path: "/deviceAlarm/alarmdetail", path: "/deviceAlarm/alarmdetail",
...@@ -136,6 +147,15 @@ export default { ...@@ -136,6 +147,15 @@ export default {
}, },
}); });
}, },
// 查看工单
checkWork() {
this.data.view.$router.push({
path: "/basicsInfo/detail",
query: {
orderId: this.data.orderId,
},
});
},
}, },
beforeDestroy() { beforeDestroy() {
// this.data.view.createWorkOpen = false; // this.data.view.createWorkOpen = false;
......
...@@ -334,7 +334,7 @@ class gaodeMap { ...@@ -334,7 +334,7 @@ class gaodeMap {
map.setZoom("11"); map.setZoom("11");
} }
//map.setFitView(); //map.setFitView();
function infoClose(e) { function infoClose(e) {
let options = map.getStatus(); let options = map.getStatus();
options.scrollWheel = true; options.scrollWheel = true;
...@@ -351,6 +351,7 @@ class gaodeMap { ...@@ -351,6 +351,7 @@ class gaodeMap {
e.target.content = this.getMarketContent( e.target.data); e.target.content = this.getMarketContent( e.target.data);
e.target.infoWindow.setContent(e.target.content); e.target.infoWindow.setContent(e.target.content);
e.target.infoWindow.open(map, e.target.getPosition()); e.target.infoWindow.open(map, e.target.getPosition());
console.log("e.target.getPosition()",e.target.getExtData())
this.boxCollision(e.target.infoWindow.dom); this.boxCollision(e.target.infoWindow.dom);
// that.addCloneDome(e.target, infoWindow); // that.addCloneDome(e.target, infoWindow);
// infoWindow.close(); // infoWindow.close();
......
...@@ -48,11 +48,10 @@ ...@@ -48,11 +48,10 @@
>确 定</el-button >确 定</el-button
> >
<!-- <el-button @click="cancel">取 消</el-button> --> <!-- <el-button @click="cancel">取 消</el-button> -->
<el-button>取 消</el-button> <el-button @click.stop="close">取 消</el-button>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { inspectorList } from "@/api/system/user"; import { inspectorList } from "@/api/system/user";
import { addBasicsInfo } from "@/api/workOrder/basicsInfo"; import { addBasicsInfo } from "@/api/workOrder/basicsInfo";
...@@ -76,12 +75,12 @@ export default { ...@@ -76,12 +75,12 @@ export default {
appointInspector: "", appointInspector: "",
remarks: "", remarks: "",
}, },
gaoMap:"", gaoMap: "",
open: false, open: false,
title: "", title: "",
inspector: [], inspector: [],
loading: false, loading: false,
alarmId:"", alarmId: "",
rules: { rules: {
orderName: [ orderName: [
{ required: true, message: "工单名称不能为空", trigger: "blur" }, { required: true, message: "工单名称不能为空", trigger: "blur" },
...@@ -100,7 +99,7 @@ export default { ...@@ -100,7 +99,7 @@ export default {
open(value, oldValue) { open(value, oldValue) {
if (value) { if (value) {
console.log(this.alarmId); console.log(this.alarmId);
this.handleIssue(this.alarmId) this.handleIssue(this.alarmId);
} }
}, },
}, },
...@@ -130,14 +129,18 @@ export default { ...@@ -130,14 +129,18 @@ export default {
this.form.resourceId = this.form.alarmId; this.form.resourceId = this.form.alarmId;
this.form.orderType = "3"; this.form.orderType = "3";
addBasicsInfo(this.form).then((response) => { addBasicsInfo(this.form).then((response) => {
this.msgSuccess("生成工单成功"); if (response.code == 200) {
this.open = false; console.log(response.msg);
this.$emit("callback"); this.msgSuccess("生成工单成功");
this.open = false;
}
this.$emit("callback", 999);
}); });
} }
}); });
}, },
close() { close() {
console.log("关闭");
this.open = false; this.open = false;
}, },
}, },
......
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