修改表单不能重置
This commit is contained in:
@@ -109,6 +109,7 @@ const rules = reactive({
|
||||
remark: [{ required: true, message: '描述不可为空', trigger: 'blur' }]
|
||||
})
|
||||
const dialogFormVisible = ref(false)
|
||||
|
||||
const dialogTitle = ref('新增前置机')
|
||||
|
||||
const tableStore = new TableStore({
|
||||
@@ -199,13 +200,16 @@ const tableStore = new TableStore({
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
for (let key in tableStore.table.params) {
|
||||
if (tableStore.table.params[key] === '') {
|
||||
if (tableStore.table.params[key] === '' && key !== 'nodeGrade'&& key !== 'searchState') {
|
||||
delete tableStore.table.params[key]
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
tableStore.table.params.orderBy = 'desc'
|
||||
tableStore.table.params.nodeGrade = ''
|
||||
tableStore.table.params.searchState = ''
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
// 新增
|
||||
const add = () => {
|
||||
@@ -246,8 +250,6 @@ const resetForm = () => {
|
||||
}
|
||||
}
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
setTimeout(() => {
|
||||
tableStore.index()
|
||||
|
||||
375
src/views/pqs/voltageSags/Region/transientList/index.vue
Normal file
375
src/views/pqs/voltageSags/Region/transientList/index.vue
Normal file
@@ -0,0 +1,375 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<div v-show="flag">
|
||||
<TableHeader datePicker>
|
||||
<template #select>
|
||||
<el-form-item label="统计类型:">
|
||||
<el-radio-group v-model="tableStore.table.params.isType">
|
||||
<el-radio-button :label="0">在线</el-radio-button>
|
||||
<el-radio-button :label="1">离线</el-radio-button>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="筛选">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
placeholder="输入关键字筛选"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="触发类型:">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.waveType"
|
||||
placeholder="请选择触发类型"
|
||||
clearable
|
||||
multiple
|
||||
collapse-tags
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in triggeroptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否有波形:">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.fileFlag"
|
||||
placeholder="请选择是否存在波形"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in wareaoptions"
|
||||
:key="item.id"
|
||||
:label="item.label"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="暂态持续时间(s):">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.persistMin"
|
||||
placeholder="请输入X秒"
|
||||
onkeyup="value=value.replace(/[^\d.]/g,'')"
|
||||
clearable
|
||||
style="width: 94px"
|
||||
></el-input>
|
||||
<el-tag style="margin-left: 5px">< 时间数 <</el-tag>
|
||||
<el-input
|
||||
v-model="tableStore.table.params.persistMax"
|
||||
placeholder="请输入X秒"
|
||||
onkeyup="value=value.replace(/[^\d.]/g,'')"
|
||||
clearable
|
||||
style="margin-left: 5px; width: 94px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="事件严重度:">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.severityMin"
|
||||
placeholder="请输入正负数"
|
||||
onkeyup="value=value.replace(/[^\d\.-]/g,'')"
|
||||
clearable
|
||||
style="width: 94px"
|
||||
></el-input>
|
||||
<el-tag style="margin-left: 5px">< 严重度 <</el-tag>
|
||||
<el-input
|
||||
v-model="tableStore.table.params.severityMax"
|
||||
placeholder="请输入正负数"
|
||||
onkeyup="value=value.replace(/[^\d\.-]/g,'')"
|
||||
clearable
|
||||
style="margin-left: 5px; width: 94px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="暂降类型:">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.eventType"
|
||||
placeholder="请选择暂降类型"
|
||||
clearable
|
||||
multiple
|
||||
collapse-tags
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in typeoptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="暂降原因:">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.eventReason"
|
||||
placeholder="请选择暂降原因"
|
||||
clearable
|
||||
multiple
|
||||
collapse-tags
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in reasonoptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Tickets" type="primary">下载波形</el-button>
|
||||
<el-button icon="el-icon-SuccessFilled" type="primary">导出</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
</div>
|
||||
<div :style="{ height: pageHeight.height }" style="padding: 10px; overflow: hidden" v-if="view2">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<span v-if="view2" style="font-size: 14px; font-weight: ; line-height: 30px">值类型选择:</span>
|
||||
<el-select
|
||||
v-if="view2"
|
||||
style="min-width: 200px; width: 200px"
|
||||
@change="changeView"
|
||||
v-model="value"
|
||||
placeholder="请选择值类型"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button
|
||||
v-if="view2"
|
||||
@click="backbxlb"
|
||||
type="primary"
|
||||
class="el-icon-refresh-right"
|
||||
icon="el-icon-CloseBold"
|
||||
style="float: right"
|
||||
>
|
||||
返回
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-tabs v-if="view2" class="default-main" v-model="bxactiveName" @tab-click="bxhandleClick">
|
||||
<el-tab-pane
|
||||
label="瞬时波形"
|
||||
name="ssbx"
|
||||
class="boxbx pt10 pb10"
|
||||
:style="'height:' + bxecharts + ';overflow-y: scroll;'"
|
||||
>
|
||||
<shushiboxi
|
||||
v-if="bxactiveName == 'ssbx' && showBoxi"
|
||||
:value="value"
|
||||
:boxoList="boxoList"
|
||||
:wp="wp"
|
||||
></shushiboxi>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane
|
||||
label="RMS波形"
|
||||
class="boxbx pt10 pb10"
|
||||
name="rmsbx"
|
||||
:style="'height:' + bxecharts + ';overflow-y: scroll;'"
|
||||
>
|
||||
<rmsboxi
|
||||
v-if="bxactiveName == 'rmsbx' && showBoxi"
|
||||
:value="value"
|
||||
:boxoList="boxoList"
|
||||
:wp="wp"
|
||||
></rmsboxi>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import shushiboxi from '@/components/echarts/shushiboxi.vue'
|
||||
import rmsboxi from '@/components/echarts/rmsboxi.vue'
|
||||
import { getMonitorEventAnalyseWave } from '@/api/event-boot/transient.ts'
|
||||
|
||||
defineOptions({
|
||||
name: 'Region/transientlist'
|
||||
})
|
||||
const dictData = useDictData()
|
||||
const pageHeight = mainHeight(20)
|
||||
const bxecharts = mainHeight(95).height as any
|
||||
const view = ref(true)
|
||||
const view2 = ref(false)
|
||||
const showBoxi = ref(true)
|
||||
const flag = ref(true)
|
||||
const typeoptions = dictData.getBasicData('Event_Type')
|
||||
const reasonoptions = dictData.getBasicData('Event_Reason')
|
||||
const triggeroptions = dictData.getBasicData('Event_Statis')
|
||||
const wareaoptions = ref([
|
||||
{
|
||||
id: 1,
|
||||
label: '是'
|
||||
},
|
||||
{
|
||||
id: 0,
|
||||
label: '否'
|
||||
}
|
||||
])
|
||||
const tableStore = new TableStore({
|
||||
url: '/event-boot/transient/getTransientValue',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '60',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'startTime', title: '暂降发生时刻', width: '200' },
|
||||
{ field: 'gdName', title: '供电公司' },
|
||||
{ field: 'subName', title: '变电站', width: '200' },
|
||||
{ field: 'ip', title: '网络参数', width: '200' },
|
||||
{ field: 'lineName', title: '监测点' },
|
||||
{ field: 'scale', title: '电压等级(kV)' },
|
||||
{
|
||||
field: 'featureAmplitude',
|
||||
title: '暂降(骤升)幅值(%)',
|
||||
formatter: ({ row }: any) => (row.featureAmplitude * 100).toFixed(2)
|
||||
},
|
||||
{
|
||||
field: 'eventType',
|
||||
title: '触发类型',
|
||||
formatter: ({ row }: any) => {
|
||||
return triggeroptions.filter(item => item.id == row.eventType)[0].name
|
||||
}
|
||||
},
|
||||
{ field: 'advanceType', title: '暂降类型' },
|
||||
{ field: 'advanceReason', title: '暂降原因' },
|
||||
{
|
||||
field: 'depth',
|
||||
title: '暂降深度(%)',
|
||||
formatter: ({ row }: any) =>
|
||||
row.featureAmplitude < 1 ? 100 - (row.featureAmplitude * 100).toFixed(0) : '/'
|
||||
},
|
||||
|
||||
{ field: 'duration', title: '持续时间(s)' },
|
||||
{ field: 'severity', title: '严重度', formatter: ({ row }: any) => (row.severity < 0 ? '/' : row.severity) },
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
width: '120',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '波形分析',
|
||||
type: 'primary',
|
||||
disabled: row => {
|
||||
return row.fileFlag == 0
|
||||
},
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton',
|
||||
click: async row => {
|
||||
row.loading = true
|
||||
boxoList.value = row
|
||||
await getMonitorEventAnalyseWave({ id: row.eventId, systemType: 0 })
|
||||
.then(res => {
|
||||
row.loading = false
|
||||
if (res != undefined) {
|
||||
wp.value = res.data
|
||||
view.value = false
|
||||
flag.value = false
|
||||
view2.value = true
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
row.loading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '暂无波形',
|
||||
type: '',
|
||||
disabled: row => {
|
||||
return row.fileFlag == 1
|
||||
},
|
||||
icon: 'el-icon-Plus',
|
||||
render: 'basicButton'
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
loadCallback: () => {}
|
||||
})
|
||||
|
||||
const bxactiveName = ref('ssbx')
|
||||
const boxoList = ref({})
|
||||
const wp = ref({})
|
||||
const value = ref(1)
|
||||
const options = ref([
|
||||
{
|
||||
value: 1,
|
||||
label: '一次值'
|
||||
},
|
||||
{
|
||||
value: 2,
|
||||
label: '二次值'
|
||||
}
|
||||
])
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
tableStore.table.params.deptIndex = dictData.state.area[0].id
|
||||
tableStore.table.params.isType = 0
|
||||
tableStore.table.params.searchValue = ''
|
||||
tableStore.table.params.monitorFlag = 2
|
||||
tableStore.table.params.powerFlag = 2
|
||||
tableStore.table.params.serverName = 'event-boot'
|
||||
tableStore.table.params.statisticalType = {}
|
||||
tableStore.table.params.eventValueMin = ''
|
||||
tableStore.table.params.eventValueMax = ''
|
||||
tableStore.table.params.persistMin = ''
|
||||
tableStore.table.params.persistMax = ''
|
||||
tableStore.table.params.severityMin = ''
|
||||
tableStore.table.params.severityMax = ''
|
||||
tableStore.table.params.eventType = []
|
||||
tableStore.table.params.eventReason = []
|
||||
tableStore.table.params.waveType = []
|
||||
tableStore.table.params.fileFlag = ''
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
const changeView = () => {
|
||||
showBoxi.value = false
|
||||
setTimeout(() => {
|
||||
showBoxi.value = true
|
||||
}, 0)
|
||||
}
|
||||
const bxhandleClick = (tab: any) => {
|
||||
if (tab.name == 'ssbx') {
|
||||
bxactiveName.value = 'ssbx'
|
||||
} else if (tab.name == 'rmsbx') {
|
||||
bxactiveName.value = 'rmsbx'
|
||||
}
|
||||
// console.log(tab, event);
|
||||
}
|
||||
const backbxlb = () => {
|
||||
view.value = true
|
||||
flag.value = true
|
||||
view2.value = false
|
||||
}
|
||||
</script>
|
||||
@@ -236,7 +236,7 @@ const tableStore = new TableStore({
|
||||
|
||||
loadCallback: () => {}
|
||||
})
|
||||
|
||||
tableStore.table.params.searchValue=''
|
||||
const bxactiveName = ref('ssbx')
|
||||
const boxoList = ref({})
|
||||
const wp = ref({})
|
||||
|
||||
@@ -153,6 +153,7 @@ const tableStore = new TableStore({
|
||||
|
||||
loadCallback: () => {}
|
||||
})
|
||||
tableStore.table.params.searchValue=''
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
|
||||
@@ -158,6 +158,7 @@ const tableStore = new TableStore({
|
||||
|
||||
}
|
||||
})
|
||||
tableStore.table.params.searchValue=''
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
|
||||
@@ -18,9 +18,7 @@
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="筛选">
|
||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="筛选数据" clearable></el-input>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="筛选数据">
|
||||
<el-input
|
||||
@@ -111,6 +109,8 @@ tableStore.table.params.comFlag = '1'
|
||||
tableStore.table.params.monitorFlag = 0
|
||||
tableStore.table.params.powerFlag = 1
|
||||
tableStore.table.params.serverName = 'event-boot'
|
||||
tableStore.table.params.waveType=''
|
||||
tableStore.table.params.searchValue=''
|
||||
tableStore.table.params.statisticalType = dictData.getBasicData('Statistical_Type', [
|
||||
'Report_Type',
|
||||
'Manufacturer',
|
||||
|
||||
Reference in New Issue
Block a user