From a62228bb6438cf15201969c009bfb990a53e9d5b Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Mon, 9 Dec 2024 16:24:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9D=E7=AB=A0=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bns/js/supplement/pro_vio_list.js | 46 ++++++++++++++++++++----------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/bns/js/supplement/pro_vio_list.js b/bns/js/supplement/pro_vio_list.js index 57de633..6d059d9 100644 --- a/bns/js/supplement/pro_vio_list.js +++ b/bns/js/supplement/pro_vio_list.js @@ -14,7 +14,7 @@ function pages(pageNum, pageSize, typeNum) { headers: { "encrypt": sm3(JSON.stringify(params)) }, - url: dataUrl + "proteam/pot/superStatistics/getProVoiRecordList?token=" + token, + url: dataUrl + "proteam/pot/proVio/getDutyPersonList?token=" + token, data: params, type: 'POST', async: false, @@ -61,14 +61,14 @@ function initTable(dataList, limit, page) { tableIns = table.render({ id: 'currTable', elem: "#currTable", - height: 'full-160', + height: 'full-130', data: dataList, limit: limit, cols: [ [ { title: "序号", - width: 80, + width: '5%', unresize: true, align: "center", templet: function (d) { @@ -78,7 +78,7 @@ function initTable(dataList, limit, page) { { field: "ticketNo", title: "作业票编号", - width: 200, + width: '10%', unresize: true, align: "center", style: 'word-break: break-all' @@ -86,7 +86,7 @@ function initTable(dataList, limit, page) { { field: "proName", title: "工程名称", - width: 200, + width: '15%', unresize: true, align: "center", style: 'word-break: break-all' @@ -94,14 +94,17 @@ function initTable(dataList, limit, page) { { field: "workManager", title: "班组长", - width: 330, + width: '10%', unresize: true, align: "center", + templet: function (d) { + return '
'+transformNull(d.workManager)+'
'+transformNull(d.workManagerPhone)+'
'; + } }, { field: "riskLevel", title: "风险等级", - width: 140, + width: '10%', unresize: true, align: "center", templet: function (d) { @@ -111,28 +114,28 @@ function initTable(dataList, limit, page) { { field: "org", title: "违章单位", - width: 140, + width: '10%', unresize: true, align: "center", }, { field: "type", title: "违章类型", - width: 140, + width: '10%', unresize: true, align: "center", }, { - field: "org", + field: "childType", title: "违章子类型", - width: 140, + width: '10%', unresize: true, align: "center", }, { field: "levelId", title: "违章等级", - width: 150, + width: '10%', unresize: true, align: "center", templet: function (d) { @@ -145,9 +148,20 @@ function initTable(dataList, limit, page) { { field: "content", title: "违章内容", - width: 360, + width: '10%', unresize: true, align: "center", + templet: function (d) { + if (d.content) { + if (d.content.length > 60) { + return '' + d.content.substring(0, 60) + '...' + } else { + return '' + d.content + '' + } + } else { + return ''; + } + } } ], ], @@ -188,11 +202,11 @@ function getReqParams(page, limit, type) { // 查询/重置 function queryTable(type) { if (type === 2) { - $('#keyWord').val(''); + $('#proName').val(''); } let pattern = new RegExp("[%_<>]"); - if (pattern.test($("#keyWord").val())) { - $("#keyWord").val(''); + if (pattern.test($("#proName").val())) { + $("#proName").val(''); return layer.msg('关键字查询包含特殊字符,请重新输入', { icon: 2, time: 2000 //2秒关闭(如果不配置,默认是3秒)