Commit 140ff6fc authored by liuzhaoh's avatar liuzhaoh

BUG修复—2

parent 55317571
...@@ -379,7 +379,7 @@ onMounted(async () => { ...@@ -379,7 +379,7 @@ onMounted(async () => {
if (suspendStartTime) { if (suspendStartTime) {
formInline.value.date[0] = suspendStartTime; formInline.value.date[0] = suspendStartTime;
} }
if (deviceName) { if (suspendEndTime) {
formInline.value.date[1] = suspendEndTime; formInline.value.date[1] = suspendEndTime;
} }
} }
......
...@@ -634,6 +634,9 @@ import { ElMessage } from 'element-plus' ...@@ -634,6 +634,9 @@ import { ElMessage } from 'element-plus'
import { storeToRefs } from 'pinia' import { storeToRefs } from 'pinia'
import { useUsersStore } from "@/pinia/user.js"; import { useUsersStore } from "@/pinia/user.js";
import { useRoute, useRouter } from "vue-router";
const router = useRouter();
const route = useRoute();
const { functionAuthority } = storeToRefs(useUsersStore()); const { functionAuthority } = storeToRefs(useUsersStore());
const total = ref(0); const total = ref(0);
...@@ -1191,8 +1194,20 @@ const disposeWorkSheetDetail = (obj)=> { ...@@ -1191,8 +1194,20 @@ const disposeWorkSheetDetail = (obj)=> {
imgUrlList.value = imgUrl.split(";"); 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(()=>{ onMounted(()=>{
getInitParams();
getProDuctLine(); getProDuctLine();
getWarnAndTicketConfigMap(); getWarnAndTicketConfigMap();
getDeviceType(); getDeviceType();
......
<template> <template>
<div class="title layout1"> <div class="title layout1">
<span class="warn-title">{{title}}</span> <span class="warn-title">{{ title }}</span>
<span class="jump-icon">>></span> <span class="jump-icon" @click="toDetail">>></span>
</div> </div>
<div class="content"> <div class="content">
<div class="item" v-for="item in listInfo" :key="item"> <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>
</div> </div>
</template> </template>
<script setup> <script setup>
const emit = defineEmits(["jumpPage"]);
const props = defineProps({ const props = defineProps({
listInfo: { listInfo: {
type: Array, type: Array,
...@@ -18,54 +19,58 @@ const props = defineProps({ ...@@ -18,54 +19,58 @@ const props = defineProps({
title: { title: {
type: String, type: String,
default: "告警", default: "告警",
} },
}); });
const toDetail = () => {
emit("jumpPage");
};
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.title { .title {
height: 20px; height: 20px;
.warn-title { .warn-title {
font-weight: bold; font-weight: bold;
color: rgb(217, 10, 10); color: rgb(217, 10, 10);
} }
.jump-icon { .jump-icon {
font-weight: bold; font-weight: bold;
color: #018796; color: #018796;
cursor: pointer; cursor: pointer;
} }
} }
.content { .content {
width: 100%;
height: calc(15vh - 30px);
padding: 10px 0px 10px 30px;
box-sizing: border-box;
overflow: hidden;
overflow-y: auto;
.item {
width: 100%; width: 100%;
height: calc(15vh - 30px); display: flex;
padding: 10px 0px 10px 30px; align-items: center;
box-sizing: border-box; margin-bottom: 5px;
overflow: hidden; padding: 4px 0px 4px 2px;
overflow-y: auto; box-shadow: rgba(53, 58, 62, 0.04) 0px 1px 10px 0px,
.item { rgba(53, 58, 62, 0.04) 0px 2px 4px 0px;
width: 100%; font-size: 14px;
display: flex; color: #333;
align-items: center; img {
margin-bottom: 5px; width: 20px;
padding: 4px 0px 4px 2px; height: auto;
box-shadow: rgba(53,58,62,0.04) 0px 1px 10px 0px,rgba(53,58,62,0.04) 0px 2px 4px 0px; margin-right: 10px;
font-size: 14px;
color: #333;
img {
width: 20px;
height: auto;
margin-right: 10px;
}
} }
}
} }
.content::-webkit-scrollbar { .content::-webkit-scrollbar {
width: 0px; width: 0px;
background-color: rgba(13, 15, 18, 0.1); background-color: rgba(13, 15, 18, 0.1);
} }
.layout1 { .layout1 {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
</style> </style>
\ No newline at end of file
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
</div> </div>
</div> </div>
<div class="warn-info"> <div class="warn-info">
<warnCom title="告警" :listInfo="warnInfoList"></warnCom> <warnCom title="告警" :listInfo="warnInfoList" @jumpPage="toWarnDetail"></warnCom>
</div> </div>
</div> </div>
<div class="right-box"> <div class="right-box">
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
</div> </div>
</div> </div>
<div class="warn-info"> <div class="warn-info">
<warnCom title="闭环" :listInfo="closedLoopInfoList"></warnCom> <warnCom title="闭环" :listInfo="closedLoopInfoList" @jumpPage="toCircleDetail"></warnCom>
</div> </div>
</div> </div>
</div> </div>
...@@ -130,8 +130,8 @@ const userStore = useUsersStore(); ...@@ -130,8 +130,8 @@ const userStore = useUsersStore();
const form = reactive({ const form = reactive({
dusterNo: "", dusterNo: "",
dateValue: [ dateValue: [
new Date(new Date().getTime() - 24 * 60 * 60 * 1000 * 10), moment(new Date(new Date().getTime() - 24 * 60 * 60 * 1000 * 10)).format("YYYY-MM-DD") + ' 00:00:00',
new Date(), moment(new Date()).format("YYYY-MM-DD") + ' 00:00:00',
], ],
}); });
const startVal = ref(null); const startVal = ref(null);
...@@ -515,6 +515,28 @@ const getDustDetail = () => { ...@@ -515,6 +515,28 @@ const getDustDetail = () => {
}; };
const closedLoopInfoList = ref([]); const closedLoopInfoList = ref([]);
const warnInfoList = 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 = () => { const getAlarmInfo = () => {
if (!form.dusterNo) { 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