From 80182cdc6f704ece7de0e043d8c310721e3b84e7 Mon Sep 17 00:00:00 2001 From: stt Date: Fri, 28 Nov 2025 11:22:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B2=BB=E7=90=86=E6=8A=A5=E5=91=8A=E8=81=94?= =?UTF-8?q?=E8=B0=83=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cockpit/governanceReport/index.vue | 105 ++++++++---------- .../cockpit/trendComparison/index.vue | 2 - src/utils/request.ts | 3 +- 3 files changed, 51 insertions(+), 59 deletions(-) diff --git a/src/components/cockpit/governanceReport/index.vue b/src/components/cockpit/governanceReport/index.vue index 7a6e817..d35cea2 100644 --- a/src/components/cockpit/governanceReport/index.vue +++ b/src/components/cockpit/governanceReport/index.vue @@ -4,26 +4,13 @@ @@ -31,8 +18,8 @@ 导出excel -
-
+
-import { ref, onMounted, provide, reactive, watch, h, computed } from 'vue' +import { ref, onMounted, provide, reactive, watch, h, computed, nextTick } from 'vue' import TableStore from '@/utils/tableStore' import { exportExcel } from '@/views/govern/reportForms/export.js' import TableHeader from '@/components/table/header/index.vue' -import { useConfig } from '@/stores/config' -import Json from './index.json' -import JsonAfter from './index.json' import { getTemplateList } from '@/api/harmonic-boot/luckyexcel' import { getListByIds } from '@/api/harmonic-boot/cockpit/cockpit' +import Json from './index.json' const prop = defineProps({ w: { type: [String, Number] }, @@ -62,26 +47,6 @@ const prop = defineProps({ timeValue: { type: Object } }) -const tableStore: any = new TableStore({ - url: '/user-boot/role/selectRoleDetail?id=0', - method: 'POST', - - showPage: false, - exportName: '主要监测点列表', - column: [], - beforeSearchFun: () => { - tableStore.table.params.searchBeginTime = tableStore.table.params.searchBeginTime || prop.timeValue?.[0] - tableStore.table.params.searchEndTime = tableStore.table.params.searchEndTime || prop.timeValue?.[1] - }, - loadCallback: () => {} -}) - -const tableRef = ref() -provide('tableRef', tableRef) -tableStore.table.params.power = '1' - -provide('tableStore', tableStore) - // 报表模板列表 const templateList = ref() @@ -93,9 +58,11 @@ const initListByIds = () => { getListByIds({}).then((res: any) => { if (res.data.length > 0) { idList.value = res.data + if (!tableStore.table.params.sensitiveUserId && idList.value?.length > 0) { tableStore.table.params.sensitiveUserId = idList.value[0].id } + templateListData() } }) } @@ -104,8 +71,11 @@ const templateListData = () => { getTemplateList({}).then(res => { templateList.value = res.data if (!tableStore.table.params.tempId && templateList.value?.length > 0) { - tableStore.table.params.tempId = res.data[0].id + tableStore.table.params.tempId = templateList.value[0].id } + nextTick(() => { + tableStore.index() + }) }) } // 下载表格 @@ -115,19 +85,6 @@ const downloadExcel = () => { onMounted(() => { initListByIds() - templateListData() - luckysheet.create({ - container: 'luckysheet', - title: '', // 表 头名 - lang: 'zh', // 中文 - showtoolbar: false, // 是否显示工具栏 - showinfobar: false, // 是否显示顶部信息栏 - showsheetbar: true, // 是否显示底部sheet按钮 - allowEdit: false, // 禁止所有编辑操作(必填) - data: Json - }) - - tableStore.index() }) const selectChange = (showSelect: any, height: any, datePickerValue?: any) => { @@ -149,6 +106,42 @@ const fullscreen = computed(() => { return false } }) + +const tableStore: any = new TableStore({ + url: '/cs-harmonic-boot/customReport/getSensitiveUserReport', + method: 'POST', + showPage: false, + exportName: '治理效果报表', + column: [], + beforeSearchFun: () => { + tableStore.table.params.searchBeginTime = tableStore.table.params.searchBeginTime || prop.timeValue?.[0] + tableStore.table.params.searchEndTime = tableStore.table.params.searchEndTime || prop.timeValue?.[1] + if (!tableStore.table.params.sensitiveUserId && idList.value?.length > 0) { + tableStore.table.params.sensitiveUserId = idList.value[0].id + } + if (!tableStore.table.params.tempId && templateList.value?.length > 0) { + tableStore.table.params.tempId = templateList.value[0].id + } + }, + loadCallback: () => { + luckysheet.create({ + container: 'luckysheet', + title: '', // 表 头名 + lang: 'zh', // 中文 + showtoolbar: false, // 是否显示工具栏 + showinfobar: false, // 是否显示顶部信息栏 + showsheetbar: true, // 是否显示底部sheet按钮 + allowEdit: false, // 禁止所有编辑操作(必填) + data: tableStore.table.data + }) + } +}) + +const tableRef = ref() +provide('tableRef', tableRef) + +provide('tableStore', tableStore) + watch( () => prop.timeKey, val => { diff --git a/src/components/cockpit/trendComparison/index.vue b/src/components/cockpit/trendComparison/index.vue index 54602dc..42839bb 100644 --- a/src/components/cockpit/trendComparison/index.vue +++ b/src/components/cockpit/trendComparison/index.vue @@ -197,8 +197,6 @@ const setEchart = () => { const phaseName = phase === 'default' ? '' : `${phase}相` const color = phaseColors[phase] || config.layout.elementUiPrimary[0] - console.log(color,'89089900') - series.push({ name: `治理前${phaseName}`, type: 'line', diff --git a/src/utils/request.ts b/src/utils/request.ts index bc686a4..cd54457 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -67,7 +67,8 @@ function createAxios>( config.url == '/system-boot/file/upload' || config.url == '/harmonic-boot/grid/getAssessOverview' || config.url == '/harmonic-boot/gridDiagram/getGridDiagramAreaData' || - config.url == '/cs-device-boot/csline/list' + config.url == '/cs-device-boot/csline/list' || + config.url == '/cs-harmonic-boot/pqSensitiveUser/getListByIds' ) ) removePending(config)