From 5fb65ada8ccc28eabf823b284de70fbd3ca1f41e Mon Sep 17 00:00:00 2001
From: ZZJ <zzjdsg2300@163.com>
Date: 星期二, 28 九月 2021 18:29:36 +0800
Subject: [PATCH] 抓拍大图层级修复v1
---
src/pages/analysisPower/index/App.vue | 100 +++++++++++++++++++++++++++++++++++---------------
1 files changed, 70 insertions(+), 30 deletions(-)
diff --git a/src/pages/analysisPower/index/App.vue b/src/pages/analysisPower/index/App.vue
index 9aef803..a5a1294 100644
--- a/src/pages/analysisPower/index/App.vue
+++ b/src/pages/analysisPower/index/App.vue
@@ -50,7 +50,13 @@
</div>
<span :class="stretchStyle" @click="strethTable = !strethTable"></span>
- <el-button size="small" type="primary" style="float:right" @click="openDrawer">璁剧疆</el-button>
+ <el-button
+ size="small"
+ type="primary"
+ style="float:right"
+ @click="openDrawer"
+ v-if="showSetting"
+ >璁剧疆</el-button>
</div>
<el-table
@@ -61,7 +67,7 @@
:cell-style="cellStyle"
>
<el-table-column label="搴忓彿" type="index" align="center" width="60px"></el-table-column>
- <el-table-column label="鎽勫儚鏈哄悕绉�" align="center" show-overflow-tooltip sortable>
+ <el-table-column label="鎽勫儚鏈哄悕绉�" align="center" show-overflow-tooltip>
<template slot-scope="scope">
<span
:style="scope.row.is_running ? `color:#3d68e1` : '' "
@@ -69,25 +75,33 @@
</template>
</el-table-column>
<el-table-column label="鎽勫儚鏈哄湴鍧�" prop="addr" align="center" show-overflow-tooltip sortable></el-table-column>
- <el-table-column label="鎽勫儚鏈篒P" prop="ip" align="center" width="130px" sortable></el-table-column>
- <el-table-column label="鎽勫儚鏈虹被鍨�" align="center" width="120px" sortable>
+ <el-table-column
+ label="鎽勫儚鏈篒P"
+ prop="ip"
+ align="center"
+ width="130px"
+ sortable
+ :sort-method="ipSortMethod"
+ ></el-table-column>
+ <el-table-column label="鎽勫儚鏈虹被鍨�" align="center" width="120px">
<template slot-scope="scope">
<span>{{scope.row.run_type | cameraType}}</span>
</template>
</el-table-column>
- <el-table-column label="鎵ц绠楁硶" align="center" show-overflow-tooltip sortable>
+ <el-table-column label="鎵ц绠楁硶" align="center" show-overflow-tooltip>
<template slot-scope="scope">
<span v-if="scope.row.run_type === -1 ">-</span>
- <span v-else>{{scope.row.tasks | taskList}}</span>
+ <span v-else-if="scope.row.tasks != null ">{{scope.row.tasks | taskList}}</span>
+ <span v-else>-</span>
</template>
</el-table-column>
- <el-table-column label="杩愯璁惧" align="center" width="160px">
+ <el-table-column label="杩愯璁惧" align="center" width="160px" sortable>
<template slot-scope="scope">
<span v-if="scope.row.run_type === -1 ">-</span>
<span v-else>{{scope.row.runServerName}}</span>
</template>
</el-table-column>
- <el-table-column label="鐘舵��" align="center" show-overflow-tooltip sortable width="100px">
+ <el-table-column label="鐘舵��" align="center" show-overflow-tooltip width="100px">
<template slot-scope="scope">
<span v-if="scope.row.status === -1 ">-</span>
<span v-else-if="scope.row.status === 2">{{"澶勭悊涓�"}}</span>
@@ -184,14 +198,10 @@
import { changeRunType, updatePollEnable, updatePollPeriod, updateChannelCount } from "@/api/pollConfig";
import Sysinfo from "@/components/subComponents/SystemInfo"
-// import SliderVedio from '@/components/camera/slider-vedio'
-// import eChartsBar from '@/components/subComponents/eChartsBar'
export default {
name: "PollSeting",
components: {
Sysinfo,
- // SliderVedio,
- // eChartsBar
},
filters: {
cameraType(type) {
@@ -228,22 +238,41 @@
}
})
- return sumPollingCamera * this.PollData.Config.poll_period
+ // 鎵�鏈夎疆璇㈢殑鎽勫儚鏈烘�绘暟 * 杞鏃堕棿 / 杞绠楀姏 - 1
+ let ret = (sumPollingCamera * this.PollData.Config.poll_period) / this.PollData.PollValidCount - 1
+ if (String(ret).indexOf(".") > 0) {
+ ret = ret.toFixed(1)
+ }
+
+ return ret < 0 ? 0 : ret
+ },
+ isAdmin() {
+ if (
+ sessionStorage.getItem("userInfo") &&
+ sessionStorage.getItem("userInfo") !== ""
+ ) {
+ let loginName = JSON.parse(sessionStorage.getItem("userInfo")).username;
+ return loginName === "superadmin" || loginName === "basic";
+ }
+
+ return false;
+ },
+ showSetting() {
+ return this.isAdmin || this.buttonAuthority.indexOf("analysisPower:set") > -1
}
},
data() {
return {
- switchValue: true,
search: "",
timeout: null,
taskName: [],
dataList: [],
barChart: {},
- localDataChannel: 2,
showSysInfo: false,
drawer: false,
formData: {},
- strethTable: false
+ strethTable: false,
+ buttonAuthority: sessionStorage.getItem("buttonAuthoritys") || [],
};
},
mounted() {
@@ -256,6 +285,15 @@
clearTimeout(this.timeout);
},
methods: {
+ ipSortMethod(a, b) {
+ if (Number(a.ip.substr(a.ip.lastIndexOf('.') + 1)) < Number(b.ip.substr(b.ip.lastIndexOf('.') + 1))) {
+ return -1;
+ }
+ if (Number(a.ip.substr(a.ip.lastIndexOf('.') + 1)) > Number(b.ip.substr(b.ip.lastIndexOf('.') + 1))) {
+ return 1;
+ }
+ return 0;
+ },
openDrawer() {
this.initFormData();
this.drawer = true;
@@ -267,7 +305,8 @@
initFormData() {
this.formData = {
totalChanle: this.PollData.channelTotal,
- realTime: this.PollData.RealTimeSum,
+ //realTime: this.PollData.RealTimeSum,
+ realTime: this.PollData.RealTimeValidCount,
pollEnable: this.PollData.Enabled,
pollPeriod: this.PollData.Config.poll_period,
polling: this.PollData.PollChannelTotal,
@@ -483,8 +522,8 @@
}
// console.log("this.formData.polling:"+this.formData.polling)
},
- cellStyle(obj){
- if(obj.column.label=='鎽勫儚鏈哄悕绉�'||obj.column.label=='鎽勫儚鏈哄湴鍧�'){
+ cellStyle(obj) {
+ if (obj.column.label == '鎽勫儚鏈哄悕绉�' || obj.column.label == '鎽勫儚鏈哄湴鍧�') {
return 'text-align:left;padding-left:8px;'
}
}
@@ -503,7 +542,9 @@
height: 190px;
min-width: 1609px;
display: flex;
-
+ .sysinfo-box .eCharts-box {
+ width: 36%;
+ }
.progressBar {
width: 26%;
}
@@ -513,7 +554,6 @@
//float: left;
padding-left: 30px;
box-sizing: border-box;
-
}
.barGraph {
width: 16%;
@@ -575,12 +615,12 @@
// margin-top: 150px;
font-family: PingFangSC-Medium;
font-size: 14px;
- &:focus{
+ &:focus {
outline: none;
}
- .el-dialog__close{
- &:focus{
- outline: none!important;
+ .el-dialog__close {
+ &:focus {
+ outline: none !important;
}
}
.dawer_details {
@@ -601,16 +641,16 @@
margin-left: 20px;
}
}
-
+
.el-drawer__header {
border-bottom: 2px solid #eee;
padding-bottom: 10px;
font-size: 16px;
margin-bottom: 0px;
- span{
- border: none!important;
- border-image-width: 0!important;
- &:focus{
+ span {
+ border: none !important;
+ border-image-width: 0 !important;
+ &:focus {
outline: none;
}
}
--
Gitblit v1.8.0