Authored by 王涛

Merge branch 'master-500-dev' of http://192.168.1.136:82/monitor_v3/hg-monitor-w…

…eb into master-500-dev
Showing 21 changed files with 994 additions and 89 deletions
  1 +/*//lsq 告警消除处理 样式 2022-03-22*/
  2 +.alarmsClearEditor-container{
  3 + background: #F2F2F2;
  4 + color:#666;
  5 + padding:0 20px;
  6 + max-height: 100%;
  7 + overflow: auto;
  8 +}
  9 +.alarmsClearEditor-info{
  10 + /*padding:10px;*/
  11 +}
  12 +.info-title{
  13 + display: flex;
  14 + justify-content: space-between;
  15 + margin-bottom: 10px;
  16 + padding-top:10px;
  17 +}
  18 +.info-content-body{
  19 + background: #ffffff;
  20 + padding:10px 30px;
  21 +}
  22 +.content-title{
  23 + text-align: left;
  24 + padding-bottom: 10px;
  25 + border-bottom: 1px solid #F2F2F2;
  26 +}
  27 +.content-body-info{
  28 + display: flex;
  29 + align-items: center;
  30 + justify-content: flex-start;
  31 + flex-wrap: wrap;
  32 +}
  33 +.info-item{
  34 + width:33%;
  35 + margin:8px 0;
  36 + text-align: left;
  37 +}
  38 +.info-item-statistics{
  39 + margin:8px 0;
  40 + text-align: left;
  41 +}
  42 +.info-content{
  43 + margin-bottom: 5px;
  44 +}
  45 +.alarmsClearEditor-scheme{
  46 + background: #FFFFFF;
  47 + padding: 0 10px 10px;
  48 +}
  49 +.scheme-title,.scheme-title-per{
  50 + display: flex;
  51 + padding: 10px 0;
  52 + align-items: center;
  53 + justify-content: space-between;
  54 +}
  55 +.scheme-title{
  56 + padding-top:0;
  57 +}
  58 +.alarmsClearTag{
  59 + display: flex;
  60 + align-items: center;
  61 + justify-content: space-between;
  62 + padding:10px;
  63 + background: #FFFFFF;
  64 +}
  65 +.tag-keyword{
  66 +
  67 +}
  68 +.mx-1{
  69 + margin:5px;
  70 +}
  71 +.button-new-tag{
  72 + margin-left:10px;
  73 +}
  74 +.ml-1{
  75 + width:150px;
  76 +}
  77 +.alarmsRadio{
  78 + /*display: flex;*/
  79 + /*align-items: center;*/
  80 + /*justify-content: space-between;*/
  81 + padding:10px;
  82 + background: #FFFFFF;
  83 + margin-bottom: 5px;
  84 +}
  85 +.alarmsNotice{
  86 + display: flex;
  87 + align-items: center;
  88 + justify-content: space-between;
  89 +}
  90 +.alarmsDes{
  91 + flex:1;
  92 +}
  93 +.alarmsNotice-radio{
  94 + margin-left:10px;
  95 +}
  96 +.alarmsCover{
  97 + padding:0 10px 10px;
  98 + background: #FFFFFF;
  99 + text-align: left;
  100 +}
  101 +.disabled_style{
  102 + background: #F2F2F2;
  103 +}
  104 +.scheme-title-per .el-switch:focus{
  105 + outline: 0;
  106 +}
  107 +.alarmNotice-title{
  108 + text-align: left;
  109 + padding-bottom: 10px;
  110 +}
  111 +.editor_detail{
  112 + border:1px solid #c0c4cc;
  113 + padding:10px;
  114 +}
  115 +.detail_comments{
  116 + background: #FFFFFF;
  117 + padding:10px;
  118 + margin-top:5px;
  119 +}
  120 +.detail_comments_title{
  121 + text-align: left;
  122 + padding-bottom: 10px;
  123 +}
  124 +.update-icon{
  125 + cursor: pointer;
  126 + color:#409EFF;
  127 +}
@@ -3,6 +3,8 @@ @@ -3,6 +3,8 @@
3 @import "../css/components.css"; 3 @import "../css/components.css";
4 /*缓存数据*/ 4 /*缓存数据*/
5 @import "../css/cacheData.css"; 5 @import "../css/cacheData.css";
  6 +/*告警消除处理*/
  7 +@import "../css/alarmsClear.css";
