From 8233284fa501227541013248ce1e13d721816d15 Mon Sep 17 00:00:00 2001 From: betaqi <3188864257@qq.com> Date: Tue, 16 Dec 2025 19:09:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E4=BA=9B=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 2 +- global.types/components.d.ts | 2 + src/api/module/device/category.ts | 15 ++- src/api/module/engineering/index.ts | 17 ++++ .../config/components/StepDeviceCategory.vue | 52 ++++++++-- src/views/engineering/index.vue | 94 ++++++++++++++++++- 6 files changed, 168 insertions(+), 14 deletions(-) diff --git a/.env b/.env index dc10f1a..c77e1d9 100644 --- a/.env +++ b/.env @@ -1,4 +1,4 @@ VITE_BASE_API = '/remoteServer/admin-api/' VITE_BASE_API_SYSTEM = '/remoteServer/admin-api/system/' VITE_SHOW_ONLINE_DEVICE = true -VITE_BASE_URL = 'http://43.140.245.32:48089' \ No newline at end of file +VITE_BASE_URL = 'http://192.168.1.63:48089' \ No newline at end of file diff --git a/global.types/components.d.ts b/global.types/components.d.ts index 137173c..4813ee4 100644 --- a/global.types/components.d.ts +++ b/global.types/components.d.ts @@ -18,6 +18,8 @@ declare module 'vue' { EdfsWrap: typeof import('./../src/components/Edfs-wrap.vue')['default'] ElAside: typeof import('element-plus/es')['ElAside'] ElButton: typeof import('element-plus/es')['ElButton'] + ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] + ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup'] ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider'] ElContainer: typeof import('element-plus/es')['ElContainer'] ElDialog: typeof import('element-plus/es')['ElDialog'] diff --git a/src/api/module/device/category.ts b/src/api/module/device/category.ts index 53d51ca..45ce8b2 100644 --- a/src/api/module/device/category.ts +++ b/src/api/module/device/category.ts @@ -17,7 +17,7 @@ export const createDeviceType = (params: IDeviceCategoryOV & IDeviceBase) => { }) } -export const uploadDeviceTypeFile = (params: { file: File, projectName: string, fileName: string }, abort: AbortController) => { +export const uploadDeviceTypeFile = (params: { file: File, projectName: string, fileName: string, pointName: string }, abort: AbortController) => { return globalServer({ url: '/project/point/import-file', method: 'post', @@ -26,4 +26,15 @@ export const uploadDeviceTypeFile = (params: { file: File, projectName: string, headers: { 'Content-Type': 'multipart/form-data' }, timeout: 0, }) -} \ No newline at end of file +} + + + +export const downloadDeviceTypeFile = (params: { projectName: string, pointName: string }) => { + return globalServer({ + url: '/project/point/download-excel', + method: 'get', + params, + responseType: 'blob', + }) +} diff --git a/src/api/module/engineering/index.ts b/src/api/module/engineering/index.ts index 8cd8a6e..05d6ec8 100644 --- a/src/api/module/engineering/index.ts +++ b/src/api/module/engineering/index.ts @@ -19,3 +19,20 @@ export const getEngineeringList = ( params, }) } + + +export const deleteEngineering = (params: { name: string }) => { + return globalServer({ + url: 'project/delete', + method: 'delete', + params, + }) +} + +export const deleteEngineeringBatch = (names: string[]) => { + return globalServer({ + url: 'project/delete-list', + method: 'delete', + params: names.join(','), + }) +} diff --git a/src/views/engineering/config/components/StepDeviceCategory.vue b/src/views/engineering/config/components/StepDeviceCategory.vue index cb5053e..be19cd8 100644 --- a/src/views/engineering/config/components/StepDeviceCategory.vue +++ b/src/views/engineering/config/components/StepDeviceCategory.vue @@ -65,17 +65,24 @@
工程描述:{{ item.description }}
@@ -27,7 +60,7 @@ >加载中...