Files
admin-sjzx/src/views/pqs/harmonicMonitoring/runManage/terminalLedger/index.vue

229 lines
8.3 KiB
Vue
Raw Normal View History

<template>
<div class="default-main">
2026-03-23 09:19:43 +08:00
<TableHeader area ref="TableHeaderRef" showExport>
<template #select>
2024-10-24 08:51:29 +08:00
<!-- <el-form-item label="统计类型:">
<el-select v-model="tableStore.table.params.statisticalType" placeholder="请选择统计类型" value-key="id">
<el-option v-for="item in classificationData" :key="item.id" :label="item.name" :value="item">
</el-option>
</el-select>
2026-03-23 09:19:43 +08:00
2024-10-24 08:51:29 +08:00
</el-form-item> -->
2026-03-23 09:19:43 +08:00
<el-form-item label="终端厂家:">
2025-04-16 09:43:27 +08:00
<el-select
2026-03-23 09:19:43 +08:00
v-model="tableStore.table.params.manufacturer"
2025-04-16 09:43:27 +08:00
filterable
multiple
collapse-tags
clearable
2026-03-23 09:19:43 +08:00
placeholder="请选择终端厂家"
2025-04-16 09:43:27 +08:00
value-key="id"
>
<el-option
2026-03-23 09:19:43 +08:00
v-for="item in terminaloption"
2025-04-16 09:43:27 +08:00
:key="item.id"
:label="item.name"
:value="item"
></el-option>
</el-select>
</el-form-item>
2026-03-23 09:19:43 +08:00
<el-form-item label="数据筛选">
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="输入市公司、变电站、用户" />
</el-form-item>
<el-form-item label="通讯状态:">
2025-04-16 09:43:27 +08:00
<el-select
2026-03-23 09:19:43 +08:00
v-model="tableStore.table.params.comF"
2025-04-16 09:43:27 +08:00
filterable
multiple
collapse-tags
clearable
2026-03-23 09:19:43 +08:00
placeholder="请选择通讯状态"
2025-04-16 09:43:27 +08:00
>
<el-option
2026-03-23 09:19:43 +08:00
v-for="item in communicationstatus"
:key="item.value"
:label="item.label"
:value="item.value"
2025-04-16 09:43:27 +08:00
></el-option>
</el-select>
</el-form-item>
2026-03-23 09:19:43 +08:00
<el-form-item label="终端状态:">
2025-04-16 09:43:27 +08:00
<el-select
2026-03-23 09:19:43 +08:00
v-model="tableStore.table.params.runF"
2025-04-16 09:43:27 +08:00
filterable
multiple
collapse-tags
clearable
2026-03-23 09:19:43 +08:00
placeholder="请选择终端状态"
2025-04-16 09:43:27 +08:00
>
<el-option
2026-03-23 09:19:43 +08:00
v-for="item in terminalstatus"
:key="item.value"
:label="item.label"
:value="item.value"
2025-04-16 09:43:27 +08:00
></el-option>
</el-select>
</el-form-item>
2026-03-23 09:19:43 +08:00
<el-form-item label="干扰源类型:">
2025-04-16 09:43:27 +08:00
<el-select
2026-03-23 09:19:43 +08:00
v-model="tableStore.table.params.loadType"
2025-04-16 09:43:27 +08:00
filterable
multiple
collapse-tags
clearable
2026-03-23 09:19:43 +08:00
placeholder="请选择干扰源类型"
value-key="id"
2025-04-16 09:43:27 +08:00
>
<el-option
2026-03-23 09:19:43 +08:00
v-for="item in interfereoption"
:key="item.id"
:label="item.name"
:value="item"
2025-04-16 09:43:27 +08:00
></el-option>
</el-select>
</el-form-item>
2026-03-23 09:19:43 +08:00
<el-form-item label="电压等级:">
2025-04-16 09:43:27 +08:00
<el-select
2026-03-23 09:19:43 +08:00
v-model="tableStore.table.params.scale"
2025-04-16 09:43:27 +08:00
filterable
multiple
collapse-tags
clearable
2026-03-23 09:19:43 +08:00
placeholder="请选择电压等级"
value-key="id"
2025-04-16 09:43:27 +08:00
>
<el-option
2026-03-23 09:19:43 +08:00
v-for="item in voltageleveloption"
:key="item.id"
:label="item.name"
:value="item"
2025-04-16 09:43:27 +08:00
></el-option>
</el-select>
</el-form-item>
2026-03-23 09:19:43 +08:00
</template>
</TableHeader>
<Table ref="tableRef" />
</div>
</template>
<script setup lang="ts">
2026-03-23 09:19:43 +08:00
import { ref, onMounted, provide, nextTick } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
2026-03-23 09:19:43 +08:00
import { useDictData } from '@/stores/dictData'
const dictData = useDictData()
2026-03-23 09:19:43 +08:00
const view = ref(true)
2025-04-16 09:43:27 +08:00
const classificationData = dictData.getBasicData('Statistical_Type', ['Report_Type', 'Voltage_Level', 'Load_Type'])
const voltageleveloption = dictData.getBasicData('Dev_Voltage_Stand')
const terminaloption = dictData.getBasicData('Dev_Manufacturers')
const interfereoption = dictData.getBasicData('Interference_Source')
const communicationstatus = [
2025-04-16 09:43:27 +08:00
{ value: 0, label: '中断' },
{ value: 1, label: '正常' }
]
const terminalstatus = [
2025-04-16 09:43:27 +08:00
{ value: 0, label: '投运' },
2025-07-25 14:15:26 +08:00
{ value: 1, label: '检修' },
2025-04-16 09:43:27 +08:00
{ value: 2, label: '停运' }
]
const tableStore = new TableStore({
url: '/device-boot/runManage/getRuntimeData',
method: 'POST',
column: [
{
field: 'index',
title: '序号',
2026-03-23 09:19:43 +08:00
width: '70',
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
2026-03-23 09:19:43 +08:00
{ field: 'areaName', title: '区域', minWidth: 90 },
{ field: 'gdName', title: '市公司', minWidth: 110 },
{
field: 'bdName',
2026-03-23 09:19:43 +08:00
title: '变电站',
minWidth: 110
},
{
field: 'objName',
title: '用户对象',
minWidth: 110
},
2025-04-16 09:43:27 +08:00
{ field: 'manufacturer', title: '厂家', minWidth: 100 },
2026-03-23 09:19:43 +08:00
{ field: 'devName', title: '终端名称', minWidth: 100 },
{ field: 'ip', title: '网络参数' ,width:110 },
{ field: 'loginTime', title: '投运时间', minWidth: 90 },
{ field: 'devType', title: '终端型号', minWidth: 100 },
2026-03-23 09:19:43 +08:00
{ field: 'port', title: '端口', minWidth: 60 },
{ field: 'updateTime', title: '最新数据', minWidth: 110 },
{
field: 'runFlag',
title: '终端状态',
2025-04-16 09:43:27 +08:00
// effect: 'dark',
render: 'tag',
2026-03-23 09:19:43 +08:00
minWidth: 70,
custom: {
2025-04-16 09:43:27 +08:00
投运: 'success',
2025-07-25 14:15:26 +08:00
检修: 'warning',
2025-04-16 09:43:27 +08:00
停运: 'danger'
}
},
{
field: 'comFlag',
title: '通讯状态',
render: 'tag',
2025-04-16 09:43:27 +08:00
// effect: 'dark',
2026-03-23 09:19:43 +08:00
minWidth: 70,
custom: {
2025-04-16 09:43:27 +08:00
正常: 'success',
中断: 'danger'
}
},
2026-03-23 09:19:43 +08:00
],
2026-03-23 09:19:43 +08:00
beforeSearchFun: () => {
tableStore.table.params.serverName = 'harmonic-boot'
tableStore.table.params.statisticalType = {
name: '电网拓扑',
code: 'Power_Network'
}
2025-04-16 09:43:27 +08:00
2026-03-23 09:19:43 +08:00
tableStore.table.params.runFlag = []
if (tableStore.table.params.runF != null && tableStore.table.params.runF != '') {
tableStore.table.params.runFlag = [tableStore.table.params.runF]
}
tableStore.table.params.comFlag = []
if (tableStore.table.params.comF != null&&tableStore.table.params.comF != '') {
tableStore.table.params.comFlag = [tableStore.table.params.comF]
}
}
})
2026-03-23 09:19:43 +08:00
tableStore.table.params.runF = ''
tableStore.table.params.comF = ''
tableStore.table.params.statisticalType = classificationData[0]
2025-04-16 09:43:27 +08:00
tableStore.table.params.serverName = 'harmonic-boot'
tableStore.table.params.comFlag = []
tableStore.table.params.runFlag = []
2026-03-23 09:19:43 +08:00
tableStore.table.params.searchValue = ''
tableStore.table.params.powerFlag = 2
tableStore.table.params.monitorFlag = 2
tableStore.table.params.scale = []
tableStore.table.params.manufacturer = []
tableStore.table.params.loadType = []
2026-03-23 09:19:43 +08:00
provide('tableStore', tableStore)
onMounted(() => {
tableStore.index()
})
</script>