mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-24 20:47:17 +00:00
perf: 创建、更新资产默认按照更新时间排序
This commit is contained in:
committed by
Jiangjie.Bai
parent
90659afc36
commit
822fa9714c
@@ -78,6 +78,17 @@ export default {
|
||||
})
|
||||
}
|
||||
return this.$axios[submitMethod](url, values)
|
||||
},
|
||||
onPerformSuccess(res, method) {
|
||||
const nextRoute = this.$router.push({ name: 'AssetList', params: { extraQuery: { order: '-date_updated' }}})
|
||||
switch (method) {
|
||||
case 'post':
|
||||
this.$message.success(this.$tc('common.createSuccessMsg'))
|
||||
return nextRoute
|
||||
case 'put':
|
||||
this.$message.success(this.$tc('common.updateSuccessMsg'))
|
||||
return nextRoute
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -67,6 +67,11 @@ export default {
|
||||
optionInfo: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
// url中需要添加额外的参数
|
||||
extraQuery: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -93,6 +98,7 @@ export default {
|
||||
}
|
||||
vm.$router.push(route)
|
||||
}
|
||||
const extraQuery = this.$route.params?.extraQuery || {}
|
||||
return {
|
||||
showPlatform: false,
|
||||
GatewayPort: 0,
|
||||
@@ -104,6 +110,10 @@ export default {
|
||||
app: 'assets',
|
||||
resource: 'asset'
|
||||
},
|
||||
extraQuery: {
|
||||
...extraQuery,
|
||||
...this.extraQuery
|
||||
},
|
||||
columnsExclude: ['spec_info', 'auto_info'],
|
||||
columnsShow: {
|
||||
min: ['name', 'address', 'actions'],
|
||||
|
Reference in New Issue
Block a user