mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-01 06:58:01 +00:00
fixed: Fixed the shortcut command selection node issue
This commit is contained in:
@@ -35,6 +35,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import $ from '@/utils/jquery-vendor.js'
|
||||||
import AssetTreeTable from '@/components/Apps/AssetTreeTable'
|
import AssetTreeTable from '@/components/Apps/AssetTreeTable'
|
||||||
import QuickJobTerm from '@/views/ops/Adhoc/components/QuickJobTerm.vue'
|
import QuickJobTerm from '@/views/ops/Adhoc/components/QuickJobTerm.vue'
|
||||||
import CodeEditor from '@/components/Form/FormFields/CodeEditor'
|
import CodeEditor from '@/components/Form/FormFields/CodeEditor'
|
||||||
@@ -121,6 +122,8 @@ export default {
|
|||||||
query: (query, cb) => {
|
query: (query, cb) => {
|
||||||
const { hosts, nodes } = this.getSelectedNodesAndHosts()
|
const { hosts, nodes } = this.getSelectedNodesAndHosts()
|
||||||
|
|
||||||
|
console.log(hosts, nodes)
|
||||||
|
|
||||||
if (hosts.length === 0) {
|
if (hosts.length === 0) {
|
||||||
this.$message.warning(`${this.$t('RequiredAssetOrNode')}`)
|
this.$message.warning(`${this.$t('RequiredAssetOrNode')}`)
|
||||||
return cb([])
|
return cb([])
|
||||||
@@ -286,6 +289,14 @@ export default {
|
|||||||
view: {
|
view: {
|
||||||
dblClickExpand: false,
|
dblClickExpand: false,
|
||||||
showLine: true
|
showLine: true
|
||||||
|
},
|
||||||
|
callback: {
|
||||||
|
onCheck: function(_event, treeId, treeNode) {
|
||||||
|
const treeObj = $.fn.zTree.getZTreeObj(treeId)
|
||||||
|
if (treeNode.checked) {
|
||||||
|
treeObj.expandNode(treeNode, true, false, true)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
iShowTree: true
|
iShowTree: true
|
||||||
|
Reference in New Issue
Block a user