fix: 修复右键资产树后点击切换到其他组织不生效问题

This commit is contained in:
“huailei000”
2022-07-18 15:09:18 +08:00
committed by 老广
parent 7921f1f9e5
commit 157bc08f84
2 changed files with 10 additions and 2 deletions

View File

@@ -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) {

View File

@@ -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)
}
}