Commit 7321568f by Takatoshi Miura

Merge branch 'feature/1.4.0_miura' into 'feature/1.4.0'

#44124 カテゴリーが小さく表示されるバグを修正&RFID修正

See merge request !5
parents a48ab012 47a688d6
...@@ -20191,7 +20191,7 @@ button { ...@@ -20191,7 +20191,7 @@ button {
text-align: -webkit-center; text-align: -webkit-center;
border-radius: 15px; border-radius: 15px;
z-index: 1032; z-index: 1032;
height: calc(50vh); height: auto;
width: 60%; width: 60%;
position: absolute; position: absolute;
top: calc(5vh); top: calc(5vh);
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<body onload="CHK_L.init();" style="position: relative; margin-top: 53px;"> <body onload="CHK_L.init();" style="position: relative; margin-top: 53px;">
<header style="position: fixed; width: 100%; top: 0px; left: 0; z-index: 999;"> <header style="position: fixed; width: 100%; top: 0px; left: 0; z-index: 999;">
<nav class="navbar navbar-dark bg-primary"> <nav class="navbar navbar-dark bg-primary">
<a class="navbar-brand category-btn lht-0" href="#" > <a class="navbar-brand category-btn lht-0" href="javascript:CHK.setCategoryHeight();">
<i class="fa fa-folder fs-12 p-1" id="category-toggle-button"></i> <i class="fa fa-folder fs-12 p-1" id="category-toggle-button"></i>
<span class="d-none d-md-inline fs-10">カテゴリー</span> <span class="d-none d-md-inline fs-10">カテゴリー</span>
</a> </a>
......
...@@ -42,6 +42,8 @@ CHK.operationGroupMaster; //カテゴリーデータ ...@@ -42,6 +42,8 @@ CHK.operationGroupMaster; //カテゴリーデータ
CHK.operationGroupMasterRelation; //作業・カテゴリー関係データ CHK.operationGroupMasterRelation; //作業・カテゴリー関係データ
CHK.pushMessage; //コミュニケーションデータ CHK.pushMessage; //コミュニケーションデータ
var scanResultCode; //スキャンしたRFID,バーコード
var pageLang; // ページ設定言語 var pageLang; // ページ設定言語
var isSetCategory = true var isSetCategory = true
var CATEGORY_HEIGHT; //カテゴリー描画用固定値(高さ) var CATEGORY_HEIGHT; //カテゴリー描画用固定値(高さ)
...@@ -60,8 +62,7 @@ var msgMap = { // velocity? ...@@ -60,8 +62,7 @@ var msgMap = { // velocity?
completeUpload: {ja:"登録が完了しました。<br/>右上の閉じるボタンをクリックし、画面を閉じてください。", ko:"등록했습니다. <br/>오른쪽 위의 닫기버튼을 클릭해, 화면을 닫아주세요.", en:"Registered. <br/>Please click the close button in the upper right and close the screen."}, completeUpload: {ja:"登録が完了しました。<br/>右上の閉じるボタンをクリックし、画面を閉じてください。", ko:"등록했습니다. <br/>오른쪽 위의 닫기버튼을 클릭해, 화면을 닫아주세요.", en:"Registered. <br/>Please click the close button in the upper right and close the screen."},
Yes: {ja:"はい", ko:"Yes", en:"Yes"}, Yes: {ja:"はい", ko:"Yes", en:"Yes"},
No: {ja:"いいえ", ko:"No", en:"No"}, No: {ja:"いいえ", ko:"No", en:"No"},
onlyRfid:{ja:"RFID又はバーコードが設定されています。<br/>該当コードを読み込んでください。", ko:"RFID또는 바코드가 설정되어있습니다. <br/>해당코드를 스캔해주십시오.", en:"RFID or barcode is set. <br/>Please scan the code."}, onlyRfid:{ja:"RFID又はバーコードが設定されています。\n該当コードを読み込んでください。", ko:"RFID또는 바코드가 설정되어있습니다.\n해당코드를 스캔해주십시오.", en:"RFID or barcode is set.\nPlease scan the code."},
notExistCode:{ja:"読み込んだコードと一致しません。<br/>コードを確認してもう一度お願いします。<br/>", ko:"스캔된코드와 일치하는 작업이 존재하지않습니다. <br/>코드를 확인하고 한번도 시도해주세요. <br/>", en:"No action exists that matches the scanned code. <br/>Please check the code and try it once. <br/>"},
overwriteCheck: {ja:"未公開のバージョンの簡易帳票が存在します。<br/>上書きしますか?", ko:"미공개 버전의 간이 서류가 존재합니다. <br/>덮어 쓰시겠습니까?", en:"There is an unpublished version of the quick report. <br/>Do you want to overwrite?"}, overwriteCheck: {ja:"未公開のバージョンの簡易帳票が存在します。<br/>上書きしますか?", ko:"미공개 버전의 간이 서류가 존재합니다. <br/>덮어 쓰시겠습니까?", en:"There is an unpublished version of the quick report. <br/>Do you want to overwrite?"},
dateError: {ja:"検索日が不正です。", ko:"잘못된 검색일입니다.", en:"Please enter correct search date."}, dateError: {ja:"検索日が不正です。", ko:"잘못된 검색일입니다.", en:"Please enter correct search date."},
}; };
...@@ -84,9 +85,9 @@ function getLang() { ...@@ -84,9 +85,9 @@ function getLang() {
return pageLang; return pageLang;
} }
// メッセージを取得 // 言語コードをセット
function getMsg(key) { function setLangCode() {
lang = getLang(); lang = getLang();
if (lang.split("-")[0] == "ja") { if (lang.split("-")[0] == "ja") {
lang = "ja"; lang = "ja";
} else if (lang.split("-")[0] == "ko") { } else if (lang.split("-")[0] == "ko") {
...@@ -94,6 +95,12 @@ function getMsg(key) { ...@@ -94,6 +95,12 @@ function getMsg(key) {
} else { } else {
lang = "en"; lang = "en";
} }
}
// メッセージを取得
function getMsg(key) {
setLangCode();
var msg = msgMap[key]; var msg = msgMap[key];
if (!msg) { if (!msg) {
return ""; return "";
...@@ -413,14 +420,6 @@ CHK.initReportApp = function (callback) { ...@@ -413,14 +420,6 @@ CHK.initReportApp = function (callback) {
CHK.operation.searchOperationList = json.operationList; CHK.operation.searchOperationList = json.operationList;
//作業一覧描画 //作業一覧描画
CHK.createOperationList(CHK.operation.operationList); CHK.createOperationList(CHK.operation.operationList);
//カテゴリー高さ固定
if(isSetCategory){
CATEGORY_HEIGHT = $('main').height();
console.log(CATEGORY_HEIGHT);
isSetCategory = false
}
$('#category-menu').height(CATEGORY_HEIGHT);
$('#overlayDiv').height(CATEGORY_HEIGHT);
}); });
// カテゴリーJSONデータ // カテゴリーJSONデータ
...@@ -442,6 +441,20 @@ CHK.initReportApp = function (callback) { ...@@ -442,6 +441,20 @@ CHK.initReportApp = function (callback) {
} }
/** /**
* カテゴリー表示領域の高さ調整
*/
CHK.setCategoryHeight = function() {
//カテゴリー高さ固定
if(isSetCategory){
CATEGORY_HEIGHT = $('main').height();
console.log(CATEGORY_HEIGHT);
isSetCategory = false
}
$('#category-menu').height(CATEGORY_HEIGHT);
$('#overlayDiv').height(CATEGORY_HEIGHT);
}
/**
* 作業報告初期処理、Web * 作業報告初期処理、Web
* *
* @param callback コールバック * @param callback コールバック
...@@ -3045,6 +3058,12 @@ CHK.startScan = function() { ...@@ -3045,6 +3058,12 @@ CHK.startScan = function() {
} }
$(".scan-overlay").removeClass("d-none"); $(".scan-overlay").removeClass("d-none");
$(".scan-area").removeClass("d-none"); $(".scan-area").removeClass("d-none");
var positionY = $(document).scrollTop() + screen.height/8;
var height = screen.height/4;
$(".scan-area").css("top", positionY);
$(".scan-area").css("min-height", height);
$("body").css("overflow", "hidden");
} }
CHK.scanClose = function() { CHK.scanClose = function() {
...@@ -3059,9 +3078,18 @@ CHK.scanClose = function() { ...@@ -3059,9 +3078,18 @@ CHK.scanClose = function() {
} }
$(".scan-overlay").addClass("d-none"); $(".scan-overlay").addClass("d-none");
$(".scan-area").addClass("d-none"); $(".scan-area").addClass("d-none");
$("body").css("overflow", "visible");
} }
document.addEventListener('visibilitychange', () => {
// バックグラウンド遷移時
if (document.visibilityState === 'hidden') {
CHK.scanClose();
}
});
CHK.scanResult = function(scannedCode, scanType) { CHK.scanResult = function(scannedCode, scanType) {
scanResultCode = scannedCode;
if (scannedCode == null || !(scannedCode.length)) { if (scannedCode == null || !(scannedCode.length)) {
return; return;
} }
...@@ -3098,15 +3126,26 @@ CHK.alertClose = function() { ...@@ -3098,15 +3126,26 @@ CHK.alertClose = function() {
} }
CHK.displayAlert = function(msgCode) { CHK.displayAlert = function(msgCode) {
$("#alertMsg").html(getMsg(msgCode)); // RFID(バーコード)関連は通常のアラート表示
$(".alert-overlay").removeClass("d-none"); if (msgCode == "notExistCode") {
$(".alert-area").removeClass("d-none"); // scanResultCodeを代入するため別で処理
var positionY = $(document).scrollTop() + screen.height/8; setLangCode();
var height = screen.height/4; var notExistCodeMessage = {ja:"読み込んだコードと一致しません。\n\n読み込んだコード:" + scanResultCode + "\n\nコードを確認してもう一度お願いします。", ko:"스캔된코드와 일치하는 작업이 존재하지않습니다.\n\n스캔 한 코드: " + scanResultCode + "\n\n코드를 확인하고 한번도 시도해주세요.", en:"No action exists that matches the scanned code.\n\nScanned code: " + scanResultCode + "\n\nPlease check the code and try it once."};
var msg = notExistCodeMessage[lang];
alert(msg);
} else if (msgCode == "onlyRfid") {
alert(getMsg(msgCode));
} else {
$("#alertMsg").html(getMsg(msgCode));
$(".alert-overlay").removeClass("d-none");
$(".alert-area").removeClass("d-none");
var positionY = $(document).scrollTop() + screen.height/8;
var height = screen.height/4;
$(".alert-area").css("top", positionY); $(".alert-area").css("top", positionY);
$(".alert-area").css("min-height", height); $(".alert-area").css("min-height", height);
$("body").css("overflow", "hidden"); $("body").css("overflow", "hidden");
}
} }
CHK.resetSearch = function() { CHK.resetSearch = function() {
......
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