增加事件类型
This commit is contained in:
parent
d423f16696
commit
5dc45ea340
|
|
@ -145,8 +145,8 @@ export default {
|
||||||
tableData: [],
|
tableData: [],
|
||||||
coloumData: [
|
coloumData: [
|
||||||
{
|
{
|
||||||
label: "防区名称",
|
label: "事件类型",
|
||||||
prop: "positionName",
|
prop: "flyStatus",
|
||||||
align: "center"
|
align: "center"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -236,14 +236,24 @@ export default {
|
||||||
alarmList(params).then((res) => {
|
alarmList(params).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.tableData = res.data.items.map((item) => {
|
this.tableData = res.data.items.map((item) => {
|
||||||
const { isWhitelist, duration, frequency, ...rest } = item;
|
const { isWhitelist, duration, frequency, alarmLevel, ...rest } =
|
||||||
|
item;
|
||||||
|
|
||||||
|
let flyStatus = "";
|
||||||
|
if (isWhitelist) {
|
||||||
|
flyStatus = "白飞";
|
||||||
|
} else {
|
||||||
|
flyStatus = alarmLevel === 0 ? "防区外" : "入侵";
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
...rest,
|
...rest,
|
||||||
isattacked: item.isattacked ? "是" : "否",
|
isattacked: item.isattacked ? "是" : "否", // 保留你原本的逻辑
|
||||||
duration: String(item.duration),
|
duration: String(item.duration),
|
||||||
frequency: String(item.frequency)
|
frequency: String(item.frequency),
|
||||||
|
flyStatus // 新增字段
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
this.paginationParam.total = res.data.total;
|
this.paginationParam.total = res.data.total;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue