方案数据添加暂态事件页面
This commit is contained in:
@@ -36,6 +36,10 @@ export default {
|
||||
type: [String, Number, Boolean],
|
||||
default: 3,
|
||||
},
|
||||
parentHeight: {
|
||||
type: [String, Number, Boolean],
|
||||
default: 0
|
||||
},
|
||||
DColor: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
@@ -103,6 +107,10 @@ export default {
|
||||
} else {
|
||||
this.vh = mainHeight(200, 2).height
|
||||
}
|
||||
if (this.parentHeight != 0) {
|
||||
this.vh = mainHeight(this.parentHeight, 2).height
|
||||
|
||||
}
|
||||
this.vw = '100%'
|
||||
},
|
||||
mounted() {
|
||||
@@ -210,7 +218,10 @@ export default {
|
||||
"s";
|
||||
} else if (this.boxoList.systemType == 'WX') {
|
||||
|
||||
|
||||
let featureAmplitude = this.boxoList.featureAmplitude + '' ? this.boxoList.featureAmplitude.toFixed(2) : '/'
|
||||
if (String(this.boxoList.featureAmplitude).split('.')[1] == '00') {
|
||||
this.boxoList.featureAmplitude = String(this.boxoList.featureAmplitude).split('.')[0]
|
||||
}
|
||||
this.titles =
|
||||
|
||||
' 监测点名称:' +
|
||||
@@ -218,7 +229,7 @@ export default {
|
||||
' 发生时刻:' +
|
||||
this.boxoList.startTime +
|
||||
' 暂降(骤升)幅值:' +
|
||||
(this.boxoList.featureAmplitude) +
|
||||
(featureAmplitude) +
|
||||
'% 持续时间:' +
|
||||
(this.boxoList.persistTime ? this.boxoList.persistTime.toFixed(2) : '-') +
|
||||
's'
|
||||
|
||||
@@ -28,6 +28,10 @@ export default {
|
||||
type: [String, Number, Boolean],
|
||||
default: 3
|
||||
},
|
||||
parentHeight: {
|
||||
type: [String, Number, Boolean],
|
||||
default: 0
|
||||
},
|
||||
DColor: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
@@ -77,6 +81,10 @@ export default {
|
||||
} else {
|
||||
this.vh = mainHeight(200, 2).height
|
||||
}
|
||||
if (this.parentHeight != 0) {
|
||||
this.vh = mainHeight(this.parentHeight, 2).height
|
||||
|
||||
}
|
||||
this.vw = '100%'
|
||||
},
|
||||
watch: {
|
||||
@@ -166,6 +174,11 @@ export default {
|
||||
's'
|
||||
}
|
||||
else if (this.boxoList.systemType == 'WX') {
|
||||
let featureAmplitude = this.boxoList.featureAmplitude + '' ? this.boxoList.featureAmplitude.toFixed(2) : '/'
|
||||
if (String(this.boxoList.featureAmplitude).split('.')[1] == '00') {
|
||||
this.boxoList.featureAmplitude = String(this.boxoList.featureAmplitude).split('.')[0]
|
||||
}
|
||||
|
||||
this.titles =
|
||||
|
||||
' 监测点名称:' +
|
||||
@@ -173,7 +186,7 @@ export default {
|
||||
' 发生时刻:' +
|
||||
this.boxoList.startTime +
|
||||
' 暂降(骤升)幅值:' +
|
||||
(this.boxoList.featureAmplitude) +
|
||||
(featureAmplitude) +
|
||||
'% 持续时间:' +
|
||||
(this.boxoList.persistTime ? this.boxoList.persistTime.toFixed(2) : '-') +
|
||||
's'
|
||||
@@ -496,7 +509,7 @@ export default {
|
||||
colors.push('#CC0000')
|
||||
break
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (waveDatas[0].unit === '电压') {
|
||||
if (this.value === 1) {
|
||||
@@ -507,7 +520,7 @@ export default {
|
||||
} else {
|
||||
unit = 'A'
|
||||
}
|
||||
|
||||
|
||||
|
||||
//把剩余的DIV先拼接好
|
||||
for (var step = 1; step < waveDatas.length; step++) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog draggable class="cn-operate-dialog" v-model="dialogVisible" :title="title">
|
||||
<el-scrollbar>
|
||||
<el-form :inline="false" :model="form" label-width="120px">
|
||||
<el-form :inline="false" :model="form" label-width="120px" class="form-two">
|
||||
<el-form-item label="用户名称:">
|
||||
<el-input v-model="form.name" :disabled="true"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<template>
|
||||
<el-dialog draggable width="500px" v-model="dialogVisible" :title="title">
|
||||
<el-scrollbar>
|
||||
<el-form :inline="false" :model="form" label-width="120px" :rules="rules" ref="formRef">
|
||||
<el-form :inline="false" :model="form" label-width="120px" :rules="rules" class="form-one" ref="formRef">
|
||||
<el-form-item label="校验密码:" prop="password">
|
||||
<el-input v-model="form.password" type="password"
|
||||
placeholder="请输入校验密码" show-password />
|
||||
</el-form-item>
|
||||
<el-form-item label="新密码:" prop="newPwd" style="margin-top: 20px">
|
||||
<el-form-item label="新密码:" prop="newPwd" >
|
||||
<el-input v-model="form.newPwd" type="password" placeholder="请输入新密码"
|
||||
show-password />
|
||||
</el-form-item>
|
||||
<el-form-item label="确认密码:" prop="confirmPwd" style="margin-top: 20px">
|
||||
<el-form-item label="确认密码:" prop="confirmPwd" >
|
||||
<el-input v-model="form.confirmPwd" type="password"
|
||||
placeholder="请输入确认密码" show-password />
|
||||
</el-form-item>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog class='cn-operate-dialog' v-model='dialogVisible' :title='title'>
|
||||
<el-dialog width="600px" v-model='dialogVisible' :title='title'>
|
||||
<el-scrollbar>
|
||||
<el-form :inline='false' :model='form' label-width='120px' :rules='rules' ref='formRef'>
|
||||
<el-form :inline='false' :model='form' label-width='auto' class="form-one" :rules='rules' ref='formRef'>
|
||||
<el-form-item label='角色名称'>
|
||||
<el-input maxlength="32" show-word-limit v-model='form.name' placeholder='请输入菜单名称' />
|
||||
</el-form-item>
|
||||
@@ -9,7 +9,7 @@
|
||||
<el-input maxlength="32" show-word-limit v-model='form.code' placeholder='请输入菜单名称' />
|
||||
</el-form-item>
|
||||
<el-form-item label='角色描述'>
|
||||
<el-input maxlength="32" show-word-limit v-model='form.remark' :rows='2' type='textarea'
|
||||
<el-input maxlength="300" show-word-limit v-model='form.remark' :rows='2' type='textarea'
|
||||
placeholder='请输入描述' />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog class="cn-operate-dialog" v-model="dialogVisible" :title="title">
|
||||
<el-dialog width="700px" v-model="dialogVisible" :title="title">
|
||||
<el-scrollbar>
|
||||
<el-form :mode="form" :inline="false" :model="form" label-width="120px" :rules="rules">
|
||||
<el-form :mode="form" :inline="false" :model="form" label-width="120px" :rules="rules" class="form-one">
|
||||
<el-form-item prop="name" label="接口/按钮名称">
|
||||
<el-input maxlength="32" show-word-limit v-model="form.name" placeholder="请输入接口名称" />
|
||||
</el-form-item>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<el-dialog class="cn-operate-dialog" v-model="dialogVisible" title="修改密码">
|
||||
<el-dialog width=“500px” v-model="dialogVisible" title="修改密码">
|
||||
<el-scrollbar>
|
||||
<el-form :inline="false" :model="form" label-width="120px" :rules="rules" ref="formRef">
|
||||
<el-form :inline="false" :model="form" label-width="120px" class="form-one" :rules="rules" ref="formRef">
|
||||
<el-form-item label="新密码" prop="newPwd">
|
||||
<el-input maxlength="32" show-word-limit v-model="form.newPwd" type="password" placeholder="请输入新密码"
|
||||
show-password />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div ref="refheader" v-show="view">
|
||||
<div ref="refheader" v-if="!isWaveCharts">
|
||||
<TableHeader datePicker>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="数据来源">
|
||||
@@ -16,10 +16,14 @@
|
||||
</el-form-item> -->
|
||||
</template>
|
||||
</TableHeader>
|
||||
<!-- <div style="height: 300px;"> -->
|
||||
|
||||
<Table></Table>
|
||||
</div>
|
||||
<div style="padding: 10px" v-if="!view">
|
||||
<waveFormAnalysis v-loading="loading" v-if="isWaveCharts" ref="waveFormAnalysisRef"
|
||||
@handleHideCharts="isWaveCharts = false" :wp="wp" />
|
||||
<!-- <div style="height: 300px;"> -->
|
||||
|
||||
<!-- <div style="padding: 10px" v-if="!view" v-loading="loading">
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<div v-if="view2" style="display: flex">
|
||||
@@ -49,24 +53,27 @@
|
||||
</rmsboxi>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<!-- <xiebofenxi ref="child" :bxshuju="bxshuju" @backfh="back"></xiebofenxi> -->
|
||||
</div>
|
||||
</div> -->
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide } from 'vue'
|
||||
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import shushiboxi from '@/components/echarts/shushiboxi.vue'
|
||||
import waveFormAnalysis from '@/views/govern/device/control/tabs/components/waveFormAnalysis.vue';
|
||||
import rmsboxi from '@/components/echarts/rmsboxi.vue'
|
||||
import { analyseWave } from '@/api/common'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { ElMessage } from 'element-plus'
|
||||
const props = defineProps(['deviceTree'])
|
||||
const refheader = ref()
|
||||
const waveFormAnalysisRef = ref()
|
||||
const view = ref(true)
|
||||
const isWaveCharts = ref(false)
|
||||
const view2 = ref(false)
|
||||
const showBoxi = ref(true)
|
||||
const loading = ref(false)
|
||||
const bxactiveName = ref('ssbx')
|
||||
const boxoList: any = ref({})
|
||||
const wp = ref({})
|
||||
@@ -129,22 +136,51 @@ const tableStore = new TableStore({
|
||||
},
|
||||
click: async row => {
|
||||
row.loading1 = true
|
||||
boxoList.value = row
|
||||
boxoList.value.systemType = 'WX'
|
||||
boxoList.value.featureAmplitude = row.evtParamVVaDepth != '-' ? row.evtParamVVaDepth - 0 : null
|
||||
boxoList.value.persistTime = row.evtParamTm != '-' ? row.evtParamTm - 0 : null
|
||||
loading.value = true
|
||||
isWaveCharts.value = true
|
||||
await analyseWave(row.id)
|
||||
.then(res => {
|
||||
row.loading1 = false
|
||||
if (res != undefined) {
|
||||
boxoList.value = row
|
||||
boxoList.value.featureAmplitude = row.evtParamVVaDepth != '-' ? row.evtParamVVaDepth - 0 : null
|
||||
boxoList.value.systemType = 'WX'
|
||||
wp.value = res.data
|
||||
view.value = false
|
||||
view2.value = true
|
||||
|
||||
|
||||
}
|
||||
loading.value = false
|
||||
})
|
||||
.catch(() => {
|
||||
row.loading1 = false
|
||||
loading.value = false
|
||||
})
|
||||
|
||||
nextTick(() => {
|
||||
waveFormAnalysisRef.value && waveFormAnalysisRef.value.getWpData(wp.value, boxoList.value, true)
|
||||
// waveFormAnalysisRef.value && waveFormAnalysisRef.value.setHeight(200, 190)
|
||||
})
|
||||
// row.loading1 = true
|
||||
// view.value = false
|
||||
// view2.value = true
|
||||
// loading.value = true
|
||||
// boxoList.value = row
|
||||
// boxoList.value.systemType = 'WX'
|
||||
|
||||
// boxoList.value.persistTime = row.evtParamTm != '-' ? row.evtParamTm - 0 : null
|
||||
// await analyseWave(row.id)
|
||||
// .then(res => {
|
||||
// row.loading1 = false
|
||||
// if (res != undefined) {
|
||||
// wp.value = res.data
|
||||
|
||||
// }
|
||||
// loading.value = false
|
||||
// })
|
||||
// .catch(() => {
|
||||
// row.loading1 = false
|
||||
// loading.value = false
|
||||
// })
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -22,15 +22,15 @@
|
||||
</el-form-item>
|
||||
</div>
|
||||
<el-tabs class="home_body" type="border-card" v-model="activeName" @tab-click="handleClick">
|
||||
|
||||
|
||||
<el-tab-pane label="瞬时波形" name="ssbx" :style="'height:' + bxecharts + ';overflow-y: scroll;'">
|
||||
<shushiboxi v-if="isWp && wp && activeName == 'ssbx' && showBoxi" :value="value" :boxoList="boxoList"
|
||||
:wp="wp">
|
||||
:parentHeight="parentHeight" :wp="wp">
|
||||
</shushiboxi>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="RMS波形" name="rmsbx" :style="'height:' + bxecharts + ';overflow-y: scroll;'">
|
||||
<rmsboxi v-if="isWp && wp && activeName == 'rmsbx' && showBoxi" :value="value" :boxoList="boxoList"
|
||||
:wp="wp">
|
||||
:parentHeight="parentHeight" :wp="wp">
|
||||
</rmsboxi>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@@ -50,6 +50,7 @@ const searchForm = ref({
|
||||
type: 0
|
||||
})
|
||||
const emit = defineEmits(['handleHideCharts'])
|
||||
const parentHeight = ref(0)
|
||||
const tableList: any = ref([])
|
||||
for (let i = 0; i < 300; i++) {
|
||||
tableList.value.push({
|
||||
@@ -106,7 +107,8 @@ const getWpData = (val: any, list: any) => {
|
||||
wp.value = val
|
||||
isWp.value = true
|
||||
boxoList.value = list
|
||||
// console.log(wp.value, val, 'ggggghhhh')
|
||||
|
||||
console.log(wp.value, val, 'ggggghhhh')
|
||||
}
|
||||
const changeView = () => {
|
||||
showBoxi.value = false
|
||||
@@ -114,7 +116,7 @@ const changeView = () => {
|
||||
showBoxi.value = true
|
||||
}, 0)
|
||||
}
|
||||
const bxecharts = mainHeight(345).height as any
|
||||
const bxecharts: any = ref(mainHeight(190).height as any)
|
||||
|
||||
const handleClick = (tab: any, event: any) => {
|
||||
// activeName.value = tab.index
|
||||
@@ -127,22 +129,29 @@ const handleClick = (tab: any, event: any) => {
|
||||
const handleBack = () => {
|
||||
emit('handleHideCharts')
|
||||
}
|
||||
const setHeight = (h: any,vh: any) => {
|
||||
|
||||
parentHeight.value = h
|
||||
setTimeout(() => {
|
||||
bxecharts.value = mainHeight(vh).height
|
||||
},100)
|
||||
}
|
||||
onMounted(() => { })
|
||||
defineExpose({ getWpData })
|
||||
defineExpose({ getWpData, setHeight })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.tab_info {
|
||||
width: 100%;
|
||||
height: calc(100vh - 450px);
|
||||
// .tab_info {
|
||||
// width: 100%;
|
||||
// height: calc(100vh - 450px);
|
||||
|
||||
// overflow: auto;
|
||||
// padding-bottom: 20px;
|
||||
.charts {
|
||||
width: 100%;
|
||||
margin-top: 10px;
|
||||
height: calc(100vh - 450px);
|
||||
}
|
||||
}
|
||||
// // overflow: auto;
|
||||
// // padding-bottom: 20px;
|
||||
// .charts {
|
||||
// width: 100%;
|
||||
// margin-top: 10px;
|
||||
// height: calc(100vh - 450px);
|
||||
// }
|
||||
// }
|
||||
|
||||
.home {
|
||||
width: 100%;
|
||||
@@ -152,11 +161,7 @@ defineExpose({ getWpData })
|
||||
position: relative;
|
||||
|
||||
.home_header {
|
||||
// position: absolute;
|
||||
// top: -25px;
|
||||
// left: 0;
|
||||
// width: 80%;
|
||||
// height: 40px;
|
||||
|
||||
height: 50px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -2,12 +2,8 @@
|
||||
<div class="view">
|
||||
<TableHeader datePicker ref="headerRef" v-if="!isWaveCharts" :showReset="false"></TableHeader>
|
||||
<Table ref="tableRef" v-if="!isWaveCharts" />
|
||||
<waveFormAnalysis
|
||||
v-if="isWaveCharts"
|
||||
ref="waveFormAnalysisRef"
|
||||
@handleHideCharts="isWaveCharts = false"
|
||||
:wp="wp"
|
||||
/>
|
||||
<waveFormAnalysis v-loading="loading" v-if="isWaveCharts" ref="waveFormAnalysisRef" @handleHideCharts="isWaveCharts = false"
|
||||
:wp="wp" />
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
@@ -24,6 +20,7 @@ const tableParams: any = ref({})
|
||||
const refheader = ref()
|
||||
const view = ref(true)
|
||||
const view2 = ref(false)
|
||||
const loading = ref(false)
|
||||
const showBoxi = ref(true)
|
||||
const bxactiveName = ref('ssbx')
|
||||
const boxoList: any = ref([])
|
||||
@@ -37,9 +34,11 @@ const tableStore: any = new TableStore({
|
||||
method: 'POST',
|
||||
column: [
|
||||
// { width: '60', type: 'checkbox', fixed: 'left' },
|
||||
{ title: '序号', width: 80,formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
} },
|
||||
{
|
||||
title: '序号', width: 80, formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'startTime', title: '发生时刻', minWidth: 170 },
|
||||
{ field: 'showName', title: '事件描述', minWidth: 170 },
|
||||
{
|
||||
@@ -84,14 +83,15 @@ const tableStore: any = new TableStore({
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Check',
|
||||
render: 'basicButton',
|
||||
loading:'loading1',
|
||||
loading: 'loading1',
|
||||
disabled: row => {
|
||||
// && row.evtParamTm < 20
|
||||
return !row.wavePath
|
||||
},
|
||||
click: async row => {
|
||||
row.loading1 = true
|
||||
|
||||
isWaveCharts.value = true
|
||||
loading.value = true
|
||||
await analyseWave(row.id)
|
||||
.then(res => {
|
||||
row.loading1 = false
|
||||
@@ -102,13 +102,16 @@ const tableStore: any = new TableStore({
|
||||
view.value = false
|
||||
view2.value = true
|
||||
}
|
||||
loading.value = false
|
||||
})
|
||||
.catch(() => {
|
||||
row.loading1 = false
|
||||
loading.value = false
|
||||
})
|
||||
isWaveCharts.value = true
|
||||
|
||||
nextTick(() => {
|
||||
waveFormAnalysisRef.value && waveFormAnalysisRef.value.getWpData(wp.value, boxoList.value)
|
||||
waveFormAnalysisRef.value && waveFormAnalysisRef.value.setHeight(200, 345)
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -126,7 +129,7 @@ const tableStore: any = new TableStore({
|
||||
name: 'edit',
|
||||
title: '波形下载',
|
||||
type: 'primary',
|
||||
loading:'loading2',
|
||||
loading: 'loading2',
|
||||
icon: 'el-icon-Check',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
@@ -153,7 +156,7 @@ const tableStore: any = new TableStore({
|
||||
tableStore.table.params.list = tableParams.value.list
|
||||
tableStore.table.params.type = 3
|
||||
},
|
||||
loadCallback: () => {}
|
||||
loadCallback: () => { }
|
||||
})
|
||||
provide('tableStore', tableStore)
|
||||
const isWaveCharts = ref(false)
|
||||
|
||||
@@ -235,7 +235,7 @@ const init = async () => {
|
||||
let obj = {
|
||||
...trendRequestData.value,
|
||||
list: lists,
|
||||
valueType: searchForm.value.type,
|
||||
// valueType: searchForm.value.type,
|
||||
dataLevel: searchForm.value.dataLevel,
|
||||
valueType: searchForm.value.valueType,
|
||||
startTime: datePickerRef.value && datePickerRef.value.timeValue[0],
|
||||
@@ -389,6 +389,7 @@ const init = async () => {
|
||||
// console.log("🚀 ~ unitList.forEach ~ unitList:", unitList)
|
||||
|
||||
if (chartsList.length > 0) {
|
||||
let yData: any = []
|
||||
echartsData.value.yAxis = []
|
||||
let setList = [...new Set(unitList)];
|
||||
|
||||
@@ -396,6 +397,7 @@ const init = async () => {
|
||||
if (index > 2) {
|
||||
echartsData.value.grid.right = (index - 1) * 80
|
||||
}
|
||||
yData.push([])
|
||||
let right = {
|
||||
position: 'right',
|
||||
offset: (index - 1) * 80
|
||||
@@ -446,7 +448,7 @@ const init = async () => {
|
||||
let seriesList: any = []
|
||||
kk.forEach((cc: any) => {
|
||||
if (cc.statisticalData !== null) {
|
||||
yMethodList.push(cc.statisticalData?.toFixed(2) - 0)
|
||||
yData[setList.indexOf(kk[0].unit)].push(cc.statisticalData?.toFixed(2))
|
||||
}
|
||||
|
||||
seriesList.push([cc.time, cc.statisticalData?.toFixed(2), cc.unit, lineStyle[lineS].type])
|
||||
@@ -466,7 +468,12 @@ const init = async () => {
|
||||
yAxisIndex: setList.indexOf(kk[0].unit)
|
||||
})
|
||||
})
|
||||
let [min, max] = yMethod(yMethodList)
|
||||
// let [min, max] = yMethod(yMethodList)
|
||||
// echartsData.value.yAxis[index].min = min
|
||||
// echartsData.value.yAxis[index].max = max
|
||||
})
|
||||
yData.forEach((item: any, index: any) => {
|
||||
let [min, max] = yMethod(item)
|
||||
echartsData.value.yAxis[index].min = min
|
||||
echartsData.value.yAxis[index].max = max
|
||||
})
|
||||
|
||||
@@ -1,25 +1,41 @@
|
||||
<template>
|
||||
<div>
|
||||
<Table ref="tableRef" v-if="!isWaveCharts" />
|
||||
<waveFormAnalysis v-loading="loading" v-if="isWaveCharts" ref="waveFormAnalysisRef"
|
||||
@handleHideCharts="isWaveCharts = false" :wp="wp" />
|
||||
</div>
|
||||
|
||||
<!-- <TableHeader :showReset="false">
|
||||
|
||||
</TableHeader> -->
|
||||
<Table ref="tableRef" />
|
||||
|
||||
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
import { ref, provide, onMounted } from 'vue'
|
||||
import { ref, provide, onMounted, nextTick } from 'vue'
|
||||
import { getEventByItem } from '@/api/cs-device-boot/planData'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import waveFormAnalysis from '@/views/govern/device/control/tabs/components/waveFormAnalysis.vue';
|
||||
import { analyseWave } from '@/api/common'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
const props = defineProps({
|
||||
activeName: String
|
||||
activeName: String,
|
||||
activeColName: [Object, String]
|
||||
})
|
||||
const loading = ref(false)
|
||||
const waveFormAnalysisRef = ref()
|
||||
const isWaveCharts = ref(false)
|
||||
const boxoList: any = ref([])
|
||||
const wp = ref({})
|
||||
const tableStore = new TableStore({
|
||||
url: '/cs-harmonic-boot/data/getEventByItem',
|
||||
method: 'POST',
|
||||
paramsPOST: true,
|
||||
showPage: false,
|
||||
publicHeight: 365,
|
||||
column: [
|
||||
// { width: '60', type: 'checkbox', fixed: 'left' },
|
||||
{
|
||||
@@ -64,73 +80,77 @@ const tableStore = new TableStore({
|
||||
width: 180,
|
||||
render: 'buttons',
|
||||
fixed: 'right',
|
||||
// buttons: [
|
||||
// {
|
||||
// name: 'edit',
|
||||
// title: '波形解析',
|
||||
// type: 'primary',
|
||||
// icon: 'el-icon-Check',
|
||||
// render: 'basicButton',
|
||||
// loading: 'loading1',
|
||||
// disabled: row => {
|
||||
// // && row.evtParamTm < 20
|
||||
// return !row.wavePath
|
||||
// },
|
||||
// click: async row => {
|
||||
// row.loading1 = true
|
||||
buttons: [
|
||||
{
|
||||
name: 'edit',
|
||||
title: '波形解析',
|
||||
type: 'primary',
|
||||
icon: 'el-icon-Check',
|
||||
render: 'basicButton',
|
||||
loading: 'loading1',
|
||||
disabled: row => {
|
||||
// && row.evtParamTm < 20
|
||||
return !row.wavePath
|
||||
},
|
||||
click: async row => {
|
||||
row.loading1 = true
|
||||
loading.value = true
|
||||
isWaveCharts.value = true
|
||||
await analyseWave(row.id)
|
||||
.then(res => {
|
||||
row.loading1 = false
|
||||
if (res != undefined) {
|
||||
boxoList.value = row
|
||||
boxoList.value.systemType = 'WX'
|
||||
wp.value = res.data
|
||||
|
||||
|
||||
// await analyseWave(row.id)
|
||||
// .then(res => {
|
||||
// row.loading1 = false
|
||||
// if (res != undefined) {
|
||||
// boxoList.value = row
|
||||
// boxoList.value.systemType = 'WX'
|
||||
// wp.value = res.data
|
||||
// view.value = false
|
||||
// view2.value = true
|
||||
// }
|
||||
// })
|
||||
// .catch(() => {
|
||||
// row.loading1 = false
|
||||
// })
|
||||
// isWaveCharts.value = true
|
||||
// nextTick(() => {
|
||||
// waveFormAnalysisRef.value && waveFormAnalysisRef.value.getWpData(wp.value, boxoList.value)
|
||||
// })
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// name: 'edit',
|
||||
// text: '暂无波形',
|
||||
// type: 'info',
|
||||
// icon: 'el-icon-DataLine',
|
||||
// render: 'basicButton',
|
||||
// disabled: row => {
|
||||
// return row.wavePath
|
||||
// }
|
||||
// },
|
||||
// {
|
||||
// name: 'edit',
|
||||
// title: '波形下载',
|
||||
// type: 'primary',
|
||||
// loading: 'loading2',
|
||||
// icon: 'el-icon-Check',
|
||||
// render: 'basicButton',
|
||||
// disabled: row => {
|
||||
// // && row.evtParamTm < 20
|
||||
// return !row.wavePath
|
||||
// },
|
||||
// click: row => {
|
||||
// row.loading2 = true
|
||||
// const url = window.location.origin + '/api/cs-harmonic-boot/event/getFileZip?eventId=' + row.id
|
||||
// window.open(url, '_self')
|
||||
// setTimeout(() => {
|
||||
// ElMessage.success('波形下载成功!')
|
||||
// row.loading2 = false
|
||||
// }, 1500)
|
||||
// }
|
||||
// }
|
||||
// ]
|
||||
}
|
||||
loading.value = false
|
||||
})
|
||||
.catch(() => {
|
||||
row.loading1 = false
|
||||
loading.value = false
|
||||
})
|
||||
|
||||
nextTick(() => {
|
||||
waveFormAnalysisRef.value && waveFormAnalysisRef.value.getWpData(wp.value, boxoList.value, true)
|
||||
setHeight()
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
text: '暂无波形',
|
||||
type: 'info',
|
||||
icon: 'el-icon-DataLine',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
return row.wavePath
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
title: '波形下载',
|
||||
type: 'primary',
|
||||
loading: 'loading2',
|
||||
icon: 'el-icon-Check',
|
||||
render: 'basicButton',
|
||||
disabled: row => {
|
||||
// && row.evtParamTm < 20
|
||||
return !row.wavePath
|
||||
},
|
||||
click: row => {
|
||||
row.loading2 = true
|
||||
const url = window.location.origin + '/api/cs-harmonic-boot/event/getFileZip?eventId=' + row.id
|
||||
window.open(url, '_self')
|
||||
setTimeout(() => {
|
||||
ElMessage.success('波形下载成功!')
|
||||
row.loading2 = false
|
||||
}, 1500)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
@@ -138,6 +158,16 @@ const tableStore = new TableStore({
|
||||
|
||||
}
|
||||
})
|
||||
const setHeight = () => {
|
||||
if (props.activeColName == '0') {
|
||||
waveFormAnalysisRef.value && waveFormAnalysisRef.value.setHeight(360, 495)
|
||||
tableStore.table.height = mainHeight(385).height
|
||||
|
||||
} else {
|
||||
waveFormAnalysisRef.value && waveFormAnalysisRef.value.setHeight(360, 360)
|
||||
tableStore.table.height = mainHeight(250).height
|
||||
}
|
||||
}
|
||||
provide('tableStore', tableStore)
|
||||
const init = () => {
|
||||
tableStore.table.params.id = props.activeName
|
||||
@@ -149,7 +179,7 @@ const init = () => {
|
||||
onMounted(() => {
|
||||
|
||||
})
|
||||
defineExpose({ init })
|
||||
defineExpose({ init, setHeight })
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
||||
|
||||
@@ -16,13 +16,13 @@
|
||||
{{ deviceData.describe ? deviceData.describe : '/' }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-collapse v-model="activeColName" @change="handleChange">
|
||||
<el-collapse v-model="activeColName" @change="handleChange" accordion>
|
||||
<el-collapse-item title="测试项信息" name="0">
|
||||
<div class="monitor_info" v-if="deviceData.records && deviceData.records.length != 0">
|
||||
<!-- <div class="history_title">
|
||||
<p>测试项信息</p>
|
||||
</div> -->
|
||||
<el-tabs v-model="activeName" type="border-card" @click="handleClickTabs">
|
||||
<el-tabs v-model="activeName" type="border-card" @tab-change="handleClickTabs">
|
||||
<el-tab-pane v-for="(item, index) in deviceData?.records" :label="item.itemName"
|
||||
:name="item.id" :key="index">
|
||||
<template #label>
|
||||
@@ -170,7 +170,7 @@
|
||||
<el-empty :style="EcharHeight" v-else description="未绑定数据" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="暂态数据" name="1">
|
||||
<transient :activeName='activeName' ref="transientRef" />
|
||||
<transient :activeName='activeName' ref="transientRef" :activeColName="activeColName"/>
|
||||
</el-tab-pane>
|
||||
|
||||
</el-tabs>
|
||||
@@ -310,6 +310,7 @@ const handleClickTabs = () => {
|
||||
schemeTreeRef.value.setCheckedNode(activeName.value)
|
||||
setTimeout(() => {
|
||||
init(true)
|
||||
transientRef.value && transientRef.value.init()
|
||||
}, 100)
|
||||
}
|
||||
const nodeClick = async (e: anyObj) => {
|
||||
@@ -345,7 +346,7 @@ const nodeClick = async (e: anyObj) => {
|
||||
// if (searchForm.value.index.length == 0) {
|
||||
// searchForm.value.index = [indexOptions.value[0].id]
|
||||
// }
|
||||
|
||||
|
||||
schemeTreeRef.value.getPlanData(deviceData.value)
|
||||
await setTimeout(() => {
|
||||
loading.value = true
|
||||
@@ -645,12 +646,15 @@ const init = (flag: boolean) => {
|
||||
}
|
||||
}
|
||||
if (chartsList.length > 0) {
|
||||
let yData: any = []
|
||||
echartsData.value.yAxis = []
|
||||
let setList = [...new Set(unitList)];
|
||||
|
||||
setList.forEach((item: any, index: any) => {
|
||||
if (index > 2) {
|
||||
echartsData.value.grid.right = (index - 1) * 80
|
||||
}
|
||||
yData.push([])
|
||||
let right = {
|
||||
position: 'right',
|
||||
offset: (index - 1) * 80
|
||||
@@ -667,13 +671,8 @@ const init = (flag: boolean) => {
|
||||
})
|
||||
})
|
||||
// console.log("🚀 ~ result.forEach ~ result:", result)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
let ABCName = [...new Set(chartsList.map((item: any) => { return item.anotherName == '电压负序分量' ? '电压不平衡' : item.anotherName == '电压正序分量' ? '电压不平衡' : item.anotherName == '电压零序分量' ? '电压不平衡' : item.anotherName }))];
|
||||
// console.log("🚀 ~ result.forEach ~ result:", result)
|
||||
|
||||
|
||||
result.forEach((item: any, index: any) => {
|
||||
let yMethodList: any = []
|
||||
@@ -701,20 +700,12 @@ const init = (flag: boolean) => {
|
||||
|
||||
|
||||
ABCList.forEach((kk: any) => {
|
||||
|
||||
|
||||
|
||||
|
||||
let colorName = kk[0].phase?.charAt(0).toUpperCase()
|
||||
|
||||
|
||||
let lineS = ABCName.findIndex(item => item === (kk[0].anotherName == '电压负序分量' ? '电压不平衡' : kk[0].anotherName == '电压正序分量' ? '电压不平衡' : kk[0].anotherName == '电压零序分量' ? '电压不平衡' : kk[0].anotherName));
|
||||
|
||||
|
||||
let seriesList: any = []
|
||||
kk.forEach((cc: any) => {
|
||||
if (cc.statisticalData !== null) {
|
||||
yMethodList.push(cc.statisticalData?.toFixed(2))
|
||||
yData[setList.indexOf(kk[0].unit)].push(cc.statisticalData?.toFixed(2))
|
||||
}
|
||||
seriesList.push([cc.time, cc.statisticalData?.toFixed(2), cc.unit, lineStyle[lineS].type])
|
||||
})
|
||||
@@ -732,12 +723,22 @@ const init = (flag: boolean) => {
|
||||
})
|
||||
})
|
||||
|
||||
let [min, max] = yMethod(yMethodList)
|
||||
// let [min, max] = yMethod(yMethodList)
|
||||
|
||||
// echartsData.value.yAxis[index].min = min
|
||||
// echartsData.value.yAxis[index].max = max
|
||||
})
|
||||
yData.forEach((item: any, index: any) => {
|
||||
let [min, max] = yMethod(item)
|
||||
echartsData.value.yAxis[index].min = min
|
||||
echartsData.value.yAxis[index].max = max
|
||||
})
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
loading.value = false
|
||||
}
|
||||
})
|
||||
@@ -968,6 +969,7 @@ const selectChange = (e: boolean) => {
|
||||
}
|
||||
|
||||
const handleChange = () => {
|
||||
|
||||
if (activeColName.value == '0') {
|
||||
if (flag.value) {
|
||||
EcharHeight.value = mainHeight(495)
|
||||
@@ -981,6 +983,9 @@ const handleChange = () => {
|
||||
EcharHeight.value = mainHeight(315)
|
||||
}
|
||||
}
|
||||
setTimeout(() => {
|
||||
transientRef.value && transientRef.value.setHeight()
|
||||
}, 100);
|
||||
}
|
||||
|
||||
watch(
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<template>
|
||||
<el-dialog class='cn-operate-dialog' v-model='dialogVisible' :title='title'>
|
||||
<el-dialog width="600px" v-model='dialogVisible' :title='title'>
|
||||
<el-scrollbar>
|
||||
<el-form :inline='false' :model='form' label-width='120px' :rules='rules' ref='formRef'>
|
||||
<el-form :inline='false' :model='form' label-width='auto' class="form-one" :rules='rules' ref='formRef'>
|
||||
<el-form-item label='名称:' class='top' prop='name'>
|
||||
<el-input maxlength="32" show-word-limit v-model='form.name'></el-input>
|
||||
<el-input maxlength="32" show-word-limit v-model='form.name' placeholder='请输入名称'></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label='计算值:' class='top'>
|
||||
<el-input maxlength="32" show-word-limit v-model='form.value'></el-input>
|
||||
<el-input maxlength="32" show-word-limit v-model='form.value' placeholder="请输入计算值"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class='top' label='对应算法:' prop='algoDescribe' v-if='form.openDescribe == 1'>
|
||||
<el-input maxlength="32" show-word-limit v-model='form.algoDescribe' placeholder='请输入数字'></el-input>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<template>
|
||||
<el-dialog class='cn-operate-dialog' v-model='dialogVisible' :title='title'>
|
||||
<el-dialog width='600px' v-model='dialogVisible' :title='title'>
|
||||
<el-scrollbar>
|
||||
<el-form :inline='false' :model='form' label-width='120px' :rules='rules' ref='formRef'>
|
||||
<el-form :inline='false' :model='form' label-width='auto' class="form-one" :rules='rules' ref='formRef'>
|
||||
<el-form-item label='名称' prop='name'>
|
||||
<el-input maxlength="32" show-word-limit v-model='form.name'></el-input>
|
||||
<el-input maxlength="32" show-word-limit v-model='form.name' placeholder="请输入字典名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label='编码' class='top' prop='code'>
|
||||
<el-input maxlength="32" show-word-limit v-model='form.code'></el-input>
|
||||
<el-input maxlength="32" show-word-limit v-model='form.code' placeholder="请输入字典编码"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label='排序' class='top' prop='sort'>
|
||||
@@ -26,7 +26,8 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label='字典描述' class='top'>
|
||||
<el-input maxlength="32" show-word-limit v-model='form.remark' type='textarea' :rows='2'></el-input>
|
||||
<el-input maxlength="300" show-word-limit v-model='form.remark' placeholder='请输入字典描述'
|
||||
type='textarea' :rows='2'></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
|
||||
@@ -15,17 +15,17 @@
|
||||
<el-input ref="usernameRef" v-model="form.username" type="text" clearable placeholder="用户名"
|
||||
autocomplete="off">
|
||||
<template #prefix>
|
||||
<!-- <span class="iconfont icon-yonghu" style="color: var(--el-color-primary)"></span> -->
|
||||
<Icon name="fa fa-user" style="color: var(--el-color-primary); font-size: 16px" />
|
||||
<span class="iconfont icon-yonghu" style="color: var(--el-color-primary)"></span>
|
||||
<!-- <Icon name="fa fa-user" style="color: var(--el-color-primary); font-size: 16px" /> -->
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input ref="passwordRef" v-model="form.password" type="password" placeholder="密码"
|
||||
<el-input ref="passwordRef" v-model="form.password" type="password" clearable placeholder="密码"
|
||||
autocomplete="off">
|
||||
<template #prefix>
|
||||
<Icon name="local-password" style="color: var(--el-color-primary); font-size: 16px" />
|
||||
<!-- <span class="iconfont icon-mima" style="color: var(--el-color-primary)"></span> -->
|
||||
<!-- <Icon name="local-password" style="color: var(--el-color-primary); font-size: 16px" /> -->
|
||||
<span class="iconfont icon-mima" style="color: var(--el-color-primary)"></span>
|
||||
</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
@@ -55,6 +55,7 @@ import { ElMessage } from 'element-plus'
|
||||
import { gongkey, login, getSysConfig } from '@/api/user-boot/user'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import type { FormInstance, InputInstance, FormRules } from 'element-plus'
|
||||
import { UserFilled, Edit, Delete, SetUp } from '@element-plus/icons-vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { ADMIN_INFO } from '@/stores/constant/cacheKey'
|
||||
import { Local } from '@/utils/storage'
|
||||
|
||||
Reference in New Issue
Block a user