| | |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.asrs.entity.BasCrnErrorLog; |
| | | import com.zy.asrs.entity.BasDevpErrorLog; |
| | | import com.zy.asrs.service.BasDevpErrorLogService; |
| | | import com.core.annotations.ManagerAuth; |
| | |
| | | return R.ok(basDevpErrorLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | |
| | | /** |
| | | * 根据精确的 createTime 查询 |
| | | */ |
| | | @RequestMapping(value = "/basDevpErrorLog/listByUuid/auth") |
| | | @ManagerAuth |
| | | public R listByUuid(@RequestParam String uuid, |
| | | @RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit) { |
| | | |
| | | EntityWrapper<BasDevpErrorLog> wrapper = new EntityWrapper<>(); |
| | | wrapper.eq("id", uuid); |
| | | Page<BasDevpErrorLog> page = basDevpErrorLogService.selectPage(new Page<>(curr, limit), wrapper); |
| | | return R.ok(page); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.core.common.DateUtils; |
| | | import com.zy.asrs.entity.BasCrnErrorLog; |
| | | import com.zy.asrs.entity.BasRgvErrorLog; |
| | | import com.zy.asrs.service.BasRgvErrorLogService; |
| | | import com.core.annotations.ManagerAuth; |
| | |
| | | |
| | | return R.ok(basRgvErrorLogService.selectPage(new Page<>(curr, limit), wrapper)); |
| | | } |
| | | /** |
| | | * 根据精确的 createTime 查询 |
| | | */ |
| | | @RequestMapping(value = "/basRgvErrorLog/listByUuid/auth") |
| | | @ManagerAuth |
| | | public R listByUuid(@RequestParam String uuid, |
| | | @RequestParam(defaultValue = "1") Integer curr, |
| | | @RequestParam(defaultValue = "10") Integer limit) { |
| | | |
| | | EntityWrapper<BasRgvErrorLog> wrapper = new EntityWrapper<>(); |
| | | // 精确匹配当天的数据,或者某个具体时间 |
| | | wrapper.eq("id", uuid); // 如果希望精确到秒 |
| | | |
| | | Page<BasRgvErrorLog> page = basRgvErrorLogService.selectPage(new Page<>(curr, limit), wrapper); |
| | | return R.ok(page); |
| | | } |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |
| | | String val = String.valueOf(entry.getValue()); |
| | |
| | | locOwner.setOwnerUuid(ownerUuid); |
| | | locOwner.setCreateTime(createTime); |
| | | locOwner.setUpdateTime(updateTime); |
| | | locOwner.setStatus(1); |
| | | if (!locOwnerService.insert(locOwner)) { |
| | | callApiLogSaveOwner(locOwner, kingDeeUtilType, "同步新货主出错!" + locOwner, false); |
| | | log.info("同步新货主出错!参数:[{}]、[{}]", locOwner, jsonObjectNew); |
| | |
| | | var form = layui.form; |
| | | var admin = layui.admin; |
| | | |
| | | // 异常项映射 |
| | | var errorNames = { |
| | | passTimeOut: '物体进/出超时', |
| | | objectNoIdError: '有物体无数据', |
| | | idNoObjectError: '有数据无物体', |
| | | lmfrError: '线体电机热继报警', |
| | | liftError: '顶升报警', |
| | | dlfrError: '顶升电机热继报警', |
| | | dmfrError: '顶升横移电机热继报警', |
| | | vfdError: '变频故障', |
| | | srvError: '伺服故障', |
| | | res1:'预留1', |
| | | res2:'预留2', |
| | | res3:'预留3', |
| | | communicationTimeOut: '与上位机通讯超时', |
| | | parameterIncompleteError: '信息参数不全', |
| | | dataNotClear: '信息数据未清除', |
| | | setParameterError: '参数设置报警', |
| | | dataError: '数据错误' |
| | | }; |
| | | var errorFields = Object.keys(errorNames); |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#basDevpErrorLog', |
| | |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'devNo', align: 'center',title: '输送编号'} |
| | | ,{field: 'passTimeOut', align: 'center',title: '物体进/出超时'} |
| | | ,{field: 'objectNoIdError', align: 'center',title: '有物体无数据'} |
| | | ,{field: 'idNoObjectError', align: 'center',title: '有数据无物体'} |
| | | ,{field: 'lmfrError', align: 'center',title: '线体电机热继报警'} |
| | | ,{field: 'liftError', align: 'center',title: '顶升报警'} |
| | | ,{field: 'dlfrError', align: 'center',title: '顶升电机热继报警'} |
| | | ,{field: 'dmfrError', align: 'center',title: '顶升横移电机热继报警'} |
| | | ,{field: 'vfdError', align: 'center',title: '变频故障'} |
| | | ,{field: 'srvError', align: 'center',title: '伺服故障'} |
| | | ,{field: 'res1', align: 'center',title: '预留1',hide:true} |
| | | ,{field: 'res2', align: 'center',title: '预留2',hide:true} |
| | | ,{field: 'res3', align: 'center',title: '预留3',hide:true} |
| | | ,{field: 'communicationTimeOut', align: 'center',title: '与上位机通讯超时'} |
| | | ,{field: 'parameterIncompleteError', align: 'center',title: '信息参数不全'} |
| | | ,{field: 'dataNotClear', align: 'center',title: '信息数据未清除'} |
| | | ,{field: 'setParameterError', align: 'center',title: '参数设置报警'} |
| | | ,{field: 'createTime$', align: 'center',title: '创建时间'} |
| | | // ,{field: 'inEnable', align: 'center',title: '',hide:true} |
| | | // ,{field: 'outEnable', align: 'center',title: '',hide:true} |
| | | ,{field: 'dataError', align: 'center',title: '数据错误'} |
| | | // ,{field: 'id', align: 'center',title: '',hide:true} |
| | | ,{field: 'sensorGArrive', align: 'center',title: '直线光电',hide:true} |
| | | ,{field: 'sensorGDec', align: 'center',title: '减速光电',hide:true} |
| | | ,{field: 'sensorGArrive2', align: 'center',title: '直线凸出',hide:true} |
| | | ,{field: 'sensorLimit', align: 'center',title: '限位保护光电',hide:true} |
| | | ,{field: 'emergency', align: 'center',title: '急停',hide:true} |
| | | ,{field: 'sensorGLeave', align: 'center',title: '光电离开1',hide:true} |
| | | ,{field: 'sensorGLeave2', align: 'center',title: '光电离开2',hide:true} |
| | | ,{field: 'sensorCUp', align: 'center',title: '顶升上升',hide:true} |
| | | ,{field: 'sensorCDown', align: 'center',title: '顶升下降',hide:true} |
| | | ,{field: 'liftMotorFr', align: 'center',title: '顶升热继',hide:true} |
| | | ,{field: 'lineMotorFr', align: 'center',title: '直线热继',hide:true} |
| | | ,{field: 'tranMotorFr', align: 'center',title: '移栽热继',hide:true} |
| | | ,{field: 'rst1', align: 'center',title: '备用1',hide:true} |
| | | ,{field: 'rst2', align: 'center',title: '备用2',hide:true} |
| | | ,{field: 'rst3', align: 'center',title: '备用3',hide:true} |
| | | ,{field: 'rst4', align: 'center',title: '备用4',hide:true} |
| | | ,{field: 'sensorArriveD', align: 'center',title: '直行方向到位',hide:true} |
| | | ,{field: 'sensorDecD', align: 'center',title: '直行方向减速',hide:true} |
| | | ,{field: 'sensorArriveL', align: 'center',title: '左移方向到位',hide:true} |
| | | ,{field: 'sensorDecL', align: 'center',title: '左移方向减速',hide:true} |
| | | ,{field: 'sensorArriveR', align: 'center',title: '右移方向到位',hide:true} |
| | | ,{field: 'sensorDecR', align: 'center',title: '右移方向减速',hide:true} |
| | | |
| | | // ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | {field: 'devNo', align: 'center', title: '输送编号'}, |
| | | {field: 'errors', align: 'center', title: '异常项', |
| | | templet: function(d){ |
| | | return errorFields.filter(f => d[f] === 'Y').map(f => errorNames[f]).join(', '); |
| | | } |
| | | }, |
| | | {field: 'createTime$', align: 'center', title: '发生时间'}, |
| | | {fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | limit(); |
| | | limit && limit(); |
| | | } |
| | | }); |
| | | |
| | |
| | | showEditModel(); |
| | | break; |
| | | case 'deleteData': |
| | | if (checkStatus.length === 0) { |
| | | layer.msg('请选择要删除的数据', {icon: 2}); |
| | | return; |
| | | } |
| | | del(checkStatus.map(function (d) { |
| | | return d.id; |
| | | })); |
| | | break; |
| | | if (checkStatus.length === 0) { |
| | | layer.msg('请选择要删除的数据', {icon: 2}); |
| | | return; |
| | | } |
| | | del(checkStatus.map(function (d) { return d.id; })); |
| | | break; |
| | | case 'exportData': |
| | | admin.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var titles=['输送编号','异常项','创建时间']; |
| | | var fields=['devNo','errors','createTime$']; |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'basDevpErrorLog': exportData, |
| | | 'fields': fields |
| | | }; |
| | | var param = {'basDevpErrorLog': exportData, 'fields': fields}; |
| | | $.ajax({ |
| | | url: baseUrl+"/basDevpErrorLog/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | |
| | | table.on('tool(basDevpErrorLog)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'detlShow': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '异常明细', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: true, |
| | | content: 'logDetl.html', |
| | | success: function(layero, index){ |
| | | var iframeWin = window[layero.find('iframe')[0]['name']]; |
| | | iframeWin.setCreateTime(data.createTime$); |
| | | iframeWin.setUuid(data.id); |
| | | console.log(data.id); |
| | | } |
| | | }); |
| | | break; |
| | | case 'edit': |
| | | showEditModel(data); |
| | | break; |
| | |
| | | |
| | | /* 删除 */ |
| | | function del(ids) { |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.confirm('确定要删除选中数据吗?', {skin: 'layui-layer-admin', shade: .1}, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | |
| | | function layDateRender(data) { |
| | | setTimeout(function () { |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | elem: '.layui-laydate-range', |
| | | type: 'datetime', |
| | | range: true |
| | | }); |
| | | layDate.render({ |
| | | elem: '#createTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['createTime\\$']:null |
| | | value: data!==undefined?data['createTime$']:null |
| | | }); |
| | | |
| | | }, 300); |
| | | } |
| | | layDateRender(); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: pageCurr} |
| | | }); |
| | | }); |
| | | } |
| | |
| | | var form = layui.form; |
| | | var admin = layui.admin; |
| | | |
| | | // 异常项映射 |
| | | var errorNames = { |
| | | emergencyStop: '急停触发', |
| | | slot1EmptyNoData: '1号位有物无资料', |
| | | slot2EmptyNoData: '2号位有物无资料', |
| | | commandErrorChainConflict: '命令错误走链条冲突', |
| | | targetPositionIssue: '目标位下发错误', |
| | | travelInverterError: '走行变频器异常', |
| | | photoelectric1Error: '1号光电异常', |
| | | photoelectric2Error: '2号光电异常', |
| | | timeoutConnectionWithLine: '与输线时接超时', |
| | | leftRollerTimeout: '左侧滚筒运行超时', |
| | | rightRollerTimeout: '右侧滚筒运行超时', |
| | | rgvRunTimeout: 'rgv运行超时', |
| | | position1ChainInverterError: '1号工位链条变频器异常', |
| | | position2ChainInverterError: '2号工位链条变频器异常', |
| | | frontRearLimit: '前后极限位' |
| | | // 其他隐藏列可以按需加入 |
| | | }; |
| | | var errorFields = Object.keys(errorNames); |
| | | |
| | | // 数据渲染 |
| | | tableIns = table.render({ |
| | | elem: '#basRgvErrorLog', |
| | |
| | | cellMinWidth: 50, |
| | | height: 'full-120', |
| | | cols: [[ |
| | | {type: 'checkbox'} |
| | | ,{field: 'rgvNo', align: 'center',title: '编号'} |
| | | ,{field: 'emergencyStop', align: 'center',title: '急停触发'} |
| | | ,{field: 'slot1EmptyNoData', align: 'center',title: '1号位有物无资料'} |
| | | ,{field: 'slot2EmptyNoData', align: 'center',title: '2号位有物无资料'} |
| | | ,{field: 'commandErrorChainConflict', align: 'center',title: '命令错误走链条冲突'} |
| | | ,{field: 'targetPositionIssue', align: 'center',title: '目标位下发错误'} |
| | | ,{field: 'travelInverterError', align: 'center',title: '走行变频器异常'} |
| | | ,{field: 'photoelectric1Error', align: 'center',title: '1号光电异常'} |
| | | ,{field: 'photoelectric2Error', align: 'center',title: '2号光电异常'} |
| | | ,{field: 'timeoutConnectionWithLine', align: 'center',title: '与输线时接超时'} |
| | | ,{field: 'leftRollerTimeout', align: 'center',title: '左侧滚筒运行超时'} |
| | | ,{field: 'rightRollerTimeout', align: 'center',title: '右侧滚筒运行超时'} |
| | | ,{field: 'rgvRunTimeout', align: 'center',title: 'rgv运行超时'} |
| | | ,{field: 'position1ChainInverterError', align: 'center',title: '1号工位链条变频器异常'} |
| | | ,{field: 'position2ChainInverterError', align: 'center',title: '2号工位链条变频器异常'} |
| | | ,{field: 'frontRearLimit', align: 'center',title: '前后极限位'} |
| | | ,{field: 'emergencyButton', align: 'center',title: '急停按钮',hide:true} |
| | | ,{field: 'forwardButton', align: 'center',title: '急停按钮',hide:true} |
| | | ,{field: 'reverseButton', align: 'center',title: '后退按钮',hide:true} |
| | | ,{field: 'localRemote', align: 'center',title: '本地/远程',hide:true} |
| | | // ,{field: 'id', align: 'center',title: ''} |
| | | ,{field: 'reset', align: 'center',title: '复位',hide:true} |
| | | ,{field: 'travelBrakeSwitch', align: 'center',title: '走行抱闸开关钮',hide:true} |
| | | ,{field: 'travelSpeedLimitPhotoelectric', align: 'center',title: '走行强制减速光电'} |
| | | ,{field: 'leftOverlimit1', align: 'center',title: '左超限 1'} |
| | | ,{field: 'rightOverlimit1', align: 'center',title: '右超限 1'} |
| | | ,{field: 'leftAtPosition1', align: 'center',title: '左到位 1',hide:true} |
| | | ,{field: 'rightAtPosition1', align: 'center',title: '右到位 1',hide:true} |
| | | ,{field: 'chainForward1', align: 'center',title: '链条前进 1',hide:true} |
| | | ,{field: 'chainReverse1', align: 'center',title: '链条后退 1',hide:true} |
| | | ,{field: 'inverterAlarm', align: 'center',title: '变频器报警'} |
| | | ,{field: 'leftOverlimit2', align: 'center',title: '左超限 2'} |
| | | ,{field: 'rightOverlimit2', align: 'center',title: '右超限 2'} |
| | | ,{field: 'leftAtPosition2', align: 'center',title: '左到位 2',hide:true} |
| | | ,{field: 'rightAtPosition2', align: 'center',title: '右到位 2',hide:true} |
| | | ,{field: 'cargoSpeedReduction', align: 'center',title: '货物减速',hide:true} |
| | | ,{field: 'conveyorInverterAlarm2', align: 'center',title: '输送变频器报警 2',hide:true} |
| | | ,{field: 'leftConveyor2', align: 'center',title: '左输送 2',hide:true} |
| | | ,{field: 'rightConveyor2', align: 'center',title: '右输送 2',hide:true} |
| | | ,{field: 'createTime$', align: 'center',title: '创建时间'} |
| | | |
| | | // ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | {type: 'checkbox'}, |
| | | {field: 'rgvNo', align: 'center', title: '编号'}, |
| | | {field: 'errors', align: 'center', title: '异常项', |
| | | templet: function(d){ |
| | | return errorFields.filter(f => d[f] === 'Y').map(f => errorNames[f]).join(', '); |
| | | } |
| | | }, |
| | | {field: 'createTime$', align: 'center', title: '创建时间'}, |
| | | {fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | | pageCurr=curr; |
| | | pageCurr = curr; |
| | | limit(); |
| | | } |
| | | }); |
| | |
| | | showEditModel(); |
| | | break; |
| | | case 'deleteData': |
| | | if (checkStatus.length === 0) { |
| | | layer.msg('请选择要删除的数据', {icon: 2}); |
| | | return; |
| | | } |
| | | del(checkStatus.map(function (d) { |
| | | return d.id; |
| | | })); |
| | | break; |
| | | if (checkStatus.length === 0) { |
| | | layer.msg('请选择要删除的数据', {icon: 2}); |
| | | return; |
| | | } |
| | | del(checkStatus.map(function (d) { return d.id; })); |
| | | break; |
| | | case 'exportData': |
| | | admin.confirm('确定导出Excel吗', {shadeClose: true}, function(){ |
| | | var titles=[]; |
| | | var fields=[]; |
| | | obj.config.cols[0].map(function (col) { |
| | | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { |
| | | titles.push(col.title); |
| | | fields.push(col.field); |
| | | } |
| | | }); |
| | | var titles=['编号','异常项','创建时间']; |
| | | var fields=['rgvNo','errors','createTime$']; |
| | | var exportData = {}; |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | exportData[this.name] = this.value; |
| | | }); |
| | | var param = { |
| | | 'basRgvErrorLog': exportData, |
| | | 'fields': fields |
| | | }; |
| | | var param = {'basRgvErrorLog': exportData, 'fields': fields}; |
| | | $.ajax({ |
| | | url: baseUrl+"/basRgvErrorLog/export/auth", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | |
| | | table.on('tool(basRgvErrorLog)', function(obj){ |
| | | var data = obj.data; |
| | | switch (obj.event) { |
| | | case 'detlShow': |
| | | layer.open({ |
| | | type: 2, |
| | | title: '异常明细', |
| | | maxmin: true, |
| | | area: [top.detailWidth, top.detailHeight], |
| | | shadeClose: true, |
| | | content: 'logDetl.html', |
| | | success: function(layero, index){ |
| | | var iframeWin = window[layero.find('iframe')[0]['name']]; |
| | | iframeWin.setCreateTime(data.createTime$); |
| | | iframeWin.setUuid(data.id); |
| | | console.log(data.id); |
| | | } |
| | | }); |
| | | break; |
| | | case 'edit': |
| | | showEditModel(data); |
| | | break; |
| | |
| | | } |
| | | }); |
| | | |
| | | /* 弹窗 - 新增、修改 */ |
| | | function showEditModel(mData) { |
| | | admin.open({ |
| | | type: 1, |
| | |
| | | }); |
| | | } |
| | | |
| | | /* 删除 */ |
| | | function del(ids) { |
| | | layer.confirm('确定要删除选中数据吗?', { |
| | | skin: 'layui-layer-admin', |
| | | shade: .1 |
| | | }, function (i) { |
| | | layer.confirm('确定要删除选中数据吗?', {skin: 'layui-layer-admin', shade: .1}, function (i) { |
| | | layer.close(i); |
| | | var loadIndex = layer.load(2); |
| | | $.ajax({ |
| | |
| | | }); |
| | | } |
| | | |
| | | // 搜索 |
| | | form.on('submit(search)', function (data) { |
| | | pageCurr = 1; |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 重置 |
| | | form.on('submit(reset)', function (data) { |
| | | pageCurr = 1; |
| | | clearFormVal($('#search-box')); |
| | | tableReload(false); |
| | | }); |
| | | |
| | | // 时间选择器 |
| | | function layDateRender(data) { |
| | | setTimeout(function () { |
| | | layDate.render({ |
| | | elem: '.layui-laydate-range' |
| | | ,type: 'datetime' |
| | | ,range: true |
| | | }); |
| | | layDate.render({ |
| | | elem: '#createTime\\$', |
| | | type: 'datetime', |
| | | value: data!==undefined?data['createTime\\$']:null |
| | | }); |
| | | |
| | | layDate.render({elem: '.layui-laydate-range', type: 'datetime', range: true}); |
| | | layDate.render({elem: '#createTime\\$', type: 'datetime', value: data!==undefined?data['createTime$']:null}); |
| | | }, 300); |
| | | } |
| | | layDateRender(); |
| | | |
| | | }); |
| | | |
| | | // 关闭动作 |
| | | $(document).on('click','#data-detail-close', function () { |
| | | parent.layer.closeAll(); |
| | | }); |
| | |
| | | $.each($('#search-box [name]').serializeArray(), function() { |
| | | searchData[this.name] = this.value; |
| | | }); |
| | | tableIns.reload({ |
| | | where: searchData, |
| | | page: {curr: pageCurr} |
| | | }); |
| | | tableIns.reload({where: searchData, page: {curr: pageCurr}}); |
| | | } |
| | |
| | | */ |
| | | function autoLoad(val) { |
| | | var inputDomVal = document.querySelector("input[data-key="+val+"]").value; |
| | | var selectDom = document.querySelector("select[data-key="+val+"Select]"); |
| | | var selectDom = document.querySelector("select[data-key=\""+val+"Select\"]"); |
| | | selectDom.length = 0; |
| | | var defaultOption = new Option("取消选择", ""); |
| | | defaultOption.title = ""; |
| | |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a> |
| | | <a class="layui-btn layui-btn-xs btn-detlShow" lay-event="detlShow">明细</a> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basDevpErrorLog/basDevpErrorLog.js" charset="utf-8"></script> |
| | | </body> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | | <form id="detail" lay-filter="detail" class="layui-form admin-form model-form"> |
| | | <input name="id" type="hidden"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">输送编号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="devNo" placeholder="请输入输送编号"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">物体进/出超时: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="passTimeOut" placeholder="请输入物体进/出超时"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">有物体无数据: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="objectNoIdError" placeholder="请输入有物体无数据"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">有数据无物体: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="idNoObjectError" placeholder="请输入有数据无物体"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">线体电机热继报警: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="lmfrError" placeholder="请输入线体电机热继报警"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">顶升报警: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="liftError" placeholder="请输入顶升报警"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">顶升电机热继报警: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="dlfrError" placeholder="请输入顶升电机热继报警"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">顶升横移电机热继报警: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="dmfrError" placeholder="请输入顶升横移电机热继报警"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">变频故障: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="vfdError" placeholder="请输入变频故障"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">伺服故障: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="srvError" placeholder="请输入伺服故障"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">预留1: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="res1" placeholder="请输入预留1"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">预留2: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="res2" placeholder="请输入预留2"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">预留3: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="res3" placeholder="请输入预留3"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">与上位机通讯超时: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="communicationTimeOut" placeholder="请输入与上位机通讯超时"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">信息参数不全: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="parameterIncompleteError" placeholder="请输入信息参数不全"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">信息数据未清除: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="dataNotClear" placeholder="请输入信息数据未清除"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">参数设置报警: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="setParameterError" placeholder="请输入参数设置报警"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">创建时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="createTime" id="createTime$" placeholder="请输入创建时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="inEnable" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="outEnable" placeholder="请输入"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">数据错误: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="dataError" placeholder="请输入数据错误"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">直线光电: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="sensorGArrive" placeholder="请输入直线光电"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">减速光电: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="sensorGDec" placeholder="请输入减速光电"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">直线凸出: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="sensorGArrive2" placeholder="请输入直线凸出"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">限位保护光电: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="sensorLimit" placeholder="请输入限位保护光电"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">急停: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="emergency" placeholder="请输入急停"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">光电离开1: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="sensorGLeave" placeholder="请输入光电离开1"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">光电离开2: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="sensorGLeave2" placeholder="请输入光电离开2"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">顶升上升: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="sensorCUp" placeholder="请输入顶升上升"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">顶升下降: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="sensorCDown" placeholder="请输入顶升下降"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">顶升热继: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="liftMotorFr" placeholder="请输入顶升热继"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">直线热继: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="lineMotorFr" placeholder="请输入直线热继"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">移栽热继: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="tranMotorFr" placeholder="请输入移栽热继"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">备用1: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="rst1" placeholder="请输入备用1"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">备用2: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="rst2" placeholder="请输入备用2"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">备用3: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="rst3" placeholder="请输入备用3"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">备用4: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="rst4" placeholder="请输入备用4"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">直行方向到位: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="sensorArriveD" placeholder="请输入直行方向到位"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">直行方向减速: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="sensorDecD" placeholder="请输入直行方向减速"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">左移方向到位: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="sensorArriveL" placeholder="请输入左移方向到位"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">左移方向减速: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="sensorDecL" placeholder="请输入左移方向减速"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">右移方向到位: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="sensorArriveR" placeholder="请输入右移方向到位"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">右移方向减速: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="sensorDecR" placeholder="请输入右移方向减速"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <hr class="layui-bg-gray"> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn" lay-filter="editSubmit" lay-submit="">保存</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | </html> |
| | | |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title>输送线异常</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | <style> |
| | | body { |
| | | background: #f5f7fa; |
| | | font-family: "Microsoft YaHei", sans-serif; |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | |
| | | /* 顶部时间区域 */ |
| | | .layui-inline { |
| | | background: #fff; |
| | | padding: 16px 20px; |
| | | border-radius: 10px; |
| | | box-shadow: 0 3px 12px rgba(0,0,0,0.06); |
| | | margin: 20px 0 0 20px; |
| | | display: inline-flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .layui-form-label { |
| | | font-weight: bold; |
| | | } |
| | | |
| | | /* 整体容器 */ |
| | | #logContainer { |
| | | display: flex; |
| | | width: 100%; |
| | | margin-top: 20px; |
| | | height: 600px; |
| | | overflow-y: auto; |
| | | background: #fff; |
| | | border-radius: 12px; |
| | | box-shadow: 0 4px 18px rgba(0,0,0,0.08); |
| | | padding: 20px; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | /* 左右列 */ |
| | | .log-column { |
| | | flex: 1; |
| | | padding: 10px 20px; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .log-column.left { |
| | | border-right: 1px solid #e5e5e5; |
| | | } |
| | | |
| | | /* 列标题 */ |
| | | .column-title { |
| | | text-align: center; |
| | | font-size: 20px; |
| | | font-weight: bold; |
| | | margin-bottom: 18px; |
| | | padding-bottom: 10px; |
| | | border-bottom: 2px solid #eee; |
| | | } |
| | | |
| | | .title-red { color: #e74c3c; } |
| | | .title-green { color: #27ae60; } |
| | | |
| | | ul li { |
| | | display: inline-block; /* 改成行内块,自适应宽度 */ |
| | | margin: 6px 6px 6px 0; /* 卡片间距 */ |
| | | padding: 8px 12px; /* 内边距 */ |
| | | border-radius: 10px; |
| | | font-size: 14px; |
| | | box-shadow: 0 2px 6px rgba(0,0,0,0.08); |
| | | transition: all 0.2s; |
| | | white-space: nowrap; /* 防止文字换行,卡片宽度自适应内容 */ |
| | | } |
| | | |
| | | ul li:hover { |
| | | transform: translateY(-2px); |
| | | box-shadow: 0 4px 12px rgba(0,0,0,0.12); |
| | | cursor: default; |
| | | } |
| | | |
| | | /* 异常项 */ |
| | | .error-item { |
| | | color: #c0392b; |
| | | background: #fdecea; |
| | | border: 1px solid #f5c5c5; |
| | | } |
| | | |
| | | /* 正常项 */ |
| | | .normal-item { |
| | | color: #1e8449; |
| | | background: #eafaf1; |
| | | border: 1px solid #c7e6d1; |
| | | } |
| | | |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">发生时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="createTime" class="layui-input" type="text" disabled="disabled"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="logContainer"> |
| | | <!-- 异常列 --> |
| | | <div class="log-column left"> |
| | | <h3 class="column-title title-red">异常项(Y)</h3> |
| | | <ul id="errorList"></ul> |
| | | </div> |
| | | |
| | | <!-- 正常列 --> |
| | | <div class="log-column"> |
| | | <h3 class="column-title title-green">无异常项(N)</h3> |
| | | <ul id="normalList"></ul> |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript"> |
| | | var parentUuid; |
| | | |
| | | /** 列结构 */ |
| | | function getCol() { |
| | | return [ |
| | | ,{field: 'devNo', align: 'center',title: '输送编号'} |
| | | ,{field: 'passTimeOut', align: 'center',title: '物体进/出超时'} |
| | | ,{field: 'objectNoIdError', align: 'center',title: '有物体无数据'} |
| | | ,{field: 'idNoObjectError', align: 'center',title: '有数据无物体'} |
| | | ,{field: 'lmfrError', align: 'center',title: '线体电机热继报警'} |
| | | ,{field: 'liftError', align: 'center',title: '顶升报警'} |
| | | ,{field: 'dlfrError', align: 'center',title: '顶升电机热继报警'} |
| | | ,{field: 'dmfrError', align: 'center',title: '顶升横移电机热继报警'} |
| | | ,{field: 'vfdError', align: 'center',title: '变频故障'} |
| | | ,{field: 'srvError', align: 'center',title: '伺服故障'} |
| | | ,{field: 'res1', align: 'center',title: '预留1',hide:true} |
| | | ,{field: 'res2', align: 'center',title: '预留2',hide:true} |
| | | ,{field: 'res3', align: 'center',title: '预留3',hide:true} |
| | | ,{field: 'communicationTimeOut', align: 'center',title: '与上位机通讯超时'} |
| | | ,{field: 'parameterIncompleteError', align: 'center',title: '信息参数不全'} |
| | | ,{field: 'dataNotClear', align: 'center',title: '信息数据未清除'} |
| | | ,{field: 'setParameterError', align: 'center',title: '参数设置报警'} |
| | | ,{field: 'createTime$', align: 'center',title: '创建时间'} |
| | | // ,{field: 'inEnable', align: 'center',title: '',hide:true} |
| | | // ,{field: 'outEnable', align: 'center',title: '',hide:true} |
| | | ,{field: 'dataError', align: 'center',title: '数据错误'} |
| | | // ,{field: 'id', align: 'center',title: '',hide:true} |
| | | ,{field: 'sensorGArrive', align: 'center',title: '直线光电'} |
| | | ,{field: 'sensorGDec', align: 'center',title: '减速光电'} |
| | | ,{field: 'sensorGArrive2', align: 'center',title: '直线凸出'} |
| | | ,{field: 'sensorLimit', align: 'center',title: '限位保护光电'} |
| | | ,{field: 'emergency', align: 'center',title: '急停'} |
| | | ,{field: 'sensorGLeave', align: 'center',title: '光电离开1'} |
| | | ,{field: 'sensorGLeave2', align: 'center',title: '光电离开2'} |
| | | ,{field: 'sensorCUp', align: 'center',title: '顶升上升'} |
| | | ,{field: 'sensorCDown', align: 'center',title: '顶升下降'} |
| | | ,{field: 'liftMotorFr', align: 'center',title: '顶升热继'} |
| | | ,{field: 'lineMotorFr', align: 'center',title: '直线热继'} |
| | | ,{field: 'tranMotorFr', align: 'center',title: '移栽热继'} |
| | | ,{field: 'rst1', align: 'center',title: '备用1',hide:true} |
| | | ,{field: 'rst2', align: 'center',title: '备用2',hide:true} |
| | | ,{field: 'rst3', align: 'center',title: '备用3',hide:true} |
| | | ,{field: 'rst4', align: 'center',title: '备用4',hide:true} |
| | | ,{field: 'sensorArriveD', align: 'center',title: '直行方向到位',} |
| | | ,{field: 'sensorDecD', align: 'center',title: '直行方向减速',} |
| | | ,{field: 'sensorArriveL', align: 'center',title: '左移方向到位',} |
| | | ,{field: 'sensorDecL', align: 'center',title: '左移方向减速',} |
| | | ,{field: 'sensorArriveR', align: 'center',title: '右移方向到位',} |
| | | ,{field: 'sensorDecR', align: 'center',title: '右移方向减速',} |
| | | ]; |
| | | } |
| | | |
| | | /** 格式化时间 */ |
| | | function formatDateTime(isoString) { |
| | | const date = new Date(isoString); |
| | | const y = date.getFullYear(); |
| | | const m = String(date.getMonth() + 1).padStart(2, '0'); |
| | | const d = String(date.getDate()).padStart(2, '0'); |
| | | const hh = String(date.getHours()).padStart(2, '0'); |
| | | const mm = String(date.getMinutes()).padStart(2, '0'); |
| | | const ss = String(date.getSeconds()).padStart(2, '0'); |
| | | return `${y}-${m}-${d} ${hh}:${mm}:${ss}`; |
| | | } |
| | | |
| | | /** 渲染双列卡片列表 */ |
| | | function renderList(data) { |
| | | const cols = getCol(); |
| | | $("#errorList").empty(); |
| | | $("#normalList").empty(); |
| | | cols.forEach(col => { |
| | | const field = col.field; |
| | | const title = col.title; |
| | | if (data[field] === "Y") { |
| | | $("#errorList").append(`<li class="error-item">${title}</li>`); |
| | | } else if (data[field] === "N") { |
| | | $("#normalList").append(`<li class="normal-item">${title}</li>`); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** 查询后端数据 */ |
| | | function renderTable() { |
| | | if (!parentUuid) return; |
| | | $.ajax({ |
| | | url: baseUrl + '/basDevpErrorLog/listByUuid/auth', |
| | | method: 'GET', |
| | | headers: { token: localStorage.getItem('token') }, |
| | | data: { uuid: parentUuid, curr: 1, limit: 1 }, |
| | | success: function(res) { |
| | | if (res.code !== 200) return; |
| | | const record = res.data.records[0]; |
| | | if (record) renderList(record); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** 父页面调用 */ |
| | | function setUuid(uuid){ |
| | | parentUuid = uuid; |
| | | renderTable(); |
| | | } |
| | | |
| | | function setCreateTime(value){ |
| | | $('#createTime').val(formatDateTime(value)); |
| | | } |
| | | </script> |
| | | </body> |
| | | </html> |
| | |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title></title> |
| | | <title>堆垛机异常</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | <style> |
| | | body { |
| | | background: #f5f7fa; |
| | | font-family: "Microsoft YaHei", sans-serif; |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | |
| | | /* 顶部时间区域 */ |
| | | .layui-inline { |
| | | background: #fff; |
| | | padding: 16px 20px; |
| | | border-radius: 10px; |
| | | box-shadow: 0 3px 12px rgba(0,0,0,0.06); |
| | | margin: 20px 0 0 20px; |
| | | display: inline-flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .layui-form-label { |
| | | font-weight: bold; |
| | | } |
| | | |
| | | /* 整体容器 */ |
| | | #logContainer { |
| | | display: flex; |
| | | width: 100%; |
| | | margin-top: 20px; |
| | | height: 600px; |
| | | overflow-y: auto; |
| | | background: #fff; |
| | | border-radius: 12px; |
| | | box-shadow: 0 4px 18px rgba(0,0,0,0.08); |
| | | padding: 20px; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | /* 左右列 */ |
| | | .log-column { |
| | | flex: 1; |
| | | padding: 10px 20px; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .log-column.left { |
| | | border-right: 1px solid #e5e5e5; |
| | | } |
| | | |
| | | /* 列标题 */ |
| | | .column-title { |
| | | text-align: center; |
| | | font-size: 20px; |
| | | font-weight: bold; |
| | | margin-bottom: 18px; |
| | | padding-bottom: 10px; |
| | | border-bottom: 2px solid #eee; |
| | | } |
| | | |
| | | .title-red { color: #e74c3c; } |
| | | .title-green { color: #27ae60; } |
| | | |
| | | ul li { |
| | | display: inline-block; /* 改成行内块,自适应宽度 */ |
| | | margin: 6px 6px 6px 0; /* 卡片间距 */ |
| | | padding: 8px 12px; /* 内边距 */ |
| | | border-radius: 10px; |
| | | font-size: 14px; |
| | | box-shadow: 0 2px 6px rgba(0,0,0,0.08); |
| | | transition: all 0.2s; |
| | | white-space: nowrap; /* 防止文字换行,卡片宽度自适应内容 */ |
| | | } |
| | | |
| | | ul li:hover { |
| | | transform: translateY(-2px); |
| | | box-shadow: 0 4px 12px rgba(0,0,0,0.12); |
| | | cursor: default; |
| | | } |
| | | |
| | | /* 异常项 */ |
| | | .error-item { |
| | | color: #c0392b; |
| | | background: #fdecea; |
| | | border: 1px solid #f5c5c5; |
| | | } |
| | | |
| | | /* 正常项 */ |
| | | .normal-item { |
| | | color: #1e8449; |
| | | background: #eafaf1; |
| | | border: 1px solid #c7e6d1; |
| | | } |
| | | |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div class="layui-inline" style="width:31%;margin-top: 20px"> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">发生时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="createTime" class="layui-input" type="text" disabled="disabled"> |
| | | </div> |
| | | </div> |
| | | <table class="layui-hide" id="logDetlByTime" lay-filter="logDetlByTime"></table> |
| | | </body> |
| | | |
| | | <div id="logContainer"> |
| | | <!-- 异常列 --> |
| | | <div class="log-column left"> |
| | | <h3 class="column-title title-red">异常项(Y)</h3> |
| | | <ul id="errorList"></ul> |
| | | </div> |
| | | |
| | | <!-- 正常列 --> |
| | | <div class="log-column"> |
| | | <h3 class="column-title title-green">无异常项(N)</h3> |
| | | <ul id="normalList"></ul> |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/locMast/locMast.js" charset="utf-8"></script> |
| | | <script type="text/javascript"> |
| | | var tableIns1; // 全局变量 |
| | | var pageCur; |
| | | var parentUuid; |
| | | |
| | | /** 列结构 */ |
| | | function getCol() { |
| | | var cols = [ |
| | | {field: 'crnNo', align: 'center',title: '编号'} |
| | | ,{field: 'ibDriveFault', align: 'center',title: '行走变频器故障'} |
| | | ,{field: 'ibSupplyFault', align: 'center',title: '提共变频器故障'} |
| | | ,{field: 'ibForkDriveFault', align: 'center',title: '货叉变频器故障'} |
| | | ,{field: 'ibDriveCircuitFault', align: 'center',title: '行走断路器故障'} |
| | | ,{field: 'ibLiftCircuitFault', align: 'center',title: '提升断路器故障'} |
| | | ,{field: 'ibForkCircuitFault', align: 'center',title: '货叉断路器故障'} |
| | | ,{field: 'ibForwardLimit', align: 'center',title: '前进限位',hide:true} |
| | | ,{field: 'ibReverseLimit', align: 'center',title: '后退限位',hide:true} |
| | | ,{field: 'ibDriveStart', align: 'center',title: '行走原点',hide:true} |
| | | ,{field: 'ibForwardBrakeSpeed', align: 'center',title: '前进强制低速',hide:true} |
| | | ,{field: 'ibReverseBrakeSpeed', align: 'center',title: '后退强制低速',hide:true} |
| | | ,{field: 'ibUpLimit', align: 'center',title: '上升限位',hide:true} |
| | | ,{field: 'ibDownLimit', align: 'center',title: '下限限位',hide:true} |
| | | ,{field: 'ibUpOrigin', align: 'center',title: '提升原点',hide:true} |
| | | ,{field: 'ibUpBrakeSpeed', align: 'center',title: '上升强制低速',hide:true} |
| | | ,{field: 'ibDownBrakeSpeed', align: 'center',title: '下降强制低速',hide:true} |
| | | ,{field: 'ibPlatformSignal', align: 'center',title: '载货台探货'} |
| | | ,{field: 'ibForkMidSignal', align: 'center',title: '货叉中位信号'} |
| | | ,{field: 'ibForkLeftLimit', align: 'center',title: '货叉左极限'} |
| | | // ,{field: 'id', align: 'center',title: ''} |
| | | ,{field: 'ibForkRightLimit', align: 'center',title: '货叉右极限'} |
| | | ,{field: 'ibFrontOverLimit', align: 'center',title: '前超限'} |
| | | ,{field: 'ibRearOverLimit', align: 'center',title: '后超限'} |
| | | ,{field: 'ibLeftOverLimit', align: 'center',title: '左超限'} |
| | | ,{field: 'ibRightOverLimit', align: 'center',title: '右超限'} |
| | | ,{field: 'ibHighOverLimit1', align: 'center',title: '高超限1'} |
| | | ,{field: 'ibHighOverLimit2', align: 'center',title: '高超限2'} |
| | | ,{field: 'ibHighOverLimit3', align: 'center',title: '高超限3'} |
| | | ,{field: 'ibOneExtendLeftLoad1', align: 'center',title: '一伸左侧探货1',hide:true} |
| | | ,{field: 'ibOneExtendLeftLoad2', align: 'center',title: '一伸左侧探货2',hide:true} |
| | | ,{field: 'ibOneExtendRightLoad1', align: 'center',title: '一伸右侧探货1',hide:true} |
| | | ,{field: 'ibOneExtendRightLoad2', align: 'center',title: '一伸右侧探货2',hide:true} |
| | | ,{field: 'ibTwoExtendLeftLoad1', align: 'center',title: '二伸左侧探货1',hide:true} |
| | | ,{field: 'ibTwoExtendLeftLoad2', align: 'center',title: '二伸左侧探货2',hide:true} |
| | | ,{field: 'ibTwoExtendRightLoad1', align: 'center',title: '二伸右侧探货1',hide:true} |
| | | ,{field: 'ibTwoExtendRightLoad2', align: 'center',title: '二伸右侧探货2',hide:true} |
| | | ,{field: 'ibSpeedSignal1', align: 'center',title: '超速信号1',hide:true} |
| | | ,{field: 'ibSpeedSignal2', align: 'center',title: '超速信号2',hide:true} |
| | | ,{field: 'ibOverweightSignal1', align: 'center',title: '超重信号1',hide:true} |
| | | ,{field: 'ibOverweightSignal2', align: 'center',title: '超重信号2',hide:true} |
| | | ,{field: 'ibRopeReleaseSignal1', align: 'center',title: '松绳信号1',hide:true} |
| | | ,{field: 'ibRopeReleaseSignal2', align: 'center',title: '松绳信号2',hide:true} |
| | | ,{field: 'ibSafetyClamp', align: 'center',title: '安全钳',hide:true} |
| | | ,{field: 'ibTightener', align: 'center',title: '张紧器',hide:true} |
| | | ,{field: 'ibSpeedLimiter', align: 'center',title: '限速器',hide:true} |
| | | ,{field: 'ibSafetyDoorOpen', align: 'center',title: '安全门打开',hide:true} |
| | | ,{field: 'createTime$', align: 'center',title: '创建时间'} |
| | | return [ |
| | | {field: 'crnNo', title: '编号'}, |
| | | {field: 'ibDriveFault', title: '行走变频器故障'}, |
| | | {field: 'ibSupplyFault', title: '提共变频器故障'}, |
| | | {field: 'ibForkDriveFault', title: '货叉变频器故障'}, |
| | | {field: 'ibDriveCircuitFault', title: '行走断路器故障'}, |
| | | {field: 'ibLiftCircuitFault', title: '提升断路器故障'}, |
| | | {field: 'ibForkCircuitFault', title: '货叉断路器故障'}, |
| | | {field: 'ibForwardLimit', title: '前进限位'}, |
| | | {field: 'ibReverseLimit', title: '后退限位'}, |
| | | {field: 'ibDriveStart', title: '行走原点'}, |
| | | {field: 'ibForwardBrakeSpeed', title: '前进强制低速'}, |
| | | {field: 'ibReverseBrakeSpeed', title: '后退强制低速'}, |
| | | {field: 'ibUpLimit', title: '上升限位'}, |
| | | {field: 'ibDownLimit', title: '下限限位'}, |
| | | {field: 'ibUpOrigin', title: '提升原点'}, |
| | | {field: 'ibUpBrakeSpeed', title: '上升强制低速'}, |
| | | {field: 'ibDownBrakeSpeed', title: '下降强制低速'}, |
| | | {field: 'ibPlatformSignal', title: '载货台探货'}, |
| | | {field: 'ibForkMidSignal', title: '货叉中位信号'}, |
| | | {field: 'ibForkLeftLimit', title: '货叉左极限'}, |
| | | {field: 'ibForkRightLimit', title: '货叉右极限'}, |
| | | {field: 'ibFrontOverLimit', title: '前超限'}, |
| | | {field: 'ibRearOverLimit', title: '后超限'}, |
| | | {field: 'ibLeftOverLimit', title: '左超限'}, |
| | | {field: 'ibRightOverLimit', title: '右超限'}, |
| | | {field: 'ibHighOverLimit1', title: '高超限1'}, |
| | | {field: 'ibHighOverLimit2', title: '高超限2'}, |
| | | {field: 'ibHighOverLimit3', title: '高超限3'}, |
| | | {field: 'ibOneExtendLeftLoad1', title: '一伸左侧探货1'}, |
| | | {field: 'ibOneExtendLeftLoad2', title: '一伸左侧探货2'}, |
| | | {field: 'ibOneExtendRightLoad1', title: '一伸右侧探货1'}, |
| | | {field: 'ibOneExtendRightLoad2', title: '一伸右侧探货2'}, |
| | | {field: 'ibTwoExtendLeftLoad1', title: '二伸左侧探货1'}, |
| | | {field: 'ibTwoExtendLeftLoad2', title: '二伸左侧探货2'}, |
| | | {field: 'ibTwoExtendRightLoad1', title: '二伸右侧探货1'}, |
| | | {field: 'ibTwoExtendRightLoad2', title: '二伸右侧探货2'}, |
| | | {field: 'ibSpeedSignal1', title: '超速信号1'}, |
| | | {field: 'ibSpeedSignal2', title: '超速信号2'}, |
| | | {field: 'ibOverweightSignal1', title: '超重信号1'}, |
| | | {field: 'ibOverweightSignal2', title: '超重信号2'}, |
| | | {field: 'ibRopeReleaseSignal1', title: '松绳信号1'}, |
| | | {field: 'ibRopeReleaseSignal2', title: '松绳信号2'}, |
| | | {field: 'ibSafetyClamp', title: '安全钳'}, |
| | | {field: 'ibTightener', title: '张紧器'}, |
| | | {field: 'ibSpeedLimiter', title: '限速器'}, |
| | | {field: 'ibSafetyDoorOpen', title: '安全门打开'} |
| | | ]; |
| | | return cols; |
| | | } |
| | | // 格式化时间函数 |
| | | |
| | | /** 格式化时间 */ |
| | | function formatDateTime(isoString) { |
| | | const date = new Date(isoString); |
| | | const y = date.getFullYear(); |
| | |
| | | return `${y}-${m}-${d} ${hh}:${mm}:${ss}`; |
| | | } |
| | | |
| | | // 渲染表格函数 |
| | | function renderTable() { |
| | | if(!parentUuid) return; // 没uuid就不渲染 |
| | | |
| | | layui.use(['table','form'], function(){ |
| | | var table = layui.table; |
| | | |
| | | tableIns1 = table.render({ |
| | | elem: '#logDetlByTime', |
| | | url: baseUrl + '/basCrnErrorLog/listByUuid/auth', |
| | | headers: { token: localStorage.getItem('token') }, |
| | | where: { uuid: parentUuid }, |
| | | page: true, |
| | | limit: 16, |
| | | cols: [getCol()], |
| | | parseData: function(res){ // 转换接口返回的数据 |
| | | console.log(res); |
| | | return res; |
| | | } |
| | | }); |
| | | /** 渲染双列卡片列表 */ |
| | | function renderList(data) { |
| | | const cols = getCol(); |
| | | $("#errorList").empty(); |
| | | $("#normalList").empty(); |
| | | cols.forEach(col => { |
| | | const field = col.field; |
| | | const title = col.title; |
| | | if (data[field] === "Y") { |
| | | $("#errorList").append(`<li class="error-item">${title}</li>`); |
| | | } else if (data[field] === "N") { |
| | | $("#normalList").append(`<li class="normal-item">${title}</li>`); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // 父页面调用 setUuid 后设置 uuid 并渲染表格 |
| | | /** 查询后端数据 */ |
| | | function renderTable() { |
| | | if (!parentUuid) return; |
| | | $.ajax({ |
| | | url: baseUrl + '/basCrnErrorLog/listByUuid/auth', |
| | | method: 'GET', |
| | | headers: { token: localStorage.getItem('token') }, |
| | | data: { uuid: parentUuid, curr: 1, limit: 1 }, |
| | | success: function(res) { |
| | | if (res.code !== 200) return; |
| | | const record = res.data.records[0]; |
| | | if (record) renderList(record); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** 父页面调用 */ |
| | | function setUuid(uuid){ |
| | | parentUuid = uuid; |
| | | renderTable(); |
| | | } |
| | | |
| | | // 父页面调用 setCreateTime 设置时间显示 |
| | | function setCreateTime(value){ |
| | | $('#createTime').val(formatDateTime(value)); |
| | | } |
| | | |
| | | </script> |
| | | </body> |
| | | </html> |
| | | |
| | |
| | | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData" style="float: right">导出</button> |
| | | </div> |
| | | </script> |
| | | |
| | | <script type="text/html" id="operate"> |
| | | <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a> |
| | | <a class="layui-btn layui-btn-xs btn-detlShow" lay-event="detlShow">明细</a> |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | |
| | | <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/basRgvErrorLog/basRgvErrorLog.js" charset="utf-8"></script> |
| | | </body> |
| | | <!-- 表单弹窗 --> |
| | | <script type="text/html" id="editDialog"> |
| | | <form id="detail" lay-filter="detail" class="layui-form admin-form model-form"> |
| | | <input name="id" type="hidden"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-md12"> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">编号: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="rgvNo" placeholder="请输入编号"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">急停触发: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="emergencyStop" placeholder="请输入急停触发"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">1号位有物无资料: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="slot1EmptyNoData" placeholder="请输入1号位有物无资料"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">2号位有物无资料: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="slot2EmptyNoData" placeholder="请输入2号位有物无资料"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">命令错误走链条冲突: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="commandErrorChainConflict" placeholder="请输入命令错误走链条冲突"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">目标位下发错误: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="targetPositionIssue" placeholder="请输入目标位下发错误"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">走行变频器异常: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="travelInverterError" placeholder="请输入走行变频器异常"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">1号光电异常: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="photoelectric1Error" placeholder="请输入1号光电异常"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">2号光电异常: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="photoelectric2Error" placeholder="请输入2号光电异常"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">与输线时接超时: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="timeoutConnectionWithLine" placeholder="请输入与输线时接超时"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">左侧滚筒运行超时: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="leftRollerTimeout" placeholder="请输入左侧滚筒运行超时"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">右侧滚筒运行超时: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="rightRollerTimeout" placeholder="请输入右侧滚筒运行超时"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">rgv运行超时: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="rgvRunTimeout" placeholder="请输入rgv运行超时"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">1号工位链条变频器异常: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="position1ChainInverterError" placeholder="请输入1号工位链条变频器异常"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">2号工位链条变频器异常: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="position2ChainInverterError" placeholder="请输入2号工位链条变频器异常"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">前后极限位: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="frontRearLimit" placeholder="请输入前后极限位"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">急停按钮: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="emergencyButton" placeholder="请输入急停按钮"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">创建时间: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="createTime" id="createTime$" placeholder="请输入创建时间"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">急停按钮: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="forwardButton" placeholder="请输入急停按钮"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">后退按钮: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="reverseButton" placeholder="请输入后退按钮"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">本地/远程: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="localRemote" placeholder="请输入本地/远程"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">复位: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="reset" placeholder="请输入复位"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">走行抱闸开关钮: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="travelBrakeSwitch" placeholder="请输入走行抱闸开关钮"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">走行强制减速光电: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="travelSpeedLimitPhotoelectric" placeholder="请输入走行强制减速光电"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">左超限 1: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="leftOverlimit1" placeholder="请输入左超限 1"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">右超限 1: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="rightOverlimit1" placeholder="请输入右超限 1"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">左到位 1: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="leftAtPosition1" placeholder="请输入左到位 1"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">右到位 1: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="rightAtPosition1" placeholder="请输入右到位 1"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">链条前进 1: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="chainForward1" placeholder="请输入链条前进 1"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">链条后退 1: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="chainReverse1" placeholder="请输入链条后退 1"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">变频器报警: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="inverterAlarm" placeholder="请输入变频器报警"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">左超限 2: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="leftOverlimit2" placeholder="请输入左超限 2"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">右超限 2: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="rightOverlimit2" placeholder="请输入右超限 2"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">左到位 2: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="leftAtPosition2" placeholder="请输入左到位 2"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">右到位 2: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="rightAtPosition2" placeholder="请输入右到位 2"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">货物减速: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="cargoSpeedReduction" placeholder="请输入货物减速"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">输送变频器报警 2: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="conveyorInverterAlarm2" placeholder="请输入输送变频器报警 2"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">左输送 2: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="leftConveyor2" placeholder="请输入左输送 2"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <label class="layui-form-label">右输送 2: </label> |
| | | <div class="layui-input-block"> |
| | | <input class="layui-input" name="rightConveyor2" placeholder="请输入右输送 2"> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | <hr class="layui-bg-gray"> |
| | | <div class="layui-form-item text-right"> |
| | | <button class="layui-btn" lay-filter="editSubmit" lay-submit="">保存</button> |
| | | <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button> |
| | | </div> |
| | | </form> |
| | | </script> |
| | | </html> |
| | | |
| New file |
| | |
| | | <!DOCTYPE html> |
| | | <html lang="en"> |
| | | <head> |
| | | <meta charset="utf-8"> |
| | | <title>RGV异常</title> |
| | | <meta name="renderer" content="webkit"> |
| | | <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> |
| | | <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> |
| | | <link rel="stylesheet" href="../../static/css/common.css" media="all"> |
| | | <style> |
| | | body { |
| | | background: #f5f7fa; |
| | | font-family: "Microsoft YaHei", sans-serif; |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | |
| | | /* 顶部时间区域 */ |
| | | .layui-inline { |
| | | background: #fff; |
| | | padding: 16px 20px; |
| | | border-radius: 10px; |
| | | box-shadow: 0 3px 12px rgba(0,0,0,0.06); |
| | | margin: 20px 0 0 20px; |
| | | display: inline-flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .layui-form-label { |
| | | font-weight: bold; |
| | | } |
| | | |
| | | /* 整体容器 */ |
| | | #logContainer { |
| | | display: flex; |
| | | width: 100%; |
| | | margin-top: 20px; |
| | | height: 600px; |
| | | overflow-y: auto; |
| | | background: #fff; |
| | | border-radius: 12px; |
| | | box-shadow: 0 4px 18px rgba(0,0,0,0.08); |
| | | padding: 20px; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | /* 左右列 */ |
| | | .log-column { |
| | | flex: 1; |
| | | padding: 10px 20px; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .log-column.left { |
| | | border-right: 1px solid #e5e5e5; |
| | | } |
| | | |
| | | /* 列标题 */ |
| | | .column-title { |
| | | text-align: center; |
| | | font-size: 20px; |
| | | font-weight: bold; |
| | | margin-bottom: 18px; |
| | | padding-bottom: 10px; |
| | | border-bottom: 2px solid #eee; |
| | | } |
| | | |
| | | .title-red { color: #e74c3c; } |
| | | .title-green { color: #27ae60; } |
| | | |
| | | ul li { |
| | | display: inline-block; /* 改成行内块,自适应宽度 */ |
| | | margin: 6px 6px 6px 0; /* 卡片间距 */ |
| | | padding: 8px 12px; /* 内边距 */ |
| | | border-radius: 10px; |
| | | font-size: 14px; |
| | | box-shadow: 0 2px 6px rgba(0,0,0,0.08); |
| | | transition: all 0.2s; |
| | | white-space: nowrap; /* 防止文字换行,卡片宽度自适应内容 */ |
| | | } |
| | | |
| | | ul li:hover { |
| | | transform: translateY(-2px); |
| | | box-shadow: 0 4px 12px rgba(0,0,0,0.12); |
| | | cursor: default; |
| | | } |
| | | |
| | | /* 异常项 */ |
| | | .error-item { |
| | | color: #c0392b; |
| | | background: #fdecea; |
| | | border: 1px solid #f5c5c5; |
| | | } |
| | | |
| | | /* 正常项 */ |
| | | .normal-item { |
| | | color: #1e8449; |
| | | background: #eafaf1; |
| | | border: 1px solid #c7e6d1; |
| | | } |
| | | |
| | | </style> |
| | | </head> |
| | | <body> |
| | | <div class="layui-inline"> |
| | | <label class="layui-form-label">发生时间:</label> |
| | | <div class="layui-input-inline"> |
| | | <input id="createTime" class="layui-input" type="text" disabled="disabled"> |
| | | </div> |
| | | </div> |
| | | |
| | | <div id="logContainer"> |
| | | <!-- 异常列 --> |
| | | <div class="log-column left"> |
| | | <h3 class="column-title title-red">异常项(Y)</h3> |
| | | <ul id="errorList"></ul> |
| | | </div> |
| | | |
| | | <!-- 正常列 --> |
| | | <div class="log-column"> |
| | | <h3 class="column-title title-green">无异常项(N)</h3> |
| | | <ul id="normalList"></ul> |
| | | </div> |
| | | </div> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |
| | | <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> |
| | | <script type="text/javascript"> |
| | | var parentUuid; |
| | | |
| | | /** 列结构 */ |
| | | function getCol() { |
| | | return [ |
| | | ,{field: 'reset', align: 'center',title: '复位'} |
| | | ,{field: 'travelBrakeSwitch', align: 'center',title: '走行抱闸开关钮'} |
| | | ,{field: 'travelSpeedLimitPhotoelectric', align: 'center',title: '走行强制减速光电'} |
| | | ,{field: 'leftOverlimit1', align: 'center',title: '左超限 1'} |
| | | ,{field: 'rightOverlimit1', align: 'center',title: '右超限 1'} |
| | | ,{field: 'leftAtPosition1', align: 'center',title: '左到位 1'} |
| | | ,{field: 'rightAtPosition1', align: 'center',title: '右到位 1'} |
| | | ,{field: 'chainForward1', align: 'center',title: '链条前进 1'} |
| | | ,{field: 'chainReverse1', align: 'center',title: '链条后退 1'} |
| | | ,{field: 'inverterAlarm', align: 'center',title: '变频器报警'} |
| | | ,{field: 'leftOverlimit2', align: 'center',title: '左超限 2'} |
| | | ,{field: 'rightOverlimit2', align: 'center',title: '右超限 2'} |
| | | ,{field: 'leftAtPosition2', align: 'center',title: '左到位 2'} |
| | | ,{field: 'rightAtPosition2', align: 'center',title: '右到位 2'} |
| | | ,{field: 'cargoSpeedReduction', align: 'center',title: '货物减速'} |
| | | ,{field: 'conveyorInverterAlarm2', align: 'center',title: '输送变频器报警 2'} |
| | | ,{field: 'leftConveyor2', align: 'center',title: '左输送 2'} |
| | | ,{field: 'rightConveyor2', align: 'center',title: '右输送 2'} |
| | | ]; |
| | | } |
| | | |
| | | /** 格式化时间 */ |
| | | function formatDateTime(isoString) { |
| | | const date = new Date(isoString); |
| | | const y = date.getFullYear(); |
| | | const m = String(date.getMonth() + 1).padStart(2, '0'); |
| | | const d = String(date.getDate()).padStart(2, '0'); |
| | | const hh = String(date.getHours()).padStart(2, '0'); |
| | | const mm = String(date.getMinutes()).padStart(2, '0'); |
| | | const ss = String(date.getSeconds()).padStart(2, '0'); |
| | | return `${y}-${m}-${d} ${hh}:${mm}:${ss}`; |
| | | } |
| | | |
| | | /** 渲染双列卡片列表 */ |
| | | function renderList(data) { |
| | | const cols = getCol(); |
| | | $("#errorList").empty(); |
| | | $("#normalList").empty(); |
| | | cols.forEach(col => { |
| | | const field = col.field; |
| | | const title = col.title; |
| | | if (data[field] === "Y") { |
| | | $("#errorList").append(`<li class="error-item">${title}</li>`); |
| | | } else if (data[field] === "N") { |
| | | $("#normalList").append(`<li class="normal-item">${title}</li>`); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** 查询后端数据 */ |
| | | function renderTable() { |
| | | if (!parentUuid) return; |
| | | $.ajax({ |
| | | url: baseUrl + '/basRgvErrorLog/listByUuid/auth', |
| | | method: 'GET', |
| | | headers: { token: localStorage.getItem('token') }, |
| | | data: { uuid: parentUuid, curr: 1, limit: 1 }, |
| | | success: function(res) { |
| | | if (res.code !== 200) return; |
| | | const record = res.data.records[0]; |
| | | if (record) renderList(record); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** 父页面调用 */ |
| | | function setUuid(uuid){ |
| | | parentUuid = uuid; |
| | | renderTable(); |
| | | } |
| | | |
| | | function setCreateTime(value){ |
| | | $('#createTime').val(formatDateTime(value)); |
| | | } |
| | | </script> |
| | | </body> |
| | | </html> |