diff --git a/src/api/environment/data.js b/src/api/environment/data.js new file mode 100644 index 0000000..1c2df04 --- /dev/null +++ b/src/api/environment/data.js @@ -0,0 +1,42 @@ +/** + * 数据管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 单设备数据查询 +export function getRealDataByDevice() { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 全部设备实时数据查询 +export function getRealData() { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 单设备历史数据查询 +export function getHistoryData(params) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params + }) +} + +// 历史记录批量导出 +export function batchExportData(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/environment/data.js b/src/api/environment/data.js new file mode 100644 index 0000000..1c2df04 --- /dev/null +++ b/src/api/environment/data.js @@ -0,0 +1,42 @@ +/** + * 数据管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 单设备数据查询 +export function getRealDataByDevice() { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 全部设备实时数据查询 +export function getRealData() { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 单设备历史数据查询 +export function getHistoryData(params) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params + }) +} + +// 历史记录批量导出 +export function batchExportData(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/environment/device.js b/src/api/environment/device.js index 04bc9dd..ea00ad5 100644 --- a/src/api/environment/device.js +++ b/src/api/environment/device.js @@ -1,18 +1,18 @@ /** - * 公厕管理接口 + * 设备管理接口 */ import request from '@/utils/request' import qs from 'qs' -// 公厕查询 -export function getToiletListPage(params) { +// 设备查询 +export function getDeviceListPage(params) { return request({ url: '/sanitation/toilet/listPage', method: 'get', params }) } -// 公厕查询 -export function getToiletList(pid) { +// 设备查询 +export function getDeviceList(pid) { return request({ url: '/sanitation/toilet/list', method: 'get', @@ -22,24 +22,24 @@ }) } -// 添加公厕 -export function addToilet(params) { +// 添加设备 +export function addDevice(params) { return request({ url: '/sanitation/toilet/add', method: 'post', params }) } -// 修改公厕机构 -export function updateToilet(params) { +// 修改设备机构 +export function updateDevice(params) { return request({ url: '/sanitation/toilet/update', method: 'post', params }) } -// 删除公厕机构 -export function delToilet(ids) { +// 删除设备机构 +export function delDevice(ids) { return request({ url: '/sanitation/toilet/delete', method: 'post', @@ -52,8 +52,8 @@ }) } -// 公厕查询 -export function getToiletCleanListPage(params) { +// 设备查询 +export function getDeviceCleanListPage(params) { return request({ url: '/sanitation/toilet/jobRecord', method: 'get', @@ -62,7 +62,7 @@ } // 批量导入 -export function batchImportToilet(fileobj) { +export function batchImportDevice(fileobj) { const param = new FormData() param.append('file', fileobj) return request({ @@ -73,7 +73,7 @@ }) } // 批量导出 -export function batchExportToilet(params, config) { +export function batchExportDevice(params, config) { return request({ url: '/sanitation/toilet/export', method: 'get', @@ -83,24 +83,3 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } - -// 公厕保洁记录查询 -export function getToiletJobRecords(params) { - return request({ - url: '/sanitation/toilet/jobRecord', - method: 'get', - params - }) -} - -// 批量导出 -export function batchExportToiletJobRecords(params, config) { - return request({ - url: '/sanitation/toilet/exportJobRecord', - method: 'get', - timeout: 120000, - params, - ...config, - responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob - }) -} diff --git a/src/api/environment/data.js b/src/api/environment/data.js new file mode 100644 index 0000000..1c2df04 --- /dev/null +++ b/src/api/environment/data.js @@ -0,0 +1,42 @@ +/** + * 数据管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 单设备数据查询 +export function getRealDataByDevice() { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 全部设备实时数据查询 +export function getRealData() { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 单设备历史数据查询 +export function getHistoryData(params) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params + }) +} + +// 历史记录批量导出 +export function batchExportData(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/environment/device.js b/src/api/environment/device.js index 04bc9dd..ea00ad5 100644 --- a/src/api/environment/device.js +++ b/src/api/environment/device.js @@ -1,18 +1,18 @@ /** - * 公厕管理接口 + * 设备管理接口 */ import request from '@/utils/request' import qs from 'qs' -// 公厕查询 -export function getToiletListPage(params) { +// 设备查询 +export function getDeviceListPage(params) { return request({ url: '/sanitation/toilet/listPage', method: 'get', params }) } -// 公厕查询 -export function getToiletList(pid) { +// 设备查询 +export function getDeviceList(pid) { return request({ url: '/sanitation/toilet/list', method: 'get', @@ -22,24 +22,24 @@ }) } -// 添加公厕 -export function addToilet(params) { +// 添加设备 +export function addDevice(params) { return request({ url: '/sanitation/toilet/add', method: 'post', params }) } -// 修改公厕机构 -export function updateToilet(params) { +// 修改设备机构 +export function updateDevice(params) { return request({ url: '/sanitation/toilet/update', method: 'post', params }) } -// 删除公厕机构 -export function delToilet(ids) { +// 删除设备机构 +export function delDevice(ids) { return request({ url: '/sanitation/toilet/delete', method: 'post', @@ -52,8 +52,8 @@ }) } -// 公厕查询 -export function getToiletCleanListPage(params) { +// 设备查询 +export function getDeviceCleanListPage(params) { return request({ url: '/sanitation/toilet/jobRecord', method: 'get', @@ -62,7 +62,7 @@ } // 批量导入 -export function batchImportToilet(fileobj) { +export function batchImportDevice(fileobj) { const param = new FormData() param.append('file', fileobj) return request({ @@ -73,7 +73,7 @@ }) } // 批量导出 -export function batchExportToilet(params, config) { +export function batchExportDevice(params, config) { return request({ url: '/sanitation/toilet/export', method: 'get', @@ -83,24 +83,3 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } - -// 公厕保洁记录查询 -export function getToiletJobRecords(params) { - return request({ - url: '/sanitation/toilet/jobRecord', - method: 'get', - params - }) -} - -// 批量导出 -export function batchExportToiletJobRecords(params, config) { - return request({ - url: '/sanitation/toilet/exportJobRecord', - method: 'get', - timeout: 120000, - params, - ...config, - responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob - }) -} diff --git a/src/views/data/allDeviceData.vue b/src/views/data/allDeviceData.vue index 24aeed5..f15fb7b 100644 --- a/src/views/data/allDeviceData.vue +++ b/src/views/data/allDeviceData.vue @@ -28,6 +28,8 @@ diff --git a/src/api/environment/data.js b/src/api/environment/data.js new file mode 100644 index 0000000..1c2df04 --- /dev/null +++ b/src/api/environment/data.js @@ -0,0 +1,42 @@ +/** + * 数据管理接口 + */ +import request from '@/utils/request' +import qs from 'qs' + +// 单设备数据查询 +export function getRealDataByDevice() { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 全部设备实时数据查询 +export function getRealData() { + return request({ + url: '/sanitation/toilet/listPage', + method: 'get', + params + }) +} +// 单设备历史数据查询 +export function getHistoryData(params) { + return request({ + url: '/sanitation/toilet/list', + method: 'get', + params + }) +} + +// 历史记录批量导出 +export function batchExportData(params, config) { + return request({ + url: '/sanitation/toilet/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/environment/device.js b/src/api/environment/device.js index 04bc9dd..ea00ad5 100644 --- a/src/api/environment/device.js +++ b/src/api/environment/device.js @@ -1,18 +1,18 @@ /** - * 公厕管理接口 + * 设备管理接口 */ import request from '@/utils/request' import qs from 'qs' -// 公厕查询 -export function getToiletListPage(params) { +// 设备查询 +export function getDeviceListPage(params) { return request({ url: '/sanitation/toilet/listPage', method: 'get', params }) } -// 公厕查询 -export function getToiletList(pid) { +// 设备查询 +export function getDeviceList(pid) { return request({ url: '/sanitation/toilet/list', method: 'get', @@ -22,24 +22,24 @@ }) } -// 添加公厕 -export function addToilet(params) { +// 添加设备 +export function addDevice(params) { return request({ url: '/sanitation/toilet/add', method: 'post', params }) } -// 修改公厕机构 -export function updateToilet(params) { +// 修改设备机构 +export function updateDevice(params) { return request({ url: '/sanitation/toilet/update', method: 'post', params }) } -// 删除公厕机构 -export function delToilet(ids) { +// 删除设备机构 +export function delDevice(ids) { return request({ url: '/sanitation/toilet/delete', method: 'post', @@ -52,8 +52,8 @@ }) } -// 公厕查询 -export function getToiletCleanListPage(params) { +// 设备查询 +export function getDeviceCleanListPage(params) { return request({ url: '/sanitation/toilet/jobRecord', method: 'get', @@ -62,7 +62,7 @@ } // 批量导入 -export function batchImportToilet(fileobj) { +export function batchImportDevice(fileobj) { const param = new FormData() param.append('file', fileobj) return request({ @@ -73,7 +73,7 @@ }) } // 批量导出 -export function batchExportToilet(params, config) { +export function batchExportDevice(params, config) { return request({ url: '/sanitation/toilet/export', method: 'get', @@ -83,24 +83,3 @@ responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob }) } - -// 公厕保洁记录查询 -export function getToiletJobRecords(params) { - return request({ - url: '/sanitation/toilet/jobRecord', - method: 'get', - params - }) -} - -// 批量导出 -export function batchExportToiletJobRecords(params, config) { - return request({ - url: '/sanitation/toilet/exportJobRecord', - method: 'get', - timeout: 120000, - params, - ...config, - responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob - }) -} diff --git a/src/views/data/allDeviceData.vue b/src/views/data/allDeviceData.vue index 24aeed5..f15fb7b 100644 --- a/src/views/data/allDeviceData.vue +++ b/src/views/data/allDeviceData.vue @@ -28,6 +28,8 @@ diff --git a/src/views/data/pointData.vue b/src/views/data/pointData.vue index cd7edac..9834728 100644 --- a/src/views/data/pointData.vue +++ b/src/views/data/pointData.vue @@ -1,7 +1,8 @@ + - 选择设备 + 选择设备 设备编号:{{currentDevice.deviceNo}} 安装点位:{{currentDevice.deviceName}} 地址:{{currentDevice.position}} @@ -41,59 +42,37 @@ 历史数据 - 导出数据 + 导出数据 + - - - - - - - - - - - - + + +