From 96bcf675c8f3bf622b6435bf3b10354add6c3f86 Mon Sep 17 00:00:00 2001
From: liuyg <liuyg@qq.com>
Date: Mon, 21 Feb 2022 11:38:34 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/qfqk-android
---
pages/registerUser/registerUser.vue | 56 +++++++++++++++++++++-------
leafletMapOur/loginMap/css/body.css | 6 +-
leafletMapOur/loginMap/js/vueMain.js | 12 ++++++
leafletMapOur/loginMap/loginMap.html | 13 +++++-
4 files changed, 67 insertions(+), 20 deletions(-)
diff --git a/leafletMapOur/loginMap/css/body.css b/leafletMapOur/loginMap/css/body.css
index ccc1ccd..e800cfd 100644
--- a/leafletMapOur/loginMap/css/body.css
+++ b/leafletMapOur/loginMap/css/body.css
@@ -23,6 +23,7 @@
}
#mapVue {
+ position: relative;
overflow: hidden;
/* border: solid 1px springgreen; */
}
@@ -46,12 +47,12 @@
#seedata {
bottom: 0;
width: 100%;
- height: 50%;
+ height: 40px;
z-index: 400;
background-color: #fff;
display: flex;
flex-direction: column;
- border-radius: 60px 60px 0 0;
+ overflow: hidden;
}
.title {
@@ -88,7 +89,6 @@
align-items: center;
justify-content: center;
flex-direction: column;
- border-top: 1px solid rgb(138, 138, 138);
}
.div-alarm-people {
diff --git a/leafletMapOur/loginMap/js/vueMain.js b/leafletMapOur/loginMap/js/vueMain.js
index 68d0db6..61f8ae8 100644
--- a/leafletMapOur/loginMap/js/vueMain.js
+++ b/leafletMapOur/loginMap/js/vueMain.js
@@ -21,8 +21,13 @@
nowPosition: '',
resultFeedbackPopupShow: false,
popupDisplay: "none",
+
+ regionName: ''
},
methods: {
+ getLocalPoliceStation () {
+ window.parent.getRegionName(this.regionName)
+ },
getDataList () {
var that = this
that.beginCome()
@@ -39,6 +44,8 @@
}]
//url解码
this.getdata = this.getQueryVariable('data') || data
+
+ console.log(this.getdata, 456)
this.map = this.beginMap(this.map, this.getdata) //创建并接受map
this.map.invalidateSize(true) //应用地图高度
},
@@ -110,6 +117,11 @@
}
function showPosition (position) {
+
+ that.regionName = position.district || position.city
+
+ console.log(position)
+
var adCode = position.adCode //邮政编码
var nation = position.nation //中国
var city = position.city //城市
diff --git a/leafletMapOur/loginMap/loginMap.html b/leafletMapOur/loginMap/loginMap.html
index a0f9a2e..d2b682c 100644
--- a/leafletMapOur/loginMap/loginMap.html
+++ b/leafletMapOur/loginMap/loginMap.html
@@ -23,7 +23,8 @@
<!-- <script src="../map/lib/layui/layui.js" charset="utf-8"></script> -->
<!-- 百度地图api -->
- <script type="text/javascript" src="https://mapapi.qq.com/web/mapComponents/geoLocation/v/geolocation.min.js"></script>
+ <script type="text/javascript" src="https://mapapi.qq.com/web/mapComponents/geoLocation/v/geolocation.min.js">
+ </script>
<!-- axios支持 -->
<script src="../map/lib/axios.js"></script>
@@ -56,13 +57,19 @@
<body>
<div id="mapVue">
+
<div class="dingwei" @click="locationMap">
<img style="width: 80%;height: 80%;" src="./img/dingwei.png" alt="">
</div>
+
<div id="map">
-
+
</div>
-
+
+ <button
+ style="position: absolute; bottom: 4px; top: auto; left: 0; right: 0; margin: auto; z-index: 111; width: 106px; height: 30px; background: #409eff; border: 1px solid #fff; color: #fff; border-radius: 4px;"
+ @click="getLocalPoliceStation">获取当前辖区</button>
+
</div>
<!-- vue渲染 -->
<script src="./js/vueMain.js"></script>
diff --git a/pages/registerUser/registerUser.vue b/pages/registerUser/registerUser.vue
index c808459..46cdfdf 100644
--- a/pages/registerUser/registerUser.vue
+++ b/pages/registerUser/registerUser.vue
@@ -14,8 +14,8 @@
v-if="xqShow">
<u-input v-model="form.obj" placeholder="请输入工作单位" />
</u-form-item>
- <u-form-item label="辖区" left-icon="account-fill" label-width="200">
- <u-input type="select" placeholder="请选择辖区" :border="true" @click="openLoginMap" />
+ <u-form-item label="辖区" prop="xq" left-icon="account-fill" label-width="200" :required="true">
+ <u-input v-model="form.xq" type="select" placeholder="请选择辖区" :border="true" @click="openLoginMap" />
<!-- <u-select v-model="showxq" mode="mutil-column-auto" :list="listxq" @confirm="confirmxq"></u-select> -->
</u-form-item>
<u-form-item label="性别" label-width="200" left-icon="man">
@@ -48,8 +48,8 @@
<div class="login-map-content">
<u-icon class="login-map-close" name="close" @click="mapShow = false"></u-icon>
- <web-view style="width: 100%; height: 100%;" :src="loginMapUrl">
- </web-view>
+ <iframe style="width: 100%; height: 100%; position: absolute; " :src="loginMapUrl">
+ </iframe>
</div>
</div>
@@ -64,6 +64,7 @@
export default {
data() {
return {
+ regionName: '',
loginMapUrl: "",
radioList: [{
name: '是',
@@ -232,6 +233,12 @@
// 可以单个或者同时写两个触发验证方式
trigger: ['change', 'blur'],
}],
+ xq: [{
+ required: true,
+ message: '请选择辖区',
+ // 可以单个或者同时写两个触发验证方式
+ trigger: ['change', 'blur'],
+ }],
depts: [{
required: true,
message: '请输入姓名',
@@ -312,7 +319,7 @@
title: '位置', //标注点名
alpha: 1, //透明度
}]
-
+
var data = [{
"id": '100000',
"place": '无数据',
@@ -323,12 +330,16 @@
"wd": res.latitude
}]
data = JSON.stringify(data);
-
+
+
+ // that.loginMapUrl = 'http://127.0.0.1:5500/leafletMapOur/loginMap/loginMap.html?data=' +
+ // data
+
that.loginMapUrl = 'http://223.82.109.183:2082/loginMap/loginMap.html?data=' + data
that.mapShow = true
}
})
-
+
},
zc() {
uni.request({
@@ -340,12 +351,12 @@
success: (res) => {
uni.showToast({
title: '注册成功,请等待审核',
- icon:'none',
+ icon: 'none',
duration: 2000
});
}
});
-
+
var that = this;
this.$refs.uForm.validate(valid => {
if (valid) {
@@ -356,8 +367,8 @@
});
}
});
-
-
+
+
},
depl() {
var that = this;
@@ -497,7 +508,20 @@
},
onReady() {
this.$refs.uForm.setRules(this.rules);
-
+ var that = this
+ window.getRegionName = function(name) {
+ console.log(name)
+ if (name.indexOf('区') != -1) {
+ that.regionName = name.replace('区', '派出所');
+ } else if (name.indexOf('县') != -1) {
+ that.regionName = name.replace('县', '派出所');
+ } else if (name.indexOf('市') != -1) {
+ that.regionName = name.replace('市', '市派出所');
+ }
+
+ that.form.xq = that.regionName
+ that.mapShow = false
+ }
},
watch: {
faceState() {
@@ -538,9 +562,13 @@
left: 0;
width: 100%;
height: 60%;
- z-index: 111;
- border-radius: 15px;
+ z-index: 222;
+ border-radius: 15px 15px 0 0;
overflow: hidden;
+
+ iframe {
+ border: none;
+ }
}
.login-map-close {
--
Gitblit v1.9.3