无设备处理

This commit is contained in:
仲么了
2024-01-29 14:57:49 +08:00
parent a0c582e1dd
commit 9351307908
13 changed files with 135 additions and 138 deletions

View File

@@ -1,7 +1,7 @@
<template>
<div class="default-main analyze-apf" :style="{ height: pageHeight.height }" v-loading="loading">
<DeviceTree @node-click="nodeClick" @init="nodeClick"></DeviceTree>
<div class="analyze-apf-right">
<div class="analyze-apf-right" v-if="formInline.devId">
<el-form :inline="true">
<el-form-item label="统计指标:">
<el-select v-model="formInline.statisticalId" filterable placeholder="请选择">
@@ -30,7 +30,7 @@
<el-button type="primary" @click="search" icon="el-icon-Search">查询</el-button>
</el-form-item>
<el-form-item>
<div style="display: flex;align-items: center;">
<div style="display: flex; align-items: center">
<Icon name="el-icon-InfoFilled" style="color: #ff9912"></Icon>
总输出电流阈值和总输出电流比较
</div>
@@ -41,6 +41,7 @@
<MyEchart :options="echartsData" style="flex: 1" />
</template>
</div>
<el-empty v-else description="请选择设备" class="analyze-apf-right" />
</div>
</template>

View File

@@ -2,9 +2,10 @@
<div class="default-main">
<div class="analyze-dvr" v-show="view" :style="{ height: pageHeight.height }" v-loading="loading">
<DeviceTree @node-click="nodeClick" @init="nodeClick"></DeviceTree>
<div class="analyze-dvr-right">
<div class="analyze-dvr-right" v-if="tableStore.table.params.deviceId">
<Table v-if="view" ref="tableRef"></Table>
</div>
<el-empty v-else description="请选择设备" class="analyze-dvr-right" />
</div>
<div :style="{ height: pageHeight.height }" style="padding: 10px; overflow: hidden" v-if="!view">
<el-row>

View File

@@ -31,7 +31,7 @@
v-for="(item, index) in deviceData.dataSetList"
:key="index"
></el-tab-pane>
<el-form :inline="true" style="white-space: nowrap;margin-top: 10px">
<el-form :inline="true" style="white-space: nowrap; margin-top: 10px">
<el-form-item label="指标">
<el-input
v-model="formInline.searchValue"
@@ -130,6 +130,7 @@
></el-pagination>
</el-tabs>
</div>
<el-empty v-else description="请选择设备" class="device-control-right" />
<Popup ref="popupRef" />
</div>
</template>
@@ -173,11 +174,11 @@ const formInline = reactive({
lineId: ''
})
const getDeviceDataTrend = (e: any) => {
popupRef.value.open(e.name,{
popupRef.value.open(e.name, {
...e,
lineId: formInline.lineId
})
}
}
const pageChange = (e: number) => {
formInline.pageNum = e
handleClick()
@@ -188,6 +189,10 @@ const handleSizeChange = (val: number) => {
handleClick()
}
const nodeClick = (e: anyObj) => {
if (!e) {
loading.value = false
return
}
if (e.level == 3) {
loading.value = true
getDeviceData(e.pid, 'history', e.id).then((res: any) => {

View File

@@ -55,6 +55,7 @@
</div>
</el-tabs>
</div>
<el-empty v-else description="请选择设备" class="device-manage-right" />
<MangePopup ref="mangePopup" />
</div>
</template>
@@ -85,6 +86,10 @@ const tableData = ref([])
const tableHeight = mainHeight(215).height
const mangePopup = ref()
const nodeClick = (e: anyObj) => {
if (!e) {
loading.value = false
return
}
if (e.level == 2) {
loading.value = true
getDeviceData(e.id, 'rt').then((res: any) => {