Authored by 王涛

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

告警消除页面增加props.amId



See merge request !489
@@ -28,7 +28,7 @@ @@ -28,7 +28,7 @@
28 <div class="info-content-body"> 28 <div class="info-content-body">
29 <div class="content-body-info"> 29 <div class="content-body-info">
30 <div class="info-item"> 30 <div class="info-item">
31 - 同类型告警处理过程:monitor_xjic 31 + 同类型告警处理过程:{{processingData[0]}} <i class="el-icon-more"></i>
32 </div> 32 </div>
33 </div> 33 </div>
34 </div> 34 </div>
@@ -13,11 +13,34 @@ export default { @@ -13,11 +13,34 @@ export default {
13 }, 13 },
14 setup(props, {attrs, slots, emit}) { 14 setup(props, {attrs, slots, emit}) {
15 const {proxy} = Vue.getCurrentInstance(); 15 const {proxy} = Vue.getCurrentInstance();
  16 + //获取统计信息
16 let statisticsData=Vue.ref(''); 17 let statisticsData=Vue.ref('');
17 let getStatisticsData=()=>{ 18 let getStatisticsData=()=>{
18 - proxy.$http.post(`/api-web/bAlarmManage/alarm/statis`, {alarmId:props.alarmId}, function (res) { 19 + proxy.$http.get(`/api-web/bAlarmManage/alarm/statis`, {alarmId:props.alarmId}, function (res) {
19 if (res && res.code == 0) { 20 if (res && res.code == 0) {
20 - statisticsData.value=res.object 21 + if(res.object){
  22 + statisticsData.value=res.object
  23 + }
  24 + }else{
  25 + proxy.$global.showMsg(res.msg, 'warning');
  26 + }
  27 + })
  28 + }
  29 + //获取同类型告警处理过程
  30 + let processingData=Vue.ref('');
  31 + let getProcessing=()=>{
  32 + proxy.$http.get(`/api-web/bAlarmManage/alarm/course`, {alarmId:props.alarmId}, function (res) {
  33 + if (res && res.code == 0) {
  34 + if(res.data){
  35 + let arr=res.data;
  36 + let processArr=[];
  37 + arr.map(item=>{
  38 + processArr.push({
  39 +
  40 + })
  41 + })
  42 + processingData.value=res.data
  43 + }
21 }else{ 44 }else{
22 proxy.$global.showMsg(res.msg, 'warning'); 45 proxy.$global.showMsg(res.msg, 'warning');
23 } 46 }
@@ -27,11 +50,14 @@ export default { @@ -27,11 +50,14 @@ export default {
27 * 挂载完 50 * 挂载完
28 */ 51 */
29 Vue.onMounted(() => { 52 Vue.onMounted(() => {
30 - 53 + getStatisticsData();
  54 + getProcessing();
31 }) 55 })
32 return { 56 return {
33 getStatisticsData, 57 getStatisticsData,
34 - statisticsData 58 + statisticsData,
  59 + getProcessing,
  60 + processingData
35 } 61 }
36 } 62 }
37 } 63 }
@@ -82,12 +82,12 @@ export default { @@ -82,12 +82,12 @@ export default {
82 } 82 }
83 //禁用编辑功能 83 //禁用编辑功能
84 let setDisabled=(val)=>{ 84 let setDisabled=(val)=>{
85 - let value=true;  
86 - if(val==0){  
87 - value=false;  
88 - }else{  
89 - value=true;  
90 - } 85 + // let value=true;
  86 + // if(val==0){
  87 + // value=false;
  88 + // }else{
  89 + // value=true;
  90 + // }
91 elemText.value.attr('contenteditable',value) 91 elemText.value.attr('contenteditable',value)
92 } 92 }
93 93
@@ -88,9 +88,10 @@ @@ -88,9 +88,10 @@
88 <el-tooltip :content="'是否入知识库'" placement="top" v-if="!isExamine"> 88 <el-tooltip :content="'是否入知识库'" placement="top" v-if="!isExamine">
89 <el-switch 89 <el-switch
90 v-model="repositoryInto" 90 v-model="repositoryInto"
91 - active-value="1"  
92 - inactive-value="0" 91 +
93 /> 92 />
  93 + <!-- active-value="1"
  94 + inactive-value="0"-->
94 </el-tooltip> 95 </el-tooltip>
95 </div> 96 </div>
96 <div class="scheme-title"> 97 <div class="scheme-title">
@@ -126,7 +127,7 @@ @@ -126,7 +127,7 @@
126 placeholder="此处输入审核意见" 127 placeholder="此处输入审核意见"
127 /> 128 />
128 </div> 129 </div>
129 - <div class="alarmsClearTag" v-if="repositoryInto==1 && !isExamine"> 130 + <div class="alarmsClearTag" v-if="repositoryInto && !isExamine">
130 <div class="tag-keyword"> 131 <div class="tag-keyword">
131 关键字: 132 关键字:
132 <el-tag 133 <el-tag
@@ -156,7 +157,7 @@ @@ -156,7 +157,7 @@
156 157
157 </div> 158 </div>
158 159
159 - <div class="alarmsCover" v-if="repositoryId && repositoryInto==1 && !isExamine"> 160 + <div class="alarmsCover" v-if="repositoryId && repositoryInto && !isExamine">
160 <span class="radioLabel">引用是否覆盖:</span> 161 <span class="radioLabel">引用是否覆盖:</span>
161 <el-radio-group v-model="citeCover"> 162 <el-radio-group v-model="citeCover">
162 <el-radio :label="true"></el-radio> 163 <el-radio :label="true"></el-radio>
@@ -7,6 +7,10 @@ export default { @@ -7,6 +7,10 @@ export default {
7 type: Boolean, 7 type: Boolean,
8 default: false 8 default: false
9 }, 9 },
  10 + amId:{
  11 + type: String,
  12 + default: ''
  13 + }
10 }, 14 },
11 data () { 15 data () {
12 return { 16 return {
@@ -37,7 +41,7 @@ export default { @@ -37,7 +41,7 @@ export default {
37 detailText.value=val; 41 detailText.value=val;
38 } 42 }
39 //保存富文本内容 43 //保存富文本内容
40 - let repositoryInto=Vue.ref('1');//是否入知识库 44 + let repositoryInto=Vue.ref(true);//是否入知识库
41 let repositoryId=Vue.ref('');//知识库id 45 let repositoryId=Vue.ref('');//知识库id
42 let citeCover=Vue.ref(false);//是否覆盖 46 let citeCover=Vue.ref(false);//是否覆盖
43 let reason=Vue.ref('');//简要说明 47 let reason=Vue.ref('');//简要说明
@@ -46,25 +50,24 @@ export default { @@ -46,25 +50,24 @@ export default {
46 let saveDetail=(val)=>{ 50 let saveDetail=(val)=>{
47 let dynamicTagsStr=dynamicTags.value.join(','); 51 let dynamicTagsStr=dynamicTags.value.join(',');
48 let pcontent=detail.value; 52 let pcontent=detail.value;
49 - if(repositoryInto.value==0){ 53 + if(!repositoryInto.value){
50 pcontent=''; 54 pcontent='';
51 detailText.value='' 55 detailText.value=''
52 } 56 }
53 let params={ 57 let params={
54 - alarmId:alarmInfo.id, 58 + alarmId:alarmInfo.value.id,//告警id
55 pcontent:pcontent,//富文本详情 59 pcontent:pcontent,//富文本详情
56 status:val,//存储状态 0 草稿,1 审批中 2已审批 3驳回 60 status:val,//存储状态 0 草稿,1 审批中 2已审批 3驳回
57 approver:approverName.value,//审批人 61 approver:approverName.value,//审批人
58 // dateTime:dateTime.value,//当前时间 62 // dateTime:dateTime.value,//当前时间
59 keyword:dynamicTagsStr,//关键字 63 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已覆盖 64 + managetime:dateTime.value,//处理时间
  65 + managename:loginName.value,//处理人
  66 + repositoryinto:repositoryInto.value?1:0,//是否入知识库 1入,0不入
  67 + citecover:citeCover.value?1:0,//引用是否覆盖 0 未覆盖 1已覆盖
65 reason:reason.value,//消除原因 68 reason:reason.value,//消除原因
66 noticeFlag:noticeFlag.value?1:0,//是否通知 69 noticeFlag:noticeFlag.value?1:0,//是否通知
67 - alarmType:alarmInfo.alarmTypeCustom,//告警类型,active活动告警,his历史告警 70 + alarmType:alarmInfo.value.alarmTypeCustom,//告警类型,active活动告警,his历史告警
68 71
69 } 72 }
70 if(opinion.value){ 73 if(opinion.value){