前端样式修改施工质量,人员管控问题修改

This commit is contained in:
zzyuan 2024-04-19 13:51:29 +08:00
parent f8d7fa4864
commit 20d10cae02
10 changed files with 224 additions and 38 deletions

View File

@ -243,4 +243,22 @@ th {
width: 100%;
height: 80%;
}
}
#divDialog{
width: 100%;
height: 500px;
background-color: #fff;
color: #000;
}
#deviceName{
color: #000;
}
#ID-laydate-start-date-1{
color: #000;
}#ID-laydate-end-date-1{
color: #000;
}

View File

@ -271,6 +271,7 @@ th {
.left-down-down{
width: 100%;
height: 85%;
overflow-y: scroll;
}
.layui-layer-dialog .layui-layer-content {
@ -305,4 +306,8 @@ ul li {
.btn:hover {
background-color: rgba(27, 142, 236, 0.8);
color: #fff;
}
#tree>.layui-tree>.layui-tree-txt{
color: #fff !important;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -3,6 +3,7 @@ const bidCode = parent.$('#bidPro').val();
var table;
var alarmTableIns;
var qualityInspectionTableIns;
var historyTableIns;
let thePileFoundationIsMadeIntoHoles = 1906002; //桩基成孔
let groundAcceptance = 1906003; //地面验收
let concretePouring = 1906004; //混凝土浇筑
@ -13,10 +14,33 @@ layui.use(['layer', 'element', 'table'], function () {
table = layui.table;
document.getElementById("myButton").addEventListener("click", function() {
window.location.href = "../consQuality/consQualityList.html";
// window.location.href = "../consQuality/consQualityList.html";
layer.open({
type: 1,
title: '历史记录', //显示标题栏
closeBtn: 1,
area: '80%;',
id: 'HISTORY_layui', //设定一个id防止重复弹出
resize: false,
// btn: ['确定'],
btnAlign: 'c',
moveType: 0, //拖拽模式0或者1
skin:"layui-layer-molv",
content: $("#divDialog"),
success: function (layero) {
initHistory()
},
yes: function (layero, index) {
layer.close('HISTORY_layui')
},
cancel: function () {
// 右上角关闭事件的逻辑
layer.close('HISTORY_layui')
}
});
});
$('#ID-laydate-type-datetime').val(getNowDay());
// $('#ID-laydate-type-datetime').val(getNowDay());
//下拉选
getConstruction();
@ -42,10 +66,17 @@ layui.use(['layer', 'element', 'table'], function () {
}
// laydate.render({
// elem: '#ID-laydate-type-datetime',
// value: getNowDay() // 设置默认值为当天
// });
laydate.render({
elem: '#ID-laydate-type-datetime',
value: getNowDay() // 设置默认值为当天
});
elem: '#ID-laydate-rangeLinked',
range: ['#ID-laydate-start-date-1', '#ID-laydate-end-date-1'],
rangeLinked: true // 开启日期范围选择时的区间联动标注模式 --- 2.8+ 新增
});
});
//下拉选
@ -122,7 +153,6 @@ function qualityInspection(environmentData) {
// 获取存放设备的父元素
var environmentContainer = document.querySelector('.environment');
// 遍历数据,生成设备元素并添加到页面中
for (var i = 0; i < environmentData.length; i += 3) {
// 创建一个新的 div 作为一组设备信息的容器
@ -135,10 +165,9 @@ function qualityInspection(environmentData) {
for (var j = i; j < i + 3 && j < environmentData.length; j++) {
var deviceElement = document.createElement('div');
deviceElement.className = 'monitor-data layout';
deviceElement.id = environmentData[j].deviceId;
var monitorIconElement = document.createElement('div');
monitorIconElement.className = 'monitor-icon';
var pElement = document.createElement('p');
pElement.textContent = environmentData[j].deviceName;
@ -153,19 +182,25 @@ function qualityInspection(environmentData) {
deviceElement.appendChild(monitorIconElement);
deviceElement.appendChild(pElement);
groupElement.appendChild(deviceElement);
// 添加点击事件监听器
deviceElement.addEventListener('click', function(event) {
var clickedDeviceId = event.currentTarget.id;
AlarmList(clickedDeviceId)
ConstructionQualityList(clickedDeviceId)
console.log(clickedDeviceId)
});
}
// 将每组设备信息容器添加到父元素中
environmentContainer.appendChild(groupElement);
}
}
//告警列表
function AlarmList(){
function AlarmList(deviceId){
const dId = deviceId||'';
const url = commonUrl + "screen/largeScreen/constructionQuality/getConstructionAlarm";
alarmTableIns = table.render({
elem: '#alarm',
url: url,
@ -176,6 +211,7 @@ function AlarmList(){
"Authorization":token
},
where: {
deviceId:dId,
roleCode: roleCode,
orgId: orgId,
userId: userId,
@ -199,8 +235,9 @@ function AlarmList(){
})
}
function ConstructionQualityList(){
//施工质量列表
function ConstructionQualityList(deviceId){
const dId = deviceId||'';
const url = commonUrl + "screen/largeScreen/constructionQuality/getConstructionQualityList";
qualityInspectionTableIns = table.render({
@ -212,21 +249,23 @@ function ConstructionQualityList(){
"Authorization":token
},
where: {
deviceId:dId,
roleCode: roleCode,
orgId: orgId,
userId: userId,
bidCode: bidCode,
month: $('#ID-laydate-type-datetime').val(),
moduleName: $('#moduleName').val(),
// month: $('#ID-laydate-type-datetime').val(),
},
cols: [[
{field: 'number', width:80,title: '序号', align: 'center', type: 'numbers', fixed: 'left'},
{field: 'areaName', align: 'center', title: '区域'},
{field: 'areaName', align: 'center', title: '区域名称'},
{field: 'deviceName', align: 'center', title: '设备名称'},
{field: 'devicType', align: 'center', title: '施工工艺'},
{field: 'maxVal', align: 'center', title: '标准值'},
{field: 'moduleName', align: 'center', title: '施工工艺'},
{field: 'changeVal', align: 'center', title: '变化值'},
{field: 'val', align: 'center', title: '检测值'},
{field: 'createTime', align: 'center', title: '检测时间'},
{field: 'isWarn', align: 'center', title: '状态'},
{field: 'isWarn', align: 'center', title: '是否告警'},
]],
initComplete: function () {
// 在表格渲染完成后,重新渲染序号列
@ -237,7 +276,14 @@ function ConstructionQualityList(){
});
},
done:function(res, curr, count, origin){
console.log(res);
// console.log(res);
$("[data-field='isWarn']").children().each(function(){
if($(this).text()=='0'){
$(this).text('未告警')
}else if($(this).text()=='1'){
$(this).text('告警')
}
})
},
page: true, //开启分页
loading: true, //数据加载中。。。
@ -245,7 +291,61 @@ function ConstructionQualityList(){
limit: 7
})
}
//渲染历史记录table
function initHistory(){
const url = commonUrl + "screen/largeScreen/constructionQuality/getHistoryList";
historyTableIns = table.render({
elem: '#tableDialog',
url: url,
// skin: 'line',
page: true,
headers:{
decrypt:"decrypt",
"Authorization":token
},
where: {
roleCode: roleCode,
orgId: orgId,
userId: userId,
bidCode: bidCode,
deviceName:$('#deviceName').val(),
times: $('#ID-laydate-start-date-1').val()+' - '+ $('#ID-laydate-end-date-1').val(),
},
cols: [[
{type: 'numbers', title: '序号'}, // 添加序号列
{field: 'areaName', align: 'center', title: '区域名称'},
{field: 'deviceName', align: 'center', title: '设备名称'},
{field: 'moduleName', align: 'center', title: '施工工艺'},
{field: 'changeVal', align: 'center', title: '变化值'},
{field: 'val', align: 'center', title: '检测值'},
{field: 'createTime', align: 'center', title: '检测时间'},
{field: 'isWarn', align: 'center', title: '是否告警'},
]],
initComplete: function () {
// 在表格渲染完成后,重新渲染序号列
var that = this.elem.next();
var tool = that.children('.layui-table-box').children('.layui-table-fixed').children('.layui-table-body').children('.layui-table');
tool.find("tr").each(function (index, item) {
$(this).find('td[data-field="LAY_TABLE_INDEX"]').text(index + 1);
});
},
done:function(res, curr, count, origin){
// console.log(res);
$("[data-field='isWarn']").children().each(function(){
if($(this).text()=='0'){
$(this).text('未告警')
}else if($(this).text()=='1'){
$(this).text('告警')
}
})
},
page: true, //开启分页
loading: true, //数据加载中。。。
limits: [5, 10, 20, 100],
limit: 7
})
}
//检测记录对比
function detectionRecord(button,construction){
if(button !== ''){
@ -420,4 +520,7 @@ function getNowDay() {
var month = time.getMonth() + 1 >= 10 ? time.getMonth() + 1 : '0' + (time.getMonth() + 1);
var day = time.getDate() >= 10 ? time.getDate() : '0' + time.getDate();
return year + "-" + month + "-" + day;
}
}

View File

@ -82,7 +82,7 @@ function ConstructionQualityList(){
orgId: orgId,
userId: userId,
bidCode: bidCode,
month: $('#ID-laydate-type-datetime').val(),
// month: $('#ID-laydate-type-datetime').val(),
},
cols: [[

View File

@ -12,7 +12,7 @@ layui.use(['layer','table','form','jquery'], function () {
table.on('tool(test)', function (obj) {
var data = obj.data;
console.log(data)
// console.log(data,'-----row-----')
if (obj.event === 'edit') {
layer.open({
type: 1,
@ -44,7 +44,7 @@ layui.use(['layer','table','form','jquery'], function () {
form.on('submit(formDemo)', function (Fdata) {
//表单数据formData
var formData = Fdata.field;
// console.log(formData)
// console.log(formData,'-----formData-----')
const url = commonUrl + "screen/largeScreen/alarmMge/warnProcess";
const params = {
"warnId": data.warnId,
@ -77,12 +77,12 @@ layui.use(['layer','table','form','jquery'], function () {
}else if(obj.event === 'view'){
layer.open({
type: 1,
title: '告警处置', //显示标题栏
title: '告警查看', //显示标题栏
closeBtn: 1,
area: '600px;',
id: 'LAY_layuipro1', //设定一个id防止重复弹出
resize: false,
// btn: ['确定', '取消'],
btn: ['确定'],
btnAlign: 'c',
moveType: 1, //拖拽模式0或者1
skin:"layui-layer-molv",
@ -100,16 +100,17 @@ layui.use(['layer','table','form','jquery'], function () {
$("#alarmContent").val(data.warnContent);
$("#alarmMask").val(data.remark);
if(data.status=='1'){
console.log(11111)
$("#isAlarm1").attr("checked",true);
$("#isAlarm2").attr("checked",false);
}else if(data.status=='2'){
console.log(22222)
$("#isAlarm1").attr("checked",false);
$("#isAlarm2").attr("checked",true);
}
form.render();
},
yes: function (layero, index) {
layer.close('LAY_layuipro1')
},
cancel: function () {
// 右上角关闭事件的逻辑
layer.close('LAY_layuipro1')
@ -232,7 +233,7 @@ function init(warnType){
});
},
done:function(res, curr, count, origin){
console.log(res);
// console.log(res);
$("[data-field='status']").children().each(function(){
if($(this).text()=='0'){
$(this).text('未处理')

View File

@ -23,6 +23,9 @@ function loadVideoTree() {
$.each(data, function (index, item) {
if (item.id !== '0') {
totalNum++;
if(item.title.length>20){
item.title = item.title.substr(0, 20) + '...';
}
if (item.onLine === '1') {
onlineNum++;
item.title = '<img src="../../../img/video/ball_online.png"><span>' + item.title + '</span>'

View File

@ -50,26 +50,32 @@
<div style="width: 100%;height: 100%;">
<form class="layui-form " onsubmit="return false">
<div class="layui-form-item">
<div class="layui-inline">
<!-- <div class="layui-inline">
<label class="layui-form-label">时间:</label>
<div class="layui-input-inline">
<input type="text" class="layui-input" id="ID-laydate-type-datetime" placeholder="HH:mm:ss">
</div>
</div>
</div> -->
<div class="layui-inline">
<label class="layui-form-label">施工工艺:</label>
<div class="layui-input-inline">
<input type="text" class="layui-input" id="moduleName" placeholder="施工工艺" maxlength="20">
</div>
</div>
<!-- <div class="layui-inline">
<label class="layui-form-label">施工工艺:</label>
<div class="layui-input-inline">
<select lay-search id="construction">
</select>
</div>
</div>
<div class="layui-inline">
</div> -->
<!-- <div class="layui-inline">
<label class="layui-form-label">区域:</label>
<div class="layui-input-inline">
<select lay-search id="region">
</select>
</div>
</div>
</div> -->
<div class="layui-inline">
<div class="layui-col-xs12">
@ -101,5 +107,55 @@
</div>
</div>
</div>
<div style="display: none" id="divDialog" class="divDialog">
<div style="width: 100%;height: 100%;">
<form class="layui-form " onsubmit="return false">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">日期范围</label>
<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>
<!-- <div class="layui-inline">
<label class="layui-form-label">时间:</label>
<div class="layui-input-inline">
<input type="text" class="layui-input" id="ID-laydate-type-datetime" placeholder="HH:mm:ss">
</div>
</div> -->
<div class="layui-inline">
<label class="layui-form-label">设备名称:</label>
<div class="layui-input-inline">
<input type="text" class="layui-input" id="deviceName" placeholder="设备名称" maxlength="20">
</div>
</div>
<!-- <div class="layui-inline">
<label class="layui-form-label">区域:</label>
<div class="layui-input-inline">
<select lay-search id="region">
</select>
</div>
</div> -->
<div class="layui-inline">
<div class="layui-col-xs12">
<button class="layui-btn" onclick="initHistory()" lay-submit lay-filter="demo-table-search">查询</button>
</div>
</div>
</div>
</form>
<div style="width: 100%;height: 85%;overflow: auto;">
<table id="tableDialog" lay-filter="tableDialog"></table>
</div>
</div>
</div>
</body>
</html>

View File

@ -6484,7 +6484,7 @@ body .layui-util-face .layui-layer-content {
}
.layui-tree-entry:hover {
background-color: #eee
background-color: #4F9A92
}
.layui-tree-line .layui-tree-entry:hover {
@ -6574,7 +6574,7 @@ body .layui-util-face .layui-layer-content {
.layui-tree-txt {
display: inline-block;
vertical-align: middle;
color: #555
color: #fff
}
.layui-tree-search {
@ -7620,7 +7620,7 @@ html #layuicss-laydate {
}
.layui-laydate-content th {
color: #333
color: #fff
}
.layui-laydate-content td {