加上清除逻辑

This commit is contained in:
stt
2025-11-14 11:18:54 +08:00
parent f82ef923ae
commit cd565c03ca
4 changed files with 34 additions and 61 deletions

View File

@@ -23,7 +23,11 @@
<Table ref="tableRef" @cell-click="cellClickEvent" isGroup :height="height"></Table>
</el-dialog>
<!-- 谐波电流谐波电压占有率 -->
<HarmonicRatio ref="harmonicRatioRef" @close="onHarmonicRatioClose" :TrendList="TrendList" />
<HarmonicRatio
ref="harmonicRatioRef"
@close="onHarmonicRatioClose"
v-if="dialogFlag"
/>
</div>
</template>
<script setup lang="ts">
@@ -38,10 +42,11 @@ import { cslineList } from '@/api/harmonic-boot/cockpit/cockpit'
const dialogVisible: any = ref(false)
const harmonicRatioRef: any = ref(null)
const dialogFlag = ref(false)
const options = ref()
const height = mainHeight(0, 2).height as any
const tableHeaderRef = ref()
const TrendList = ref([{lineType:1}])
const loop50 = (key: string) => {
let list: any[] = []
for (let i = 2; i < 26; i++) {
@@ -155,17 +160,18 @@ const open = async (row: any,searchBeginTime:any,searchEndTime:any) => {
// 点击行
const cellClickEvent = ({ row, column }: any) => {
if (column.field != 'name' && column.field != 'time') {
dialogFlag.value = true
dialogVisible.value = false
// if(column.title && column.title=='闪变越限(分钟)'){
// column.title = '1次'
// }
// harmonicRatioRef.value.openDialog(row,column.title.replace(/次/g, ""))
nextTick(() => {
harmonicRatioRef.value.openDialog(row,column.field,column.title.replace(/次/g, ""))
})
}
}
// 谐波弹窗关闭时的回调
const onHarmonicRatioClose = () => {
dialogFlag.value = false
// 重新打开指标越限详情弹窗
nextTick(() => {
dialogVisible.value = true

View File

@@ -60,11 +60,11 @@ const selectChange = (showSelect: any, height: any, datePickerValue?: any) => {
headerHeight.value = height
// 如果有传入 datePicker 的值
if (datePickerValue) {
// 更新表格参数
tableStore.table.params.searchBeginTime = datePickerValue.timeValue?.[0]
tableStore.table.params.searchEndTime = datePickerValue.timeValue?.[1]
}
// if (datePickerValue) {
// // 更新表格参数
// tableStore.table.params.searchBeginTime = datePickerValue.timeValue?.[0]
// tableStore.table.params.searchEndTime = datePickerValue.timeValue?.[1]
// }
}
const tableStore: any = new TableStore({
@@ -116,6 +116,9 @@ const tableStore: any = new TableStore({
}
}
console.log('beginTime0000', beginTime)
console.log('prop.timeValue?.[0]111', prop.timeValue?.[0])
// 如果缓存中没有则使用默认值
tableStore.table.params.searchBeginTime = beginTime || prop.timeValue?.[0]
tableStore.table.params.searchEndTime = endTime || prop.timeValue?.[1]

View File

@@ -23,7 +23,7 @@
<Table ref="tableRef" @cell-click="cellClickEvent" isGroup :height="height"></Table>
</el-dialog>
<!-- 谐波电流谐波电压占有率 -->
<HarmonicRatio ref="harmonicRatioRef" @close="onHarmonicRatioClose" :TrendList="TrendList" />
<HarmonicRatio ref="harmonicRatioRef" v-if="dialogFlag" @close="onHarmonicRatioClose" />
</div>
</template>
<script setup lang="ts">
@@ -41,7 +41,7 @@ const harmonicRatioRef: any = ref(null)
const options = ref()
const height = mainHeight(0, 2).height as any
const tableHeaderRef = ref()
const TrendList = ref([{lineType:1}])
const dialogFlag = ref(false)
const loop50 = (key: string) => {
let list: any[] = []
for (let i = 2; i < 26; i++) {
@@ -155,13 +155,18 @@ const open = async (row: any,searchBeginTime:any,searchEndTime:any) => {
// 点击行
const cellClickEvent = ({ row, column }: any) => {
if (column.field != 'name' && column.field != 'time') {
dialogFlag.value = true
dialogVisible.value = false
nextTick(() => {
harmonicRatioRef.value.openDialog(row,column.field,column.title.replace(/次/g, ""))
})
}
}
// 谐波弹窗关闭时的回调
const onHarmonicRatioClose = () => {
dialogFlag.value = false
// 重新打开指标越限详情弹窗
nextTick(() => {
dialogVisible.value = true

View File

@@ -52,11 +52,11 @@ const selectChange = (showSelect: any, height: any, datePickerValue?: any) => {
headerHeight.value = height
// 如果有传入 datePicker 的值
if (datePickerValue) {
// 更新表格参数
tableStore.table.params.searchBeginTime = datePickerValue.timeValue?.[0]
tableStore.table.params.searchEndTime = datePickerValue.timeValue?.[1]
}
// if (datePickerValue) {
// // 更新表格参数
// tableStore.table.params.searchBeginTime = datePickerValue.timeValue?.[0]
// tableStore.table.params.searchEndTime = datePickerValue.timeValue?.[1]
// }
}
// 计算是否全屏展示
@@ -118,50 +118,9 @@ const initEcharts = () => {
}
}
// echartList.value.options.series[0].data = dataArray
})
}
// const echartList: any = ref({
// title: {
// text: '指标越限占比'
// },
// xAxis: {
// // name: '(区域)',
// data: ['闪变', '谐波电压', '谐波电流', '电压偏差', '三相不平衡']
// },
// yAxis: {
// name: '%', // 给X轴加单位
// interval: 20
// },
// grid: {
// left: '10px',
// right: '20px'
// },
// options: {
// series: [
// {
// // name: '暂降次数',
// type: 'bar',
// name: '越限占比',
// data: [],
// barMaxWidth: 30
// // label: {
// // show: true,
// // position: 'top',
// // textStyle: {
// // //数值样式
// // color: '#000'
// // },
// // fontSize: 12
// // }
// }
// ]
// }
// })
const OverLimitDetailsRef = ref()
const tableStore: any = new TableStore({
url: '/harmonic-boot/totalLimitStatistics/list',