Authored by 王涛

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

告警消除页面审批人修改



See merge request !488
@@ -120,4 +120,8 @@ @@ -120,4 +120,8 @@
120 .detail_comments_title{ 120 .detail_comments_title{
121 text-align: left; 121 text-align: left;
122 padding-bottom: 10px; 122 padding-bottom: 10px;
  123 +}
  124 +.update-icon{
  125 + cursor: pointer;
  126 + color:#409EFF;
123 } 127 }
@@ -106,7 +106,8 @@ @@ -106,7 +106,8 @@
106 clearable 106 clearable
107 /> 107 />
108 </span> 108 </span>
109 - <span class="title-handle-per" v-if="!isExamine">审批人:{{approverName}} <el-button v-if="!isExamine" type="primary" @click="showUserDialog(true)" size="small">选择审批人</el-button> 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>-->
110 </span> 111 </span>
111 <span class="title-handle-per" v-if="!isExamine">时间:{{dateTime}}</span> 112 <span class="title-handle-per" v-if="!isExamine">时间:{{dateTime}}</span>
112 </div> 113 </div>
@@ -169,7 +170,7 @@ @@ -169,7 +170,7 @@
169 <el-button type="primary" @click="saveDetail(3)" v-if="isExamine" size="small">不通过</el-button> 170 <el-button type="primary" @click="saveDetail(3)" v-if="isExamine" size="small">不通过</el-button>
170 <el-button @click="cancleBtn" size="small">取消</el-button> 171 <el-button @click="cancleBtn" size="small">取消</el-button>
171 </div> 172 </div>
172 - <cm-userright title="审批人" :titles="titles" :showRole="false" :showGroup="false" :showDialogVisible="showUserDialogVisible" :selectedArr="userFileRight" :userArr="userList" :isUser="false" :showOrg="false" @callback="selectUser" 173 + <cm-userright title="审批人(不支持多人,多选默认取第一个人)" :titles="titles" :showRole="false" :showGroup="false" :showDialogVisible="showUserDialogVisible" :selectedArr="userFileRight" :userArr="userList" :isUser="false" :showOrg="false" @callback="selectUser"
173 @hideDialog="showUserDialog"></cm-userright> 174 @hideDialog="showUserDialog"></cm-userright>
174 <!--关键字提取列表--> 175 <!--关键字提取列表-->
175 <cm-dialog :title="title" width="60%" :showDialogVisible="dialogVisible" :showFooter="true" @okfunc="okfunc" @hidedialog="closeDetail" :showOkBtn="true"> 176 <cm-dialog :title="title" width="60%" :showDialogVisible="dialogVisible" :showFooter="true" @okfunc="okfunc" @hidedialog="closeDetail" :showOkBtn="true">
@@ -22,6 +22,7 @@ export default { @@ -22,6 +22,7 @@ export default {
22 //审批人 22 //审批人
23 let approver=Vue.ref(''); 23 let approver=Vue.ref('');
24 let approverName=Vue.ref('admin'); 24 let approverName=Vue.ref('admin');
  25 + let approverLabel=Vue.ref('admin');
25 //操作人 26 //操作人
26 let loginName=Vue.ref(''); 27 let loginName=Vue.ref('');
27 let options=Vue.ref([{value:'001',name:'admin'},{value:'002',name:'root'}]) 28 let options=Vue.ref([{value:'001',name:'admin'},{value:'002',name:'root'}])
@@ -59,7 +60,6 @@ export default { @@ -59,7 +60,6 @@ export default {
59 aralmid:alarmInfo.id,//告警id 60 aralmid:alarmInfo.id,//告警id
60 // manageTime:dateTime.value,//处理时间 61 // manageTime:dateTime.value,//处理时间
61 // manageName:loginName.value,//处理人 62 // manageName:loginName.value,//处理人
62 - // repositoryId:repositoryId.value,//引用知识库id  
63 repositoryInto:repositoryInto.value,//是否入知识库 1入,0不入 63 repositoryInto:repositoryInto.value,//是否入知识库 1入,0不入
64 citeCover:citeCover.value?1:0,//引用是否覆盖 0 未覆盖 1已覆盖 64 citeCover:citeCover.value?1:0,//引用是否覆盖 0 未覆盖 1已覆盖
65 reason:reason.value,//消除原因 65 reason:reason.value,//消除原因
@@ -70,6 +70,10 @@ export default { @@ -70,6 +70,10 @@ export default {
70 if(opinion.value){ 70 if(opinion.value){
71 params.opinion=opinion.value;//审批意见 71 params.opinion=opinion.value;//审批意见
72 } 72 }
  73 + if(repositoryId.value){
  74 + params.repositoryId=repositoryId.value;//引用知识库id
  75 +
  76 + }
73 proxy.$http.post(`/api-web/bAlarmManage/clearAlarm`, params, function (res) { 77 proxy.$http.post(`/api-web/bAlarmManage/clearAlarm`, params, function (res) {
74 if (res && res.code == 0) { 78 if (res && res.code == 0) {
75 proxy.$global.showMsg(res.msg, 'success'); 79 proxy.$global.showMsg(res.msg, 'success');
@@ -86,7 +90,7 @@ export default { @@ -86,7 +90,7 @@ export default {
86 90
87 //关键字标签 91 //关键字标签
88 const inputValue = Vue.ref('') 92 const inputValue = Vue.ref('')
89 - const dynamicTags = Vue.ref(['Tag 1', 'Tag 2', 'Tag 3']) 93 + const dynamicTags = Vue.ref(['服务器', '虚拟机'])
90 const inputVisible = Vue.ref(false) 94 const inputVisible = Vue.ref(false)
91 95
92 //tag标签 96 //tag标签
@@ -232,7 +236,7 @@ export default { @@ -232,7 +236,7 @@ export default {
232 // if (arr && arr.length > 0) { 236 // if (arr && arr.length > 0) {
233 // showUserDialogVisible.value = flg; 237 // showUserDialogVisible.value = flg;
234 // } 238 // }
235 - getUserList(); 239 + // getUserList();
236 showUserDialogVisible.value = flg; 240 showUserDialogVisible.value = flg;
237 241
238 } else { 242 } else {
@@ -244,8 +248,12 @@ export default { @@ -244,8 +248,12 @@ export default {
244 let userIds = userObj.user.map(function (v) { 248 let userIds = userObj.user.map(function (v) {
245 return v.username; 249 return v.username;
246 }); 250 });
  251 + let userNames = userObj.user.map(function (v) {
  252 + return v.nickname;
  253 + });
247 console.log("userIds",userObj) 254 console.log("userIds",userObj)
248 - approverName.value=userIds.join(',') 255 + approverName.value=userIds[0];
  256 + approverLabel.value=userNames[0];
249 257
250 } 258 }
251 259
@@ -394,13 +402,15 @@ export default { @@ -394,13 +402,15 @@ export default {
394 if (res && res.code == 0) { 402 if (res && res.code == 0) {
395 let data=res.object; 403 let data=res.object;
396 if(data){ 404 if(data){
397 - approverName.value=data.adminName; 405 + approverName.value=data.admin;
  406 + approverLabel.value=data.adminName;
398 } 407 }
399 } 408 }
400 }) 409 })
401 } 410 }
402 // 挂载完 411 // 挂载完
403 Vue.onMounted(() => { 412 Vue.onMounted(() => {
  413 + getUserList();
404 //定时器每秒调用一次fnDate() 414 //定时器每秒调用一次fnDate()
405 timer.value=setInterval(function(){ 415 timer.value=setInterval(function(){
406 getDateTime(); 416 getDateTime();
@@ -411,7 +421,7 @@ export default { @@ -411,7 +421,7 @@ export default {
411 timer.value=null; 421 timer.value=null;
412 }) 422 })
413 return { 423 return {
414 - change,changetext,saveDetail,approver,approverName,loginName,detailText,detail,repositoryInto,reason,citeCover,alarmType, 424 + change,changetext,saveDetail,approver,approverName,approverLabel,loginName,detailText,detail,repositoryInto,reason,citeCover,alarmType,
415 options,inputValue,dynamicTags,inputVisible,handleClose,showInput,handleInputConfirm, 425 options,inputValue,dynamicTags,inputVisible,handleClose,showInput,handleInputConfirm,
416 getKeyword, timer,dateTime,getDateTime,timeFormat, 426 getKeyword, timer,dateTime,getDateTime,timeFormat,
417 title, dialogVisible, height, dataList, columns, closeDetail,okfunc, getPage,selectionChange,dynamicTagsAppend, 427 title, dialogVisible, height, dataList, columns, closeDetail,okfunc, getPage,selectionChange,dynamicTagsAppend,