Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
design
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
abookCheck
design
Commits
f0f4181e
Commit
f0f4181e
authored
Aug 29, 2022
by
NGUYEN HOANG SON
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
69d8f75b
' into feature/1.4.3_dev
* commit '
69d8f75b
': #19120 Update CHK_pu
parents
12db7dfa
69d8f75b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
109 additions
and
53 deletions
+109
-53
app/dashboardSetting.json
+7
-0
app/pickup.html
+9
-10
app/script/check_pu.js
+93
-43
No files found.
app/dashboardSetting.json
0 → 100644
View file @
f0f4181e
{
"newReport"
:
true
,
"continousWork"
:
true
,
"reportWarning"
:
true
,
"dashboardHome"
:
false
}
\ No newline at end of file
app/pickup.html
View file @
f0f4181e
...
...
@@ -34,9 +34,9 @@
</span>
</a>
<h1
class=
"fs-10 font-weight-bold mb-0 text-white multi-lang"
data-msg=
"labelPickUp"
>
ピックアップ
</h1>
<a
class=
"nav-link text-white lht-0 p-1"
>
<a
href=
"javascript:CHK_L.sendAppCommand('refreshContent');"
class=
"nav-link text-white lht-0 p-1"
>
<img
class=
"icon"
src=
"img/icon_update.svg"
alt=
"更新"
>
<span
class=
"d-none d-md-inline fs-10 align-middle multi-lang"
data-msg=
"buttonRefresh"
href=
"javascript:CHK_L.sendAppCommand('refreshContent');"
>
<span
class=
"d-none d-md-inline fs-10 align-middle multi-lang"
data-msg=
"buttonRefresh"
>
更新
</span>
</a>
...
...
@@ -48,12 +48,12 @@
<main>
<div
class=
"tab-wrap"
>
<input
id=
"tab-NewReport"
type=
"radio"
name=
"tab-task"
class=
"tab-switch"
>
<input
id=
"tab-Contin
ue
Work"
type=
"radio"
name=
"tab-task"
class=
"tab-switch"
checked
>
<input
id=
"tab-Contin
ous
Work"
type=
"radio"
name=
"tab-task"
class=
"tab-switch"
checked
>
<input
id=
"tab-ReportWithWarning"
type=
"radio"
name=
"tab-task"
class=
"tab-switch"
>
<ul
class=
"tab-menu pl-0"
>
<li
class=
"tab-label list-unstyled on"
id=
"liTabNewReport"
><label
class=
"tab-label-NewReport fs-9 multi-lang"
data-msg=
"labelNewReport"
for=
"tab-NewReport"
>
新規報告
</label><div
class=
"task-cnt"
id=
"count-NewReport"
></div></li>
<li
class=
"tab-label list-unstyled"
id=
"liTabContin
ueWork"
><label
class=
"tab-label-ContinueWork fs-9 multi-lang"
data-msg=
"labelContinueWork"
for=
"tab-ContinueWork"
>
工程作業
</label><div
class=
"task-cnt"
id=
"count-Continue
Work"
></div></li>
<li
class=
"tab-label list-unstyled"
id=
"liTabReportWithWarning"
><label
class=
"tab-label-ReportWithWarning fs- multi-lang"
data-msg=
"labelReportWithWarning"
for=
"tab-ReportWithWarning"
>
警告を含む報告
</label><div
class=
"task-cnt"
id=
"count-ReportWithWarning"
></div></li>
<li
class=
"tab-label list-unstyled on"
id=
"liTabNewReport"
data-active=
"newReport"
onclick=
"CHK_pu.changeActivePickup(this);"
><label
class=
"tab-label-NewReport fs-9 multi-lang"
data-msg=
"labelNewReport"
for=
"tab-NewReport"
>
新規報告
</label><div
class=
"task-cnt"
id=
"count-NewReport"
></div></li>
<li
class=
"tab-label list-unstyled"
id=
"liTabContin
ousWork"
data-active=
"continousWork"
onclick=
"CHK_pu.changeActivePickup(this);"
><label
class=
"tab-label-ContinousWork fs-9 multi-lang"
data-msg=
"labelContinousWork"
for=
"tab-ContinousWork"
>
工程作業
</label><div
class=
"task-cnt"
id=
"count-Continous
Work"
></div></li>
<li
class=
"tab-label list-unstyled"
id=
"liTabReportWithWarning"
data-active=
"reportWarning"
onclick=
"CHK_pu.changeActivePickup(this);"
><label
class=
"tab-label-ReportWithWarning fs- multi-lang"
data-msg=
"labelReportWithWarning"
for=
"tab-ReportWithWarning"
>
警告を含む報告
</label><div
class=
"task-cnt"
id=
"count-ReportWithWarning"
></div></li>
</ul>
<div
class=
"tab-content-area"
>
<!-- 新規報告 -->
...
...
@@ -68,13 +68,13 @@
</div>
</div>
<!-- 工程作業 -->
<div
id=
"tab-content-Contin
ue
Work"
class=
"tab-content"
>
<div
id=
"tab-content-Contin
ous
Work"
class=
"tab-content"
>
<div
class=
"container-fluid"
>
<div
class=
"not-found text-dark mb-1 p-3 d-none"
id=
"notFoundContin
ue
Work"
>
<div
class=
"not-found text-dark mb-1 p-3 d-none"
id=
"notFoundContin
ous
Work"
>
<img
src=
"img/icon_not_found.svg"
class=
"mb-3"
alt=
"該当する作業がありません。"
>
<div
class=
"fs-9 text-secondary font-weight-bold"
>
該当する作業がありません。
</div>
</div>
<ul
class=
"task-list p-0 mt-3"
id=
"contin
ue
Work-list"
>
<ul
class=
"task-list p-0 mt-3"
id=
"contin
ous
Work-list"
>
</ul>
</div>
...
...
@@ -99,7 +99,6 @@
<div
id=
"footer"
></div>
<script
src=
"https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"
></script>
<script
type=
"text/javascript"
src=
"js/app.js"
></script>
<script
type=
"text/javascript"
src=
"js/common.js"
></script>
</body>
...
...
app/script/check_pu.js
View file @
f0f4181e
...
...
@@ -2,41 +2,51 @@
var
CHK_pu
=
{};
CHK_pu
.
newReportList
;
CHK_pu
.
contin
ue
WorkReport
;
CHK_pu
.
contin
ous
WorkReport
;
CHK_pu
.
reportWithWarning
;
CHK_pu
.
pickupActive
=
"newReport"
;
CHK_pu
.
countNewReportList
=
0
;
CHK_pu
.
countContin
ue
WorkReport
=
0
;
CHK_pu
.
countContin
ous
WorkReport
=
0
;
CHK_pu
.
countReportWithWarning
=
0
;
CHK_pu
.
initCommon
=
function
()
{
CHK_pu
.
countNewReportList
=
0
;
CHK_pu
.
countContin
ue
WorkReport
=
0
;
CHK_pu
.
countContin
ous
WorkReport
=
0
;
CHK_pu
.
countReportWithWarning
=
0
;
CHK_pu
.
newReportList
=
{
list_0
:
[]};
CHK_pu
.
contin
ue
WorkReport
=
{
list_0
:
[]};
CHK_pu
.
contin
ous
WorkReport
=
{
list_0
:
[]};
CHK_pu
.
reportWithWarning
=
{
list_0
:
[]};
}
CHK_pu
.
init
=
function
()
{
console
.
log
(
"CHK_pu.init"
);
CHK
.
initCommon
();
$
(
"#footer"
).
load
(
"main-footer.html"
,
function
()
{
CHK_Footer
.
activeDashboardBottomNav
();
});
CHK_pu
.
settingPickup
();
if
(
CHK
.
operation
==
null
||
typeof
CHK
.
operation
===
'undefined'
)
{
CHK
.
loadJson
(
CHK
.
jsonPath
.
operationList
,
function
(
json
)
{
CHK
.
operation
=
json
;
CHK_pu
.
init
o
perationList
(
CHK
.
operation
.
operationList
);
CHK_pu
.
init
O
perationList
(
CHK
.
operation
.
operationList
);
});
CHK_pu
.
settingPickup
();
CHK_pu
.
initSettingActivePickup
();
return
;
}
CHK_pu
.
initoperationList
(
CHK
.
operation
.
operationList
);
CHK_pu
.
initOperationList
(
CHK
.
operation
.
operationList
);
CHK_pu
.
settingPickup
();
CHK_pu
.
initSettingActivePickup
();
}
CHK_pu
.
initoperationList
=
function
(
operationList
)
{
CHK_pu
.
initOperationList
=
function
(
operationList
)
{
operationList
=
operationList
.
sort
(
function
(
a
,
b
)
{
if
(
!
a
.
operationLastEditDate
)
{
a
.
operationLastEditDate
=
"1900-01-01 09:00:00"
;
...
...
@@ -49,37 +59,77 @@ CHK_pu.initoperationList = function(operationList) {
return
0
;
});
CHK_pu
.
createNewReportList
(
operationList
);
CHK_pu
.
createContin
ue
WorkList
(
operationList
);
CHK_pu
.
createContin
ous
WorkList
(
operationList
);
CHK_pu
.
createReportWithWarning
(
operationList
);
CHK_pu
.
setCountElementInPickup
();
}
CHK_pu
.
settingPickup
=
function
()
{
var
isEnableNewReport
=
CHK_DashboardSetting
.
isSettingEnabled
(
"dashboardSettingNewReport"
);
if
(
isEnableNewReport
==
true
)
$
(
"#liTabNewReport"
).
css
(
"display"
,
"none"
);
var
isEnableContinueWork
=
CHK_DashboardSetting
.
isSettingEnabled
(
"dashboardSettingContinousWork"
);
if
(
isEnableContinueWork
==
true
)
$
(
"#liTabContinueWork"
).
css
(
"display"
,
"none"
);
var
isEnableReportWithWarning
=
CHK_DashboardSetting
.
isSettingEnabled
(
"dashboardSettingReportWarning"
);
if
(
isEnableReportWithWarning
==
true
)
$
(
"#liTabReportWithWarning"
).
css
(
"display"
,
"none"
);
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"
);
}
});
}
CHK_pu
.
initSettingActivePickup
=
function
()
{
var
urlParam
=
CHK
.
getUrlParameter
();
CHK_pu
.
pickupActive
=
urlParam
.
pickupActive
;
CHK_pu
.
settingActivePickup
(
CHK_pu
.
pickupActive
);
}
CHK_pu
.
settingActivePickup
=
function
(
pickupActive
)
{
CHK_pu
.
pickupActive
=
pickupActive
;
$
(
'#liTabNewReport'
).
removeClass
(
'on'
);
$
(
'#liTabContinousWork'
).
removeClass
(
'on'
);
$
(
'#liTabReportWithWarning'
).
removeClass
(
'on'
);
if
(
pickupActive
==
"newReport"
)
{
$
(
'#liTabNewReport'
).
addClass
(
'on'
);
return
;
}
if
(
pickupActive
==
"continousWork"
)
{
$
(
'#liTabContinousWork'
).
addClass
(
'on'
);
return
;
}
if
(
pickupActive
==
"reportWarning"
)
{
$
(
'#liTabReportWithWarning'
).
addClass
(
'on'
);
return
;
}
}
CHK_pu
.
changeActivePickup
=
function
(
liPickupTab
)
{
CHK_pu
.
settingActivePickup
(
$
(
liPickupTab
).
attr
(
"data-active"
));
}
CHK_pu
.
goBack
=
function
()
{
history
.
back
();
}
CHK_pu
.
setCountElementInPickup
=
function
()
{
console
.
log
(
"setCountElementInPickup"
,
CHK_pu
.
countNewReportList
,
CHK_pu
.
countContinousWorkReport
,
CHK_pu
.
countReportWithWarning
);
$
(
"#count-NewReport"
)[
0
].
innerHTML
=
CHK_pu
.
countNewReportList
;
$
(
"#count-Contin
ueWork"
)[
0
].
innerHTML
=
CHK_pu
.
countContinue
WorkReport
;
$
(
"#count-Contin
ousWork"
)[
0
].
innerHTML
=
CHK_pu
.
countContinous
WorkReport
;
$
(
"#count-ReportWithWarning"
)[
0
].
innerHTML
=
CHK_pu
.
countReportWithWarning
;
}
CHK_pu
.
createNewReportList
=
function
(
operationList
,
isSearched
=
false
)
{
console
.
log
(
"createNewReportList"
,
operationList
);
//
console.log("createNewReportList" , operationList );
$
(
"#newReport-list"
).
empty
();
CHK_pu
.
countNewReportList
=
0
;
if
(
typeof
operationList
===
'undefined'
||
operationList
.
length
<
1
)
{
$
(
'#notFoundNewReport'
).
removeClass
(
'd-none'
);
return
;
...
...
@@ -105,7 +155,6 @@ CHK_pu.createNewReportList = function(operationList, isSearched = false) {
ahrefRequiredFlg
.
append
(
divTitle
);
ahrefRequiredFlg
.
append
(
iIcon
);
messageli
.
append
(
ahrefRequiredFlg
);
//console.log(li );
$
(
"#newReport-list"
).
append
(
messageli
);
CHK_pu
.
countNewReportList
=
CHK_pu
.
countNewReportList
+
1
;
...
...
@@ -115,23 +164,22 @@ CHK_pu.createNewReportList = function(operationList, isSearched = false) {
if
(
CHK
.
isAndroid
)
{
android
.
hideLoading
();
}
console
.
log
(
"CHK_pu.countNewReportList "
,
CHK_pu
.
countNewReportList
);
console
.
log
(
"end createNewReportList"
);
};
CHK_pu
.
createContinueWorkList
=
function
(
operationList
,
isSearched
=
false
)
{
$
(
"#continueWork-list"
).
empty
();
CHK_pu
.
countContinueWorkReport
=
0
;
console
.
log
(
"createContinueWorkList"
);
CHK_pu
.
createContinousWorkList
=
function
(
operationList
,
isSearched
=
false
)
{
$
(
"#continousWork-list"
).
empty
();
CHK_pu
.
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
++
)
{
if
(
operationList
[
i
].
reportType
===
3
)
{
if
(
!
operationList
[
i
].
processList
||
operationList
[
i
].
processList
.
length
==
0
)
continue
;
console
.
log
(
"operationList[i].operationName"
,
operationList
[
i
].
operationName
);
console
.
log
(
"operationList[i].process_list"
,
operationList
[
i
].
processList
[
0
]
);
//TODO aタグlist.html 転移処理
var
messageli
=
$
(
"<li class='item list-unstyled rounded border mb-2' name = 'operationId_"
+
operationList
[
i
].
operationId
+
"'></li>"
)
;
var
ahrefRequiredFlg
;
...
...
@@ -158,33 +206,34 @@ CHK_pu.createContinueWorkList = function(operationList, isSearched = false) {
ahrefRequiredFlg
.
append
(
iIcon
);
messageli
.
append
(
ahrefRequiredFlg
);
$
(
"#contin
ue
Work-list"
).
append
(
messageli
);
CHK_pu
.
countContin
ueWorkReport
=
CHK_pu
.
countContinue
WorkReport
+
1
;
$
(
"#contin
ous
Work-list"
).
append
(
messageli
);
CHK_pu
.
countContin
ousWorkReport
=
CHK_pu
.
countContinous
WorkReport
+
1
;
}
}
// show not found if
if
(
CHK_pu
.
countContinueWorkReport
<
1
)
{
$
(
'#notFoundNewReport'
).
removeClass
(
'd-none'
);
return
;
if
(
CHK_pu
.
countContinousWorkReport
<
1
)
{
$
(
'#notFoundContinousWork'
).
removeClass
(
'd-none'
);
}
$
(
'#notFoundNewReport'
).
addClass
(
'd-none'
);
if
(
CHK
.
isAndroid
)
{
android
.
hideLoading
();
}
console
.
log
(
"CHK_pu.countContinueWorkReport "
,
CHK_pu
.
countContinueWorkReport
);
};
CHK_pu
.
createReportWithWarning
=
function
(
operationList
,
isSearched
=
false
)
{
$
(
"#reportWithWarning-list"
).
empty
();
CHK_pu
.
countReportWithWarning
=
0
;
console
.
log
(
"createReportWithWarning"
);
if
(
typeof
operationList
===
'undefined'
||
operationList
.
length
<
1
)
{
$
(
'#notFoundReportWithWarning'
).
removeClass
(
'd-none'
);
return
;
}
$
(
'#notFoundReportWithWarning'
).
addClass
(
'd-none'
);
for
(
var
i
=
0
;
i
<
operationList
.
length
;
i
++
)
{
console
.
log
(
"lengh"
,
operationList
[
i
].
warningReportList
.
length
);
if
(
operationList
[
i
].
warningReportList
.
length
===
0
)
continue
;
//TODO aタグlist.html 転移処理
var
operationNameLi
;
...
...
@@ -236,9 +285,11 @@ CHK_pu.createReportWithWarning = function(operationList, isSearched = false) {
}
}
// show not found if
if
(
CHK_pu
.
countReportWithWarning
<
1
)
{
$
(
'#notFoundReportWithWarning'
).
removeClass
(
'd-none'
);
}
if
(
CHK
.
isAndroid
)
{
android
.
hideLoading
();
}
console
.
log
(
"CHK_pu.countReportWithWarning "
,
CHK_pu
.
countReportWithWarning
);
console
.
log
(
"End createReportWithWarning"
);
};
\ 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