事件展示查询条件逻辑修改

This commit is contained in:
zhujiyan
2024-10-09 16:01:49 +08:00
parent 4b963753fb
commit 6db4568c19
3 changed files with 102 additions and 34 deletions

View File

@@ -74,9 +74,9 @@ const tableStore = new TableStore({
method: 'POST', method: 'POST',
publicHeight: 65, publicHeight: 65,
column: [ column: [
{ title: '设备名称', field: 'equipmentName', align: 'center' },
{ title: '工程名称', field: 'engineeringName', align: 'center' }, { title: '工程名称', field: 'engineeringName', align: 'center' },
{ title: '项目名称', field: 'projectName', align: 'center' }, { title: '项目名称', field: 'projectName', align: 'center' },
{ title: '设备名称', field: 'equipmentName', align: 'center' },
{ title: '告警代码', field: 'code', align: 'center' }, { title: '告警代码', field: 'code', align: 'center' },
{ title: '事件描述', field: 'showName', align: 'center' }, { title: '事件描述', field: 'showName', align: 'center' },
{ title: '发生时刻', field: 'startTime', align: 'center' } { title: '发生时刻', field: 'startTime', align: 'center' }
@@ -106,7 +106,20 @@ tableStore.table.params.userId = ''
const sourceChange = (e: any) => { const sourceChange = (e: any) => {
tableStore.table.params.engineeringid = e[1] || '' tableStore.table.params.engineeringid = e[1] || ''
tableStore.table.params.projectId = e[2] || '' tableStore.table.params.projectId = e[2] || ''
const zlIndex = props.deviceTree.findIndex((item: any) => {
return item.name == '治理设备'
})
const bxsIndex = props.deviceTree.findIndex((item: any) => {
return item.name == '便携式设备'
})
//便携式设备特殊处理
if (props.deviceTree[bxsIndex].id == e[0] && e.length == 2) {
tableStore.table.params.deviceId = e[1]
}
//治理设备
if (props.deviceTree[zlIndex].id == e[0]) {
tableStore.table.params.deviceId = e[2] || '' tableStore.table.params.deviceId = e[2] || ''
}
} }
onMounted(() => { onMounted(() => {

View File

@@ -13,7 +13,7 @@
></el-cascader> ></el-cascader>
<!-- <el-input v-model="tableStore.table.params.searchValue" placeholder="请输入设备名称" /> --> <!-- <el-input v-model="tableStore.table.params.searchValue" placeholder="请输入设备名称" /> -->
</el-form-item> </el-form-item>
<el-form-item label="级别"> <!-- <el-form-item label="级别">
<el-select v-model="tableStore.table.params.level" placeholder="请选择级别" clearable> <el-select v-model="tableStore.table.params.level" placeholder="请选择级别" clearable>
<el-option <el-option
v-for="item in rankOptions" v-for="item in rankOptions"
@@ -22,7 +22,7 @@
:value="item.value" :value="item.value"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item> -->
</template> </template>
</TableHeader> </TableHeader>
<!-- <div style="height: 300px;"> --> <!-- <div style="height: 300px;"> -->
@@ -72,11 +72,11 @@ const rankOptions = ref([
const tableStore = new TableStore({ const tableStore = new TableStore({
url: '/cs-harmonic-boot/eventUser/queryEventpage', url: '/cs-harmonic-boot/eventUser/queryEventpage',
method: 'POST', method: 'POST',
publicHeight:65, publicHeight: 65,
column: [ column: [
{ title: '设备名称', field: 'equipmentName', align: 'center' },
{ title: '工程名称', field: 'engineeringName', align: 'center' }, { title: '工程名称', field: 'engineeringName', align: 'center' },
{ title: '项目名称', field: 'projectName', align: 'center' }, { title: '项目名称', field: 'projectName', align: 'center' },
{ title: '设备名称', field: 'equipmentName', align: 'center' },
{ title: '事件描述', field: 'showName', align: 'center' }, { title: '事件描述', field: 'showName', align: 'center' },
{ title: '发生时刻', field: 'startTime', align: 'center' } { title: '发生时刻', field: 'startTime', align: 'center' }
], ],
@@ -100,12 +100,25 @@ tableStore.table.params.status = ''
tableStore.table.params.target = [] tableStore.table.params.target = []
tableStore.table.params.userId = '' tableStore.table.params.userId = ''
tableStore.table.params.cascader = '' tableStore.table.params.cascader = ''
tableStore.table.params.level='' // tableStore.table.params.level=''
const sourceChange = (e: any) => { const sourceChange = (e: any) => {
tableStore.table.params.engineeringid = e[1] || '' tableStore.table.params.engineeringid = e[1] || ''
tableStore.table.params.projectId = e[2] || '' tableStore.table.params.projectId = e[2] || ''
const zlIndex = props.deviceTree.findIndex((item: any) => {
return item.name == '治理设备'
})
const bxsIndex = props.deviceTree.findIndex((item: any) => {
return item.name == '便携式设备'
})
//便携式设备特殊处理
if (props.deviceTree[bxsIndex].id == e[0] && e.length == 2) {
tableStore.table.params.deviceId = e[1]
}
//治理设备
if (props.deviceTree[zlIndex].id == e[0]) {
tableStore.table.params.deviceId = e[2] || '' tableStore.table.params.deviceId = e[2] || ''
}
} }
onMounted(() => { onMounted(() => {

View File

@@ -3,17 +3,23 @@
<TableHeader datePicker> <TableHeader datePicker>
<template v-slot:select> <template v-slot:select>
<el-form-item label="数据来源"> <el-form-item label="数据来源">
<el-cascader placeholder="请选择数据来源" @change="sourceChange" v-model="tableStore.table.params.cascader" <el-cascader
:options="props.deviceTree" :show-all-levels="false" :props="{ checkStrictly: true }" placeholder="请选择数据来源"
clearable></el-cascader> @change="sourceChange"
v-model="tableStore.table.params.cascader"
:options="props.deviceTree"
:show-all-levels="false"
:props="{ checkStrictly: true }"
clearable
></el-cascader>
<!-- <el-input v-model="tableStore.table.params.searchValue" placeholder="请输入设备名称" /> --> <!-- <el-input v-model="tableStore.table.params.searchValue" placeholder="请输入设备名称" /> -->
</el-form-item> </el-form-item>
<el-form-item label="级别"> <!-- <el-form-item label="级别">
<el-select v-model="tableStore.table.params.level" placeholder="请选择级别" clearable> <el-select v-model="tableStore.table.params.level" placeholder="请选择级别" clearable>
<el-option v-for="item in rankOptions" :key="item.value" :label="item.label" <el-option v-for="item in rankOptions" :key="item.value" :label="item.label"
:value="item.value"></el-option> :value="item.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item> -->
</template> </template>
</TableHeader> </TableHeader>
<!-- <div style="height: 300px;"> --> <!-- <div style="height: 300px;"> -->
@@ -25,29 +31,54 @@
<div v-if="view2" style="display: flex"> <div v-if="view2" style="display: flex">
<span style="font-size: 14px; line-height: 30px">值类型选择:</span> <span style="font-size: 14px; line-height: 30px">值类型选择:</span>
<el-select @change="changeView" style="width: 240px" v-model="value" placeholder="请选择值类型"> <el-select @change="changeView" style="width: 240px" v-model="value" placeholder="请选择值类型">
<el-option v-for="item in options" :key="item.value" :label="item.label" <el-option
:value="item.value"></el-option> v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select> </el-select>
</div> </div>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-button v-if="view2" @click="backbxlb" type="primary" class="el-icon-refresh-right" <el-button
icon="el-icon-Back" style="float: right"> v-if="view2"
@click="backbxlb"
type="primary"
class="el-icon-refresh-right"
icon="el-icon-Back"
style="float: right"
>
返回 返回
</el-button> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-tabs v-if="view2" v-model="bxactiveName" @tab-click="bxhandleClick"> <el-tabs v-if="view2" v-model="bxactiveName" @tab-click="bxhandleClick">
<el-tab-pane label="瞬时波形" name="ssbx" class="boxbx pt10 pb10" <el-tab-pane
:style="'height:' + bxecharts + ';overflow-y: scroll;'"> label="瞬时波形"
<shushiboxi v-if="bxactiveName == 'ssbx' && showBoxi" :value="value" :boxoList="boxoList" :wp="wp"> name="ssbx"
</shushiboxi> 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>
<el-tab-pane label="RMS波形" class="boxbx pt10 pb10" name="rmsbx" <el-tab-pane
:style="'height:' + bxecharts + ';overflow-y: scroll;'"> label="RMS波形"
<rmsboxi v-if="bxactiveName == 'rmsbx' && showBoxi" :value="value" :boxoList="boxoList" :wp="wp"> class="boxbx pt10 pb10"
</rmsboxi> 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-tab-pane>
</el-tabs> </el-tabs>
<!-- <xiebofenxi ref="child" :bxshuju="bxshuju" @backfh="back"></xiebofenxi> --> <!-- <xiebofenxi ref="child" :bxshuju="bxshuju" @backfh="back"></xiebofenxi> -->
@@ -102,9 +133,9 @@ const tableStore = new TableStore({
method: 'POST', method: 'POST',
publicHeight: 65, publicHeight: 65,
column: [ column: [
{ title: '设备名称', field: 'equipmentName', align: 'center' },
{ title: '工程名称', field: 'engineeringName', align: 'center' }, { title: '工程名称', field: 'engineeringName', align: 'center' },
{ title: '项目名称', field: 'projectName', align: 'center' }, { title: '项目名称', field: 'projectName', align: 'center' },
{ title: '设备名称', field: 'equipmentName', align: 'center' },
{ title: '事件描述', field: 'showName', align: 'center' }, { title: '事件描述', field: 'showName', align: 'center' },
{ title: '事件发生位置', field: 'evtParamPosition', align: 'center' }, { title: '事件发生位置', field: 'evtParamPosition', align: 'center' },
{ title: '相别', field: 'evtParamPhase', align: 'center' }, { title: '相别', field: 'evtParamPhase', align: 'center' },
@@ -151,9 +182,7 @@ const tableStore = new TableStore({
render: 'basicButton', render: 'basicButton',
disabled: row => { disabled: row => {
return !(!row.wavePath && row.evtParamTm < 20) return !(!row.wavePath && row.evtParamTm < 20)
}, }
} }
] ]
} }
@@ -184,12 +213,25 @@ tableStore.table.params.status = ''
tableStore.table.params.target = [] tableStore.table.params.target = []
tableStore.table.params.userId = '' tableStore.table.params.userId = ''
tableStore.table.params.cascader = '' tableStore.table.params.cascader = ''
tableStore.table.params.level='' // tableStore.table.params.level=''
const sourceChange = (e: any) => { const sourceChange = (e: any) => {
tableStore.table.params.engineeringid = e[1] || '' tableStore.table.params.engineeringid = e[1] || ''
tableStore.table.params.projectId = e[2] || '' tableStore.table.params.projectId = e[2] || ''
const zlIndex = props.deviceTree.findIndex((item: any) => {
return item.name == '治理设备'
})
const bxsIndex = props.deviceTree.findIndex((item: any) => {
return item.name == '便携式设备'
})
//便携式设备特殊处理
if (props.deviceTree[bxsIndex].id == e[0] && e.length == 2) {
tableStore.table.params.deviceId = e[1]
}
//治理设备
if (props.deviceTree[zlIndex].id == e[0]) {
tableStore.table.params.deviceId = e[2] || '' tableStore.table.params.deviceId = e[2] || ''
}
} }
const getboxin = async (row: any) => { const getboxin = async (row: any) => {
console.log('🚀 ~ getboxin ~ row:', row) console.log('🚀 ~ getboxin ~ row:', row)
@@ -231,6 +273,6 @@ setTimeout(() => {
tableStore.table.height = mainHeight(200).height as any tableStore.table.height = mainHeight(200).height as any
}, 0) }, 0)
const addMenu = () => { } const addMenu = () => {}
</script> </script>
<style scoped lang="scss"></style> <style scoped lang="scss"></style>