Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
胡锦波
/
org-manager-web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b1a12bab
authored
Apr 07, 2022
by
胡锦波
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
1. init poid id存储处理
parent
4c250143
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
4 deletions
src/views/pages/common-header/common-header.vue
src/views/service/enterprise-host.ts
src/views/pages/common-header/common-header.vue
View file @
b1a12bab
...
...
@@ -33,6 +33,7 @@
OrganizationItemV2
,
}
from
"teammix-frame-element-vue"
;
import
{
UserController
}
from
"@/api/token"
;
import
EnterpriseHost
from
"@/views/service/enterprise-host"
;
@
Component
({
components
:
{
TeammixHeader
}
})
export
default
class
CommonHeader
extends
Vue
{
...
...
@@ -57,7 +58,7 @@
}
private
buildPublicHeader
()
{
const
comid
=
localStorage
.
getItem
(
"poid"
)
||
""
;
const
comid
=
EnterpriseHost
.
getPoid
()
;
this
.
headerOption
=
{
token
:
()
=>
UserController
.
getCurrentUserTokenHasBearer
(),
envir
:
this
.
getTeammixEnterPriseSelectorEnvironment
(),
...
...
@@ -76,9 +77,8 @@
}
private
onEnterpriseChanged
(
poid
:
string
,
item
:
OrganizationItemV2
)
{
localStorage
.
setItem
(
"poid"
,
poid
);
localStorage
.
setItem
(
"oid"
,
item
.
id
+
""
);
return
""
;
EnterpriseHost
.
setPoid
(
poid
);
EnterpriseHost
.
setOid
(
item
.
id
);
}
}
</
script
>
...
...
src/views/service/enterprise-host.ts
0 → 100644
View file @
b1a12bab
const
MANAGER_POID
=
'manager-poid'
;
const
MANAGER_OID
=
'manager-oid'
;
class
EnterpriseHost
{
public
static
setPoid
(
poid
:
number
|
string
)
{
localStorage
.
setItem
(
MANAGER_POID
,
poid
+
""
);
}
public
static
setOid
(
oid
:
number
|
string
)
{
localStorage
.
setItem
(
MANAGER_OID
,
oid
+
""
);
}
public
static
getPoid
()
{
return
localStorage
.
getItem
(
MANAGER_POID
)
||
""
;
}
public
static
getOid
()
{
return
localStorage
.
getItem
(
MANAGER_OID
)
||
""
;
}
public
static
clear
()
{
localStorage
.
removeItem
(
MANAGER_POID
);
localStorage
.
removeItem
(
MANAGER_OID
);
}
}
export
default
EnterpriseHost
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment