Authored by 王涛

Merge branch 'master-500-dev-lushangqing' into 'master-500-dev'

告警消除页面联调接口当前处理人,当前负责人,当前告警统计信息,消除告警,从历史告警进入告警消除页面



See merge request !486
@@ -35,6 +35,10 @@ @@ -35,6 +35,10 @@
35 margin:8px 0; 35 margin:8px 0;
36 text-align: left; 36 text-align: left;
37 } 37 }
  38 +.info-item-statistics{
  39 + margin:8px 0;
  40 + text-align: left;
  41 +}
38 .info-content{ 42 .info-content{
39 margin-bottom: 5px; 43 margin-bottom: 5px;
40 } 44 }
@@ -76,6 +80,7 @@ @@ -76,6 +80,7 @@
76 /*justify-content: space-between;*/ 80 /*justify-content: space-between;*/
77 padding:10px; 81 padding:10px;
78 background: #FFFFFF; 82 background: #FFFFFF;
  83 + margin-bottom: 5px;
79 } 84 }
80 .alarmsNotice{ 85 .alarmsNotice{
81 display: flex; 86 display: flex;
@@ -92,4 +97,27 @@ @@ -92,4 +97,27 @@
92 padding:0 10px 10px; 97 padding:0 10px 10px;
93 background: #FFFFFF; 98 background: #FFFFFF;
94 text-align: left; 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;
95 } 123 }
@@ -156,6 +156,7 @@ @@ -156,6 +156,7 @@
156 .editor_text .w-e-text{ 156 .editor_text .w-e-text{
157 min-height:300px; 157 min-height:300px;
158 max-height: 500px; 158 max-height: 500px;
  159 + box-sizing: border-box;
159 } 160 }
160 .alarmsClearEditor-btn{ 161 .alarmsClearEditor-btn{
161 padding:10px; 162 padding:10px;
  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,25 @@ export default { @@ -37,13 +45,25 @@ 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 + console.log("%%%%%%%%%",val)
  52 + this.setValue(val);
  53 + },
  54 + deep:true
  55 + },
41 //value为编辑框输入的内容,这里我监听了一下值,当父组件调用得时候,如果给value赋值了,子组件将会显示父组件赋给的值 56 //value为编辑框输入的内容,这里我监听了一下值,当父组件调用得时候,如果给value赋值了,子组件将会显示父组件赋给的值
  57 + isDisabled: function(val) {
  58 + // 禁用编辑功能
  59 + this.setDisabled(val)
  60 + }
42 }, 61 },
43 setup(props, {attrs, slots, emit}) { 62 setup(props, {attrs, slots, emit}) {
44 const {proxy} = Vue.getCurrentInstance(); 63 const {proxy} = Vue.getCurrentInstance();
45 let editor=Vue.ref(null); 64 let editor=Vue.ref(null);
46 let info_=Vue.ref(null); 65 let info_=Vue.ref(null);
  66 + let elemText=Vue.ref(null);
47 Vue.watch(props.value, (newVal) => { 67 Vue.watch(props.value, (newVal) => {
48 68
49 }) 69 })
@@ -54,6 +74,24 @@ export default { @@ -54,6 +74,24 @@ export default {
54 seteditor(); 74 seteditor();
55 editor.value.txt.html(props.value) 75 editor.value.txt.html(props.value)
56 }) 76 })
  77 + //引用知识库文本
  78 + let editorTxt=Vue.ref(null);
  79 + let setValue=(val)=>{
  80 + if (val !== editorTxt.value.html()) {
  81 + editorTxt.value.html(val)
  82 + }
  83 + }
  84 + //禁用编辑功能
  85 + let setDisabled=(val)=>{
  86 + let value=true;
  87 + if(val==0){
  88 + value=false;
  89 + }else{
  90 + value=true;
  91 + }
  92 + elemText.value.attr('contenteditable',value)
  93 + }
  94 +
