From ab746e04a079ba979f7caaa2535ffb57ffc9766f Mon Sep 17 00:00:00 2001
From: Junjie <fallin.jie@qq.com>
Date: 星期五, 26 五月 2023 15:53:03 +0800
Subject: [PATCH] 地图切换楼层

---
 src/main/webapp/static/js/report/locMap.js |   27 +++++++++++++++++++++++++--
 1 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/src/main/webapp/static/js/report/locMap.js b/src/main/webapp/static/js/report/locMap.js
index 99c242c..2ce17af 100644
--- a/src/main/webapp/static/js/report/locMap.js
+++ b/src/main/webapp/static/js/report/locMap.js
@@ -3,7 +3,30 @@
     var layer = layui.layer;
     var form = layui.form;
 
+    getLocMapRows();
     getLocTable(1);
+
+    function getLocMapRows() {
+        $.ajax({
+            url: baseUrl+"/report/viewLocMapList/rows.action",
+            headers: {'token': localStorage.getItem('token')},
+            method: 'POST',
+            async: false,
+            success: function (res) {
+                if (res.code === 200) {
+                    var tpl = $("#locMastRowTemplate").html();
+                    var template = Handlebars.compile(tpl);
+                    var html = template(res);
+                    $('#rowSelect').append(html);
+                    form.render('select');
+                } else if (res.code === 403) {
+                    top.location.href = baseUrl+"/";
+                } else {
+                    layer.msg(res.msg)
+                }
+            }
+        });
+    }
 
     function getLocTable(row){
         $.ajax({
@@ -18,7 +41,7 @@
                     var html = template(res.data);
                     $('#locMap').html(html);
                 } else if (res.code === 403) {
-                    top.location.href = baseUrl;
+                    top.location.href = baseUrl+"/";
                 } else {
                     layer.msg(res.msg)
                 }
@@ -50,7 +73,7 @@
             maxmin: true,
             area: [top.detailWidth, top.detailHeight],
             shadeClose: true,
-            content: 'locDetl.html',
+            content: 'locDetlGroup.html',
             success: function(layero, index){
                 locNo = value;
             }

--
Gitblit v1.9.1