data ( ) {
return {
arr: [
{
address: "地址" ,
deviceid: "1987467882" ,
latitude: 31.132138 ,
longitude: 121.340014 ,
station: "上海诗林" ,
timestamp: "1970-01-19 22:12:51" ,
type: "主站报警"
} ,
{
address: "地址" ,
deviceid: "1987467882" ,
latitude: 31.132138 ,
longitude: 121.340014 ,
station: "上海诗林" ,
timestamp: "1970-01-19 22:12:51" ,
type: "主站报警"
} ,
{
address: "地址" ,
deviceid: "1987467883" ,
latitude: 31.132138 ,
longitude: 121.340014 ,
station: "中春路地铁站" ,
timestamp: "1970-01-19 22:12:51" ,
type: "主站报警"
} ,
{
address: "地址" ,
deviceid: "1987467883" ,
latitude: 31.132138 ,
longitude: 121.340014 ,
station: "中春路地铁站" ,
timestamp: "1970-01-19 22:12:51" ,
type: "主站报警"
}
]
}
} ,
mounted ( ) {
var alarmID = '1987467883'
for ( var i = this . arr. length - 1 ; i >= 0 ; i-- ) {
if ( this . arr[ i] . deviceid === alarmID) {
this . arr. splice ( i, 1 ) ;
}
}
console. log ( this . arr)
}