Commit ac252bae by NGO THI HONG

#49125 update sample operationList

parent e3bf392f
{
"httpStatus": 200,
"presentTime": "2022-08-22 19:53:21",
"presentTimeUTC": "2022-08-22T10:53:21Z",
"presentTime": "2022-08-24 11:39:23",
"presentTimeUTC": "2022-08-24T02:39:23Z",
"operationList": [
{
"operationId": 5492,
......@@ -20,23 +20,23 @@
"permitCodeRequiredFlg": 0,
"displayPermissionFlg": 0,
"enableReportEdit": 1,
"process_list": [],
"processList": [],
"warningReportList": [
{
"task_name": "??0002",
"task_code": "0002",
"task_id": 7079,
"task_key": "ef5ea05d-73ed-4d6c-a789-c2e980e8585e",
"task_report_id": 7155,
"task_report_info_id": 7032
"taskName": "??0002",
"taskCode": "0002",
"taskId": 7079,
"taskKey": "ef5ea05d-73ed-4d6c-a789-c2e980e8585e",
"taskReportId": 7155,
"taskReportInfoId": 7032
},
{
"task_name": "??0001",
"task_code": "0001",
"task_id": 7078,
"task_key": "981c17eb-f166-4c3d-b998-c93809bf7d52",
"task_report_id": 7154,
"task_report_info_id": 7031
"taskName": "??0001",
"taskCode": "0001",
"taskId": 7078,
"taskKey": "981c17eb-f166-4c3d-b998-c93809bf7d52",
"taskReportId": 7154,
"taskReportInfoId": 7031
}
],
"contentId": 6343,
......@@ -53,7 +53,7 @@
"operationStartDate": "2022-08-22",
"operationEndDate": "2022-08-22",
"operationStatus": 1,
"operationLastEditDate": "2022-08-23 16:43:40",
"operationLastEditDate": "2022-08-22 16:43:40",
"enableReportHistory": 0,
"enableAddReport": 1,
"quickReport": 0,
......@@ -61,7 +61,7 @@
"permitCodeRequiredFlg": 0,
"displayPermissionFlg": 0,
"enableReportEdit": 1,
"process_list": [],
"processList": [],
"warningReportList": [],
"contentId": 6344,
"relatedContentList": [],
......@@ -69,32 +69,6 @@
"operationGroupMasterIdList": []
},
{
"operationId": 5494,
"operationType": 0,
"reportType": 1,
"operationName": "Hong3",
"operationDescriptions": "",
"operationStartDate": "2022-08-22",
"operationEndDate": "2022-08-22",
"operationStatus": 1,
"operationLastEditDate": "2022-08-24 16:44:20",
"reportCycle": 0,
"enableReportUpdate": 1,
"enableReportHistory": 0,
"enableAddReport": 0,
"quickReport": 0,
"permitCode": "",
"permitCodeRequiredFlg": 0,
"displayPermissionFlg": 0,
"enableReportEdit": 1,
"process_list": [],
"warningReportList": [],
"contentId": 6345,
"relatedContentList": [],
"pushMessageList": [],
"operationGroupMasterIdList": []
},
{
"operationId": 5495,
"operationType": 0,
"reportType": 2,
......@@ -103,7 +77,7 @@
"operationStartDate": "2022-08-22",
"operationEndDate": "2022-08-22",
"operationStatus": 1,
"operationLastEditDate": "2022-08-25 16:46:13",
"operationLastEditDate": "2022-08-22 16:46:13",
"enableReportHistory": 0,
"enableAddReport": 1,
"quickReport": 0,
......@@ -136,7 +110,7 @@
"operationStartDate": "2022-08-22",
"operationEndDate": "2022-08-22",
"operationStatus": 1,
"operationLastEditDate": "2022-08-26 16:46:26",
"operationLastEditDate": "2022-08-24 03:12:46",
"enableReportHistory": 0,
"enableAddReport": 1,
"quickReport": 0,
......@@ -169,7 +143,7 @@
"operationStartDate": "2022-08-22",
"operationEndDate": "2022-08-22",
"operationStatus": 1,
"operationLastEditDate": "2022-08-27 19:05:48",
"operationLastEditDate": "2022-08-23 01:07:51",
"enableReportHistory": 0,
"enableAddReport": 1,
"quickReport": 0,
......@@ -177,36 +151,44 @@
"permitCodeRequiredFlg": 0,
"displayPermissionFlg": 0,
"enableReportEdit": 1,
"process_list": [
"processList": [
{
"code": "9999",
"report_name": "9999",
"process_name": "process1",
"process_id": 1
"reportName": "9999",
"processName": "process1",
"processId": 1
},
{
"code": "9999",
"report_name": "9999",
"process_name": "process2",
"process_id": 2
"reportName": "9999",
"processName": "process2",
"processId": 2
}
],
"warningReportList": [
{
"task_name": "??0002",
"task_code": "0002",
"task_id": 7084,
"task_key": "fa71aa6d-f8da-497f-ae56-62722202cf68",
"task_report_id": 7160,
"task_report_info_id": 7036
"taskName": "??0010",
"taskCode": "0010",
"taskId": 7085,
"taskKey": "cf9c3410-73ff-4b52-a3d5-e2f198f11e8e",
"taskReportId": 7161,
"taskReportInfoId": 7037
},
{
"task_name": "??0001",
"task_code": "0001",
"task_id": 7082,
"task_key": "76037491-c397-41f2-8e7a-15b63bd8968d",
"task_report_id": 7158,
"task_report_info_id": 7034
"taskName": "??0002",
"taskCode": "0002",
"taskId": 7084,
"taskKey": "fa71aa6d-f8da-497f-ae56-62722202cf68",
"taskReportId": 7160,
"taskReportInfoId": 7036
},
{
"taskName": "??0001",
"taskCode": "0001",
"taskId": 7082,
"taskKey": "76037491-c397-41f2-8e7a-15b63bd8968d",
"taskReportId": 7158,
"taskReportInfoId": 7034
}
],
"contentId": 6348,
......@@ -223,7 +205,7 @@
"operationStartDate": "2022-08-22",
"operationEndDate": "2022-08-22",
"operationStatus": 1,
"operationLastEditDate": "2022-08-28 16:52:15",
"operationLastEditDate": "2022-08-22 16:52:15",
"enableReportHistory": 0,
"enableAddReport": 1,
"quickReport": 0,
......@@ -231,18 +213,18 @@
"permitCodeRequiredFlg": 0,
"displayPermissionFlg": 0,
"enableReportEdit": 1,
"process_list": [
"processList": [
{
"code": "9999",
"report_name": "9999",
"process_name": "process3",
"process_id": 1
"reportName": "9999",
"processName": "process3",
"processId": 1
},
{
"code": "9999",
"report_name": "9999",
"process_name": "process4",
"process_id": 2
"reportName": "9999",
"processName": "process4",
"processId": 2
}
],
"warningReportList": [],
......@@ -250,6 +232,43 @@
"relatedContentList": [],
"pushMessageList": [],
"operationGroupMasterIdList": []
},
{
"operationId": 5499,
"operationType": 0,
"reportType": 3,
"operationName": "Hong8",
"operationDescriptions": "",
"operationStartDate": "2022-08-23",
"operationEndDate": "2022-08-23",
"operationStatus": 1,
"operationLastEditDate": "2022-08-23 21:49:48",
"enableReportHistory": 0,
"enableAddReport": 1,
"quickReport": 0,
"permitCode": "",
"permitCodeRequiredFlg": 0,
"displayPermissionFlg": 0,
"enableReportEdit": 1,
"processList": [
{
"code": "9999",
"reportName": "9999",
"processName": "process3",
"processId": 1
},
{
"code": "9999",
"reportName": "9999",
"processName": "process4",
"processId": 2
}
],
"warningReportList": [],
"contentId": 6350,
"relatedContentList": [],
"pushMessageList": [],
"operationGroupMasterIdList": []
}
]
}
\ No newline at end of file
}
\ No newline at end of file
......@@ -18,7 +18,7 @@
<script src="script/check-list.js?__UPDATEID__"></script>
<script src="script/check-foriOS.js"></script>
<script src="script/constant.js?__UPDATEID__"></script>
<script src="script/check_PU.js?__UPDATEID__"></script>
<script src="script/check_pu.js?__UPDATEID__"></script>
</head>
<body onload="CHK_pu.init();">
......
......@@ -6,6 +6,7 @@ var CHK_L = {};
*
*/
CHK_L.init = function() {
console.log("CHK_L.init design");
CHK.useKrpano = false;
CHK.operationType = CHK.OPERATION_TYPE.LIST;
......
......@@ -550,9 +550,9 @@ CHK.initOperationList = function() {
$('#operationTable').empty();
CHK.operation.searchOperationList = json.operationList;
//作業一覧描画
console.log("json.operationList",JSON.stringify( json.operationList) )
CHK.createOperationList(CHK.operation.operationList);
CHK_pu.createNewReportList(CHK.operation.operationList);
CHK_pu.createContinueWorkList(CHK.operation.operationList);
});
}
......
......@@ -20,10 +20,11 @@ CHK_pu.initCommon = function() {
}
CHK_pu.init = function() {
CHK.initCommon();
// 作業一覧JSONデータ
CHK.loadJson(CHK.jsonPath.operationList, function (json) {
CHK.operation = json;
CHK.operation.operationList = CHK.operation.operationList.sort(function(a,b) {
CHK_pu.operation = json;
CHK_pu.operation.operationList = CHK_pu.operation.operationList.sort(function(a,b) {
if (!a.operationLastEditDate) {
a.operationLastEditDate = "1900-01-01 09:00:00";
}
......@@ -34,9 +35,9 @@ CHK_pu.init = function() {
if (a.operationLastEditDate > b.operationLastEditDate) return -1;
return 0;
});
CHK_pu.createNewReportList(CHK.operation.operationList);
CHK_pu.createContinueWorkList(CHK.operation.operationList);
CHK_pu.createReportWithWarning(CHK.operation.operationList);
CHK_pu.createNewReportList(CHK_pu.operation.operationList);
CHK_pu.createContinueWorkList(CHK_pu.operation.operationList);
CHK_pu.createReportWithWarning(CHK_pu.operation.operationList);
CHK_pu.setCountElementInPickup();
});
}
......@@ -54,20 +55,25 @@ CHK_pu.createNewReportList = function(operationList, isSearched = false) {
for (var i = 0; i < operationList.length; i++) {
//TODO aタグlist.html 転移処理
var operationNameLi;
if (operationList[i].permitCodeRequiredFlg == 1) {
operationNameLi = $("<li class='item list-unstyled rounded border mb-2' name = 'operationId_" + operationList[i].operationId
+ "'><a href=\"javascript:CHK.displayAlert('onlyRfid');\" class='d-block px-3 py-3 text-decoration-none text-dark'><div class='title'>" + operationList[i].operationName
+ "</div> <i class='fas fa-chevron-right fs-12'></i></a></li>");
} else {
operationNameLi = $("<li class='item list-unstyled rounded border mb-2' name = 'operationId_" + operationList[i].operationId
+ "'><a href=\"javascript:CHK_L.sendAppCommand('goOperation', '"
+ operationList[i].operationId + "', '" + operationList[i].contentId
+ "');\" class='d-block px-3 py-3 text-decoration-none text-dark'>" + operationList[i].operationName
+ "</div> <i class='fas fa-chevron-right fs-12'></i></a></li>");
var messageli = $("<li class='item list-unstyled rounded border mb-2'name = 'operationId_" + operationList[i].operationId + "' ></li>");
var ahrefRequiredFlg ;
if (operationList[i].permitCodeRequiredFlg == 1)
{
ahrefRequiredFlg = $("<a href=\"javascript:CHK.displayAlert('onlyRfid');\" class='d-block px-3 py-3 text-decoration-none text-dark'></a>");
}
else
{
ahrefRequiredFlg = $("<a href=\"javascript:CHK_L.sendAppCommand('goOperation', '" + operationList[i].operationId + "', '" + operationList[i].contentId + "');\" class='d-block px-3 py-3 text-decoration-none text-dark'></a>");
}
var divTitle = $("<div class='title'>" + operationList[i].operationName + "</div>");
var iIcon = $("<i class='fas fa-chevron-right fs-12'></i>");
$("#newReport-list").append(operationNameLi);
ahrefRequiredFlg.append(divTitle);
ahrefRequiredFlg.append(iIcon);
messageli.append(ahrefRequiredFlg);
//console.log(li );
$("#newReport-list").append(messageli);
CHK_pu.countNewReportList = CHK_pu.countNewReportList + 1;
}
......@@ -85,28 +91,35 @@ CHK_pu.createContinueWorkList = function(operationList, isSearched = false) {
for (var i = 0; i < operationList.length; i++) {
if (operationList[i].reportType === 3)
{
console.log("operationList[i].operationName", operationList[i].operationName );
console.log("operationList[i].process_list", operationList[i].processList[0] );
//TODO aタグlist.html 転移処理
var operationNameLi;
if (operationList[i].permitCodeRequiredFlg == 1) {
operationNameLi = $("<li class='item list-unstyled rounded border mb-2' name = 'operationId_" + operationList[i].operationId
+ "'><a href=\"javascript:CHK.displayAlert('onlyRfid');\" class='d-block px-3 py-2 text-decoration-none text-dark'>"
+"<div class='tag fs-8 text-secondary px-2 py-1 mr-2 rounded border mb-1'>" + operationList[i].process_list[0].process_name
+ "</div> <div class='title'>" + operationList[i].operationName
+ "</div> <div class='sub-title-wrap'> <div class='fs-8 text-secondary mr-2'><div class='data'>" + "code-0001"
+ "</div></div> <div class='sub-title'>" + operationList[i].operationName
+ "</div></div> <i class='fas fa-chevron-right fs-12''></i> </a></li>");
} else {
operationNameLi = $("<li class='item list-unstyled rounded border mb-2' name = 'operationId_" + operationList[i].operationId
+ "'><a href=\"javascript:CHK_L.sendAppCommand('goOperation', '" + operationList[i].operationId + "', '" + operationList[i].contentId
+ "');\" class='d-block px-3 py-2 text-decoration-none text-dark'>"
+"<div class='tag fs-8 text-secondary px-2 py-1 mr-2 rounded border mb-1'>" + operationList[i].process_list[0].process_name
+ "</div> <div class='title'>" + operationList[i].operationName
+ "</div> <div class='sub-title-wrap'> <div class='fs-8 text-secondary mr-2'><div class='data'>" + "code-0001"
+ "</div></div> <div class='sub-title'>" + operationList[i].operationName
+ "</div></div> <i class='fas fa-chevron-right fs-12''></i> </a></li>");
var messageli = $("<li class='item list-unstyled rounded border mb-2' name = 'operationId_" + operationList[i].operationId + "'></li>") ;
var ahrefRequiredFlg ;
if (operationList[i].permitCodeRequiredFlg == 1)
{
ahrefRequiredFlg = $("<a href=\"javascript:CHK.displayAlert('onlyRfid');\" class='d-block px-3 py-3 text-decoration-none text-dark'></a>");
}
$("#continueWork-list").append(operationNameLi);
else
{
ahrefRequiredFlg = $("<a href=\"javascript:CHK_L.sendAppCommand('goOperation', '" + operationList[i].operationId + "', '" + operationList[i].contentId
+ "');\" class='d-block px-3 py-2 text-decoration-none text-dark'></a>");
}
var divProccess = $("<div class='tag fs-8 text-secondary px-2 py-1 mr-2 rounded border mb-1'>" + operationList[i].processList[0].processName + "</div>");
var divTitle = $("<div class='title'>" + operationList[i].operationName + "</div>");
var divSubTitleWrap = $("<div class='sub-title-wrap'> </div>");
var divCode = $(" <div class='fs-8 text-secondary mr-2'><div class='data'>" + "code-0001" + "</div></div>");
var divSubTitle = $("<div class='sub-title'>" + operationList[i].operationName + "</div>");
var iIcon = $("<i class='fas fa-chevron-right fs-12''></i>");
divSubTitleWrap.append(divCode);
ahrefRequiredFlg.append(divProccess);
ahrefRequiredFlg.append(divTitle);
ahrefRequiredFlg.append(divSubTitleWrap);
ahrefRequiredFlg.append(divSubTitle);
ahrefRequiredFlg.append(iIcon);
messageli.append(ahrefRequiredFlg);
$("#continueWork-list").append(messageli);
CHK_pu.countContinueWorkReport = CHK_pu.countContinueWorkReport + 1;
}
......@@ -131,28 +144,28 @@ CHK_pu.createReportWithWarning = function(operationList, isSearched = false) {
switch (operationList[i].reportType)
{
case 0:
operationNameLi = $("<li class='item list-unstyled rounded border mb-2' name = 'taskkey_" + operationList[i].warningReportList[j].task_key
+ "'><a href=\"javascript:CHK_L.sendAppCommand('goOperation', '" + operationList[i].warningReportList[j].task_key
operationNameLi = $("<li class='item list-unstyled rounded border mb-2' name = 'taskkey_" + operationList[i].warningReportList[j].taskKey
+ "'><a href=\"javascript:CHK_L.sendAppCommand('goOperation', '" + operationList[i].warningReportList[j].taskKey
+ "');\" class='d-block px-3 py-2 text-decoration-none text-dark'>"
+"<div class='tag fs-8 text-secondary px-2 py-1 mr-2 rounded border mb-1'>" + operationList[i].operationName
+ "</div> <div class='sub-title-wrap'> <div class='fs-8 text-secondary mr-2'><div class='data'>" + operationList[i].warningReportList[j].task_code
+ "</div> <div class='sub-title-wrap'> <div class='fs-8 text-secondary mr-2'><div class='data'>" + operationList[i].warningReportList[j].taskCode
+ "</div></div> <div class='sub-title'>" + operationList[i].warningReportList[j].task_name
+ "</div></div> <i class='fas fa-chevron-right fs-12''></i> </a></li>");
break;
case 1:
operationNameLi = $("<li class='item list-unstyled rounded border mb-2' name = 'taskkey_" + operationList[i].warningReportList[j].task_key
+ "'><a href=\"javascript:CHK_L.sendAppCommand('goOperation', '" + operationList[i].warningReportList[j].task_key
operationNameLi = $("<li class='item list-unstyled rounded border mb-2' name = 'taskkey_" + operationList[i].warningReportList[j].taskKey
+ "'><a href=\"javascript:CHK_L.sendAppCommand('goOperation', '" + operationList[i].warningReportList[j].taskKey
+ "');\" class='d-block px-3 py-2 text-decoration-none text-dark'>"
+"<div class='tag fs-8 text-secondary px-2 py-1 mr-2 rounded border mb-1'>" + operationList[i].operationName
+ "</div> <div class='sub-title-wrap'> <div class='fs-8 text-secondary mr-2'><div class='data'>" + operationList[i].operationStartDate + " / " + operationList[i].operationEndDate
+ "</div></div> </div> <i class='fas fa-chevron-right fs-12''></i> </a></li>");
break;
case 2:
operationNameLi = $("<li class='item list-unstyled rounded border mb-2' name = 'taskkey_" + operationList[i].warningReportList[j].task_key
+ "'><a href=\"javascript:CHK_L.sendAppCommand('goOperation', '" + operationList[i].warningReportList[j].task_key
operationNameLi = $("<li class='item list-unstyled rounded border mb-2' name = 'taskkey_" + operationList[i].warningReportList[j].taskKey
+ "'><a href=\"javascript:CHK_L.sendAppCommand('goOperation', '" + operationList[i].warningReportList[j].taskKey
+ "');\" class='d-block px-3 py-2 text-decoration-none text-dark'>"
+"<div class='tag fs-8 text-secondary px-2 py-1 mr-2 rounded border mb-1'>" + operationList[i].operationName
+ "</div> <div class='sub-title-wrap'> <div class='fs-8 text-secondary mr-2'><div class='data'>" + operationList[i].warningReportList[j].task_code
+ "</div> <div class='sub-title-wrap'> <div class='fs-8 text-secondary mr-2'><div class='data'>" + operationList[i].warningReportList[j].taskCode
+ "</div></div> <div class='sub-title'>" + operationList[i].warningReportList[j].task_name
+ "</div></div> <i class='fas fa-chevron-right fs-12''></i> </a></li>");
break;
......@@ -160,9 +173,9 @@ CHK_pu.createReportWithWarning = function(operationList, isSearched = false) {
operationNameLi = $("<li class='item list-unstyled rounded border mb-2' name = 'operationId_" + operationList[i].operationId
+ "'><a href=\"javascript:CHK_L.sendAppCommand('goOperation', '" + operationList[i].operationId + "', '" + operationList[i].contentId
+ "');\" class='d-block px-3 py-2 text-decoration-none text-dark'>"
+"<div class='tag fs-8 text-secondary px-2 py-1 mr-2 rounded border mb-1'>" + operationList[i].process_list[0].process_name
+"<div class='tag fs-8 text-secondary px-2 py-1 mr-2 rounded border mb-1'>" + operationList[i].processList[0].processName
+ "</div> <div class='title'>" + operationList[i].operationName
+ "</div> <div class='sub-title-wrap'> <div class='fs-8 text-secondary mr-2'><div class='data'>" + operationList[i].warningReportList[j].task_code
+ "</div> <div class='sub-title-wrap'> <div class='fs-8 text-secondary mr-2'><div class='data'>" + operationList[i].warningReportList[j].taskCode
+ "</div></div> <div class='sub-title'>" + operationList[i].operationName
+ "</div></div> <i class='fas fa-chevron-right fs-12''></i> </a></li>");
break;
......
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