fix:修改silence的搜索框
This commit is contained in:
@@ -163,7 +163,7 @@
|
|||||||
<div v-show="clearSearchShow" class="clear-search" @click="clear_input">
|
<div v-show="clearSearchShow" class="clear-search" @click="clear_input">
|
||||||
<i class="nz-icon nz-icon-circle-close"></i>
|
<i class="nz-icon nz-icon-circle-close"></i>
|
||||||
</div>
|
</div>
|
||||||
<div :class="input_list?'input_list none':'input_list'" :style="'top:' + selectDom.top" @click="stop_click" id="input_list">
|
<div :class="input_list?'input_list none':'input_list'" :style="'top:' + selectDom.top" @click="stop_click" id="input_list" v-if="!single || (single&&searchLabelList.length==searchMsg.searchLabelList.length)">
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="(val,ind) in searchLabelList" @click="select_name(val.name,ind,val.id,val.type,val.label,val.disabled,val.readonly,$event)" :key="ind" :class="{'search-style-ind':searchStyleNum==ind,'is-disabled':val.disabled}">
|
<li v-for="(val,ind) in searchLabelList" @click="select_name(val.name,ind,val.id,val.type,val.label,val.disabled,val.readonly,$event)" :key="ind" :class="{'search-style-ind':searchStyleNum==ind,'is-disabled':val.disabled}">
|
||||||
<span>{{val.name}}</span>
|
<span>{{val.name}}</span>
|
||||||
@@ -374,7 +374,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
props:['searchMsg','defaultItem','defaultValue','inTransform','position'],
|
props:['searchMsg','defaultItem','defaultValue','inTransform','position','single'],
|
||||||
methods: {
|
methods: {
|
||||||
//dc
|
//dc
|
||||||
clearSearch() {
|
clearSearch() {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<div class="top-tool-main-right" :class="{'top-tool-main-right-to-left': bottomBox.showSubList}">
|
<div class="top-tool-main-right" :class="{'top-tool-main-right-to-left': bottomBox.showSubList}">
|
||||||
<div class="top-tool-search margin-r-20">
|
<div class="top-tool-search margin-r-20">
|
||||||
<search-input :searchMsg="searchMsg" @search="search"
|
<search-input :searchMsg="searchMsg" @search="search"
|
||||||
:bottomBox.inTransform="bottomBox.inTransform"></search-input>
|
:bottomBox.inTransform="bottomBox.inTransform" :single="true"></search-input>
|
||||||
</div>
|
</div>
|
||||||
<button :title="$t('overall.exportExcelLower')" @click="addSilence" type="button" v-has="'alertsilence_save'"
|
<button :title="$t('overall.exportExcelLower')" @click="addSilence" type="button" v-has="'alertsilence_save'"
|
||||||
class="nz-btn nz-btn-size-normal nz-btn-style-light" id="alert-list-export">
|
class="nz-btn nz-btn-size-normal nz-btn-style-light" id="alert-list-export">
|
||||||
@@ -57,8 +57,8 @@
|
|||||||
:label="item.label"
|
:label="item.label"
|
||||||
:show-overflow-tooltip="item.prop!=='matchers'"
|
:show-overflow-tooltip="item.prop!=='matchers'"
|
||||||
:sort-orders="['ascending', 'descending']"
|
:sort-orders="['ascending', 'descending']"
|
||||||
:sortable="$tableSet.sortableShow(item.prop,'alertRules')"
|
:sortable="$tableSet.sortableShow(item.prop,'alertSilence')"
|
||||||
:prop="$tableSet.propTitle(item.prop,'alertRules')"
|
:prop="$tableSet.propTitle(item.prop,'alertSilence')"
|
||||||
:width="item.width"
|
:width="item.width"
|
||||||
>
|
>
|
||||||
<template slot-scope="scope" :column="item">
|
<template slot-scope="scope" :column="item">
|
||||||
@@ -207,15 +207,33 @@
|
|||||||
searchLabelList:[
|
searchLabelList:[
|
||||||
{
|
{
|
||||||
id:11,
|
id:11,
|
||||||
name:this.$t('config.terminallog.host'),
|
name:this.$t('alert.silence.datacenter'),
|
||||||
type:'input',
|
type:'input',
|
||||||
label:'host',
|
label:'datacenter',
|
||||||
disabled:false
|
disabled:false
|
||||||
},{
|
},{
|
||||||
id:12,
|
id:12,
|
||||||
name:this.$t('config.terminallog.user'),
|
name:this.$t('alert.silence.project'),
|
||||||
type:'input',
|
type:'input',
|
||||||
label:'username',
|
label:'project',
|
||||||
|
disabled:false
|
||||||
|
},{
|
||||||
|
id:13,
|
||||||
|
name:this.$t('alert.silence.module'),
|
||||||
|
type:'input',
|
||||||
|
label:'module',
|
||||||
|
disabled:false
|
||||||
|
},{
|
||||||
|
id:14,
|
||||||
|
name:this.$t('alert.silence.endpoint'),
|
||||||
|
type:'input',
|
||||||
|
label:'endpoint',
|
||||||
|
disabled:false
|
||||||
|
},{
|
||||||
|
id:15,
|
||||||
|
name:this.$t('alert.silence.asset'),
|
||||||
|
type:'input',
|
||||||
|
label:'asset ',
|
||||||
disabled:false
|
disabled:false
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -331,7 +349,7 @@
|
|||||||
this.$set(this.searchLabel,"pageNo",this.pageObj.pageNo);
|
this.$set(this.searchLabel,"pageNo",this.pageObj.pageNo);
|
||||||
this.$set(this.searchLabel,"pageSize",this.pageObj.pageSize);
|
this.$set(this.searchLabel,"pageSize",this.pageObj.pageSize);
|
||||||
this.tools.loading=true;
|
this.tools.loading=true;
|
||||||
this.$get('/alert/silence',this.searchLabel).then(response=>{
|
this.$get('alert/silence',this.searchLabel).then(response=>{
|
||||||
this.tools.loading=false;
|
this.tools.loading=false;
|
||||||
if(response.code==200){
|
if(response.code==200){
|
||||||
this.tableData=response.data.list;
|
this.tableData=response.data.list;
|
||||||
@@ -365,17 +383,14 @@
|
|||||||
this.pageObj.pageNo=1;
|
this.pageObj.pageNo=1;
|
||||||
for(let item in searchObj){
|
for(let item in searchObj){
|
||||||
if(searchObj[item]){
|
if(searchObj[item]){
|
||||||
if(item=="alertMessageState"){
|
this.$set(this.searchLabel,'type',item);
|
||||||
this.$set(this.searchLabel,"state",searchObj[item]);
|
this.$set(this.searchLabel,'query',searchObj[item]);
|
||||||
}else{
|
|
||||||
this.$set(this.searchLabel,item,searchObj[item]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(orderBy){
|
if(orderBy){
|
||||||
this.$set(this.searchLabel,'orderBy',orderBy);
|
this.$set(this.searchLabel,'orderBy',orderBy);
|
||||||
}
|
}
|
||||||
this.$refs.alertMessageTable.$refs.alertListTable.bodyWrapper.scrollTop=0;
|
this.$refs.alertSilenceTable.bodyWrapper.scrollTop=0;
|
||||||
this.getAlertSilence();
|
this.getAlertSilence();
|
||||||
},
|
},
|
||||||
// 数据排序
|
// 数据排序
|
||||||
@@ -422,7 +437,7 @@
|
|||||||
},
|
},
|
||||||
edit(row){
|
edit(row){
|
||||||
console.log(123123123123);
|
console.log(123123123123);
|
||||||
this.$get('/alert/silence/'+row.id).then(res=>{
|
this.$get('alert/silence/'+row.id).then(res=>{
|
||||||
this.alertSilence={...res.data};
|
this.alertSilence={...res.data};
|
||||||
this.rightBox.show=true;
|
this.rightBox.show=true;
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user