修改江西测试问题

This commit is contained in:
guanj
2025-07-28 08:53:15 +08:00
parent b874da9f96
commit e90cecfb5b
14 changed files with 271 additions and 96 deletions

View File

@@ -2,14 +2,38 @@
<div>
<splitpanes :style="{ height: height }" class="default-theme" id="navigation-splitpanes">
<pane :size="size">
<bearingTree ref="TreeRef" :default-expand-all="false"
<bearingTree
ref="TreeRef"
:default-expand-all="false"
:default-expanded-keys="monitoringPoint.state.lineId ? [monitoringPoint.state.lineId] : []"
:current-node-key="monitoringPoint.state.lineId" @node-click="handleNodeClick"
@init="handleNodeClick"></bearingTree>
:current-node-key="monitoringPoint.state.lineId"
@node-click="handleNodeClick"
@init="handleNodeClick"
></bearingTree>
</pane>
<pane style="background: #fff">
<el-form :inline="true" v-show="props.rowList.id == undefined">
<el-form-item label="日期">
<TableHeader :showSearch="false">
<template #select>
<el-form-item label="时间">
<DatePicker ref="datePickerRef"></DatePicker>
</el-form-item>
</template>
<template #operation>
<el-button type="primary" icon="el-icon-Search" @click="onSubmit">查询</el-button>
<el-button type="primary" icon="el-icon-Download" @click="exportTemplate">导出模板</el-button>
<el-upload
action=""
accept=".xlsx"
:show-file-list="false"
:auto-upload="false"
:on-change="choose"
>
<el-button type="primary" class="ml10" icon="el-icon-Upload">离线导入</el-button>
</el-upload>
</template>
</TableHeader>
<!-- <el-form :inline="true" v-show="props.rowList.id == undefined">
<el-form-item label="时间">
<DatePicker ref="datePickerRef"></DatePicker>
</el-form-item>
<el-form-item>
@@ -19,18 +43,23 @@
:on-change="choose">
<el-button type="primary" class="ml10" icon="el-icon-Upload">离线导入</el-button>
</el-upload>
<!-- <el-button type="primary" class="ml10" icon="el-icon-Ticket" @click="modelTrain">
模型训练
</el-button> -->
</el-form-item>
</el-form>
</el-form> -->
<div v-loading="loading">
<el-descriptions class="mb10" title="基础数据" :column="2" size="" border>
<el-descriptions-item label="待评估用户" label-align="center" width="25%">
<el-select v-model="user" placeholder="请选择待评估用户" size="small" filterable
:disabled="props.rowList.id != undefined" style="width: 240px" value-key="userId"
@change="userChange">
<el-select
v-model="user"
placeholder="请选择待评估用户"
size="small"
filterable
:disabled="props.rowList.id != undefined"
style="width: 240px"
value-key="userId"
@change="userChange"
>
<el-option v-for="item in userList" :key="item" :label="item.userName" :value="item" />
</el-select>
</el-descriptions-item>
@@ -51,13 +80,19 @@
<el-tab-pane label="无功功率" name="2" class="mt10">
<MyEChart :options="options2" />
</el-tab-pane>
<el-tab-pane label="谐波电流幅值" name="3" class="mt10" style="position: relative;">
<el-select v-model="harmonicValue"
style="position: absolute;z-index:99;top:-10px; right: 185px; width: 80px"
placeholder="请选择谐波" @change="onSubmit">
<el-option v-for="item in harmonic" :key="item.value" :label="item.label"
:value="item.value"></el-option>
<el-tab-pane label="谐波电流幅值" name="3" class="mt10" style="position: relative">
<el-select
v-model="harmonicValue"
style="position: absolute; z-index: 99; top: -10px; right: 185px; width: 80px"
placeholder="请选择谐波"
@change="onSubmit"
>
<el-option
v-for="item in harmonic"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
<MyEChart :options="options3" />
@@ -68,7 +103,7 @@
<vxe-colgroup field="group0" title="模型参数">
<vxe-column field="name" width="180" title="相别"></vxe-column>
</vxe-colgroup>
<vxe-column field="a" title="a"></vxe-column>
<vxe-column field="b" title="b"></vxe-column>
<vxe-column field="c" title="c"></vxe-column>
@@ -77,10 +112,19 @@
</el-tabs>
<div class="bottomBox">
<el-row v-if="showAssess">
<el-col :span="16" :style="`height: calc(${tabsHeight} / 2 - ${props.rowList.id == undefined ? 12 + 45 : 12
}px)`">
<vxe-table style="flex: 1.5" v-bind="defaultAttribute" height="auto" ref="xTable"
:data="tableData">
<el-col
:span="16"
:style="`height: calc(${tabsHeight} / 2 - ${
props.rowList.id == undefined ? 12 + 45 : 12
}px)`"
>
<vxe-table
style="flex: 1.5"
v-bind="defaultAttribute"
height="auto"
ref="xTable"
:data="tableData"
>
<vxe-colgroup field="group0" title="等级">
<vxe-column field="name" width="180" title="结果"></vxe-column>
</vxe-colgroup>
@@ -110,14 +154,22 @@
</vxe-column>
</vxe-table>
</el-col>
<el-col :span="8" :style="`height: calc(${tabsHeight} / 2 - ${props.rowList.id == undefined ? 62 + 45 : 62
}px)`">
<el-col
:span="8"
:style="`height: calc(${tabsHeight} / 2 - ${
props.rowList.id == undefined ? 62 + 45 : 62
}px)`"
>
<MyEChart style="flex: 1" :options="pieCharts" />
</el-col>
</el-row>
<el-button type="primary" icon="el-icon-Document" @click="assess"
v-show="showBtn && props.rowList.id == undefined">
<el-button
type="primary"
icon="el-icon-Document"
@click="assess"
v-show="showBtn && props.rowList.id == undefined"
>
承载能力评估
</el-button>
</div>
@@ -134,6 +186,7 @@ import { Splitpanes, Pane } from 'splitpanes'
import bearingTree from '@/components/tree/pqs/bearingTree.vue'
import DatePicker from '@/components/form/datePicker/index.vue'
import { mainHeight } from '@/utils/layout'
import TableHeader from '@/components/table/header/index.vue'
import MyEChart from '@/components/echarts/MyEchart.vue'
import { useMonitoringPoint } from '@/stores/monitoringPoint'
import { defaultAttribute } from '@/components/table/defaultAttribute'
@@ -222,7 +275,6 @@ onMounted(() => {
const dom = document.getElementById('navigation-splitpanes')
if (dom) {
size.value = Math.round((180 / (dom.offsetHeight + 60)) * 100)
}
datePickerRef.value.setTimeOptions([{ label: '周', value: 4 }])
@@ -307,7 +359,7 @@ const modelTrain = () => {
startTime: datePickerRef.value.timeValue[0],
time: 0,
userId: dictData.state.area[0].id
}).then(res => { })
}).then(res => {})
}
const setEChart = (val: any, data: any, text: string, name: string) => {
@@ -316,7 +368,7 @@ const setEChart = (val: any, data: any, text: string, name: string) => {
let options = {
title: {
text: text,
x: 'center',
x: 'center'
// textStyle: {
// fontWeight: 'normal'
// }
@@ -337,10 +389,21 @@ const setEChart = (val: any, data: any, text: string, name: string) => {
},
backgroundColor: 'rgba(0,0,0,0.55)',
borderWidth: 0,
formatter(params: any) {
console.log(123, params)
const xname = params[0].value[0]
let str = `${xname}<br>`
params.forEach((el: any, index: any) => {
str += `${el.marker}${el.seriesName.split('(')[0]}${
el.value[1] ? el.value[1] + ' ' + (el.value[2] || '') : '-'
}<br>`
})
return str
}
},
xAxis: {
// data: data.filter(item => item.phaseType == 'A').map(item => item.time),
name: '时间',
type: 'time',
@@ -376,10 +439,9 @@ const setEChart = (val: any, data: any, text: string, name: string) => {
type: 'line',
// smooth: true,
symbol: 'none',
data:
data
.filter(item => item.phaseType == 'A')
.map(item => (item.value == 3.1415926 ? '' : [item.time, item.value.toFixed(2)]))
data: data
.filter(item => item.phaseType == 'A')
.map(item => (item.value == 3.1415926 ? '' : [item.time, item.value.toFixed(2)]))
},
{
name: 'B相',
@@ -401,28 +463,30 @@ const setEChart = (val: any, data: any, text: string, name: string) => {
}
],
options: {
dataZoom: [{
type: 'inside',
height: 13,
start: 0,
bottom: '20px',
end: 10
},
{
start: 0,
height: 13,
bottom: '20px',
end: 10
}]
dataZoom: [
{
type: 'inside',
height: 13,
start: 0,
bottom: '20px',
end: 10
},
{
start: 0,
height: 13,
bottom: '20px',
end: 10
}
]
}
}
val == 1
? (options1.value = options)
: val == 2
? (options2.value = options)
: val == 3
? (options3.value = options)
: ''
? (options2.value = options)
: val == 3
? (options3.value = options)
: ''
}
// 承载能力评估