Commit 74629130 by Takumi Imai

#50225 作業一覧への遷移

parent af007d1b
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"name": "ABookCheck WEB", "name": "ABookCheck WEB",
"type": "chrome", "type": "chrome",
"request": "launch", "request": "launch",
"url":"http://127.0.0.1:5500/abvw/html/index.html", "url":"http://127.0.0.1:5500/abvw/html/login.html",
"webRoot": "${workspaceFolder}" "webRoot": "${workspaceFolder}"
} }
] ]
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
*/ */
const CONSTANT = {}; const CONSTANT = {};
CONSTANT.DEVICE_TYPE = {
WEB: 4,
};
CONSTANT.SORT_TYPE = { CONSTANT.SORT_TYPE = {
NAME: 0, NAME: 0,
START_DATE_DESC: 1, START_DATE_DESC: 1,
...@@ -26,17 +29,10 @@ CONSTANT.PAGE_TAB = { ...@@ -26,17 +29,10 @@ CONSTANT.PAGE_TAB = {
OPERATION_LIST: 'operationList', OPERATION_LIST: 'operationList',
}; };
CONSTANT.OPERATION_TYPE = {
LIST: '0',
DRAWING: '1',
VTOUR: '2',
PDF: '3',
};
CONSTANT.REPORT_TYPE = { CONSTANT.REPORT_TYPE = {
REPORTONLY: '0', REPORT: '0',
INSPECT: '1', ROUTINE: '1',
WITHREPLY: '2', ANSWER: '2',
WORKFLOW: '3', WORKFLOW: '3',
}; };
...@@ -49,9 +45,13 @@ CONSTANT.URL = { ...@@ -49,9 +45,13 @@ CONSTANT.URL = {
// BASE_CMS: 'https://' + location.host + '/checkapi/web/', // BASE_CMS: 'https://' + location.host + '/checkapi/web/',
BASE_CMS: 'http://localhost:8080/acms/', BASE_CMS: 'http://localhost:8080/acms/',
BASE_CHECKAPI: '/checkapi/web/', BASE_CHECKAPI: '/checkapi/web/',
BASE_HTML: '/checkapi/web/html/',
BASE_WEB: 'abvw/html/', BASE_WEB: 'abvw/html/',
ALL_OPERATION_LIST: 'operationListWeb/getOperationList', ALL_OPERATION_LIST: 'operationListWeb/getOperationList',
AUTH_SESSION: 'getSession/checkAuthUser', AUTH_SESSION: 'getSession/checkAuthUser',
TASK_REPORT_LIST: 'getTaskReport/index',
ENTRY_REPORT: 'getReport???', //未定
OPERATION_VIEW_LOG: 'operationViewLog/savelog',
}; };
CONSTANT.LANG = { CONSTANT.LANG = {
......
...@@ -94,12 +94,14 @@ OL.createOperationList = function (operationList) { ...@@ -94,12 +94,14 @@ OL.createOperationList = function (operationList) {
const operationNameTd = $( const operationNameTd = $(
"<td class='operationId_" + "<td class='operationId_" +
operationList[i].operationId + operationList[i].operationId +
"'><a href=\"javascript:OL.sendOperation('goOperation', '" + "'><a href=\"javascript:OL.sendOperation('" +
operationList[i].operationId + operationList[i].operationId +
"', '" + "', '" +
operationList[i].operationType + operationList[i].operationType +
"', '" + "', '" +
operationList[i].reportType + operationList[i].reportType +
"', '" +
operationList[i].enableAddReport +
"');\" class='d-block text-black text-decoration-none mb-1'>" + "');\" class='d-block text-black text-decoration-none mb-1'>" +
operationList[i].operationName + 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>" + "</a><div class='fa-sm mobile_operation_date'><i class='far fa-clock fa-blue' style='color:blue;margin-right:10px'></i>" +
...@@ -452,24 +454,50 @@ OL.resetSearch = function () { ...@@ -452,24 +454,50 @@ OL.resetSearch = function () {
* *
* @param {String} operationId * @param {String} operationId
*/ */
OL.sendOperation = function (operationId, operationType, reportType) { OL.sendOperation = function (operationId, operationType, reportType, enableAddReport) {
//save operation logs. needed for sorting //save operation logs. needed for sorting
let saveParams = {}; OL.saveOperationReadingLog(operationId, operationType, reportType);
saveParams.sid = COMMON.getSid();
saveParams.cmd = CONSTANT.ACT_CMD.saveOperationLog;
saveParams.deviceType = 4;
saveParams.operationType = operationType;
saveParams.reportType = reportType;
const date = new Date();
saveParams.viewingStartDate = date.toLocaleString();
COMMON.sendABookCheckApi(saveParam, false);
//Transition to the report form or operation list screen //Transition to the report form or operation list screen
let postParams = {}; let params = {};
postParams.sid = COMMON.getSid(); params.sid = COMMON.getSid();
postParams.cmd = CONSTANT.ACT_CMD.goOperation; params.operationId = operationId;
postParams.operationId = operationId; const url = OL.createUrlOfOperation(enableAddReport, reportType);
const url = COMMON.getUrlWeb(postParams.cmd); COMMON.postCommunication(url, params);
postCommunication(url, postParams); };
/**
* save operation logs. needed for sorting
*
* @param {String} operationId
* @param {String} operationType
* @param {String} reportType
*/
OL.saveOperationReadingLog = function (operationId, operationType, reportType) {
let params = {};
params.sid = COMMON.getSid();
params.operationId = operationId;
params.deviceType = CONSTANT.DEVICE_TYPE.WEB;
params.operationType = operationType;
params.reportType = reportType;
const date = new Date();
params.viewingStartDate = date.toLocaleString();
const url = CONSTANT.URL.BASE_CMS + ClientData.userInfo_accountPath() + CONSTANT.URL.BASE_HTML + CONSTANT.URL.OPERATION_VIEW_LOG;
COMMON.cmsAjax(url, params, false);
};
/**
* return url of cms Operation Scene
*
* @param {boolean} enableAddReport
* @param {Number} reportType
* @returns url
*/
OL.createUrlOfOperation = function (enableAddReport, reportType) {
let baseUrl = CONSTANT.URL.BASE_CMS + ClientData.userInfo_accountPath() + CONSTANT.URL.BASE_HTML;
if (reportType == CONSTANT.REPORT_TYPE.ROUTINE || enableAddReport == '1') {
return baseUrl + CONSTANT.URL.TASK_REPORT_LIST;
} else {
return baseUrl + CONSTANT.URL.ENTRY_REPORT;
}
}; };
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