| | |
| | | margin-bottom: 5px !important; |
| | | background: #c8d1dabd; |
| | | } |
| | | .sensor-label { |
| | | .issue-label { |
| | | display: inline-block; |
| | | float: left; |
| | | font-size: 16px; |
| | |
| | | <div> |
| | | <span class="online-info">在线,可以进行远程操作</span> |
| | | <div class="cool-divider"></div> |
| | | <span class="sensor-label"></span> |
| | | <span class="issue-label"></span> |
| | | </div> |
| | | <button class="layui-btn" lay-filter="refresh" lay-submit><i class="layui-icon"></i> 刷新 </button> |
| | | </div> |
| | |
| | | success: function (res) { |
| | | notice.destroy(); |
| | | if (res.code === 200) { |
| | | var issue = res.data; |
| | | top.sensorByDetl = null; |
| | | let issue = res.data; |
| | | top.issueByDetl = null; |
| | | // 地图 |
| | | // map = new AMap.Map('map', { |
| | | // resizeEnable: true, |
| | |
| | | // }); |
| | | // marker.setMap(map); |
| | | // 设备唯一码 |
| | | $('.sensor-label').text(issue.uuid); |
| | | $('.issue-label').text(issue.uuid); |
| | | // 设备明细 |
| | | form.val('formAdvForm', issue); |
| | | // 日志表格 |
| | | initLogTable(issue.id); |
| | | // 图片 |
| | | initImgs(sensor.id, issue.imgArr); |
| | | initImgs(issue.id, issue.imgArr); |
| | | // 在线情况 |
| | | $('.online-info').attr("class", sensor.online?"online-info online-success":"online-info online-fail"); |
| | | $('.online-info').text(sensor.online?"在线,可以进行远程操作":"离线,不能进行远程操作"); |
| | | $('.online-info').attr("class", issue.online?"online-info online-success":"online-info online-fail"); |
| | | $('.online-info').text(issue.online?"已完成":"作业中"); |
| | | } else if (res.code === 403) { |
| | | top.location.href = baseUrl + "/"; |
| | | } else { |
| | |
| | | // https://gitee.com/gouguoyin/ajax-image-upload?_from=gitee_search#http://www.gouguoyin.cn/ajax-image-upload |
| | | $(".image-box").ajaxImageUpload({ |
| | | fileInput : 'file', |
| | | postUrl : baseUrl + '/sensor/upload.action', //上传的服务器地址 |
| | | postUrl : baseUrl + '/issue/upload.action', //上传的服务器地址 |
| | | width : 180, |
| | | height : 180, |
| | | imageUrl: imgArr, |
| | | postData : { sensorId: sensorId }, |
| | | postData : { issueId: issueId }, |
| | | maxNum: 5, //允许上传图片数量 |
| | | allowZoom : true, //允许放大 |
| | | maxSize : 3, //允许上传图片的最大尺寸,单位M |
| | |
| | | }, |
| | | delete : function (src) { |
| | | $.ajax({ |
| | | url: baseUrl + "/sensor/remove.action", |
| | | url: baseUrl + "/issue/remove.action", |
| | | headers: {'token': localStorage.getItem('token')}, |
| | | method: 'POST', |
| | | data: { |
| | | sensorId: sensorId, |
| | | issueId: issueId, |
| | | src: src |
| | | }, |
| | | // async: false, |