Commit e3ff6916 by Takumi Imai

#49764 作業一覧画面のhtmlとcss,jsの追加

parent fd28dd4d
@charset "UTF-8";
footer img {
width: 30px;
}
\ No newline at end of file
@charset "UTF-8";
header nav{
height: 53px;
}
header .icon {
width: 22px;
max-height: 22px;
}
\ No newline at end of file
@charset "UTF-8";
.main-section {
margin-top: 76px;
}
/* ダッシュボード */
#dashboard .item-wrap {
display: grid;
grid-template-columns: repeat(3,1fr);
}
#dashboard .item-wrap img {
width: 40px;
margin-bottom: 6px;
}
#dashboard .item-wrap .item {
position: relative;
text-align: center;
margin: 5px;
background: aliceblue;
border-radius: 3px;
}
#dashboard .item-wrap .item .count {
position: absolute;
top: 5px;
right: 10px;
min-width: 22px;
background: var(--red);
color: var(--white);
padding: 2px 6px;
border-radius: 11px;
}
@media screen and (min-width: 768px) {
#dashboard .item-wrap {
display: flex;
flex-wrap: wrap;
}
#dashboard .item-wrap .item {
width: 150px;
}
}
@media screen and (max-width: 413px) {
#dashboard .item-wrap {
grid-template-columns: repeat(2,1fr);
}
}
/* ダッシュボード設定 */
.setting-table-wrap table {
width: 100%;
}
.setting-table-wrap th {
padding: 0.8rem;
}
.setting-table-wrap td {
width: 80px;
padding: 0.8rem;
}
/* 共通 */
.toggle {
position: relative;
width: 52px;
height: 30px;
border-radius: 50px;
overflow: hidden;
cursor: pointer;
}
.toggle input[type=checkbox] {
display: none;
}
.toggle:before {
content: "";
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: block;
background: #e9e9eb;
-webkit-transition: 0.2s ease-out;
transition: 0.2s ease-out;
}
.toggle:after {
content: "";
position: absolute;
top: 3px;
left: 3px;
width: 24px;
height: 24px;
display: block;
border-radius: 50px;
background: #fff;
box-shadow: 0 9px 28px -6px rgba(0, 0, 0, 0.3);
-webkit-transition: 0.2s ease-out;
transition: 0.2s ease-out;
}
.toggle.checked:before {
background: #35c759;
}
.toggle.checked:after {
left: 25px;
box-shadow: 0 9px 28px -6px rgba(0, 0, 0, 0.5);
}
/* リスト */
.task-list .item {
position: relative;
}
.task-list .item a{
padding-right: 40px!important;
}
.task-list .sub-title-wrap {
display: flex;
flex-direction: row;
align-items: center;
}
.task-list .title,
.task-list .sub-title{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 16px;
}
.task-list .fas.fa-chevron-right {
position: absolute;
right: 10px;
top: 50%;
transform: translateY(-50%);
-webkit-transform: translateY(-50%);
-ms-transform: translateY(-50%);
color: #E9E9E9;
}
.sub-title-wrap .data {
max-width: 140px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.task-list .item .tag{
width: fit-content;
max-width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* メッセージ一覧 */
.task-list .unread {
background: var(--lightblue);
border: 2px solid var(--blue)!important;
}
.task-list .unread .title,
.task-list .unread .sub-title {
font-weight: bold!important;
}
.task-list .unread .fas.fa-chevron-right {
color: var(--white);
}
/* メッセージ詳細 */
.messege-detail th {
width: 70px;
}
.messege-detail td {
word-break: break-all;
}
#messageDetail #message {
white-space: pre-line;
}
/* ピックアップ */
#pickup .main-section {
margin-top: 60px;
}
#pickup .not-found {
height: calc(100vh - 230px);
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
#pickup .not-found img{
width: 100px;
}
.not-found {
height: calc(100vh - 230px);
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.not-found img {
width: 100px;
}
/* 切り替えタブ */
/* tab */
.tab-menu {
position: relative;
width: 100%;
display: flex;
margin-bottom: 0;
overflow: auto;
overflow-y: clip;
}
.tab-label {
position: relative;
font-weight: bold;
padding: 10px;
order: -1;
z-index: 2;
cursor: pointer;
margin-bottom: 0;
width: 100%;
text-align: center;
color: var(--secondary);
min-width: 130px;
}
.tab-label label:after {
content: "";
background: var(--black);
opacity: .1;
width: 100%;
height: 4px;
position: absolute;
left: 0;
bottom: 0;
}
.tab-label:after {
background: var(--blue);
bottom: 0;
content: '';
display: block;
height: 4px;
left: 0;
opacity: 0;
pointer-events: none;
position: absolute;
transform: translateX(100%);
transition: cubic-bezier(0.4, 0, 0.2, 1) .2s 80ms;
width: 100%;
z-index: 1;
}
.tab-label.on ~ .tab-label:after {
transform: translateX(-100%);
}
.tab-label.on:after {
opacity: 1;
transform: translateX(0);
}
.tab-label label {
cursor: pointer;
white-space: nowrap;
margin-bottom: 0;
}
.tab-label label .task-cnt{
font-weight: normal;
color: var(--secondary);
}
.tab-content-area {
width: 100%;
}
.tab-content {
width: 100%;
display: none;
margin-top: 20px;
animation: show .3s linear 0s;
}
.tab-label.on {
color: var(--blue);
}
.tab-label.on .task-cnt{
font-weight: normal;
color: var(--secondary);
}
.tab-content.on{
display: block;
animation: show .3s linear 0s;
}
.tab-switch {
display: none;
}
/* keyframe */
@keyframes show{
from{
opacity: 0;
}
to{
opacity: 1;
}
}
/* .tab-wrap{
background: White;
box-shadow: 0 0 5px rgba(0,0,0,.1);
display: flex;
flex-wrap: wrap;
overflow: hidden;
padding: 0 0 20px;
}
.tab-label {
color: Gray;
cursor: pointer;
flex: 1;
font-weight: bold;
order: -1;
padding: 12px 24px;
position: relative;
text-align: center;
transition: cubic-bezier(0.4, 0, 0.2, 1) .2s;
user-select: none;
white-space: nowrap;
-webkit-tap-highlight-color: transparent;
}
.tab-label:hover {
background: rgba(0, 191, 255,.1);
}
.tab-switch:checked + .tab-label {
color: DeepSkyBlue;
}
.tab-label::after {
background: DeepSkyBlue;
bottom: 0;
content: '';
display: block;
height: 3px;
left: 0;
opacity: 0;
pointer-events: none;
position: absolute;
transform: translateX(100%);
transition: cubic-bezier(0.4, 0, 0.2, 1) .2s 80ms;
width: 100%;
z-index: 1;
}
.tab-switch:checked ~ .tab-label::after {
transform: translateX(-100%);
}
.tab-switch:checked + .tab-label::after {
opacity: 1;
transform: translateX(0);
}
.tab-content {
height:0;
opacity:0;
padding: 0 20px;
pointer-events:none;
transform: translateX(-30%);
transition: transform .3s 80ms, opacity .3s 80ms;
width: 100%;
}
.tab-switch:checked ~ .tab-content {
transform: translateX(30%);
}
.tab-switch:checked + .tab-label + .tab-content {
height: auto;
opacity: 1;
order: 1;
pointer-events:auto;
transform: translateX(0);
}
.tab-wrap::after {
content: '';
height: 20px;
order: -1;
width: 100%;
}
.tab-switch {
display: none;
} */
\ No newline at end of file
......@@ -178,5 +178,6 @@
"sortReportType": "By report type",
"sortMostViewDateFirst": "By newest viewing date",
"operationListScreenName": "Home",
"settingScreenName": "Setting"
"settingScreenName": "Setting",
"operationListPageTitle": "Working List"
}
......@@ -178,5 +178,6 @@
"sortReportType": "報告タイプ順",
"sortMostViewDateFirst": "閲覧日が新しい順",
"operationListScreenName": "ホーム",
"settingScreenName": "設定"
"settingScreenName": "設定",
"operationListPageTitle": "作業一覧"
}
......@@ -175,5 +175,6 @@
"sortReportType": "보고타입순",
"sortMostViewDateFirst": "열람순",
"operationListScreenName": "홈",
"settingScreenName": "설정"
"settingScreenName": "설정",
"operationListPageTitle": "작업 목록"
}
......@@ -10265,6 +10265,7 @@ input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-
}
.navbar,.navbar .container,.navbar .container-fluid,.navbar .container-lg,.navbar .container-md,.navbar .container-sm,.navbar .container-xl {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: space-between
......@@ -20363,3 +20364,11 @@ button {
margin-left: -2px
}
}
.alignCenter_header {
position: absolute;
top: 50%;
left: 50%;
transform: translateY(-50%) translateX(-50%);
margin: auto;
}
......@@ -3,12 +3,12 @@
font-style:normal;
font-weight:400;
font-display:block;
src:url(../../fonts/vendor/@fortawesome/fontawesome-free/webfa-brands-400.eot);
src:url(../../fonts/vendor/@fortawesome/fontawesome-free/webfa-brands-400.eot)
format("embedded-opentype"),url(../../fonts/vendor/@fortawesome/fontawesome-free/webfa-brands-400.woff2)
format("woff2"),url(../../fonts/vendor/@fortawesome/fontawesome-free/webfa-brands-400.woff)
format("woff"),url(../../fonts/vendor/@fortawesome/fontawesome-free/webfa-brands-400.ttf)
format("truetype"),url(../../fonts/vendor/@fortawesome/fontawesome-free/webfa-brands-400.svg#fontawesome)
src:url(../fonts/vendor/@fortawesome/fontawesome-free/webfa-brands-400.eot);
src:url(../fonts/vendor/@fortawesome/fontawesome-free/webfa-brands-400.eot)
format("embedded-opentype"),url(../fonts/vendor/@fortawesome/fontawesome-free/webfa-brands-400.woff2)
format("woff2"),url(../fonts/vendor/@fortawesome/fontawesome-free/webfa-brands-400.woff)
format("woff"),url(../fonts/vendor/@fortawesome/fontawesome-free/webfa-brands-400.ttf)
format("truetype"),url(../fonts/vendor/@fortawesome/fontawesome-free/webfa-brands-400.svg#fontawesome)
format("svg")}.fab{font-family:"Font Awesome 5 Brands"}
@font-face{
......@@ -16,12 +16,12 @@
font-style:normal;
font-weight:400;
font-display:block;
src:url(../../fonts/vendor/@fortawesome/fontawesome-free/webfa-regular-400.eot);
src:url(../../fonts/vendor/@fortawesome/fontawesome-free/webfa-regular-400.eot)
format("embedded-opentype"),url(../../fonts/vendor/@fortawesome/fontawesome-free/webfa-regular-400.woff2)
format("woff2"),url(../../fonts/vendor/@fortawesome/fontawesome-free/webfa-regular-400.woff)
format("woff"),url(../../fonts/vendor/@fortawesome/fontawesome-free/webfa-regular-400.ttf)
format("truetype"),url(../../fonts/vendor/@fortawesome/fontawesome-free/webfa-regular-400.svg#fontawesome)
src:url(../fonts/vendor/@fortawesome/fontawesome-free/webfa-regular-400.eot);
src:url(../fonts/vendor/@fortawesome/fontawesome-free/webfa-regular-400.eot)
format("embedded-opentype"),url(../fonts/vendor/@fortawesome/fontawesome-free/webfa-regular-400.woff2)
format("woff2"),url(../fonts/vendor/@fortawesome/fontawesome-free/webfa-regular-400.woff)
format("woff"),url(../fonts/vendor/@fortawesome/fontawesome-free/webfa-regular-400.ttf)
format("truetype"),url(../fonts/vendor/@fortawesome/fontawesome-free/webfa-regular-400.svg#fontawesome)
format("svg")}.fab,.far{font-weight:400}
@font-face{
......@@ -29,10 +29,10 @@
font-style:normal;
font-weight:900;
font-display:block;
src:url(../../fonts/vendor/@fortawesome/fontawesome-free/webfa-solid-900.eot);
src:url(../../fonts/vendor/@fortawesome/fontawesome-free/webfa-solid-900.eot)
format("embedded-opentype"),url(../../fonts/vendor/@fortawesome/fontawesome-free/webfa-solid-900.woff2)
format("woff2"),url(../../fonts/vendor/@fortawesome/fontawesome-free/webfa-solid-900.woff)
format("woff"),url(../../fonts/vendor/@fortawesome/fontawesome-free/webfa-solid-900.ttf)
format("truetype"),url(../../fonts/vendor/@fortawesome/fontawesome-free/webfa-solid-900.svg#fontawesome)
src:url(../fonts/vendor/@fortawesome/fontawesome-free/webfa-solid-900.eot);
src:url(../fonts/vendor/@fortawesome/fontawesome-free/webfa-solid-900.eot)
format("embedded-opentype"),url(../fonts/vendor/@fortawesome/fontawesome-free/webfa-solid-900.woff2)
format("woff2"),url(../fonts/vendor/@fortawesome/fontawesome-free/webfa-solid-900.woff)
format("woff"),url(../fonts/vendor/@fortawesome/fontawesome-free/webfa-solid-900.ttf)
format("truetype"),url(../fonts/vendor/@fortawesome/fontawesome-free/webfa-solid-900.svg#fontawesome)
format("svg")}.fa,.far,.fas{font-family:"Font Awesome 5 Free"}.fa,.fas{font-weight:900}
\ No newline at end of file
var CHK_DashboardSetting = {};
CHK_DashboardSetting.displayItems = [
{ id:'newReport', name: 'chk-new', enabled: true, title:'新規報告', msg: 'dashboardSettingNewRegistrationTitle'},
{ id:'continousWork', name: 'chk-proccess', enabled: true, title:'工程作業', msg: 'dashboardSettingContinousWorkTitle'},
{ id:'reportWarning', name: 'chk-alert', enabled: true, title:'警告を含む作業', msg: 'dashboardSettingReportWarningTitle'},
{ id:'dashboardHome', name: 'chk-home', enabled: false, title:'ダッシュボードをホーム画面にする', msg: 'dashboardSettingDashboardHomeTitle'},
];
CHK_DashboardSetting.loadSettings = function() {
CHK_DashboardSetting.displayItems.forEach(function(item) {
let enabled = CHK.dashboardSetting[item.id];
if (typeof enabled !== 'undefined') {
item.enabled = enabled;
let itemElement = $('#' + item.id);
if (item.enabled) {
itemElement.addClass('checked');
} else {
itemElement.removeClass('checked');
}
}
});
}
CHK_DashboardSetting.saveSetting = function(key, enabled) {
CHK_DashboardSetting.displayItems.forEach(function(item) {
if (item.id == key) {
item.enabled = enabled;
}
});
CHK.saveDashboardSetting(key, enabled);
}
CHK_DashboardSetting.initDisplays = function() {
$("#displayItems tbody").empty();
CHK_DashboardSetting.displayItems.forEach(function(item) {
var html = CHK_DashboardSetting.initHtmlItem(item);
$("#displayItems tbody").append(html);
});
}
CHK_DashboardSetting.initHtmlItem = function(item) {
var titleDiv = '<div class="font-weight-normal text-dark multi-lang" data-msg="' + item.msg + '">' + item.title +'</div>';
var toggleClass = 'toggle';
if (item.enabled) {
toggleClass += ' checked';
}
var toggleDiv = '<div id="' + item.id + '" class="' + toggleClass + '"><input type="checkbox" name="' + item.name + '" /></div>';
var html = $('<tr>'
+ '<th>' + titleDiv + '</th>'
+ '<td>' + toggleDiv + '</td>'
+ '</tr>');
return html;
}
CHK_DashboardSetting.bindToggleClick = function() {
$(".toggle").on("click", function() {
$(this).toggleClass("checked");
var id = $(this).attr('id');
var enabled = false;
if ($(this).hasClass('checked')) {
enabled = true;
}
CHK_DashboardSetting.saveSetting(id, enabled);
});
}
CHK_DashboardSetting.init = function() {
CHK.initCommon();
$("#footer").load("main-footer.html", function() {
CHK_Footer.activeDashboardBottomNav();
});
CHK.loadDashboardSetting(function() {
CHK_DashboardSetting.loadSettings();
CHK_DashboardSetting.initDisplays();
CHK_DashboardSetting.bindToggleClick();
});
}
CHK_DashboardSetting.goBack = function() {
CHK_Footer.goDashboard();
}
var CHK_Dashboard = {};
CHK_Dashboard.pickupItems = [
{id: 'newReport', href: "javascript:CHK_Dashboard.goPickup('newReport');", count: 0, enabled: true, img: {src: 'img/icon_new.svg'}, msg: 'newRegistrationTitle'},
{id: 'continousWork', href: "javascript:CHK_Dashboard.goPickup('continousWork');", count: 0, enabled: true, img: {src: 'img/icon_proccess.svg'}, msg: 'continousWorkTitle'},
{id: 'reportWarning', href: "javascript:CHK_Dashboard.goPickup('reportWarning');", count: 0, enabled: true, img: {src: 'img/icon_alert.svg'}, msg: 'reportWarningTitle'},
];
CHK_Dashboard.communicationItems = [
{id: 'messageList', href: "javascript:CHK_Dashboard.goMessageList();", count: 0, enabled: true, img: {src: 'img/icon_message_lsit.svg'}, msg: 'messageListTitle'},
{id: 'sendMessage', href: "javascript:CHK.sendAppCommand('goSendMessage');", count: 0, enabled: true, img: {src: 'img/icon_send_message.svg'}, msg: 'sendMessageTitle'},
{id: 'distanceSupport', href: "javascript:CHK.sendAppCommand('goDistanceSupport');", count: 0, enabled: true, img: {src: 'img/icon_remote.svg'}, msg: 'distanceSupportTitle'},
{id: 'chat', href: "javascript:CHK.sendAppCommand('goChat');", count: 0, enabled: false, img: {src: 'img/icon_chat.svg'}, msg: 'chatTitle'},
];
CHK_Dashboard.initPickups = function() {
$("#pickupItems").empty();
CHK_Dashboard.pickupItems.forEach(function(item) {
if (item.enabled == true) {
var html = CHK_Dashboard.initHtmlItem(item);
$("#pickupItems").append(html);
}
});
//pickup empty
if ($("#pickupItems").children().length > 0) {
$("#pickupHeader").removeClass('d-none');
} else {
$("#pickupHeader").addClass('d-none');
}
}
CHK_Dashboard.initCommunications = function() {
$("#communicationItems").empty();
CHK_Dashboard.communicationItems.forEach(function(item) {
if (item.enabled == true) {
var html = CHK_Dashboard.initHtmlItem(item);
$("#communicationItems").append(html);
}
});
}
CHK_Dashboard.initHtmlItem = function(item) {
var countText = '' + item.count;
if (item.count >= 100) {
countText = '99+';
}
var countDClass = '';
if (typeof item.count == 'undefined' || item.count < 1) {
countDClass = ' d-none';
}
var countSpan = '<span class="count fs-7' + countDClass + '">' + countText + '</span>';
var html = $('<div class="item" id="' + item.id + '">'
+ '<a href="' + item.href + '" class="d-block text-dark text-decoration-none mb-1 p-3">'
+ '<img src="' + item.img.src + '">'
+ '<div class="fs-8 multi-lang" data-msg="' + item.msg + '">' + getMsg(item.msg) + '</div>'
+ countSpan
+ '</a>'
+ '</div>');
return html;
}
CHK_Dashboard.init = function() {
CHK_Dashboard.updateDataPickups();
CHK_Dashboard.initPickups();
CHK_Dashboard.updateDataCommunications();
CHK_Dashboard.initCommunications();
}
CHK_Dashboard.updateDataPickups = function() {
CHK_Dashboard.pickupItems.forEach(function(item) {
let enabled = CHK.dashboardSetting[item.id];
if (enabled == true || enabled == false) {
item.enabled = enabled;
}
item.count = 0;
if (CHK.dashboardBatch[item.id]) {
item.count = CHK.dashboardBatch[item.id];
}
});
}
CHK_Dashboard.updateDataCommunications = function() {
CHK_Dashboard.communicationItems.forEach(function(item) {
if (item.id == 'messageList') {
item.count = 0;
if (typeof CHK.pushMessageList !== 'undefined') {
CHK.pushMessageList.forEach(function(message) {
if (!message.readingFlg) {
item.count += 1;
}
});
}
} else if (item.id == 'chat') {
item.enabled = CHK.isChat;
}
});
}
CHK_Dashboard.goPickup = function(pickupId) {
CHK.goUrlWithCurrentParams('pickup.html', {pickupActive: pickupId});
}
CHK_Dashboard.goMessageList = function() {
CHK.goUrlWithCurrentParams('message-list.html', {});
}
\ No newline at end of file
var CHK_CONSTANT = {};
CHK_CONSTANT.SORT_TYPE = {
NAME: 0,
START_DATE_DESC: 1,
START_DATE_ASC: 2,
TYPE: 3,
LAST_EDIT_DATE: 4,
};
\ No newline at end of file
......@@ -41,9 +41,23 @@ CHK.operation; //作業一覧データ
CHK.operationGroupMaster; //カテゴリーデータ
CHK.operationGroupMasterRelation; //作業・カテゴリー関係データ
CHK.pushMessage; //コミュニケーションデータ
CHK.pushMessageList;
CHK.scanResultCode; //スキャンしたRFID,バーコード
CHK.scanType; //スキャン種別(0:バーコード、1:RFID)
CHK.isChat;
CHK.dashboardSetting = {
newReport: true,
continousWork: true,
reportWarning: true,
dashboardHome: false,
};
CHK.dashboardBatch = {
newReport: 0,
continousWork: 0,
reportWarning: 0,
};
var pageLang; // ページ設定言語
var CATEGORY_HEIGHT; //カテゴリー描画用固定値(高さ)
......@@ -68,6 +82,7 @@ var msgMap = { // velocity?
buttonCategory: { ja: "カテゴリー", ko: "카테고리", en: "Category" },
buttonRefresh: { ja: "更新", ko: "갱신", en: "Refresh" },
buttonBack: { ja: "戻る", ko: "Back", en: "Back" },
buttonScan: { ja: "スキャン", ko: "스캔", en: "Scan" },
placeholderOperationName: { ja: "作業名", ko: "작업명", en: "Working Name" },
labelPeriod: { ja: "期間", ko: "기간", en: "Period" },
......@@ -88,7 +103,34 @@ var msgMap = { // velocity?
buttonRelatedContent: { ja: "関連資料", ko: "관련자료", en: "Related Content" },
buttonCommunication: { ja: "コミュニケーション", ko: "커뮤니케이션", en: "Communication" },
buttonSetting: { ja: "設定", ko: "설정", en: "Setting" },
labelLoading: { ja: "読み込み中", ko: "로딩중", en: "Loading" }
labelLoading: { ja: "読み込み中", ko: "로딩중", en: "Loading" },
buttonOperationList: { ja: "作業一覧", ko: "작업일람", en: "Operations List" },
operationListHeaderTitle: { ja: "作業一覧", ko: "작업일람", en: "Operations List" },
buttonDashboard: { ja: "ダッシュボード", ko: "대시보드", en: "Dashboard" },
dashboardHeaderTitle: { ja: "ダッシュボード", ko: "대시보드", en: "Dashboard" },
buttonDashboardSetting: { ja: "設定", ko: "설정", en: "Setting" },
pickupHeaderTitle: { ja: "ピックアップ", ko: "픽업", en: "Pickup" },
communicationHeaderTitle: { ja: "コミュニケーション", ko: "커뮤니케이션", en: "Communication" },
newRegistrationTitle: { ja: "新規報告", ko: "신규 보고", en: "New report" },
continousWorkTitle: { ja: "工程作業", ko: "공정 작업", en: "Continous Work" },
reportWarningTitle: { ja: "警告を含む報告", ko: "경고를 포함한 보고", en: "Reports With Warnings" },
messageListTitle: { ja: "メッセージ一覧", ko: "메시지 일람", en: "Message List" },
sendMessageTitle: { ja: "メッセージ送信", ko: "메시지 송신", en: "Send Message" },
distanceSupportTitle: { ja: "遠隔支援", ko: "원격지원", en: "Distance Support" },
chatTitle: { ja: "チャット", ko: "채팅", en: "Chat" },
//dashboard setting screen
dashboardSettingHeaderTitle: { ja: "ダッシュボード設定", ko: "대시보드 설정", en: "Dashboard Settings" },
dashboardSettingDisplayHeader: { ja: "表示切替", ko: "표시 전환", en: "Display switching"},
dashboardSettingNewRegistrationTitle: { ja: "新規報告", ko: "신규 보고", en: "New report" },
dashboardSettingContinousWorkTitle: { ja: "工程作業", ko: "공정 작업", en: "Continous Work" },
dashboardSettingReportWarningTitle: { ja: "警告を含む報告", ko: "경고를 포함한 보고", en: "Reports With Warnings" },
dashboardSettingDashboardHomeTitle: { ja: "ダッシュボードをホーム画面にする", ko: "대시보드를 홈 화면으로 만들다", en: "Set dashboard to home screen"},
labelPickUp: { ja: "ピックアップ", ko: "픽업", en: "Pickup" },
labelNewReport: { ja: "新規報告", ko: "신규 보고", en: "New report" },
labelContinousWork: { ja: "工程作業", ko: "공정 작업", en: "Continous Work" },
labelReportWithWarning: { ja: "警告を含む報告", ko: "경고를 포함한 보고", en: "Reports With Warnings" },
reportLevelReport: { ja: "報告", ko: "보고", en: "Report" },
reportLevelAnswer: { ja: "回答", ko: "응답", en: "Answer" }
};
// 言語取得
......@@ -159,7 +201,8 @@ CHK.jsonPath = {
operationList: "operationList.json", // 作業一覧JSONデータ
operationGroupMasterList: "operationGroupMasterList.json", // カテゴリーJSONデータ
operationGroupMasterRelationList: "operationGroupMasterRelationList.json", // 作業・カテゴリー関係JSONデータ
pushMessageList: "pushMessageList.json" // コミュニケーションデータJSONデータ
pushMessageList: "pushMessageList.json", // コミュニケーションデータJSONデータ
dashboardSetting: "dashboardSetting.json"
};
//アプリ送信用コマンド
CHK.apiCmd = {
......@@ -188,7 +231,12 @@ CHK.apiCmd = {
changeReport: "changeTaskReport", //報告レポート変更
getGroupTreeInfo: "getGroupTreeInfo", //担当グループ参照用 ログインユーザーが所属しているグループ取得
deleteProcess: "deleteProcess",
changeOperationGroupMaster: "changeOperationGroupMaster"
changeOperationGroupMaster: "changeOperationGroupMaster",
actionPushMessage: "actionPushMessage",
saveJson: "saveJson",
goSendMessage: "goSendMessage",
goDistanceSupport: "goDistanceSupport",
goChat: "goChat"
};
//CMS送信用コマンド
CHK.actCmd = {
......@@ -211,7 +259,8 @@ const NATIVE_KEY_IOS = {
getOperationGroupMasterRelationListJson: "getOperationGroupMasterRelationListJson",
getPushMessageListJson: "getPushMessageListJson",
searchOperationList: "searchOperationList",
getSortType: "getSortType"
getSortType: "getSortType",
getDashboardSettingJson: "getDashboardSettingJson"
};
// レポートファイル保存タイプ
CHK.REPORT_SAVE_TYPE = {
......@@ -293,6 +342,72 @@ CHK.hasAddTaskAuthority = function() {
});
};
CHK.sessionKeys = [
'reportType', 'isCms', 'isWeb', 'isWindows', 'isAndroid', 'isIOS', 'isRFIDBarcodeScan', 'isOperationGroupMaster',
'sortIndex', 'lang', 'debug', 'isMobile', 'isChat',
];
CHK.loadSessionData = function() {
if (typeof sessionStorage.CHK === 'undefined') {
return {};
}
let sessionData = JSON.parse(sessionStorage.CHK);
if (typeof sessionData !== 'object') {
return {};
}
return sessionData;
}
CHK.loadSessionKey = function(key) {
let sessionData = CHK.loadSessionData();
if (typeof sessionData[key] !== 'undefined' && typeof CHK[key] === 'undefined') {
CHK[key] = sessionData[key];
}
}
CHK.loadInitSession = function() {
let sessionData = CHK.loadSessionData();
CHK.sessionKeys.forEach(function(key) {
if (typeof sessionData[key] !== 'undefined' && typeof CHK[key] === 'undefined') {
CHK[key] = sessionData[key];
}
});
}
CHK.saveInitSession = function() {
var sessionData = {};
CHK.sessionKeys.forEach(function(key) {
if (typeof CHK[key] !== 'undefined') {
sessionData[key] = CHK[key];
}
});
sessionStorage.CHK = JSON.stringify(sessionData);
}
CHK.goUrlWithCurrentParams = function(url, params) {
//ios will remove all web types data when reopen webview
//need add common parameters: app, lang, debug, mobile_flg, isChat, ...
const mixParams = Object.assign(CHK.getUrlParameter(), params);
if (url.includes("?")) {
location.href = url + '&' + new URLSearchParams(mixParams);
} else {
location.href = url + '?' + new URLSearchParams(mixParams);
}
}
CHK.initActiveSortIndex = function(sortIndex) {
if (typeof sortIndex == 'undefined') {
return;
}
$(".sort-type").each(function() {
var sortType = $(this).data("sort");
if (sortType == CHK.sortIndex) {
$(".sort-type").removeClass("active");
$(this).addClass("active");
}
});
}
// 共通初期処理
CHK.initCommon = function() {
//JSON初期化
......@@ -312,7 +427,20 @@ CHK.initCommon = function() {
CHK.isRFIDBarcodeScan = urlParam.isRFIDBarcodeScan && urlParam.isRFIDBarcodeScan == "1";
CHK.isOperationGroupMaster = urlParam.isOperationGroupMaster && urlParam.isOperationGroupMaster == "1";
if (typeof CHK.sortIndex == 'undefined') CHK.sortIndex = urlParam.sortIndex;
if (typeof CHK.sortIndex == 'undefined') {
CHK.sortIndex = CHK_CONSTANT.SORT_TYPE.START_DATE_DESC;
}
CHK.lang = urlParam.lang;
CHK.debug = urlParam.debug;
CHK.isMobile = urlParam.mobile_flg && urlParam.mobile_flg == "1";
CHK.isChat = urlParam.isChat && urlParam.isChat == "1";
CHK.loadInitSession();
if (typeof location.pathname === 'string' && location.pathname.includes('index.html') == true) {
//save url parameter of top page
CHK.saveInitSession();
}
CHK.loadDashboardSetting();
// ウェブの場合、作業一覧の表示広さを変更
if (CHK.isWeb) {
......@@ -331,8 +459,6 @@ CHK.initCommon = function() {
$("#operationGroupMasterButton").removeClass("d-none");
}
CHK.debug = urlParam.debug;
CHK.isMobile = urlParam.mobile_flg && urlParam.mobile_flg == "1";
if (CHK.isCms) {
CHK.setBeforeunload();
}
......@@ -349,6 +475,7 @@ CHK.initCommon = function() {
$("#checkList").css("min-width", "400px");
}
CHK.initActiveSortIndex(CHK.sortIndex);
}
/**
......@@ -358,7 +485,6 @@ CHK.initCommon = function() {
CHK.init = function() {
//共通処理
CHK.initCommon();
//VR設定
krpano.call("set(content[def].useVr, false);");
......@@ -460,10 +586,87 @@ CHK.initReportApp = function (callback) {
CHK.operationGroupMasterRelation = json;
});
// コミュニケーションデータJSONデータ
}
CHK.initPushMessageList = function() {
CHK.loadJson(CHK.jsonPath.pushMessageList, function (json) {
CHK.pushMessageList = json.pushMessageList;
if (typeof CHK_Dashboard !== 'undefined') {
//update batch message list at dashboard screen
CHK_Dashboard.updateDataCommunications();
CHK_Dashboard.initCommunications();
}
if (typeof CHK_MessageList !== 'undefined') {
CHK_MessageList.initPushMessageListCallback(CHK.pushMessageList);
}
});
}
CHK.isNewReport = function(operation) {
if(operation && operation.enableAddReport == 1 &&
(operation.newReportFlg == 1 || (operation.reportType != CHK.REPORT_TYPE.WORKFLOW && operation.reportType != CHK.REPORT_TYPE.WITHREPLY)))
return true;
return false;
}
CHK.loadDashboardBatch = function(operationList) {
if (!operationList) return;
CHK.dashboardBatch.newReport = 0;
CHK.dashboardBatch.continousWork = 0;
CHK.dashboardBatch.reportWarning = 0;
for (var i = 0; i < operationList.length; i++) {
let operation = operationList[i];
if(CHK.isNewReport(operation)) {
CHK.dashboardBatch.newReport += 1;
}
if (operation.reportType == 3) {
if (operation.processList && operation.processList.length > 0) {
for (var j = 0; j < operation.processList.length; j++) {
let process = operationList[i].processList[j];
if (process.phaseList && process.phaseList.length > 0) {
for (var k = 0; k < process.phaseList.length; k++) {
let phase = process.phaseList[k];
if (phase.phaseStatus != 999) {
CHK.dashboardBatch.continousWork += 1;
}
}
}
}
}
}
if (operation.warningReportList && operation.warningReportList.length > 0) {
CHK.dashboardBatch.reportWarning += operation.warningReportList.length;
}
}
if (typeof CHK_Dashboard !== 'undefined') {
//update batch pickup list at dashboard screen
CHK_Dashboard.updateDataPickups();
CHK_Dashboard.initPickups();
}
}
CHK.loadDashboardSetting = function(callback) {
CHK.loadJson(CHK.jsonPath.dashboardSetting, function(json) {
if (json) {
CHK.dashboardSetting = json;
}
if (callback) {
callback();
}
});
// ios clear localStorage when reopen index page
// var setting = localStorage.getItem('dashboardSetting');
// if (setting) {
// CHK.dashboardSetting = JSON.parse(setting);
// }
}
CHK.saveDashboardSetting = function(key, enabled) {
if (key) {
CHK.dashboardSetting[key] = enabled;
}
CHK.saveJson(CHK.jsonPath.dashboardSetting, CHK.dashboardSetting);
//localStorage.setItem('dashboardSetting' , JSON.stringify(CHK.dashboardSetting));
}
/**
......@@ -475,9 +678,17 @@ CHK.initOperationList = function() {
CHK.operation = json;
$('#operationTable').empty();
CHK.operation.searchOperationList = json.operationList;
CHK.loadDashboardBatch(CHK.operation.operationList);
//作業一覧描画
console.log("json.operationList",JSON.stringify( json.operationList) );
CHK.createOperationList(CHK.operation.operationList);
if (typeof CHK_pu !== 'undefined') {
CHK_pu.initOperationList(CHK.operation.operationList);
}
});
// コミュニケーションデータJSONデータ
CHK.initPushMessageList();
}
/**
......@@ -588,6 +799,9 @@ CHK.loadJson = function(fileName, callback) {
} else if (fileName == CHK.jsonPath.pushMessageList) {
json = CHK_iOS.getPushMessageListJson();
callback(json);
} else if (fileName == CHK.jsonPath.dashboardSetting) {
json = CHK_iOS.getDashboardSettingJson();
callback(json);
}
return;
}
......@@ -595,7 +809,7 @@ CHK.loadJson = function(fileName, callback) {
$.getJSON(fileName, function(json) {
console.log("load json file", fileName, json);
callback(json);
}).error(function(jqXHR, textStatus, errorThrown) {
}).fail(function(jqXHR, textStatus, errorThrown) {
console.log("エラー:" + textStatus);
console.log("テキスト:" + jqXHR.responseText);
});
......@@ -2016,7 +2230,7 @@ CHK.generateUuid = function() {
*
*/
CHK.getUrlParameter = function() {
var ret;
var ret = {};
if (location.search) {
var param = {};
location.search.substring(1).split('&').forEach(function(val) {
......@@ -2896,6 +3110,7 @@ CHK.changeSortType = function(sortType) {
$(".sort-type").removeClass("active");
$(sortType).addClass("active");
CHK.sortIndex = $(sortType).attr("data-sort");
sessionStorage.sortIndex = CHK.sortIndex;
CHK.createOperationList(CHK.operation.operationList, true);
}
......@@ -2903,6 +3118,7 @@ CHK.changeSortType = function(sortType) {
* 作業一覧描画
*/
CHK.createOperationList = function(operationList, isSearched = false) {
//alert("hongnt CHK.createOperationList ");
var searchKeyword = $("#searchTaskName").val();
var searchStartDate = $("#searchStartDate").val();
var searchEndDate = $("#searchEndDate").val();
......@@ -2914,20 +3130,20 @@ CHK.createOperationList = function(operationList, isSearched = false) {
operationList = operationList.filter(function(operation) {
var result = true;
if (searchKeyword.length) {
if (searchKeyword && searchKeyword.length) {
result = result * operation.operationName.includes(searchKeyword);
}
if (searchStartDate.length && !searchEndDate.length) {
if (searchStartDate && searchEndDate && searchStartDate.length && !searchEndDate.length) {
result = result * (operation.operationStartDate >= searchStartDate);
}
if (searchEndDate.length && !searchStartDate.length) {
if (searchStartDate && searchEndDate && searchEndDate.length && !searchStartDate.length) {
result = result * (operation.operationEndDate <= searchEndDate);
}
if (searchStartDate.length && searchEndDate.length) {
if (searchStartDate && searchEndDate && searchStartDate.length && searchEndDate.length) {
result = result * ((operation.operationStartDate <= searchEndDate) && (operation.operationEndDate >= searchStartDate));
}
if (operationGroupMasterId != 0) {
if (CHK.operationGroupMasterRelation && operationGroupMasterId != 0) {
var operationGroupMasterIdList = CHK.operationGroupMasterRelation.operationGroupMasterRelationList.filter(function(operationGroupMasterRelation) {
return operationGroupMasterRelation.operationId == operation.operationId;
})
......@@ -3024,8 +3240,7 @@ CHK.createOperationList = function(operationList, isSearched = false) {
} else {
operationNameTd = $("<td class='operationId_" + operationList[i].operationId
+ "'><a href=\"javascript:CHK_L.sendAppCommand('goOperation', '"
+ operationList[i].operationId + "', '" + operationList[i].contentId
+ "');\" class='d-block text-black text-decoration-none mb-1'>" + operationList[i].operationName
+ operationList[i].operationId + "', '" + operationList[i].contentId + " ', null ,'REPORT_LIST' ,'REPORT_LIST',null);\" class='d-block text-black text-decoration-none mb-1'>" + operationList[i].operationName
+ "</a><div class='fa-sm mobile_operation_date'><i class='far fa-clock fa-blue' style='color:blue;margin-right:10px'></i>"
+ setOperationDate(operationList[i].operationStartDate) + " ~ "
+ setOperationDate(operationList[i].operationEndDate) +"</div></td>");
......@@ -3200,7 +3415,7 @@ CHK.scanResult = function(scannedCode, scanType) {
return operation.permitCode == resultCode;
})[0];
if (scannedOperation != null) {
CHK.sendScanResult('goOperation', scannedOperation.operationId, scannedOperation.contentId, scanType);
CHK.sendScanResult('goOperation', scannedOperation.operationId, scannedOperation.contentId, scanType ,'REPORT_LIST' ,'REPORT_LIST',null);
} else {
CHK.displayAlert("notExistCode");
}
......@@ -3266,9 +3481,60 @@ CHK.openCategory = function() {
}
}
//save, load json
CHK.saveJson = function(jsonFileName, jsonData) {
var param = {};
param.cmd = CHK.getCommand("saveJson");
param.jsonName = jsonFileName;
param.jsonData = JSON.stringify(jsonData);
CHK.sendABookCheckApi(param);
}
CHK.sendAppCommand = function (command, param) {
var apiParam = Object.assign({}, param);
apiParam.cmd = CHK.getCommand(command);
CHK.sendABookCheckApi(apiParam);
}
CHK.getFormatDate = function(date) {
return date.getFullYear() + "-" + ("0" + (date.getMonth() + 1)).slice(-2) + "-" + ("0" + date.getDate()).slice(-2) + " "
+ ("0" + date.getHours()).slice(-2) + ":" + ("0" + date.getMinutes()).slice(-2);
}
CHK.initFooter = function() {
$("#footer").load("main-footer.html", function() {
let activeTab;
if (typeof sessionStorage != 'undefined' && typeof sessionStorage.activeTab != 'undefined') {
activeTab = sessionStorage.activeTab;
}
if (typeof activeTab != 'undefined') {
if (activeTab == 'dashboard') {
CHK_Footer.goDashboard();
} else {
CHK_Footer.goOperationList();
}
return;
}
CHK.loadDashboardSetting(function() {
if (CHK.dashboardSetting.dashboardHome) {
CHK_Footer.goDashboard();
} else {
CHK_Footer.goOperationList();
}
});
});
}
$(document).ready(function () {
var urlParam = CHK.getUrlParameter();
if (typeof urlParam !== 'undefined' && typeof urlParam.lang !== 'undefined') {
CHK.lang = urlParam.lang;
} else {
CHK.loadSessionKey('lang');
}
if (typeof CHK.lang === 'undefined') {
CHK.lang = 'ja';
}
console.log("CHK.lang:" + CHK.lang);
$(".multi-lang").each(function () {
......
......@@ -8,21 +8,35 @@
<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="abvw/common/css/header.css">
<link rel="stylesheet" type="text/css" href="abvw/common/css//footer.css">
<link rel="stylesheet" type="text/css" href="abvw/common/css/style.css">
<link rel="stylesheet" type="text/css" href="abvw/css/operationList/app.css">
<link rel="stylesheet" type="text/css" href="abvw/css/operationList/fontawesome_relative_path.css">
<script src="abvw/common/js/jquery-3.6.0.min.js?__UPDATEID__"></script>
<script src="abvw/js/operationList/constant.js?__UPDATEID__"></script>
<script src="abvw/js/operationList/operationList.js?__UPDATEID__"></script>
<script src="abvw/js/dashboard/check-dashboard-setting.js"></script>
<script src="abvw/js/dashboard/check-dashboard.js"></script>
<script src="abvw/common/js/check-footer.js"></script>
<script src="abvw/common/js/jquery-3.6.0.min.js?__UPDATEID__"></script>
<script src="abvw/common/js/i18n.js?__UPDATEID__"></script>
</head>
<!--init開発メモ コメントは消して良い-->
<body style="position: relative; margin-top: 53px;">
<section id="operationList" class="page-content" style="display: none;">
<header style="position: fixed; width: 100%; top: 0px; left: 0; z-index: 999;">
<nav class="navbar navbar-dark bg-primary">
<div>
<a class="navbar-brand category-btn lht-0 d-none" onclick="CHK.openCategory();" id="operationGroupMasterButton" href="javascript:CHK.setCategoryHeight();">
<i class="fa fa-folder fs-12 p-1" id="category-toggle-button"></i>
<span class="d-none d-md-inline fs-10 multi-lang" data-msg="buttonCategory" lang="openCategory"></span>
</a>
</div>
<h1 class="fs-10 font-weight-bold mb-0 text-white multi-lang alignCenter_header" data-msg="operationListHeaderTitle" lang="operationListPageTitle"></h1>
</nav>
</header>
......@@ -101,14 +115,13 @@
<a class="dropdown-item sort-type multi-lang" data-msg="labelSortOpen" data-sort="4" onclick="CHK.changeSortType(this);" lang="sortMostViewDateFirst"></a>
</div>
<a href="javascript:CHK.resetSearch();" class="text-decoration-none py-2 lht-0 d-inline-block ml-3">
<img class="icon" src="abvw/img/operationList/icon_clear.svg">
<img class="icon" src="img/icon_clear.svg">
<span class="d-none d-md-inline text-dark fs-10 align-middle multi-lang" data-msg="labelReset" lnag="inputClear"></span>
</a>
</div>
</div>
</nav>
<section>
<table class="table">
<thead>
......@@ -126,27 +139,45 @@
</main>
</section>
</section>
<footer class="fixed-bottom bg-light">
<nav class="d-flex justify-content-around">
<a class="d-block w-100 text-center py-2 text-decoration-none text-primary">
<i class="fas fa-home fs-14 p-1"></i>
<div class="fs-7 multi-lang" data-msg="buttonHome" lang="operationListScreenName"></div>
</a>
<a class="d-block w-100 text-center py-2 text-decoration-none text-secondary" href="javascript:CHK_L.sendAppCommand('goSetting');">
<i class="fas fa-cog fs-14 p-1"></i>
<div class="fs-7 multi-lang" data-msg="buttonSetting" lang="settingScreenName"></div>
</a>
<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/icon_dashboard_setting.svg" alt="設定">
<span class="d-none d-md-inline fs-10 align-middle multi-lang" data-msg="buttonDashboardSetting">
設定
</span>
</div>
</nav>
</header>
<!-- dashboard -->
<section class="container-fluid main-section">
<main>
<h2 id="pickupHeader" class="fs-8 font-weight-bold mt-4 pb-2 border-bottom text-dark multi-lang" data-msg="pickupHeaderTitle">ピックアップ</h2>
<div class="item-wrap" id="pickupItems">
</div>
<h2 class="fs-8 font-weight-bold mt-4 pb-2 border-bottom text-dark multi-lang" data-msg="communicationHeaderTitle">コミュニケーション</h2>
<div class="item-wrap" id="communicationItems">
</div>
</main>
</section>
</section>
<div id="footer"></div>
</footer>
<div class="alert-overlay d-none"></div>
<div class="alert-area d-none">
<i class="text-right fas fa-times fa-2x loading-close" onclick="CHK.alertClose();"></i>
<div class="fs-13 mt-4 text-left" style="padding: 15px;" id="alertMsg"></div>
</div>
<script type="text/javascript" src="abvw/js/operationList/app.js" defer></script>
<script type="text/javascript" src="js/app.js" defer></script>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment