|
|
@ -1,33 +1,60 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="navbar">
|
|
|
|
<div class="navbar">
|
|
|
|
<hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
|
|
|
|
<hamburger
|
|
|
|
|
|
|
|
id="hamburger-container"
|
|
|
|
|
|
|
|
:is-active="sidebar.opened"
|
|
|
|
|
|
|
|
class="hamburger-container"
|
|
|
|
|
|
|
|
@toggleClick="toggleSideBar"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>
|
|
|
|
<breadcrumb
|
|
|
|
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
|
|
|
|
id="breadcrumb-container"
|
|
|
|
|
|
|
|
class="breadcrumb-container"
|
|
|
|
|
|
|
|
v-if="!topNav"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav" />
|
|
|
|
|
|
|
|
|
|
|
|
<div class="right-menu">
|
|
|
|
<div class="right-menu">
|
|
|
|
<template v-if="device!=='mobile'">
|
|
|
|
<template v-if="device !== 'mobile'">
|
|
|
|
<search id="header-search" class="right-menu-item" />
|
|
|
|
<el-select
|
|
|
|
|
|
|
|
v-model="poolName"
|
|
|
|
<el-tooltip content="源码地址" effect="dark" placement="bottom">
|
|
|
|
placeholder="请选择园区"
|
|
|
|
<open-platform id="op-git" class="right-menu-item hover-effect" />
|
|
|
|
@change="handleChange"
|
|
|
|
</el-tooltip>
|
|
|
|
:disabled="poolNameList.length <= 1"
|
|
|
|
|
|
|
|
class="right-menu-item hover-effect"
|
|
|
|
<el-tooltip content="文档地址" effect="dark" placement="bottom">
|
|
|
|
>
|
|
|
|
<open-platform-doc id="op-doc" class="right-menu-item hover-effect" />
|
|
|
|
<el-option
|
|
|
|
|
|
|
|
v-for="item in poolNameList"
|
|
|
|
|
|
|
|
:key="item.poolName"
|
|
|
|
|
|
|
|
:label="item.parkName"
|
|
|
|
|
|
|
|
:value="item.poolName"
|
|
|
|
|
|
|
|
></el-option>
|
|
|
|
|
|
|
|
</el-select>
|
|
|
|
|
|
|
|
<el-tooltip content="异常处理">
|
|
|
|
|
|
|
|
<span
|
|
|
|
|
|
|
|
class="exceptionHandling"
|
|
|
|
|
|
|
|
:class="{ warnTxt: (typeList && typeList.length) || 0 }"
|
|
|
|
|
|
|
|
@click="getAlarmData(true)"
|
|
|
|
|
|
|
|
><i class="el-icon-message"></i>{{
|
|
|
|
|
|
|
|
(typeList && typeList.length > 0 && typeList.length) || ""
|
|
|
|
|
|
|
|
}}
|
|
|
|
|
|
|
|
</span>
|
|
|
|
</el-tooltip>
|
|
|
|
</el-tooltip>
|
|
|
|
|
|
|
|
|
|
|
|
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
|
|
|
<screenfull id="screenfull" class="right-menu-item hover-effect" />
|
|
|
|
|
|
|
|
|
|
|
|
<el-tooltip content="布局大小" effect="dark" placement="bottom">
|
|
|
|
<el-tooltip content="布局大小" effect="dark" placement="bottom">
|
|
|
|
<size-select id="size-select" class="right-menu-item hover-effect" />
|
|
|
|
<size-select id="size-select" class="right-menu-item hover-effect" />
|
|
|
|
</el-tooltip>
|
|
|
|
</el-tooltip>
|
|
|
|
|
|
|
|
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
|
|
|
|
<el-dropdown
|
|
|
|
|
|
|
|
class="avatar-container right-menu-item hover-effect"
|
|
|
|
|
|
|
|
trigger="click"
|
|
|
|
|
|
|
|
>
|
|
|
|
<div class="avatar-wrapper">
|
|
|
|
<div class="avatar-wrapper">
|
|
|
|
<img :src="avatar" class="user-avatar">
|
|
|
|
<!-- <img :src="avatar" class="user-avatar" /> -->
|
|
|
|
|
|
|
|
<!-- admin -->
|
|
|
|
|
|
|
|
{{ nickName }}
|
|
|
|
<i class="el-icon-caret-bottom" />
|
|
|
|
<i class="el-icon-caret-bottom" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
@ -43,21 +70,111 @@
|
|
|
|
</el-dropdown-menu>
|
|
|
|
</el-dropdown-menu>
|
|
|
|
</el-dropdown>
|
|
|
|
</el-dropdown>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- 警告对话框 -->
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
|
|
|
:title="title1"
|
|
|
|
|
|
|
|
:visible.sync="open1"
|
|
|
|
|
|
|
|
width="800px"
|
|
|
|
|
|
|
|
append-to-body
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-table
|
|
|
|
|
|
|
|
v-loading="deviceloading"
|
|
|
|
|
|
|
|
:data="typeList"
|
|
|
|
|
|
|
|
@selection-change="handleSelectionChange1"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
label="计量设备名称"
|
|
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
prop="monitorName"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
label="采集设备编号"
|
|
|
|
|
|
|
|
align="center"
|
|
|
|
|
|
|
|
prop="collectDeviceId"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
<el-table-column label="记录时间" align="center" prop="collectTime" />
|
|
|
|
|
|
|
|
<el-table-column label="异常类型" align="center" prop="alarmType">
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
<dict-tag
|
|
|
|
|
|
|
|
:options="dict.type.alarmType"
|
|
|
|
|
|
|
|
:value="scope.row.alarmType"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column label="异常状态" align="center" prop="alarmStatus">
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
<dict-tag
|
|
|
|
|
|
|
|
:options="dict.type.alarmStatus"
|
|
|
|
|
|
|
|
:value="scope.row.alarmStatus"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column label="异常数据" align="center" prop="alarmData" />
|
|
|
|
|
|
|
|
<el-table-column label="备注" align="center" prop="cause" />
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
<!-- <pagination
|
|
|
|
|
|
|
|
v-show="devicetotal > 0"
|
|
|
|
|
|
|
|
:total="devicetotal"
|
|
|
|
|
|
|
|
:page.sync="queryParams1.pageNum"
|
|
|
|
|
|
|
|
:limit.sync="queryParams1.pageSize"
|
|
|
|
|
|
|
|
@pagination="getDeviceList"
|
|
|
|
|
|
|
|
/> -->
|
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
|
|
|
<el-button type="primary" @click="editAlarmStatus">确 定</el-button>
|
|
|
|
|
|
|
|
<el-button @click="open1 = false">取 消</el-button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { mapGetters } from 'vuex'
|
|
|
|
import { mapGetters } from "vuex";
|
|
|
|
import Breadcrumb from '@/components/Breadcrumb'
|
|
|
|
import Breadcrumb from "@/components/Breadcrumb";
|
|
|
|
import TopNav from '@/components/TopNav'
|
|
|
|
import TopNav from "@/components/TopNav";
|
|
|
|
import Hamburger from '@/components/Hamburger'
|
|
|
|
import Hamburger from "@/components/Hamburger";
|
|
|
|
import Screenfull from '@/components/Screenfull'
|
|
|
|
import Screenfull from "@/components/Screenfull";
|
|
|
|
import SizeSelect from '@/components/SizeSelect'
|
|
|
|
import SizeSelect from "@/components/SizeSelect";
|
|
|
|
import Search from '@/components/HeaderSearch'
|
|
|
|
import Search from "@/components/HeaderSearch";
|
|
|
|
import OpenPlatformGit from '@/components/OpenPlatform/Git'
|
|
|
|
import RuoYiGit from "@/components/RuoYi/Git";
|
|
|
|
import OpenPlatformDoc from '@/components/OpenPlatform/Doc'
|
|
|
|
import RuoYiDoc from "@/components/RuoYi/Doc";
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
|
|
|
listNotice,
|
|
|
|
|
|
|
|
getNotice,
|
|
|
|
|
|
|
|
delNotice,
|
|
|
|
|
|
|
|
addNotice,
|
|
|
|
|
|
|
|
updateNotice,
|
|
|
|
|
|
|
|
} from "@/api/system/notice";
|
|
|
|
|
|
|
|
//import { listData, editAlarmStatus } from "@/api/energy/exception/data.js";
|
|
|
|
|
|
|
|
import { changePoolName } from "@/api/system/user";
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
|
|
|
|
dicts: ["alarmType", "alarmStatus"],
|
|
|
|
|
|
|
|
data() {
|
|
|
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
poolNameList: [],
|
|
|
|
|
|
|
|
poolName: "",
|
|
|
|
|
|
|
|
title1: "异常处理",
|
|
|
|
|
|
|
|
open1: false,
|
|
|
|
|
|
|
|
deviceloading: false,
|
|
|
|
|
|
|
|
typeList: null,
|
|
|
|
|
|
|
|
devicetotal: null,
|
|
|
|
|
|
|
|
// 选中数组
|
|
|
|
|
|
|
|
ids1: [],
|
|
|
|
|
|
|
|
// 非单个禁用
|
|
|
|
|
|
|
|
single1: true,
|
|
|
|
|
|
|
|
// 非多个禁用
|
|
|
|
|
|
|
|
multiple1: true,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
created() {
|
|
|
|
|
|
|
|
localStorage.setItem("this.devicetotal", 0);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
mounted() {
|
|
|
|
|
|
|
|
this.getAlarmData();
|
|
|
|
|
|
|
|
setInterval(() => this.getAlarmData(), 1000 * 60);
|
|
|
|
|
|
|
|
this.poolNameList = JSON.parse(localStorage.getItem("POOL_NAME_LIST"));
|
|
|
|
|
|
|
|
this.poolName = localStorage.getItem("USER_POOL_NAME_CURRENT");
|
|
|
|
|
|
|
|
},
|
|
|
|
components: {
|
|
|
|
components: {
|
|
|
|
Breadcrumb,
|
|
|
|
Breadcrumb,
|
|
|
|
TopNav,
|
|
|
|
TopNav,
|
|
|
@ -65,69 +182,150 @@ export default {
|
|
|
|
Screenfull,
|
|
|
|
Screenfull,
|
|
|
|
SizeSelect,
|
|
|
|
SizeSelect,
|
|
|
|
Search,
|
|
|
|
Search,
|
|
|
|
OpenPlatformGit,
|
|
|
|
RuoYiGit,
|
|
|
|
OpenPlatformDoc
|
|
|
|
RuoYiDoc,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
computed: {
|
|
|
|
...mapGetters([
|
|
|
|
...mapGetters(["sidebar", "avatar", "device", "nickName"]),
|
|
|
|
'sidebar',
|
|
|
|
|
|
|
|
'avatar',
|
|
|
|
|
|
|
|
'device'
|
|
|
|
|
|
|
|
]),
|
|
|
|
|
|
|
|
setting: {
|
|
|
|
setting: {
|
|
|
|
get() {
|
|
|
|
get() {
|
|
|
|
return this.$store.state.settings.showSettings
|
|
|
|
return this.$store.state.settings.showSettings;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
set(val) {
|
|
|
|
set(val) {
|
|
|
|
this.$store.dispatch('settings/changeSetting', {
|
|
|
|
this.$store.dispatch("settings/changeSetting", {
|
|
|
|
key: 'showSettings',
|
|
|
|
key: "showSettings",
|
|
|
|
value: val
|
|
|
|
value: val,
|
|
|
|
})
|
|
|
|
});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
topNav: {
|
|
|
|
topNav: {
|
|
|
|
get() {
|
|
|
|
get() {
|
|
|
|
return this.$store.state.settings.topNav
|
|
|
|
return this.$store.state.settings.topNav;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
// 打开右下角异常
|
|
|
|
|
|
|
|
openAlarm() {
|
|
|
|
|
|
|
|
this.$notify({
|
|
|
|
|
|
|
|
title: "异常数据提示",
|
|
|
|
|
|
|
|
position: "bottom-right",
|
|
|
|
|
|
|
|
message: this.$createElement(
|
|
|
|
|
|
|
|
"div",
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
on: {
|
|
|
|
|
|
|
|
click: () => {
|
|
|
|
|
|
|
|
this.getAlarmData(true);
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
[this.$createElement("el-button", {}, ["点击查看"])]
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 处理报警
|
|
|
|
|
|
|
|
editAlarmStatus() {
|
|
|
|
|
|
|
|
/**editAlarmStatus({ objIds: this.ids1 }).then((res) => {
|
|
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
|
|
type: "success",
|
|
|
|
|
|
|
|
message: "异常数据已处理!",
|
|
|
|
|
|
|
|
duration: 1500,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
this.getAlarmData();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
**/
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/** 报警列表 */
|
|
|
|
|
|
|
|
getAlarmData(open) {
|
|
|
|
|
|
|
|
/**this.open1 = open;
|
|
|
|
|
|
|
|
this.deviceloading = true;
|
|
|
|
|
|
|
|
listData({ alarmStatus: 1 }).then((response) => {
|
|
|
|
|
|
|
|
this.typeList = response.rows;
|
|
|
|
|
|
|
|
this.devicetotal = response.total;
|
|
|
|
|
|
|
|
this.deviceloading = false;
|
|
|
|
|
|
|
|
if (localStorage.getItem("this.devicetotal") != this.devicetotal) {
|
|
|
|
|
|
|
|
localStorage.setItem("this.devicetotal", this.devicetotal);
|
|
|
|
|
|
|
|
this.openAlarm();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
**/
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 多选框选中数据
|
|
|
|
|
|
|
|
handleSelectionChange1(selection) {
|
|
|
|
|
|
|
|
this.ids1 = selection.map((item) => item.objId);
|
|
|
|
|
|
|
|
this.single1 = selection.length !== 1;
|
|
|
|
|
|
|
|
this.multiple1 = !selection.length;
|
|
|
|
|
|
|
|
},
|
|
|
|
toggleSideBar() {
|
|
|
|
toggleSideBar() {
|
|
|
|
this.$store.dispatch('app/toggleSideBar')
|
|
|
|
this.$store.dispatch("app/toggleSideBar");
|
|
|
|
},
|
|
|
|
},
|
|
|
|
async logout() {
|
|
|
|
async logout() {
|
|
|
|
this.$confirm('确定注销并退出系统吗?', '提示', {
|
|
|
|
this.$confirm("确定注销并退出系统吗?", "提示", {
|
|
|
|
confirmButtonText: '确定',
|
|
|
|
confirmButtonText: "确定",
|
|
|
|
cancelButtonText: '取消',
|
|
|
|
cancelButtonText: "取消",
|
|
|
|
type: 'warning'
|
|
|
|
type: "warning",
|
|
|
|
}).then(() => {
|
|
|
|
})
|
|
|
|
this.$store.dispatch('LogOut').then(() => {
|
|
|
|
.then(() => {
|
|
|
|
location.href = '/index';
|
|
|
|
this.$store.dispatch("LogOut").then(() => {
|
|
|
|
|
|
|
|
location.href = "/index";
|
|
|
|
|
|
|
|
});
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}).catch(() => {});
|
|
|
|
.catch(() => {});
|
|
|
|
}
|
|
|
|
},
|
|
|
|
}
|
|
|
|
// 选中数据源
|
|
|
|
}
|
|
|
|
handleChange(value) {
|
|
|
|
|
|
|
|
//修改后台数据源
|
|
|
|
|
|
|
|
changePoolName(value).then((res) => {
|
|
|
|
|
|
|
|
localStorage.setItem("USER_POOL_NAME_CURRENT", value);
|
|
|
|
|
|
|
|
this.poolName = value;
|
|
|
|
|
|
|
|
window.location.reload();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
|
|
@keyframes color-cycle {
|
|
|
|
|
|
|
|
0% {
|
|
|
|
|
|
|
|
color: red;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
50% {
|
|
|
|
|
|
|
|
color: rgb(186, 186, 16);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
100% {
|
|
|
|
|
|
|
|
color: red;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
.navbar {
|
|
|
|
.navbar {
|
|
|
|
|
|
|
|
.warnTxt {
|
|
|
|
|
|
|
|
animation-name: color-cycle;
|
|
|
|
|
|
|
|
animation-duration: 0.5s;
|
|
|
|
|
|
|
|
animation-iteration-count: infinite;
|
|
|
|
|
|
|
|
}
|
|
|
|
height: 50px;
|
|
|
|
height: 50px;
|
|
|
|
overflow: hidden;
|
|
|
|
overflow: hidden;
|
|
|
|
position: relative;
|
|
|
|
position: relative;
|
|
|
|
background: #fff;
|
|
|
|
background: #fff;
|
|
|
|
box-shadow: 0 1px 4px rgba(0,21,41,.08);
|
|
|
|
box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
|
|
|
|
|
|
|
|
.exceptionHandling {
|
|
|
|
|
|
|
|
/* line-height: 50px;
|
|
|
|
|
|
|
|
display: inline-block;
|
|
|
|
|
|
|
|
color: black;*/
|
|
|
|
|
|
|
|
vertical-align: text-bottom;
|
|
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
padding: 0.8px;
|
|
|
|
|
|
|
|
}
|
|
|
|
.hamburger-container {
|
|
|
|
.hamburger-container {
|
|
|
|
line-height: 46px;
|
|
|
|
line-height: 46px;
|
|
|
|
height: 100%;
|
|
|
|
height: 100%;
|
|
|
|
float: left;
|
|
|
|
float: left;
|
|
|
|
cursor: pointer;
|
|
|
|
cursor: pointer;
|
|
|
|
transition: background .3s;
|
|
|
|
transition: background 0.3s;
|
|
|
|
-webkit-tap-highlight-color:transparent;
|
|
|
|
-webkit-tap-highlight-color: transparent;
|
|
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
&:hover {
|
|
|
|
background: rgba(0, 0, 0, .025)
|
|
|
|
background: rgba(0, 0, 0, 0.025);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -164,10 +362,10 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
&.hover-effect {
|
|
|
|
&.hover-effect {
|
|
|
|
cursor: pointer;
|
|
|
|
cursor: pointer;
|
|
|
|
transition: background .3s;
|
|
|
|
transition: background 0.3s;
|
|
|
|
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
&:hover {
|
|
|
|
background: rgba(0, 0, 0, .025)
|
|
|
|
background: rgba(0, 0, 0, 0.025);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|