Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
4d60f347
Commit
4d60f347
authored
Oct 25, 2018
by
sherlock
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_oracle_sherlock' into 'dev_oracle'
bug:a19214 See merge request root/atms!152
parents
060fafe6
3389f798
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
82 additions
and
0 deletions
+82
-0
vatSessionService.js
.../src/main/webapp/app/framework/utils/vatSessionService.js
+82
-0
No files found.
atms-web/src/main/webapp/app/framework/utils/vatSessionService.js
0 → 100644
View file @
4d60f347
webservices
.
factory
(
'vatSessionService'
,
[
'$log'
,
'localStorageService'
,
function
(
$log
,
localStorageService
)
{
'use strict'
;
$log
.
debug
(
'vatSessionService.ctor()...'
);
var
date
=
new
Date
();
var
month
=
date
.
getMonth
();
var
projectyear
=
date
.
getFullYear
();
if
(
month
<=
0
)
{
month
=
1
;
}
var
logUser
=
{
ID
:
"66933E7B-DA75-4B2E-B7D6-AB65DCA20D50"
,
UserName
:
"Admin"
,
};
var
userPermission
=
{};
var
queryDto
=
{
searchKeyword
:
''
,
fieldId
:
''
,
filedName
:
'orgName'
,
checkedOrgs
:
{},
};
var
reset
=
function
()
{
var
date
=
new
Date
();
var
m
=
date
.
getMonth
();
if
(
m
<=
0
)
{
m
=
1
;
}
this
.
month
=
m
;
setProperty
(
"month"
,
m
);
};
var
cacheObj
=
{
month
:
month
,
userPermission
:
{},
project
:
{
year
:
2017
},
projects
:
[],
dataChanged
:
false
};
var
temp
=
localStorageService
.
get
(
'tesla-cache'
);
if
(
temp
)
{
cacheObj
=
temp
;
}
else
{
localStorageService
.
set
(
'tesla-cache'
,
cacheObj
);
}
var
setProperty
=
function
(
propertyName
,
propertyValue
)
{
cacheObj
[
propertyName
]
=
propertyValue
//$cookieStore.put('tesla-cache', JSON.stringify(apiTokenObj));
localStorageService
.
set
(
'tesla-cache'
,
cacheObj
);
}
var
getProperty
=
function
(
propertyName
)
{
//console.log($cookieStore.get('tesla-cache'));
return
cacheObj
[
propertyName
];
}
// 跳转到admin或者outputinvoice management 需要清空所选择的project,不然会影响权限
var
clearSelectProject
=
function
()
{
var
tempProject
=
{
year
:
2017
};
setProperty
(
'project'
,
tempProject
);
};
return
{
month
:
month
,
year
:
projectyear
,
project
:
{
year
:
2017
},
projects
:
[],
dataChanged
:
false
,
logUser
:
logUser
,
reset
:
reset
,
userPermission
:
userPermission
,
queryDto
:
queryDto
,
setProperty
:
setProperty
,
getProperty
:
getProperty
,
clearSelectProject
:
clearSelectProject
,
}
}]);
\ No newline at end of file
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