diff --git a/src/api/environment/alarm.js b/src/api/environment/alarm.js new file mode 100644 index 0000000..a882719 --- /dev/null +++ b/src/api/environment/alarm.js @@ -0,0 +1,41 @@ +/** + * 报警接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 报警列表查询 +export function getAlarmList(params) { + return request({ + url: '/environment/alarm/listPage', + method: 'get', + params + }) +} +// 单个消警 +export function cancelAlarm(params) { + return request({ + url: '/environment/alarm/cancel', + method: 'get', + params + }) +} + +// 批量消警 +export function batchCancelAlarm() { + return request({ + url: '/environment/alarm/batchCancel', + method: 'post' + }) +} + +// 批量导出 +export function batchExportAlarm(params, config) { + return request({ + url: '/environment/alarm/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/environment/alarm.js b/src/api/environment/alarm.js new file mode 100644 index 0000000..a882719 --- /dev/null +++ b/src/api/environment/alarm.js @@ -0,0 +1,41 @@ +/** + * 报警接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 报警列表查询 +export function getAlarmList(params) { + return request({ + url: '/environment/alarm/listPage', + method: 'get', + params + }) +} +// 单个消警 +export function cancelAlarm(params) { + return request({ + url: '/environment/alarm/cancel', + method: 'get', + params + }) +} + +// 批量消警 +export function batchCancelAlarm() { + return request({ + url: '/environment/alarm/batchCancel', + method: 'post' + }) +} + +// 批量导出 +export function batchExportAlarm(params, config) { + return request({ + url: '/environment/alarm/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/system/dict.js b/src/api/system/dict.js index 444617e..0efe7e3 100644 --- a/src/api/system/dict.js +++ b/src/api/system/dict.js @@ -40,8 +40,7 @@ // 获取字典值列表 export function getDictByCode(params) { return request({ - url: '/environment/dict/code/'+params, - method: 'get', - params + url: 'dict/code/'+params, + method: 'get' }) } diff --git a/src/api/environment/alarm.js b/src/api/environment/alarm.js new file mode 100644 index 0000000..a882719 --- /dev/null +++ b/src/api/environment/alarm.js @@ -0,0 +1,41 @@ +/** + * 报警接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 报警列表查询 +export function getAlarmList(params) { + return request({ + url: '/environment/alarm/listPage', + method: 'get', + params + }) +} +// 单个消警 +export function cancelAlarm(params) { + return request({ + url: '/environment/alarm/cancel', + method: 'get', + params + }) +} + +// 批量消警 +export function batchCancelAlarm() { + return request({ + url: '/environment/alarm/batchCancel', + method: 'post' + }) +} + +// 批量导出 +export function batchExportAlarm(params, config) { + return request({ + url: '/environment/alarm/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/system/dict.js b/src/api/system/dict.js index 444617e..0efe7e3 100644 --- a/src/api/system/dict.js +++ b/src/api/system/dict.js @@ -40,8 +40,7 @@ // 获取字典值列表 export function getDictByCode(params) { return request({ - url: '/environment/dict/code/'+params, - method: 'get', - params + url: 'dict/code/'+params, + method: 'get' }) } diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 5077bef..6776ddd 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -152,7 +152,7 @@ }, size: { type: String, - default: '' + default: 'small' }, // 表格大小,默认,small,mini等,与el-table条件仙童 toolsOption: { type: Object, diff --git a/src/api/environment/alarm.js b/src/api/environment/alarm.js new file mode 100644 index 0000000..a882719 --- /dev/null +++ b/src/api/environment/alarm.js @@ -0,0 +1,41 @@ +/** + * 报警接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 报警列表查询 +export function getAlarmList(params) { + return request({ + url: '/environment/alarm/listPage', + method: 'get', + params + }) +} +// 单个消警 +export function cancelAlarm(params) { + return request({ + url: '/environment/alarm/cancel', + method: 'get', + params + }) +} + +// 批量消警 +export function batchCancelAlarm() { + return request({ + url: '/environment/alarm/batchCancel', + method: 'post' + }) +} + +// 批量导出 +export function batchExportAlarm(params, config) { + return request({ + url: '/environment/alarm/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/system/dict.js b/src/api/system/dict.js index 444617e..0efe7e3 100644 --- a/src/api/system/dict.js +++ b/src/api/system/dict.js @@ -40,8 +40,7 @@ // 获取字典值列表 export function getDictByCode(params) { return request({ - url: '/environment/dict/code/'+params, - method: 'get', - params + url: 'dict/code/'+params, + method: 'get' }) } diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 5077bef..6776ddd 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -152,7 +152,7 @@ }, size: { type: String, - default: '' + default: 'small' }, // 表格大小,默认,small,mini等,与el-table条件仙童 toolsOption: { type: Object, diff --git a/src/router/modules/environment.js b/src/router/modules/environment.js index 10f1d58..75094ea 100644 --- a/src/router/modules/environment.js +++ b/src/router/modules/environment.js @@ -35,7 +35,7 @@ }, { path: '/historyAlarm', name: 'historyAlarm', - component: () => import('@/views/environment/environmentData'), + component: () => import('@/views/alarm/listAlarmHistory'), meta: { title: '历史报警', icon: '', permission: ['/environment/alarm/listPage'] } } ] @@ -93,7 +93,7 @@ }, { path: '/historyData', name: 'HistoryData', - component: () => import('@/views/environment/environmentData'), + component: () => import('@/views/data/pointData'), meta: { title: '历史数据', icon: '', permission: ['/environment/data/historyData'] } } ] diff --git a/src/api/environment/alarm.js b/src/api/environment/alarm.js new file mode 100644 index 0000000..a882719 --- /dev/null +++ b/src/api/environment/alarm.js @@ -0,0 +1,41 @@ +/** + * 报警接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 报警列表查询 +export function getAlarmList(params) { + return request({ + url: '/environment/alarm/listPage', + method: 'get', + params + }) +} +// 单个消警 +export function cancelAlarm(params) { + return request({ + url: '/environment/alarm/cancel', + method: 'get', + params + }) +} + +// 批量消警 +export function batchCancelAlarm() { + return request({ + url: '/environment/alarm/batchCancel', + method: 'post' + }) +} + +// 批量导出 +export function batchExportAlarm(params, config) { + return request({ + url: '/environment/alarm/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/system/dict.js b/src/api/system/dict.js index 444617e..0efe7e3 100644 --- a/src/api/system/dict.js +++ b/src/api/system/dict.js @@ -40,8 +40,7 @@ // 获取字典值列表 export function getDictByCode(params) { return request({ - url: '/environment/dict/code/'+params, - method: 'get', - params + url: 'dict/code/'+params, + method: 'get' }) } diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 5077bef..6776ddd 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -152,7 +152,7 @@ }, size: { type: String, - default: '' + default: 'small' }, // 表格大小,默认,small,mini等,与el-table条件仙童 toolsOption: { type: Object, diff --git a/src/router/modules/environment.js b/src/router/modules/environment.js index 10f1d58..75094ea 100644 --- a/src/router/modules/environment.js +++ b/src/router/modules/environment.js @@ -35,7 +35,7 @@ }, { path: '/historyAlarm', name: 'historyAlarm', - component: () => import('@/views/environment/environmentData'), + component: () => import('@/views/alarm/listAlarmHistory'), meta: { title: '历史报警', icon: '', permission: ['/environment/alarm/listPage'] } } ] @@ -93,7 +93,7 @@ }, { path: '/historyData', name: 'HistoryData', - component: () => import('@/views/environment/environmentData'), + component: () => import('@/views/data/pointData'), meta: { title: '历史数据', icon: '', permission: ['/environment/data/historyData'] } } ] diff --git a/src/views/alarm/listAlarmHistory.vue b/src/views/alarm/listAlarmHistory.vue new file mode 100644 index 0000000..2d8b5c9 --- /dev/null +++ b/src/views/alarm/listAlarmHistory.vue @@ -0,0 +1,255 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + 手动消警 + 正在报警 + 自动消警 + + + + + + + + + + + + + + + diff --git a/src/api/environment/alarm.js b/src/api/environment/alarm.js new file mode 100644 index 0000000..a882719 --- /dev/null +++ b/src/api/environment/alarm.js @@ -0,0 +1,41 @@ +/** + * 报警接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 报警列表查询 +export function getAlarmList(params) { + return request({ + url: '/environment/alarm/listPage', + method: 'get', + params + }) +} +// 单个消警 +export function cancelAlarm(params) { + return request({ + url: '/environment/alarm/cancel', + method: 'get', + params + }) +} + +// 批量消警 +export function batchCancelAlarm() { + return request({ + url: '/environment/alarm/batchCancel', + method: 'post' + }) +} + +// 批量导出 +export function batchExportAlarm(params, config) { + return request({ + url: '/environment/alarm/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/system/dict.js b/src/api/system/dict.js index 444617e..0efe7e3 100644 --- a/src/api/system/dict.js +++ b/src/api/system/dict.js @@ -40,8 +40,7 @@ // 获取字典值列表 export function getDictByCode(params) { return request({ - url: '/environment/dict/code/'+params, - method: 'get', - params + url: 'dict/code/'+params, + method: 'get' }) } diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 5077bef..6776ddd 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -152,7 +152,7 @@ }, size: { type: String, - default: '' + default: 'small' }, // 表格大小,默认,small,mini等,与el-table条件仙童 toolsOption: { type: Object, diff --git a/src/router/modules/environment.js b/src/router/modules/environment.js index 10f1d58..75094ea 100644 --- a/src/router/modules/environment.js +++ b/src/router/modules/environment.js @@ -35,7 +35,7 @@ }, { path: '/historyAlarm', name: 'historyAlarm', - component: () => import('@/views/environment/environmentData'), + component: () => import('@/views/alarm/listAlarmHistory'), meta: { title: '历史报警', icon: '', permission: ['/environment/alarm/listPage'] } } ] @@ -93,7 +93,7 @@ }, { path: '/historyData', name: 'HistoryData', - component: () => import('@/views/environment/environmentData'), + component: () => import('@/views/data/pointData'), meta: { title: '历史数据', icon: '', permission: ['/environment/data/historyData'] } } ] diff --git a/src/views/alarm/listAlarmHistory.vue b/src/views/alarm/listAlarmHistory.vue new file mode 100644 index 0000000..2d8b5c9 --- /dev/null +++ b/src/views/alarm/listAlarmHistory.vue @@ -0,0 +1,255 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + 手动消警 + 正在报警 + 自动消警 + + + + + + + + + + + + + + + diff --git a/src/views/alarm/listAlarmNow.vue b/src/views/alarm/listAlarmNow.vue index 75133d1..59cdcac 100644 --- a/src/views/alarm/listAlarmNow.vue +++ b/src/views/alarm/listAlarmNow.vue @@ -7,7 +7,7 @@ - + - + 导出记录 - 一键消警 + 一键消警 @@ -46,7 +46,7 @@ - 取消报警 + 取消报警 @@ -55,14 +55,11 @@ + + diff --git a/src/views/alarm/listAlarmNow.vue b/src/views/alarm/listAlarmNow.vue index 75133d1..59cdcac 100644 --- a/src/views/alarm/listAlarmNow.vue +++ b/src/views/alarm/listAlarmNow.vue @@ -7,7 +7,7 @@ - + - + 导出记录 - 一键消警 + 一键消警 @@ -46,7 +46,7 @@ - 取消报警 + 取消报警 @@ -55,14 +55,11 @@ - + diff --git a/src/api/environment/alarm.js b/src/api/environment/alarm.js new file mode 100644 index 0000000..a882719 --- /dev/null +++ b/src/api/environment/alarm.js @@ -0,0 +1,41 @@ +/** + * 报警接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 报警列表查询 +export function getAlarmList(params) { + return request({ + url: '/environment/alarm/listPage', + method: 'get', + params + }) +} +// 单个消警 +export function cancelAlarm(params) { + return request({ + url: '/environment/alarm/cancel', + method: 'get', + params + }) +} + +// 批量消警 +export function batchCancelAlarm() { + return request({ + url: '/environment/alarm/batchCancel', + method: 'post' + }) +} + +// 批量导出 +export function batchExportAlarm(params, config) { + return request({ + url: '/environment/alarm/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/system/dict.js b/src/api/system/dict.js index 444617e..0efe7e3 100644 --- a/src/api/system/dict.js +++ b/src/api/system/dict.js @@ -40,8 +40,7 @@ // 获取字典值列表 export function getDictByCode(params) { return request({ - url: '/environment/dict/code/'+params, - method: 'get', - params + url: 'dict/code/'+params, + method: 'get' }) } diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 5077bef..6776ddd 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -152,7 +152,7 @@ }, size: { type: String, - default: '' + default: 'small' }, // 表格大小,默认,small,mini等,与el-table条件仙童 toolsOption: { type: Object, diff --git a/src/router/modules/environment.js b/src/router/modules/environment.js index 10f1d58..75094ea 100644 --- a/src/router/modules/environment.js +++ b/src/router/modules/environment.js @@ -35,7 +35,7 @@ }, { path: '/historyAlarm', name: 'historyAlarm', - component: () => import('@/views/environment/environmentData'), + component: () => import('@/views/alarm/listAlarmHistory'), meta: { title: '历史报警', icon: '', permission: ['/environment/alarm/listPage'] } } ] @@ -93,7 +93,7 @@ }, { path: '/historyData', name: 'HistoryData', - component: () => import('@/views/environment/environmentData'), + component: () => import('@/views/data/pointData'), meta: { title: '历史数据', icon: '', permission: ['/environment/data/historyData'] } } ] diff --git a/src/views/alarm/listAlarmHistory.vue b/src/views/alarm/listAlarmHistory.vue new file mode 100644 index 0000000..2d8b5c9 --- /dev/null +++ b/src/views/alarm/listAlarmHistory.vue @@ -0,0 +1,255 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + 手动消警 + 正在报警 + 自动消警 + + + + + + + + + + + + + + + diff --git a/src/views/alarm/listAlarmNow.vue b/src/views/alarm/listAlarmNow.vue index 75133d1..59cdcac 100644 --- a/src/views/alarm/listAlarmNow.vue +++ b/src/views/alarm/listAlarmNow.vue @@ -7,7 +7,7 @@ - + - + 导出记录 - 一键消警 + 一键消警 @@ -46,7 +46,7 @@ - 取消报警 + 取消报警 @@ -55,14 +55,11 @@ - + diff --git a/src/views/data/chooseDevice.vue b/src/views/data/chooseDevice.vue new file mode 100644 index 0000000..e9e53d5 --- /dev/null +++ b/src/views/data/chooseDevice.vue @@ -0,0 +1,61 @@ + + + + + + + + + + diff --git a/src/api/environment/alarm.js b/src/api/environment/alarm.js new file mode 100644 index 0000000..a882719 --- /dev/null +++ b/src/api/environment/alarm.js @@ -0,0 +1,41 @@ +/** + * 报警接口 + */ +import request from '@/utils/request' +import qs from 'qs' +// 报警列表查询 +export function getAlarmList(params) { + return request({ + url: '/environment/alarm/listPage', + method: 'get', + params + }) +} +// 单个消警 +export function cancelAlarm(params) { + return request({ + url: '/environment/alarm/cancel', + method: 'get', + params + }) +} + +// 批量消警 +export function batchCancelAlarm() { + return request({ + url: '/environment/alarm/batchCancel', + method: 'post' + }) +} + +// 批量导出 +export function batchExportAlarm(params, config) { + return request({ + url: '/environment/alarm/export', + method: 'get', + timeout: 120000, + params, + ...config, + responseType: 'blob' // 这一步也很关键,一定要加上 responseType 值为 blob + }) +} diff --git a/src/api/system/dict.js b/src/api/system/dict.js index 444617e..0efe7e3 100644 --- a/src/api/system/dict.js +++ b/src/api/system/dict.js @@ -40,8 +40,7 @@ // 获取字典值列表 export function getDictByCode(params) { return request({ - url: '/environment/dict/code/'+params, - method: 'get', - params + url: 'dict/code/'+params, + method: 'get' }) } diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 5077bef..6776ddd 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -152,7 +152,7 @@ }, size: { type: String, - default: '' + default: 'small' }, // 表格大小,默认,small,mini等,与el-table条件仙童 toolsOption: { type: Object, diff --git a/src/router/modules/environment.js b/src/router/modules/environment.js index 10f1d58..75094ea 100644 --- a/src/router/modules/environment.js +++ b/src/router/modules/environment.js @@ -35,7 +35,7 @@ }, { path: '/historyAlarm', name: 'historyAlarm', - component: () => import('@/views/environment/environmentData'), + component: () => import('@/views/alarm/listAlarmHistory'), meta: { title: '历史报警', icon: '', permission: ['/environment/alarm/listPage'] } } ] @@ -93,7 +93,7 @@ }, { path: '/historyData', name: 'HistoryData', - component: () => import('@/views/environment/environmentData'), + component: () => import('@/views/data/pointData'), meta: { title: '历史数据', icon: '', permission: ['/environment/data/historyData'] } } ] diff --git a/src/views/alarm/listAlarmHistory.vue b/src/views/alarm/listAlarmHistory.vue new file mode 100644 index 0000000..2d8b5c9 --- /dev/null +++ b/src/views/alarm/listAlarmHistory.vue @@ -0,0 +1,255 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 导出记录 + + + + + 手动消警 + 正在报警 + 自动消警 + + + + + + + + + + + + + + + diff --git a/src/views/alarm/listAlarmNow.vue b/src/views/alarm/listAlarmNow.vue index 75133d1..59cdcac 100644 --- a/src/views/alarm/listAlarmNow.vue +++ b/src/views/alarm/listAlarmNow.vue @@ -7,7 +7,7 @@ - + - + 导出记录 - 一键消警 + 一键消警 @@ -46,7 +46,7 @@ - 取消报警 + 取消报警 @@ -55,14 +55,11 @@ - + diff --git a/src/views/data/chooseDevice.vue b/src/views/data/chooseDevice.vue new file mode 100644 index 0000000..e9e53d5 --- /dev/null +++ b/src/views/data/chooseDevice.vue @@ -0,0 +1,61 @@ + + + + + + + + + + diff --git a/src/views/data/pointData.vue b/src/views/data/pointData.vue index 9ed8a09..cd7edac 100644 --- a/src/views/data/pointData.vue +++ b/src/views/data/pointData.vue @@ -1,170 +1,269 @@ - + + 选择设备 + 设备编号:{{currentDevice.deviceNo}} + 安装点位:{{currentDevice.deviceName}} + 地址:{{currentDevice.position}} + + - + + {{item.name}} + + + + + + + + + - + + + + + 历史数据 + + + 导出数据 + + + + + + + + + + + + + + + + + + - - - - 历史数据 - - - -