|
@@ -3,22 +3,15 @@
|
|
<layout>
|
|
<layout>
|
|
<template #left>
|
|
<template #left>
|
|
<div class="left_spection">
|
|
<div class="left_spection">
|
|
- <!-- <div style="height: 30%;">
|
|
|
|
- <HeadlineTag value="水滴图"></HeadlineTag>
|
|
|
|
- <div class="box_arch center_in">
|
|
|
|
- <div style="width: 50%;height: 100%;">
|
|
|
|
- <waterdrop width="100%" color="rgb(42, 139, 247)"></waterdrop>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div> -->
|
|
|
|
- <div class="flex_spection">
|
|
|
|
|
|
+ <div class="flex_spection" style="height: 100%;">
|
|
<HeadlineTag value="设备列表"></HeadlineTag>
|
|
<HeadlineTag value="设备列表"></HeadlineTag>
|
|
- <div class="box_arch_point">
|
|
|
|
- <div class="point_box" style="margin-top: 10px;margin-left: 15px;">
|
|
|
|
- <el-input v-model="input" placeholder="按设备名称搜索" />
|
|
|
|
- </div>
|
|
|
|
|
|
+ <div class="point_box" style="margin-top: 10px;margin-left: 15px;">
|
|
|
|
+ <el-input v-model="input" placeholder="按设备名称搜索" />
|
|
|
|
+ </div>
|
|
|
|
+ <div style="height: calc(100% - 85px);">
|
|
<equipment :resultData="leftData.DeviceList"></equipment>
|
|
<equipment :resultData="leftData.DeviceList"></equipment>
|
|
- <!-- <div style="height: calc(100% - 160px);">
|
|
|
|
|
|
+ </div>
|
|
|
|
+ <!-- <div style="height: calc(100% - 160px);">
|
|
<Empty></Empty>
|
|
<Empty></Empty>
|
|
</div>
|
|
</div>
|
|
<div class="center_in">
|
|
<div class="center_in">
|
|
@@ -26,7 +19,6 @@
|
|
v-model:limit="queryParams.pageSize" layout="total, prev, pager, next"
|
|
v-model:limit="queryParams.pageSize" layout="total, prev, pager, next"
|
|
@pagination="getList" />
|
|
@pagination="getList" />
|
|
</div> -->
|
|
</div> -->
|
|
- </div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -55,19 +47,16 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="flex_spection">
|
|
|
|
|
|
+ <div class="flex_spection" style="height: 33%;">
|
|
<HeadlineTag type="right" value="设备群控"></HeadlineTag>
|
|
<HeadlineTag type="right" value="设备群控"></HeadlineTag>
|
|
<div class="box_arch">
|
|
<div class="box_arch">
|
|
- <!-- <div ref="chartRouting" style="width: 100%;height: 100%;"></div> -->
|
|
|
|
- <dv-scroll-board :config="groupControl"
|
|
|
|
- style="width:100%;height:calc(100% - 10px);margin-top: 10px;" />
|
|
|
|
|
|
+ <groupControl :resultData="leftData.DeviceList"></groupControl>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <div class="flex_spection">
|
|
|
|
|
|
+ <div class="flex_spection" style="height: 33%;">
|
|
<HeadlineTag type="right" value="运行事件"></HeadlineTag>
|
|
<HeadlineTag type="right" value="运行事件"></HeadlineTag>
|
|
<div class="box_arch">
|
|
<div class="box_arch">
|
|
- <dv-scroll-board :config="config"
|
|
|
|
- style="width:100%;height:calc(100% - 10px);margin-top: 10px;" />
|
|
|
|
|
|
+ <incident :resultData="leftData.DeviceList"></incident>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -83,167 +72,14 @@ import HeadlineTag from '@/components/HeadlineTag'
|
|
import Empty from '@/components/Empty'
|
|
import Empty from '@/components/Empty'
|
|
import waterdrop from '@/components/waterdrop'
|
|
import waterdrop from '@/components/waterdrop'
|
|
import equipment from './equipment.vue'
|
|
import equipment from './equipment.vue'
|
|
-import * as echarts from 'echarts'
|
|
|
|
|
|
+import groupControl from './groupControl.vue'
|
|
|
|
+import incident from './incident.vue'
|
|
const total = ref(0);
|
|
const total = ref(0);
|
|
const queryParams = ref({
|
|
const queryParams = ref({
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
});
|
|
});
|
|
const input = ref('')
|
|
const input = ref('')
|
|
-const groupControl = ref({
|
|
|
|
- headerBGC: '#10285c',
|
|
|
|
- oddRowBGC: '#10285c7f',
|
|
|
|
- evenRowBGC: '#10285c00',
|
|
|
|
- header: ['名称', '位置', '时间'],
|
|
|
|
- data: [
|
|
|
|
- ['行1列1', '行1列2', '行1列3'],
|
|
|
|
- ['行2列1', '行2列2', '行2列3'],
|
|
|
|
- ['行3列1', '行3列2', '行3列3'],
|
|
|
|
- ['行4列1', '行4列2', '行4列3'],
|
|
|
|
- ['行5列1', '行5列2', '行5列3'],
|
|
|
|
- ['行6列1', '行6列2', '行6列3'],
|
|
|
|
- ['行7列1', '行7列2', '行7列3'],
|
|
|
|
- ['行8列1', '行8列2', '行8列3'],
|
|
|
|
- ['行9列1', '行9列2', '行9列3'],
|
|
|
|
- ['行10列1', '行10列2', '行10列3']
|
|
|
|
- ]
|
|
|
|
-})
|
|
|
|
-const config = ref({
|
|
|
|
- headerBGC: '#10285c',
|
|
|
|
- oddRowBGC: '#10285c7f',
|
|
|
|
- evenRowBGC: '#10285c00',
|
|
|
|
- header: ['名称', '事件', '时间'],
|
|
|
|
- data: [
|
|
|
|
- ['行1列1', '行1列2', '行1列3'],
|
|
|
|
- ['行2列1', '行2列2', '行2列3'],
|
|
|
|
- ['行3列1', '行3列2', '行3列3'],
|
|
|
|
- ['行4列1', '行4列2', '行4列3'],
|
|
|
|
- ['行5列1', '行5列2', '行5列3'],
|
|
|
|
- ['行6列1', '行6列2', '行6列3'],
|
|
|
|
- ['行7列1', '行7列2', '行7列3'],
|
|
|
|
- ['行8列1', '行8列2', '行8列3'],
|
|
|
|
- ['行9列1', '行9列2', '行9列3'],
|
|
|
|
- ['行10列1', '行10列2', '行10列3']
|
|
|
|
- ]
|
|
|
|
-})
|
|
|
|
-
|
|
|
|
-/** 查询列表 */
|
|
|
|
-function getList() {
|
|
|
|
-};
|
|
|
|
-const chartRouting = ref(null);
|
|
|
|
-let chartInstance = null;
|
|
|
|
-// 初始化图表
|
|
|
|
-const initChart = () => {
|
|
|
|
- if (!chartInstance) {
|
|
|
|
- chartInstance = echarts.init(chartRouting.value);
|
|
|
|
- }
|
|
|
|
- chartInstance.setOption({
|
|
|
|
- tooltip: {
|
|
|
|
- trigger: 'axis',
|
|
|
|
- textStyle: {
|
|
|
|
- color: '#fafafa',
|
|
|
|
- },
|
|
|
|
- borderColor: 'transparent',
|
|
|
|
- backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
|
|
|
- extraCssText: 'backdrop-filter: blur(6px);',
|
|
|
|
- },
|
|
|
|
- legend: {
|
|
|
|
- data: ['产值', '增加值'],
|
|
|
|
- icon: 'rich',
|
|
|
|
- show: true,
|
|
|
|
- itemWidth: 18,
|
|
|
|
- itemHeight: 2,
|
|
|
|
- textStyle: {
|
|
|
|
- color: '#AFBDD1',
|
|
|
|
- fontSize: '12px',
|
|
|
|
- },
|
|
|
|
- top: 8,
|
|
|
|
- right: 10,
|
|
|
|
- itemGap: 34,
|
|
|
|
- },
|
|
|
|
- grid: {
|
|
|
|
- left: '4%',
|
|
|
|
- right: '4%',
|
|
|
|
- bottom: '10%',
|
|
|
|
- top: '16%',
|
|
|
|
- containLabel: true,
|
|
|
|
- },
|
|
|
|
- xAxis: {
|
|
|
|
- data: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
|
|
|
|
- type: 'category',
|
|
|
|
- boundaryGap: false,
|
|
|
|
- axisLine: {
|
|
|
|
- symbol: 'none',
|
|
|
|
- lineStyle: {
|
|
|
|
- color: '#50637A',
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- axisTick: {
|
|
|
|
- show: false,
|
|
|
|
- },
|
|
|
|
- axisLabel: {
|
|
|
|
- interval: 0,
|
|
|
|
- color: '#ffffff',
|
|
|
|
- fontSize: 12,
|
|
|
|
- padding: [10, 0, 0, 0],
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- yAxis: {
|
|
|
|
- type: 'value',
|
|
|
|
- axisLabel: {
|
|
|
|
- color: '#ffffff',
|
|
|
|
- fontSize: 12,
|
|
|
|
- padding: [0, 10, 0, 0],
|
|
|
|
- },
|
|
|
|
- splitLine: {
|
|
|
|
- show: false,
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- series: [
|
|
|
|
- {
|
|
|
|
- name: '增加值',
|
|
|
|
- data: [1, 2, 3, 4, 7, 6, 7, 8, 4, 10],
|
|
|
|
- type: 'line',
|
|
|
|
- smooth: true,
|
|
|
|
- color: '#00F7FF',
|
|
|
|
- lineStyle: {
|
|
|
|
- width: 2,
|
|
|
|
- },
|
|
|
|
- areaStyle: {
|
|
|
|
- color: new echarts.graphic.LinearGradient(
|
|
|
|
- 0,
|
|
|
|
- 0,
|
|
|
|
- 0,
|
|
|
|
- 1,
|
|
|
|
- [{
|
|
|
|
- offset: 0,
|
|
|
|
- color: 'rgba(0, 247, 255, .6)',
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- offset: 0.8,
|
|
|
|
- color: 'rgba(0, 247, 255, .2)',
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- false
|
|
|
|
- ),
|
|
|
|
- shadowColor: 'rgba(0, 0, 0, 0.1)',
|
|
|
|
- shadowBlur: 10,
|
|
|
|
- },
|
|
|
|
- symbol: 'circle',
|
|
|
|
- symbolSize: 6,
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- });
|
|
|
|
-};
|
|
|
|
-// 生命周期
|
|
|
|
-onMounted(() => {
|
|
|
|
- intervalId.value = setInterval(getIntellData, 10000);
|
|
|
|
- getIntellData()
|
|
|
|
- // initChart()
|
|
|
|
-});
|
|
|
|
-onUnmounted(() => {
|
|
|
|
- clearInterval(intervalId.value);
|
|
|
|
-})
|
|
|
|
const intervalId = ref(null)
|
|
const intervalId = ref(null)
|
|
const leftData = ref({})
|
|
const leftData = ref({})
|
|
function getIntellData() {
|
|
function getIntellData() {
|
|
@@ -253,44 +89,14 @@ function getIntellData() {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
-
|
|
|
|
-watch(() => leftData.value, (newVal) => {
|
|
|
|
- let arrData = []
|
|
|
|
- let arrDatail = newVal.DeviceList
|
|
|
|
- if (arrDatail && arrDatail.length > 0) {
|
|
|
|
- arrDatail.forEach((item) => {
|
|
|
|
- let arrData2 = []
|
|
|
|
- arrData2.push(item.Name)
|
|
|
|
- arrData2.push(item.AlarmContent)
|
|
|
|
- arrData2.push(item.Date)
|
|
|
|
- arrData.push(arrData2)
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- config.value.data = arrData
|
|
|
|
- let arrData1 = []
|
|
|
|
- let arrDatail1 = newVal.DeviceList
|
|
|
|
- if (arrDatail1 && arrDatail1.length > 0) {
|
|
|
|
- arrDatail1.forEach((item) => {
|
|
|
|
- let arrData2 = []
|
|
|
|
- arrData2.push(item.Name)
|
|
|
|
- let title = ''
|
|
|
|
- if (item.State == 0) {
|
|
|
|
- title = '在线'
|
|
|
|
- } else {
|
|
|
|
- title = '离线'
|
|
|
|
- }
|
|
|
|
- arrData2.push(title)
|
|
|
|
- arrData2.push(item.Date)
|
|
|
|
- arrData1.push(arrData2)
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- groupControl.value.data = arrData1
|
|
|
|
-}, { deep: true, immediate: true } // 开启深度监听
|
|
|
|
-)
|
|
|
|
-// 窗口自适应
|
|
|
|
-window.addEventListener('resize', () => {
|
|
|
|
- chartInstance?.resize();
|
|
|
|
|
|
+// 生命周期
|
|
|
|
+onMounted(() => {
|
|
|
|
+ intervalId.value = setInterval(getIntellData, 10000);
|
|
|
|
+ getIntellData()
|
|
});
|
|
});
|
|
|
|
+onUnmounted(() => {
|
|
|
|
+ clearInterval(intervalId.value);
|
|
|
|
+})
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
@@ -308,6 +114,7 @@ window.addEventListener('resize', () => {
|
|
height: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
|
+ overflow: hidden;
|
|
}
|
|
}
|
|
|
|
|
|
.right_spection {
|
|
.right_spection {
|
|
@@ -324,7 +131,8 @@ window.addEventListener('resize', () => {
|
|
}
|
|
}
|
|
|
|
|
|
.operation_spection {
|
|
.operation_spection {
|
|
- height: 250px;
|
|
|
|
|
|
+ height: 30%;
|
|
|
|
+ flex: none;
|
|
color: #fff;
|
|
color: #fff;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -343,7 +151,7 @@ window.addEventListener('resize', () => {
|
|
position: relative;
|
|
position: relative;
|
|
flex: none;
|
|
flex: none;
|
|
width: 200px;
|
|
width: 200px;
|
|
- height: 100%;
|
|
|
|
|
|
+ height: 85%;
|
|
background: url("@/assets/images/tubbiness.png");
|
|
background: url("@/assets/images/tubbiness.png");
|
|
background-size: 80% 80%;
|
|
background-size: 80% 80%;
|
|
background-position: center center;
|
|
background-position: center center;
|