Browse Source

森林管理

wangzhe 4 years ago
parent
commit
7888b765eb

+ 12 - 0
mybusiness/src/main/java/com/business/slfh/manager/stationfiremanager/controller/TResStationfireController.java

@@ -2,6 +2,7 @@ package com.business.slfh.manager.stationfiremanager.controller;
 
 import java.util.List;
 
+import com.business.slfh.manager.carmanager.domain.TResCar;
 import com.business.slfh.manager.stationfiremanager.domain.TResStationfire;
 import com.business.slfh.manager.stationfiremanager.service.ITResStationfireService;
 import com.business.slfh.tools.UUID_Tools;
@@ -117,6 +118,17 @@ public class TResStationfireController extends BaseController
     }
 
     /**
+     * 详情【请填写功能名称】
+     */
+    @GetMapping("/detail/{id}")
+    public String detail(@PathVariable("id") String id, ModelMap mmap)
+    {
+        TResStationfire tResStationfire = tResStationfireService.selectTResStationfireById(id);
+        mmap.put("tResStationfire", tResStationfire);
+        return prefix + "/detail";
+    }
+
+    /**
      * 删除【请填写功能名称】
      */
     //@RequiresPermissions("system:stationfire:remove")

+ 91 - 0
mybusiness/src/main/resources/templates/business/manager/stationfiremanager/detail.html

@@ -0,0 +1,91 @@
+<!DOCTYPE html>
+<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
+<head>
+    <th:block th:include="include :: header('查看【防火检查站管理】详情')" />
+</head>
+<body class="white-bg">
+<div class="wrapper wrapper-content animated fadeInRight ibox-content">
+    <form class="form-horizontal m" id="form-stationfire-edit" th:object="${tResStationfire}">
+        <input name="id" th:field="*{id}" type="hidden">
+        <div class="form-group">
+            <label class="col-sm-3 control-label">名称:</label>
+            <div class="col-sm-8">
+                <input name="name" th:field="*{name}" class="form-control" type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label" style="cursor: pointer" onclick="choseLatLng()">经度:</label>
+            <div class="col-sm-8">
+                <input maxlength="100" name="longitude" id="longitude" th:field="*{longitude}" class="form-control" type="text" required>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label" style="cursor: pointer" onclick="choseLatLng()">纬度:</label>
+            <div class="col-sm-8">
+                <input maxlength="100" name="latitude" id="latitude" th:field="*{latitude}" class="form-control" type="text" required>
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">地址:</label>
+            <div class="col-sm-8">
+                <input name="address" th:field="*{address}" class="form-control" type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">联系人:</label>
+            <div class="col-sm-8">
+                <input name="contactUser" th:field="*{contactUser}" class="form-control" type="text">
+            </div>
+        </div>
+        <div class="form-group">
+            <label class="col-sm-3 control-label">电话:</label>
+            <div class="col-sm-8">
+                <input name="contactPhone" th:field="*{contactPhone}" class="form-control" type="text">
+            </div>
+        </div>
+    </form>
+</div>
+<th:block th:include="include :: footer" />
+<script th:inline="javascript">
+    var prefix = ctx + "business/manager/stationfiremanager";
+    $("#form-stationfire-edit").validate({
+        focusCleanup: true,
+        rules:{
+            contactPhone:{
+                isPhone:true
+            }
+        }
+    });
+
+    function submitHandler() {
+        if ($.validate.form()) {
+            $.operate.save(prefix + "/edit", $('#form-stationfire-edit').serialize());
+        }
+    }
+
+    function choseLatLng() {
+        var options = {
+            url: ctx + "business/manager/superMap/choseLatLng",
+            callBack: doLatLngSubmit
+        };
+        $.modal.openOptions(options);
+    }
+    function doLatLngSubmit(index, layero){
+
+        var body = layer.getChildFrame('body', index);
+        var longitude = body.find('#longitude').val();
+        var latitude = body.find('#latitude').val();
+
+        if (longitude.length === 0 || latitude.length === 0) {
+            $.modal.alertWarning("请选择坐标点");
+            return;
+        }
+
+        $("#longitude").val(longitude);
+        $("#latitude").val(latitude);
+
+        layer.close(index);
+    }
+</script>
+</body>
+</html>

+ 7 - 0
mybusiness/src/main/resources/templates/business/manager/stationfiremanager/index.html

@@ -106,6 +106,7 @@
                     formatter: function(value, row, index) {
                         var actions = [];
                         actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
+                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="showDetail(\'' + row.id + '\')"><i class="fa fa-edit"></i>详情</a> ');
                         actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                         return actions.join('');
                     }
@@ -113,6 +114,12 @@
             };
             $.table.init(options);
         });
+
+        function showDetail(id) {
+            var url = prefix + "/detail/"+id;
+            console.log($.modal)
+            $.modal.open("查看【防火检查站管理】详情", url);
+        }
     </script>
 </body>
 </html>