123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8"/>
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
- <title>管养问题详情</title>
- <link rel="stylesheet" href="../../../assets/libs/layui/css/layui.css"/>
- <link rel="stylesheet" href="../../../assets/module/formSelects/formSelects-v4.css"/>
- <link rel="stylesheet" href="../../../assets/module/admin.css?v=312"/>
- <link rel="stylesheet" href="../../../assets/module/uParas.css?v=312"/>
- </head>
- <body>
- <style type="text/css">
- table th {
- /*color: #ffb800;*/
- }
- </style>
- <!-- 加载动画 -->
- <div class="page-loading">
- <div class="ball-loader">
- <span></span><span></span><span></span><span></span>
- </div>
- </div>
- <!-- 正文开始 -->
- <div class="layui-fluid">
- <div class="layui-card">
- <div class="layui-card-body">
- <div class="layui-card-header">
- 管养问题详情
- <div class="layui-inline pull-right" id="_btn">
- <button id="btnPrint1" class="layui-btn layui-btn-sm layui-btn-radius layui-btn-normal">
- <i class="layui-icon"></i>打印
- </button>
- <button onclick="history.back()" class="layui-btn layui-btn-sm layui-btn-radius layui-btn-normal"><i
- class="layui-icon"></i>返回
- </button>
- </div>
- </div>
- <div class="layui-card-body" id="divTablePrint">
- <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
- <div class="layui-tab-content" style="height: auto;padding-bottom: 80px">
- <div class="layui-tab-item layui-show">
- <div class="layui-row">
- <!--<script type="text/html">-->
- <div class="layui-col-xs12">
- <div class="layui-form">
- <table class="layui-table">
- <tbody>
- <tr>
- <th width="150">管养问题名称</th>
- <td id="hiddenDangerName"></td>
- <th width="150">管养问题来源</th>
- <td id="patrolSource">
- </td>
- </tr>
- <tr>
- <th width="150">管养问题发现时间</th>
- <td id="createdTime" colspan="3"></td>
- </tr>
- <tr>
- <th width="150">管养问题描述</th>
- <td id="hiddenDangerDesc" colspan="3" height="150">
- </td>
- </tr>
- <tr>
- <th width="150">管养问题地址</th>
- <td id="address" colspan="3" height="150">
- </td>
- </tr>
- <tr class="hidden-danger-img display-none">
- <th colspan="4" style="border-bottom: 0px">管养问题现场照片
- <p id="hiddenDangerImg" class="m-top10px"></p>
- </th>
- </tr>
- <tr>
- <th width="150">巡查岗位</th>
- <td id="patrolPosition"></td>
- <th width="150">巡查人</th>
- <td id="patrolAId"></td>
- </tr>
- <tr>
- <th width="150">上报岗位</th>
- <td id="upPosition"></td>
- <th width="150">上报处理人</th>
- <td id="upAId"></td>
- </tr>
- <tr>
- <th width="150">处理方式</th>
- <td id="solveType" colspan="3"></td>
- </tr>
- <tr>
- <th width="150">解决办法</th>
- <td id="solveDesc" colspan="3" height="150">
- </td>
- </tr>
- <tr class="solve-img display-none">
- <th colspan="4" style="border-bottom: 0px">解决完成拍照
- <p id="solveImg" class="m-top10px"></p>
- </th>
- </tr>
- <tr>
- <th width="150">状态</th>
- <td id="status" colspan="3"></td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <!--// </script>-->
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <!-- js部分 -->
- <script type="text/javascript" src="../../../assets/libs/layui/layui.js"></script>
- <script type="text/javascript" src="../../../assets/js/common.js?v=312"></script>
- <script type="text/javascript" src="../../../assets/libs/ckplayer/ckplayer.js"></script>
- <script>
- var hdangerId;
- var $;
- layui.use(['layer', 'form', 'printer', 'table', 'util', 'zTree', 'admin', 'uParas', 'element', 'laytpl'], function () {
- $ = layui.jquery;
- var layer = layui.layer;
- var form = layui.form;
- var util = layui.util;
- var printer = layui.printer;
- var admin = layui.admin;
- var uParas = layui.uParas;
- var element = layui.element, laytpl = layui.laytpl;
- var patrolId = uParas.getUrlParam("patrolId");
- // 打印当前页面
- $('#btnPrint1').click(function () {
- $('#_btn').attr("style", "display:none;");
- printer.print();
- $('#_btn').attr("style", "display:block;")
- });
- admin.req(uParas.baseUrl + '/ent/plus/patrolRecord/getById?id=' + patrolId, null, function (res) {
- var {code, data} = res;
- if (code == 1) {
- $('#hiddenDangerName').html(data.hiddenDangerName);
- $('#patrolSource').html(patrolSourceFilter(data));
- $('#createdTime').html(data.createdTime);
- $('#hiddenDangerDesc').html(data.hiddenDangerDesc);
- $('#address').html(data.address);
- $('#patrolPosition').html(data.positionName);
- $('#patrolAId').html(data.accountName);
- $('#upPosition').html(data.positionUpName);
- $('#upAId').html(data.accountUpName)
- $('#solveType').html(solveTypeFilter(data));
- $('#solveDesc').html(data.solveDesc);
- $('#status').html(statusFilter(data));
- if (data.hiddenDangerImg) {
- var hdImg = data.hiddenDangerImg.split(',');
- var hiddenDangerImgHtml = '';
- hdImg.forEach(function (item, index) {
- hiddenDangerImgHtml += `<a onclick="openImage('${item}');" style="margin-right: 10px;">
- <img style="width: 280px!important;height: 300px;max-width: 300px" src="${item}">
- </a>`
- });
- $('#hiddenDangerImg').html(hiddenDangerImgHtml);
- $('.hidden-danger-img').show();
- }
- if (data.solveImg) {
- var hdImg = data.solveImg.split(',');
- var solveImgHtml = '';
- hdImg.forEach(function (item, index) {
- solveImgHtml += `<a onclick="openImage('${item}');" style="margin-right: 10px;">
- <img style="width: 280px!important;height: 300px;max-width: 300px" src="${item}">
- </a>`
- });
- $('#solveImg').html(solveImgHtml);
- $('.solve-img').show();
- }
- }
- }, 'get');
- });
- function patrolSourceFilter(d) {
- var result = "";
- // 1 自己发现 2 上报 3 分发 4不合格
- if (d.patrolSource === 1) {
- result = "自行巡检"
- } else if (d.patrolSource === 2) {
- result = "上报"
- } else if (d.patrolSource === 3) {
- result = "分发"
- } else if (d.patrolSource === 4) {
- result = "不合格"
- }
- return result;
- }
- function solveTypeFilter(d) {
- var result = "";
- // 1 自行解决 2 上报
- if (d.solveType === 1) {
- result = "自行解决"
- } else if (d.solveType === 2) {
- result = "上报"
- } else if (d.solveType === 3) {
- result = "上报解决"
- }
- return result;
- }
- function statusFilter(d) {
- var result = "";
- // 1 未解决 2 撤销 3上报 4 解决
- if (d.status === 1) {
- result = "未解决"
- } else if (d.status === 2) {
- result = "已撤销"
- } else if (d.status === 3) {
- result = "已上报"
- } else if (d.status === 4) {
- result = "已解决"
- } else if (d.status === 6) {
- result = "合格"
- }
- return result;
- }
- function videoPlayer(url) {
- layer.open({
- type: 2,
- zIndex: 1000,
- title: "视频播放",
- shadeClose: true,
- area: ['650px', '530px'],
- content: "./videoPlayer.html?ipCameraUrl=" + url,
- fixed: false
- });
- }
- function showImg(src) {
- var imgHtml = "<img src='" + src + "' width='1000px' height='650'/>";
- layer.open({
- type: 1,
- shade: 0.1,
- offset: 'auto',
- area: [1000 + 'px', 650 + 'px'], // area: [width + 'px',height+'px'] //原图显示
- shadeClose: true,
- scrollbar: false,
- title: "图片附件预览", //不显示标题
- content: imgHtml, //捕获的元素,注意:最好该指定的元素要存放在body最外层,否则可能被其它的相对元素所影响
- // cancel: function () {
- // layer.msg('捕获就是从页面已经存在的元素上,包裹layer的结构', { time: 5000, icon: 6 });
- // }
- });
- }
- </script>
- </body>
- </html>
|