修改测试问题
This commit is contained in:
@@ -455,7 +455,8 @@ const handleTolerableEventClick = async (row: any) => {
|
||||
persistTime: row.value[0], //持续时间
|
||||
featureAmplitude: (row.value[1] / 100), //残余电压
|
||||
startTime: row.value[2], //时间
|
||||
lineName: row.value[4] //监测点名称
|
||||
lineName: row.value[4], //监测点名称
|
||||
engineeringName: row.value[5],
|
||||
}
|
||||
boxoList.value.systemType = 'YPT'
|
||||
wp.value = res.data
|
||||
|
||||
@@ -387,7 +387,8 @@ const handleTolerableEventClick = async (row: any) => {
|
||||
persistTime: row.value[0], //持续时间
|
||||
featureAmplitude: (row.value[1] / 100), //残余电压
|
||||
startTime: row.value[2], //时间
|
||||
lineName: row.value[4] //监测点名称
|
||||
lineName: row.value[4], //监测点名称
|
||||
engineeringName: row.value[5],
|
||||
}
|
||||
boxoList.value.systemType = 'YPT'
|
||||
wp.value = res.data
|
||||
|
||||
@@ -82,15 +82,50 @@ const tableStore: any = new TableStore({
|
||||
title: '指标名称',
|
||||
field: 'name',
|
||||
minWidth: 120
|
||||
}, {
|
||||
title: '越限时间',
|
||||
field: 'time',
|
||||
minWidth: 100,
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue || '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '越限最高监测点',
|
||||
title: '越限最高监测点名称',
|
||||
field: 'lineName',
|
||||
minWidth: 120,
|
||||
minWidth: 140,
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue || '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '越限程度(%)',
|
||||
field: 'extent',
|
||||
minWidth: 100,
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue ? Math.floor(row.cellValue * 100) / 100 : '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '越限最大值',
|
||||
field: 'maxValue',
|
||||
minWidth: 100,
|
||||
render: 'customTemplate',
|
||||
customTemplate: (row: any) => {
|
||||
const extentValue =
|
||||
row.maxValue !== null && row.maxValue !== undefined && row.maxValue !== ''
|
||||
? Math.floor(row.maxValue * 100) / 100
|
||||
: '/'
|
||||
return extentValue == '/' ? '/' : `<span style='cursor: pointer;text-decoration: underline;'>${extentValue}</span>`
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '国标限值',
|
||||
field: 'internationalValue',
|
||||
minWidth: 100, formatter: (row: any) => {
|
||||
return row.cellValue || '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '设备名称', field: 'devName', minWidth: 130, align: 'center', formatter: (row: any) => {
|
||||
return row.cellValue || '/'
|
||||
@@ -106,42 +141,9 @@ const tableStore: any = new TableStore({
|
||||
return row.cellValue || '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '越限最大值',
|
||||
field: 'maxValue',
|
||||
minWidth: 100,
|
||||
render: 'customTemplate',
|
||||
customTemplate: (row: any) => {
|
||||
const extentValue =
|
||||
row.maxValue !== null && row.maxValue !== undefined && row.maxValue !== ''
|
||||
? Math.floor(row.maxValue * 100) / 100
|
||||
: '/'
|
||||
return extentValue=='/' ? '/' : `<span style='cursor: pointer;text-decoration: underline;'>${extentValue}</span>`
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '国标限值',
|
||||
field: 'internationalValue',
|
||||
minWidth: 100, formatter: (row: any) => {
|
||||
return row.cellValue || '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '越限程度(%)',
|
||||
field: 'extent',
|
||||
minWidth: 100,
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue? Math.floor(row.cellValue * 100) / 100 : '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '越限时间',
|
||||
field: 'time',
|
||||
minWidth: 100,
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue || '/'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
|
||||
@@ -46,6 +46,7 @@ import { ref, onMounted, onUnmounted, provide, reactive, watch, h, computed, nex
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import { exportExcel } from '@/views/govern/reportForms/export.js'
|
||||
import { destroyLuckysheet, renderLuckysheetReport } from '@/utils/luckysheetHelper'
|
||||
import { buildExportBaseName } from '@/utils/echartMethod'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { querySysExcel } from '@/api/harmonic-boot/luckyexcel'
|
||||
import { getListByIds } from '@/api/harmonic-boot/cockpit/cockpit'
|
||||
@@ -72,6 +73,8 @@ const templateList = ref([])
|
||||
const idList = ref()
|
||||
|
||||
|
||||
const exportSubjectName = ref('')
|
||||
|
||||
const handleNodeClick = async (data: any) => {
|
||||
if (templateList.value.length == 0) {
|
||||
await querySysExcel({}).then(res => {
|
||||
@@ -83,6 +86,8 @@ const handleNodeClick = async (data: any) => {
|
||||
}
|
||||
|
||||
if (data?.level == 3 || data?.level == 2) {
|
||||
exportSubjectName.value = data.name || ''
|
||||
tableStore.exportName = { subject: exportSubjectName.value, feature: '治理效果报表' }
|
||||
tableStore.table.params.sensitiveUserId = data.id
|
||||
await tableStore.index()
|
||||
} else {
|
||||
@@ -104,7 +109,14 @@ const templateListData = () => {
|
||||
}
|
||||
// 下载表格
|
||||
const downloadExcel = () => {
|
||||
exportExcel(luckysheet.getAllSheets(), '治理效果报表')
|
||||
exportExcel(
|
||||
luckysheet.getAllSheets(),
|
||||
buildExportBaseName({
|
||||
subject: exportSubjectName.value,
|
||||
feature: '治理效果报表',
|
||||
date: tableStore.table.params.searchEndTime || tableStore.table.params.searchBeginTime
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
@@ -343,6 +343,11 @@ const setEchart = () => {
|
||||
}
|
||||
|
||||
echartsData.value = {
|
||||
exportFileName: {
|
||||
subject: trendRequestData.value?.lineName,
|
||||
feature: '趋势图',
|
||||
date: datePickerRef.value?.timeValue?.[1] || datePickerRef.value?.timeValue?.[0]
|
||||
},
|
||||
legend: {
|
||||
itemWidth: 20,
|
||||
itemHeight: 20,
|
||||
@@ -411,10 +416,7 @@ const setEchart = () => {
|
||||
title: '下载csv',
|
||||
icon: 'path://M642 673.1H301.6c-9.9 0-17.9-8-17.9-17.9s8-17.9 17.9-17.9H642c9.9 0 17.9 8 17.9 17.9s-8 17.9-17.9 17.9zM642 511.8H301.6c-9.9 0-17.9-8-17.9-17.9 0-9.9 8-17.9 17.9-17.9H642c9.9 0 17.9 8 17.9 17.9 0 9.9-8 17.9-17.9 17.9zM480.7 350.6H301.6c-9.9 0-17.9-8-17.9-17.9s8-17.9 17.9-17.9h179.2c9.9 0 17.9 8 17.9 17.9s-8.1 17.9-18 17.9zM874.9 350.6H695.7c-49.4 0-89.6-40.2-89.6-89.6V81.9c0-9.9 8-17.9 17.9-17.9 9.9 0 17.9 8 17.9 17.9V261c0 29.6 24.1 53.7 53.7 53.7h179.2c9.9 0 17.9 8 17.9 17.9s-7.9 18-17.8 18zM794.3 959.7H221c-49.4 0-89.6-40.2-89.6-89.6V153.5c0-49.4 40.2-89.6 89.6-89.6h403.1c4.8 0 9.3 1.9 12.7 5.2L887.6 320c3.4 3.4 5.2 7.9 5.2 12.7v537.5c0 52.7-51.9 89.5-98.5 89.5zM221 99.8c-29.6 0-53.7 24.1-53.7 53.7v716.6c0 29.6 24.1 53.7 53.7 53.7h573.3c29 0 62.7-23.5 62.7-53.7v-530L616.7 99.8H221z',
|
||||
onclick: () => {
|
||||
exportSeriesCSV(
|
||||
echartsData.value.options.series,
|
||||
`${dialogTitle.value || '监测点指标趋势'}.csv`
|
||||
)
|
||||
exportSeriesCSV(echartsData.value.options.series, echartsData.value.exportFileName)
|
||||
}
|
||||
},
|
||||
myTool2: {
|
||||
|
||||
@@ -342,6 +342,11 @@ const setEchart = () => {
|
||||
}
|
||||
|
||||
echartsData.value = {
|
||||
exportFileName: {
|
||||
subject: trendRequestData.value?.lineName,
|
||||
feature: '趋势图',
|
||||
date: datePickerRef.value?.timeValue?.[1] || datePickerRef.value?.timeValue?.[0]
|
||||
},
|
||||
legend: {
|
||||
itemWidth: 20,
|
||||
itemHeight: 20,
|
||||
@@ -410,10 +415,7 @@ const setEchart = () => {
|
||||
title: '下载csv',
|
||||
icon: 'path://M642 673.1H301.6c-9.9 0-17.9-8-17.9-17.9s8-17.9 17.9-17.9H642c9.9 0 17.9 8 17.9 17.9s-8 17.9-17.9 17.9zM642 511.8H301.6c-9.9 0-17.9-8-17.9-17.9 0-9.9 8-17.9 17.9-17.9H642c9.9 0 17.9 8 17.9 17.9 0 9.9-8 17.9-17.9 17.9zM480.7 350.6H301.6c-9.9 0-17.9-8-17.9-17.9s8-17.9 17.9-17.9h179.2c9.9 0 17.9 8 17.9 17.9s-8.1 17.9-18 17.9zM874.9 350.6H695.7c-49.4 0-89.6-40.2-89.6-89.6V81.9c0-9.9 8-17.9 17.9-17.9 9.9 0 17.9 8 17.9 17.9V261c0 29.6 24.1 53.7 53.7 53.7h179.2c9.9 0 17.9 8 17.9 17.9s-7.9 18-17.8 18zM794.3 959.7H221c-49.4 0-89.6-40.2-89.6-89.6V153.5c0-49.4 40.2-89.6 89.6-89.6h403.1c4.8 0 9.3 1.9 12.7 5.2L887.6 320c3.4 3.4 5.2 7.9 5.2 12.7v537.5c0 52.7-51.9 89.5-98.5 89.5zM221 99.8c-29.6 0-53.7 24.1-53.7 53.7v716.6c0 29.6 24.1 53.7 53.7 53.7h573.3c29 0 62.7-23.5 62.7-53.7v-530L616.7 99.8H221z',
|
||||
onclick: () => {
|
||||
exportSeriesCSV(
|
||||
echartsData.value.options.series,
|
||||
`${dialogTitle.value || '历史趋势'}.csv`
|
||||
)
|
||||
exportSeriesCSV(echartsData.value.options.series, echartsData.value.exportFileName)
|
||||
}
|
||||
},
|
||||
myTool2: {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<!--主要监测点列表 -->
|
||||
<TableHeader :showReset="false" :timeKeyList="prop.timeKey" @selectChange="selectChange" v-if="fullscreen"
|
||||
ref="TableHeaderRef">
|
||||
<TableHeader :showReset="false" showExport :timeKeyList="prop.timeKey" @selectChange="selectChange"
|
||||
v-if="fullscreen" ref="TableHeaderRef">
|
||||
<template v-slot:select>
|
||||
<el-form-item label="关键字筛选">
|
||||
<el-input maxlength="32" show-word-limit v-model="tableStore.table.params.keywords" clearable
|
||||
@@ -17,7 +17,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, reactive, watch, nextTick } from 'vue'
|
||||
import { ref, onMounted, provide, watch, computed } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
|
||||
@@ -75,8 +75,6 @@ import { getTime } from '@/utils/formatTime'
|
||||
import { exportSeriesCSV } from '@/utils/echartMethod'
|
||||
import PointTree from '@/components/tree/govern/pointTree.vue'
|
||||
|
||||
const CSV_DOWNLOAD_ICON =
|
||||
'path://M896 346.8c-0.1 0 0 0 0 0 0-0.9-0.1-1.7-0.2-2.5 0-0.1 0-0.3-0.1-0.4-0.2-1.7-0.5-3.3-1-4.9-0.5-1.7-1-3.3-1.7-4.9v-0.1c-0.3-0.8-0.7-1.5-1.1-2.3v-0.1c-0.4-0.7-0.8-1.5-1.2-2.2-0.1-0.1-0.1-0.2-0.2-0.3-0.4-0.6-0.8-1.2-1.3-1.9-0.1-0.1-0.1-0.2-0.2-0.2-0.5-0.6-1-1.3-1.5-1.9-0.1-0.1-0.2-0.3-0.4-0.4-0.5-0.6-1-1.2-1.6-1.7l-0.1-0.1L637.3 74.5c-0.6-0.6-1.2-1.1-1.8-1.6-0.1-0.1-0.3-0.2-0.4-0.4-0.6-0.5-1.2-1-1.9-1.5-0.1 0-0.1-0.1-0.2-0.1-0.6-0.5-1.3-0.9-1.9-1.3-0.1-0.1-0.2-0.1-0.3-0.2-0.7-0.4-1.4-0.9-2.2-1.3-0.8-0.4-1.5-0.8-2.3-1.1h-0.1c-1.6-0.7-3.2-1.3-4.9-1.7-1.6-0.4-3.2-0.8-4.9-1-0.1 0-0.3 0-0.4-0.1-1.4-0.2-2.8-0.3-4.3-0.3H164c-19.9 0-36 16.1-36 36v823.3c0 19.9 16.1 36 36 36h696c19.9 0 36-16.1 36-36V348.6v-1.8zM647.8 186.9l125.4 125.6H647.8V186.9zM200 887.2V135.9h375.8v212.7c0 19.9 16.1 36 36 36H824v502.7H200zM363.5 661.5c-7.2 6.3-15.8 9.5-25.8 9.5-13.5 0-24.5-5-33-15S292 629.3 292 605.7c0-22.2 4.3-38.2 12.9-48.1 8.6-9.9 19.8-14.9 33.6-14.9 10 0 18.5 2.8 25.5 8.4s11.6 13.2 13.8 22.9l37.2-8.9c-4.2-14.9-10.6-26.3-19-34.3-14.2-13.5-32.7-20.2-55.5-20.2-26.1 0-47.1 8.6-63.1 25.7s-24 41.2-24 72.2c0 29.3 8 52.4 23.9 69.3 15.9 16.9 36.2 25.3 60.9 25.3 20 0 36.5-4.9 49.4-14.8 13-9.9 22.3-24.9 27.9-45.3L379 631.6c-3.1 13.6-8.3 23.6-15.5 29.9zM561.5 597.2c-8.8-4.6-22.3-9.1-40.6-13.4s-29.8-8.5-34.5-12.4c-3.7-3.1-5.6-6.9-5.6-11.3 0-4.8 2-8.7 6-11.6 6.2-4.5 14.7-6.7 25.6-6.7 10.6 0 18.5 2.1 23.8 6.3 5.3 4.2 8.7 11.1 10.3 20.6l37.6-1.7c-0.6-17.1-6.8-30.8-18.6-41s-29.4-15.4-52.7-15.4c-14.3 0-26.5 2.2-36.6 6.5-10.1 4.3-17.9 10.6-23.2 18.9-5.4 8.3-8.1 17.1-8.1 26.6 0 14.7 5.7 27.2 17.1 37.5 8.1 7.3 22.3 13.4 42.4 18.4 15.7 3.9 25.7 6.6 30.1 8.1 6.4 2.3 10.9 5 13.5 8.1 2.6 3.1 3.9 6.8 3.9 11.2 0 6.9-3.1 12.8-9.2 18-6.1 5.1-15.3 7.7-27.4 7.7-11.4 0-20.5-2.9-27.2-8.6-6.7-5.8-11.2-14.8-13.4-27l-36.6 3.6c2.5 20.8 10 36.7 22.6 47.5 12.6 10.9 30.7 16.3 54.2 16.3 16.2 0 29.7-2.3 40.5-6.8s19.2-11.4 25.1-20.8c5.9-9.3 8.9-19.3 8.9-30 0-11.8-2.5-21.6-7.4-29.6s-11.7-14.3-20.5-19zM689.9 651.6l-47.1-137.7h-40.7L668.6 700h40.1l66.7-186.1h-39.9z'
|
||||
|
||||
const prop = defineProps({
|
||||
w: { type: [String, Number] },
|
||||
@@ -138,11 +136,14 @@ const indicatorList = ref()
|
||||
// initCode()
|
||||
// })
|
||||
// }
|
||||
const exportSubjectName = ref('')
|
||||
const nodeClick = (e: any) => {
|
||||
if (e == undefined) {
|
||||
}
|
||||
if (e.level == 3) {
|
||||
exportSubjectName.value = e.name || ''
|
||||
tableStore.table.params.lineId = e.id
|
||||
tableStore.exportName = { subject: exportSubjectName.value, feature: '主要监测点列表' }
|
||||
initCode()
|
||||
}
|
||||
}
|
||||
@@ -182,6 +183,12 @@ const getSeriesForCsvExport = () => {
|
||||
}))
|
||||
}
|
||||
|
||||
const getChartExportFileName = () => ({
|
||||
subject: exportSubjectName.value,
|
||||
feature: '负荷曲线拟合图',
|
||||
date: tableStore.table.params.searchEndTime || tableStore.table.params.searchBeginTime
|
||||
})
|
||||
|
||||
const setEchart = () => {
|
||||
// 获取当前选择的功率和指标名称
|
||||
const powerName = powerList.value?.find((item: any) => item.id === tableStore.table.params.power)?.name || '功率'
|
||||
@@ -191,6 +198,7 @@ const setEchart = () => {
|
||||
const chartTitle = `${indicatorName}与${powerName}负荷曲线拟合图`
|
||||
|
||||
echartList.value = {
|
||||
exportFileName: getChartExportFileName(),
|
||||
title: {
|
||||
text: chartTitle
|
||||
},
|
||||
@@ -199,12 +207,9 @@ const setEchart = () => {
|
||||
myTool1: {
|
||||
show: true,
|
||||
title: '下载csv',
|
||||
icon: CSV_DOWNLOAD_ICON,
|
||||
icon: 'path://M642 673.1H301.6c-9.9 0-17.9-8-17.9-17.9s8-17.9 17.9-17.9H642c9.9 0 17.9 8 17.9 17.9s-8 17.9-17.9 17.9zM642 511.8H301.6c-9.9 0-17.9-8-17.9-17.9 0-9.9 8-17.9 17.9-17.9H642c9.9 0 17.9 8 17.9 17.9 0 9.9-8 17.9-17.9 17.9zM480.7 350.6H301.6c-9.9 0-17.9-8-17.9-17.9s8-17.9 17.9-17.9h179.2c9.9 0 17.9 8 17.9 17.9s-8.1 17.9-18 17.9zM874.9 350.6H695.7c-49.4 0-89.6-40.2-89.6-89.6V81.9c0-9.9 8-17.9 17.9-17.9 9.9 0 17.9 8 17.9 17.9V261c0 29.6 24.1 53.7 53.7 53.7h179.2c9.9 0 17.9 8 17.9 17.9s-7.9 18-17.8 18zM794.3 959.7H221c-49.4 0-89.6-40.2-89.6-89.6V153.5c0-49.4 40.2-89.6 89.6-89.6h403.1c4.8 0 9.3 1.9 12.7 5.2L887.6 320c3.4 3.4 5.2 7.9 5.2 12.7v537.5c0 52.7-51.9 89.5-98.5 89.5zM221 99.8c-29.6 0-53.7 24.1-53.7 53.7v716.6c0 29.6 24.1 53.7 53.7 53.7h573.3c29 0 62.7-23.5 62.7-53.7v-530L616.7 99.8H221z',
|
||||
onclick: () => {
|
||||
exportSeriesCSV(
|
||||
getSeriesForCsvExport(),
|
||||
`${echartList.value.title?.text || '负荷曲线拟合图'}.csv`
|
||||
)
|
||||
exportSeriesCSV(getSeriesForCsvExport(), echartList.value.exportFileName)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div>
|
||||
|
||||
<!-- 监测点列表 -->
|
||||
<TableHeader ref="TableHeaderRef" :showReset="false" @selectChange="selectChange" v-if="fullscreen"
|
||||
<TableHeader ref="TableHeaderRef" :showReset="false" showExport @selectChange="selectChange" v-if="fullscreen"
|
||||
:timeKeyList="prop.timeKey">
|
||||
<template #select>
|
||||
<el-form-item label="关键字筛选">
|
||||
@@ -37,7 +37,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, provide, reactive, watch, h } from 'vue'
|
||||
import { ref, onMounted, provide, watch, computed } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
@@ -159,7 +159,7 @@ const tableStore: any = new TableStore({
|
||||
{
|
||||
title: '电压等级(kV)',
|
||||
field: 'volGrade',
|
||||
minWidth: '80',
|
||||
minWidth: '100',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == 0 ? '/' : row.cellValue || '/'
|
||||
}
|
||||
|
||||
@@ -377,6 +377,11 @@ const setEchart = () => {
|
||||
}
|
||||
|
||||
echartsData.value = {
|
||||
exportFileName: {
|
||||
subject: trendRequestData.value?.lineName,
|
||||
feature: '趋势图',
|
||||
date: datePickerRef.value?.timeValue?.[1] || datePickerRef.value?.timeValue?.[0]
|
||||
},
|
||||
legend: {
|
||||
itemWidth: 20,
|
||||
itemHeight: 20,
|
||||
@@ -446,10 +451,7 @@ const setEchart = () => {
|
||||
title: '下载csv',
|
||||
icon: 'path://M642 673.1H301.6c-9.9 0-17.9-8-17.9-17.9s8-17.9 17.9-17.9H642c9.9 0 17.9 8 17.9 17.9s-8 17.9-17.9 17.9zM642 511.8H301.6c-9.9 0-17.9-8-17.9-17.9 0-9.9 8-17.9 17.9-17.9H642c9.9 0 17.9 8 17.9 17.9 0 9.9-8 17.9-17.9 17.9zM480.7 350.6H301.6c-9.9 0-17.9-8-17.9-17.9s8-17.9 17.9-17.9h179.2c9.9 0 17.9 8 17.9 17.9s-8.1 17.9-18 17.9zM874.9 350.6H695.7c-49.4 0-89.6-40.2-89.6-89.6V81.9c0-9.9 8-17.9 17.9-17.9 9.9 0 17.9 8 17.9 17.9V261c0 29.6 24.1 53.7 53.7 53.7h179.2c9.9 0 17.9 8 17.9 17.9s-7.9 18-17.8 18zM794.3 959.7H221c-49.4 0-89.6-40.2-89.6-89.6V153.5c0-49.4 40.2-89.6 89.6-89.6h403.1c4.8 0 9.3 1.9 12.7 5.2L887.6 320c3.4 3.4 5.2 7.9 5.2 12.7v537.5c0 52.7-51.9 89.5-98.5 89.5zM221 99.8c-29.6 0-53.7 24.1-53.7 53.7v716.6c0 29.6 24.1 53.7 53.7 53.7h573.3c29 0 62.7-23.5 62.7-53.7v-530L616.7 99.8H221z',
|
||||
onclick: () => {
|
||||
exportSeriesCSV(
|
||||
echartsData.value.options.series,
|
||||
`${titles.value || '监测点指标趋势'}.csv`
|
||||
)
|
||||
exportSeriesCSV(echartsData.value.options.series, echartsData.value.exportFileName)
|
||||
}
|
||||
},
|
||||
myTool2: {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<template #select>
|
||||
<el-form-item label="关键字筛选">
|
||||
<el-input maxlength="32" show-word-limit style="width: 240px"
|
||||
v-model.trim="tableStore.table.params.searchValue" clearable placeholder="请输入敏感用户名称" />
|
||||
v-model.trim="tableStore.table.params.searchValue" clearable placeholder="请输入用户名称" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
@@ -77,7 +77,7 @@ const tableStore: any = new TableStore({
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '敏感用户名称',
|
||||
title: '用户名称',
|
||||
field: 'name',
|
||||
minWidth: '90'
|
||||
},
|
||||
|
||||
@@ -32,6 +32,7 @@ import MultiCondition from '@/views/govern/alarm/multiCondition.vue'
|
||||
import waveFormAnalysis from '@/views/govern/device/control/tabs/components/waveFormAnalysis.vue'
|
||||
import { analyseWave } from '@/api/common'
|
||||
import { getFileZip } from '@/api/cs-harmonic-boot/datatrend'
|
||||
import { buildWaveExportFileName, getExportSubjectFromRow } from '@/utils/echartMethod'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
@@ -85,14 +86,14 @@ const tableStore: any = new TableStore({
|
||||
field: 'advanceReason',
|
||||
minWidth: 100,
|
||||
align: 'center',
|
||||
formatter: (row: any) => ReasonList.find((item: any) => item.id == row.cellValue)?.name || '未知'
|
||||
formatter: (row: any) => ReasonList.find((item: any) => item.id == row.cellValue)?.name || '其他'
|
||||
},
|
||||
{
|
||||
title: '暂降类型',
|
||||
field: 'advanceType',
|
||||
minWidth: 100,
|
||||
align: 'center',
|
||||
formatter: (row: any) => EventTypeList.find((item: any) => item.id == row.cellValue)?.name || '未知'
|
||||
formatter: (row: any) => EventTypeList.find((item: any) => item.id == row.cellValue)?.name || '其他'
|
||||
},
|
||||
{ title: '监测点名称', field: 'lineName', minWidth: 130, align: 'center' },
|
||||
{ title: '电压等级(kV)', field: 'lineVoltage', minWidth: 120, align: 'center', sortable: true },
|
||||
@@ -183,7 +184,7 @@ const tableStore: any = new TableStore({
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.download = row.wavePath.split('/')[2] || '波形文件'
|
||||
link.download = buildWaveExportFileName(getExportSubjectFromRow(row))
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
|
||||
@@ -32,9 +32,9 @@
|
||||
<template #content>
|
||||
<!-- <span v-html="list?.filter(item => item.time == data.day)[0]?.type || ''"></span> -->
|
||||
<div v-for="item in list?.filter((item:any) => item.name == data.day)">
|
||||
<div>电压暂降:{{ item.eventDown || 0 }}</div>
|
||||
<div>电压中断:{{ item.eventOff || 0 }}</div>
|
||||
<div>电压暂升:{{ item.eventUp || 0 }}</div>
|
||||
<div>暂降: {{ item.eventDown || 0 }}</div>
|
||||
<div>中断: {{ item.eventOff || 0 }}</div>
|
||||
<div>暂升: {{ item.eventUp || 0 }}</div>
|
||||
</div>
|
||||
</template>
|
||||
<div
|
||||
@@ -43,13 +43,13 @@
|
||||
v-for="item in list?.filter((item:any) => item.name == data.day)"
|
||||
@click="descentClick(item)"
|
||||
>
|
||||
<!-- <div>电压暂降:{{ item.eventDown || 0 }}</div>
|
||||
<div>电压中断:{{ item.eventOff || 0 }}</div>
|
||||
<div>电压暂升:{{ item.eventUp || 0 }}</div> -->
|
||||
<!-- <div>暂降:{{ item.eventDown || 0 }}</div>
|
||||
<div>中断:{{ item.eventOff || 0 }}</div>
|
||||
<div>暂升:{{ item.eventUp || 0 }}</div> -->
|
||||
<template v-if="fullscreen">
|
||||
<div>电压暂降:{{ item.eventDown || 0 }}</div>
|
||||
<div>电压中断:{{ item.eventOff || 0 }}</div>
|
||||
<div>电压暂升:{{ item.eventUp || 0 }}</div>
|
||||
<div>暂降: {{ item.eventDown || 0 }}</div>
|
||||
<div>中断: {{ item.eventOff || 0 }}</div>
|
||||
<div>暂升: {{ item.eventUp || 0 }}</div>
|
||||
</template>
|
||||
<template v-else>暂态事件</template>
|
||||
</div>
|
||||
|
||||
@@ -37,6 +37,7 @@ import MultiCondition from '@/views/govern/alarm/multiCondition.vue'
|
||||
import waveFormAnalysis from '@/views/govern/device/control/tabs/components/waveFormAnalysis.vue'
|
||||
import { analyseWave } from '@/api/common'
|
||||
import { getFileZip } from '@/api/cs-harmonic-boot/datatrend'
|
||||
import { buildWaveExportFileName, getExportSubjectFromRow } from '@/utils/echartMethod'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
@@ -115,14 +116,14 @@ const tableStore: any = new TableStore({
|
||||
field: 'advanceReason',
|
||||
minWidth: 100,
|
||||
align: 'center',
|
||||
formatter: (row: any) => ReasonList.find((item: any) => item.id == row.cellValue)?.name || '未知'
|
||||
formatter: (row: any) => ReasonList.find((item: any) => item.id == row.cellValue)?.name || '其他'
|
||||
},
|
||||
{
|
||||
title: '暂降类型',
|
||||
field: 'advanceType',
|
||||
minWidth: 100,
|
||||
align: 'center',
|
||||
formatter: (row: any) => EventTypeList.find((item: any) => item.id == row.cellValue)?.name || '未知'
|
||||
formatter: (row: any) => EventTypeList.find((item: any) => item.id == row.cellValue)?.name || '其他'
|
||||
},
|
||||
{ title: '电压等级(kV)', field: 'lineVoltage', minWidth: 120, align: 'center', sortable: true },
|
||||
{
|
||||
@@ -206,7 +207,7 @@ const tableStore: any = new TableStore({
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
link.download = row.wavePath.split('/')[2] || '波形文件'
|
||||
link.download = buildWaveExportFileName(getExportSubjectFromRow(row))
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -13,6 +13,7 @@ import 'echarts-liquidfill'
|
||||
import 'echarts/lib/component/dataZoom'
|
||||
import { color, gradeColor3 } from './color'
|
||||
import { useConfig } from '@/stores/config'
|
||||
import { buildExportBaseName, formatExportDateTime } from '@/utils/echartMethod'
|
||||
// import { nextTick } from 'process'
|
||||
|
||||
const emit = defineEmits(['chartClick'])
|
||||
@@ -71,7 +72,9 @@ const initChart = () => {
|
||||
feature: {
|
||||
saveAsImage: {
|
||||
title: '下载图片',
|
||||
name: props.options?.title?.text || '图表'
|
||||
name: props.options?.exportFileName
|
||||
? buildExportBaseName(props.options.exportFileName)
|
||||
: ((props.options?.title?.text || '图表') + '_' + formatExportDateTime())
|
||||
},
|
||||
...(props.options?.toolbox?.featureProps || null)
|
||||
},
|
||||
@@ -93,7 +96,7 @@ const initChart = () => {
|
||||
...(props.options?.legend || null)
|
||||
},
|
||||
grid: {
|
||||
top: props.options?.title?.text ? '50px' : '25px',
|
||||
top: props.options?.title?.text ? '50px' : '25px',
|
||||
left: '30px',
|
||||
right: '70px',
|
||||
bottom: props.options?.options?.dataZoom === null ? '10px' : '40px',
|
||||
|
||||
@@ -1,4 +1,18 @@
|
||||
export let color = [ '#07CCCA','#00BFF5', '#FFBF00', '#77DA63', '#Ff6600', '#FF9100', '#5B6E96', '#66FFCC', '#B3B3B3']
|
||||
export const gradeColor3 = ['#339966', '#FFCC33', '#A52a2a']
|
||||
export const gradeColor5 = ['#00CC00', '#99CC99', '#FF9900','#996600','#A52a2a']
|
||||
|
||||
export let color = ['#07CCCA', '#00BFF5', '#FFBF00', '#77DA63', '#Ff6600', '#FF9100', '#5B6E96', '#66FFEC', '#B3B3B3', '#9B59B6', '#3498DB', '#2ECC71']
|
||||
export let color1 = [
|
||||
'#00A8B5', // 青
|
||||
'#3B7DD8', // 蓝
|
||||
'#5B5FC7', // 靛
|
||||
'#8B5CF6', // 紫
|
||||
'#B07CC6', // 淡紫
|
||||
'#C060A8', // 玫红
|
||||
'#D4A017', // 金
|
||||
'#6AAF50', // 草绿
|
||||
'#00A878', // 翠绿
|
||||
'#7C9EB2', // 烟蓝
|
||||
'#6B7B8C', // 板岩灰
|
||||
'#A8A8A8' // 灰
|
||||
]
|
||||
export const gradeColor3 = ['#339966', '#FFCC33', '#A52a2a']
|
||||
export const gradeColor5 = ['#00CC00', '#99CC99', '#FF9900','#996600','#A52a2a']
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ import url from '@/assets/img/point.png'
|
||||
import url2 from '@/assets/img/dw.png'
|
||||
import { buildWaveCacheKey, getWaveCache, setWaveCache } from '@/utils/waveCache'
|
||||
import { getRmsWorker, buildWorkerPayload } from '@/utils/waveWorkerPool'
|
||||
|
||||
import { buildExportBaseName, formatExportDateTime } from '@/utils/echartMethod'
|
||||
let waveRequestId = 0
|
||||
const pendingCacheKeys = new Map<number, string>()
|
||||
let rmsWorker: Worker | null = null
|
||||
@@ -202,7 +202,7 @@ const download = () => {
|
||||
scale: 2
|
||||
}).then(function (canvas) {
|
||||
const creatIMg = document.createElement('a')
|
||||
creatIMg.download = 'rms波形.png'
|
||||
creatIMg.download = (props.boxoList.lineName || props.boxoList.measurementPointName || props.boxoList.equipmentName) + '_RMS波形_' + formatExportDateTime() + '.png'
|
||||
creatIMg.href = canvas.toDataURL()
|
||||
creatIMg.click()
|
||||
creatIMg.remove()
|
||||
@@ -810,7 +810,7 @@ const initWave = (
|
||||
start: 0,
|
||||
bottom: '20px',
|
||||
end: 100,
|
||||
filterMode: 'filter'
|
||||
filterMode: 'filter'
|
||||
},
|
||||
{
|
||||
start: 0,
|
||||
|
||||
@@ -18,6 +18,7 @@ import { calcShuYAxisRange, formatAxisLabel } from '@/utils/chartAxisHelper'
|
||||
import url from '@/assets/img/point.png'
|
||||
import { buildWaveCacheKey, getWaveCache, setWaveCache } from '@/utils/waveCache'
|
||||
import { getShuWorker, buildWorkerPayload } from '@/utils/waveWorkerPool'
|
||||
import { buildExportBaseName, formatExportDateTime } from '@/utils/echartMethod'
|
||||
|
||||
let waveRequestId = 0
|
||||
const pendingCacheKeys = new Map<number, string>()
|
||||
@@ -207,7 +208,7 @@ const download = () => {
|
||||
scale: 2
|
||||
}).then(function (canvas) {
|
||||
const creatIMg = document.createElement('a')
|
||||
creatIMg.download = '瞬间波形.png'
|
||||
creatIMg.download = (props.boxoList.lineName || props.boxoList.measurementPointName || props.boxoList.equipmentName) + '_瞬间波形_' + formatExportDateTime() + '.png'
|
||||
creatIMg.href = canvas.toDataURL()
|
||||
creatIMg.click()
|
||||
creatIMg.remove()
|
||||
@@ -566,7 +567,7 @@ const initWave = (
|
||||
start: 0,
|
||||
bottom: '20px',
|
||||
end: 100,
|
||||
filterMode: 'filter'
|
||||
filterMode: 'filter'
|
||||
},
|
||||
{
|
||||
start: 0,
|
||||
|
||||
@@ -74,6 +74,7 @@ import { useConfig } from '@/stores/config'
|
||||
import type TableStoreClass from '@/utils/tableStore'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
import { buildExportBaseName } from '@/utils/echartMethod'
|
||||
|
||||
const config = useConfig()
|
||||
const tableRef = ref<VxeTableInstance>()
|
||||
@@ -150,6 +151,16 @@ const selectChangeEvent: VxeTableEvents.CheckboxChange<any> = ({ checked }) => {
|
||||
const getRef = () => {
|
||||
return tableRef.value
|
||||
}
|
||||
const getTableExportFilename = () => {
|
||||
const exportName = tableStore.exportName
|
||||
if (exportName && typeof exportName === 'object') {
|
||||
return buildExportBaseName(exportName)
|
||||
}
|
||||
const feature =
|
||||
exportName || (document.querySelectorAll('.ba-nav-tab.active')[0] as HTMLElement | undefined)?.textContent || '导出'
|
||||
return buildExportBaseName({ feature })
|
||||
}
|
||||
|
||||
watch(
|
||||
() => tableStore.table.allFlag,
|
||||
newVal => {
|
||||
@@ -157,7 +168,7 @@ watch(
|
||||
console.log('🚀 ~ tableStore.table.allData:', tableStore.table.allData)
|
||||
|
||||
tableRef.value?.exportData({
|
||||
filename: tableStore.exportName || document.querySelectorAll('.ba-nav-tab.active')[0].textContent || '', // 文件名字
|
||||
filename: getTableExportFilename(), // 文件名字
|
||||
sheetName: 'Sheet1',
|
||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||
useStyle: true,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<Tree
|
||||
ref="treRef"
|
||||
|
||||
:width="width"
|
||||
:showPush="props.showPush"
|
||||
:expand-on-click-node="false"
|
||||
|
||||
@@ -79,7 +79,7 @@ async function selectInitialNode(type: string | undefined, leaves: LineTreeLeave
|
||||
}
|
||||
|
||||
const loadTree = (type?: string) => {
|
||||
console.log("🚀 ~ loadTree ~ type:", type)
|
||||
// console.log("🚀 ~ loadTree ~ type:", type)
|
||||
tree.value = []
|
||||
getLineTree({ type: type === '2' ? 'engineering' : '' }).then(res => {
|
||||
const leaves = decorateLineTree(res.data, type, decorators, { disableParents: false })
|
||||
|
||||
@@ -93,7 +93,7 @@ interface Props {
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
width: '280px',
|
||||
width: '270px',
|
||||
canExpand: true,
|
||||
showPush: false,
|
||||
baseOffset: 190,
|
||||
@@ -138,10 +138,12 @@ defineExpose({ treeRef })
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.cn-tree-root {
|
||||
// width: 280px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
width: 270px;
|
||||
transition: width 0.3s;
|
||||
box-sizing: border-box;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user