6 8
7 .d-flex { 9 .d-flex {
8 display: flex; 10 display: flex;
@@ -151,8 +151,13 @@ @@ -151,8 +151,13 @@
151 .editor_text { 151 .editor_text {
152 border: 1px solid #ccc; 152 border: 1px solid #ccc;
153 /*min-height: 500px;*/ 153 /*min-height: 500px;*/
  154 + background: #FFFFFF;
154 } 155 }
155 .editor_text .w-e-text{ 156 .editor_text .w-e-text{
156 min-height:300px; 157 min-height:300px;
157 max-height: 500px; 158 max-height: 500px;
  159 + box-sizing: border-box;
  160 +}
  161 +.alarmsClearEditor-btn{
  162 + padding:10px;
158 } 163 }
@@ -4555,6 +4555,7 @@ Editor.prototype = { @@ -4555,6 +4555,7 @@ Editor.prototype = {
4555 // -------- 绑定 onchange 事件 -------- 4555 // -------- 绑定 onchange 事件 --------
4556 var onChangeTimeoutId = 0; 4556 var onChangeTimeoutId = 0;
4557 var beforeChangeHtml = this.txt.html(); 4557 var beforeChangeHtml = this.txt.html();
  4558 + var beforeChangeText=this.txt.text();
4558 var config$$1 = this.config; 4559 var config$$1 = this.config;
4559 4560
4560 // onchange 触发延迟时间 4561 // onchange 触发延迟时间
@@ -4573,13 +4574,19 @@ Editor.prototype = { @@ -4573,13 +4574,19 @@ Editor.prototype = {
4573 this.change = function () { 4574 this.change = function () {
4574 // 判断是否有变化 4575 // 判断是否有变化
4575 var currentHtml = this.txt.html(); 4576 var currentHtml = this.txt.html();
4576 - 4577 + var currentText=this.txt.text();
4577 if (currentHtml.length === beforeChangeHtml.length) { 4578 if (currentHtml.length === beforeChangeHtml.length) {
4578 // 需要比较每一个字符 4579 // 需要比较每一个字符
4579 if (currentHtml === beforeChangeHtml) { 4580 if (currentHtml === beforeChangeHtml) {
4580 return; 4581 return;
4581 } 4582 }
4582 } 4583 }
  4584 + if (currentText.length === beforeChangeText.length) {
  4585 + // 需要比较每一个字符
  4586 + if (currentText === beforeChangeText) {
  4587 + return;
  4588 + }
  4589 + }
4583 4590
4584 // 执行,使用节流 4591 // 执行,使用节流
4585 if (onChangeTimeoutId) { 4592 if (onChangeTimeoutId) {
@@ -4587,8 +4594,9 @@ Editor.prototype = { @@ -4587,8 +4594,9 @@ Editor.prototype = {
4587 } 4594 }
4588 onChangeTimeoutId = setTimeout(function () { 4595 onChangeTimeoutId = setTimeout(function () {
4589 // 触发配置的 onchange 函数 4596 // 触发配置的 onchange 函数
4590 - onchange(currentHtml); 4597 + onchange(currentHtml,currentText);
4591 beforeChangeHtml = currentHtml; 4598 beforeChangeHtml = currentHtml;
  4599 + beforeChangeText = currentText;
4592 }, onchangeTimeout); 4600 }, onchangeTimeout);
4593 }; 4601 };
4594 } 4602 }
@@ -4598,7 +4606,8 @@ Editor.prototype = { @@ -4598,7 +4606,8 @@ Editor.prototype = {
4598 if (onblur && typeof onblur === 'function') { 4606 if (onblur && typeof onblur === 'function') {
4599 this.onblur = function () { 4607 this.onblur = function () {
4600 var currentHtml = this.txt.html(); 4608 var currentHtml = this.txt.html();
4601 - onblur(currentHtml); 4609 + var currentText = this.txt.text();
  4610 + onblur(currentHtml,currentText);
4602 }; 4611 };
4603 } 4612 }
4604 4613
  1 +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.wangEditor=t()}(this,function(){"use strict";function e(e){var t=void 0;return t=document.createElement("div"),t.innerHTML=e,t.children}function t(e){return!!e&&(e instanceof HTMLCollection||e instanceof NodeList)}function n(e){var n=document.querySelectorAll(e);return t(n)?n:[n]}function i(o){if(o){if(o instanceof i)return o;this.selector=o;var A=o.nodeType,r=[];9===A?r=[o]:1===A?r=[o]:t(o)||o instanceof Array?r=o:"string"==typeof o&&(o=o.replace("/\n/mg","").trim(),r=0===o.indexOf("<")?e(o):n(o));var c=r.length;if(!c)return this;var a=void 0;for(a=0;a<c;a++)this[a]=r[a];this.length=c}}function o(e){return new i(e)}function A(e,t){var n=void 0;for(n in e)if(e.hasOwnProperty(n)&&!1===t.call(e,n,e[n]))break}function r(e,t){var n=void 0,i=void 0,o=e.length||0;for(n=0;n<o&&(i=e[n],!1!==t.call(e,i,n));n++);}function c(e){return e+Math.random().toString().slice(2)}function a(e){return null==e?"":e.replace(/</gm,"&lt;").replace(/>/gm,"&gt;").replace(/"/gm,"&quot;").replace(/(\r\n|\r|\n)/g,"<br/>")}function s(e){return"function"==typeof e}function l(e){this.editor=e,this.$elem=o('<div class="w-e-menu">\n <i class="w-e-icon-bold"></i>\n </div>'),this.type="click",this._active=!1}function d(e,t){var n=this,i=e.editor;this.menu=e,this.opt=t;var A=o('<div class="w-e-droplist"></div>'),r=t.$title,c=void 0;r&&(c=r.html(),c=O(i,c),r.html(c),r.addClass("w-e-dp-title"),A.append(r));var a=t.list||[],s=t.type||"list",l=t.onClick||$,d=o('<ul class="'+("list"===s?"w-e-list":"w-e-block")+'"></ul>');A.append(d),a.forEach(function(e){var t=e.$elem,A=t.html();A=O(i,A),t.html(A);var r=e.value,c=o('<li class="w-e-item"></li>');t&&(c.append(t),d.append(c),c.on("click",function(e){l(r),n.hideTimeoutId=setTimeout(function(){n.hide()},0)}))}),A.on("mouseleave",function(e){n.hideTimeoutId=setTimeout(function(){n.hide()},0)}),this.$container=A,this._rendered=!1,this._show=!1}function u(e){var t=this;this.editor=e,this.$elem=o('<div class="w-e-menu"><i class="w-e-icon-header"></i></div>'),this.type="droplist",this._active=!1,this.droplist=new d(this,{width:100,$title:o("<p>设置标题</p>"),type:"list",list:[{$elem:o("<h1>H1</h1>"),value:"<h1>"},{$elem:o("<h2>H2</h2>"),value:"<h2>"},{$elem:o("<h3>H3</h3>"),value:"<h3>"},{$elem:o("<h4>H4</h4>"),value:"<h4>"},{$elem:o("<h5>H5</h5>"),value:"<h5>"},{$elem:o("<p>正文</p>"),value:"<p>"}],onClick:function(e){t._command(e)}})}function h(e){var t=this;this.editor=e,this.$elem=o('<div class="w-e-menu"><i class="w-e-icon-text-heigh"></i></div>'),this.type="droplist",this._active=!1,this.droplist=new d(this,{width:160,$title:o("<p>字号</p>"),type:"list",list:[{$elem:o('<span style="font-size: x-small;">x-small</span>'),value:"1"},{$elem:o('<span style="font-size: small;">small</span>'),value:"2"},{$elem:o("<span>normal</span>"),value:"3"},{$elem:o('<span style="font-size: large;">large</span>'),value:"4"},{$elem:o('<span style="font-size: x-large;">x-large</span>'),value:"5"},{$elem:o('<span style="font-size: xx-large;">xx-large</span>'),value:"6"}],onClick:function(e){t._command(e)}})}function p(e){var t=this;this.editor=e,this.$elem=o('<div class="w-e-menu"><i class="w-e-icon-font"></i></div>'),this.type="droplist",this._active=!1;var n=e.config,i=n.fontNames||[];this.droplist=new d(this,{width:100,$title:o("<p>字体</p>"),type:"list",list:i.map(function(e){return{$elem:o('<span style="font-family: '+e+';">'+e+"</span>"),value:e}}),onClick:function(e){t._command(e)}})}function f(e,t){this.menu=e,this.opt=t}function m(e){this.editor=e,this.$elem=o('<div class="w-e-menu"><i class="w-e-icon-link"></i></div>'),this.type="panel",this._active=!1}function g(e){this.editor=e,this.$elem=o('<div class="w-e-menu">\n <i class="w-e-icon-italic"></i>\n </div>'),this.type="click",this._active=!1}function w(e){this.editor=e,this.$elem=o('<div class="w-e-menu">\n <i class="w-e-icon-redo"></i>\n </div>'),this.type="click",this._active=!1}function v(e){this.editor=e,this.$elem=o('<div class="w-e-menu">\n <i class="w-e-icon-strikethrough"></i>\n </div>'),this.type="click",this._active=!1}function E(e){this.editor=e,this.$elem=o('<div class="w-e-menu">\n <i class="w-e-icon-underline"></i>\n </div>'),this.type="click",this._active=!1}function b(e){this.editor=e,this.$elem=o('<div class="w-e-menu">\n <i class="w-e-icon-undo"></i>\n </div>'),this.type="click",this._active=!1}function B(e){var t=this;this.editor=e,this.$elem=o('<div class="w-e-menu"><i class="w-e-icon-list2"></i></div>'),this.type="droplist",this._active=!1,this.droplist=new d(this,{width:120,$title:o("<p>设置列表</p>"),type:"list",list:[{$elem:o('<span><i class="w-e-icon-list-numbered"></i> 有序列表</span>'),value:"insertOrderedList"},{$elem:o('<span><i class="w-e-icon-list2"></i> 无序列表</span>'),value:"insertUnorderedList"}],onClick:function(e){t._command(e)}})}function y(e){var t=this;this.editor=e,this.$elem=o('<div class="w-e-menu"><i class="w-e-icon-paragraph-left"></i></div>'),this.type="droplist",this._active=!1,this.droplist=new d(this,{width:100,$title:o("<p>对齐方式</p>"),type:"list",list:[{$elem:o('<span><i class="w-e-icon-paragraph-left"></i> 靠左</span>'),value:"justifyLeft"},{$elem:o('<span><i class="w-e-icon-paragraph-center"></i> 居中</span>'),value:"justifyCenter"},{$elem:o('<span><i class="w-e-icon-paragraph-right"></i> 靠右</span>'),value:"justifyRight"}],onClick:function(e){t._command(e)}})}function C(e){var t=this;this.editor=e,this.$elem=o('<div class="w-e-menu"><i class="w-e-icon-pencil2"></i></div>'),this.type="droplist";var n=e.config,i=n.colors||[];this._active=!1,this.droplist=new d(this,{width:120,$title:o("<p>文字颜色</p>"),type:"inline-block",list:i.map(function(e){return{$elem:o('<i style="color:'+e+';" class="w-e-icon-pencil2"></i>'),value:e}}),onClick:function(e){t._command(e)}})}function x(e){var t=this;this.editor=e,this.$elem=o('<div class="w-e-menu"><i class="w-e-icon-paint-brush"></i></div>'),this.type="droplist";var n=e.config,i=n.colors||[];this._active=!1,this.droplist=new d(this,{width:120,$title:o("<p>背景色</p>"),type:"inline-block",list:i.map(function(e){return{$elem:o('<i style="color:'+e+';" class="w-e-icon-paint-brush"></i>'),value:e}}),onClick:function(e){t._command(e)}})}function I(e){this.editor=e,this.$elem=o('<div class="w-e-menu">\n <i class="w-e-icon-quotes-left"></i>\n </div>'),this.type="click",this._active=!1}function Q(e){this.editor=e,this.$elem=o('<div class="w-e-menu">\n <i class="w-e-icon-terminal"></i>\n </div>'),this.type="panel",this._active=!1}function M(e){this.editor=e,this.$elem=o('<div class="w-e-menu">\n <i class="w-e-icon-happy"></i>\n </div>'),this.type="panel",this._active=!1}function S(e){this.editor=e,this.$elem=o('<div class="w-e-menu"><i class="w-e-icon-table2"></i></div>'),this.type="panel",this._active=!1}function k(e){this.editor=e,this.$elem=o('<div class="w-e-menu"><i class="w-e-icon-play"></i></div>'),this.type="panel",this._active=!1}function D(e){this.editor=e;var t=c("w-e-img");this.$elem=o('<div class="w-e-menu" id="'+t+'"><i class="w-e-icon-image"></i></div>'),e.imgMenuId=t,this.type="panel",this._active=!1}function _(e){this.editor=e,this.menus={}}function N(e){var t=e.clipboardData||e.originalEvent&&e.originalEvent.clipboardData,n=void 0;return n=null==t?window.clipboardData&&window.clipboardData.getData("text"):t.getData("text/plain"),a(n)}function F(e,t,n){var i=e.clipboardData||e.originalEvent&&e.originalEvent.clipboardData,o=void 0,A=void 0;if(null==i?o=window.clipboardData&&window.clipboardData.getData("text"):(o=i.getData("text/plain"),A=i.getData("text/html")),!A&&o&&(A="<p>"+a(o)+"</p>"),A){var r=A.split("</html>");return 2===r.length&&(A=r[0]),A=A.replace(/<(meta|script|link).+?>/gim,""),A=A.replace(/<!--.*?-->/gm,""),A=A.replace(/\s?data-.+?=('|").+?('|")/gim,""),n&&(A=A.replace(/<img.+?>/gim,"")),A=t?A.replace(/\s?(class|style)=('|").*?('|")/gim,""):A.replace(/\s?class=('|").*?('|")/gim,"")}}function T(e){var t=[];if(N(e))return t;var n=e.clipboardData||e.originalEvent&&e.originalEvent.clipboardData||{},i=n.items;return i?(A(i,function(e,n){var i=n.type;/image/i.test(i)&&t.push(n.getAsFile())}),t):t}function R(e){var t=[];return(e.childNodes()||[]).forEach(function(e){var n=void 0,i=e.nodeType;if(3===i&&(n=e.textContent,n=a(n)),1===i){n={},n.tag=e.nodeName.toLowerCase();for(var A=[],r=e.attributes||{},c=r.length||0,s=0;s<c;s++){var l=r[s];A.push({name:l.name,value:l.value})}n.attrs=A,n.children=R(o(e))}t.push(n)}),t}function U(e){this.editor=e}function Y(e){this.editor=e}function P(e){this.editor=e,this._currentRange=null}function H(e){this.editor=e,this._time=0,this._isShow=!1,this._isRender=!1,this._timeoutId=0,this.$textContainer=e.$textContainerElem,this.$bar=o('<div class="w-e-progress"></div>')}function L(e){this.editor=e}function j(e,t){if(null==e)throw new Error("错误:初始化编辑器时候未传入任何参数,请查阅文档");this.id="wangEditor-"+W++,this.toolbarSelector=e,this.textSelector=t,this.customConfig={}}var G=[];i.prototype={constructor:i,forEach:function(e){var t=void 0;for(t=0;t<this.length;t++){var n=this[t];if(!1===e.call(n,n,t))break}return this},clone:function(e){var t=[];return this.forEach(function(n){t.push(n.cloneNode(!!e))}),o(t)},get:function(e){var t=this.length;return e>=t&&(e%=t),o(this[e])},first:function(){return this.get(0)},last:function(){var e=this.length;return this.get(e-1)},on:function(e,t,n){n||(n=t,t=null);var i=[];return i=e.split(/\s+/),this.forEach(function(e){i.forEach(function(i){if(i){if(G.push({elem:e,type:i,fn:n}),!t)return void e.addEventListener(i,n);e.addEventListener(i,function(e){var i=e.target;i.matches(t)&&n.call(i,e)})}})})},off:function(e,t){return this.forEach(function(n){n.removeEventListener(e,t)})},attr:function(e,t){return null==t?this[0].getAttribute(e):this.forEach(function(n){n.setAttribute(e,t)})},addClass:function(e){return e?this.forEach(function(t){var n=void 0;t.className?(n=t.className.split(/\s/),n=n.filter(function(e){return!!e.trim()}),n.indexOf(e)<0&&n.push(e),t.className=n.join(" ")):t.className=e}):this},removeClass:function(e){return e?this.forEach(function(t){var n=void 0;t.className&&(n=t.className.split(/\s/),n=n.filter(function(t){return!(!(t=t.trim())||t===e)}),t.className=n.join(" "))}):this},css:function(e,t){var n=e+":"+t+";";return this.forEach(function(t){var i=(t.getAttribute("style")||"").trim(),o=void 0,A=[];i?(o=i.split(";"),o.forEach(function(e){var t=e.split(":").map(function(e){return e.trim()});2===t.length&&A.push(t[0]+":"+t[1])}),A=A.map(function(t){return 0===t.indexOf(e)?n:t}),A.indexOf(n)<0&&A.push(n),t.setAttribute("style",A.join("; "))):t.setAttribute("style",n)})},show:function(){return this.css("display","block")},hide:function(){return this.css("display","none")},children:function(){var e=this[0];return e?o(e.children):null},childNodes:function(){var e=this[0];return e?o(e.childNodes):null},append:function(e){return this.forEach(function(t){e.forEach(function(e){t.appendChild(e)})})},remove:function(){return this.forEach(function(e){if(e.remove)e.remove();else{var t=e.parentElement;t&&t.removeChild(e)}})},isContain:function(e){var t=this[0],n=e[0];return t.contains(n)},getSizeData:function(){return this[0].getBoundingClientRect()},getNodeName:function(){return this[0].nodeName},find:function(e){return o(this[0].querySelectorAll(e))},text:function(e){return e?this.forEach(function(t){t.innerHTML=e}):this[0].innerHTML.replace(/<.*?>/g,function(){return""})},html:function(e){var t=this[0];return null==e?t.innerHTML:(t.innerHTML=e,this)},val:function(){return this[0].value.trim()},focus:function(){return this.forEach(function(e){e.focus()})},parent:function(){return o(this[0].parentElement)},parentUntil:function(e,t){var n=document.querySelectorAll(e),i=n.length;if(!i)return null;var A=t||this[0];if("BODY"===A.nodeName)return null;var r=A.parentElement,c=void 0;for(c=0;c<i;c++)if(r===n[c])return o(r);return this.parentUntil(e,r)},equal:function(e){return 1===e.nodeType?this[0]===e:this[0]===e[0]},insertBefore:function(e){var t=o(e),n=t[0];return n?this.forEach(function(e){n.parentNode.insertBefore(e,n)}):this},insertAfter:function(e){var t=o(e),n=t[0];return n?this.forEach(function(e){var t=n.parentNode;t.lastChild===n?t.appendChild(e):t.insertBefore(e,n.nextSibling)}):this}},o.offAll=function(){G.forEach(function(e){var t=e.elem,n=e.type,i=e.fn;t.removeEventListener(n,i)})};var z={menus:["head","bold","fontSize","fontName","italic","underline","strikeThrough","foreColor","backColor","link","list","justify","quote","emoticon","image","table","video","code","undo","redo"],fontNames:["宋体","微软雅黑","Arial","Tahoma","Verdana"],colors:["#000000","#eeece0","#1c487f","#4d80bf","#c24f4a","#8baa4a","#7b5ba1","#46acc8","#f9963b","#ffffff"],emotions:[{title:"默认",type:"image",content:[{alt:"[坏笑]",src:"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/50/pcmoren_huaixiao_org.png"},{alt:"[舔屏]",src:"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/40/pcmoren_tian_org.png"},{alt:"[污]",src:"http://img.t.sinajs.cn/t4/appstyle/expression/ext/normal/3c/pcmoren_wu_org.png"}]},{title:"新浪",type:"image",content:[{src:"http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/7a/shenshou_thumb.gif",alt:"[草泥马]"},{src:"http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/60/horse2_thumb.gif",alt:"[神马]"},{src:"http://img.t.sinajs.cn/t35/style/images/common/face/ext/normal/bc/fuyun_thumb.gif",alt:"[浮云]"}]},{title:"emoji",type:"emoji",content:"😀 😃 😄 😁 😆 😅 😂 😊 😇 🙂 🙃 😉 😓 😪 😴 🙄 🤔 😬 🤐".split(/\s/)}],zIndex:1e4,debug:!1,linkCheck:function(e,t){return!0},linkImgCheck:function(e){return!0},pasteFilterStyle:!0,pasteIgnoreImg:!1,pasteTextHandle:function(e){return e},showLinkImg:!0,linkImgCallback:function(e){},uploadImgMaxSize:5242880,uploadImgShowBase64:!1,uploadFileName:"",uploadImgParams:{},uploadImgHeaders:{},withCredentials:!1,uploadImgTimeout:1e4,uploadImgHooks:{before:function(e,t,n){},success:function(e,t,n){},fail:function(e,t,n){},error:function(e,t){},timeout:function(e,t){}},qiniu:!1},J={_ua:navigator.userAgent,isWebkit:function(){return/webkit/i.test(this._ua)},isIE:function(){return"ActiveXObject"in window}};l.prototype={constructor:l,onClick:function(e){var t=this.editor,n=t.selection.isSelectionEmpty();n&&t.selection.createEmptyRange(),t.cmd.do("bold"),n&&(t.selection.collapseRange(),t.selection.restoreSelection())},tryChangeActive:function(e){var t=this.editor,n=this.$elem;t.cmd.queryCommandState("bold")?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}};var O=function(e,t){var n=e.config.langArgs||[],i=t;return n.forEach(function(e){var t=e.reg,n=e.val;t.test(i)&&(i=i.replace(t,function(){return n}))}),i},$=function(){};d.prototype={constructor:d,show:function(){this.hideTimeoutId&&clearTimeout(this.hideTimeoutId);var e=this.menu,t=e.$elem,n=this.$container;if(!this._show){if(this._rendered)n.show();else{var i=t.getSizeData().height||0,o=this.opt.width||100;n.css("margin-top",i+"px").css("width",o+"px"),t.append(n),this._rendered=!0}this._show=!0}},hide:function(){this.showTimeoutId&&clearTimeout(this.showTimeoutId);var e=this.$container;this._show&&(e.hide(),this._show=!1)}},u.prototype={constructor:u,_command:function(e){var t=this.editor,n=t.selection.getSelectionContainerElem();t.$textElem.equal(n)||t.cmd.do("formatBlock",e)},tryChangeActive:function(e){var t=this.editor,n=this.$elem,i=/^h/i,o=t.cmd.queryCommandValue("formatBlock");i.test(o)?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}},h.prototype={constructor:h,_command:function(e){this.editor.cmd.do("fontSize",e)}},p.prototype={constructor:p,_command:function(e){this.editor.cmd.do("fontName",e)}};var V=function(){},K=[];f.prototype={constructor:f,show:function(){var e=this,t=this.menu;if(!(K.indexOf(t)>=0)){var n=t.editor,i=o("body"),A=n.$textContainerElem,r=this.opt,c=o('<div class="w-e-panel-container"></div>'),a=r.width||300;c.css("width",a+"px").css("margin-left",(0-a)/2+"px");var s=o('<i class="w-e-icon-close w-e-panel-close"></i>');c.append(s),s.on("click",function(){e.hide()});var l=o('<ul class="w-e-panel-tab-title"></ul>'),d=o('<div class="w-e-panel-tab-content"></div>');c.append(l).append(d);var u=r.height;u&&d.css("height",u+"px").css("overflow-y","auto");var h=r.tabs||[],p=[],f=[];h.forEach(function(e,t){if(e){var i=e.title||"",A=e.tpl||"";i=O(n,i),A=O(n,A);var r=o('<li class="w-e-item">'+i+"</li>");l.append(r);var c=o(A);d.append(c),r._index=t,p.push(r),f.push(c),0===t?(r._active=!0,r.addClass("w-e-active")):c.hide(),r.on("click",function(e){r._active||(p.forEach(function(e){e._active=!1,e.removeClass("w-e-active")}),f.forEach(function(e){e.hide()}),r._active=!0,r.addClass("w-e-active"),c.show())})}}),c.on("click",function(e){e.stopPropagation()}),i.on("click",function(t){e.hide()}),A.append(c),h.forEach(function(t,n){if(t){(t.events||[]).forEach(function(t){var i=t.selector,o=t.type,A=t.fn||V;f[n].find(i).on(o,function(t){t.stopPropagation(),A(t)&&e.hide()})})}});var m=c.find("input[type=text],textarea");m.length&&m.get(0).focus(),this.$container=c,this._hideOtherPanels(),K.push(t)}},hide:function(){var e=this.menu,t=this.$container;t&&t.remove(),K=K.filter(function(t){return t!==e})},_hideOtherPanels:function(){K.length&&K.forEach(function(e){var t=e.panel||{};t.hide&&t.hide()})}},m.prototype={constructor:m,onClick:function(e){var t=this.editor,n=void 0;if(this._active){if(!(n=t.selection.getSelectionContainerElem()))return;t.selection.createRangeByElem(n),t.selection.restoreSelection(),this._createPanel(n.text(),n.attr("href"))}else t.selection.isSelectionEmpty()?this._createPanel("",""):this._createPanel(t.selection.getSelectionText(),"")},_createPanel:function(e,t){var n=this,i=c("input-link"),A=c("input-text"),r=c("btn-ok"),a=c("btn-del"),s=this._active?"inline-block":"none",l=new f(this,{width:300,tabs:[{title:"链接",tpl:'<div>\n <input id="'+A+'" type="text" class="block" value="'+e+'" placeholder="链接文字"/></td>\n <input id="'+i+'" type="text" class="block" value="'+t+'" placeholder="http://..."/></td>\n <div class="w-e-button-container">\n <button id="'+r+'" class="right">插入</button>\n <button id="'+a+'" class="gray right" style="display:'+s+'">删除链接</button>\n </div>\n </div>',events:[{selector:"#"+r,type:"click",fn:function(){var e=o("#"+i),t=o("#"+A),r=e.val(),c=t.val();return n._insertLink(c,r),!0}},{selector:"#"+a,type:"click",fn:function(){return n._delLink(),!0}}]}]});l.show(),this.panel=l},_delLink:function(){if(this._active){var e=this.editor;if(e.selection.getSelectionContainerElem()){var t=e.selection.getSelectionText();e.cmd.do("insertHTML","<span>"+t+"</span>")}}},_insertLink:function(e,t){var n=this.editor,i=n.config,o=i.linkCheck,A=!0;o&&"function"==typeof o&&(A=o(e,t)),!0===A?n.cmd.do("insertHTML",'<a href="'+t+'" target="_blank">'+e+"</a>"):alert(A)},tryChangeActive:function(e){var t=this.editor,n=this.$elem,i=t.selection.getSelectionContainerElem();i&&("A"===i.getNodeName()?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active")))}},g.prototype={constructor:g,onClick:function(e){var t=this.editor,n=t.selection.isSelectionEmpty();n&&t.selection.createEmptyRange(),t.cmd.do("italic"),n&&(t.selection.collapseRange(),t.selection.restoreSelection())},tryChangeActive:function(e){var t=this.editor,n=this.$elem;t.cmd.queryCommandState("italic")?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}},w.prototype={constructor:w,onClick:function(e){this.editor.cmd.do("redo")}},v.prototype={constructor:v,onClick:function(e){var t=this.editor,n=t.selection.isSelectionEmpty();n&&t.selection.createEmptyRange(),t.cmd.do("strikeThrough"),n&&(t.selection.collapseRange(),t.selection.restoreSelection())},tryChangeActive:function(e){var t=this.editor,n=this.$elem;t.cmd.queryCommandState("strikeThrough")?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}},E.prototype={constructor:E,onClick:function(e){var t=this.editor,n=t.selection.isSelectionEmpty();n&&t.selection.createEmptyRange(),t.cmd.do("underline"),n&&(t.selection.collapseRange(),t.selection.restoreSelection())},tryChangeActive:function(e){var t=this.editor,n=this.$elem;t.cmd.queryCommandState("underline")?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}},b.prototype={constructor:b,onClick:function(e){this.editor.cmd.do("undo")}},B.prototype={constructor:B,_command:function(e){var t=this.editor,n=t.$textElem;if(t.selection.restoreSelection(),!t.cmd.queryCommandState(e)){t.cmd.do(e);var i=t.selection.getSelectionContainerElem();if("LI"===i.getNodeName()&&(i=i.parent()),!1!==/^ol|ul$/i.test(i.getNodeName())&&!i.equal(n)){var o=i.parent();o.equal(n)||(i.insertAfter(o),o.remove())}}},tryChangeActive:function(e){var t=this.editor,n=this.$elem;t.cmd.queryCommandState("insertUnOrderedList")||t.cmd.queryCommandState("insertOrderedList")?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}},y.prototype={constructor:y,_command:function(e){this.editor.cmd.do(e)}},C.prototype={constructor:C,_command:function(e){this.editor.cmd.do("foreColor",e)}},x.prototype={constructor:x,_command:function(e){this.editor.cmd.do("backColor",e)}},I.prototype={constructor:I,onClick:function(e){var t=this.editor,n=t.selection.getSelectionContainerElem(),i=n.getNodeName();if(!J.isIE())return void("BLOCKQUOTE"===i?t.cmd.do("formatBlock","<P>"):t.cmd.do("formatBlock","<BLOCKQUOTE>"));var A=void 0,r=void 0;if("P"===i)return A=n.text(),r=o("<blockquote>"+A+"</blockquote>"),r.insertAfter(n),void n.remove();"BLOCKQUOTE"===i&&(A=n.text(),r=o("<p>"+A+"</p>"),r.insertAfter(n),n.remove())},tryChangeActive:function(e){var t=this.editor,n=this.$elem,i=/^BLOCKQUOTE$/i,o=t.cmd.queryCommandValue("formatBlock");i.test(o)?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}},Q.prototype={constructor:Q,onClick:function(e){var t=this.editor,n=t.selection.getSelectionStartElem(),i=t.selection.getSelectionEndElem(),A=t.selection.isSelectionEmpty(),r=t.selection.getSelectionText(),c=void 0;return n.equal(i)?A?void(this._active?this._createPanel(n.html()):this._createPanel()):(c=o("<code>"+r+"</code>"),t.cmd.do("insertElem",c),t.selection.createRangeByElem(c,!1),void t.selection.restoreSelection()):void t.selection.restoreSelection()},_createPanel:function(e){var t=this;e=e||"";var n=e?"edit":"new",i=c("texxt"),A=c("btn"),r=new f(this,{width:500,tabs:[{title:"插入代码",tpl:'<div>\n <textarea id="'+i+'" style="height:145px;;">'+e+'</textarea>\n <div class="w-e-button-container">\n <button id="'+A+'" class="right">插入</button>\n </div>\n <div>',events:[{selector:"#"+A,type:"click",fn:function(){var e=o("#"+i),A=e.val()||e.html();return A=a(A),"new"===n?t._insertCode(A):t._updateCode(A),!0}}]}]});r.show(),this.panel=r},_insertCode:function(e){this.editor.cmd.do("insertHTML","<pre><code>"+e+"</code></pre><p><br></p>")},_updateCode:function(e){var t=this.editor,n=t.selection.getSelectionContainerElem();n&&(n.html(e),t.selection.restoreSelection())},tryChangeActive:function(e){var t=this.editor,n=this.$elem,i=t.selection.getSelectionContainerElem();if(i){var o=i.parent();"CODE"===i.getNodeName()&&"PRE"===o.getNodeName()?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}}},M.prototype={constructor:M,onClick:function(){this._createPanel()},_createPanel:function(){var e=this,t=this.editor,n=t.config,i=n.emotions||[],A=[];i.forEach(function(t){var n=t.type,i=t.content||[],r="";"emoji"===n&&i.forEach(function(e){e&&(r+='<span class="w-e-item">'+e+"</span>")}),"image"===n&&i.forEach(function(e){var t=e.src,n=e.alt;t&&(r+='<span class="w-e-item"><img src="'+t+'" alt="'+n+'" data-w-e="1"/></span>')}),A.push({title:t.title,tpl:'<div class="w-e-emoticon-container">'+r+"</div>",events:[{selector:"span.w-e-item",type:"click",fn:function(t){var n=t.target,i=o(n),A=i.getNodeName(),r=void 0;return r="IMG"===A?i.parent().html():"<span>"+i.html()+"</span>",e._insert(r),!0}}]})});var r=new f(this,{width:300,height:200,tabs:A});r.show(),this.panel=r},_insert:function(e){this.editor.cmd.do("insertHTML",e)}},S.prototype={constructor:S,onClick:function(){this._active?this._createEditPanel():this._createInsertPanel()},_createInsertPanel:function(){var e=this,t=c("btn"),n=c("row"),i=c("col"),A=new f(this,{width:250,tabs:[{title:"插入表格",tpl:'<div>\n <p style="text-align:left; padding:5px 0;">\n 创建\n <input id="'+n+'" type="text" value="5" style="width:40px;text-align:center;"/>\n 行\n <input id="'+i+'" type="text" value="5" style="width:40px;text-align:center;"/>\n 列的表格\n </p>\n <div class="w-e-button-container">\n <button id="'+t+'" class="right">插入</button>\n </div>\n </div>',events:[{selector:"#"+t,type:"click",fn:function(){var t=parseInt(o("#"+n).val()),A=parseInt(o("#"+i).val());return t&&A&&t>0&&A>0&&e._insert(t,A),!0}}]}]});A.show(),this.panel=A},_insert:function(e,t){var n=void 0,i=void 0,o='<table border="0" width="100%" cellpadding="0" cellspacing="0">';for(n=0;n<e;n++){if(o+="<tr>",0===n)for(i=0;i<t;i++)o+="<th>&nbsp;</th>";else for(i=0;i<t;i++)o+="<td>&nbsp;</td>";o+="</tr>"}o+="</table><p><br></p>";var A=this.editor;A.cmd.do("insertHTML",o),A.cmd.do("enableObjectResizing",!1),A.cmd.do("enableInlineTableEditing",!1)},_createEditPanel:function(){var e=this,t=c("add-row"),n=c("add-col"),i=c("del-row"),o=c("del-col"),A=c("del-table");new f(this,{width:320,tabs:[{title:"编辑表格",tpl:'<div>\n <div class="w-e-button-container" style="border-bottom:1px solid #f1f1f1;padding-bottom:5px;margin-bottom:5px;">\n <button id="'+t+'" class="left">增加行</button>\n <button id="'+i+'" class="red left">删除行</button>\n <button id="'+n+'" class="left">增加列</button>\n <button id="'+o+'" class="red left">删除列</button>\n </div>\n <div class="w-e-button-container">\n <button id="'+A+'" class="gray left">删除表格</button>\n </dv>\n </div>',events:[{selector:"#"+t,type:"click",fn:function(){return e._addRow(),!0}},{selector:"#"+n,type:"click",fn:function(){return e._addCol(),!0}},{selector:"#"+i,type:"click",fn:function(){return e._delRow(),!0}},{selector:"#"+o,type:"click",fn:function(){return e._delCol(),!0}},{selector:"#"+A,type:"click",fn:function(){return e._delTable(),!0}}]}]}).show()},_getLocationData:function(){var e={},t=this.editor,n=t.selection.getSelectionContainerElem();if(n){var i=n.getNodeName();if("TD"===i||"TH"===i){var o=n.parent(),A=o.children(),r=A.length;A.forEach(function(t,i){if(t===n[0])return e.td={index:i,elem:t,length:r},!1});var c=o.parent(),a=c.children(),s=a.length;return a.forEach(function(t,n){if(t===o[0])return e.tr={index:n,elem:t,length:s},!1}),e}}},_addRow:function(){var e=this._getLocationData();if(e){var t=e.tr,n=o(t.elem),i=e.td,A=i.length,r=document.createElement("tr"),c="",a=void 0;for(a=0;a<A;a++)c+="<td>&nbsp;</td>";r.innerHTML=c,o(r).insertAfter(n)}},_addCol:function(){var e=this._getLocationData();if(e){var t=e.tr,n=e.td,i=n.index;o(t.elem).parent().children().forEach(function(e){var t=o(e),n=t.children(),A=n.get(i),r=A.getNodeName().toLowerCase();o(document.createElement(r)).insertAfter(A)})}},_delRow:function(){var e=this._getLocationData();if(e){o(e.tr.elem).remove()}},_delCol:function(){var e=this._getLocationData();if(e){var t=e.tr,n=e.td,i=n.index;o(t.elem).parent().children().forEach(function(e){o(e).children().get(i).remove()})}},_delTable:function(){var e=this.editor,t=e.selection.getSelectionContainerElem();if(t){var n=t.parentUntil("table");n&&n.remove()}},tryChangeActive:function(e){var t=this.editor,n=this.$elem,i=t.selection.getSelectionContainerElem();if(i){var o=i.getNodeName();"TD"===o||"TH"===o?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}}},k.prototype={constructor:k,onClick:function(){this._createPanel()},_createPanel:function(){var e=this,t=c("text-val"),n=c("btn"),i=new f(this,{width:350,tabs:[{title:"插入视频",tpl:'<div>\n <input id="'+t+'" type="text" class="block" placeholder="格式如:<iframe src=... ></iframe>"/>\n <div class="w-e-button-container">\n <button id="'+n+'" class="right">插入</button>\n </div>\n </div>',events:[{selector:"#"+n,type:"click",fn:function(){var n=o("#"+t),i=n.val().trim();return i&&e._insert(i),!0}}]}]});i.show(),this.panel=i},_insert:function(e){this.editor.cmd.do("insertHTML",e+"<p><br></p>")}},D.prototype={constructor:D,onClick:function(){this.editor.config.qiniu||(this._active?this._createEditPanel():this._createInsertPanel())},_createEditPanel:function(){var e=this.editor,t=c("width-30"),n=c("width-50"),i=c("width-100"),o=c("del-btn"),A=[{title:"编辑图片",tpl:'<div>\n <div class="w-e-button-container" style="border-bottom:1px solid #f1f1f1;padding-bottom:5px;margin-bottom:5px;">\n <span style="float:left;font-size:14px;margin:4px 5px 0 5px;color:#333;">最大宽度:</span>\n <button id="'+t+'" class="left">30%</button>\n <button id="'+n+'" class="left">50%</button>\n <button id="'+i+'" class="left">100%</button>\n </div>\n <div class="w-e-button-container">\n <button id="'+o+'" class="gray left">删除图片</button>\n </dv>\n </div>',events:[{selector:"#"+t,type:"click",fn:function(){var t=e._selectedImg;return t&&t.css("max-width","30%"),!0}},{selector:"#"+n,type:"click",fn:function(){var t=e._selectedImg;return t&&t.css("max-width","50%"),!0}},{selector:"#"+i,type:"click",fn:function(){var t=e._selectedImg;return t&&t.css("max-width","100%"),!0}},{selector:"#"+o,type:"click",fn:function(){var t=e._selectedImg;return t&&t.remove(),!0}}]}],r=new f(this,{width:300,tabs:A});r.show(),this.panel=r},_createInsertPanel:function(){var e=this.editor,t=e.uploadImg,n=e.config,i=c("up-trigger"),A=c("up-file"),r=c("link-url"),a=c("link-btn"),s=[{title:"上传图片",tpl:'<div class="w-e-up-img-container">\n <div id="'+i+'" class="w-e-up-btn">\n <i class="w-e-icon-upload2"></i>\n </div>\n <div style="display:none;">\n <input id="'+A+'" type="file" multiple="multiple" accept="image/jpg,image/jpeg,image/png,image/gif,image/bmp"/>\n </div>\n </div>',events:[{selector:"#"+i,type:"click",fn:function(){var e=o("#"+A),t=e[0];if(!t)return!0;t.click()}},{selector:"#"+A,type:"change",fn:function(){var e=o("#"+A),n=e[0];if(!n)return!0;var i=n.files;return i.length&&t.uploadImg(i),!0}}]},{title:"网络图片",
  2 +tpl:'<div>\n <input id="'+r+'" type="text" class="block" placeholder="图片链接"/></td>\n <div class="w-e-button-container">\n <button id="'+a+'" class="right">插入</button>\n </div>\n </div>',events:[{selector:"#"+a,type:"click",fn:function(){var e=o("#"+r),n=e.val().trim();return n&&t.insertLinkImg(n),!0}}]}],l=[];(n.uploadImgShowBase64||n.uploadImgServer||n.customUploadImg)&&window.FileReader&&l.push(s[0]),n.showLinkImg&&l.push(s[1]);var d=new f(this,{width:300,tabs:l});d.show(),this.panel=d},tryChangeActive:function(e){var t=this.editor,n=this.$elem;t._selectedImg?(this._active=!0,n.addClass("w-e-active")):(this._active=!1,n.removeClass("w-e-active"))}};var q={};q.bold=l,q.head=u,q.fontSize=h,q.fontName=p,q.link=m,q.italic=g,q.redo=w,q.strikeThrough=v,q.underline=E,q.undo=b,q.list=B,q.justify=y,q.foreColor=C,q.backColor=x,q.quote=I,q.code=Q,q.emoticon=M,q.table=S,q.video=k,q.image=D,_.prototype={constructor:_,init:function(){var e=this,t=this.editor;((t.config||{}).menus||[]).forEach(function(n){var i=q[n];i&&"function"==typeof i&&(e.menus[n]=new i(t))}),this._addToToolbar(),this._bindEvent()},_addToToolbar:function(){var e=this.editor,t=e.$toolbarElem,n=this.menus,i=e.config,o=i.zIndex+1;A(n,function(e,n){var i=n.$elem;i&&(i.css("z-index",o),t.append(i))})},_bindEvent:function(){var e=this.menus,t=this.editor;A(e,function(e,n){var i=n.type;if(i){var o=n.$elem,A=n.droplist;n.panel;"click"===i&&n.onClick&&o.on("click",function(e){null!=t.selection.getRange()&&n.onClick(e)}),"droplist"===i&&A&&o.on("mouseenter",function(e){null!=t.selection.getRange()&&(A.showTimeoutId=setTimeout(function(){A.show()},200))}).on("mouseleave",function(e){A.hideTimeoutId=setTimeout(function(){A.hide()},0)}),"panel"===i&&n.onClick&&o.on("click",function(e){e.stopPropagation(),null!=t.selection.getRange()&&n.onClick(e)})}})},changeActive:function(){A(this.menus,function(e,t){t.tryChangeActive&&setTimeout(function(){t.tryChangeActive()},100)})}},U.prototype={constructor:U,init:function(){this._bindEvent()},clear:function(){this.html("<p><br></p>")},html:function(e){var t=this.editor,n=t.$textElem,i=void 0;if(null==e)return i=n.html(),i=i.replace(/\u200b/gm,""),i;n.html(e),t.initSelection()},getJSON:function(){return R(this.editor.$textElem)},text:function(e){var t=this.editor,n=t.$textElem,i=void 0;if(null==e)return i=n.text(),i=i.replace(/\u200b/gm,""),i;n.text("<p>"+e+"</p>"),t.initSelection()},append:function(e){var t=this.editor;t.$textElem.append(o(e)),t.initSelection()},_bindEvent:function(){this._saveRangeRealTime(),this._enterKeyHandle(),this._clearHandle(),this._pasteHandle(),this._tabHandle(),this._imgHandle(),this._dragHandle()},_saveRangeRealTime:function(){function e(e){t.selection.saveRange(),t.menus.changeActive()}var t=this.editor,n=t.$textElem;n.on("keyup",e),n.on("mousedown",function(t){n.on("mouseleave",e)}),n.on("mouseup",function(t){e(),n.off("mouseleave",e)})},_enterKeyHandle:function(){function e(e){var t=o("<p><br></p>");t.insertBefore(e),i.selection.createRangeByElem(t,!0),i.selection.restoreSelection(),e.remove()}function t(t){var n=i.selection.getSelectionContainerElem(),o=n.parent();if("<code><br></code>"===o.html())return void e(n);if(o.equal(A)){"P"!==n.getNodeName()&&(n.text()||e(n))}}function n(e){var t=i.selection.getSelectionContainerElem();if(t){var n=t.parent(),A=t.getNodeName(),r=n.getNodeName();if("CODE"===A&&"PRE"===r&&i.cmd.queryCommandSupported("insertHTML")){if(!0===i._willBreakCode){var c=o("<p><br></p>");return c.insertAfter(n),i.selection.createRangeByElem(c,!0),i.selection.restoreSelection(),i._willBreakCode=!1,void e.preventDefault()}var a=i.selection.getRange().startOffset;i.cmd.do("insertHTML","\n"),i.selection.saveRange(),i.selection.getRange().startOffset===a&&i.cmd.do("insertHTML","\n");var s=t.html().length;i.selection.getRange().startOffset+1===s&&(i._willBreakCode=!0),e.preventDefault()}}}var i=this.editor,A=i.$textElem;A.on("keyup",function(e){13===e.keyCode&&t(e)}),A.on("keydown",function(e){if(13!==e.keyCode)return void(i._willBreakCode=!1);n(e)})},_clearHandle:function(){var e=this.editor,t=e.$textElem;t.on("keydown",function(e){if(8===e.keyCode){return"<p><br></p>"===t.html().toLowerCase().trim()?void e.preventDefault():void 0}}),t.on("keyup",function(n){if(8===n.keyCode){var i=void 0,A=t.html().toLowerCase().trim();A&&"<br>"!==A||(i=o("<p><br/></p>"),t.html(""),t.append(i),e.selection.createRangeByElem(i,!1,!0),e.selection.restoreSelection())}})},_pasteHandle:function(){function e(){var e=Date.now(),t=!1;return e-a>=100&&(t=!0),a=e,t}function t(){a=0}var n=this.editor,i=n.config,o=i.pasteFilterStyle,A=i.pasteTextHandle,r=i.pasteIgnoreImg,c=n.$textElem,a=0;c.on("paste",function(i){if(!J.isIE()&&(i.preventDefault(),e())){var c=F(i,o,r),a=N(i);a=a.replace(/\n/gm,"<br>");var l=n.selection.getSelectionContainerElem();if(l){var d=l.getNodeName();if("CODE"===d||"PRE"===d)return A&&s(A)&&(a=""+(A(a)||"")),void n.cmd.do("insertHTML","<p>"+a+"</p>");if(!c)return void t();try{A&&s(A)&&(c=""+(A(c)||"")),n.cmd.do("insertHTML",c)}catch(e){A&&s(A)&&(a=""+(A(a)||"")),n.cmd.do("insertHTML","<p>"+a+"</p>")}}}}),c.on("paste",function(t){if(!J.isIE()&&(t.preventDefault(),e())){var i=T(t);if(i&&i.length){var o=n.selection.getSelectionContainerElem();if(o){var A=o.getNodeName();if("CODE"!==A&&"PRE"!==A){n.uploadImg.uploadImg(i)}}}}})},_tabHandle:function(){var e=this.editor;e.$textElem.on("keydown",function(t){if(9===t.keyCode&&e.cmd.queryCommandSupported("insertHTML")){var n=e.selection.getSelectionContainerElem();if(n){var i=n.parent(),o=n.getNodeName(),A=i.getNodeName();"CODE"===o&&"PRE"===A?e.cmd.do("insertHTML"," "):e.cmd.do("insertHTML","&nbsp;&nbsp;&nbsp;&nbsp;"),t.preventDefault()}}})},_imgHandle:function(){var e=this.editor,t=e.$textElem;t.on("click","img",function(t){var n=this,i=o(n);"1"!==i.attr("data-w-e")&&(e._selectedImg=i,e.selection.createRangeByElem(i),e.selection.restoreSelection())}),t.on("click keyup",function(t){t.target.matches("img")||(e._selectedImg=null)})},_dragHandle:function(){var e=this.editor;o(document).on("dragleave drop dragenter dragover",function(e){e.preventDefault()}),e.$textElem.on("drop",function(t){t.preventDefault();var n=t.dataTransfer&&t.dataTransfer.files;n&&n.length&&e.uploadImg.uploadImg(n)})}},Y.prototype={constructor:Y,do:function(e,t){var n=this.editor;if(n._useStyleWithCSS||(document.execCommand("styleWithCSS",null,!0),n._useStyleWithCSS=!0),n.selection.getRange()){n.selection.restoreSelection();var i="_"+e;this[i]?this[i](t):this._execCommand(e,t),n.menus.changeActive(),n.selection.saveRange(),n.selection.restoreSelection(),n.change&&n.change()}},_insertHTML:function(e){var t=this.editor,n=t.selection.getRange();this.queryCommandSupported("insertHTML")?this._execCommand("insertHTML",e):n.insertNode?(n.deleteContents(),n.insertNode(o(e)[0])):n.pasteHTML&&n.pasteHTML(e)},_insertElem:function(e){var t=this.editor,n=t.selection.getRange();n.insertNode&&(n.deleteContents(),n.insertNode(e[0]))},_execCommand:function(e,t){document.execCommand(e,!1,t)},queryCommandValue:function(e){return document.queryCommandValue(e)},queryCommandState:function(e){return document.queryCommandState(e)},queryCommandSupported:function(e){return document.queryCommandSupported(e)}},P.prototype={constructor:P,getRange:function(){return this._currentRange},saveRange:function(e){if(e)return void(this._currentRange=e);var t=window.getSelection();if(0!==t.rangeCount){var n=t.getRangeAt(0),i=this.getSelectionContainerElem(n);if(i&&"false"!==i.attr("contenteditable")&&!i.parentUntil("[contenteditable=false]")){this.editor.$textElem.isContain(i)&&(this._currentRange=n)}}},collapseRange:function(e){null==e&&(e=!1);var t=this._currentRange;t&&t.collapse(e)},getSelectionText:function(){return this._currentRange?this._currentRange.toString():""},getSelectionContainerElem:function(e){e=e||this._currentRange;var t=void 0;if(e)return t=e.commonAncestorContainer,o(1===t.nodeType?t:t.parentNode)},getSelectionStartElem:function(e){e=e||this._currentRange;var t=void 0;if(e)return t=e.startContainer,o(1===t.nodeType?t:t.parentNode)},getSelectionEndElem:function(e){e=e||this._currentRange;var t=void 0;if(e)return t=e.endContainer,o(1===t.nodeType?t:t.parentNode)},isSelectionEmpty:function(){var e=this._currentRange;return!(!e||!e.startContainer||e.startContainer!==e.endContainer||e.startOffset!==e.endOffset)},restoreSelection:function(){var e=window.getSelection();e.removeAllRanges(),e.addRange(this._currentRange)},createEmptyRange:function(){var e=this.editor,t=this.getRange(),n=void 0;if(t&&this.isSelectionEmpty())try{J.isWebkit()?(e.cmd.do("insertHTML","&#8203;"),t.setEnd(t.endContainer,t.endOffset+1),this.saveRange(t)):(n=o("<strong>&#8203;</strong>"),e.cmd.do("insertElem",n),this.createRangeByElem(n,!0))}catch(e){}},createRangeByElem:function(e,t,n){if(e.length){var i=e[0],o=document.createRange();n?o.selectNodeContents(i):o.selectNode(i),"boolean"==typeof t&&o.collapse(t),this.saveRange(o)}}},H.prototype={constructor:H,show:function(e){var t=this;if(!this._isShow){this._isShow=!0;var n=this.$bar;if(this._isRender)this._isRender=!0;else{this.$textContainer.append(n)}Date.now()-this._time>100&&e<=1&&(n.css("width",100*e+"%"),this._time=Date.now());var i=this._timeoutId;i&&clearTimeout(i),i=setTimeout(function(){t._hide()},500)}},_hide:function(){this.$bar.remove(),this._time=0,this._isShow=!1,this._isRender=!1}};var X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};L.prototype={constructor:L,_alert:function(e,t){var n=this.editor,i=n.config.debug,o=n.config.customAlert;if(i)throw new Error("wangEditor: "+(t||e));o&&"function"==typeof o?o(e):alert(e)},insertLinkImg:function(e){var t=this;if(e){var n=this.editor,i=n.config,o=i.linkImgCheck,A=void 0;if(o&&"function"==typeof o&&"string"==typeof(A=o(e)))return void alert(A);n.cmd.do("insertHTML",'<img src="'+e+'" style="max-width:100%;"/>');var r=document.createElement("img");r.onload=function(){var t=i.linkImgCallback;t&&"function"==typeof t&&t(e),r=null},r.onerror=function(){r=null,t._alert("插入图片错误",'wangEditor: 插入图片出错,图片链接是 "'+e+'",下载该链接失败')},r.onabort=function(){r=null},r.src=e}},uploadImg:function(e){var t=this;if(e&&e.length){var n=this.editor,i=n.config,o=i.uploadImgServer,c=i.uploadImgShowBase64,a=i.uploadImgMaxSize,s=a/1024/1024,l=i.uploadImgMaxLength||1e4,d=i.uploadFileName||"",u=i.uploadImgParams||{},h=i.uploadImgParamsWithUrl,p=i.uploadImgHeaders||{},f=i.uploadImgHooks||{},m=i.uploadImgTimeout||3e3,g=i.withCredentials;null==g&&(g=!1);var w=i.customUploadImg;if(w||o||c){var v=[],E=[];if(r(e,function(e){var t=e.name,n=e.size;if(t&&n)return!1===/\.(jpg|jpeg|png|bmp|gif|webp)$/i.test(t)?void E.push("【"+t+"】不是图片"):a<n?void E.push("【"+t+"】大于 "+s+"M"):void v.push(e)}),E.length)return void this._alert("图片验证未通过: \n"+E.join("\n"));if(v.length>l)return void this._alert("一次最多上传"+l+"张图片");if(w&&"function"==typeof w)return void w(v,this.insertLinkImg.bind(this));var b=new FormData;if(r(v,function(e){var t=d||e.name;b.append(t,e)}),o&&"string"==typeof o){var B=o.split("#");o=B[0];var y=B[1]||"";A(u,function(e,t){h&&(o.indexOf("?")>0?o+="&":o+="?",o=o+e+"="+t),b.append(e,t)}),y&&(o+="#"+y);var C=new XMLHttpRequest;if(C.open("POST",o),C.timeout=m,C.ontimeout=function(){f.timeout&&"function"==typeof f.timeout&&f.timeout(C,n),t._alert("上传图片超时")},C.upload&&(C.upload.onprogress=function(e){var t=void 0,i=new H(n);e.lengthComputable&&(t=e.loaded/e.total,i.show(t))}),C.onreadystatechange=function(){var e=void 0;if(4===C.readyState){if(C.status<200||C.status>=300)return f.error&&"function"==typeof f.error&&f.error(C,n),void t._alert("上传图片发生错误","上传图片发生错误,服务器返回状态是 "+C.status);if(e=C.responseText,"object"!==(void 0===e?"undefined":X(e)))try{e=JSON.parse(e)}catch(i){return f.fail&&"function"==typeof f.fail&&f.fail(C,n,e),void t._alert("上传图片失败","上传图片返回结果错误,返回结果是: "+e)}if(f.customInsert||"0"==e.errno){if(f.customInsert&&"function"==typeof f.customInsert)f.customInsert(t.insertLinkImg.bind(t),e,n);else{(e.data||[]).forEach(function(e){t.insertLinkImg(e)})}f.success&&"function"==typeof f.success&&f.success(C,n,e)}else f.fail&&"function"==typeof f.fail&&f.fail(C,n,e),t._alert("上传图片失败","上传图片返回结果错误,返回结果 errno="+e.errno)}},f.before&&"function"==typeof f.before){var x=f.before(C,n,v);if(x&&"object"===(void 0===x?"undefined":X(x))&&x.prevent)return void this._alert(x.msg)}return A(p,function(e,t){C.setRequestHeader(e,t)}),C.withCredentials=g,void C.send(b)}c&&r(e,function(e){var n=t,i=new FileReader;i.readAsDataURL(e),i.onload=function(){n.insertLinkImg(this.result)}})}}}};var W=1;j.prototype={constructor:j,_initConfig:function(){var e={};this.config=Object.assign(e,z,this.customConfig);var t=this.config.lang||{},n=[];A(t,function(e,t){n.push({reg:new RegExp(e,"img"),val:t})}),this.config.langArgs=n},_initDom:function(){var e=this,t=this.toolbarSelector,n=o(t),i=this.textSelector,A=this.config,r=A.zIndex,a=void 0,s=void 0,l=void 0,d=void 0;null==i?(a=o("<div></div>"),s=o("<div></div>"),d=n.children(),n.append(a).append(s),a.css("background-color","#f1f1f1").css("border","1px solid #ccc"),s.css("border","1px solid #ccc").css("border-top","none").css("height","300px")):(a=n,s=o(i),d=s.children()),l=o("<div></div>"),l.attr("contenteditable","true").css("width","100%").css("height","100%"),d&&d.length?l.append(d):l.append(o("<p><br></p>")),s.append(l),a.addClass("w-e-toolbar"),s.addClass("w-e-text-container"),s.css("z-index",r),l.addClass("w-e-text");var u=c("toolbar-elem");a.attr("id",u);var h=c("text-elem");l.attr("id",h),this.$toolbarElem=a,this.$textContainerElem=s,this.$textElem=l,this.toolbarElemId=u,this.textElemId=h;var p=!0;s.on("compositionstart",function(){p=!1}),s.on("compositionend",function(){p=!0}),s.on("click keyup",function(){p&&e.change&&e.change()}),a.on("click",function(){this.change&&this.change()}),(A.onfocus||A.onblur)&&(this.isFocus=!1,o(document).on("click",function(t){var n=l.isContain(o(t.target)),i=a.isContain(o(t.target)),A=a[0]==t.target;if(n)e.isFocus||e.onfocus&&e.onfocus(),e.isFocus=!0;else{if(i&&!A)return;e.isFocus&&e.onblur&&e.onblur(),e.isFocus=!1}}))},_initCommand:function(){this.cmd=new Y(this)},_initSelectionAPI:function(){this.selection=new P(this)},_initUploadImg:function(){this.uploadImg=new L(this)},_initMenus:function(){this.menus=new _(this),this.menus.init()},_initText:function(){this.txt=new U(this),this.txt.init()},initSelection:function(e){var t=this.$textElem,n=t.children();if(!n.length)return t.append(o("<p><br></p>")),void this.initSelection();var i=n.last();if(e){var A=i.html().toLowerCase(),r=i.getNodeName();if("<br>"!==A&&"<br/>"!==A||"P"!==r)return t.append(o("<p><br></p>")),void this.initSelection()}this.selection.createRangeByElem(i,!1,!0),this.selection.restoreSelection()},_bindEvent:function(){var e=0,t=this.txt.html(),n=this.config,i=n.onchangeTimeout;(!(i=parseInt(i,10))||i<=0)&&(i=200);var o=n.onchange;o&&"function"==typeof o&&(this.change=function(){var n=this.txt.html();n.length===t.length&&n===t||(e&&clearTimeout(e),e=setTimeout(function(){o(n),t=n},i))});var A=n.onblur;A&&"function"==typeof A&&(this.onblur=function(){var e=this.txt.html();A(e)});var r=n.onfocus;r&&"function"==typeof r&&(this.onfocus=function(){r()})},create:function(){this._initConfig(),this._initDom(),this._initCommand(),this._initSelectionAPI(),this._initText(),this._initMenus(),this._initUploadImg(),this.initSelection(!0),this._bindEvent()},_offAllEvent:function(){o.offAll()}};try{document}catch(e){throw new Error("请在浏览器环境下运行")}!function(){"function"!=typeof Object.assign&&(Object.assign=function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(e),i=1;i<arguments.length;i++){var o=arguments[i];if(null!=o)for(var A in o)Object.prototype.hasOwnProperty.call(o,A)&&(n[A]=o[A])}return n}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;--n>=0&&t.item(n)!==this;);return n>-1})}();var Z=document.createElement("style");return Z.type="text/css",
  3 +Z.innerHTML='.w-e-toolbar,.w-e-text-container,.w-e-menu-panel { padding: 0; margin: 0; box-sizing: border-box;}.w-e-toolbar *,.w-e-text-container *,.w-e-menu-panel * { padding: 0; margin: 0; box-sizing: border-box;}.w-e-clear-fix:after { content: ""; display: table; clear: both;}.w-e-toolbar .w-e-droplist { position: absolute; left: 0; top: 0; background-color: #fff; border: 1px solid #f1f1f1; border-right-color: #ccc; border-bottom-color: #ccc;}.w-e-toolbar .w-e-droplist .w-e-dp-title { text-align: center; color: #999; line-height: 2; border-bottom: 1px solid #f1f1f1; font-size: 13px;}.w-e-toolbar .w-e-droplist ul.w-e-list { list-style: none; line-height: 1;}.w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item { color: #333; padding: 5px 0;}.w-e-toolbar .w-e-droplist ul.w-e-list li.w-e-item:hover { background-color: #f1f1f1;}.w-e-toolbar .w-e-droplist ul.w-e-block { list-style: none; text-align: left; padding: 5px;}.w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item { display: inline-block; *display: inline; *zoom: 1; padding: 3px 5px;}.w-e-toolbar .w-e-droplist ul.w-e-block li.w-e-item:hover { background-color: #f1f1f1;}@font-face { font-family: \'w-e-icon\'; src: url(data:application/x-font-woff;charset=utf-8;base64,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) format(\'truetype\'); font-weight: normal; font-style: normal;}[class^="w-e-icon-"],[class*=" w-e-icon-"] { /* use !important to prevent issues with browser extensions that change fonts */ font-family: \'w-e-icon\' !important; speak: none; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; line-height: 1; /* Better Font Rendering =========== */ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;}.w-e-icon-close:before { content: "\\f00d";}.w-e-icon-upload2:before { content: "\\e9c6";}.w-e-icon-trash-o:before { content: "\\f014";}.w-e-icon-header:before { content: "\\f1dc";}.w-e-icon-pencil2:before { content: "\\e906";}.w-e-icon-paint-brush:before { content: "\\f1fc";}.w-e-icon-image:before { content: "\\e90d";}.w-e-icon-play:before { content: "\\e912";}.w-e-icon-location:before { content: "\\e947";}.w-e-icon-undo:before { content: "\\e965";}.w-e-icon-redo:before { content: "\\e966";}.w-e-icon-quotes-left:before { content: "\\e977";}.w-e-icon-list-numbered:before { content: "\\e9b9";}.w-e-icon-list2:before { content: "\\e9bb";}.w-e-icon-link:before { content: "\\e9cb";}.w-e-icon-happy:before { content: "\\e9df";}.w-e-icon-bold:before { content: "\\ea62";}.w-e-icon-underline:before { content: "\\ea63";}.w-e-icon-italic:before { content: "\\ea64";}.w-e-icon-strikethrough:before { content: "\\ea65";}.w-e-icon-table2:before { content: "\\ea71";}.w-e-icon-paragraph-left:before { content: "\\ea77";}.w-e-icon-paragraph-center:before { content: "\\ea78";}.w-e-icon-paragraph-right:before { content: "\\ea79";}.w-e-icon-terminal:before { content: "\\f120";}.w-e-icon-page-break:before { content: "\\ea68";}.w-e-icon-cancel-circle:before { content: "\\ea0d";}.w-e-icon-font:before { content: "\\ea5c";}.w-e-icon-text-heigh:before { content: "\\ea5f";}.w-e-toolbar { display: -webkit-box; display: -ms-flexbox; display: flex; padding: 0 5px; /* flex-wrap: wrap; */ /* 单个菜单 */}.w-e-toolbar .w-e-menu { position: relative; text-align: center; padding: 5px 10px; cursor: pointer;}.w-e-toolbar .w-e-menu i { color: #999;}.w-e-toolbar .w-e-menu:hover i { color: #333;}.w-e-toolbar .w-e-active i { color: #1e88e5;}.w-e-toolbar .w-e-active:hover i { color: #1e88e5;}.w-e-text-container .w-e-panel-container { position: absolute; top: 0; left: 50%; border: 1px solid #ccc; border-top: 0; box-shadow: 1px 1px 2px #ccc; color: #333; background-color: #fff; /* 为 emotion panel 定制的样式 */ /* 上传图片的 panel 定制样式 */}.w-e-text-container .w-e-panel-container .w-e-panel-close { position: absolute; right: 0; top: 0; padding: 5px; margin: 2px 5px 0 0; cursor: pointer; color: #999;}.w-e-text-container .w-e-panel-container .w-e-panel-close:hover { color: #333;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title { list-style: none; display: -webkit-box; display: -ms-flexbox; display: flex; font-size: 14px; margin: 2px 10px 0 10px; border-bottom: 1px solid #f1f1f1;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title .w-e-item { padding: 3px 5px; color: #999; cursor: pointer; margin: 0 3px; position: relative; top: 1px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-title .w-e-active { color: #333; border-bottom: 1px solid #333; cursor: default; font-weight: 700;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content { padding: 10px 15px 10px 15px; font-size: 16px; /* 输入框的样式 */ /* 按钮的样式 */}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input:focus,.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea:focus,.w-e-text-container .w-e-panel-container .w-e-panel-tab-content button:focus { outline: none;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea { width: 100%; border: 1px solid #ccc; padding: 5px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content textarea:focus { border-color: #1e88e5;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text] { border: none; border-bottom: 1px solid #ccc; font-size: 14px; height: 20px; color: #333; text-align: left;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text].small { width: 30px; text-align: center;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text].block { display: block; width: 100%; margin: 10px 0;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content input[type=text]:focus { border-bottom: 2px solid #1e88e5;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button { font-size: 14px; color: #1e88e5; border: none; padding: 5px 10px; background-color: #fff; cursor: pointer; border-radius: 3px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.left { float: left; margin-right: 10px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.right { float: right; margin-left: 10px;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.gray { color: #999;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button.red { color: #c24f4a;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container button:hover { background-color: #f1f1f1;}.w-e-text-container .w-e-panel-container .w-e-panel-tab-content .w-e-button-container:after { content: ""; display: table; clear: both;}.w-e-text-container .w-e-panel-container .w-e-emoticon-container .w-e-item { cursor: pointer; font-size: 18px; padding: 0 3px; display: inline-block; *display: inline; *zoom: 1;}.w-e-text-container .w-e-panel-container .w-e-up-img-container { text-align: center;}.w-e-text-container .w-e-panel-container .w-e-up-img-container .w-e-up-btn { display: inline-block; *display: inline; *zoom: 1; color: #999; cursor: pointer; font-size: 60px; line-height: 1;}.w-e-text-container .w-e-panel-container .w-e-up-img-container .w-e-up-btn:hover { color: #333;}.w-e-text-container { position: relative;}.w-e-text-container .w-e-progress { position: absolute; background-color: #1e88e5; bottom: 0; left: 0; height: 1px;}.w-e-text { padding: 0 10px; overflow-y: scroll;}.w-e-text p,.w-e-text h1,.w-e-text h2,.w-e-text h3,.w-e-text h4,.w-e-text h5,.w-e-text table,.w-e-text pre { margin: 10px 0; line-height: 1.5;}.w-e-text ul,.w-e-text ol { margin: 10px 0 10px 20px;}.w-e-text blockquote { display: block; border-left: 8px solid #d0e5f2; padding: 5px 10px; margin: 10px 0; line-height: 1.4; font-size: 100%; background-color: #f1f1f1;}.w-e-text code { display: inline-block; *display: inline; *zoom: 1; background-color: #f1f1f1; border-radius: 3px; padding: 3px 5px; margin: 0 3px;}.w-e-text pre code { display: block;}.w-e-text table { border-top: 1px solid #ccc; border-left: 1px solid #ccc;}.w-e-text table td,.w-e-text table th { border-bottom: 1px solid #ccc; border-right: 1px solid #ccc; padding: 3px 5px;}.w-e-text table th { border-bottom: 2px solid #ccc; text-align: center;}.w-e-text:focus { outline: none;}.w-e-text img { cursor: pointer;}.w-e-text img:hover { box-shadow: 0 0 5px #333;}',document.getElementsByTagName("HEAD").item(0).appendChild(Z),window.wangEditor||j});
  4 +//# sourceMappingURL=wangEditor.min.js.map
  1 +<div class="info-content">
  2 + <div class="info-content-body">
  3 + <div class="content-body-info">
  4 + <div class="info-item">
  5 + 通知信息:monitor_xjic
  6 + </div>
  7 + <div class="info-item">
  8 + 通知人清单:monitor_xjic
  9 + </div>
  10 +
  11 + </div>
  12 + </div>
  13 +</div>
  14 +<div class="info-content">
  15 + <div class="info-content-body">
  16 + <div class="content-body-info">
  17 + <div class="info-item-statistics">
  18 + 统计信息:该告警历史上出现了{{statisticsData.alarmCnt?statisticsData.alarmCnt:0}}次,
  19 + 平均持续时长{{statisticsData.continueTimeAvg?statisticsData.continueTimeAvg:0}}s,
  20 + 最大持续时长{{statisticsData.continueTimeMax?statisticsData.continueTimeMax:0}}s,
  21 + 最小持续时长{{statisticsData.continueTimeMin?statisticsData.continueTimeMin:0}}s
  22 + </div>
  23 + </div>
  24 + </div>
  25 +</div>
  26 +<!-- 告警信息处理审核时有-->
  27 +<div class="info-content">
  28 + <div class="info-content-body">
  29 + <div class="content-body-info">
  30 + <div class="info-item">
  31 + 同类型告警处理过程:monitor_xjic
  32 + </div>
  33 + </div>
  34 + </div>
  35 +</div>
  1 +export default {
  2 + name: 'noticeStatistics',
  3 + template: '',
  4 + props: {
  5 + alarmId: {
  6 + type: String,
  7 + default: ''
  8 + }
  9 + },
  10 + data() {
  11 + return {
  12 + }
  13 + },
  14 + setup(props, {attrs, slots, emit}) {
  15 + const {proxy} = Vue.getCurrentInstance();
  16 + let statisticsData=Vue.ref('');
  17 + let getStatisticsData=()=>{
  18 + proxy.$http.post(`/api-web/bAlarmManage/alarm/statis`, {alarmId:props.alarmId}, function (res) {
  19 + if (res && res.code == 0) {
  20 + statisticsData.value=res.object
  21 + }else{
  22 + proxy.$global.showMsg(res.msg, 'warning');
  23 + }
  24 + })
  25 + }
  26 + /**
  27 + * 挂载完
  28 + */
  29 + Vue.onMounted(() => {
  30 +
  31 + })
  32 + return {
  33 + getStatisticsData,
  34 + statisticsData
  35 + }
  36 + }
  37 +}
