flat: 街道添加地图
This commit is contained in:
@@ -17,7 +17,22 @@
|
||||
<jl-city-cascader :disabled="disabled" v-model="form.cityId"></jl-city-cascader>
|
||||
</template>
|
||||
<template slot="cityId" slot-scope="{ row }">
|
||||
{{ row.cityId === -1 ? '' : row.cityId }}
|
||||
<jl-city-cascader :type="'view'" :disabled="true" v-model="row.cityId"></jl-city-cascader>
|
||||
</template>
|
||||
<template slot="lonForm" slot-scope="{ row }">
|
||||
<super-map-view
|
||||
:isCanEdit="false"
|
||||
@addAddress="changeAddress"
|
||||
:longitude="row.lon <= 0 ? 104.397894 : row.lon"
|
||||
:latitude="row.lat <= 0 ? 31.126855 : row.lat"
|
||||
:open="true"
|
||||
:zoom="10"
|
||||
:min-zoom="10"
|
||||
:max-zoom="20"
|
||||
:flag-tip="false"
|
||||
placeholder="请输入详细地址"
|
||||
:type="'select'"
|
||||
></super-map-view>
|
||||
</template>
|
||||
<template slot="companyAddressForm" slot-scope="{ disabled }">
|
||||
<select-map
|
||||
@@ -203,6 +218,7 @@ export default {
|
||||
},
|
||||
obj: {},
|
||||
data: [],
|
||||
selectJW: null,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -314,6 +330,7 @@ export default {
|
||||
span: 20,
|
||||
display: true,
|
||||
prop: "cityId",
|
||||
slot: true,
|
||||
formslot: true,
|
||||
rules: [
|
||||
{
|
||||
@@ -337,6 +354,14 @@ export default {
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
label: "所在地区",
|
||||
prop: "lon",
|
||||
hide: true,
|
||||
span: 20,
|
||||
display: true,
|
||||
formslot: true,
|
||||
},
|
||||
],
|
||||
}
|
||||
],
|
||||
@@ -436,6 +461,9 @@ export default {
|
||||
}
|
||||
);
|
||||
},
|
||||
changeAddress(val) {
|
||||
this.selectJW = val
|
||||
},
|
||||
rowUpdate(row, index, done, loading) {
|
||||
row.authUrlId = getPath(row.authUrlId);
|
||||
row.identityUrl4Id = getPath(row.identityUrl4Id);
|
||||
@@ -444,6 +472,11 @@ export default {
|
||||
if (this.obj.address) {
|
||||
copyRow.companyAddress = this.obj.address
|
||||
}
|
||||
if (this.selectJW) {
|
||||
const {lng, lat} = this.selectJW
|
||||
copyRow.lon = lng
|
||||
copyRow.lat = lat
|
||||
}
|
||||
update(copyRow).then(
|
||||
() => {
|
||||
this.onLoad(this.page);
|
||||
@@ -540,6 +573,7 @@ export default {
|
||||
if (["add", "edit"].includes(type)) {
|
||||
this.imgList = [];
|
||||
this.initData();
|
||||
this.selectJW = null
|
||||
done();
|
||||
}
|
||||
if (["edit", "view"].includes(type)) {
|
||||
|
||||
Reference in New Issue
Block a user