This commit is contained in:
haozq 2024-12-12 14:13:56 +08:00
commit 03b5485ef9
3 changed files with 17 additions and 357 deletions

View File

@ -3,7 +3,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>值班日报</title> <title>值班日报</title>
<link rel="stylesheet" href="../../js/layui/css/layui.css"> <link rel="stylesheet" href="../../js/layui-v2.9.2/layui/css/layui.css">
<link rel="stylesheet" href="../../css/font.css"> <link rel="stylesheet" href="../../css/font.css">
<link rel="stylesheet" href="../../css/dutyTask/remotePatrol/dailyDutyReport.css"> <link rel="stylesheet" href="../../css/dutyTask/remotePatrol/dailyDutyReport.css">
<link rel="stylesheet" href="../../css/viewer.min.css"> <link rel="stylesheet" href="../../css/viewer.min.css">
@ -11,7 +11,7 @@
<script src="../../js/public/public.js" type="text/javascript"></script> <script src="../../js/public/public.js" type="text/javascript"></script>
<script src="../../js/public/echarts.js" type="text/javascript"></script> <script src="../../js/public/echarts.js" type="text/javascript"></script>
<script src="../../js/public/sm3.js" type="text/javascript"></script> <script src="../../js/public/sm3.js" type="text/javascript"></script>
<script src="../../js/layui/layui.js"></script> <script src="../../js/layui-v2.9.2/layui/layui.js"></script>
<script src="../../js/public/commonUtils.js"></script> <script src="../../js/public/commonUtils.js"></script>
<script src="../../js/public/aes.js"></script> <script src="../../js/public/aes.js"></script>
<script src="../../js/public/viewer.min.js"></script> <script src="../../js/public/viewer.min.js"></script>
@ -97,24 +97,7 @@
<p class="module-content">1.今日共督查<span id="six_num">0</span>处(视频<span id="six_num2">0</span>处),其中三级及以上现场<span id="six_num3">0</span>处、重要四级现场<span id="six_num4">0</span>处、其他现场<span id="six_num5">0</span>处,发现一般违章<span id="six_num6">0</span>处。</p> <p class="module-content">1.今日共督查<span id="six_num">0</span>处(视频<span id="six_num2">0</span>处),其中三级及以上现场<span id="six_num3">0</span>处、重要四级现场<span id="six_num4">0</span>处、其他现场<span id="six_num5">0</span>处,发现一般违章<span id="six_num6">0</span>处。</p>
<p class="module-title">(二)常规工程</p> <p class="module-title">(二)常规工程</p>
<p class="module-title">远程督查情况</p> <p class="module-title">远程督查情况</p>
<p class="module-content">1.今日视频督查情况:督查作业现场<span id="seven_num">0</span>处,发现一般违章<span id="seven_num2">0</span>处。</p> <p class="module-content">1.关键措施照片上传和日报质量评价情况:</p>
<div class="general-voi-box">
</div>
<p class="module-content">2.问题整改回复情况:</p>
<!-- 循环生成 -->
<div id="zgListDiv">
<!-- <p class="module-content">120241020-01合肥公司已整改</p>
<p class="module-content">220241020-02滁州公司已整改</p>
<p class="module-content">320241020-03安庆公司已整改</p> -->
</div>
<p class="module-content">3.今日现场督查情况:无。</p>
<p class="module-content">4.地市公司自查违章情况:</p>
<p class="module-content">今日各地市自查违章共<span id="eight_num">0</span>条,其中严重违章<span id="eight_num2">0</span>条,一般违章<span id="eight_num3">0</span>条,情况如下:</p>
<div class="voi-echarts-box">
<div id="voi-echarts"></div>
</div>
<p class="module-content">5.关键措施照片上传和日报质量评价情况:</p>
<table class="data-table two-table one-cell" style="margin-top: 10px;"> <table class="data-table two-table one-cell" style="margin-top: 10px;">
<thead> <thead>
<tr> <tr>
@ -129,9 +112,9 @@
<tbody> <tbody>
</tbody> </tbody>
</table> </table>
<p class="module-content">6.值班抽查情况</p> <p class="module-content">2.值班抽查情况</p>
<p class="module-content">今日各地市公司均参与点到。</p> <p class="module-content">今日各地市公司均参与点到。</p>
<p class="module-content">7.远程抽查情况</p> <p class="module-content">3.远程抽查情况</p>
<p class="module-content">远程抽查关键人员<span id="cc_num">0</span>人,具体如下:</p> <p class="module-content">远程抽查关键人员<span id="cc_num">0</span>人,具体如下:</p>
<table class="data-table two2-table one-cell" style="margin-top: 10px;"> <table class="data-table two2-table one-cell" style="margin-top: 10px;">
<thead> <thead>
@ -155,7 +138,7 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
<p class="module-content">8.二级风险明细</p> <p class="module-content">4.二级风险明细</p>
<table class="data-table two3-table one-cell" style="margin-top: 10px;"> <table class="data-table two3-table one-cell" style="margin-top: 10px;">
<thead> <thead>
<tr> <tr>
@ -174,7 +157,7 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
<p class="module-content">9.二级风险到岗到位抽查情况</p> <p class="module-content">5.二级风险到岗到位抽查情况</p>
<table class="data-table seven-table four-cell" style="margin-top: 10px;"> <table class="data-table seven-table four-cell" style="margin-top: 10px;">
<thead> <thead>
<tr> <tr>