57 let seteditor=()=> { 95 let seteditor=()=> {
58 editor.value = new wangEditor(proxy.$refs.toolbar, proxy.$refs.editor) 96 editor.value = new wangEditor(proxy.$refs.toolbar, proxy.$refs.editor)
59 editor.value.customConfig.uploadImgShowBase64 = false // base 64 存储图片 97 editor.value.customConfig.uploadImgShowBase64 = false // base 64 存储图片
@@ -170,10 +208,17 @@ export default { @@ -170,10 +208,17 @@ export default {
170 } 208 }
171 // 创建富文本编辑器 209 // 创建富文本编辑器
172 editor.value.create() 210 editor.value.create()
  211 + elemText.value=editor.value.$textElem;//.attr('contenteditable');
  212 + editorTxt.value=editor.value.txt;
  213 +
173 } 214 }
174 return { 215 return {
175 seteditor, 216 seteditor,
176 editor, 217 editor,
  218 + setDisabled,
  219 + setValue,
  220 + elemText,
  221 + editorTxt,
177 info_ 222 info_
178 } 223 }
179 } 224 }
@@ -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 // // 自定义指令
@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@
15 资源类型:{{alarmInfo.resType}} 15 资源类型:{{alarmInfo.resType}}
16 </div> 16 </div>
17 <div class="info-item"> 17 <div class="info-item">
18 - 所属业务系统:{{alarmInfo.alarmResource==1?'华为告警':'监控系统'}} 18 + 所属业务系统:{{alarmInfo.busTypeName}}
19 </div> 19 </div>
20 <div class="info-item"> 20 <div class="info-item">
21 IP地址:{{alarmInfo.ip}} 21 IP地址:{{alarmInfo.ip}}
@@ -34,7 +34,7 @@ @@ -34,7 +34,7 @@
34 <div class="content-title">告警信息</div> 34 <div class="content-title">告警信息</div>
35 <div class="content-body-info"> 35 <div class="content-body-info">
36 <div class="info-item"> 36 <div class="info-item">
37 - 告警级别:<sapn>{{alarmInfo.alarmLevel}}</sapn> 37 + 告警级别:<sapn>{{alarmInfo.alarmLevel==1?'一般':alarmInfo.alarmLevel==2?'重要':'严重'}}</sapn>
38 </div> 38 </div>
39 <div class="info-item"> 39 <div class="info-item">
40 首次时间:{{alarmInfo.alarmTime}} 40 首次时间:{{alarmInfo.alarmTime}}
@@ -42,82 +42,90 @@ @@ -42,82 +42,90 @@
42 <div class="info-item"> 42 <div class="info-item">
43 最后一次时间:{{alarmInfo.updateTime}} 43 最后一次时间:{{alarmInfo.updateTime}}
44 </div> 44 </div>
45 - <div class="info-item">  
46 - 消除时间: 45 + <div class="info-item" v-if="alarmInfo.alarmType!=active">
  46 + 消除人:{{alarmInfo.clearUserId}}
47 </div> 47 </div>
48 - <div class="info-item">  
49 - 告警次数:{{alarmInfo.alarmRepeatCnt}} 48 + <div class="info-item" v-if="alarmInfo.alarmType!=active">
  49 + 消除原因:{{alarmInfo.clearReason}}
50 </div> 50 </div>
51 - <div class="info-item">  
52 - 实际告警值: 51 + <div class="info-item" v-if="alarmInfo.alarmType!=active">
  52 + 消除时间:{{alarmInfo.clearTime}}
53 </div> 53 </div>
54 <div class="info-item"> 54 <div class="info-item">
55 - 消除人告警策略:  
56 - </div>  
57 - </div>  
58 - </div>  
59 - </div>  
60 - <div class="info-content">  
61 - <div class="info-content-body">  
62 - <div class="content-body-info">  
63 - <div class="info-item">  
64 - 通知信息:monitor_xjic 55 + 告警次数:{{alarmInfo.alarmRepeatCnt?alarmInfo.alarmRepeatCnt:0}}
65 </div> 56 </div>
66 <div class="info-item"> 57 <div class="info-item">
67 - 通知人清单:monitor_xjic 58 + 实际告警值:{{alarmInfo.kpiValue}}
68 </div> 59 </div>
69 60
70 </div> 61 </div>
71 </div> 62 </div>
72 </div> 63 </div>
73 - <div class="info-content">  
74 - <div class="info-content-body">  
75 - <div class="content-body-info">  
76 - <div class="info-item">  
77 - 统计信息:monitor_xjic  
78 - </div>  
79 - </div>  
80 - </div>  
81 - </div>  
82 - <div class="info-content">  
83 - <div class="info-content-body">  
84 - <div class="content-body-info">  
85 - <div class="info-item">  
86 - 同类型告警处理过程:monitor_xjic  
87 - </div>  
88 - </div> 64 + <!--通知统计信息组件-->
  65 + <cm-notice-statistics :alarmId="alarmInfo.id"></cm-notice-statistics>
  66 + </div>
  67 + <div class="alarmsRadio" v-if="!isExamine">
  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>
89 </div> 77 </div>
  78 +
90 </div> 79 </div>
  80 +
