更换地图

This commit is contained in:
2024-08-25 16:28:54 +08:00
parent 3644e68d4a
commit d035585751

View File

@@ -15,7 +15,7 @@ export default {
watch: { watch: {
search: { search: {
deep: true, handler() { deep: true, handler() {
this.getData().then(() => this.map.refreshData()) this.getData().then(() => this.refreshData())
} }
} }
}, },
@@ -77,12 +77,19 @@ export default {
} }
}, },
}) })
this.map.on('click', evt => {
const storeCode = evt.data.storeCode
if (storeCode) {
this.$storeBoard.search.storeCode = storeCode
this.$marketBoard.screenId = 'a90522ef-869b-40ea-8542-d1fc9674a1e8'
}
})
this.refreshData() this.refreshData()
}, },
convertData(layers) { convertData(layers) {
const result = {normal: [], abnormal: []} const result = {normal: [], abnormal: []}
layers.forEach(e => { layers.forEach(e => {
const item = {name: e.storeName, value: [e.longitude, e.latitude, e.bakeStockAmt, e.preSaleNum]} const item = {name: e.storeName, storeCode: e.storeCode, value: [e.longitude, e.latitude, e.bakeStockAmt, e.preSaleNum]}
if (e.bakeStockAmt > 0) { if (e.bakeStockAmt > 0) {
result.normal.push(item) result.normal.push(item)
} else { } else {