Commit fcab77aa by 张杰

修复bug

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