Commit d359bba1 by 张杰

1111

1 parent 6b924cd1
......@@ -97,7 +97,7 @@ export default {
},
data() {
return {
searchForm: {alarmStatus:1,alarmType:''},
searchForm: { alarmStatus: 1, alarmType: "" },
currentPage: 1,
pageSizes: [10, 20, 30, 40],
pageSize: 10,
......@@ -126,41 +126,30 @@ export default {
},
},
{
text: "昨日",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 1);
picker.$emit("pick", [start, end]);
},
},
{
text: "近7天",
text: "近3天",
onClick(picker) {
const end = moment().format("YYYY-MM-DD");
const start = moment()
.day(moment().day() - 7)
.day(moment().day() - 3)
.format("YYYY-MM-DD");
picker.$emit("pick", [start, end]);
},
},
{
text: "近15天",
text: "近7天",
onClick(picker) {
const end = moment().format("YYYY-MM-DD");
const start = moment()
.day(moment().day() - 15)
.day(moment().day() - 7)
.format("YYYY-MM-DD");
picker.$emit("pick", [start, end]);
},
},
{
text: "近30天",
text: "本月",
onClick(picker) {
const start = moment().add("month", 0).format("YYYY-MM") + "-01";
const end = moment().format("YYYY-MM-DD");
const start = moment()
.day(moment().day() - 30)
.format("YYYY-MM-DD");
picker.$emit("pick", [start, end]);
},
},
......@@ -184,7 +173,7 @@ export default {
methods: {
// 重置
rest() {
this.searchForm = {alarmType:''};
this.searchForm = { alarmType: "" };
this.getList();
},
......@@ -257,7 +246,7 @@ export default {
oParams.standNo = row.vin;
oParams.time = row.alarmBeginTime;
let path = `/oEshield#/monitor/activeLocation`;
history.pushState(oParams, "报警位置点", path);
},
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!