数据分析-

This commit is contained in:
lSun 2025-10-21 13:38:20 +08:00
parent 02a83b640d
commit 921972bd3a
4 changed files with 198 additions and 37 deletions

View File

@ -198,6 +198,31 @@ function initEnvironmental(data) {
fontSize: 15,
},
},
"dataZoom": [{
"show": true,
"height": 12,
"xAxisIndex": [
0
],
bottom:'8%',
"start": 10,
"end": 90,
handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
handleSize: '110%',
handleStyle:{
color:"#d3dee5",
},
textStyle:{
color:"#fff"},
borderColor:"#90979c"
}, {
"type": "inside",
"show": true,
"height": 15,
"start": 1,
"end": 35
}],
series: [
{
type: "bar",
@ -360,6 +385,31 @@ function initSafetyAlert(data) {
fontSize: 15,
},
},
"dataZoom": [{
"show": true,
"height": 12,
"xAxisIndex": [
0
],
bottom:'8%',
"start": 10,
"end": 90,
handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
handleSize: '110%',
handleStyle:{
color:"#d3dee5",
},
textStyle:{
color:"#fff"},
borderColor:"#90979c"
}, {
"type": "inside",
"show": true,
"height": 15,
"start": 1,
"end": 35
}],
series: [
{
type: "bar",

View File

@ -1,54 +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;
// getProjectProgress();
// getProjectCost();
// getProjectRisk();
//土建专业
// getCivilEngineering();
//电气专业
// getElectrical();
//项目成本
// getItemCost();
//总风险数量
// getTotalRisk();
laydate = layui.laydate;
laydate.render({
elem: "#ID-laydate-rangeLinked",
range: ["#ID-laydate-start-date-1", "#ID-laydate-end-date-1"],
rangeLinked: true, // 开启日期范围选择时的区间联动标注模式 --- 2.8+ 新增
});
function getProjectProgress() {
initProjectProgress();
$("#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);
});
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() {
// const url = commonUrl + "screen/proSafety/selectOverallEfficiencyData";
function initData(startTime, endTime) {
const url = commonUrl + "screen/projectData/selectProjectData";
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 () {},
@ -124,7 +129,7 @@ function initData() {
);
}
initData();
function initProjectProgress(projectProgress) {
const a = projectProgress.split("%")[0] * 1;
@ -584,6 +589,31 @@ function initCivilEngineering(date) {
},
},
],
"dataZoom": [{
"show": true,
"height": 12,
"xAxisIndex": [
0
],
bottom:'8%',
"start": 10,
"end": 90,
handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
handleSize: '110%',
handleStyle:{
color:"#d3dee5",
},
textStyle:{
color:"#fff"},
borderColor:"#90979c"
}, {
"type": "inside",
"show": true,
"height": 15,
"start": 1,
"end": 35
}],
series: [
{
name: "计划",
@ -838,6 +868,31 @@ function initElectrical(data) {
},
},
],
"dataZoom": [{
"show": true,
"height": 12,
"xAxisIndex": [
0
],
bottom:'8%',
"start": 10,
"end": 90,
handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
handleSize: '110%',
handleStyle:{
color:"#d3dee5",
},
textStyle:{
color:"#fff"},
borderColor:"#90979c"
}, {
"type": "inside",
"show": true,
"height": 15,
"start": 1,
"end": 35
}],
series: [
{
name: "计划",
@ -1083,6 +1138,31 @@ function initItemCost(data) {
},
},
],
"dataZoom": [{
"show": true,
"height": 12,
"xAxisIndex": [
0
],
bottom:'8%',
"start": 10,
"end": 90,
handleIcon: 'path://M306.1,413c0,2.2-1.8,4-4,4h-59.8c-2.2,0-4-1.8-4-4V200.8c0-2.2,1.8-4,4-4h59.8c2.2,0,4,1.8,4,4V413z',
handleSize: '110%',
handleStyle:{
color:"#d3dee5",
},
textStyle:{
color:"#fff"},
borderColor:"#90979c"
}, {
"type": "inside",
"show": true,
"height": 15,
"start": 1,
"end": 35
}],
series: [
{
name: "项目成本",

View File

@ -329,9 +329,10 @@
<div style="height: 100%;width: 30%;">
<div class="equipment-card">
<div class="equipment-card-content" style="text-align: center;margin-top: 20%;">
<div class="equipment-card-value" style="font-size: 22px;margin-bottom: 10px;"><span
style="font-size: 12px;color: #fff;font-weight: 100" id="delayProgress"></span><span
style="font-size: 12px; margin-left: 2px;">%</span></div>
<div class="equipment-card-value" style="font-size: 22px;margin-bottom: 10px;">
<span
style="color: #fff;font-weight: bold;color: #79FFFF;" id="delayProgress"></span><span
style="margin-left: 2px;">%</span></div>
<div class="equipment-card-label">进度偏差</div>
</div>
</div>

View File

@ -219,6 +219,35 @@
<body>
<div id="proQuality">
<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" id="ID-laydate-rangeLinked">
<div class="layui-input-inline">
<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>
<div class="layui-inline">
<button type="button" class="layui-btn layui-btn-normal" onclick="query(1)"
style="background-color: #207E75;">
<i class="layui-icon layui-icon-query"></i>查询
</button>
</div>
</div>
</form>
</div>
<div style="height: 94%;width: 100%;display: flex;flex-direction: column;">
<div class="top-box">
<div class="top-box-box">
<div class="top-box-box-left">
@ -296,6 +325,7 @@
</div>
</div>
</div>
</div>
</body>