mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-15 14:24:39 +00:00
Merge pull request #4312 from jumpserver/pr@dev@fix_quick_job
fixed: Fixed the issue that the shortcut command could not get the account
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
:placeholder="item.placeholder"
|
||||
class="inline-input"
|
||||
size="mini"
|
||||
clearable
|
||||
@change="handleInputChange(item)"
|
||||
@select="handleInputChange(item)"
|
||||
/>
|
||||
|
||||
@@ -120,20 +120,26 @@ export default {
|
||||
autoComplete: true,
|
||||
query: (query, cb) => {
|
||||
const { hosts, nodes } = this.getSelectedNodesAndHosts()
|
||||
if (hosts.length > 0 && nodes.length > 0) {
|
||||
this.$axios.post('/api/v1/ops/username-hints/', {
|
||||
nodes: nodes,
|
||||
assets: hosts,
|
||||
query: query
|
||||
}).then(data => {
|
||||
const ns = data.map(item => {
|
||||
return { value: item.username }
|
||||
})
|
||||
cb(ns)
|
||||
})
|
||||
} else {
|
||||
cb([])
|
||||
|
||||
if (hosts.length === 0) {
|
||||
this.$message.warning(`${this.$t('RequiredAssetOrNode')}`)
|
||||
return cb([])
|
||||
}
|
||||
|
||||
this.$axios.post('/api/v1/ops/username-hints/', {
|
||||
nodes: nodes,
|
||||
assets: hosts,
|
||||
query: query
|
||||
}).then(data => {
|
||||
if (Array.isArray(data) && data.length === 0) {
|
||||
this.$message.info(`${this.$t('NoAccountFound')}`)
|
||||
return cb([])
|
||||
}
|
||||
const ns = data.map(item => {
|
||||
return { value: item.username }
|
||||
})
|
||||
cb(ns)
|
||||
})
|
||||
}
|
||||
},
|
||||
options: [],
|
||||
|
||||
@@ -105,7 +105,7 @@ export default {
|
||||
activated() {
|
||||
setTimeout(() => {
|
||||
this.$refs.AssetTreeTable.$refs.TreeList.reloadTable()
|
||||
}, 300)
|
||||
}, 500)
|
||||
},
|
||||
methods: {
|
||||
handlePermBulkUpdate() {
|
||||
|
||||
Reference in New Issue
Block a user