|
|
@@ -35,19 +35,13 @@
|
|
|
</a-col>
|
|
|
|
|
|
<a-col :span="8">
|
|
|
- <a-form-model-item label="身份证姓名" v-bind="labelCol2" prop="cardName" >
|
|
|
+ <a-form-model-item label="身份证姓名" v-bind="labelCol2" prop="" >
|
|
|
<a-radio-group v-model="model.cardName" button-style="solid" >
|
|
|
<a-input v-model="model.cardName" placeholder="身份证姓名" :rules="rules.cardName" ></a-input>
|
|
|
</a-radio-group>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
- <a-col :span="8">
|
|
|
- <a-form-model-item label="证件住址" prop="idCardAddress" v-bind="labelCol2">
|
|
|
- <a-radio-group v-model="model.idCardAddress" button-style="solid">
|
|
|
- <a-input v-model="model.idCardAddress" placeholder="请输入证件住址"></a-input>
|
|
|
- </a-radio-group>
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
+
|
|
|
</a-row>
|
|
|
|
|
|
|
|
|
@@ -80,8 +74,8 @@
|
|
|
:rules="rules"
|
|
|
>
|
|
|
<div>
|
|
|
-<!-- <a-divider orientation="left">填写营业厅入网提示卡-->
|
|
|
-<!-- </a-divider>-->
|
|
|
+ <!-- <a-divider orientation="left">填写营业厅入网提示卡-->
|
|
|
+ <!-- </a-divider>-->
|
|
|
<a-row>
|
|
|
<a-col :span="8">
|
|
|
<a-form-model-item label="拨测联系电话" prop="userOpenState" v-bind="labelCol2">
|
|
|
@@ -183,15 +177,15 @@
|
|
|
:rules="rules"
|
|
|
>
|
|
|
<div style="">
|
|
|
- <a-divider orientation="left">排查内容</a-divider>
|
|
|
+
|
|
|
<a-list size="large" bordered>
|
|
|
<template>
|
|
|
<a-list-item>
|
|
|
<a-col :span="12">
|
|
|
<a-form-model-item label="1、客户名下无电信号码" prop="userOpenState" v-bind="labelCol1Pro1A3">
|
|
|
<a-radio-group v-model="model.isDxNumber" button-style="solid">
|
|
|
- <a-radio value="1">是</a-radio>
|
|
|
- <a-radio value="2">否</a-radio>
|
|
|
+ <a-radio :value="1">是</a-radio>
|
|
|
+ <a-radio :value="2">否</a-radio>
|
|
|
</a-radio-group>
|
|
|
</a-form-model-item>
|
|
|
|
|
|
@@ -208,8 +202,8 @@
|
|
|
<a-col :span="12">
|
|
|
<a-form-model-item label="2、申请号码办理征信类、融合宽带业务" prop="userOpenState" v-bind="labelCol1ProMax2A7">
|
|
|
<a-radio-group v-model="model.isBroadband" button-style="solid">
|
|
|
- <a-radio value="1">是</a-radio>
|
|
|
- <a-radio value="2">否</a-radio>
|
|
|
+ <a-radio :value="1">是</a-radio>
|
|
|
+ <a-radio :value="2">否</a-radio>
|
|
|
</a-radio-group>
|
|
|
</a-form-model-item>
|
|
|
|
|
|
@@ -226,8 +220,8 @@
|
|
|
<a-col :span="12">
|
|
|
<a-form-model-item label="3、 申请号码使用用途异常" prop="userOpenState" v-bind="labelCol1ProA3">
|
|
|
<a-radio-group v-model="model.isUseTo" button-style="solid">
|
|
|
- <a-radio value="1">是</a-radio>
|
|
|
- <a-radio value="2">否</a-radio>
|
|
|
+ <a-radio :value="1">是</a-radio>
|
|
|
+ <a-radio :value="2">否</a-radio>
|
|
|
</a-radio-group>
|
|
|
</a-form-model-item>
|
|
|
|
|
|
@@ -244,8 +238,8 @@
|
|
|
<a-col :span="12">
|
|
|
<a-form-model-item label="4、客户名下号码存在异常高频率充值、退费" prop="userOpenState" v-bind="labelCol1ProMax4A8">
|
|
|
<a-radio-group v-model="model.isRefund" button-style="solid">
|
|
|
- <a-radio value="1">是</a-radio>
|
|
|
- <a-radio value="2">否</a-radio>
|
|
|
+ <a-radio :value="1">是</a-radio>
|
|
|
+ <a-radio :value="2">否</a-radio>
|
|
|
</a-radio-group>
|
|
|
</a-form-model-item>
|
|
|
|
|
|
@@ -262,8 +256,8 @@
|
|
|
<a-col :span="12">
|
|
|
<a-form-model-item label="5、客户名下已有号码(含已注销号码)存在各类关停" prop="userOpenState" v-bind="labelCol1ProMax5A6">
|
|
|
<a-radio-group v-model="model.isShutDown" button-style="solid">
|
|
|
- <a-radio value="1">是</a-radio>
|
|
|
- <a-radio value="2">否</a-radio>
|
|
|
+ <a-radio :value="1">是</a-radio>
|
|
|
+ <a-radio :value="2">否</a-radio>
|
|
|
</a-radio-group>
|
|
|
</a-form-model-item>
|
|
|
|
|
|
@@ -280,8 +274,8 @@
|
|
|
<a-col :span="12">
|
|
|
<a-form-model-item label="6、客户名下在用号码无使用记录,仍要求新办号码" prop="userOpenState" v-bind="labelCol1ProMax5A6">
|
|
|
<a-radio-group v-model="model.isNewly" button-style="solid">
|
|
|
- <a-radio value="1">是</a-radio>
|
|
|
- <a-radio value="2">否</a-radio>
|
|
|
+ <a-radio :value="1">是</a-radio>
|
|
|
+ <a-radio :value="2">否</a-radio>
|
|
|
</a-radio-group>
|
|
|
</a-form-model-item>
|
|
|
|
|
|
@@ -298,8 +292,8 @@
|
|
|
<a-col :span="12">
|
|
|
<a-form-model-item label="7、在多个渠道多频次入网的异常情况" prop="userOpenState" v-bind="labelCol1ProMax2A7">
|
|
|
<a-radio-group v-model="model.isChannel" button-style="solid">
|
|
|
- <a-radio value="1">是</a-radio>
|
|
|
- <a-radio value="2">否</a-radio>
|
|
|
+ <a-radio :value="1">是</a-radio>
|
|
|
+ <a-radio :value="2">否</a-radio>
|
|
|
</a-radio-group>
|
|
|
</a-form-model-item>
|
|
|
|
|
|
@@ -316,8 +310,8 @@
|
|
|
<a-col :span="12">
|
|
|
<a-form-model-item label="8、黑名单到期客户新入网的高危疑似涉诈号码" prop="userOpenState" v-bind="labelCol1ProMaxA8">
|
|
|
<a-radio-group v-model="model.isInvolvingFraud" button-style="solid">
|
|
|
- <a-radio value="1">是</a-radio>
|
|
|
- <a-radio value="2">否</a-radio>
|
|
|
+ <a-radio :value="1">是</a-radio>
|
|
|
+ <a-radio :value="2">否</a-radio>
|
|
|
</a-radio-group>
|
|
|
</a-form-model-item>
|
|
|
|
|
|
@@ -349,7 +343,7 @@
|
|
|
:rules="rules"
|
|
|
>
|
|
|
<div>
|
|
|
- <a-divider orientation="left">研判结果</a-divider>
|
|
|
+
|
|
|
<a-col :span="12">
|
|
|
<a-form-model-item label="是否将高危号码上报蓝、紫名单或不可复开关停" prop="userOpenState" v-bind="labelCol1ProMaxPlus">
|
|
|
<a-radio-group v-model="model.numberResults" button-style="solid">
|
|
|
@@ -377,35 +371,44 @@
|
|
|
:rules="rules"
|
|
|
>
|
|
|
<div>
|
|
|
-<!-- <a-divider orientation="left">附加信息-->
|
|
|
-<!-- </a-divider>-->
|
|
|
+ <!-- <a-divider orientation="left">附加信息-->
|
|
|
+ <!-- </a-divider>-->
|
|
|
<a-row>
|
|
|
- <a-col :span="8">
|
|
|
- <a-form-model-item label="位置信息" prop="userOpenState" v-bind="labelCol2">
|
|
|
- <a-radio-group v-model="model.positionInformation" button-style="solid">
|
|
|
- <a-input v-model="model.positionInformation" placeholder="请输入位置信息"></a-input>
|
|
|
- </a-radio-group>
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
|
|
|
|
|
|
<a-col :span="8">
|
|
|
<a-form-model-item label="工作地址" prop="userOpenState" v-bind="labelCol2">
|
|
|
<a-radio-group v-model="model.wordAddress" button-style="solid">
|
|
|
- <a-input v-model="model.wordAddress" placeholder="请输入工作地址"></a-input>
|
|
|
+ <a-input v-model="mapAddress" placeholder="请输入工作地址" @keyup="searchKeyWord" ></a-input>
|
|
|
+ <div class="map_search_result" v-show="this.showsearchResult" >
|
|
|
+ <ul>
|
|
|
+ <li @click="markerResult(item)" v-for="(item,index) in poiList" :key="index">{{item.name}}</li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
</a-radio-group>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
<a-col :span="8">
|
|
|
<a-form-model-item label="营业厅地址" prop="userOpenState" v-bind="labelCol2">
|
|
|
<a-radio-group v-model="model.businessAddress" button-style="solid">
|
|
|
- <a-input v-model="model.businessAddress" placeholder="请输入营业厅地址"></a-input>
|
|
|
+<!-- <a-input v-model="model.businessAddress" disabled="" placeholder="请输入营业厅地址" ></a-input>--> <span style="color: blue">中国北京电信总部大楼</span>
|
|
|
</a-radio-group>
|
|
|
</a-form-model-item>
|
|
|
</a-col>
|
|
|
- </a-row>
|
|
|
|
|
|
+ <a-col :span="8">
|
|
|
+ <a-form-model-item label="" prop="userOpenState" v-bind="labelCol1Results">
|
|
|
+ <a-radio-group v-model="model.judgmentResearch" button-style="solid">
|
|
|
+ <a-radio value="1" style="color: red" >智能判研-异常</a-radio>
|
|
|
+ <a-radio value="2" >人工判研-正常</a-radio>
|
|
|
+ </a-radio-group>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
|
|
|
+ </a-row>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <div id="container" :style="{width: '100%', height: '400px'}"></div>
|
|
|
</div>
|
|
|
</a-form-model>
|
|
|
</div>
|
|
|
@@ -433,12 +436,55 @@
|
|
|
import Popup from './PopupSubTable.vue';
|
|
|
import {httpAction, postAction, getAction} from "@api/manage";
|
|
|
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
|
|
|
+import AMapLoader from '@amap/amap-jsapi-loader'
|
|
|
+window._AMapSecurityConfig = {
|
|
|
+ securityJsCode: 'c4ab681cb7c3256184ae3557dc5beabb' //填写你的安全密钥
|
|
|
+}
|
|
|
+
|
|
|
export default {
|
|
|
name: "registration",
|
|
|
-
|
|
|
+ inject:['closeCurrent'],
|
|
|
mixins: [JeecgListMixin],
|
|
|
+
|
|
|
data() {
|
|
|
return {
|
|
|
+
|
|
|
+ zoom: 18,
|
|
|
+ center: [118.02, 24.48],
|
|
|
+ searchOption: {
|
|
|
+ // 限制搜索城市的范围
|
|
|
+ citylimit: false,
|
|
|
+ },
|
|
|
+ defaultValue: "",
|
|
|
+ content: "",
|
|
|
+ inputValue: "",
|
|
|
+ mapResultList:[],
|
|
|
+ searchResult: {
|
|
|
+ address: "",
|
|
|
+ latitude: "",
|
|
|
+ longitude: "",
|
|
|
+ name: "",
|
|
|
+ type: "",
|
|
|
+ country: "",
|
|
|
+ province: "",
|
|
|
+ city: "",
|
|
|
+ area: "",
|
|
|
+ township: "",
|
|
|
+ street: "",
|
|
|
+ neighborhood: "",
|
|
|
+ locationName: "",
|
|
|
+ },
|
|
|
+
|
|
|
+ events: {
|
|
|
+ click(e) {
|
|
|
+ _this.center = [e.lnglat.lng, e.lnglat.lat];
|
|
|
+ _this.form.lon = e.lnglat.lng;
|
|
|
+ _this.form.lat = e.lnglat.lat;
|
|
|
+ _this.getAddress(_this.center);
|
|
|
+ _this.defaultValue = "";
|
|
|
+ },
|
|
|
+ },
|
|
|
+
|
|
|
addIng: false,
|
|
|
url: {
|
|
|
"list":"",
|
|
|
@@ -574,9 +620,16 @@ export default {
|
|
|
{ required: true, message: '证件名不可为空...', trigger: 'blur' }
|
|
|
]
|
|
|
},
|
|
|
+ mapAddress:'',
|
|
|
+ poiList:'',
|
|
|
isSizeNumberResults:'',
|
|
|
+ showsearchResult:true,
|
|
|
+ addressG:'',
|
|
|
+ lnglat:{},
|
|
|
+ distance:'',
|
|
|
//表单信息
|
|
|
model: {
|
|
|
+ judgmentResearch:'',
|
|
|
isShutDownNote:'',
|
|
|
isShutDown:'',
|
|
|
isRefundNote:'',
|
|
|
@@ -610,7 +663,8 @@ export default {
|
|
|
idCardAddress:'',
|
|
|
wordAddress:'',
|
|
|
positionInformation:'',
|
|
|
- businessAddress:''
|
|
|
+ businessAddress:'',
|
|
|
+
|
|
|
},
|
|
|
current: 0,
|
|
|
//步骤条
|
|
|
@@ -633,17 +687,287 @@ export default {
|
|
|
created() {
|
|
|
this.model.id = this.$route.query.id;
|
|
|
|
|
|
-
|
|
|
},
|
|
|
mounted() {
|
|
|
this.queryById();
|
|
|
+ //DOM初始化完成进行地图初始化
|
|
|
+ this.initMap()
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+
|
|
|
+ //新增标记
|
|
|
+ showLocation(data){
|
|
|
+ let marker = new AMap.Marker({
|
|
|
+ position: new AMap.LngLat( data[0],data[1]) //参数为经纬度
|
|
|
+ })
|
|
|
+ this.map.clearMap()// 清除所有覆盖物(点标志)
|
|
|
+ this.map.add(marker)// 添加点标志
|
|
|
+ this.showInfoWindow(marker);//自定义信息窗体
|
|
|
+ },
|
|
|
+//自定义信息窗体
|
|
|
+ showInfoWindow(marker){
|
|
|
+ let infoWindow = new AMap.InfoWindow({
|
|
|
+ isCustom: true, //是否自定义信息窗体
|
|
|
+ content: `<div style="background-color: white;padding: 0 5px; border-radius: 5px;border: 1px solid #cccccc;"> 地址:${this.mapAddress}</div>`,
|
|
|
+ closeWhenClickMap: true,
|
|
|
+ zIndex: 999,
|
|
|
+ offset: new AMap.Pixel(16, -35)
|
|
|
+ });
|
|
|
+ infoWindow.open(this.map, marker.getPosition());
|
|
|
+ },
|
|
|
+ /** 初始化搜索 */
|
|
|
+ mapSearchInit(){
|
|
|
+ let autoOptions = {
|
|
|
+ input: "tipInput",
|
|
|
+ }
|
|
|
+ let autoCompleteComponent= new AMap.Autocomplete(autoOptions);
|
|
|
+ this.autoCompleteComponent = autoCompleteComponent;
|
|
|
+ // 注册placeSearch组件
|
|
|
+ this.placeSearchComponent = new AMap.PlaceSearch()
|
|
|
+ },
|
|
|
+ //根据输入内容查询
|
|
|
+ searchKeyWord(){
|
|
|
+ this.showsearchResult = true;
|
|
|
+ let that= this
|
|
|
+ that.placeSearchComponent.search(that.mapAddress, function (status, result) {
|
|
|
+ if(status==='complete' && result.info === "OK"){
|
|
|
+ that.showsearchResult = true
|
|
|
+ that.poiList = result.poiList.pois
|
|
|
+ }else{
|
|
|
+ that.showsearchResult = false
|
|
|
+ that.poiList = []
|
|
|
+ //that.$message.warning("没有查到结果");
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ getdiscount(lat1,lng1,lat2,lng2){
|
|
|
+ // console.log(paramObj)
|
|
|
+ var lng1 = lng1
|
|
|
+ var lat1 = lat1
|
|
|
+ var lng2 = lng2
|
|
|
+ var lat2 = lat2
|
|
|
+ var radLat1 = lat1*Math.PI / 180.0;
|
|
|
+ var radLat2 = lat2*Math.PI / 180.0;
|
|
|
+ var a = radLat1 - radLat2;
|
|
|
+ var b = lng1*Math.PI / 180.0 - lng2*Math.PI / 180.0;
|
|
|
+ var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a/2),2) +
|
|
|
+ Math.cos(radLat1)*Math.cos(radLat2)*Math.pow(Math.sin(b/2),2)));
|
|
|
+ s = s *6378.137 ;// EARTH_RADIUS;
|
|
|
+ s = Math.round(s * 10000) / 10000;
|
|
|
+ s = s * 1000
|
|
|
+ if (isNaN(s)) {
|
|
|
+ return 0+'m';
|
|
|
+ }
|
|
|
+ if (s > 1000) {
|
|
|
+ // 大于1000米时
|
|
|
+ s = Math.floor(s/1000 * 100) / 100;
|
|
|
+ s = s + 'km'
|
|
|
+ } else {
|
|
|
+ // 小于1000米直接返回
|
|
|
+ s = s + 'm'
|
|
|
+ }
|
|
|
+ this.distance=s;
|
|
|
+ return s;
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ space(lat1, lng1, lat2, lng2) {
|
|
|
+ console.log(lat1, lng1, lat2, lng2)
|
|
|
+ var radLat1 = lat1 * Math.PI / 180.0;
|
|
|
+ var radLat2 = lat2 * Math.PI / 180.0;
|
|
|
+ var a = radLat1 - radLat2;
|
|
|
+ var b = lng1 * Math.PI / 180.0 - lng2 * Math.PI / 180.0;
|
|
|
+ var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +
|
|
|
+ Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));
|
|
|
+ s = s * 6378.137;
|
|
|
+ s = Math.round(s * 10000) / 10000;
|
|
|
+ this.distance =s;
|
|
|
+ return s // 单位千米
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ //选择搜索的内容
|
|
|
+ markerResult(data){
|
|
|
+ console.log(data)
|
|
|
+ this.showsearchResult = false;
|
|
|
+ this.mapAddress = data.name;
|
|
|
+ var marker = new AMap.Marker({
|
|
|
+ position: [Number(data.location.lng),Number(data.location.lat)],
|
|
|
+ });
|
|
|
+ this.map.clearMap()// 清除所有覆盖物(点标志)
|
|
|
+ this.map.add(marker)// 添加点标志
|
|
|
+ this.showInfoWindow(marker);
|
|
|
+ setTimeout(() => {
|
|
|
+ this.map.setCenter(data.location);
|
|
|
+ this.map.setZoom(15);
|
|
|
+ }, 50)
|
|
|
+ let thisPosition = {
|
|
|
+ mapAddress: this.mapAddress,
|
|
|
+ lng: data.location.lng,
|
|
|
+ lat: data.location.lat
|
|
|
+ };
|
|
|
+ var map = new Map();
|
|
|
+ map.set("lng",data.location.lng);
|
|
|
+ map.set("lat",data.location.lat);
|
|
|
+ this.mapResultList.push(map) ;
|
|
|
+ console.log(data.location.lng +data.location.lat +"thisPosition")
|
|
|
+ this.$emit("select",thisPosition)
|
|
|
+ //暂时写死
|
|
|
+ this.space(data.location.lat,data.location.lng,'39.92800','116.40400');
|
|
|
+
|
|
|
+ if(parseFloat(this.distance)>20.0){
|
|
|
+ this.model.judgmentResearch = "1";
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 获取详细地址
|
|
|
+ getAddress(center) {
|
|
|
+ let _this = this;
|
|
|
+ let geocoder = new AMap.Geocoder({});
|
|
|
+
|
|
|
+ geocoder.getAddress(center, function (status, result) {
|
|
|
+ if (status === "complete" && result.info === "OK") {
|
|
|
+ let obj = result.regeocode.addressComponent;
|
|
|
+
|
|
|
+ let locationName =
|
|
|
+ obj.province +
|
|
|
+ obj.city +
|
|
|
+ obj.district +
|
|
|
+ obj.township +
|
|
|
+ obj.street +
|
|
|
+ obj.streetNumber;
|
|
|
+
|
|
|
+ _this.form.address = locationName;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ initMap(){
|
|
|
+ AMapLoader.load({
|
|
|
+ key:"3f95d73e380b9e4a2767c306a4b59f81", // 申请好的Web端开发者Key,首次调用 load 时必填
|
|
|
+ version:"2.0", // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
|
|
+ plugins: [
|
|
|
+ 'AMap.ToolBar',
|
|
|
+ 'AMap.Scale',
|
|
|
+ 'AMap.Geolocation',
|
|
|
+ 'AMap.PlaceSearch',
|
|
|
+ 'AMap.AutoComplete',
|
|
|
+ 'AMap.Geocoder',
|
|
|
+ 'AMap.CitySearch',
|
|
|
+ 'AMap.RangingTool' // 这个就是测距插件
|
|
|
+ ],
|
|
|
+ resizeEnable: true,
|
|
|
+ }).then((AMap)=>{
|
|
|
+ const that = this;
|
|
|
+ that.map = new AMap.Map("container",{ //设置地图容器id
|
|
|
+ viewMode:"3D", //是否为3D地图模式
|
|
|
+ zoom:12, //初始化地图级别
|
|
|
+ });
|
|
|
+ that.handleClick(AMap)//地图选点
|
|
|
+ that.map.addControl(new AMap.Scale()) // 在图面添加比例尺控件,展示地图在当前层级和纬度下的比例尺
|
|
|
+ that.map.addControl(new AMap.ToolBar()) //在图面添加鹰眼控件,在地图右下角显示地图的缩略图
|
|
|
+ that.geocoder = new AMap.Geocoder()
|
|
|
+ that.mapSearchInit()
|
|
|
+ }).catch(e=>{
|
|
|
+ console.log(e);
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ //点击地图获取地理位置
|
|
|
+ handleClick(){
|
|
|
+ this.map.on('click', (e) => {
|
|
|
+ let lng = e.lnglat.lng
|
|
|
+ let lat = e.lnglat.lat
|
|
|
+ let marker = new AMap.Marker({
|
|
|
+ position: new AMap.LngLat(lng, lat)
|
|
|
+ })
|
|
|
+ this.map.clearMap()// 清除所有覆盖物(点标志)
|
|
|
+ this.map.add(marker)// 添加点标志
|
|
|
+ let lnglat = [lng, lat]
|
|
|
+ let that = this
|
|
|
+ that.geocoder.getAddress(lnglat, function (status, result) {
|
|
|
+ if (status === 'complete' && result.regeocode) {
|
|
|
+ that.address = result.regeocode.formattedAddress;
|
|
|
+ that.showInfoWindow(marker);//自定义信息窗体
|
|
|
+ let thisPosition = {
|
|
|
+ address: that.address,
|
|
|
+ lng: lng,
|
|
|
+ lat: lat
|
|
|
+ };
|
|
|
+ that.$emit("select",thisPosition) //返回给父组件
|
|
|
+ } else {
|
|
|
+
|
|
|
+ this.$message.error('根据经纬度查询地址失败')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ //获取当前定位
|
|
|
+ getCurrentLocation(){
|
|
|
+ const that = this;
|
|
|
+ that.geolocation = new AMap.Geolocation({
|
|
|
+ timeout: 3000, //超过3秒后停止定位,默认:5s
|
|
|
+ enableHighAccuracy: true,
|
|
|
+ zoomToAccuracy: true, //定位成功后是否自动调整地图视野到定位点
|
|
|
+ });
|
|
|
+ that.geolocation.getCurrentPosition(function(status,result){
|
|
|
+ //备注:getCurrentPosition方法会调用超时或失败:
|
|
|
+ //Get geolocation time out:浏览器定位超时,包括原生的超时,可以适当增加超时属性的设定值以减少这一现象。
|
|
|
+ //另外还有个别浏览器(如google Chrome浏览器等)本身的定位接口是黑洞,通过其请求定位完全没有回应,也会超时返回失败。
|
|
|
+ //Get geolocation failed:定位失败,Chrome、火狐以及部分套壳浏览器接入的定位服务在国外,有较大限制,失败率高。
|
|
|
+ console.log(status,result);
|
|
|
+ if(status=='complete'){
|
|
|
+ that.onComplete(result)
|
|
|
+ }else{
|
|
|
+ that.onError(result) //失败后可使用getCityInfo获取非精准定位(具体到省市)
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //解析定位结果
|
|
|
+ onComplete(data) {
|
|
|
+ console.log('定位结果:' + data.position) //经纬度信息
|
|
|
+ let lnglat = data.position;
|
|
|
+ let marker = new AMap.Marker({ //创建标记
|
|
|
+ position: new AMap.LngLat(lnglat[0], lnglat[1])
|
|
|
+ })
|
|
|
+ this.map.clearMap()// 清除所有覆盖物(点标志)
|
|
|
+ this.map.add(marker)// 添加点标志
|
|
|
+ let that = this
|
|
|
+ //经纬度转换为中文地址详情
|
|
|
+ that.geocoder.getAddress(lnglat, function (status, result) {
|
|
|
+ if (status === 'complete' && result.regeocode) {
|
|
|
+ that.address = result.regeocode.formattedAddress;
|
|
|
+ that.showInfoWindow(marker);//自定义信息窗体
|
|
|
+ } else {
|
|
|
+ this.$message.error('根据经纬度查询地址失败')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //解析定位错误信息
|
|
|
+ onError(data) {
|
|
|
+ this.getLngLatLocation()
|
|
|
+ },
|
|
|
+ //在获取具体定位失败时调用的代码:(非精准定位!!!)
|
|
|
+ getLngLatLocation() {
|
|
|
+ const that = this;
|
|
|
+ that.geolocation.getCityInfo(function (status, result) {
|
|
|
+ if (status === 'complete') {
|
|
|
+ let data = result.position
|
|
|
+ that.address = result.province + result.city;
|
|
|
+ that.showLocation(data)
|
|
|
+ } else {
|
|
|
+ this.$message.error('获取地址失败')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
keyupInfoSelect(){
|
|
|
if (this.model.cardNo===''){
|
|
|
- return;
|
|
|
+ return;
|
|
|
}
|
|
|
+ this.closeCurrent();
|
|
|
this.$router.push({ path: '/network/PopupSub', query:{cardNo:this.model.cardNo}});
|
|
|
},
|
|
|
keyupInfo(){
|
|
|
@@ -658,13 +982,13 @@ export default {
|
|
|
let result = res.result;
|
|
|
let view =this.model;
|
|
|
if (result != null) {
|
|
|
- for (var i in result) {
|
|
|
+ for (var i in result) {
|
|
|
Object.keys(view).forEach(function(key){
|
|
|
view[key]=result[i][key];
|
|
|
})
|
|
|
this.isSizeNumberResults =result[i]["isSizeNumberResults"];
|
|
|
|
|
|
- //this.model.cardName =result[i]["cardName"];
|
|
|
+ //this.model.cardName =result[i]["cardName"];
|
|
|
// this.model.cardStartTime =result[i]["cardStartTime"];
|
|
|
// this.model.cardEndTime =result[i]["cardEndTime"];
|
|
|
// this.model.idCardAddress =result[i]["idCardAddress"];
|
|
|
@@ -792,7 +1116,7 @@ export default {
|
|
|
if (this.model.positionInformation==='' || this.model.positionInformation===null){
|
|
|
newDatas.push(h('p', null, '<位置信息> 不可为空... '))
|
|
|
}
|
|
|
- if (this.model.wordAddress===''|| this.model.wordAddress===null){
|
|
|
+ if (this.model.mapAddress===''|| this.model.mapAddress===null){
|
|
|
newDatas.push(h('p', null, '<工作地址> 不可为空... '))
|
|
|
}
|
|
|
if (this.model.businessAddress===''|| this.model.businessAddress===null){
|
|
|
@@ -955,10 +1279,12 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
- .is-error{
|
|
|
- border-color:red
|
|
|
- }
|
|
|
-</style>
|
|
|
+.is-error{
|
|
|
+ border-color:red
|
|
|
+}
|
|
|
+</style>
|