NEZ-2781 fix:Alert Message 二级列表 查询时间不会动态变化
This commit is contained in:
@@ -19,7 +19,7 @@
|
|||||||
<el-select v-model="state" class="margin-r-10" size="small" value-key="value" :disabled="from === fromRoute.alertSilence" @change="getTableData" popper-class="right-box-select-top right-public-box-dropdown-top" style="width: 110px">
|
<el-select v-model="state" class="margin-r-10" size="small" value-key="value" :disabled="from === fromRoute.alertSilence" @change="getTableData" popper-class="right-box-select-top right-public-box-dropdown-top" style="width: 110px">
|
||||||
<el-option v-for="item in stateOptions" :key="item.value" :label="$t(item.label)" :value="item.value"></el-option>
|
<el-option v-for="item in stateOptions" :key="item.value" :label="$t(item.label)" :value="item.value"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<pick-time v-model="searchTimeHeader" :default-pick="10" :refresh-data-func="getTableData" :show-empty="true" :use-chart-unit="false" :use-refresh="false" :sign="sign"></pick-time>
|
<pick-time ref="pickTime" v-model="searchTimeHeader" :default-pick="10" :refresh-data-func="getTableData" :show-empty="true" :use-chart-unit="false" :use-refresh="false" :sign="sign"></pick-time>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot>
|
<template v-slot>
|
||||||
<alertMessageTable
|
<alertMessageTable
|
||||||
@@ -630,7 +630,8 @@ export default {
|
|||||||
if (this.$refs.dataTable) {
|
if (this.$refs.dataTable) {
|
||||||
this.$refs.dataTable.$refs.dataTable.bodyWrapper.scrollTop = 0
|
this.$refs.dataTable.$refs.dataTable.bodyWrapper.scrollTop = 0
|
||||||
}
|
}
|
||||||
this.getTableData()
|
// this.getTableData()
|
||||||
|
this.$refs.pickTime && this.$refs.pickTime.$refs.timePicker.refresh()
|
||||||
},
|
},
|
||||||
fillProject (module) {
|
fillProject (module) {
|
||||||
this.$get('project', { id: module.projectId }).then(response => {
|
this.$get('project', { id: module.projectId }).then(response => {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
>
|
>
|
||||||
<template v-slot:title><span :title="obj.name">{{obj.name}}</span></template>
|
<template v-slot:title><span :title="obj.name">{{obj.name}}</span></template>
|
||||||
<template v-slot:top-tool-right>
|
<template v-slot:top-tool-right>
|
||||||
<el-input v-model="matchContent" class="margin-r-10" placeholder="" size="small" @keyup.enter.native="queryLogData()">
|
<el-input v-model="matchContent" class="margin-r-10" placeholder="" size="small" @keyup.enter.native="dateChange()">
|
||||||
<el-select slot="prepend" v-model="matchSymbol" class="symbol-select" size="small" style="width: 60px;">
|
<el-select slot="prepend" v-model="matchSymbol" class="symbol-select" size="small" style="width: 60px;">
|
||||||
<el-option value="|=">
|
<el-option value="|=">
|
||||||
<span style="font-family: Inter-Regular">|=</span>
|
<span style="font-family: Inter-Regular">|=</span>
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
<span style="font-family: Inter-Regular">!~</span>
|
<span style="font-family: Inter-Regular">!~</span>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<button slot="suffix" class="search-icon-btn"><i class="el-icon-search" @click="queryLogData()"></i></button>
|
<button slot="suffix" class="search-icon-btn"><i class="el-icon-search" @click="dateChange()"></i></button>
|
||||||
</el-input>
|
</el-input>
|
||||||
<pick-time id="explore" ref="pickTime" v-model="filterTime" :refresh-data-func="queryLogData" :sign="sign" :use-chart-unit="false" :use-refresh="false">
|
<pick-time id="explore" ref="pickTime" v-model="filterTime" :refresh-data-func="queryLogData" :sign="sign" :use-chart-unit="false" :use-refresh="false">
|
||||||
<template slot="added-text">{{$t('overall.query')}}</template>
|
<template slot="added-text">{{$t('overall.query')}}</template>
|
||||||
@@ -114,6 +114,9 @@ export default {
|
|||||||
reader.readAsText(error.response.data)
|
reader.readAsText(error.response.data)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
dateChange () {
|
||||||
|
this.$refs.pickTime && this.$refs.pickTime.$refs.timePicker.refresh()
|
||||||
|
},
|
||||||
queryLogData (limit = 100) { // log的chart和table是一个请求
|
queryLogData (limit = 100) { // log的chart和table是一个请求
|
||||||
this.loading = true
|
this.loading = true
|
||||||
if (this.expressions.length > 0) {
|
if (this.expressions.length > 0) {
|
||||||
|
|||||||
@@ -590,6 +590,10 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.isPopoverDisabled = false
|
this.isPopoverDisabled = false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
refresh () {
|
||||||
|
this.setSearchTime(this.nowTimeType.type, this.nowTimeType.value, this.searchTime)
|
||||||
|
this.$emit('change', this.searchTime)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -601,6 +605,7 @@ export default {
|
|||||||
if (showTime) {
|
if (showTime) {
|
||||||
this.showTime = Object.assign({}, showTime)
|
this.showTime = Object.assign({}, showTime)
|
||||||
this.searchTime = this.$parent.searchTime
|
this.searchTime = this.$parent.searchTime
|
||||||
|
this.nowTimeType = this.showTime
|
||||||
}
|
}
|
||||||
if (this.showEmpty && this.defaultPick === 12) {
|
if (this.showEmpty && this.defaultPick === 12) {
|
||||||
this.searchTime = []
|
this.searchTime = []
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<button id="asset-filter" :class="[dataListLayout.indexOf('clickSearch') > -1?'is-focus':'' ]" class="top-tool-btn margin-r-10" @click.stop="showClickSearch" :title="$t('dashboard.panel.chartForm.filter')">
|
<button id="asset-filter" :class="[dataListLayout.indexOf('clickSearch') > -1?'is-focus':'' ]" class="top-tool-btn margin-r-10" @click.stop="showClickSearch" :title="$t('dashboard.panel.chartForm.filter')">
|
||||||
<i class="nz-icon nz-icon-funnel"></i>
|
<i class="nz-icon nz-icon-funnel"></i>
|
||||||
</button>
|
</button>
|
||||||
<pick-time v-model="searchTime" sign="message" :default-pick="10" :refresh-data-func="getTableData" :show-empty="true" :use-chart-unit="false" :use-refresh="false"></pick-time>
|
<pick-time ref="pickTime" v-model="searchTime" sign="message" :default-pick="10" :refresh-data-func="getTableData" :show-empty="true" :use-chart-unit="false" :use-refresh="false"></pick-time>
|
||||||
<button id="roles-add" v-has="'alertMessage_view'" :title="$t('overall.exportExcel')" class="top-tool-btn margin-r-10" type="button" @click="showExportDialog">
|
<button id="roles-add" v-has="'alertMessage_view'" :title="$t('overall.exportExcel')" class="top-tool-btn margin-r-10" type="button" @click="showExportDialog">
|
||||||
<i class="nz-icon-download1 nz-icon"></i>
|
<i class="nz-icon-download1 nz-icon"></i>
|
||||||
</button>
|
</button>
|
||||||
@@ -1176,7 +1176,8 @@ export default {
|
|||||||
if (this.$refs.dataTable) {
|
if (this.$refs.dataTable) {
|
||||||
this.$refs.dataTable.$refs.dataTable.bodyWrapper.scrollTop = 0
|
this.$refs.dataTable.$refs.dataTable.bodyWrapper.scrollTop = 0
|
||||||
}
|
}
|
||||||
this.getTableData()
|
// this.getTableData()
|
||||||
|
this.$refs.pickTime && this.$refs.pickTime.$refs.timePicker.refresh()
|
||||||
},
|
},
|
||||||
computeDistance (str) {
|
computeDistance (str) {
|
||||||
let width = 0
|
let width = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user