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
dfcca34c
Commit
dfcca34c
authored
Apr 23, 2019
by
eddie.woo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
去掉workflow老接口
parent
8f6e1f5e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
246 additions
and
246 deletions
+246
-246
tb-ebit-form.ctrl.js
...b/src/main/webapp/app/analysis/table/tb-ebit-form.ctrl.js
+64
-64
cit-layout.ctrl.js
...web/src/main/webapp/app/cit/cit-layout/cit-layout.ctrl.js
+1
-1
cit-report-view.ctrl.js
...pp/app/cit/report/cit-report-view/cit-report-view.ctrl.js
+64
-64
vat-report-view.ctrl.js
...p/common/controls/vat-report-view/vat-report-view.ctrl.js
+64
-64
vatCommonService.js
...rc/main/webapp/app/common/vatservices/vatCommonService.js
+53
-53
No files found.
atms-web/src/main/webapp/app/analysis/table/tb-ebit-form.ctrl.js
View file @
dfcca34c
...
...
@@ -1716,27 +1716,27 @@
}
$rootScope
.
$broadcast
(
'statusChanged'
,
{
status
:
constant
.
ProjectStatusEnum
.
Completed
});
vatSessionService
.
project
.
projectStatusList
[
getActualPeriod
()]
=
constant
.
ProjectStatusEnum
.
Completed
;
vatWorkflowService
.
setProcessLog
(
constant
.
ProjectStatusEnum
.
Completed
,
vatSessionService
.
project
.
id
,
getActualPeriod
(),
constant
.
DictionaryDictKey
.
WFDeclarationComplete
,
enums
.
FinishStatusEnum
.
Finished
)
.
success
(
function
(
r2
)
{
//更新WorkflowTaskLog记录
if
(
!
r2
.
result
)
{
return
false
;
}
vatWorkflowService
.
addApproveReportLog
(
$scope
.
approveReportLogDto
)
.
success
(
function
(
r3
)
{
//添加WorkflowApproveReportLog记录
if
(
!
r3
.
result
)
{
return
false
;
}
vatWorkflowService
.
getWorkflowDetailByDb
(
vatSessionService
.
project
.
id
,
getActualPeriod
())
.
success
(
function
(
r4
)
{
//获取Workflow详细内容
if
(
r4
.
result
)
{
vatSessionService
.
project
.
workflow
=
r4
.
data
;
$log
.
debug
(
"$scope.declarationComplete : workflowData.result"
);
$log
.
debug
(
vatSessionService
.
project
.
workflow
);
setCompleteBtShow
();
}
})
})
})
//
vatWorkflowService.setProcessLog(constant.ProjectStatusEnum.Completed, vatSessionService.project.id, getActualPeriod(), constant.DictionaryDictKey.WFDeclarationComplete, enums.FinishStatusEnum.Finished)
//
.success(function (r2) { //更新WorkflowTaskLog记录
//
if (!r2.result) {
//
return false;
//
}
//
vatWorkflowService.addApproveReportLog($scope.approveReportLogDto)
//
.success(function (r3) { //添加WorkflowApproveReportLog记录
//
if (!r3.result) {
//
return false;
//
}
//
vatWorkflowService.getWorkflowDetailByDb(vatSessionService.project.id, getActualPeriod())
//
.success(function (r4) { //获取Workflow详细内容
//
if (r4.result) {
//
vatSessionService.project.workflow = r4.data;
//
$log.debug("$scope.declarationComplete : workflowData.result");
//
$log.debug(vatSessionService.project.workflow);
//
setCompleteBtShow();
//
}
//
})
//
})
//
})
});
}
else
{
swal
.
close
();
...
...
@@ -1808,49 +1808,49 @@
}
$rootScope
.
$broadcast
(
'statusChanged'
,
{
status
:
status
});
vatSessionService
.
project
.
projectStatusList
[
getActualPeriod
()]
=
status
;
vatWorkflowService
.
setProcessLog
(
status
,
vatSessionService
.
project
.
id
,
getActualPeriod
(),
dictKey
,
finishStatus
)
//更新WorkflowTaskLog记录
.
success
(
function
(
r2
)
{
if
(
!
r2
.
result
)
{
return
false
;
}
vatWorkflowService
.
addApproveReportLog
(
$scope
.
approveReportLogDto
)
//添加WorkflowApproveReportLog记录
.
success
(
function
(
r3
)
{
if
(
!
r3
.
result
)
{
return
false
;
}
vatWorkflowService
.
getWorkflowDetailByDb
(
vatSessionService
.
project
.
id
,
getActualPeriod
())
//获取Workflow详细内容
.
success
(
function
(
r4
)
{
if
(
r4
.
result
)
{
vatSessionService
.
project
.
workflow
=
r4
.
data
;
$log
.
debug
(
"workflowData.result"
);
$log
.
debug
(
vatSessionService
.
project
.
workflow
);
if
(
$scope
.
currentOperationTypeId
===
enums
.
vatLogOperationTypeEnum
.
SubmitReport
||
$scope
.
currentOperationTypeId
===
enums
.
vatLogOperationTypeEnum
.
WithdrawReport
)
{
setSubmitBtShow
();
setApproveBtShow
();
setCompleteBtShow
();
setRemarkBtShowAndTitle
();
}
if
(
$scope
.
currentOperationTypeId
===
enums
.
vatLogOperationTypeEnum
.
ApproveReport
||
$scope
.
currentOperationTypeId
===
enums
.
vatLogOperationTypeEnum
.
RejectReport
)
{
setSubmitBtShow
();
setApproveBtShow
();
setCompleteBtShow
();
setRemarkBtShowAndTitle
();
}
vatWorkflowService
.
addApproveMessage
(
$scope
.
approveMessageDto
)
.
success
(
function
(
r5
)
{
if
(
r5
.
result
)
{
$log
.
debug
(
"send report approve message successfully"
);
}
})
}
})
})
})
//
vatWorkflowService.setProcessLog(status, vatSessionService.project.id, getActualPeriod(), dictKey, finishStatus)//更新WorkflowTaskLog记录
//
.success(function (r2) {
//
if (!r2.result) {
//
return false;
//
}
//
vatWorkflowService.addApproveReportLog($scope.approveReportLogDto)//添加WorkflowApproveReportLog记录
//
.success(function (r3) {
//
if (!r3.result) {
//
return false;
//
}
//
vatWorkflowService.getWorkflowDetailByDb(vatSessionService.project.id, getActualPeriod())//获取Workflow详细内容
//
.success(function (r4) {
//
if (r4.result) {
//
vatSessionService.project.workflow = r4.data;
//
$log.debug("workflowData.result");
//
$log.debug(vatSessionService.project.workflow);
//
if ($scope.currentOperationTypeId === enums.vatLogOperationTypeEnum.SubmitReport ||
//
$scope.currentOperationTypeId === enums.vatLogOperationTypeEnum.WithdrawReport) {
//
setSubmitBtShow();
//
setApproveBtShow();
//
setCompleteBtShow();
//
setRemarkBtShowAndTitle();
//
//
}
//
//
if ($scope.currentOperationTypeId === enums.vatLogOperationTypeEnum.ApproveReport ||
//
$scope.currentOperationTypeId === enums.vatLogOperationTypeEnum.RejectReport) {
//
setSubmitBtShow();
//
setApproveBtShow();
//
setCompleteBtShow();
//
setRemarkBtShowAndTitle();
//
}
//
//
vatWorkflowService.addApproveMessage($scope.approveMessageDto)
//
.success(function (r5) {
//
if (r5.result) {
//
$log.debug("send report approve message successfully");
//
}
//
})
//
}
//
})
//
})
//
})
})
$scope
.
modalInstance
.
dismiss
(
'cancel'
);
}
...
...
atms-web/src/main/webapp/app/cit/cit-layout/cit-layout.ctrl.js
View file @
dfcca34c
...
...
@@ -591,7 +591,7 @@ citModule.controller('citLayoutController', ['$scope', '$rootScope', '$location'
function
initStatus
(
dbName
,
id
,
month
)
{
$q
.
all
([
projectService
.
getProjectStatus
(
dbName
,
id
,
month
),
vatWorkflowService
.
getWorkflowDetailByDb
(
dbName
,
month
)
//
vatWorkflowService.getWorkflowDetailByDb(dbName, month)
]).
then
(
function
(
result
)
{
var
statusData
=
result
[
0
].
data
;
var
workflowData
=
result
[
1
].
data
;
...
...
atms-web/src/main/webapp/app/cit/report/cit-report-view/cit-report-view.ctrl.js
View file @
dfcca34c
...
...
@@ -1981,27 +1981,27 @@
}
$rootScope
.
$broadcast
(
'statusChanged'
,
{
status
:
constant
.
ProjectStatusEnum
.
Completed
});
vatSessionService
.
project
.
projectStatusList
[
getActualPeriod
()]
=
constant
.
ProjectStatusEnum
.
Completed
;
vatWorkflowService
.
setProcessLog
(
constant
.
ProjectStatusEnum
.
Completed
,
vatSessionService
.
project
.
id
,
getActualPeriod
(),
constant
.
DictionaryDictKey
.
WFDeclarationComplete
,
enums
.
FinishStatusEnum
.
Finished
)
.
success
(
function
(
r2
)
{
//更新WorkflowTaskLog记录
if
(
!
r2
.
result
)
{
return
false
;
}
vatWorkflowService
.
addApproveReportLog
(
$scope
.
approveReportLogDto
)
.
success
(
function
(
r3
)
{
//添加WorkflowApproveReportLog记录
if
(
!
r3
.
result
)
{
return
false
;
}
vatWorkflowService
.
getWorkflowDetailByDb
(
vatSessionService
.
project
.
id
,
getActualPeriod
())
.
success
(
function
(
r4
)
{
//获取Workflow详细内容
if
(
r4
.
result
)
{
vatSessionService
.
project
.
workflow
=
r4
.
data
;
$log
.
debug
(
"$scope.declarationComplete : workflowData.result"
);
$log
.
debug
(
vatSessionService
.
project
.
workflow
);
setCompleteBtShow
();
}
})
})
})
//
vatWorkflowService.setProcessLog(constant.ProjectStatusEnum.Completed, vatSessionService.project.id, getActualPeriod(), constant.DictionaryDictKey.WFDeclarationComplete, enums.FinishStatusEnum.Finished)
//
.success(function (r2) { //更新WorkflowTaskLog记录
//
if (!r2.result) {
//
return false;
//
}
//
vatWorkflowService.addApproveReportLog($scope.approveReportLogDto)
//
.success(function (r3) { //添加WorkflowApproveReportLog记录
//
if (!r3.result) {
//
return false;
//
}
//
vatWorkflowService.getWorkflowDetailByDb(vatSessionService.project.id, getActualPeriod())
//
.success(function (r4) { //获取Workflow详细内容
//
if (r4.result) {
//
vatSessionService.project.workflow = r4.data;
//
$log.debug("$scope.declarationComplete : workflowData.result");
//
$log.debug(vatSessionService.project.workflow);
//
setCompleteBtShow();
//
}
//
})
//
})
//
})
});
}
else
{
swal
.
close
();
...
...
@@ -2073,49 +2073,49 @@
}
$rootScope
.
$broadcast
(
'statusChanged'
,
{
status
:
status
});
vatSessionService
.
project
.
projectStatusList
[
getActualPeriod
()]
=
status
;
vatWorkflowService
.
setProcessLog
(
status
,
vatSessionService
.
project
.
id
,
getActualPeriod
(),
dictKey
,
finishStatus
)
//更新WorkflowTaskLog记录
.
success
(
function
(
r2
)
{
if
(
!
r2
.
result
)
{
return
false
;
}
vatWorkflowService
.
addApproveReportLog
(
$scope
.
approveReportLogDto
)
//添加WorkflowApproveReportLog记录
.
success
(
function
(
r3
)
{
if
(
!
r3
.
result
)
{
return
false
;
}
vatWorkflowService
.
getWorkflowDetailByDb
(
vatSessionService
.
project
.
id
,
getActualPeriod
())
//获取Workflow详细内容
.
success
(
function
(
r4
)
{
if
(
r4
.
result
)
{
vatSessionService
.
project
.
workflow
=
r4
.
data
;
$log
.
debug
(
"workflowData.result"
);
$log
.
debug
(
vatSessionService
.
project
.
workflow
);
if
(
$scope
.
currentOperationTypeId
===
enums
.
vatLogOperationTypeEnum
.
SubmitReport
||
$scope
.
currentOperationTypeId
===
enums
.
vatLogOperationTypeEnum
.
WithdrawReport
)
{
setSubmitBtShow
();
setApproveBtShow
();
setCompleteBtShow
();
setRemarkBtShowAndTitle
();
}
if
(
$scope
.
currentOperationTypeId
===
enums
.
vatLogOperationTypeEnum
.
ApproveReport
||
$scope
.
currentOperationTypeId
===
enums
.
vatLogOperationTypeEnum
.
RejectReport
)
{
setSubmitBtShow
();
setApproveBtShow
();
setCompleteBtShow
();
setRemarkBtShowAndTitle
();
}
vatWorkflowService
.
addApproveMessage
(
$scope
.
approveMessageDto
)
.
success
(
function
(
r5
)
{
if
(
r5
.
result
)
{
$log
.
debug
(
"send report approve message successfully"
);
}
})
}
})
})
})
//
vatWorkflowService.setProcessLog(status, vatSessionService.project.id, getActualPeriod(), dictKey, finishStatus)//更新WorkflowTaskLog记录
//
.success(function (r2) {
//
if (!r2.result) {
//
return false;
//
}
//
vatWorkflowService.addApproveReportLog($scope.approveReportLogDto)//添加WorkflowApproveReportLog记录
//
.success(function (r3) {
//
if (!r3.result) {
//
return false;
//
}
//
vatWorkflowService.getWorkflowDetailByDb(vatSessionService.project.id, getActualPeriod())//获取Workflow详细内容
//
.success(function (r4) {
//
if (r4.result) {
//
vatSessionService.project.workflow = r4.data;
//
$log.debug("workflowData.result");
//
$log.debug(vatSessionService.project.workflow);
//
if ($scope.currentOperationTypeId === enums.vatLogOperationTypeEnum.SubmitReport ||
//
$scope.currentOperationTypeId === enums.vatLogOperationTypeEnum.WithdrawReport) {
//
setSubmitBtShow();
//
setApproveBtShow();
//
setCompleteBtShow();
//
setRemarkBtShowAndTitle();
//
//
}
//
//
if ($scope.currentOperationTypeId === enums.vatLogOperationTypeEnum.ApproveReport ||
//
$scope.currentOperationTypeId === enums.vatLogOperationTypeEnum.RejectReport) {
//
setSubmitBtShow();
//
setApproveBtShow();
//
setCompleteBtShow();
//
setRemarkBtShowAndTitle();
//
}
//
//
vatWorkflowService.addApproveMessage($scope.approveMessageDto)
//
.success(function (r5) {
//
if (r5.result) {
//
$log.debug("send report approve message successfully");
//
}
//
})
//
}
//
})
//
})
//
})
})
$scope
.
modalInstance
.
dismiss
(
'cancel'
);
}
...
...
atms-web/src/main/webapp/app/common/controls/vat-report-view/vat-report-view.ctrl.js
View file @
dfcca34c
...
...
@@ -1918,27 +1918,27 @@
}
$rootScope
.
$broadcast
(
'statusChanged'
,
{
status
:
constant
.
ProjectStatusEnum
.
Completed
});
vatSessionService
.
project
.
projectStatusList
[
getActualPeriod
()]
=
constant
.
ProjectStatusEnum
.
Completed
;
vatWorkflowService
.
setProcessLog
(
constant
.
ProjectStatusEnum
.
Completed
,
vatSessionService
.
project
.
id
,
getActualPeriod
(),
constant
.
DictionaryDictKey
.
WFDeclarationComplete
,
enums
.
FinishStatusEnum
.
Finished
)
.
success
(
function
(
r2
)
{
//更新WorkflowTaskLog记录
if
(
!
r2
.
result
)
{
return
false
;
}
vatWorkflowService
.
addApproveReportLog
(
$scope
.
approveReportLogDto
)
.
success
(
function
(
r3
)
{
//添加WorkflowApproveReportLog记录
if
(
!
r3
.
result
)
{
return
false
;
}
vatWorkflowService
.
getWorkflowDetailByDb
(
vatSessionService
.
project
.
id
,
getActualPeriod
())
.
success
(
function
(
r4
)
{
//获取Workflow详细内容
if
(
r4
.
result
)
{
vatSessionService
.
project
.
workflow
=
r4
.
data
;
$log
.
debug
(
"$scope.declarationComplete : workflowData.result"
);
$log
.
debug
(
vatSessionService
.
project
.
workflow
);
setCompleteBtShow
();
}
})
})
})
//
vatWorkflowService.setProcessLog(constant.ProjectStatusEnum.Completed, vatSessionService.project.id, getActualPeriod(), constant.DictionaryDictKey.WFDeclarationComplete, enums.FinishStatusEnum.Finished)
//
.success(function (r2) { //更新WorkflowTaskLog记录
//
if (!r2.result) {
//
return false;
//
}
//
vatWorkflowService.addApproveReportLog($scope.approveReportLogDto)
//
.success(function (r3) { //添加WorkflowApproveReportLog记录
//
if (!r3.result) {
//
return false;
//
}
//
vatWorkflowService.getWorkflowDetailByDb(vatSessionService.project.id, getActualPeriod())
//
.success(function (r4) { //获取Workflow详细内容
//
if (r4.result) {
//
vatSessionService.project.workflow = r4.data;
//
$log.debug("$scope.declarationComplete : workflowData.result");
//
$log.debug(vatSessionService.project.workflow);
//
setCompleteBtShow();
//
}
//
})
//
})
//
})
});
}
else
{
swal
.
close
();
...
...
@@ -2010,49 +2010,49 @@
}
$rootScope
.
$broadcast
(
'statusChanged'
,
{
status
:
status
});
vatSessionService
.
project
.
projectStatusList
[
getActualPeriod
()]
=
status
;
vatWorkflowService
.
setProcessLog
(
status
,
vatSessionService
.
project
.
id
,
getActualPeriod
(),
dictKey
,
finishStatus
)
//更新WorkflowTaskLog记录
.
success
(
function
(
r2
)
{
if
(
!
r2
.
result
)
{
return
false
;
}
vatWorkflowService
.
addApproveReportLog
(
$scope
.
approveReportLogDto
)
//添加WorkflowApproveReportLog记录
.
success
(
function
(
r3
)
{
if
(
!
r3
.
result
)
{
return
false
;
}
vatWorkflowService
.
getWorkflowDetailByDb
(
vatSessionService
.
project
.
id
,
getActualPeriod
())
//获取Workflow详细内容
.
success
(
function
(
r4
)
{
if
(
r4
.
result
)
{
vatSessionService
.
project
.
workflow
=
r4
.
data
;
$log
.
debug
(
"workflowData.result"
);
$log
.
debug
(
vatSessionService
.
project
.
workflow
);
if
(
$scope
.
currentOperationTypeId
===
enums
.
vatLogOperationTypeEnum
.
SubmitReport
||
$scope
.
currentOperationTypeId
===
enums
.
vatLogOperationTypeEnum
.
WithdrawReport
)
{
setSubmitBtShow
();
setApproveBtShow
();
setCompleteBtShow
();
setRemarkBtShowAndTitle
();
}
if
(
$scope
.
currentOperationTypeId
===
enums
.
vatLogOperationTypeEnum
.
ApproveReport
||
$scope
.
currentOperationTypeId
===
enums
.
vatLogOperationTypeEnum
.
RejectReport
)
{
setSubmitBtShow
();
setApproveBtShow
();
setCompleteBtShow
();
setRemarkBtShowAndTitle
();
}
vatWorkflowService
.
addApproveMessage
(
$scope
.
approveMessageDto
)
.
success
(
function
(
r5
)
{
if
(
r5
.
result
)
{
$log
.
debug
(
"send report approve message successfully"
);
}
})
}
})
})
})
//
vatWorkflowService.setProcessLog(status, vatSessionService.project.id, getActualPeriod(), dictKey, finishStatus)//更新WorkflowTaskLog记录
//
.success(function (r2) {
//
if (!r2.result) {
//
return false;
//
}
//
vatWorkflowService.addApproveReportLog($scope.approveReportLogDto)//添加WorkflowApproveReportLog记录
//
.success(function (r3) {
//
if (!r3.result) {
//
return false;
//
}
//
vatWorkflowService.getWorkflowDetailByDb(vatSessionService.project.id, getActualPeriod())//获取Workflow详细内容
//
.success(function (r4) {
//
if (r4.result) {
//
vatSessionService.project.workflow = r4.data;
//
$log.debug("workflowData.result");
//
$log.debug(vatSessionService.project.workflow);
//
if ($scope.currentOperationTypeId === enums.vatLogOperationTypeEnum.SubmitReport ||
//
$scope.currentOperationTypeId === enums.vatLogOperationTypeEnum.WithdrawReport) {
//
setSubmitBtShow();
//
setApproveBtShow();
//
setCompleteBtShow();
//
setRemarkBtShowAndTitle();
//
//
}
//
//
if ($scope.currentOperationTypeId === enums.vatLogOperationTypeEnum.ApproveReport ||
//
$scope.currentOperationTypeId === enums.vatLogOperationTypeEnum.RejectReport) {
//
setSubmitBtShow();
//
setApproveBtShow();
//
setCompleteBtShow();
//
setRemarkBtShowAndTitle();
//
}
//
//
vatWorkflowService.addApproveMessage($scope.approveMessageDto)
//
.success(function (r5) {
//
if (r5.result) {
//
$log.debug("send report approve message successfully");
//
}
//
})
//
}
//
})
//
})
//
})
})
$scope
.
modalInstance
.
dismiss
(
'cancel'
);
}
...
...
atms-web/src/main/webapp/app/common/vatservices/vatCommonService.js
View file @
dfcca34c
...
...
@@ -312,59 +312,59 @@
//数据导入,数据预览,数据整理layout: vat-import-layout.ctl.js
isLayoutMenuShow
:
function
(
dbName
,
month
,
nodeDicKeyValue
,
linkShort
,
menus
)
{
$log
.
debug
(
"start to isLayoutMenuShow"
);
$q
.
all
([
vatWorkflowService
.
getWorkflowDetailByDb
(
dbName
,
month
)]).
then
(
function
(
result
)
{
var
wfData
=
result
[
0
].
data
;
if
(
wfData
.
result
)
{
var
wf
=
wfData
.
data
;
if
(
_
.
isNull
(
wf
)
||
_
.
isUndefined
(
wf
))
{
//当前项目没有配置workflow,就忽略workflow的配置,全部显示
$
.
each
(
menus
,
function
(
index
,
m
)
{
m
.
show
=
true
;
});
}
else
{
var
wfNodesList
=
wf
.
workflowNodeList
;
var
nodeDto
=
_
.
where
(
wfNodesList
,
{
dictionaryKey
:
constant
.
DictionaryDictKey
[
nodeDicKeyValue
]
})[
0
];
if
(
!
_
.
isNull
(
nodeDto
)
&&
!
_
.
isUndefined
(
nodeDto
))
{
if
(
nodeDto
.
isActive
===
false
)
{
//Node不可用,全部隐藏
$
.
each
(
menus
,
function
(
index
,
m
)
{
m
.
show
=
false
;
});
}
else
{
var
taskMenus
=
[];
//存放已经处理过的menu name
$
.
each
(
nodeDto
.
workflowTaskList
,
function
(
index
,
item
)
{
var
menu
=
_
.
where
(
menus
,
{
name
:
enums
.
dictionaryKeyMenusMap
[
item
.
dictionaryKey
]
})[
0
];
if
(
!
_
.
isNull
(
menu
)
&&
!
_
.
isUndefined
(
menu
))
{
menu
.
show
=
item
.
isActive
;
taskMenus
.
push
(
menu
.
name
);
}
});
//没有配置过的Task对应的menu需要隐藏
$
.
each
(
menus
,
function
(
index
,
item
)
{
var
findResult
=
_
.
find
(
taskMenus
,
function
(
n
)
{
return
_
.
isEqual
(
n
,
item
.
name
);
});
if
(
!
findResult
)
{
item
.
show
=
false
;
}
});
}
//上一个节点未完成的话,弹出提示框
var
lastNodeDto
=
_
.
where
(
wfNodesList
,
{
orderIndex
:
nodeDto
.
orderIndex
-
1
})[
0
];
if
(
!
_
.
isNull
(
lastNodeDto
)
&&
!
_
.
isUndefined
(
lastNodeDto
))
{
//debug: only for debug
//lastNodeDto.isDone = false;
if
(
!
lastNodeDto
.
isDone
)
{
SweetAlert
.
warning
(
$translate
.
instant
(
'LastNodeIsNotFinished'
));
}
}
}
else
{
$log
.
debug
(
"nodeDto is undefined"
);
}
}
}
});
//
$q.all([vatWorkflowService.getWorkflowDetailByDb(dbName, month)]).then(function (result) {
//
var wfData = result[0].data;
//
if (wfData.result) {
//
var wf = wfData.data;
//
if (_.isNull(wf) || _.isUndefined(wf)) {//当前项目没有配置workflow,就忽略workflow的配置,全部显示
//
$.each(menus, function (index, m) { m.show = true; });
//
}
//
else {
// var wfNodesList = wf.workflowNodeList;
//
var nodeDto = _.where(wfNodesList, { dictionaryKey: constant.DictionaryDictKey[nodeDicKeyValue] })[0];
//
if (!_.isNull(nodeDto) && !_.isUndefined(nodeDto)) {
//
if (nodeDto.isActive === false) { //Node不可用,全部隐藏
//
$.each(menus, function (index, m) { m.show = false; });
//
}
//
else {
//
var taskMenus = [];//存放已经处理过的menu name
//
$.each(nodeDto.workflowTaskList, function (index, item) {
//
var menu = _.where(menus, { name: enums.dictionaryKeyMenusMap[item.dictionaryKey] })[0];
//
if (!_.isNull(menu) && !_.isUndefined(menu)) {
//
menu.show = item.isActive;
//
taskMenus.push(menu.name);
//
}
//
});
//
//
//没有配置过的Task对应的menu需要隐藏
//
$.each(menus, function (index, item) {
//
var findResult = _.find(taskMenus, function (n) {
//
return _.isEqual(n, item.name);
//
});
//
//
if (!findResult) {
//
item.show = false;
//
}
//
});
//
}
//
//
//上一个节点未完成的话,弹出提示框
//
var lastNodeDto = _.where(wfNodesList, { orderIndex: nodeDto.orderIndex - 1 })[0];
//
if (!_.isNull(lastNodeDto) && !_.isUndefined(lastNodeDto)) {
//
//debug: only for debug
//
//lastNodeDto.isDone = false;
//
if (!lastNodeDto.isDone) {
//
SweetAlert.warning($translate.instant('LastNodeIsNotFinished'));
//
}
//
}
//
}
//
else {
//
//
$log.debug("nodeDto is undefined");
//
}
//
}
//
}
//
});
$log
.
debug
(
"menus before return"
);
$log
.
debug
(
menus
);
...
...
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