From ad21a364301751988fb569a1775cf8b42e4e605f Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Sat, 19 Feb 2022 17:46:52 +0800
Subject: [PATCH] 部分修改
---
pages/registerUser/registerUser.vue | 56 ++++++++++++++++++++++++++++++++++++++++++--------------
1 files changed, 42 insertions(+), 14 deletions(-)
diff --git a/pages/registerUser/registerUser.vue b/pages/registerUser/registerUser.vue
index 21faafb..6a2b82f 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">
@@ -43,8 +43,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>
@@ -59,6 +59,7 @@
export default {
data() {
return {
+ regionName: '',
loginMapUrl: "",
radioList: [{
name: '是',
@@ -227,6 +228,12 @@
// 可以单个或者同时写两个触发验证方式
trigger: ['change', 'blur'],
}],
+ xq: [{
+ required: true,
+ message: '请选择辖区',
+ // 可以单个或者同时写两个触发验证方式
+ trigger: ['change', 'blur'],
+ }],
depts: [{
required: true,
message: '请输入姓名',
@@ -307,7 +314,7 @@
title: '位置', //标注点名
alpha: 1, //透明度
}]
-
+
var data = [{
"id": '100000',
"place": '无数据',
@@ -318,12 +325,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({
@@ -335,12 +346,12 @@
success: (res) => {
uni.showToast({
title: '注册成功,请等待审核',
- icon:'none',
+ icon: 'none',
duration: 2000
});
}
});
-
+
var that = this;
this.$refs.uForm.validate(valid => {
if (valid) {
@@ -351,8 +362,8 @@
});
}
});
-
-
+
+
},
depl() {
var that = this;
@@ -492,7 +503,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() {
@@ -533,9 +557,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