fix: 去除 asset,alertMessage,endpoint 路由 url path 中无用参数

This commit is contained in:
@changcode
2021-12-27 15:41:58 +08:00
parent 28127e3653
commit 57f06c050d
3 changed files with 10 additions and 4 deletions

View File

@@ -735,7 +735,9 @@ export default {
...this.searchCheckBox
}
const path = this.fromRoute.alertMessage
this.updatePath(param, path)
const routePathParams = lodash.cloneDeep(param)
delete routePathParams.statistics
this.updatePath(routePathParams, path)
this.$get(this.url, { ...this.searchLabel, ...this.searchCheckBox }).then(response => {
this.tools.loading = false
if (response.code == 200) {

View File

@@ -190,6 +190,7 @@ import topToolMoreOptions from '@/components/common/popBox/topToolMoreOptions'
import alertSilenceBox from '@/components/common/rightBox/alertSilenceBox'
import detailViewTopSearch from '@/components/common/detailView/detailViewTopSearch'
import routerPathParams from '@/components/common/mixin/routerPathParams'
import lodash from 'lodash'
export default {
name: 'asset',
@@ -698,7 +699,9 @@ export default {
...this.searchCheckBox
}
const path = this.fromRoute.asset
this.updatePath(assetParam, path)
const routePathParams = lodash.cloneDeep(assetParam)
delete routePathParams.statistics
this.updatePath(routePathParams, path)
this.$get(this.url, { ...this.searchLabel, ...this.searchCheckBox }).then(response => {
this.tools.loading = false
if (response.code === 200) {
@@ -820,9 +823,9 @@ export default {
},
jsonKey: 'val'
},
statistics: {
stateIds: {
target: this.searchLabel,
propertyName: 'statistics',
propertyName: 'stateIds',
type: 'number',
isSearchInput: true,
defaultJson: {

View File

@@ -610,6 +610,7 @@ export default {
pathParam.state = this.selectValue.state
delete pathParam.metricsStates
delete pathParam.logsStates
delete pathParam.statistics
this.updatePath({ ...pathParam }, path)
this.$get(this.url, params).then(response => {
this.tools.loading = false