dev-jingling
王文杰 9 months ago
parent 0b28798f63
commit 5b83ffc8fa

@ -1,8 +1,8 @@
<!-- <!--
* @Author: 王文杰 * @Author: 王文杰
* @Date: 2024-02-02 09:28:28 * @Date: 2024-02-02 09:28:28
* @LastEditors: 王文杰 * @LastEditors: 王文杰
* @LastEditTime: 2024-02-02 14:47:31 * @LastEditTime: 2024-02-02 15:09:13
* @FilePath: /jnpf-web/src/components/mapComponents/index.vue * @FilePath: /jnpf-web/src/components/mapComponents/index.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
@ -23,12 +23,25 @@
visibleMap: { visibleMap: {
type: Boolean, type: Boolean,
default: false, default: false,
} },
address: {
type: String,
default: '',
},
longitude: {
type: String,
default: '',
},
latitude: {
type: String,
default: '',
},
}, },
data() { data() {
return { return {
visible: this.visibleMap, visible: this.visibleMap,
map_src: 'https://mapapi.qq.com/web/mapComponents/locationPicker/v/index.html?search=1&type=1&key=U24BZ-7UECT-ZSNXI-L3GJD-GZD3E-3YFF6&referer=myapp', map_src: 'https://mapapi.qq.com/web/mapComponents/locationPicker/v/index.html?policy=1&search=1&type=1&key=U24BZ-7UECT-ZSNXI-L3GJD-GZD3E-3YFF6&referer=myapp',
form: { form: {
//ID //ID
id_area: [ id_area: [
@ -41,10 +54,10 @@
lat: '', lat: '',
}, },
map_data: { map_data: {
url: 'https://mapapi.qq.com/web/mapComponents/locationPicker/v/index.html?search=1&type=1&key=U24BZ-7UECT-ZSNXI-L3GJD-GZD3E-3YFF6&referer=myapp', url: 'https://mapapi.qq.com/web/mapComponents/locationPicker/v/index.html?policy=1&search=1&type=1&key=U24BZ-7UECT-ZSNXI-L3GJD-GZD3E-3YFF6&referer=myapp',
address: '', address: this.address,
lng: '', lng: this.longitude,
lat: '', lat: this.latitude,
}, },
} }
}, },

@ -48,10 +48,10 @@
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<jnpf-form-tip-item class="site-item" label="回收站位置" prop="stationName"> <jnpf-form-tip-item class="site-item" label="详细地址" prop="stationName">
<JnpfInput class="input" disabled v-model="dataForm.address" @change="changeData('stationName',-1)" placeholder="请选择站点位置" clearable :style='{"width":"100%"}'> <JnpfInput class="input" disabled v-model="dataForm.address" @change="changeData('stationName',-1)" placeholder="请选择详细地址" clearable :style='{"width":"100%"}'>
</JnpfInput> </JnpfInput>
<el-button @click="handleShowMap"></el-button> <el-button @click="handleShowMap"></el-button>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
@ -114,12 +114,12 @@
</JnpfUploadImg> </JnpfUploadImg>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col>
<el-col :span="8"> <!-- <el-col :span="8">
<jnpf-form-tip-item label="详细地址" prop="address"> <jnpf-form-tip-item label="详细地址" prop="address">
<JnpfInput v-model="dataForm.address" @change="changeData('address',-1)" placeholder="请输入" clearable :style='{"width":"100%"}'> <JnpfInput v-model="dataForm.address" @change="changeData('address',-1)" placeholder="请输入" clearable :style='{"width":"100%"}'>
</JnpfInput> </JnpfInput>
</jnpf-form-tip-item> </jnpf-form-tip-item>
</el-col> </el-col> -->
<el-col :span="8"> <el-col :span="8">
<jnpf-form-tip-item label="回收电话" prop="recycleTel"> <jnpf-form-tip-item label="回收电话" prop="recycleTel">
<JnpfInput v-model="dataForm.recycleTel" @change="changeData('recycleTel',-1)" placeholder="请输入" clearable :style='{"width":"100%"}'> <JnpfInput v-model="dataForm.recycleTel" @change="changeData('recycleTel',-1)" placeholder="请输入" clearable :style='{"width":"100%"}'>
@ -234,7 +234,7 @@
<!-- 表单结束 --> <!-- 表单结束 -->
</template> </template>
</el-form> </el-form>
<mapComponent v-if="visibleMap" :visibleMap='visibleMap' @chooseMapPoint='getCallMap' @cancel='cancelMap' @sure='sureMap'></mapComponent> <mapComponent v-if="visibleMap" :visibleMap='visibleMap' :longitude="dataForm.longitude" :latitude="dataForm.latitude" :address="dataForm.address" @chooseMapPoint='getCallMap' @cancel='cancelMap' @sure='sureMap'></mapComponent>
<SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm" ref="selectDialog" @select="addForSelect" @close="selectDialogVisible=false" /> <SelectDialog v-if="selectDialogVisible" :config="currTableConf" :formData="dataForm" ref="selectDialog" @select="addForSelect" @close="selectDialogVisible=false" />
</el-row> </el-row>
</div> </div>
@ -460,6 +460,7 @@ export default {
this.dataForm.longitude = valObj.lng this.dataForm.longitude = valObj.lng
this.dataForm.latitude = valObj.lat this.dataForm.latitude = valObj.lat
console.log('位置信息',valObj) console.log('位置信息',valObj)
debugger
this.visibleMap = false this.visibleMap = false
}, },
prev() { prev() {
@ -838,7 +839,7 @@ export default {
align-items: flex-start; align-items: flex-start;
margin-left: 0!important; margin-left: 0!important;
.input { .input {
width: 200px!important; width: 300px!important;
margin-right: 10px; margin-right: 10px;
} }
} }

Loading…
Cancel
Save