change - add设备报警通知定时任务,设备报警web路由跳转

master
yinq 5 months ago
parent d54ff8c378
commit ceb9062de0

@ -27,5 +27,9 @@ public interface RemoteDmsService {
@PostMapping("/dmsBillsMaintInstance/autoAdd")
R<?> getDmsBillsMaintInstance(@RequestHeader(SecurityConstants.FROM_SOURCE) String source,String planMaintCode);
@PostMapping("/dmsRecordAlarmInfo/alarmNotification")
R<?> getDmsAlarmNotificationScheduledTask(@RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}

@ -34,6 +34,11 @@ public class RemoteDmsFallbackFactory implements FallbackFactory<RemoteDmsServic
public R<?> getDmsBillsMaintInstance(String source, String planMaintCode) {
return null;
}
@Override
public R<?> getDmsAlarmNotificationScheduledTask(String source) {
return R.fail("设备报警通知定时任务失败:" + throwable.getMessage());
}
};
}
}

@ -3,6 +3,7 @@ package com.hw.system.api;
import com.hw.common.core.constant.SecurityConstants;
import com.hw.common.core.constant.ServiceNameConstants;
import com.hw.common.core.domain.R;
import com.hw.system.api.domain.common.SysPointRouter;
import com.hw.system.api.domain.common.WfProcessActivity;
import com.hw.system.api.domain.common.vo.WfProcessActivityVo;
import com.hw.system.api.factory.RemoteSysCommonFallbackFactory;
@ -12,6 +13,8 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import java.util.List;
/**
* @ClassName : RemoteSysCommon
* @Description : zhouhy
@ -28,4 +31,7 @@ public interface RemoteSysCommonService {
@PostMapping("/wfprocessactivity/getWfProcessActivityByUI")
R<WfProcessActivity> getWfProcessActivityByUI(@RequestBody WfProcessActivityVo wfProcessActivityVo, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
@PostMapping("/pointRouter/insertPointRouterInfo")
R<SysPointRouter> insertSysPointRouterPort(@RequestBody List<SysPointRouter> sysPointRouterList, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}

@ -4,6 +4,7 @@ import com.hw.common.core.domain.R;
import com.hw.system.api.RemoteSysCommonService;
import com.hw.system.api.RemoteUserService;
import com.hw.system.api.domain.SysUser;
import com.hw.system.api.domain.common.SysPointRouter;
import com.hw.system.api.domain.common.WfProcessActivity;
import com.hw.system.api.domain.common.vo.WfProcessActivityVo;
import com.hw.system.api.model.LoginUser;
@ -13,6 +14,7 @@ import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;
import java.rmi.Remote;
import java.util.List;
/**
*
@ -45,6 +47,10 @@ public class RemoteSysCommonFallbackFactory implements FallbackFactory<RemoteSys
return R.fail("获取工单流程步骤失败:" + throwable.getMessage());
}
@Override
public R<SysPointRouter> insertSysPointRouterPort(List<SysPointRouter> sysPointRouterList, String source) {
return R.fail("调用提示路由信息失败:" + throwable.getMessage());
}
};
}

@ -0,0 +1,41 @@
package com.hw.common.core.constant;
/**
*
*
* @author ruoyi
*/
public class SystemConstants {
//系统模块
public static final String MES = "MES";
public static final String WMS = "WMS";
public static final String EMS = "EMS";
public static final String DMS = "DMS";
public static final String QMS = "QMS";
/**
* 0 1
*/
public static final String DMS_NOTICE_STATUS_FALSE = "0";//0未通知
public static final String DMS_NOTICE_STATUS_TRUE = "1";//1已通知
/**
* 1WEB 2 3PLC
*/
public static final String DMS_NOTICE_TYPE_WEB = "1";//1WEB
public static final String DMS_NOTICE_TYPE_CHAT = "2";//2公众号
public static final String DMS_NOTICE_TYPE_PLC = "3";//3PLC
/**
* (1=;2=)
*/
public static final String SYS_ROUTER_POINT_TYPE_ALARM = "1";//报警
public static final String SYS_ROUTER_POINT_TYPE_AUDIT = "2";//审核
/**
*
*/
public static final String SYS_ROUTER_DMS_ALARM_URL = "/dms/deviceAlarm/dmsRecordAlarmInfo";
}

