From 56283890c22bd1012e6ff858e45c243a6e9ec4d4 Mon Sep 17 00:00:00 2001 From: fuguobin Date: Wed, 21 Feb 2024 14:04:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8E=86=E5=8F=B2=E6=9B=B2?= =?UTF-8?q?=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/dataVisual/index.ts | 10 ++++++++ src/assets/icons/icon_curve.svg | 1 + src/types/auto-imports.d.ts | 10 ++++++++ src/utils/request.ts | 2 ++ src/views/data-visual/components/header.vue | 9 +++++-- src/views/data-visual/components/hxPress.vue | 14 +++++------ src/views/data-visual/components/hxTemp.vue | 14 +++++------ src/views/data-visual/components/table.vue | 26 ++++++++++++++------ 8 files changed, 63 insertions(+), 23 deletions(-) create mode 100644 src/assets/icons/icon_curve.svg diff --git a/src/api/dataVisual/index.ts b/src/api/dataVisual/index.ts index a73f5c8..a13e62f 100644 --- a/src/api/dataVisual/index.ts +++ b/src/api/dataVisual/index.ts @@ -64,6 +64,16 @@ export function getPressChartPolling(queryParams: any) { }); } +/** + * 获取表格header + */ +export function getTableHeader(): AxiosPromise<[]> { + return request({ + url: '/dc/heatSourceScreen/heatSource/table/header', + method: 'get' + }); +} + /** * 获取换热站Table列表 */ diff --git a/src/assets/icons/icon_curve.svg b/src/assets/icons/icon_curve.svg new file mode 100644 index 0000000..7b65e30 --- /dev/null +++ b/src/assets/icons/icon_curve.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/types/auto-imports.d.ts b/src/types/auto-imports.d.ts index 6f8d200..5742656 100644 --- a/src/types/auto-imports.d.ts +++ b/src/types/auto-imports.d.ts @@ -2,6 +2,11 @@ export {} declare global { const EffectScope: typeof import('vue')['EffectScope'] + const ElForm: typeof import('element-plus/es')['ElForm'] + const ElMessage: typeof import('element-plus/es')['ElMessage'] + const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'] + const ElNotification: typeof import('element-plus/es')['ElNotification'] + const NEllipsis: typeof import('naive-ui')['NEllipsis'] const asyncComputed: typeof import('@vueuse/core')['asyncComputed'] const autoResetRef: typeof import('@vueuse/core')['autoResetRef'] const computed: typeof import('vue')['computed'] @@ -268,6 +273,11 @@ import { UnwrapRef } from 'vue' declare module 'vue' { interface ComponentCustomProperties { readonly EffectScope: UnwrapRef + readonly ElForm: UnwrapRef + readonly ElMessage: UnwrapRef + readonly ElMessageBox: UnwrapRef + readonly ElNotification: UnwrapRef + readonly NEllipsis: UnwrapRef readonly asyncComputed: UnwrapRef readonly autoResetRef: UnwrapRef readonly computed: UnwrapRef diff --git a/src/utils/request.ts b/src/utils/request.ts index 45c191c..1587b3b 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -9,6 +9,7 @@ import axios, { InternalAxiosRequestConfig, AxiosResponse } from 'axios'; import { useUserStoreHook } from '@/store/modules/user'; import { getUrlRouter } from '@/utils/index'; +import { useDateFormat } from '@vueuse/core'; // 创建 axios 实例 const service = axios.create({ @@ -55,6 +56,7 @@ service.interceptors.response.use( }); } else if (code === 500) { ElMessage({ message: msg || '未知错误', type: 'error' }); + console.log(msg || '未知错误', useDateFormat(new Date(), 'YYYY-MM-DD HH:mm:ss').value); return Promise.reject(new Error(msg)); } else if (code === 601) { ElMessage({ message: msg || '未知错误', type: 'warning' }); diff --git a/src/views/data-visual/components/header.vue b/src/views/data-visual/components/header.vue index 8910c9b..e522651 100644 --- a/src/views/data-visual/components/header.vue +++ b/src/views/data-visual/components/header.vue @@ -45,7 +45,7 @@ 返回