加上清除逻辑
This commit is contained in:
@@ -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, ""))
|
||||
harmonicRatioRef.value.openDialog(row,column.field,column.title.replace(/次/g, ""))
|
||||
nextTick(() => {
|
||||
harmonicRatioRef.value.openDialog(row,column.field,column.title.replace(/次/g, ""))
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 谐波弹窗关闭时的回调
|
||||
const onHarmonicRatioClose = () => {
|
||||
dialogFlag.value = false
|
||||
// 重新打开指标越限详情弹窗
|
||||
nextTick(() => {
|
||||
dialogVisible.value = true
|
||||
|
||||
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user