联调程序升级
This commit is contained in:
@@ -1,25 +1,12 @@
|
||||
<template>
|
||||
<div>
|
||||
<!--指标越限程度 -->
|
||||
<TableHeader
|
||||
ref="TableHeaderRef"
|
||||
:showReset="false"
|
||||
@selectChange="selectChange"
|
||||
datePicker
|
||||
:timeKeyList="prop.timeKey"
|
||||
v-if="fullscreen"
|
||||
></TableHeader>
|
||||
<my-echart
|
||||
class="tall"
|
||||
:options="echartList"
|
||||
:style="{ width: prop.width, height: `calc(${prop.height} / 2 )` }"
|
||||
/>
|
||||
<Table
|
||||
ref="tableRef"
|
||||
@cell-click="cellClickEvent"
|
||||
:height="`calc(${prop.height} / 2 - ${headerHeight}px + ${fullscreen ? 0 : 56}px )`"
|
||||
isGroup
|
||||
></Table>
|
||||
<TableHeader ref="TableHeaderRef" :showReset="false" @selectChange="selectChange" datePicker
|
||||
:timeKeyList="prop.timeKey" v-if="fullscreen"></TableHeader>
|
||||
<my-echart class="tall" :options="echartList"
|
||||
:style="{ width: prop.width, height: `calc(${prop.height} / 2 )` }" />
|
||||
<Table ref="tableRef" @cell-click="cellClickEvent"
|
||||
:height="`calc(${prop.height} / 2 - ${headerHeight}px + ${fullscreen ? 0 : 56}px )`" isGroup></Table>
|
||||
<!-- 指标日趋势图 -->
|
||||
<HarmonicRatio ref="harmonicRatioRef" v-if="dialogFlag" @close="onHarmonicRatioClose" :showIndex="false" />
|
||||
<!-- <DailyTrendChart v-if="dialogTrendChart" ref="dailyTrendChartRef" @close="dialogTrendChart = false" /> -->
|
||||
@@ -168,7 +155,7 @@ const tableStore: any = new TableStore({
|
||||
{
|
||||
type: 'bar',
|
||||
name: '越限占比',
|
||||
data: tableStore.table.data.map((item: any) => Math.floor(item.extent * 100) / 100),
|
||||
data: tableStore.table.data.map((item: any) => Math.floor(item.extent * 100) / 100),
|
||||
barMaxWidth: 30
|
||||
}
|
||||
]
|
||||
@@ -182,29 +169,29 @@ provide('tableRef', tableRef)
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
const codeMap = [
|
||||
{ key: '闪变', code: 'flickerOvertime' },
|
||||
{ key: '电压偏差', code: 'voltageDevOvertime' },
|
||||
{ key: '三相', code: 'ubalanceOvertime' },
|
||||
{ key: '谐波电压', code: 'uharm' },
|
||||
{ key: '谐波电流', code: 'iharm' },
|
||||
{ key: '闪变', code: 'flickerOvertime' },
|
||||
{ key: '电压偏差', code: 'voltageDevOvertime' },
|
||||
{ key: '三相', code: 'ubalanceOvertime' },
|
||||
{ key: '谐波电压', code: 'uharm' },
|
||||
{ key: '谐波电流', code: 'iharm' },
|
||||
];
|
||||
// 点击行
|
||||
const cellClickEvent = ({ row, column }: any) => {
|
||||
dialogTrendChart.value = true
|
||||
|
||||
if (column.field == 'maxValue' ) {
|
||||
if(row.lineId==null){
|
||||
ElMessage.info('暂无越限监测点!')
|
||||
}else{
|
||||
nextTick(() => {
|
||||
// dailyTrendChartRef.value.open(row)
|
||||
dialogFlag.value = true
|
||||
nextTick(() => {
|
||||
if (column.field == 'maxValue') {
|
||||
if (row.lineId == null) {
|
||||
ElMessage.info('暂无越限监测点!')
|
||||
} else {
|
||||
nextTick(() => {
|
||||
// dailyTrendChartRef.value.open(row)
|
||||
dialogFlag.value = true
|
||||
nextTick(() => {
|
||||
|
||||
const code = codeMap.find(item => row.name.includes(item.key))?.code || '';
|
||||
harmonicRatioRef.value.openDialog(row,code,column.title.replace(/次/g, ""))
|
||||
})
|
||||
})
|
||||
const code = codeMap.find(item => row.name.includes(item.key))?.code || '';
|
||||
harmonicRatioRef.value.openDialog(row, code, column.title.replace(/次/g, ""))
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
@@ -228,10 +215,10 @@ const setTime = () => {
|
||||
console.warn('获取时间失败,time 不是一个有效数组')
|
||||
}
|
||||
}
|
||||
const dialogFlag=ref(false)
|
||||
const dialogFlag = ref(false)
|
||||
// 谐波弹窗关闭时的回调
|
||||
const onHarmonicRatioClose = () => {
|
||||
dialogFlag.value = false
|
||||
dialogFlag.value = false
|
||||
// 重新打开指标越限详情弹窗
|
||||
|
||||
}
|
||||
@@ -256,6 +243,6 @@ watch(
|
||||
}
|
||||
)
|
||||
|
||||
const addMenu = () => {}
|
||||
const addMenu = () => { }
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
Reference in New Issue
Block a user