91 </div> 81 </div>
92 <div class="alarmsClearEditor-scheme"> 82 <div class="alarmsClearEditor-scheme">
93 - <div class="scheme-title-per"> <span class="title-handle-per">处理方案</span> 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>
94 </div> 95 </div>
95 <div class="scheme-title"> 96 <div class="scheme-title">
96 - <span class="title-handle-per"> 97 + <span class="title-handle-per" v-if="!isExamine">
  98 + <!--v-model="cascaderValue"
  99 + :options="cascaderOptions"-->
97 <el-cascader 100 <el-cascader
98 - v-model="cascaderValue"  
99 - :options="cascaderOptions" 101 +
100 :props="propsTrigger" 102 :props="propsTrigger"
101 @change="handleChange" 103 @change="handleChange"
102 placeholder="搜索选择内容" 104 placeholder="搜索选择内容"
  105 + filterable
  106 + clearable
103 /> 107 />
104 </span> 108 </span>
105 -<!-- <span class="title-handle-per">处理人:admin</span>-->  
106 - <span class="title-handle-per">审批人:{{approverName}} <el-button type="primary" @click="showUserDialog(true)" size="small">选择审批人</el-button>  
107 - <!-- <el-select v-model="approver" filterable placeholder="选择审批人" @change="changeApprover">  
108 - <el-option  
109 - v-for="item in options"  
110 - :key="item.value"  
111 - :label="item.name"  
112 - :value="item.value"  
113 - />  
114 - </el-select>--> 109 + <span class="title-handle-per" v-if="!isExamine">审批人:{{approverName}} <el-button v-if="!isExamine" type="primary" @click="showUserDialog(true)" size="small">选择审批人</el-button>
115 </span> 110 </span>
116 - <span class="title-handle-per">时间:{{dateTime}}</span> 111 + <span class="title-handle-per" v-if="!isExamine">时间:{{dateTime}}</span>
  112 + </div>
  113 + <cm-wang-editor v-if="!isExamine" v-model="detail" :repositoryInfo="repositoryInfo" :isDisabled="repositoryInto" :isClear="isClear" @change="change" @changetext="changetext"></cm-wang-editor>
  114 + <div class="editor_detail" v-if="isExamine" >de3333
  115 + <div v-html="detail"></div>
117 </div> 116 </div>
118 - <cm-wang-editor v-model="detail" :isClear="isClear" @change="change" @changetext="changetext"></cm-wang-editor>  
119 </div> 117 </div>
120 - <div class="alarmsClearTag"> 118 + <div class="detail_comments" v-if="isExamine">
  119 + <div class="detail_comments_title">审核意见</div>
  120 +
  121 + <el-input
  122 + v-model="textarea1"
  123 + type="textarea"
  124 + :rows="5"
  125 + placeholder="此处输入审核意见"
  126 + />
  127 + </div>
  128 + <div class="alarmsClearTag" v-if="repositoryInto==1 && !isExamine">
121 <div class="tag-keyword"> 129 <div class="tag-keyword">
122 关键字: 130 关键字:
123 <el-tag 131 <el-tag
@@ -143,37 +151,27 @@ @@ -143,37 +151,27 @@
143 + New Tag 151 + New Tag
144 </el-button> 152 </el-button>
145 </div> 153 </div>
146 - <div class="tag-keyword-get"><el-button type="primary" @click="getKeyword" size="small">关键字提取</el-button></div> 154 +<!-- <div class="tag-keyword-get"><el-button type="primary" @click="getKeyword" size="small">关键字提取</el-button></div>-->
147 155
148 </div> 156 </div>
149 - <div class="alarmsRadio">  
150 - <div class="alarmsNotice">  
151 - <div class="alarmsDes"><el-input v-model="input" placeholder="简要说明" /></div>  
152 - <div class="alarmsNotice-radio">  
153 - <span class="radioLabel">是否通知:</span>  
154 - <el-radio-group v-model="noticeFlag">  
155 - <el-radio :label="true"></el-radio>  
156 - <el-radio :label="false"></el-radio>  
157 - </el-radio-group>  
158 - </div>  
159 157
160 - </div>  
161 -  
162 - </div>  
163 - <div class="alarmsCover"> 158 + <div class="alarmsCover" v-if="repositoryInto==1 && !isExamine">
164 <span class="radioLabel">引用是否覆盖:</span> 159 <span class="radioLabel">引用是否覆盖:</span>
165 - <el-radio-group v-model="noticeFlag"> 160 + <el-radio-group v-model="citeCover">
166 <el-radio :label="true"></el-radio> 161 <el-radio :label="true"></el-radio>
167 <el-radio :label="false"></el-radio> 162 <el-radio :label="false"></el-radio>
168 </el-radio-group> 163 </el-radio-group>
169 </div> 164 </div>
170 <div class="alarmsClearEditor-btn"> 165 <div class="alarmsClearEditor-btn">
171 - <el-button type="primary" @click="saveDetail(0)" size="small">存为草稿</el-button>  
172 - <el-button type="primary" @click="saveDetail(1)" size="small">确认</el-button>  
173 - <el-button @click="saveDetail" size="small">取消</el-button> 166 + <el-button type="primary" @click="saveDetail(0)" v-if="!isExamine" size="small">存为草稿</el-button>
  167 + <el-button type="primary" @click="saveDetail(1)" v-if="!isExamine" size="small">确认</el-button>
  168 + <el-button type="primary" @click="saveDetail(2)" v-if="isExamine" size="small">通过</el-button>
  169 + <el-button type="primary" @click="saveDetail(3)" v-if="isExamine" size="small">不通过</el-button>
  170 + <el-button @click="cancleBtn" size="small">取消</el-button>
