修改事件展示查询问题
This commit is contained in:
@@ -3,15 +3,9 @@
|
||||
<TableHeader datePicker>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="数据来源">
|
||||
<el-cascader
|
||||
placeholder="请选择数据来源"
|
||||
@change="sourceChange"
|
||||
v-model="tableStore.table.params.cascader"
|
||||
:options="deviceTreeOptions"
|
||||
:show-all-levels="false"
|
||||
:props="{ checkStrictly: true }"
|
||||
clearable
|
||||
></el-cascader>
|
||||
<el-cascader placeholder="请选择数据来源" @change="sourceChange" v-model="tableStore.table.params.cascader"
|
||||
:options="deviceTreeOptions" :show-all-levels="false" :props="{ checkStrictly: true }"
|
||||
clearable></el-cascader>
|
||||
<!-- <el-input v-model="tableStore.table.params.searchValue" placeholder="请输入设备名称" /> -->
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="级别">
|
||||
@@ -31,54 +25,28 @@
|
||||
<div v-if="view2" style="display: flex">
|
||||
<span style="font-size: 14px; line-height: 30px">值类型选择:</span>
|
||||
<el-select @change="changeView" style="width: 240px" v-model="value" placeholder="请选择值类型">
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
<el-option v-for="item in options" :key="item.value" :label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button
|
||||
v-if="view2"
|
||||
@click="backbxlb"
|
||||
type="primary"
|
||||
class="el-icon-refresh-right"
|
||||
icon="el-icon-Back"
|
||||
style="float: right"
|
||||
>
|
||||
<el-button v-if="view2" @click="backbxlb" type="primary" class="el-icon-refresh-right"
|
||||
icon="el-icon-Back" style="float: right">
|
||||
返回
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-tabs v-if="view2" 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 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 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>
|
||||
<!-- <xiebofenxi ref="child" :bxshuju="bxshuju" @backfh="back"></xiebofenxi> -->
|
||||
@@ -188,9 +156,9 @@ const tableStore = new TableStore({
|
||||
}
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
if (!tableStore.table.params.deviceId) {
|
||||
delete tableStore.table.params.deviceId
|
||||
}
|
||||
// if (!tableStore.table.params.deviceId) {
|
||||
// delete tableStore.table.params.deviceId
|
||||
// }
|
||||
},
|
||||
loadCallback: () => {
|
||||
tableStore.table.data.forEach((item: any) => {
|
||||
@@ -206,6 +174,7 @@ provide('tableStore', tableStore)
|
||||
// "userId": ""
|
||||
tableStore.table.params.engineeringid = ''
|
||||
tableStore.table.params.projectId = ''
|
||||
tableStore.table.params.deviceTypeId = ''
|
||||
tableStore.table.params.deviceId = ''
|
||||
tableStore.table.params.type = 0
|
||||
tableStore.table.params.eventIds = []
|
||||
@@ -215,29 +184,52 @@ tableStore.table.params.userId = ''
|
||||
tableStore.table.params.cascader = ''
|
||||
// tableStore.table.params.level=''
|
||||
|
||||
const deviceTreeOptions = ref<any>(props.deviceTree)
|
||||
const deviceTreeOptions: any = ref<any>(props.deviceTree)
|
||||
deviceTreeOptions.value.map((item: any, index: any) => {
|
||||
if (item.children.length == 0) {
|
||||
deviceTreeOptions.value.splice(index, 1)
|
||||
}
|
||||
})
|
||||
const sourceChange = (e: any) => {
|
||||
tableStore.table.params.engineeringid = e[1] || ''
|
||||
tableStore.table.params.projectId = e[2] || ''
|
||||
const zlIndex = deviceTreeOptions.value.findIndex((item: any) => {
|
||||
return item.name == '治理设备'
|
||||
})
|
||||
const bxsIndex = deviceTreeOptions.value.findIndex((item: any) => {
|
||||
return item.name == '便携式设备'
|
||||
})
|
||||
//便携式设备特殊处理
|
||||
if (bxsIndex != -1 && deviceTreeOptions.value[bxsIndex].id == e[0] && e.length == 2) {
|
||||
tableStore.table.params.deviceId = e[1]
|
||||
}
|
||||
//治理设备
|
||||
if (zlIndex != -1 && deviceTreeOptions.value[zlIndex].id == e[0]) {
|
||||
tableStore.table.params.deviceId = e[2] || ''
|
||||
tableStore.table.params.deviceTypeId = ''
|
||||
tableStore.table.params.engineeringid = ''
|
||||
tableStore.table.params.projectId = ''
|
||||
tableStore.table.params.deviceId = ''
|
||||
if (e) {
|
||||
let name = deviceTreeOptions.value.filter((item: any) => {
|
||||
return item.id == e[0]
|
||||
})[0].name
|
||||
|
||||
if (name == '便携式设备') {
|
||||
tableStore.table.params.deviceTypeId = e[0] || ''
|
||||
tableStore.table.params.deviceId = e[1] || ''
|
||||
} else {
|
||||
tableStore.table.params.deviceTypeId = e[0] || ''
|
||||
tableStore.table.params.engineeringid = e[1] || ''
|
||||
tableStore.table.params.projectId = e[2] || ''
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// tableStore.table.params.engineeringid = e[1] || ''
|
||||
// tableStore.table.params.projectId = e[2] || ''
|
||||
// const zlIndex = deviceTreeOptions.value.findIndex((item: any) => {
|
||||
// return item.name == '治理设备'
|
||||
// })
|
||||
// const bxsIndex = deviceTreeOptions.value.findIndex((item: any) => {
|
||||
// return item.name == '便携式设备'
|
||||
// })
|
||||
|
||||
// console.log("🚀 ~ zlIndex ~ zlIndex:", zlIndex,bxsIndex)
|
||||
|
||||
// //便携式设备特殊处理
|
||||
// if (bxsIndex != -1 && deviceTreeOptions.value[bxsIndex].id == e[0] && e.length == 2) {
|
||||
// tableStore.table.params.deviceId = e[1]
|
||||
// }
|
||||
// //治理设备
|
||||
// if (zlIndex != -1 && deviceTreeOptions.value[zlIndex].id == e[0]) {
|
||||
// tableStore.table.params.deviceId = e[2] || ''
|
||||
// }
|
||||
}
|
||||
const getboxin = async (row: any) => {
|
||||
console.log('🚀 ~ getboxin ~ row:', row)
|
||||
@@ -279,6 +271,6 @@ setTimeout(() => {
|
||||
tableStore.table.height = mainHeight(200).height as any
|
||||
}, 0)
|
||||
|
||||
const addMenu = () => {}
|
||||
const addMenu = () => { }
|
||||
</script>
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
Reference in New Issue
Block a user