@ -77,6 +77,16 @@
<groupId>com.hw</groupId>
<artifactId>hw-common-swagger</artifactId>
</dependency>
<dependency>
<groupId>com.hw</groupId>
<artifactId>hw-api-job</artifactId>
</dependency>
<dependency>
<groupId>com.hw</groupId>
<artifactId>hw-api-system</artifactId>
</dependency>
</dependencies>
<build>

@ -4,6 +4,7 @@ import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import com.hw.common.security.annotation.InnerAuth;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@ -106,4 +107,14 @@ public class DmsRecordAlarmInfoController extends BaseController {
public AjaxResult handleDmsRecordAlarmInfo(@RequestBody DmsRecordAlarmInfo dmsRecordAlarmInfo) {
return toAjax(dmsRecordAlarmInfoService.handleDmsRecordAlarmInfo(dmsRecordAlarmInfo));
}
/**
*
* @return
*/
@PostMapping("/alarmNotification")
@InnerAuth
public AjaxResult alarmNotification() {
return AjaxResult.success(dmsRecordAlarmInfoService.alarmNotification());
}
}

@ -66,4 +66,10 @@ public interface IDmsRecordAlarmInfoService {
*/
public int handleDmsRecordAlarmInfo(DmsRecordAlarmInfo dmsRecordAlarmInfo);
/**
*
* @return
*/
public int alarmNotification();
}

@ -1,15 +1,24 @@
package com.hw.dms.service.impl;
import java.rmi.ServerException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import com.alibaba.nacos.shaded.com.google.gson.Gson;
import com.hw.common.core.constant.DmsConstants;
import com.hw.common.core.constant.SecurityConstants;
import com.hw.common.core.constant.SystemConstants;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import com.hw.system.api.RemoteSysCommonService;
import com.hw.system.api.domain.common.SysPointRouter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hw.dms.mapper.DmsRecordAlarmInfoMapper;
import com.hw.dms.domain.DmsRecordAlarmInfo;
import com.hw.dms.service.IDmsRecordAlarmInfoService;
import org.springframework.transaction.annotation.Transactional;
/**
* Service
@ -22,6 +31,9 @@ public class DmsRecordAlarmInfoServiceImpl implements IDmsRecordAlarmInfoService
@Autowired
private DmsRecordAlarmInfoMapper dmsRecordAlarmInfoMapper;
@Autowired
private RemoteSysCommonService remoteSysCommonService;
/**
*
*
@ -92,6 +104,7 @@ public class DmsRecordAlarmInfoServiceImpl implements IDmsRecordAlarmInfoService
/**
*
*
* @param dmsRecordAlarmInfo
* @return
*/
@ -104,4 +117,47 @@ public class DmsRecordAlarmInfoServiceImpl implements IDmsRecordAlarmInfoService
dmsRecordAlarmInfo.setUpdateTime(DateUtils.getNowDate());
return dmsRecordAlarmInfoMapper.updateDmsRecordAlarmInfo(dmsRecordAlarmInfo);
}
/**
*
*
* @return
*/
@Override
@Transactional(rollbackFor = ServerException.class)
public int alarmNotification() {
DmsRecordAlarmInfo selectAlarmInfo = new DmsRecordAlarmInfo();
selectAlarmInfo.setNoticeType(SystemConstants.DMS_NOTICE_TYPE_WEB);
selectAlarmInfo.setNoticeStatus(SystemConstants.DMS_NOTICE_STATUS_FALSE);
List<DmsRecordAlarmInfo> alarmInfoList = dmsRecordAlarmInfoMapper.selectDmsRecordAlarmInfoList(selectAlarmInfo);
if (alarmInfoList.size() == 0) {
return 1;
}
List<SysPointRouter> webRouterList = new ArrayList<>();
Gson gson = new Gson();
HashMap<String, Object> map = new HashMap<>();
for (DmsRecordAlarmInfo alarmInfo : alarmInfoList) {
SysPointRouter pointRouter = new SysPointRouter();
pointRouter.setModuleCode(SystemConstants.DMS);
pointRouter.setPointType(SystemConstants.SYS_ROUTER_POINT_TYPE_ALARM);
pointRouter.setRouterAddress(SystemConstants.SYS_ROUTER_DMS_ALARM_URL);
map.put("alarmId", alarmInfo.getAlarmId());
String json = gson.toJson(map);
pointRouter.setRouterAddressDetail(json);
pointRouter.setRemark(alarmInfo.getAlarmReason());
webRouterList.add(pointRouter);
}
//WEB通知
remoteSysCommonService.insertSysPointRouterPort(webRouterList, SecurityConstants.INNER);
for (DmsRecordAlarmInfo alarmInfo : alarmInfoList) {
DmsRecordAlarmInfo recordAlarmInfo = new DmsRecordAlarmInfo();
recordAlarmInfo.setAlarmId(alarmInfo.getAlarmId());
recordAlarmInfo.setNoticeStatus(SystemConstants.DMS_NOTICE_STATUS_TRUE);
this.updateDmsRecordAlarmInfo(recordAlarmInfo);
}
//公众号通知
return 1;
}
}

