diff --git a/src/api/process-boot/reportForms.ts b/src/api/process-boot/reportForms.ts index 023ab924..e97f0ec3 100644 --- a/src/api/process-boot/reportForms.ts +++ b/src/api/process-boot/reportForms.ts @@ -1,10 +1,18 @@ -import createAxios from '@/utils/request' - -export function exportModel(data: any) { - return createAxios({ - url: '/harmonic-boot/exportmodel/exportModel', - method: 'post', - data: data, - responseType: 'blob' - }) -} +import createAxios from '@/utils/request' + +export function exportModel(data: any) { + return createAxios({ + url: '/harmonic-boot/exportmodel/exportModel', + method: 'post', + data: data, + responseType: 'blob' + }) +} +export function areaHarmonicReport(data: any) { + return createAxios({ + url: '/harmonic-boot/areaHarmonicReport/areaHarmonicReport', + method: 'post', + data: data, + responseType: 'blob' + }) +} diff --git a/src/assets/img/region.png b/src/assets/img/region.png new file mode 100644 index 00000000..7344073f Binary files /dev/null and b/src/assets/img/region.png differ diff --git a/src/components/table/header/index.vue b/src/components/table/header/index.vue index e1efaece..9b35d5e5 100644 --- a/src/components/table/header/index.vue +++ b/src/components/table/header/index.vue @@ -52,7 +52,7 @@ diff --git a/src/components/tree/pqs/areaTree.vue b/src/components/tree/pqs/areaTree.vue new file mode 100644 index 00000000..ca99366e --- /dev/null +++ b/src/components/tree/pqs/areaTree.vue @@ -0,0 +1,150 @@ + + + + diff --git a/src/utils/tableStore.ts b/src/utils/tableStore.ts index a2f3b2ef..37aa918c 100644 --- a/src/utils/tableStore.ts +++ b/src/utils/tableStore.ts @@ -19,7 +19,7 @@ interface TableStoreParams { publicHeight?: number //计算高度 resetCallback?: () => void // 重置 loadCallback?: () => void // 接口调用后的回调 - exportProcessingData?:() => void //导出处理数据 + exportProcessingData?: () => void //导出处理数据 beforeSearchFun?: () => void // 接口调用前的回调 } @@ -45,8 +45,9 @@ export default class TableStore { pageNum: 1, pageSize: 20 }, - filename:null, + filename: null, loading: true, + exportLoading: false, column: [], loadCallback: null, exportProcessingData: null, @@ -65,7 +66,7 @@ export default class TableStore { this.table.filename = options.filename || null this.table.column = options.column this.showPage = options.showPage !== false - + this.table.publicHeight = options.publicHeight || 0 this.table.resetCallback = options.resetCallback || null this.table.loadCallback = options.loadCallback || null @@ -84,13 +85,11 @@ export default class TableStore { this.initData = JSON.parse(JSON.stringify(this.table.params)) } if (!this.timeAll) { - delete this.table.params.startTime; - delete this.table.params.endTime; - delete this.table.params.searchBeginTime; - delete this.table.params.searchEndTime; - delete this.table.params.timeFlag; - - + delete this.table.params.startTime + delete this.table.params.endTime + delete this.table.params.searchBeginTime + delete this.table.params.searchEndTime + delete this.table.params.timeFlag } createAxios( Object.assign( @@ -130,7 +129,6 @@ export default class TableStore { * @param data 携带数据 */ onTableAction = (event: string, data: anyObj) => { - const actionFun = new Map([ [ 'search', @@ -202,6 +200,7 @@ export default class TableStore { [ 'export', () => { + this.table.exportLoading = true // this.index() console.log('export') let params = { ...this.table.params, pageNum: 1, pageSize: this.table.total } @@ -213,12 +212,16 @@ export default class TableStore { }, requestPayload(this.method, params, this.paramsPOST) ) - ).then(res => { - this.table.allData = filtration(res.data.records || res.data) - console.log('11111',this.table) - this.table.exportProcessingData && this.table.exportProcessingData() - this.table.allFlag = data.showAllFlag || true - }) + ) + .then(res => { + this.table.allData = filtration(res.data.records || res.data) + this.table.exportProcessingData && this.table.exportProcessingData() + this.table.allFlag = data.showAllFlag || true + this.table.exportLoading = false + }) + .catch(() => { + this.table.exportLoading = false + }) } ] ]) diff --git a/src/views/pqs/harmonicMonitoring/detailed/regionalStatistics/index.vue b/src/views/pqs/harmonicMonitoring/detailed/regionalStatistics/index.vue index 543fe7d1..3feda432 100644 --- a/src/views/pqs/harmonicMonitoring/detailed/regionalStatistics/index.vue +++ b/src/views/pqs/harmonicMonitoring/detailed/regionalStatistics/index.vue @@ -144,7 +144,15 @@ const tableStore = new TableStore({ }, { field: 'frequencyBiLi', - title: '超标占比(%)', + title: '累计占比(%)', + minWidth: '100px', + formatter: (row: any) => { + return row.cellValue == -1 ? '/' : row.cellValue + } + }, + { + field: 'frequencyDayAvgBiLi', + title: '日均占比(%)', minWidth: '100px', formatter: (row: any) => { return row.cellValue == -1 ? '/' : row.cellValue @@ -173,7 +181,15 @@ const tableStore = new TableStore({ }, { field: 'voltageBiLi', - title: '超标占比(%)', + title: '累计占比(%)', + minWidth: '100px', + formatter: (row: any) => { + return row.cellValue == -1 ? '/' : row.cellValue + } + }, + { + field: 'voltageDayAvgBiLi', + title: '日均占比(%)', minWidth: '100px', formatter: (row: any) => { return row.cellValue == -1 ? '/' : row.cellValue @@ -200,9 +216,18 @@ const tableStore = new TableStore({ return row.cellValue == -1 ? '/' : row.cellValue } }, + { field: 'harmonicVoltageBiLi', - title: '超标占比(%)', + title: '累计占比(%)', + minWidth: '100px', + formatter: (row: any) => { + return row.cellValue == -1 ? '/' : row.cellValue + } + }, + { + field: 'harmonicVoltageDayAvgBiLi', + title: '日均占比(%)', minWidth: '100px', formatter: (row: any) => { return row.cellValue == -1 ? '/' : row.cellValue @@ -231,7 +256,15 @@ const tableStore = new TableStore({ }, { field: 'harmonicCurrentBiLi', - title: '超标占比(%)', + title: '累计占比(%)', + minWidth: '100px', + formatter: (row: any) => { + return row.cellValue == -1 ? '/' : row.cellValue + } + }, + { + field: 'harmonicCurrentDayAvgBiLi', + title: '日均占比(%)', minWidth: '100px', formatter: (row: any) => { return row.cellValue == -1 ? '/' : row.cellValue @@ -260,7 +293,15 @@ const tableStore = new TableStore({ }, { field: 'threePhaseVoltageBiLi', - title: '超标占比(%)', + title: '累计占比(%)', + minWidth: '100px', + formatter: (row: any) => { + return row.cellValue == -1 ? '/' : row.cellValue + } + }, + { + field: 'threePhaseVoltageDayAvgBiLi', + title: '日均占比(%)', minWidth: '100px', formatter: (row: any) => { return row.cellValue == -1 ? '/' : row.cellValue @@ -289,7 +330,15 @@ const tableStore = new TableStore({ }, { field: 'flickerBiLi', - title: '超标占比(%)', + title: '累计占比(%)', + minWidth: '100px', + formatter: (row: any) => { + return row.cellValue == -1 ? '/' : row.cellValue + } + }, + { + field: 'flickerDayAvgBiLi', + title: '日均占比(%)', minWidth: '100px', formatter: (row: any) => { return row.cellValue == -1 ? '/' : row.cellValue @@ -318,7 +367,15 @@ const tableStore = new TableStore({ }, { field: 'negativeBiLi', - title: '超标占比(%)', + title: '累计占比(%)', + minWidth: '100px', + formatter: (row: any) => { + return row.cellValue == -1 ? '/' : row.cellValue + } + }, + { + field: 'negativeDayAvgBiLi', + title: '日均占比(%)', minWidth: '100px', formatter: (row: any) => { return row.cellValue == -1 ? '/' : row.cellValue @@ -347,7 +404,15 @@ const tableStore = new TableStore({ }, { field: 'interHarmonicBiLi', - title: '超标占比(%)', + title: '累计占比(%)', + minWidth: '100px', + formatter: (row: any) => { + return row.cellValue == -1 ? '/' : row.cellValue + } + }, + { + field: 'interHarmonicDayAvgBiLi', + title: '日均占比(%)', minWidth: '100px', formatter: (row: any) => { return row.cellValue == -1 ? '/' : row.cellValue diff --git a/src/views/pqs/harmonicMonitoring/reportForms/region/index.vue b/src/views/pqs/harmonicMonitoring/reportForms/region/index.vue new file mode 100644 index 00000000..76b7bdd6 --- /dev/null +++ b/src/views/pqs/harmonicMonitoring/reportForms/region/index.vue @@ -0,0 +1,108 @@ + + + + diff --git a/src/views/pqs/harmonicMonitoring/reportForms/word/index.vue b/src/views/pqs/harmonicMonitoring/reportForms/word/index.vue index a62f1652..4e147365 100644 --- a/src/views/pqs/harmonicMonitoring/reportForms/word/index.vue +++ b/src/views/pqs/harmonicMonitoring/reportForms/word/index.vue @@ -72,7 +72,7 @@ import { mainHeight } from '@/utils/layout' import { exportModel } from '@/api/process-boot/reportForms' import { genFileId, ElMessage, ElNotification } from 'element-plus' import type { UploadProps, UploadUserFile } from 'element-plus' - +import dayjs from 'dayjs' defineOptions({ // name: 'harmonic-boot/report/word' }) @@ -152,7 +152,7 @@ const exportEvent = () => { const url = window.URL.createObjectURL(blob) const link = document.createElement('a') // 创建a标签 link.href = url - link.download = dotList.value.name // 设置下载的文件名 + link.download = dotList.value.name+ dayjs().format('YYYYMMDD') // 设置下载的文件名 document.body.appendChild(link) link.click() //执行下载 document.body.removeChild(link) diff --git a/src/views/pqs/runManage/assessment/components/assess/index.vue b/src/views/pqs/runManage/assessment/components/assess/index.vue index 42e13675..51b136cf 100644 --- a/src/views/pqs/runManage/assessment/components/assess/index.vue +++ b/src/views/pqs/runManage/assessment/components/assess/index.vue @@ -73,7 +73,6 @@ import Outcome from './outcome.vue' import { exportResult, downloadAssessTemplate, assessResult, userGetInfo } from '@/api/advance-boot/assess' import { Loading } from '@element-plus/icons-vue' import AssessTemplate from './assessTemplate.vue' -import { fa, tr } from 'element-plus/es/locale' defineOptions({ // name: 'harmonic-boot/report/word' diff --git a/src/views/pqs/voltageSags/report/monitoringPointReport/index.vue b/src/views/pqs/voltageSags/report/monitoringPointReport/index.vue index 83812228..3b4eb113 100644 --- a/src/views/pqs/voltageSags/report/monitoringPointReport/index.vue +++ b/src/views/pqs/voltageSags/report/monitoringPointReport/index.vue @@ -140,6 +140,7 @@ import { mainHeight } from '@/utils/layout' import { getLineExport, getList, selectReleation } from '@/api/event-boot/report' import { useMonitoringPoint } from '@/stores/monitoringPoint' import { ElMessage } from 'element-plus' +import dayjs from 'dayjs' defineOptions({ name: 'TransientReport/monitoringpointReport' }) @@ -257,7 +258,7 @@ const exportEvent = () => { const url = window.URL.createObjectURL(blob) const link = document.createElement('a') // 创建a标签 link.href = url - link.download = '监测点报告' // 设置下载的文件名 + link.download = dotList.value.name+'监测点报告'+ dayjs().format('YYYYMMDD') // 设置下载的文件名 document.body.appendChild(link) link.click() //执行下载 document.body.removeChild(link) diff --git a/src/views/pqs/voltageSags/report/regionalReports/index.vue b/src/views/pqs/voltageSags/report/regionalReports/index.vue index 9c18a6a5..0675b1c5 100644 --- a/src/views/pqs/voltageSags/report/regionalReports/index.vue +++ b/src/views/pqs/voltageSags/report/regionalReports/index.vue @@ -1,298 +1,333 @@ - - - + + + diff --git a/types/table.d.ts b/types/table.d.ts index 80874eb4..bda2fa52 100644 --- a/types/table.d.ts +++ b/types/table.d.ts @@ -15,6 +15,7 @@ declare global { webPagingData: TableRow[][] // 表格加载状态 loading: boolean + exportLoading: boolean // 当前选中行 selection: TableRow[] // 表格列定义 @@ -84,7 +85,7 @@ declare global { ) => string children?: TableColumn[] property?: string - clickable?: boolean // 是否可点击 + clickable?: boolean // 是否可点击 } /* 表格右侧操作按钮 */