|
@@ -8,7 +8,7 @@
|
|
|
<div class="timeList">
|
|
|
<div
|
|
|
class="timeItem"
|
|
|
- v-for="(item, index) in recordData.slice(
|
|
|
+ v-for="(item, index) in getData.slice(
|
|
|
(currentPage - 1) * Count,
|
|
|
currentPage * Count
|
|
|
)"
|
|
@@ -59,13 +59,13 @@ export default {
|
|
|
StationID: "",
|
|
|
|
|
|
// 总数据
|
|
|
- recordData: [],
|
|
|
+ getData: [],
|
|
|
// 默认显示第几页
|
|
|
currentPage: 1,
|
|
|
// 总条数,根据接口获取数据长度(注意:这里不能为空)
|
|
|
TotalCount: 1,
|
|
|
// 默认每页显示的条数(可修改)
|
|
|
- Count: 10,
|
|
|
+ Count: 5,
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -76,53 +76,7 @@ export default {
|
|
|
|
|
|
created() {
|
|
|
this.StationID = this.$store.state.StationID;
|
|
|
-
|
|
|
- (this.recordData = [
|
|
|
- {
|
|
|
- Time: "2021-06-15 13:01:14",
|
|
|
- },
|
|
|
- {
|
|
|
- Time: "2021-06-15 13:01:09",
|
|
|
- },
|
|
|
- {
|
|
|
- Time: "2021-06-15 13:01:04",
|
|
|
- },
|
|
|
- {
|
|
|
- Time: "2021-06-15 13:00:59",
|
|
|
- },
|
|
|
- {
|
|
|
- Time: "2021-06-15 13:00:54",
|
|
|
- },
|
|
|
- {
|
|
|
- Time: "2021-06-15 15:01:14",
|
|
|
- },
|
|
|
- {
|
|
|
- Time: "2021-06-15 16:01:09",
|
|
|
- },
|
|
|
- {
|
|
|
- Time: "2021-06-15 17:01:04",
|
|
|
- },
|
|
|
- {
|
|
|
- Time: "2021-06-15 18:00:59",
|
|
|
- },
|
|
|
- {
|
|
|
- Time: "2021-06-15 19:00:54",
|
|
|
- },
|
|
|
- {
|
|
|
- Time: "2021-06-15 13:00:59",
|
|
|
- },
|
|
|
- {
|
|
|
- Time: "2021-06-15 13:00:54",
|
|
|
- },
|
|
|
- {
|
|
|
- Time: "2021-06-15 15:01:14",
|
|
|
- },
|
|
|
- {
|
|
|
- Time: "2021-06-15 16:01:09",
|
|
|
- },
|
|
|
- ]),
|
|
|
- // 将数据的长度赋值给TotalCount
|
|
|
- (this.TotalCount = this.recordData.length);
|
|
|
+
|
|
|
},
|
|
|
|
|
|
mounted() {
|
|
@@ -140,24 +94,28 @@ export default {
|
|
|
|
|
|
json.CMD = "getPatrolRecord";
|
|
|
json.StationID = this.StationID;
|
|
|
- (json.Start = 0), (json.Limit = 2), (json.Order = "DESC");
|
|
|
+ (json.Start = 0), (json.Limit = 5), (json.Order = "DESC");
|
|
|
|
|
|
- // this.global.sendWs(json);
|
|
|
+ this.global.sendWs(json);
|
|
|
|
|
|
- setInterval(() => {
|
|
|
- console.log("每隔30秒请求一次getPatrolRecord");
|
|
|
- this.global.sendWs(json);
|
|
|
- }, 30000);
|
|
|
+ // setInterval(() => {
|
|
|
+ // console.log("每隔30秒请求一次getPatrolRecord");
|
|
|
+ // this.global.sendWs(json);
|
|
|
+ // }, 30000);
|
|
|
}
|
|
|
|
|
|
if (redata.CMD == "getPatrolRecord") {
|
|
|
- this.recordData = redata.RESULT.LIST;
|
|
|
- console.log("this.recordData");
|
|
|
- console.log(this.recordData);
|
|
|
+ this.getData = redata.RESULT.LIST;
|
|
|
+ // 将数据的长度赋值给TotalCount
|
|
|
+ this.TotalCount = redata.TotalCount;
|
|
|
+ console.log("this.getData");
|
|
|
+ console.log(this.getData);
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
|
|
|
+
|
|
|
+
|
|
|
goInspectDetail(item) {
|
|
|
this.$router.push({
|
|
|
path: "/inspectRecord",
|