mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-30 05:42:19 +00:00
fix: 修复创建资产授权时资产、节点没有自动选择问题
This commit is contained in:
@@ -148,10 +148,10 @@ export default {
|
||||
if (treeNode.meta.type === 'node') {
|
||||
const nodeId = treeNode.meta.data.id
|
||||
url = setUrlParam(url, 'node_id', nodeId)
|
||||
url = setUrlParam(url, 'asset', '')
|
||||
url = setUrlParam(url, 'asset_id', '')
|
||||
} else if (treeNode.meta.type === 'asset') {
|
||||
const assetId = treeNode.meta.data?.id || treeNode.id
|
||||
url = setUrlParam(url, 'node', '')
|
||||
url = setUrlParam(url, 'node_id', '')
|
||||
url = setUrlParam(url, 'asset_id', assetId)
|
||||
} else if (treeNode.meta.type === 'category') {
|
||||
url = setUrlParam(url, 'category', treeNode.meta.category)
|
||||
|
||||
@@ -21,12 +21,12 @@ export default {
|
||||
},
|
||||
data() {
|
||||
const nodesInitial = []
|
||||
if (this.$route.query['node']) {
|
||||
nodesInitial.push(this.$route.query.node)
|
||||
if (this.$route.query['node_id']) {
|
||||
nodesInitial.push(this.$route.query.node_id)
|
||||
}
|
||||
const assetsInitial = []
|
||||
if (this.$route.query['asset']) {
|
||||
assetsInitial.push(this.$route.query.asset)
|
||||
if (this.$route.query['asset_id']) {
|
||||
assetsInitial.push(this.$route.query.asset_id)
|
||||
}
|
||||
return {
|
||||
initial: {
|
||||
|
||||
Reference in New Issue
Block a user