1 <div class="editor"> 1 <div class="editor">
2 <div ref="toolbar" class="editor_toolbar"> 2 <div ref="toolbar" class="editor_toolbar">
3 </div> 3 </div>
4 - <div ref="editor" class="editor_text"> 4 + <div ref="editor" :class="['editor_text',{'disabled_style':isDisabled==0}]">
5 </div> 5 </div>
6 </div> 6 </div>
1 /** 1 /**
2 - * 分页表格组件 2 + * wangEditor富文本组件
3 */ 3 */
4 export default { 4 export default {
5 name: 'wangEditorComponent', 5 name: 'wangEditorComponent',
@@ -17,6 +17,14 @@ export default { @@ -17,6 +17,14 @@ export default {
17 isClear: { 17 isClear: {
18 type: Boolean, 18 type: Boolean,
19 default: false 19 default: false
  20 + },
  21 + isDisabled:{//是否禁用
  22 + type:Boolean,
  23 + default:true
  24 + },
  25 + repositoryInfo:{//引用知识库的文本
  26 + type:String,
  27 + default:''
20 } 28 }
21 }, 29 },
22 data() { 30 data() {
@@ -37,13 +45,24 @@ export default { @@ -37,13 +45,24 @@ export default {
37 if (val !== editor.value.txt.html()) { 45 if (val !== editor.value.txt.html()) {
38 editor.value.txt.html(val) 46 editor.value.txt.html(val)
39 } 47 }
40 - } 48 + },
  49 + repositoryInfo:{
  50 + handler(val){
  51 + this.setValue(val);
  52 + },
  53 + deep:true
  54 + },
41 //value为编辑框输入的内容,这里我监听了一下值,当父组件调用得时候,如果给value赋值了,子组件将会显示父组件赋给的值 55 //value为编辑框输入的内容,这里我监听了一下值,当父组件调用得时候,如果给value赋值了,子组件将会显示父组件赋给的值
  56 + isDisabled: function(val) {
  57 + // 禁用编辑功能
  58 + this.setDisabled(val)
  59 + }
42 }, 60 },
43 setup(props, {attrs, slots, emit}) { 61 setup(props, {attrs, slots, emit}) {
44 const {proxy} = Vue.getCurrentInstance(); 62 const {proxy} = Vue.getCurrentInstance();
45 let editor=Vue.ref(null); 63 let editor=Vue.ref(null);
46 let info_=Vue.ref(null); 64 let info_=Vue.ref(null);
  65 + let elemText=Vue.ref(null);
47 Vue.watch(props.value, (newVal) => { 66 Vue.watch(props.value, (newVal) => {
48 67
49 }) 68 })
@@ -54,6 +73,24 @@ export default { @@ -54,6 +73,24 @@ export default {
54 seteditor(); 73 seteditor();
55 editor.value.txt.html(props.value) 74 editor.value.txt.html(props.value)
56 }) 75 })
  76 + //引用知识库文本
  77 + let editorTxt=Vue.ref(null);
  78 + let setValue=(val)=>{
  79 + if (val !== editorTxt.value.html()) {
  80 + editorTxt.value.html(val)
  81 + }
  82 + }
  83 + //禁用编辑功能
  84 + let setDisabled=(val)=>{
  85 + let value=true;
  86 + if(val==0){
  87 + value=false;
  88 + }else{
  89 + value=true;
  90 + }
  91 + elemText.value.attr('contenteditable',value)
  92 + }
  93 +
57 let seteditor=()=> { 94 let seteditor=()=> {
58 editor.value = new wangEditor(proxy.$refs.toolbar, proxy.$refs.editor) 95 editor.value = new wangEditor(proxy.$refs.toolbar, proxy.$refs.editor)
59 editor.value.customConfig.uploadImgShowBase64 = false // base 64 存储图片 96 editor.value.customConfig.uploadImgShowBase64 = false // base 64 存储图片
@@ -163,18 +200,24 @@ export default { @@ -163,18 +200,24 @@ export default {
163 // } 200 // }
164 } 201 }
165 } 202 }
166 - editor.value.customConfig.onchange = (html) => { 203 + editor.value.customConfig.onchange = (html,text) => {
167 info_.value = html // 绑定当前逐渐地值 204 info_.value = html // 绑定当前逐渐地值
168 emit('change', info_.value) // 将内容同步到父组件中 205 emit('change', info_.value) // 将内容同步到父组件中
169 -  
170 - emit('changetext',editor.value.txt.text()) 206 + emit('changetext',text)
171 } 207 }
172 // 创建富文本编辑器 208 // 创建富文本编辑器
173 editor.value.create() 209 editor.value.create()
  210 + elemText.value=editor.value.$textElem;//.attr('contenteditable');
  211 + editorTxt.value=editor.value.txt;
  212 +
174 } 213 }
175 return { 214 return {
176 seteditor, 215 seteditor,
177 editor, 216 editor,
  217 + setDisabled,
  218 + setValue,
  219 + elemText,
  220 + editorTxt,
178 info_ 221 info_
179 } 222 }
180 } 223 }
@@ -44,7 +44,9 @@ Promise.all([ @@ -44,7 +44,9 @@ Promise.all([
44 //时间范围组件 44 //时间范围组件
45 .component('cm-date-range-influx', Vue.defineAsyncComponent(() => myImport('components/common/dateRange/indexInflux'))) 45 .component('cm-date-range-influx', Vue.defineAsyncComponent(() => myImport('components/common/dateRange/indexInflux')))
46 //富文本框组件 46 //富文本框组件
47 - .component('cm-wang-editor', Vue.defineAsyncComponent(() => myImport('components/common/wangEditorComponent/index'))); 47 + .component('cm-wang-editor', Vue.defineAsyncComponent(() => myImport('components/common/wangEditorComponent/index')))
  48 + //告警通知统计信息
  49 + .component('cm-notice-statistics', Vue.defineAsyncComponent(() => myImport('components/common/noticeStatistics/index')));
48 50
49 51
50 // // 自定义指令 52 // // 自定义指令
@@ -38,10 +38,10 @@ @@ -38,10 +38,10 @@
38 <span class="icon-bg"> 38 <span class="icon-bg">
39 <i class="el-icon-delete" title="删除" @click="handleDelete(scope.row)"></i> 39 <i class="el-icon-delete" title="删除" @click="handleDelete(scope.row)"></i>
40 </span> 40 </span>
41 - <span class="icon-bg"> 41 + <span class="icon-bg">
42 <i class="el-icon-edit-outline" title="修改" @click="handleUpdate(scope.row)"></i> 42 <i class="el-icon-edit-outline" title="修改" @click="handleUpdate(scope.row)"></i>
43 </span> 43 </span>
44 - <span class="icon-bg"> 44 + <span class="icon-bg">
45 <i class="el-icon-view" title="预览" @click="preview(scope.row)"></i> 45 <i class="el-icon-view" title="预览" @click="preview(scope.row)"></i>
46 </span> 46 </span>
47 </div> 47 </div>
@@ -68,10 +68,10 @@ @@ -68,10 +68,10 @@
68 68
69 69
70 <el-form-item label="类型" prop="type"> 70 <el-form-item label="类型" prop="type">
71 - <el-radio v-model="ajConfigFrom.type" label="0" size="large">菜单</el-radio>  
72 - <el-radio v-model="ajConfigFrom.type" label="1" size="large">按钮</el-radio>  
73 - <el-radio v-model="ajConfigFrom.type" label="2" size="large">详情页</el-radio>  
74 -<!-- <div style="height: 15px; color: darkgrey">说明:参数中间用'&'拼接</div>--> 71 + <el-radio v-model="ajConfigFrom.type" label="0" size="large">菜单</el-radio>
  72 + <el-radio v-model="ajConfigFrom.type" label="1" size="large">按钮</el-radio>
  73 + <el-radio v-model="ajConfigFrom.type" label="2" size="large">详情页</el-radio>
  74 + <!-- <div style="height: 15px; color: darkgrey">说明:参数中间用'&'拼接</div>-->
75 </el-form-item> 75 </el-form-item>
76 76
77 77
@@ -126,7 +126,7 @@ @@ -126,7 +126,7 @@
126 <el-collapse-item name="1"> 126 <el-collapse-item name="1">
127 <template #title> 127 <template #title>
128 示例:&resId=#resId&access_token=#access_token 128 示例:&resId=#resId&access_token=#access_token
129 - </el-icon> 129 + </el-icon>
130 </template> 130 </template>
131 <div style="font-size: 12px;text-align: left">可配置字段:</div> 131 <div style="font-size: 12px;text-align: left">可配置字段:</div>
132 <el-descriptions :column="2" size="mini" border > 132 <el-descriptions :column="2" size="mini" border >
@@ -10,7 +10,7 @@ export default { @@ -10,7 +10,7 @@ export default {
10 id: [ 10 id: [
11 { 11 {
12 required: true, 12 required: true,
13 - message: '请填写文档编号!', 13 + message: '请填写配置编号!',
14 trigger: 'blur', 14 trigger: 'blur',
15 } 15 }
16 ], 16 ],
@@ -36,7 +36,6 @@ export default { @@ -36,7 +36,6 @@ export default {
36 setup(props, {attrs, slots, emit}){ 36 setup(props, {attrs, slots, emit}){
37 const {proxy} = Vue.getCurrentInstance(); 37 const {proxy} = Vue.getCurrentInstance();
38 let height = Vue.ref(window.innerHeight - 10); 38 let height = Vue.ref(window.innerHeight - 10);
39 -  
40 let configs = Vue.ref([{ 39 let configs = Vue.ref([{
41 name:'resId', 40 name:'resId',
42 desc:'资源ID(资源列表可用)' 41 desc:'资源ID(资源列表可用)'
@@ -191,7 +190,7 @@ export default { @@ -191,7 +190,7 @@ export default {
191 msg = "删除失败"; 190 msg = "删除失败";
192 } 191 }
193 if (row.type==0){ 192 if (row.type==0){
194 - history.go(0); 193 + history.go(0);
195 } 194 }
196 proxy.$global.showMsg(msg); 195 proxy.$global.showMsg(msg);
197 getDataList(); 196 getDataList();
@@ -339,7 +338,8 @@ export default { @@ -339,7 +338,8 @@ export default {
339 menuList, 338 menuList,
340 menuOptions, 339 menuOptions,
341 getResType, 340 getResType,
342 - configs } 341 + configs
  342 + }
343 } 343 }
344 344
345 } 345 }
1 -<div class="container" :style="{'height':height+'px','max-height':height+'px'}"> 1 +<div class="container" :style="{'height':height+'px','max-height':height+'px','background':'#fff'}">
2 <iframe :src="getSrc" width="100%" height="100%" ></iframe> 2 <iframe :src="getSrc" width="100%" height="100%" ></iframe>
3 </div> 3 </div>
@@ -12,8 +12,8 @@ export default { @@ -12,8 +12,8 @@ export default {
12 let param={ 12 let param={
13 id:ajConfig 13 id:ajConfig
14 } 14 }
15 - let params = '';  
16 - let designPage = ''; 15 + let params='';
  16 + let designPage='';
17 proxy.$http.get(`/api-web/ajConfig/findOneById`, param, function (res) { 17 proxy.$http.get(`/api-web/ajConfig/findOneById`, param, function (res) {
18 if (res && res.success == true && res.object) { 18 if (res && res.success == true && res.object) {
19 // 参数替换 19 // 参数替换
@@ -26,7 +26,7 @@ export default { @@ -26,7 +26,7 @@ export default {
26 } 26 }
27 27
28 const replaceParams = (params) => { 28 const replaceParams = (params) => {
29 - return params.replace(/#lgn/g,localStorage.getItem('lgn')).replace(/#user_id/g,sessionStorage.getItem('user_id')).replace(/#access_token/g,localStorage.getItem("access_token")) 29 + return params.replace(/#lgn/g,localStorage.getItem('lgn')).replace(/#user_id/g,sessionStorage.getItem('access_token')).replace(/#access_token/g,localStorage.getItem("access_token"))
30 } 30 }
31 31
32 const getParamValue = (code) => { 32 const getParamValue = (code) => {
@@ -36,15 +36,22 @@ export default { @@ -36,15 +36,22 @@ export default {
36 // 获取localStorage 36 // 获取localStorage
37 } 37 }
38 38
39 -  
40 // 挂载完 39 // 挂载完
41 Vue.onMounted(() => { 40 Vue.onMounted(() => {
42 getUrl(); 41 getUrl();
  42 + //start lsq 监听跨域iframe子页面向父页面发送数据(子页面点击名称进入详情页) 2022-03-15
  43 + window.addEventListener('message',function(e){
  44 + if(e.data.type=='detail'){
  45 + proxy.$global.openDetail(e.data.data.resId, e.data.data.resType, proxy);
  46 + }else{
  47 + }
  48 + })
  49 + //end lsq 2022-03-15
43 }) 50 })
44 51
45 return { 52 return {
46 height, 53 height,
47 - getSrc 54 + getSrc,
48 } 55 }
49 } 56 }
50 } 57 }
@@ -2,39 +2,188 @@ @@ -2,39 +2,188 @@
2 <div class="alarmsClearEditor-info"> 2 <div class="alarmsClearEditor-info">
3 <div class="info-title"> 3 <div class="info-title">
4 <span>告警信息</span> 4 <span>告警信息</span>
5 - <span>告警编号:202203210001</span> 5 + <span>告警编号:{{alarmInfo.alarmNo}}</span>
6 </div> 6 </div>
7 <div class="info-content"> 7 <div class="info-content">
8 <div class="info-content-body"> 8 <div class="info-content-body">
9 <div class="content-title">告警主体</div> 9 <div class="content-title">告警主体</div>
10 <div class="content-body-info"> 10 <div class="content-body-info">
11 <div class="info-item"> 11 <div class="info-item">
12 - 资源名称:monitor_xjic 12 + 资源名称:{{alarmInfo.resName}}
13 </div> 13 </div>
14 <div class="info-item"> 14 <div class="info-item">
15 - 资源名称:monitor_xjic 15 + 资源类型:{{alarmInfo.resType}}
16 </div> 16 </div>
17 <div class="info-item"> 17 <div class="info-item">
18 - 资源名称:monitor_xjic 18 + 所属业务系统:{{alarmInfo.busTypeName}}
19 </div> 19 </div>
20 <div class="info-item"> 20 <div class="info-item">
21 - 资源名称:monitor_xjic 21 + IP地址:{{alarmInfo.ip}}
22 </div> 22 </div>
23 <div class="info-item"> 23 <div class="info-item">
24 - 资源名称:monitor_xjic 24 + 指标名称:{{alarmInfo.kpiName}}
25 </div> 25 </div>
26 <div class="info-item"> 26 <div class="info-item">
27 - 资源名称:monitor_xjic 27 + flag名称:{{alarmInfo.flag}}
28 </div> 28 </div>
29 </div> 29 </div>
30 </div> 30 </div>
31 </div> 31 </div>
  32 + <div class="info-content">
  33 + <div class="info-content-body">
  34 + <div class="content-title">告警信息</div>
  35 + <div class="content-body-info">
  36 + <div class="info-item">
  37 + 告警级别:<sapn>{{alarmInfo.alarmLevel==1?'一般':alarmInfo.alarmLevel==2?'重要':'严重'}}</sapn>
  38 + </div>
  39 + <div class="info-item">
  40 + 首次时间:{{alarmInfo.alarmTime}}
  41 + </div>
  42 + <div class="info-item">
  43 + 最后一次时间:{{alarmInfo.updateTime}}
  44 + </div>
  45 + <div class="info-item" v-if="alarmInfo.alarmTypeCustom!='active'">
  46 + 消除人:{{alarmInfo.clearUserId}}
  47 + </div>
  48 + <div class="info-item" v-if="alarmInfo.alarmTypeCustom!='active'">
  49 + 消除原因:{{alarmInfo.clearReason}}
  50 + </div>
  51 + <div class="info-item" v-if="alarmInfo.alarmTypeCustom!='active'">
  52 + 消除时间:{{alarmInfo.clearTime}}
  53 + </div>
  54 + <div class="info-item">
  55 + 告警次数:{{alarmInfo.alarmRepeatCnt?alarmInfo.alarmRepeatCnt:0}}
  56 + </div>
  57 + <div class="info-item">
  58 + 实际告警值:{{alarmInfo.kpiValue}}
  59 + </div>
  60 +
  61 + </div>
  62 + </div>
  63 + </div>
  64 + <!--通知统计信息组件-->
  65 + <cm-notice-statistics :alarmId="alarmInfo.id"></cm-notice-statistics>
  66 + </div>
  67 + <div class="alarmsRadio" v-if="alarmInfo.alarmTypeCustom=='active'">
  68 + <div class="alarmNotice-title">消除原因</div>
  69 + <div class="alarmsNotice">
  70 + <div class="alarmsDes"><el-input v-model="reason" placeholder="消除原因" /></div>
  71 + <div class="alarmsNotice-radio">
  72 + <span class="radioLabel">是否通知:</span>
  73 + <el-radio-group v-model="noticeFlag">
  74 + <el-radio :label="true"></el-radio>
  75 + <el-radio :label="false"></el-radio>
  76 + </el-radio-group>
  77 + </div>
  78 +
  79 + </div>
  80 +
32 </div> 81 </div>
33 <div class="alarmsClearEditor-scheme"> 82 <div class="alarmsClearEditor-scheme">
34 - <cm-wang-editor v-model="detail" :isClear="isClear" @change="change" @changetext="changetext"></cm-wang-editor> 83 + <div class="scheme-title-per">
  84 + <span class="title-handle-per">处理方案</span>
  85 + <span class="title-handle-per" v-if="isExamine">处理人:{{loginName}}</span>
  86 + <span class="title-handle-per" v-if="isExamine">时间:{{alarmInfo.dateTime}}</span>
  87 +
  88 + <el-tooltip :content="'是否入知识库'" placement="top" v-if="!isExamine">
  89 + <el-switch
  90 + v-model="repositoryInto"
  91 + active-value="1"
  92 + inactive-value="0"
  93 + />
  94 + </el-tooltip>
  95 + </div>
  96 + <div class="scheme-title">
  97 + <span class="title-handle-per" v-if="!isExamine">
  98 + <!--v-model="cascaderValue"
  99 + :options="cascaderOptions"-->
  100 + <el-cascader
  101 +
  102 + :props="propsTrigger"
  103 + @change="handleChange"
  104 + placeholder="搜索选择内容"
  105 + filterable
  106 + clearable
  107 + />
  108 + </span>
  109 + <span class="title-handle-per" v-if="!isExamine">审批人:<span class="approve-name">{{approverLabel}} <i class="el-icon-edit-outline update-icon" v-if="!isExamine" @click="showUserDialog(true)" ></i></span>
  110 +<!-- <el-button v-if="!isExamine" type="primary" @click="showUserDialog(true)" size="small">选择审批人</el-button>-->
  111 + </span>
  112 + <span class="title-handle-per" v-if="!isExamine">时间:{{dateTime}}</span>
  113 + </div>
  114 + <cm-wang-editor v-if="!isExamine" v-model="detail" :repositoryInfo="repositoryInfo" :isDisabled="repositoryInto" :isClear="isClear" @change="change" @changetext="changetext"></cm-wang-editor>
  115 + <div class="editor_detail" v-if="isExamine" >de3333
  116 + <div v-html="detail"></div>
  117 + </div>
  118 + </div>
  119 + <div class="detail_comments" v-if="isExamine">
  120 + <div class="detail_comments_title">审核意见</div>
  121 +
  122 + <el-input
  123 + v-model="opinion"
  124 + type="textarea"
  125 + :rows="5"
  126 + placeholder="此处输入审核意见"
  127 + />
  128 + </div>
  129 + <div class="alarmsClearTag" v-if="repositoryInto==1 && !isExamine">
  130 + <div class="tag-keyword">
  131 + 关键字:
  132 + <el-tag
  133 + v-for="tag in dynamicTags"
  134 + :key="tag"
  135 + class="mx-1"
  136 + closable
  137 + :disable-transitions="false"
  138 + @close="handleClose(tag)"
  139 + >
  140 + {{ tag }}
  141 + </el-tag>
  142 + <el-input
  143 + v-if="inputVisible"
  144 + ref="InputRef"
  145 + v-model="inputValue"
  146 + class="ml-1 w-20"
  147 + size="small"
  148 + @keyup.enter="handleInputConfirm"
  149 + @blur="handleInputConfirm"
  150 + />
  151 + <el-button v-else class="button-new-tag ml-1" size="small" @click="showInput">
  152 + + New Tag
  153 + </el-button>
  154 + </div>
  155 +<!-- <div class="tag-keyword-get"><el-button type="primary" @click="getKeyword" size="small">关键字提取</el-button></div>-->
  156 +
  157 + </div>
  158 +
  159 + <div class="alarmsCover" v-if="repositoryId && repositoryInto==1 && !isExamine">
  160 + <span class="radioLabel">引用是否覆盖:</span>
  161 + <el-radio-group v-model="citeCover">
  162 + <el-radio :label="true"></el-radio>
  163 + <el-radio :label="false"></el-radio>
  164 + </el-radio-group>
35 </div> 165 </div>
36 <div class="alarmsClearEditor-btn"> 166 <div class="alarmsClearEditor-btn">
37 - <el-button @click="saveDetail">保存</el-button> 167 + <el-button type="primary" @click="saveDetail(0)" v-if="!isExamine" size="small">存为草稿</el-button>
  168 + <el-button type="primary" @click="saveDetail(1)" v-if="!isExamine" size="small">确认</el-button>
  169 + <el-button type="primary" @click="saveDetail(2)" v-if="isExamine" size="small">通过</el-button>
  170 + <el-button type="primary" @click="saveDetail(3)" v-if="isExamine" size="small">不通过</el-button>
  171 + <el-button @click="cancleBtn" size="small">取消</el-button>
38 </div> 172 </div>
  173 + <cm-userright title="审批人(不支持多人,多选默认取第一个人)" :titles="titles" :showRole="false" :showGroup="false" :showDialogVisible="showUserDialogVisible" :selectedArr="userFileRight" :userArr="userList" :isUser="false" :showOrg="false" @callback="selectUser"
  174 + @hideDialog="showUserDialog"></cm-userright>
  175 + <!--关键字提取列表-->
  176 + <cm-dialog :title="title" width="60%" :showDialogVisible="dialogVisible" :showFooter="true" @okfunc="okfunc" @hidedialog="closeDetail" :showOkBtn="true">
  177 + <template v-slot>
  178 + <cm-table-page :columns="columns" :dataList="dataList" @loaddata="getPage" :showIndex="true"
  179 + :showBorder="true" :showSelection="true" @selectionChange="selectionChange"
  180 + :showPage="false" :height="height - 100">
  181 + <template #default="{row,prop,column}">
  182 + <el-input v-if="prop==keyword" v-model="row.keyword" />
  183 + </template>
  184 + </cm-table-page>
  185 +
  186 + </template>
  187 + </cm-dialog>
39 </div> 188 </div>
40 189
@@ -2,7 +2,12 @@ export default { @@ -2,7 +2,12 @@ export default {
2 name: 'alarmsClearEditor', 2 name: 'alarmsClearEditor',
3 template: '', 3 template: '',
4 components: {}, 4 components: {},
5 - props:[], 5 + props: {
  6 + isExamine: {
  7 + type: Boolean,
  8 + default: false
  9 + },
  10 + },
6 data () { 11 data () {
7 return { 12 return {
8 } 13 }
@@ -13,12 +18,16 @@ export default { @@ -13,12 +18,16 @@ export default {
13 let test=Vue.ref(''); 18 let test=Vue.ref('');
14 let isClear=Vue.ref(false); 19 let isClear=Vue.ref(false);
15 let detail=Vue.ref(''); 20 let detail=Vue.ref('');
16 - let detailHtmlText=Vue.ref('');  
17 let detailText=Vue.ref(''); 21 let detailText=Vue.ref('');
18 - // 挂载完  
19 - Vue.onMounted(() => { 22 + //审批人
  23 + let approver=Vue.ref('');
  24 + let approverName=Vue.ref('admin');
  25 + let approverLabel=Vue.ref('admin');
  26 + //操作人
  27 + let loginName=Vue.ref('');
  28 + let options=Vue.ref([{value:'001',name:'admin'},{value:'002',name:'root'}])
  29 + let timer=Vue.ref(null);
20 30
21 - })  
22 //富文本带标签内容 31 //富文本带标签内容
23 let change=(val)=> { 32 let change=(val)=> {
24 detail.value=val; 33 detail.value=val;
@@ -28,15 +37,397 @@ export default { @@ -28,15 +37,397 @@ export default {
28 detailText.value=val; 37 detailText.value=val;
29 } 38 }
30 //保存富文本内容 39 //保存富文本内容
31 - let saveDetail=()=>{  
32 - console.log("detailHtmlText",detail.value)  
33 - console.log("detailText",detailText.value) 40 + let repositoryInto=Vue.ref('1');//是否入知识库
  41 + let repositoryId=Vue.ref('');//知识库id
  42 + let citeCover=Vue.ref(false);//是否覆盖
  43 + let reason=Vue.ref('');//简要说明
  44 + let alarmType=Vue.ref('active');//告警类型
  45 + let opinion=Vue.ref('');//审核意见
  46 + let saveDetail=(val)=>{
  47 + let dynamicTagsStr=dynamicTags.value.join(',');
  48 + let pcontent=detail.value;
  49 + if(repositoryInto.value==0){
  50 + pcontent='';
  51 + detailText.value=''
  52 + }
  53 + let params={
  54 + alarmId:alarmInfo.id,
  55 + pcontent:pcontent,//富文本详情
  56 + status:val,//存储状态 0 草稿,1 审批中 2已审批 3驳回
  57 + approver:approverName.value,//审批人
  58 + // dateTime:dateTime.value,//当前时间
  59 + keyword:dynamicTagsStr,//关键字
  60 + aralmid:alarmInfo.id,//告警id
  61 + // manageTime:dateTime.value,//处理时间
  62 + // manageName:loginName.value,//处理人
  63 + repositoryInto:repositoryInto.value,//是否入知识库 1入,0不入
  64 + citeCover:citeCover.value?1:0,//引用是否覆盖 0 未覆盖 1已覆盖
  65 + reason:reason.value,//消除原因
  66 + noticeFlag:noticeFlag.value?1:0,//是否通知
  67 + alarmType:alarmInfo.alarmTypeCustom,//告警类型,active活动告警,his历史告警
  68 +
  69 + }
  70 + if(opinion.value){
  71 + params.opinion=opinion.value;//审批意见
  72 + }
  73 + if(repositoryId.value){
  74 + params.repositoryId=repositoryId.value;//引用知识库id
  75 +
  76 + }
  77 + proxy.$http.post(`/api-web/bAlarmManage/clearAlarm`, params, function (res) {
  78 + if (res && res.code == 0) {
  79 + proxy.$global.showMsg(res.msg, 'success');
  80 + cancleBtn();
  81 + }else{
  82 + proxy.$global.showMsg(res.msg, 'warning');
  83 + }
  84 + })
  85 + }
  86 + //取消按钮
  87 + let cancleBtn=()=>{
  88 + window.parent.layer.closeAll();
  89 + }
  90 +
  91 + //关键字标签
  92 + const inputValue = Vue.ref('')
  93 + const dynamicTags = Vue.ref(['服务器', '虚拟机'])
  94 + const inputVisible = Vue.ref(false)
  95 +
  96 + //tag标签
  97 + const handleClose = (tag) => {
  98 + dynamicTags.value.splice(dynamicTags.value.indexOf(tag), 1)
  99 + }
  100 +
  101 + const showInput = () => {
  102 + inputVisible.value = true
  103 + setTimeout(function (){
  104 + proxy.$refs.InputRef.focus()
  105 + },100)
  106 + }
  107 +
  108 + const handleInputConfirm = () => {
  109 + if (inputValue.value) {
  110 + dynamicTags.value.push(inputValue.value)
  111 + }
  112 + inputVisible.value = false
  113 + inputValue.value = ''
  114 + }
  115 + //提取关键字
  116 + let getKeyword=()=>{
  117 + if(!detailText.value){
  118 + proxy.$global.showMsg('请输入处理方案!', 'warning');
  119 +
  120 + }else{
  121 +
  122 + }
  123 + dialogVisible.value=true;
  124 + }
  125 + //关键字弹框列表
  126 + let title=Vue.ref("关键字弹框");
  127 + let dialogVisible=Vue.ref(false);
  128 + let height = Vue.ref(window.innerHeight - 20);
  129 + let dataList=Vue.ref([{keyword:'服务器'},{keyword:'虚拟机'}]);
  130 + let columns=Vue.ref([{
  131 + prop: 'keyword',
  132 + label: '关键字名称',
  133 + sortable: true,
  134 + align: 'left',
  135 + /*click: function (row) {
  136 + // getFile(row);
  137 + },
  138 + render: function (row) {
  139 + return `<input v-model="${row.keyword}" placeholder="" />`
  140 + }*/
  141 + }])
  142 +
  143 + let closeDetail=(val)=>{
  144 + dialogVisible.value=val;
  145 + dynamicTagsAppend.value=[];
  146 + }
  147 + let okfunc=()=>{
  148 + if(dynamicTagsAppend.value.length>0){
  149 + let arr=dynamicTagsAppend.value;
  150 + arr.map(item=>{
  151 + dynamicTags.value.push(item.keyword);
  152 + })
  153 + dialogVisible.value=false;
  154 + }else{
  155 + proxy.$global.showMsg('请选择关键字!', 'warning');
  156 + }
  157 +
  158 + }
  159 + //获取所有的关键字列表
  160 + let getPage=()=>{
  161 +
  162 + }
  163 + //弹框选择关键字
  164 + let dynamicTagsAppend=Vue.ref([]);
  165 + let selectionChange=(val)=>{
  166 + dynamicTagsAppend.value=val;
  167 + }
  168 + // 审批人列表
  169 + let titles=['选择列表','已选择列表'];
  170 + let showUserDialogVisible = Vue.ref(false);
  171 + let userFileRight = Vue.ref([]);//已选择的用户
  172 + //获取所有审批人
  173 + let userList = Vue.ref([]);
  174 + //获取所有审批人数据
  175 + let getUserList=()=>{
  176 + proxy.userList = [];
  177 +
  178 + // 查询信息中心的用户
  179 + proxy.$http.get("/api-user/org/getOrgUserList?orgCode=xxzx", {}, function (res) {
  180 + if (res && res.data) {
  181 + res.data.map(function (v) {
  182 + let desc = [];
  183 + let orgName = v.orgName;
  184 + let nickname = v.nickname;
  185 + if (orgName) {
  186 + desc.push(orgName);
  187 + }
  188 + if (nickname) {
  189 + desc.push(nickname);
  190 + }
  191 +
  192 + proxy.userList.push({
  193 + value: v.username,
  194 + type:'USER',
  195 + desc: `${desc.join(' / ')}`,
  196 + props : v
  197 + })
  198 + });
  199 +
  200 + }
  201 + },function (){},false)
  202 + }
  203 + let getCheckedFile = () => {
  204 + let arr = dataList.value.filter(function (v) {
  205 + if (v.checked != undefined && v.checked == true) {
  206 + return v;
  207 + }
  208 + })
  209 +
  210 + if (arr.length == 0) {
  211 + proxy.$global.showMsg('请选择需要操作的文档!', 'warning');
  212 + return;
  213 + }
  214 +
  215 + if (arr.length == 1) {
  216 + // 查询文件的权限
  217 + proxy.$http.get(`/inspection-report/file/auth/getGrant`, {docId: arr[0].id}, function (res) {
  218 + if (res && res.code == 0) {
  219 + let map = res.map;
  220 + if (map) {
  221 + let all = map.allIds;
  222 + userFileRight.value = all;
  223 + }
  224 + }
  225 + })
  226 + } else {
  227 + // 多文件不查询权限
  228 + userFileRight.value = [];
  229 + }
  230 + return arr;
  231 + }
  232 + // 用户授权弹框
  233 + let showUserDialog = (flg) => {
  234 + if (flg) {
  235 + // let arr = getCheckedFile();
  236 + // if (arr && arr.length > 0) {
  237 + // showUserDialogVisible.value = flg;
  238 + // }
  239 + // getUserList();
  240 + showUserDialogVisible.value = flg;
  241 +
  242 + } else {
  243 + showUserDialogVisible.value = flg;
  244 + }
  245 + }
  246 + //获取选择的用户
  247 + let selectUser = (userObj) => {
  248 + let userIds = userObj.user.map(function (v) {
  249 + return v.username;
  250 + });
  251 + let userNames = userObj.user.map(function (v) {
  252 + return v.nickname;
  253 + });
  254 + console.log("userIds",userObj)
  255 + approverName.value=userIds[0];
  256 + approverLabel.value=userNames[0];
  257 +
  258 + }
  259 +
  260 + //获取当前时间
  261 + let dateTime=Vue.ref('');
  262 + let getDateTime=()=>{
  263 + let that = this
  264 + // 获取当前系统时间
  265 + let myDate = new Date();
  266 + dateTime.value = myDate.getFullYear() + '-' + timeFormat(myDate.getMonth() + 1 + '') + '-' + timeFormat(myDate.getDate() + '') + ' ' + timeFormat(myDate.getHours() + '') + ':' + timeFormat(myDate.getMinutes() + '') + ':' + timeFormat(myDate.getSeconds() + '');
  267 + }
  268 + let timeFormat= (number)=> {
  269 + return number.length == 1 ? ('0' + number) : number
  270 + }
  271 + //获取告警信息
  272 + let alarmInfo=Vue.ref({});
  273 + let getAlarmInfo=()=>{
  274 + if(props.isExamine){
  275 + //审核告警消除
  276 + }else {
  277 + alarmInfo.value=proxy.$route.query;
  278 + }
  279 + getUserByToken();
  280 + getUser();
34 } 281 }
  282 + //级联选择器
  283 + const cascaderValue = Vue.ref([])
35 284
  285 + const propsTrigger = {
  286 + lazy: true,
  287 + lazyLoad(node, resolve) {
  288 + console.log("node",node,node.value,node.level)
  289 + const { level } = node
  290 + console.log("level",level,cascaderValue.value)
  291 + setTimeout(() => {
  292 + // const nodes = Array.from({ length: level + 1 }).map((item) => ({
  293 + // value: ++id,
  294 + // label: `Option - ${id}`,
  295 + // leaf: level >= 2,
  296 + // }))
  297 + //动态获取关键字相关的方案文本
  298 + cascaderOptions.value=[{
  299 + value: 'v1',
  300 + label: 'Disciplines',
  301 + leaf: level >=1,
  302 + },{
  303 + value: 'v2',
  304 + label: 'll',
  305 + leaf: level >=1,
  306 + }]
  307 + // Invoke `resolve` callback to return the child nodes data and indicate the loading is finished.
  308 + resolve(cascaderOptions.value)
  309 + }, 500)
  310 + },
  311 + }
  312 + // {
  313 + // expandTrigger: 'hover',
  314 + // }
  315 + //引用知识库的处理方案
  316 + let repositoryInfo=Vue.ref('');
  317 + const handleChange = (value) => {
  318 + cascaderValue.value=value;
  319 + if(cascaderValue.value && cascaderValue.value.length>1){
  320 + repositoryId.value=cascaderValue.value[1];
  321 + let arr=cascaderOptions.value;
  322 + arr.map(item=>{
  323 + if(item.value==cascaderValue.value[1]){
  324 + repositoryInfo.value=item.label;
  325 +
  326 + }
  327 + })
  328 + }else{
  329 + repositoryId.value=''
  330 + }
  331 + }
  332 +
  333 + const cascaderOptions = [
  334 + {
  335 + value: 'guide',
  336 + label: 'Guide',
  337 + /*children: [
  338 + {
  339 + value: 'disciplines',
  340 + label: 'Disciplines',
  341 + children: [
  342 + {
  343 + value: 'consistency',
  344 + label: 'Consistency',
  345 + },
  346 + {
  347 + value: 'feedback',
  348 + label: 'Feedback',
  349 + },
  350 + {
  351 + value: 'efficiency',
  352 + label: 'Efficiency',
  353 + },
  354 + {
  355 + value: 'controllability',
  356 + label: 'Controllability',
  357 + },
  358 + ],
  359 + },
  360 + {
  361 + value: 'navigation',
  362 + label: 'Navigation',
  363 + children: [
  364 + {
  365 + value: 'side nav',
  366 + label: 'Side Navigation',
  367 + },
  368 + {
  369 + value: 'top nav',
  370 + label: 'Top Navigation',
  371 + },
  372 + ],
  373 + },
  374 + ],*/
  375 + },
  376 + {
  377 + value: 'component',
  378 + label: 'Component',
  379 +
  380 + },
  381 + {
  382 + value: 'resource',
  383 + label: 'Resource',
  384 +
  385 + },
  386 + ]
  387 + //是否通知
  388 + let noticeFlag=Vue.ref(true);
  389 + //获取当前登录人-操作人
  390 + let getUserByToken=()=>{
  391 + proxy.$http.get(`/api-user/users/getUserByToken`, {}, function (res) {
  392 + if (res && res.code == 0) {
  393 + let userData=res.object;
  394 + loginName.value=userData.username;
  395 +
  396 + }
  397 + })
  398 + }
  399 + //获取告警负责人-默认审批人
  400 + let getUser=()=>{
  401 + proxy.$http.get(`/api-web/bAlarmManage/alarm/userName`, {alarmNo:alarmInfo.value.alarmNo}, function (res) {
  402 + if (res && res.code == 0) {
  403 + let data=res.object;
  404 + if(data){
  405 + approverName.value=data.admin;
  406 + approverLabel.value=data.adminName;
  407 + }
  408 + }
  409 + })
  410 + }
  411 + // 挂载完
  412 + Vue.onMounted(() => {
  413 + getUserList();
  414 + //定时器每秒调用一次fnDate()
  415 + timer.value=setInterval(function(){
  416 + getDateTime();
  417 + },1000);
  418 + getAlarmInfo();
  419 + })
  420 + Vue.onUnmounted(()=>{
  421 + timer.value=null;
  422 + })
36 return { 423 return {
37 - change,  
38 - changetext,  
39 - saveDetail 424 + change,changetext,saveDetail,approver,approverName,approverLabel,loginName,detailText,detail,repositoryInto,reason,citeCover,alarmType,
  425 + options,inputValue,dynamicTags,inputVisible,handleClose,showInput,handleInputConfirm,
  426 + getKeyword, timer,dateTime,getDateTime,timeFormat,
  427 + title, dialogVisible, height, dataList, columns, closeDetail,okfunc, getPage,selectionChange,dynamicTagsAppend,
  428 + showUserDialog,showUserDialogVisible,userFileRight,userList,selectUser,getUserList,titles,
  429 + getAlarmInfo,alarmInfo,cascaderValue,propsTrigger,handleChange,cascaderOptions,noticeFlag,
  430 + getUserByToken,getUser,cancleBtn,repositoryInfo,repositoryId,opinion
40 } 431 }
41 } 432 }
42 433
@@ -249,54 +249,101 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', @@ -249,54 +249,101 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common',
249 $.each(data, function (i, obj) { 249 $.each(data, function (i, obj) {
250 ids.push(obj.id) 250 ids.push(obj.id)
251 }); 251 });
252 - //获取以往告警消除意见 252 + //获取知识库开启状态
253 admin.req({ 253 admin.req({
254 - url: common.domainName + '/api-web/home/alarm/clear/reason', 254 + url: common.domainName + '/api-user/sysConf/getByCode',
255 type: "get", 255 type: "get",
256 - data:{  
257 - alarmId: ids.toString() 256 + data: {
  257 + code: 'knFlag'
258 }, 258 },
259 - done:function (data) {  
260 - var clearReson = "暂无参考处理方案,请输入处理方案";  
261 - var hisReason = "";  
262 - var reasonlist = data.reason;  
263 - if(reasonlist && reasonlist.length > 0){  
264 - hisReason = "参考方案:\n";  
265 - $.each(reasonlist,function (i,v) {  
266 - var idx = i + 1;  
267 - hisReason += idx +":"+v +"\n"; 259 + done: function (data) {
  260 + console.log("knFlag",data)
  261 + let knFlag=data.object.value;
  262 + if(knFlag){
  263 + //开启闭环
  264 + /////////////////////////
  265 + // Start 将对象转成key=value&key1=value1 LSQ 2022/03/22
  266 + let urlParams='';
  267 + let paramsData=table.checkStatus('activewarningTable').data;
  268 + if (paramsData.length >1) {
  269 + layer.msg('只能选择一项数据', {icon: 7, time: 2000});
  270 + return;
  271 + }
  272 + let params=paramsData[0];
  273 + console.log("params",params)
  274 + for(let key in params){
  275 + if(params[key]){
  276 + urlParams+=key+'='+params[key]+'&'
  277 + }
  278 + }
  279 + urlParams=urlParams.substr(0,urlParams.length-1)+'&alarmTypeCustom=active';
  280 + layer.open({
  281 + title: ['告警消除', 'font-size:18px;'],
  282 + type: 2,
  283 + area: ['80%', '90%'],
  284 + shadeClose: true,//开启遮罩层
  285 + id: 'alarms_clear_id',
  286 + // content: laytpl(res.body).render(JSON.stringify(params)),
  287 + content: ['/vue3/index.html#/alarmsClearEditor?'+urlParams, 'no'],
  288 + cancel: function () {
  289 + clearTimeout();
  290 + }
268 }); 291 });
269 - }  
270 -  
271 - layer.prompt({id: "alarms_clear_id", title: '告警消除', area: ['400px'], formType: 2,value: hisReason}, function (text, index) { 292 +///////////////////////////
  293 + }else{
  294 + //不开启闭环
  295 + //获取以往告警消除意见
272 admin.req({ 296 admin.req({
273 - url: common.domainName + '/api-web/home/alarm/clear'  
274 - , type: "post"  
275 - , data: {  
276 - ids: ids.toString(),  
277 - reason: text,  
278 - access_token: accessToken,  
279 - noticeFlag: $('input[name="noticeFlag"]:checked').val()  
280 - }  
281 - , done: function (res) {  
282 - //如果消除成功,关闭弹出框然后重新加载页面  
283 - if (res.success) {  
284 - layer.close(index);  
285 - layer.msg('告警已消除!', {icon: 1, time: 2000});  
286 - reloadTable();  
287 - } else {  
288 - layer.msg('告警消除失败,请与管理员联系!', {icon: 7, time: 3000}); 297 + url: common.domainName + '/api-web/home/alarm/clear/reason',
  298 + type: "get",
  299 + data:{
  300 + alarmId: ids.toString()
  301 + },
  302 + done:function (data) {
  303 + var clearReson = "暂无参考处理方案,请输入处理方案";
  304 + var hisReason = "";
  305 + var reasonlist = data.reason;
  306 + if(reasonlist && reasonlist.length > 0){
  307 + hisReason = "参考方案:\n";
  308 + $.each(reasonlist,function (i,v) {
  309 + var idx = i + 1;
  310 + hisReason += idx +":"+v +"\n";
  311 + });
289 } 312 }
  313 +
  314 + layer.prompt({id: "alarms_clear_id", title: '告警消除', area: ['400px'], formType: 2,value: hisReason}, function (text, index) {
  315 + admin.req({
  316 + url: common.domainName + '/api-web/home/alarm/clear'
  317 + , type: "post"
  318 + , data: {
  319 + ids: ids.toString(),
  320 + reason: text,
  321 + access_token: accessToken,
  322 + noticeFlag: $('input[name="noticeFlag"]:checked').val()
  323 + }
  324 + , done: function (res) {
  325 + //如果消除成功,关闭弹出框然后重新加载页面
  326 + if (res.success) {
  327 + layer.close(index);
  328 + layer.msg('告警已消除!', {icon: 1, time: 2000});
  329 + reloadTable();
  330 + } else {
  331 + layer.msg('告警消除失败,请与管理员联系!', {icon: 7, time: 3000});
  332 + }
  333 + }
  334 + });
  335 + });
  336 +
  337 + $("#alarms_clear_id").find('textarea.layui-layer-input').attr("placeholder", clearReson);
  338 + $("#alarms_clear_id").append('<div style="padding-top: 15px;"><span>是否通知:</span> ' +
  339 + '<input type="radio" name="noticeFlag" value="true" title="是" >&nbsp;是' +
  340 + '<input type="radio" name="noticeFlag" value="false" title="否" checked="" style="margin-left: 20px;">&nbsp;否</div> ');
290 } 341 }
291 }); 342 });
292 - });  
293 -  
294 - $("#alarms_clear_id").find('textarea.layui-layer-input').attr("placeholder", clearReson);  
295 - $("#alarms_clear_id").append('<div style="padding-top: 15px;"><span>是否通知:</span> ' +  
296 - '<input type="radio" name="noticeFlag" value="true" title="是" >&nbsp;是' +  
297 - '<input type="radio" name="noticeFlag" value="false" title="否" checked="" style="margin-left: 20px;">&nbsp;否</div> '); 343 + }
298 } 344 }
299 - }); 345 + })
  346 +
300 }); 347 });
301 //告警关闭 348 //告警关闭
302 $("#closeBtn").unbind('click').on("click", function () { 349 $("#closeBtn").unbind('click').on("click", function () {
@@ -1290,6 +1290,17 @@ layui.define(['xmSelect', 'md5'], function (exports) { @@ -1290,6 +1290,17 @@ layui.define(['xmSelect', 'md5'], function (exports) {
1290 param = "=" + encodeURIComponent(layHref.split('=')[1]); 1290 param = "=" + encodeURIComponent(layHref.split('=')[1]);
1291 } 1291 }
1292 alink.setAttribute("lay-href",layHref.split('=')[0] + param); 1292 alink.setAttribute("lay-href",layHref.split('=')[0] + param);
  1293 + document.body.appendChild(alink);
  1294 + alink.click();
  1295 + document.body.removeChild(alink);
  1296 + },
  1297 + openMxgraph: function (layHref) {
  1298 + var alink = document.createElement('a');
  1299 + var param = '';
  1300 + if (layHref.indexOf('=') !== -1) {
  1301 + param = "=" + encodeURIComponent(layHref.split('=')[1]);
  1302 + }
  1303 + alink.setAttribute("lay-href",layHref.split('=')[0] + param);
1293 admin.req({ 1304 admin.req({
1294 url: obj.domainName + '/api-web/mxgraph/getJtopoInfoById/'+layHref.split('=')[2], 1305 url: obj.domainName + '/api-web/mxgraph/getJtopoInfoById/'+layHref.split('=')[2],
1295 success(response) { 1306 success(response) {
@@ -282,7 +282,7 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', @@ -282,7 +282,7 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common',
282 , {field: 'durationStr', title: '持续时间', align: 'center', width: 190} 282 , {field: 'durationStr', title: '持续时间', align: 'center', width: 190}
283 , { 283 , {
284 title: '操作', align: 'center', minWidth: 100, 284 title: '操作', align: 'center', minWidth: 100,
285 - templet: '<div><span history-data-warn-view="{{d.id}}" class="layui-table-link">查看</span> <span history-data-warn-path="{{d.id}}" class="layui-table-link">轨迹</span></div>' 285 + templet: '<div><span history-data-warn-clear="{{d.id}}" class="layui-table-link">消除</span> <span history-data-warn-view="{{d.id}}" class="layui-table-link">查看</span> <span history-data-warn-path="{{d.id}}" class="layui-table-link">轨迹</span></div>'
286 } 286 }
287 ]; 287 ];
288 } 288 }
@@ -319,6 +319,7 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', @@ -319,6 +319,7 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common',
319 , drag: {toolbar: false} 319 , drag: {toolbar: false}
320 , cols: [cols], 320 , cols: [cols],
321 done: function (res, curr, count) { 321 done: function (res, curr, count) {
  322 + let resArr=res.data;
322 soulTable.render(this) 323 soulTable.render(this)
323 initHistoryBtnCLick(); 324 initHistoryBtnCLick();
324 var groupurl = domainName + '/api-web/home/alarm/countAlarmNumByAlarmLevel?access_token=' + accessToken; 325 var groupurl = domainName + '/api-web/home/alarm/countAlarmNumByAlarmLevel?access_token=' + accessToken;
@@ -353,6 +354,43 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', @@ -353,6 +354,43 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common',
353 }); 354 });
354 }); 355 });
355 } 356 }
  357 + //start lsq 历史告警消除 2022-03-23
  358 + $('[history-data-warn-clear]').unbind("click").on('click', function () {
  359 + // Start 将对象转成key=value&key1=value1 LSQ 2022/03/22
  360 + let urlParams='';
  361 + // let paramsData=table.checkStatus('historywarningTable').data;
  362 + let paramsData= [];
  363 +
  364 + if(resArr){
  365 + resArr.map(item=>{
  366 + if(item.id==$(this).attr('history-data-warn-clear')){
  367 + paramsData.push(item);
  368 + }
  369 + })
  370 + }
  371 + let params=paramsData[0];
  372 + console.log("params",params)
  373 + for(let key in params){
  374 + if(params[key]){
  375 + urlParams+=key+'='+params[key]+'&'
  376 + }
  377 + }
  378 + urlParams=urlParams.substr(0,urlParams.length-1)+'&alarmTypeCustom=his';
  379 + layer.open({
  380 + title: ['告警消除', 'font-size:18px;'],
  381 + type: 2,
  382 + area: ['80%', '90%'],
  383 + shadeClose: true,//开启遮罩层
  384 + id: 'alarms_clear_id',
  385 + // content: laytpl(res.body).render(JSON.stringify(params)),
  386 + content: ['/vue3/index.html#/alarmsClearEditor?'+urlParams, 'no'],
  387 + cancel: function () {
  388 + clearTimeout();
  389 + }
  390 + });
  391 + })
  392 +
  393 + //end lsq 2022-03-23
356 //告警操作日志 394 //告警操作日志
357 $('[history-data-warn-view]').unbind("click").on('click', function () { 395 $('[history-data-warn-view]').unbind("click").on('click', function () {
358 admin.req({ 396 admin.req({
@@ -846,7 +846,6 @@ @@ -846,7 +846,6 @@
846 </script> 846 </script>
847 <!--健康状态--> 847 <!--健康状态-->
848 <script type="text/html" id="healthTpl"> 848 <script type="text/html" id="healthTpl">
849 - {{# if(d.state != 'new'){ }}  
850 {{# if(d.health === '1'){ }} 849 {{# if(d.health === '1'){ }}
851 <button type="button" class="layui-btn layui-btn-danger layui-bg-red layui-btn-radius layui-btn-xs p-0-15 cant-click"> 850 <button type="button" class="layui-btn layui-btn-danger layui-bg-red layui-btn-radius layui-btn-xs p-0-15 cant-click">
852 </button> 851 </button>
@@ -858,7 +857,6 @@ @@ -858,7 +857,6 @@
858 {{# if(d.health === '3'){ }} 857 {{# if(d.health === '3'){ }}
859 <button type="button" class="layui-btn layui-btn-radius layui-bg-green layui-btn-xs p-0-15 cant-click"></button> 858 <button type="button" class="layui-btn layui-btn-radius layui-bg-green layui-btn-xs p-0-15 cant-click"></button>
860 {{# } }} 859 {{# } }}
861 - {{# } }}  
862 </script> 860 </script>
863 <!--主机状态--> 861 <!--主机状态-->
864 <script type="text/html" id="hostStateTpl"> 862 <script type="text/html" id="hostStateTpl">