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
1379d2c6
Commit
1379d2c6
authored
Nov 08, 2022
by
NGUYEN THI MY DUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update index.html
parent
faa0e2e7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
962 additions
and
648 deletions
+962
-648
abweb/common/category-modal.html
+252
-0
abweb/common/css/newdash/app.css
+4
-4
abweb/common/img/type_icon_questionary.svg
+0
-2
abweb/common/js/header.js
+83
-0
abweb/html/index.html
+48
-74
abweb/js/operationList/operationList.js
+572
-567
abweb/js/topPage/topPage.js
+3
-1
No files found.
abweb/common/category-modal.html
0 → 100644
View file @
1379d2c6
<div
class=
"modal fade"
id=
"category-modal"
tabindex=
"-1"
role=
"dialog"
>
<div
class=
"modal-dialog modal-dialog-centered modal-dialog-scrollable overflow-auto"
role=
"document"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header bg-dark10"
>
<h5
class=
"modal-title"
>
カテゴリー選択
</h5>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
>
<span
aria-hidden=
"true"
>
×
</span>
</button>
</div>
<div
class=
"modal-body"
>
<ul
class=
"list-menu"
>
<ul>
<li>
<label>
<input
type=
"radio"
name=
"category"
checked
>
<span>
すべて
</span>
</label>
</li>
</ul>
<li
class=
"accordion"
id=
"accordion1"
>
<div
id=
"heading1"
>
<a
href=
"#"
class=
"list-menu-link"
>
<button
type=
"button"
class=
"collapsed"
data-toggle=
"collapse"
data-target=
"#collapse1"
aria-expanded=
"true"
aria-controls=
"collapse1"
>
<div
class=
"arrow-icon"
></div>
</button>
<label>
<input
type=
"radio"
name=
"category"
>
<span>
全社
</span>
</label>
</a>
</div>
<div
id=
"collapse1"
class=
"collapse"
aria-labelledby=
"heading1"
data-parent=
"#accordion1"
>
<ul>
<li>
<label>
<input
type=
"radio"
name=
"category"
>
<span>
カテゴリー
</span>
</label>
</li>
<li>
<label>
<input
type=
"radio"
name=
"category"
>
<span>
カテゴリー
</span>
</label>
</li>
<li>
<label>
<input
type=
"radio"
name=
"category"
>
<span>
カテゴリー
</span>
</label>
</li>
<li>
<label>
<input
type=
"radio"
name=
"category"
>
<span>
カテゴリー
</span>
</label>
</li>
<li>
<label>
<input
type=
"radio"
name=
"category"
>
<span>
カテゴリー
</span>
</label>
</li>
<li>
<label>
<input
type=
"radio"
name=
"category"
>
<span>
カテゴリー
</span>
</label>
</li>
<li>
<label>
<input
type=
"radio"
name=
"category"
>
<span>
カテゴリー
</span>
</label>
</li>
<li>
<label>
<input
type=
"radio"
name=
"category"
>
<span>
カテゴリー
</span>
</label>
</li>
<li
class=
"accordion"
id=
"accordion1-1"
>
<div
id=
"heading1-1"
>
<a
href=
"#"
class=
"list-menu-link"
>
<button
type=
"button"
class=
"collapsed"
data-toggle=
"collapse"
data-target=
"#collapse1-1"
aria-expanded=
"true"
aria-controls=
"collapse1-1"
>
<div
class=
"arrow-icon"
></div>
</button>
<label>
<input
type=
"radio"
name=
"category"
>
<span>
カテゴリー
</span>
</label>
</a>
</div>
<div
id=
"collapse1-1"
class=
"collapse"
aria-labelledby=
"heading1-1"
data-parent=
"#accordion1-1"
>
<ul>
<li
class=
"accordion"
id=
"accordion1-2"
>
<div
id=
"heading1-2"
>
<a
href=
"#"
class=
"list-menu-link"
>
<button
type=
"button"
class=
"collapsed"
data-toggle=
"collapse"
data-target=
"#collapse1-2"
aria-expanded=
"true"
aria-controls=
"collapse1-2"
>
<div
class=
"arrow-icon"
></div>
</button>
<label>
<input
type=
"radio"
name=
"category"
>
<span>
カテゴリー
</span>
</label>
</a>
</div>
<div
id=
"collapse1-2"
class=
"collapse"
aria-labelledby=
"heading1-2"
data-parent=
"#accordion1-2"
>
<ul>
<li
class=
"accordion"
id=
"accordion1-3"
>
<div
id=
"heading1-3"
>
<a
href=
"#"
class=
"list-menu-link"
>
<button
type=
"button"
class=
"collapsed"
data-toggle=
"collapse"
data-target=
"#collapse1-3"
aria-expanded=
"true"
aria-controls=
"collapse1-3"
>
<div
class=
"arrow-icon"
></div>
</button>
<label>
<input
type=
"radio"
name=
"category"
>
<span>
カテゴリー
</span>
</label>
</a>
</div>
<div
id=
"collapse1-3"
class=
"collapse"
aria-labelledby=
"heading1-3"
data-parent=
"#accordion1-3"
>
<ul>
<li
class=
"accordion"
id=
"accordion1-4"
>
<div
id=
"heading1-4"
>
<a
href=
"#"
class=
"list-menu-link"
>
<button
type=
"button"
class=
"collapsed"
data-toggle=
"collapse"
data-target=
"#collapse1-4"
aria-expanded=
"true"
aria-controls=
"collapse1-4"
>
<div
class=
"arrow-icon"
></div>
</button>
<label>
<input
type=
"radio"
name=
"category"
>
<span>
カテゴリー
</span>
</label>
</a>
</div>
<div
id=
"collapse1-4"
class=
"collapse"
aria-labelledby=
"heading1-4"
data-parent=
"#accordion1-4"
>
<ul>
<li
class=
"accordion"
id=
"accordion1-5"
>
<div
id=
"heading1-5"
>
<a
href=
"#"
class=
"list-menu-link"
>
<button
type=
"button"
class=
"collapsed"
data-toggle=
"collapse"
data-target=
"#collapse1-5"
aria-expanded=
"true"
aria-controls=
"collapse1-5"
>
<div
class=
"arrow-icon"
></div>
</button>
<label>
<input
type=
"radio"
name=
"category"
>
<span>
カテゴリー
</span>
</label>
</a>
</div>
<div
id=
"collapse1-5"
class=
"collapse"
aria-labelledby=
"heading1-5"
data-parent=
"#accordion1-5"
>
<ul>
<li
class=
"accordion"
id=
"accordion1-6"
>
<div
id=
"heading1-6"
>
<a
href=
"#"
class=
"list-menu-link"
>
<button
type=
"button"
class=
"collapsed"
data-toggle=
"collapse"
data-target=
"#collapse1-6"
aria-expanded=
"true"
aria-controls=
"collapse1-6"
>
<div
class=
"arrow-icon"
></div>
</button>
<label>
<input
type=
"radio"
name=
"category"
>
<span>
カテゴリー
</span>
</label>
</a>
</div>
<div
id=
"collapse1-6"
class=
"collapse"
aria-labelledby=
"heading1-6"
data-parent=
"#accordion1-6"
>
<ul>
<li
class=
"accordion"
id=
"accordion1-7"
>
<div
id=
"heading1-7"
>
<a
href=
"#"
class=
"list-menu-link"
>
<button
type=
"button"
class=
"collapsed"
data-toggle=
"collapse"
data-target=
"#collapse1-7"
aria-expanded=
"true"
aria-controls=
"collapse1-7"
>
<div
class=
"arrow-icon"
></div>
</button>
<label>
<input
type=
"radio"
name=
"category"
>
<span>
カテゴリー
</span>
</label>
</a>
</div>
<div
id=
"collapse1-7"
class=
"collapse"
aria-labelledby=
"heading1-7"
data-parent=
"#accordion1-7"
>
<ul>
<li
class=
"accordion"
id=
"accordion1-8"
>
<div
id=
"heading1-8"
>
<a
href=
"#"
class=
"list-menu-link"
>
<button
type=
"button"
class=
"collapsed"
data-toggle=
"collapse"
data-target=
"#collapse1-8"
aria-expanded=
"true"
aria-controls=
"collapse1-8"
>
<div
class=
"arrow-icon"
></div>
</button>
<label>
<input
type=
"radio"
name=
"category"
>
<span>
カテゴリー
</span>
</label>
</a>
</div>
<div
id=
"collapse1-8"
class=
"collapse"
aria-labelledby=
"heading1-8"
data-parent=
"#accordion1-8"
>
<ul>
<li
class=
"accordion"
id=
"accordion1-9"
>
<div
id=
"heading1-9"
>
<a
href=
"#"
class=
"list-menu-link"
>
<button
type=
"button"
class=
"collapsed"
data-toggle=
"collapse"
data-target=
"#collapse1-9"
aria-expanded=
"true"
aria-controls=
"collapse1-9"
>
<div
class=
"arrow-icon"
></div>
</button>
<label>
<input
type=
"radio"
name=
"category"
>
<span>
カテゴリー
</span>
</label>
</a>
</div>
<div
id=
"collapse1-9"
class=
"collapse"
aria-labelledby=
"heading1-9"
data-parent=
"#accordion1-9"
>
<ul>
<li>
<label>
<input
type=
"radio"
name=
"category"
>
<span>
カテゴリー
</span>
</label>
</li>
</ul>
</div>
</li>
</ul>
</div>
</li>
</ul>
</div>
</li>
</ul>
</div>
</li>
</ul>
</div>
</li>
</ul>
</div>
</li>
</ul>
</div>
</li>
</ul>
</div>
</li>
</ul>
</div>
</li>
</ul>
</div>
</li>
</ul>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-primary"
>
選択
</button>
<button
type=
"button"
class=
"btn btn-tertiary"
data-dismiss=
"modal"
>
キャンセル
</button>
</div>
</div>
</div>
</div>
abweb/common/css/newdash/app.css
View file @
1379d2c6
...
...
@@ -20689,7 +20689,7 @@ button {
.type-icon .report:before{
content: '';
background-image: url("../common/img/type_icon_report.svg");
background-image: url("../
../../
common/img/type_icon_report.svg");
background-size: contain;
background-repeat: no-repeat;
background-position: center;
...
...
@@ -20699,7 +20699,7 @@ button {
}
.type-icon .questionary:before{
content: '';
background-image: url("../common/img/type_icon_questionary.svg");
background-image: url("../
../../
common/img/type_icon_questionary.svg");
background-size: contain;
background-repeat: no-repeat;
background-position: center;
...
...
@@ -20709,7 +20709,7 @@ button {
}
.type-icon .inspection:before{
content: '';
background-image: url("../common/img/type_icon_inspection.svg");
background-image: url("../
../../
common/img/type_icon_inspection.svg");
background-size: contain;
background-repeat: no-repeat;
background-position: center;
...
...
@@ -20719,7 +20719,7 @@ button {
}
.type-icon .proccess:before{
content: '
'
;
background-image
:
url("../common/img/type_icon_proccess.svg")
;
background-image
:
url("../
../../
common/img/type_icon_proccess.svg")
;
background-size
:
contain
;
background-repeat
:
no-repeat
;
background-position
:
center
;
...
...
abweb/common/img/type_icon_questionary.svg
deleted
100644 → 0
View file @
faa0e2e7
<?xml version="1.0" encoding="UTF-8"?>
<svg
id=
"_レイヤー_2"
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 119.14 125"
><defs><style>
.cls-1{fill:#a5d6a7;}
</style></defs><g
id=
"_レイヤー_1-2"
><g><path
class=
"cls-1"
d=
"M48.17,121.12H9.29c-2.48,0-4.65-.93-6.5-2.79-1.86-1.86-2.79-4.03-2.79-6.5V21.68c0-2.48,.8-4.65,2.4-6.5,1.6-1.86,2.97-2.79,4.1-2.79h31.29c.72-3.61,2.5-6.58,5.34-8.91C45.97,1.16,49.25,0,52.97,0c3.72,0,7,1.16,9.83,3.48,2.84,2.32,4.62,5.29,5.34,8.91h31.29c2.48,0,4.65,.93,6.5,2.79,1.86,1.86,2.79,4.03,2.79,6.5v31.44h-9.29V21.68h-16.42v10.84c0,2.58-.9,4.78-2.71,6.58-1.81,1.81-4,2.71-6.58,2.71H35c-2.58,0-4.78-.9-6.58-2.71-1.81-1.81-2.71-4-2.71-6.58v-10.84H9.29V111.82H48.17v9.29Zm-13.4-55.34l16.51-16.51c.45-.45,.98-.67,1.59-.64,.61,.03,1.14,.27,1.59,.72s.68,1,.68,1.63-.23,1.17-.68,1.63l-18.1,18.1c-.45,.45-.98,.68-1.59,.68s-1.14-.23-1.59-.68l-8.94-8.94c-.45-.45-.67-1-.64-1.63,.03-.63,.27-1.17,.72-1.63,.45-.45,1-.68,1.63-.68,.63,0,1.17,.23,1.63,.68l7.2,7.27Zm0,26l16.51-16.51c.45-.45,.98-.67,1.59-.64,.61,.03,1.14,.27,1.59,.72s.68,1,.68,1.63-.23,1.17-.68,1.63l-18.1,18.1c-.45,.45-.98,.68-1.59,.68s-1.14-.23-1.59-.68l-8.94-8.94c-.45-.45-.67-1-.64-1.63,.03-.63,.27-1.17,.72-1.63,.45-.45,1-.68,1.63-.68,.63,0,1.17,.23,1.63,.68l7.2,7.27ZM55.76,21.06c1.76,0,3.23-.59,4.41-1.78,1.19-1.19,1.78-2.66,1.78-4.41s-.59-3.23-1.78-4.41c-1.19-1.19-2.66-1.78-4.41-1.78s-3.23,.59-4.41,1.78c-1.19,1.19-1.78,2.66-1.78,4.41s.59,3.23,1.78,4.41c1.19,1.19,2.66,1.78,4.41,1.78Z"
/><g><path
class=
"cls-1"
d=
"M113.09,82.66l-11.61-11.61,4.74-4.74c.87-.87,2.02-1.31,3.43-1.31s2.56,.44,3.43,1.31l4.74,4.74c.87,.87,1.31,2.02,1.31,3.43s-.44,2.56-1.31,3.43l-4.74,4.74Z"
/><path
class=
"cls-1"
d=
"M59.14,122.55v-7.19c0-.65,.11-1.25,.33-1.8,.22-.54,.6-1.09,1.14-1.63l33.84-33.84,11.61,11.61-33.84,33.84c-.54,.54-1.09,.93-1.63,1.14-.54,.22-1.14,.33-1.8,.33h-7.19c-.65,0-1.23-.25-1.72-.74-.49-.49-.74-1.06-.74-1.72Z"
/></g></g></g></svg>
\ No newline at end of file
abweb/common/js/header.js
0 → 100644
View file @
1379d2c6
/**
* header js for index.
* ※Code is written mainly for dashboard and operationList.
*
* @since cms:1.4.3.2&1.4.3.3 web:1.0
*/
var
HEADER
=
{};
/** Direct home page setting */
HEADER
.
goToHomePage
=
function
(
pageId
)
{
DashboardSetting
.
getSettingData
(
function
(
settings
)
{
if
(
settings
.
dashboardHome
==
1
)
{
HEADER
.
goDashboard
();
}
else
{
HEADER
.
goOperationList
();
}
});
}
/**
* Go page of operationList
*/
HEADER
.
goOperationList
=
function
()
{
OL
.
init
();
};
/**
* Go page of dashboard
*/
HEADER
.
goDashboard
=
function
()
{
COMMON
.
avwScreenMove
(
"dashboard.html"
);
};
/**
* Initialize with any navigation
*
* @param {String} bottomNav
*/
HEADER
.
activeInitBottomNav
=
function
(
bottomNav
)
{
HEADER
.
inactiveAllBottomNav
();
HEADER
.
activeBottomNav
(
bottomNav
);
};
/**
* change inactive all footer bottom
*/
HEADER
.
inactiveAllBottomNav
=
function
()
{
let
navs
=
document
.
getElementsByClassName
(
'bottom-nav'
);
for
(
i
=
0
;
i
<
navs
.
length
;
i
++
)
{
navs
[
i
].
className
=
navs
[
i
].
className
.
replace
(
'text-primary'
,
'text-secondary'
);
let
img
=
navs
[
i
].
querySelector
(
'img'
);
if
(
img
&&
img
.
getAttribute
(
'data-inactive-src'
))
{
img
.
src
=
img
.
getAttribute
(
'data-inactive-src'
);
}
}
};
/**
* Change specific footer bottom to active.
*
* @param {String} bottomNavId
*/
HEADER
.
activeBottomNav
=
function
(
bottomNavId
)
{
let
elm
=
$
(
'#'
+
bottomNavId
);
if
(
typeof
elm
!==
'object'
)
{
console
.
log
(
'HEADER.activeBottomNav:elm !== object:'
+
bottomNavId
);
return
;
}
elm
.
removeClass
(
'text-secondary'
);
elm
.
addClass
(
'text-primary'
);
let
img
=
elm
.
find
(
'img'
)[
0
];
if
(
img
&&
img
.
getAttribute
(
'data-src'
))
{
img
.
src
=
img
.
getAttribute
(
'data-src'
);
}
};
\ No newline at end of file
abweb/html/index.html
View file @
1379d2c6
...
...
@@ -3,34 +3,36 @@
<head>
<meta
charset=
"utf-8"
>
<title
calss=
"multi-lang"
data-msg=
"operationListTitle"
></title>
<meta
name=
"robots"
content=
"index, follow"
>
<meta
name=
"viewport"
content=
"width=device-width,minimum-scale=1,initial-scale=1"
>
<meta
name=
"description"
content=
"A Book Check"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../common/css/appCommon/header.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../common/css/appCommon/footer.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../common/css/appCommon/style.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../common/css/appCommon/app.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"../common/css/appCommon/fontawesome_relative_path.css"
>
<script
src=
"../common/js/jquery/jquery-3.6.0.min.js?__UPDATEID__"
></script>
<script
src=
"../common/js/jquery/jquery-ui.min.js?__UPDATEID__"
></script>
<!-- <script src="../common/js/web/common.js?__UPDATEID__"></script>
<script src="../common/js/web/avweb.js?__UPDATEID__"></script> -->
<script
src=
"../common/js/constant.js?__UPDATEID__"
></script>
<script
src=
"../common/js/common.js?__UPDATEID__"
></script>
<script
src=
"../js/operationList/operationList.js?__UPDATEID__"
></script>
<script
src=
"../js/topPage/topPage.js?__UPDATEID__"
></script>
<script
src=
"../js/dashboardSetting/check-dashboard-setting.js?__UPDATEID__"
></script>
<script
src=
"../js/dashboard/dashboard.js?__UPDATEID__"
></script>
<script
src=
"../common/js/footer.js?__UPDATEID__"
></script>
<script
src=
"../common/js/app.js?__UPDATEID__"
defer
></script>
<!-- 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"
>
<script
type=
"text/javascript"
src=
"/abweb/common/js/jquery/jquery-3.6.0.min.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"/abweb/common/js/jquery/jquery-ui.min.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"/abweb/common/js/web/i18n.js?__UPDATEID__"
></script>
<script
src=
"../common/js/constant.js?__UPDATEID__"
></script>
<script
src=
"../common/js/common.js?__UPDATEID__"
></script>
<script
src=
"../common/js/header.js?__UPDATEID__"
></script>
<script
type=
"text/javascript"
src=
"../js/dashboardSetting/dashboard-setting.js"
></script>
<script
type=
"text/javascript"
src=
"../js/template/template.js"
></script>
<script
type=
"text/javascript"
src=
"../js/dashboard/dashboard.js"
></script>
<script
type=
"text/javascript"
src=
"../js/topPage/topPage.js"
></script>
<script
type=
"text/javascript"
src=
"../js/operationList/operationList.js"
></script>
<script
src=
"../common/js/app.js?__UPDATEID__"
defer
></script>
</head>
<body
onload=
"TOP.init();"
style=
"position: relative; margin-top: 53px;"
>
<body>
<!-- header -->
...
...
@@ -75,59 +77,33 @@
</div>
</div>
</div>
<div
class=
"form-group p-2 mb-0"
>
<label>
終了日
</label>
<div
class=
"input-group date"
id=
"datetimepicker2"
data-target-input=
"nearest"
>
<input
type=
"text"
name=
"end"
class=
"form-control form-control-sm datetimepicker-input"
data-target=
"#datetimepicker2"
placeholder=
"選択"
id=
"searchEndDate"
>
<div
class=
"input-group-append"
data-target=
"#datetimepicker2"
data-toggle=
"datetimepicker"
>
<div
class=
"input-group-text py-1 px-2"
>
<img
src=
"../common/img/icon_calendar.svg"
alt=
"カレンダー"
class=
"calendar-icon"
>
</div>
</div>
</div>
</div>
</div>
<!--ソート-->
<div
class=
"col-4 col-md-5 col-lg-6 text-right"
>
<a
href=
"#"
class=
"text-decoration-none py-2 lht-0"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
data-offset=
"-120, 0"
>
<img
class=
"icon"
src=
"../img/operationList/icon_swap.svg"
>
<span
class=
"d-none d-md-inline text-dark fs-10 align-middle multi-lang"
data-msg=
"labelSort"
></span>
</a>
<div
class=
"dropdown-menu"
aria-labelledby=
"dropdownMenuButton"
>
<a
class=
"dropdown-item sort-type multi-lang"
data-msg=
"labelSortName"
data-sort=
"0"
onclick=
"OL.changeSortType(this);"
></a>
<a
class=
"dropdown-item sort-type active multi-lang"
data-msg=
"labelSortNew"
data-sort=
"1"
id=
"defaultSort"
onclick=
"OL.changeSortType(this);"
></a>
<a
class=
"dropdown-item sort-type multi-lang"
data-msg=
"labelSortOld"
data-sort=
"2"
onclick=
"OL.changeSortType(this);"
></a>
<a
class=
"dropdown-item sort-type multi-lang"
data-msg=
"labelSortOpen"
data-sort=
"4"
onclick=
"OL.changeSortType(this);"
></a>
</div>
<a
href=
"javascript:OL.resetSearch();"
class=
"text-decoration-none py-2 lht-0 d-inline-block ml-3"
>
<img
class=
"icon"
src=
"../img/operationList/icon_clear.svg"
>
<span
class=
"d-none d-md-inline text-dark fs-10 align-middle multi-lang"
data-msg=
"labelReset"
lnag=
"labelReset"
></span>
</a>
<div
class=
"mask hide"
></div>
</div>
<div
class=
"dropdown"
>
<a
href=
"#"
class=
"mx-1"
id=
"dropdown-term"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
data-offset=
"-120, 0"
>
<img
class=
"serarch-icon"
src=
"../common/img/icon_swap.svg"
alt=
"並び替え"
data-toggle=
"tooltip"
data-placement=
"bottom"
title=
"並び替え"
>
</a>
<div
class=
"dropdown-menu dropdown-menu-right sort"
data-animation=
"true"
aria-labelledby=
"dropdownMenuButton"
>
<a
class=
"dropdown-item"
href=
"#"
data-sort=
"0"
onclick=
"OL.changeSortType(this);"
>
作業名順
</a>
<a
class=
"dropdown-item active"
href=
"#"
data-sort=
"1"
id=
"defaultSort"
onclick=
"OL.changeSortType(this);"
>
新しい順
</a>
<a
class=
"dropdown-item"
href=
"#"
data-sort=
"2"
onclick=
"OL.changeSortType(this);"
>
古い順
</a>
<a
class=
"dropdown-item"
href=
"#"
data-sort=
"4"
onclick=
"OL.changeSortType(this);"
>
閲覧日順
</a>
</div>
</div>
</nav>
<!--一覧表示-->
<section>
<table
class=
"table"
>
<thead>
<tr>
<th
class=
"multi-lang"
data-msg=
"headerItemName"
></th>
<th
class=
"d-none d-md-table-cell multi-lang"
data-msg=
"headerStartDate"
></th>
<th
class=
"d-none d-md-table-cell multi-lang"
data-msg=
"headerEndDate"
></th>
</tr>
</thead>
<tbody
id=
"operationTable"
>
</tbody>
</table>
</section>
</main>
</section>
</section>
<section
id=
"dashboard"
class=
"page-content"
style=
"display: none;"
>
<header>
<nav
class=
"navbar navbar-dark bg-primary position-fixed fixed-top w-100"
>
<div></div>
<h1
class=
"fs-10 font-weight-bold mb-0 text-white multi-lang alignCenter_header"
data-msg=
"dashboardHeaderTitle"
></h1>
<div
class=
"d-flex align-items-center"
>
<a
href=
"javascript:CHK.goUrlWithCurrentParams('dashboard-setting.html');"
class=
"nav-link text-white lht-0 p-1 mr-2"
>
<img
class=
"icon"
src=
"../img/dashboard/icon_dashboard_setting.svg"
alt=
""
>
<span
class=
"d-none d-md-inline fs-10 align-middle multi-lang"
data-msg=
"buttonDashboardSetting"
></span>
<a
href=
"javascript:OL.resetSearch();"
class=
"mx-1"
>
<img
class=
"serarch-icon"
src=
"../common/img/icon_close.svg"
alt=
"クリア"
data-toggle=
"tooltip"
data-placement=
"bottom"
title=
"検索条件をクリア"
>
</a>
</div>
</nav>
...
...
@@ -176,10 +152,9 @@
<!--ローディング-->
<div
id=
"check_loading"
style=
"display:none; position: relative; overflow:hidden;"
>
<p
id=
"checkLoadingMessage"
></p>
<div
id=
"checkLoadingImage"
><img
src=
'${check}images/transferLoading.gif'
/></div>
<div
id=
"checkLoadingImage"
><img
src=
'######'
/></div>
</div>
</body>
</html>
\ No newline at end of file
</html>
abweb/js/operationList/operationList.js
View file @
1379d2c6
...
...
@@ -5,573 +5,577 @@
* @since cms:1.4.3.2&1.4.3.3 web:1.0
*/
var
OL
=
{};
OL
.
operationList
;
//Operation json data
OL
.
operationGroupMaster
;
//category(operationGroupMaster) json data
OL
.
isOperationGroupMaster
=
0
;
//0: category(operationGroupMaster) not exist 1: category(operationGroupMaster) exist
OL
.
sortIndex
;
OL
.
operationGroupMasterId
;
OL
.
REPORT_TYPE
=
{
REPORTONLY
:
0
,
//report only
INSPECT
:
1
,
//rountine
WITHREPLY
:
2
,
// report answer
WORKFLOW
:
3
// continuous
}
/**
* process on page load.
* 1.get all data.
* 2.show operationList.
* 3.show category(operationGroupMaster).
*/
OL
.
init
=
function
()
{
console
.
log
(
'OperationList start'
);
TEMPLATE
.
loadHearder
(
"#includedHeader"
);
TEMPLATE
.
loadConfirmModal
(
"#includedConfirmModal"
);
TEMPLATE
.
loadCategoryModal
(
"#includedCategoryModal"
);
//get all data of operation list scene
OL
.
getAllDataWeb
(
sessionStorage
.
OL_searchKeyWord
,
sessionStorage
.
OL_sortIndex
,
sessionStorage
.
OL_searchStartDate
,
sessionStorage
.
OL_searchEndDate
,
sessionStorage
.
OL_operationGroupMasterId
);
//show operation list
OL
.
createOperationList
(
OL
.
operationList
);
//show category(operationGroupMaster)
OL
.
createCategory
();
};
/**
* get operation list all data
* 1.operation list
* 2.category(operationGroupMaster) list
*
* @param {String} searchKeyword
* @param {Number} sortIndex
* @param {String} searchStartDate
* @param {String} searchEndDate
* @param {Number} operationGroupMasterId
*/
OL
.
getAllDataWeb
=
function
(
searchKeyWord
,
sortIndex
,
searchStartDate
,
searchEndDate
,
operationGroupMasterId
)
{
let
param
=
{};
param
.
sid
=
COMMON
.
getSid
();
if
(
typeof
searchKeyWord
!==
'undefined'
)
{
param
.
operationName
=
searchKeyWord
;
}
if
(
typeof
sortIndex
!==
'undefined'
)
{
param
.
sort
=
sortIndex
;
}
if
(
typeof
searchStartDate
!==
'undefined'
)
{
param
.
startDate
=
searchStartDate
;
}
if
(
typeof
searchEndDate
!==
'undefined'
)
{
param
.
endDate
=
searchEndDate
;
}
if
(
typeof
operationGroupMasterId
!==
'undefined'
)
{
param
.
operationGroupMasterId
=
operationGroupMasterId
;
}
const
url
=
CONSTANT
.
URL
.
CMS
.
BASE
+
ClientData
.
userInfo_accountPath
()
+
CONSTANT
.
URL
.
CMS
.
API
.
BASE
+
CONSTANT
.
URL
.
CMS
.
API
.
ALL_OPERATION_LIST
;
COMMON
.
cmsAjax
(
url
,
param
,
false
,
function
(
json
)
{
OL
.
saveSearchKeyWord
(
searchKeyWord
,
sortIndex
,
searchStartDate
,
searchEndDate
,
operationGroupMasterId
);
OL
.
setSearchInfoWeb
();
OL
.
operationList
=
json
.
operationList
;
OL
.
operationGroupMaster
=
json
.
operationGroupMasterList
;
OL
.
isOperationGroupMaster
=
json
.
isOperationGroupMaster
;
});
};
/**
* Transfer search criteria to session.
* Keep value after page move.
*
* @param {String} searchKeyword
* @param {String} sortIndex
* @param {String} searchStartDate
* @param {String} searchEndDate
* @param {String} operationGroupMasterId
*/
OL
.
saveSearchKeyWord
=
function
(
searchKeyword
,
sortIndex
,
searchStartDate
,
searchEndDate
,
operationGroupMasterId
)
{
if
(
typeof
searchKeyword
!==
'undefined'
)
{
sessionStorage
.
OL_searchKeyWord
=
searchKeyword
;
}
if
(
typeof
sortIndex
!==
'undefined'
)
{
sessionStorage
.
OL_sortIndex
=
sortIndex
;
}
if
(
typeof
searchStartDate
!==
'undefined'
)
{
sessionStorage
.
OL_searchStartDate
=
searchStartDate
;
}
if
(
typeof
searchEndDate
!==
'undefined'
)
{
sessionStorage
.
OL_searchEndDate
=
searchEndDate
;
}
if
(
typeof
operationGroupMasterId
!==
'undefined'
)
{
sessionStorage
.
OL_operationGroupMasterId
=
operationGroupMasterId
;
}
};
/**
* set search criteria when Initial display.
*/
OL
.
setSearchInfoWeb
=
function
()
{
if
(
sessionStorage
.
OL_sortIndex
)
{
OL
.
sortIndex
=
sessionStorage
.
OL_sortIndex
;
}
if
(
sessionStorage
.
OL_searchKeyWord
)
{
$
(
'#searchTaskName'
).
val
(
sessionStorage
.
OL_searchKeyWord
);
}
if
(
sessionStorage
.
OL_searchStartDate
)
{
$
(
'#searchStartDate'
).
val
(
sessionStorage
.
OL_searchStartDate
);
}
if
(
sessionStorage
.
OL_searchEndDate
)
{
$
(
'#searchEndDate'
).
val
(
sessionStorage
.
OL_searchEndDate
);
}
if
(
sessionStorage
.
OL_operationGroupMasterId
)
{
OL
.
operationGroupMasterId
=
sessionStorage
.
OL_operationGroupMasterId
;
}
};
/**
* create operation list
*/
OL
.
createOperationList
=
function
(
operationList
)
{
//Initialization
OL
.
initActiveSortIndex
();
$
(
'#operationTable'
).
empty
();
if
(
!
operationList
)
{
return
;
}
//create & show
for
(
let
i
=
0
;
i
<
operationList
.
length
;
i
++
)
{
let
classIcon
;
switch
(
operationList
[
i
].
reportType
)
{
case
OL
.
REPORT_TYPE
.
REPORTONLY
:
classIcon
=
"report"
;
break
;
case
OL
.
REPORT_TYPE
.
INSPECT
:
classIcon
=
"inspection"
;
break
;
case
OL
.
REPORT_TYPE
.
WITHREPLY
:
classIcon
=
"questionary"
;
break
;
case
OL
.
REPORT_TYPE
.
WORKFLOW
:
classIcon
=
"proccess"
;
break
;
}
let
messageli
=
$
(
"<li class='card mb-2' name = 'operationId_"
+
operationList
[
i
].
operationId
+
"' ></li>"
);
let
ahrefRequiredFlg
=
$
(
"<a href=
\"
javascript:OL.sendOperation('"
+
operationList
[
i
].
operationId
+
"', '"
+
operationList
[
i
].
operationType
+
"', '"
+
operationList
[
i
].
reportType
+
"', '"
+
operationList
[
i
].
enableAddReport
+
"');
\"
class='h-100 d-block px-3 py-2 text-decoration-none text-dark position-relative'></a>"
);
let
divIcon
=
$
(
"<div class='position-absolute translate-middle top-50 left-0 ml-3'>"
+
"<div class='type-icon'>"
+
"<span class='"
+
classIcon
+
"'></span>"
+
"</div></div>"
)
let
divText
=
$
(
"<div class='pl-5 h-100 d-flex align-items-center'>"
+
"<div class='w-100'>"
+
"<div class='fs-12 text-truncate'>"
+
operationList
[
i
].
operationName
+
"</div>"
+
"</div></div>"
);
let
divDate
=
$
(
"<div class='fs-8 text-secondary text-truncate'>"
var
OL
=
{};
OL
.
operationList
;
//Operation json data
OL
.
operationGroupMaster
;
//category(operationGroupMaster) json data
OL
.
isOperationGroupMaster
=
0
;
//0: category(operationGroupMaster) not exist 1: category(operationGroupMaster) exist
OL
.
sortIndex
;
OL
.
operationGroupMasterId
;
OL
.
REPORT_TYPE
=
{
REPORTONLY
:
0
,
//report only
INSPECT
:
1
,
//rountine
WITHREPLY
:
2
,
// report answer
WORKFLOW
:
3
// continuous
}
/**
* process on page load.
* 1.get all data.
* 2.show operationList.
* 3.show category(operationGroupMaster).
*/
OL
.
init
=
function
()
{
console
.
log
(
'OperationList start'
);
TEMPLATE
.
loadHearder
(
"#includedHeader"
);
TEMPLATE
.
loadConfirmModal
(
"#includedConfirmModal"
);
TEMPLATE
.
loadCategoryModal
(
"#includedCategoryModal"
);
//get all data of operation list scene
OL
.
getAllDataWeb
(
sessionStorage
.
OL_searchKeyWord
,
sessionStorage
.
OL_sortIndex
,
sessionStorage
.
OL_searchStartDate
,
sessionStorage
.
OL_searchEndDate
,
sessionStorage
.
OL_operationGroupMasterId
);
//show operation list
OL
.
createOperationList
(
OL
.
operationList
);
//show category(operationGroupMaster)
OL
.
createCategory
();
};
/**
* get operation list all data
* 1.operation list
* 2.category(operationGroupMaster) list
*
* @param {String} searchKeyword
* @param {Number} sortIndex
* @param {String} searchStartDate
* @param {String} searchEndDate
* @param {Number} operationGroupMasterId
*/
OL
.
getAllDataWeb
=
function
(
searchKeyWord
,
sortIndex
,
searchStartDate
,
searchEndDate
,
operationGroupMasterId
)
{
let
param
=
{};
param
.
sid
=
COMMON
.
getSid
();
if
(
typeof
searchKeyWord
!==
'undefined'
)
{
param
.
operationName
=
searchKeyWord
;
}
if
(
typeof
sortIndex
!==
'undefined'
)
{
param
.
sort
=
sortIndex
;
}
if
(
typeof
searchStartDate
!==
'undefined'
)
{
param
.
startDate
=
searchStartDate
;
}
if
(
typeof
searchEndDate
!==
'undefined'
)
{
param
.
endDate
=
searchEndDate
;
}
if
(
typeof
operationGroupMasterId
!==
'undefined'
)
{
param
.
operationGroupMasterId
=
operationGroupMasterId
;
}
const
url
=
CONSTANT
.
URL
.
CMS
.
BASE
+
ClientData
.
userInfo_accountPath
()
+
CONSTANT
.
URL
.
CMS
.
API
.
BASE
+
CONSTANT
.
URL
.
CMS
.
API
.
ALL_OPERATION_LIST
;
COMMON
.
cmsAjax
(
url
,
param
,
false
,
function
(
json
)
{
OL
.
saveSearchKeyWord
(
searchKeyWord
,
sortIndex
,
searchStartDate
,
searchEndDate
,
operationGroupMasterId
);
OL
.
setSearchInfoWeb
();
OL
.
operationList
=
json
.
operationList
;
OL
.
operationGroupMaster
=
json
.
operationGroupMasterList
;
OL
.
isOperationGroupMaster
=
json
.
isOperationGroupMaster
;
});
};
/**
* Transfer search criteria to session.
* Keep value after page move.
*
* @param {String} searchKeyword
* @param {String} sortIndex
* @param {String} searchStartDate
* @param {String} searchEndDate
* @param {String} operationGroupMasterId
*/
OL
.
saveSearchKeyWord
=
function
(
searchKeyword
,
sortIndex
,
searchStartDate
,
searchEndDate
,
operationGroupMasterId
)
{
if
(
typeof
searchKeyword
!==
'undefined'
)
{
sessionStorage
.
OL_searchKeyWord
=
searchKeyword
;
}
if
(
typeof
sortIndex
!==
'undefined'
)
{
sessionStorage
.
OL_sortIndex
=
sortIndex
;
}
if
(
typeof
searchStartDate
!==
'undefined'
)
{
sessionStorage
.
OL_searchStartDate
=
searchStartDate
;
}
if
(
typeof
searchEndDate
!==
'undefined'
)
{
sessionStorage
.
OL_searchEndDate
=
searchEndDate
;
}
if
(
typeof
operationGroupMasterId
!==
'undefined'
)
{
sessionStorage
.
OL_operationGroupMasterId
=
operationGroupMasterId
;
}
};
/**
* set search criteria when Initial display.
*/
OL
.
setSearchInfoWeb
=
function
()
{
if
(
sessionStorage
.
OL_sortIndex
)
{
OL
.
sortIndex
=
sessionStorage
.
OL_sortIndex
;
}
if
(
sessionStorage
.
OL_searchKeyWord
)
{
$
(
'#searchTaskName'
).
val
(
sessionStorage
.
OL_searchKeyWord
);
}
if
(
sessionStorage
.
OL_searchStartDate
)
{
$
(
'#searchStartDate'
).
val
(
sessionStorage
.
OL_searchStartDate
);
}
if
(
sessionStorage
.
OL_searchEndDate
)
{
$
(
'#searchEndDate'
).
val
(
sessionStorage
.
OL_searchEndDate
);
}
if
(
sessionStorage
.
OL_operationGroupMasterId
)
{
OL
.
operationGroupMasterId
=
sessionStorage
.
OL_operationGroupMasterId
;
}
};
/**
* create operation list
*/
OL
.
createOperationList
=
function
(
operationList
)
{
//Initialization
OL
.
initActiveSortIndex
();
$
(
'#operationTable'
).
empty
();
if
(
!
operationList
)
{
return
;
}
//create & show
for
(
let
i
=
0
;
i
<
operationList
.
length
;
i
++
)
{
let
classIcon
;
switch
(
operationList
[
i
].
reportType
)
{
case
OL
.
REPORT_TYPE
.
REPORTONLY
:
classIcon
=
"report"
;
break
;
case
OL
.
REPORT_TYPE
.
INSPECT
:
classIcon
=
"inspection"
;
break
;
case
OL
.
REPORT_TYPE
.
WITHREPLY
:
classIcon
=
"questionary"
;
break
;
case
OL
.
REPORT_TYPE
.
WORKFLOW
:
classIcon
=
"proccess"
;
break
;
}
let
messageli
=
$
(
"<li class='card mb-2' name = 'operationId_"
+
operationList
[
i
].
operationId
+
"' ></li>"
);
let
ahrefRequiredFlg
=
$
(
"<a href=
\"
javascript:OL.sendOperation('"
+
operationList
[
i
].
operationId
+
"', '"
+
operationList
[
i
].
operationType
+
"', '"
+
operationList
[
i
].
reportType
+
"', '"
+
operationList
[
i
].
enableAddReport
+
"');
\"
class='h-100 d-block px-3 py-2 text-decoration-none text-dark position-relative'></a>"
);
let
divIcon
=
$
(
"<div class='position-absolute translate-middle top-50 left-0 ml-3'>"
+
"<div class='type-icon'>"
+
"<span class='"
+
classIcon
+
"'></span>"
+
"</div></div>"
)
let
divDate
=
"<div class='fs-8 text-secondary text-truncate'>"
+
OL
.
setOperationDate
(
operationList
[
i
].
operationStartDate
)
+
' ~ '
+
OL
.
setOperationDate
(
operationList
[
i
].
operationEndDate
)
+
"</div>"
);
ahrefRequiredFlg
.
append
(
divIcon
);
ahrefRequiredFlg
.
append
(
divText
);
messageli
.
append
(
ahrefRequiredFlg
);
$
(
'#operationTable'
).
append
(
messageli
);
}
};
/**
* add color to any sorting type when sortIndex exsist
*
* @param {Number} sortIndex
*/
OL
.
initActiveSortIndex
=
function
(
sortIndex
)
{
if
(
!
sortIndex
&&
!
OL
.
sortIndex
)
{
OL
.
sortIndex
=
CONSTANT
.
SORT_TYPE
.
START_DATE_DESC
;
}
$
(
'.sort-type'
).
each
(
function
()
{
const
sortType
=
$
(
this
).
data
(
'sort'
);
if
(
sortType
==
OL
.
sortIndex
)
{
$
(
'.sort-type'
).
removeClass
(
'active'
);
$
(
this
).
addClass
(
'active'
);
}
});
};
/**
* set date for OperationList
*
* @param {String} date
* @returns operationDate
*/
OL
.
setOperationDate
=
function
(
date
)
{
const
operationDate
=
date
.
replace
(
/-/g
,
'/'
).
substring
(
0
,
10
);
return
operationDate
;
};
/**
* create category(operationGroupMaster).
*/
OL
.
createCategory
=
function
()
{
if
(
!
OL
.
isOperationGroupMaster
)
{
return
;
}
OL
.
initCategory
();
OL
.
createBreadcrumbList
();
OL
.
createCategoryList
();
OL
.
acdMenu
();
};
/**
* Initial processing of category(operationGroupMaster).
*/
OL
.
initCategory
=
function
()
{
if
(
!
OL
.
isOperationGroupMaster
)
{
return
;
}
$
(
'#operationGroupMasterButton'
).
removeClass
(
'd-none'
);
OL
.
setCategoryHeight
();
$
(
window
).
resize
(
function
()
{
OL
.
setCategoryHeight
();
});
};
/**
* change height category(operationGroupMaster)
*/
OL
.
setCategoryHeight
=
function
()
{
const
CATEGORY_HEIGHT
=
$
(
'footer'
).
offset
().
top
-
$
(
'#category-menu'
).
offset
().
top
;
$
(
'#category-menu'
).
css
(
'overflow'
,
'scroll'
);
$
(
'#category-menu'
).
height
(
CATEGORY_HEIGHT
);
$
(
'#overlayDiv'
).
height
(
CATEGORY_HEIGHT
);
};
/**
* create Breadcrumb List
*/
OL
.
createBreadcrumbList
=
function
()
{
if
(
!
OL
.
isOperationGroupMaster
)
{
return
;
}
$
(
'#groupMasterPath'
).
empty
();
if
(
typeof
OL
.
operationGroupMasterId
===
'undefined'
||
OL
.
operationGroupMasterId
==
0
)
{
$
(
'#groupMasterPath'
).
append
(
'<li class="breadcrumb-item"><a href="#" class="text-decoration-none text-dark">'
+
COMMON
.
getMsg
(
'all'
)
+
'</a></li>'
);
}
else
{
let
treeList
=
[];
OL
.
createBreadcrumbTree
(
treeList
,
OL
.
operationGroupMasterId
);
treeList
.
forEach
(
function
(
operationGroupMaster
)
{
$
(
'#groupMasterPath'
).
append
(
'<li class="breadcrumb-item"><a onclick="OL.changeOperationGroupMaster('
+
operationGroupMaster
.
operationGroupMasterId
+
');" class="text-decoration-none text-dark">'
+
operationGroupMaster
.
operationGroupMasterName
+
'</a></li>'
,
);
});
}
};
/**
* create Breadcrumb tree List
*
* @param {list} treeList
* @param {string} operationGroupMasterId
* @returns
*/
OL
.
createBreadcrumbTree
=
function
(
treeList
,
operationGroupMasterId
)
{
if
(
operationGroupMasterId
==
0
)
{
return
treeList
;
}
const
groupMaster
=
OL
.
operationGroupMaster
.
filter
(
it
=>
it
.
operationGroupMasterId
==
operationGroupMasterId
)[
0
];
OL
.
createBreadcrumbTree
(
treeList
,
groupMaster
.
parentOperationGroupMasterId
);
treeList
.
push
(
groupMaster
);
return
treeList
;
};
/**
* create category(operationGroupMaster) structure
*/
OL
.
createCategoryList
=
function
()
{
if
(
!
OL
.
isOperationGroupMaster
)
{
return
;
}
//Create a side menu category structure
$
(
'.group-category-list'
).
remove
();
OL
.
operationGroupMaster
.
sort
(
function
(
a
,
b
)
{
if
(
a
.
operationGroupMasterLevel
<
b
.
operationGroupMasterLevel
)
return
-
1
;
if
(
a
.
operationGroupMasterLevel
>
b
.
operationGroupMasterLevel
)
return
1
;
return
1
;
});
//common
const
noCategory
=
$
(
"<dl id='groupMasterId_0' class='group-category-list'><dt><a onclick='OL.changeOperationGroupMaster(0);'>"
+
COMMON
.
getMsg
(
'all'
)
+
'</a></dt></dl>'
);
$
(
'#category-menu'
).
append
(
noCategory
);
//create category(operationGroupMaster) structure
for
(
let
i
=
0
;
i
<
OL
.
operationGroupMaster
.
length
;
i
++
)
{
if
(
OL
.
operationGroupMaster
[
i
].
operationGroupMasterLevel
==
0
)
{
const
categoryParent
=
$
(
'<dl id=groupMasterId_'
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterId
+
" class='group-category-list' style='overflow-x:auto;'><dt class='menu-ttl'><a onclick='OL.changeOperationGroupMaster("
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterId
+
");'>"
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterName
+
'</a></dt></dl>'
,
);
$
(
'#category-menu'
).
append
(
categoryParent
);
}
else
{
if
(
$
(
'#groupMasterId_'
+
OL
.
operationGroupMaster
[
i
].
parentOperationGroupMasterId
+
'>ul'
).
length
>
0
)
{
const
categoryChild
=
$
(
"<li id='groupMasterId_"
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterId
+
"' class=''><p class='category-li group-level-"
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterLevel
+
"'><a class='category-a' onclick='OL.changeOperationGroupMaster("
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterId
+
");'>"
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterName
+
'</a></p></li>'
,
);
$
(
'#groupMasterId_'
+
OL
.
operationGroupMaster
[
i
].
parentOperationGroupMasterId
+
' >ul'
).
append
(
categoryChild
);
}
else
{
const
groupParents
=
'#groupMasterId_'
+
OL
.
operationGroupMaster
[
i
].
parentOperationGroupMasterId
;
$
(
groupParents
+
' > p'
).
addClass
(
'sub-menu-ttl'
);
const
categoryChild
=
$
(
"<ul style='display:none;' class=''><li class='' id='groupMasterId_"
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterId
+
"' class=''><p class='category-li group-level-"
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterLevel
+
"'><a class='category-a' onclick='OL.changeOperationGroupMaster("
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterId
+
");'>"
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterName
+
'</a></p></li></ul>'
,
);
$
(
'#groupMasterId_'
+
OL
.
operationGroupMaster
[
i
].
parentOperationGroupMasterId
).
append
(
categoryChild
);
}
}
}
};
/**
* Open/close category(operationGroupMaster) drawer menu
*/
OL
.
acdMenu
=
function
()
{
//Hide accordion contents by default
$
(
'.drawer-menu dd'
).
css
(
'display'
,
'none'
);
$
(
'.drawer-menu2 ul'
).
css
(
'display'
,
'none'
);
//second accordion
$
(
'.drawer-menu dt'
).
on
(
'click'
,
function
()
{
$
(
'.sub-menu-ttl'
).
removeClass
(
'openAcd'
).
next
().
slideUp
(
'fast'
);
$
(
'.drawer-menu dt'
).
not
(
this
).
removeClass
(
'open'
).
next
().
slideUp
(
'fast'
);
$
(
this
).
toggleClass
(
'open'
).
next
().
slideToggle
(
'fast'
);
});
//third accordion
$
(
'.sub-menu-ttl'
).
on
(
'click'
,
function
()
{
$
(
'.sub-menu-ttl'
).
not
(
$
(
this
)).
not
(
$
(
this
).
parents
().
siblings
(
'p'
)).
removeClass
(
'openAcd'
).
next
().
slideUp
(
'fast'
);
$
(
this
).
toggleClass
(
'openAcd'
).
next
().
slideToggle
(
'fast'
);
});
};
/**
* Sort the operationList by screen operation
*
* @param {Object} sortType
*/
OL
.
changeSortType
=
function
(
sortType
)
{
$
(
'.sort-type'
).
removeClass
(
'active'
);
$
(
sortType
).
addClass
(
'active'
);
OL
.
sortIndex
=
$
(
sortType
).
attr
(
'data-sort'
);
const
sortStr
=
sortType
.
dataset
.
sort
;
const
sortNumber
=
parseFloat
(
sortStr
);
OL
.
sortOperationList
(
sortNumber
);
OL
.
createOperationList
(
OL
.
operationList
);
};
/**
* sort the operationList
*
* @param {Number} sortNumber
*/
OL
.
sortOperationList
=
function
(
sortNumber
)
{
switch
(
sortNumber
)
{
case
CONSTANT
.
SORT_TYPE
.
NAME
:
OL
.
operationList
.
sort
(
function
(
a
,
b
)
{
if
(
a
.
operationName
>
b
.
operationName
)
return
1
;
if
(
a
.
operationName
<
b
.
operationName
)
return
-
1
;
return
0
;
});
break
;
case
CONSTANT
.
SORT_TYPE
.
START_DATE_DESC
:
OL
.
operationList
.
sort
(
function
(
a
,
b
)
{
if
(
OL
.
setOperationDate
(
a
.
operationStartDate
)
<
OL
.
setOperationDate
(
b
.
operationStartDate
))
return
1
;
if
(
OL
.
setOperationDate
(
a
.
operationStartDate
)
>
OL
.
setOperationDate
(
b
.
operationStartDate
))
return
-
1
;
return
0
;
});
break
;
case
CONSTANT
.
SORT_TYPE
.
START_DATE_ASC
:
OL
.
operationList
.
sort
(
function
(
a
,
b
)
{
if
(
OL
.
setOperationDate
(
a
.
operationStartDate
)
>
OL
.
setOperationDate
(
b
.
operationStartDate
))
return
1
;
if
(
OL
.
setOperationDate
(
a
.
operationStartDate
)
<
OL
.
setOperationDate
(
b
.
operationStartDate
))
return
-
1
;
return
0
;
});
break
;
case
CONSTANT
.
SORT_TYPE
.
TYPE
:
OL
.
operationList
.
sort
(
function
(
a
,
b
)
{
if
(
a
.
operationType
<
b
.
operationType
)
return
1
;
if
(
a
.
operationType
>
b
.
operationType
)
return
-
1
;
return
0
;
});
break
;
case
CONSTANT
.
SORT_TYPE
.
LAST_EDIT_DATE
:
const
defaultDate
=
'1900-01-01 09:00:00'
;
OL
.
operationList
.
sort
(
function
(
a
,
b
)
{
if
(
!
a
.
operationOpenDate
)
{
a
.
operationOpenDate
=
defaultDate
;
}
if
(
!
b
.
operationOpenDate
)
{
b
.
operationOpenDate
=
defaultDate
;
}
if
(
a
.
operationOpenDate
<
b
.
operationOpenDate
)
return
1
;
if
(
a
.
operationOpenDate
>
b
.
operationOpenDate
)
return
-
1
;
return
0
;
});
break
;
}
};
/**
* search operarionList
*/
OL
.
search
=
function
()
{
COMMON
.
showLoading
();
const
searchKeyword
=
$
(
'#searchTaskName'
).
val
();
const
searchStartDate
=
$
(
'#searchStartDate'
).
val
();
const
searchEndDate
=
$
(
'#searchEndDate'
).
val
();
if
(
searchStartDate
&&
searchEndDate
&&
searchStartDate
>
searchEndDate
)
{
COMMON
.
closeLoading
();
COMMON
.
displayAlert
(
'dateError'
);
return
;
}
OL
.
getAllDataWeb
(
searchKeyword
,
OL
.
sortIndex
,
searchStartDate
,
searchEndDate
,
OL
.
operationGroupMasterId
);
OL
.
createOperationList
(
OL
.
operationList
);
OL
.
createCategory
();
COMMON
.
closeLoading
();
};
/**
* change the operationList by select the category(OperationGroupMaster)
* @param {Number} operationGroupMasterId
*/
OL
.
changeOperationGroupMaster
=
function
(
operationGroupMasterId
)
{
if
(
$
(
'#category-menu'
).
hasClass
(
'open'
))
{
$
(
'#category-toggle-button'
).
click
();
$
(
'body'
).
css
(
'overflow'
,
'visible'
);
}
OL
.
operationGroupMasterId
=
operationGroupMasterId
;
OL
.
search
();
};
/**
* open the category(OperationGroupMaster)
*/
OL
.
openCategory
=
function
()
{
window
.
scrollTo
(
0
,
0
);
if
(
$
(
'#category-menu'
).
hasClass
(
'open'
))
{
$
(
'body'
).
css
(
'overflow'
,
'visible'
);
}
else
{
$
(
'body'
).
css
(
'overflow'
,
'hidden'
);
}
};
/**
* reset search
*/
OL
.
resetSearch
=
function
()
{
$
(
'#searchTaskName'
).
val
(
''
);
$
(
'#searchStartDate'
).
val
(
''
);
$
(
'#searchEndDate'
).
val
(
''
);
OL
.
changeSortType
(
$
(
'#defaultSort'
));
};
/**
* Transition to the report form or operation list screen
*
* @param {String} operationId
*/
OL
.
sendOperation
=
function
(
operationId
,
operationType
,
reportType
,
enableAddReport
)
{
//save operation logs. needed for sorting
OL
.
saveOperationReadingLog
(
operationId
,
operationType
,
reportType
);
//Transition to the report form or operation list screen
let
params
=
{};
params
.
sid
=
COMMON
.
getSid
();
params
.
operationId
=
operationId
;
const
url
=
OL
.
createUrlOfOperation
(
enableAddReport
,
reportType
);
COMMON
.
postCommunication
(
url
,
params
);
};
/**
* save operation logs. needed for sorting
*
* @param {String} operationId
* @param {String} operationType
* @param {String} reportType
*/
OL
.
saveOperationReadingLog
=
function
(
operationId
,
operationType
,
reportType
)
{
let
params
=
{};
params
.
sid
=
COMMON
.
getSid
();
params
.
operationId
=
operationId
;
params
.
deviceType
=
CONSTANT
.
DEVICE_TYPE
.
WEB
;
params
.
operationType
=
operationType
;
params
.
reportType
=
reportType
;
params
.
viewingStartDate
=
COMMON
.
currentTime
();
const
url
=
CONSTANT
.
URL
.
CMS
.
BASE
+
ClientData
.
userInfo_accountPath
()
+
CONSTANT
.
URL
.
CMS
.
API
.
BASE
+
CONSTANT
.
URL
.
CMS
.
API
.
OPERATION_VIEW_LOG
;
COMMON
.
cmsAjax
(
url
,
params
,
false
);
};
/**
* return url of cms Operation Scene
*
* @param {boolean} enableAddReport
* @param {Number} reportType
* @returns url
*/
OL
.
createUrlOfOperation
=
function
(
enableAddReport
,
reportType
)
{
let
baseUrl
=
CONSTANT
.
URL
.
CMS
.
BASE
+
ClientData
.
userInfo_accountPath
()
+
CONSTANT
.
URL
.
CMS
.
HTML
.
BASE
;
if
(
reportType
==
CONSTANT
.
REPORT_TYPE
.
ROUTINE
||
enableAddReport
==
'1'
)
{
return
baseUrl
+
CONSTANT
.
URL
.
CMS
.
HTML
.
TASK_REPORT_LIST
;
}
else
{
return
baseUrl
+
CONSTANT
.
URL
.
CMS
.
HTML
.
LIST_REPORT_FORM
+
'/'
+
CONSTANT
.
REPLY_NO
.
REPORT
;
}
};
+
"</div>"
;
let
divText
=
$
(
"<div class='pl-5 h-100 d-flex align-items-center'>"
+
"<div class='w-100'>"
+
"<div class='fs-12 text-truncate'>"
+
operationList
[
i
].
operationName
+
"</div>"
+
divDate
+
"</div></div>"
);
ahrefRequiredFlg
.
append
(
divIcon
);
ahrefRequiredFlg
.
append
(
divText
);
messageli
.
append
(
ahrefRequiredFlg
);
$
(
'#operationTable'
).
append
(
messageli
);
}
};
/**
* add color to any sorting type when sortIndex exsist
*
* @param {Number} sortIndex
*/
OL
.
initActiveSortIndex
=
function
(
sortIndex
)
{
if
(
!
sortIndex
&&
!
OL
.
sortIndex
)
{
OL
.
sortIndex
=
CONSTANT
.
SORT_TYPE
.
START_DATE_DESC
;
}
$
(
'.sort-type'
).
each
(
function
()
{
const
sortType
=
$
(
this
).
data
(
'sort'
);
if
(
sortType
==
OL
.
sortIndex
)
{
$
(
'.sort-type'
).
removeClass
(
'active'
);
$
(
this
).
addClass
(
'active'
);
}
});
};
/**
* set date for OperationList
*
* @param {String} date
* @returns operationDate
*/
OL
.
setOperationDate
=
function
(
date
)
{
const
operationDate
=
date
.
replace
(
/-/g
,
'/'
).
substring
(
0
,
10
);
return
operationDate
;
};
/**
* create category(operationGroupMaster).
*/
OL
.
createCategory
=
function
()
{
if
(
!
OL
.
isOperationGroupMaster
)
{
return
;
}
OL
.
initCategory
();
OL
.
createBreadcrumbList
();
OL
.
createCategoryList
();
OL
.
acdMenu
();
};
/**
* Initial processing of category(operationGroupMaster).
*/
OL
.
initCategory
=
function
()
{
if
(
!
OL
.
isOperationGroupMaster
)
{
return
;
}
$
(
'#operationGroupMasterButton'
).
removeClass
(
'd-none'
);
OL
.
setCategoryHeight
();
$
(
window
).
resize
(
function
()
{
OL
.
setCategoryHeight
();
});
};
/**
* change height category(operationGroupMaster)
*/
OL
.
setCategoryHeight
=
function
()
{
const
CATEGORY_HEIGHT
=
$
(
'footer'
).
offset
().
top
-
$
(
'#category-menu'
).
offset
().
top
;
$
(
'#category-menu'
).
css
(
'overflow'
,
'scroll'
);
$
(
'#category-menu'
).
height
(
CATEGORY_HEIGHT
);
$
(
'#overlayDiv'
).
height
(
CATEGORY_HEIGHT
);
};
/**
* create Breadcrumb List
*/
OL
.
createBreadcrumbList
=
function
()
{
if
(
!
OL
.
isOperationGroupMaster
)
{
return
;
}
$
(
'#groupMasterPath'
).
empty
();
if
(
typeof
OL
.
operationGroupMasterId
===
'undefined'
||
OL
.
operationGroupMasterId
==
0
)
{
$
(
'#groupMasterPath'
).
append
(
'<li class="breadcrumb-item"><a href="#" class="text-decoration-none text-dark">'
+
COMMON
.
getMsg
(
'all'
)
+
'</a></li>'
);
}
else
{
let
treeList
=
[];
OL
.
createBreadcrumbTree
(
treeList
,
OL
.
operationGroupMasterId
);
treeList
.
forEach
(
function
(
operationGroupMaster
)
{
$
(
'#groupMasterPath'
).
append
(
'<li class="breadcrumb-item"><a onclick="OL.changeOperationGroupMaster('
+
operationGroupMaster
.
operationGroupMasterId
+
');" class="text-decoration-none text-dark">'
+
operationGroupMaster
.
operationGroupMasterName
+
'</a></li>'
,
);
});
}
};
/**
* create Breadcrumb tree List
*
* @param {list} treeList
* @param {string} operationGroupMasterId
* @returns
*/
OL
.
createBreadcrumbTree
=
function
(
treeList
,
operationGroupMasterId
)
{
if
(
operationGroupMasterId
==
0
)
{
return
treeList
;
}
const
groupMaster
=
OL
.
operationGroupMaster
.
filter
(
it
=>
it
.
operationGroupMasterId
==
operationGroupMasterId
)[
0
];
OL
.
createBreadcrumbTree
(
treeList
,
groupMaster
.
parentOperationGroupMasterId
);
treeList
.
push
(
groupMaster
);
return
treeList
;
};
/**
* create category(operationGroupMaster) structure
*/
OL
.
createCategoryList
=
function
()
{
if
(
!
OL
.
isOperationGroupMaster
)
{
return
;
}
//Create a side menu category structure
$
(
'.group-category-list'
).
remove
();
OL
.
operationGroupMaster
.
sort
(
function
(
a
,
b
)
{
if
(
a
.
operationGroupMasterLevel
<
b
.
operationGroupMasterLevel
)
return
-
1
;
if
(
a
.
operationGroupMasterLevel
>
b
.
operationGroupMasterLevel
)
return
1
;
return
1
;
});
//common
const
noCategory
=
$
(
"<dl id='groupMasterId_0' class='group-category-list'><dt><a onclick='OL.changeOperationGroupMaster(0);'>"
+
COMMON
.
getMsg
(
'all'
)
+
'</a></dt></dl>'
);
$
(
'#category-menu'
).
append
(
noCategory
);
//create category(operationGroupMaster) structure
for
(
let
i
=
0
;
i
<
OL
.
operationGroupMaster
.
length
;
i
++
)
{
if
(
OL
.
operationGroupMaster
[
i
].
operationGroupMasterLevel
==
0
)
{
const
categoryParent
=
$
(
'<dl id=groupMasterId_'
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterId
+
" class='group-category-list' style='overflow-x:auto;'><dt class='menu-ttl'><a onclick='OL.changeOperationGroupMaster("
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterId
+
");'>"
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterName
+
'</a></dt></dl>'
,
);
$
(
'#category-menu'
).
append
(
categoryParent
);
}
else
{
if
(
$
(
'#groupMasterId_'
+
OL
.
operationGroupMaster
[
i
].
parentOperationGroupMasterId
+
'>ul'
).
length
>
0
)
{
const
categoryChild
=
$
(
"<li id='groupMasterId_"
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterId
+
"' class=''><p class='category-li group-level-"
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterLevel
+
"'><a class='category-a' onclick='OL.changeOperationGroupMaster("
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterId
+
");'>"
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterName
+
'</a></p></li>'
,
);
$
(
'#groupMasterId_'
+
OL
.
operationGroupMaster
[
i
].
parentOperationGroupMasterId
+
' >ul'
).
append
(
categoryChild
);
}
else
{
const
groupParents
=
'#groupMasterId_'
+
OL
.
operationGroupMaster
[
i
].
parentOperationGroupMasterId
;
$
(
groupParents
+
' > p'
).
addClass
(
'sub-menu-ttl'
);
const
categoryChild
=
$
(
"<ul style='display:none;' class=''><li class='' id='groupMasterId_"
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterId
+
"' class=''><p class='category-li group-level-"
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterLevel
+
"'><a class='category-a' onclick='OL.changeOperationGroupMaster("
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterId
+
");'>"
+
OL
.
operationGroupMaster
[
i
].
operationGroupMasterName
+
'</a></p></li></ul>'
,
);
$
(
'#groupMasterId_'
+
OL
.
operationGroupMaster
[
i
].
parentOperationGroupMasterId
).
append
(
categoryChild
);
}
}
}
};
/**
* Open/close category(operationGroupMaster) drawer menu
*/
OL
.
acdMenu
=
function
()
{
//Hide accordion contents by default
$
(
'.drawer-menu dd'
).
css
(
'display'
,
'none'
);
$
(
'.drawer-menu2 ul'
).
css
(
'display'
,
'none'
);
//second accordion
$
(
'.drawer-menu dt'
).
on
(
'click'
,
function
()
{
$
(
'.sub-menu-ttl'
).
removeClass
(
'openAcd'
).
next
().
slideUp
(
'fast'
);
$
(
'.drawer-menu dt'
).
not
(
this
).
removeClass
(
'open'
).
next
().
slideUp
(
'fast'
);
$
(
this
).
toggleClass
(
'open'
).
next
().
slideToggle
(
'fast'
);
});
//third accordion
$
(
'.sub-menu-ttl'
).
on
(
'click'
,
function
()
{
$
(
'.sub-menu-ttl'
).
not
(
$
(
this
)).
not
(
$
(
this
).
parents
().
siblings
(
'p'
)).
removeClass
(
'openAcd'
).
next
().
slideUp
(
'fast'
);
$
(
this
).
toggleClass
(
'openAcd'
).
next
().
slideToggle
(
'fast'
);
});
};
/**
* Sort the operationList by screen operation
*
* @param {Object} sortType
*/
OL
.
changeSortType
=
function
(
sortType
)
{
$
(
'.sort-type'
).
removeClass
(
'active'
);
$
(
sortType
).
addClass
(
'active'
);
OL
.
sortIndex
=
$
(
sortType
).
attr
(
'data-sort'
);
const
sortStr
=
sortType
.
dataset
.
sort
;
const
sortNumber
=
parseFloat
(
sortStr
);
OL
.
sortOperationList
(
sortNumber
);
OL
.
createOperationList
(
OL
.
operationList
);
};
/**
* sort the operationList
*
* @param {Number} sortNumber
*/
OL
.
sortOperationList
=
function
(
sortNumber
)
{
switch
(
sortNumber
)
{
case
CONSTANT
.
SORT_TYPE
.
NAME
:
OL
.
operationList
.
sort
(
function
(
a
,
b
)
{
if
(
a
.
operationName
>
b
.
operationName
)
return
1
;
if
(
a
.
operationName
<
b
.
operationName
)
return
-
1
;
return
0
;
});
break
;
case
CONSTANT
.
SORT_TYPE
.
START_DATE_DESC
:
OL
.
operationList
.
sort
(
function
(
a
,
b
)
{
if
(
OL
.
setOperationDate
(
a
.
operationStartDate
)
<
OL
.
setOperationDate
(
b
.
operationStartDate
))
return
1
;
if
(
OL
.
setOperationDate
(
a
.
operationStartDate
)
>
OL
.
setOperationDate
(
b
.
operationStartDate
))
return
-
1
;
return
0
;
});
break
;
case
CONSTANT
.
SORT_TYPE
.
START_DATE_ASC
:
OL
.
operationList
.
sort
(
function
(
a
,
b
)
{
if
(
OL
.
setOperationDate
(
a
.
operationStartDate
)
>
OL
.
setOperationDate
(
b
.
operationStartDate
))
return
1
;
if
(
OL
.
setOperationDate
(
a
.
operationStartDate
)
<
OL
.
setOperationDate
(
b
.
operationStartDate
))
return
-
1
;
return
0
;
});
break
;
case
CONSTANT
.
SORT_TYPE
.
TYPE
:
OL
.
operationList
.
sort
(
function
(
a
,
b
)
{
if
(
a
.
operationType
<
b
.
operationType
)
return
1
;
if
(
a
.
operationType
>
b
.
operationType
)
return
-
1
;
return
0
;
});
break
;
case
CONSTANT
.
SORT_TYPE
.
LAST_EDIT_DATE
:
const
defaultDate
=
'1900-01-01 09:00:00'
;
OL
.
operationList
.
sort
(
function
(
a
,
b
)
{
if
(
!
a
.
operationOpenDate
)
{
a
.
operationOpenDate
=
defaultDate
;
}
if
(
!
b
.
operationOpenDate
)
{
b
.
operationOpenDate
=
defaultDate
;
}
if
(
a
.
operationOpenDate
<
b
.
operationOpenDate
)
return
1
;
if
(
a
.
operationOpenDate
>
b
.
operationOpenDate
)
return
-
1
;
return
0
;
});
break
;
}
};
/**
* search operarionList
*/
OL
.
search
=
function
()
{
COMMON
.
showLoading
();
const
searchKeyword
=
$
(
'#searchTaskName'
).
val
();
const
searchStartDate
=
$
(
'#searchStartDate'
).
val
();
const
searchEndDate
=
$
(
'#searchEndDate'
).
val
();
if
(
searchStartDate
&&
searchEndDate
&&
searchStartDate
>
searchEndDate
)
{
COMMON
.
closeLoading
();
COMMON
.
displayAlert
(
'dateError'
);
return
;
}
OL
.
getAllDataWeb
(
searchKeyword
,
OL
.
sortIndex
,
searchStartDate
,
searchEndDate
,
OL
.
operationGroupMasterId
);
OL
.
createOperationList
(
OL
.
operationList
);
OL
.
createCategory
();
COMMON
.
closeLoading
();
};
/**
* change the operationList by select the category(OperationGroupMaster)
* @param {Number} operationGroupMasterId
*/
OL
.
changeOperationGroupMaster
=
function
(
operationGroupMasterId
)
{
if
(
$
(
'#category-menu'
).
hasClass
(
'open'
))
{
$
(
'#category-toggle-button'
).
click
();
$
(
'body'
).
css
(
'overflow'
,
'visible'
);
}
OL
.
operationGroupMasterId
=
operationGroupMasterId
;
OL
.
search
();
};
/**
* open the category(OperationGroupMaster)
*/
OL
.
openCategory
=
function
()
{
window
.
scrollTo
(
0
,
0
);
if
(
$
(
'#category-menu'
).
hasClass
(
'open'
))
{
$
(
'body'
).
css
(
'overflow'
,
'visible'
);
}
else
{
$
(
'body'
).
css
(
'overflow'
,
'hidden'
);
}
};
/**
* reset search
*/
OL
.
resetSearch
=
function
()
{
$
(
'#searchTaskName'
).
val
(
''
);
$
(
'#searchStartDate'
).
val
(
''
);
$
(
'#searchEndDate'
).
val
(
''
);
OL
.
changeSortType
(
$
(
'#defaultSort'
));
};
/**
* Transition to the report form or operation list screen
*
* @param {String} operationId
*/
OL
.
sendOperation
=
function
(
operationId
,
operationType
,
reportType
,
enableAddReport
)
{
//save operation logs. needed for sorting
OL
.
saveOperationReadingLog
(
operationId
,
operationType
,
reportType
);
//Transition to the report form or operation list screen
let
params
=
{};
params
.
sid
=
COMMON
.
getSid
();
params
.
operationId
=
operationId
;
params
.
returnUrl
=
CONSTANT
.
URL
.
WEB
.
BASE
+
CONSTANT
.
URL
.
WEB
.
OPERATION_LIST
;
const
url
=
OL
.
createUrlOfOperation
(
enableAddReport
,
reportType
);
COMMON
.
postCommunication
(
url
,
params
);
};
/**
* save operation logs. needed for sorting
*
* @param {String} operationId
* @param {String} operationType
* @param {String} reportType
*/
OL
.
saveOperationReadingLog
=
function
(
operationId
,
operationType
,
reportType
)
{
let
params
=
{};
params
.
sid
=
COMMON
.
getSid
();
params
.
operationId
=
operationId
;
params
.
deviceType
=
CONSTANT
.
DEVICE_TYPE
.
WEB
;
params
.
operationType
=
operationType
;
params
.
reportType
=
reportType
;
params
.
viewingStartDate
=
COMMON
.
currentTime
();
const
url
=
CONSTANT
.
URL
.
CMS
.
BASE
+
ClientData
.
userInfo_accountPath
()
+
CONSTANT
.
URL
.
CMS
.
API
.
BASE
+
CONSTANT
.
URL
.
CMS
.
API
.
OPERATION_VIEW_LOG
;
COMMON
.
cmsAjax
(
url
,
params
,
false
);
};
/**
* return url of cms Operation Scene
*
* @param {boolean} enableAddReport
* @param {Number} reportType
* @returns url
*/
OL
.
createUrlOfOperation
=
function
(
enableAddReport
,
reportType
)
{
let
baseUrl
=
CONSTANT
.
URL
.
CMS
.
BASE
+
ClientData
.
userInfo_accountPath
()
+
CONSTANT
.
URL
.
CMS
.
HTML
.
BASE
;
if
(
reportType
==
CONSTANT
.
REPORT_TYPE
.
ROUTINE
||
enableAddReport
==
'1'
)
{
return
baseUrl
+
CONSTANT
.
URL
.
CMS
.
HTML
.
TASK_REPORT_LIST
;
}
else
{
return
baseUrl
+
CONSTANT
.
URL
.
CMS
.
HTML
.
LIST_REPORT_FORM
;
}
};
\ No newline at end of file
abweb/js/topPage/topPage.js
View file @
1379d2c6
...
...
@@ -16,6 +16,8 @@ $(document).ready(function () {
//setting msg of html
COMMON
.
updateLang
();
TOP
.
init
();
});
/**
...
...
@@ -23,7 +25,7 @@ $(document).ready(function () {
*/
TOP
.
init
=
function
()
{
COMMON
.
showLoading
();
FOOTER
.
initFooter
();
//app should get data after initFooter
HEADER
.
goToHomePage
();
//app should get data after initFooter
COMMON
.
closeLoading
();
};
...
...
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