修改测试bug

This commit is contained in:
GGJ
2024-10-16 20:31:54 +08:00
parent 10b8710832
commit 67383d5888
9 changed files with 1599 additions and 1558 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -73,9 +73,9 @@ export default {
created() {
if (this.flag == 1) {
this.vh = mainHeight(165).height
this.vh = mainHeight(200).height
} else {
this.vh = mainHeight(165, 2).height
this.vh = mainHeight(200, 2).height
}
this.vw = '100%'
},
@@ -156,7 +156,7 @@ export default {
// "变电站名称:" +
// this.boxoList.equipmentName +
' 监测点名称:' +
this.boxoList.equipmentName +
this.boxoList.lineName +
' 发生时刻:' +
this.boxoList.startTime +
' 暂降(骤升)幅值:' +
@@ -166,17 +166,16 @@ export default {
's'
}
else if (this.boxoList.systemType == 'WX') {
console.log("🚀 ~ initWaves ~ this.boxoList:", this.boxoList)
this.titles =
' 监测点名称:' +
this.boxoList.lineId +
' 发生时刻:' +
this.boxoList.startTime +
' 暂降(骤升)幅值:' +
this.boxoList.featureAmplitude==null ? '/' : this.boxoList.featureAmplitude.toFixed(2) +
' 持续时间:' +
this.boxoList.persistTime==null ? '/' : this.boxoList.persistTime +
this.boxoList.lineName +
' 发生时刻:' +
this.boxoList.startTime +
' 暂降(骤升)幅值:' +
(this.boxoList.featureAmplitude ? this.boxoList.featureAmplitude.toFixed(2) : '-') +
'% 持续时间:' +
(this.boxoList.persistTime ? this.boxoList.persistTime.toFixed(2) : '-') +
's'
} else {
this.titles =
@@ -547,6 +546,7 @@ export default {
wave.style.height = _this.vh;
}, 0);
var option = {
animation: false,
tooltip: {
top: '10px',
trigger: 'axis',
@@ -557,6 +557,7 @@ export default {
fontSize: '15px',
padding: 10
},
enterable: true,
formatter: function (params) {
// console.log(params)
var tips = ''
@@ -569,13 +570,7 @@ export default {
}
return tips
},
// axisPointer: {
// type: "cross",
// label: {
// color: "#fff",
// fontSize: 16,
// },
// },
textStyle: {
color: '#fff',
fontStyle: 'normal',
@@ -583,11 +578,12 @@ export default {
fontSize: 14
},
backgroundColor: 'rgba(0,0,0,0.35)',
borderWidth: 0
borderWidth: 0,
},
title: {
left: 'center',
text: '电网侧-电压 ' + title,
text: title,
textStyle: {
fontSize: '0.8rem',
color: _this.DColor ? '#fff' : echartsColor.WordColor
@@ -738,10 +734,15 @@ export default {
type: 'line',
smooth: true,
symbol: 'none',
sampling: 'lttb',
sampling: 'average',
itemStyle: {
color: '#FFCC00'
},
progressive:1000,
// 渲染阈值,大于此值则启动渐进渲染
progressiveThreshold: 2000,
large: true,
data: adata
},
{
@@ -749,10 +750,15 @@ export default {
type: 'line',
smooth: true,
symbol: 'none',
sampling: 'lttb',
sampling: 'average',
itemStyle: {
color: '#009900'
},
progressive:1000,
// 渲染阈值,大于此值则启动渐进渲染
progressiveThreshold: 2000,
large: true,
data: bdata
},
{
@@ -760,10 +766,15 @@ export default {
type: 'line',
smooth: true,
symbol: 'none',
sampling: 'lttb',
sampling: 'average',
itemStyle: {
color: '#CC0000'
},
progressive:1000,
// 渲染阈值,大于此值则启动渐进渲染
progressiveThreshold: 2000,
large: true,
data: cdata
},
{
@@ -774,6 +785,7 @@ export default {
width: 18,
height: 18
},
data: cu
}
]
@@ -906,6 +918,7 @@ export default {
var myChartes = echarts.init(waveIds)
let echartsColor = { WordColor: "#000", thread: "#000000", FigureColor: ["#07CCCA ", "#00BFF5", "#FFBF00", "#77DA63", "#D5FF6B", "#Ff6600", "#FF9100", "#5B6E96", "#66FFCC", "#B3B3B3", "#FF00FF", "#CC00FF", "#FF9999"] }
var option = {
animation: false,
tooltip: {
trigger: 'axis',
borderColor: 'grey',
@@ -921,13 +934,7 @@ export default {
}
return tips
},
// axisPointer: {
// type: "cross",
// label: {
// color: "#fff",
// fontSize: 16,
// },
// },
textStyle: {
color: '#fff',
fontStyle: 'normal',
@@ -1092,10 +1099,14 @@ export default {
type: 'line',
smooth: true,
symbol: 'none',
sampling: 'lttb',
sampling: 'average',
itemStyle: {
color: '#FFCC00'
},
large: true,
progressive:1000,
// 渲染阈值,大于此值则启动渐进渲染
progressiveThreshold: 2000,
data: adata
},
{
@@ -1103,10 +1114,14 @@ export default {
type: 'line',
smooth: true,
symbol: 'none',
sampling: 'lttb',
sampling: 'average',
itemStyle: {
color: '#009900'
},
progressive:1000,
// 渲染阈值,大于此值则启动渐进渲染
progressiveThreshold: 2000,
large: true,
data: bdata
},
{
@@ -1114,10 +1129,14 @@ export default {
type: 'line',
smooth: true,
symbol: 'none',
sampling: 'lttb',
sampling: 'average',
itemStyle: {
color: '#CC0000'
},
progressive:1000,
// 渲染阈值,大于此值则启动渐进渲染
progressiveThreshold: 2000,
large: true,
data: cdata
}
]

View File

@@ -1,5 +1,5 @@
<template>
<el-dialog draggable class="cn-operate-dialog" v-model="dialogVisible" :title="title">
<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-item label="校验密码:" prop="password">

View File

@@ -68,7 +68,7 @@ const view = ref(true)
const view2 = ref(false)
const showBoxi = ref(true)
const bxactiveName = ref('ssbx')
const boxoList = ref({})
const boxoList: any = ref({})
const wp = ref({})
const value = ref(1)
const options = ref([
@@ -108,7 +108,7 @@ const tableStore = new TableStore({
{ title: '事件发生位置', field: 'evtParamPosition', align: 'center' },
{ title: '相别', field: 'evtParamPhase', align: 'center' },
{ title: '持续时间(s)', field: 'evtParamTm', align: 'center' },
{ title: '暂降深度', field: 'evtParamVVaDepth', align: 'center' },
{ title: '暂降深度(%)', field: 'evtParamVVaDepth', align: 'center' },
{ title: '发生时刻', field: 'startTime', align: 'center' },
{
title: '操作',
@@ -128,6 +128,9 @@ const tableStore = new TableStore({
click: async row => {
row.loading = 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
await analyseWave(row.id)
.then(res => {
row.loading = false
@@ -163,7 +166,9 @@ const tableStore = new TableStore({
loadCallback: () => {
tableStore.table.data.forEach((item: any) => {
item.loading = false
item.evtParamTm = item.evtParamTm.split('s')[0]
item.evtParamTm = item.evtParamTm.split('s')[0] != '-' ? (item.evtParamTm.split('s')[0] - 0).toFixed(2) : '-'
item.evtParamVVaDepth = item.evtParamVVaDepth.split('%')[0] != "-" ? (item.evtParamVVaDepth.split('%')[0] - 0).toFixed(2) : '-'
})
}
})
@@ -193,14 +198,14 @@ deviceTreeOptions.value.map((item: any, index: any) => {
})
const sourceChange = (e: any) => {
tableStore.table.params.deviceTypeId = ''
tableStore.table.params.engineeringid = ''
tableStore.table.params.projectId = ''
tableStore.table.params.deviceId = ''
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
tableStore.table.params.deviceTypeName = name
tableStore.table.params.deviceTypeName = name
if (name == '便携式设备') {
tableStore.table.params.deviceTypeId = e[0] || ''
tableStore.table.params.deviceId = e[1] || ''
@@ -267,7 +272,7 @@ const backbxlb = () => {
onMounted(() => {
tableStore.index()
})
const bxecharts = mainHeight(155).height as any
const bxecharts = mainHeight(175).height as any
setTimeout(() => {
tableStore.table.height = mainHeight(200).height as any
}, 0)

View File

@@ -14,12 +14,12 @@
</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;padding-bottom:200px;'">
:style="'height:' + bxecharts + ';overflow-y: scroll;'">
<shushiboxi v-if="isWp && wp && activeName == 'ssbx'" :value="value" :boxoList="boxoList" :wp="wp">
</shushiboxi>
</el-tab-pane>
<el-tab-pane label="RMS波形" name="rmsbx"
:style="'height:' + bxecharts + ';overflow-y: scroll;padding-bottom:200px;'">
:style="'height:' + bxecharts + ';overflow-y: scroll;'">
<rmsboxi v-if="isWp && wp && activeName == 'rmsbx'" :value="value" :boxoList="boxoList" :wp="wp">
</rmsboxi>
</el-tab-pane>
@@ -104,7 +104,7 @@ const changeView = () => {
showBoxi.value = true
}, 0)
}
const bxecharts = mainHeight(195).height as any
const bxecharts = mainHeight(345).height as any
const handleClick = (tab: any, event: any) => {
// activeName.value = tab.index

View File

@@ -8,7 +8,7 @@
@handleHideCharts="isWaveCharts = false"
:wp="wp"
/>
<el-button v-if="isWaveCharts" type="primary" @click="handleBack" :icon="ArrowLeft">返回</el-button>
<!-- <el-button v-if="isWaveCharts" type="primary" @click="handleBack" :icon="ArrowLeft">返回</el-button> -->
</div>
</template>
<script lang="ts" setup>
@@ -33,7 +33,7 @@ const waveFormAnalysisRef = ref()
const headerRef = ref()
const tableStore: any = new TableStore({
url: '/cs-device-boot/csGroup/deviceDataByType',
publicHeight: 210,
publicHeight: 215,
method: 'POST',
column: [
// { width: '60', type: 'checkbox', fixed: 'left' },
@@ -54,7 +54,7 @@ const tableStore: any = new TableStore({
title: '持续时间(s)',
minWidth: 100,
formatter: (row: any) => {
row.cellValue = row.cellValue ? row.cellValue : '/'
row.cellValue = row.cellValue ? row.cellValue.toFixed(2) : '/'
return row.cellValue
}
},
@@ -91,7 +91,7 @@ const tableStore: any = new TableStore({
row.loading = false
if (res != undefined) {
boxoList.value = row
// boxoList.value.systemType = 'WX'
boxoList.value.systemType = 'WX'
wp.value = res.data
view.value = false
view2.value = true

View File

@@ -108,14 +108,14 @@
<TableHeader :showSearch="false" ref="tableHeaderRef" :key="searchFormIndex"
@selectChange="selectChange">
<template v-slot:select>
<el-form-item for="-" label="统计指标" label-width="80px">
<el-form-item for="-" label="统计指标">
<el-select collapse-tags collapse-tags-tooltip v-model="searchForm.index"
placeholder="请选择统计指标" multiple :multiple-limit="3">
<el-option v-for="item in indexOptions" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item for="-" label="值类型" label-width="80px">
<el-form-item for="-" label="值类型">
<el-select style="width: 160px !important" v-model="searchForm.dataLevel">
<el-option value="Primary" label="一次值"></el-option>
<el-option value="Secondary" label="二次值"></el-option>
@@ -256,7 +256,7 @@ const nodeClick = async (e: anyObj) => {
//查询测试项信息
await getTestRecordInfo(id)
.then(res => {
.then(async (res) => {
deviceData.value = res.data
if (res.data.records.length == 1) {
activeName.value = res.data.records[0].id
@@ -269,8 +269,13 @@ const nodeClick = async (e: anyObj) => {
}
})
}
searchForm.value.index = [indexOptions.value[0].id]
schemeTreeRef.value.getPlanData(deviceData.value)
init(true)
await setTimeout(() => {
init(true)
}, 500);
loading.value = false
})
.catch(e => {
@@ -429,7 +434,7 @@ const init = (flag: boolean) => {
const xname = params[0].value[0];
let str = `${xname}<br>`;
params.forEach((el, index) => {
str += `${el.marker}${el.seriesName.split('(')[0]}${el.value[1]}${el.value[2]}<br>`;
str += `${el.marker}${el.seriesName.split('(')[0]}${el.value[1] ? (el.value[1] + ' ' + el.value[2]) : '-'}<br>`;
});
return str;
},
@@ -494,7 +499,7 @@ const init = (flag: boolean) => {
}
seriesList.push([cc.time, cc.statisticalData?.toFixed(2),cc.unit])
seriesList.push([cc.time, cc.statisticalData?.toFixed(2), cc.unit])
})

View File

@@ -3,45 +3,22 @@
<TableHeader>
<template #select>
<el-form-item label="数据分类">
<el-select
v-model="tableStore.table.params.dataType"
multiple
filterable
collapse-tags
clearable
placeholder="请选择数据分类"
>
<el-option
v-for="item in DataTypeSelect"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-select v-model="tableStore.table.params.dataType" multiple filterable collapse-tags clearable
placeholder="请选择数据分类">
<el-option v-for="item in DataTypeSelect" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="数据存储">
<el-select
v-model="tableStore.table.params.classId"
multiple
filterable
collapse-tags
clearable
placeholder="请选择数据存储"
>
<el-option
v-for="item in DataSelect"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
<el-select v-model="tableStore.table.params.classId" multiple filterable collapse-tags clearable
placeholder="请选择数据存储">
<el-option v-for="item in DataSelect" :key="item.id" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="过滤筛选">
<el-input
v-model="tableStore.table.params.searchValue"
placeholder="数据名称、别名、名称"
clearable
></el-input>
<el-input v-model="tableStore.table.params.searchValue" placeholder="数据名称、别名、名称"
clearable></el-input>
</el-form-item>
</template>
<template #operation>
@@ -75,18 +52,18 @@ const tableStore = new TableStore({
url: '/system-boot/csDictData/list',
method: 'POST',
column: [
{ title: '序号', type: 'seq',width:60 },
{ title: '数据分类', field: 'dataTypeName' , width: 170 },
{ title: '数据名称', field: 'name' , width: 220 },
{ title: '别名', field: 'otherName' , width: 220 },
{ title: '展示名称', field: 'showName' , width: 170 },
{ title: '相别', field: 'phaseName', width: 80 },
{ title: '单位', field: 'unit', width: 80 },
{ title: '基础数据类型', field: 'type', width: 170 },
{ title: '数据谐波次数', field: 'harmStartEnd', width: 170 },
{ title: '数据统计方法', field: 'statMethod', width: 170 },
{ title: '数据存储', field: 'classIdName' , width: 120 },
{ title: '数据来源', field: 'resourcesIdName' , width: 120 },
{ title: '序号', type: 'seq', width: 60 },
{ title: '数据分类', field: 'dataTypeName', minWidth: 170 },
{ title: '数据名称', field: 'name', minWidth: 220 },
{ title: '别名', field: 'otherName', minWidth: 220 },
{ title: '展示名称', field: 'showName', minWidth: 170 },
{ title: '相别', field: 'phaseName', minWidth: 80 },
{ title: '单位', field: 'unit', minWidth: 80 },
{ title: '基础数据类型', field: 'type', minWidth: 170 },
{ title: '数据谐波次数', field: 'harmStartEnd', minWidth: 170 },
{ title: '数据统计方法', field: 'statMethod', minWidth: 170 },
{ title: '数据存储', field: 'classIdName', minWidth: 120 },
{ title: '数据来源', field: 'resourcesIdName', minWidth: 120 },
{
title: '操作',
align: 'center',
@@ -142,8 +119,8 @@ const tableStore = new TableStore({
})
tableStore.table.params.searchValue = ''
tableStore.table.params.dataType = ''
tableStore.table.params.classId = ''
tableStore.table.params.dataType = []
tableStore.table.params.classId = []
provide('tableStore', tableStore)
onMounted(() => {
tableStore.index()

View File

@@ -127,7 +127,7 @@ const tableStore = new TableStore({
],
loadCallback: () => {
tableStore.table.data.forEach((item: any) => {
item.statusName = item.status === 1 ? '用' : '用'
item.statusName = item.status === 1 ? '用' : '用'
for (let key in item) {
if (typeof item[key] !== 'number') {
item[key] = item[key] || '/'