@ -55,9 +55,7 @@ public class DmsRecordShutDownServiceImpl implements IDmsRecordShutDownService
@Override
public int insertDmsRecordShutDown(DmsRecordShutDown dmsRecordShutDown)
{
LoginUser user = SecurityUtils.getLoginUser();
dmsRecordShutDown.setIsFlag(1l);
dmsRecordShutDown.setCreateBy(user.getUsername());
dmsRecordShutDown.setCreateBy(SecurityUtils.getUsername());
dmsRecordShutDown.setCreateTime(DateUtils.getNowDate());
return dmsRecordShutDownMapper.insertDmsRecordShutDown(dmsRecordShutDown);
}
@ -71,8 +69,7 @@ public class DmsRecordShutDownServiceImpl implements IDmsRecordShutDownService
@Override
public int updateDmsRecordShutDown(DmsRecordShutDown dmsRecordShutDown)
{
LoginUser user = SecurityUtils.getLoginUser();
dmsRecordShutDown.setUpdateBy(user.getUsername());
dmsRecordShutDown.setUpdateBy(SecurityUtils.getUsername());
dmsRecordShutDown.setUpdateTime(DateUtils.getNowDate());
return dmsRecordShutDownMapper.updateDmsRecordShutDown(dmsRecordShutDown);
}

