소스 검색

机构和社区机构定位完善+更换key

sunkuosheng 2 년 전
부모
커밋
1dc780bd7f

+ 1 - 1
ruoyi-ui/public/index.html

@@ -10,7 +10,7 @@
     <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
 	  <script>
       window._AMapSecurityConfig = {
-        securityJsCode: '8235942dbbc745f954849a61332fa3bc'
+        securityJsCode: '0e5682af5754293079d3858faeffdb79'
       };
     </script>
     <style>

+ 20 - 5
ruoyi-ui/src/views/organization/jggl/jcxx/index.vue

@@ -39,14 +39,14 @@
           </div>
           <div class="formFlex">
             <el-form-item label="单位通信地址" prop="szxzqh" class="contenrFlex">
-              <RegionCascaderSelect v-model="form.szxzqh" :disabled="isBa" style="width: 50%"></RegionCascaderSelect>
+              <RegionCascaderSelect v-model="form.szxzqh" :disabled="isBa" @nodeData="nodeData" style="width: 50%"></RegionCascaderSelect>
               <el-form-item label="" prop="txdz" style="width: 50%">
               <el-input v-model="form.txdz" :disabled="isBa" placeholder="请输入单位通信详情地址"/>
               </el-form-item>
             </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">
                 获取定位
@@ -741,6 +741,9 @@
           jgUrl: [
             { required: true, message: '养老机构图片不能为空', trigger: 'blur' }
           ],
+          lat:[
+            { required: true, message: '定位不能为空', trigger: 'blur' }
+          ],
           frlxfs: [
             { required: true, message: '法定代表人或负责人联系电话不能为空', trigger: 'blur' }
 
@@ -951,6 +954,7 @@
         input2: null,
         lat: null,
         lng: null,
+        szxzqhNames:null
       }
     },
     mounted() {
@@ -993,9 +997,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: {
@@ -1010,7 +1021,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)
         })
@@ -1064,7 +1078,7 @@
         this.lat="";
         this.lng="";
         this.input2="";
-        this.input1="";
+        this.input1=this.szxzqhNames+this.form.txdz;
         this.initAMap()
       },
       changeIsKzylfw(value) {
@@ -1428,6 +1442,7 @@
             this.form.tyshxydm = ''
             this.rules.tyshxydm = []
           }
+          this.szxzqhNames=this.form.szxzqhNames
           let copyData = {
             ...this.form,
             cwzs: parseInt(this.form.cwzs),

+ 20 - 5
ruoyi-ui/src/views/organization/jggl/sqJcxx/index.vue

@@ -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 = [

+ 1 - 1
ruoyi-ui/src/views/shijihome/index.vue

@@ -326,7 +326,7 @@ export default {
     },
     initAMap() {
       AMapLoader.load({
-        key: '6c087d703e652767650a6b3208f76c40',  //设置您的key
+        key: '2745bfd9ac871c59af56daa0717c5a0d',  //设置您的key
         version: '2.0',
         plugins: ['AMap.ToolBar', 'AMap.Driving'],
         AMapUI: {

+ 1 - 1
ruoyi-ui/src/views/sjhome/index.vue

@@ -335,7 +335,7 @@ export default {
     },
     initAMap() {
       AMapLoader.load({
-        key: '6c087d703e652767650a6b3208f76c40', //设置您的key
+        key: '2745bfd9ac871c59af56daa0717c5a0d', //设置您的key
         version: '2.0',
         plugins: ['AMap.ToolBar', 'AMap.Driving'],
         AMapUI: {