174 </div> 171 </div>
175 <cm-userright title="审批人" :titles="titles" :showRole="false" :showGroup="false" :showDialogVisible="showUserDialogVisible" :selectedArr="userFileRight" :userArr="userList" :isUser="false" :showOrg="false" @callback="selectUser" 172 <cm-userright title="审批人" :titles="titles" :showRole="false" :showGroup="false" :showDialogVisible="showUserDialogVisible" :selectedArr="userFileRight" :userArr="userList" :isUser="false" :showOrg="false" @callback="selectUser"
176 @hideDialog="showUserDialog"></cm-userright> 173 @hideDialog="showUserDialog"></cm-userright>
  174 + <!--关键字提取列表-->
177 <cm-dialog :title="title" width="60%" :showDialogVisible="dialogVisible" :showFooter="true" @okfunc="okfunc" @hidedialog="closeDetail" :showOkBtn="true"> 175 <cm-dialog :title="title" width="60%" :showDialogVisible="dialogVisible" :showFooter="true" @okfunc="okfunc" @hidedialog="closeDetail" :showOkBtn="true">
178 <template v-slot> 176 <template v-slot>
179 <cm-table-page :columns="columns" :dataList="dataList" @loaddata="getPage" :showIndex="true" 177 <cm-table-page :columns="columns" :dataList="dataList" @loaddata="getPage" :showIndex="true"
@@ -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 }
@@ -17,19 +22,11 @@ export default { @@ -17,19 +22,11 @@ export default {
17 //审批人 22 //审批人
18 let approver=Vue.ref(''); 23 let approver=Vue.ref('');
19 let approverName=Vue.ref('admin'); 24 let approverName=Vue.ref('admin');
  25 + //操作人
  26 + let loginName=Vue.ref('');
20 let options=Vue.ref([{value:'001',name:'admin'},{value:'002',name:'root'}]) 27 let options=Vue.ref([{value:'001',name:'admin'},{value:'002',name:'root'}])
21 let timer=Vue.ref(null); 28 let timer=Vue.ref(null);
22 - // 挂载完  
23 - Vue.onMounted(() => {  
24 - //定时器每秒调用一次fnDate()  
25 - timer.value=setInterval(function(){  
26 - getDateTime();  
27 - },1000);  
28 - getAlarmInfo();  
29 - })  
30 - Vue.onUnmounted(()=>{  
31 - timer.value=null;  
32 - }) 29 +
33 //富文本带标签内容 30 //富文本带标签内容
34 let change=(val)=> { 31 let change=(val)=> {
35 detail.value=val; 32 detail.value=val;
@@ -39,27 +36,50 @@ export default { @@ -39,27 +36,50 @@ export default {
39 detailText.value=val; 36 detailText.value=val;
40 } 37 }
41 //保存富文本内容 38 //保存富文本内容
  39 + let repositoryInto=Vue.ref('1');//是否入知识库
  40 + let repositoryId=Vue.ref('');//知识库id
  41 + let citeCover=Vue.ref(true);//是否覆盖
  42 + let reason=Vue.ref('');//简要说明
  43 + let alarmType=Vue.ref('active');//告警类型
42 let saveDetail=(val)=>{ 44 let saveDetail=(val)=>{
43 - console.log("detailText",detailText.value) 45 + let dynamicTagsStr=dynamicTags.value.join(',');
  46 + let pcontent=detail.value;
  47 + if(repositoryInto.value==0){
  48 + pcontent='';
  49 + detailText.value=''
  50 + }
44 let params={ 51 let params={
45 - detail:detail.value,//富文本详情  
46 - state:val,//存储状态 0 草稿,1 审批中  
47 - approverName:approverName.value,//审批人 52 + pcontent:pcontent,//富文本详情
  53 + status:val,//存储状态 0 草稿,1 审批中
  54 + approver:approverName.value,//审批人
48 dateTime:dateTime.value,//当前时间 55 dateTime:dateTime.value,//当前时间
  56 + keyword:dynamicTagsStr,//关键字
  57 + aralmid:alarmInfo.id,//告警id
  58 + // manageTime:dateTime.value,//处理时间
  59 + // manageName:loginName.value,//处理人
  60 + // repositoryId:repositoryId.value,//引用知识库id
  61 + repositoryInto:repositoryInto.value,//是否入知识库 1入,0不入
  62 + citeCover:citeCover.value?1:0,//引用是否覆盖 0 未覆盖 1已覆盖
  63 + reason:reason.value,//消除原因
  64 + noticeFlag:noticeFlag.value,//是否通知
  65 + alarmType:alarmInfo.alarmType,//告警类型,active活动告警,his历史告警
49 66
50 } 67 }
51 - }  
52 - //审批人change事件  
53 - let changeApprover=(val)=>{  
54 - let arr=options.value;  
55 - console.log("val",val)  
56 - arr.map(item=>{  
57 - if(item.value==val){  
58 - approverName.value=item.name; 68 + proxy.$http.post(`/api-web/bAlarmManage/clearAlarm`, params, function (res) {
  69 + if (res && res.code == 0) {
  70 + proxy.$global.showMsg(res.msg, 'success');
  71 + cancleBtn();
  72 + }else{
  73 + proxy.$global.showMsg(res.msg, 'warning');
59 } 74 }
60 }) 75 })
61 } 76 }
  77 + //取消按钮
  78 + let cancleBtn=()=>{
  79 + window.parent.layer.closeAll();
  80 + }
62 81
  82 + //关键字标签
63 const inputValue = Vue.ref('') 83 const inputValue = Vue.ref('')
64 const dynamicTags = Vue.ref(['Tag 1', 'Tag 2', 'Tag 3']) 84 const dynamicTags = Vue.ref(['Tag 1', 'Tag 2', 'Tag 3'])
65 const inputVisible = Vue.ref(false) 85 const inputVisible = Vue.ref(false)
@@ -85,7 +105,6 @@ export default { @@ -85,7 +105,6 @@ export default {
85 } 105 }
86 //提取关键字 106 //提取关键字
87 let getKeyword=()=>{ 107 let getKeyword=()=>{
88 - console.log("detailText.value",detailText.value)  
89 if(!detailText.value){ 108 if(!detailText.value){
90 proxy.$global.showMsg('请输入处理方案!', 'warning'); 109 proxy.$global.showMsg('请输入处理方案!', 'warning');
91 110
@@ -123,12 +142,12 @@ export default { @@ -123,12 +142,12 @@ export default {
123 dynamicTags.value.push(item.keyword); 142 dynamicTags.value.push(item.keyword);
124 }) 143 })
125 dialogVisible.value=false; 144 dialogVisible.value=false;
126 - console.log("dynamicTags",dynamicTags.value)  
127 }else{ 145 }else{
128 proxy.$global.showMsg('请选择关键字!', 'warning'); 146 proxy.$global.showMsg('请选择关键字!', 'warning');
129 } 147 }
130 148
131 } 149 }
  150 + //获取所有的关键字列表
132 let getPage=()=>{ 151 let getPage=()=>{
133 152
134 } 153 }
@@ -220,7 +239,9 @@ export default { @@ -220,7 +239,9 @@ export default {
220 let userIds = userObj.user.map(function (v) { 239 let userIds = userObj.user.map(function (v) {
221 return v.username; 240 return v.username;
222 }); 241 });
223 - console.log("userObj",userObj) 242 + console.log("userIds",userObj)
  243 + approverName.value=userIds.join(',')
  244 +
224 } 245 }
225 246
226 //获取当前时间 247 //获取当前时间
@@ -237,25 +258,68 @@ export default { @@ -237,25 +258,68 @@ export default {
237 //获取告警信息 258 //获取告警信息
238 let alarmInfo=Vue.ref({}); 259 let alarmInfo=Vue.ref({});
239 let getAlarmInfo=()=>{ 260 let getAlarmInfo=()=>{
240 - console.log("proxy.$route.query",proxy.$route.query)  
241 - alarmInfo.value=proxy.$route.query 261 + if(props.isExamine){
  262 + //审核告警消除
  263 + }else {
  264 + alarmInfo.value=proxy.$route.query;
  265 + }
  266 + getUserByToken();
  267 + getUser();
242 } 268 }
243 //级联选择器 269 //级联选择器
244 const cascaderValue = Vue.ref([]) 270 const cascaderValue = Vue.ref([])
245 271
246 const propsTrigger = { 272 const propsTrigger = {
247 - expandTrigger: 'hover', 273 + lazy: true,
  274 + lazyLoad(node, resolve) {
  275 + console.log("node",node,node.value,node.level)
  276 + const { level } = node
  277 + console.log("level",level,cascaderValue.value)
  278 + setTimeout(() => {
  279 + // const nodes = Array.from({ length: level + 1 }).map((item) => ({
  280 + // value: ++id,
  281 + // label: `Option - ${id}`,
  282 + // leaf: level >= 2,
  283 + // }))
  284 + //动态获取关键字相关的方案文本
  285 + cascaderOptions.value=[{
  286 + value: 'v1',
  287 + label: 'Disciplines',
  288 + leaf: level >=1,
  289 + },{
  290 + value: 'v2',
  291 + label: 'll',
  292 + leaf: level >=1,
  293 + }]
  294 + // Invoke `resolve` callback to return the child nodes data and indicate the loading is finished.
  295 + resolve(cascaderOptions.value)
  296 + }, 500)
  297 + },
248 } 298 }
249 - 299 + // {
  300 + // expandTrigger: 'hover',
  301 + // }
  302 + //引用知识库的处理方案
  303 + let repositoryInfo=Vue.ref('');
250 const handleChange = (value) => { 304 const handleChange = (value) => {
251 - console.log(value) 305 + cascaderValue.value=value;
  306 + if(cascaderValue.value.length>1){
  307 + let arr=cascaderOptions.value;
  308 + arr.map(item=>{
  309 + if(item.value==cascaderValue.value[1]){
  310 + repositoryInfo.value=item.label;
  311 +
  312 + }
  313 + })
  314 + }
  315 + // repositoryId
252 } 316 }
253 317
254 const cascaderOptions = [ 318 const cascaderOptions = [
255 { 319 {
256 value: 'guide', 320 value: 'guide',
257 label: 'Guide', 321 label: 'Guide',
258 - children: [ 322 + /*children: [
259 { 323 {
260 value: 'disciplines', 324 value: 'disciplines',
261 label: 'Disciplines', 325 label: 'Disciplines',
@@ -292,242 +356,61 @@ export default { @@ -292,242 +356,61 @@ export default {
292 }, 356 },
293 ], 357 ],
294 }, 358 },
295 - ], 359 + ],*/
296 }, 360 },
297 { 361 {
298 value: 'component', 362 value: 'component',
299 label: 'Component', 363 label: 'Component',
300 - children: [  
301 - {  
302 - value: 'basic',  
303 - label: 'Basic',  
304 - children: [  
305 - {  
306 - value: 'layout',  
307 - label: 'Layout',  
308 - },  
309 - {  
310 - value: 'color',  
311 - label: 'Color',  
312 - },  
313 - {  
314 - value: 'typography',  
315 - label: 'Typography',  
316 - },  
317 - {  
318 - value: 'icon',  
319 - label: 'Icon',  
320 - },  
321 - {  
322 - value: 'button',  
323 - label: 'Button',  
324 - },  
325 - ],  
326 - },  
327 - {  
328 - value: 'form',  
329 - label: 'Form',  
330 - children: [  
331 - {  
332 - value: 'radio',  
333 - label: 'Radio',  
334 - },  
335 - {  
336 - value: 'checkbox',  
337 - label: 'Checkbox',  
338 - },  
339 - {  
340 - value: 'input',  
341 - label: 'Input',  
342 - },  
343 - {  
344 - value: 'input-number',  
345 - label: 'InputNumber',  
346 - },  
347 - {  
348 - value: 'select',  
349 - label: 'Select',  
350 - },  
351 - {  
352 - value: 'cascader',  
353 - label: 'Cascader',  
354 - },  
355 - {  
356 - value: 'switch',  
357 - label: 'Switch',  
358 - },  
359 - {  
360 - value: 'slider',  
361 - label: 'Slider',  
362 - },  
363 - {  
364 - value: 'time-picker',  
365 - label: 'TimePicker',  
366 - },  
367 - {  
368 - value: 'date-picker',  
369 - label: 'DatePicker',  
370 - },  
371 - {  
372 - value: 'datetime-picker',  
373 - label: 'DateTimePicker',  
374 - },  
375 - {  
376 - value: 'upload',  
377 - label: 'Upload',  
378 - },  
379 - {  
380 - value: 'rate',  
381 - label: 'Rate',  
382 - },  
383 - {  
384 - value: 'form',  
385 - label: 'Form',  
386 - },  
387 - ],  
388 - },  
389 - {  
390 - value: 'data',  
391 - label: 'Data',  
392 - children: [  
393 - {  
394 - value: 'table',  
395 - label: 'Table',  
396 - },  
397 - {  
398 - value: 'tag',  
399 - label: 'Tag',  
400 - },  
401 - {  
402 - value: 'progress',  
403 - label: 'Progress',  
404 - },  
405 - {  
406 - value: 'tree',  
407 - label: 'Tree',  
408 - },  
409 - {  
410 - value: 'pagination',  
411 - label: 'Pagination',  
412 - },  
413 - {  
414 - value: 'badge',  
415 - label: 'Badge',  
416 - },  
417 - ],  
418 - },  
419 - {  
420 - value: 'notice',  
421 - label: 'Notice',  
422 - children: [  
423 - {  
424 - value: 'alert',  
425 - label: 'Alert',  
426 - },  
427 - {  
428 - value: 'loading',  
429 - label: 'Loading',  
430 - },  
431 - {  
432 - value: 'message',  
433 - label: 'Message',  
434 - },  
435 - {  
436 - value: 'message-box',  
437 - label: 'MessageBox',  
438 - },  
439 - {  
440 - value: 'notification',  
441 - label: 'Notification',  
442 - },  
443 - ],  
444 - },  
445 - {  
446 - value: 'navigation',  
447 - label: 'Navigation',  
448 - children: [  
449 - {  
450 - value: 'menu',  
451 - label: 'Menu',  
452 - },  
453 - {  
454 - value: 'tabs',  
455 - label: 'Tabs',  
456 - },  
457 - {  
458 - value: 'breadcrumb',  
459 - label: 'Breadcrumb',  
460 - },  
461 - {  
462 - value: 'dropdown',  
463 - label: 'Dropdown',  
464 - },  
465 - {  
466 - value: 'steps',  
467 - label: 'Steps',  
468 - },  
469 - ],  
470 - },  
471 - {  
472 - value: 'others',  
473 - label: 'Others',  
474 - children: [  
475 - {  
476 - value: 'dialog',  
477 - label: 'Dialog',  
478 - },  
479 - {  
480 - value: 'tooltip',  
481 - label: 'Tooltip',  
482 - },  
483 - {  
484 - value: 'popover',  
485 - label: 'Popover',  
486 - },  
487 - {  
488 - value: 'card',  
489 - label: 'Card',  
490 - },  
491 - {  
492 - value: 'carousel',  
493 - label: 'Carousel',  
494 - },  
495 - {  
496 - value: 'collapse',  
497 - label: 'Collapse',  
498 - },  
499 - ],  
500 - },  
501 - ], 364 +
502 }, 365 },
503 { 366 {
504 value: 'resource', 367 value: 'resource',
505 label: 'Resource', 368 label: 'Resource',
506 - children: [  
507 - {  
508 - value: 'axure',  
509 - label: 'Axure Components',  
510 - },  
511 - {  
512 - value: 'sketch',  
513 - label: 'Sketch Templates',  
514 - },  
515 - {  
516 - value: 'docs',  
517 - label: 'Design Documentation',  
518 - },  
519 - ], 369 +
520 }, 370 },
521 ] 371 ]
522 //是否通知 372 //是否通知
523 - let noticeFlag=Vue.ref(true) 373 + let noticeFlag=Vue.ref(true);
  374 + //获取当前登录人-操作人
  375 + let getUserByToken=()=>{
  376 + proxy.$http.get(`/api-user/users/getUserByToken`, {}, function (res) {
  377 + if (res && res.code == 0) {
  378 + let userData=res.object;
  379 + loginName.value=userData.username;
  380 +
  381 + }
  382 + })
  383 + }
  384 + //获取告警负责人-默认审批人
  385 + let getUser=()=>{
  386 + proxy.$http.get(`/api-web/bAlarmManage/alarm/userName`, {alarmNo:alarmInfo.alarmNo}, function (res) {
  387 + if (res && res.code == 0) {
  388 + let data=res.object;
  389 + if(data){
  390 + approverName.value=data.adminName;x
  391 + }
  392 + }
  393 + })
  394 + }
  395 + // 挂载完
  396 + Vue.onMounted(() => {
  397 + //定时器每秒调用一次fnDate()
  398 + timer.value=setInterval(function(){
  399 + getDateTime();
  400 + },1000);
  401 + getAlarmInfo();
  402 + })
  403 + Vue.onUnmounted(()=>{
  404 + timer.value=null;
  405 + })
524 return { 406 return {
525 - change,changetext,saveDetail,approver,approverName,detailText,detail,  
526 - options,changeApprover,inputValue,dynamicTags,inputVisible,handleClose,showInput,handleInputConfirm, 407 + change,changetext,saveDetail,approver,approverName,loginName,detailText,detail,repositoryInto,reason,citeCover,alarmType,
  408 + options,inputValue,dynamicTags,inputVisible,handleClose,showInput,handleInputConfirm,
527 getKeyword, timer,dateTime,getDateTime,timeFormat, 409 getKeyword, timer,dateTime,getDateTime,timeFormat,
528 title, dialogVisible, height, dataList, columns, closeDetail,okfunc, getPage,selectionChange,dynamicTagsAppend, 410 title, dialogVisible, height, dataList, columns, closeDetail,okfunc, getPage,selectionChange,dynamicTagsAppend,
529 showUserDialog,showUserDialogVisible,userFileRight,userList,selectUser,getUserList,titles, 411 showUserDialog,showUserDialogVisible,userFileRight,userList,selectUser,getUserList,titles,
530 - getAlarmInfo,alarmInfo,cascaderValue,propsTrigger,handleChange,cascaderOptions,noticeFlag 412 + getAlarmInfo,alarmInfo,cascaderValue,propsTrigger,handleChange,cascaderOptions,noticeFlag,
  413 + getUserByToken,getUser,cancleBtn,repositoryInfo,repositoryId
531 } 414 }
532 } 415 }
533 416
@@ -249,82 +249,101 @@ layui.define(['table', 'form', 'laydate', 'admin', 'layer', 'laytpl', 'common', @@ -249,82 +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";  
268 - });  
269 - }  
270 - /////////////////////////  
271 - // Start 将对象转成key=value&key1=value1 LSQ 2022/03/22  
272 - let urlParams='';  
273 - let paramsData=table.checkStatus('activewarningTable').data;  
274 - if (paramsData.length >1) {  
275 - layer.msg('只能选择一项数据', {icon: 7, time: 2000});  
276 - return;  
277 - }  
278 - let params=paramsData[0];  
279 - console.log("params",params)  
280 - for(let key in params){  
281 - if(params[key]){  
282 - urlParams+=key+'='+params[key]+'&' 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;
283 } 271 }
284 - }  
285 - urlParams=urlParams.substr(0,urlParams.length-1)  
286 - layer.open({  
287 - title: ['告警消除', 'font-size:18px;'],  
288 - type: 2,  
289 - area: ['80%', '90%'],  
290 - shadeClose: true,//开启遮罩层  
291 - id: 'alarms_clear_id',  
292 - // content: laytpl(res.body).render(JSON.stringify(params)),  
293 - content: ['/vue3/index.html#/alarmsClearEditor?'+urlParams, 'no'],  
294 - cancel: function () {  
295 - clearTimeout(); 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 + }
296 } 278 }
297 - }); 279 + urlParams=urlParams.substr(0,urlParams.length-1)+'&alarmType=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 + }
  291 + });