@ -67,6 +67,7 @@
<select id="selectDmsRecordAlarmInfoList" parameterType="DmsRecordAlarmInfo" resultMap="DmsRecordAlarmInfoResult">
<include refid="selectDmsRecordAlarmInfoVo"/>
<where>
<if test="alarmId != null ">and drai.alarm_id = #{alarmId}</if>
<if test="deviceId != null ">and drai.device_id = #{deviceId}</if>
<if test="alarmType != null and alarmType != ''">and dbar.alarm_type = #{alarmType}</if>
<if test="alarmLevel != null and alarmLevel != ''">and dbar.alarm_level = #{alarmLevel}</if>
@ -84,6 +85,7 @@
<if test="handleSuggest != null and handleSuggest != ''">and drai.handle_suggest = #{handleSuggest}</if>
<if test="noticeStatus != null and noticeStatus != ''">and drai.notice_status = #{noticeStatus}</if>
<if test="handleUser != null and handleUser != ''">and drai.handle_user = #{handleUser}</if>
<if test="noticeType != null and noticeType != ''">and dbar.notice_type like concat( '%',#{noticeType} ,'%')</if>
<if test="params.beginHandleTime != null and params.beginHandleTime != '' and params.endHandleTime != null and params.endHandleTime != ''">
and drai.handle_time between #{params.beginHandleTime} and #{params.endHandleTime}
</if>

@ -1,39 +1,52 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hw.dms.mapper.DmsRecordShutDownMapper">
<resultMap type="DmsRecordShutDown" id="DmsRecordShutDownResult">
<result property="recordShutDownId" column="record_shut_down_id" />
<result property="deviceId" column="device_id" />
<result property="shutType" column="shut_type" />
<result property="shutReason" column="shut_reason" />
<result property="shutBeginTime" column="shut_begin_time" />
<result property="shutEndTime" column="shut_end_time" />
<result property="shutTime" column="shut_time" />
<result property="isFlag" column="is_flag" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="recordShutDownId" column="record_shut_down_id"/>
<result property="deviceId" column="device_id"/>
<result property="shutType" column="shut_type"/>
<result property="shutReason" column="shut_reason"/>
<result property="shutBeginTime" column="shut_begin_time"/>
<result property="shutEndTime" column="shut_end_time"/>
<result property="shutTime" column="shut_time"/>
<result property="isFlag" column="is_flag"/>
<result property="remark" column="remark"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
</resultMap>
<sql id="selectDmsRecordShutDownVo">
select record_shut_down_id, device_id, shut_type, shut_reason, shut_begin_time, shut_end_time, shut_time, is_flag, remark, create_by, create_time, update_by, update_time from dms_record_shut_down
select record_shut_down_id,
device_id,
shut_type,
shut_reason,
shut_begin_time,
shut_end_time,
shut_time,
is_flag,
remark,
create_by,
create_time,
update_by,
update_time
from dms_record_shut_down
</sql>
<select id="selectDmsRecordShutDownList" parameterType="DmsRecordShutDown" resultMap="DmsRecordShutDownResult">
<include refid="selectDmsRecordShutDownVo"/>
<where>
<if test="deviceId != null "> and device_id = #{deviceId}</if>
<if test="shutType != null "> and shut_type = #{shutType}</if>
<if test="shutReason != null and shutReason != ''"> and shut_reason = #{shutReason}</if>
<if test="shutBeginTime != null "> and shut_begin_time >= #{shutBeginTime}</if>
<if test="shutEndTime != null "> and #{shutEndTime}>=shut_end_time</if>
<if test="shutTime != null "> and shut_time = #{shutTime}</if>
<if test="isFlag != null "> and is_flag = #{isFlag}</if>
<if test="deviceId != null ">and device_id = #{deviceId}</if>
<if test="shutType != null ">and shut_type = #{shutType}</if>
<if test="shutReason != null and shutReason != ''">and shut_reason = #{shutReason}</if>
<if test="shutBeginTime != null ">and shut_begin_time >= #{shutBeginTime}</if>
<if test="shutEndTime != null ">and #{shutEndTime}>=shut_end_time</if>
<if test="shutTime != null ">and shut_time = #{shutTime}</if>
<if test="isFlag != null ">and is_flag = #{isFlag}</if>
</where>
</select>
@ -42,7 +55,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where record_shut_down_id = #{recordShutDownId}
</select>
<insert id="insertDmsRecordShutDown" parameterType="DmsRecordShutDown" useGeneratedKeys="true" keyProperty="recordShutDownId">
<insert id="insertDmsRecordShutDown" parameterType="DmsRecordShutDown" useGeneratedKeys="true"
keyProperty="recordShutDownId">
insert into dms_record_shut_down
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="deviceId != null">device_id,</if>
@ -57,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="deviceId != null">#{deviceId},</if>
<if test="shutType != null">#{shutType},</if>
@ -71,7 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</trim>
</insert>
<update id="updateDmsRecordShutDown" parameterType="DmsRecordShutDown">
@ -94,7 +108,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<delete id="deleteDmsRecordShutDownByRecordShutDownId" parameterType="Long">
delete from dms_record_shut_down where record_shut_down_id = #{recordShutDownId}
delete
from dms_record_shut_down
where record_shut_down_id = #{recordShutDownId}
</delete>
<delete id="deleteDmsRecordShutDownByRecordShutDownIds" parameterType="String">

@ -127,4 +127,10 @@ public class RyTask
System.out.println("++定时同步成品出库信息给ERP++synchronizeProductOutstockInformationToERP");
remoteWmsService.synchronizeProductOutstockInformationToERP(days, SecurityConstants.INNER);
}
public void getDmsAlarmNotificationScheduledTask(){
System.out.println("++设备报警通知定时任务++getDmsAlarmNotificationScheduledTask");
remoteDmsService.getDmsAlarmNotificationScheduledTask(SecurityConstants.INNER);
}
}

