|
@@ -115,11 +115,11 @@
|
|
|
<template #default="{ row }">
|
|
|
<span v-if="item.code == 'rank'">{{ getRank(row.rank) }}</span>
|
|
|
<span
|
|
|
- v-else-if="item.code == 'endts' && item.title == '是否解除'"
|
|
|
- >{{ row.endts ? "已解除" : "未解除" }}</span
|
|
|
+ v-else-if="item.code == 'closeTime' && item.title == '是否解除'"
|
|
|
+ >{{ row.closeTime ? "已解除" : "未解除" }}</span
|
|
|
>
|
|
|
- <span v-else-if="item.code == 'endts'">{{
|
|
|
- row.endts ? getTime(row.endts) : "--"
|
|
|
+ <span v-else-if="item.code == 'closeTime'">{{
|
|
|
+ row.closeTime ? getTime(row.closeTime) : "--"
|
|
|
}}</span>
|
|
|
<span v-else>{{ row[item.code] }}</span>
|
|
|
</template>
|
|
@@ -149,7 +149,7 @@ import GFtunliuwuyuan from "./components/tunliuwuyuan.vue";
|
|
|
import GFyanggaoweijiabao from "./components/yanggaoweijiabao.vue";
|
|
|
import GFyingxianjinghui from "./components/yingxianjinghui.vue";
|
|
|
import GFyouyuyouwei from "./components/youyuyouwei.vue";
|
|
|
-import { GetTableData } from "@/api/zhbj/index.js";
|
|
|
+import { GetDeviceTableData } from "@/api/zhbj/index.js";
|
|
|
import dayjs from "dayjs";
|
|
|
import { ElMessageBox } from "element-plus";
|
|
|
export default {
|
|
@@ -180,11 +180,11 @@ export default {
|
|
|
end: "",
|
|
|
page: { currentPage: 1, pagesize: 22, total: 0 },
|
|
|
tableHeader: [
|
|
|
- { title: "时间", code: "ts", width: "160" },
|
|
|
- { title: "场站名称", code: "stationname", width: "150" },
|
|
|
+ { title: "时间", code: "lastUpdateTime", width: "160" },
|
|
|
+ { title: "场站名称", code: "stationName", width: "150" },
|
|
|
{ title: "报警描述", code: "description" },
|
|
|
- { title: "是否解除", code: "endts", width: "110" },
|
|
|
- { title: "解除时间", code: "endts", width: "160" },
|
|
|
+ { title: "是否解除", code: "closeTime", width: "110" },
|
|
|
+ // { title: "解除时间", code: "closeTime", width: "160" },
|
|
|
{ title: "是否确认", code: "confirmed", width: "110" },
|
|
|
],
|
|
|
};
|
|
@@ -198,8 +198,8 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
- getTime(endts) {
|
|
|
- return dayjs(endts).format("YYYY-MM-DD HH:mm:ss");
|
|
|
+ getTime(closeTime) {
|
|
|
+ return dayjs(closeTime).format("YYYY-MM-DD HH:mm:ss");
|
|
|
},
|
|
|
// 时间选择器第一个禁用
|
|
|
disabledDate(time) {
|
|
@@ -236,11 +236,8 @@ export default {
|
|
|
handleAlarm(id, name) {
|
|
|
this.sub = id;
|
|
|
this.title = name;
|
|
|
- this.begin = dayjs()
|
|
|
- // .add(-2, "day")
|
|
|
- .startOf("day")
|
|
|
- .format("YYYY-MM-DD HH:mm:ss");
|
|
|
- this.end = dayjs().format("YYYY-MM-DD HH:mm:ss");
|
|
|
+ this.begin = "";
|
|
|
+ this.end = "";
|
|
|
this.getAlarm(true);
|
|
|
},
|
|
|
getAlarm(flag) {
|
|
@@ -255,14 +252,17 @@ export default {
|
|
|
description: this.description,
|
|
|
pageNum: this.page.currentPage,
|
|
|
pageSize: this.page.pagesize,
|
|
|
+ isclose: false,
|
|
|
};
|
|
|
- GetTableData(params).then(({ data }) => {
|
|
|
- if (data.ls.length) {
|
|
|
- this.drawerList = data.ls.map((item) => {
|
|
|
+ GetDeviceTableData(params).then(({ data }) => {
|
|
|
+ if (data.records.length) {
|
|
|
+ this.drawerList = data.records.map((item) => {
|
|
|
return {
|
|
|
...item,
|
|
|
confirmed: item.confirmed ? "是" : "否",
|
|
|
- ts: dayjs(item.ts).format("YYYY-MM-DD HH:mm:ss"),
|
|
|
+ lastUpdateTime: dayjs(item.lastUpdateTime).format(
|
|
|
+ "YYYY-MM-DD HH:mm:ss"
|
|
|
+ ),
|
|
|
};
|
|
|
});
|
|
|
this.page.total = data.total;
|