From bf25145e95e4459b4ebb6aeb9267dbda1b7480ea Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Fri, 21 May 2021 17:09:04 +0800
Subject: [PATCH] 小程序地图
---
public/xcxjingqingmap/css/body.css | 7 +++++++
public/xcxjingqingmap/js/vueMain.js | 6 +++---
public/xcxjingqingmap/xcxmap.html | 30 ++++++++++++++----------------
public/xcxjingqingmap/js/move.js | 4 ++--
4 files changed, 26 insertions(+), 21 deletions(-)
diff --git a/public/xcxjingqingmap/css/body.css b/public/xcxjingqingmap/css/body.css
index 3a1d339..40e01fe 100644
--- a/public/xcxjingqingmap/css/body.css
+++ b/public/xcxjingqingmap/css/body.css
@@ -61,4 +61,11 @@
display: flex;
justify-content: center;
border-top: 1px solid rgb(138, 138, 138);
+}
+.el-tabs{
+ width: 92%;
+}
+.el-tabs__nav-scroll{
+ display: flex;
+ justify-content: center;
}
\ No newline at end of file
diff --git a/public/xcxjingqingmap/js/move.js b/public/xcxjingqingmap/js/move.js
index 041c68a..8db422b 100644
--- a/public/xcxjingqingmap/js/move.js
+++ b/public/xcxjingqingmap/js/move.js
@@ -83,9 +83,9 @@
that.div.on('touchend', function () {//抬起重置
once = true;//抬起重置鼠标点击位置
if (that.state == 'down') {//两种模式
- var chous = Math.abs(that.__yy - that.__sy) < that.__wy / 4;
+ var chous = Math.abs(that.__yy - that.__sy) < that.__wy / 8;
} else if (that.state == 'up') {
- var chous = Math.abs(that.__yy - that.__sy) > that.__wy / 4;
+ var chous = Math.abs(that.__yy - that.__sy) > that.__wy / 8;
}
if (chous) {
that.changeDomPosition(0, 0, (parseFloat(that.__wy / 10) * 3.999));//改变位置
diff --git a/public/xcxjingqingmap/js/vueMain.js b/public/xcxjingqingmap/js/vueMain.js
index 6ab301d..ea37386 100644
--- a/public/xcxjingqingmap/js/vueMain.js
+++ b/public/xcxjingqingmap/js/vueMain.js
@@ -25,7 +25,7 @@
},
beginCome() {
this.getdata = this.getQueryVariable('data');//url解码
- console.log(this.getdata)
+ // console.log(this.getdata)
// this.getdata = [{
// jd: 115.91042800000002,
// wd: 28.68094757898212,
@@ -57,7 +57,7 @@
var that = this;
var center = [data[0].wd,data[0].jd];
this.seedata = data[0].datas;
- console.log(this.seedata)
+ // console.log(this.seedata)
var createMap = () => {
map = L.map('map', { //初始化地图
center: center,
@@ -96,7 +96,7 @@
busIcon = new transportIcon({
iconUrl: './img/red.png'
});
- console.log(data, 43545343)
+ // console.log(data, 43545343)
var setData = (a) => {//定义图标
marker = L.marker([a.wd, a.jd], {
icon: a.dtype == 0 ? carIcon : a.dtype == 1 ? planeIcon : a.dtype == 2 ? busIcon : '',
diff --git a/public/xcxjingqingmap/xcxmap.html b/public/xcxjingqingmap/xcxmap.html
index b8eda9b..8e600c6 100644
--- a/public/xcxjingqingmap/xcxmap.html
+++ b/public/xcxjingqingmap/xcxmap.html
@@ -56,15 +56,14 @@
<div class="title-span"> </div>
</div>
<div class="main">
- <div>
- <el-tabs v-model="activeName" @tab-click="handleClick">
- <el-tab-pane label="警情信息" name="first">
- <div class="f-main">
- <div class="f-m-once">
- <div class="f-m-o-title">使用方</div>
- <div class="f-m-o-center">{{seedata.place}}</div>
- </div>
- <!-- <div class="a">
+ <el-tabs v-model="activeName" @tab-click="handleClick">
+ <el-tab-pane label="警情信息" name="first">
+ <div class="f-main">
+ <div class="f-m-once">
+ <div class="f-m-o-title">使用方</div>
+ <div class="f-m-o-center">{{seedata.place}}</div>
+ </div>
+ <!-- <div class="a">
<div class="b"></div>
<div class="b"></div>
</div>
@@ -84,14 +83,13 @@
<div class="b"></div>
<div class="b"></div>
</div> -->
- </div>
- </el-tab-pane>
- <!-- <el-tab-pane label="配置管理" name="second">配置管理</el-tab-pane>
- <el-tab-pane label="角色管理" name="third">角色管理</el-tab-pane>
+ </div>
+ </el-tab-pane>
+ <el-tab-pane label="配置管理" name="second">配置管理</el-tab-pane>
+ <!-- <el-tab-pane label="角色管理" name="third">角色管理</el-tab-pane>
<el-tab-pane label="定时任务补偿" name="fourth">定时任务补偿</el-tab-pane> -->
- </el-tabs>
- <!-- {{seedata.jd}}-{{seedata.wd}} -->
- </div>
+ </el-tabs>
+ <!-- {{seedata.jd}}-{{seedata.wd}} -->
</div>
</div>
</div>
--
Gitblit v1.9.3