diff --git a/css/consQuality/consQuality.css b/css/consQuality/consQuality.css index e2f031b..e20ee49 100644 --- a/css/consQuality/consQuality.css +++ b/css/consQuality/consQuality.css @@ -243,4 +243,22 @@ th { width: 100%; height: 80%; -} \ No newline at end of file +} + +#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; +} + + diff --git a/css/personnelControl/personnelControl.css b/css/personnelControl/personnelControl.css index 1551c81..21145b1 100644 --- a/css/personnelControl/personnelControl.css +++ b/css/personnelControl/personnelControl.css @@ -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; } \ No newline at end of file diff --git a/img/consQuality/QualityInspection-0.png b/img/consQuality/QualityInspection-0.png index e5af34b..3b26638 100644 Binary files a/img/consQuality/QualityInspection-0.png and b/img/consQuality/QualityInspection-0.png differ diff --git a/img/consQuality/QualityInspection-2.png b/img/consQuality/QualityInspection-2.png index 3b26638..e5af34b 100644 Binary files a/img/consQuality/QualityInspection-2.png and b/img/consQuality/QualityInspection-2.png differ diff --git a/js/consQuality/consQuality.js b/js/consQuality/consQuality.js index b70a87d..4f7ab25 100644 --- a/js/consQuality/consQuality.js +++ b/js/consQuality/consQuality.js @@ -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; -} \ No newline at end of file +} + + + diff --git a/js/consQuality/consQualityList.js b/js/consQuality/consQualityList.js index 4c9598b..eec5db9 100644 --- a/js/consQuality/consQualityList.js +++ b/js/consQuality/consQualityList.js @@ -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: [[ diff --git a/js/pages/alarmMge/alarmMge.js b/js/pages/alarmMge/alarmMge.js index 7edc73c..bd7250a 100644 --- a/js/pages/alarmMge/alarmMge.js +++ b/js/pages/alarmMge/alarmMge.js @@ -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('未处理') diff --git a/js/pages/video/videoAjax.js b/js/pages/video/videoAjax.js index 326d1a0..9944a0b 100644 --- a/js/pages/video/videoAjax.js +++ b/js/pages/video/videoAjax.js @@ -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 = '' + item.title + '' diff --git a/pages/consQuality/consQuality.html b/pages/consQuality/consQuality.html index eb6c79e..a8c3ef1 100644 --- a/pages/consQuality/consQuality.html +++ b/pages/consQuality/consQuality.html @@ -50,26 +50,32 @@
-
+
+ +
+ +
+
+ +
@@ -101,5 +107,55 @@
+ + + \ No newline at end of file diff --git a/plugin/layui-v2.9.7/layui/css/layui.css b/plugin/layui-v2.9.7/layui/css/layui.css index 6d9034d..234deb1 100644 --- a/plugin/layui-v2.9.7/layui/css/layui.css +++ b/plugin/layui-v2.9.7/layui/css/layui.css @@ -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 {