Commit 23236685 authored by 11528's avatar 11528

Merge remote-tracking branch 'origin/master' into master

parents fcaf8ba2 87c90a6b
...@@ -25,7 +25,7 @@ export default { ...@@ -25,7 +25,7 @@ export default {
data() { data() {
return { return {
title: 'IT监控系统', title: 'IT监控系统',
logo: require('@/assets/image/menulogo.png') logo: require('@/assets/image/logo2.png')
} }
} }
} }
......
...@@ -14,6 +14,10 @@ ...@@ -14,6 +14,10 @@
> >
<sidebar-item v-for="route in permission_routes" :key="route.path" :item="route" :base-path="route.path" /> <sidebar-item v-for="route in permission_routes" :key="route.path" :item="route" :base-path="route.path" />
</el-menu> </el-menu>
<div onclick="handleWindowOpen()" class="menuLinkDiv">
<i class="el-icon-view" />
<span class="menuLink">机房可视化</span>
</div>
</el-scrollbar> </el-scrollbar>
</div> </div>
</template> </template>
...@@ -49,8 +53,45 @@ export default { ...@@ -49,8 +53,45 @@ export default {
isCollapse() { isCollapse() {
return !this.sidebar.opened return !this.sidebar.opened
} }
},
mounted() {
window.handleWindowOpen = this.handleWindowOpen
},
methods: {
handleWindowOpen() {
window.open('http://47.110.242.76:8088/')
}
} }
} }
</script> </script>
<style lang="scss"> <style lang="scss">
.sidebar-menu{
.menuLinkDiv{
height: 56px;
line-height: 56px;
font-size: 14px;
//padding: 0 20px;
list-style: none;
box-sizing: border-box;
white-space: nowrap;
cursor: pointer;
position: relative;
.el-icon-view{
position: relative;
top: 3px;
margin-left: 17px;
margin-right: 15px;
font-size: 20px;
color: rgb(255, 255, 255);
}
.menuLink{
line-height: 56px;
font-size: 14px;
color: rgb(255, 255, 255);
}
&:hover {
background: #1A2137;
}
}
}
</style> </style>
...@@ -96,10 +96,10 @@ ...@@ -96,10 +96,10 @@
<el-table-column label="描述" prop="describe" show-overflow-tooltip /> <el-table-column label="描述" prop="describe" show-overflow-tooltip />
<el-table-column width="300px" label="操作"> <el-table-column width="300px" label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link @click="addEquipment">添加设备</el-link> <el-link type="primary" @click="addEquipment">添加设备</el-link>
<el-link @click="addRow">添加组</el-link> <el-link type="primary" @click="addRow">添加组</el-link>
<el-link @click="addRow">编辑</el-link> <el-link type="primary" @click="addRow">编辑</el-link>
<el-link @click="deleteRow">删除</el-link> <el-link type="primary" @click="deleteRow">删除</el-link>
<el-popover <el-popover
placement="bottom" placement="bottom"
width="200" width="200"
...@@ -108,7 +108,7 @@ ...@@ -108,7 +108,7 @@
<div onclick="clickLinux()" class="tooltipText">配置Linux自定义监测</div> <div onclick="clickLinux()" class="tooltipText">配置Linux自定义监测</div>
<div class="tooltipText" @click="addWarn">添加告警</div> <div class="tooltipText" @click="addWarn">添加告警</div>
<div onclick="prohibit()" class="tooltipText">临时禁止</div> <div onclick="prohibit()" class="tooltipText">临时禁止</div>
<el-link slot="reference">更多 <el-link type="primary" slot="reference">更多
<div class="caretDown" /> <div class="caretDown" />
</el-link> </el-link>
</el-popover> </el-popover>
......
...@@ -45,8 +45,8 @@ ...@@ -45,8 +45,8 @@
<el-form-item> <el-form-item>
<el-button type="primary" size="small" @click="handleQuery">查询</el-button> <el-button type="primary" size="small" @click="handleQuery">查询</el-button>
</el-form-item> </el-form-item>
<el-button id="fullScreen" style="float: right;margin: 0 10px">{{ isScreen ? '退出全屏' : '全屏' }}</el-button> <el-button id="fullScreen" type="primary" style="float: right;margin: 0 10px">{{ isScreen ? '退出全屏' : '全屏' }}</el-button>
<el-button style="float: right;margin: 0 10px" @click="refresh">刷新</el-button> <el-button type="primary" style="float: right;margin: 0 10px" @click="refresh">刷新</el-button>
</el-form> </el-form>
<div class="placeholder" /> <div class="placeholder" />
<div style="padding: 10px"> <div style="padding: 10px">
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<el-form-item> <el-form-item>
<el-button type="primary" size="small" @click="handleQuery">查询</el-button> <el-button type="primary" size="small" @click="handleQuery">查询</el-button>
</el-form-item> </el-form-item>
<el-button id="fullScreen" style="float: right;margin: 0 10px">{{ isScreen ? '退出全屏' : '全屏' }}</el-button> <el-button id="fullScreen" type="primary" style="float: right;margin: 0 10px">{{ isScreen ? '退出全屏' : '全屏' }}</el-button>
</el-form> </el-form>
<div class="placeholder" /> <div class="placeholder" />
<div style="padding: 10px"> <div style="padding: 10px">
......
<template> <template>
<div id="sylog-container" class="realTime-container"> <div id="sylog-container" class="realTime-container">
<div class="warnHead"> <div style="padding: 10px;text-align: right">
<div class="warnBtns"> <el-button type="primary" @click="changeTime">添加</el-button>
<el-button class="headBtn" @click="changeTime">添加</el-button> <el-button type="primary" @click="changeTime">修改</el-button>
<el-button class="headBtn" @click="changeTime">修改</el-button> <el-button type="primary" @click="handleDelete">删除</el-button>
<el-button class="headBtn" @click="handleDelete">删除</el-button> <el-button type="primary" @click="handleExport">导出报表</el-button>
<el-button class="headBtnW" @click="refresh">刷新</el-button> <el-button type="primary" @click="refresh">刷新</el-button>
<el-button id="fullScreen" class="headBtnW">{{ isScreen ? '退出全屏' : '全屏' }}</el-button> <el-button id="fullScreen" type="primary">{{ isScreen ? '退出全屏' : '全屏' }}</el-button>
</div>
</div> </div>
<div class="placeholder" />
<div class="app-container-realTime"> <div class="app-container-realTime">
<el-tabs v-model="currentTab" type="card"> <el-tabs v-model="currentTab" type="card">
<el-tab-pane label="实时报告" name="1"> <el-tab-pane label="实时报告" name="1">
...@@ -108,9 +108,12 @@ ...@@ -108,9 +108,12 @@
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="选择监测点类型"> <el-form-item label="选择监测点类型">
<span style="font-weight: bold">监测点类型</span> <span style="font-weight: bold;width: 100%">监测点类型</span>
<br/>
<el-select /> <el-select />
<br/>
<span style="font-weight: bold">监测指标</span> <span style="font-weight: bold">监测指标</span>
<br/>
<el-select placeholder="请选择" /> <el-select placeholder="请选择" />
</el-form-item> </el-form-item>
</el-form> </el-form>
...@@ -364,6 +367,9 @@ export default { ...@@ -364,6 +367,9 @@ export default {
type: 'warning' type: 'warning'
}) })
}, },
handleExport() {
window.location.href = process.env.BASE_URL + 'exportFile.xls'
},
/** 查询登录日志 */ /** 查询登录日志 */
getList() { getList() {
this.loading = true this.loading = true
...@@ -417,6 +423,11 @@ export default { ...@@ -417,6 +423,11 @@ export default {
} }
} }
} }
.placeholder{
height:14px;
background-color: #F4F4F4;
margin-bottom:10px
}
.app-container-realTime { .app-container-realTime {
padding: 0 20px; padding: 0 20px;
font-size: 18px; font-size: 18px;
...@@ -428,11 +439,6 @@ export default { ...@@ -428,11 +439,6 @@ export default {
padding: 10px 0; padding: 10px 0;
border-radius: 4px; border-radius: 4px;
} }
.placeholder{
height:14px;
background-color: #F4F4F4;
margin-bottom:10px
}
.st-square{ .st-square{
cursor: pointer; cursor: pointer;
margin-right: 6px; margin-right: 6px;
......
...@@ -28,11 +28,11 @@ ...@@ -28,11 +28,11 @@
<el-table-column label="类型" prop="type" show-overflow-tooltip /> <el-table-column label="类型" prop="type" show-overflow-tooltip />
<el-table-column width="300px" label="操作"> <el-table-column width="300px" label="操作">
<!-- <template slot-scope="scope">--> <!-- <template slot-scope="scope">-->
<el-link @click="addGroup">添加逻辑组</el-link> <el-link type="primary" @click="addGroup">添加逻辑组</el-link>
<el-link @click="addWarn">添加告警</el-link> <el-link type="primary" @click="addWarn">添加告警</el-link>
<el-link @click="addObject">添加对象</el-link> <el-link type="primary" @click="addObject">添加对象</el-link>
<el-link @click="addGroup">编辑</el-link> <el-link type="primary" @click="addGroup">编辑</el-link>
<el-link @click="deleteRow">移除</el-link> <el-link type="primary" @click="deleteRow">移除</el-link>
<!-- </template>--> <!-- </template>-->
</el-table-column> </el-table-column>
</el-table> </el-table>
......
...@@ -65,8 +65,8 @@ ...@@ -65,8 +65,8 @@
</el-table-column> </el-table-column>
<el-table-column label="操作"> <el-table-column label="操作">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link @click="updateRow(scope.row)">编辑</el-link> <el-link type="primary" @click="updateRow(scope.row)">编辑</el-link>
<el-link @click="deleteRow(scope.row)">删除</el-link> <el-link type="primary" @click="deleteRow(scope.row)">删除</el-link>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
<!-- <div class="placeholder" />--> <!-- <div class="placeholder" />-->
<div style="padding: 10px"> <div style="padding: 10px">
<div class="mb12 font-small-bold" style="width: 100px;display: inline-block">业务列表</div> <div class="mb12 font-small-bold" style="width: 100px;display: inline-block">业务列表</div>
<el-button id="fullScreen" style="float: right;margin: -5px 10px 10px">{{ isScreen ? '退出全屏' : '全屏' }}</el-button> <el-button id="fullScreen" type="primary" style="float: right;margin: -5px 10px 10px">{{ isScreen ? '退出全屏' : '全屏' }}</el-button>
<el-button style="float: right;margin: -5px 10px 10px" @click="refresh">刷新</el-button> <el-button type="primary" style="float: right;margin: -5px 10px 10px" @click="refresh">刷新</el-button>
<el-table <el-table
v-loading="loading" v-loading="loading"
border border
......
<template> <template>
<div class="login"> <div class="login">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form"> <el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
<img class="fy-logo" src="../../assets/image/loginLogo.png"> <img class="fy-logo" src="../../assets/image/rongchuanglogo.png">
<div class="title">网络设备监控管理平台</div> <div class="title">网络设备监控管理平台</div>
<div class="login-form-content"> <div class="login-form-content">
<el-form-item prop="username"> <el-form-item prop="username">
...@@ -59,7 +59,9 @@ ...@@ -59,7 +59,9 @@
</div> </div>
</el-form> </el-form>
<!-- 底部 --> <!-- 底部 -->
<div class="el-login-footer" /> <div class="el-login-footer">
<span>Copyright 天津市融创软通科技股份有限公司</span>
</div>
</div> </div>
</template> </template>
...@@ -214,7 +216,7 @@ export default { ...@@ -214,7 +216,7 @@ export default {
} }
} }
.blue-btn{ .blue-btn{
background-color: #093F8F; background-color: #A22A48;
width: 100%; width: 100%;
height: 40px; height: 40px;
border-radius: 4px; border-radius: 4px;
...@@ -251,7 +253,7 @@ export default { ...@@ -251,7 +253,7 @@ export default {
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
position: fixed; position: fixed;
bottom: 0; bottom: 10px;
width: 100%; width: 100%;
text-align: center; text-align: center;
color: #fff; color: #fff;
......
<template>
<div id="sylog-container" class="app-container-Sylog">
<el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :style="{ paddingTop: isScreen ? '20px' : '0' }" :inline="true" label-width="68px">
<el-form-item prop="logContent">
<el-input
v-model="queryParams.logContent"
placeholder="监测点名称"
clearable
:maxlength="30"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="handleQuery">查询</el-button>
</el-form-item>
<el-button id="fullScreen" style="float: right;margin: 0 10px">{{ isScreen ? '退出全屏' : '全屏' }}</el-button>
<el-button style="float: right;margin: 0 10px" @click="refresh">刷新</el-button>
</el-form>
<div class="placeholder" />
<div style="padding: 10px">
<el-table
v-loading="loading"
border
:data="data"
:header-cell-style="{textAlign: 'center'}"
@selection-change="handleSelectionChange"
>
<el-table-column :show-overflow-tooltip="true" label="设备名称" align="center" prop="ipAddress">
<template slot-scope="scope">
{{ scope.row.name || '-' }}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="监测点名称" align="center" prop="ipAddress">
<template slot-scope="scope">
{{ scope.row.pointName || '-' }}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="监测项名称" align="center" prop="ipAddress">
<template slot-scope="scope">
{{ scope.row.projectName || '-' }}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="监测值" align="center" prop="ipAddress">
<template slot-scope="scope">
{{ scope.row.value || '-' }}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="采集时间" align="center" prop="createTime">
<template slot-scope="scope">
{{ scope.row.createTime | transformDateByFormat('yyyy-MM-DD HH:mm:ss') }}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="当前状态" align="center" prop="ipAddress">
<template slot-scope="scope">
<div :style="{ backgroundColor: scope.row.status === '1' ? '#3db58d' : '#eb5d5d', borderRadius: '10px'}" style="text-align: center;width: 80px;color: white;height: 30px;line-height: 30px;margin: 4px 0;">
{{ scope.row.status === '1' ? '正常' : '告警' }}
</div>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="告警信息" align="center" prop="logContent">
<template>
<el-button @click="goWarn">历史告警</el-button>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="运行曲线" align="center" prop="logContent">
<template>
<el-button @click="goHistory">历史</el-button>
</template>
</el-table-column>
</el-table>
</div>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.rows"
@pagination="getList"
/>
<el-dialog :visible.sync="open" title="自定义时间" width="500px">
<el-form label-width="100px">
<el-form-item label="开始日期">
<el-date-picker
v-model="queryParams.startTime"
type="datetime"
size="small"
value-format="yyyy-MM-DD HH:MM:SS"
/>
</el-form-item>
<el-form-item label="结束日期">
<el-date-picker
v-model="queryParams.endTime"
type="datetime"
size="small"
value-format="yyyy-MM-DD HH:MM:SS"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="open = false">取消</el-button>
<el-button type="primary" @click="open = false">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import screenfull from 'screenfull'
export default {
name: 'SnmpTrapLog',
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 总条数
total: 0,
// 表格数据
list: [],
// 是否显示弹出层
open: false,
// 表单参数
form: {},
// 表单参数
isScreen: false,
// 查询参数
queryParams: {
page: 1,
rows: 10,
status: 1,
startTime: '',
endTime: '',
ipAddress: '',
logContent: ''
},
data: [
{
name: '23层配电柜',
status: '1',
projectName: '电压',
value: '告警',
createTime: '2022-05-17 00:59:01',
pointName: '23层配电柜'
},
{
name: '1层配电柜',
status: '0',
projectName: '电压',
value: '正常',
createTime: '2022-05-17 00:59:01',
pointName: '1层配电柜'
}
],
initialData: [
{
ipAddress: '39.100.39.54',
createTime: '2022-05-17 00:59:01',
logContent: 'Apr 8 17:43:28 mxsoft sshd[8366]: PAM 1 more authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=171.44.81.37 user=root'
},
{
ipAddress: '39.100.39.54',
createTime: '2022-05-16 22:59:01',
logContent: 'Apr 8 17:43:28 mxsoft sshd[8366]: Disconnected from 171.44.81.37 port 19840 [preauth]'
},
{
ipAddress: '39.100.39.54',
createTime: '2022-05-16 20:59:01',
logContent: 'Apr 8 18:01:01 mxsoft run-parts(/etc/cron.hourly)[1255 finished 0anacron'
},
{
ipAddress: '39.100.39.54',
createTime: '2022-05-14 22:59:01',
logContent: 'Apr 8 18:01:01 mxsoft systemd: Started Session 10 of user root.'
},
{
ipAddress: '39.100.39.54',
createTime: '2022-05-11 22:59:01',
logContent: 'Apr 8 18:00:01 mxsoft CROND[12308]: (root) CMD (/usr/lib64/sa/sa1 1 1)'
}
]
}
},
/** 路由离开前存储筛选条件*/
beforeRouteLeave(to, from, next) {
this.$store.dispatch('searchSave/searchParamsSet', {
path: this.$route.path,
param: {
...this.queryParams
}
})
next()
},
created() {
this.getList()
},
mounted() {
this.handleExpand()
window.onresize = () => {
this.isScreen = screenfull.isFullscreen
}
},
methods: {
goWarn(path) {
this.$router.push({
path: '/movingRingMonitoring/warnNotes',
query: {
tabs: '1'
}
})
},
goHistory(path) {
this.$router.push({
path: '/movingRingMonitoring/warnNotes',
query: {
tabs: '2'
}
})
},
handleExpand() {
const element = document.getElementById('sylog-container')// 指定全屏区域元素
document.getElementById('fullScreen').addEventListener('click', () => {
if (screenfull.isEnabled && this.isScreen === false) {
screenfull.request(element)
} else {
screenfull.exit()
}
})// 实现模块全屏
},
refresh() {
window.location.reload() // 刷新页面
},
/** 查询登录日志 */
getList() {
this.loading = true
setTimeout(() => {
this.loading = false
}, 500)
},
/** 查询按钮操作 */
changeTime() {
this.open = !this.open
},
/** 查询按钮操作 */
handleQuery() {
this.queryParams.page = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = ''
this.resetForm('queryForm')
this.handleQuery()
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.operId)
}
}
}
</script>
<style lang="scss" scoped>
.app-container-Sylog {
padding: 0;
font-size: 18px;
.placeholder{
height:14px;
background-color: #F4F4F4;
margin-bottom:10px
}
}
</style>
<template>
<div id="sylog-container" class="app-container-Sylog">
<el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :style="{ paddingTop: isScreen ? '20px' : '0' }" :inline="true" label-width="68px">
<el-form-item prop="logContent">
<el-input
v-model="queryParams.logContent"
placeholder="监测点名称"
clearable
:maxlength="30"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="handleQuery">查询</el-button>
</el-form-item>
<el-button id="fullScreen" style="float: right;margin: 0 10px">{{ isScreen ? '退出全屏' : '全屏' }}</el-button>
<el-button style="float: right;margin: 0 10px" @click="refresh">刷新</el-button>
</el-form>
<div class="placeholder" />
<div style="padding: 10px">
<el-table
v-loading="loading"
border
:data="data"
:header-cell-style="{textAlign: 'center'}"
@selection-change="handleSelectionChange"
>
<el-table-column :show-overflow-tooltip="true" label="设备名称" align="center" prop="ipAddress">
<template slot-scope="scope">
{{ scope.row.name || '-' }}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="监测点名称" align="center" prop="ipAddress">
<template slot-scope="scope">
{{ scope.row.pointName || '-' }}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="监测项名称" align="center" prop="ipAddress">
<template slot-scope="scope">
{{ scope.row.projectName || '-' }}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="监测值" align="center" prop="ipAddress">
<template slot-scope="scope">
{{ scope.row.value || '-' }}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="采集时间" align="center" prop="createTime">
<template slot-scope="scope">
{{ scope.row.createTime | transformDateByFormat('yyyy-MM-DD HH:mm:ss') }}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="当前状态" align="center" prop="ipAddress">
<template slot-scope="scope">
<div :style="{ backgroundColor: scope.row.status === '1' ? '#3db58d' : '#eb5d5d', borderRadius: '10px'}" style="text-align: center;width: 80px;color: white;height: 30px;line-height: 30px;margin: 4px 0;">
{{ scope.row.status === '1' ? '正常' : '告警' }}
</div>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="告警信息" align="center" prop="logContent">
<template>
<el-button @click="goWarn">历史告警</el-button>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="运行曲线" align="center" prop="logContent">
<template>
<el-button @click="goHistory">历史</el-button>
</template>
</el-table-column>
</el-table>
</div>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.rows"
@pagination="getList"
/>
<el-dialog :visible.sync="open" title="自定义时间" width="500px">
<el-form label-width="100px">
<el-form-item label="开始日期">
<el-date-picker
v-model="queryParams.startTime"
type="datetime"
size="small"
value-format="yyyy-MM-DD HH:MM:SS"
/>
</el-form-item>
<el-form-item label="结束日期">
<el-date-picker
v-model="queryParams.endTime"
type="datetime"
size="small"
value-format="yyyy-MM-DD HH:MM:SS"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="open = false">取消</el-button>
<el-button type="primary" @click="open = false">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import screenfull from 'screenfull'
export default {
name: 'SnmpTrapLog',
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 总条数
total: 0,
// 表格数据
list: [],
// 是否显示弹出层
open: false,
// 表单参数
form: {},
// 表单参数
isScreen: false,
// 查询参数
queryParams: {
page: 1,
rows: 10,
status: 1,
startTime: '',
endTime: '',
ipAddress: '',
logContent: ''
},
data: [
{
name: '烟感',
status: '1',
projectName: '状态',
value: '告警',
createTime: '2022-05-17 00:59:01',
pointName: '烟感'
},
{
name: '火警',
status: '0',
projectName: '状态',
value: '正常',
createTime: '2022-05-17 00:59:01',
pointName: '火警'
}
],
initialData: [
{
ipAddress: '39.100.39.54',
createTime: '2022-05-17 00:59:01',
logContent: 'Apr 8 17:43:28 mxsoft sshd[8366]: PAM 1 more authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=171.44.81.37 user=root'
},
{
ipAddress: '39.100.39.54',
createTime: '2022-05-16 22:59:01',
logContent: 'Apr 8 17:43:28 mxsoft sshd[8366]: Disconnected from 171.44.81.37 port 19840 [preauth]'
},
{
ipAddress: '39.100.39.54',
createTime: '2022-05-16 20:59:01',
logContent: 'Apr 8 18:01:01 mxsoft run-parts(/etc/cron.hourly)[1255 finished 0anacron'
},
{
ipAddress: '39.100.39.54',
createTime: '2022-05-14 22:59:01',
logContent: 'Apr 8 18:01:01 mxsoft systemd: Started Session 10 of user root.'
},
{
ipAddress: '39.100.39.54',
createTime: '2022-05-11 22:59:01',
logContent: 'Apr 8 18:00:01 mxsoft CROND[12308]: (root) CMD (/usr/lib64/sa/sa1 1 1)'
}
]
}
},
/** 路由离开前存储筛选条件*/
beforeRouteLeave(to, from, next) {
this.$store.dispatch('searchSave/searchParamsSet', {
path: this.$route.path,
param: {
...this.queryParams
}
})
next()
},
created() {
this.getList()
},
mounted() {
this.handleExpand()
window.onresize = () => {
this.isScreen = screenfull.isFullscreen
}
},
methods: {
goWarn(path) {
this.$router.push({
path: '/movingRingMonitoring/warnNotes',
query: {
tabs: '1'
}
})
},
goHistory(path) {
this.$router.push({
path: '/movingRingMonitoring/warnNotes',
query: {
tabs: '2'
}
})
},
handleExpand() {
const element = document.getElementById('sylog-container')// 指定全屏区域元素
document.getElementById('fullScreen').addEventListener('click', () => {
if (screenfull.isEnabled && this.isScreen === false) {
screenfull.request(element)
} else {
screenfull.exit()
}
})// 实现模块全屏
},
refresh() {
window.location.reload() // 刷新页面
},
/** 查询登录日志 */
getList() {
this.loading = true
setTimeout(() => {
this.loading = false
}, 500)
},
/** 查询按钮操作 */
changeTime() {
this.open = !this.open
},
/** 查询按钮操作 */
handleQuery() {
this.queryParams.page = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = ''
this.resetForm('queryForm')
this.handleQuery()
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.operId)
}
}
}
</script>
<style lang="scss" scoped>
.app-container-Sylog {
padding: 0;
font-size: 18px;
.placeholder{
height:14px;
background-color: #F4F4F4;
margin-bottom:10px
}
}
</style>
<template>
<div id="sylog-container" class="app-container-Sylog">
<el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :style="{ paddingTop: isScreen ? '20px' : '0' }" :inline="true" label-width="68px">
<el-form-item prop="logContent">
<el-input
v-model="queryParams.logContent"
placeholder="监测点名称"
clearable
:maxlength="30"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="handleQuery">查询</el-button>
</el-form-item>
<el-button id="fullScreen" style="float: right;margin: 0 10px">{{ isScreen ? '退出全屏' : '全屏' }}</el-button>
<el-button style="float: right;margin: 0 10px" @click="refresh">刷新</el-button>
</el-form>
<div class="placeholder" />
<div style="padding: 10px">
<el-table
v-loading="loading"
border
:data="data"
:header-cell-style="{textAlign: 'center'}"
@selection-change="handleSelectionChange"
>
<el-table-column :show-overflow-tooltip="true" label="设备名称" align="center" prop="ipAddress">
<template slot-scope="scope">
{{ scope.row.name || '-' }}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="监测点名称" align="center" prop="ipAddress">
<template slot-scope="scope">
{{ scope.row.pointName || '-' }}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="监测项名称" align="center" prop="ipAddress">
<template slot-scope="scope">
{{ scope.row.projectName || '-' }}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="监测值" align="center" prop="ipAddress">
<template slot-scope="scope">
{{ scope.row.value || '-' }}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="采集时间" align="center" prop="createTime">
<template slot-scope="scope">
{{ scope.row.createTime | transformDateByFormat('yyyy-MM-DD HH:mm:ss') }}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="当前状态" align="center" prop="ipAddress">
<template slot-scope="scope">
<div :style="{ backgroundColor: scope.row.status === '1' ? '#3db58d' : '#eb5d5d', borderRadius: '10px'}" style="text-align: center;width: 80px;color: white;height: 30px;line-height: 30px;margin: 4px 0;">
{{ scope.row.status === '1' ? '正常' : '告警' }}
</div>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="告警信息" align="center" prop="logContent">
<template>
<el-button @click="goWarn">历史告警</el-button>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="运行曲线" align="center" prop="logContent">
<template>
<el-button @click="goHistory">历史</el-button>
</template>
</el-table-column>
</el-table>
</div>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.rows"
@pagination="getList"
/>
<el-dialog :visible.sync="open" title="自定义时间" width="500px">
<el-form label-width="100px">
<el-form-item label="开始日期">
<el-date-picker
v-model="queryParams.startTime"
type="datetime"
size="small"
value-format="yyyy-MM-DD HH:MM:SS"
/>
</el-form-item>
<el-form-item label="结束日期">
<el-date-picker
v-model="queryParams.endTime"
type="datetime"
size="small"
value-format="yyyy-MM-DD HH:MM:SS"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="open = false">取消</el-button>
<el-button type="primary" @click="open = false">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import screenfull from 'screenfull'
export default {
name: 'SnmpTrapLog',
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 总条数
total: 0,
// 表格数据
list: [],
// 是否显示弹出层
open: false,
// 表单参数
form: {},
// 表单参数
isScreen: false,
// 查询参数
queryParams: {
page: 1,
rows: 10,
status: 1,
startTime: '',
endTime: '',
ipAddress: '',
logContent: ''
},
data: [
{
name: '温湿度1号',
status: '1',
projectName: '温度',
value: '告警',
createTime: '2022-05-17 00:59:01',
pointName: '温湿度1号'
},
{
name: '温湿度2号',
status: '0',
projectName: '湿度',
value: '正常',
createTime: '2022-05-17 00:59:01',
pointName: '温湿度2号'
}
],
initialData: [
{
ipAddress: '39.100.39.54',
createTime: '2022-05-17 00:59:01',
logContent: 'Apr 8 17:43:28 mxsoft sshd[8366]: PAM 1 more authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=171.44.81.37 user=root'
},
{
ipAddress: '39.100.39.54',
createTime: '2022-05-16 22:59:01',
logContent: 'Apr 8 17:43:28 mxsoft sshd[8366]: Disconnected from 171.44.81.37 port 19840 [preauth]'
},
{
ipAddress: '39.100.39.54',
createTime: '2022-05-16 20:59:01',
logContent: 'Apr 8 18:01:01 mxsoft run-parts(/etc/cron.hourly)[1255 finished 0anacron'
},
{
ipAddress: '39.100.39.54',
createTime: '2022-05-14 22:59:01',
logContent: 'Apr 8 18:01:01 mxsoft systemd: Started Session 10 of user root.'
},
{
ipAddress: '39.100.39.54',
createTime: '2022-05-11 22:59:01',
logContent: 'Apr 8 18:00:01 mxsoft CROND[12308]: (root) CMD (/usr/lib64/sa/sa1 1 1)'
}
]
}
},
/** 路由离开前存储筛选条件*/
beforeRouteLeave(to, from, next) {
this.$store.dispatch('searchSave/searchParamsSet', {
path: this.$route.path,
param: {
...this.queryParams
}
})
next()
},
created() {
this.getList()
},
mounted() {
this.handleExpand()
window.onresize = () => {
this.isScreen = screenfull.isFullscreen
}
},
methods: {
goWarn(path) {
this.$router.push({
path: '/movingRingMonitoring/warnNotes',
query: {
tabs: '1'
}
})
},
goHistory(path) {
this.$router.push({
path: '/movingRingMonitoring/warnNotes',
query: {
tabs: '2'
}
})
},
handleExpand() {
const element = document.getElementById('sylog-container')// 指定全屏区域元素
document.getElementById('fullScreen').addEventListener('click', () => {
if (screenfull.isEnabled && this.isScreen === false) {
screenfull.request(element)
} else {
screenfull.exit()
}
})// 实现模块全屏
},
refresh() {
window.location.reload() // 刷新页面
},
/** 查询登录日志 */
getList() {
this.loading = true
setTimeout(() => {
this.loading = false
}, 500)
},
/** 查询按钮操作 */
changeTime() {
this.open = !this.open
},
/** 查询按钮操作 */
handleQuery() {
this.queryParams.page = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = ''
this.resetForm('queryForm')
this.handleQuery()
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.operId)
}
}
}
</script>
<style lang="scss" scoped>
.app-container-Sylog {
padding: 0;
font-size: 18px;
.placeholder{
height:14px;
background-color: #F4F4F4;
margin-bottom:10px
}
}
</style>
This diff is collapsed.
<template>
<div id="sylog-container" class="app-container-Sylog">
<el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :style="{ paddingTop: isScreen ? '20px' : '0' }" :inline="true" label-width="68px">
<el-form-item prop="logContent">
<el-input
v-model="queryParams.logContent"
placeholder="监测点名称"
clearable
:maxlength="30"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="handleQuery">查询</el-button>
</el-form-item>
<el-button id="fullScreen" style="float: right;margin: 0 10px">{{ isScreen ? '退出全屏' : '全屏' }}</el-button>
<el-button style="float: right;margin: 0 10px" @click="refresh">刷新</el-button>
</el-form>
<div class="placeholder" />
<div style="padding: 10px">
<el-table
v-loading="loading"
border
:data="data"
:header-cell-style="{textAlign: 'center'}"
@selection-change="handleSelectionChange"
>
<el-table-column :show-overflow-tooltip="true" label="设备名称" align="center" prop="ipAddress">
<template slot-scope="scope">
{{ scope.row.name || '-' }}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="监测点名称" align="center" prop="ipAddress">
<template slot-scope="scope">
{{ scope.row.pointName || '-' }}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="监测项名称" align="center" prop="ipAddress">
<template slot-scope="scope">
{{ scope.row.projectName || '-' }}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="监测值" align="center" prop="ipAddress">
<template slot-scope="scope">
{{ scope.row.value || '-' }}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="采集时间" align="center" prop="createTime">
<template slot-scope="scope">
{{ scope.row.createTime | transformDateByFormat('yyyy-MM-DD HH:mm:ss') }}
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="当前状态" align="center" prop="ipAddress">
<template slot-scope="scope">
<div :style="{ backgroundColor: scope.row.status === '1' ? '#3db58d' : '#eb5d5d', borderRadius: '10px'}" style="text-align: center;width: 80px;color: white;height: 30px;line-height: 30px;margin: 4px 0;">
{{ scope.row.status === '1' ? '正常' : '告警' }}
</div>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="告警信息" align="center" prop="logContent">
<template>
<el-button @click="goWarn">历史告警</el-button>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" label="运行曲线" align="center" prop="logContent">
<template>
<el-button @click="goHistory">历史</el-button>
</template>
</el-table-column>
</el-table>
</div>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.rows"
@pagination="getList"
/>
<el-dialog :visible.sync="open" title="自定义时间" width="500px">
<el-form label-width="100px">
<el-form-item label="开始日期">
<el-date-picker
v-model="queryParams.startTime"
type="datetime"
size="small"
value-format="yyyy-MM-DD HH:MM:SS"
/>
</el-form-item>
<el-form-item label="结束日期">
<el-date-picker
v-model="queryParams.endTime"
type="datetime"
size="small"
value-format="yyyy-MM-DD HH:MM:SS"
/>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="open = false">取消</el-button>
<el-button type="primary" @click="open = false">确定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import screenfull from 'screenfull'
export default {
name: 'SnmpTrapLog',
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 总条数
total: 0,
// 表格数据
list: [],
// 是否显示弹出层
open: false,
// 表单参数
form: {},
// 表单参数
isScreen: false,
// 查询参数
queryParams: {
page: 1,
rows: 10,
status: 1,
startTime: '',
endTime: '',
ipAddress: '',
logContent: ''
},
data: [
{
name: '水浸1号',
status: '1',
projectName: '状态',
value: '告警',
createTime: '2022-05-17 00:59:01',
pointName: '水浸1号'
},
{
name: '水浸2号',
status: '0',
projectName: '状态',
value: '正常',
createTime: '2022-05-17 00:59:01',
pointName: '水浸2号'
}
],
initialData: [
{
ipAddress: '39.100.39.54',
createTime: '2022-05-17 00:59:01',
logContent: 'Apr 8 17:43:28 mxsoft sshd[8366]: PAM 1 more authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=171.44.81.37 user=root'
},
{
ipAddress: '39.100.39.54',
createTime: '2022-05-16 22:59:01',
logContent: 'Apr 8 17:43:28 mxsoft sshd[8366]: Disconnected from 171.44.81.37 port 19840 [preauth]'
},
{
ipAddress: '39.100.39.54',
createTime: '2022-05-16 20:59:01',
logContent: 'Apr 8 18:01:01 mxsoft run-parts(/etc/cron.hourly)[1255 finished 0anacron'
},
{
ipAddress: '39.100.39.54',
createTime: '2022-05-14 22:59:01',
logContent: 'Apr 8 18:01:01 mxsoft systemd: Started Session 10 of user root.'
},
{
ipAddress: '39.100.39.54',
createTime: '2022-05-11 22:59:01',
logContent: 'Apr 8 18:00:01 mxsoft CROND[12308]: (root) CMD (/usr/lib64/sa/sa1 1 1)'
}
]
}
},
/** 路由离开前存储筛选条件*/
beforeRouteLeave(to, from, next) {
this.$store.dispatch('searchSave/searchParamsSet', {
path: this.$route.path,
param: {
...this.queryParams
}
})
next()
},
created() {
this.getList()
},
mounted() {
this.handleExpand()
window.onresize = () => {
this.isScreen = screenfull.isFullscreen
}
},
methods: {
goWarn(path) {
this.$router.push({
path: '/movingRingMonitoring/warnNotes',
query: {
tabs: '1'
}
})
},
goHistory(path) {
this.$router.push({
path: '/movingRingMonitoring/warnNotes',
query: {
tabs: '2'
}
})
},
handleExpand() {
const element = document.getElementById('sylog-container')// 指定全屏区域元素
document.getElementById('fullScreen').addEventListener('click', () => {
if (screenfull.isEnabled && this.isScreen === false) {
screenfull.request(element)
} else {
screenfull.exit()
}
})// 实现模块全屏
},
refresh() {
window.location.reload() // 刷新页面
},
/** 查询登录日志 */
getList() {
this.loading = true
setTimeout(() => {
this.loading = false
}, 500)
},
/** 查询按钮操作 */
changeTime() {
this.open = !this.open
},
/** 查询按钮操作 */
handleQuery() {
this.queryParams.page = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.dateRange = ''
this.resetForm('queryForm')
this.handleQuery()
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.operId)
}
}
}
</script>
<style lang="scss" scoped>
.app-container-Sylog {
padding: 0;
font-size: 18px;
.placeholder{
height:14px;
background-color: #F4F4F4;
margin-bottom:10px
}
}
</style>
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