Commit 77054452 by zhangxw

Merge remote-tracking branch 'origin/1.7.1' into zxw-v1.8.0 同步1.7.1紧急版本代码

2 parents afb0965b 85e7f91d
...@@ -142,6 +142,41 @@ let nextDay = { ...@@ -142,6 +142,41 @@ let nextDay = {
onClick(picker) { onClick(picker) {
let value = moment(picker.date).subtract(-1, 'day').format('YYYY-MM-DD') let value = moment(picker.date).subtract(-1, 'day').format('YYYY-MM-DD')
picker.$emit('pick', value) picker.$emit('pick', value)
}
}
// 最近一天不在线
let latelyOneDay = {
text: "近1天不在线",
onClick(picker) {
const end = moment().format("YYYY-MM-DD HH:mm:ss");
const start = moment()
.day(moment().day() - 1)
.format("YYYY-MM-DD HH:mm:ss");
picker.$emit("pick", [start, end]);
},
}
// 最近三天不在线
let latelyThreeDay = {
text: "近3天不在线",
onClick(picker) {
const end = moment().format("YYYY-MM-DD HH:mm:ss");
const start = moment()
.day(moment().day() - 3)
.format("YYYY-MM-DD HH:mm:ss");
picker.$emit("pick", [start, end]);
},
}
// 最近7天不在线
let latelySevenDay = {
text: "近7天不在线",
onClick(picker) {
const end = moment().format("YYYY-MM-DD HH:mm:ss");
const start = moment()
.day(moment().day() - 7)
.format("YYYY-MM-DD HH:mm:ss");
picker.$emit("pick", [start, end]);
}, },
} }
...@@ -202,6 +237,7 @@ export const staticReportCarShortcuts = [ ...@@ -202,6 +237,7 @@ export const staticReportCarShortcuts = [
lastMonth lastMonth
] ]
<<<<<<< HEAD
// 警情研判 // 警情研判
export const alarmShortcuts = [ export const alarmShortcuts = [
lastDay, lastDay,
...@@ -216,3 +252,19 @@ export const alarmLogShortcuts = [ ...@@ -216,3 +252,19 @@ export const alarmLogShortcuts = [
nearly7Days, nearly7Days,
nearly15Days nearly15Days
] ]
=======
// 离线报警-离线时间
export const offlineShortcuts = [
latelyOneDay,
latelyThreeDay,
latelySevenDay
]
// 离线报警-激活时间
export const offlineActiveShortcuts = [
allDays,
nearly3Days,
nearly7Days,
currentMonth
]
>>>>>>> origin/1.7.1
...@@ -43,6 +43,9 @@ ...@@ -43,6 +43,9 @@
.alone_data_picker{ .alone_data_picker{
width: 150px; width: 150px;
} }
.datatime_picker{
width: 360px;
}
.mr5{ .mr5{
margin-right:5px; margin-right:5px;
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div class="search_box"> <div class="search_box">
<el-form :inline="true" size="small"> <el-form :inline="true" size="small">
<el-form-item label="离线时间:"> <el-form-item label="离线时间:">
<el-date-picker v-model="searchForm.offDate" type="daterange" class="data_picker" unlink-panels range-separator="~" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd" :picker-options="offPickerOptions"> <el-date-picker v-model="searchForm.offDate" type="datetimerange" class="datatime_picker" unlink-panels range-separator="~" start-placeholder="开始日期" end-placeholder="结束日期" value-format="yyyy-MM-dd HH:mm:ss" :picker-options="offPickerOptions" @change="onChangeDate">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="激活区间:"> <el-form-item label="激活区间:">
...@@ -87,8 +87,8 @@ import moment from "moment"; ...@@ -87,8 +87,8 @@ import moment from "moment";
import GlsxOrganization from "@/components/glsx-organization"; import GlsxOrganization from "@/components/glsx-organization";
import { GETOFFLINESEARCH, ALARM_OFFLINE_EXPORT } from "@/services/alarmCenter"; import { GETOFFLINESEARCH, ALARM_OFFLINE_EXPORT } from "@/services/alarmCenter";
import { deepClone, showToast } from "@/utils/util"; import { deepClone, showToast } from "@/utils/util";
import store from "@/store"; import { offlineShortcuts, offlineActiveShortcuts } from "@/common";
import qs from 'qs' import qs from "qs";
export default { export default {
components: { components: {
GlsxOrganization, GlsxOrganization,
...@@ -106,78 +106,10 @@ export default { ...@@ -106,78 +106,10 @@ export default {
showResult: false, showResult: false,
loading: false, loading: false,
offPickerOptions: { offPickerOptions: {
shortcuts: [ shortcuts: offlineShortcuts,
{
text: "近1天不在线",
onClick(picker) {
const end = moment().format("YYYY-MM-DD");
const start = moment()
.day(moment().day() - 1)
.format("YYYY-MM-DD");
picker.$emit("pick", [start, end]);
},
},
{
text: "近3天不在线",
onClick(picker) {
const end = moment().format("YYYY-MM-DD");
const start = moment()
.day(moment().day() - 3)
.format("YYYY-MM-DD");
picker.$emit("pick", [start, end]);
},
},
{
text: "近7天不在线",
onClick(picker) {
const end = moment().format("YYYY-MM-DD");
const start = moment()
.day(moment().day() - 7)
.format("YYYY-MM-DD");
picker.$emit("pick", [start, end]);
},
},
],
}, },
pickerOptions: { pickerOptions: {
shortcuts: [ shortcuts: offlineActiveShortcuts,
{
text: "全部",
onClick(picker) {
const end = "";
const start = "";
picker.$emit("pick", [start, end]);
},
},
{
text: "近3天",
onClick(picker) {
const end = moment().format("YYYY-MM-DD");
const start = moment()
.day(moment().day() - 3)
.format("YYYY-MM-DD");
picker.$emit("pick", [start, end]);
},
},
{
text: "近7天",
onClick(picker) {
const end = moment().format("YYYY-MM-DD");
const start = moment()
.day(moment().day() - 7)
.format("YYYY-MM-DD");
picker.$emit("pick", [start, end]);
},
},
{
text: "本月",
onClick(picker) {
const start = moment().add("month", 0).format("YYYY-MM") + "-01";
const end = moment().format("YYYY-MM-DD");
picker.$emit("pick", [start, end]);
},
},
],
}, },
filterVisible: false, filterVisible: false,
orgInfo: {}, orgInfo: {},
...@@ -186,18 +118,43 @@ export default { ...@@ -186,18 +118,43 @@ export default {
}; };
}, },
created() { created() {
let end = moment().format("YYYY-MM-DD"); let query = this.$route.query;
let end = moment().format("YYYY-MM-DD HH:mm:ss");
let start = moment() let start = moment()
.day(moment().day() - 3) .day(moment().day() - 3)
.format("YYYY-MM-DD"); .format("YYYY-MM-DD HH:mm:ss");
if (query.startTime) {
this.$set(this.searchForm, "offDate", [query.startTime, query.endTime]);
} else {
this.$set(this.searchForm, "offDate", [start, end]); this.$set(this.searchForm, "offDate", [start, end]);
}
// 动态设置禁用日期
let disabledDate = function (e) {
let n = moment(e).format("x");
let max = moment().format("x");
if (query.endTime) {
max = moment(query.endTime).format("x");
}
if (n < max) {
return false;
} else {
return true;
}
};
this.$set(this.offPickerOptions, "disabledDate", disabledDate);
this.getList(); this.getList();
}, },
mounted() {}, mounted() {},
methods: { methods: {
// 重置 // 重置
rest() { rest() {
this.searchForm = { deviceTypeAndSource: "" }; let end = moment().format("YYYY-MM-DD HH:mm:ss");
let start = moment()
.day(moment().day() - 3)
.format("YYYY-MM-DD HH:mm:ss");
this.searchForm = { deviceTypeAndSource: "", offDate: [start, end] };
this.getList(); this.getList();
}, },
...@@ -285,9 +242,13 @@ export default { ...@@ -285,9 +242,13 @@ export default {
//let a = window.location.origin; //let a = window.location.origin;
let path = `/oEshield#/monitor/activeLocation?${qs.stringify(oParams)}`; let path = `/oEshield#/monitor/activeLocation?${qs.stringify(oParams)}`;
this.$root.parentCommon.setBreadCrumbs(path); this.$root.parentCommon.setBreadCrumbs(path);
window.open(path) window.open(path);
//history.pushState(oParams, "报警位置点", path); //history.pushState(oParams, "报警位置点", path);
}, },
onChangeDate(e) {
console.log(e);
},
}, },
}; };
</script> </script>
......
...@@ -52,34 +52,34 @@ ...@@ -52,34 +52,34 @@
<!-- 表格区域 开始 --> <!-- 表格区域 开始 -->
<div class="table_box"> <div class="table_box">
<el-table class="el_table" :data="tableData" border size="small" v-loading="tloading"> <el-table class="el_table" :data="tableData" border size="small" v-loading="tloading">
<el-table-column label="工单号" prop="workOrderNo"> <el-table-column label="工单号" prop="workOrderNo" show-overflow-tooltip>
<template slot-scope="{row}">{{row.workOrderNo||'--'}}</template> <template slot-scope="{row}">{{row.workOrderNo||'--'}}</template>
</el-table-column> </el-table-column>
<el-table-column label="姓名" prop="ownerName"> <el-table-column label="姓名" prop="ownerName" show-overflow-tooltip>
<template slot-scope="{row}">{{row.ownerName||'--'}}</template> <template slot-scope="{row}">{{row.ownerName||'--'}}</template>
</el-table-column> </el-table-column>
<el-table-column label="车架号" prop="vin"> <el-table-column label="车架号" prop="vin" show-overflow-tooltip>
<template slot-scope="{row}">{{row.vin||'--'}}</template> <template slot-scope="{row}">{{row.vin||'--'}}</template>
</el-table-column> </el-table-column>
<el-table-column label="设备号" prop="sn"> <el-table-column label="设备号" prop="sn" show-overflow-tooltip>
<template slot-scope="{row}">{{row.sn||'--'}}</template> <template slot-scope="{row}">{{row.sn||'--'}}</template>
</el-table-column> </el-table-column>
<el-table-column label="设备类型" prop="deviceTypeStr"> <el-table-column label="设备类型" prop="deviceTypeStr" show-overflow-tooltip>
<template slot-scope="{row}">{{(row.deviceTypeStr||'') + (row.sourceStr && row.deviceTypeStr?'/':'') + (row.sourceStr||'')}}</template> <template slot-scope="{row}">{{(row.deviceTypeStr||'') + (row.sourceStr && row.deviceTypeStr?'/':'') + (row.sourceStr||'')}}</template>
</el-table-column> </el-table-column>
<el-table-column label="是否在线" prop="isOnLineStr"> <el-table-column label="是否在线" prop="isOnLineStr" show-overflow-tooltip>
<template slot-scope="{row}">{{row.isOnLineStr||'--'}}</template> <template slot-scope="{row}">{{row.isOnLineStr||'--'}}</template>
</el-table-column> </el-table-column>
<el-table-column label="车辆归属" prop="shopName"> <el-table-column label="车辆归属" prop="shopName" show-overflow-tooltip>
<template slot-scope="{row}">{{row.shopName||'--'}}</template> <template slot-scope="{row}">{{row.shopName||'--'}}</template>
</el-table-column> </el-table-column>
<el-table-column label="激活时间" prop="activeDate"> <el-table-column label="激活时间" prop="activeDate" show-overflow-tooltip>
<template slot-scope="{row}">{{row.activeDate||'--'}}</template> <template slot-scope="{row}">{{row.activeDate||'--'}}</template>
</el-table-column> </el-table-column>
<el-table-column label="激活经纬度" prop="lngAndLat"> <el-table-column label="激活经纬度" prop="lngAndLat" show-overflow-tooltip>
<template slot-scope="{row}">{{row.lngAndLat||'--'}}</template> <template slot-scope="{row}">{{row.lngAndLat||'--'}}</template>
</el-table-column> </el-table-column>
<el-table-column label="激活地址" prop="activeAddress"> <el-table-column label="激活地址" prop="activeAddress" show-overflow-tooltip>
<template slot-scope="{row}">{{row.activeAddress||'--'}}</template> <template slot-scope="{row}">{{row.activeAddress||'--'}}</template>
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="180px"> <el-table-column label="操作" fixed="right" align="center" width="180px">
......
...@@ -103,7 +103,7 @@ ...@@ -103,7 +103,7 @@
</el-table-column> </el-table-column>
<el-table-column label="激活时间" prop="activateTime" show-overflow-tooltip></el-table-column> <el-table-column label="激活时间" prop="activateTime" show-overflow-tooltip></el-table-column>
<el-table-column label="设备状态" prop="deviceStateStr" show-overflow-tooltip> <el-table-column label="设备状态" prop="deviceStateStr" show-overflow-tooltip>
<template slot-scope="{row}">{{row.deviceStateStr||'--'}}</template> <!-- <template slot-scope="{row}">{{row.deviceStateStr||'--'}}</template> -->
</el-table-column> </el-table-column>
<el-table-column label="特殊状态" prop="specialState" show-overflow-tooltip></el-table-column> <el-table-column label="特殊状态" prop="specialState" show-overflow-tooltip></el-table-column>
<el-table-column label="是否结清" prop="settleFlag" show-overflow-tooltip> <el-table-column label="是否结清" prop="settleFlag" show-overflow-tooltip>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!