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
8b651d54
Commit
8b651d54
authored
Jul 27, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[dev] merger goserver
parent
9afa0ddd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
253 additions
and
192 deletions
+253
-192
app-overview.ctrl.js
...in/webapp/app/framework/app-overview/app-overview.ctrl.js
+133
-102
framework.js
atms-web/src/main/webapp/bundles/framework.js
+120
-90
No files found.
atms-web/src/main/webapp/app/framework/app-overview/app-overview.ctrl.js
View file @
8b651d54
...
@@ -723,109 +723,140 @@
...
@@ -723,109 +723,140 @@
}
}
}
}
$scope
.
goToService
=
function
(
project
)
{
$scope
.
goToService
=
function
(
project
)
{
if
(
!
project
.
clicked
)
{
if
(
!
project
.
clicked
)
{
project
.
clicked
=
true
;
project
.
clicked
=
true
;
$log
.
debug
(
'goToService()...'
);
$log
.
debug
(
'goToService()...'
);
serviceLogService
.
addEnterProjectLog
(
loginContext
.
displayUserName
,
'Enter project (id: '
+
project
.
id
+
', serviceType: '
+
project
.
serviceTypeID
+
')'
).
then
(
function
()
{
serviceLogService
.
addEnterProjectLog
(
loginContext
.
displayUserName
,
'Enter project (id: '
+
project
.
id
+
', serviceType: '
+
project
.
serviceTypeID
+
')'
).
then
(
function
()
{
if
(
project
.
serviceTypeID
===
enums
.
serviceType
.
AssetsManage
)
{
if
(
project
.
serviceTypeID
===
enums
.
serviceType
.
AssetsManage
)
{
$state
.
go
(
'assetsManage.importData.productItem'
);
$state
.
go
(
'assetsManage.importData.productItem'
);
assetsManageSessionService
.
product
.
fSetCode
=
project
.
fSetCode
;
assetsManageSessionService
.
product
.
fSetCode
=
project
.
fSetCode
;
assetsManageSessionService
.
product
.
productIDs
=
project
.
productIDs
;
assetsManageSessionService
.
product
.
productIDs
=
project
.
productIDs
;
assetsManageSessionService
.
project
.
organizationName
=
project
.
fSetName
;
assetsManageSessionService
.
project
.
organizationName
=
project
.
fSetName
;
assetsManageSessionService
.
project
.
id
=
project
.
id
;
assetsManageSessionService
.
project
.
id
=
project
.
id
;
assetsManageSessionService
.
project
.
serviceTypeID
=
project
.
serviceTypeID
;
assetsManageSessionService
.
project
.
serviceTypeID
=
project
.
serviceTypeID
;
//window.location.href = '/#/assetsManage/importData/productItem';
//window.location.href = '/#/assetsManage/importData/productItem';
}
}
else
{
else
if
(
project
.
serviceTypeID
===
enums
.
serviceType
.
VAT
)
{
if
(
project
.
haveCreateProject
)
{
if
(
project
.
haveCreateProject
)
{
if
(
_
.
isUndefined
(
project
.
projectStatusList
[
vatSessionService
.
month
]))
{
//如果当前期间还没有导入任何数据的话,就添加一条未开始状态的记录
if
(
_
.
isUndefined
(
project
.
projectStatusList
[
vatSessionService
.
month
]))
{
//如果当前期间还没有导入任何数据的话,就添加一条未开始状态的记录
projectService
.
setProjectStatus
(
project
.
dbName
,
vatSessionService
.
month
,
constant
.
ProjectStatusEnum
.
UnStarted
)
projectService
.
setProjectStatus
(
project
.
dbName
,
vatSessionService
.
month
,
constant
.
ProjectStatusEnum
.
UnStarted
)
.
success
(
function
(
or
)
{
.
success
(
function
(
or
)
{
if
(
or
.
result
)
{
if
(
or
.
result
)
{
//添加完成后,在vatSessionService.project中添加新加入的数据
//添加完成后,在vatSessionService.project中添加新加入的数据
project
.
projectStatusList
[
vatSessionService
.
month
]
=
constant
.
ProjectStatusEnum
.
UnStarted
;
project
.
projectStatusList
[
vatSessionService
.
month
]
=
constant
.
ProjectStatusEnum
.
UnStarted
;
vatSessionService
.
project
=
project
;
vatSessionService
.
project
=
project
;
goRightPath
(
project
);
if
(
project
.
serviceTypeID
===
enums
.
serviceType
.
CIT
)
{
}
citSessionService
.
year
=
$scope
.
currentSelectedYear
;
});
citSessionService
.
project
=
project
;
}
}
else
{
vatSessionService
.
project
=
citSessionService
.
project
=
project
;
//!!请把goRightPath()放在最内层的callback中,否则会在当前service没有执行完毕前就跳转到vat-layout.ctrl.js,
goRightPath
(
project
);
//从而造成一些bug
}
goRightPath
(
project
);
}
else
{
}
projectService
.
addProject
(
project
).
success
(
function
(
rsp
)
{
});
if
(
rsp
&&
rsp
.
result
)
{
}
project
.
haveCreateProject
=
true
;
else
{
project
.
dbName
=
rsp
.
dbname
;
vatSessionService
.
project
=
project
;
project
.
id
=
rsp
.
projectID
;
if
(
project
.
serviceTypeID
===
enums
.
serviceType
.
CIT
)
{
citSessionService
.
year
=
$scope
.
currentSelectedYear
;
if
(
_
.
isNull
(
project
.
projectStatusList
))
{
//如果当前期间还没有导入任何数据的话,就添加一条未开始状态的记录
citSessionService
.
project
=
project
;
projectService
.
setProjectStatus
(
project
.
dbName
,
vatSessionService
.
month
,
constant
.
ProjectStatusEnum
.
UnStarted
)
}
.
success
(
function
(
or
)
{
if
(
or
.
result
)
{
projectService
.
getProjectAllStatus
(
project
.
dbName
).
success
(
function
(
org
)
{
//添加完成后,在vatSessionService.project中添加新加入的数据
project
.
projectStatusList
=
org
;
projectService
.
getProjectStatus
(
project
.
dbName
,
project
.
id
,
vatSessionService
.
month
)
.
success
(
function
(
or1
)
{
if
(
or1
.
result
)
{
project
.
importSubStatus
=
or1
.
data
.
importSubStatus
;
vatSessionService
.
project
=
project
;
goRightPath
(
project
);
}
});
})
}
});
}
else
{
vatSessionService
.
project
=
project
;
goRightPath
(
project
);
}
}
else
{
SweetAlert
.
error
(
$translate
.
instant
(
'AddProjectFail'
));
}
});
}
}
else
{
// project.serviceTypeID === enums.serviceType.CIT
if
(
project
.
haveCreateProject
)
{
if
(
_
.
isUndefined
(
project
.
projectStatusList
[
enums
.
wholeYearPeriod
.
import
]))
{
//如果当前期间还没有导入任何数据的话,就添加一条未开始状态的记录
projectService
.
setProjectStatus
(
project
.
dbName
,
enums
.
wholeYearPeriod
.
import
,
constant
.
ProjectStatusEnum
.
UnStarted
)
.
success
(
function
(
or
)
{
if
(
or
.
result
)
{
//添加完成后,在vatSessionService.project中添加新加入的数据
project
.
projectStatusList
[
enums
.
wholeYearPeriod
.
import
]
=
constant
.
ProjectStatusEnum
.
UnStarted
;
vatSessionService
.
project
=
citSessionService
.
project
=
project
;
citSessionService
.
year
=
$scope
.
currentSelectedYear
;
goRightPath
(
project
);
}
});
}
else
{
vatSessionService
.
project
=
citSessionService
.
project
=
project
;
citSessionService
.
year
=
$scope
.
currentSelectedYear
;
goRightPath
(
project
);
}
}
else
{
projectService
.
addProject
(
project
).
success
(
function
(
rsp
)
{
if
(
rsp
&&
rsp
.
result
)
{
project
.
haveCreateProject
=
true
;
project
.
dbName
=
rsp
.
dbname
;
project
.
id
=
rsp
.
projectID
;
if
(
_
.
isNull
(
project
.
projectStatusList
))
{
//如果当前期间还没有导入任何数据的话,就添加一条未开始状态的记录
projectService
.
setProjectStatus
(
project
.
dbName
,
enums
.
wholeYearPeriod
.
import
,
constant
.
ProjectStatusEnum
.
UnStarted
)
.
success
(
function
(
or
)
{
if
(
or
.
result
)
{
projectService
.
getProjectAllStatus
(
project
.
dbName
).
success
(
function
(
org
)
{
//添加完成后,在vatSessionService.project中添加新加入的数据
project
.
projectStatusList
=
org
;
projectService
.
getProjectStatus
(
project
.
dbName
,
project
.
id
,
enums
.
wholeYearPeriod
.
import
)
.
success
(
function
(
or1
)
{
if
(
or1
.
result
)
{
project
.
importSubStatus
=
or1
.
data
.
importSubStatus
;
vatSessionService
.
project
=
citSessionService
.
project
=
project
;
citSessionService
.
year
=
$scope
.
currentSelectedYear
;
goRightPath
(
project
);
}
});
})
}
});
}
else
{
vatSessionService
.
project
=
citSessionService
.
project
=
project
;
citSessionService
.
year
=
$scope
.
currentSelectedYear
;
goRightPath
(
project
);
}
}
else
{
SweetAlert
.
error
(
$translate
.
instant
(
'AddProjectFail'
));
}
});
}
}
$timeout
(
function
()
{
project
.
clicked
=
false
;
},
1000
);
});
}
};
goRightPath
(
project
);
}
}
else
{
projectService
.
addProject
(
project
).
success
(
function
(
rsp
)
{
if
(
rsp
&&
rsp
.
result
)
{
project
.
haveCreateProject
=
true
;
project
.
dbName
=
rsp
.
dbname
;
project
.
id
=
rsp
.
projectID
;
if
(
_
.
isNull
(
project
.
projectStatusList
))
{
//如果当前期间还没有导入任何数据的话,就添加一条未开始状态的记录
projectService
.
setProjectStatus
(
project
.
dbName
,
vatSessionService
.
month
,
constant
.
ProjectStatusEnum
.
UnStarted
)
.
success
(
function
(
or
)
{
if
(
or
.
result
)
{
projectService
.
getProjectAllStatus
(
project
.
dbName
).
success
(
function
(
org
)
{
//添加完成后,在vatSessionService.project中添加新加入的数据
project
.
projectStatusList
=
org
;
projectService
.
getProjectStatus
(
project
.
dbName
,
project
.
id
,
vatSessionService
.
month
)
.
success
(
function
(
or1
)
{
if
(
or1
.
result
)
{
project
.
importSubStatus
=
or1
.
data
.
importSubStatus
;
vatSessionService
.
project
=
project
;
if
(
project
.
serviceTypeID
===
enums
.
serviceType
.
CIT
)
{
citSessionService
.
year
=
$scope
.
currentSelectedYear
;
citSessionService
.
project
=
project
;
}
goRightPath
(
project
);
}
});
})
}
});
}
else
{
vatSessionService
.
project
=
project
;
if
(
project
.
serviceTypeID
===
enums
.
serviceType
.
CIT
)
{
citSessionService
.
year
=
$scope
.
currentSelectedYear
;
citSessionService
.
project
=
project
;
}
goRightPath
(
project
);
}
}
else
{
SweetAlert
.
error
(
$translate
.
instant
(
'AddProjectFail'
));
}
});
}
}
$timeout
(
function
()
{
project
.
clicked
=
false
;
},
1000
);
});
}
};
$scope
.
toggleExpand
=
function
(
item
)
{
$scope
.
toggleExpand
=
function
(
item
)
{
item
.
expand
=
!
item
.
expand
;
item
.
expand
=
!
item
.
expand
;
...
...
atms-web/src/main/webapp/bundles/framework.js
View file @
8b651d54
...
@@ -1650,108 +1650,138 @@ frameworkModule.controller('appOverviewController', ['$rootScope', '$scope', '$t
...
@@ -1650,108 +1650,138 @@ frameworkModule.controller('appOverviewController', ['$rootScope', '$scope', '$t
}
}
$scope
.
goToService
=
function
(
project
)
{
$scope
.
goToService
=
function
(
project
)
{
if
(
!
project
.
clicked
)
{
if
(
!
project
.
clicked
)
{
project
.
clicked
=
true
;
project
.
clicked
=
true
;
$log
.
debug
(
'goToService()...'
);
$log
.
debug
(
'goToService()...'
);
serviceLogService
.
addEnterProjectLog
(
loginContext
.
displayUserName
,
'Enter project (id: '
+
project
.
id
+
', serviceType: '
+
project
.
serviceTypeID
+
')'
).
then
(
function
()
{
serviceLogService
.
addEnterProjectLog
(
loginContext
.
displayUserName
,
'Enter project (id: '
+
project
.
id
+
', serviceType: '
+
project
.
serviceTypeID
+
')'
).
then
(
function
()
{
if
(
project
.
serviceTypeID
===
enums
.
serviceType
.
AssetsManage
)
{
if
(
project
.
serviceTypeID
===
enums
.
serviceType
.
AssetsManage
)
{
$state
.
go
(
'assetsManage.importData.productItem'
);
$state
.
go
(
'assetsManage.importData.productItem'
);
assetsManageSessionService
.
product
.
fSetCode
=
project
.
fSetCode
;
assetsManageSessionService
.
product
.
fSetCode
=
project
.
fSetCode
;
assetsManageSessionService
.
product
.
productIDs
=
project
.
productIDs
;
assetsManageSessionService
.
product
.
productIDs
=
project
.
productIDs
;
assetsManageSessionService
.
project
.
organizationName
=
project
.
fSetName
;
assetsManageSessionService
.
project
.
organizationName
=
project
.
fSetName
;
assetsManageSessionService
.
project
.
id
=
project
.
id
;
assetsManageSessionService
.
project
.
id
=
project
.
id
;
assetsManageSessionService
.
project
.
serviceTypeID
=
project
.
serviceTypeID
;
assetsManageSessionService
.
project
.
serviceTypeID
=
project
.
serviceTypeID
;
//window.location.href = '/#/assetsManage/importData/productItem';
//window.location.href = '/#/assetsManage/importData/productItem';
}
}
else
{
else
if
(
project
.
serviceTypeID
===
enums
.
serviceType
.
VAT
)
{
if
(
project
.
haveCreateProject
)
{
if
(
project
.
haveCreateProject
)
{
if
(
_
.
isUndefined
(
project
.
projectStatusList
[
vatSessionService
.
month
]))
{
//如果当前期间还没有导入任何数据的话,就添加一条未开始状态的记录
if
(
_
.
isUndefined
(
project
.
projectStatusList
[
vatSessionService
.
month
]))
{
//如果当前期间还没有导入任何数据的话,就添加一条未开始状态的记录
projectService
.
setProjectStatus
(
project
.
dbName
,
vatSessionService
.
month
,
constant
.
ProjectStatusEnum
.
UnStarted
)
projectService
.
setProjectStatus
(
project
.
dbName
,
vatSessionService
.
month
,
constant
.
ProjectStatusEnum
.
UnStarted
)
.
success
(
function
(
or
)
{
.
success
(
function
(
or
)
{
if
(
or
.
result
)
{
if
(
or
.
result
)
{
//添加完成后,在vatSessionService.project中添加新加入的数据
//添加完成后,在vatSessionService.project中添加新加入的数据
project
.
projectStatusList
[
vatSessionService
.
month
]
=
constant
.
ProjectStatusEnum
.
UnStarted
;
project
.
projectStatusList
[
vatSessionService
.
month
]
=
constant
.
ProjectStatusEnum
.
UnStarted
;
vatSessionService
.
project
=
project
;
vatSessionService
.
project
=
project
;
goRightPath
(
project
);
if
(
project
.
serviceTypeID
===
enums
.
serviceType
.
CIT
)
{
}
citSessionService
.
year
=
$scope
.
currentSelectedYear
;
});
citSessionService
.
project
=
project
;
}
else
{
vatSessionService
.
project
=
citSessionService
.
project
=
project
;
goRightPath
(
project
);
}
}
else
{
projectService
.
addProject
(
project
).
success
(
function
(
rsp
)
{
if
(
rsp
&&
rsp
.
result
)
{
project
.
haveCreateProject
=
true
;
project
.
dbName
=
rsp
.
dbname
;
project
.
id
=
rsp
.
projectID
;
if
(
_
.
isNull
(
project
.
projectStatusList
))
{
//如果当前期间还没有导入任何数据的话,就添加一条未开始状态的记录
projectService
.
setProjectStatus
(
project
.
dbName
,
vatSessionService
.
month
,
constant
.
ProjectStatusEnum
.
UnStarted
)
.
success
(
function
(
or
)
{
if
(
or
.
result
)
{
projectService
.
getProjectAllStatus
(
project
.
dbName
).
success
(
function
(
org
)
{
//添加完成后,在vatSessionService.project中添加新加入的数据
project
.
projectStatusList
=
org
;
projectService
.
getProjectStatus
(
project
.
dbName
,
project
.
id
,
vatSessionService
.
month
)
.
success
(
function
(
or1
)
{
if
(
or1
.
result
)
{
project
.
importSubStatus
=
or1
.
data
.
importSubStatus
;
vatSessionService
.
project
=
project
;
goRightPath
(
project
);
}
});
})
}
});
}
}
else
{
//!!请把goRightPath()放在最内层的callback中,否则会在当前service没有执行完毕前就跳转到vat-layout.ctrl.js,
vatSessionService
.
project
=
project
;
//从而造成一些bug
goRightPath
(
project
);
goRightPath
(
project
);
}
}
}
else
{
SweetAlert
.
error
(
$translate
.
instant
(
'AddProjectFail'
));
}
});
});
}
else
{
vatSessionService
.
project
=
project
;
if
(
project
.
serviceTypeID
===
enums
.
serviceType
.
CIT
)
{
citSessionService
.
year
=
$scope
.
currentSelectedYear
;
citSessionService
.
project
=
project
;
}
goRightPath
(
project
);
}
}
else
{
projectService
.
addProject
(
project
).
success
(
function
(
rsp
)
{
if
(
rsp
&&
rsp
.
result
)
{
project
.
haveCreateProject
=
true
;
project
.
dbName
=
rsp
.
dbname
;
project
.
id
=
rsp
.
projectID
;
if
(
_
.
isNull
(
project
.
projectStatusList
))
{
//如果当前期间还没有导入任何数据的话,就添加一条未开始状态的记录
projectService
.
setProjectStatus
(
project
.
dbName
,
vatSessionService
.
month
,
constant
.
ProjectStatusEnum
.
UnStarted
)
.
success
(
function
(
or
)
{
if
(
or
.
result
)
{
projectService
.
getProjectAllStatus
(
project
.
dbName
).
success
(
function
(
org
)
{
//添加完成后,在vatSessionService.project中添加新加入的数据
project
.
projectStatusList
=
org
;
projectService
.
getProjectStatus
(
project
.
dbName
,
project
.
id
,
vatSessionService
.
month
)
.
success
(
function
(
or1
)
{
if
(
or1
.
result
)
{
project
.
importSubStatus
=
or1
.
data
.
importSubStatus
;
vatSessionService
.
project
=
project
;
if
(
project
.
serviceTypeID
===
enums
.
serviceType
.
CIT
)
{
citSessionService
.
year
=
$scope
.
currentSelectedYear
;
citSessionService
.
project
=
project
;
}
goRightPath
(
project
);
}
});
})
}
});
}
}
else
{
}
vatSessionService
.
project
=
project
;
else
{
// project.serviceTypeID === enums.serviceType.CIT
if
(
project
.
haveCreateProject
)
{
if
(
project
.
serviceTypeID
===
enums
.
serviceType
.
CIT
)
{
if
(
_
.
isUndefined
(
project
.
projectStatusList
[
enums
.
wholeYearPeriod
.
import
]))
{
//如果当前期间还没有导入任何数据的话,就添加一条未开始状态的记录
citSessionService
.
year
=
$scope
.
currentSelectedYear
;
projectService
.
setProjectStatus
(
project
.
dbName
,
enums
.
wholeYearPeriod
.
import
,
constant
.
ProjectStatusEnum
.
UnStarted
)
citSessionService
.
project
=
project
;
.
success
(
function
(
or
)
{
if
(
or
.
result
)
{
//添加完成后,在vatSessionService.project中添加新加入的数据
project
.
projectStatusList
[
enums
.
wholeYearPeriod
.
import
]
=
constant
.
ProjectStatusEnum
.
UnStarted
;
vatSessionService
.
project
=
citSessionService
.
project
=
project
;
citSessionService
.
year
=
$scope
.
currentSelectedYear
;
goRightPath
(
project
);
}
});
}
}
else
{
vatSessionService
.
project
=
citSessionService
.
project
=
project
;
citSessionService
.
year
=
$scope
.
currentSelectedYear
;
goRightPath
(
project
);
goRightPath
(
project
);
}
}
}
else
{
projectService
.
addProject
(
project
).
success
(
function
(
rsp
)
{
}
if
(
rsp
&&
rsp
.
result
)
{
else
{
project
.
haveCreateProject
=
true
;
SweetAlert
.
error
(
$translate
.
instant
(
'AddProjectFail'
));
project
.
dbName
=
rsp
.
dbname
;
project
.
id
=
rsp
.
projectID
;
if
(
_
.
isNull
(
project
.
projectStatusList
))
{
//如果当前期间还没有导入任何数据的话,就添加一条未开始状态的记录
projectService
.
setProjectStatus
(
project
.
dbName
,
enums
.
wholeYearPeriod
.
import
,
constant
.
ProjectStatusEnum
.
UnStarted
)
.
success
(
function
(
or
)
{
if
(
or
.
result
)
{
projectService
.
getProjectAllStatus
(
project
.
dbName
).
success
(
function
(
org
)
{
//添加完成后,在vatSessionService.project中添加新加入的数据
project
.
projectStatusList
=
org
;
projectService
.
getProjectStatus
(
project
.
dbName
,
project
.
id
,
enums
.
wholeYearPeriod
.
import
)
.
success
(
function
(
or1
)
{
if
(
or1
.
result
)
{
project
.
importSubStatus
=
or1
.
data
.
importSubStatus
;
vatSessionService
.
project
=
citSessionService
.
project
=
project
;
citSessionService
.
year
=
$scope
.
currentSelectedYear
;
goRightPath
(
project
);
}
});
})
}
});
}
else
{
vatSessionService
.
project
=
citSessionService
.
project
=
project
;
citSessionService
.
year
=
$scope
.
currentSelectedYear
;
goRightPath
(
project
);
}
}
else
{
SweetAlert
.
error
(
$translate
.
instant
(
'AddProjectFail'
));
}
});
}
}
}
$timeout
(
function
()
{
project
.
clicked
=
false
;
},
1000
);
});
});
}
}
}
};
$timeout
(
function
()
{
project
.
clicked
=
false
;
},
1000
);
});
}
};
$scope
.
toggleExpand
=
function
(
item
)
{
$scope
.
toggleExpand
=
function
(
item
)
{
item
.
expand
=
!
item
.
expand
;
item
.
expand
=
!
item
.
expand
;
...
...
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