Commit fcab77aa by 张杰

修复bug

1 parent 6cf56b2d
...@@ -231,3 +231,12 @@ export const offlineActiveShortcuts = [ ...@@ -231,3 +231,12 @@ export const offlineActiveShortcuts = [
nearly7Days, nearly7Days,
currentMonth currentMonth
] ]
//通用防拆报警-报警时间
export const tamperAlarmShortcuts = [
currentDay,
yesterday,
nearly7Days,
currentWeek,
currentMonth
]
\ No newline at end of file \ No newline at end of file
...@@ -140,9 +140,9 @@ export default { ...@@ -140,9 +140,9 @@ export default {
// 动态设置禁用日期 // 动态设置禁用日期
let disabledDate = function (e) { let disabledDate = function (e) {
let n = moment(e).format("x"); let n = moment(e).format("x");
let max = moment().format("x"); let max = moment().subtract(1,'day').format("x");
if (query.endTime) { if (query.endTime) {
max = moment(query.endTime).format("x"); max = moment(query.endTime).subtract(1,'day').format("x");
} }
if (n < max) { if (n < max) {
return false; return false;
...@@ -248,7 +248,7 @@ export default { ...@@ -248,7 +248,7 @@ export default {
oParams.bsTime = row.lastBsTime; oParams.bsTime = row.lastBsTime;
//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);
}, },
......
...@@ -92,6 +92,8 @@ import { ...@@ -92,6 +92,8 @@ import {
ALARM_COMMONTEARDOWN_EXPORT, ALARM_COMMONTEARDOWN_EXPORT,
} from "@/services/alarmCenter"; } from "@/services/alarmCenter";
import { deepClone, showToast } from "@/utils/util"; import { deepClone, showToast } from "@/utils/util";
import {tamperAlarmShortcuts} from '@/common'
import qs from 'qs'
export default { export default {
components: { components: {
GlsxOrganization, GlsxOrganization,
...@@ -109,51 +111,7 @@ export default { ...@@ -109,51 +111,7 @@ export default {
showResult: false, showResult: false,
loading: false, loading: false,
pickerOptions: { pickerOptions: {
shortcuts: [ shortcuts: tamperAlarmShortcuts,
{
text: "今日",
onClick(picker) {
const end = new Date();
const start = new Date();
picker.$emit("pick", [start, end]);
},
},
{
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天",
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 end = moment().format("YYYY-MM-DD");
const start = moment().weekday(1).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]);
},
},
],
onPick: ({ maxDate, minDate }) => { onPick: ({ maxDate, minDate }) => {
this.pickerMinDate = minDate.getTime(); this.pickerMinDate = minDate.getTime();
if (maxDate) { if (maxDate) {
...@@ -266,8 +224,10 @@ export default { ...@@ -266,8 +224,10 @@ export default {
oParams.standNo = row.vin; oParams.standNo = row.vin;
oParams.time = row.alarmEffectTime; oParams.time = row.alarmEffectTime;
let path = `/oEshield#/monitor/activeLocation`; //let path = `/oEshield#/monitor/activeLocation`;
history.pushState(oParams, "报警位置点", path); let path = `/oEshield#/monitor/activeLocation?${qs.stringify(oParams)}`;
window.open(path);
//history.pushState(oParams, "报警位置点", path);
}, },
// //
......
...@@ -386,7 +386,12 @@ import { getOrgTree } from "services/common"; ...@@ -386,7 +386,12 @@ import { getOrgTree } from "services/common";
import AuthButton from "@/components/auth-button"; import AuthButton from "@/components/auth-button";
import moment from "moment"; import moment from "moment";
import GlsxOrganization from "@/components/glsx-organization"; import GlsxOrganization from "@/components/glsx-organization";
import { VEHICLE_USE_LIST, VEHICLE_TAG_LIST,SETTLEFLAGLIST,SETTLE_FLAG_LIST } from "@/common/constants"; import {
VEHICLE_USE_LIST,
VEHICLE_TAG_LIST,
SETTLEFLAGLIST,
SETTLE_FLAG_LIST,
} from "@/common/constants";
export default { export default {
components: { components: {
freqModal, freqModal,
...@@ -439,7 +444,7 @@ export default { ...@@ -439,7 +444,7 @@ export default {
return { return {
VEHICLE_USE_LIST, VEHICLE_USE_LIST,
VEHICLE_TAG_LIST, VEHICLE_TAG_LIST,
searchForm: {settleFlag:''}, searchForm: { settleFlag: "" },
getListApi: getVehicleList, getListApi: getVehicleList,
authList: [ authList: [
...@@ -826,8 +831,8 @@ export default { ...@@ -826,8 +831,8 @@ export default {
], ],
VEHICLE_ONLINE_STATUS, VEHICLE_ONLINE_STATUS,
ajaxLoading: false, ajaxLoading: false,
settleFlagList:SETTLEFLAGLIST, settleFlagList: SETTLEFLAGLIST,
SETTLE_FLAG_LIST SETTLE_FLAG_LIST,
}; };
}, },
...@@ -880,7 +885,7 @@ export default { ...@@ -880,7 +885,7 @@ export default {
refresh() { refresh() {
this.pageSize = 10; this.pageSize = 10;
this.pageNumber = 1; this.pageNumber = 1;
this.searchForm = {settleFlag:''}; this.searchForm = { settleFlag: "" };
this.getList(); this.getList();
}, },
...@@ -922,7 +927,7 @@ export default { ...@@ -922,7 +927,7 @@ export default {
//this.snForm.deviceArr = [{ sn: "", deviceType: "" }]; //this.snForm.deviceArr = [{ sn: "", deviceType: "" }];
//this.snForm.deviceInfoDtos = [{}]; //this.snForm.deviceInfoDtos = [{}];
this.snForm = {settleFlag:0}; this.snForm = { settleFlag: 0 };
this.$set(this.snForm, "deviceInfoDtos", [ this.$set(this.snForm, "deviceInfoDtos", [
{ sn: "", deviceClassifyName: "" }, { sn: "", deviceClassifyName: "" },
]); ]);
...@@ -1017,18 +1022,25 @@ export default { ...@@ -1017,18 +1022,25 @@ export default {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}).then(() => { beforeClose: (action, instance, done) => {
if (action === "cancel") {
done();
return;
}
instance.confirmButtonLoading = true;
instance.confirmButtonText = "提交中...";
deleteNewVehicle({ deleteNewVehicle({
vdId: scope.vdId, vdId: scope.vdId,
//sn: scope.sn //sn: scope.sn
}).then((res) => { }).then((res) => {
const { code, message } = res; const { code, message } = res;
instance.confirmButtonLoading = false;
if (code == 200) { if (code == 200) {
done();
this.$message({ this.$message({
type: "success", type: "success",
message: "删除成功!", message: "删除成功!",
}); });
//this.$refs.vehicleForm.refreshTable();
this.getList(); this.getList();
} else { } else {
this.$message({ this.$message({
...@@ -1037,7 +1049,10 @@ export default { ...@@ -1037,7 +1049,10 @@ export default {
}); });
} }
}); });
}); },
})
.then(() => {})
.catch(() => {});
break; break;
case "unbind": case "unbind":
this.$confirm("是否要解绑, 是否继续?", "提示", { this.$confirm("是否要解绑, 是否继续?", "提示", {
...@@ -1074,8 +1089,8 @@ export default { ...@@ -1074,8 +1089,8 @@ export default {
break; break;
case "export": case "export":
let oParams = this.getParams(); let oParams = this.getParams();
delete oParams.pageSize delete oParams.pageSize;
delete oParams.pageNumber delete oParams.pageNumber;
this.$Common.exportExcel({ this.$Common.exportExcel({
url: `${store.state.baseURL}/trialdrive/vehicle/vehicleinfo/export`, url: `${store.state.baseURL}/trialdrive/vehicle/vehicleinfo/export`,
method: "GET", method: "GET",
...@@ -1716,17 +1731,15 @@ export default { ...@@ -1716,17 +1731,15 @@ export default {
}, },
// 是否有权限 // 是否有权限
hasPermission(id){ hasPermission(id) {
return this.$hasPermission(id) return this.$hasPermission(id);
}, },
// 搜索 // 搜索
searchEvent(){ searchEvent() {
this.pageNumber = 1; this.pageNumber = 1;
this.getList() this.getList();
} },
}, },
}; };
</script> </script>
...@@ -1860,13 +1873,13 @@ export default { ...@@ -1860,13 +1873,13 @@ export default {
border-color: #c6e2ff; border-color: #c6e2ff;
background: #ecf5ff; background: #ecf5ff;
} }
.el_switch_box{ .el_switch_box {
display:flex; display: flex;
align-items: center; align-items: center;
.tips{ .tips {
font-size:12px; font-size: 12px;
color:#333; color: #333;
margin-left:10px; margin-left: 10px;
} }
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!