[後端] 修改router method
[前端] 修改運維前端程序
This commit is contained in:
parent
120642b5c7
commit
5e0c46d027
@ -861,7 +861,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
opeRecTable = new YourTeam.JqDataTables.getTableByAjax(ajaxObj, tag, null, columns, column_defs);
|
opeRecTable = new YourTeam.JqDataTables.getTableByAjax(ajaxObj, tag, null, columns, column_defs);
|
||||||
$(tag).DataTable().order([10, 'desc']);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setType(wt) {
|
function setType(wt) {
|
||||||
@ -894,23 +893,23 @@
|
|||||||
let ytd = displayDate(new Date(new Date().setDate(new Date().getDate() - 1)), 'date').replaceAll('/', '-')
|
let ytd = displayDate(new Date(new Date().setDate(new Date().getDate() - 1)), 'date').replaceAll('/', '-')
|
||||||
|
|
||||||
if (dateType == 'tdy') {
|
if (dateType == 'tdy') {
|
||||||
pageAct.startdate = displayDate(new Date(new Date().setDate(new Date().getDate() + 1)), 'datetime');
|
pageAct.startdate = displayDate(new Date(new Date().setDate(new Date().getDate())), 'datetime').toString().replaceAll("/", "-").split(" ")[0] + "T00:00:00";
|
||||||
pageAct.enddate = new Date(displayDate(new Date(new Date().setDate(new Date().getDate() + 2)), 'date'));
|
pageAct.enddate = displayDate(new Date(new Date().setDate(new Date().getDate())), 'datetime').toString().replaceAll("/", "-").split(" ")[0] + "T23:59:59";
|
||||||
$('#startdate').val(today);
|
$('#startdate').val(today);
|
||||||
$('#startdate').data('val', today);
|
$('#startdate').data('val', today);
|
||||||
$('#enddate').val(today);
|
$('#enddate').val(today);
|
||||||
$('#enddate').data('val', today);
|
$('#enddate').data('val', today);
|
||||||
}
|
}
|
||||||
else if (dateType == 'ytd') {
|
else if (dateType == 'ytd') {
|
||||||
pageAct.startdate = new Date(displayDate(new Date(new Date().setDate(new Date().getDate())), 'date'));
|
pageAct.startdate = displayDate(new Date(new Date().setDate(new Date().getDate() - 1)), 'datetime').toString().replaceAll("/", "-").split(" ")[0] + "T00:00:00";
|
||||||
pageAct.enddate = new Date(displayDate(new Date(new Date().setDate(new Date().getDate() + 1)), 'date'));
|
pageAct.enddate = displayDate(new Date(new Date().setDate(new Date().getDate() - 1)), 'datetime').toString().replaceAll("/", "-").split(" ")[0] + "T23:59:59";
|
||||||
$('#startdate').val(ytd);
|
$('#startdate').val(ytd);
|
||||||
$('#startdate').data('val', ytd);
|
$('#startdate').data('val', ytd);
|
||||||
$('#enddate').val(ytd);
|
$('#enddate').val(ytd);
|
||||||
$('#enddate').data('val', ytd);
|
$('#enddate').data('val', ytd);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
pageAct.enddate = new Date(displayDate(new Date(pageAct.enddate.valueOf()).setDate(pageAct.enddate.getDate() + 2), 'date'));
|
pageAct.enddate = displayDate(new Date(pageAct.enddate.valueOf()).setDate(pageAct.enddate.getDate()), 'date').toString().replaceAll("/", "-") + "T23:59:59";
|
||||||
$(`[onclick^=setDate]`).removeClass('btn-info');
|
$(`[onclick^=setDate]`).removeClass('btn-info');
|
||||||
$(`[onclick^=setDate]`).addClass('btn-secondary');
|
$(`[onclick^=setDate]`).addClass('btn-secondary');
|
||||||
if ($('#startdate').val() == $('#enddate').val()) {
|
if ($('#startdate').val() == $('#enddate').val()) {
|
||||||
@ -1005,14 +1004,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function exportExcel(e) {
|
function exportExcel(e) {
|
||||||
|
console.log("export", e)
|
||||||
let url = baseApiUrl + "/operation/OpeExportExcel";
|
let url = baseApiUrl + "/operation/OpeExportExcel";
|
||||||
|
|
||||||
objSendData.Data = {
|
objSendData.Data = {
|
||||||
work_type: pageAct.work_type,
|
work_type: pageAct.work_type,
|
||||||
startdate: pageAct.startdate == undefined ? null : pageAct.startdate,
|
startdate: pageAct.startdate == undefined ? null : pageAct.startdate,
|
||||||
enddate: pageAct.enddate == undefined ? null : pageAct.enddate,
|
enddate: pageAct.enddate == undefined ? null : pageAct.enddate,
|
||||||
};
|
};
|
||||||
|
console.log("data", objSendData.Data)
|
||||||
ytAjax = new YourTeam.Ajax(url, objSendData, function (rel) {
|
ytAjax = new YourTeam.Ajax(url, objSendData, function (rel) {
|
||||||
if (rel.code == "0000")
|
if (rel.code == "0000")
|
||||||
location.href = baseApiUrl + "/api/df?path=" + rel.data.split('/')[0] + "&fileName=" + rel.data.split('/')[1] + "&token=" + cookies.get("JWT-Authorization");
|
location.href = baseApiUrl + "/api/df?path=" + rel.data.split('/')[0] + "&fileName=" + rel.data.split('/')[1] + "&token=" + cookies.get("JWT-Authorization");
|
||||||
|
@ -156,6 +156,7 @@ namespace FrontendWebApi.ApiControllers
|
|||||||
return apiResult;
|
return apiResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
public async Task<ActionResult<ApiResult<bool>>> isShowBuilding()
|
public async Task<ActionResult<ApiResult<bool>>> isShowBuilding()
|
||||||
{
|
{
|
||||||
ApiResult<bool> apiResult = new ApiResult<bool>(jwt_str);
|
ApiResult<bool> apiResult = new ApiResult<bool>(jwt_str);
|
||||||
|
Loading…
Reference in New Issue
Block a user