diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/iot/WisdomScenarioContorller.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/iot/WisdomScenarioContorller.java index 1c8acbd..008b88b 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/iot/WisdomScenarioContorller.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/iot/WisdomScenarioContorller.java @@ -1,9 +1,12 @@ package com.ruoyi.web.controller.iot; import com.alibaba.fastjson.JSONArray; +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.system.domain.BaseAlarmModule; import com.ruoyi.system.domain.BaseMonitorunitInfo; import com.ruoyi.system.domain.BaseSensorInfo; +import com.ruoyi.system.domain.RecordAlarm; import com.ruoyi.system.domain.dto.BaseAlarmModuleDto; import com.ruoyi.system.domain.dto.BaseMonitorunitInfoDto; import com.ruoyi.system.domain.dto.BaseSensorInfoDto; @@ -32,7 +35,7 @@ import java.util.stream.Stream; */ @Controller @RequestMapping("/iot/wisdomScenario") -public class WisdomScenarioContorller { +public class WisdomScenarioContorller extends BaseController { @Autowired private IBaseMonitorunitInfoService baseMonitorunitInfoService; @@ -168,4 +171,18 @@ public class WisdomScenarioContorller { return null; } + @GetMapping("/getAlarmByUid") + @ResponseBody + public String getAlarmByUid(String alarmuid){ + RecordAlarm recordAlarm = recordAlarmService.selectRecordAlarmBySensorId(alarmuid); + return JSONArray.toJSONString(recordAlarm); + } + + @PostMapping("/disposeAlarm") + @ResponseBody + public AjaxResult disposeAlarm(RecordAlarm recordAlarm){ + recordAlarm.setDisposeFlag(1L); + return toAjax(recordAlarmService.updateRecordAlarm(recordAlarm)); + } + } diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/record/RecordAlarmController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/record/RecordAlarmController.java index e69a999..ff15ba6 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/record/RecordAlarmController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/record/RecordAlarmController.java @@ -1,6 +1,9 @@ package com.ruoyi.web.controller.record; +import java.util.ArrayList; import java.util.List; + +import com.alibaba.fastjson.JSONArray; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -92,10 +95,10 @@ public class RecordAlarmController extends BaseController /** * 修改异常数据记录 */ - @GetMapping("/edit/{sensorId}") - public String edit(@PathVariable("sensorId") String sensorId, ModelMap mmap) + @GetMapping("/edit/{alarmuid}") + public String edit(@PathVariable("alarmuid") String alarmuid, ModelMap mmap) { - RecordAlarm recordAlarm = recordAlarmService.selectRecordAlarmBySensorId(sensorId); + RecordAlarm recordAlarm = recordAlarmService.selectRecordAlarmBySensorId(alarmuid); mmap.put("recordAlarm", recordAlarm); return prefix + "/edit"; } diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index abaf8f6..ed3ae52 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/application.yml b/ruoyi-admin/src/main/resources/application.yml index 223e8e4..340469c 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -7,7 +7,7 @@ ruoyi: # 版权年份 copyrightYear: 2021 # 实例演示开关 - demoEnabled: false + demoEnabled: true # 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /home/ruoyi/uploadPath) profile: D:/ruoyi/uploadPath # 获取ip地址开关 diff --git a/ruoyi-admin/src/main/resources/static/js/Iot-ui/MiniDialog-es5.min.js b/ruoyi-admin/src/main/resources/static/js/Iot-ui/MiniDialog-es5.min.js new file mode 100644 index 0000000..dc0e5a8 --- /dev/null +++ b/ruoyi-admin/src/main/resources/static/js/Iot-ui/MiniDialog-es5.min.js @@ -0,0 +1,309 @@ +/*! + * MiniDialog v1.0.0 + * Copyright (C) 2019, ZhaoGang + * Released under the MIT license. + */ +var _typeof = "function" === typeof Symbol && "symbol" === typeof Symbol.iterator ? function (t) { + return typeof t +} : function (t) { + return t && "function" === typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t +}; +!function (t, p) { + "function" === typeof define && define.amd ? define(["minidialog"], p) : "undefined" !== typeof module && "object" === ("undefined" === typeof exports ? "undefined" : _typeof(exports)) ? module.exports = p() : t.Dialog = p() +}("undefined" !== typeof window ? window : void 0, function () { + function t(v) { + for (var b in D) { + var d = D[b]; + if ("object" !== a.type(d)) void 0 === v[b] && (v[b] = d); else for (var f in d) v[b] ? void 0 === v[b][f] && (v[b][f] = d[f]) : v[b] = d + } + return v + } + + function p(v, b, a) { + e({SHORTCUTS: {type: v, title: b, content: a}}) + } + + var E = navigator.userAgent.toLowerCase(); + E.match(/(ios|iphone|ipod|ipad|mobile|android)/); + var W = E.match("trident"), d = function (a, b) { + return (b || document).querySelector(a) + }, x = function (a, b) { + a = "object" === ("undefined" === typeof a ? "undefined" : _typeof(a)) ? a.length ? a : [a] : (b || document).querySelectorAll(a); + return Array.from ? Array.from(a) : [].slice.call(a) + }, a = { + getCSS: function (a, b) { + return window.getComputedStyle(a, null).getPropertyValue(b) + }, setCSS: function (a, b) { + x(a).forEach(function (a) { + for (var d in b) a.style[d] = b[d] + }) + }, setAttr: function (a, b) { + x(a).forEach(function (a) { + for (var d in b) a.setAttribute(d, b[d]) + }) + }, append: function (a, b) { + x(a).forEach(function (a) { + a.insertAdjacentHTML("beforeend", b) + }) + }, prepend: function (a, b) { + x(a).forEach(function (a) { + a.insertAdjacentHTML("afterbegin", b) + }) + }, remove: function (a) { + x(a).forEach(function (a) { + a.parentNode.removeChild(a) + }) + }, type: function (a) { + return Object.prototype.toString.call(a).replace(/(\[object |\])/g, "").toLowerCase() + }, isPlainObject: function (d) { + return "object" === a.type(d) + }, isEmptyObject: function (a) { + return !Object.keys(a).length + } + }, Q = function (a) { + var b = ""; + switch (a) { + case "info": + b = '\x3csvg viewBox\x3d"0 0 1024 1024" version\x3d"1.1" width\x3d"30" height\x3d"30"\x3e\x3cpath d\x3d"M513.46384 60.225663c-248.292969 0-449.584462 201.299679-449.584462 449.625394 0 248.296039 201.291492 449.594695 449.584462 449.594695 248.28069 0 449.63665-201.299679 449.63665-449.594695C963.099467 261.525342 761.744529 60.225663 513.46384 60.225663zM554.626331 714.465225c0 22.720468-18.416442 41.139979-41.136909 41.139979s-41.136909-18.419512-41.136909-41.139979L472.352513 453.586612c0-22.716374 18.416442-41.135886 41.136909-41.135886s41.136909 18.419512 41.136909 41.135886L554.626331 714.465225zM513.489422 372.423081c-25.719778 0-46.561455-20.845771-46.561455-46.557362 0-25.719778 20.841677-46.560432 46.561455-46.560432s46.561455 20.841677 46.561455 46.560432C560.050878 351.577311 539.2092 372.423081 513.489422 372.423081z" fill\x3d"#19b6f8"\x3e\x3c/path\x3e\x3c/svg\x3e'; + break; + case "success": + b = '\x3csvg viewBox\x3d"0 0 1024 1024" version\x3d"1.1" width\x3d"30" height\x3d"30"\x3e\x3cpath d\x3d"M513.559007 60.225663c-248.299109 0-449.587532 201.299679-449.587532 449.625394 0 248.296039 201.288422 449.594695 449.587532 449.594695 248.27762 0 449.63358-201.299679 449.63358-449.594695C963.192587 261.525342 761.836627 60.225663 513.559007 60.225663zM766.338151 407.245168 485.919507 692.261527c-0.044002 0.045025-0.084934 0.092098-0.127913 0.137123s-0.090051 0.085958-0.134053 0.12996l-0.751107 0.763386c-6.256494 6.359848-14.548344 9.5454-22.967084 9.597589-0.061398 0.001023-0.121773 0.001023-0.183172 0.002047-0.161682 0-0.322341 0.004093-0.485047 0.002047-8.398274 0.068562-16.715707-2.979868-23.057135-9.217942L282.51591 540.491914c-12.999059-12.791327-12.775978-34.097586 0.49835-47.590901 13.281491-13.494339 34.58468-14.06739 47.576575-1.276063l130.36921 128.264269 256.507048-260.722046c12.797467-12.999059 34.100656-12.771885 47.591925 0.502443C778.555403 372.942921 779.129478 394.243039 766.338151 407.245168z" fill\x3d"#08ba61"\x3e\x3c/path\x3e\x3c/svg\x3e'; + break; + case "warn": + b = '\x3csvg viewBox\x3d"0 0 1024 1024" version\x3d"1.1" width\x3d"30" height\x3d"30"\x3e\x3cpath d\x3d"M513.46384 60.225663c-248.291946 0-449.584462 201.299679-449.584462 449.624371 0 248.296039 201.292516 449.594695 449.584462 449.594695 248.28069 0 449.63665-201.299679 449.63665-449.594695C963.099467 261.525342 761.744529 60.225663 513.46384 60.225663zM473.683834 304.175721c2.690272-35.478026 40.597627-32.423457 40.597627-32.423457s34.488489-2.288113 39.011502 32.225959c0 0 8.162914 181.774997-15.904225 294.366308 0 0-3.746324 14.944364-23.107277 16.22145l0 0.275269c-20.751626-0.539282-24.692379-16.296151-24.692379-16.296151C465.521944 485.947647 473.683834 304.175721 473.683834 304.175721zM513.489422 747.984642c-25.719778 0-46.560432-20.840654-46.560432-46.560432 0-25.710568 20.840654-46.556339 46.560432-46.556339s46.561455 20.845771 46.561455 46.556339C560.050878 727.143988 539.2092 747.984642 513.489422 747.984642z" fill\x3d"#f39509"\x3e\x3c/path\x3e\x3c/svg\x3e'; + break; + case "error": + b = '\x3csvg viewBox\x3d"0 0 1024 1024" version\x3d"1.1" width\x3d"30" height\x3d"30"\x3e\x3cpath d\x3d"M513.559007 60.225663c-248.291946 0-449.587532 201.299679-449.587532 449.625394 0 248.291946 201.295586 449.594695 449.587532 449.594695 248.284783 0 449.632557-201.303772 449.632557-449.594695C963.191564 261.525342 761.84379 60.225663 513.559007 60.225663zM678.729837 644.059712c12.798491 13.003152 12.217253 34.302247-1.272993 47.575552-13.490246 13.275351-34.800597 13.502525-47.590901 0.503467l-116.284423-118.191866-116.278283 118.187773c-12.798491 13.003152-34.093493 12.774955-47.590901-0.499373-13.497409-13.277398-14.063297-34.576493-1.279133-47.575552l117.065206-118.984928L348.433202 406.088832c-12.783141-12.999059-12.218276-34.298154 1.279133-47.576575 13.497409-13.274328 34.792411-13.501502 47.590901-0.49835l116.279307 118.187773 116.2834-118.190843c12.790304-12.999059 34.100656-12.771885 47.590901 0.502443 13.491269 13.274328 14.071484 34.573423 1.272993 47.576575L561.666678 525.07376 678.729837 644.059712z" fill\x3d"#d81e06"\x3e\x3c/path\x3e\x3c/svg\x3e'; + break; + case "close": + b = '\x3csvg viewBox\x3d"0 0 1024 1024" version\x3d"1.1" width\x3d"16" height\x3d"16"\x3e\x3cpath d\x3d"M806.4 172.8l-633.6 633.6c-12.8 12.8-12.8 32 0 44.8 12.8 12.8 32 12.8 44.8 0l633.6-633.6c12.8-12.8 12.8-32 0-44.8-12.8-12.8-32-12.8-44.8 0z" fill\x3d"#000"\x3e\x3c/path\x3e\x3cpath d\x3d"M172.8 172.8c-12.8 12.8-12.8 32 0 44.8l633.6 633.6c12.8 12.8 32 12.8 44.8 0 12.8-12.8 12.8-32 0-44.8L217.6 172.8c-12.8-12.8-32-12.8-44.8 0z" fill\x3d"#000"\x3e\x3c/path\x3e\x3c/svg\x3e' + } + return b + }, + R = '\n\t\t\x3cdiv class\x3d"mini-dialog-container"\x3e\n\t\t\t\x3cdiv class\x3d"mini-dialog-mask"\x3e\x3c/div\x3e\n\t\t\t\x3cdiv class\x3d"mini-dialog-wrapper"\x3e\n\t\t\t\t\x3cdiv class\x3d"mini-dialog-header"\x3e\n\t\t\t\t\t\x3cspan\x3e\x3c/span\x3e\n\t\t\t\t\t\x3ci\x3e' + Q("close") + '\x3c/i\x3e\n\t\t\t\t\x3c/div\x3e\n\t\t\t\t\x3cdiv class\x3d"mini-dialog-main"\x3e\n\t\t\t\t\t\x3cdiv\x3e\x3c/div\x3e\n\t\t\t\t\x3c/div\x3e\n\t\t\t\t\x3cdiv class\x3d"mini-dialog-footer mini-dialog-noselect"\x3e\n\t\t\t\t\t\x3cdiv class\x3d"mini-dialog-cancel"\x3e\n\t\t\t\t\t\t\x3cspan\x3e\x3c/span\x3e\n\t\t\t\t\t\x3c/div\x3e\n\t\t\t\t\t\x3cdiv class\x3d"mini-dialog-ok"\x3e\n\t\t\t\t\t\t\x3cspan\x3e\x3c/span\x3e\n\t\t\t\t\t\x3c/div\x3e\n\t\t\t\t\x3c/div\x3e\n\t\t\t\x3c/div\x3e\n\t\t\x3c/div\x3e\n\t', + D = { + title: "\u7f51\u9875\u6d88\u606f", + content: "", + contentBgColor: "#fff", + iframeContent: null, + videoContent: null, + imageContent: null, + fullscreen: !1, + draggable: !1, + maskClose: !1, + mask: !0, + closable: !0, + showTitle: !0, + bodyScroll: !0, + showButton: !0, + autoCloseEffect: !0, + parentsIframeLayer: 0, + borderRadius: 6, + autoClose: 0, + width: 500, + ok: { + text: "\u786e\u5b9a", loading: !1, loadingText: "\u786e\u5b9a", notClose: !1, callback: function () { + } + }, + cancel: { + text: "\u53d6\u6d88", show: !0, callback: function () { + } + }, + afterOpen: function () { + }, + afterClose: function () { + }, + SHORTCUTS: null + }, e = function b() { + function P() { + g.removeEventListener("animationend", P); + "function" === a.type(c.afterOpen) && c.afterOpen(); + var f = d(".mini-dialog-autoclose", g); + f && (f.style.transitionDuration = ~~c.autoClose + "ms", f.classList.add("mini-dialog-autoclose-active"), f.addEventListener("transitionend", function () { + b.close(e, l) + })) + } + + var f = arguments.length, m = {}; + if (f) { + 1 === f ? a.isPlainObject(0 >= arguments.length ? void 0 : arguments[0]) ? m = 0 >= arguments.length ? void 0 : arguments[0] : m.content = 0 >= arguments.length ? void 0 : arguments[0] : (m.title = 0 >= arguments.length ? void 0 : arguments[0], m.content = 1 >= arguments.length ? void 0 : arguments[1], m.width = 2 >= arguments.length ? void 0 : arguments[2]); + var c = t(m || {}), f = c.fullscreen, q = c.width, l = void 0; + if (c.parentsIframeLayer) { + l = parent; + for (m = 0; m < c.parentsIframeLayer - 1; m++) l = l.parent; + d("style.mini-dialog-css", l.document) || a.append(d("head", l.document), '\x3cstyle class\x3d"mini-dialog-css"\x3e\n\t\tbody.mini-dialog-body-noscroll{padding-right:17px;position:relative;height:100%;overflow:hidden}\n\t\t.mini-dialog-noselect{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}\n\t\t.mini-dialog-container{position:fixed;top:0;left:0;width:100%;height:100%;z-index:2147483580;pointer-events:none}\n\t\t.mini-dialog-container *{-webkit-tap-highlight-color:transparent;margin:0;padding:0}\n\t\t.mini-dialog-container-top{z-index:2147483584}\n\t\t.mini-dialog-mask{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.5);pointer-events:auto}\n\t\t.mini-dialog-mask-show{animation:MiniDialogMaskShow .35s;animation-fill-mode:forwards}\n\t\t.mini-dialog-mask-hide{animation:MiniDialogMaskHide .35s;animation-fill-mode:forwards}\n\t\t.mini-dialog-wrapper{position:absolute;top:50%;left:50%;background:#fff;overflow:hidden;transform:translate(-50%,-50%);box-shadow:rgba(0,0,0,.12) 0 0 12px;pointer-events:auto}\n\t\t.mini-dialog-wrapper-fullscreen{width:100%!important;height:100%!important;border-radius:0!important}\n\t\t.mini-dialog-wrapper-show{animation:MiniDialogWrapperShow .35s;animation-fill-mode:forwards}\n\t\t.mini-dialog-wrapper-hide{animation:MiniDialogWrapperHide .35s;animation-fill-mode:forwards}\n\t\t.mini-dialog-header{overflow:hidden;border-bottom:#e6e6e6 solid 1px}\n\t\t.mini-dialog-header-move{cursor:grab}\n\t\t.mini-dialog-header-move-ie{cursor:move}\n\t\t.mini-dialog-header\x3espan{display:block;float:left;width:calc(100% - 65px);height:52px;line-height:52px;padding:0 15px;font-size:16px;font-weight:700;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n\t\t.mini-dialog-header\x3ei{display:block;float:right;width:20px;height:20px;line-height:20px;margin:17px 13px 0 0;font-style:normal;text-align:center;cursor:pointer;opacity:.35;transition:.2s}\n\t\t.mini-dialog-header\x3ei:hover{opacity:1}\n\t\t.mini-dialog-header-drag{cursor:move}\n\t\t.mini-dialog-main{position:relative;padding:15px 0;min-height:100px;font-size:14px;line-height:160%;overflow:auto;word-break:break-all;color:#292929;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}\n\t\t.mini-dialog-main\x3ediv{overflow:hidden;margin:0 15px}\n\t\t.mini-dialog-main\x3eiframe,.mini-dialog-main\x3eimg{display:block;position:absolute;top:0;left:0;width:100%;height:100%}\n\t\t.mini-dialog-main.mini-dialog-mobile-main{padding:10px 0}\n\t\t.mini-dialog-main.mini-dialog-mobile-main\x3ediv{margin:0 10px}\n\t\t.mini-dialog-main:hover .mini-dialog-image-prev,.mini-dialog-main:hover .mini-dialog-image-next{opacity:1}\n\t\t.mini-dialog-image-prev,.mini-dialog-image-next{opacity:0;transition:.2s}\n\t\tdiv.mini-dialog-image-wrapper{position:absolute;top:0;left:0;width:100%;height:100%;margin:0}\n\t\t.mini-dialog-image-wrapper\x3ediv:first-child{position:absolute;top:0;left:0;height:100%;transition-property:transform;transition-duration:.8s;transition-timing-function:cubic-bezier(.57,0,.375,1)}\n\t\t.mini-dialog-image-wrapper img{display:block;float:left}\n\t\tdiv.mini-dialog-image-next,div.mini-dialog-image-prev{width:40px;height:40px;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNTU1NzI0MjA4NjA5IiBjbGFzcz0iaWNvbiIgc3R5bGU9IiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjIyOTAiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjgiIGhlaWdodD0iMjgiPjxkZWZzPjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+PC9zdHlsZT48L2RlZnM+PHBhdGggZD0iTTY3MC42NzY5MjkgNzc3LjU5Mjk4NCA0MDMuNjI3NzggNTEzLjM2MjAyMWwyNjUuMzIwNzg1LTI2OC4xNDYxMzNjMTEuNzc2MjA4LTExLjc3NTE4NCAxMS43MzQyNTItMzAuOTA4OTY0LTAuMDkxMDc0LTQyLjczNDI5bC0wLjAwMTAyMyAwYy0xMS44MjUzMjYtMTEuODI2MzUtMzAuOTU4MDgyLTExLjg2NzI4Mi00Mi43MjgxNSAyLjkzMDc0OUwzNDMuMTAwMjQyIDQ4OC40NDA0MjFjLTMuODE3OTU1IDQuMjczMzI3LTguMjA1ODkyIDkuMzIxMjk2LTguOTMzNDYzIDEyLjA0NTMzNy00LjQ3MDgyNSAxMS4xMTIwODItMi4yMzI4NTQgMjQuNzY1MDMzIDYuNzEwODQyIDM1Ljk4NzYzMmwyODYuOTgyMTMgMjg2Ljk4MjEzYzExLjg3NTQ2OCA4Ljg0NzUwNSAzMS4wOTYyMjkgOC44OTM1NTQgNDIuOTIyNTc4LTIuOTMyNzk2QzY4Mi42MDY2MzMgODA4LjY5NjM3NiA2ODIuNTYwNTg0IDc4OS40NzY2MzkgNjcwLjY3NjkyOSA3NzcuNTkyOTg0eiIgcC1pZD0iMjI5MSIgZmlsbD0iI2ZmZmZmZiI+PC9wYXRoPjwvc3ZnPg\x3d\x3d);background-color:rgba(0,0,0,.5);background-position:center;background-repeat:no-repeat;position:absolute;top:50%;border-radius:50%;cursor:pointer;margin-top:-20px}\n\t\t.mini-dialog-image-prev{left:15px}\n\t\t.mini-dialog-image-next{right:15px;transform:rotate(180deg)}\n\t\t.mini-dialog-footer{text-align:right;height:34px;padding:15px 0;border-top:#e6e6e6 solid 1px}\n\t\t.mini-dialog-footer\x3ediv{display:inline-block;font-size:14px;cursor:pointer;text-align:center;border:#e8e8e8 solid 1px;height:32px;line-height:32px;vertical-align:middle;border-radius:4px;padding:0 14px;transition:.2s}\n\t\tdiv.mini-dialog-ok{color:#fff;background:#19b6f8;border-color:#19b6f8;margin:0 15px 0 5px}\n\t\tdiv.mini-dialog-ok:hover{background:#08a0e0;border-color:#08a0e0}\n\t\tdiv.mini-dialog-cancel{color:#888;background:#fff}\n\t\tdiv.mini-dialog-cancel:hover{background:#fafafa}\n\t\tdiv.mini-dialog-shortcuts-ok{margin:-5px 20px 0 0}\n\t\tdiv.mini-dialog-ok-disabled{pointer-events:none;opacity:.5}\n\t\t.mini-dialog-ok i{display:inline-block;width:12px;height:12px;margin-right:5px;border-radius:50%;border:#fff solid 1px;border-left:#09f solid 1px;animation:MiniDialogLoading 1s linear infinite}\n\t\t.mini-dialog-autoclose{position:absolute;left:0;bottom:0;height:3px;background:#19b6f8;width:100%;transform:scaleX(0);transform-origin:left center;transition-property:transform;transition-timing-function:linear}\n\t\t.mini-dialog-autoclose-active{transform:scaleX(1)}\n\t\t.mini-dialog-shortcuts\x3ei{display:block;float:left;width:30px;height:30px;margin:8px 0 0 10px;border-radius:50%;transform:scale(.9)}\n\t\t.mini-dialog-shortcuts\x3ediv{float:left;width:calc(100% - 60px);margin:8px 0 0 10px}\n\t\t.mini-dialog-shortcuts\x3ediv p{display:block;font-size:16px;font-weight:700;word-break:break-all;margin-top:3px}\n\t\t.mini-dialog-shortcuts\x3ediv div{font-size:14px;margin-top:5px;word-break:break-all}\n\t\t.mini-dialog-mask-animate-enter-active,.mini-dialog-mask-animate-leave-active{transition:opacity .35s}\n\t\t.mini-dialog-mask-animate-enter,.mini-dialog-mask-animate-leave-to{opacity:0}\n\t\t.mini-dialog-wrapper-animate-enter-active,.mini-dialog-wrapper-animate-leave-active{transition:.35s}\n\t\t.mini-dialog-wrapper-animate-enter,.mini-dialog-wrapper-animate-leave-to{transform:translate(-50%,-50%) scale(.85);opacity:0}\n\t\t@keyframes MiniDialogMaskShow{0%{opacity:0}100%{opacity:1}}\n\t\t@keyframes MiniDialogMaskHide{0%{opacity:1}100%{opacity:0}}\n\t\t@keyframes MiniDialogWrapperShow{0%{opacity:0;transform:translate(-50%,-50%) scale(.82)}100%{opacity:1;transform:translate(-50%,-50%) scale(1)}}\n\t\t@keyframes MiniDialogWrapperHide{0%{opacity:1;transform:translate(-50%,-50%) scale(1)}100%{opacity:0;transform:translate(-50%,-50%) scale(.82)}}\n\t\t@keyframes MiniDialogLoading{0%{transform:translateY(2px) rotate(0) scale(.85)}100%{transform:translateY(2px) rotate(360deg) scale(.85)}}\n\t\x3c/style\x3e'); + a.append(d("body", l.document), R) + } else d("style.mini-dialog-css") || a.append(d("head"), '\x3cstyle class\x3d"mini-dialog-css"\x3e\n\t\tbody.mini-dialog-body-noscroll{padding-right:17px;position:relative;height:100%;overflow:hidden}\n\t\t.mini-dialog-noselect{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}\n\t\t.mini-dialog-container{position:fixed;top:0;left:0;width:100%;height:100%;z-index:2147483580;pointer-events:none}\n\t\t.mini-dialog-container *{-webkit-tap-highlight-color:transparent;margin:0;padding:0}\n\t\t.mini-dialog-container-top{z-index:2147483584}\n\t\t.mini-dialog-mask{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.5);pointer-events:auto}\n\t\t.mini-dialog-mask-show{animation:MiniDialogMaskShow .35s;animation-fill-mode:forwards}\n\t\t.mini-dialog-mask-hide{animation:MiniDialogMaskHide .35s;animation-fill-mode:forwards}\n\t\t.mini-dialog-wrapper{position:absolute;top:50%;left:50%;background:#fff;overflow:hidden;transform:translate(-50%,-50%);box-shadow:rgba(0,0,0,.12) 0 0 12px;pointer-events:auto}\n\t\t.mini-dialog-wrapper-fullscreen{width:100%!important;height:100%!important;border-radius:0!important}\n\t\t.mini-dialog-wrapper-show{animation:MiniDialogWrapperShow .35s;animation-fill-mode:forwards}\n\t\t.mini-dialog-wrapper-hide{animation:MiniDialogWrapperHide .35s;animation-fill-mode:forwards}\n\t\t.mini-dialog-header{overflow:hidden;border-bottom:#e6e6e6 solid 1px}\n\t\t.mini-dialog-header-move{cursor:grab}\n\t\t.mini-dialog-header-move-ie{cursor:move}\n\t\t.mini-dialog-header\x3espan{display:block;float:left;width:calc(100% - 65px);height:52px;line-height:52px;padding:0 15px;font-size:16px;font-weight:700;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}\n\t\t.mini-dialog-header\x3ei{display:block;float:right;width:20px;height:20px;line-height:20px;margin:17px 13px 0 0;font-style:normal;text-align:center;cursor:pointer;opacity:.35;transition:.2s}\n\t\t.mini-dialog-header\x3ei:hover{opacity:1}\n\t\t.mini-dialog-header-drag{cursor:move}\n\t\t.mini-dialog-main{position:relative;padding:15px 0;min-height:100px;font-size:14px;line-height:160%;overflow:auto;word-break:break-all;color:#292929;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}\n\t\t.mini-dialog-main\x3ediv{overflow:hidden;margin:0 15px}\n\t\t.mini-dialog-main\x3eiframe,.mini-dialog-main\x3eimg{display:block;position:absolute;top:0;left:0;width:100%;height:100%}\n\t\t.mini-dialog-main.mini-dialog-mobile-main{padding:10px 0}\n\t\t.mini-dialog-main.mini-dialog-mobile-main\x3ediv{margin:0 10px}\n\t\t.mini-dialog-main:hover .mini-dialog-image-prev,.mini-dialog-main:hover .mini-dialog-image-next{opacity:1}\n\t\t.mini-dialog-image-prev,.mini-dialog-image-next{opacity:0;transition:.2s}\n\t\tdiv.mini-dialog-image-wrapper{position:absolute;top:0;left:0;width:100%;height:100%;margin:0}\n\t\t.mini-dialog-image-wrapper\x3ediv:first-child{position:absolute;top:0;left:0;height:100%;transition-property:transform;transition-duration:.8s;transition-timing-function:cubic-bezier(.57,0,.375,1)}\n\t\t.mini-dialog-image-wrapper img{display:block;float:left}\n\t\tdiv.mini-dialog-image-next,div.mini-dialog-image-prev{width:40px;height:40px;background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNTU1NzI0MjA4NjA5IiBjbGFzcz0iaWNvbiIgc3R5bGU9IiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjIyOTAiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMjgiIGhlaWdodD0iMjgiPjxkZWZzPjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+PC9zdHlsZT48L2RlZnM+PHBhdGggZD0iTTY3MC42NzY5MjkgNzc3LjU5Mjk4NCA0MDMuNjI3NzggNTEzLjM2MjAyMWwyNjUuMzIwNzg1LTI2OC4xNDYxMzNjMTEuNzc2MjA4LTExLjc3NTE4NCAxMS43MzQyNTItMzAuOTA4OTY0LTAuMDkxMDc0LTQyLjczNDI5bC0wLjAwMTAyMyAwYy0xMS44MjUzMjYtMTEuODI2MzUtMzAuOTU4MDgyLTExLjg2NzI4Mi00Mi43MjgxNSAyLjkzMDc0OUwzNDMuMTAwMjQyIDQ4OC40NDA0MjFjLTMuODE3OTU1IDQuMjczMzI3LTguMjA1ODkyIDkuMzIxMjk2LTguOTMzNDYzIDEyLjA0NTMzNy00LjQ3MDgyNSAxMS4xMTIwODItMi4yMzI4NTQgMjQuNzY1MDMzIDYuNzEwODQyIDM1Ljk4NzYzMmwyODYuOTgyMTMgMjg2Ljk4MjEzYzExLjg3NTQ2OCA4Ljg0NzUwNSAzMS4wOTYyMjkgOC44OTM1NTQgNDIuOTIyNTc4LTIuOTMyNzk2QzY4Mi42MDY2MzMgODA4LjY5NjM3NiA2ODIuNTYwNTg0IDc4OS40NzY2MzkgNjcwLjY3NjkyOSA3NzcuNTkyOTg0eiIgcC1pZD0iMjI5MSIgZmlsbD0iI2ZmZmZmZiI+PC9wYXRoPjwvc3ZnPg\x3d\x3d);background-color:rgba(0,0,0,.5);background-position:center;background-repeat:no-repeat;position:absolute;top:50%;border-radius:50%;cursor:pointer;margin-top:-20px}\n\t\t.mini-dialog-image-prev{left:15px}\n\t\t.mini-dialog-image-next{right:15px;transform:rotate(180deg)}\n\t\t.mini-dialog-footer{text-align:right;height:34px;padding:15px 0;border-top:#e6e6e6 solid 1px}\n\t\t.mini-dialog-footer\x3ediv{display:inline-block;font-size:14px;cursor:pointer;text-align:center;border:#e8e8e8 solid 1px;height:32px;line-height:32px;vertical-align:middle;border-radius:4px;padding:0 14px;transition:.2s}\n\t\tdiv.mini-dialog-ok{color:#fff;background:#19b6f8;border-color:#19b6f8;margin:0 15px 0 5px}\n\t\tdiv.mini-dialog-ok:hover{background:#08a0e0;border-color:#08a0e0}\n\t\tdiv.mini-dialog-cancel{color:#888;background:#fff}\n\t\tdiv.mini-dialog-cancel:hover{background:#fafafa}\n\t\tdiv.mini-dialog-shortcuts-ok{margin:-5px 20px 0 0}\n\t\tdiv.mini-dialog-ok-disabled{pointer-events:none;opacity:.5}\n\t\t.mini-dialog-ok i{display:inline-block;width:12px;height:12px;margin-right:5px;border-radius:50%;border:#fff solid 1px;border-left:#09f solid 1px;animation:MiniDialogLoading 1s linear infinite}\n\t\t.mini-dialog-autoclose{position:absolute;left:0;bottom:0;height:3px;background:#19b6f8;width:100%;transform:scaleX(0);transform-origin:left center;transition-property:transform;transition-timing-function:linear}\n\t\t.mini-dialog-autoclose-active{transform:scaleX(1)}\n\t\t.mini-dialog-shortcuts\x3ei{display:block;float:left;width:30px;height:30px;margin:8px 0 0 10px;border-radius:50%;transform:scale(.9)}\n\t\t.mini-dialog-shortcuts\x3ediv{float:left;width:calc(100% - 60px);margin:8px 0 0 10px}\n\t\t.mini-dialog-shortcuts\x3ediv p{display:block;font-size:16px;font-weight:700;word-break:break-all;margin-top:3px}\n\t\t.mini-dialog-shortcuts\x3ediv div{font-size:14px;margin-top:5px;word-break:break-all}\n\t\t.mini-dialog-mask-animate-enter-active,.mini-dialog-mask-animate-leave-active{transition:opacity .35s}\n\t\t.mini-dialog-mask-animate-enter,.mini-dialog-mask-animate-leave-to{opacity:0}\n\t\t.mini-dialog-wrapper-animate-enter-active,.mini-dialog-wrapper-animate-leave-active{transition:.35s}\n\t\t.mini-dialog-wrapper-animate-enter,.mini-dialog-wrapper-animate-leave-to{transform:translate(-50%,-50%) scale(.85);opacity:0}\n\t\t@keyframes MiniDialogMaskShow{0%{opacity:0}100%{opacity:1}}\n\t\t@keyframes MiniDialogMaskHide{0%{opacity:1}100%{opacity:0}}\n\t\t@keyframes MiniDialogWrapperShow{0%{opacity:0;transform:translate(-50%,-50%) scale(.82)}100%{opacity:1;transform:translate(-50%,-50%) scale(1)}}\n\t\t@keyframes MiniDialogWrapperHide{0%{opacity:1;transform:translate(-50%,-50%) scale(1)}100%{opacity:0;transform:translate(-50%,-50%) scale(.82)}}\n\t\t@keyframes MiniDialogLoading{0%{transform:translateY(2px) rotate(0) scale(.85)}100%{transform:translateY(2px) rotate(360deg) scale(.85)}}\n\t\x3c/style\x3e'), a.append(d("body"), R); + var e = l ? d("body \x3e .mini-dialog-container:last-child", l.document) : d("body \x3e .mini-dialog-container:last-child"), + m = d(".mini-dialog-mask", e), g = d(".mini-dialog-wrapper", e), u = d(".mini-dialog-header", g), + r = d("span", u), p = d("i", u), k = d(".mini-dialog-main", g), D = d("div", k), + F = d(".mini-dialog-footer", g), z = d(".mini-dialog-ok", F), K = d(".mini-dialog-cancel", F), + A = document.documentElement.clientWidth, n = document.documentElement.clientHeight, N = !!(430 > A); + if (q > A || f) q = A; + g.style.width = q + "px"; + N && !f && (g.style.width = A - 60 + "px"); + r.textContent = c.title; + g.style.borderRadius = c.borderRadius + "px"; + k.style.background = c.contentBgColor; + D.innerHTML = c.content; + d("span", z).textContent = c.ok.text; + d("span", K).textContent = c.cancel.text; + c.bodyScroll || d("body", l ? l.document : window.document).classList.add("mini-dialog-body-noscroll"); + c.showTitle || a.remove(u); + c.showButton || a.remove(F); + c.cancel.show || a.remove(K); + c.closable || (a.remove(p), r.style.width = "calc(100% - 30px)"); + c.mask || a.remove(m); + var r = u.offsetHeight + F.offsetHeight, h = c.iframeContent, E = !1; + if (a.isPlainObject(c.iframeContent)) { + var G = h.src, h = h.height; + if (!G || !h) return; + E = !0; + if (f || h > n - r) h = n - r; + a.setCSS(k, {padding: 0, height: h + "px"}); + k.innerHTML = '\x3ciframe src\x3d"' + G + '" frameborder\x3d"0" scrolling\x3d"auto"\x3e\x3c/iframe\x3e' + } + h = c.imageContent; + G = !1; + if (a.isPlainObject(h)) { + var Y = function X() { + L = !1; + O.removeEventListener("transitionend", X) + }, S = function (a) { + L = !0; + O.style.transform = "translateX(" + -a * q + "px)"; + O.addEventListener("transitionend", Y) + }, y = h.src, H = h.height; + if (!y || !H) return; + G = !0; + if (f || H > n - r) H = n - r; + var T = y.length, I = ""; + Array.isArray(y) ? (y.forEach(function (a) { + I += '\x3cimg src\x3d"' + a + '" style\x3d"width:' + q + "px;height:" + H + 'px;" ondragstart\x3d"return false"\x3e' + }), I = '\n\t\t\t\t\t\x3cdiv class\x3d"mini-dialog-image-wrapper mini-dialog-noselect"\x3e\n\t\t\t\t\t\t\x3cdiv style\x3d"width:' + q * T + 'px;"\x3e\n\t\t\t\t\t\t\t' + I + '\n\t\t\t\t\t\t\x3c/div\x3e\n\t\t\t\t\t\t\x3cdiv class\x3d"mini-dialog-image-prev"\x3e\x3c/div\x3e\n\t\t\t\t\t\t\x3cdiv class\x3d"mini-dialog-image-next"\x3e\x3c/div\x3e\n\t\t\t\t\t\x3c/div\x3e\n\t\t\t\t') : I = '\x3cimg src\x3d"' + y + '"\x3e'; + a.setCSS(k, {padding: 0, overflow: "hidden", height: H + "px"}); + k.innerHTML = I; + var O = d(".mini-dialog-image-wrapper \x3e div:first-child", k), + h = x(".mini-dialog-image-prev, .mini-dialog-image-next", k), B = 0, L = !1; + 2 === h.length && (h[0].onclick = function () { + B && !L && (B--, S(B)) + }, h[1].onclick = function () { + B < T - 1 && !L && (B++, S(B)) + }) + } + var C = c.videoContent, h = !1; + if (a.isPlainObject(C)) { + var y = C.src, J = C.height, C = C.autoplay; + if (!y || !J) return; + h = !0; + if (f || J > n - r) J = n - r; + a.setCSS(k, {padding: 0, overflow: "hidden", height: J + "px", background: "#000"}); + k.innerHTML = '\x3cvideo src\x3d"' + y + '" width\x3d"' + q + '" height\x3d"' + J + '" controls\x3e\x3c/video\x3e'; + C && d("video", k).setAttribute("autoplay", !0) + } + 1 < x(".mini-dialog-mask").length && a.remove(m); + "function" === a.type(c.afterClose) && (e.mini_dialog_afterclose = c.afterClose); + f && (a.setCSS(g, { + height: n + "px", + borderRadius: 0 + }), k.style.height = n - r - (h || G || E ? 0 : 30) + "px"); + "number" === a.type(c.autoClose) && 2E3 < c.autoClose && c.autoCloseEffect && a.append(g, '\x3cdiv class\x3d"mini-dialog-autoclose"\x3e\x3c/div\x3e'); + a.getCSS(g, "height") > n && (k.style.height = n - r + "px"); + a.isPlainObject(c.SHORTCUTS) && !a.isEmptyObject(c.SHORTCUTS) && (a.remove(u), a.remove(K), a.remove(D), F.style.borderTop = "none", g.style.width = (N ? w - 60 : 420) + "px", g.classList.add("mini-dialog-shortcuts-mark"), k.innerHTML = '\n\t\t\t\t\x3cdiv\x3e\n\t\t\t\t\t\x3cdiv class\x3d"mini-dialog-shortcuts"\x3e\n\t\t\t\t\t\t\x3ci\x3e' + Q(c.SHORTCUTS.type) + "\x3c/i\x3e\n\t\t\t\t\t\t\t\x3cdiv\x3e\n\t\t\t\t\t\t\t\t\x3cp\x3e" + c.SHORTCUTS.title + "\x3c/p\x3e\n\t\t\t\t\t\t\t\t\x3cdiv\x3e" + (c.SHORTCUTS.content || "") + "\x3c/div\x3e\n\t\t\t\t\t\t\t\x3c/div\x3e\n\t\t\t\t\t\t\x3c/div\x3e\n\t\t\t\t\t\x3c/div\x3e\n\t\t\t\t\x3c/div\x3e\n\t\t\t", k.style.minHeight = "90px", N && k.classList.add("mini-dialog-mobile-main")); + c.maskClose && (m.onclick = function () { + return b.close(e, l) + }); + p.onclick = function () { + return b.close(e, l) + }; + K.onclick = function () { + b.close(e, l); + "function" === a.type(c.cancel.callback) && c.cancel.callback() + }; + z.onclick = function () { + "function" === a.type(c.ok.callback) && c.ok.callback(z); + c.ok.loading || c.ok.notClose || b.close(e, l); + c.ok.loading && (a.prepend(z, "\x3ci\x3e\x3c/i\x3e"), a.setCSS(z, { + opacity: .5, + pointerEvents: "none" + }), d("span", z).textContent = c.ok.loadingText) + }; + if (c.draggable && !c.fullscreen) { + f = function () { + u.style.removeProperty("cursor"); + e.classList.remove("mini-dialog-noselect"); + document.onmousemove = null + }; + a.remove(m); + var M = parseFloat(a.getCSS(g, "height")), U = void 0, V = void 0; + g.onmousedown = function () { + x(".mini-dialog-container-top").forEach(function (a) { + a.classList.remove("mini-dialog-container-top") + }); + e.classList.add("mini-dialog-container-top") + }; + u.classList.add("mini-dialog-header-move" + (W ? "-ie" : "")); + u.onmousedown = function (b) { + b.preventDefault(); + e.classList.add("mini-dialog-noselect"); + u.style.cursor = "grabbing"; + V = b.pageX - g.offsetLeft; + U = b.pageY - g.offsetTop; + document.onmousemove = function (b) { + var c = b.pageX - V; + b = b.pageY - U; + c < q / 2 && (c = q / 2); + b < M / 2 && (b = M / 2); + c > A - q / 2 && (c = A - q / 2); + b > n - M / 2 && (b = n - M / 2); + a.setCSS(g, {left: c + "px", top: b + "px"}) + } + }; + u.onmouseup = f; + document.onmouseup = f + } + m.classList.add("mini-dialog-mask-show"); + g.classList.add("mini-dialog-wrapper-show"); + g.addEventListener("animationend", P); + return e + } + }; + e.info = function (a, d) { + p("info", a, d); + return e + }; + e.success = function (a, d) { + p("success", a, d); + return e + }; + e.warn = function (a, d) { + p("warn", a, d); + return e + }; + e.error = function (a, d) { + p("error", a, d); + return e + }; + e.close = function (b) { + var e = (1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : window).document; + x(b || ".mini-dialog-container", e).forEach(function (b) { + var f = d(".mini-dialog-wrapper", b), c = d(".mini-dialog-mask", b); + f.classList.add("mini-dialog-wrapper-hide"); + f.addEventListener("animationend", function () { + var c = b.mini_dialog_afterclose; + c && c(); + a.remove(b); + d("body", e).classList.remove("mini-dialog-body-noscroll") + }); + c && c.classList.add("mini-dialog-mask-hide") + }) + }; + e.ok = function (b) { + d(".mini-dialog-shortcuts-mark .mini-dialog-ok").addEventListener("click", function () { + d(".mini-dialog-shortcuts-mark").addEventListener("animationend", function () { + "function" === a.type(b) && b() + }) + }) + }; + return e +}); \ No newline at end of file diff --git a/ruoyi-admin/src/main/resources/templates/section/substation.html b/ruoyi-admin/src/main/resources/templates/section/substation.html index 6bf0ede..bccf0cc 100644 --- a/ruoyi-admin/src/main/resources/templates/section/substation.html +++ b/ruoyi-admin/src/main/resources/templates/section/substation.html @@ -4,8 +4,7 @@ - 智慧场景 - + @@ -200,6 +199,16 @@ table td { padding: 2% } + + .text-success { + background-color: transparent; + border-style: none; + } + + .text-danger { + background-color: transparent; + border-style: none; + } @@ -209,8 +218,8 @@ - +
78
{ + const alarmInfo = function () { $.ajax({ url: "/iot/wisdomScenario/getAlarmInfo?monitorUnitId=" + getParams("id"), type: "get", dataType: 'JSON', success: (res) => { - console.log("告警信息:"+res); + console.log("告警信息:" + res); - alertList.loadData(res.map(value => [value.alarmModuleId.substring(0,2)+"...", value.alarmModuleText,value.sensorLocation,`${"无线检测 相对检测值为:"+value.minValue+"-"+value.maxValue+",其值为:"+value.alarmValue}`, "超限", value.collectTime,`${value.disposeFlag==1?'已处理':'未处理'}`]), Object.keys(alertListColumns)) + alertList.loadData(res.map(value => [value.alarmModuleId.substring(0, 2) + "...", value.alarmModuleText, value.sensorLocation, `${"无线检测 相对检测值为:" + value.minValue + "-" + value.maxValue + ",其值为:" + value.alarmValue}`, "超限", value.collectTime, `${value.disposeFlag == 1 ? '' : ''}`]), Object.keys(alertListColumns)) }, error: () => { console.log("失败"); } }) - - }); + } function resize() { - fontAdjust() - alertList.resize() + fontAdjust(); + alarmInfo(); } window.onresize = resize @@ -328,8 +336,55 @@ }) const alarmDispose = function (res) { - console.log("ces:"+res); + $.getJSON('/iot/wisdomScenario/getAlarmByUid?alarmuid=' + res, function (result) { + alarmDisposeInfo(result); + }) } + + const alarmDisposeInfo = function (res) { + let html = `
+

+ +

+

+ +

+

+ + +

+

+ + +

+
` + + Dialog({ + title: "告警处理", + width: 600, + content: html, + ok: { + callback: function () { + let formData = new FormData(); + formData.append("alarmuid", res.alarmuid); + formData.append("disposeMode", $("#disposeMode").val()); + formData.append("alarmReason", $("#alarmReason").val()); + + $.post("/iot/wisdomScenario/disposeAlarm", + { + alarmuid: res.alarmuid, + disposeMode: $("#disposeMode").val(), + alarmReason: $("#alarmReason").val() + }, + function (data, status) { + alert(+status.includes("succ") ? "告警处理成功" : "告警处理失败"); + alarmInfo(); + }); + } + } + }); + } + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/RecordAlarm.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/RecordAlarm.java index bf5b53d..9930631 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/RecordAlarm.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/RecordAlarm.java @@ -20,6 +20,8 @@ public class RecordAlarm extends BaseEntity @Excel(name = "传感器") private String sensorId; + private String alarmuid; + /** 报警类型 */ @Excel(name = "报警类型") private String alarmtypeId; @@ -128,6 +130,14 @@ public class RecordAlarm extends BaseEntity this.alarmReason = alarmReason; } + public String getAlarmuid() { + return alarmuid; + } + + public void setAlarmuid(String alarmuid) { + this.alarmuid = alarmuid; + } + @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) diff --git a/ruoyi-system/src/main/resources/mapper/system/RecordAlarmMapper.xml b/ruoyi-system/src/main/resources/mapper/system/RecordAlarmMapper.xml index 5430022..260f07e 100644 --- a/ruoyi-system/src/main/resources/mapper/system/RecordAlarmMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/RecordAlarmMapper.xml @@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -19,6 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -35,7 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select Sensor_Id, AlarmType_Id, Min_Value, Alarm_Value, Max_Value,Dispose_Flag, Collect_Time,Dispose_Mode,Alarm_Reason from record_alarm + select Sensor_Id, AlarmType_Id, Min_Value, Alarm_Value,Alarm_Uid, Max_Value,Dispose_Flag, Collect_Time,Dispose_Mode,Alarm_Reason from record_alarm - where Sensor_Id = #{sensorId} + where Alarm_Uid = #{alarmuid} @@ -82,25 +84,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update record_alarm - AlarmType_Id = #{alarmtypeId}, + + Dispose_Flag = #{disposeFlag}, Dispose_Mode = #{disposeMode}, Alarm_Reason = #{alarmReason}, - where Sensor_Id = #{sensorId} + where Alarm_Uid = #{alarmuid} - delete from record_alarm where Sensor_Id = #{sensorId} + delete from record_alarm where Alarm_Uid = #{alarmuid} - delete from record_alarm where Sensor_Id in + delete from record_alarm where Alarm_Uid in - #{sensorId} + #{alarmuid} @@ -111,6 +114,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" t3.Sensor_Name, t4.Min_Value, t4.Max_Value, + t4.Alarm_Uid, t4.Alarm_Value, t4.Collect_Time, t4.Dispose_Flag