diff --git a/.env.development b/.env.development index 513ea8b..335667f 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,7 @@ # 页面标题 VITE_APP_TITLE = 物联网设备管理平台 # 接口请求地址,会设置到 axios 的 baseURL 参数上 -VITE_APP_API_BASEURL = http://111.198.10.15:12206 +VITE_APP_API_BASEURL = http://111.198.10.15:11608 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/.env.development b/.env.development index 513ea8b..335667f 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,7 @@ # 页面标题 VITE_APP_TITLE = 物联网设备管理平台 # 接口请求地址,会设置到 axios 的 baseURL 参数上 -VITE_APP_API_BASEURL = http://111.198.10.15:12206 +VITE_APP_API_BASEURL = http://111.198.10.15:11608 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/.gitignore b/.gitignore index 8e050af..c055c81 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ .idea .history .pnpm-lock.yaml +.vscode diff --git a/.env.development b/.env.development index 513ea8b..335667f 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,7 @@ # 页面标题 VITE_APP_TITLE = 物联网设备管理平台 # 接口请求地址,会设置到 axios 的 baseURL 参数上 -VITE_APP_API_BASEURL = http://111.198.10.15:12206 +VITE_APP_API_BASEURL = http://111.198.10.15:11608 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/.gitignore b/.gitignore index 8e050af..c055c81 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ .idea .history .pnpm-lock.yaml +.vscode diff --git a/.vscode/settings.json b/.vscode/settings.json index 36d9981..76b609d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { "editor.codeActionsOnSave": { - "source.fixAll.eslint": true, - "source.fixAll.stylelint": true + "source.fixAll.eslint": "explicit", + "source.fixAll.stylelint": "explicit" }, "stylelint.validate": [ "css", diff --git a/.env.development b/.env.development index 513ea8b..335667f 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,7 @@ # 页面标题 VITE_APP_TITLE = 物联网设备管理平台 # 接口请求地址,会设置到 axios 的 baseURL 参数上 -VITE_APP_API_BASEURL = http://111.198.10.15:12206 +VITE_APP_API_BASEURL = http://111.198.10.15:11608 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/.gitignore b/.gitignore index 8e050af..c055c81 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ .idea .history .pnpm-lock.yaml +.vscode diff --git a/.vscode/settings.json b/.vscode/settings.json index 36d9981..76b609d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { "editor.codeActionsOnSave": { - "source.fixAll.eslint": true, - "source.fixAll.stylelint": true + "source.fixAll.eslint": "explicit", + "source.fixAll.stylelint": "explicit" }, "stylelint.validate": [ "css", diff --git a/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..fbe695a --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,5 @@ +{ + "title":"物联网设备管理平台", + "english": "IoT device management platform", + "baseUrl": "http://111.198.10.15:11608" +} diff --git a/.env.development b/.env.development index 513ea8b..335667f 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,7 @@ # 页面标题 VITE_APP_TITLE = 物联网设备管理平台 # 接口请求地址,会设置到 axios 的 baseURL 参数上 -VITE_APP_API_BASEURL = http://111.198.10.15:12206 +VITE_APP_API_BASEURL = http://111.198.10.15:11608 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/.gitignore b/.gitignore index 8e050af..c055c81 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ .idea .history .pnpm-lock.yaml +.vscode diff --git a/.vscode/settings.json b/.vscode/settings.json index 36d9981..76b609d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { "editor.codeActionsOnSave": { - "source.fixAll.eslint": true, - "source.fixAll.stylelint": true + "source.fixAll.eslint": "explicit", + "source.fixAll.stylelint": "explicit" }, "stylelint.validate": [ "css", diff --git a/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..fbe695a --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,5 @@ +{ + "title":"物联网设备管理平台", + "english": "IoT device management platform", + "baseUrl": "http://111.198.10.15:11608" +} diff --git a/public/file/device_template.xlsx b/public/file/device_template.xlsx new file mode 100644 index 0000000..84b9613 --- /dev/null +++ b/public/file/device_template.xlsx Binary files differ diff --git a/.env.development b/.env.development index 513ea8b..335667f 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,7 @@ # 页面标题 VITE_APP_TITLE = 物联网设备管理平台 # 接口请求地址,会设置到 axios 的 baseURL 参数上 -VITE_APP_API_BASEURL = http://111.198.10.15:12206 +VITE_APP_API_BASEURL = http://111.198.10.15:11608 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/.gitignore b/.gitignore index 8e050af..c055c81 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ .idea .history .pnpm-lock.yaml +.vscode diff --git a/.vscode/settings.json b/.vscode/settings.json index 36d9981..76b609d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { "editor.codeActionsOnSave": { - "source.fixAll.eslint": true, - "source.fixAll.stylelint": true + "source.fixAll.eslint": "explicit", + "source.fixAll.stylelint": "explicit" }, "stylelint.validate": [ "css", diff --git a/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..fbe695a --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,5 @@ +{ + "title":"物联网设备管理平台", + "english": "IoT device management platform", + "baseUrl": "http://111.198.10.15:11608" +} diff --git a/public/file/device_template.xlsx b/public/file/device_template.xlsx new file mode 100644 index 0000000..84b9613 --- /dev/null +++ b/public/file/device_template.xlsx Binary files differ diff --git a/src/api/basic/device.ts b/src/api/basic/device.ts index 0637168..de34630 100644 --- a/src/api/basic/device.ts +++ b/src/api/basic/device.ts @@ -73,4 +73,12 @@ }, }) } +// 导入设备 +export function batchImportDevice(data: object) { + return request({ + url: '/device/import', + method: 'post', + data, + }) +} diff --git a/.env.development b/.env.development index 513ea8b..335667f 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,7 @@ # 页面标题 VITE_APP_TITLE = 物联网设备管理平台 # 接口请求地址,会设置到 axios 的 baseURL 参数上 -VITE_APP_API_BASEURL = http://111.198.10.15:12206 +VITE_APP_API_BASEURL = http://111.198.10.15:11608 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/.gitignore b/.gitignore index 8e050af..c055c81 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ .idea .history .pnpm-lock.yaml +.vscode diff --git a/.vscode/settings.json b/.vscode/settings.json index 36d9981..76b609d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { "editor.codeActionsOnSave": { - "source.fixAll.eslint": true, - "source.fixAll.stylelint": true + "source.fixAll.eslint": "explicit", + "source.fixAll.stylelint": "explicit" }, "stylelint.validate": [ "css", diff --git a/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..fbe695a --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,5 @@ +{ + "title":"物联网设备管理平台", + "english": "IoT device management platform", + "baseUrl": "http://111.198.10.15:11608" +} diff --git a/public/file/device_template.xlsx b/public/file/device_template.xlsx new file mode 100644 index 0000000..84b9613 --- /dev/null +++ b/public/file/device_template.xlsx Binary files differ diff --git a/src/api/basic/device.ts b/src/api/basic/device.ts index 0637168..de34630 100644 --- a/src/api/basic/device.ts +++ b/src/api/basic/device.ts @@ -73,4 +73,12 @@ }, }) } +// 导入设备 +export function batchImportDevice(data: object) { + return request({ + url: '/device/import', + method: 'post', + data, + }) +} diff --git a/src/api/basic/package.ts b/src/api/basic/package.ts new file mode 100644 index 0000000..58d73cf --- /dev/null +++ b/src/api/basic/package.ts @@ -0,0 +1,37 @@ +// 升级包管理相关接口 +import request from '../index' + +// 列表 +export function getPackageListPage(data: any) { + return request({ + url: `/device/version/list-page?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 新建 +export function addPackage(data: any) { + return request({ + url: `/device/version/add`, + method: 'post', + data, + }) +} +// 更新 +export function updatePackage(data: any) { + return request({ + url: `/device/version/update`, + method: 'post', + data, + }) +} +// 删除 +export function deletePackage(ids: string[]) { + return request({ + url: `/device/version/delete`, + method: 'post', + data:{ + ids + }, + }) +} diff --git a/.env.development b/.env.development index 513ea8b..335667f 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,7 @@ # 页面标题 VITE_APP_TITLE = 物联网设备管理平台 # 接口请求地址,会设置到 axios 的 baseURL 参数上 -VITE_APP_API_BASEURL = http://111.198.10.15:12206 +VITE_APP_API_BASEURL = http://111.198.10.15:11608 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/.gitignore b/.gitignore index 8e050af..c055c81 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ .idea .history .pnpm-lock.yaml +.vscode diff --git a/.vscode/settings.json b/.vscode/settings.json index 36d9981..76b609d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { "editor.codeActionsOnSave": { - "source.fixAll.eslint": true, - "source.fixAll.stylelint": true + "source.fixAll.eslint": "explicit", + "source.fixAll.stylelint": "explicit" }, "stylelint.validate": [ "css", diff --git a/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..fbe695a --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,5 @@ +{ + "title":"物联网设备管理平台", + "english": "IoT device management platform", + "baseUrl": "http://111.198.10.15:11608" +} diff --git a/public/file/device_template.xlsx b/public/file/device_template.xlsx new file mode 100644 index 0000000..84b9613 --- /dev/null +++ b/public/file/device_template.xlsx Binary files differ diff --git a/src/api/basic/device.ts b/src/api/basic/device.ts index 0637168..de34630 100644 --- a/src/api/basic/device.ts +++ b/src/api/basic/device.ts @@ -73,4 +73,12 @@ }, }) } +// 导入设备 +export function batchImportDevice(data: object) { + return request({ + url: '/device/import', + method: 'post', + data, + }) +} diff --git a/src/api/basic/package.ts b/src/api/basic/package.ts new file mode 100644 index 0000000..58d73cf --- /dev/null +++ b/src/api/basic/package.ts @@ -0,0 +1,37 @@ +// 升级包管理相关接口 +import request from '../index' + +// 列表 +export function getPackageListPage(data: any) { + return request({ + url: `/device/version/list-page?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 新建 +export function addPackage(data: any) { + return request({ + url: `/device/version/add`, + method: 'post', + data, + }) +} +// 更新 +export function updatePackage(data: any) { + return request({ + url: `/device/version/update`, + method: 'post', + data, + }) +} +// 删除 +export function deletePackage(ids: string[]) { + return request({ + url: `/device/version/delete`, + method: 'post', + data:{ + ids + }, + }) +} diff --git a/src/api/basic/subscribe.ts b/src/api/basic/subscribe.ts new file mode 100644 index 0000000..1174fb3 --- /dev/null +++ b/src/api/basic/subscribe.ts @@ -0,0 +1,40 @@ +// 分组-订阅管理相关接口 +import request from '../index' + + +// 获取列表 +export function getSubscribeListPage(data: any) { + return request({ + url: `/subscribe/store/list-page?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 新增 +export function addSubscribe(data: any) { + return request({ + url: `/subscribe/store/add`, + method: 'post', + data, + }) +} + +// 编辑 +export function editSubscribe(data: any) { + return request({ + url: `/subscribe/store/update`, + method: 'post', + data, + }) +} + +// 删除 +export function deleteSubscribe(ids: string[]) { + return request({ + url: `/subscribe/store/delete`, + method: 'post', + data:{ + ids + }, + }) +} diff --git a/.env.development b/.env.development index 513ea8b..335667f 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,7 @@ # 页面标题 VITE_APP_TITLE = 物联网设备管理平台 # 接口请求地址,会设置到 axios 的 baseURL 参数上 -VITE_APP_API_BASEURL = http://111.198.10.15:12206 +VITE_APP_API_BASEURL = http://111.198.10.15:11608 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/.gitignore b/.gitignore index 8e050af..c055c81 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ .idea .history .pnpm-lock.yaml +.vscode diff --git a/.vscode/settings.json b/.vscode/settings.json index 36d9981..76b609d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { "editor.codeActionsOnSave": { - "source.fixAll.eslint": true, - "source.fixAll.stylelint": true + "source.fixAll.eslint": "explicit", + "source.fixAll.stylelint": "explicit" }, "stylelint.validate": [ "css", diff --git a/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..fbe695a --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,5 @@ +{ + "title":"物联网设备管理平台", + "english": "IoT device management platform", + "baseUrl": "http://111.198.10.15:11608" +} diff --git a/public/file/device_template.xlsx b/public/file/device_template.xlsx new file mode 100644 index 0000000..84b9613 --- /dev/null +++ b/public/file/device_template.xlsx Binary files differ diff --git a/src/api/basic/device.ts b/src/api/basic/device.ts index 0637168..de34630 100644 --- a/src/api/basic/device.ts +++ b/src/api/basic/device.ts @@ -73,4 +73,12 @@ }, }) } +// 导入设备 +export function batchImportDevice(data: object) { + return request({ + url: '/device/import', + method: 'post', + data, + }) +} diff --git a/src/api/basic/package.ts b/src/api/basic/package.ts new file mode 100644 index 0000000..58d73cf --- /dev/null +++ b/src/api/basic/package.ts @@ -0,0 +1,37 @@ +// 升级包管理相关接口 +import request from '../index' + +// 列表 +export function getPackageListPage(data: any) { + return request({ + url: `/device/version/list-page?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 新建 +export function addPackage(data: any) { + return request({ + url: `/device/version/add`, + method: 'post', + data, + }) +} +// 更新 +export function updatePackage(data: any) { + return request({ + url: `/device/version/update`, + method: 'post', + data, + }) +} +// 删除 +export function deletePackage(ids: string[]) { + return request({ + url: `/device/version/delete`, + method: 'post', + data:{ + ids + }, + }) +} diff --git a/src/api/basic/subscribe.ts b/src/api/basic/subscribe.ts new file mode 100644 index 0000000..1174fb3 --- /dev/null +++ b/src/api/basic/subscribe.ts @@ -0,0 +1,40 @@ +// 分组-订阅管理相关接口 +import request from '../index' + + +// 获取列表 +export function getSubscribeListPage(data: any) { + return request({ + url: `/subscribe/store/list-page?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 新增 +export function addSubscribe(data: any) { + return request({ + url: `/subscribe/store/add`, + method: 'post', + data, + }) +} + +// 编辑 +export function editSubscribe(data: any) { + return request({ + url: `/subscribe/store/update`, + method: 'post', + data, + }) +} + +// 删除 +export function deleteSubscribe(ids: string[]) { + return request({ + url: `/subscribe/store/delete`, + method: 'post', + data:{ + ids + }, + }) +} diff --git a/src/api/basic/task.ts b/src/api/basic/task.ts new file mode 100644 index 0000000..443a1d6 --- /dev/null +++ b/src/api/basic/task.ts @@ -0,0 +1,37 @@ +// 升级任务管理相关接口 +import request from '../index' + +// 列表 +export function getTaskListPage(data: any) { + return request({ + url: `/device/upgrade/task/list-page?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 新建 +export function addTask(data: any) { + return request({ + url: `/device/upgrade/task/add`, + method: 'post', + data, + }) +} +// // 更新 +// export function updatePackage(data: any) { +// return request({ +// url: `/device/version/update`, +// method: 'post', +// data, +// }) +// } +// 删除 +export function deleteTask(ids: string[]) { + return request({ + url: `/device/upgrade/task/delete`, + method: 'post', + data:{ + ids + }, + }) +} diff --git a/.env.development b/.env.development index 513ea8b..335667f 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,7 @@ # 页面标题 VITE_APP_TITLE = 物联网设备管理平台 # 接口请求地址,会设置到 axios 的 baseURL 参数上 -VITE_APP_API_BASEURL = http://111.198.10.15:12206 +VITE_APP_API_BASEURL = http://111.198.10.15:11608 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/.gitignore b/.gitignore index 8e050af..c055c81 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ .idea .history .pnpm-lock.yaml +.vscode diff --git a/.vscode/settings.json b/.vscode/settings.json index 36d9981..76b609d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { "editor.codeActionsOnSave": { - "source.fixAll.eslint": true, - "source.fixAll.stylelint": true + "source.fixAll.eslint": "explicit", + "source.fixAll.stylelint": "explicit" }, "stylelint.validate": [ "css", diff --git a/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..fbe695a --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,5 @@ +{ + "title":"物联网设备管理平台", + "english": "IoT device management platform", + "baseUrl": "http://111.198.10.15:11608" +} diff --git a/public/file/device_template.xlsx b/public/file/device_template.xlsx new file mode 100644 index 0000000..84b9613 --- /dev/null +++ b/public/file/device_template.xlsx Binary files differ diff --git a/src/api/basic/device.ts b/src/api/basic/device.ts index 0637168..de34630 100644 --- a/src/api/basic/device.ts +++ b/src/api/basic/device.ts @@ -73,4 +73,12 @@ }, }) } +// 导入设备 +export function batchImportDevice(data: object) { + return request({ + url: '/device/import', + method: 'post', + data, + }) +} diff --git a/src/api/basic/package.ts b/src/api/basic/package.ts new file mode 100644 index 0000000..58d73cf --- /dev/null +++ b/src/api/basic/package.ts @@ -0,0 +1,37 @@ +// 升级包管理相关接口 +import request from '../index' + +// 列表 +export function getPackageListPage(data: any) { + return request({ + url: `/device/version/list-page?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 新建 +export function addPackage(data: any) { + return request({ + url: `/device/version/add`, + method: 'post', + data, + }) +} +// 更新 +export function updatePackage(data: any) { + return request({ + url: `/device/version/update`, + method: 'post', + data, + }) +} +// 删除 +export function deletePackage(ids: string[]) { + return request({ + url: `/device/version/delete`, + method: 'post', + data:{ + ids + }, + }) +} diff --git a/src/api/basic/subscribe.ts b/src/api/basic/subscribe.ts new file mode 100644 index 0000000..1174fb3 --- /dev/null +++ b/src/api/basic/subscribe.ts @@ -0,0 +1,40 @@ +// 分组-订阅管理相关接口 +import request from '../index' + + +// 获取列表 +export function getSubscribeListPage(data: any) { + return request({ + url: `/subscribe/store/list-page?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 新增 +export function addSubscribe(data: any) { + return request({ + url: `/subscribe/store/add`, + method: 'post', + data, + }) +} + +// 编辑 +export function editSubscribe(data: any) { + return request({ + url: `/subscribe/store/update`, + method: 'post', + data, + }) +} + +// 删除 +export function deleteSubscribe(ids: string[]) { + return request({ + url: `/subscribe/store/delete`, + method: 'post', + data:{ + ids + }, + }) +} diff --git a/src/api/basic/task.ts b/src/api/basic/task.ts new file mode 100644 index 0000000..443a1d6 --- /dev/null +++ b/src/api/basic/task.ts @@ -0,0 +1,37 @@ +// 升级任务管理相关接口 +import request from '../index' + +// 列表 +export function getTaskListPage(data: any) { + return request({ + url: `/device/upgrade/task/list-page?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 新建 +export function addTask(data: any) { + return request({ + url: `/device/upgrade/task/add`, + method: 'post', + data, + }) +} +// // 更新 +// export function updatePackage(data: any) { +// return request({ +// url: `/device/version/update`, +// method: 'post', +// data, +// }) +// } +// 删除 +export function deleteTask(ids: string[]) { + return request({ + url: `/device/upgrade/task/delete`, + method: 'post', + data:{ + ids + }, + }) +} diff --git a/src/api/common.ts b/src/api/common.ts new file mode 100644 index 0000000..50dee09 --- /dev/null +++ b/src/api/common.ts @@ -0,0 +1,29 @@ +/** + * 公共接口 + */ +import request from './index' +// 上传文件 +export function uploadFile(data: FormData) { + return request({ + url: 'minio/file/upload', + method: 'post', + data, + }) +} + +// 获取文件地址 +export function getFileUrl(fileName: string) { + return request({ + url: `/minio/file/url?fileName=${fileName}`, + method: 'get', + }) +} + +// 下载文件 +export function downloadFile(fileName: string) { + return request({ + url: `/minio/file/download/stream?fileName=${fileName}`, + method: 'post', + responseType: 'blob', + }) +} diff --git a/.env.development b/.env.development index 513ea8b..335667f 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,7 @@ # 页面标题 VITE_APP_TITLE = 物联网设备管理平台 # 接口请求地址,会设置到 axios 的 baseURL 参数上 -VITE_APP_API_BASEURL = http://111.198.10.15:12206 +VITE_APP_API_BASEURL = http://111.198.10.15:11608 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/.gitignore b/.gitignore index 8e050af..c055c81 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ .idea .history .pnpm-lock.yaml +.vscode diff --git a/.vscode/settings.json b/.vscode/settings.json index 36d9981..76b609d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { "editor.codeActionsOnSave": { - "source.fixAll.eslint": true, - "source.fixAll.stylelint": true + "source.fixAll.eslint": "explicit", + "source.fixAll.stylelint": "explicit" }, "stylelint.validate": [ "css", diff --git a/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..fbe695a --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,5 @@ +{ + "title":"物联网设备管理平台", + "english": "IoT device management platform", + "baseUrl": "http://111.198.10.15:11608" +} diff --git a/public/file/device_template.xlsx b/public/file/device_template.xlsx new file mode 100644 index 0000000..84b9613 --- /dev/null +++ b/public/file/device_template.xlsx Binary files differ diff --git a/src/api/basic/device.ts b/src/api/basic/device.ts index 0637168..de34630 100644 --- a/src/api/basic/device.ts +++ b/src/api/basic/device.ts @@ -73,4 +73,12 @@ }, }) } +// 导入设备 +export function batchImportDevice(data: object) { + return request({ + url: '/device/import', + method: 'post', + data, + }) +} diff --git a/src/api/basic/package.ts b/src/api/basic/package.ts new file mode 100644 index 0000000..58d73cf --- /dev/null +++ b/src/api/basic/package.ts @@ -0,0 +1,37 @@ +// 升级包管理相关接口 +import request from '../index' + +// 列表 +export function getPackageListPage(data: any) { + return request({ + url: `/device/version/list-page?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 新建 +export function addPackage(data: any) { + return request({ + url: `/device/version/add`, + method: 'post', + data, + }) +} +// 更新 +export function updatePackage(data: any) { + return request({ + url: `/device/version/update`, + method: 'post', + data, + }) +} +// 删除 +export function deletePackage(ids: string[]) { + return request({ + url: `/device/version/delete`, + method: 'post', + data:{ + ids + }, + }) +} diff --git a/src/api/basic/subscribe.ts b/src/api/basic/subscribe.ts new file mode 100644 index 0000000..1174fb3 --- /dev/null +++ b/src/api/basic/subscribe.ts @@ -0,0 +1,40 @@ +// 分组-订阅管理相关接口 +import request from '../index' + + +// 获取列表 +export function getSubscribeListPage(data: any) { + return request({ + url: `/subscribe/store/list-page?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 新增 +export function addSubscribe(data: any) { + return request({ + url: `/subscribe/store/add`, + method: 'post', + data, + }) +} + +// 编辑 +export function editSubscribe(data: any) { + return request({ + url: `/subscribe/store/update`, + method: 'post', + data, + }) +} + +// 删除 +export function deleteSubscribe(ids: string[]) { + return request({ + url: `/subscribe/store/delete`, + method: 'post', + data:{ + ids + }, + }) +} diff --git a/src/api/basic/task.ts b/src/api/basic/task.ts new file mode 100644 index 0000000..443a1d6 --- /dev/null +++ b/src/api/basic/task.ts @@ -0,0 +1,37 @@ +// 升级任务管理相关接口 +import request from '../index' + +// 列表 +export function getTaskListPage(data: any) { + return request({ + url: `/device/upgrade/task/list-page?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 新建 +export function addTask(data: any) { + return request({ + url: `/device/upgrade/task/add`, + method: 'post', + data, + }) +} +// // 更新 +// export function updatePackage(data: any) { +// return request({ +// url: `/device/version/update`, +// method: 'post', +// data, +// }) +// } +// 删除 +export function deleteTask(ids: string[]) { + return request({ + url: `/device/upgrade/task/delete`, + method: 'post', + data:{ + ids + }, + }) +} diff --git a/src/api/common.ts b/src/api/common.ts new file mode 100644 index 0000000..50dee09 --- /dev/null +++ b/src/api/common.ts @@ -0,0 +1,29 @@ +/** + * 公共接口 + */ +import request from './index' +// 上传文件 +export function uploadFile(data: FormData) { + return request({ + url: 'minio/file/upload', + method: 'post', + data, + }) +} + +// 获取文件地址 +export function getFileUrl(fileName: string) { + return request({ + url: `/minio/file/url?fileName=${fileName}`, + method: 'get', + }) +} + +// 下载文件 +export function downloadFile(fileName: string) { + return request({ + url: `/minio/file/download/stream?fileName=${fileName}`, + method: 'post', + responseType: 'blob', + }) +} diff --git a/src/api/data/alarm.ts b/src/api/data/alarm.ts new file mode 100644 index 0000000..d03eb43 --- /dev/null +++ b/src/api/data/alarm.ts @@ -0,0 +1,29 @@ +// 报警查询相关接口 +import request from '../index' + +// 列表 +export function getAlarmListPage(data: any) { + return request({ + url: `/alarm/data/list-page?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +export function deleteAlarm(ids: string[]) { + return request({ + url: `/alarm/data/delete`, + method: 'post', + data:{ + ids + }, + }) +} + +export function exportAlarm(data: object) { + return request({ + url: `/alarm/data/list-export`, + responseType: 'blob', + method: 'post', + data, + }) +} diff --git a/.env.development b/.env.development index 513ea8b..335667f 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,7 @@ # 页面标题 VITE_APP_TITLE = 物联网设备管理平台 # 接口请求地址,会设置到 axios 的 baseURL 参数上 -VITE_APP_API_BASEURL = http://111.198.10.15:12206 +VITE_APP_API_BASEURL = http://111.198.10.15:11608 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/.gitignore b/.gitignore index 8e050af..c055c81 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ .idea .history .pnpm-lock.yaml +.vscode diff --git a/.vscode/settings.json b/.vscode/settings.json index 36d9981..76b609d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { "editor.codeActionsOnSave": { - "source.fixAll.eslint": true, - "source.fixAll.stylelint": true + "source.fixAll.eslint": "explicit", + "source.fixAll.stylelint": "explicit" }, "stylelint.validate": [ "css", diff --git a/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..fbe695a --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,5 @@ +{ + "title":"物联网设备管理平台", + "english": "IoT device management platform", + "baseUrl": "http://111.198.10.15:11608" +} diff --git a/public/file/device_template.xlsx b/public/file/device_template.xlsx new file mode 100644 index 0000000..84b9613 --- /dev/null +++ b/public/file/device_template.xlsx Binary files differ diff --git a/src/api/basic/device.ts b/src/api/basic/device.ts index 0637168..de34630 100644 --- a/src/api/basic/device.ts +++ b/src/api/basic/device.ts @@ -73,4 +73,12 @@ }, }) } +// 导入设备 +export function batchImportDevice(data: object) { + return request({ + url: '/device/import', + method: 'post', + data, + }) +} diff --git a/src/api/basic/package.ts b/src/api/basic/package.ts new file mode 100644 index 0000000..58d73cf --- /dev/null +++ b/src/api/basic/package.ts @@ -0,0 +1,37 @@ +// 升级包管理相关接口 +import request from '../index' + +// 列表 +export function getPackageListPage(data: any) { + return request({ + url: `/device/version/list-page?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 新建 +export function addPackage(data: any) { + return request({ + url: `/device/version/add`, + method: 'post', + data, + }) +} +// 更新 +export function updatePackage(data: any) { + return request({ + url: `/device/version/update`, + method: 'post', + data, + }) +} +// 删除 +export function deletePackage(ids: string[]) { + return request({ + url: `/device/version/delete`, + method: 'post', + data:{ + ids + }, + }) +} diff --git a/src/api/basic/subscribe.ts b/src/api/basic/subscribe.ts new file mode 100644 index 0000000..1174fb3 --- /dev/null +++ b/src/api/basic/subscribe.ts @@ -0,0 +1,40 @@ +// 分组-订阅管理相关接口 +import request from '../index' + + +// 获取列表 +export function getSubscribeListPage(data: any) { + return request({ + url: `/subscribe/store/list-page?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 新增 +export function addSubscribe(data: any) { + return request({ + url: `/subscribe/store/add`, + method: 'post', + data, + }) +} + +// 编辑 +export function editSubscribe(data: any) { + return request({ + url: `/subscribe/store/update`, + method: 'post', + data, + }) +} + +// 删除 +export function deleteSubscribe(ids: string[]) { + return request({ + url: `/subscribe/store/delete`, + method: 'post', + data:{ + ids + }, + }) +} diff --git a/src/api/basic/task.ts b/src/api/basic/task.ts new file mode 100644 index 0000000..443a1d6 --- /dev/null +++ b/src/api/basic/task.ts @@ -0,0 +1,37 @@ +// 升级任务管理相关接口 +import request from '../index' + +// 列表 +export function getTaskListPage(data: any) { + return request({ + url: `/device/upgrade/task/list-page?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 新建 +export function addTask(data: any) { + return request({ + url: `/device/upgrade/task/add`, + method: 'post', + data, + }) +} +// // 更新 +// export function updatePackage(data: any) { +// return request({ +// url: `/device/version/update`, +// method: 'post', +// data, +// }) +// } +// 删除 +export function deleteTask(ids: string[]) { + return request({ + url: `/device/upgrade/task/delete`, + method: 'post', + data:{ + ids + }, + }) +} diff --git a/src/api/common.ts b/src/api/common.ts new file mode 100644 index 0000000..50dee09 --- /dev/null +++ b/src/api/common.ts @@ -0,0 +1,29 @@ +/** + * 公共接口 + */ +import request from './index' +// 上传文件 +export function uploadFile(data: FormData) { + return request({ + url: 'minio/file/upload', + method: 'post', + data, + }) +} + +// 获取文件地址 +export function getFileUrl(fileName: string) { + return request({ + url: `/minio/file/url?fileName=${fileName}`, + method: 'get', + }) +} + +// 下载文件 +export function downloadFile(fileName: string) { + return request({ + url: `/minio/file/download/stream?fileName=${fileName}`, + method: 'post', + responseType: 'blob', + }) +} diff --git a/src/api/data/alarm.ts b/src/api/data/alarm.ts new file mode 100644 index 0000000..d03eb43 --- /dev/null +++ b/src/api/data/alarm.ts @@ -0,0 +1,29 @@ +// 报警查询相关接口 +import request from '../index' + +// 列表 +export function getAlarmListPage(data: any) { + return request({ + url: `/alarm/data/list-page?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +export function deleteAlarm(ids: string[]) { + return request({ + url: `/alarm/data/delete`, + method: 'post', + data:{ + ids + }, + }) +} + +export function exportAlarm(data: object) { + return request({ + url: `/alarm/data/list-export`, + responseType: 'blob', + method: 'post', + data, + }) +} diff --git a/src/api/index.ts b/src/api/index.ts index 87d5969..59915d9 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -24,7 +24,8 @@ } const request = axios.create({ - baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL, + // baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL, + baseURL: window.localStorage.getItem('baseURL-lot-platform') as string, timeout: 1000 * 60, responseType: 'json', }) diff --git a/.env.development b/.env.development index 513ea8b..335667f 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,7 @@ # 页面标题 VITE_APP_TITLE = 物联网设备管理平台 # 接口请求地址,会设置到 axios 的 baseURL 参数上 -VITE_APP_API_BASEURL = http://111.198.10.15:12206 +VITE_APP_API_BASEURL = http://111.198.10.15:11608 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/.gitignore b/.gitignore index 8e050af..c055c81 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ .idea .history .pnpm-lock.yaml +.vscode diff --git a/.vscode/settings.json b/.vscode/settings.json index 36d9981..76b609d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { "editor.codeActionsOnSave": { - "source.fixAll.eslint": true, - "source.fixAll.stylelint": true + "source.fixAll.eslint": "explicit", + "source.fixAll.stylelint": "explicit" }, "stylelint.validate": [ "css", diff --git a/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..fbe695a --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,5 @@ +{ + "title":"物联网设备管理平台", + "english": "IoT device management platform", + "baseUrl": "http://111.198.10.15:11608" +} diff --git a/public/file/device_template.xlsx b/public/file/device_template.xlsx new file mode 100644 index 0000000..84b9613 --- /dev/null +++ b/public/file/device_template.xlsx Binary files differ diff --git a/src/api/basic/device.ts b/src/api/basic/device.ts index 0637168..de34630 100644 --- a/src/api/basic/device.ts +++ b/src/api/basic/device.ts @@ -73,4 +73,12 @@ }, }) } +// 导入设备 +export function batchImportDevice(data: object) { + return request({ + url: '/device/import', + method: 'post', + data, + }) +} diff --git a/src/api/basic/package.ts b/src/api/basic/package.ts new file mode 100644 index 0000000..58d73cf --- /dev/null +++ b/src/api/basic/package.ts @@ -0,0 +1,37 @@ +// 升级包管理相关接口 +import request from '../index' + +// 列表 +export function getPackageListPage(data: any) { + return request({ + url: `/device/version/list-page?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 新建 +export function addPackage(data: any) { + return request({ + url: `/device/version/add`, + method: 'post', + data, + }) +} +// 更新 +export function updatePackage(data: any) { + return request({ + url: `/device/version/update`, + method: 'post', + data, + }) +} +// 删除 +export function deletePackage(ids: string[]) { + return request({ + url: `/device/version/delete`, + method: 'post', + data:{ + ids + }, + }) +} diff --git a/src/api/basic/subscribe.ts b/src/api/basic/subscribe.ts new file mode 100644 index 0000000..1174fb3 --- /dev/null +++ b/src/api/basic/subscribe.ts @@ -0,0 +1,40 @@ +// 分组-订阅管理相关接口 +import request from '../index' + + +// 获取列表 +export function getSubscribeListPage(data: any) { + return request({ + url: `/subscribe/store/list-page?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 新增 +export function addSubscribe(data: any) { + return request({ + url: `/subscribe/store/add`, + method: 'post', + data, + }) +} + +// 编辑 +export function editSubscribe(data: any) { + return request({ + url: `/subscribe/store/update`, + method: 'post', + data, + }) +} + +// 删除 +export function deleteSubscribe(ids: string[]) { + return request({ + url: `/subscribe/store/delete`, + method: 'post', + data:{ + ids + }, + }) +} diff --git a/src/api/basic/task.ts b/src/api/basic/task.ts new file mode 100644 index 0000000..443a1d6 --- /dev/null +++ b/src/api/basic/task.ts @@ -0,0 +1,37 @@ +// 升级任务管理相关接口 +import request from '../index' + +// 列表 +export function getTaskListPage(data: any) { + return request({ + url: `/device/upgrade/task/list-page?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 新建 +export function addTask(data: any) { + return request({ + url: `/device/upgrade/task/add`, + method: 'post', + data, + }) +} +// // 更新 +// export function updatePackage(data: any) { +// return request({ +// url: `/device/version/update`, +// method: 'post', +// data, +// }) +// } +// 删除 +export function deleteTask(ids: string[]) { + return request({ + url: `/device/upgrade/task/delete`, + method: 'post', + data:{ + ids + }, + }) +} diff --git a/src/api/common.ts b/src/api/common.ts new file mode 100644 index 0000000..50dee09 --- /dev/null +++ b/src/api/common.ts @@ -0,0 +1,29 @@ +/** + * 公共接口 + */ +import request from './index' +// 上传文件 +export function uploadFile(data: FormData) { + return request({ + url: 'minio/file/upload', + method: 'post', + data, + }) +} + +// 获取文件地址 +export function getFileUrl(fileName: string) { + return request({ + url: `/minio/file/url?fileName=${fileName}`, + method: 'get', + }) +} + +// 下载文件 +export function downloadFile(fileName: string) { + return request({ + url: `/minio/file/download/stream?fileName=${fileName}`, + method: 'post', + responseType: 'blob', + }) +} diff --git a/src/api/data/alarm.ts b/src/api/data/alarm.ts new file mode 100644 index 0000000..d03eb43 --- /dev/null +++ b/src/api/data/alarm.ts @@ -0,0 +1,29 @@ +// 报警查询相关接口 +import request from '../index' + +// 列表 +export function getAlarmListPage(data: any) { + return request({ + url: `/alarm/data/list-page?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +export function deleteAlarm(ids: string[]) { + return request({ + url: `/alarm/data/delete`, + method: 'post', + data:{ + ids + }, + }) +} + +export function exportAlarm(data: object) { + return request({ + url: `/alarm/data/list-export`, + responseType: 'blob', + method: 'post', + data, + }) +} diff --git a/src/api/index.ts b/src/api/index.ts index 87d5969..59915d9 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -24,7 +24,8 @@ } const request = axios.create({ - baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL, + // baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL, + baseURL: window.localStorage.getItem('baseURL-lot-platform') as string, timeout: 1000 * 60, responseType: 'json', }) diff --git a/src/assets/icons/icon-dashboard.svg b/src/assets/icons/icon-dashboard.svg new file mode 100644 index 0000000..990fe35 --- /dev/null +++ b/src/assets/icons/icon-dashboard.svg @@ -0,0 +1 @@ + diff --git a/.env.development b/.env.development index 513ea8b..335667f 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,7 @@ # 页面标题 VITE_APP_TITLE = 物联网设备管理平台 # 接口请求地址,会设置到 axios 的 baseURL 参数上 -VITE_APP_API_BASEURL = http://111.198.10.15:12206 +VITE_APP_API_BASEURL = http://111.198.10.15:11608 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/.gitignore b/.gitignore index 8e050af..c055c81 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ .idea .history .pnpm-lock.yaml +.vscode diff --git a/.vscode/settings.json b/.vscode/settings.json index 36d9981..76b609d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { "editor.codeActionsOnSave": { - "source.fixAll.eslint": true, - "source.fixAll.stylelint": true + "source.fixAll.eslint": "explicit", + "source.fixAll.stylelint": "explicit" }, "stylelint.validate": [ "css", diff --git a/public/config/config.json b/public/config/config.json new file mode 100644 index 0000000..fbe695a --- /dev/null +++ b/public/config/config.json @@ -0,0 +1,5 @@ +{ + "title":"物联网设备管理平台", + "english": "IoT device management platform", + "baseUrl": "http://111.198.10.15:11608" +} diff --git a/public/file/device_template.xlsx b/public/file/device_template.xlsx new file mode 100644 index 0000000..84b9613 --- /dev/null +++ b/public/file/device_template.xlsx Binary files differ diff --git a/src/api/basic/device.ts b/src/api/basic/device.ts index 0637168..de34630 100644 --- a/src/api/basic/device.ts +++ b/src/api/basic/device.ts @@ -73,4 +73,12 @@ }, }) } +// 导入设备 +export function batchImportDevice(data: object) { + return request({ + url: '/device/import', + method: 'post', + data, + }) +} diff --git a/src/api/basic/package.ts b/src/api/basic/package.ts new file mode 100644 index 0000000..58d73cf --- /dev/null +++ b/src/api/basic/package.ts @@ -0,0 +1,37 @@ +// 升级包管理相关接口 +import request from '../index' + +// 列表 +export function getPackageListPage(data: any) { + return request({ + url: `/device/version/list-page?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 新建 +export function addPackage(data: any) { + return request({ + url: `/device/version/add`, + method: 'post', + data, + }) +} +// 更新 +export function updatePackage(data: any) { + return request({ + url: `/device/version/update`, + method: 'post', + data, + }) +} +// 删除 +export function deletePackage(ids: string[]) { + return request({ + url: `/device/version/delete`, + method: 'post', + data:{ + ids + }, + }) +} diff --git a/src/api/basic/subscribe.ts b/src/api/basic/subscribe.ts new file mode 100644 index 0000000..1174fb3 --- /dev/null +++ b/src/api/basic/subscribe.ts @@ -0,0 +1,40 @@ +// 分组-订阅管理相关接口 +import request from '../index' + + +// 获取列表 +export function getSubscribeListPage(data: any) { + return request({ + url: `/subscribe/store/list-page?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 新增 +export function addSubscribe(data: any) { + return request({ + url: `/subscribe/store/add`, + method: 'post', + data, + }) +} + +// 编辑 +export function editSubscribe(data: any) { + return request({ + url: `/subscribe/store/update`, + method: 'post', + data, + }) +} + +// 删除 +export function deleteSubscribe(ids: string[]) { + return request({ + url: `/subscribe/store/delete`, + method: 'post', + data:{ + ids + }, + }) +} diff --git a/src/api/basic/task.ts b/src/api/basic/task.ts new file mode 100644 index 0000000..443a1d6 --- /dev/null +++ b/src/api/basic/task.ts @@ -0,0 +1,37 @@ +// 升级任务管理相关接口 +import request from '../index' + +// 列表 +export function getTaskListPage(data: any) { + return request({ + url: `/device/upgrade/task/list-page?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +// 新建 +export function addTask(data: any) { + return request({ + url: `/device/upgrade/task/add`, + method: 'post', + data, + }) +} +// // 更新 +// export function updatePackage(data: any) { +// return request({ +// url: `/device/version/update`, +// method: 'post', +// data, +// }) +// } +// 删除 +export function deleteTask(ids: string[]) { + return request({ + url: `/device/upgrade/task/delete`, + method: 'post', + data:{ + ids + }, + }) +} diff --git a/src/api/common.ts b/src/api/common.ts new file mode 100644 index 0000000..50dee09 --- /dev/null +++ b/src/api/common.ts @@ -0,0 +1,29 @@ +/** + * 公共接口 + */ +import request from './index' +// 上传文件 +export function uploadFile(data: FormData) { + return request({ + url: 'minio/file/upload', + method: 'post', + data, + }) +} + +// 获取文件地址 +export function getFileUrl(fileName: string) { + return request({ + url: `/minio/file/url?fileName=${fileName}`, + method: 'get', + }) +} + +// 下载文件 +export function downloadFile(fileName: string) { + return request({ + url: `/minio/file/download/stream?fileName=${fileName}`, + method: 'post', + responseType: 'blob', + }) +} diff --git a/src/api/data/alarm.ts b/src/api/data/alarm.ts new file mode 100644 index 0000000..d03eb43 --- /dev/null +++ b/src/api/data/alarm.ts @@ -0,0 +1,29 @@ +// 报警查询相关接口 +import request from '../index' + +// 列表 +export function getAlarmListPage(data: any) { + return request({ + url: `/alarm/data/list-page?limit=${data.limit}&offset=${data.offset}`, + method: 'post', + data, + }) +} +export function deleteAlarm(ids: string[]) { + return request({ + url: `/alarm/data/delete`, + method: 'post', + data:{ + ids + }, + }) +} + +export function exportAlarm(data: object) { + return request({ + url: `/alarm/data/list-export`, + responseType: 'blob', + method: 'post', + data, + }) +} diff --git a/src/api/index.ts b/src/api/index.ts index 87d5969..59915d9 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -24,7 +24,8 @@ } const request = axios.create({ - baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL, + // baseURL: import.meta.env.DEV && import.meta.env.VITE_OPEN_PROXY === 'true' ? '/proxy/' : import.meta.env.VITE_APP_API_BASEURL, + baseURL: window.localStorage.getItem('baseURL-lot-platform') as string, timeout: 1000 * 60, responseType: 'json', }) diff --git a/src/assets/icons/icon-dashboard.svg b/src/assets/icons/icon-dashboard.svg new file mode 100644 index 0000000..990fe35 --- /dev/null +++ b/src/assets/icons/icon-dashboard.svg @@ -0,0 +1 @@ + diff --git a/src/components/SearchArea/index.vue b/src/components/SearchArea/index.vue index 475f4ad..757c0c9 100644 --- a/src/components/SearchArea/index.vue +++ b/src/components/SearchArea/index.vue @@ -68,7 +68,7 @@