From 5bd66255ccd4e995337b9039094964d2677db4cc Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@smartai.com>
Date: 星期二, 22 二月 2022 17:19:06 +0800
Subject: [PATCH] 完善日志监控模块, 需要配合valog-server使用
---
src/pages/shuohuangMonitorAnalyze/components/searchForVideoAnalyze.vue | 327 +++++++++++++++++++++++++++++++++++++++---------------
1 files changed, 236 insertions(+), 91 deletions(-)
diff --git a/src/pages/shuohuangMonitorAnalyze/components/searchForVideoAnalyze.vue b/src/pages/shuohuangMonitorAnalyze/components/searchForVideoAnalyze.vue
index aefa6a1..0449fbb 100644
--- a/src/pages/shuohuangMonitorAnalyze/components/searchForVideoAnalyze.vue
+++ b/src/pages/shuohuangMonitorAnalyze/components/searchForVideoAnalyze.vue
@@ -11,7 +11,6 @@
range-separator="鑷�"
start-placeholder="寮�濮嬫棩鏈�"
end-placeholder="缁撴潫鏃ユ湡"
- align="right"
></el-date-picker>
<el-input
class="search-input"
@@ -84,7 +83,7 @@
v-for="(option, index) in config.data"
:key="index"
>
- <div v-show="config.isMultCheck">
+ <div v-show="config.isMultCheck" class="check-name">
<el-checkbox v-model="option.isChecked"></el-checkbox>
<span>{{ option.name }}</span>
</div>
@@ -99,12 +98,16 @@
</div>
<div class="btns text-center" v-show="config.isMultCheck">
<el-button
+ class="sure"
size="mini"
type="primary"
@click="checkOption(config)"
>纭畾</el-button
>
- <el-button size="mini" @click="cancleMultCheck(config)"
+ <el-button
+ size="mini"
+ @click="cancleMultCheck(config)"
+ class="cancel"
>鍙栨秷</el-button
>
</div>
@@ -175,6 +178,7 @@
v-model="IsFollow"
size="mini"
@change="filterSearchData"
+ style="width: 120px"
>
<el-option value label="鍏ㄩ儴"></el-option>
<el-option :value="'1'" label="鏈叧娉�"></el-option>
@@ -186,6 +190,7 @@
v-model="IsOperate"
size="mini"
@change="filterSearchData"
+ style="width: 120px"
>
<el-option value label="鍏ㄩ儴"></el-option>
<el-option value="0" label="鏈鐞�"></el-option>
@@ -200,14 +205,15 @@
:class="{ current: showType == 'menu' }"
@click="checkType('menu')"
>
- <i class="el-icon-menu"></i>
+ <span class="iconfont icon"> </span>
</div>
<div
- class="type"
+ class="type list"
:class="{ current: showType == 'list' }"
@click="checkType('list')"
>
- <i class="el-icon-s-operation"></i>
+ <span class="iconfont icon"></span>
+ <!-- <i class="el-icon-s-operation"></i> -->
</div>
</div>
</div>
@@ -255,13 +261,13 @@
v-for="(label, index) in data.LableLst"
:key="index"
>
- {{
- label.Desc +
- (index == data.LableLst.length - 1 ? "" : "锛�")
- }}
+ {{ label.Desc }}
</span>
</div>
- <div v-else>
+ <div v-else-if="hasError(data)" class="has-error">
+ <span>{{ errWord(data) }}</span>
+ </div>
+ <div v-else class="no-error">
<span>鏃犲紓甯�</span>
</div>
<div
@@ -313,9 +319,16 @@
<div class="content" v-show="showType == 'list'">
<el-table
:data="tableData"
+ stripe
fit
ref="elTable"
@row-click="checkVideoDetail"
+ :header-cell-style="{
+ background: '#2D52D7',
+ color: '#fff',
+ height: '50px',
+ padding: 0,
+ }"
>
<el-table-column label="鍚嶇О" prop="VideoName" sortable width="500">
<template slot-scope="scope" style="cursor: pointer">
@@ -441,7 +454,7 @@
keyword: "",
IsFollow: "",
searchTime: [
- new Date(2020, 0, 1, 0, 0, 0),
+ new Date(2021, 0, 1, 0, 0, 0),
new Date(2021, 11, 31, 23, 59, 59),
],
curTabPage: 1,
@@ -584,7 +597,6 @@
}
});
Object.assign(query, ...filterQuerys);
-
getlst(query).then((res) => {
if (_this.showType == "list") {
_this.tableTotal = res.total;
@@ -595,7 +607,7 @@
_this.tabData = _this.tabData.map(function (item) {
const set = new Set();
item.LableLst.forEach(function (label) {
- label.Desc.split("锛�").forEach(function (d) {
+ label.Desc.split(",").forEach(function (d) {
set.add(d);
});
});
@@ -621,7 +633,7 @@
StartDate: this.searchTime[0],
EndDate: this.searchTime[1],
PageIndex:
- this.showType == "list" ? this.curTablePage : this.showType == "list",
+ this.showType == "list" ? this.curTablePage : this.curTabPage,
PageSize:
this.showType == "list" ? this.tablePageSize : this.tabPageSize,
IsDetail: this.showType == "list",
@@ -652,7 +664,7 @@
_this.tabData = _this.tabData.map(function (item) {
const set = new Set();
item.LableLst.forEach(function (label) {
- label.Desc.split("锛�").forEach(function (d) {
+ label.Desc.split(",").forEach(function (d) {
set.add(d);
});
});
@@ -699,6 +711,43 @@
});
});
});
+ },
+ errWord(data) {
+ let text;
+ data.EventLst.forEach((item, i) => {
+ if (
+ item.state == 0 &&
+ item.Event.indexOf("杩涘嚭绔�") == -1 &&
+ item.Event.indexOf("淇″彿鏈�") == -1 &&
+ item.Event.indexOf("杩囧垎鐩�") == -1
+ ) {
+ text = item.Event;
+ }
+ });
+ return text || "鏈墜姣�";
+ },
+ hasError(data) {
+ let status = true;
+ if (!data.EventLst || data.EventLst.length == 0) {
+ return false;
+ }
+
+ data.EventLst.forEach((item) => {
+ if (
+ item.Event.indexOf("鐬湜") > -1 ||
+ item.Event.indexOf("浜烘暟鍙樺寲") > -1
+ ) {
+ status = false;
+ false;
+ }
+ });
+
+ if (!status) {
+ return false;
+ }
+
+ const t = data.EventLst.some((x) => x.state == 0);
+ return t && data.IsOperate == "1";
},
toggleFollow(data) {
data.IsFollow == "0" ? (data.IsFollow = "1") : (data.IsFollow = "0");
@@ -877,14 +926,28 @@
<style lang="scss">
.search-for-video-analyze {
- //鍑烘í鍚戞粴鍔ㄦ潯
- padding: 25px 33px;
- background-color: #fff;
- margin: 33px;
+ background-color: #f4f6f9;
+ margin: 0 5px;
+ margin-bottom: 10px;
+ * {
+ box-sizing: content-box;
+ color: #425277;
+ }
+ .el-input__inner {
+ border: 1px solid #d7dce8;
+ // border-color: #CCD9F0;
+ }
.flex-box {
display: flex;
+ height: 18px;
+ line-height: 18px;
}
.filter-area {
+ background: #fff;
+ padding: 22px 33px;
+ box-shadow: 0px 3px 6px#D0D7F1;
+
+ border-radius: 10px;
.input-area {
display: flex;
align-items: center;
@@ -908,15 +971,16 @@
.el-date-editor {
margin-right: 20px;
}
- .el-input-group__append,
- .el-input-group__prepend {
+ .el-input-group__append {
background-color: #2d52d7;
- color: #fff;
border: 1px solid #2d52d7;
padding: 0 16px;
white-space: nowrap;
font-size: 18px;
+ .el-icon-search {
+ color: #fff;
+ }
}
}
.checked-config {
@@ -959,18 +1023,17 @@
.config {
display: flex;
flex-wrap: no-wrap;
- cursor: pointer;
border-bottom: 1px solid #d7dce8;
-
.title {
padding: 10px 20px;
- width: 110px;
+ width: 105px;
text-align: left;
- color: #2d52d7;
font-weight: bold;
- font-size: 14px;
- .icon {
+ span {
font-size: 14px;
+ color: #2d52d7;
+ }
+ .icon {
margin-right: 10px;
}
}
@@ -982,18 +1045,25 @@
height: 40px;
overflow: hidden;
.option {
- padding: 10px 20px;
+ padding: 10px 0px;
height: 20px;
line-height: 20px;
+ min-width: 100px;
+ .check-name {
+ text-align: left;
+ padding-left: 10px;
+ }
.option-name {
- padding: 0 8px;
- color: rgba(66, 82, 119, 1);
+ padding: 0 10px;
+ text-align: left;
+ width: fit-content;
+ cursor: pointer;
}
&:hover > .option-name {
- outline: 1px solid #a8b7ee;
- padding: 0 8px;
background: #e2e7f9;
- color: #2d52d7;
+ span {
+ color: #2d52d7;
+ }
}
.el-checkbox {
padding-right: 6px;
@@ -1007,6 +1077,17 @@
font-size: 12px;
border-radius: 4px;
}
+ .sure span,
+ .cancel span {
+ color: #fff;
+ }
+ .cancel {
+ background: rgba(175, 185, 208, 1);
+ border-color: rgba(175, 185, 208, 1);
+ }
+ .el-button + .el-button {
+ margin-left: 20px;
+ }
}
}
.right-btns {
@@ -1017,7 +1098,7 @@
.more {
margin-top: 7px;
padding: 0px 6px;
-
+ cursor: pointer;
margin-right: 10px;
width: 46px;
height: 25px;
@@ -1031,20 +1112,18 @@
.multCheck {
margin-top: 7px;
width: 44px;
+ cursor: pointer;
height: 23px;
line-height: 23px;
padding: 0px 12px;
border: 1px solid #d7dce7;
border-radius: 2px;
- color: #ee4e6e;
- // &:hover {
- // color: #7695ec;
- // border-color: #7695ec;
- // }
- // &.checked {
- // color: #409eff;
- // border-color: #409eff;
- // }
+ .el-icon-plus {
+ color: #ee4e6e;
+ }
+ span {
+ color: #ee4e6e;
+ }
}
}
.el-menu.el-menu--horizontal {
@@ -1052,7 +1131,7 @@
}
.config-submenu {
.el-menu--horizontal {
- left: 20px !important;
+ // left: 20px !important;
& > ul {
flex-wrap: wrap;
}
@@ -1063,6 +1142,9 @@
border: none;
color: #2c3e50;
font-size: 12px;
+ padding: 0 10px;
+ min-width: 100px;
+ text-align: left;
}
.el-menu--popup {
display: flex;
@@ -1087,9 +1169,14 @@
}
}
.data-list {
- margin-top: 20px;
+ margin-top: 24px;
+ background: #ffffff;
+ box-shadow: 0px 3px 6px #d0d7f1;
+ border-radius: 10px;
+ padding: 24px 33px;
.header-bar {
- padding-bottom: 10px;
+ margin-bottom: 24px;
+
.left {
float: left;
display: flex;
@@ -1102,89 +1189,134 @@
display: flex;
.show-type {
display: flex;
+ .list span {
+ font-size: 18px;
+ line-height: 20px;
+ }
.type {
- font-size: 20px;
- padding: 2px 5px;
+ font-size: 17px;
+ border-radius: 4px;
cursor: pointer;
- border: 1px solid #eee;
- background-color: #ecf0fc;
- border-radius: 3px;
- color: #777;
+ height: 20px;
+ width: 20px;
+ line-height: 19px;
+
&.menu {
- margin-right: 10px;
+ margin-right: 5px;
+ span {
+ font-size: 14px;
+ }
}
&.current {
- border-color: #409eff;
- background-color: #fff;
+ span {
+ color: #fff;
+ }
+ background-color: #2d52d7;
}
}
}
}
}
.content {
- //padding-top: 14px;
- background: #f5f5f5;
- background: #fff;
- margin: 0 -30px;
- margin-bottom: -30px;
padding: 0;
.el-table__row {
cursor: pointer;
}
- .el-row {
- padding-top: 20px;
- background: #f5f5f5;
+ .el-table {
+ border: none;
+ margin-bottom: 20px;
}
.el-col {
margin-bottom: 10px;
}
.card {
- cursor: pointer;
position: relative;
text-align: left;
background: #fff;
- border-radius: 5px;
- height: 360px;
+ border-radius: 0 0 5px 5px;
+ height: 368px;
margin-bottom: 10px;
+ border: 1px solid#CCD9F0;
&:hover {
- box-shadow: 3px 2px 5px 1px rgba(0, 0, 0, 0.3);
+ box-shadow: 3px 3px 4px #d3def2;
}
.video-wrap {
+ cursor: pointer;
border-radius: 3px;
width: 100%;
- padding-top: 56.25%;
- height: 0;
+ // padding-top: 56.25%;
+ height: 57%;
position: relative;
img {
position: absolute;
top: 0;
width: 100%;
height: 100%;
- object-fit: contain;
+ object-fit: unset;
}
}
.video-info {
- padding: 10px;
+ padding: 14px;
.base-info {
> div {
margin-bottom: 1px;
}
label {
- color: #999;
+ color: #808dab;
padding-right: 8px;
+ line-height: 16px;
+ }
+ span {
+ font-weight: bold;
+ color: #425277;
+ line-height: 16px;
}
}
.mark-info {
margin: 10px 0;
color: #3d68e1;
.abnormal {
- color: red;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
+ .abnormal-label {
+ display: inline-block;
+ border: 1px solid;
+ border: 1px solid #bf3a3a;
+ border-radius: 2px;
+ color: #bf3a3a;
+ padding: 0 3px;
+ margin-right: 3px;
+ }
}
.event-tag {
- margin-top: 10px;
+ margin-top: 8px;
+ .el-tag.el-tag--info {
+ background-color: #96a0b7;
+ border-color: #96a0b7;
+ color: #fff;
+ cursor: pointer;
+ height: 19px;
+ padding: 0 5px;
+ }
+ }
+ .has-error {
+ width: fit-content;
+ background: #bf3a3a;
+ padding: 1px 5px;
+ border-radius: 2px;
+ span {
+ color: #fff;
+ }
+ }
+ .no-error {
+ width: fit-content;
+ background: #2d52d7;
+ padding: 1px 5px;
+ border-radius: 2px;
+ span {
+ color: #fff;
+ }
}
}
.tag-info {
@@ -1203,33 +1335,42 @@
font-size: 20px;
right: 10px;
bottom: 10px;
- color: #ccc;
- .follow {
- color: #409eff;
- }
}
}
+ .el-table--striped
+ .el-table__body
+ tr.el-table__row--striped
+ td.el-table__cell {
+ background: #f4f6f9;
+ }
.el-table {
- border: 1px solid #dedede;
th {
background: #f5f5f5;
color: #333;
}
- .operation {
- cursor: pointer;
- .star {
- color: #ccc;
- }
- .follow {
- color: #409eff;
- }
+ th.el-table__cell > .cell {
+ color: #fff;
+ }
+ .el-table__row > td {
+ border: none;
+ }
+ th.is-leaf {
+ border: none;
}
}
.pagination-center {
text-align: center;
margin: 0 -10px;
padding: 10px 0 20px;
- background: #f5f5f5;
+ }
+ }
+ .star {
+ font-size: 20px;
+ i {
+ color: #c7d0e5;
+ }
+ .follow {
+ color: #f90741;
}
}
.el-dialog__wrapper {
@@ -1238,6 +1379,8 @@
.dialog-video {
.el-dialog {
width: 1340px;
+ top: 70px;
+ transform: none;
}
.el-dialog__body {
background: #eaeaea;
@@ -1247,7 +1390,8 @@
.el-dialog__header {
padding: 0px;
.el-dialog__headerbtn {
- top: 6px;
+ top: 10px;
+ font-size: 20px;
}
}
.title-partment {
@@ -1288,6 +1432,7 @@
}
.dialog-event {
z-index: 2096 !important;
+
.el-dialog {
width: 1000px;
height: 800px;
--
Gitblit v1.8.0