修改监测点列表

This commit is contained in:
guanj
2026-01-08 14:09:43 +08:00
parent 0affb17e3a
commit 4c9b677e81

View File

@@ -62,7 +62,7 @@ import OverLimitDetails from '@/components/cockpit/monitoringPointList/component
import TableHeader from '@/components/table/header/index.vue' import TableHeader from '@/components/table/header/index.vue'
import { uploadReport, getReportUrl } from '@/api/harmonic-boot/cockpit/cockpit' import { uploadReport, getReportUrl } from '@/api/harmonic-boot/cockpit/cockpit'
import { getTime } from '@/utils/formatTime' import { getTime } from '@/utils/formatTime'
import { useDictData } from '@/stores/dictData'
const prop = defineProps({ const prop = defineProps({
w: { type: [String, Number] }, w: { type: [String, Number] },
h: { type: [String, Number] }, h: { type: [String, Number] },
@@ -72,8 +72,7 @@ const prop = defineProps({
timeValue: { type: Object }, timeValue: { type: Object },
interval: { type: Number } interval: { type: Number }
}) })
const dictData = useDictData()
const monitorObjList = dictData.getBasicData('Line_Position')
const headerHeight = ref(57) const headerHeight = ref(57)
const TableHeaderRef = ref() const TableHeaderRef = ref()
@@ -123,19 +122,19 @@ const tableStore: any = new TableStore({
}, },
{ {
title: '监测点名称', title: '监测点名称',
field: 'name', field: 'lineName',
minWidth: '120', minWidth: '120',
render: 'customTemplate', render: 'customTemplate',
customTemplate: (row: any) => { customTemplate: (row: any) => {
return `<span style='cursor: pointer;text-decoration: underline;'>${row.name}</span>` return `<span style='cursor: pointer;text-decoration: underline;'>${row.lineName}</span>`
} }
}, },
{ {
title: '监测位置', title: '监测类型',
field: 'position', field: 'position',
minWidth: '80', minWidth: '80',
formatter: (row: any) => { formatter: (row: any) => {
return monitorObjList.filter(item => item.id == row.cellValue)[0]?.name || '/' return row.cellValue || '/'
} }
}, },
// { // {
@@ -154,19 +153,21 @@ const tableStore: any = new TableStore({
width: 100, width: 100,
custom: { custom: {
0: 'success', 停运: 'danger',
1: 'warning', 退运: 'danger',
2: 'danger', 运行: 'success',
3: 'warning', 中断: 'warning',
4: 'danger', 检修: 'warning',
调试: 'warning',
null: 'info' null: 'info'
}, },
replaceValue: { replaceValue: {
0: '运行', 运行: '运行',
1: '检修', 退运: '退运',
2: '停运', 停运: '停运',
3: '调试', 中断: '中断',
4: '退运', 检修: '检修',
调试: '调试',
null: '/' null: '/'
} }
}, },
@@ -182,10 +183,7 @@ const tableStore: any = new TableStore({
{ {
title: '电压等级', title: '电压等级',
field: 'volGrade', field: 'volGrade',
minWidth: '80', minWidth: '80'
formatter: (row: any) => {
return row.cellValue || '/'
}
}, },
{ {
title: '是否治理', title: '是否治理',
@@ -313,7 +311,7 @@ const setTime = () => {
// 点击行 // 点击行
const cellClickEvent = ({ row, column }: any) => { const cellClickEvent = ({ row, column }: any) => {
if (column.field == 'name') { if (column.field == 'lineName') {
OverLimitDetailsRef.value.open( OverLimitDetailsRef.value.open(
row, row,
tableStore.table.params.searchBeginTime || prop.timeValue?.[0], tableStore.table.params.searchBeginTime || prop.timeValue?.[0],