Merge branch 'dev-3.6' of https://git.mesalab.cn/nezha/nezha-fronted into dev-3.7
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="dateChange" :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
|
||||||
@@ -633,7 +633,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) {
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</div>
|
</div>
|
||||||
<el-input size="mini" v-model="searchStr" @focus="searchInputFocus" @keydown.native="keydown" @keyup.native="keyup" ref="searchStr" @keypress="keypress" :readonly="inputReadonly" @input="changeSearchStr"></el-input>
|
<el-input size="mini" v-model="searchStr" @focus="searchInputFocus" @keydown.native="keydown" @keyup.native="keyup" ref="searchStr" @keypress.native="keypress" :readonly="inputReadonly" @input="changeSearchStr"></el-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="search-content">
|
<div class="search-content">
|
||||||
@@ -119,6 +119,7 @@ export default {
|
|||||||
selectArr: [], // 已被选择的条件
|
selectArr: [], // 已被选择的条件
|
||||||
key: '', // 当前被选中的 key
|
key: '', // 当前被选中的 key
|
||||||
symbol: false, // 当前被选中的 symbol
|
symbol: false, // 当前被选中的 symbol
|
||||||
|
selectSymbolValue: '', // 当前被选中的 symbol 的值
|
||||||
value: '', // 当前被选中的 value
|
value: '', // 当前被选中的 value
|
||||||
keyShow: false, // key 的下拉
|
keyShow: false, // key 的下拉
|
||||||
symbolShow: false, // symbol 的下拉 显示根据key的类型 自定义的不包含 大于小于
|
symbolShow: false, // symbol 的下拉 显示根据key的类型 自定义的不包含 大于小于
|
||||||
@@ -209,6 +210,8 @@ export default {
|
|||||||
// console.log(e, 'keydown')
|
// console.log(e, 'keydown')
|
||||||
if (e.keyCode == 8 && !this.searchStr && this.selectArr.length) {
|
if (e.keyCode == 8 && !this.searchStr && this.selectArr.length) {
|
||||||
this.selectArr.pop()
|
this.selectArr.pop()
|
||||||
|
} else if (e.keyCode == 8) {
|
||||||
|
console.log(this.oldSearchStr, this.searchStr)
|
||||||
}
|
}
|
||||||
// 5
|
// 5
|
||||||
if (e.keyCode == 38) { // 向上
|
if (e.keyCode == 38) { // 向上
|
||||||
@@ -289,6 +292,7 @@ export default {
|
|||||||
},
|
},
|
||||||
selectSymbol (item) {
|
selectSymbol (item) {
|
||||||
this.symbol = true
|
this.symbol = true
|
||||||
|
this.selectSymbolValue = item.value
|
||||||
switch (item.value) {
|
switch (item.value) {
|
||||||
case '=' :
|
case '=' :
|
||||||
this.$refs.searchStr.focus()
|
this.$refs.searchStr.focus()
|
||||||
@@ -412,6 +416,7 @@ export default {
|
|||||||
key,
|
key,
|
||||||
value: [value]
|
value: [value]
|
||||||
})
|
})
|
||||||
|
this.setSearchList()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
removeSelectArr (index) {
|
removeSelectArr (index) {
|
||||||
|
|||||||
@@ -546,6 +546,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: {
|
||||||
@@ -557,6 +561,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,8 +18,8 @@
|
|||||||
<button id="asset-filter" :class="[dataListLayout.indexOf('clickSearch') > -1?'is-focus':'' ]" class="top-tool-btn margin-r-10" @click.stop="showClickSearch" :title="$t('dashboard.dashboard.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.dashboard.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="dataChange" :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_edit'" :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>
|
||||||
<top-tool-more-options
|
<top-tool-more-options
|
||||||
@@ -1209,7 +1209,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