View File

@ -1,5 +1,4 @@
let form, layer, laydate, checkedDate; let form, layer, laydate, checkedDate;
let myChart4 = echarts.init(document.getElementById("voi-echarts"));
layui.use(["form", "laydate", "layer"], function () { layui.use(["form", "laydate", "layer"], function () {
layer = layui.layer; layer = layui.layer;
form = layui.form; form = layui.form;
@ -95,7 +94,7 @@ function downloadDaily() {
}); });
let url = let url =
dataUrl + dataUrl +
"proteam/pot/newDailyDutyReport/downloadDaily?currentDay=" + "proteam/pot/safetyReport/downloadDaily?currentDay=" +
checkedDate + checkedDate +
"&chineseDate=" + "&chineseDate=" +
setDate(checkedDate) + setDate(checkedDate) +
@ -150,7 +149,7 @@ function getDaily(currentDay) {
), ),
}, },
type: "POST", type: "POST",
url: dataUrl + "proteam/pot/newDailyDutyReport/getDailyData?token=" + token, url: dataUrl + "proteam/pot/safetyReport/getDailyData?token=" + token,
data: { data: {
currentDay: currentDay, currentDay: currentDay,
}, },
@ -194,7 +193,7 @@ function reloadDaily(currentDay, loadingMsg) {
), ),
}, },
type: "POST", type: "POST",
url: dataUrl + "proteam/pot/newDailyDutyReport/getDailyData?token=" + token, url: dataUrl + "proteam/pot/safetyReport/getDailyData?token=" + token,
data: { data: {
currentDay: currentDay, currentDay: currentDay,
}, },
@ -317,23 +316,6 @@ function setDailyData(data, dataMap) {
$("#six_num6").html(data.six_num6); $("#six_num6").html(data.six_num6);
$("#seven_num").html(data.seven_num); $("#seven_num").html(data.seven_num);
$("#seven_num2").html(data.seven_num2); $("#seven_num2").html(data.seven_num2);
// 远程督查情况
setModuleElevenData(data);
// 整改情况
let html = "";
if (data.zgList && data.zgList.length > 0) {
$.each(data.zgList, function (index, item) {
const str = item.zg;
html += "<p class='module-content'>" + str + "</p>";
});
$("#zgListDiv").empty().append(html);
}
// 地市公司自查违章情况
$("#eight_num").html(data.eight_num);
$("#eight_num2").html(data.eight_num3);
$("#eight_num3").html(data.eight_num4);
initEchartsTwo(data.exceList);
// 关键措施照片上传和日报质量评价情况 // 关键措施照片上传和日报质量评价情况
if (data.tableList && data.tableList.length > 0) { if (data.tableList && data.tableList.length > 0) {
let cent = ""; let cent = "";
@ -417,309 +399,4 @@ function setDailyData(data, dataMap) {
$(".seven-table tbody").empty().append(cent); $(".seven-table tbody").empty().append(cent);
} }
} }
function setModuleElevenData(data) {
let html = "";
if (data.vioList && data.vioList.length > 0) {
$.each(data.vioList, function (index, item) {
html +=
'<table class="general-voi" id="general-voi' +
index +
'">' +
'<colgroup><col style="width: 20%;"></col><col style="width: 80%;"></col></colgroup>' +
'<tr style="color:#FF0000;"><td colspan="2" style="text-align: initial;padding-left: 40px;">' +
item.wzlx +
"</td></tr>" +
'<tr style="color:#FF0000;"><td>违章现场</td><td>' +
item.name +
"</td></tr>" +
'<tr style="height: 300px;color:#FF0000;"><td>违章照片</td><td>' +
setVoiPhotos(item) +
"</td></tr>" +
'<tr style="color:#FF0000;"><td>违章内容</td><td>' +
item.content +
"</td></tr>" +
'<tr style="color:#0000FF;"><td>违章依据</td><td>' +
item.yj +
"</td></tr>" +
'<tr style="color:#0000FF;"><td>违章处理情况</td><td>' +
item.dealwith +
"</td></tr>" +
'<tr style="height: 300px;color:#0000FF;"><td>整改照片</td><td>' +
setVoizgPhotos(item) +
"</td></tr>" +
"</table>";
});
} else {
html +=
'<table class="general-voi">' +
'<colgroup><col style="width: 20%;"></col><col style="width: 80%;"></col></colgroup>' +
'<tr style="color:#FF0000;"><td colspan="2" style="text-align: initial;padding-left: 40px;">一般违章</td></tr>' +
'<tr style="color:#FF0000;"><td>违章现场</td><td></td></tr>' +
'<tr style="height: 300px;color:#FF0000;"><td>违章照片</td><td></td></tr>' +
'<tr style="color:#FF0000;"><td>违章内容</td><td></td></tr>' +
'<tr style="color:#0000FF;"><td>违章依据</td><td></td></tr>' +
'<tr style="color:#0000FF;"><td>违章处理情况</td><td></td></tr>' +
'<tr style="height: 300px;color:#0000FF;"><td>整改照片</td><td></td></tr>' +
"</table>";
}
$(".general-voi-box").empty().append(html);
if (data.moduleEleven && data.moduleEleven.length > 0) {
$.each(data.moduleEleven, function (index, item) {
let viewer = new Viewer(
document.getElementById("general-voi" + index + ""),
{
url: "data-original",
show: function () {
viewer.update();
},
}
);
});
}
}
/* 违章照片 */
function setVoiPhotos(obj) {
let cent = '';
let voiImgList = obj.voiImgList;
$.each(voiImgList, function (index, item) {
let path = photoUrl + item.img2 + "?token=" + token;
cent +=
'<img src="' +
path +
'" width="530" height="350" style="margin-bottom:10px;" data-original = "' +
path +
'">';
});
return cent;
}
/* 整改图片 */
function setVoizgPhotos(obj) {
let cent = '';
if (obj.hasWord == 1) {
let voizgFileList = obj.voizgFileList;
$.each(voizgFileList, function (index, item) {
let path = '../../img/word.png';
cent +=
'<img src="' +
path +
'" width="200" height="200" style="margin-bottom:10px;" data-original = "' +
path +
'">';
});
} else {
let voizgImgList = obj.voizgImgList;
$.each(voizgImgList, function (index, item) {
let path = photoUrl + item.img2 + "?token=" + token;
cent +=
'<img src="' +
path +
'" width="530" height="350" style="margin-bottom:10px;" data-original = "' +
path +
'">';
});
}
return cent;
}
/*周风险echarts*/
function initEchartsTwo(dataList) {
let xAxisList = [];
let data = [];
let data2 = [];
let data3 = [];
$.each(dataList, function (index, item) {
xAxisList.push(item.cityName);
data.push(item.zbhNum);
data2.push(item.yzwzNum);
data3.push(item.ybwzNum);
});
let fontSize = "14";
// 基于准备好的dom初始化echarts图表
let option = {
backgroundColor: "transparent",
tooltip: {
show: false,
},
legend: {
// right: '3%',
top: "92%",
itemWidth: 10,
itemHeight: 10,
itemGap: 15,
// 环图之间间隔,图例防抖动
inactiveBorderWidth: 0,
itemStyle: {
borderWidth: 0,
},
selectedMode: false,
},
grid: {
left: "3%",
right: "3%",
bottom: "10%",
top: "15%",
containLabel: true,
},
calculable: true,
xAxis: [
{
type: "category",
axisLabel: {
interval: 0, // 解决x轴名称过长问题
rotate: 45,
textStyle: {
color: "#262626",
fontSize: 14,
fontFamily: "Alibaba PuHuiTi R",
},
},
axisLine: {
show: false,
lineStyle: {
//y轴网格线设置
color: "#262626",
width: 1,
},
},
data: xAxisList,
},
],
yAxis: [
{
type: "value",
// name: "单位/个",
nameGap: 8,
nameTextStyle: {
color: "#262626",
},
axisTick: {
show: false,
},
axisLine: {
show: false,
lineStyle: {
//y轴网格线设置
color: "#2c2c2c",
width: 1,
},
},
splitLine: {
//保留网格线
show: true,
lineStyle: {
//y轴网格线设置
color: "#101C4A",
width: 1,
},
},
axisLabel: {
show: true,
textStyle: {
fontSize: 16,
color: "#262626", //字体颜色
fontFamily: "Alibaba PuHuiTi R",
},
},
},
],
series: [
{
name: "作业现场",
type: "bar",
z: 1,
barWidth: 6,
barGap: "100%",
label: {
show: true,
position: "top",
textStyle: {
color: "#262626",
},
},
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
{
offset: 0,
color: "#4472c4",
},
{
offset: 1,
color: "#4c87ef",
},
]),
},
},
data: data,
},
{
name: "严重违章",
type: "bar",
barGap: "100%",
z: 1,
barWidth: 6,
label: {
show: true,
position: "top",
textStyle: {
color: "#262626",
},
},
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
{
offset: 0,
color: "#618b35",
},
{
offset: 1,
color: "#97ec3e",
},
]),
},
},
data: data2,
},
{
name: "一般违章",
type: "bar",
barGap: "100%",
z: 1,
barWidth: 6,
label: {
show: true,
position: "top",
textStyle: {
color: "#262626",
},
},
itemStyle: {
normal: {
color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [
{
offset: 0,
color: "#a83232",
},
{
offset: 1,
color: "#d02020",
},
]),
},
},
data: data3,
},
],
};
myChart4.setOption(option, true);
window.addEventListener("resize", function () {
myChart4.resize();
});
}
} }

