fix: BUG修改
This commit is contained in:
parent
55ddff865b
commit
410664cf48
@ -49,4 +49,8 @@ export const getAllNvrApi = data => get('/xmgl/videoNvr/list', data); //获取
|
|||||||
export const addPluginApi = data => post('/xmgl/devMonitorPlugin/addDevMonitorPlugin', data); //新增监测插件
|
export const addPluginApi = data => post('/xmgl/devMonitorPlugin/addDevMonitorPlugin', data); //新增监测插件
|
||||||
export const getPluginApi = data => get('/xmgl/devMonitorPlugin/selectPage', data); //分页查询监测插件
|
export const getPluginApi = data => get('/xmgl/devMonitorPlugin/selectPage', data); //分页查询监测插件
|
||||||
export const editPluginApi = data => post('/xmgl/devMonitorPlugin/updateDevMonitorPlugin', data); //编辑监测插件
|
export const editPluginApi = data => post('/xmgl/devMonitorPlugin/updateDevMonitorPlugin', data); //编辑监测插件
|
||||||
export const delPluginApi = data => get('/xmgl/devMonitorPlugin/deleteById', data); //删除监测插件
|
export const delPluginApi = data => get('/xmgl/devMonitorPlugin/deleteById', data); //删除监测插件
|
||||||
|
|
||||||
|
// 监控数据分析
|
||||||
|
export const countStatusApi = data => post('xmgl/videoItem/countStatus', data);
|
||||||
|
export const countStatusTrendApi = data => post('xmgl/videoItem/countStatusTrend', data);
|
||||||
@ -6,8 +6,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="time-condition">
|
<div class="time-condition">
|
||||||
<el-radio-group v-model="timeRadio" size="small">
|
<el-radio-group v-model="timeRadio" size="small">
|
||||||
<el-radio-button label="3">近七日</el-radio-button>
|
<el-radio-button label="1">近七日</el-radio-button>
|
||||||
<el-radio-button label="4">近一月</el-radio-button>
|
<el-radio-button label="2">近一月</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -22,20 +22,45 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import echarts from "echarts4";
|
import echarts from "echarts4";
|
||||||
|
import {
|
||||||
|
countStatusTrendApi
|
||||||
|
} from "@/assets/js/api/equipmentCenter/cameraList";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
timeRadio: "3",
|
timeRadio: "1",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {},
|
created() {
|
||||||
|
this.getCountStatusTrendFn();
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.centerOne();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
centerOne() {
|
getCountStatusTrendFn(){
|
||||||
|
let that = this;
|
||||||
|
countStatusTrendApi({
|
||||||
|
projectSn: this.$store.state.projectSn,
|
||||||
|
type: this.timeRadio
|
||||||
|
}).then((res) => {
|
||||||
|
console.log("趋势图", res);
|
||||||
|
that.centerOne(res.result)
|
||||||
|
});
|
||||||
|
},
|
||||||
|
centerOne(arr) {
|
||||||
|
let xData = [];
|
||||||
|
let yData1 = [];
|
||||||
|
let yData2 = [];
|
||||||
|
if(arr){
|
||||||
|
arr.map(item => {
|
||||||
|
xData.push(item.date)
|
||||||
|
yData1.push(item.onlineRatio + "%")
|
||||||
|
yData2.push(item.normalRatio + "%")
|
||||||
|
})
|
||||||
|
}
|
||||||
let ageChart = echarts.init(this.$refs.ChartFour);
|
let ageChart = echarts.init(this.$refs.ChartFour);
|
||||||
let option = {
|
let option = {
|
||||||
|
color: ["#65B1E5","#4775FC"],
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: "axis",
|
trigger: "axis",
|
||||||
axisPointer: {
|
axisPointer: {
|
||||||
@ -46,7 +71,7 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
legend: {
|
legend: {
|
||||||
data: ["Email"],
|
data: ["监控点在线率","图像正常率"],
|
||||||
right: 20,
|
right: 20,
|
||||||
top: 10
|
top: 10
|
||||||
},
|
},
|
||||||
@ -61,7 +86,7 @@ export default {
|
|||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
boundaryGap: false,
|
boundaryGap: false,
|
||||||
data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
|
data: xData,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
yAxis: [
|
yAxis: [
|
||||||
@ -71,14 +96,24 @@ export default {
|
|||||||
],
|
],
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
name: "Email",
|
name: "监控点在线率",
|
||||||
type: "line",
|
type: "line",
|
||||||
stack: "Total",
|
stack: "Total",
|
||||||
areaStyle: {},
|
areaStyle: {},
|
||||||
emphasis: {
|
emphasis: {
|
||||||
focus: "series",
|
focus: "series",
|
||||||
},
|
},
|
||||||
data: [120, 132, 101, 134, 90, 230, 210],
|
data: yData1,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "图像正常率",
|
||||||
|
type: "line",
|
||||||
|
stack: "Total",
|
||||||
|
areaStyle: {},
|
||||||
|
emphasis: {
|
||||||
|
focus: "series",
|
||||||
|
},
|
||||||
|
data: yData2,
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|||||||
@ -11,15 +11,31 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import echarts from "echarts4";
|
import echarts from "echarts4";
|
||||||
|
import {
|
||||||
|
countStatusApi
|
||||||
|
} from "@/assets/js/api/equipmentCenter/cameraList";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {
|
||||||
|
countData: {}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getCountStatusFn();
|
||||||
},
|
},
|
||||||
created() {},
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.topChartOne();
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getCountStatusFn(){
|
||||||
|
let that = this;
|
||||||
|
countStatusApi({
|
||||||
|
projectSn: this.$store.state.projectSn,
|
||||||
|
}).then((res) => {
|
||||||
|
console.log("获取视频分组列表", res);
|
||||||
|
that.countData = res.result;
|
||||||
|
that.topChartOne();
|
||||||
|
});
|
||||||
|
},
|
||||||
// 顶部图1
|
// 顶部图1
|
||||||
topChartOne() {
|
topChartOne() {
|
||||||
let ageChart = echarts.init(this.$refs.ChartOne);
|
let ageChart = echarts.init(this.$refs.ChartOne);
|
||||||
@ -30,7 +46,7 @@ export default {
|
|||||||
show: true,
|
show: true,
|
||||||
left: "32%",
|
left: "32%",
|
||||||
top: "40%",
|
top: "40%",
|
||||||
text: "100.00%",
|
text: this.countData.onlineRatio + "%",
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontSize: 20,
|
fontSize: 20,
|
||||||
color: "#000",
|
color: "#000",
|
||||||
@ -107,9 +123,9 @@ export default {
|
|||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
data: [
|
data: [
|
||||||
{ value: 1048, name: "在线" },
|
{ value: this.countData.onlineNum || 0, name: "在线" },
|
||||||
{ value: 735, name: "离线" },
|
{ value: this.countData.offlineNum || 0, name: "离线" },
|
||||||
{ value: 580, name: "未检测" },
|
{ value: this.countData.notDetectNum || 0, name: "未检测" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
<div class="top-content">
|
<div class="top-content">
|
||||||
<div class="top-content-one">
|
<div class="top-content-one">
|
||||||
<span>监控点总数</span>
|
<span>监控点总数</span>
|
||||||
<span>56</span>
|
<span>{{countData.total || 0}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="top-content-two">
|
<div class="top-content-two">
|
||||||
<ChartOne></ChartOne>
|
<ChartOne></ChartOne>
|
||||||
@ -129,6 +129,9 @@ import ChartTwo from "./chartComponents/ChartTwo";
|
|||||||
import ChartThree from "./chartComponents/ChartThree";
|
import ChartThree from "./chartComponents/ChartThree";
|
||||||
import ChartFour from "./chartComponents/ChartFour";
|
import ChartFour from "./chartComponents/ChartFour";
|
||||||
import ChartFive from "./chartComponents/ChartFive";
|
import ChartFive from "./chartComponents/ChartFive";
|
||||||
|
import {
|
||||||
|
countStatusApi
|
||||||
|
} from "@/assets/js/api/equipmentCenter/cameraList";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@ -141,6 +144,7 @@ export default {
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0,
|
||||||
},
|
},
|
||||||
|
countData: {}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
@ -150,9 +154,19 @@ export default {
|
|||||||
ChartFour,
|
ChartFour,
|
||||||
ChartFive,
|
ChartFive,
|
||||||
},
|
},
|
||||||
created() {},
|
created() {
|
||||||
mounted() {},
|
this.getCountStatusFn();
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getCountStatusFn(){
|
||||||
|
let that = this;
|
||||||
|
countStatusApi({
|
||||||
|
projectSn: this.$store.state.projectSn,
|
||||||
|
}).then((res) => {
|
||||||
|
console.log("获取视频分组列表", res);
|
||||||
|
that.countData = res.result;
|
||||||
|
});
|
||||||
|
},
|
||||||
handleSizeChange(val) {
|
handleSizeChange(val) {
|
||||||
this.pageInfo.pageSize = val;
|
this.pageInfo.pageSize = val;
|
||||||
this.searchData();
|
this.searchData();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user