|
@@ -104,13 +104,33 @@
|
|
|
</el-upload>
|
|
|
</el-form-item>
|
|
|
<el-form-item
|
|
|
- prop="shop_address"
|
|
|
- :rules="formRules.required"
|
|
|
- label="详细地址:">
|
|
|
+ size="small"
|
|
|
+ prop="shop_address">
|
|
|
+ <template #label>
|
|
|
+ 地址:
|
|
|
+ <el-button type="text" @click="jumpQQLBS">(获取维度经度)</el-button>
|
|
|
+ </template>
|
|
|
+ <el-input
|
|
|
+ v-model="form.shop_address.address_name"
|
|
|
+ placeholder="详细地址"
|
|
|
+ clearable></el-input>
|
|
|
<el-input
|
|
|
- v-model="form.shop_address"
|
|
|
- placeholder="请输入详细地址"
|
|
|
+ style="margin-top: 10px;"
|
|
|
+ v-model="form.shop_address.name"
|
|
|
+ placeholder="位置名称"
|
|
|
clearable></el-input>
|
|
|
+ <div class="lon-lat">
|
|
|
+ <el-input
|
|
|
+ style="width: 48%;"
|
|
|
+ v-model.trim="form.shop_address.latitude"
|
|
|
+ placeholder="纬度"
|
|
|
+ clearable></el-input>
|
|
|
+ <el-input
|
|
|
+ style="width: 48%;"
|
|
|
+ v-model.trim="form.shop_address.longitude"
|
|
|
+ placeholder="经度"
|
|
|
+ clearable></el-input>
|
|
|
+ </div>
|
|
|
</el-form-item>
|
|
|
<el-form-item
|
|
|
label="备注:"
|
|
@@ -164,7 +184,7 @@ export default {
|
|
|
'country_msg': '', // 村信息
|
|
|
'user_wechat_code': '', // 微信号
|
|
|
'user_code_url': [], // 微信二维码
|
|
|
- 'shop_address': '', // 地址
|
|
|
+ 'shop_address': {}, // 地址
|
|
|
'shop_remark': '' // 备注
|
|
|
},
|
|
|
shop_img_url: [],
|
|
@@ -211,6 +231,18 @@ export default {
|
|
|
user_code_url: formData.user_code_url[0],
|
|
|
shop_img_url: formData.shop_img_url[0]
|
|
|
}
|
|
|
+ if (!formData.shop_address.address_name) {
|
|
|
+ this.$message.warning('请输入详细地址')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!formData.shop_address.latitude) {
|
|
|
+ this.$message.warning('请输入纬度')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (!formData.shop_address.longitude) {
|
|
|
+ this.$message.warning('请输入经度')
|
|
|
+ return
|
|
|
+ }
|
|
|
this.booLock = true
|
|
|
const data = await this.$fetch(url, postData)
|
|
|
this.booLock = false
|
|
@@ -221,6 +253,9 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ jumpQQLBS() {
|
|
|
+ window.open('https://lbs.qq.com/getPoint/', '_blank')
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
@@ -248,8 +283,8 @@ export default {
|
|
|
if (key === 'sort_id') {
|
|
|
value = value.toString()
|
|
|
}
|
|
|
- if (key === 'shop_address' && Object.prototype.toString.call(value) === '[object Object]') {
|
|
|
- value = value.address_name + value.name
|
|
|
+ if (key === 'shop_address' && Object.prototype.toString.call(value) !== '[object Object]') {
|
|
|
+ value = {}
|
|
|
}
|
|
|
this.$set(this.form, key, value)
|
|
|
}
|
|
@@ -271,17 +306,10 @@ export default {
|
|
|
margin-bottom: 20px;
|
|
|
}
|
|
|
|
|
|
-.af-put-line-radio {
|
|
|
+.lon-lat {
|
|
|
display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
align-items: center;
|
|
|
-
|
|
|
- p.lalel {
|
|
|
- padding: 0 10px;
|
|
|
- }
|
|
|
-
|
|
|
- p {
|
|
|
- padding: 0;
|
|
|
- margin: 0;
|
|
|
- }
|
|
|
+ margin-top: 10px;
|
|
|
}
|
|
|
</style>
|