mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-13 13:49:07 +00:00
fix: 修复ops 快捷命令搜索树不生效的问题
This commit is contained in:
@@ -148,12 +148,12 @@ export default {
|
|||||||
rootNodeAddDom(rootNode) {
|
rootNodeAddDom(rootNode) {
|
||||||
const { showSearch, showRefresh } = this.treeSetting
|
const { showSearch, showRefresh } = this.treeSetting
|
||||||
const searchIcon = `
|
const searchIcon = `
|
||||||
<a class="tree-action-btn" id='search-btn' onclick="onSearch()">
|
<a class="tree-action-btn" id="search-btn" onclick="onSearch()">
|
||||||
<i class='fa fa-search tree-banner-icon'></i>
|
<i class="fa fa-search tree-banner-icon"></i>
|
||||||
</a>`
|
</a>`
|
||||||
const refreshIcon = `
|
const refreshIcon = `
|
||||||
<a id='tree-refresh' class="tree-action-btn" onclick='refresh()'>
|
<a id="tree-refresh" class="tree-action-btn" onclick="refresh()">
|
||||||
<i class='fa fa-refresh'></i>
|
<i class="fa fa-refresh"></i>
|
||||||
</a>`
|
</a>`
|
||||||
const treeActions = `${showSearch ? searchIcon : ''}${showRefresh ? refreshIcon : ''}`
|
const treeActions = `${showSearch ? searchIcon : ''}${showRefresh ? refreshIcon : ''}`
|
||||||
const icons = `
|
const icons = `
|
||||||
@@ -306,7 +306,7 @@ export default {
|
|||||||
this.zTree.hideNodes(treeNodes)
|
this.zTree.hideNodes(treeNodes)
|
||||||
}
|
}
|
||||||
|
|
||||||
let treeUrl = this.treeSetting.treeUrl
|
let treeUrl = this.treeSetting.searchUrl ? this.treeSetting.searchUrl : this.treeSetting.treeUrl
|
||||||
const filterField = treeUrl.includes('?') ? `&search=${keyword}` : `?search=${keyword}`
|
const filterField = treeUrl.includes('?') ? `&search=${keyword}` : `?search=${keyword}`
|
||||||
if (treeUrl.indexOf('assets/nodes/children/tree') > -1) {
|
if (treeUrl.indexOf('assets/nodes/children/tree') > -1) {
|
||||||
treeUrl = treeUrl + '&all=all'
|
treeUrl = treeUrl + '&all=all'
|
||||||
@@ -336,14 +336,16 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang='scss' scoped>
|
<style lang="scss" scoped>
|
||||||
::-webkit-scrollbar-corner {
|
::-webkit-scrollbar-corner {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-scrollbar-track:horizontal {
|
::-webkit-scrollbar-track:horizontal {
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.rMenu {
|
div.rMenu {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
|
@@ -225,6 +225,7 @@ export default {
|
|||||||
},
|
},
|
||||||
treeSetting: {
|
treeSetting: {
|
||||||
treeUrl: '/api/v1/perms/users/self/nodes/children-with-assets/tree/',
|
treeUrl: '/api/v1/perms/users/self/nodes/children-with-assets/tree/',
|
||||||
|
searchUrl: '/api/v1/perms/users/self/assets/tree/',
|
||||||
showRefresh: true,
|
showRefresh: true,
|
||||||
showMenu: false,
|
showMenu: false,
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
|
Reference in New Issue
Block a user