测试用例修改

This commit is contained in:
sjl
2025-07-25 14:15:26 +08:00
parent f670802868
commit c47d524f9d
24 changed files with 118 additions and 49 deletions

View File

@@ -154,6 +154,7 @@ import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import charts from './components/charts.vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { el, fa, tr } from 'element-plus/es/locale'
defineOptions({
name: 'harmonic-boot/harmonic/getIntegrityData'
})
@@ -181,6 +182,7 @@ const getTreeData = async () => {
idArr.value.push(element.id)
})
treeData.value = JSON.parse(JSON.stringify(res.data))
})
}
@@ -224,7 +226,6 @@ const tableStore = new TableStore({
treeNode: true,
width: 350,
formatter: function (row) {
console.log('🚀 ~ row:', row)
return row.cellValue ? row.cellValue : '/'
}
},
@@ -322,11 +323,12 @@ const tableStore = new TableStore({
},
loadCallback: () => {
tableStore.table.data = tree2List(tableStore.table.data, Math.random() * 1000)
tableStore.table.column[0].title = formData.value.statisticalType.name
tableStore.table.column[0].type = "html"
chartsRef.value && chartsRef.value.getTableStoreParams(tableStore.table.params)
setTimeout(() => {
activeName.value == 0 && tableRef.value && tableRef.value.getRef().setAllTreeExpand(true)
}, 0)
},
resetCallback:() =>{
@@ -336,6 +338,7 @@ const tableStore = new TableStore({
formData.value.scale = voltageleveloption
formData.value.manufacturer = terminaloption
formData.value.loadType = interfereoption
}
})
@@ -415,8 +418,9 @@ const makeUpSubmit = () => {
reCallEndTime: timeData.value[1],
reCallStartTime: timeData.value[0]
}).then(res => {
ElMessage({
message: res.message,
message: "补招命令下发成功",
type: 'success'
})
dialogVisible.value = false
@@ -426,7 +430,7 @@ watch(
() => treeData.value,
(val, oldVal) => {
if (val && val.length != 0) {
formData.value.deptIndex = val[0].id
formData.value.deptIndex = val[0].id
tableStore.index()
}
},
@@ -437,6 +441,7 @@ watch(
)
</script>
<style lang="scss" scoped>
// .online {
// width: 100%;
// height: 100%;

View File

@@ -104,7 +104,7 @@ const tableStore = new TableStore({
text: title
},
legend: {
data: ['投运', '热备用', '停运'],
data: ['投运', '检修', '停运'],
left: '4%',
textStyle: {
color: '#666666'
@@ -214,7 +214,7 @@ const tableStore = new TableStore({
data: chartsData.value.runFlag
},
{
name: '热备用',
name: '检修',
type: 'bar',
// stack: 'false',
barMaxWidth: 24,

View File

@@ -21,9 +21,9 @@
{{ scope.row.overLineCount == 3.14159 ? '暂无数据' : scope.row.overLineCount }}
</template>
</vxe-column>
<vxe-column field="ratio" title="超标测点占比(%)">
<vxe-column field="lineRatio" title="超标测点占比(%)">
<template #default="scope">
{{ scope.row.ratio == 3.14159 ? '暂无数据' : scope.row.ratio }}
{{ scope.row.lineRatio == 3.14159 ? '暂无数据' : scope.row.lineRatio }}
</template>
</vxe-column>
<vxe-column field="averageOverDay" min-width="120" title="平均超标天数(天/点)">

View File

@@ -404,6 +404,7 @@ const histogram = (res: any) => {
onMounted(() => {
tableStore.index()
console.log(tableStore.da)
})
const layout = mainHeight(133) as any
const layout1 = mainHeight(93) as any

View File

@@ -159,16 +159,21 @@ const init = (row: any) => {
},
xAxis: {
data: xData.map(num => `${num}次`)
},
yAxis: {
name: tabsList.value[activeName.value].unit // 更新Y轴单位
},
series: [
{
name: tabsList.value[activeName.value].groupName,
name: tabsList.value[activeName.value].groupName + '(' + tabsList.value[activeName.value].unit + ')' ,
type: 'bar',
data: xData.map(num => {
return tabsList.value[activeName.value].data[`h${num}`]
})
},
{
name: '国标限值(' + tabsList.value[activeName.value].unit + ')', // 更新series名称中的单位
type: 'bar',
data: xData.map(num => {
return (
crossTheLine.value[
@@ -192,21 +197,20 @@ const echarts = (num: number) => {
text: ''
},
xAxis: {
name: tabsList.value[num].unit,
name: "次数",
data: []
},
yAxis: {},
yAxis: {name: tabsList.value[num].unit},
color: ['#2E8B57', '#DAA520'],
options: {
series: [
{
name: tabsList.value[num].groupName,
type: 'bar',
data: []
},
{
name: '国标限值(%)',
name: '国标限值('+ tabsList.value[num].unit +')',
type: 'bar',
// label: {
// normal: {
@@ -221,8 +225,9 @@ const echarts = (num: number) => {
}
onMounted(() => {
tabsList.value[0].echartsData = echarts(0)
tabsList.value[0].echartsData = echarts(1)
tabsList.value[0].echartsData = echarts(2)
tabsList.value[1].echartsData = echarts(1)
tabsList.value[2].echartsData = echarts(2)
console.log(tabsList.value)
getOverLimitData({ id: monitoringPoint.state.lineId }).then(res => {
crossTheLine.value = res.data
})

View File

@@ -83,7 +83,7 @@ const communicationstatus = [
]
const terminalstatus = [
{ value: 0, label: "投运" },
{ value: 1, label: "热备用" },
{ value: 1, label: "检修" },
{ value: 2, label: "停运" },
]
const tableStore = new TableStore({

View File

@@ -128,7 +128,7 @@ const communicationstatus = [
]
const terminalstatus = [
{ value: 0, label: '投运' },
{ value: 1, label: '热备用' },
{ value: 1, label: '检修' },
{ value: 2, label: '停运' }
]
const tableStore = new TableStore({
@@ -167,7 +167,7 @@ const tableStore = new TableStore({
minWidth: 100,
custom: {
投运: 'success',
热备用: 'warning',
检修: 'warning',
停运: 'danger'
}
},