Bläddra i källkod

场所检查;安防设施异常;负责人会议;其他;新增添加带出详细地址

yin_yu820 1 år sedan
förälder
incheckning
3e2587daa3

+ 17 - 2
src/views/activityMan/nonReligiousInformation/nonReligiousInformationView.vue

@@ -109,7 +109,7 @@
         </van-popup>
       </van-cell-group>
 
-      <van-cell-group>
+      <!-- <van-cell-group>
         <van-field
           v-model="inputForm.placeDetailed"
           center
@@ -118,7 +118,15 @@
           input-align="right"
           right-icon="location"
         />
-      </van-cell-group>
+      </van-cell-group> -->
+	  
+	  <van-cell-group>
+	    <van-field v-model="inputForm.placeDetailed" center label="详细地址:" placeholder="请填写具体地址" input-align="right">
+	      <template #right-icon>
+	        <van-icon name="location" @click="getLocation" />
+	      </template>
+	    </van-field>
+	  </van-cell-group>
 
       <van-cell-group>
         <van-field label="事件内容:" label-align="top">
@@ -317,6 +325,12 @@ export default {
       }
 
     };
+	
+	const getLocation = () => {
+	  xm.getLocation().then(data => {
+	    inputForm.value.placeDetailed = data.POIName;
+	  })
+	}
     
 
     const submit = () => {
@@ -359,6 +373,7 @@ export default {
       fieldNames,
       options,
       onFinish,
+	  getLocation,
       cascaderValue,
       contentEditor,
       // change,

+ 18 - 2
src/views/activityMan/religiousConference/religiousConferenceView.vue

@@ -35,7 +35,7 @@
           />
         </van-popup>
       </van-cell-group>
-      <van-cell-group>
+      <!-- <van-cell-group>
         <van-field
           v-model="inputForm.venueDetailed"
           center
@@ -44,7 +44,15 @@
           input-align="right"
           right-icon="location"
         />
-      </van-cell-group>
+      </van-cell-group> -->
+	  
+	  <van-cell-group>
+	    <van-field v-model="inputForm.venueDetailed" center label="详细地址:" placeholder="请填写具体地址" input-align="right">
+	      <template #right-icon>
+	        <van-icon name="location" @click="getLocation" />
+	      </template>
+	    </van-field>
+	  </van-cell-group>
 
       <van-cell-group>
         <van-field
@@ -300,6 +308,13 @@ export default {
       }
 
     };
+	
+	const getLocation = () => {
+	  xm.getLocation().then(data => {
+	    inputForm.value.venueDetailed = data.POIName;
+	  })
+	}
+	
     const submit = () => {
       isLoading.value = true;
       new religiousConferenceService().save(inputForm.value).then((res) => {
@@ -338,6 +353,7 @@ export default {
       fieldNames,
       options,
       onFinish,
+	  getLocation,
       cascaderValue,
       contentEditor,
       // change,

+ 19 - 2
src/views/activityMan/siteInspection/siteInspectionView.vue

@@ -57,7 +57,7 @@
         </van-popup>
       </van-cell-group>
 
-      <van-cell-group>
+      <!-- <van-cell-group>
         <van-field
           v-model="siteInspection.placeDel"
           center
@@ -66,7 +66,16 @@
           input-align="right"
           right-icon="location"
         />
-      </van-cell-group>
+      </van-cell-group> -->
+	  
+	  <van-cell-group>
+	    <van-field v-model="siteInspection.placeDel" center label="详细地址:" placeholder="请填写具体地址" input-align="right">
+	      <template #right-icon>
+	        <van-icon name="location" @click="getLocation" />
+	      </template>
+	    </van-field>
+	  </van-cell-group>
+	  
       <van-cell-group>
         <van-field
           v-model="siteInspection.supervisionTime"
@@ -283,6 +292,12 @@ export default {
       }      
     };
     
+	const getLocation = () => {
+	  xm.getLocation().then(data => {
+	    siteInspection.value.placeDel = data.POIName;
+	  })
+	}
+	
     // 提交数据
     const submit = () => {
       //添加保存前判断
@@ -329,6 +344,8 @@ export default {
       options,
       onFinish,
       cascaderValue,
+	  
+	  getLocation,
       // 文件上传
       afterRead,
       fileList,