Browse Source

格式调整

shibei_master
zxc 3 years ago
parent
commit
2f17a19b38
  1. 16
      src/views/modules/shequzhili/csgltc/csglForm.vue
  2. 14
      src/views/modules/shequzhili/ggfwtc/ggfwForm.vue

16
src/views/modules/shequzhili/csgltc/csglForm.vue

@ -72,6 +72,8 @@
label-width="150px"> label-width="150px">
<el-input-number class="item_width_4" <el-input-number class="item_width_4"
v-model="formData.capacity" v-model="formData.capacity"
:precision="2"
:step="0.01"
:min="0" :min="0"
:max="9999" :max="9999"
label="容纳人数"></el-input-number> label="容纳人数"></el-input-number>
@ -240,8 +242,10 @@ export default {
data : this.cityManagement data : this.cityManagement
} }
this.formData = { ...data } this.formData = { ...data }
map.setCenter(new TMap.LatLng(this.formData.latitude, this.formData.longitude)) const lat = this.formData.latitude === null || this.formData.latitude === '' ? '36.06203' : this.formData.latitude;
this.setMarker(this.formData.latitude, this.formData.longitude) 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 { } else {
this.$message.error(msg) this.$message.error(msg)
} }
@ -274,7 +278,7 @@ export default {
}else { }else {
url = '/gov/org/icCityManagement/edit' 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) { if (code === 0) {
this.$message({ this.$message({
type: 'success', type: 'success',
@ -285,7 +289,7 @@ export default {
this.btnDisable = false this.btnDisable = false
} else { } else {
this.btnDisable = false this.btnDisable = false
this.$message.error(msg) this.$message.error(internalMsg)
} }
}, },
@ -298,7 +302,7 @@ export default {
// init // init
initMap () { 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 TMap.Map()
map = new window.TMap.Map(document.getElementById('app'), { map = new window.TMap.Map(document.getElementById('app'), {
center: center, // center: center, //
@ -401,7 +405,7 @@ export default {
geocoder geocoder
.getAddress({ location: location }) // .getAddress({ location: location }) //
.then((result) => { .then((result) => {
this.formData.address = result.result.address this.formData.address = result.result.address === '' || result.result.address === null ? this.formData.address : result.result.address
// //
}); });
}, },

14
src/views/modules/shequzhili/ggfwtc/ggfwForm.vue

@ -44,6 +44,8 @@
label-width="150px"> label-width="150px">
<el-input-number class="item_width_4" <el-input-number class="item_width_4"
v-model="formData.areaCovered" v-model="formData.areaCovered"
:precision="2"
:step="0.01"
:min="0" :min="0"
:max="9999" :max="9999"
label="占地面积"></el-input-number> label="占地面积"></el-input-number>
@ -218,8 +220,10 @@
} }
this.formData = { ...data } this.formData = { ...data }
map.setCenter(new TMap.LatLng(this.formData.latitude, this.formData.longitude)) const lat = this.formData.latitude === null || this.formData.latitude === '' ? '36.06203' : this.formData.latitude;
this.setMarker(this.formData.latitude, this.formData.longitude) 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 { } else {
this.$message.error(msg) this.$message.error(msg)
} }
@ -252,7 +256,7 @@
}else { }else {
url = '/gov/org/icPublicService/edit' url = '/gov/org/icPublicService/edit'
} }
const { data, code, msg } = await requestPost(url, this.formData) const { data, code, msg,internalMsg } = await requestPost(url, this.formData)
if (code === 0) { if (code === 0) {
this.$message({ this.$message({
type: 'success', type: 'success',
@ -263,7 +267,7 @@
this.btnDisable = false this.btnDisable = false
} else { } else {
this.btnDisable = false this.btnDisable = false
this.$message.error(msg) this.$message.error(internalMsg)
} }
}, },
@ -380,7 +384,7 @@
geocoder geocoder
.getAddress({ location: location }) // .getAddress({ location: location }) //
.then((result) => { .then((result) => {
this.formData.address = result.result.address this.formData.address = result.result.address === '' || result.result.address === null ? this.formData.address : result.result.address
// //
}); });
}, },

Loading…
Cancel
Save