diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/base/BaseAlarmInfoController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/base/BaseAlarmInfoController.java index 9dd65f2..dc4aed4 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/base/BaseAlarmInfoController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/base/BaseAlarmInfoController.java @@ -63,8 +63,7 @@ public class BaseAlarmInfoController extends BaseController /** * 查询传感器报警信息参数 */ - @RequiresPermissions("base:alarmInfo:list") - @PostMapping("/getAlarmParams") + @GetMapping("/getAlarmParams") @ResponseBody public TableDataInfo getAlarmParams(String sensorId) { diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index ed3ae52..abaf8f6 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -6,12 +6,12 @@ spring: druid: # 主库数据源 master: - url: jdbc:mysql://121.36.58.109:3306/jrm-intelligent-iot?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 - username: root - password: Haiwei123456 -# url: jdbc:mysql://localhost:3306/jrm-intelligent-iot?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 +# url: jdbc:mysql://121.36.58.109:3306/jrm-intelligent-iot?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 # username: root -# password: root +# password: Haiwei123456 + url: jdbc:mysql://localhost:3306/jrm-intelligent-iot?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + username: root + password: root # 从库数据源 slave: # 从数据源开关/默认关闭 diff --git a/ruoyi-admin/src/main/resources/templates/base/sensorInfo/sensorInfo.html b/ruoyi-admin/src/main/resources/templates/base/sensorInfo/sensorInfo.html index c9df879..fd6b7c2 100644 --- a/ruoyi-admin/src/main/resources/templates/base/sensorInfo/sensorInfo.html +++ b/ruoyi-admin/src/main/resources/templates/base/sensorInfo/sensorInfo.html @@ -296,16 +296,11 @@ } const onClickRow = function (row, $element) { - initTable(row.sensorId); - } - - // 根据选中行查询关联文件 - function initTable(id) { //先销毁表格,必须先销毁才能实现动态加载数据 $('#bootstrap-table1').bootstrapTable('destroy'); $('#bootstrap-table1').bootstrapTable({ - method: "post", //向服务器请求数据的方式 - url: "/base/alarmInfo/getAlarmParams?sensorId=" + id, + method: "get", //向服务器请求数据的方式 + url: "/base/alarmInfo/getAlarmParams?sensorId="+row.sensorId, deleteUrl: "/base/alarmInfo/delete", striped: true, //表格显示条纹 pagination: false, //不启动分页 @@ -374,6 +369,8 @@ }); } + +