Commit 1584ba6b by Lee JaeWon

#43131 作業一覧画面JSON対応 (jsonから工程一覧作成)

parent 1dc23e27
......@@ -1251,14 +1251,14 @@ CHK.cancelTask = function(taskKey) {
apiParam.cmd = CHK.getCommand("cancelReport");
apiParam.taskKey = taskKey;
apiParam.taskReportLevel = CHK.taskReplyNo;
//連続作業の場合追加無しでも工程一覧に戻したい
if (window.parent.CHK.reportType == window.parent.CHK.REPORT_TYPE.WORKFLOW) {
apiParam.addReport = CHK.ADD_REPORT_FLG.ABLE;
} else {
apiParam.addReport = addReportFlg;
}
CHK.sendABookCheckApi(apiParam);
if (CHK.debug == "1" || CHK.isWeb) {
CHK.afterCancelTask();
......@@ -2596,4 +2596,50 @@ CHK.showWhiteFrame = function() {
}
$("#whiteFrame").show();
}
\ No newline at end of file
}
function createCategory(){
//category test
var categoryJson ={"operationGroupMasterList":[{"operationGroupMasterId":763,"operationGroupMasterName":"#40942 test","operationGroupMasterLevel":1,"parentOperationGroupMasterId":90,"treePath":"90/763","countOperation":1},{"operationGroupMasterId":795,"operationGroupMasterName":"test-repeat-row","operationGroupMasterLevel":1,"parentOperationGroupMasterId":90,"treePath":"90/795","countOperation":3},{"operationGroupMasterId":796,"operationGroupMasterName":"test-repeat-row-page1","operationGroupMasterLevel":1,"parentOperationGroupMasterId":90,"treePath":"90/796","countOperation":1},{"operationGroupMasterId":797,"operationGroupMasterName":"test-repeat-row-page1-book","operationGroupMasterLevel":1,"parentOperationGroupMasterId":90,"treePath":"90/797","countOperation":1},{"operationGroupMasterId":90,"operationGroupMasterName":"全体","operationGroupMasterLevel":0,"parentOperationGroupMasterId":0,"treePath":"90","countOperation":1},{"operationGroupMasterId":781,"operationGroupMasterName":"本日のテスト20200225","operationGroupMasterLevel":1,"parentOperationGroupMasterId":90,"treePath":"90/781","countOperation":3},{"operationGroupMasterId":551,"operationGroupMasterName":"計算確認 Book","operationGroupMasterLevel":1,"parentOperationGroupMasterId":90,"treePath":"90/551","countOperation":2}]}
//todo1 作業・カテゴリー関係に合わせて画面表示
//todo2 カテゴリー整列(parentOperationGroupMasterId or operationGroupMasterLevel)sort(function)
//operationGroupMasterLevel 0 全体
//operationGroupMasterLevel 1 カテゴリー, サブカテゴリー?
for (var i = 0; i < categoryJson.operationGroupMasterList.length; i++) {
var categoryDt = $(".menu-ttl");
//categoryDt.text(setOperationDate(categoryJson.operationGroupMasterList[i].operationGroupMasterName));
}
};
/**
* 作業一覧描画
*/
function createOperationList(){
//sampleTest
var json = {"operationList":[{"operationId":1077,"operationName":"1月作業、会議室リニューアル","operationDescriptions":"","operationType":2,"operationStartDate":"2020-01-21T00:00:00","operationEndDate":"2020-01-31T00:00:00","lastEditDate":"2020-06-23T10:03:42","needSyncFlg":true,"reportType":0,"reportCycle":0,"enableReportUpdate":0,"enableReportHistory":0,"enableAddReport":1,"quickReport":false,"contentId":1171},{"":1125,"operationName":"360 setting","operationDescriptions":"","operationType":2,"operationStartDate":"2020-01-22T00:00:00","operationEndDate":"2020-05-30T00:00:00","lastEditDate":"2020-05-26T11:14:27","needSyncFlg":true,"reportType":0,"reportCycle":0,"enableReportUpdate":0,"enableReportHistory":0,"enableAddReport":1,"quickReport":false,"contentId":1223},{"operationId":2431,"operationName":"uwp_sample","operationDescriptions":"","operationType":0,"operationStartDate":"2020-07-07T00:00:00","operationEndDate":"2020-07-31T00:00:00","lastEditDate":"2020-07-07T12:17:19","needSyncFlg":true,"reportType":0,"reportCycle":0,"enableReportUpdate":0,"enableReportHistory":0,"enableAddReport":1,"quickReport":false,"contentId":2647},{"operationId":2432,"operationName":"計算テスト Base","operationDescriptions":"","operationType":0,"operationStartDate":"2020-07-07T00:00:00","operationEndDate":"2020-07-31T00:00:00","lastEditDate":"2020-07-07T12:44:16","needSyncFlg":true,"reportType":0,"reportCycle":0,"enableReportUpdate":0,"enableReportHistory":0,"enableAddReport":1,"quickReport":true,"contentId":2653},{"operationId":2433,"operationName":"計算領域","operationDescriptions":"","operationType":0,"operationStartDate":"2020-07-07T00:00:00","operationEndDate":"2020-07-31T00:00:00","lastEditDate":"2020-07-07T12:44:15","needSyncFlg":true,"reportType":0,"reportCycle":0,"enableReportUpdate":0,"enableReportHistory":0,"enableAddReport":1,"quickReport":true,"contentId":2652}]};
for (var i = 0; i < json.operationList.length; i++) {
var operationTR = $("<tr/>");
//TODO aタグlist.html 転移処理
var operationNameTd = $("<td class='operationId_"+ json.operationList[i].operationId +"'><a href='list.html' class='d-block text-black text-decoration-none mb-1'>"+ json.operationList[i].operationName +"</a></td>");
var operationStartDateTd = $("<td/>", {class: "operationStartDate"}).text(setOperationDate(json.operationList[i].operationStartDate));
var operationEndDateTd = $("<td/>", {class: "operationEndDate"}).text(setOperationDate(json.operationList[i].operationEndDate));
var iconTd = json.operationList[i].operationType == CHK.OPERATION_TYPE.VTOUR ? $("<td class='p-2'> <button class='btn btn-outline-primary fs-8 py-2'>VR</button> </td>") : "";
operationTR.append(operationNameTd);
operationTR.append(operationStartDateTd);
operationTR.append(operationEndDateTd);
operationTR.append(iconTd);
$(".table tbody").append(operationTR);
}
};
/**
* Date表示(yyyy/MM/dd)hh以下省略
*/
function setOperationDate(date){
var operationDate = date.replace(/-/g, "/").substring(0,10);
return operationDate;
};
\ No newline at end of file
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