修改地图也页面登录跳转问题

This commit is contained in:
978184212@qq.com 2026-08-21 17:28:44 +08:00
parent 1337f99702
commit feac3406f9
3 changed files with 596 additions and 423 deletions

View File

@ -87,6 +87,7 @@
pageNo:1, pageNo:1,
pageSize:4, pageSize:4,
isRefresher: false, // isRefresher: false, //
isLoading: false, //
} }
}, },
onLoad() { onLoad() {
@ -111,62 +112,68 @@
refresherpullingFun() { refresherpullingFun() {
this.isRefresher= true this.isRefresher= true
}, },
getList(){ getList(isRefresh = false) {
let params = {} //
params.pageNo = this.pageNo if (this.isLoading) return
params.pageSize = this.pageSize this.isLoading = true
uni.showLoading({
title: '加载中' let params = {
}); pageNo: this.pageNo,
this.List = [] pageSize: this.pageSize
this.$http.get('/applet/survStationInfo/page',{params:params}).then(res =>{ }
if(res.data.code == 0){
var data = res.data.data.records // loading
this.List = this.List.concat(data) if (this.pageNo === 1 && !isRefresh) {
for(var i=0;i<this.List.length;i++){ uni.showLoading({ title: '加载中' })
if(this.List[i].deviceCount >= 10000 && this.List[i].deviceCount < 100000000){ }
this.List[i].deviceCount = (this.List[i].deviceCount /10000).toFixed(1) + '万'
} //
if(this.List[i].deviceCount >= 100000000){ if (this.pageNo === 1 && !isRefresh) {
this.List[i].deviceCount = (this.List[i].deviceCount /100000000).toFixed(1) + '亿' this.List = []
} }
if(this.List[i].survObj.length >= 10000 && this.List[i].survObj.length < 100000000){
this.List[i].survObj.length = (this.List[i].survObj.length /10000).toFixed(1) + '万' this.$http.get('/applet/survStationInfo/page', { params }).then(res => {
} this.isLoading = false
if(this.List[i].survObj.length >= 100000000){ uni.hideLoading()
this.List[i].survObj.length = (this.List[i].survObj.length /100000000).toFixed(1) + '亿' this.isRefresher = false
}
if(this.List[i].survDataCount >= 10000 && this.List[i].survDataCount < 100000000){ if (res.data.code === 0) {
this.List[i].survDataCount = (this.List[i].survDataCount /10000).toFixed(1) + '万' let data = res.data.data.records || []
} if (this.pageNo === 1) {
if(this.List[i].survDataCount >= 100000000){ this.List = data
this.List[i].survDataCount = (this.List[i].survDataCount /100000000).toFixed(1) + '亿' } else {
} this.List = this.List.concat(data)
} }
if(res.data.data.total != 0){
this.allNum = Number(res.data.data.total)/Number(this.pageSize)+''; //
if(this.allNum.indexOf('.') == -1) { this.formatData()
this.allNum = this.allNum;
} else { //
this.allNum = parseInt(Number(this.allNum)+1); this.updatePaginationStatus(res.data.data.total)
} }
if(this.pageNo == this.allNum) { }).catch(err => {
this.isLastpage = true; this.isLoading = false
this.loadStatus='nomore' uni.hideLoading()
} else { this.isRefresher = false
this.isLastpage = false; })
// this.isLoadMore=true },
this.loadStatus = 'more' formatData() {
} //
}else{ this.List.forEach(item => {
this.isLastpage = true; item.deviceCount = this.formatNumber(item.deviceCount)
this.loadStatus='nomore' item.survObj.length = this.formatNumber(item.survObj.length)
} item.survDataCount = this.formatNumber(item.survDataCount)
} })
uni.hideLoading(); },
this.isRefresher= false
}) formatNumber(num) {
}, if (num >= 100000000) {
return (num / 100000000).toFixed(1) + '亿'
} else if (num >= 10000) {
return (num / 10000).toFixed(1) + '万'
}
return num || 0
},
lower() { lower() {
// //
if (this.isLastpage) { if (this.isLastpage) {

View File

@ -97,24 +97,28 @@ export default {
this.CustomTop = this.Custom.top this.CustomTop = this.Custom.top
}, },
onShow() { onShow() {
var that = this //
const token = uni.getStorageSync('constant');
if (token) {
//
uni.reLaunch({
url: '/pages/index/index'
});
return;
}
//
var that = this;
uni.login({ uni.login({
success: function (res) { success: function (res) {
that.code = res.code that.code = res.code;
let params = {} let params = {};
params.jsCode = that.code params.jsCode = that.code;
api.wxlogin(params).then(res => { api.wxlogin(params).then(res => {
let userInfo = res.data.data; let userInfo = res.data.data;
uni.setStorageSync('third_session', userInfo.thirdSession); uni.setStorageSync('third_session', userInfo.thirdSession);
// api.loginCallback(res, ()=>{ // session
// that.login = false });
// uni.reLaunch({
// url: '/pages/index/index'
// })
// }, ()=>{
// that.login = true
// });
})
} }
}); });
}, },

View File

@ -50,369 +50,531 @@
</template> </template>
<script> <script>
import api from '@/api/api' import api from '@/api/api'
import selectSwitch from "@/components/xuan-switch/xuan-switch.vue"; import selectSwitch from "@/components/xuan-switch/xuan-switch.vue";
export default {
components: {
selectSwitch
},
data() {
return {
markers: [],
markersNoPest: [],
list: [],
pointers: [],
imgurl1: '@/static/zhandian_icon_nongtian_title.png',
imgurl2: '@/static/zhandian_icon_xuqin_title.png',
isscd: true,
issscd: true,
isssscd: true,
pestlight: [],
cusLocation: [],
stationInfo: [],
pestlightMarker: null,
stationlist: [],
timerSet: null
};
},
onLoad() {
// this.isscd = true
// this.getList()
this.$nextTick(() => {
this.getList()
})
},
onShow() {
var that = this
if (uni.getStorageSync('third_session')) {
uni.login({
success: function(res) {
console.log(res.code)
this.code = res.code
let params = {}
params.jsCode = this.code
console.log(params, 152)
api.wxlogin(params).then(res => {
console.log(res, 165)
if (res.data.code == 0) {
let userInfo = res.data.data;
// uni.setStorageSync('third_session', userInfo.thirdSession);
if (!userInfo.id) {
uni.reLaunch({
url: '/packDetail/pages/login/login'
})
} else {
// that.isscd = true
//
}
}
})
}
});
} else if (!uni.getStorageSync('third_session')) {
uni.reLaunch({
url: '/pages/loginindex'
})
}
}, export default {
onReady() { components: {
// 1.mapmapid selectSwitch
this.mapContext = uni.createMapContext("alarm_map", this); },
}, data() {
methods: { return {
getList() { markers: [],
this.markers = [] markersNoPest: [],
this.markersNoPest = [] list: [],
this.pointers = [] pointers: [],
this.list = [] imgurl1: '@/static/zhandian_icon_nongtian_title.png',
uni.showLoading({ imgurl2: '@/static/zhandian_icon_xuqin_title.png',
title: '加载中' isscd: true,
}); issscd: true,
this.$http.get('/applet/survStationInfo/stationMap').then(res => { isssscd: true,
this.stationlist = [...res.data.data.pestlight, ...res.data.data.cusLocation, ...res.data.data.stationInfo] pestlight: [],
this.stationlist.forEach((item,index) => { cusLocation: [],
item.id = index; stationInfo: [],
if(item.inType == 'pestlight'){ pestlightMarker: null,
this.pestlight.push(item) stationlist: [],
timerSet: null,
isDataLoaded: false,
isCheckingLogin: false, //
};
},
onLoad() {
console.log('地图页面加载');
//
},
onShow() {
console.log('地图页面显示');
//
if (this.isCheckingLogin) {
return;
}
this.checkLoginStatus();
},
onReady() {
this.mapContext = uni.createMapContext("alarm_map", this);
},
methods: {
//
checkLoginStatus() {
this.isCheckingLogin = true;
const token = uni.getStorageSync('constant');
const session = uni.getStorageSync('third_session');
console.log('登录检查 - token:', !!token, 'session:', !!session);
// 1 ->
if (!token && !session) {
console.log('无登录凭证,跳转欢迎页');
this.isCheckingLogin = false;
uni.reLaunch({
url: '/pages/loginindex'
});
return;
}
// 2 third_session ->
if (session && !token) {
console.log('有session无token验证用户');
this.verifyUserInfo();
return;
}
// 3 ->
if (token) {
console.log('有完整登录信息,加载地图数据');
this.isCheckingLogin = false;
if (!this.isDataLoaded) {
this.getList();
}
}
},
//
verifyUserInfo() {
const that = this;
uni.login({
success: (res) => {
console.log('微信登录成功code:', res.code);
const params = {
jsCode: res.code
};
api.wxlogin(params).then(res => {
console.log('wxlogin接口返回:', res.data);
//
if (res.data.code === 0 && res.data.data) {
const userInfo = res.data.data;
//
if (userInfo.id && userInfo.id !== null && userInfo.id !== 'null') {
//
uni.setStorageSync('constant', userInfo);
console.log('用户验证通过保存token');
that.isCheckingLogin = false;
//
if (!that.isDataLoaded) {
that.getList();
}
} else {
//
console.log('用户信息不完整,跳转登录页');
that.isCheckingLogin = false;
that.clearCacheAndGoLogin();
}
} else {
//
console.log('接口返回错误:', res.data.msg || '未知错误');
that.isCheckingLogin = false;
that.clearCacheAndGoLogin();
} }
if(item.stationType == 'cusLocaltion'){ }).catch((err) => {
this.cusLocation.push(item) console.error('wxlogin请求失败:', err);
} that.isCheckingLogin = false;
if(item.stationType == 'orient' || item.stationType == 'livestock'){ that.clearCacheAndGoLogin();
this.stationInfo.push(item) });
} },
this.list.push({ fail: (err) => {
latitude:Number(item.stationLatitude), console.error('微信登录失败:', err);
longitude: Number(item.stationLongitude), that.isCheckingLogin = false;
stationType:item.stationType, that.clearCacheAndGoLogin();
sortNo: item.sortNo, }
stationName: item.stationName, });
stationCode: item.stationCode },
})
}) // token
this.issscd = false verifyToken() {
this.isssscd = false this.isCheckingLogin = false;
this.qiyeChange() if (!this.isDataLoaded) {
this.list1query() this.getList();
this.list2query() }
uni.hideLoading(); },
})
}, //
// stationlist clearCacheAndGoLogin() {
processStationList(stationlist) { const keys = ['constant', 'third_session', 'userName', 'password'];
if (stationlist) { keys.forEach(key => {
stationlist.forEach(item => { uni.removeStorageSync(key);
this.list.push({ });
latitude: item.inType === 'pestlight' ? Number(item.latitude) : Number(item
.stationLatitude), uni.reLaunch({
longitude: item.inType === 'pestlight' ? Number(item.longitude) : Number(item url: '/packDetail/pages/login/login'
.stationLongitude), });
stationType: item.inType === 'pestlight' ? 'pestlight' : item.stationType, },
sortNo: item.sortNo,
stationName: item.stationName, //
stationCode: item.stationCode getList() {
}) //
}) if (this.isDataLoaded) {
} console.log('数据已加载,跳过');
}, return;
// pointers }
generatePointers() {
const iconConfig = { //
// pestlight: { const token = uni.getStorageSync('constant');
// iconPath: '/static/zhandian_sahchong_dingwei.png', if (!token) {
// width: 15, console.log('没有登录token不加载数据');
// height: 20 return;
// }, }
orient: {
iconPath: '/static/zhandian_nongtian_dingwei.png', console.log('开始加载地图数据');
width: 35,
height: 52 this.markers = [];
}, this.markersNoPest = [];
livestock: { this.pointers = [];
iconPath: '/static/zhandian_xuqin_dingwei.png', this.list = [];
width: 35, this.pestlight = [];
height: 52 this.cusLocation = [];
}, this.stationInfo = [];
cusLocaltion: {
iconPath: '/static/qiyeIcon.png', uni.showLoading({
width: 35, title: '加载中'
height: 52 });
}
} this.$http.get('/applet/survStationInfo/stationMap').then(res => {
this.list.forEach((item, i) => { console.log('地图接口返回:', res.data);
const config = iconConfig[item.stationType] || {}
item.iconPath = config.iconPath || '' //
item.width = config.width || 0 if (!res.data || res.data.code !== 0) {
item.height = config.height || 0 console.error('地图数据加载失败:', res.data?.msg || '数据格式错误');
this.pointers.push({ uni.hideLoading();
id: i, uni.showToast({
iconPath: item.iconPath, title: res.data?.msg || '加载失败',
latitude: Number(item.latitude), icon: 'none'
longitude: Number(item.longitude), });
width: item.width,
height: item.height, //
customCallout: { if (res.data?.code === 401 || res.data?.code === 1001) {
anchorY: 0, // Y this.clearCacheAndGoLogin();
anchorX: 0, // X }
display: 'ALWAYS' // return;
}, }
stationType: item.stationType,
stationName: item.stationName, // data
stationCode: item.stationCode, if (!res.data.data) {
joinCluster: true // console.error('地图数据为空');
}) uni.hideLoading();
}) uni.showToast({
}, title: '暂无数据',
markertap(e) { icon: 'none'
const index = e.detail.markerId });
console.log(e.detail,'index') return;
if (['orient', 'livestock'].includes(this.list[index].stationType)) { }
uni.navigateTo({
url: `/packDetail/pages/Site/detail?item=${encodeURIComponent(JSON.stringify(this.list[index]))}` //
}) const data = res.data.data;
} const pestlightData = data.pestlight || [];
}, const cusLocationData = data.cusLocation || [];
callouttap(e) { const stationInfoData = data.stationInfo || [];
const index = e.detail.markerId
if (['orient', 'livestock'].includes(this.list[index].stationType)) { this.stationlist = [...pestlightData, ...cusLocationData, ...stationInfoData];
uni.navigateTo({
url: `/packDetail/pages/Site/detail?item=${encodeURIComponent(JSON.stringify(this.list[index]))}` if (this.stationlist.length === 0) {
}) console.log('没有站点数据');
} uni.hideLoading();
}, return;
todetails(item) { }
console.log(item, '还是个然后')
}, this.stationlist.forEach((item, index) => {
switch1Change() { item.id = index;
this.isscd = !this.isscd; if (item.inType == 'pestlight') {
let index = 0; this.pestlight.push(item);
if (!this.isscd) { }
this.pestlightMarker = []; if (item.stationType == 'cusLocaltion') {
this.timerSet = setInterval(() => { this.cusLocation.push(item);
for (let i = 0; i < 50 && index < this.pestlight.length; i++) { }
const item = this.pestlight[index]; if (item.stationType == 'orient' || item.stationType == 'livestock') {
item.iconPath = '/static/zhandian_sahchong_dingwei.png'; this.stationInfo.push(item);
item.latitude = Number(item.latitude); }
item.longitude = Number(item.longitude);
item.width = 15;
item.height = 20;
// markers
const markerItem = {
id: item.id,
iconPath: item.iconPath,
latitude: item.latitude,
longitude: item.longitude,
width: item.width,
height: item.height,
customCallout: {
anchorY: 0, // Y
anchorX: 0, // X
display: 'ALWAYS' //
},
// stationType: item.stationType,
inType: item.inType,
stationName: item.stationName,
stationCode: item.stationCode,
joinCluster: false //
};
this.markers.push(markerItem);
index++;
}
// this.markers = this.markers.concat(aa);
if (index >= this.pestlight.length) {
clearInterval(this.timerSet);
}
}, 1000);
} else {
clearInterval(this.timerSet);
this.markers = this.markers.filter((item)=>{
return item.inType !== 'pestlight'
})
}
},
qiyeChange() {
for (let i = 0; i < this.cusLocation.length; i++) {
const item = this.cusLocation[i];
item.iconPath = '/static/qiyeIcon.png';
item.latitude = Number(item.stationLatitude);
item.longitude = Number(item.stationLongitude);
item.width = 35;
item.height = 52;
this.list.push({ this.list.push({
latitude:Number(item.stationLatitude), latitude: Number(item.stationLatitude),
longitude: Number(item.stationLongitude), longitude: Number(item.stationLongitude),
stationType:item.stationType, stationType: item.stationType,
sortNo: item.sortNo, sortNo: item.sortNo,
stationName: item.stationName, stationName: item.stationName,
stationCode: item.stationCode stationCode: item.stationCode
}) });
// markers });
const markerItem = {
id: item.id, this.issscd = false;
iconPath: item.iconPath, this.isssscd = false;
latitude: item.latitude, this.qiyeChange();
longitude: item.longitude, this.list1query();
width: item.width, this.list2query();
height: item.height,
customCallout: { this.isDataLoaded = true;
anchorY: 0, // Y
anchorX: 0, // X uni.hideLoading();
display: 'ALWAYS' // console.log('地图数据加载完成,共', this.stationlist.length, '个站点');
},
stationType: item.stationType, }).catch(err => {
console.error('加载地图数据失败:', err);
uni.hideLoading();
//
uni.showToast({
title: '网络异常,请重试',
icon: 'none'
});
});
},
// stationlist
processStationList(stationlist) {
if (stationlist && Array.isArray(stationlist)) {
stationlist.forEach(item => {
this.list.push({
latitude: item.inType === 'pestlight' ? Number(item.latitude) : Number(item.stationLatitude),
longitude: item.inType === 'pestlight' ? Number(item.longitude) : Number(item.stationLongitude),
stationType: item.inType === 'pestlight' ? 'pestlight' : item.stationType,
sortNo: item.sortNo,
stationName: item.stationName, stationName: item.stationName,
stationCode: item.stationCode, stationCode: item.stationCode
joinCluster: true // });
}; });
this.markers.push(markerItem);
}
},
switch2Change() {
this.issscd = !this.issscd
this.list1query()
},
switch3Change() {
this.isssscd = !this.isssscd
this.list2query()
},
list1query(){
if (!this.issscd) {
for (let i = 0; i < this.stationInfo.length; i++) {
const item = this.stationInfo[i];
if(item.stationType === 'orient'){
item.iconPath = '/static/zhandian_nongtian_dingwei.png';
item.latitude = Number(item.stationLatitude);
item.longitude = Number(item.stationLongitude);
item.width = 35;
item.height = 52;
// markers
const markerItem = {
id: item.id,
iconPath: item.iconPath,
latitude: item.latitude,
longitude: item.longitude,
width: item.width,
height: item.height,
customCallout: {
anchorY: 0, // Y
anchorX: 0, // X
display: 'ALWAYS' //
},
stationType: item.stationType,
stationName: item.stationName,
stationCode: item.stationCode,
joinCluster: true //
};
this.markers.push(markerItem);
}
}
} else {
this.markers = this.markers.filter((item)=>{
return item.stationType !== 'orient'
})
}
},
list2query(){
if (!this.isssscd) {
for (let i = 0; i < this.stationInfo.length; i++) {
const item = this.stationInfo[i];
if(item.stationType === 'livestock'){
item.iconPath = '/static/zhandian_xuqin_dingwei.png';
item.latitude = Number(item.stationLatitude);
item.longitude = Number(item.stationLongitude);
item.width = 35;
item.height = 52;
// markers
const markerItem = {
id: item.id,
iconPath: item.iconPath,
latitude: item.latitude,
longitude: item.longitude,
width: item.width,
height: item.height,
customCallout: {
anchorY: 0, // Y
anchorX: 0, // X
display: 'ALWAYS' //
},
stationType: item.stationType,
stationName: item.stationName,
stationCode: item.stationCode,
joinCluster: true //
};
this.markers.push(markerItem);
}
}
} else {
this.markers = this.markers.filter((item)=>{
return item.stationType !== 'livestock'
})
}
} }
} },
}
// pointers
generatePointers() {
const iconConfig = {
orient: {
iconPath: '/static/zhandian_nongtian_dingwei.png',
width: 35,
height: 52
},
livestock: {
iconPath: '/static/zhandian_xuqin_dingwei.png',
width: 35,
height: 52
},
cusLocaltion: {
iconPath: '/static/qiyeIcon.png',
width: 35,
height: 52
}
};
this.list.forEach((item, i) => {
const config = iconConfig[item.stationType] || {};
item.iconPath = config.iconPath || '';
item.width = config.width || 0;
item.height = config.height || 0;
this.pointers.push({
id: i,
iconPath: item.iconPath,
latitude: Number(item.latitude),
longitude: Number(item.longitude),
width: item.width,
height: item.height,
customCallout: {
anchorY: 0,
anchorX: 0,
display: 'ALWAYS'
},
stationType: item.stationType,
stationName: item.stationName,
stationCode: item.stationCode,
joinCluster: true
});
});
},
markertap(e) {
const index = e.detail.markerId;
if (this.list[index] && ['orient', 'livestock'].includes(this.list[index].stationType)) {
uni.navigateTo({
url: `/packDetail/pages/Site/detail?item=${encodeURIComponent(JSON.stringify(this.list[index]))}`
});
}
},
callouttap(e) {
const index = e.detail.markerId;
if (this.list[index] && ['orient', 'livestock'].includes(this.list[index].stationType)) {
uni.navigateTo({
url: `/packDetail/pages/Site/detail?item=${encodeURIComponent(JSON.stringify(this.list[index]))}`
});
}
},
todetails(item) {
console.log(item, '还是个然后');
},
switch1Change() {
this.isscd = !this.isscd;
let index = 0;
if (!this.isscd) {
this.pestlightMarker = [];
this.timerSet = setInterval(() => {
for (let i = 0; i < 50 && index < this.pestlight.length; i++) {
const item = this.pestlight[index];
item.iconPath = '/static/zhandian_sahchong_dingwei.png';
item.latitude = Number(item.latitude);
item.longitude = Number(item.longitude);
item.width = 15;
item.height = 20;
const markerItem = {
id: item.id,
iconPath: item.iconPath,
latitude: item.latitude,
longitude: item.longitude,
width: item.width,
height: item.height,
customCallout: {
anchorY: 0,
anchorX: 0,
display: 'ALWAYS'
},
inType: item.inType,
stationName: item.stationName,
stationCode: item.stationCode,
joinCluster: false
};
this.markers.push(markerItem);
index++;
}
if (index >= this.pestlight.length) {
clearInterval(this.timerSet);
}
}, 1000);
} else {
clearInterval(this.timerSet);
this.markers = this.markers.filter((item) => {
return item.inType !== 'pestlight';
});
}
},
qiyeChange() {
for (let i = 0; i < this.cusLocation.length; i++) {
const item = this.cusLocation[i];
item.iconPath = '/static/qiyeIcon.png';
item.latitude = Number(item.stationLatitude);
item.longitude = Number(item.stationLongitude);
item.width = 35;
item.height = 52;
this.list.push({
latitude: Number(item.stationLatitude),
longitude: Number(item.stationLongitude),
stationType: item.stationType,
sortNo: item.sortNo,
stationName: item.stationName,
stationCode: item.stationCode
});
const markerItem = {
id: item.id,
iconPath: item.iconPath,
latitude: item.latitude,
longitude: item.longitude,
width: item.width,
height: item.height,
customCallout: {
anchorY: 0,
anchorX: 0,
display: 'ALWAYS'
},
stationType: item.stationType,
stationName: item.stationName,
stationCode: item.stationCode,
joinCluster: true
};
this.markers.push(markerItem);
}
},
switch2Change() {
this.issscd = !this.issscd;
this.list1query();
},
switch3Change() {
this.isssscd = !this.isssscd;
this.list2query();
},
list1query() {
if (!this.issscd) {
for (let i = 0; i < this.stationInfo.length; i++) {
const item = this.stationInfo[i];
if (item.stationType === 'orient') {
item.iconPath = '/static/zhandian_nongtian_dingwei.png';
item.latitude = Number(item.stationLatitude);
item.longitude = Number(item.stationLongitude);
item.width = 35;
item.height = 52;
const markerItem = {
id: item.id,
iconPath: item.iconPath,
latitude: item.latitude,
longitude: item.longitude,
width: item.width,
height: item.height,
customCallout: {
anchorY: 0,
anchorX: 0,
display: 'ALWAYS'
},
stationType: item.stationType,
stationName: item.stationName,
stationCode: item.stationCode,
joinCluster: true
};
this.markers.push(markerItem);
}
}
} else {
this.markers = this.markers.filter((item) => {
return item.stationType !== 'orient';
});
}
},
list2query() {
if (!this.isssscd) {
for (let i = 0; i < this.stationInfo.length; i++) {
const item = this.stationInfo[i];
if (item.stationType === 'livestock') {
item.iconPath = '/static/zhandian_xuqin_dingwei.png';
item.latitude = Number(item.stationLatitude);
item.longitude = Number(item.stationLongitude);
item.width = 35;
item.height = 52;
const markerItem = {
id: item.id,
iconPath: item.iconPath,
latitude: item.latitude,
longitude: item.longitude,
width: item.width,
height: item.height,
customCallout: {
anchorY: 0,
anchorX: 0,
display: 'ALWAYS'
},
stationType: item.stationType,
stationName: item.stationName,
stationCode: item.stationCode,
joinCluster: true
};
this.markers.push(markerItem);
}
}
} else {
this.markers = this.markers.filter((item) => {
return item.stationType !== 'livestock';
});
}
}
}
}
</script> </script>
<style lang="scss"> <style lang="scss">