Commit e628e8f3 by liimin

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

确保当gpsLocation.address或query.address为undefined时,使用空字符串作为默认值,避免前端显示undefined
1 parent f9050d22
......@@ -557,7 +557,7 @@ export default {
let m = o.gpsLocation || {};
o.lng = m.blng;
o.lat = m.blat;
o.address = m.address;
o.address = m.address || '';
o.type = 2;
o.time = m.dateTime;
o.standNo = item.standNo || item.vin;
......@@ -670,7 +670,7 @@ export default {
console.log(query);
this.menuId = query.menuId;
if (query.address) {
this.$set(this.form, "address", query.address);
this.$set(this.form, "address", query.address||'');
}
if (query.sn) {
this.$set(this.form, "sn", query.sn);
......@@ -692,7 +692,7 @@ export default {
this.drawRectangle(query);
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!