修改测试bug
This commit is contained in:
@@ -1,29 +1,39 @@
|
||||
<!-- 补召日志 -->
|
||||
<template>
|
||||
<el-dialog
|
||||
modal-class="analysisList"
|
||||
v-model="dialogVisible"
|
||||
title="补召日志"
|
||||
width="70%"
|
||||
draggable
|
||||
@closed="close"
|
||||
>
|
||||
<TableHeader date-picker></TableHeader>
|
||||
<el-dialog modal-class="analysisList" v-model="dialogVisible" title="补召日志" width="70%" draggable @closed="close">
|
||||
<TableHeader date-picker :showReset="false">
|
||||
<template #operation>
|
||||
<el-button type="primary" icon="el-icon-Connection" @click="handleImport">
|
||||
离线补召
|
||||
</el-button>
|
||||
<el-button type="primary" icon="el-icon-Monitor" @click="handleaddDevice">
|
||||
在线补召
|
||||
</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
</el-dialog>
|
||||
<popup ref="detailRef"></popup>
|
||||
<!-- 离线数据导入组件 -->
|
||||
<offLineDataImport ref="offLineDataImportRef"></offLineDataImport>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, provide, onBeforeUnmount } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import offLineDataImport from '../offLineDataImport/index.vue'
|
||||
import popup from './popup.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
const emit = defineEmits(['back'])
|
||||
const dialogVisible = ref(false)
|
||||
const height = ref(0)
|
||||
height.value = window.innerHeight < 1080 ? 230 : 450
|
||||
const detailRef: any = ref()
|
||||
const lineId = ref('')
|
||||
const deviceId = ref('')
|
||||
const deviceData = ref({})
|
||||
const { push, options, currentRoute } = useRouter()
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/cs-device-boot/portableOfflLog/queryMainLogPage',
|
||||
publicHeight: 400,
|
||||
@@ -39,7 +49,7 @@ const tableStore: any = new TableStore({
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
}
|
||||
},
|
||||
{ field: 'successCount', title: '成功解析数', minWidth: 170 },
|
||||
{ field: 'successCount', title: '成功解析数', minWidth: 150 },
|
||||
{ field: 'startTime', title: '导入开始时间', minWidth: 170 },
|
||||
{ field: 'endTime', title: '导入结束时间', minWidth: 170 },
|
||||
{
|
||||
@@ -65,7 +75,7 @@ const tableStore: any = new TableStore({
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
width: '180',
|
||||
width: '100',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
@@ -100,7 +110,10 @@ provide('tableStore', tableStore)
|
||||
const handleBack = () => {
|
||||
emit('back')
|
||||
}
|
||||
const open = () => {
|
||||
const open = (row: any) => {
|
||||
lineId.value = row.lineId
|
||||
deviceData.value = row.deviceData
|
||||
deviceId.value = row.deviceId
|
||||
dialogVisible.value = true
|
||||
setTimeout(() => {
|
||||
tableStore.index()
|
||||
@@ -115,6 +128,21 @@ const updateViewportHeight = async () => {
|
||||
// tableStore.table.publicHeight = height.value
|
||||
// await tableStore.index()
|
||||
}
|
||||
//设备补召
|
||||
const handleaddDevice = () => {
|
||||
push({
|
||||
path: '/supplementaryRecruitment',
|
||||
query: {
|
||||
id: lineId.value,
|
||||
ndid: deviceData.value?.ndid
|
||||
}
|
||||
})
|
||||
}
|
||||
const offLineDataImportRef = ref()
|
||||
const handleImport = () => {
|
||||
//设备devId&监测点lineId带入组件
|
||||
offLineDataImportRef.value && offLineDataImportRef.value.open(deviceId.value, lineId.value)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
updateViewportHeight() // 初始化视口高度
|
||||
@@ -126,9 +154,4 @@ onBeforeUnmount(() => {
|
||||
})
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-dialog__body {
|
||||
overflow-y: hidden !important;
|
||||
height: 70vh !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -9,15 +9,15 @@
|
||||
<!-- <el-button v-if="deviceType == '1'" type="primary" @click="handleDownLoadTemplate">
|
||||
模版下载
|
||||
</el-button> -->
|
||||
<el-button v-if="deviceType == '1'" type="primary" icon="el-icon-Connection" @click="handleImport">
|
||||
<!-- <el-button v-if="deviceType == '1'" type="primary" icon="el-icon-Connection" @click="handleImport">
|
||||
离线补召
|
||||
</el-button>
|
||||
<el-button v-if="deviceType == '1'" type="primary" icon="el-icon-Monitor" @click="handleaddDevice">
|
||||
在线补召
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
<el-button v-if="deviceType == '1'" type="primary" icon="el-icon-Tickets"
|
||||
@click="handleAnalysisList">
|
||||
补召日志
|
||||
补召
|
||||
</el-button>
|
||||
</template>
|
||||
<el-descriptions-item label="名称">
|
||||
@@ -131,15 +131,22 @@
|
||||
"
|
||||
></div> -->
|
||||
<!-- v-loading="tableLoading" -->
|
||||
|
||||
<div style="overflow: auto" :style="{ height: tableHeight }" v-loading="tableLoading" v-if="
|
||||
dataSet.indexOf('_trenddata') == -1 &&
|
||||
dataSet.indexOf('_realtimedata') == -1 &&
|
||||
dataSet.indexOf('_event') == -1 &&
|
||||
tableData.length != 0
|
||||
">
|
||||
<div class="mb5 mt5" v-if="dataSet.indexOf('_history') == -1">
|
||||
统计时间:{{ tableData[0].children.length ? tableData[0].children[0].time : '' }}
|
||||
</div>
|
||||
<!-- 循环渲染的card 最新数据/历史数据显示 -->
|
||||
<div class="content" v-if="tableData.length != 0 && !tableLoading">
|
||||
<el-card class="box-card" v-for="(item, index) in tableData" :key="index">
|
||||
<div class="content" v-if="tableData.length != 0 && !tableLoading"
|
||||
:style="{ height: tableHeightBox }">
|
||||
|
||||
<el-card class="box-card" :class="dataSet.indexOf('_history') == -1 ? 'box-card-new' : ''"
|
||||
v-for="(item, index) in tableData" :key="index">
|
||||
<template #header>
|
||||
<div class="clearfix">
|
||||
<span style="flex: 1">{{ item.name }}</span>
|
||||
@@ -149,15 +156,17 @@
|
||||
</template>
|
||||
<!-- 模块数据 -->
|
||||
<div class="box-card-content" v-if="dataSet.indexOf('_history') == -1">
|
||||
<div v-for="(child, childIndex) in item.children" :key="childIndex">
|
||||
{{ child.anotherName }}:
|
||||
{{ child.dataValue === 3.1415926 ? '暂无数据' : child.dataValue }}
|
||||
</div>
|
||||
<div class="mt10">
|
||||
统计时间:{{ item.children.length ? item.children[0].time : '' }}
|
||||
<div class="box-card-div">
|
||||
<div v-for="(child, childIndex) in item.children" :key="childIndex">
|
||||
{{ child.anotherName }}:
|
||||
{{ child.dataValue === 3.1415926 ? '暂无数据' : child.dataValue }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
<div v-else-if="item.children.length">
|
||||
<div v-else-if="item.children.length" class="box-card-div">
|
||||
<div style="display: flex; align-items: center">
|
||||
<el-tag effect="dark" type="danger" style="width: 40px; text-align: center"
|
||||
class="mr10">
|
||||
@@ -170,7 +179,7 @@
|
||||
: item.children[0].maxValue
|
||||
}}
|
||||
</div>
|
||||
<div style="display: flex; align-items: center" class="mt10">
|
||||
<div style="display: flex; align-items: center">
|
||||
<el-tag effect="dark" type="success" style="width: 40px; text-align: center"
|
||||
class="mr10">
|
||||
AVG
|
||||
@@ -182,7 +191,7 @@
|
||||
: item.children[0].avgValue
|
||||
}}
|
||||
</div>
|
||||
<div style="display: flex; align-items: center" class="mt10">
|
||||
<div style="display: flex; align-items: center">
|
||||
<el-tag effect="dark" type="warning" style="width: 40px; text-align: center"
|
||||
class="mr10">
|
||||
MIN
|
||||
@@ -214,8 +223,8 @@
|
||||
<Trend ref="trendRef"></Trend>
|
||||
</div>
|
||||
<!-- 实时数据 -->
|
||||
<div style="height: calc(100vh - 340px)" v-if="dataSet.indexOf('_realtimedata') != -1"
|
||||
v-loading="tableLoading">
|
||||
<div :style="`height: calc(100vh - (${sonTab == 1 ? '378px' : sonTab == 2 ? '340px' : '425px'}))`"
|
||||
v-if="dataSet.indexOf('_realtimedata') != -1" v-loading="tableLoading">
|
||||
<!-- <div class="view_top_btn" v-if="realTimeFlag">
|
||||
<el-button type="primary" :icon="Platform" @click="handleRecordWaves">
|
||||
实时录波
|
||||
@@ -295,6 +304,7 @@ const devTypeOptions = ref([])
|
||||
const devModelOptions = ref([])
|
||||
const tableData = ref<any[]>([])
|
||||
const tableHeight = mainHeight(330).height
|
||||
const tableHeightBox = mainHeight(365).height
|
||||
const mangePopup = ref()
|
||||
const datePickerRef = ref()
|
||||
const formInline = reactive({
|
||||
@@ -871,7 +881,11 @@ const handleDownLoadTemplate = () => { }
|
||||
const analysisListRef = ref()
|
||||
//打开补召日志
|
||||
const handleAnalysisList = () => {
|
||||
analysisListRef.value && analysisListRef.value.open()
|
||||
analysisListRef.value && analysisListRef.value.open({
|
||||
lineId: lineId.value,
|
||||
deviceData: deviceData.value,
|
||||
deviceId: deviceId.value,
|
||||
})
|
||||
}
|
||||
//离线数据导入
|
||||
const offLineDataImportRef = ref()
|
||||
@@ -935,8 +949,7 @@ onBeforeUnmount(() => {
|
||||
box-sizing: border-box;
|
||||
overflow: auto;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
||||
grid-template-rows: max-content;
|
||||
grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
|
||||
grid-gap: 10px;
|
||||
justify-content: center;
|
||||
|
||||
@@ -945,7 +958,7 @@ onBeforeUnmount(() => {
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
color: var(--el-color-white);
|
||||
min-height: 150px;
|
||||
min-height: 80px;
|
||||
font-size: 13px;
|
||||
|
||||
.el-card__header {
|
||||
@@ -969,6 +982,8 @@ onBeforeUnmount(() => {
|
||||
background-image: linear-gradient(var(--el-color-primary), var(--el-color-primary-light-3));
|
||||
|
||||
.box-card-content {
|
||||
|
||||
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -976,8 +991,27 @@ onBeforeUnmount(() => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.box-card-div {
|
||||
display: grid;
|
||||
// grid-template-columns: repeat(3, 1fr);
|
||||
grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
.box-card-new {
|
||||
|
||||
min-height: 110px !important;
|
||||
|
||||
.el-card__body {
|
||||
overflow-y: auto;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.view_top_btn {
|
||||
|
||||
@@ -7,25 +7,18 @@
|
||||
<el-button :loading="loading" style="margin-left: 10px" type="primary" @click="submitUpload">
|
||||
上传离线数据
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handleUpload"
|
||||
:loading="loading"
|
||||
:disabled="offLineFileList.length == 0 || disableHandleUpload"
|
||||
>
|
||||
<el-button type="primary" @click="handleUpload" :loading="loading"
|
||||
:disabled="offLineFileList.length == 0 || disableHandleUpload">
|
||||
开始上传
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="removeAllFile"
|
||||
:loading="loading"
|
||||
:disabled="offLineFileList.length == 0"
|
||||
>
|
||||
清空文件
|
||||
<el-button type="primary" @click="removeAllFile" :loading="loading"
|
||||
:disabled="offLineFileList.length == 0">
|
||||
重置上传文件
|
||||
</el-button>
|
||||
</div>
|
||||
<div :style="tableHeight">
|
||||
<vxe-table border auto-resize height="auto" :data="offLineFileList" v-bind="defaultAttribute" :key="updateKey">
|
||||
<vxe-table border auto-resize height="auto" :data="offLineFileList" v-bind="defaultAttribute"
|
||||
:key="updateKey">
|
||||
<vxe-column field="name" align="center" title="文件名"></vxe-column>
|
||||
<vxe-column field="webkitRelativePath" align="center" title="文件地址"></vxe-column>
|
||||
<vxe-column field="status" align="center" title="状态" width="250">
|
||||
@@ -132,6 +125,13 @@ const handleUpload = () => {
|
||||
loading.value = false
|
||||
disableHandleUpload.value = true
|
||||
}
|
||||
}).catch(()=>{
|
||||
loading.value = false
|
||||
disableHandleUpload.value = false
|
||||
offLineFileList.value.map((item: any) => {
|
||||
item.status = 0
|
||||
})
|
||||
updateKey.value += 1
|
||||
})
|
||||
}
|
||||
const deviceId: any = ref()
|
||||
@@ -150,6 +150,7 @@ defineExpose({ open })
|
||||
<style lang="scss" scoped>
|
||||
.offline_data {
|
||||
width: 100%;
|
||||
|
||||
.offline_data_btn {
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
|
||||
@@ -33,8 +33,13 @@
|
||||
<vxe-column field="name" title="名称"></vxe-column>
|
||||
<vxe-column field="status" title="补召进度">
|
||||
<template #default="{ row }">
|
||||
<el-progress v-model="row.status" :class="row.status == 100 ? 'progress' : ''" :format="format"
|
||||
:stroke-width="10" striped :percentage="row.status" :duration="30" striped-flow />
|
||||
<div class="finish" v-if="row.status == 100">
|
||||
<SuccessFilled style="width: 16px;" /><span class="ml5">补召完成</span>
|
||||
</div>
|
||||
<el-progress v-model="row.status" v-else :class="row.status == 100 ? 'progress' : ''"
|
||||
:format="format" :stroke-width="10" striped :percentage="row.status" :duration="30"
|
||||
striped-flow />
|
||||
|
||||
|
||||
</template>
|
||||
</vxe-column>
|
||||
@@ -52,6 +57,7 @@ import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { VxeUI, VxeTableInstance, VxeTableEvents } from 'vxe-table'
|
||||
import { SuccessFilled } from '@element-plus/icons-vue'
|
||||
import {
|
||||
Back,
|
||||
Setting, Search
|
||||
@@ -116,7 +122,7 @@ const handleUpDevice = () => {
|
||||
offlineDataUploadMakeUp(form)
|
||||
.then((res: any) => {
|
||||
if (res.code == 'A0000') {
|
||||
ElMessage.success(res.data)
|
||||
// ElMessage.success(res.data)
|
||||
dirList.value.map((item: any) => {
|
||||
// checkedList.map((vv: any) => {
|
||||
if (item.name == selectRowCopy.value?.name) {
|
||||
@@ -257,4 +263,11 @@ defineExpose({ getMakeUpDataList })
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.finish {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
font-weight: 550;
|
||||
color: #009688
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,45 +1,50 @@
|
||||
<template>
|
||||
<div class="view" v-loading="loading">
|
||||
<div class="view_top">
|
||||
<!-- 左侧仪表盘 -->
|
||||
<div class="view_top_left">
|
||||
<div class="left_charts_title">电压有效值(kV)</div>
|
||||
<div class="left_charts">
|
||||
<MyEchart :pieInterVal="true" ref="pieChart1" :options="echartsDataV1"></MyEchart>
|
||||
<el-collapse v-model="activeNames">
|
||||
<el-collapse-item title="仪表盘" name="1">
|
||||
<div class="view_top">
|
||||
<!-- 左侧仪表盘 -->
|
||||
<div class="view_top_left">
|
||||
<div class="left_charts_title">电压有效值(kV)</div>
|
||||
<div class="left_charts">
|
||||
<MyEchart :pieInterVal="true" ref="pieChart1" :options="echartsDataV1"></MyEchart>
|
||||
</div>
|
||||
<div class="left_charts">
|
||||
<MyEchart :pieInterVal="true" ref="pieChart2" :options="echartsDataV2"></MyEchart>
|
||||
</div>
|
||||
<div class="left_charts">
|
||||
<MyEchart :pieInterVal="true" ref="pieChart3" :options="echartsDataV3"></MyEchart>
|
||||
</div>
|
||||
</div>
|
||||
<div class="view_top_mid">
|
||||
<div class="mid_charts_title">基波电压/电流幅值(相位)</div>
|
||||
<div class="mid_charts">
|
||||
<MyEchart :pieInterVal="true" :options="echartsData1"></MyEchart>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 右侧仪表盘 -->
|
||||
<div class="view_top_right">
|
||||
<div class="right_charts_title">电流有效值(A)</div>
|
||||
<div class="right_charts">
|
||||
<MyEchart :pieInterVal="true" ref="pieChart4" :options="echartsDataA1"></MyEchart>
|
||||
</div>
|
||||
<div class="right_charts">
|
||||
<MyEchart :pieInterVal="true" ref="pieChart5" :options="echartsDataA2"></MyEchart>
|
||||
</div>
|
||||
<div class="right_charts">
|
||||
<MyEchart :pieInterVal="true" ref="pieChart6" :options="echartsDataA3"></MyEchart>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="left_charts">
|
||||
<MyEchart :pieInterVal="true" ref="pieChart2" :options="echartsDataV2"></MyEchart>
|
||||
</div>
|
||||
<div class="left_charts">
|
||||
<MyEchart :pieInterVal="true" ref="pieChart3" :options="echartsDataV3"></MyEchart>
|
||||
</div>
|
||||
</div>
|
||||
<div class="view_top_mid">
|
||||
<div class="mid_charts_title">基波电压/电流幅值(相位)</div>
|
||||
<div class="mid_charts"><MyEchart :pieInterVal="true" :options="echartsData1"></MyEchart></div>
|
||||
</div>
|
||||
<!-- 右侧仪表盘 -->
|
||||
<div class="view_top_right">
|
||||
<div class="right_charts_title">电流有效值(A)</div>
|
||||
<div class="right_charts">
|
||||
<MyEchart :pieInterVal="true" ref="pieChart4" :options="echartsDataA1"></MyEchart>
|
||||
</div>
|
||||
<div class="right_charts">
|
||||
<MyEchart :pieInterVal="true" ref="pieChart5" :options="echartsDataA2"></MyEchart>
|
||||
</div>
|
||||
<div class="right_charts">
|
||||
<MyEchart :pieInterVal="true" ref="pieChart6" :options="echartsDataA3"></MyEchart>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
|
||||
|
||||
|
||||
</el-collapse>
|
||||
|
||||
<div class="view_bot">
|
||||
<vxe-table
|
||||
border
|
||||
height=""
|
||||
:data="realList"
|
||||
:column-config="{ resizable: true, tooltip: true }"
|
||||
:tooltip-config="{ enterable: true }"
|
||||
>
|
||||
<vxe-table border height="" :data="realList" :column-config="{ resizable: true, tooltip: true }"
|
||||
:tooltip-config="{ enterable: true }">
|
||||
<vxe-colgroup align="center" title="电压有效值(kV)">
|
||||
<vxe-column align="center" field="vRmsA" title="A相"></vxe-column>
|
||||
<vxe-column align="center" field="vRmsB" title="B相"></vxe-column>
|
||||
@@ -62,13 +67,8 @@
|
||||
</vxe-colgroup>
|
||||
</vxe-table>
|
||||
<br />
|
||||
<vxe-table
|
||||
border
|
||||
height=""
|
||||
:data="realList"
|
||||
:column-config="{ resizable: true, tooltip: true }"
|
||||
:tooltip-config="{ enterable: true }"
|
||||
>
|
||||
<vxe-table border height="" :data="realList" :column-config="{ resizable: true, tooltip: true }"
|
||||
:tooltip-config="{ enterable: true }">
|
||||
<vxe-column align="center" field="freq" width="140" title="频率(Hz)"></vxe-column>
|
||||
<vxe-column align="center" field="freqDev" width="120" title="频率偏差(Hz)"></vxe-column>
|
||||
<vxe-column align="center" width="180" field="vUnbalance" title="电压不平衡度(%)"></vxe-column>
|
||||
@@ -85,13 +85,8 @@
|
||||
</vxe-colgroup>
|
||||
</vxe-table>
|
||||
<br />
|
||||
<vxe-table
|
||||
border
|
||||
height=""
|
||||
:data="realList"
|
||||
:column-config="{ resizable: true, tooltip: true }"
|
||||
:tooltip-config="{ enterable: true }"
|
||||
>
|
||||
<vxe-table border height="" :data="realList" :column-config="{ resizable: true, tooltip: true }"
|
||||
:tooltip-config="{ enterable: true }">
|
||||
<vxe-colgroup align="center" title="电压偏差(%)">
|
||||
<vxe-column align="center" field="vDevA" title="A相"></vxe-column>
|
||||
<vxe-column align="center" field="vDevB" title="B相"></vxe-column>
|
||||
@@ -115,13 +110,8 @@
|
||||
</vxe-colgroup>
|
||||
</vxe-table>
|
||||
<br />
|
||||
<vxe-table
|
||||
border
|
||||
height=""
|
||||
:data="realList"
|
||||
:column-config="{ resizable: true, tooltip: true }"
|
||||
:tooltip-config="{ enterable: true }"
|
||||
>
|
||||
<vxe-table border height="" :data="realList" :column-config="{ resizable: true, tooltip: true }"
|
||||
:tooltip-config="{ enterable: true }">
|
||||
<vxe-colgroup align="center" title="无功功率(kVar)">
|
||||
<vxe-column align="center" field="qA" title="A相"></vxe-column>
|
||||
<vxe-column align="center" field="qB" title="B相"></vxe-column>
|
||||
@@ -152,6 +142,10 @@
|
||||
</vxe-colgroup>
|
||||
</vxe-table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
@@ -159,6 +153,7 @@ import { ref, onMounted } from 'vue'
|
||||
import MyEchart from '@/components/echarts/MyEchart.vue'
|
||||
import { getRealTimeTableList } from '@/api/cs-device-boot/EquipmentDelivery'
|
||||
const pieChartRef: any = ref()
|
||||
const activeNames = ref(['1'])
|
||||
const pieChart1: any = ref()
|
||||
const pieChart2: any = ref()
|
||||
const pieChart3: any = ref()
|
||||
@@ -189,8 +184,8 @@ const initRadioCharts = () => {
|
||||
tooltip: {
|
||||
formatter: '{a} <br/>{b} {c}°'
|
||||
},
|
||||
toolbox:{
|
||||
show:false
|
||||
toolbox: {
|
||||
show: false
|
||||
},
|
||||
legend: {
|
||||
show: false
|
||||
@@ -439,8 +434,8 @@ const init = () => {
|
||||
echartsData.value = {
|
||||
options: {
|
||||
tooltip: {},
|
||||
toolbox:{
|
||||
show:false
|
||||
toolbox: {
|
||||
show: false
|
||||
},
|
||||
series: [
|
||||
{
|
||||
@@ -552,6 +547,8 @@ const setRealData = (val: any) => {
|
||||
realList.value = [val]
|
||||
initRadioCharts()
|
||||
//新的
|
||||
echartsDataV1.value.options.series[0].max = realData.value.vRmsA == 0 ? 1 : Math.ceil(realData.value.vRmsA * 1.2)
|
||||
console.log("🚀 ~ setRealData ~ realData.value.vRmsA:", realData.value.vRmsA)
|
||||
echartsDataV1.value.options.series[0].data = [
|
||||
{
|
||||
name: 'A相',
|
||||
@@ -559,6 +556,7 @@ const setRealData = (val: any) => {
|
||||
}
|
||||
]
|
||||
pieChart1.value.initChart()
|
||||
echartsDataV2.value.options.series[0].max = realData.value.vRmsB == 0 ? 1 : Math.ceil(realData.value.vRmsB * 1.2)
|
||||
echartsDataV2.value.options.series[0].data = [
|
||||
{
|
||||
name: 'B相',
|
||||
@@ -566,6 +564,7 @@ const setRealData = (val: any) => {
|
||||
}
|
||||
]
|
||||
pieChart2.value.initChart()
|
||||
echartsDataV3.value.options.series[0].max = realData.value.vRmsC == 0 ? 1 : Math.ceil(realData.value.vRmsC * 1.2)
|
||||
echartsDataV3.value.options.series[0].data = [
|
||||
{
|
||||
name: 'C相',
|
||||
@@ -574,6 +573,7 @@ const setRealData = (val: any) => {
|
||||
]
|
||||
pieChart3.value.initChart()
|
||||
//新的电流有效值
|
||||
echartsDataA1.value.options.series[0].max = realData.value.iRmsA == 0 ? 1 : Math.ceil(realData.value.iRmsA * 1.2)
|
||||
echartsDataA1.value.options.series[0].data = [
|
||||
{
|
||||
name: 'A相',
|
||||
@@ -581,6 +581,7 @@ const setRealData = (val: any) => {
|
||||
}
|
||||
]
|
||||
pieChart4.value.initChart()
|
||||
echartsDataA2.value.options.series[0].max = realData.value.iRmsB == 0 ? 1 : Math.ceil(realData.value.iRmsB * 1.2)
|
||||
echartsDataA2.value.options.series[0].data = [
|
||||
{
|
||||
name: 'B相',
|
||||
@@ -588,6 +589,7 @@ const setRealData = (val: any) => {
|
||||
}
|
||||
]
|
||||
pieChart5.value.initChart()
|
||||
echartsDataA3.value.options.series[0].max = realData.value.iRmsC == 0 ? 1 : Math.ceil(realData.value.iRmsC * 1.2)
|
||||
echartsDataA3.value.options.series[0].data = [
|
||||
{
|
||||
name: 'C相',
|
||||
@@ -609,6 +611,7 @@ onMounted(() => {
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.view_top {
|
||||
width: 100%;
|
||||
height: 340px !important;
|
||||
@@ -617,6 +620,7 @@ onMounted(() => {
|
||||
//border: 1px solid #eee;
|
||||
// padding: 10px;
|
||||
margin-top: 10px;
|
||||
|
||||
.view_top_left,
|
||||
.view_top_right {
|
||||
// width: 300px;
|
||||
@@ -627,6 +631,7 @@ onMounted(() => {
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
border: 1px solid #eee;
|
||||
|
||||
.left_charts,
|
||||
.right_charts {
|
||||
flex: none;
|
||||
@@ -637,6 +642,7 @@ onMounted(() => {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.view_top_mid {
|
||||
// flex: 1;
|
||||
width: 40%;
|
||||
@@ -644,6 +650,7 @@ onMounted(() => {
|
||||
margin: 0 10px;
|
||||
// padding: 10px;
|
||||
position: relative;
|
||||
|
||||
.mid_charts {
|
||||
width: 100%;
|
||||
height: 280px;
|
||||
@@ -667,13 +674,15 @@ onMounted(() => {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
.view_bot {
|
||||
min-height: 300px;
|
||||
// min-height: 300px;
|
||||
margin: 10px 0 0 0;
|
||||
overflow: auto !important;
|
||||
flex: 1 !important;
|
||||
padding-bottom: 200px !important;
|
||||
// padding-bottom: 200px !important;
|
||||
box-sizing: border-box !important;
|
||||
|
||||
.view_bot_tables {
|
||||
margin-bottom: 10px;
|
||||
height: auto;
|
||||
@@ -681,17 +690,21 @@ onMounted(() => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.view::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.table_container {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.table {
|
||||
flex: 1;
|
||||
|
||||
.table_info {
|
||||
width: 100%;
|
||||
height: 120px;
|
||||
@@ -701,6 +714,7 @@ onMounted(() => {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.thead {
|
||||
width: 100%;
|
||||
height: auto;
|
||||
@@ -708,6 +722,7 @@ onMounted(() => {
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.thead_top {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
@@ -717,6 +732,7 @@ onMounted(() => {
|
||||
font-size: 14px;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.thead_bot {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
@@ -725,16 +741,19 @@ onMounted(() => {
|
||||
color: #111;
|
||||
font-size: 14px;
|
||||
font-weight: 800;
|
||||
|
||||
.thead_bot_cell {
|
||||
flex: 1;
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tbody {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
text-align: center;
|
||||
|
||||
.tbody_cell {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
@@ -743,11 +762,13 @@ onMounted(() => {
|
||||
border-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.tbody:hover {
|
||||
background: #f4f6f9;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.table_container:hover {
|
||||
.table {
|
||||
.tbody {
|
||||
@@ -755,4 +776,20 @@ onMounted(() => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.view_bot) {
|
||||
|
||||
.vxe-table--render-default .vxe-body--column:not(.col--ellipsis),
|
||||
.vxe-table--render-default .vxe-footer--column:not(.col--ellipsis),
|
||||
.vxe-table--render-default .vxe-header--column:not(.col--ellipsis) {
|
||||
padding: 5px !important;
|
||||
}
|
||||
.vxe-table--body-wrapper{
|
||||
min-height: 32px !important;
|
||||
}
|
||||
}
|
||||
::v-deep .el-collapse-item__header {
|
||||
font-size: 16px !important;
|
||||
font-weight: 800 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<div>
|
||||
<!-- 历史趋势数据 -->
|
||||
<div>
|
||||
<TableHeader ref="tableHeaderRef" :showSearch="false" @selectChange="selectChange" >
|
||||
<template v-slot:select >
|
||||
<TableHeader ref="tableHeaderRef" :showSearch="false" @selectChange="selectChange">
|
||||
<template v-slot:select>
|
||||
<el-form-item>
|
||||
<DatePicker ref="datePickerRef"></DatePicker>
|
||||
</el-form-item>
|
||||
@@ -206,7 +206,7 @@ const init = async () => {
|
||||
if (item.phase == null) {
|
||||
key = item.unit
|
||||
} else {
|
||||
key = item.anotherName
|
||||
key = item.unit
|
||||
}
|
||||
|
||||
if (!acc[key]) {
|
||||
@@ -216,6 +216,7 @@ const init = async () => {
|
||||
return acc
|
||||
}, {})
|
||||
let result = Object.values(groupedData)
|
||||
console.log("🚀 ~ .then ~ result:", result)
|
||||
// console.log("🚀 ~ .then ~ result:", result)
|
||||
if (chartsList.length > 0) {
|
||||
unitList = result.map((item: any) => {
|
||||
@@ -233,7 +234,7 @@ const init = async () => {
|
||||
top: 5,
|
||||
right: 70,
|
||||
|
||||
width: 400,
|
||||
width: 550,
|
||||
height: 50
|
||||
},
|
||||
grid: {
|
||||
@@ -312,13 +313,13 @@ const init = async () => {
|
||||
series: []
|
||||
}
|
||||
}
|
||||
// console.log("🚀 ~ unitList.forEach ~ unitList:", unitList)
|
||||
console.log("🚀 ~ unitList.forEach ~ unitList:", unitList)
|
||||
|
||||
if (chartsList.length > 0) {
|
||||
echartsData.value.yAxis = []
|
||||
let setList = [...new Set(unitList)];
|
||||
|
||||
|
||||
unitList.forEach((item: any, index: any) => {
|
||||
setList.forEach((item: any, index: any) => {
|
||||
if (index > 2) {
|
||||
echartsData.value.grid.right = (index - 1) * 80
|
||||
}
|
||||
@@ -603,7 +604,7 @@ const flag = ref(true)
|
||||
const onIndexChange = (val: any) => {
|
||||
num.value += 1
|
||||
flag.value = true
|
||||
|
||||
|
||||
|
||||
// if (val.length == 0) {
|
||||
// searchForm.value.index = [indexOptions.value[0].id]
|
||||
|
||||
Reference in New Issue
Block a user