数据分析-

This commit is contained in:
lSun 2025-10-21 13:46:32 +08:00
parent 921972bd3a
commit a41169b29b
2 changed files with 54 additions and 19 deletions

View File

@ -1,36 +1,59 @@
let table, layer, form;
let table, layer, form, laydate;
let fontSize = "14",
fontFamily = "Alibaba PuHuiTi R",
fontColor = "#fff";
layui.use(["layer", "table", "form"], function () {
layui.use(["layer", "table", "form", "laydate"], function () {
layer = layui.layer;
table = layui.table;
form = layui.form;
getEnvironmental();
laydate = layui.laydate;
laydate.render({
elem: "#ID-laydate-rangeLinked",
range: ["#ID-laydate-start-date-1", "#ID-laydate-end-date-1"],
rangeLinked: true, // 开启日期范围选择时的区间联动标注模式 --- 2.8+ 新增
});
getSafetyAlert();
$("#ID-laydate-start-date-1").val(getNowTime())
$("#ID-laydate-end-date-1").val(getNowTime())
let startTime = "";
let endTime = "";
if ($("#ID-laydate-start-date-1").val() != "") {
startTime = $("#ID-laydate-start-date-1").val();
endTime = $("#ID-laydate-end-date-1").val();
} else {
startTime = "";
endTime = "";
}
initData( startTime, endTime);
});
initData();
function query() {
let startTime = "";
let endTime = "";
if ($("#ID-laydate-start-date-1").val() != "") {
startTime = $("#ID-laydate-start-date-1").val();
endTime = $("#ID-laydate-end-date-1").val();
} else {
startTime = "";
endTime = "";
}
initData(startTime, endTime);
}
function initData() {
function initData(startTime, endTime) {
const url = commonUrl + "screen/proSafety/selectOverallEfficiencyData";
let encryptStr = encryptCBC(
JSON.stringify({
startTime: "2025-10-10",
endTime: "2025-10-17",
})
);
ajaxRequest(
url,
"get",
{
startTime: "2025-10-10",
endTime: "2025-10-17",
startTime: startTime,
endTime: endTime,
},
true,
function () {},
@ -336,7 +359,7 @@ function initSafetyAlert(data) {
},
/**区域位置*/
grid: {
left: "8%",
left: "4%",
right: "3%",
top: "30%",
bottom: "30%",

View File

@ -188,9 +188,21 @@
<div style="height: 6%;width: 100%;">
<form class="layui-form basic-form" onclick="return false;" onsubmit="return false;">
<div class="layui-form-item">
<div class="layui-inline">
<!-- <div class="layui-inline">-->
<!-- <div class="layui-input-inline">-->
<!-- <input type="text" id="name" class="layui-input" autocomplete="off">-->
<!-- </div>-->
<!-- </div>-->
<div class="layui-inline" id="ID-laydate-rangeLinked">
<div class="layui-input-inline">
<input type="text" id="name" class="layui-input" autocomplete="off">
<input type="text" autocomplete="off" id="ID-laydate-start-date-1" readonly
class="layui-input" placeholder="开始日期">
</div>
<div class="layui-form-mid">-</div>
<div class="layui-input-inline">
<input type="text" autocomplete="off" id="ID-laydate-end-date-1" readonly
class="layui-input" placeholder="结束日期">
</div>
</div>
@ -301,7 +313,7 @@
</div>
</div> -->
<div style="height: 100%;width: 85%">
<div style="height: 100%;width: 100%">
<div id="safetyAlert"></div>
</div>
</div>