mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-13 19:35:24 +00:00
fix: 修复右键资产树后点击切换到其他组织不生效问题
This commit is contained in:
@@ -155,8 +155,12 @@ export function formatDate(inputTime) {
|
||||
|
||||
const uuidPattern = /[0-9a-zA-Z\-]{36}/
|
||||
|
||||
export function hasUUID(s) {
|
||||
return s.search(uuidPattern) !== -1
|
||||
export function hasUUID(path) {
|
||||
const index = path.indexOf('?')
|
||||
if (index !== -1) {
|
||||
path = path.substring(0, index)
|
||||
}
|
||||
return path.search(uuidPattern) !== -1
|
||||
}
|
||||
|
||||
export function replaceUUID(s, n) {
|
||||
|
||||
@@ -26,6 +26,10 @@ async function changeOrg(org) {
|
||||
path = _.trimEnd(path, '/')
|
||||
location.href = path
|
||||
} else {
|
||||
const index = path.indexOf('?')
|
||||
if (index !== -1) {
|
||||
location.href = path.substring(0, index)
|
||||
}
|
||||
setTimeout(() => location.reload(), 400)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user