|  |  |  | 
|---|
|  |  |  | 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({ | 
|---|
|  |  |  | 
|---|
|  |  |  | var html = template(res.data); | 
|---|
|  |  |  | $('#locMap').html(html); | 
|---|
|  |  |  | } else if (res.code === 403) { | 
|---|
|  |  |  | top.location.href = "/"; | 
|---|
|  |  |  | top.location.href = baseUrl+"/"; | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | layer.msg(res.msg) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | || html.trim()==='S' | 
|---|
|  |  |  | || html.trim()==='D' | 
|---|
|  |  |  | || html.trim()==='O' | 
|---|
|  |  |  | || html.trim()==='Z' | 
|---|
|  |  |  | ){ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } else { | 
|---|