修改波形
This commit is contained in:
@@ -26,26 +26,7 @@
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!-- <div style="height: 300px;"> -->
|
||||
<Table :isGroup="true">
|
||||
<template v-slot:columns>
|
||||
<vxe-column title="操作" min-width="15px">
|
||||
<template v-slot:default="scoped">
|
||||
<!-- {{ scoped.row.onlineRate === 3.14159 ? '/' : scoped.row.onlineRate }} -->
|
||||
<el-button
|
||||
:icon="Tickets"
|
||||
size="small"
|
||||
type="primary"
|
||||
v-if="scoped.row.wavePath && scoped.row.evtParamTm < 20"
|
||||
@click="getboxin(scoped.row)"
|
||||
>
|
||||
波形分析
|
||||
</el-button>
|
||||
<el-button v-else size="small" :icon="Tickets" type="info" :disabled="true">暂无波形</el-button>
|
||||
</template>
|
||||
</vxe-column>
|
||||
</template>
|
||||
>
|
||||
</Table>
|
||||
<Table></Table>
|
||||
</div>
|
||||
<div style="padding: 10px" v-if="!view">
|
||||
<el-row>
|
||||
@@ -66,6 +47,7 @@
|
||||
@click="backbxlb"
|
||||
type="primary"
|
||||
class="el-icon-refresh-right"
|
||||
icon="el-icon-CloseBold"
|
||||
style="float: right"
|
||||
>
|
||||
返回
|
||||
@@ -76,7 +58,7 @@
|
||||
<el-tab-pane
|
||||
label="瞬时波形"
|
||||
name="ssbx"
|
||||
class="boxbx"
|
||||
class="boxbx pt10 pb10"
|
||||
:style="'height:' + bxecharts + ';overflow-y: scroll;'"
|
||||
>
|
||||
<shushiboxi
|
||||
@@ -86,7 +68,12 @@
|
||||
:wp="wp"
|
||||
></shushiboxi>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="RMS波形" name="rmsbx" :style="'height:' + bxecharts + ';overflow-y: scroll;'">
|
||||
<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"
|
||||
@@ -102,11 +89,10 @@
|
||||
import { ref, onMounted, provide } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import { Tickets } from '@element-plus/icons-vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import shushiboxi from '@/components/echarts/shushiboxi.vue'
|
||||
import rmsboxi from '@/components/echarts/rmsboxi.vue'
|
||||
|
||||
import { analyseWave } from '@/api/common'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
|
||||
const props = defineProps(['deviceTree'])
|
||||
@@ -156,10 +142,45 @@ const tableStore = new TableStore({
|
||||
{ title: '相别', field: 'evtParamPhase', align: 'center' },
|
||||
{ title: '持续时间(s)', field: 'evtParamTm', align: 'center' },
|
||||
{ title: '暂降深度', field: 'evtParamVVaDepth', align: 'center' },
|
||||
{ title: '发生时刻', field: 'startTime', align: 'center' }
|
||||
{ title: '发生时刻', field: 'startTime', align: 'center' },
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
width: '130',
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
text: '波形分析',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-DataLine',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return !row.wavePath && row.evtParamTm < 20
|
||||
},
|
||||
click: async row => {
|
||||
row.loading = true
|
||||
boxoList.value = row
|
||||
await analyseWave(row.id)
|
||||
.then(res => {
|
||||
row.loading = false
|
||||
if (res != undefined) {
|
||||
wp.value = res.data
|
||||
view.value = false
|
||||
view2.value = true
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
row.loading = false
|
||||
})
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
loadCallback: () => {
|
||||
tableStore.table.data.forEach((item: any) => {
|
||||
item.loading = false
|
||||
item.evtParamTm = item.evtParamTm.split('s')[0]
|
||||
})
|
||||
}
|
||||
@@ -177,21 +198,22 @@ tableStore.table.params.eventIds = []
|
||||
tableStore.table.params.status = ''
|
||||
tableStore.table.params.target = []
|
||||
tableStore.table.params.userId = ''
|
||||
import { analyseWave } from '@/api/common'
|
||||
|
||||
const sourceChange = (e: any) => {
|
||||
tableStore.table.params.engineeringid = e[0] || ''
|
||||
tableStore.table.params.projectId = e[1] || ''
|
||||
tableStore.table.params.deviceId = e[2] || ''
|
||||
}
|
||||
const getboxin = async (row: any) => {
|
||||
boxoList.value = row
|
||||
await analyseWave(row.id).then(res => {
|
||||
if (res != undefined) {
|
||||
wp.value = res.data
|
||||
view.value = false
|
||||
view2.value = true
|
||||
}
|
||||
})
|
||||
console.log('🚀 ~ getboxin ~ row:', row)
|
||||
// boxoList.value = row
|
||||
// await analyseWave(row.id).then(res => {
|
||||
// if (res != undefined) {
|
||||
// wp.value = res.data
|
||||
// view.value = false
|
||||
// view2.value = true
|
||||
// }
|
||||
// })
|
||||
}
|
||||
const changeView = () => {
|
||||
showBoxi.value = false
|
||||
@@ -211,13 +233,13 @@ const backbxlb = () => {
|
||||
view.value = true
|
||||
view2.value = false
|
||||
setTimeout(() => {
|
||||
tableStore.table.height = mainHeight(190).height as any
|
||||
}, 0)
|
||||
tableStore.table.height = mainHeight(180).height as any
|
||||
}, 0)
|
||||
}
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
const bxecharts = mainHeight(175).height as any
|
||||
const bxecharts = mainHeight(155).height as any
|
||||
setTimeout(() => {
|
||||
tableStore.table.height = mainHeight(180).height as any
|
||||
}, 0)
|
||||
|
||||
@@ -1,135 +0,0 @@
|
||||
<template>
|
||||
<TableHeader datePicker ref="refheader">
|
||||
<template v-slot:select>
|
||||
<el-form-item label="数据来源">
|
||||
<el-cascader
|
||||
placeholder="请选择数据来源"
|
||||
@change="sourceChange"
|
||||
:options="props.deviceTree"
|
||||
: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="级别">
|
||||
<el-select v-model="tableStore.table.params.level" placeholder="请选择级别" clearable>
|
||||
<el-option
|
||||
v-for="item in rankOptions"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!-- <div style="height: 300px;"> -->
|
||||
<!-- <Table ref="tableRef" :isGroup="true" /> -->
|
||||
<div :style="{ height: tableHeight }" v-loading="tableLoading">
|
||||
<vxe-table :data="tableStore.table.data" v-bind="defaultAttribute" height="auto" auto-resize>
|
||||
<vxe-column
|
||||
v-for="item in tableStore.table.column"
|
||||
:field="item.field"
|
||||
:title="item.title"
|
||||
:min-width="item.width"
|
||||
:sortable="item.sortable"
|
||||
></vxe-column>
|
||||
<vxe-column title="操作" min-width="220px">
|
||||
<template v-slot:default="scoped">
|
||||
<!-- {{ scoped.row.onlineRate === 3.14159 ? '/' : scoped.row.onlineRate }} -->
|
||||
<el-button icon="el-icon-s-marketing" type="primary" v-if="scoped.row.wavePath && scoped.row.evtParamTm<20" @click="getboxin(scoped.row)">波形分析</el-button>
|
||||
<el-button v-else icon="el-icon-s-marketing" type="info" :disabled="true">暂无波形</el-button>
|
||||
</template>
|
||||
|
||||
</vxe-column>
|
||||
</vxe-table>
|
||||
<el-pagination
|
||||
:currentPage="tableStore.table.params!.pageNum"
|
||||
:page-size="tableStore.table.params!.pageSize"
|
||||
:page-sizes="pageSizes"
|
||||
background
|
||||
:layout="config.layout.shrink ? 'prev, next, jumper' : 'sizes,total, ->, prev, pager, next, jumper'"
|
||||
:total="tableStore.table.total"
|
||||
@size-change="onTableSizeChange"
|
||||
@current-change="onTableCurrentChange"
|
||||
></el-pagination>
|
||||
</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 { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
|
||||
const props = defineProps(['deviceTree'])
|
||||
|
||||
const refheader = ref()
|
||||
const tableLoading = ref(false)
|
||||
|
||||
const rankOptions = ref([
|
||||
{
|
||||
value: '1',
|
||||
label: '1级'
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
label: '2级'
|
||||
},
|
||||
{
|
||||
value: '3',
|
||||
label: '3级'
|
||||
}
|
||||
])
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/cs-harmonic-boot/eventUser/queryEventpage',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '工程名称', field: 'engineeringName', align: 'center' },
|
||||
{ title: '项目名称', field: 'projectName', align: 'center' },
|
||||
{ title: '设备名称', field: 'equipmentName', align: 'center' },
|
||||
{ title: '事件描述', field: 'showName', align: 'center' },
|
||||
{ title: '事件发生位置', field: 'evtParamPosition', align: 'center' },
|
||||
{ title: '相别', field: 'evtParamPhase', align: 'center' },
|
||||
{ title: '持续时间', field: 'evtParamTm', align: 'center' },
|
||||
{ title: '暂降深度', field: 'evtParamVVaDepth', align: 'center' },
|
||||
{ title: '发生时刻', field: 'startTime', align: 'center' },
|
||||
{ title: '操作', field: '', align: 'center' }
|
||||
]
|
||||
})
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
// "target": [],
|
||||
// "type": "",
|
||||
// "userId": ""
|
||||
tableStore.table.params.engineeringid = ''
|
||||
tableStore.table.params.projectId = ''
|
||||
tableStore.table.params.deviceId = ''
|
||||
tableStore.table.params.type = 1
|
||||
tableStore.table.params.eventIds = []
|
||||
tableStore.table.params.status = ''
|
||||
tableStore.table.params.target = []
|
||||
tableStore.table.params.userId = ''
|
||||
|
||||
const sourceChange = (e: any) => {
|
||||
tableStore.table.params.engineeringid = e[0] || ''
|
||||
tableStore.table.params.projectId = e[1] || ''
|
||||
tableStore.table.params.deviceId = e[2] || ''
|
||||
}
|
||||
// 波形分析
|
||||
const getboxin=()=>{
|
||||
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
const tableHeight = mainHeight(225).height
|
||||
const addMenu = () => {}
|
||||
</script>
|
||||
<style></style>
|
||||
Reference in New Issue
Block a user