From d75c82842dac6d9f891e2e3d2aade153a8999619 Mon Sep 17 00:00:00 2001 From: Junjie <fallin.jie@qq.com> Date: 星期三, 07 六月 2023 08:07:09 +0800 Subject: [PATCH] 实施地图 --- src/main/webapp/views/home/map_realtime.html | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/src/main/webapp/views/home/map_realtime.html b/src/main/webapp/views/home/map_realtime.html index 4a6ce22..dd06aa0 100644 --- a/src/main/webapp/views/home/map_realtime.html +++ b/src/main/webapp/views/home/map_realtime.html @@ -423,6 +423,10 @@ </div> </div> + <div> + <div style="margin-top: 20px;"><button class="layui-btn" @click="resetMap">閲嶇疆鍦板浘</button></div> + </div> + </div> <div style="padding: 40px 20px 10px 10px;flex: 5;margin-top: -70px;"> <el-slider v-model="showScale" :marks="showScaleMarks"></el-slider> @@ -1114,6 +1118,29 @@ } }) }, + resetMap() { + let that = this + $.ajax({ + url: baseUrl + "/map/resetMap/" + this.currentLev + "/auth", + headers: {'token': localStorage.getItem('token')}, + dataType: 'json', + data: {}, + method: 'GET', + success: function (res) { + if (res.code === 200) { + that.currentLev++; + if (that.currentLev > 4) { + that.currentLev = 1 + } + $layui.layer.msg("鎿嶄綔鎴愬姛"); + } else if (res.code === 403) { + top.location.href = baseUrl + "/"; + } else { + $layui.layer.msg(res.msg); + } + } + }) + }, } }) -- Gitblit v1.9.1