@ -1,9 +1,9 @@
package com.hw.system.common.controller;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import com.hw.common.security.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.RestController;
import com.hw.common.log.annotation.Log;
import com.hw.common.log.enums.BusinessType;
import com.hw.common.security.annotation.RequiresPermissions;
import com.hw.system.common.domain.SysPointRouter;
import com.hw.system.api.domain.common.SysPointRouter;
import com.hw.system.common.service.ISysPointRouterService;
import com.hw.common.core.web.controller.BaseController;
import com.hw.common.core.web.domain.AjaxResult;
@ -74,6 +74,7 @@ public class SysPointRouterController extends BaseController {
@Log(title = "提示路由信息", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody SysPointRouter sysPointRouter) {
sysPointRouter.setCreateBy(SecurityUtils.getUsername());
return toAjax(sysPointRouterService.insertSysPointRouter(sysPointRouter));
}
@ -84,6 +85,7 @@ public class SysPointRouterController extends BaseController {
@Log(title = "提示路由信息", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody SysPointRouter sysPointRouter) {
sysPointRouter.setUpdateBy(SecurityUtils.getUsername());
return toAjax(sysPointRouterService.updateSysPointRouter(sysPointRouter));
}
@ -98,12 +100,13 @@ public class SysPointRouterController extends BaseController {
}
/**
*
* @param sysPointRouter
* List
* @param sysPointRouterList
* @return
*/
@Log(title = "提示路由信息", businessType = BusinessType.INSERT)
@PostMapping("/insertPointRouterInfo")
public AjaxResult insertPointRouterInfo(@RequestBody SysPointRouter sysPointRouter) {
return toAjax(sysPointRouterService.insertSysPointRouter(sysPointRouter));
public AjaxResult insertPointRouterInfo(@RequestBody List<SysPointRouter> sysPointRouterList) {
return toAjax(sysPointRouterService.insertSysPointRouterList(sysPointRouterList));
}
}

@ -1,7 +1,7 @@
package com.hw.system.common.mapper;
import java.util.List;
import com.hw.system.common.domain.SysPointRouter;
import com.hw.system.api.domain.common.SysPointRouter;
/**
* Mapper

@ -1,7 +1,7 @@
package com.hw.system.common.service;
import java.util.List;
import com.hw.system.common.domain.SysPointRouter;
import com.hw.system.api.domain.common.SysPointRouter;
/**
* Service
@ -58,4 +58,11 @@ public interface ISysPointRouterService
* @return
*/
public int deleteSysPointRouterByPointRouterId(Long pointRouterId);
/**
* List
* @param sysPointRouterList
* @return
*/
public int insertSysPointRouterList(List<SysPointRouter> sysPointRouterList);
}

@ -1,16 +1,15 @@
package com.hw.system.common.service.impl;
import java.io.IOException;
import java.io.OutputStream;
import java.rmi.ServerException;
import java.util.List;
import com.hw.common.core.utils.DateUtils;
import com.hw.common.security.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hw.system.common.mapper.SysPointRouterMapper;
import com.hw.system.common.domain.SysPointRouter;
import com.hw.system.api.domain.common.SysPointRouter;
import com.hw.system.common.service.ISysPointRouterService;
import org.springframework.transaction.annotation.Transactional;
/**
* Service
@ -53,7 +52,6 @@ public class SysPointRouterServiceImpl implements ISysPointRouterService {
*/
@Override
public int insertSysPointRouter(SysPointRouter sysPointRouter) {
sysPointRouter.setCreateBy(SecurityUtils.getUsername());
sysPointRouter.setCreateTime(DateUtils.getNowDate());
return sysPointRouterMapper.insertSysPointRouter(sysPointRouter);
}
@ -66,7 +64,6 @@ public class SysPointRouterServiceImpl implements ISysPointRouterService {
*/
@Override
public int updateSysPointRouter(SysPointRouter sysPointRouter) {
sysPointRouter.setUpdateBy(SecurityUtils.getUsername());
sysPointRouter.setUpdateTime(DateUtils.getNowDate());
return sysPointRouterMapper.updateSysPointRouter(sysPointRouter);
}
@ -92,4 +89,19 @@ public class SysPointRouterServiceImpl implements ISysPointRouterService {
public int deleteSysPointRouterByPointRouterId(Long pointRouterId) {
return sysPointRouterMapper.deleteSysPointRouterByPointRouterId(pointRouterId);
}
/**
* List
* @param sysPointRouterList
* @return
*/
@Override
@Transactional(rollbackFor = ServerException.class)
public int insertSysPointRouterList(List<SysPointRouter> sysPointRouterList) {
for (SysPointRouter router : sysPointRouterList) {
this.insertSysPointRouter(router);
}
return 1;
}
}

@ -50,6 +50,7 @@
and update_time between #{params.beginupdateTime} and #{params.endupdateTime}
</if>
</where>
order by create_time desc
</select>
<select id="selectSysPointRouterByPointRouterId" parameterType="Long" resultMap="SysPointRouterResult">

@ -20,6 +20,7 @@
<module>hw-mes</module>
<module>hw-qms</module>
<module>hw-printer</module>
<module>hw-dms</module>
</modules>
<artifactId>hw-modules</artifactId>

@ -419,10 +419,20 @@ export default {
};
},
created() {
console.log('url参数',this.$route.query)
getDeviceLedgerList(null).then(response => {
this.deviceLedgerList = response.data
})
this.getList();
const alarmId = this.$route.query.alarmId
if (alarmId == null){
this.getList();
} else {
listDmsRecordAlarmInfo({alarmId: alarmId}).then(response => {
this.dmsRecordAlarmInfoList = response.rows;
this.total = response.total;
this.loading = false;
});
}
},
methods: {
/** 查询设备报警记录列表 */

@ -140,12 +140,12 @@
</el-table-column>
<el-table-column label="路由地址" align="center" prop="routerAddress" v-if="columns[3].visible"/>
<el-table-column label="路由地址详情" align="center" prop="routerAddressDetail" v-if="columns[4].visible"/>
<el-table-column label="提示信息" align="center" prop="remark" v-if="columns[6].visible"/>
<el-table-column label="跳转标识" align="center" prop="routerFlag" v-if="columns[5].visible">
<template slot-scope="scope">
<dict-tag :options="dict.type.router_flag" :value="scope.row.routerFlag"/>
</template>
</el-table-column>
<el-table-column label="提示信息" align="center" prop="remark" v-if="columns[6].visible"/>
<el-table-column label="创建时间" align="center" prop="createTime" width="180" v-if="columns[8].visible">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
@ -161,19 +161,19 @@
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
icon="el-icon-d-arrow-right"
@click="handleRouter(scope.row)"
v-hasPermi="['system:pointRouter:edit']"
>修改
</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:pointRouter:remove']"
>删除
>跳转
</el-button>
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['system:pointRouter:remove']"-->
<!-- >删除-->
<!-- </el-button>-->
</template>
</el-table-column>
</el-table>
@ -304,9 +304,9 @@ export default {
{key: 1, label: `功能模块`, visible: true},
{key: 2, label: `提示类型`, visible: true},
{key: 3, label: `路由地址`, visible: true},
{key: 4, label: `路由地址详情`, visible: true},
{key: 4, label: `路由地址详情`, visible: false},
{key: 5, label: `跳转标识`, visible: true},
{key: 6, label: `提示信息`, visible: false},
{key: 6, label: `提示信息`, visible: true},
{key: 7, label: `创建人`, visible: false},
{key: 8, label: `创建时间`, visible: true},
{key: 9, label: `更新人`, visible: false},
@ -383,6 +383,14 @@ export default {
this.open = true;
this.title = "添加提示路由信息";
},
handleRouter(row){
let params = {};
if (row.routerAddressDetail != null){
params = JSON.parse(row.routerAddressDetail)
}
this.$tab.openPage(row.moduleCode + this.selectDictLabel(this.dict.type.point_type, row.pointType),
row.routerAddress, params);
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();

Loading…
Cancel
Save