Commit e628e8f3 by liimin

fix(monitor): 修复地址字段未定义时显示问题

确保当gpsLocation.address或query.address为undefined时,使用空字符串作为默认值,避免前端显示undefined
1 parent f9050d22
...@@ -557,7 +557,7 @@ export default { ...@@ -557,7 +557,7 @@ export default {
let m = o.gpsLocation || {}; let m = o.gpsLocation || {};
o.lng = m.blng; o.lng = m.blng;
o.lat = m.blat; o.lat = m.blat;
o.address = m.address; o.address = m.address || '';
o.type = 2; o.type = 2;
o.time = m.dateTime; o.time = m.dateTime;
o.standNo = item.standNo || item.vin; o.standNo = item.standNo || item.vin;
...@@ -670,7 +670,7 @@ export default { ...@@ -670,7 +670,7 @@ export default {
console.log(query); console.log(query);
this.menuId = query.menuId; this.menuId = query.menuId;
if (query.address) { if (query.address) {
this.$set(this.form, "address", query.address); this.$set(this.form, "address", query.address||'');
} }
if (query.sn) { if (query.sn) {
this.$set(this.form, "sn", query.sn); this.$set(this.form, "sn", query.sn);
...@@ -692,7 +692,7 @@ export default { ...@@ -692,7 +692,7 @@ export default {
this.drawRectangle(query); this.drawRectangle(query);
this.getAreaLocation(); this.getAreaLocation();
this.autoComplete.setInputValue(this.form.address); this.autoComplete.setInputValue(this.form.address||'');
}, },
// 绘画矩形 // 绘画矩形
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!