298 /////////////////////////// 292 ///////////////////////////
299 - /*layer.prompt({id: "alarms_clear_id", title: '告警消除', area: ['400px'], formType: 2,value: hisReason}, function (text, index) { 293 + }else{
  294 + //不开启闭环
  295 + //获取以往告警消除意见
300 admin.req({ 296 admin.req({
301 - url: common.domainName + '/api-web/home/alarm/clear'  
302 - , type: "post"  
303 - , data: {  
304 - ids: ids.toString(),  
305 - reason: text,  
306 - access_token: accessToken,  
307 - noticeFlag: $('input[name="noticeFlag"]:checked').val()  
308 - }  
309 - , done: function (res) {  
310 - //如果消除成功,关闭弹出框然后重新加载页面  
311 - if (res.success) {  
312 - layer.close(index);  
313 - layer.msg('告警已消除!', {icon: 1, time: 2000});  
314 - reloadTable();  
315 - } else {  
316 - 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 + });
317 } 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> ');
318 } 341 }
319 }); 342 });
320 - });  
321 -  
322 - $("#alarms_clear_id").find('textarea.layui-layer-input').attr("placeholder", clearReson);  
323 - $("#alarms_clear_id").append('<div style="padding-top: 15px;"><span>是否通知:</span> ' +  
324 - '<input type="radio" name="noticeFlag" value="true" title="是" >&nbsp;是' +  
325 - '<input type="radio" name="noticeFlag" value="false" title="否" checked="" style="margin-left: 20px;">&nbsp;否</div> ');*/ 343 + }
326 } 344 }
327 - }); 345 + })
  346 +
328 }); 347 });
329 //告警关闭 348 //告警关闭
330 $("#closeBtn").unbind('click').on("click", function () { 349 $("#closeBtn").unbind('click').on("click", function () {
@@ -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)+'&alarmType=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({