违章统计

This commit is contained in:
cwchen 2024-12-09 16:24:34 +08:00
parent 67df441427
commit a62228bb64
1 changed files with 30 additions and 16 deletions

View File

@ -14,7 +14,7 @@ function pages(pageNum, pageSize, typeNum) {
headers: { headers: {
"encrypt": sm3(JSON.stringify(params)) "encrypt": sm3(JSON.stringify(params))
}, },
url: dataUrl + "proteam/pot/superStatistics/getProVoiRecordList?token=" + token, url: dataUrl + "proteam/pot/proVio/getDutyPersonList?token=" + token,
data: params, data: params,
type: 'POST', type: 'POST',
async: false, async: false,
@ -61,14 +61,14 @@ function initTable(dataList, limit, page) {
tableIns = table.render({ tableIns = table.render({
id: 'currTable', id: 'currTable',
elem: "#currTable", elem: "#currTable",
height: 'full-160', height: 'full-130',
data: dataList, data: dataList,
limit: limit, limit: limit,
cols: [ cols: [
[ [
{ {
title: "序号", title: "序号",
width: 80, width: '5%',
unresize: true, unresize: true,
align: "center", align: "center",
templet: function (d) { templet: function (d) {
@ -78,7 +78,7 @@ function initTable(dataList, limit, page) {
{ {
field: "ticketNo", field: "ticketNo",
title: "作业票编号", title: "作业票编号",
width: 200, width: '10%',
unresize: true, unresize: true,
align: "center", align: "center",
style: 'word-break: break-all' style: 'word-break: break-all'
@ -86,7 +86,7 @@ function initTable(dataList, limit, page) {
{ {
field: "proName", field: "proName",
title: "工程名称", title: "工程名称",
width: 200, width: '15%',
unresize: true, unresize: true,
align: "center", align: "center",
style: 'word-break: break-all' style: 'word-break: break-all'
@ -94,14 +94,17 @@ function initTable(dataList, limit, page) {
{ {
field: "workManager", field: "workManager",
title: "班组长", title: "班组长",
width: 330, width: '10%',
unresize: true, unresize: true,
align: "center", align: "center",
templet: function (d) {
return '<p>'+transformNull(d.workManager)+'</p><p>'+transformNull(d.workManagerPhone)+'</p>';
}
}, },
{ {
field: "riskLevel", field: "riskLevel",
title: "风险等级", title: "风险等级",
width: 140, width: '10%',
unresize: true, unresize: true,
align: "center", align: "center",
templet: function (d) { templet: function (d) {
@ -111,28 +114,28 @@ function initTable(dataList, limit, page) {
{ {
field: "org", field: "org",
title: "违章单位", title: "违章单位",
width: 140, width: '10%',
unresize: true, unresize: true,
align: "center", align: "center",
}, },
{ {
field: "type", field: "type",
title: "违章类型", title: "违章类型",
width: 140, width: '10%',
unresize: true, unresize: true,
align: "center", align: "center",
}, },
{ {
field: "org", field: "childType",
title: "违章子类型", title: "违章子类型",
width: 140, width: '10%',
unresize: true, unresize: true,
align: "center", align: "center",
}, },
{ {
field: "levelId", field: "levelId",
title: "违章等级", title: "违章等级",
width: 150, width: '10%',
unresize: true, unresize: true,
align: "center", align: "center",
templet: function (d) { templet: function (d) {
@ -145,9 +148,20 @@ function initTable(dataList, limit, page) {
{ {
field: "content", field: "content",
title: "违章内容", title: "违章内容",
width: 360, width: '10%',
unresize: true, unresize: true,
align: "center", align: "center",
templet: function (d) {
if (d.content) {
if (d.content.length > 60) {
return '<span title="' + d.content + '">' + d.content.substring(0, 60) + '...</span>'
} else {
return '<span title="' + d.content + '">' + d.content + '</span>'
}
} else {
return '';
}
}
} }
], ],
], ],
@ -188,11 +202,11 @@ function getReqParams(page, limit, type) {
// 查询/重置 // 查询/重置
function queryTable(type) { function queryTable(type) {
if (type === 2) { if (type === 2) {
$('#keyWord').val(''); $('#proName').val('');
} }
let pattern = new RegExp("[%_<>]"); let pattern = new RegExp("[%_<>]");
if (pattern.test($("#keyWord").val())) { if (pattern.test($("#proName").val())) {
$("#keyWord").val(''); $("#proName").val('');
return layer.msg('关键字查询包含特殊字符,请重新输入', { return layer.msg('关键字查询包含特殊字符,请重新输入', {
icon: 2, icon: 2,
time: 2000 //2秒关闭如果不配置默认是3秒 time: 2000 //2秒关闭如果不配置默认是3秒