|
@@ -32,14 +32,14 @@
|
|
|
</div>
|
|
|
<div class="formFlex">
|
|
|
<el-form-item label="单位所在行政区划" prop="szxzqh" class="formWidth4">
|
|
|
- <RegionCascaderSelect v-model="form.szxzqh" style="width: 100%"></RegionCascaderSelect>
|
|
|
+ <RegionCascaderSelect @nodeData="nodeData" v-model="form.szxzqh" style="width: 100%"></RegionCascaderSelect>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="详细地址" prop="txdz" class="formWidth">
|
|
|
<el-input v-model="form.txdz" placeholder="请输入单位所在小区、楼栋、门牌号"/>
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
<div class="formFlex">
|
|
|
- <el-form-item label="定位" class="contenrFlex">
|
|
|
+ <el-form-item label="定位" class="contenrFlex" prop="lat">
|
|
|
{{form.lat&&form.lng?form.lat+','+form.lng:''}}
|
|
|
<el-button type="primary" @click="openDw" style="margin-left: 15px">
|
|
|
获取定位
|
|
@@ -672,6 +672,9 @@
|
|
|
jgUrl: [
|
|
|
{ required: true, message: '养老机构图片不能为空', trigger: 'blur' }
|
|
|
],
|
|
|
+ lat:[
|
|
|
+ { required: true, message: '定位不能为空', trigger: 'blur' }
|
|
|
+ ],
|
|
|
frlxfs: [
|
|
|
{ required: true, message: '法定代表人或负责人联系电话不能为空', trigger: 'blur' },
|
|
|
],
|
|
@@ -821,6 +824,7 @@
|
|
|
input2: null,
|
|
|
lat: null,
|
|
|
lng: null,
|
|
|
+ ssxzqhNames:null
|
|
|
}
|
|
|
},
|
|
|
props:{
|
|
@@ -884,9 +888,16 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ nodeData(node) {
|
|
|
+ if (node && node.length > 0) {
|
|
|
+ this.szxzqhNames = node[0].pathLabels.join("")
|
|
|
+ } else{
|
|
|
+ this.szxzqhNames =""
|
|
|
+ }
|
|
|
+ },
|
|
|
initAMap() {
|
|
|
AMapLoader.load({
|
|
|
- key: '6c087d703e652767650a6b3208f76c40', //设置您的key
|
|
|
+ key: '2745bfd9ac871c59af56daa0717c5a0d', //设置您的key
|
|
|
version: '2.0',
|
|
|
plugins: ['AMap.ToolBar', 'AMap.Driving', 'AMap.Geocoder'],
|
|
|
AMapUI: {
|
|
@@ -901,7 +912,10 @@
|
|
|
this.map = new AMap.Map('container', {
|
|
|
resizeEnable: true
|
|
|
})
|
|
|
- this.map.setCity('吉林省')
|
|
|
+ // this.map.setCity('吉林省')
|
|
|
+ if (this.input1) {
|
|
|
+ this.geoCode(this.input1)
|
|
|
+ }
|
|
|
}).catch(e => {
|
|
|
console.log(e)
|
|
|
})
|
|
@@ -955,7 +969,7 @@
|
|
|
this.lat="";
|
|
|
this.lng="";
|
|
|
this.input2="";
|
|
|
- this.input1="";
|
|
|
+ this.input1=this.szxzqhNames+this.form.txdz;
|
|
|
this.initAMap()
|
|
|
},
|
|
|
changeYljgqyhz(value) {
|
|
@@ -1272,6 +1286,7 @@
|
|
|
// this.changeIsTgsqylfw(this.form.isTgsqylfw);
|
|
|
this.changeFrzjlx(this.form.frzjlx)
|
|
|
this.changeIsKzylfw(this.form.isKzylfw)
|
|
|
+ this.szxzqhNames=this.form.szxzqhNames
|
|
|
if (this.form.nsyljg && this.form.nsyljg.length > 0) {
|
|
|
this.isZS = false
|
|
|
this.rules.isYljgzyxk = [
|