fix: 修改 dcbox 新增 不提示已修改的问题
This commit is contained in:
@@ -197,15 +197,10 @@ export default {
|
||||
handler (n, o) {
|
||||
this.isEdit = true
|
||||
if (!n.id) {
|
||||
this.$get('/sysConfig?paramKey=map_center_config').then(response => {
|
||||
if (response.code === 200) {
|
||||
const mapParam = JSON.parse(response.data.paramKey.map_center_config)
|
||||
this.editDc = { ...JSON.parse(JSON.stringify(n)), lnglat: `${mapParam.longitude},${mapParam.latitude}` }
|
||||
this.editDc = { ...JSON.parse(JSON.stringify(n)), lnglat: `${n.longitude},${n.latitude}` }
|
||||
this.$nextTick(() => {
|
||||
this.$refs.latlngPicker.setLnglat(this.editDc.latitude, this.editDc.longitude)
|
||||
})
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.editDc = { ...JSON.parse(JSON.stringify(n)), lnglat: `${n.longitude},${n.latitude}` }
|
||||
this.$nextTick(() => {
|
||||
|
||||
@@ -245,6 +245,17 @@ export default {
|
||||
addCabinet () {
|
||||
this.cabinetBoxShow = true
|
||||
},
|
||||
add () {
|
||||
this.$get('/sysConfig?paramKey=map_center_config').then(response => {
|
||||
if (response.code === 200) {
|
||||
const mapParam = JSON.parse(response.data.paramKey.map_center_config)
|
||||
this.object = this.newObject()
|
||||
this.object.longitude = mapParam.longitude
|
||||
this.object.latitude = mapParam.latitude
|
||||
this.rightBox.show = true
|
||||
}
|
||||
})
|
||||
},
|
||||
closeRightBox (refresh) {
|
||||
this.rightBox.show = false
|
||||
this.cabinetBoxShow = false
|
||||
|
||||
Reference in New Issue
Block a user