View File

@ -9,10 +9,10 @@ layui.use(['form', 'layer', 'table', 'laydate'], function () {
elem: '#ID-laydate-rangeLinked', elem: '#ID-laydate-rangeLinked',
range: ['#startDay', '#endDay'], range: ['#startDay', '#endDay'],
rangeLinked: true, rangeLinked: true,
btns: ['confirm'] // btns: ['confirm']
}); });
$('#startDay').val(getNowTime()); // $('#startDay').val(getNowTime());
$('#endDay').val(getNowTime()); // $('#endDay').val(getNowTime());
pages(1, 10, 1); pages(1, 10, 1);
}) })
@ -194,8 +194,8 @@ function getReqParams(page, limit, type) {
limit: '10', limit: '10',
proName: '', proName: '',
riskLevel:'', riskLevel:'',
startDay:getNowTime(), startDay:'',
endDay:getNowTime(), endDay:'',
currentUserId: user.userId + '', currentUserId: user.userId + '',
isSup: user.isSup, isSup: user.isSup,
currentUserOrgId: user.orgId currentUserOrgId: user.orgId
@ -209,8 +209,8 @@ function queryTable(type) {
if (type === 2) { if (type === 2) {
$('#proName').val(''); $('#proName').val('');
$('#riskLevel').val(''); $('#riskLevel').val('');
$('#startDay').val(getNowTime()); $('#startDay').val('');
$('#endDay').val(getNowTime()); $('#endDay').val('');
layui.form.render(); layui.form.render();
} }
let pattern = new RegExp("[%_<>]"); let pattern = new RegExp("[%_<>]");