Commit 140ff6fc authored by liuzhaoh's avatar liuzhaoh

BUG修复—2

parent 55317571
......@@ -379,7 +379,7 @@ onMounted(async () => {
if (suspendStartTime) {
formInline.value.date[0] = suspendStartTime;
}
if (deviceName) {
if (suspendEndTime) {
formInline.value.date[1] = suspendEndTime;
}
}
......
......@@ -634,6 +634,9 @@ import { ElMessage } from 'element-plus'
import { storeToRefs } from 'pinia'
import { useUsersStore } from "@/pinia/user.js";
import { useRoute, useRouter } from "vue-router";
const router = useRouter();
const route = useRoute();
const { functionAuthority } = storeToRefs(useUsersStore());
const total = ref(0);
......@@ -1191,8 +1194,20 @@ const disposeWorkSheetDetail = (obj)=> {
imgUrlList.value = imgUrl.split(";");
}
}
// 其他页面跳转当前页面,携带参数初始化
const getInitParams = () => {
if (route.query) {
const { suspendStartTime, suspendEndTime } = route.query;
if (suspendStartTime) {
formInline.value.createTime[0] = suspendStartTime;
}
if (suspendEndTime) {
formInline.value.createTime[1] = suspendEndTime;
}
}
}
onMounted(()=>{
getInitParams();
getProDuctLine();
getWarnAndTicketConfigMap();
getDeviceType();
......
<template>
<div class="title layout1">
<span class="warn-title">{{title}}</span>
<span class="jump-icon">>></span>
<span class="warn-title">{{ title }}</span>
<span class="jump-icon" @click="toDetail">>></span>
</div>
<div class="content">
<div class="item" v-for="item in listInfo" :key="item">
<img src="@/assets/icons/notice.png" alt="">{{item}}
<img src="@/assets/icons/notice.png" alt="" />{{ item }}
</div>
</div>
</template>
<script setup>
const emit = defineEmits(["jumpPage"]);
const props = defineProps({
listInfo: {
type: Array,
......@@ -18,8 +19,11 @@ const props = defineProps({
title: {
type: String,
default: "告警",
}
},
});
const toDetail = () => {
emit("jumpPage");
};
</script>
<style scoped lang="scss">
.title {
......@@ -47,7 +51,8 @@ const props = defineProps({
align-items: center;
margin-bottom: 5px;
padding: 4px 0px 4px 2px;
box-shadow: rgba(53,58,62,0.04) 0px 1px 10px 0px,rgba(53,58,62,0.04) 0px 2px 4px 0px;
box-shadow: rgba(53, 58, 62, 0.04) 0px 1px 10px 0px,
rgba(53, 58, 62, 0.04) 0px 2px 4px 0px;
font-size: 14px;
color: #333;
img {
......
......@@ -43,7 +43,7 @@
</div>
</div>
<div class="warn-info">
<warnCom title="告警" :listInfo="warnInfoList"></warnCom>
<warnCom title="告警" :listInfo="warnInfoList" @jumpPage="toWarnDetail"></warnCom>
</div>
</div>
<div class="right-box">
......@@ -109,7 +109,7 @@
</div>
</div>
<div class="warn-info">
<warnCom title="闭环" :listInfo="closedLoopInfoList"></warnCom>
<warnCom title="闭环" :listInfo="closedLoopInfoList" @jumpPage="toCircleDetail"></warnCom>
</div>
</div>
</div>
......@@ -130,8 +130,8 @@ const userStore = useUsersStore();
const form = reactive({
dusterNo: "",
dateValue: [
new Date(new Date().getTime() - 24 * 60 * 60 * 1000 * 10),
new Date(),
moment(new Date(new Date().getTime() - 24 * 60 * 60 * 1000 * 10)).format("YYYY-MM-DD") + ' 00:00:00',
moment(new Date()).format("YYYY-MM-DD") + ' 00:00:00',
],
});
const startVal = ref(null);
......@@ -515,6 +515,28 @@ const getDustDetail = () => {
};
const closedLoopInfoList = ref([]);
const warnInfoList = ref([]);
const toWarnDetail = () => {
router.push({
path: "/alerts",
query: {
dusterNo: form.dusterNo,
deviceName: dusterName.value,
suspendStartTime: form.dateValue[0],
suspendEndTime: form.dateValue[1],
}
});
}
const toCircleDetail = () => {
router.push({
path: "/my-loop/myAgency",
query: {
dusterNo: form.dusterNo,
deviceName: dusterName.value,
suspendStartTime: form.dateValue[0],
suspendEndTime: form.dateValue[1],
}
});
}
// 获取告警信息
const getAlarmInfo = () => {
if (!form.dusterNo) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment