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