Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
check
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_web
check
Commits
79ba6233
Commit
79ba6233
authored
Oct 20, 2022
by
NGO THI HONG
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implement pickup html
parent
5e8b2296
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
710 additions
and
0 deletions
+710
-0
abvw/html/pickup.html
+272
-0
abvw/js/pickup/pickup.js
+438
-0
No files found.
abvw/html/pickup.html
0 → 100644
View file @
79ba6233
<!DOCTYPE html>
<html
lang=
"ja-JP"
>
<head>
<meta
charset=
"utf-8"
>
<title>
ピックアップ
</title>
<meta
name=
"viewport"
content=
"width=device-width,minimum-scale=1,initial-scale=1"
>
<!-- favicons -->
<link
href=
"../common/img/favicon.ico"
rel=
"icon"
>
<link
href=
"../common/img/apple-touch-icon.png"
rel=
"apple-touch-icon"
>
<!-- main css -->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../common/css/newdash/app.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../common/css/newdash/header.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../common/css/newdash/style.css"
>
<!-- vender css -->
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../common/css/newdash/fontawesome_relative_path.css"
>
<!-- main js -->
<script
type=
"text/javascript"
src=
"../js/pickup/pickup.js"
></script>
</head>
<body
onload=
"PICKUP.init();"
>
<!-- header -->
<?php include('common/header.html');?>
<!-- pickup -->
<main>
<div
class=
"container"
>
<!-- breadcrumb -->
<nav
aria-label=
"breadcrumb"
>
<ol
class=
"breadcrumb px-0 mb-0"
>
<li
class=
"breadcrumb-item"
><a
href=
"dashboard.html"
class=
"text-decoration-none text-underline"
>
ダッシュボード
</a></li>
<li
class=
"breadcrumb-item active"
aria-current=
"page"
><span>
ピックアップ
</span></li>
</ol>
</nav>
<!-- title -->
<h1
class=
"fs-14 font-weight-bold pt-sm-4 pt-2 pb-3 mb-0"
>
ピックアップ
</h1>
<!-- tab -->
<ul
class=
"nav nav-tabs line"
id=
"myTab"
role=
"tablist"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link active"
data-toggle=
"tab"
href=
"#tab1"
role=
"tab"
aria-controls=
"tab1"
aria-expanded=
"true"
>
<div
class=
"text-center"
>
新規追加
</div>
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
data-toggle=
"tab"
href=
"#tab2"
role=
"tab"
aria-controls=
"tab2"
>
<div
class=
"text-center"
>
工程作業
</div>
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
data-toggle=
"tab"
href=
"#tab3"
role=
"tab"
aria-controls=
"tab3"
>
<div
class=
"text-center"
>
警告を含む報告
</div>
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
data-toggle=
"tab"
href=
"#tab4"
role=
"tab"
aria-controls=
"tab4"
>
<div
class=
"text-center"
>
0件表示パターン
</div>
</a>
</li>
</ul>
<!-- tab content-->
<!-- new -->
<div
class=
"tab-content"
id=
"myTabContent"
>
<div
class=
"tab-pane fade show active"
id=
"tab1"
role=
"tabpanel"
aria-labelledby=
"1-tab"
>
<!-- view menu -->
<nav
aria-label=
"view"
class=
"view-menu mt-2"
>
<div
class=
"d-flex justify-content-between align-items-center"
>
<div
class=
"fs-9"
>
20
<span>
件表示
</span></div>
<div
class=
"view"
>
<a
href=
"#"
class=
"text-decoration-none view-btn view-list-btn"
>
<img
src=
"../common/img/icon_view_list.svg"
alt=
"リスト表示"
class=
"list-block-icon mx-1"
data-toggle=
"tooltip"
data-placement=
"bottom"
title=
"リスト表示"
>
</a>
<a
href=
"#"
class=
"text-decoration-none view-btn view-block-btn active"
>
<img
src=
"../common/img/icon_view_block.svg"
alt=
"グリッド表示"
class=
"list-block-icon mx-1"
data-toggle=
"tooltip"
data-placement=
"bottom"
title=
"グリッド表示"
>
</a>
</div>
</div>
</nav>
<!-- task list -->
<ul
class=
"p-0 mt-3 card-list task-list view-content view-block"
>
<li
class=
"card mb-2"
>
<a
href=
"#"
class=
"d-block px-3 py-3 text-decoration-none text-dark"
>
<div
class=
"fs-12 text-truncate"
>
作業名が入ります。
</div>
</a>
</li>
<li
class=
"card mb-2"
>
<a
href=
"#"
class=
"d-block px-3 py-3 text-decoration-none text-dark"
>
<div
class=
"fs-12 text-truncate"
>
作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。
</div>
</a>
</li>
</ul>
</div>
<!-- proccess -->
<div
class=
"tab-pane fade"
id=
"tab2"
role=
"tabpanel"
aria-labelledby=
"2-tab"
>
<!-- view menu -->
<nav
aria-label=
"view"
class=
"view-menu mt-2"
>
<div
class=
"d-flex justify-content-between align-items-center"
>
<div
class=
"fs-9"
>
100
<span>
件表示
</span></div>
<div
class=
"view"
>
<a
href=
"#"
class=
"text-decoration-none view-btn view-list-btn"
>
<img
src=
"../common/img/icon_view_list.svg"
alt=
"リスト表示"
class=
"list-block-icon mx-1"
data-toggle=
"tooltip"
data-placement=
"bottom"
title=
"リスト表示"
>
</a>
<a
href=
"#"
class=
"text-decoration-none view-btn view-block-btn active"
>
<img
src=
"../common/img/icon_view_block.svg"
alt=
"グリッド表示"
class=
"list-block-icon mx-1"
data-toggle=
"tooltip"
data-placement=
"bottom"
title=
"グリッド表示"
>
</a>
</div>
</div>
</nav>
<!-- task list -->
<ul
class=
"p-0 mt-3 card-list task-list view-content view-block"
>
<li
class=
"card mb-2"
>
<a
href=
"#"
class=
"h-100 d-block px-3 py-2 text-decoration-none text-dark position-relative"
>
<div
class=
"position-absolute translate-middle top-50 left-0 ml-3"
>
<div
class=
"type-icon"
>
<span
class=
"proccess"
></span>
</div>
</div>
<div
class=
"pl-5 h-100 d-flex align-items-center"
>
<div
class=
"w-100"
>
<div
class=
"fs-8 bg-dark10 px-2 py-1 mr-2 rounded mb-1 w-fit-content text-truncate mw-100"
>
工程名が入ります。
</div>
<div
class=
"fs-12 text-truncate"
>
作業名が入ります。
</div>
<div
class=
"d-flex justify-content-between align-items-center"
>
<div
class=
"fs-10 text-truncate"
>
報告名が入ります。
</div>
<div
class=
"fs-8 text-secondary text-truncate"
>
code-9999
</div>
</div>
</div>
</div>
</a>
</li>
<li
class=
"card mb-2"
>
<a
href=
"#"
class=
"h-100 d-block px-3 py-2 text-decoration-none text-dark position-relative"
>
<div
class=
"position-absolute translate-middle top-50 left-0 ml-3"
>
<div
class=
"type-icon"
>
<span
class=
"proccess"
></span>
</div>
</div>
<div
class=
"pl-5 h-100 d-flex align-items-center"
>
<div
class=
"w-100"
>
<div
class=
"fs-8 bg-dark10 px-2 py-1 mr-2 rounded mb-1 w-fit-content text-truncate mw-100"
>
工程名が入ります。工程名が入ります。工程名が入ります。工程名が入ります。工程名が入ります。
</div>
<div
class=
"fs-12 text-truncate"
>
作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。作業名が入ります。
</div>
<div
class=
"d-flex justify-content-between align-items-center"
>
<div
class=
"fs-10 text-truncate"
>
報告名が入ります。報告名が入ります。報告名が入ります。報告名が入ります。報告名が入ります。報告名が入ります。
</div>
<div
class=
"fs-8 text-secondary text-truncate"
>
code-9999
</div>
</div>
</div>
</div>
</a>
</li>
</ul>
</div>
<!-- alert -->
<div
class=
"tab-pane fade"
id=
"tab3"
role=
"tabpanel"
aria-labelledby=
"3-tab"
>
<!-- view menu -->
<nav
aria-label=
"view"
class=
"view-menu mt-2"
>
<div
class=
"d-flex justify-content-between align-items-center"
>
<div
class=
"fs-9"
>
100
<span>
件表示
</span></div>
<div
class=
"view"
>
<a
href=
"#"
class=
"text-decoration-none view-btn view-list-btn"
>
<img
src=
"../common/img/icon_view_list.svg"
alt=
"リスト表示"
class=
"list-block-icon mx-1"
data-toggle=
"tooltip"
data-placement=
"bottom"
title=
"リスト表示"
>
</a>
<a
href=
"#"
class=
"text-decoration-none view-btn view-block-btn active"
>
<img
src=
"../common/img/icon_view_block.svg"
alt=
"グリッド表示"
class=
"list-block-icon mx-1"
data-toggle=
"tooltip"
data-placement=
"bottom"
title=
"グリッド表示"
>
</a>
</div>
</div>
</nav>
<!-- task list -->
<ul
class=
"p-0 mt-3 card-list task-list view-content view-block"
>
<li
class=
"card mb-2"
>
<a
href=
"#"
class=
"h-100 d-block px-3 py-2 text-decoration-none text-dark position-relative"
>
<div
class=
"position-absolute translate-middle top-50 left-0 ml-3"
>
<div
class=
"type-icon"
>
<span
class=
"report"
></span>
</div>
</div>
<div
class=
"pl-5 h-100 d-flex align-items-center"
>
<div
class=
"w-100"
>
<div
class=
"fs-12 text-truncate"
>
作業名が入ります。
</div>
<div
class=
"d-flex justify-content-between align-items-center"
>
<div
class=
"fs-10 text-truncate"
>
報告名が入ります。
</div>
<div
class=
"fs-8 text-secondary text-truncate"
>
code-9999
</div>
</div>
</div>
</div>
</a>
</li>
<li
class=
"card mb-2"
>
<a
href=
"#"
class=
"h-100 d-block px-3 py-2 text-decoration-none text-dark position-relative"
>
<div
class=
"position-absolute translate-middle top-50 left-0 ml-3"
>
<div
class=
"type-icon"
>
<span
class=
"inspection"
></span>
</div>
</div>
<div
class=
"pl-5 h-100 d-flex align-items-center"
>
<div
class=
"w-100"
>
<div
class=
"fs-12 text-truncate"
>
作業名が入ります。
</div>
<div
class=
"d-flex justify-content-between align-items-center"
>
<div
class=
"fs-10 text-truncate"
>
報告名が入ります。
</div>
<div
class=
"fs-8 text-secondary text-truncate"
>
10/20~10/23
</div>
</div>
</div>
</div>
</a>
</li>
<li
class=
"card mb-2"
>
<a
href=
"#"
class=
"h-100 d-block px-3 py-2 text-decoration-none text-dark position-relative"
>
<div
class=
"position-absolute translate-middle top-50 left-0 ml-3"
>
<div
class=
"type-icon"
>
<span
class=
"questionary"
></span>
</div>
</div>
<div
class=
"pl-5 h-100 d-flex align-items-center"
>
<div
class=
"w-100"
>
<div
class=
"fs-8 bg-dark10 px-2 py-1 mr-2 rounded mb-1 w-fit-content text-truncate mw-100"
>
報告
</div>
<div
class=
"fs-12 text-truncate"
>
作業名が入ります。
</div>
<div
class=
"d-flex justify-content-between align-items-center"
>
<div
class=
"fs-10 text-truncate"
>
報告名が入ります。
</div>
<div
class=
"fs-8 text-secondary text-truncate"
>
code-9999
</div>
</div>
</div>
</div>
</a>
</li>
<li
class=
"card mb-2"
>
<a
href=
"#"
class=
"h-100 d-block px-3 py-2 text-decoration-none text-dark position-relative"
>
<div
class=
"position-absolute translate-middle top-50 left-0 ml-3"
>
<div
class=
"type-icon"
>
<span
class=
"questionary"
></span>
</div>
</div>
<div
class=
"pl-5 h-100 d-flex align-items-center"
>
<div
class=
"w-100"
>
<div
class=
"fs-8 bg-dark10 px-2 py-1 mr-2 rounded mb-1 w-fit-content text-truncate mw-100"
>
回答
</div>
<div
class=
"fs-12 text-truncate"
>
作業名が入ります。
</div>
<div
class=
"d-flex justify-content-between align-items-center"
>
<div
class=
"fs-10 text-truncate"
>
報告名が入ります。
</div>
<div
class=
"fs-8 text-secondary text-truncate"
>
code-9999
</div>
</div>
</div>
</div>
</a>
</li>
</ul>
</div>
<!-- 0 match -->
<div
class=
"tab-pane fade"
id=
"tab4"
role=
"tabpanel"
aria-labelledby=
"4-tab"
>
<ul
class=
"p-0 mt-3 card-list"
>
<li
class=
"card mb-2 not-found"
>
<div
class=
"text-dark mb-1 px-3 py-5 text-center m-auto"
>
<img
src=
"../common/img/icon_not_found.svg"
alt=
"該当する作業がありません。"
class=
"not-found-img mb-2"
>
<div
class=
"fs-9 text-secondary font-weight-bold"
>
該当する作業がありません。
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
</main>
<!-- confirm -->
<?php include('common/confirm-modal.html');?>
<script
src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"
></script>
<script
type=
"text/javascript"
src=
"../common/js/app.js"
></script>
<script
type=
"text/javascript"
src=
"../common/js/common.js"
></script>
</body>
</html>
\ No newline at end of file
abvw/js/pickup/pickup.js
0 → 100644
View file @
79ba6233
// 名前空間
var
PICKUP
=
{};
PICKUP
.
newReportList
;
PICKUP
.
continousWorkReport
;
PICKUP
.
reportWithWarning
;
PICKUP
.
pickupActive
=
"newReport"
;
PICKUP
.
countNewReportList
=
0
;
PICKUP
.
countContinousWorkReport
=
0
;
PICKUP
.
countReportWithWarning
=
0
;
PICKUP
.
initCommon
=
function
()
{
PICKUP
.
countNewReportList
=
0
;
PICKUP
.
countContinousWorkReport
=
0
;
PICKUP
.
countReportWithWarning
=
0
;
PICKUP
.
newReportList
=
{
list_0
:
[]};
PICKUP
.
continousWorkReport
=
{
list_0
:
[]};
PICKUP
.
reportWithWarning
=
{
list_0
:
[]};
}
PICKUP
.
init
=
function
()
{
console
.
log
(
"PICKUP.init"
);
CHK
.
initCommon
();
$
(
"#footer"
).
load
(
"main-footer.html"
,
function
()
{
CHK_Footer
.
activeDashboardBottomNav
();
});
if
(
CHK
.
operation
==
null
||
typeof
CHK
.
operation
===
'undefined'
)
{
CHK
.
loadJson
(
CHK
.
jsonPath
.
operationList
,
function
(
json
)
{
CHK
.
operation
=
json
;
PICKUP
.
initOperationList
(
CHK
.
operation
.
operationList
);
});
PICKUP
.
settingPickup
();
PICKUP
.
initSettingActivePickup
();
return
;
}
PICKUP
.
initOperationList
(
CHK
.
operation
.
operationList
);
PICKUP
.
settingPickup
();
PICKUP
.
initSettingActivePickup
();
}
PICKUP
.
initOperationList
=
function
(
operationList
)
{
PICKUP
.
createNewReportList
(
operationList
);
PICKUP
.
createContinousWorkList
(
operationList
);
PICKUP
.
createReportWithWarning
(
operationList
);
PICKUP
.
setCountElementInPickup
();
}
PICKUP
.
settingPickup
=
function
()
{
CHK
.
loadDashboardSetting
(
function
()
{
if
(
!
CHK
.
dashboardSetting
.
newReport
)
{
$
(
"#liTabNewReport"
).
css
(
"display"
,
"none"
);
}
if
(
!
CHK
.
dashboardSetting
.
continousWork
)
{
$
(
"#liTabContinousWork"
).
css
(
"display"
,
"none"
);
}
if
(
!
CHK
.
dashboardSetting
.
reportWarning
)
{
$
(
"#liTabReportWithWarning"
).
css
(
"display"
,
"none"
);
}
});
}
PICKUP
.
initSettingActivePickup
=
function
()
{
var
urlParam
=
CHK
.
getUrlParameter
();
PICKUP
.
pickupActive
=
urlParam
.
pickupActive
;
PICKUP
.
settingActivePickup
(
PICKUP
.
pickupActive
);
}
PICKUP
.
settingActivePickup
=
function
(
pickupActive
)
{
PICKUP
.
pickupActive
=
pickupActive
;
$
(
'#liTabNewReport'
).
removeClass
(
'on'
);
$
(
'#liTabContinousWork'
).
removeClass
(
'on'
);
$
(
'#liTabReportWithWarning'
).
removeClass
(
'on'
);
$
(
'#tab-content-NewReport'
).
removeClass
(
'on'
);
$
(
'#tab-content-ContinousWork'
).
removeClass
(
'on'
);
$
(
'#tab-content-ReportWithWarning'
).
removeClass
(
'on'
);
if
(
pickupActive
==
"newReport"
)
{
$
(
'#liTabNewReport'
).
addClass
(
'on'
);
$
(
'#tab-content-NewReport'
).
addClass
(
'on'
);
return
;
}
if
(
pickupActive
==
"continousWork"
)
{
$
(
'#liTabContinousWork'
).
addClass
(
'on'
);
$
(
'#tab-content-ContinousWork'
).
addClass
(
'on'
);
return
;
}
if
(
pickupActive
==
"reportWarning"
)
{
$
(
'#liTabReportWithWarning'
).
addClass
(
'on'
);
$
(
'#tab-content-ReportWithWarning'
).
addClass
(
'on'
);
return
;
}
}
PICKUP
.
changeActivePickup
=
function
(
liPickupTab
)
{
PICKUP
.
settingActivePickup
(
$
(
liPickupTab
).
attr
(
"data-active"
));
}
PICKUP
.
goBack
=
function
()
{
history
.
back
();
}
PICKUP
.
setCountElementInPickup
=
function
()
{
console
.
log
(
"setCountElementInPickup"
,
PICKUP
.
countNewReportList
,
PICKUP
.
countContinousWorkReport
,
PICKUP
.
countReportWithWarning
);
if
(
$
(
"#count-NewReport"
))
{
$
(
"#count-NewReport"
)[
0
].
innerHTML
=
PICKUP
.
countNewReportList
;
}
if
(
$
(
"#count-ContinousWork"
))
{
$
(
"#count-ContinousWork"
)[
0
].
innerHTML
=
PICKUP
.
countContinousWorkReport
;
}
if
(
$
(
"#count-ReportWithWarning"
))
{
$
(
"#count-ReportWithWarning"
)[
0
].
innerHTML
=
PICKUP
.
countReportWithWarning
;
}
}
PICKUP
.
sortNewReportList
=
function
(
operationList
)
{
operationList
=
operationList
.
sort
(
function
(
a
,
b
)
{
if
(
a
.
operationId
<
b
.
operationId
)
return
1
;
if
(
a
.
operationId
>
b
.
operationId
)
return
-
1
;
return
0
;
});
return
operationList
;
}
PICKUP
.
createNewReportList
=
function
(
operationListOld
,
isSearched
=
false
)
{
var
operationList
=
PICKUP
.
sortNewReportList
(
operationListOld
);
$
(
"#newReport-list"
).
empty
();
PICKUP
.
countNewReportList
=
0
;
if
(
typeof
operationList
===
'undefined'
||
operationList
.
length
<
1
)
{
$
(
'#notFoundNewReport'
).
removeClass
(
'd-none'
);
return
;
}
$
(
'#notFoundNewReport'
).
addClass
(
'd-none'
);
for
(
var
i
=
0
;
i
<
operationList
.
length
;
i
++
)
{
//if(operationList[i].enableAddReport != 1 || ((operationList[i].reportType == CHK.REPORT_TYPE.WORKFLOW || operationList[i].reportType == CHK.REPORT_TYPE.WITHREPLY) && operationList[i].newReportFlg == 0) ) continue;
if
(
!
CHK
.
isNewReport
(
operationList
[
i
]))
continue
;
//TODO aタグlist.html 転移処理operationList[i].reportType == 2 && operationList[i].enableReportEdit == 0
var
messageli
=
$
(
"<li class='item list-unstyled rounded border mb-2'name = 'operationId_"
+
operationList
[
i
].
operationId
+
"' ></li>"
);
var
ahrefRequiredFlg
;
if
(
operationList
[
i
].
permitCodeRequiredFlg
==
1
)
{
ahrefRequiredFlg
=
$
(
"<a href=
\"
javascript:CHK.displayAlert('onlyRfid');
\"
class='d-block px-3 py-3 text-decoration-none text-dark'></a>"
);
}
else
{
ahrefRequiredFlg
=
$
(
"<a href=
\"
javascript:CHK_L.sendAppCommand('goOperation', '"
+
operationList
[
i
].
operationId
+
"', '"
+
operationList
[
i
].
contentId
+
" ', null ,'NEW_FORM_INPUT' ,'REPORT_LIST',null);
\"
class='d-block px-3 py-3 text-decoration-none text-dark'></a>"
);
}
var
divTitle
=
$
(
"<div class='title'>"
+
operationList
[
i
].
operationName
+
"</div>"
);
var
iIcon
=
$
(
"<i class='fas fa-chevron-right fs-12'></i>"
);
ahrefRequiredFlg
.
append
(
divTitle
);
ahrefRequiredFlg
.
append
(
iIcon
);
messageli
.
append
(
ahrefRequiredFlg
);
$
(
"#newReport-list"
).
append
(
messageli
);
PICKUP
.
countNewReportList
=
PICKUP
.
countNewReportList
+
1
;
}
// show not found if
if
(
PICKUP
.
countNewReportList
==
0
)
{
$
(
'#notFoundNewReport'
).
removeClass
(
'd-none'
);
}
if
(
CHK
.
isAndroid
)
{
android
.
hideLoading
();
}
};
PICKUP
.
sortContinousWorkList
=
function
(
operationList
)
{
var
newOperationList
=
[];
for
(
var
i
=
0
;
i
<
operationList
.
length
;
i
++
)
{
if
(
operationList
[
i
].
reportType
===
3
)
{
if
(
typeof
operationList
[
i
].
processList
===
'undefined'
)
continue
;
if
(
operationList
[
i
].
processList
&&
operationList
[
i
].
processList
.
length
!=
0
)
{
for
(
var
j
=
0
;
j
<
operationList
[
i
].
processList
.
length
;
j
++
)
{
if
(
typeof
operationList
[
i
].
processList
[
j
].
phaseList
===
'undefined'
)
continue
;
for
(
var
g
=
0
;
g
<
operationList
[
i
].
processList
[
j
].
phaseList
.
length
;
g
++
)
{
if
(
operationList
[
i
].
processList
[
j
].
phaseList
[
g
].
phaseStatus
!=
999
)
{
var
item
=
{
reportType
:
operationList
[
i
].
reportType
,
operationType
:
operationList
[
i
].
operationType
,
phaseList
:
operationList
[
i
].
processList
[
j
].
phaseList
,
processKey
:
operationList
[
i
].
processList
[
j
].
processKey
,
permitCodeRequiredFlg
:
operationList
[
i
].
permitCodeRequiredFlg
,
operationId
:
operationList
[
i
].
operationId
,
contentId
:
operationList
[
i
].
contentId
,
operationName
:
operationList
[
i
].
operationName
,
taskCode
:
operationList
[
i
].
processList
[
j
].
taskCode
,
taskKey
:
operationList
[
i
].
processList
[
j
].
taskKey
,
taskName
:
operationList
[
i
].
processList
[
j
].
taskName
,
updateDate
:
operationList
[
i
].
processList
[
j
].
phaseList
[
g
].
updateDate
,
phaseNo
:
operationList
[
i
].
processList
[
j
].
phaseList
[
g
].
phaseNo
,
phaseName
:
operationList
[
i
].
processList
[
j
].
phaseList
[
g
].
phaseName
};
newOperationList
.
push
(
item
);
}
}
}
}
}
}
newOperationList
=
newOperationList
.
sort
(
function
(
a
,
b
)
{
if
(
!
a
.
updateDate
)
{
a
.
updateDate
=
"1900-01-01 09:00:00"
;
}
if
(
!
b
.
updateDate
)
{
b
.
updateDate
=
"1900-01-01 09:00:00"
;
}
if
(
a
.
updateDate
<
b
.
updateDate
)
return
1
;
if
(
a
.
updateDate
>
b
.
updateDate
)
return
-
1
;
return
0
;
});
console
.
log
(
"newOperationList: "
+
JSON
.
stringify
(
newOperationList
));
return
newOperationList
;
}
PICKUP
.
sortWarningList
=
function
(
operationList
)
{
var
newOperationList
=
[];
for
(
var
i
=
0
;
i
<
operationList
.
length
;
i
++
)
{
if
(
typeof
operationList
[
i
].
warningReportList
===
'undefined'
)
continue
;
if
(
operationList
[
i
].
warningReportList
&&
operationList
[
i
].
warningReportList
.
length
!=
0
)
{
for
(
var
j
=
0
;
j
<
operationList
[
i
].
warningReportList
.
length
;
j
++
)
{
var
item
=
{
reportType
:
operationList
[
i
].
reportType
,
operationType
:
operationList
[
i
].
operationType
,
permitCodeRequiredFlg
:
operationList
[
i
].
permitCodeRequiredFlg
,
operationId
:
operationList
[
i
].
operationId
,
contentId
:
operationList
[
i
].
contentId
,
operationName
:
operationList
[
i
].
operationName
,
taskCode
:
operationList
[
i
].
warningReportList
[
j
].
taskCode
,
taskKey
:
operationList
[
i
].
warningReportList
[
j
].
taskKey
,
taskName
:
operationList
[
i
].
warningReportList
[
j
].
taskName
,
taskType
:
operationList
[
i
].
warningReportList
[
j
].
taskType
,
updateDate
:
operationList
[
i
].
warningReportList
[
j
].
updateDate
,
reportStartDateString
:
operationList
[
i
].
warningReportList
[
j
].
reportStartDateString
,
reportEndDateString
:
operationList
[
i
].
warningReportList
[
j
].
reportEndDateString
,
processKey
:
operationList
[
i
].
warningReportList
[
j
].
processKey
,
phaseNo
:
operationList
[
i
].
warningReportList
[
j
].
phaseNo
,
phaseName
:
operationList
[
i
].
warningReportList
[
j
].
phaseName
};
newOperationList
.
push
(
item
);
}
}
}
newOperationList
=
newOperationList
.
sort
(
function
(
a
,
b
)
{
if
(
!
a
.
updateDate
)
{
a
.
updateDate
=
"1900-01-01 09:00:00"
;
}
if
(
!
b
.
updateDate
)
{
b
.
updateDate
=
"1900-01-01 09:00:00"
;
}
if
(
a
.
updateDate
<
b
.
updateDate
)
return
1
;
if
(
a
.
updateDate
>
b
.
updateDate
)
return
-
1
;
return
0
;
});
console
.
log
(
"newOperationList: "
+
JSON
.
stringify
(
newOperationList
));
return
newOperationList
;
}
PICKUP
.
createContinousWorkList
=
function
(
operationListOld
,
isSearched
=
false
)
{
var
operationList
=
PICKUP
.
sortContinousWorkList
(
operationListOld
);
$
(
"#continousWork-list"
).
empty
();
PICKUP
.
countContinousWorkReport
=
0
;
if
(
typeof
operationList
===
'undefined'
||
operationList
.
length
<
1
)
{
$
(
'#notFoundContinousWork'
).
removeClass
(
'd-none'
);
return
;
}
$
(
'#notFoundContinousWork'
).
addClass
(
'd-none'
);
for
(
var
i
=
0
;
i
<
operationList
.
length
;
i
++
)
{
var
directKey
=
operationList
[
i
].
processKey
;
if
(
operationList
[
i
].
operationType
==
CHK
.
OPERATION_TYPE
.
VTOUR
||
operationList
[
i
].
operationType
==
CHK
.
OPERATION_TYPE
.
PDF
)
{
directKey
=
operationList
[
i
].
taskKey
;
}
var
messageli
=
$
(
"<li class='item list-unstyled rounded border mb-2' id = 'list_"
+
operationList
[
i
].
processKey
+
"'></li>"
)
;
var
ahrefRequiredFlg
;
if
(
operationList
[
i
].
permitCodeRequiredFlg
==
1
)
{
ahrefRequiredFlg
=
$
(
"<a href=
\"
javascript:CHK.displayAlert('onlyRfid');
\"
class='d-block px-3 py-3 text-decoration-none text-dark'></a>"
);
}
else
{
ahrefRequiredFlg
=
$
(
"<a href=
\"
javascript:CHK_L.sendAppCommand('goOperation', '"
+
operationList
[
i
].
operationId
+
"', '"
+
operationList
[
i
].
contentId
+
" ', null ,'DETAIL_FORM_INPUT' ,'CONTINOUS_WORK','"
+
directKey
+
"','"
+
operationList
[
i
].
phaseNo
+
"');
\"
class='d-block px-3 py-2 text-decoration-none text-dark'></a>"
);
}
var
divTitle
=
$
(
"<div class='title'>"
+
operationList
[
i
].
operationName
+
"</div>"
);
var
divSubTitleWrap
=
$
(
"<div class='sub-title-wrap'> </div>"
);
var
iIcon
=
$
(
"<i class='fas fa-chevron-right fs-12''></i>"
);
var
divProccess
=
$
(
"<div class='tag fs-8 text-secondary px-2 py-1 mr-2 rounded border mb-1'>"
+
operationList
[
i
].
phaseName
+
"</div>"
);
var
divCode
=
$
(
" <div class='fs-8 text-secondary mr-2'><div class='data'>"
+
operationList
[
i
].
taskCode
+
"</div></div>"
);
var
divSubTitle
=
$
(
"<div class='sub-title'>"
+
operationList
[
i
].
taskName
+
"</div>"
);
divSubTitleWrap
.
append
(
divCode
);
divSubTitleWrap
.
append
(
divSubTitle
);
ahrefRequiredFlg
.
append
(
divProccess
);
ahrefRequiredFlg
.
append
(
divTitle
);
ahrefRequiredFlg
.
append
(
divSubTitleWrap
);
ahrefRequiredFlg
.
append
(
iIcon
);
messageli
.
append
(
ahrefRequiredFlg
);
$
(
"#continousWork-list"
).
append
(
messageli
);
PICKUP
.
countContinousWorkReport
=
PICKUP
.
countContinousWorkReport
+
1
;
}
// show not found if
if
(
PICKUP
.
countContinousWorkReport
<
1
)
{
$
(
'#notFoundContinousWork'
).
removeClass
(
'd-none'
);
}
if
(
CHK
.
isAndroid
)
{
android
.
hideLoading
();
}
};
PICKUP
.
createReportWithWarning
=
function
(
operationListOld
,
isSearched
=
false
)
{
var
operationList
=
PICKUP
.
sortWarningList
(
operationListOld
);
$
(
"#reportWithWarning-list"
).
empty
();
PICKUP
.
countReportWithWarning
=
0
;
if
(
typeof
operationList
===
'undefined'
||
operationList
.
length
<
1
)
{
$
(
'#notFoundReportWithWarning'
).
removeClass
(
'd-none'
);
return
;
}
$
(
'#notFoundReportWithWarning'
).
addClass
(
'd-none'
);
var
msgLevelReport
=
getMsg
(
"reportLevelReport"
)
;
console
.
log
(
"msgLevelReport :"
+
msgLevelReport
);
var
msgLevelAnswer
=
getMsg
(
"reportLevelAnswer"
)
;
console
.
log
(
"msgLevelAnswer :"
+
msgLevelAnswer
);
for
(
var
i
=
0
;
i
<
operationList
.
length
;
i
++
)
{
//TODO aタグlist.html 転移処理
var
operationNameLi
;
switch
(
operationList
[
i
].
reportType
)
{
case
0
:
operationNameLi
=
$
(
"<li class='item list-unstyled rounded border mb-2' id = 'list_"
+
operationList
[
i
].
taskKey
+
"'><a href=
\"
javascript:CHK_L.sendAppCommand('goOperation', '"
+
operationList
[
i
].
operationId
+
"', '"
+
operationList
[
i
].
contentId
+
" ', null ,'DETAIL_FORM_INPUT' ,'REPORT_WARNING','"
+
operationList
[
i
].
taskKey
+
"');
\"
class='d-block px-3 py-2 text-decoration-none text-dark'>"
+
"<div class='title'>"
+
operationList
[
i
].
operationName
+
"</div> <div class='sub-title-wrap'> <div class='fs-8 text-secondary mr-2'><div class='data'>"
+
operationList
[
i
].
taskCode
+
"</div></div> <div class='sub-title'>"
+
operationList
[
i
].
taskName
+
"</div></div> <i class='fas fa-chevron-right fs-12'></i> </a></li>"
);
break
;
case
1
:
operationNameLi
=
$
(
"<li class='item list-unstyled rounded border mb-2' id = 'list_"
+
operationList
[
i
].
taskKey
+
"'><a href=
\"
javascript:CHK_L.sendAppCommand('goOperation', '"
+
operationList
[
i
].
operationId
+
"', '"
+
operationList
[
i
].
contentId
+
" ', null ,'DETAIL_FORM_INPUT' ,'REPORT_WARNING','"
+
operationList
[
i
].
taskKey
+
"');
\"
class='d-block px-3 py-2 text-decoration-none text-dark'>"
+
"<div class='title'>"
+
operationList
[
i
].
operationName
+
"</div> <div class='sub-title-wrap'> <div class='fs-8 text-secondary mr-2'><div class='sub-title'>"
+
PICKUP
.
getInspectDate
(
operationList
[
i
].
reportStartDateString
)
+
" ~ "
+
PICKUP
.
getInspectDate
(
operationList
[
i
].
reportEndDateString
)
+
"</div></div> </div> <i class='fas fa-chevron-right fs-12'></i> </a></li>"
);
break
;
case
2
:
operationNameLi
=
$
(
"<li class='item list-unstyled rounded border mb-2' id = 'list_"
+
operationList
[
i
].
taskKey
+
"'></li>"
);
var
ahrefRequiredFlg
=
$
(
"<a href=
\"
javascript:CHK_L.sendAppCommand('goOperation', '"
+
operationList
[
i
].
operationId
+
"', '"
+
operationList
[
i
].
contentId
+
" ', null ,'DETAIL_FORM_INPUT' ,'REPORT_WARNING','"
+
operationList
[
i
].
taskKey
+
"','"
+
operationList
[
i
].
taskType
+
"');
\"
class='d-block px-3 py-2 text-decoration-none text-dark'></a>"
);
var
liTagTitle
=
$
(
"<div class='title'>"
+
operationList
[
i
].
operationName
+
"</div>"
)
;
var
liTagReportType
;
if
(
operationList
[
i
].
taskType
==
0
)
{
liTagReportType
=
$
(
"<div class='tag fs-8 text-secondary px-2 py-1 mr-2 rounded border mb-1'>"
+
msgLevelReport
+
"</div>"
)
;
}
else
{
liTagReportType
=
$
(
"<div class='tag fs-8 text-secondary px-2 py-1 mr-2 rounded border mb-1'>"
+
msgLevelAnswer
+
"</div>"
)
;
}
var
divCode
=
$
(
"<div class='sub-title-wrap'> <div class='fs-8 text-secondary mr-2'><div class='data'>"
+
operationList
[
i
].
taskCode
+
"</div></div> <div class='sub-title'>"
+
operationList
[
i
].
taskName
+
"</div></div>"
);
var
iIcon
=
$
(
"<i class='fas fa-chevron-right fs-12'></i>"
);
ahrefRequiredFlg
.
append
(
liTagReportType
);
ahrefRequiredFlg
.
append
(
liTagTitle
);
ahrefRequiredFlg
.
append
(
divCode
);
ahrefRequiredFlg
.
append
(
iIcon
);
operationNameLi
.
append
(
ahrefRequiredFlg
);
break
;
case
3
:
var
directKey
=
operationList
[
i
].
processKey
;
if
(
operationList
[
i
].
operationType
==
CHK
.
OPERATION_TYPE
.
VTOUR
||
operationList
[
i
].
operationType
==
CHK
.
OPERATION_TYPE
.
PDF
)
{
directKey
=
operationList
[
i
].
taskKey
;
if
(
operationList
[
i
].
phaseNo
>
1
)
{
//find taskKey of phaseNo 1
for
(
var
k
=
0
;
k
<
operationList
.
length
;
k
++
)
{
if
(
operationList
[
k
].
phaseNo
==
1
&&
operationList
[
k
].
processKey
==
operationList
[
i
].
processKey
)
{
directKey
=
operationList
[
k
].
taskKey
;
break
;
}
}
}
}
operationNameLi
=
$
(
"<li class='item list-unstyled rounded border mb-2' id = 'list_"
+
operationList
[
i
].
taskKey
+
"'><a href=
\"
javascript:CHK_L.sendAppCommand('goOperation', '"
+
operationList
[
i
].
operationId
+
"', '"
+
operationList
[
i
].
contentId
+
" ', null ,'DETAIL_FORM_INPUT' ,'REPORT_WARNING','"
+
directKey
+
"','"
+
operationList
[
i
].
phaseNo
+
"');
\"
class='d-block px-3 py-2 text-decoration-none text-dark'>"
+
"<div class='tag fs-8 text-secondary px-2 py-1 mr-2 rounded border mb-1'>"
+
operationList
[
i
].
phaseName
+
"</div> <div class='title'>"
+
operationList
[
i
].
operationName
+
"</div> <div class='sub-title-wrap'> <div class='fs-8 text-secondary mr-2'><div class='data'>"
+
operationList
[
i
].
taskCode
+
"</div></div> <div class='sub-title'>"
+
operationList
[
i
].
taskName
+
"</div></div> <i class='fas fa-chevron-right fs-12'></i> </a></li>"
);
break
;
}
$
(
"#reportWithWarning-list"
).
append
(
operationNameLi
);
PICKUP
.
countReportWithWarning
=
PICKUP
.
countReportWithWarning
+
1
;
}
// show not found if
if
(
PICKUP
.
countReportWithWarning
<
1
)
{
$
(
'#notFoundReportWithWarning'
).
removeClass
(
'd-none'
);
}
if
(
CHK
.
isAndroid
)
{
android
.
hideLoading
();
}
};
PICKUP
.
getInspectDate
=
function
(
dateString
)
{
var
date
=
new
Date
(
dateString
)
return
date
.
getFullYear
()
+
"/"
+
(
"0"
+
(
date
.
getMonth
()
+
1
)).
slice
(
-
2
)
+
"/"
+
(
"0"
+
date
.
getDate
()).
slice
(
-
2
)
+
" "
+
(
"0"
+
date
.
getHours
()).
slice
(
-
2
)
+
":"
+
(
"0"
+
date
.
getMinutes
()).
slice
(
-
2
);
}
\ 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