|
|
@ -72,6 +72,8 @@ |
|
|
|
label-width="150px"> |
|
|
|
<el-input-number class="item_width_4" |
|
|
|
v-model="formData.capacity" |
|
|
|
:precision="2" |
|
|
|
:step="0.01" |
|
|
|
:min="0" |
|
|
|
:max="9999" |
|
|
|
label="容纳人数"></el-input-number> |
|
|
@ -240,8 +242,10 @@ export default { |
|
|
|
data : this.cityManagement |
|
|
|
} |
|
|
|
this.formData = { ...data } |
|
|
|
map.setCenter(new TMap.LatLng(this.formData.latitude, this.formData.longitude)) |
|
|
|
this.setMarker(this.formData.latitude, this.formData.longitude) |
|
|
|
const lat = this.formData.latitude === null || this.formData.latitude === '' ? '36.06203' : this.formData.latitude; |
|
|
|
const lon = this.formData.longitude === null || this.formData.longitude === '' ? '120.38494' : this.formData.longitude; |
|
|
|
map.setCenter(new TMap.LatLng(lat,lon)) |
|
|
|
this.setMarker(lat,lon) |
|
|
|
} else { |
|
|
|
this.$message.error(msg) |
|
|
|
} |
|
|
@ -274,7 +278,7 @@ export default { |
|
|
|
}else { |
|
|
|
url = '/gov/org/icCityManagement/edit' |
|
|
|
} |
|
|
|
const { data, code, msg } = await requestPost(url, this.formData) |
|
|
|
const { data, code, msg, internalMsg } = await requestPost(url, this.formData) |
|
|
|
if (code === 0) { |
|
|
|
this.$message({ |
|
|
|
type: 'success', |
|
|
@ -285,7 +289,7 @@ export default { |
|
|
|
this.btnDisable = false |
|
|
|
} else { |
|
|
|
this.btnDisable = false |
|
|
|
this.$message.error(msg) |
|
|
|
this.$message.error(internalMsg) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
@ -298,7 +302,7 @@ export default { |
|
|
|
// 地图初始化函数,本例取名为init,开发者可根据实际情况定义 |
|
|
|
initMap () { |
|
|
|
// 定义地图中心点坐标 |
|
|
|
var center = new window.TMap.LatLng(36.0722275, 120.38945519) |
|
|
|
var center = new window.TMap.LatLng(36.52799, 120.7553) |
|
|
|
// 定义map变量,调用 TMap.Map() 构造函数创建地图 |
|
|
|
map = new window.TMap.Map(document.getElementById('app'), { |
|
|
|
center: center, // 设置地图中心点坐标 |
|
|
@ -401,7 +405,7 @@ export default { |
|
|
|
geocoder |
|
|
|
.getAddress({ location: location }) // 将给定的坐标位置转换为地址 |
|
|
|
.then((result) => { |
|
|
|
this.formData.address = result.result.address |
|
|
|
this.formData.address = result.result.address === '' || result.result.address === null ? this.formData.address : result.result.address |
|
|
|
// 显示搜索到的地址 |
|
|
|
}); |
|
|
|
}, |
|
|
|