mirror of
https://github.com/jumpserver/lina.git
synced 2025-10-22 16:23:28 +00:00
@@ -410,7 +410,7 @@ export default {
|
||||
],
|
||||
canBulkDelete: vm.$hasPerm('accounts.delete_account'),
|
||||
searchConfig: {
|
||||
getUrlQuery: true,
|
||||
getUrlQuery: false,
|
||||
exclude: ['asset']
|
||||
},
|
||||
hasSearch: true
|
||||
|
@@ -112,7 +112,7 @@ export default {
|
||||
hasRightActions: false,
|
||||
hasLabelSearch: true,
|
||||
searchConfig: {
|
||||
getUrlQuery: true
|
||||
getUrlQuery: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -838,7 +838,7 @@ export default {
|
||||
if (!val) return
|
||||
this.page = defaultFirstPage
|
||||
// mounted处有updateForm的行为,所以至少在初始执行时要等到nextTick
|
||||
// this.$nextTick(this.getList)
|
||||
this.$nextTick(this.getList)
|
||||
},
|
||||
immediate: true
|
||||
},
|
||||
|
@@ -41,6 +41,7 @@
|
||||
|
||||
<script>
|
||||
import Page from '../Page/'
|
||||
import merge from 'webpack-merge'
|
||||
|
||||
const ACTIVE_TAB_KEY = 'activeTab'
|
||||
|
||||
@@ -61,8 +62,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
tabRouterQuery: {}
|
||||
loading: true
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -112,24 +112,15 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
handleTabClick(tab) {
|
||||
const name = tab.name
|
||||
this.$emit('tab-click', tab)
|
||||
this.$emit('update:activeMenu', name)
|
||||
this.$emit('update:activeMenu', tab.name)
|
||||
this.$cookie.set(ACTIVE_TAB_KEY, tab.name, 1)
|
||||
let newQuery = {}
|
||||
if (name in this.tabRouterQuery) {
|
||||
newQuery = this.tabRouterQuery[name]
|
||||
} else {
|
||||
const query = _.cloneDeep(this.$route.query)
|
||||
this.tabRouterQuery[this.iActiveMenu] = {
|
||||
...query,
|
||||
activeTab: this.iActiveMenu
|
||||
}
|
||||
newQuery = { activeTab: name }
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$router.replace({ query: newQuery })
|
||||
|
||||
if (this.$router.currentRoute.query[ACTIVE_TAB_KEY]) {
|
||||
this.$router.push({
|
||||
query: merge(this.$route.query, { [ACTIVE_TAB_KEY]: '' })
|
||||
})
|
||||
}
|
||||
},
|
||||
getPropActiveTab() {
|
||||
let activeTab = ''
|
||||
|
@@ -83,7 +83,7 @@ export default {
|
||||
hasImport: false,
|
||||
hasCreate: false,
|
||||
searchConfig: {
|
||||
getUrlQuery: true
|
||||
getUrlQuery: false
|
||||
},
|
||||
hasMoreActions: false
|
||||
},
|
||||
|
@@ -104,7 +104,7 @@ export default {
|
||||
hasMoreActions: false,
|
||||
createRoute: 'AccountGatherTaskCreate',
|
||||
searchConfig: {
|
||||
getUrlQuery: true
|
||||
getUrlQuery: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -135,7 +135,7 @@ export default {
|
||||
hasImport: false,
|
||||
hasCreate: false,
|
||||
searchConfig: {
|
||||
getUrlQuery: true
|
||||
getUrlQuery: false
|
||||
},
|
||||
hasMoreActions: false
|
||||
}
|
||||
|
@@ -39,7 +39,14 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
handleTabClick(tab) {
|
||||
this.$log.debug('Current nav is: ', tab.name)
|
||||
const query = _.cloneDeep(this.$route.query)
|
||||
const newQuery = {
|
||||
...query,
|
||||
activeTab: tab.name
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$router.replace({ query: newQuery })
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -29,8 +29,7 @@ export default {
|
||||
props: {
|
||||
object: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
}
|
||||
default: () => {}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -202,7 +201,7 @@ export default {
|
||||
hasLeftActions: false,
|
||||
hasColumnSetting: false,
|
||||
searchConfig: {
|
||||
getUrlQuery: true
|
||||
getUrlQuery: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -214,7 +214,7 @@ export default {
|
||||
},
|
||||
hasLabelSearch: true,
|
||||
searchConfig: {
|
||||
getUrlQuery: true
|
||||
getUrlQuery: false
|
||||
},
|
||||
extraMoreActions: [
|
||||
{
|
||||
|
@@ -89,7 +89,14 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
handleTabClick(tab) {
|
||||
this.$log.debug('Current nav is: ', tab.name)
|
||||
const query = _.cloneDeep(this.$route.query)
|
||||
const newQuery = {
|
||||
...query,
|
||||
activeTab: tab.name
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$router.replace({ query: newQuery })
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -68,7 +68,7 @@ export default {
|
||||
hasImport: false,
|
||||
hasMoreActions: false,
|
||||
searchConfig: {
|
||||
getUrlQuery: true
|
||||
getUrlQuery: false
|
||||
},
|
||||
moreCreates: {
|
||||
callback: (option) => {
|
||||
@@ -184,9 +184,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
createAccount(provider) {
|
||||
return () => {
|
||||
this.$router.push({ name: 'AccountCreate', query: { provider: provider }})
|
||||
}
|
||||
return () => { this.$router.push({ name: 'AccountCreate', query: { provider: provider }}) }
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -12,8 +12,7 @@ export default {
|
||||
props: {
|
||||
object: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
}
|
||||
default: () => {}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -28,7 +27,7 @@ export default {
|
||||
moreActionsTitle: this.$t('common.MoreActions'),
|
||||
moreActionsType: 'primary',
|
||||
searchConfig: {
|
||||
getUrlQuery: true
|
||||
getUrlQuery: false
|
||||
},
|
||||
extraMoreActions: [
|
||||
{
|
||||
|
@@ -13,8 +13,7 @@ export default {
|
||||
props: {
|
||||
object: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
}
|
||||
default: () => {}
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -26,7 +25,7 @@ export default {
|
||||
hasExport: false,
|
||||
hasSearch: true,
|
||||
searchConfig: {
|
||||
getUrlQuery: true
|
||||
getUrlQuery: false
|
||||
}
|
||||
},
|
||||
tableConfig: {
|
||||
|
@@ -45,7 +45,7 @@ export default {
|
||||
this.$emit('addResource')
|
||||
},
|
||||
searchConfig: {
|
||||
getUrlQuery: true
|
||||
getUrlQuery: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -70,7 +70,7 @@ export default {
|
||||
hasColumnSetting: false,
|
||||
hasSearch: false,
|
||||
searchConfig: {
|
||||
getUrlQuery: true
|
||||
getUrlQuery: false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -50,7 +50,7 @@ export default {
|
||||
formatter: function(row, column, cellValue, index) {
|
||||
const label = index + 1
|
||||
const route = { to: { name: 'SessionDetail', params: { id: row.id }}}
|
||||
return <router-link {...{ attrs: route }} class='link'>{label}</router-link>
|
||||
return <router-link {...{ attrs: route }} class='link'>{ label }</router-link>
|
||||
}
|
||||
},
|
||||
user: {
|
||||
@@ -162,18 +162,19 @@ export default {
|
||||
hasImport: false,
|
||||
hasDatePicker: true,
|
||||
searchConfig: {
|
||||
getUrlQuery: true,
|
||||
getUrlQuery: false,
|
||||
exclude: ['is_finished']
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {}
|
||||
methods: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.link {
|
||||
.link {
|
||||
color: var(--color-info);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
@@ -35,7 +35,7 @@ export default {
|
||||
},
|
||||
createTitle: this.$t('common.Upload'),
|
||||
searchConfig: {
|
||||
getUrlQuery: true,
|
||||
getUrlQuery: false,
|
||||
exclude: ['version']
|
||||
},
|
||||
extraActions: [
|
||||
|
@@ -28,7 +28,7 @@ export default {
|
||||
},
|
||||
createTitle: this.$t('common.Upload'),
|
||||
searchConfig: {
|
||||
getUrlQuery: true,
|
||||
getUrlQuery: false,
|
||||
exclude: ['version']
|
||||
},
|
||||
detailRoute: 'VirtualAppDetail',
|
||||
|
@@ -122,7 +122,7 @@ export default {
|
||||
hasImport: false,
|
||||
hasCreate: false,
|
||||
searchConfig: {
|
||||
getUrlQuery: true
|
||||
getUrlQuery: false
|
||||
},
|
||||
hasMoreActions: false
|
||||
},
|
||||
|
@@ -72,7 +72,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
handleTabClick(tab) {
|
||||
this.$log.debug('Current nav is: ', tab.name)
|
||||
this.$log.debug('Current nav is: ', this.config.activeMenu)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user