mirror of
https://github.com/jumpserver/lina.git
synced 2025-11-22 19:37:54 +00:00
Compare commits
1 Commits
v4.10.13
...
repr@dev_v
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
200b83c105 |
@@ -124,6 +124,9 @@ export default {
|
|||||||
return this.iHasLeftActions ? 'right' : 'left'
|
return this.iHasLeftActions ? 'right' : 'left'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
created() {
|
||||||
|
this.$emit('done')
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleTagSearch(val) {
|
handleTagSearch(val) {
|
||||||
this.searchTable(val)
|
this.searchTable(val)
|
||||||
|
|||||||
@@ -8,9 +8,11 @@
|
|||||||
:selected-rows="selectedRows"
|
:selected-rows="selectedRows"
|
||||||
:table-url="tableUrl"
|
:table-url="tableUrl"
|
||||||
v-bind="iHeaderActions"
|
v-bind="iHeaderActions"
|
||||||
|
@done="handleActionInitialDone"
|
||||||
/>
|
/>
|
||||||
<IBox class="table-content">
|
<IBox class="table-content">
|
||||||
<AutoDataTable
|
<AutoDataTable
|
||||||
|
v-if="actionInit"
|
||||||
ref="dataTable"
|
ref="dataTable"
|
||||||
:config="iTableConfig"
|
:config="iTableConfig"
|
||||||
:filter-table="filter"
|
:filter-table="filter"
|
||||||
@@ -73,9 +75,11 @@ export default {
|
|||||||
return {
|
return {
|
||||||
selectedRows: [],
|
selectedRows: [],
|
||||||
init: false,
|
init: false,
|
||||||
extraQuery: extraQuery,
|
|
||||||
urlUpdated: {},
|
urlUpdated: {},
|
||||||
isDeactivated: false
|
isDeactivated: false,
|
||||||
|
extraQuery: extraQuery,
|
||||||
|
actionInit: this.headerActions.has === false,
|
||||||
|
initQuery: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -203,13 +207,35 @@ export default {
|
|||||||
}, 500)
|
}, 500)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleActionInitialDone() {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.actionInit = true
|
||||||
|
}, 100)
|
||||||
|
},
|
||||||
handleSelectionChange(val) {
|
handleSelectionChange(val) {
|
||||||
this.selectedRows = val
|
this.selectedRows = val
|
||||||
},
|
},
|
||||||
reloadTable() {
|
reloadTable() {
|
||||||
this.dataTable?.getList()
|
this.dataTable?.getList()
|
||||||
},
|
},
|
||||||
|
updateInitQuery(attrs) {
|
||||||
|
if (!this.actionInit) {
|
||||||
|
this.initQuery = attrs
|
||||||
|
for (const key in attrs) {
|
||||||
|
this.$set(this.extraQuery, key, attrs[key])
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
const removeKeys = Object.keys(this.initQuery).filter(key => !attrs[key])
|
||||||
|
for (const key of removeKeys) {
|
||||||
|
this.$delete(this.extraQuery, key)
|
||||||
|
}
|
||||||
|
},
|
||||||
search(attrs) {
|
search(attrs) {
|
||||||
|
const init = this.updateInitQuery(attrs)
|
||||||
|
if (init) {
|
||||||
|
return
|
||||||
|
}
|
||||||
this.$log.debug('ListTable: search table', attrs)
|
this.$log.debug('ListTable: search table', attrs)
|
||||||
this.$emit('TagSearch', attrs)
|
this.$emit('TagSearch', attrs)
|
||||||
this.$refs.dataTable?.$refs.dataTable?.search(attrs, true)
|
this.$refs.dataTable?.$refs.dataTable?.search(attrs, true)
|
||||||
|
|||||||
Reference in New Issue
Block a user