From 3094ac94c09191968dcd8345a9506ab309dfca20 Mon Sep 17 00:00:00 2001 From: GGJ <357021191@qq.com> Date: Fri, 3 Jan 2025 12:45:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=8E=B0=E5=9C=BA=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 2 +- src/api/cs-harmonic-boot/datatrend.ts | 10 ++- src/api/cs-system-boot/device.ts | 8 ++ src/api/system-boot/dic.ts | 2 +- src/components/table/index.vue | 6 +- src/layouts/admin/components/navBar/tabs.vue | 2 +- .../admin/components/popup/adminInfo.vue | 7 +- src/layouts/common/components/loading.vue | 3 +- src/utils/request.ts | 5 +- src/utils/tableStore.ts | 30 ++++---- src/views/auth/menu/popupApi.vue | 2 +- src/views/govern/alarm/Device.vue | 1 + src/views/govern/alarm/Transient.vue | 19 +++-- src/views/govern/analyze/DVR/index.vue | 34 ++++++--- .../supplementaryRecruitment/history.vue | 17 ++++- .../govern/device/control/tabs/event.vue | 22 ++++-- .../device/planData/components/transient.vue | 20 +++-- src/views/govern/manage/basic/dictionary.vue | 2 +- .../govern/manage/basic/popupVersion.vue | 76 +++++++++++++++---- src/views/govern/manage/factory.vue | 38 +++++++--- src/views/govern/reportForms/index.vue | 4 +- .../govern/terminal/deviceLedger/index.vue | 17 ++++- .../govern/terminal/deviceMonitor/index.vue | 17 ++++- .../setting/dictionary/tree/popupForm.vue | 2 +- 24 files changed, 249 insertions(+), 97 deletions(-) diff --git a/src/App.vue b/src/App.vue index ac5cde6..cf557a3 100644 --- a/src/App.vue +++ b/src/App.vue @@ -18,7 +18,7 @@ let buildUrl = 'wss://pqmcn.com:8087/mqtt'//102 const fetchMqttUrl = async () => { const response = await fetch('/') - const mqttUrl = response.headers.get('X-MQTT-URL') + const mqttUrl = response.headers.get('X-Mqtt-Url') window.localStorage.setItem('MQTTURL', mqttUrl || buildUrl) diff --git a/src/api/cs-harmonic-boot/datatrend.ts b/src/api/cs-harmonic-boot/datatrend.ts index 6e487e6..7512a58 100644 --- a/src/api/cs-harmonic-boot/datatrend.ts +++ b/src/api/cs-harmonic-boot/datatrend.ts @@ -11,4 +11,12 @@ export function getDeviceDataTrend(data: any) { - +// 波形下载 +export function getFileZip(params: any) { + return createAxios({ + url: '/cs-harmonic-boot/event/getFileZip', + method: 'get', + params, + responseType: 'blob' + }) +} diff --git a/src/api/cs-system-boot/device.ts b/src/api/cs-system-boot/device.ts index 2ab3012..d14e362 100644 --- a/src/api/cs-system-boot/device.ts +++ b/src/api/cs-system-boot/device.ts @@ -88,3 +88,11 @@ export const portableDeviceAccess = (data: any) => { method: 'POST', }) } +// 下载模版 +export function getExcelTemplate() { + return createAxios({ + url: '/cs-device-boot/EquipmentDelivery/getExcelTemplate', + method: 'get', + responseType: 'blob' + }) +} \ No newline at end of file diff --git a/src/api/system-boot/dic.ts b/src/api/system-boot/dic.ts index ce33f22..df0a1f1 100644 --- a/src/api/system-boot/dic.ts +++ b/src/api/system-boot/dic.ts @@ -4,7 +4,7 @@ export const dicDelete = (id: string) => { let form = new FormData() form.append('id', id) return createAxios({ - url: '/system-boot/dictTree//delete', + url: '/system-boot/dictTree/delete', method: 'DELETE', headers: { 'Content-Type': 'application/x-www-form-urlencoded' diff --git a/src/components/table/index.vue b/src/components/table/index.vue index 883fabd..7c08a5c 100644 --- a/src/components/table/index.vue +++ b/src/components/table/index.vue @@ -97,18 +97,16 @@ const getRef = () => { watch( () => tableStore.table.allFlag, newVal => { - - if (tableStore.table.allFlag) { + console.log("🚀 ~ tableStore.table:", tableStore.table) tableRef.value?.exportData({ - filename: document.querySelectorAll('.ba-nav-tab.active')[0].textContent || '', // 文件名字 + filename: tableStore.table.exportName || document.querySelectorAll('.ba-nav-tab.active')[0].textContent || '', // 文件名字 sheetName: 'Sheet1', type: 'xlsx', //导出文件类型 xlsx 和 csv useStyle: true, data: tableStore.table.allData, // 数据源 // 过滤那个字段导出 columnFilterMethod: function (column: any) { - return !(column.column.title === undefined || column.column.title === '序号' || column.column.title === '操作') } }) diff --git a/src/layouts/admin/components/navBar/tabs.vue b/src/layouts/admin/components/navBar/tabs.vue index 4b2e5af..2512f2b 100644 --- a/src/layouts/admin/components/navBar/tabs.vue +++ b/src/layouts/admin/components/navBar/tabs.vue @@ -12,7 +12,7 @@ {{ item.meta.title }} - - - + + + @@ -21,7 +21,6 @@ -