Commit 17d151f1 by Kang Donghun

Merge branch 'feature/1.0_check_web_dev' into feature/1.0_check_web_dev_kangdh

# Conflicts:
#	abvw/common/js/constant.js
parents 3279537d 24ef7ad7
......@@ -58,7 +58,8 @@ CONSTANT.URL = {
},
},
WEB: {
BASE: 'abvw/html/',
BASE: 'http://127.0.0.1:5500/abvw/html/',
OPERATION_LIST: 'index',
},
};
......
......@@ -10,7 +10,6 @@ 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.operationSearchCriteria;
OL.sortIndex;
OL.operationGroupMasterId;
......@@ -25,7 +24,7 @@ OL.init = function () {
console.log('OperationList start');
//get all data of operation list scene
OL.getAllDataWeb();
OL.getAllDataWeb(sessionStorage.OL_searchKeyWord, sessionStorage.OL_sortIndex, sessionStorage.OL_searchStartDate, sessionStorage.OL_searchEndDate, sessionStorage.OL_operationGroupMasterId);
//show operation list
OL.createOperationList(OL.operationList);
......@@ -45,34 +44,83 @@ OL.init = function () {
* @param {String} searchEndDate
* @param {Number} operationGroupMasterId
*/
OL.getAllDataWeb = function (searchKeyword, sortIndex, searchStartDate, searchEndDate, operationGroupMasterId) {
OL.getAllDataWeb = function (searchKeyWord, sortIndex, searchStartDate, searchEndDate, operationGroupMasterId) {
let param = {};
param.sid = COMMON.getSid();
param.operationName = searchKeyword;
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;
OL.operationSearchCriteria = json.operationSearchCriteria;
OL.setSearchInfoWeb();
});
};
/**
* 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 () {
OL.sortIndex = OL.operationSearchCriteria.sort;
$('#searchTaskName').val(OL.operationSearchCriteria.operationName);
$('#searchStartDate').val(OL.operationSearchCriteria.startDate);
$('#searchEndDate').val(OL.operationSearchCriteria.endDate);
OL.operationGroupMasterId = OL.operationSearchCriteria.operationGroupMasterId;
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;
}
};
/**
......@@ -199,7 +247,7 @@ OL.createBreadcrumbList = function () {
}
$('#groupMasterPath').empty();
if (typeof OL.operationGroupMasterId == 'undefined' || OL.operationGroupMasterId == 0) {
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 = [];
......@@ -462,6 +510,7 @@ OL.sendOperation = function (operationId, operationType, reportType, enableAddRe
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);
};
......
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