502 lines
20 KiB
JavaScript
502 lines
20 KiB
JavaScript
/**
|
|
* 当日未施工
|
|
*/
|
|
function getTableClow(page, limit, type){
|
|
if(type!=9){
|
|
$("#risk_lev").css("display","none");
|
|
}else{
|
|
$("#risk_lev").css("display","");
|
|
}
|
|
console.log(type)
|
|
if(type==0){
|
|
//当日未施工
|
|
return todaynowork(page,limit);
|
|
}else if(type==1){
|
|
//新进班组
|
|
return newTeam(page,limit);
|
|
}else if(type==2){
|
|
//七日无施工
|
|
return sivennowork(page,limit);
|
|
}else if(type==3){
|
|
//人数变化大
|
|
return userChangeMax(page,limit);
|
|
}else if(type==4 ){
|
|
//工序变化
|
|
return gxChange(page,limit);
|
|
}else if(type==8){
|
|
//作业类型变化
|
|
return zylxChange(page,limit);
|
|
}else if(type==5){
|
|
//重点关注
|
|
return importTeam(page,limit);
|
|
}else if(type==6){
|
|
//球机异常
|
|
return ballErr(page,limit);
|
|
}else if(type==7){
|
|
//重点关注
|
|
return ballNoMesg(page,limit);
|
|
}else if(type==9){
|
|
//未执行日计划
|
|
return dayPlanNoWork(page,limit);
|
|
//return dayPlanInfo(page,limit);
|
|
}else if(type==10 ){
|
|
//未执行日计划
|
|
return startWork(page,limit);
|
|
}else if( type==11){
|
|
//未执行日计划
|
|
return startWork(page,limit);
|
|
}else if(type==12){
|
|
//未执行
|
|
return getBallTime(page,limit);
|
|
}
|
|
else{
|
|
return setTableCols(page, limit, type);
|
|
}
|
|
|
|
|
|
}
|
|
//日计划
|
|
function getBallTime(page, limit){
|
|
let tableCols = [
|
|
{ title: "序号", width: 100,unresize: true, align: "center", templet: function (d) {
|
|
return (page - 1) * limit + d.LAY_INDEX;}},
|
|
{field: "cityName", title: "建管单位",unresize: false, sort: true, width: 150, align: "center",},
|
|
{field: "proName", title: "工程名称", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: 'fzrName',title: "班组长",unresize: false,sort: true,width: 150,align: "center",templet: function (d) {
|
|
return "<span>" + transformNull(d.fzrName) + "</span><br/><span>" + transformNull(d.phone) + "</span>";
|
|
}
|
|
},
|
|
{field: 'content',title: "工作内容",unresize: false,sort: true,width: 380,align: "center",
|
|
templet: function (d) {
|
|
return setTitle(d.content);
|
|
}
|
|
},
|
|
{field: "ticketNo", title: "作业票编号", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: "teamName", title: "班组名称", unresize: false, sort: true, width: 300, align: "center",}
|
|
];
|
|
addCols(tableCols,1);
|
|
return tableCols;
|
|
}
|
|
|
|
//日计划
|
|
function startWork(page, limit){
|
|
let tableCols = [
|
|
{ title: "序号", width: 100,unresize: true, align: "center", templet: function (d) {
|
|
return (page - 1) * limit + d.LAY_INDEX;}},
|
|
{field: "cityName", title: "建管单位",unresize: false, sort: true, width: 150, align: "center",},
|
|
{field: "proName", title: "工程名称", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: 'fzrName',title: "班组长",unresize: false,sort: true,width: 150,align: "center",templet: function (d) {
|
|
return "<span>" + transformNull(d.fzrName) + "</span><br/><span>" + transformNull(d.phone) + "</span>";
|
|
}
|
|
},
|
|
{field: 'content',title: "工作内容",unresize: false,sort: true,width: 380,align: "center",
|
|
templet: function (d) {
|
|
return setTitle(d.content);
|
|
}
|
|
},
|
|
{field: "ticketNo", title: "作业票编号", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: "teamName", title: "班组名称", unresize: false, sort: true, width: 300, align: "center",}
|
|
];
|
|
addCols(tableCols,1);
|
|
return tableCols;
|
|
}
|
|
|
|
function dayPlanNoWork(page, limit){
|
|
let tableCols = [
|
|
{ title: "序号", width: 100,unresize: true, align: "center", templet: function (d) {
|
|
return (page - 1) * limit + d.LAY_INDEX;}},
|
|
{field: "cityName", title: "建管单位",unresize: false, sort: true, width: 150, align: "center",},
|
|
{field: "proName", title: "工程名称", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: 'fzrName',title: "班组长",unresize: false,sort: true,width: 150,align: "center",templet: function (d) {
|
|
return "<span>" + transformNull(d.fzrName) + "</span><br/><span>" + transformNull(d.phone) + "</span>";
|
|
}
|
|
},
|
|
// {field: 'ygx',title: " (未执行/已执行)工序",unresize: false,sort: true,width: 380,align: "center",
|
|
// templet: function (d) {
|
|
// return setTitle5(d.tgx,d.ygx);
|
|
// }
|
|
// },
|
|
{field: 'delGx',title: "未执行工作内容",unresize: false,sort: true,width: 380,align: "center",
|
|
templet: function (d) {
|
|
return setTitle3(d.addGx);
|
|
}
|
|
},
|
|
{field: 'delGx',title: "已执行工作内容",unresize: false,sort: true,width: 380,align: "center",
|
|
templet: function (d) {
|
|
return setTitle4(d.delGx);
|
|
}
|
|
},
|
|
// {field: 'tgx',title: "未执行工序",unresize: false,sort: true,width: 380,align: "center",
|
|
// templet: function (d) {
|
|
// return setTitle(d.tgx);
|
|
// }
|
|
// },
|
|
// {field: 'addGx',title: "未执行工作内容",unresize: false,sort: true,width: 380,align: "center",
|
|
// templet: function (d) {
|
|
// return setTitle(d.addGx);
|
|
// }
|
|
// },
|
|
|
|
// {field: 'tgx',title: "未执行工序",unresize: false,sort: true,width: 380,align: "center",
|
|
// templet: function (d) {
|
|
// return setTitle(d.tgx);
|
|
// }
|
|
// },
|
|
|
|
// {field: 'ygx',title: "已执行工作内容",unresize: false,sort: true,width: 380,align: "center",
|
|
// templet: function (d) {
|
|
// return setTitle(d.ygx);
|
|
// }
|
|
// },
|
|
// {field: 'delGx',title: "已执行工序",unresize: false,sort: true,width: 380,align: "center",
|
|
// templet: function (d) {
|
|
// return setTitle(d.delGx);
|
|
// }
|
|
// },
|
|
{field: "ticketNo", title: "作业票编号", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: "teamName", title: "班组名称", unresize: false, sort: true, width: 300, align: "center",}
|
|
];
|
|
addCols(tableCols,1);
|
|
return tableCols;
|
|
}
|
|
|
|
|
|
//日计划
|
|
function dayPlanInfo(page, limit){
|
|
let tableCols = [
|
|
{ title: "序号", width: 100,unresize: true, align: "center", templet: function (d) {
|
|
return (page - 1) * limit + d.LAY_INDEX;}},
|
|
{field: "cityName", title: "建管单位",unresize: false, sort: true, width: 150, align: "center",},
|
|
{field: "proName", title: "工程名称", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: 'fzrName',title: "班组长",unresize: false,sort: true,width: 150,align: "center",templet: function (d) {
|
|
return "<span>" + transformNull(d.fzrName) + "</span><br/><span>" + transformNull(d.phone) + "</span>";
|
|
}
|
|
},
|
|
{field: 'tgx',title: "工序",unresize: false,sort: true,width: 380,align: "center",
|
|
templet: function (d) {
|
|
return setTitle(d.tgx);
|
|
}
|
|
},
|
|
{field: 'ygx',title: "作业类型",unresize: false,sort: true,width: 380,align: "center",
|
|
templet: function (d) {
|
|
return setTitle(d.ygx);
|
|
}
|
|
},
|
|
{field: 'content',title: "工作内容",unresize: false,sort: true,width: 380,align: "center",
|
|
templet: function (d) {
|
|
return setTitle(d.content);
|
|
}
|
|
},
|
|
{field: "ticketNo", title: "作业票编号", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: "startTime", title: "计划开始时间", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: "ednTime", title: "计划结束时间", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: "teamName", title: "班组名称", unresize: false, sort: true, width: 300, align: "center",}
|
|
];
|
|
addCols(tableCols,1);
|
|
return tableCols;
|
|
}
|
|
|
|
//当日未施工
|
|
function todaynowork(page, limit){
|
|
let tableCols = [
|
|
{ title: "序号", width: 100,unresize: true, align: "center", templet: function (d) {
|
|
return (page - 1) * limit + d.LAY_INDEX;}},
|
|
{field: "cityName", title: "建管单位",unresize: false, sort: true, width: 150, align: "center",},
|
|
{field: "proName", title: "工程名称", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: 'fzrName',title: "班组长",unresize: false,sort: true,width: 150,align: "center",templet: function (d) {
|
|
return "<span>" + transformNull(d.fzrName) + "</span><br/><span>" + transformNull(d.phone) + "</span>";
|
|
}
|
|
},
|
|
{field: 'content',title: "工作内容",unresize: false,sort: true,width: 380,align: "center",
|
|
templet: function (d) {
|
|
return setTitle(d.content);
|
|
}
|
|
},
|
|
{field: "ticketNo", title: "作业票编号", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: "startTime", title: "计划开始时间", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: "ednTime", title: "计划结束时间", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: "teamName", title: "班组名称", unresize: false, sort: true, width: 300, align: "center",}
|
|
];
|
|
addCols(tableCols,1);
|
|
return tableCols;
|
|
}
|
|
|
|
//新进班组
|
|
function newTeam(page, limit){
|
|
let tableCols = [
|
|
{ title: "序号", width: 100,unresize: true, align: "center", templet: function (d) {
|
|
return (page - 1) * limit + d.LAY_INDEX;}},
|
|
{field: "cityName", title: "建管单位",unresize: false, sort: true, width: 150, align: "center",},
|
|
{field: "proName", title: "工程名称", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: 'fzrName',title: "班组长",unresize: false,sort: true,width: 150,align: "center",templet: function (d) {
|
|
return "<span>" + transformNull(d.fzrName) + "</span><br/><span>" + transformNull(d.phone) + "</span>";
|
|
}
|
|
},
|
|
{field: 'content',title: "工作内容",unresize: false,sort: true,width: 380,align: "center",
|
|
templet: function (d) {
|
|
return setTitle(d.content);
|
|
}
|
|
},
|
|
{field: "ticketNo", title: "作业票编号", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: "teamName", title: "班组名称", unresize: false, sort: true, width: 300, align: "center",}
|
|
];
|
|
addCols(tableCols,2);
|
|
return tableCols;
|
|
}
|
|
|
|
//七日无施工班组
|
|
function sivennowork(page, limit){
|
|
let tableCols = [
|
|
{ title: "序号", width: 100,unresize: true, align: "center", templet: function (d) {
|
|
return (page - 1) * limit + d.LAY_INDEX;}},
|
|
{field: "cityName", title: "建管单位",unresize: false, sort: true, width: 150, align: "center",},
|
|
{field: "proName", title: "工程名称", unresize: false, sort: true, width: 600, align: "center",},
|
|
//{field: "createDay", title: "最后施工时间", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: "teamName", title: "班组名称", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: 'fzrName',title: "班组长",unresize: false,sort: true,width: 150,align: "center",templet: function (d) {
|
|
return "<span>" + transformNull(d.fzrName) + "</span><br/><span>" + transformNull(d.phone) + "</span>";
|
|
}
|
|
}
|
|
];
|
|
addCols(tableCols,3);
|
|
return tableCols;
|
|
}
|
|
|
|
|
|
//人数变化大
|
|
function userChangeMax(page, limit){
|
|
let tableCols = [
|
|
{ title: "序号", width: 100,unresize: true, align: "center", templet: function (d) {
|
|
return (page - 1) * limit + d.LAY_INDEX;}},
|
|
{field: "cityName", title: "建管单位",unresize: false, sort: true, width: 150, align: "center",},
|
|
{field: "proName", title: "工程名称", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: "riskLevel", title: "风险等级", unresize: false, sort: true, width: 300, align: "center",templet: function (d) {
|
|
return setRiskLevelColor(d.riskLevel);
|
|
}},
|
|
{field: "teamName", title: "班组名称", unresize: false, sort: true, width: 300, align: "center",},
|
|
|
|
{field: "ynum", title: "昨日人数", unresize: false, sort: true, width: 300, align: "center",templet: function (d) {
|
|
return setTitle(d.ynum);
|
|
}},
|
|
{field: "dnum", title: "今日人数", unresize: false, sort: true, width: 300, align: "center",templet: function (d) {
|
|
return setTitle(d.dnum);
|
|
}},
|
|
{field: "content", title: "工作内容", unresize: false, sort: true, width: 380, align: "center",templet: function (d) {
|
|
return setTitle(d.content);
|
|
}},
|
|
{field: 'fzrName',title: "班组长",unresize: false,sort: true,width: 150,align: "center",templet: function (d) {
|
|
return "<span>" + transformNull(d.fzrName) + "</span><br/><span>" + transformNull(d.phone) + "</span>";
|
|
}}
|
|
];
|
|
addCols(tableCols,3);
|
|
return tableCols;
|
|
}
|
|
|
|
|
|
|
|
//工序变化
|
|
function gxChange(page, limit){
|
|
let tableCols = [
|
|
{ title: "序号", width: 100,unresize: true, align: "center", templet: function (d) {
|
|
return (page - 1) * limit + d.LAY_INDEX;}},
|
|
{field: "cityName", title: "建管单位",unresize: false, sort: true, width: 150, align: "center",},
|
|
{field: "proName", title: "工程名称", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: "riskLevel", title: "风险等级", unresize: false, sort: true, width: 300, align: "center",templet: function (d) {
|
|
return setRiskLevelColor(d.riskLevel);
|
|
}},
|
|
{field: "teamName", title: "班组名称", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: "tgx", title: "今日工序", unresize: false, sort: true, width: 300, align: "center",templet: function (d) {
|
|
return setTitle(d.tgx);
|
|
}},
|
|
{field: "ygx", title: "昨日工序", unresize: false, sort: true, width: 300, align: "center",templet: function (d) {
|
|
return setTitle(d.ygx);
|
|
}},
|
|
{field: "gx", title: "变化工序", unresize: false, sort: true, width: 300, align: "center",templet: function (d) {
|
|
return setTitle2(d.addGx,d.delGx);
|
|
}},
|
|
{field: "content", title: "工作内容", unresize: false, sort: true, width: 380, align: "center",templet: function (d) {
|
|
return setTitle(d.content);
|
|
}},
|
|
{field: 'fzrName',title: "班组长",unresize: false,sort: true,width: 150,align: "center",templet: function (d) {
|
|
return "<span>" + transformNull(d.fzrName) + "</span><br/><span>" + transformNull(d.phone) + "</span>";
|
|
}}
|
|
];
|
|
addCols(tableCols,4);
|
|
return tableCols;
|
|
}
|
|
|
|
//作业类型变化
|
|
function zylxChange(page, limit){
|
|
let tableCols = [
|
|
{ title: "序号", width: 100,unresize: true, align: "center", templet: function (d) {
|
|
return (page - 1) * limit + d.LAY_INDEX;}},
|
|
{field: "cityName", title: "建管单位",unresize: false, sort: true, width: 150, align: "center",},
|
|
{field: "proName", title: "工程名称", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: "riskLevel", title: "风险等级", unresize: false, sort: true, width: 300, align: "center",templet: function (d) {
|
|
return setRiskLevelColor(d.riskLevel);
|
|
}},
|
|
{field: "teamName", title: "班组名称", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: "tgx", title: "今日作业类型", unresize: false, sort: true, width: 300, align: "center",templet: function (d) {
|
|
return setTitle(d.tgx);
|
|
}},
|
|
{field: "ygx", title: "昨日作业类型", unresize: false, sort: true, width: 300, align: "center",templet: function (d) {
|
|
return setTitle(d.ygx);
|
|
}},
|
|
{field: "content", title: "工作内容", unresize: false, sort: true, width: 380, align: "center",templet: function (d) {
|
|
return setTitle(d.content);
|
|
}},
|
|
{field: 'fzrName',title: "班组长",unresize: false,sort: true,width: 150,align: "center",templet: function (d) {
|
|
return "<span>" + transformNull(d.fzrName) + "</span><br/><span>" + transformNull(d.phone) + "</span>";
|
|
}
|
|
}
|
|
];
|
|
addCols(tableCols,5);
|
|
return tableCols;
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
* 重点关注班组
|
|
*/
|
|
function importTeam(page, limit){
|
|
let tableCols = [
|
|
{ title: "序号", width: 100,unresize: true, align: "center", templet: function (d) {
|
|
return (page - 1) * limit + d.LAY_INDEX;}},
|
|
{field: "org", title: "建管单位",unresize: false, sort: true, width: 150, align: "center",},
|
|
{field: "proName", title: "工程名称", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: "riskLevel", title: "风险等级", unresize: false, sort: true, width: 300, align: "center",templet: function (d) {
|
|
return setRiskLevelColor(d.riskLevel);
|
|
}},
|
|
{field: "teamName", title: "班组名称", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: "state", title: "施工状态", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: "startTime", title: "施工开始时间", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: "userNum", title: "施工人数", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: "content", title: "工作内容", unresize: false, sort: true, width: 380, align: "center",templet: function (d) {
|
|
return setTitle(d.content);
|
|
}},
|
|
{field: 'fzrName',title: "班组长",unresize: false,sort: true,width: 150,align: "center",templet: function (d) {
|
|
return "<span>" + transformNull(d.fzrName) + "</span><br/><span>" + transformNull(d.phone) + "</span>";
|
|
}
|
|
}
|
|
];
|
|
return tableCols;
|
|
}
|
|
|
|
/**
|
|
* 球机异常
|
|
*/
|
|
function ballErr(page, limit){
|
|
let tableCols = [
|
|
{ title: "序号", width: 100,unresize: true, align: "center", templet: function (d) {
|
|
return (page - 1) * limit + d.LAY_INDEX;}},
|
|
{field: "org", title: "建管单位",unresize: false, sort: true, width: 150, align: "center",},
|
|
{field: "proName", title: "工程名称", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: "teamName", title: "班组名称", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: "isOnline", title: "球机状态", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: "riskLevel", title: "风险等级", unresize: false, sort: true, width: 300, align: "center",templet: function (d) {
|
|
return setRiskLevelColor(d.riskLevel);
|
|
}},
|
|
{field: "startTime", title: "施工开始时间", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: "userNum", title: "施工人数", unresize: false, sort: true, width: 300, align: "center",},
|
|
{field: "content", title: "工作内容", unresize: false, sort: true, width: 300, align: "center",templet: function (d) {
|
|
return setTitle(d.content);
|
|
}},
|
|
{field: 'fzrName',title: "班组长",unresize: false,sort: true,width: 150,align: "center",templet: function (d) {
|
|
return "<span>" + transformNull(d.fzrName) + "</span><br/><span>" + transformNull(d.phone) + "</span>";
|
|
}
|
|
}
|
|
];
|
|
return tableCols;
|
|
}
|
|
|
|
/**
|
|
* 球机信号差
|
|
*/
|
|
function ballNoMesg(page, limit){
|
|
let tableCols = [
|
|
{ title: "序号",width: 80,unresize: true, align: "center", templet: function (d) {
|
|
return (page - 1) * limit + d.LAY_INDEX;
|
|
}},
|
|
{ field: "org", title: "建管单位", unresize: false, sort: true, width: 180, align: "center",},
|
|
{field: "proName",title: "工程名称", unresize: false, sort: true,width: 300, align: "center", },
|
|
{field: 'fzrName',title: "班组长",unresize: false, sort: true, width: 150,align: "center", templet: function (d) {
|
|
return "<span>" + transformNull(d.fzrName) + "</span><br/><span>" + transformNull(d.phone )+ "</span>";
|
|
}},
|
|
{ field: "macId", title: "设备编码", unresize: false, sort: true,width: 215, align: "center", },
|
|
{ field: "puid", title: "球机PUID", unresize: false, sort: true, width: 215,align: "center",},
|
|
{ field: "qjXh", title: "球机信号值", unresize: false, sort: true, width: 200, align: "center", }
|
|
];
|
|
addCols(tableCols,8);
|
|
return tableCols;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function setTitle(data){
|
|
if (data) {
|
|
if (data.length > 60) {
|
|
return '<span title="' + data + '">' + data.substring(0, 60) + '...</span>'
|
|
} else {
|
|
return '<span title="' +data+ '">' + data + '</span>'
|
|
}
|
|
} else {
|
|
return '';
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function setTitle2(addGx,delGx){
|
|
let html='';
|
|
if(addGx){
|
|
html='<span title="' + addGx + '" style="color:red;">' + addGx + '</span>'+"</br>";
|
|
}
|
|
|
|
if(delGx){
|
|
html+='<span title="' + delGx + '" style="color:blue;">' + delGx + '</span>'+"</br>"
|
|
}
|
|
return html;
|
|
|
|
}
|
|
|
|
function setTitle3(data){
|
|
if (data) {
|
|
if (data.length > 60) {
|
|
return '<span title="' + data + '" style="color:red;">' + data.substring(0, 60) + '...</span>'
|
|
} else {
|
|
return '<span title="' +data+ '" style="color:red;">' + data + '</span>'
|
|
}
|
|
} else {
|
|
return '';
|
|
}
|
|
}
|
|
|
|
function setTitle4(data){
|
|
if (data) {
|
|
if (data.length > 60) {
|
|
return '<span title="' + data + '" style="color:blue;">' + data.substring(0, 60) + '...</span>'
|
|
} else {
|
|
return '<span title="' +data+ '" style="color:blue;">' + data + '</span>'
|
|
}
|
|
} else {
|
|
return '';
|
|
}
|
|
}
|
|
|
|
function setTitle5(addGx,delGx){
|
|
let html='';
|
|
if(addGx){
|
|
html='<span title="' + addGx + '" style="color:red;">' + addGx + '</span>'+"</br>";
|
|
}
|
|
|
|
if(delGx){
|
|
html+='<span title="' + delGx + '" style="color:blue;">' + delGx + '</span>'+"</br>"
|
|
}
|
|
return html;
|
|
|
|
} |