Commit 12db7dfa by NGUYEN HOANG SON

#49152 implement pickup batch

parent f6bd51d6
...@@ -66,6 +66,9 @@ CHK_Dashboard.updateDataPickups = function() { ...@@ -66,6 +66,9 @@ CHK_Dashboard.updateDataPickups = function() {
item.enabled = enabled; item.enabled = enabled;
} }
item.count = 0; item.count = 0;
if (CHK.dashboardBatch[item.id]) {
item.count = CHK.dashboardBatch[item.id];
}
}); });
} }
......
...@@ -53,6 +53,12 @@ CHK.dashboardSetting = { ...@@ -53,6 +53,12 @@ CHK.dashboardSetting = {
dashboardHome: false, dashboardHome: false,
}; };
CHK.dashboardBatch = {
newReport: 0,
continousWork: 0,
reportWarning: 0,
};
var pageLang; // ページ設定言語 var pageLang; // ページ設定言語
var CATEGORY_HEIGHT; //カテゴリー描画用固定値(高さ) var CATEGORY_HEIGHT; //カテゴリー描画用固定値(高さ)
var msgMap = { // velocity? var msgMap = { // velocity?
...@@ -548,8 +554,6 @@ CHK.initReportApp = function (callback) { ...@@ -548,8 +554,6 @@ CHK.initReportApp = function (callback) {
CHK.operationGroupMasterRelation = json; CHK.operationGroupMasterRelation = json;
}); });
// コミュニケーションデータJSONデータ
CHK.initPushMessageList();
} }
CHK.initPushMessageList = function() { CHK.initPushMessageList = function() {
...@@ -563,6 +567,28 @@ CHK.initPushMessageList = function() { ...@@ -563,6 +567,28 @@ CHK.initPushMessageList = function() {
}); });
} }
CHK.loadDashboardBatch = function(operationList) {
if (!operationList) return;
CHK.dashboardBatch.newReport = operationList.length;
CHK.dashboardBatch.continousWork = 0;
CHK.dashboardBatch.reportWarning = 0;
for (var i = 0; i < operationList.length; i++) {
if (operationList[i].reportType == 3) {
if (operationList[i].processList && operationList[i].processList.length > 0) {
CHK.dashboardBatch.continousWork += 1;
}
}
if (operationList[i].warningReportList && operationList[i].warningReportList.length > 0) {
CHK.dashboardBatch.reportWarning += operationList[i].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.loadDashboardSetting = function(callback) {
CHK.loadJson(CHK.jsonPath.dashboardSetting, function(json) { CHK.loadJson(CHK.jsonPath.dashboardSetting, function(json) {
if (json) { if (json) {
...@@ -596,11 +622,14 @@ CHK.initOperationList = function() { ...@@ -596,11 +622,14 @@ CHK.initOperationList = function() {
CHK.operation = json; CHK.operation = json;
$('#operationTable').empty(); $('#operationTable').empty();
CHK.operation.searchOperationList = json.operationList; CHK.operation.searchOperationList = json.operationList;
CHK.loadDashboardBatch(CHK.operation.operationList);
//作業一覧描画 //作業一覧描画
console.log("json.operationList",JSON.stringify( json.operationList) ) console.log("json.operationList",JSON.stringify( json.operationList) );
CHK.createOperationList(CHK.operation.operationList); CHK.createOperationList(CHK.operation.operationList);
}); });
// コミュニケーションデータJSONデータ
CHK.initPushMessageList();
} }
/** /**
......
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